@pellux/goodvibes-agent 0.1.114 → 0.1.117

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 (168) hide show
  1. package/CHANGELOG.md +41 -650
  2. package/README.md +40 -50
  3. package/dist/package/main.js +38224 -35673
  4. package/docs/README.md +5 -4
  5. package/docs/{connected-services.md → connected-host.md} +18 -10
  6. package/docs/getting-started.md +43 -42
  7. package/docs/release-and-publishing.md +6 -4
  8. package/package.json +3 -3
  9. package/src/agent/behavior-discovery-summary.ts +165 -0
  10. package/src/agent/persona-discovery.ts +1 -3
  11. package/src/agent/persona-registry.ts +5 -3
  12. package/src/agent/reminder-schedule-format.ts +6 -6
  13. package/src/agent/reminder-schedule.ts +1 -1
  14. package/src/agent/routine-registry.ts +43 -4
  15. package/src/agent/routine-schedule-format.ts +6 -6
  16. package/src/agent/routine-schedule-promotion.ts +1 -1
  17. package/src/agent/routine-schedule-receipts.ts +1 -1
  18. package/src/agent/runtime-profile-starters.ts +331 -0
  19. package/src/agent/runtime-profile.ts +228 -330
  20. package/src/agent/skill-registry.ts +190 -13
  21. package/src/cli/agent-knowledge-command.ts +2 -2
  22. package/src/cli/agent-knowledge-format.ts +2 -2
  23. package/src/cli/agent-knowledge-runtime.ts +1 -1
  24. package/src/cli/bundle-command.ts +1 -1
  25. package/src/cli/entrypoint.ts +16 -7
  26. package/src/cli/help.ts +26 -19
  27. package/src/cli/local-library-command.ts +75 -21
  28. package/src/cli/management-commands.ts +7 -6
  29. package/src/cli/management.ts +6 -51
  30. package/src/cli/parser.ts +23 -2
  31. package/src/cli/profiles-command.ts +247 -1
  32. package/src/cli/routines-command.ts +139 -11
  33. package/src/cli/service-posture.ts +11 -11
  34. package/src/cli/status.ts +21 -25
  35. package/src/input/agent-workspace-access-command-editor-submission.ts +149 -0
  36. package/src/input/agent-workspace-access-command-editors.ts +170 -0
  37. package/src/input/agent-workspace-activation.ts +2 -1
  38. package/src/input/agent-workspace-basic-command-editor-submission.ts +787 -0
  39. package/src/input/agent-workspace-basic-command-editors.ts +524 -459
  40. package/src/input/agent-workspace-categories.ts +177 -14
  41. package/src/input/agent-workspace-channel-command-editor-submission.ts +49 -0
  42. package/src/input/agent-workspace-channel-command-editors.ts +47 -0
  43. package/src/input/agent-workspace-command-editor.ts +25 -1
  44. package/src/input/agent-workspace-delegation-editor-submission.ts +55 -0
  45. package/src/input/agent-workspace-editors.ts +27 -0
  46. package/src/input/agent-workspace-knowledge-command-editor-submission.ts +132 -0
  47. package/src/input/agent-workspace-knowledge-command-editors.ts +110 -0
  48. package/src/input/agent-workspace-learned-behavior.ts +67 -0
  49. package/src/input/agent-workspace-library-command-editor-submission.ts +50 -0
  50. package/src/input/agent-workspace-library-command-editors.ts +35 -0
  51. package/src/input/agent-workspace-mcp-command-editor-submission.ts +95 -0
  52. package/src/input/agent-workspace-memory-command-editor-submission.ts +232 -0
  53. package/src/input/agent-workspace-memory-command-editors.ts +180 -0
  54. package/src/input/agent-workspace-navigation.ts +45 -0
  55. package/src/input/agent-workspace-notify-editor-submission.ts +107 -0
  56. package/src/input/agent-workspace-operations-command-editor-submission.ts +146 -0
  57. package/src/input/agent-workspace-operations-command-editors.ts +119 -0
  58. package/src/input/agent-workspace-provider-command-editor-submission.ts +155 -0
  59. package/src/input/agent-workspace-provider-command-editors.ts +93 -0
  60. package/src/input/agent-workspace-requirements.ts +11 -0
  61. package/src/input/agent-workspace-secret-editor-submission.ts +153 -0
  62. package/src/input/agent-workspace-session-command-editor-submission.ts +199 -0
  63. package/src/input/agent-workspace-session-command-editors.ts +249 -0
  64. package/src/input/agent-workspace-setup.ts +49 -19
  65. package/src/input/agent-workspace-skill-bundle-command-editor-submission.ts +101 -0
  66. package/src/input/agent-workspace-skill-bundle-command-editors.ts +110 -0
  67. package/src/input/agent-workspace-snapshot.ts +56 -8
  68. package/src/input/agent-workspace-task-command-editor-submission.ts +61 -0
  69. package/src/input/agent-workspace-task-command-editors.ts +47 -0
  70. package/src/input/agent-workspace-types.ts +124 -0
  71. package/src/input/agent-workspace-voice-media.ts +1 -1
  72. package/src/input/agent-workspace-workplan-editor-submission.ts +153 -0
  73. package/src/input/agent-workspace.ts +47 -37
  74. package/src/input/command-registry.ts +1 -1
  75. package/src/input/commands/agent-runtime-profile-runtime.ts +160 -6
  76. package/src/input/commands/agent-skills-runtime.ts +76 -12
  77. package/src/input/commands/agent-workspace-runtime.ts +4 -3
  78. package/src/input/commands/brief-runtime.ts +38 -9
  79. package/src/input/commands/channels-runtime.ts +3 -3
  80. package/src/input/commands/compat-runtime.ts +32 -0
  81. package/src/input/commands/health-runtime.ts +22 -24
  82. package/src/input/commands/knowledge.ts +26 -5
  83. package/src/input/commands/local-provider-runtime.ts +7 -3
  84. package/src/input/commands/local-setup-review.ts +4 -14
  85. package/src/input/commands/mcp-runtime.ts +8 -12
  86. package/src/input/commands/operator-runtime.ts +8 -67
  87. package/src/input/commands/personas-runtime.ts +1 -1
  88. package/src/input/commands/platform-access-runtime.ts +7 -70
  89. package/src/input/commands/policy-dispatch.ts +1 -1
  90. package/src/input/commands/policy.ts +1 -5
  91. package/src/input/commands/product-runtime.ts +2 -2
  92. package/src/input/commands/qrcode-runtime.ts +6 -4
  93. package/src/input/commands/routines-runtime.ts +44 -6
  94. package/src/input/commands/runtime-services.ts +1 -14
  95. package/src/input/commands/security-runtime.ts +3 -8
  96. package/src/input/commands/session-content.ts +1 -1
  97. package/src/input/commands/session-workflow.ts +5 -14
  98. package/src/input/commands/shell-core.ts +8 -2
  99. package/src/input/commands/subscription-runtime.ts +1 -6
  100. package/src/input/commands/support-bundle-runtime.ts +53 -0
  101. package/src/input/commands/tasks-runtime.ts +2 -2
  102. package/src/input/commands.ts +4 -0
  103. package/src/input/feed-context-factory.ts +0 -1
  104. package/src/input/handler-content-actions.ts +0 -25
  105. package/src/input/handler-feed.ts +0 -2
  106. package/src/input/handler-interactions.ts +2 -31
  107. package/src/input/handler-onboarding.ts +29 -12
  108. package/src/input/handler-shortcuts.ts +1 -3
  109. package/src/input/handler.ts +4 -7
  110. package/src/input/keybindings.ts +9 -9
  111. package/src/input/mcp-workspace.ts +90 -26
  112. package/src/input/onboarding/handler-onboarding-routes.ts +3 -1
  113. package/src/input/onboarding/onboarding-wizard-apply.ts +49 -0
  114. package/src/input/onboarding/onboarding-wizard-helpers.ts +1 -1
  115. package/src/input/onboarding/onboarding-wizard-operator-steps.ts +126 -11
  116. package/src/input/onboarding/onboarding-wizard-steps.ts +15 -8
  117. package/src/input/onboarding/onboarding-wizard-types.ts +1 -0
  118. package/src/input/onboarding/onboarding-wizard.ts +19 -2
  119. package/src/input/profile-picker-modal.ts +2 -2
  120. package/src/input/settings-modal-agent-policy.ts +6 -6
  121. package/src/input/settings-modal-subscriptions.ts +3 -3
  122. package/src/input/settings-modal.ts +14 -14
  123. package/src/main.ts +0 -2
  124. package/src/panels/automation-control-panel.ts +3 -3
  125. package/src/panels/builtin/agent.ts +1 -1
  126. package/src/panels/builtin/operations.ts +2 -2
  127. package/src/panels/builtin/session.ts +26 -18
  128. package/src/panels/builtin/shared.ts +6 -6
  129. package/src/panels/project-planning-panel.ts +1 -1
  130. package/src/panels/provider-health-domains.ts +3 -3
  131. package/src/panels/qr-panel.ts +44 -20
  132. package/src/panels/subscription-panel.ts +3 -3
  133. package/src/panels/system-messages-panel.ts +2 -2
  134. package/src/panels/tasks-panel.ts +4 -4
  135. package/src/planning/project-planning-coordinator.ts +2 -2
  136. package/src/renderer/agent-workspace.ts +52 -5
  137. package/src/renderer/block-actions.ts +1 -3
  138. package/src/renderer/help-overlay.ts +13 -8
  139. package/src/renderer/mcp-workspace.ts +32 -13
  140. package/src/renderer/model-picker-overlay.ts +0 -1
  141. package/src/renderer/model-workspace.ts +0 -2
  142. package/src/renderer/onboarding/onboarding-wizard.ts +20 -4
  143. package/src/renderer/panel-picker-overlay.ts +1 -1
  144. package/src/renderer/profile-picker-modal.ts +2 -2
  145. package/src/renderer/settings-modal-helpers.ts +23 -23
  146. package/src/renderer/settings-modal.ts +18 -18
  147. package/src/renderer/system-message.ts +1 -1
  148. package/src/runtime/agent-runtime-events.ts +129 -0
  149. package/src/runtime/bootstrap-command-parts.ts +3 -2
  150. package/src/runtime/bootstrap-core.ts +4 -64
  151. package/src/runtime/bootstrap-shell.ts +42 -4
  152. package/src/runtime/bootstrap.ts +8 -27
  153. package/src/runtime/connected-host-auth.ts +42 -0
  154. package/src/runtime/diagnostics/panels/panel-resources.ts +1 -1
  155. package/src/runtime/index.ts +1 -5
  156. package/src/runtime/onboarding/apply.ts +213 -0
  157. package/src/runtime/onboarding/derivation.ts +25 -6
  158. package/src/runtime/onboarding/snapshot.ts +4 -2
  159. package/src/runtime/onboarding/types.ts +28 -1
  160. package/src/runtime/onboarding/verify.ts +81 -2
  161. package/src/runtime/operator-token-cleanup.ts +2 -2
  162. package/src/runtime/services.ts +27 -12
  163. package/src/shell/service-settings-sync.ts +7 -7
  164. package/src/shell/ui-openers.ts +27 -38
  165. package/src/tools/agent-local-registry-tool.ts +10 -4
  166. package/src/tools/agent-tool-policy-guard.ts +5 -7
  167. package/src/version.ts +1 -1
  168. package/src/cli/package-verification.ts +0 -274
