Merge remote-tracking branch 'origin/main' into garrytan/plan-tune-skill

Conflicts resolved:
- VERSION / package.json: keep 0.19.0.0 (our MINOR bump stays above main's
  new 0.18.3.0 — community wave v0.18.3.0 + our plan-tune v0.19.0.0 both
  ship, ours on top).
- CHANGELOG.md: preserved both entries in order — v0.19.0.0 (plan-tune)
  above v0.18.3.0 (community wave). No version gaps.
- .github/docker/Dockerfile.ci: main's Hetzner-mirror swap is a better root
  cause fix than my retry-only patch (route-local for Ubicloud runners,
  avoids archive.ubuntu.com entirely). Combined: main's mirror swap PLUS
  my defense-in-depth layers on top (apt retries config, --retry-connrefused
  on curl, and outer shell-loop retries for apt-get update). Mirror swap
  solves the root cause; retries handle the rare case where even Hetzner
  blips.

Main added:
- v0.18.3.0 (#1028): community wave — Windows cookie import, OpenCode install,
  permission-prompt cleanup, $B server persistence across Bash calls, cookie
  picker fix, OpenClaw frontmatter fix.
- Dockerfile.ci Hetzner mirror swap (from the same wave).

Regenerated all SKILL.md files after merge so they reflect main's design-*
template changes AND our question-tuning preamble additions.

Full free test suite: 1162 pass, 0 fail, 113 skip across 29 files, 7903
expect() calls.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Garry Tan
2026-04-17 15:52:53 +08:00
28 changed files with 862 additions and 114 deletions
+19 -4
View File
@@ -2115,15 +2115,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
@@ -2143,7 +2144,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');
@@ -2151,6 +2151,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()');
+15
View File
@@ -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);
+35
View File
@@ -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);
}
});
});