@pellux/goodvibes-agent 0.1.6 → 0.1.8

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.
Files changed (35) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/LICENSE +21 -0
  3. package/README.md +3 -1
  4. package/docs/README.md +2 -2
  5. package/docs/deployment-and-services.md +1 -1
  6. package/docs/getting-started.md +6 -4
  7. package/docs/release-and-publishing.md +1 -1
  8. package/package.json +2 -2
  9. package/src/agent/routine-registry.ts +389 -0
  10. package/src/cli/management-commands.ts +8 -12
  11. package/src/cli/package-verification.ts +2 -2
  12. package/src/input/agent-workspace.ts +30 -3
  13. package/src/input/commands/control-room-runtime.ts +7 -28
  14. package/src/input/commands/health-runtime.ts +4 -4
  15. package/src/input/commands/operator-runtime.ts +17 -45
  16. package/src/input/commands/remote-runtime.ts +7 -22
  17. package/src/input/commands/routines-runtime.ts +232 -0
  18. package/src/input/commands/session-content.ts +3 -16
  19. package/src/input/commands/session-workflow.ts +1 -1
  20. package/src/input/commands/session.ts +19 -26
  21. package/src/input/commands/tasks-runtime.ts +28 -102
  22. package/src/input/commands.ts +2 -0
  23. package/src/input/handler-picker-routes.ts +2 -3
  24. package/src/panels/builtin/shared.ts +4 -4
  25. package/src/panels/provider-health-domains.ts +3 -3
  26. package/src/planning/project-planning-coordinator.ts +3 -3
  27. package/src/renderer/agent-workspace.ts +2 -1
  28. package/src/renderer/live-tail-modal.ts +7 -7
  29. package/src/renderer/process-indicator.ts +8 -8
  30. package/src/renderer/process-modal.ts +9 -9
  31. package/src/runtime/bootstrap.ts +2 -0
  32. package/src/runtime/services.ts +2 -20
  33. package/src/tools/wrfc-agent-guard.ts +37 -1
  34. package/src/version.ts +1 -1
  35. package/.goodvibes/agents/reviewer.md +0 -48
@@ -10,6 +10,20 @@ type AgentToolPolicyGuardOptions = {
10
10
  readonly getLastUserMessage?: () => string | null;
11
11
  };
12
12
 