package/src/cli/status.ts CHANGED
@@ -124,9 +124,9 @@ export function buildCliDoctorFindings(options: CliStatusOptions): readonly CliD
124
124
  id: 'external-runtime-unreachable',
125
125
  area: 'runtime',
126
126
  severity: 'warning',
127
- summary: 'Connected GoodVibes services are not reachable.',
127
+ summary: 'Connected GoodVibes host is not reachable.',
128
128
  cause: `Agent could not reach ${options.externalRuntime.baseUrl}${options.externalRuntime.error ? `: ${options.externalRuntime.error}` : '.'}`,
129
- impact: 'Companion chat, isolated Agent Knowledge, approvals, automation status, and build delegation cannot work until connected GoodVibes services are available.',
129
+ impact: 'Companion chat, isolated Agent Knowledge, approvals, automation status, and build delegation cannot work until the connected GoodVibes host is available.',
130
130
  action: 'Start or repair the owning GoodVibes host, then rerun goodvibes-agent status.',
131
131
  });
132
132
  } else if (!options.externalRuntime.compatible) {
@@ -134,8 +134,8 @@ export function buildCliDoctorFindings(options: CliStatusOptions): readonly CliD
134
134
  id: 'external-runtime-version-mismatch',
135
135
  area: 'runtime',
136
136
  severity: 'warning',
137
- summary: 'Connected GoodVibes service SDK version does not match Agent.',
138
- cause: `Connected service reports SDK ${options.externalRuntime.version}; Agent expects ${options.externalRuntime.expectedVersion}.`,
137
+ summary: 'Connected GoodVibes host SDK version does not match Agent.',
138
+ cause: `Connected host reports SDK ${options.externalRuntime.version}; Agent expects ${options.externalRuntime.expectedVersion}.`,
139
139
  impact: 'Agent-only routes, especially isolated Agent Knowledge, may be missing or incompatible.',
140
140
  action: 'Update the owning GoodVibes host so /status matches this Agent package SDK pin.',
141
141
  });
