mirror of
https://github.com/garrytan/gstack.git
synced 2026-05-06 21:46:40 +02:00
merge: integrate origin/main (v0.18.3.0) — community wave
Resolves conflicts: - VERSION: kept 0.19.0.0 (feature branch, higher than main's 0.18.3.0) - package.json: kept 0.19.0.0 - CHANGELOG.md: preserved 0.19.0.0 at top, inserted 0.18.3.0 between 0.19.0.0 and 0.18.2.0 Main brought community wave (6 PRs + hardening): - Windows cookie import - Persistent browse server across CLI invocations - One-command OpenCode install - OpenClaw skill frontmatter fixes - Cookie picker UI resilience Auto-merge applied to design.ts, design-consultation/SKILL.md.tmpl, design-shotgun/SKILL.md.tmpl, and plan-design-review/SKILL.md.tmpl — main's UX_PRINCIPLES changes and my TASTE_PROFILE resolver coexist cleanly. Regenerated all SKILL.md files via gen:skill-docs and refreshed ship golden fixtures. 423 tests pass. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -2122,15 +2122,16 @@ describe('setup script validation', () => {
|
||||
expect(fnBody).toContain('rm -f "$target"');
|
||||
});
|
||||
|
||||
test('setup supports --host auto|claude|codex|kiro', () => {
|
||||
test('setup supports --host auto|claude|codex|kiro|opencode', () => {
|
||||
expect(setupContent).toContain('--host');
|
||||
expect(setupContent).toContain('claude|codex|kiro|factory|auto');
|
||||
expect(setupContent).toContain('claude|codex|kiro|factory|opencode|auto');
|
||||
});
|
||||
|
||||
test('auto mode detects claude, codex, and kiro binaries', () => {
|
||||
test('auto mode detects claude, codex, kiro, and opencode binaries', () => {
|
||||
expect(setupContent).toContain('command -v claude');
|
||||
expect(setupContent).toContain('command -v codex');
|
||||
expect(setupContent).toContain('command -v kiro-cli');
|
||||
expect(setupContent).toContain('command -v opencode');
|
||||
});
|
||||
|
||||
// T1: Sidecar skip guard — prevents .agents/skills/gstack from being linked as a skill
|
||||
@@ -2150,7 +2151,6 @@ describe('setup script validation', () => {
|
||||
expect(content).toContain('$GSTACK_BIN/');
|
||||
});
|
||||
|
||||
// T3: Kiro host support in setup script
|
||||
test('setup supports --host kiro with install section and sed rewrites', () => {
|
||||
expect(setupContent).toContain('INSTALL_KIRO=');
|
||||
expect(setupContent).toContain('kiro-cli');
|
||||
@@ -2158,6 +2158,21 @@ describe('setup script validation', () => {
|
||||
expect(setupContent).toContain('~/.kiro/skills/gstack');
|
||||
});
|
||||
|
||||
test('setup supports --host opencode with install section and OpenCode skill path vars', () => {
|
||||
expect(setupContent).toContain('INSTALL_OPENCODE=');
|
||||
expect(setupContent).toContain('OPENCODE_SKILLS="$HOME/.config/opencode/skills"');
|
||||
expect(setupContent).toContain('OPENCODE_GSTACK="$OPENCODE_SKILLS/gstack"');
|
||||
});
|
||||
|
||||
test('setup installs OpenCode skills into a nested gstack runtime root', () => {
|
||||
expect(setupContent).toContain('create_opencode_runtime_root');
|
||||
expect(setupContent).toContain('.opencode/skills');
|
||||
expect(setupContent).toContain('review/specialists');
|
||||
expect(setupContent).toContain('qa/templates');
|
||||
expect(setupContent).toContain('qa/references');
|
||||
expect(setupContent).toContain('dx-hall-of-fame.md');
|
||||
});
|
||||
|
||||
test('create_agents_sidecar links runtime assets', () => {
|
||||
// Sidecar must link bin, browse, review, qa
|
||||
const fnStart = setupContent.indexOf('create_agents_sidecar()');
|
||||
|
||||
@@ -354,6 +354,21 @@ describe('host-config-export.ts CLI', () => {
|
||||
expect(lines).toContain('review/checklist.md');
|
||||
});
|
||||
|
||||
test('opencode symlinks returns nested runtime assets', () => {
|
||||
const { stdout, exitCode } = run('symlinks', 'opencode');
|
||||
expect(exitCode).toBe(0);
|
||||
const lines = stdout.split('\n');
|
||||
expect(lines).toContain('bin');
|
||||
expect(lines).toContain('browse/dist');
|
||||
expect(lines).toContain('browse/bin');
|
||||
expect(lines).toContain('review/design-checklist.md');
|
||||
expect(lines).toContain('review/greptile-triage.md');
|
||||
expect(lines).toContain('review/specialists');
|
||||
expect(lines).toContain('qa/templates');
|
||||
expect(lines).toContain('qa/references');
|
||||
expect(lines).toContain('plan-devex-review/dx-hall-of-fame.md');
|
||||
});
|
||||
|
||||
test('symlinks with missing host exits 1', () => {
|
||||
const { exitCode } = run('symlinks');
|
||||
expect(exitCode).toBe(1);
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
import { describe, test, expect } from 'bun:test';
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
|
||||
const ROOT = path.resolve(import.meta.dir, '..');
|
||||
|
||||
const OPENCLAW_NATIVE_SKILLS = [
|
||||
'openclaw/skills/gstack-openclaw-investigate/SKILL.md',
|
||||
'openclaw/skills/gstack-openclaw-office-hours/SKILL.md',
|
||||
'openclaw/skills/gstack-openclaw-ceo-review/SKILL.md',
|
||||
'openclaw/skills/gstack-openclaw-retro/SKILL.md',
|
||||
];
|
||||
|
||||
function extractFrontmatter(content: string): string {
|
||||
expect(content.startsWith('---\n')).toBe(true);
|
||||
const fmEnd = content.indexOf('\n---', 4);
|
||||
expect(fmEnd).toBeGreaterThan(0);
|
||||
return content.slice(4, fmEnd);
|
||||
}
|
||||
|
||||
describe('OpenClaw native skills', () => {
|
||||
test('frontmatter parses as YAML and keeps only name + description', () => {
|
||||
for (const skill of OPENCLAW_NATIVE_SKILLS) {
|
||||
const content = fs.readFileSync(path.join(ROOT, skill), 'utf-8');
|
||||
const frontmatter = extractFrontmatter(content);
|
||||
const parsed = Bun.YAML.parse(frontmatter) as Record<string, unknown>;
|
||||
|
||||
expect(Object.keys(parsed).sort()).toEqual(['description', 'name']);
|
||||
expect(typeof parsed.name).toBe('string');
|
||||
expect(typeof parsed.description).toBe('string');
|
||||
expect((parsed.name as string).length).toBeGreaterThan(0);
|
||||
expect((parsed.description as string).length).toBeGreaterThan(0);
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user