13
+ const READ_ONLY_AGENT_TOOL_MODES = [
14
+ 'status',
15
+ 'list',
16
+ 'templates',
17
+ 'get',
18
+ 'budget',
19
+ 'wrfc-chains',
20
+ 'wrfc-history',
21
+ 'cohort-status',
22
+ 'cohort-report',
23
+ ] as const;
24
+
25
+ const READ_ONLY_AGENT_TOOL_MODE_SET = new Set<string>(READ_ONLY_AGENT_TOOL_MODES);
26
+
13
27
  const LOCAL_AGENT_DENIAL = [
14
28
  'GoodVibes Agent does not spawn local Engineer/Reviewer/Tester/Verifier roots or run local WRFC chains.',
15
29
  'Keep ordinary assistant work serial in the main conversation.',
@@ -23,6 +37,7 @@ export function installAgentToolPolicyGuard(registry: ToolRegistry, options: Age
23
37
  }
24
38
 
25
39
  export function wrapAgentToolForAgentPolicy(tool: Tool, _options: AgentToolPolicyGuardOptions = {}): void {
40
+ narrowAgentToolDefinitionForAgentPolicy(tool);
26
41
  const originalExecute = tool.execute.bind(tool);
27
42
  tool.execute = async (args) => {
28
43
  const denial = validateAgentToolInvocationForAgentPolicy(args as AgentToolArgs);
@@ -32,7 +47,7 @@ export function wrapAgentToolForAgentPolicy(tool: Tool, _options: AgentToolPolic
32
47
  }
33
48
 
34
49
  export function validateAgentToolInvocationForAgentPolicy(args: AgentToolArgs): string | null {
35
- if (args.mode === 'spawn' || args.mode === 'batch-spawn') return LOCAL_AGENT_DENIAL;
50
+ if (typeof args.mode === 'string' && !READ_ONLY_AGENT_TOOL_MODE_SET.has(args.mode)) return LOCAL_AGENT_DENIAL;
36
51
  return null;
37
52
  }
38
53
 
@@ -41,6 +56,27 @@ export function normalizeAgentToolInvocationForAgentPolicy(args: AgentToolArgs):
41
56
  }
42
57
 
43
58
  export const AGENT_LOCAL_SPAWN_DENIAL_MESSAGE = LOCAL_AGENT_DENIAL;
59
+ export const AGENT_READ_ONLY_TOOL_MODES = READ_ONLY_AGENT_TOOL_MODES;
60
+
61
+ function isRecord(value: unknown): value is Record<string, unknown> {
62
+ return typeof value === 'object' && value !== null && !Array.isArray(value);
63
+ }
64
+
65
+ function narrowAgentToolDefinitionForAgentPolicy(tool: Tool): void {
66
+ tool.definition.description = [
67
+ 'Read-only local Agent inspection for GoodVibes Agent.',
68
+ 'This product does not spawn local worker agents or run local WRFC chains.',
69
+ 'For build/fix/review work, delegate to GoodVibes TUI through the explicit build-delegation path instead.',
70
+ ].join(' ');
71
+ tool.definition.sideEffects = [];
72
+
73
+ const properties = tool.definition.parameters.properties;
74
+ if (!isRecord(properties)) return;
75
+ const modeProperty = properties.mode;
76
+ if (!isRecord(modeProperty)) return;
77
+ modeProperty.enum = [...READ_ONLY_AGENT_TOOL_MODES];
78
+ modeProperty.description = 'Read-only Agent inspection mode. Local spawn, batch-spawn, cancel, message, wait, and plan modes are disabled in GoodVibes Agent.';
79
+ }
44
80
 
45
81
  // Compatibility exports for copied TUI tests/imports during the near-fork phase.
46
82
  export const installWrfcAgentToolGuard = installAgentToolPolicyGuard;
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.6';
9
+ let _version = '0.1.8';
10
10
  try {
11
11
  const pkg = JSON.parse(readFileSync(join(import.meta.dir, '..', 'package.json'), 'utf-8'));
12
12
  _version = pkg.version ?? _version;
@@ -1,48 +0,0 @@
1
- ---
2
- name: reviewer
3
- description: Serial review of GoodVibes Agent changes against product policy, release gates, and TypeScript quality
4
- tools: [read, find, analyze]
5
- ---
6
-
7
- You review GoodVibes Agent work. Your job is to identify concrete defects, product-boundary violations, and release risks. You verify claims by inspecting files and cite exact paths.
8
-
9
- ## Review Priorities
10
-
11
- 1. Agent policy: main-conversation serial behavior by default; no hidden local agent fanout; no default WRFC.
12
- 2. Product boundary: Agent connects to the external daemon; it does not start, restart, install, or own daemon/listener services.
13
- 3. Delegation boundary: build/fix/review code work is explicitly delegated to GoodVibes TUI through public contracts.
14
- 4. TypeScript quality: Bun-first TypeScript only, no explicit `any`, no authored JavaScript variants.
15
- 5. SDK boundary: public `@pellux/goodvibes-sdk` imports and daemon/operator routes only; no runtime imports from `goodvibes-tui/src/*`.
16
- 6. Packaging: `goodvibes-agent` bin, Agent package identity, Agent docs, and no copied TUI-only package-facing guidance.
17
-
18
- ## Review Process
19
-
20
- 1. Read the completion report or changed-file list.
21
- 2. Inspect the files that define the behavior under review.
22
- 3. Check tests and release gates that should cover the change.
23
- 4. Report findings first, ordered by severity.
24
- 5. Keep summaries brief and secondary.
25
-
26
- ## Output Format
27
-
28
- Use this structure:
29
-
30
- ```text
31
- Findings
32
- - severity: file:line - issue and impact
33
-
34
- Open Questions
35
- - question or assumption, if any
36
-
37
- Validation Notes
38
- - tests/gates reviewed or missing
39
- ```
40
-
41
- If there are no findings, say so clearly and list residual risk or missing validation.
42
-
43
- ## What You Do Not Do
44
-
45
- - Do not modify code.
46
- - Do not spawn other agents.
47
- - Do not broaden scope beyond the reviewed slice.
48
- - Do not treat copied coding-TUI behavior as acceptable unless it is blocked, externalized, or explicitly delegated.