@@ -146,9 +146,9 @@ export function buildCliDoctorFindings(options: CliStatusOptions): readonly CliD
146
146
  id: 'external-runtime-token-missing',
147
147
  area: 'auth',
148
148
  severity: 'warning',
149
- summary: 'Connected-service operator token is missing.',
149
+ summary: 'Connected-host operator token is missing.',
150
150
  cause: `No operator token was found at ${options.externalRuntime.operatorToken.path}.`,
151
- impact: 'Agent can inspect only unauthenticated routes and cannot use protected connected-service APIs.',
151
+ impact: 'Agent can inspect only unauthenticated routes and cannot use protected connected-host APIs.',
152
152
  action: 'Pair or provision access through the owning GoodVibes host, then rerun goodvibes-agent auth.',
153
153
  });
154
154
  }
@@ -161,7 +161,7 @@ export function buildCliDoctorFindings(options: CliStatusOptions): readonly CliD
161
161
  summary: 'Isolated Agent Knowledge route is not ready.',
162
162
  cause: `${options.externalRuntime.agentKnowledge.route} returned ${options.externalRuntime.agentKnowledge.kind}${options.externalRuntime.agentKnowledge.statusCode === null ? '' : ` (${options.externalRuntime.agentKnowledge.statusCode})`}.`,
