@pellux/goodvibes-agent 0.1.58 → 0.1.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/package.json +1 -6
- package/src/cli/package-verification.ts +0 -1
- package/src/input/commands.ts +0 -2
- package/src/input/submission-router.ts +1 -1
- package/src/version.ts +1 -1
- package/scripts/check-bun.sh +0 -22
- package/src/input/commands/teamwork-runtime.ts +0 -339
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to GoodVibes Agent will be recorded here.
|
|
4
4
|
|
|
5
|
+
## 0.1.59 - 2026-05-31
|
|
6
|
+
|
|
7
|
+
- f03ee5f Remove unused coding panel sources
|
|
8
|
+
- 5950687 Remove blocked teamwork command surface
|
|
9
|
+
- e60bf10 Remove noisy Bun preinstall lifecycle
|
|
10
|
+
|
|
5
11
|
## 0.1.58 - 2026-05-31
|
|
6
12
|
|
|
7
13
|
- e137f90 Fail cleanly for non-TTY TUI launch
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pellux/goodvibes-agent",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.59",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Near-fork GoodVibes operator assistant with the GoodVibes TUI shell, renderer, input, fullscreen workspace, and daemon-connected Agent product brain.",
|
|
6
6
|
"type": "module",
|
|
@@ -19,14 +19,10 @@
|
|
|
19
19
|
"!src/**/*.test.ts",
|
|
20
20
|
"!src/**/__tests__",
|
|
21
21
|
"!src/panels/diff-panel.ts",
|
|
22
|
-
"!src/panels/file-explorer-panel.ts",
|
|
23
|
-
"!src/panels/file-preview-panel.ts",
|
|
24
22
|
"!src/panels/git-panel.ts",
|
|
25
23
|
"!src/panels/sandbox-panel.ts",
|
|
26
|
-
"!src/panels/symbol-outline-panel.ts",
|
|
27
24
|
"!src/panels/worktree-panel.ts",
|
|
28
25
|
"!src/panels/wrfc-panel.ts",
|
|
29
|
-
"scripts/check-bun.sh",
|
|
30
26
|
"tsconfig.json",
|
|
31
27
|
"README.md",
|
|
32
28
|
"CHANGELOG.md",
|
|
@@ -51,7 +47,6 @@
|
|
|
51
47
|
"build:all-shell": "bun run build:linux-x64 && bun run build:linux-arm64 && bun run build:macos-x64 && bun run build:macos-arm64 && bun run build:windows",
|
|
52
48
|
"test": "bun run scripts/run-tests.ts",
|
|
53
49
|
"version": "bun run scripts/prebuild.ts",
|
|
54
|
-
"preinstall": "sh scripts/check-bun.sh",
|
|
55
50
|
"release": "bun run scripts/release.ts",
|
|
56
51
|
"release:dry": "bun run scripts/release.ts --dry-run",
|
|
57
52
|
"publish:package": "bun run scripts/publish-package.ts",
|
package/src/input/commands.ts
CHANGED
|
@@ -22,7 +22,6 @@ import { registerProfileSyncRuntimeCommands } from './commands/profile-sync-runt
|
|
|
22
22
|
import { registerManagedRuntimeCommands } from './commands/managed-runtime.ts';
|
|
23
23
|
import { registerPlatformAccessRuntimeCommands } from './commands/platform-access-runtime.ts';
|
|
24
24
|
import { registerPlatformServicesRuntimeCommands } from './commands/platform-services-runtime.ts';
|
|
25
|
-
import { registerTeamworkRuntimeCommands } from './commands/teamwork-runtime.ts';
|
|
26
25
|
import { registerMarketplaceRuntimeCommands } from './commands/marketplace-runtime.ts';
|
|
27
26
|
import { registerGuidanceRuntimeCommands } from './commands/guidance-runtime.ts';
|
|
28
27
|
import { registerRemoteRuntimeCommands } from './commands/remote-runtime.ts';
|
|
@@ -81,7 +80,6 @@ export function registerBuiltinCommands(registry: CommandRegistry): void {
|
|
|
81
80
|
registerManagedRuntimeCommands(registry);
|
|
82
81
|
registerPlatformAccessRuntimeCommands(registry);
|
|
83
82
|
registerPlatformServicesRuntimeCommands(registry);
|
|
84
|
-
registerTeamworkRuntimeCommands(registry);
|
|
85
83
|
registerMarketplaceRuntimeCommands(registry);
|
|
86
84
|
registerGuidanceRuntimeCommands(registry);
|
|
87
85
|
registerRemoteRuntimeCommands(registry);
|
|
@@ -8,7 +8,7 @@ export interface SubmissionRouterInput {
|
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
const PLAN_COMMANDS = new Set(['plan']);
|
|
11
|
-
const DELEGATION_COMMANDS = new Set(['delegate', 'build', 'review', 'wrfc', '
|
|
11
|
+
const DELEGATION_COMMANDS = new Set(['delegate', 'build', 'review', 'wrfc', 'agents', 'remote']);
|
|
12
12
|
const PANEL_COMMANDS = new Set(['panel']);
|
|
13
13
|
const ORCHESTRATION_COMMANDS = new Set([
|
|
14
14
|
'orchestration',
|
package/src/version.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { join } from 'node:path';
|
|
|
6
6
|
// The prebuild script updates the fallback value before compilation.
|
|
7
7
|
// Uses import.meta.dir (Bun) to locate package.json relative to this file,
|
|
8
8
|
// which is correct regardless of the process working directory.
|
|
9
|
-
let _version = '0.1.
|
|
9
|
+
let _version = '0.1.59';
|
|
10
10
|
let _sdkVersion = '0.33.35';
|
|
11
11
|
try {
|
|
12
12
|
const pkg = JSON.parse(readFileSync(join(import.meta.dir, '..', 'package.json'), 'utf-8')) as {
|
package/scripts/check-bun.sh
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
set -eu
|
|
3
|
-
|
|
4
|
-
if ! command -v bun >/dev/null 2>&1; then
|
|
5
|
-
cat >&2 <<'EOF'
|
|
6
|
-
goodvibes-agent requires Bun.
|
|
7
|
-
|
|
8
|
-
Install Bun first, then install GoodVibes Agent with:
|
|
9
|
-
|
|
10
|
-
bun add -g @pellux/goodvibes-agent
|
|
11
|
-
|
|
12
|
-
If the installed command is not found, add Bun's global bin directory to PATH:
|
|
13
|
-
|
|
14
|
-
export PATH="$(bun pm bin -g):$PATH"
|
|
15
|
-
EOF
|
|
16
|
-
exit 1
|
|
17
|
-
fi
|
|
18
|
-
|
|
19
|
-
if ! bun --version >/dev/null 2>&1; then
|
|
20
|
-
echo "goodvibes-agent requires a working Bun executable on PATH." >&2
|
|
21
|
-
exit 1
|
|
22
|
-
fi
|
|
@@ -1,339 +0,0 @@
|
|
|
1
|
-
import type { CommandRegistry, CommandContext } from '../command-registry.ts';
|
|
2
|
-
import { join } from 'node:path';
|
|
3
|
-
import { AGENT_TEMPLATES } from '@pellux/goodvibes-sdk/platform/tools';
|
|
4
|
-
import { ArchetypeLoader, type AgentArchetype } from '@pellux/goodvibes-sdk/platform/agents';
|
|
5
|
-
import { requireReadModels, requireShellPaths } from './runtime-services.ts';
|
|
6
|
-
|
|
7
|
-
type TeamworkModeId =
|
|
8
|
-
| 'local-engineer'
|
|
9
|
-
| 'local-shell'
|
|
10
|
-
| 'remote-engineer'
|
|
11
|
-
| 'teammate'
|
|
12
|
-
| 'research'
|
|
13
|
-
| 'dream'
|
|
14
|
-
| 'review'
|
|
15
|
-
| 'verifier'
|
|
16
|
-
| 'integration';
|
|
17
|
-
|
|
18
|
-
interface TeamworkMode {
|
|
19
|
-
readonly id: TeamworkModeId;
|
|
20
|
-
readonly label: string;
|
|
21
|
-
readonly taskKind: 'agent' | 'exec' | 'acp' | 'integration';
|
|
22
|
-
readonly owner: string;
|
|
23
|
-
readonly template?: keyof typeof AGENT_TEMPLATES;
|
|
24
|
-
readonly reviewMode: 'none' | 'wrfc';
|
|
25
|
-
readonly executionProtocol: 'direct' | 'gather-plan-apply';
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
interface TeamworkRecipe {
|
|
29
|
-
readonly id: string;
|
|
30
|
-
readonly summary: string;
|
|
31
|
-
readonly steps: readonly string[];
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
interface ResolvedArchetypeMode {
|
|
35
|
-
readonly id: string;
|
|
36
|
-
readonly label: string;
|
|
37
|
-
readonly owner: string;
|
|
38
|
-
readonly taskKind: 'agent' | 'exec' | 'acp' | 'integration';
|
|
39
|
-
readonly template?: string;
|
|
40
|
-
readonly reviewMode: 'none' | 'wrfc';
|
|
41
|
-
readonly executionProtocol: 'direct' | 'gather-plan-apply';
|
|
42
|
-
readonly source: 'builtin' | 'custom';
|
|
43
|
-
readonly family: 'implement' | 'review' | 'test' | 'research' | 'general';
|
|
44
|
-
readonly sourcePath?: string;
|
|
45
|
-
readonly validationIssues: readonly string[];
|
|
46
|
-
readonly tools: readonly string[];
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
interface TeamworkReviewSnapshot {
|
|
50
|
-
readonly builtinArchetypes: number;
|
|
51
|
-
readonly customArchetypes: number;
|
|
52
|
-
readonly archetypesWithIssues: number;
|
|
53
|
-
readonly implementArchetypes: number;
|
|
54
|
-
readonly reviewArchetypes: number;
|
|
55
|
-
readonly researchArchetypes: number;
|
|
56
|
-
readonly activeTaskCount: number;
|
|
57
|
-
readonly blockedTaskCount: number;
|
|
58
|
-
readonly reviewTaskCount: number;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
const TEAMWORK_MODES: readonly TeamworkMode[] = [
|
|
62
|
-
{ id: 'local-engineer', label: 'Local engineer task', taskKind: 'agent', owner: 'local-engineer', template: 'engineer', reviewMode: 'wrfc', executionProtocol: 'gather-plan-apply' },
|
|
63
|
-
{ id: 'local-shell', label: 'Local shell task', taskKind: 'exec', owner: 'local-shell', reviewMode: 'none', executionProtocol: 'direct' },
|
|
64
|
-
{ id: 'remote-engineer', label: 'Remote engineer task', taskKind: 'acp', owner: 'remote-engineer', template: 'engineer', reviewMode: 'wrfc', executionProtocol: 'gather-plan-apply' },
|
|
65
|
-
{ id: 'teammate', label: 'In-process teammate task', taskKind: 'agent', owner: 'teammate', template: 'general', reviewMode: 'wrfc', executionProtocol: 'gather-plan-apply' },
|
|
66
|
-
{ id: 'research', label: 'Research task', taskKind: 'agent', owner: 'research', template: 'researcher', reviewMode: 'none', executionProtocol: 'gather-plan-apply' },
|
|
67
|
-
{ id: 'dream', label: 'Speculative dream task', taskKind: 'agent', owner: 'dream', template: 'researcher', reviewMode: 'none', executionProtocol: 'gather-plan-apply' },
|
|
68
|
-
{ id: 'review', label: 'Review-only task', taskKind: 'agent', owner: 'review', template: 'reviewer', reviewMode: 'wrfc', executionProtocol: 'gather-plan-apply' },
|
|
69
|
-
{ id: 'verifier', label: 'Verifier task', taskKind: 'agent', owner: 'verifier', template: 'reviewer', reviewMode: 'wrfc', executionProtocol: 'gather-plan-apply' },
|
|
70
|
-
{ id: 'integration', label: 'Integration task', taskKind: 'integration', owner: 'integration', template: 'engineer', reviewMode: 'wrfc', executionProtocol: 'gather-plan-apply' },
|
|
71
|
-
];
|
|
72
|
-
|
|
73
|
-
const TEAMWORK_RECIPES: readonly TeamworkRecipe[] = [
|
|
74
|
-
{
|
|
75
|
-
id: 'research-implement-review',
|
|
76
|
-
summary: 'Research first, implement second, certify with WRFC review.',
|
|
77
|
-
steps: ['research', 'local-engineer', 'review', 'verifier'],
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
id: 'remote-certification',
|
|
81
|
-
summary: 'Remote engineer execution with local review and integration.',
|
|
82
|
-
steps: ['remote-engineer', 'review', 'integration'],
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
id: 'triage-delegate-integrate',
|
|
86
|
-
summary: 'Triage locally, delegate focused teammate work, then integrate.',
|
|
87
|
-
steps: ['teammate', 'review', 'integration'],
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
id: 'dream-then-certify',
|
|
91
|
-
summary: 'Run a speculative research pass, then ground it through engineer, review, and verifier steps.',
|
|
92
|
-
steps: ['dream', 'local-engineer', 'review', 'verifier'],
|
|
93
|
-
},
|
|
94
|
-
];
|
|
95
|
-
|
|
96
|
-
function formatMode(mode: TeamworkMode): string {
|
|
97
|
-
return ` ${mode.id.padEnd(18)} ${mode.taskKind.padEnd(11)} ${mode.owner.padEnd(16)} ${mode.reviewMode.padEnd(4)} ${mode.executionProtocol}${mode.template ? ` template=${mode.template}` : ''}`;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
function classifyArchetype(archetype: AgentArchetype): ResolvedArchetypeMode['family'] {
|
|
101
|
-
const haystack = `${archetype.name} ${archetype.description}`.toLowerCase();
|
|
102
|
-
const tools = new Set(archetype.tools.map((tool) => tool.toLowerCase()));
|
|
103
|
-
if (haystack.includes('review') || haystack.includes('audit')) return 'review';
|
|
104
|
-
if (haystack.includes('test') || tools.has('exec') && tools.has('write') && !tools.has('edit')) return 'test';
|
|
105
|
-
if (haystack.includes('research') || haystack.includes('analysis') || (tools.has('find') && tools.has('analyze') && !tools.has('write') && !tools.has('edit'))) return 'research';
|
|
106
|
-
if (tools.has('write') || tools.has('edit')) return 'implement';
|
|
107
|
-
return 'general';
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
function buildArchetypeMode(archetype: AgentArchetype): ResolvedArchetypeMode {
|
|
111
|
-
const family = classifyArchetype(archetype);
|
|
112
|
-
const source = archetype.isCustom ? 'custom' : 'builtin';
|
|
113
|
-
return {
|
|
114
|
-
id: archetype.name,
|
|
115
|
-
label: archetype.description || `${archetype.name} archetype`,
|
|
116
|
-
owner: source === 'custom' ? `custom:${archetype.name}` : archetype.name,
|
|
117
|
-
taskKind: 'agent',
|
|
118
|
-
template: archetype.name,
|
|
119
|
-
reviewMode: family === 'review' ? 'wrfc' : 'none',
|
|
120
|
-
executionProtocol: family === 'research' ? 'gather-plan-apply' : family === 'implement' ? 'gather-plan-apply' : 'direct',
|
|
121
|
-
source,
|
|
122
|
-
family,
|
|
123
|
-
sourcePath: archetype.sourcePath,
|
|
124
|
-
validationIssues: archetype.validationIssues ?? [],
|
|
125
|
-
tools: archetype.tools,
|
|
126
|
-
};
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
function listArchetypeModes(projectRoot: string): ResolvedArchetypeMode[] {
|
|
130
|
-
const loader = new ArchetypeLoader(join(projectRoot, '.goodvibes', 'agents'));
|
|
131
|
-
return loader.listArchetypes()
|
|
132
|
-
.map(buildArchetypeMode)
|
|
133
|
-
.sort((a, b) => a.id.localeCompare(b.id));
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
function buildTeamworkReviewSnapshot(ctx: CommandContext): TeamworkReviewSnapshot {
|
|
137
|
-
const projectRoot = requireShellPaths(ctx).workingDirectory;
|
|
138
|
-
const archetypes = listArchetypeModes(projectRoot);
|
|
139
|
-
const tasks = [...requireReadModels(ctx).tasks.getSnapshot().tasks];
|
|
140
|
-
return {
|
|
141
|
-
builtinArchetypes: archetypes.filter((entry) => entry.source === 'builtin').length,
|
|
142
|
-
customArchetypes: archetypes.filter((entry) => entry.source === 'custom').length,
|
|
143
|
-
archetypesWithIssues: archetypes.filter((entry) => entry.validationIssues.length > 0).length,
|
|
144
|
-
implementArchetypes: archetypes.filter((entry) => entry.family === 'implement').length,
|
|
145
|
-
reviewArchetypes: archetypes.filter((entry) => entry.family === 'review').length,
|
|
146
|
-
researchArchetypes: archetypes.filter((entry) => entry.family === 'research').length,
|
|
147
|
-
activeTaskCount: tasks.filter((task) => task.status === 'running' || task.status === 'queued').length,
|
|
148
|
-
blockedTaskCount: tasks.filter((task) => task.status === 'blocked').length,
|
|
149
|
-
reviewTaskCount: tasks.filter((task) => task.owner === 'review' || task.owner === 'verifier').length,
|
|
150
|
-
};
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
function printAgentDelegationBoundary(ctx: CommandContext, requestedAction: string): void {
|
|
154
|
-
ctx.print([
|
|
155
|
-
'GoodVibes Agent does not create local teamwork, Engineer, Reviewer, Tester, Verifier, or WRFC-owned tasks.',
|
|
156
|
-
` requested: ${requestedAction}`,
|
|
157
|
-
' policy: keep ordinary work serial in the main assistant conversation',
|
|
158
|
-
' build/fix/review: delegate one request to GoodVibes TUI through the public shared-session/build-delegation contract',
|
|
159
|
-
' preserve: full original user ask and executionIntent; let TUI own WRFC when explicitly requested',
|
|
160
|
-
].join('\n'));
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
export function registerTeamworkRuntimeCommands(registry: CommandRegistry): void {
|
|
164
|
-
registry.register({
|
|
165
|
-
name: 'teamwork',
|
|
166
|
-
aliases: ['teammates'],
|
|
167
|
-
description: 'Packaged task modes, teammate templates, and orchestration recipes',
|
|
168
|
-
usage: '[review|modes|mode <id>|create-mode <id> <title...>|recipes|recipe <id>|templates|archetypes|validate|archetype <name>|create-archetype <name> <title...>]',
|
|
169
|
-
handler(args, ctx) {
|
|
170
|
-
const sub = args[0]?.toLowerCase() ?? 'review';
|
|
171
|
-
|
|
172
|
-
if (sub === 'review') {
|
|
173
|
-
const snapshot = buildTeamworkReviewSnapshot(ctx);
|
|
174
|
-
ctx.print([
|
|
175
|
-
'Teamwork Review',
|
|
176
|
-
` modes: ${TEAMWORK_MODES.length}`,
|
|
177
|
-
` recipes: ${TEAMWORK_RECIPES.length}`,
|
|
178
|
-
` builtin archetypes: ${snapshot.builtinArchetypes}`,
|
|
179
|
-
` custom archetypes: ${snapshot.customArchetypes}`,
|
|
180
|
-
` archetypes with issues: ${snapshot.archetypesWithIssues}`,
|
|
181
|
-
` implement/review/research: ${snapshot.implementArchetypes}/${snapshot.reviewArchetypes}/${snapshot.researchArchetypes}`,
|
|
182
|
-
` active tasks: ${snapshot.activeTaskCount}`,
|
|
183
|
-
` blocked tasks: ${snapshot.blockedTaskCount}`,
|
|
184
|
-
` review tasks: ${snapshot.reviewTaskCount}`,
|
|
185
|
-
' next: /teamwork archetypes',
|
|
186
|
-
' next: /teamwork validate',
|
|
187
|
-
' next: /tasks',
|
|
188
|
-
].join('\n'));
|
|
189
|
-
return;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
if (sub === 'modes') {
|
|
193
|
-
ctx.print([
|
|
194
|
-
'Teamwork Modes',
|
|
195
|
-
...TEAMWORK_MODES.map(formatMode),
|
|
196
|
-
].join('\n'));
|
|
197
|
-
return;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
if (sub === 'mode') {
|
|
201
|
-
const modeId = args[1] as TeamworkModeId | undefined;
|
|
202
|
-
const mode = TEAMWORK_MODES.find((entry) => entry.id === modeId);
|
|
203
|
-
if (!mode) {
|
|
204
|
-
ctx.print('Usage: /teamwork mode <local-engineer|local-shell|remote-engineer|teammate|research|dream|review|verifier|integration>');
|
|
205
|
-
return;
|
|
206
|
-
}
|
|
207
|
-
ctx.print([
|
|
208
|
-
`Teamwork Mode ${mode.id}`,
|
|
209
|
-
` label: ${mode.label}`,
|
|
210
|
-
` taskKind: ${mode.taskKind}`,
|
|
211
|
-
` owner: ${mode.owner}`,
|
|
212
|
-
` template: ${mode.template ?? '(none)'}`,
|
|
213
|
-
` reviewMode: ${mode.reviewMode}`,
|
|
214
|
-
` executionProtocol: ${mode.executionProtocol}`,
|
|
215
|
-
].join('\n'));
|
|
216
|
-
return;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
if (sub === 'create-mode') {
|
|
220
|
-
const modeId = args[1] as TeamworkModeId | undefined;
|
|
221
|
-
const title = args.slice(2).join(' ').trim();
|
|
222
|
-
const mode = TEAMWORK_MODES.find((entry) => entry.id === modeId);
|
|
223
|
-
if (!mode || !title) {
|
|
224
|
-
ctx.print('Usage: /teamwork create-mode <local-engineer|local-shell|remote-engineer|teammate|research|dream|review|verifier|integration> <title...>');
|
|
225
|
-
return;
|
|
226
|
-
}
|
|
227
|
-
printAgentDelegationBoundary(ctx, `/teamwork create-mode ${mode.id} ${title}`);
|
|
228
|
-
return;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
if (sub === 'recipes') {
|
|
232
|
-
ctx.print([
|
|
233
|
-
'Teamwork Recipes',
|
|
234
|
-
...TEAMWORK_RECIPES.map((recipe) => ` ${recipe.id.padEnd(26)} ${recipe.summary}`),
|
|
235
|
-
].join('\n'));
|
|
236
|
-
return;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
if (sub === 'recipe') {
|
|
240
|
-
const recipeId = args[1];
|
|
241
|
-
const recipe = TEAMWORK_RECIPES.find((entry) => entry.id === recipeId);
|
|
242
|
-
if (!recipe) {
|
|
243
|
-
ctx.print('Usage: /teamwork recipe <id>');
|
|
244
|
-
return;
|
|
245
|
-
}
|
|
246
|
-
ctx.print([
|
|
247
|
-
`Teamwork Recipe ${recipe.id}`,
|
|
248
|
-
` summary: ${recipe.summary}`,
|
|
249
|
-
` steps: ${recipe.steps.join(' -> ')}`,
|
|
250
|
-
].join('\n'));
|
|
251
|
-
return;
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
if (sub === 'templates') {
|
|
255
|
-
const archetypes = listArchetypeModes(requireShellPaths(ctx).workingDirectory);
|
|
256
|
-
ctx.print([
|
|
257
|
-
'Teamwork Templates',
|
|
258
|
-
...Object.entries(AGENT_TEMPLATES).map(([name, template]) => (
|
|
259
|
-
` ${name.padEnd(12)} ${template.description}`
|
|
260
|
-
)),
|
|
261
|
-
'',
|
|
262
|
-
'Discovered Archetypes',
|
|
263
|
-
...archetypes.map((entry) => ` ${entry.id.padEnd(12)} ${entry.family.padEnd(10)} ${entry.source.padEnd(7)} ${entry.label}`),
|
|
264
|
-
].join('\n'));
|
|
265
|
-
return;
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
if (sub === 'archetypes') {
|
|
269
|
-
const archetypes = listArchetypeModes(requireShellPaths(ctx).workingDirectory);
|
|
270
|
-
ctx.print([
|
|
271
|
-
'Teamwork Archetypes',
|
|
272
|
-
...archetypes.map((entry) => ` ${entry.id.padEnd(18)} ${entry.family.padEnd(10)} ${entry.source.padEnd(7)} ${entry.reviewMode.padEnd(4)} ${entry.executionProtocol}${entry.validationIssues.length > 0 ? ' issues' : ''}`),
|
|
273
|
-
].join('\n'));
|
|
274
|
-
return;
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
if (sub === 'validate') {
|
|
278
|
-
const archetypes = listArchetypeModes(requireShellPaths(ctx).workingDirectory);
|
|
279
|
-
const invalid = archetypes.filter((entry) => entry.validationIssues.length > 0);
|
|
280
|
-
ctx.print(invalid.length > 0
|
|
281
|
-
? [
|
|
282
|
-
'Teamwork Archetype Validation',
|
|
283
|
-
...invalid.flatMap((entry) => [
|
|
284
|
-
` ${entry.id} (${entry.source})`,
|
|
285
|
-
...entry.validationIssues.map((issue) => ` issue: ${issue}`),
|
|
286
|
-
]),
|
|
287
|
-
].join('\n')
|
|
288
|
-
: 'Teamwork Archetype Validation\n All discovered archetypes are currently valid.');
|
|
289
|
-
return;
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
if (sub === 'archetype') {
|
|
293
|
-
const archetypeName = args[1];
|
|
294
|
-
if (!archetypeName) {
|
|
295
|
-
ctx.print('Usage: /teamwork archetype <name>');
|
|
296
|
-
return;
|
|
297
|
-
}
|
|
298
|
-
const mode = listArchetypeModes(requireShellPaths(ctx).workingDirectory).find((entry) => entry.id === archetypeName);
|
|
299
|
-
if (!mode) {
|
|
300
|
-
ctx.print(`Unknown archetype: ${archetypeName}`);
|
|
301
|
-
return;
|
|
302
|
-
}
|
|
303
|
-
ctx.print([
|
|
304
|
-
`Teamwork Archetype ${mode.id}`,
|
|
305
|
-
` label: ${mode.label}`,
|
|
306
|
-
` family: ${mode.family}`,
|
|
307
|
-
` source: ${mode.source}`,
|
|
308
|
-
` owner: ${mode.owner}`,
|
|
309
|
-
` reviewMode: ${mode.reviewMode}`,
|
|
310
|
-
` executionProtocol: ${mode.executionProtocol}`,
|
|
311
|
-
` tools: ${mode.tools.join(', ') || '(none)'}`,
|
|
312
|
-
` sourcePath: ${mode.sourcePath ?? '(builtin)'}`,
|
|
313
|
-
...(mode.validationIssues.length > 0
|
|
314
|
-
? mode.validationIssues.map((issue) => ` issue: ${issue}`)
|
|
315
|
-
: [' validation: clean']),
|
|
316
|
-
].join('\n'));
|
|
317
|
-
return;
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
if (sub === 'create-archetype') {
|
|
321
|
-
const archetypeName = args[1];
|
|
322
|
-
const title = args.slice(2).join(' ').trim();
|
|
323
|
-
if (!archetypeName || !title) {
|
|
324
|
-
ctx.print('Usage: /teamwork create-archetype <name> <title...>');
|
|
325
|
-
return;
|
|
326
|
-
}
|
|
327
|
-
const mode = listArchetypeModes(requireShellPaths(ctx).workingDirectory).find((entry) => entry.id === archetypeName);
|
|
328
|
-
if (!mode) {
|
|
329
|
-
ctx.print(`Unknown archetype: ${archetypeName}`);
|
|
330
|
-
return;
|
|
331
|
-
}
|
|
332
|
-
printAgentDelegationBoundary(ctx, `/teamwork create-archetype ${mode.id} ${title}`);
|
|
333
|
-
return;
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
ctx.print('Usage: /teamwork [review|modes|mode <id>|create-mode <id> <title...>|recipes|recipe <id>|templates|archetypes|validate|archetype <name>|create-archetype <name> <title...>]');
|
|
337
|
-
},
|
|
338
|
-
});
|
|
339
|
-
}
|