163
163
  impact: 'Agent Knowledge ask/search will not use any fallback wiki or non-Agent knowledge segment; it will fail closed until the Agent route is available.',
164
- action: 'Update the connected GoodVibes services to the Agent-compatible SDK and verify goodvibes-agent compat.',
164
+ action: 'Update the connected GoodVibes host to the Agent-compatible SDK and verify goodvibes-agent compat.',
165
165
  });
166
166
  }
167
167
  }
@@ -171,10 +171,10 @@ export function buildCliDoctorFindings(options: CliStatusOptions): readonly CliD
171
171
  id: 'runtime-ownership-external',
172
172
  area: 'runtime',
173
173
  severity: 'warning',
174
- summary: 'Connected-service settings are present while Agent service ownership is disabled by design.',
174
+ summary: 'Connected-host settings are present while Agent host ownership is disabled by design.',
175
175
  cause: 'One or more connected API, inbound events, or browser companion settings are enabled while service.enabled is false.',
176
176
  impact: 'The owning GoodVibes host must provide availability for those endpoints; Agent will not start or enable them.',
177
- action: 'Manage connected-service availability from GoodVibes TUI or the owning host, then use Agent for read-only diagnostics.',
177
+ action: 'Manage connected-host availability from GoodVibes TUI or the owning host, then use Agent for read-only diagnostics.',
178
178
  });
179
179
  }
180
180
 
@@ -186,9 +186,9 @@ export function buildCliDoctorFindings(options: CliStatusOptions): readonly CliD
186
186
  area: 'runtime',
187
187
  severity: 'warning',
188
188
  summary: issue,
189
- cause: 'The connected-service inspection found a mismatch between configured endpoint state and observed host state.',
189
+ cause: 'The connected-host inspection found a mismatch between configured endpoint state and observed host state.',
190
190
  impact: 'Connected API, listener, or web availability may not match the configuration.',
191
- action: 'Use Agent status and doctor diagnostics here, then manage connected services outside Agent.',
191
+ action: 'Use Agent status and doctor diagnostics here, then manage the connected host outside Agent.',
192
192
  });
193
193
  }
194
194
  }
@@ -198,9 +198,9 @@ export function buildCliDoctorFindings(options: CliStatusOptions): readonly CliD
198
198
  id: 'onboarding-incomplete',
199
199
  area: 'onboarding',
200
200
  severity: 'warning',
201
- summary: 'Agent setup has not been shown for this user.',
202
- cause: 'No global user setup check marker was found.',
203
- impact: 'Important connected-service, network, provider, auth, or permission choices may still be implicit defaults.',
201
+ summary: 'Agent setup has not been applied for this user.',
202
+ cause: 'No global user setup completion marker was found.',
203
+ impact: 'Important connected-host, network, provider, auth, or permission choices may still be implicit defaults.',
204
204
  action: 'Run /setup in GoodVibes Agent or goodvibes-agent setup status to review setup state.',
205
205
  });
206
206
  }
@@ -210,10 +210,10 @@ export function buildCliDoctorFindings(options: CliStatusOptions): readonly CliD
210
210
  id: 'network-endpoint-without-runtime-auth-signal',
211
211
  area: 'auth',
212
212
  severity: 'risk',
213
- summary: 'Network-facing connected-service endpoints are enabled without a visible auth signal.',
214
- cause: `${networkFacingSurfaces.map(([name]) => name).join(', ')} are LAN/custom-bound, but Agent cannot see connected-service auth state from its local compatibility files.`,
213
+ summary: 'Network-facing connected-host endpoints are enabled without a visible auth signal.',
214
+ cause: `${networkFacingSurfaces.map(([name]) => name).join(', ')} are LAN/custom-bound, but Agent cannot see connected-host auth state from its local compatibility files.`,
215
215
  impact: 'Remote access paths may be unusable or unsafe unless the owning host configured auth.',
216
- action: 'Review connected-service auth outside Agent; Agent will not create local service users.',
216
+ action: 'Review connected-host auth outside Agent; Agent will not create local service users.',
217
217
  });
218
218
  }
219
219
 
@@ -364,15 +364,11 @@ export function renderCliStatus(options: CliStatusOptions): string {
364
364
  ' live check: unavailable',
365
365
  ]),
366
366
  '',
367
- 'Connected GoodVibes Services:',
367
+ 'Connected Host:',
368
368
  ' Agent role: client/operator TUI only',
369
- ' service ownership: outside Agent',
370
- ' Agent starts services: no',
369
+ ' lifecycle owner: outside Agent',
370
+ ' Agent starts connected host: no',
371
371
  ...(options.service ? [
372
- ` platform: ${options.service.managed.platform}`,
373
- ` installed: ${yesNo(options.service.managed.installed)}`,
374
- ` running: ${yesNo(options.service.managed.running)}`,
375
- ` definition: ${options.service.managed.path}`,
376
372
  ` log: ${options.service.log.path ?? 'n/a'} (${options.service.log.exists ? 'present' : 'missing'})`,
377
373
  ] : []),
378
374
  'Onboarding:',
@@ -384,7 +380,7 @@ export function renderCliStatus(options: CliStatusOptions): string {
384
380
  if (options.doctor) {
385
381
  lines.push(
386
382
  '',
387
- 'Connected-Service Config Signals:',
383
+ 'Connected Host Config Signals:',
388
384
  ` host config present: ${yesNo(serviceEnabled)}`,
389
385
  ' lifecycle config: external to Agent',
390
386
  '',
@@ -0,0 +1,149 @@
1
+ import type { AgentWorkspaceActionResult, AgentWorkspaceLocalEditor } from './agent-workspace-types.ts';
2
+ import type { AgentWorkspaceAccessCommandEditorKind } from './agent-workspace-access-command-editors.ts';
3
+ import { isAgentWorkspaceAccessCommandEditorKind } from './agent-workspace-access-command-editors.ts';
4
+ import { quoteSlashCommandArg } from './slash-command-parser.ts';
5
+
6
+ type AgentWorkspaceFieldReader = (fieldId: string) => string;
7
+
8
+ export type AgentWorkspaceAccessCommandEditorSubmission =
9
+ | {
10
+ readonly kind: 'editor';
11
+ readonly editor: AgentWorkspaceLocalEditor;
12
+ readonly status: string;
13
+ readonly actionResult?: AgentWorkspaceActionResult;
14
+ }
15
+ | {
16
+ readonly kind: 'dispatch';
17
+ readonly command: string;
18
+ readonly status: string;
19
+ readonly actionResult: AgentWorkspaceActionResult;
20
+ };
21
+
22
+ export function isAgentWorkspaceAccessCommandSubmissionKind(kind: string): kind is AgentWorkspaceAccessCommandEditorKind {
23
+ return isAgentWorkspaceAccessCommandEditorKind(kind as AgentWorkspaceAccessCommandEditorKind);
24
+ }
25
+
26
+ function isAffirmative(value: string): boolean {
27
+ return /^(y|yes|true)$/i.test(value.trim());
28
+ }
29
+
30
+ function unconfirmed(editor: AgentWorkspaceLocalEditor, message: string): AgentWorkspaceAccessCommandEditorSubmission {
31
+ return {
32
+ kind: 'editor',
33
+ editor: { ...editor, message },
34
+ status: message,
35
+ };
36
+ }
37
+
38
+ function dispatch(command: string, title: string, detail: string, safety: AgentWorkspaceActionResult['safety']): AgentWorkspaceAccessCommandEditorSubmission {
39
+ return {
40
+ kind: 'dispatch',
41
+ command,
42
+ status: `${title}.`,
43
+ actionResult: {
44
+ kind: 'dispatched',
45
+ title,
46
+ detail,
47
+ command,
48
+ safety,
49
+ },
50
+ };
51
+ }
52
+
53
+ export function buildAgentWorkspaceAccessCommandEditorSubmission(
54
+ editor: AgentWorkspaceLocalEditor,
55
+ readField: AgentWorkspaceFieldReader,
56
+ ): AgentWorkspaceAccessCommandEditorSubmission {
57
+ if (editor.kind === 'auth-show') {
58
+ return dispatch(
59
+ `/auth show ${quoteSlashCommandArg(readField('provider'))}`,
60
+ 'Opening provider auth inspection',
61
+ 'The workspace handed a read-only provider auth inspection command to the shell-owned command router.',
62
+ 'read-only',
63
+ );
64
+ }
65
+ if (editor.kind === 'auth-repair') {
66
+ return dispatch(
67
+ `/auth repair ${quoteSlashCommandArg(readField('provider'))}`,
68
+ 'Opening provider auth repair review',
69
+ 'The workspace handed a read-only provider auth repair review command to the shell-owned command router.',
70
+ 'read-only',
71
+ );
72
+ }
73
+ if (editor.kind === 'auth-bundle-export') {
74
+ if (!isAffirmative(readField('confirm'))) return unconfirmed(editor, 'Auth review bundle export not confirmed. Type yes, then press Enter.');
75
+ return dispatch(
76
+ `/auth bundle export ${quoteSlashCommandArg(readField('path'))} --yes`,
77
+ 'Opening auth review bundle export',
78
+ 'The workspace handed a confirmed auth review bundle export command to the shell-owned command router.',
79
+ 'safe',
80
+ );
81
+ }
82
+ if (editor.kind === 'auth-bundle-inspect') {
83
+ return dispatch(
84
+ `/auth bundle inspect ${quoteSlashCommandArg(readField('path'))}`,
85
+ 'Opening auth review bundle inspection',
86
+ 'The workspace handed a read-only auth review bundle inspect command to the shell-owned command router.',
87
+ 'read-only',
88
+ );
89
+ }
90
+ if (editor.kind === 'trust-bundle-export') {
91
+ if (!isAffirmative(readField('confirm'))) return unconfirmed(editor, 'Trust bundle export not confirmed. Type yes, then press Enter.');
92
+ return dispatch(
93
+ `/trust bundle export ${quoteSlashCommandArg(readField('path'))} --yes`,
94
+ 'Opening trust bundle export',
95
+ 'The workspace handed a confirmed trust bundle export command to the shell-owned command router.',
96
+ 'safe',
97
+ );
98
+ }
99
+ if (editor.kind === 'trust-bundle-inspect') {
100
+ return dispatch(
101
+ `/trust bundle inspect ${quoteSlashCommandArg(readField('path'))}`,
102
+ 'Opening trust bundle inspection',
103
+ 'The workspace handed a read-only trust bundle inspect command to the shell-owned command router.',
104
+ 'read-only',
105
+ );
106
+ }
107
+ if (editor.kind === 'subscription-bundle-export') {
108
+ if (!isAffirmative(readField('confirm'))) return unconfirmed(editor, 'Subscription bundle export not confirmed. Type yes, then press Enter.');
109
+ return dispatch(
110
+ `/subscription bundle export ${quoteSlashCommandArg(readField('path'))} --yes`,
111
+ 'Opening subscription bundle export',
112
+ 'The workspace handed a confirmed subscription bundle export command to the shell-owned command router.',
113
+ 'safe',
114
+ );
115
+ }
116
+ if (editor.kind === 'subscription-bundle-inspect') {
117
+ return dispatch(
118
+ `/subscription bundle inspect ${quoteSlashCommandArg(readField('path'))}`,
119
+ 'Opening subscription bundle inspection',
120
+ 'The workspace handed a read-only subscription bundle inspect command to the shell-owned command router.',
121
+ 'read-only',
122
+ );
123
+ }
124
+ if (editor.kind === 'voice-enable' || editor.kind === 'voice-disable') {
125
+ if (!isAffirmative(readField('confirm'))) return unconfirmed(editor, `Voice interaction ${editor.kind === 'voice-enable' ? 'enable' : 'disable'} not confirmed. Type yes, then press Enter.`);
126
+ const mode = editor.kind === 'voice-enable' ? 'enable' : 'disable';
127
+ return dispatch(
128
+ `/voice ${mode} --yes`,
129
+ `Opening voice interaction ${mode}`,
130
+ `The workspace handed a confirmed voice ${mode} command to the shell-owned command router.`,
131
+ 'safe',
132
+ );
133
+ }
134
+ if (editor.kind === 'voice-bundle-export') {
135
+ if (!isAffirmative(readField('confirm'))) return unconfirmed(editor, 'Voice bundle export not confirmed. Type yes, then press Enter.');
136
+ return dispatch(
137
+ `/voice bundle export ${quoteSlashCommandArg(readField('path'))} --yes`,
138
+ 'Opening voice bundle export',
139
+ 'The workspace handed a confirmed voice bundle export command to the shell-owned command router.',
140
+ 'safe',
141
+ );
142
+ }
143
+ return dispatch(
144
+ `/voice bundle inspect ${quoteSlashCommandArg(readField('path'))}`,
145
+ 'Opening voice bundle inspection',
146
+ 'The workspace handed a read-only voice bundle inspect command to the shell-owned command router.',
147
+ 'read-only',
148
+ );
149
+ }
@@ -0,0 +1,170 @@
1
+ import type { AgentWorkspaceEditorKind, AgentWorkspaceLocalEditor } from './agent-workspace-types.ts';
2
+
3
+ export type AgentWorkspaceAccessCommandEditorKind = Extract<
4
+ AgentWorkspaceEditorKind,
5
+ | 'auth-show'
6
+ | 'auth-repair'
7
+ | 'auth-bundle-export'
8
+ | 'auth-bundle-inspect'
9
+ | 'trust-bundle-export'
10
+ | 'trust-bundle-inspect'
11
+ | 'subscription-bundle-export'
12
+ | 'subscription-bundle-inspect'
13
+ | 'voice-enable'
14
+ | 'voice-disable'
15
+ | 'voice-bundle-export'
16
+ | 'voice-bundle-inspect'
17
+ >;
18
+
19
+ export function isAgentWorkspaceAccessCommandEditorKind(kind: AgentWorkspaceEditorKind): kind is AgentWorkspaceAccessCommandEditorKind {
20
+ return kind === 'auth-show'
21
+ || kind === 'auth-repair'
22
+ || kind === 'auth-bundle-export'
23
+ || kind === 'auth-bundle-inspect'
24
+ || kind === 'trust-bundle-export'
25
+ || kind === 'trust-bundle-inspect'
26
+ || kind === 'subscription-bundle-export'
27
+ || kind === 'subscription-bundle-inspect'
28
+ || kind === 'voice-enable'
29
+ || kind === 'voice-disable'
30
+ || kind === 'voice-bundle-export'
31
+ || kind === 'voice-bundle-inspect';
32
+ }
33
+
34
+ export function createAgentWorkspaceAccessCommandEditor(kind: AgentWorkspaceAccessCommandEditorKind): AgentWorkspaceLocalEditor {
35
+ if (kind === 'auth-show') {
36
+ return {
37
+ kind,
38
+ mode: 'create',
39
+ title: 'Inspect Provider Auth',
40
+ selectedFieldIndex: 0,
41
+ message: 'Inspect one provider auth route without printing token values.',
42
+ fields: [
43
+ { id: 'provider', label: 'Provider', value: 'openai', required: true, multiline: false, hint: 'Provider id, such as openai.' },
44
+ ],
45
+ };
46
+ }
47
+ if (kind === 'auth-repair') {
48
+ return {
49
+ kind,
50
+ mode: 'create',
51
+ title: 'Review Provider Auth Repair',
52
+ selectedFieldIndex: 0,
53
+ message: 'Show provider auth repair guidance without storing tokens or starting login.',
54
+ fields: [
55
+ { id: 'provider', label: 'Provider', value: 'openai', required: true, multiline: false, hint: 'Provider id to inspect.' },
56
+ ],
57
+ };
58
+ }
59
+ if (kind === 'auth-bundle-export') {
60
+ return {
61
+ kind,
62
+ mode: 'create',
63
+ title: 'Export Auth Review Bundle',
64
+ selectedFieldIndex: 0,
65
+ message: 'Export a redacted auth review bundle. Type yes on the final field to confirm.',
66
+ fields: [
67
+ { id: 'path', label: 'Output path', value: 'auth-review-bundle.json', required: true, multiline: false, hint: 'Workspace-relative JSON path to write.' },
68
+ { id: 'confirm', label: 'Confirm', value: '', required: true, multiline: false, hint: 'Type yes to run /auth bundle export with --yes.' },
69
+ ],
70
+ };
71
+ }
72
+ if (kind === 'auth-bundle-inspect') {
73
+ return {
74
+ kind,
75
+ mode: 'create',
76
+ title: 'Inspect Auth Review Bundle',
77
+ selectedFieldIndex: 0,
78
+ message: 'Inspect a redacted auth review bundle before import or sharing.',
79
+ fields: [
80
+ { id: 'path', label: 'Bundle path', value: 'auth-review-bundle.json', required: true, multiline: false, hint: 'Workspace-relative auth bundle JSON path.' },
81
+ ],
82
+ };
83
+ }
84
+ if (kind === 'trust-bundle-export') {
85
+ return {
86
+ kind,
87
+ mode: 'create',
88
+ title: 'Export Trust Bundle',
89
+ selectedFieldIndex: 0,
90
+ message: 'Export a redacted trust review bundle. Type yes on the final field to confirm.',
91
+ fields: [
92
+ { id: 'path', label: 'Output path', value: 'trust-review-bundle.json', required: true, multiline: false, hint: 'Workspace-relative JSON path to write.' },
93
+ { id: 'confirm', label: 'Confirm', value: '', required: true, multiline: false, hint: 'Type yes to run /trust bundle export with --yes.' },
94
+ ],
95
+ };
96
+ }
97
+ if (kind === 'trust-bundle-inspect') {
98
+ return {
99
+ kind,
100
+ mode: 'create',
101
+ title: 'Inspect Trust Bundle',
102
+ selectedFieldIndex: 0,
103
+ message: 'Inspect a trust review bundle before using it for setup review.',
104
+ fields: [
105
+ { id: 'path', label: 'Bundle path', value: 'trust-review-bundle.json', required: true, multiline: false, hint: 'Workspace-relative trust bundle JSON path.' },
106
+ ],
107
+ };
108
+ }
109
+ if (kind === 'subscription-bundle-export') {
110
+ return {
111
+ kind,
112
+ mode: 'create',
113
+ title: 'Export Subscription Bundle',
114
+ selectedFieldIndex: 0,
115
+ message: 'Export a redacted provider subscription bundle. Type yes on the final field to confirm.',
116
+ fields: [
117
+ { id: 'path', label: 'Output path', value: 'subscription-bundle.json', required: true, multiline: false, hint: 'Workspace-relative JSON path to write.' },
118
+ { id: 'confirm', label: 'Confirm', value: '', required: true, multiline: false, hint: 'Type yes to run /subscription bundle export with --yes.' },
119
+ ],
120
+ };
121
+ }
122
+ if (kind === 'subscription-bundle-inspect') {
123
+ return {
124
+ kind,
125
+ mode: 'create',
126
+ title: 'Inspect Subscription Bundle',
127
+ selectedFieldIndex: 0,
128
+ message: 'Inspect a provider subscription bundle before setup review.',
129
+ fields: [
130
+ { id: 'path', label: 'Bundle path', value: 'subscription-bundle.json', required: true, multiline: false, hint: 'Workspace-relative subscription bundle JSON path.' },
131
+ ],
132
+ };
133
+ }
134
+ if (kind === 'voice-enable' || kind === 'voice-disable') {
135
+ const enabling = kind === 'voice-enable';
136
+ return {
137
+ kind,
138
+ mode: 'update',
139
+ title: enabling ? 'Enable Voice Interaction' : 'Disable Voice Interaction',
140
+ selectedFieldIndex: 0,
141
+ message: `${enabling ? 'Enable' : 'Disable'} local voice interaction for this Agent runtime. Type yes to confirm.`,
142
+ fields: [
143
+ { id: 'confirm', label: 'Confirm', value: '', required: true, multiline: false, hint: `Type yes to run /voice ${enabling ? 'enable' : 'disable'} with --yes.` },
144
+ ],
145
+ };
146
+ }
147
+ if (kind === 'voice-bundle-export') {
148
+ return {
149
+ kind,
150
+ mode: 'create',
151
+ title: 'Export Voice Bundle',
152
+ selectedFieldIndex: 0,
153
+ message: 'Export a voice setup bundle. Type yes on the final field to confirm.',
154
+ fields: [
155
+ { id: 'path', label: 'Output path', value: 'voice-bundle.json', required: true, multiline: false, hint: 'Workspace-relative JSON path to write.' },
156
+ { id: 'confirm', label: 'Confirm', value: '', required: true, multiline: false, hint: 'Type yes to run /voice bundle export with --yes.' },
157
+ ],
158
+ };
159
+ }
160
+ return {
161
+ kind,
162
+ mode: 'create',
163
+ title: 'Inspect Voice Bundle',
164
+ selectedFieldIndex: 0,
165
+ message: 'Inspect a voice setup bundle before setup review.',
166
+ fields: [
167
+ { id: 'path', label: 'Bundle path', value: 'voice-bundle.json', required: true, multiline: false, hint: 'Workspace-relative voice bundle JSON path.' },
168
+ ],
169
+ };
170
+ }
@@ -1,4 +1,4 @@
1
- import { createLocalEditor, createProfileEditor } from './agent-workspace-editors.ts';
1
+ import { createLearnedBehaviorEditor, createLocalEditor, createProfileEditor } from './agent-workspace-editors.ts';
2
2
  import { createAgentWorkspaceBasicCommandEditor, isAgentWorkspaceBasicCommandEditorKind } from './agent-workspace-basic-command-editors.ts';
3
3
  import { createAgentKnowledgeQueryEditor } from './agent-workspace-knowledge-query-editor.ts';
4
4
  import { createReminderScheduleEditor } from './agent-workspace-reminder-schedule-editor.ts';
@@ -134,6 +134,7 @@ function createWorkspaceEditor(
134
134
  editorKind: AgentWorkspaceCategory['actions'][number]['editorKind'],
135
135
  ): AgentWorkspaceLocalEditor {
136
136
  if (editorKind === 'profile') return createProfileEditor(workspace.runtimeSnapshot?.runtimeStarterTemplates ?? []);
137
+ if (editorKind === 'learned-behavior') return createLearnedBehaviorEditor();
137
138
  if (editorKind && isAgentWorkspaceBasicCommandEditorKind(editorKind)) return createAgentWorkspaceBasicCommandEditor(editorKind);
138
139
  if (editorKind === 'knowledge-ask') return createAgentKnowledgeQueryEditor('ask');
139
140
  if (editorKind === 'knowledge-search') return createAgentKnowledgeQueryEditor('search');