@pellux/goodvibes-agent 1.1.7 → 1.3.0

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 (274) hide show
  1. package/CHANGELOG.md +329 -0
  2. package/README.md +46 -30
  3. package/dist/package/{ast-grep-napi.linux-x64-gnu-mkk8xwww.node → ast-grep-napi.linux-x64-gnu-swtppvy9.node} +0 -0
  4. package/dist/package/{ast-grep-napi.linux-x64-musl-ryqtgdv6.node → ast-grep-napi.linux-x64-musl-ttfcdtap.node} +0 -0
  5. package/dist/package/main.js +138903 -91477
  6. package/docs/README.md +14 -7
  7. package/docs/channels-remote-and-api.md +8 -5
  8. package/docs/connected-host.md +14 -12
  9. package/docs/getting-started.md +58 -30
  10. package/docs/knowledge-artifacts-and-multimodal.md +7 -5
  11. package/docs/project-planning.md +2 -2
  12. package/docs/providers-and-routing.md +11 -3
  13. package/docs/tools-and-commands.md +116 -45
  14. package/docs/voice-and-live-tts.md +3 -1
  15. package/package.json +3 -2
  16. package/release/release-notes.md +142 -5
  17. package/release/release-readiness.json +124 -94
  18. package/src/agent/assistant-cockpit.ts +247 -0
  19. package/src/agent/autonomy-schedule-format.ts +96 -0
  20. package/src/agent/autonomy-schedule.ts +514 -0
  21. package/src/agent/channel-delivery-receipts.ts +292 -0
  22. package/src/agent/competitive-feature-inventory.ts +294 -0
  23. package/src/agent/document-registry-types.ts +106 -0
  24. package/src/agent/document-registry.ts +734 -0
  25. package/src/agent/harness-control.ts +2 -2
  26. package/src/agent/memory-prompt.ts +2 -2
  27. package/src/agent/operator-actions.ts +50 -6
  28. package/src/agent/persona-registry.ts +8 -0
  29. package/src/agent/project-context-files.ts +273 -0
  30. package/src/agent/prompt-context-receipts.ts +502 -0
  31. package/src/agent/reminder-schedule-format.ts +16 -2
  32. package/src/agent/research-run-registry.ts +582 -0
  33. package/src/agent/research-source-registry.ts +441 -0
  34. package/src/agent/routine-registry.ts +19 -3
  35. package/src/agent/routine-schedule-format.ts +27 -2
  36. package/src/agent/runtime-profile-starters.ts +7 -0
  37. package/src/agent/runtime-profile.ts +106 -4
  38. package/src/agent/schedule-edit-format.ts +129 -0
  39. package/src/agent/schedule-edit.ts +496 -0
  40. package/src/agent/schedule-next-routes.ts +42 -0
  41. package/src/agent/setup-wizard-artifact-receipts.ts +366 -0
  42. package/src/agent/setup-wizard-checkpoint.ts +140 -0
  43. package/src/agent/setup-wizard.ts +683 -0
  44. package/src/agent/skill-registry-types.ts +102 -0
  45. package/src/agent/skill-registry.ts +81 -107
  46. package/src/agent/vibe-confirmation-routes.ts +62 -0
  47. package/src/agent/vibe-file.ts +285 -0
  48. package/src/cli/agent-knowledge-command.ts +45 -2
  49. package/src/cli/help.ts +3 -0
  50. package/src/cli/profiles-command.ts +25 -11
  51. package/src/config/agent-settings-policy.ts +1 -18
  52. package/src/input/agent-workspace-activation.ts +53 -0
  53. package/src/input/agent-workspace-artifact-browser-editor.ts +494 -0
  54. package/src/input/agent-workspace-artifact-metadata.ts +17 -0
  55. package/src/input/agent-workspace-basic-command-editors.ts +5 -1
  56. package/src/input/agent-workspace-categories.ts +153 -155
  57. package/src/input/agent-workspace-channel-triage.ts +481 -0
  58. package/src/input/agent-workspace-channels.ts +263 -0
  59. package/src/input/agent-workspace-command-editor.ts +152 -0
  60. package/src/input/agent-workspace-context-snapshot.ts +349 -0
  61. package/src/input/agent-workspace-delegation-editor-submission.ts +8 -0
  62. package/src/input/agent-workspace-document-editor.ts +502 -0
  63. package/src/input/agent-workspace-document-ops-editor.ts +523 -0
  64. package/src/input/agent-workspace-host-category.ts +1 -1
  65. package/src/input/agent-workspace-local-library-snapshot.ts +167 -0
  66. package/src/input/agent-workspace-model-compare-editor.ts +376 -0
  67. package/src/input/agent-workspace-model-compare-prompt-submission.ts +552 -0
  68. package/src/input/agent-workspace-model-compare-types.ts +82 -0
  69. package/src/input/agent-workspace-model-compare-utils.ts +35 -0
  70. package/src/input/agent-workspace-onboarding-categories.ts +141 -0
  71. package/src/input/agent-workspace-operations-command-editor-submission.ts +53 -0
  72. package/src/input/agent-workspace-operations-command-editors.ts +22 -0
  73. package/src/input/agent-workspace-research-report-editor.ts +212 -0
  74. package/src/input/agent-workspace-research-run-editor.ts +144 -0
  75. package/src/input/agent-workspace-research-source-editor.ts +167 -0
  76. package/src/input/agent-workspace-review-packet-snapshot.ts +593 -0
  77. package/src/input/agent-workspace-review-packet-utils.ts +265 -0
  78. package/src/input/agent-workspace-settings.ts +313 -30
  79. package/src/input/agent-workspace-setup-checkpoint-action.ts +127 -0
  80. package/src/input/agent-workspace-setup-snapshot.ts +217 -0
  81. package/src/input/agent-workspace-setup.ts +61 -1
  82. package/src/input/agent-workspace-snapshot.ts +184 -149
  83. package/src/input/agent-workspace-types.ts +287 -2
  84. package/src/input/agent-workspace.ts +23 -1
  85. package/src/input/command-registry.ts +9 -2
  86. package/src/input/commands/agent-runtime-profile-runtime.ts +28 -13
  87. package/src/input/commands/channels-runtime.ts +102 -114
  88. package/src/input/commands/delegation-runtime.ts +87 -24
  89. package/src/input/commands/knowledge-browser-flags.ts +12 -0
  90. package/src/input/commands/knowledge.ts +28 -14
  91. package/src/input/commands/operator-actions-runtime.ts +6 -3
  92. package/src/input/commands/schedule-runtime.ts +71 -14
  93. package/src/input/commands/session-content.ts +2 -2
  94. package/src/input/commands/shell-core.ts +2 -0
  95. package/src/input/commands/vibe-runtime.ts +140 -0
  96. package/src/input/commands.ts +2 -0
  97. package/src/input/connected-host-routes.ts +123 -0
  98. package/src/input/settings-modal-types.ts +14 -0
  99. package/src/input/setup-wizard-live-receipts.ts +76 -0
  100. package/src/main.ts +15 -15
  101. package/src/panels/qr-panel.ts +2 -2
  102. package/src/renderer/agent-workspace-context-lines.ts +701 -0
  103. package/src/renderer/agent-workspace.ts +68 -421
  104. package/src/renderer/settings-modal-helpers.ts +12 -0
  105. package/src/renderer/settings-modal.ts +12 -0
  106. package/src/runtime/bootstrap-command-context.ts +11 -1
  107. package/src/runtime/bootstrap-command-parts.ts +14 -3
  108. package/src/runtime/bootstrap-core.ts +39 -1
  109. package/src/runtime/bootstrap-shell.ts +6 -0
  110. package/src/runtime/bootstrap.ts +113 -30
  111. package/src/runtime/connected-host-auth.ts +3 -2
  112. package/src/runtime/execution-ledger.ts +231 -0
  113. package/src/runtime/services.ts +88 -10
  114. package/src/runtime/tool-permission-safety.ts +199 -5
  115. package/src/shell/session-continuity-hints.ts +39 -0
  116. package/src/tools/agent-artifacts-tool.ts +606 -0
  117. package/src/tools/agent-audit-tool.ts +155 -0
  118. package/src/tools/agent-autonomy-schedule-tool.ts +238 -0
  119. package/src/tools/agent-autonomy-tool.ts +140 -0
  120. package/src/tools/agent-channel-send-tool.ts +24 -2
  121. package/src/tools/agent-channels-tool.ts +140 -0
  122. package/src/tools/agent-computer-tool.ts +168 -0
  123. package/src/tools/agent-context-policy.ts +137 -7
  124. package/src/tools/agent-context-tool.ts +143 -0
  125. package/src/tools/agent-delegation-tool.ts +128 -0
  126. package/src/tools/agent-device-tool.ts +240 -0
  127. package/src/tools/agent-documents-tool.ts +684 -0
  128. package/src/tools/agent-execution-tool.ts +230 -0
  129. package/src/tools/agent-harness-agent-orchestration-policy.ts +75 -0
  130. package/src/tools/agent-harness-agent-orchestration.ts +791 -0
  131. package/src/tools/agent-harness-autonomy-intake.ts +785 -0
  132. package/src/tools/agent-harness-autonomy-live-records.ts +742 -0
  133. package/src/tools/agent-harness-autonomy-queue-types.ts +88 -0
  134. package/src/tools/agent-harness-autonomy-queue.ts +571 -0
  135. package/src/tools/agent-harness-autonomy-watcher-read-models.ts +509 -0
  136. package/src/tools/agent-harness-background-processes-types.ts +35 -0
  137. package/src/tools/agent-harness-background-processes.ts +798 -0
  138. package/src/tools/agent-harness-browser-cockpit-route.ts +373 -0
  139. package/src/tools/agent-harness-browser-control.ts +346 -0
  140. package/src/tools/agent-harness-browser-pwa-read-models.ts +622 -0
  141. package/src/tools/agent-harness-channel-metadata.ts +168 -10
  142. package/src/tools/agent-harness-cli-command-policy.ts +110 -0
  143. package/src/tools/agent-harness-command-catalog.ts +4 -2
  144. package/src/tools/agent-harness-command-runner.ts +42 -0
  145. package/src/tools/agent-harness-connected-host-status.ts +7 -4
  146. package/src/tools/agent-harness-delegation-posture.ts +234 -19
  147. package/src/tools/agent-harness-device-live-read-models.ts +366 -0
  148. package/src/tools/agent-harness-document-ops-reviewer-readiness.ts +234 -0
  149. package/src/tools/agent-harness-document-ops-types.ts +72 -0
  150. package/src/tools/agent-harness-document-ops.ts +671 -0
  151. package/src/tools/agent-harness-execution-history.ts +489 -0
  152. package/src/tools/agent-harness-execution-posture.ts +385 -0
  153. package/src/tools/agent-harness-file-recovery.ts +135 -0
  154. package/src/tools/agent-harness-interactive-runtime-records.ts +421 -0
  155. package/src/tools/agent-harness-keybinding-metadata.ts +16 -12
  156. package/src/tools/agent-harness-learning-curator-common.ts +102 -0
  157. package/src/tools/agent-harness-learning-curator-consolidation.ts +295 -0
  158. package/src/tools/agent-harness-learning-curator-proposals.ts +606 -0
  159. package/src/tools/agent-harness-learning-curator-types.ts +151 -0
  160. package/src/tools/agent-harness-learning-curator.ts +417 -0
  161. package/src/tools/agent-harness-local-model-benchmarks.ts +269 -0
  162. package/src/tools/agent-harness-local-model-cookbook.ts +238 -0
  163. package/src/tools/agent-harness-local-model-endpoints.ts +788 -0
  164. package/src/tools/agent-harness-local-model-smoke.ts +277 -0
  165. package/src/tools/agent-harness-local-model-url.ts +78 -0
  166. package/src/tools/agent-harness-media-posture.ts +223 -2
  167. package/src/tools/agent-harness-memory-external-providers.ts +796 -0
  168. package/src/tools/agent-harness-memory-posture.ts +672 -0
  169. package/src/tools/agent-harness-memory-provider-certification.ts +219 -0
  170. package/src/tools/agent-harness-memory-refinement.ts +340 -0
  171. package/src/tools/agent-harness-metadata.ts +100 -168
  172. package/src/tools/agent-harness-mode-catalog.ts +86 -33
  173. package/src/tools/agent-harness-model-catalog.ts +162 -0
  174. package/src/tools/agent-harness-model-provider-health.ts +283 -0
  175. package/src/tools/agent-harness-model-readiness.ts +432 -0
  176. package/src/tools/agent-harness-model-routing-types.ts +327 -0
  177. package/src/tools/agent-harness-model-routing-utils.ts +30 -0
  178. package/src/tools/agent-harness-model-routing.ts +165 -193
  179. package/src/tools/agent-harness-operator-methods.ts +115 -133
  180. package/src/tools/agent-harness-pairing-posture.ts +452 -18
  181. package/src/tools/agent-harness-personal-ops-certification.ts +116 -0
  182. package/src/tools/agent-harness-personal-ops-discovery.ts +533 -0
  183. package/src/tools/agent-harness-personal-ops-intake.ts +385 -0
  184. package/src/tools/agent-harness-personal-ops-lanes.ts +270 -0
  185. package/src/tools/agent-harness-personal-ops-operations.ts +225 -0
  186. package/src/tools/agent-harness-personal-ops-provider-records.ts +358 -0
  187. package/src/tools/agent-harness-personal-ops-provider-task-records.ts +321 -0
  188. package/src/tools/agent-harness-personal-ops-records.ts +684 -0
  189. package/src/tools/agent-harness-personal-ops-runner.ts +637 -0
  190. package/src/tools/agent-harness-personal-ops-types.ts +240 -0
  191. package/src/tools/agent-harness-personal-ops.ts +613 -0
  192. package/src/tools/agent-harness-project-context.ts +144 -0
  193. package/src/tools/agent-harness-prompt-context.ts +589 -0
  194. package/src/tools/agent-harness-provider-account-metadata.ts +2 -2
  195. package/src/tools/agent-harness-release-evidence.ts +9 -7
  196. package/src/tools/agent-harness-release-readiness.ts +9 -7
  197. package/src/tools/agent-harness-remote-read-models.ts +541 -0
  198. package/src/tools/agent-harness-research-briefing.ts +446 -0
  199. package/src/tools/agent-harness-research-live-read-models.ts +500 -0
  200. package/src/tools/agent-harness-research-queue.ts +250 -0
  201. package/src/tools/agent-harness-research-runs.ts +307 -0
  202. package/src/tools/agent-harness-research-workflow.ts +395 -0
  203. package/src/tools/agent-harness-security-posture.ts +2 -2
  204. package/src/tools/agent-harness-service-posture.ts +9 -9
  205. package/src/tools/agent-harness-session-metadata.ts +3 -3
  206. package/src/tools/agent-harness-setup-connected-host.ts +501 -0
  207. package/src/tools/agent-harness-setup-describe.ts +557 -0
  208. package/src/tools/agent-harness-setup-handoffs.ts +502 -0
  209. package/src/tools/agent-harness-setup-model-helpers.ts +102 -0
  210. package/src/tools/agent-harness-setup-plan.ts +253 -0
  211. package/src/tools/agent-harness-setup-posture-types.ts +218 -0
  212. package/src/tools/agent-harness-setup-posture-utils.ts +173 -0
  213. package/src/tools/agent-harness-setup-posture.ts +449 -221
  214. package/src/tools/agent-harness-setup-smoke.ts +533 -0
  215. package/src/tools/agent-harness-sudo-posture.ts +114 -0
  216. package/src/tools/agent-harness-tool-schema.ts +142 -7
  217. package/src/tools/agent-harness-tool-types.ts +83 -0
  218. package/src/tools/agent-harness-tool-utils.ts +43 -0
  219. package/src/tools/agent-harness-tool.ts +319 -370
  220. package/src/tools/agent-harness-ui-surface-metadata.ts +76 -69
  221. package/src/tools/agent-harness-ui-surface-types.ts +46 -0
  222. package/src/tools/agent-harness-vibe-health.ts +105 -0
  223. package/src/tools/agent-harness-workspace-action-runner.ts +149 -0
  224. package/src/tools/agent-harness-workspace-actions.ts +114 -8
  225. package/src/tools/agent-harness-workspace-editor-execution.ts +214 -0
  226. package/src/tools/agent-harness-workspace-editor-runner.ts +755 -0
  227. package/src/tools/agent-host-tool.ts +159 -0
  228. package/src/tools/agent-knowledge-ingest-tool.ts +34 -1
  229. package/src/tools/agent-learning-consolidation-core.ts +327 -0
  230. package/src/tools/agent-learning-consolidation-tool.ts +758 -0
  231. package/src/tools/agent-memory-tool.ts +253 -0
  232. package/src/tools/agent-model-compare-export.ts +315 -0
  233. package/src/tools/agent-model-compare-handoff.ts +592 -0
  234. package/src/tools/agent-model-compare-judgment.ts +633 -0
  235. package/src/tools/agent-model-compare-run.ts +735 -0
  236. package/src/tools/agent-model-compare-tool.ts +698 -0
  237. package/src/tools/agent-model-compare-types.ts +191 -0
  238. package/src/tools/agent-model-compare-utils.ts +93 -0
  239. package/src/tools/agent-models-tool.ts +208 -0
  240. package/src/tools/agent-operator-action-tool.ts +1 -1
  241. package/src/tools/agent-operator-method-tool.ts +643 -0
  242. package/src/tools/agent-personal-ops-tool.ts +197 -0
  243. package/src/tools/agent-policy-explanation.ts +415 -0
  244. package/src/tools/agent-research-report-tool.ts +608 -0
  245. package/src/tools/agent-research-runner.ts +367 -0
  246. package/src/tools/agent-research-runs-tool.ts +434 -0
  247. package/src/tools/agent-research-sources-tool.ts +443 -0
  248. package/src/tools/agent-research-tool.ts +515 -0
  249. package/src/tools/agent-review-packet-presets-core.ts +757 -0
  250. package/src/tools/agent-review-packet-presets-tool.ts +466 -0
  251. package/src/tools/agent-review-packet-share-tool.ts +305 -0
  252. package/src/tools/agent-route-planner-candidates-setup.ts +411 -0
  253. package/src/tools/agent-route-planner-candidates-surfaces.ts +432 -0
  254. package/src/tools/agent-route-planner-candidates-work.ts +251 -0
  255. package/src/tools/agent-route-planner-helpers.ts +667 -0
  256. package/src/tools/agent-route-planner.ts +185 -0
  257. package/src/tools/agent-route-tool.ts +105 -0
  258. package/src/tools/agent-schedule-edit-tool.ts +210 -0
  259. package/src/tools/agent-schedule-tool.ts +282 -0
  260. package/src/tools/agent-security-tool.ts +145 -0
  261. package/src/tools/agent-sessions-tool.ts +122 -0
  262. package/src/tools/agent-settings-import-tool.ts +104 -0
  263. package/src/tools/agent-settings-tool.ts +176 -0
  264. package/src/tools/agent-setup-tool.ts +226 -0
  265. package/src/tools/agent-support-tool.ts +122 -0
  266. package/src/tools/agent-terminal-process-tools.ts +167 -0
  267. package/src/tools/agent-tool-policy-guard-types.ts +77 -0
  268. package/src/tools/agent-tool-policy-guard.ts +106 -85
  269. package/src/tools/agent-vibe-tool.ts +297 -0
  270. package/src/tools/agent-work-plan-tool.ts +265 -6
  271. package/src/tools/agent-workspace-tool.ts +305 -0
  272. package/src/tools/artifact-archive.ts +169 -0
  273. package/src/tools/tool-definition-compaction.ts +36 -0
  274. package/src/version.ts +1 -1
@@ -1,11 +1,15 @@
1
1
  import { basename, sep } from 'node:path';
2
2
  import { listAvailableSubscriptionProviders } from '@pellux/goodvibes-sdk/platform/config';
3
+ import type { ArtifactDescriptor } from '@pellux/goodvibes-sdk/platform/artifacts';
3
4
  import type { MemoryRecord } from '@pellux/goodvibes-sdk/platform/state';
4
5
  import type { CommandContext } from './command-registry.ts';
5
6
  import { AgentNoteRegistry, type AgentNoteRecord } from '../agent/note-registry.ts';
7
+ import { AgentDocumentRegistry, type AgentDocumentRecord } from '../agent/document-registry.ts';
6
8
  import { AgentPersonaRegistry, type AgentPersonaRecord } from '../agent/persona-registry.ts';
7
9
  import { formatAgentRecordOrigin } from '../agent/record-labels.ts';
8
10
  import { AgentRoutineRegistry, evaluateAgentRoutineReadiness, type AgentRoutineRecord } from '../agent/routine-registry.ts';
11
+ import { AgentResearchRunRegistry, researchRunLogTail } from '../agent/research-run-registry.ts';
12
+ import { AgentResearchSourceRegistry } from '../agent/research-source-registry.ts';
9
13
  import {
10
14
  AgentSkillRegistry,
11
15
  evaluateAgentSkillBundleReadiness,
@@ -16,21 +20,43 @@ import {
16
20
  } from '../agent/skill-registry.ts';
17
21
  import { summarizeAgentBehaviorDiscovery } from '../agent/behavior-discovery-summary.ts';
18
22
  import { isPromptActiveMemory } from '../agent/memory-prompt.ts';
23
+ import type { PromptContextReceipt } from '../agent/prompt-context-receipts.ts';
24
+ import { discoverProjectContextFiles } from '../agent/project-context-files.ts';
19
25
  import { getAgentRuntimeProfilesRoot, listAgentRuntimeProfiles, listAgentRuntimeProfileTemplates, readAgentRuntimeProfileSelection } from '../agent/runtime-profile.ts';
20
26
  import { RoutineScheduleReceiptStore } from '../agent/routine-schedule-receipts.ts';
27
+ import { buildSetupWizardDurableReceipts } from '../agent/setup-wizard-artifact-receipts.ts';
28
+ import { mergeSetupWizardDurableReceipts, setupWizardLiveDurableReceipts } from './setup-wizard-live-receipts.ts';
29
+ import { readSetupWizardCheckpoint } from '../agent/setup-wizard-checkpoint.ts';
30
+ import { discoverVibeFiles } from '../agent/vibe-file.ts';
31
+ import {
32
+ DEFAULT_AGENT_SETUP_WIZARD_CLEAR_CHECKPOINT_ROUTE,
33
+ DEFAULT_AGENT_SETUP_WIZARD_INSPECT_CHECKPOINT_ROUTE,
34
+ DEFAULT_AGENT_SETUP_WIZARD_MARK_CHECKPOINT_ROUTE,
35
+ DEFAULT_AGENT_SETUP_WIZARD_RERUN_SMOKE_ROUTE,
36
+ DEFAULT_AGENT_SETUP_WIZARD_SAVE_SMOKE_ROUTE,
37
+ buildAgentSetupWizard,
38
+ emptyAgentSetupSmokeHistory,
39
+ emptyAgentSetupWizardCheckpoint,
40
+ setupStepHasSatisfyingReceipt,
41
+ type AgentSetupWizard,
42
+ type AgentSetupWizardBlockedCheckFrequency,
43
+ type AgentSetupWizardCheckpoint,
44
+ type AgentSetupWizardSmokeHistory,
45
+ type AgentSetupWizardSourceItem,
46
+ } from '../agent/setup-wizard.ts';
21
47
  import { GOODVIBES_AGENT_PAIRING_SURFACE } from '../config/surface.ts';
22
48
  import { connectedHostOperatorTokenFingerprint, readConnectedHostOperatorToken, type ConnectedHostOperatorToken } from '../runtime/connected-host-auth.ts';
23
- import { buildAgentWorkspaceChannels } from './agent-workspace-channels.ts';
49
+ import { buildAgentWorkspaceChannelSetupGuide, buildAgentWorkspaceChannels } from './agent-workspace-channels.ts';
24
50
  import { getAgentWorkspaceConfigReader } from './agent-workspace-config-reader.ts';
25
- import { buildAgentWorkspaceSetupChecklist } from './agent-workspace-setup.ts';
51
+ import { buildAgentWorkspaceSetupChecklist, type AgentWorkspaceSetupChecklistItem } from './agent-workspace-setup.ts';
26
52
  import { buildAgentWorkspaceVoiceMediaReadiness, type AgentWorkspaceVoiceMediaProviderDescriptor } from './agent-workspace-voice-media.ts';
27
- import type {
28
- AgentWorkspaceLocalLibraryItem,
29
- AgentWorkspaceRoutineScheduleReceiptSummary,
30
- AgentWorkspaceRuntimeProfileItem,
31
- AgentWorkspaceRuntimeSnapshot,
32
- AgentWorkspaceRuntimeStarterTemplateItem,
33
- } from './agent-workspace-types.ts';
53
+ import { buildProcessSupervisionSummary, buildProjectContextSummary, buildPromptContextReceiptTimeline, buildResearchBrowserRunnerContract, buildResearchVisualReportContract, buildVibeSummary } from './agent-workspace-context-snapshot.ts';
54
+ import { summarizeMemoryItem, summarizeNoteItem, summarizePersonaItem, summarizeResearchRunItem, summarizeRoutineItem, summarizeRoutineScheduleReceipt, summarizeRuntimeProfile, summarizeSkillBundleItem, summarizeSkillItem, summarizeStarterTemplate } from './agent-workspace-local-library-snapshot.ts';
55
+ import { buildReviewPacketDefaults, buildReviewPacketTimeline, buildReviewPacketWizard, readDocumentDrafts, reviewerReadinessBadge } from './agent-workspace-review-packet-snapshot.ts';
56
+ import { isReviewerHandoffArtifact, summarizeReviewerHandoffArtifact } from './agent-workspace-review-packet-utils.ts';
57
+ import { buildSetupSmokeHistory, buildSetupWizardCheckpoint, buildWorkspaceSetupWizard, setupCompletionMarkerExists } from './agent-workspace-setup-snapshot.ts';
58
+ import { readOnboardingCompletionMarker } from '../runtime/onboarding/index.ts';
59
+ import type { AgentWorkspaceRuntimeSnapshot } from './agent-workspace-types.ts';
34
60
 
35
61
  function readConfigString(context: CommandContext, key: string, fallback: string): string {
36
62
  try {
@@ -80,144 +106,6 @@ function inferRuntimeProfileBaseHome(homeDirectory: string): string {
80
106
  return markerIndex >= 0 ? homeDirectory.slice(0, markerIndex) : homeDirectory;
81
107
  }
82
108
 
83
- function summarizePersonaItem(persona: AgentPersonaRecord, activePersonaId: string | null): AgentWorkspaceLocalLibraryItem {
84
- return {
85
- id: persona.id,
86
- name: persona.name,
87
- description: persona.description,
88
- reviewState: persona.reviewState,
89
- source: formatAgentRecordOrigin(persona.source, persona.provenance),
90
- tags: persona.tags,
91
- triggers: persona.triggers,
92
- active: persona.id === activePersonaId,
93
- };
94
- }
95
-
96
- function summarizeSkillItem(skill: AgentSkillRecord): AgentWorkspaceLocalLibraryItem {
97
- const readiness = evaluateAgentSkillReadiness(skill);
98
- return {
99
- id: skill.id,
100
- name: skill.name,
101
- description: skill.description,
102
- reviewState: skill.reviewState,
103
- source: formatAgentRecordOrigin(skill.source, skill.provenance),
104
- tags: skill.tags,
105
- triggers: skill.triggers,
106
- enabled: skill.enabled,
107
- requirementCount: skill.requirements.length,
108
- missingRequirementCount: readiness.missing.length,
109
- missingRequirements: readiness.missing.map(formatAgentSkillRequirement),
110
- };
111
- }
112
-
113
- function summarizeSkillBundleItem(bundle: AgentSkillBundleRecord, skills: readonly AgentSkillRecord[]): AgentWorkspaceLocalLibraryItem {
114
- const readiness = evaluateAgentSkillBundleReadiness(bundle, skills);
115
- const missing = [
116
- ...readiness.missingRequirements.map(formatAgentSkillRequirement),
117
- ...readiness.missingSkillIds.map((skillId) => `skill:${skillId}`),
118
- ];
119
- return {
120
- id: bundle.id,
121
- name: bundle.name,
122
- description: `${bundle.description} Skills: ${bundle.skillIds.join(', ')}`,
123
- reviewState: bundle.reviewState,
124
- source: formatAgentRecordOrigin(bundle.source, bundle.provenance),
125
- tags: bundle.skillIds,
126
- triggers: [],
127
- enabled: bundle.enabled,
128
- requirementCount: readiness.includedSkills.reduce((total, skill) => total + skill.requirements.length, 0) + readiness.missingSkillIds.length,
129
- missingRequirementCount: missing.length,
130
- missingRequirements: missing,
131
- };
132
- }
133
-
134
- function summarizeRoutineItem(routine: AgentRoutineRecord): AgentWorkspaceLocalLibraryItem {
135
- const readiness = evaluateAgentRoutineReadiness(routine);
136
- return {
137
- id: routine.id,
138
- name: routine.name,
139
- description: routine.description,
140
- reviewState: routine.reviewState,
141
- source: formatAgentRecordOrigin(routine.source, routine.provenance),
142
- tags: routine.tags,
143
- triggers: routine.triggers,
144
- enabled: routine.enabled,
145
- requirementCount: routine.requirements.length,
146
- missingRequirementCount: readiness.missing.length,
147
- missingRequirements: readiness.missing.map(formatAgentSkillRequirement),
148
- startCount: routine.startCount,
149
- };
150
- }
151
-
152
- function summarizeRoutineScheduleReceipt(
153
- receipt: ReturnType<RoutineScheduleReceiptStore['snapshot']>['receipts'][number],
154
- ): AgentWorkspaceRoutineScheduleReceiptSummary {
155
- return {
156
- id: receipt.id,
157
- status: receipt.status,
158
- routineId: receipt.routineId,
159
- routineName: receipt.routineName,
160
- scheduleName: receipt.scheduleName,
161
- scheduleKind: receipt.scheduleKind,
162
- scheduleValue: receipt.scheduleValue,
163
- createdAt: receipt.createdAt,
164
- };
165
- }
166
-
167
- function summarizeMemoryItem(record: MemoryRecord): AgentWorkspaceLocalLibraryItem {
168
- const detail = record.detail?.trim();
169
- return {
170
- id: record.id,
171
- name: record.summary,
172
- description: detail && detail.length > 0 ? detail : `${record.scope}/${record.cls}`,
173
- reviewState: record.reviewState,
174
- source: 'Agent memory',
175
- tags: record.tags,
176
- triggers: [],
177
- scope: record.scope,
178
- cls: record.cls,
179
- confidence: record.confidence,
180
- };
181
- }
182
-
183
- function summarizeNoteItem(note: AgentNoteRecord): AgentWorkspaceLocalLibraryItem {
184
- const preview = note.body.replace(/\s+/g, ' ').trim();
185
- const description = note.sourceUrl
186
- ? `${preview.slice(0, 160)}${preview.length > 160 ? '...' : ''} Origin URL ${note.sourceUrl}`
187
- : preview;
188
- return {
189
- id: note.id,
190
- name: note.title,
191
- description,
192
- reviewState: note.reviewState,
193
- source: formatAgentRecordOrigin(note.source, note.provenance),
194
- tags: note.tags,
195
- triggers: [],
196
- };
197
- }
198
-
199
- function summarizeRuntimeProfile(profile: ReturnType<typeof listAgentRuntimeProfiles>[number]): AgentWorkspaceRuntimeProfileItem {
200
- return {
201
- id: profile.id,
202
- homeDirectory: profile.homeDirectory,
203
- createdAt: profile.createdAt,
204
- starterTemplateId: profile.starterTemplateId,
205
- starterTemplateName: profile.starterTemplateName,
206
- };
207
- }
208
-
209
- function summarizeStarterTemplate(template: ReturnType<typeof listAgentRuntimeProfileTemplates>[number]): AgentWorkspaceRuntimeStarterTemplateItem {
210
- return {
211
- id: template.id,
212
- name: template.name,
213
- description: template.description,
214
- personaName: template.personaName,
215
- skillNames: template.skillNames,
216
- routineNames: template.routineNames,
217
- source: template.source,
218
- };
219
- }
220
-
221
109
  export function buildAgentWorkspaceRuntimeSnapshot(context: CommandContext): AgentWorkspaceRuntimeSnapshot {
222
110
  const host = readConfigString(context, 'controlPlane.host', '127.0.0.1');
223
111
  const port = readConfigNumber(context, 'controlPlane.port', 3421);
@@ -327,6 +215,98 @@ export function buildAgentWorkspaceRuntimeSnapshot(context: CommandContext): Age
327
215
  return { count: 0, successful: 0, failed: 0, latest: null };
328
216
  }
329
217
  })();
218
+ const researchSourceSnapshot = (() => {
219
+ try {
220
+ const shellPaths = context.workspace?.shellPaths;
221
+ if (!shellPaths) return { count: 0, candidate: 0, reviewed: 0, rejected: 0, used: 0 };
222
+ const snapshot = AgentResearchSourceRegistry.fromShellPaths(shellPaths).snapshot();
223
+ return {
224
+ count: snapshot.sources.length,
225
+ candidate: snapshot.candidates.length,
226
+ reviewed: snapshot.reviewed.length,
227
+ rejected: snapshot.rejected.length,
228
+ used: snapshot.used.length,
229
+ };
230
+ } catch {
231
+ return { count: 0, candidate: 0, reviewed: 0, rejected: 0, used: 0 };
232
+ }
233
+ })();
234
+ const researchRunSnapshot = (() => {
235
+ try {
236
+ const shellPaths = context.workspace?.shellPaths;
237
+ if (!shellPaths) return { count: 0, planned: 0, running: 0, paused: 0, blocked: 0, terminal: 0, items: [] };
238
+ const snapshot = AgentResearchRunRegistry.fromShellPaths(shellPaths).snapshot();
239
+ const actionable = [
240
+ ...snapshot.blocked,
241
+ ...snapshot.running,
242
+ ...snapshot.paused,
243
+ ...snapshot.planned,
244
+ ...snapshot.failed,
245
+ ...snapshot.completed,
246
+ ...snapshot.cancelled,
247
+ ];
248
+ return {
249
+ count: snapshot.runs.length,
250
+ planned: snapshot.planned.length,
251
+ running: snapshot.running.length,
252
+ paused: snapshot.paused.length,
253
+ blocked: snapshot.blocked.length,
254
+ terminal: snapshot.cancelled.length + snapshot.completed.length + snapshot.failed.length,
255
+ items: actionable.slice(0, 8).map(summarizeResearchRunItem),
256
+ };
257
+ } catch {
258
+ return { count: 0, planned: 0, running: 0, paused: 0, blocked: 0, terminal: 0, items: [] };
259
+ }
260
+ })();
261
+ const artifactListSnapshot = (() => {
262
+ try {
263
+ const list = context.platform?.artifactStore?.list;
264
+ return {
265
+ available: Boolean(list),
266
+ items: [...(list?.(100) ?? [])],
267
+ };
268
+ } catch {
269
+ return { available: false, items: [] };
270
+ }
271
+ })();
272
+ const setupSmokeHistory = buildSetupSmokeHistory(artifactListSnapshot.items, artifactListSnapshot.available);
273
+ const durableSetupReceipts = mergeSetupWizardDurableReceipts(
274
+ buildSetupWizardDurableReceipts(artifactListSnapshot.items),
275
+ setupWizardLiveDurableReceipts(context),
276
+ );
277
+ const recentReviewerHandoffs = (() => {
278
+ try {
279
+ const handoffs = artifactListSnapshot.items
280
+ .filter(isReviewerHandoffArtifact)
281
+ .sort((left, right) => right.createdAt - left.createdAt);
282
+ return {
283
+ count: handoffs.length,
284
+ items: handoffs.slice(0, 6).map(summarizeReviewerHandoffArtifact),
285
+ };
286
+ } catch {
287
+ return { count: 0, items: [] };
288
+ }
289
+ })();
290
+ const documentDrafts = readDocumentDrafts(context);
291
+ const reviewerBadge = reviewerReadinessBadge(
292
+ documentDrafts,
293
+ artifactListSnapshot.items,
294
+ artifactListSnapshot.available,
295
+ );
296
+ const reviewPacketTimeline = buildReviewPacketTimeline(
297
+ documentDrafts,
298
+ artifactListSnapshot.items,
299
+ artifactListSnapshot.available,
300
+ );
301
+ const reviewPacketDefaults = buildReviewPacketDefaults(
302
+ documentDrafts,
303
+ artifactListSnapshot.items,
304
+ );
305
+ const reviewPacketWizard = buildReviewPacketWizard(
306
+ documentDrafts,
307
+ artifactListSnapshot.available,
308
+ reviewPacketDefaults,
309
+ );
330
310
  const discoveredBehavior = summarizeAgentBehaviorDiscovery(context.workspace?.shellPaths);
331
311
  const profileBaseHome = inferRuntimeProfileBaseHome(context.workspace?.shellPaths?.homeDirectory ?? '');
332
312
  const runtimeProfiles = (() => {
@@ -474,15 +454,27 @@ export function buildAgentWorkspaceRuntimeSnapshot(context: CommandContext): Age
474
454
  }
475
455
  })();
476
456
  const channels = buildAgentWorkspaceChannels(context);
457
+ const channelSetupGuide = buildAgentWorkspaceChannelSetupGuide(channels);
477
458
  const voiceMediaReadiness = buildAgentWorkspaceVoiceMediaReadiness({
478
459
  context,
479
460
  voiceProviders: voiceProviderDescriptors,
480
461
  mediaProviders: mediaProviderDescriptors,
481
462
  });
463
+ const browserPwaEnabled = readConfigBoolean(context, 'web.enabled', false);
464
+ const browserPwaPublicBaseUrl = readConfigString(context, 'web.publicBaseUrl', '(not configured)');
465
+ const connectedHostAuthReceiptReady = setupStepHasSatisfyingReceipt(durableSetupReceipts, 'connected-host-auth');
466
+ const installSmokeReceiptReady = setupSmokeHistory.latestResult === 'ready-for-user-run'
467
+ || setupStepHasSatisfyingReceipt(durableSetupReceipts, 'install-smoke');
468
+ const browserPwaReceiptReady = setupStepHasSatisfyingReceipt(durableSetupReceipts, 'browser-pwa');
482
469
  const setupChecklist = buildAgentWorkspaceSetupChecklist({
483
470
  provider,
484
471
  model,
485
472
  runtimeBaseUrl,
473
+ connectedHostTokenPresent: companionAccess.tokenPresent,
474
+ connectedHostTokenReadable: companionAccess.tokenReadable,
475
+ connectedHostTokenPath: companionAccess.tokenPath,
476
+ connectedHostTokenError: companionAccess.tokenError,
477
+ connectedHostAuthReceiptReady,
486
478
  activeSubscriptionCount: subscriptionSnapshot.active,
487
479
  pendingSubscriptionCount: subscriptionSnapshot.pending,
488
480
  availableSubscriptionProviderCount: subscriptionSnapshot.available,
@@ -506,9 +498,26 @@ export function buildAgentWorkspaceRuntimeSnapshot(context: CommandContext): Age
506
498
  readyChannelCount: channels.filter((channel) => channel.ready).length,
507
499
  voiceProviderCount: voiceProviders.length,
508
500
  mediaProviderCount: mediaProviders.length,
501
+ installSmokeReceiptReady,
502
+ browserPwaEnabled,
503
+ browserPwaPublicBaseUrl,
504
+ browserPwaFirstRunReceiptStatus: browserPwaReceiptReady ? 'published' : 'not-published',
509
505
  runtimeProfileCount: runtimeProfiles.length,
510
506
  runtimeStarterTemplateCount: runtimeStarterTemplates.length,
511
507
  });
508
+ const setupWizard = buildWorkspaceSetupWizard(
509
+ setupChecklist,
510
+ setupSmokeHistory,
511
+ buildSetupWizardCheckpoint(context),
512
+ setupCompletionMarkerExists(context),
513
+ durableSetupReceipts,
514
+ );
515
+ const researchBrowserRunnerContract = buildResearchBrowserRunnerContract(context);
516
+ const researchVisualReportContract = buildResearchVisualReportContract(researchSourceSnapshot);
517
+ const vibe = buildVibeSummary(context);
518
+ const projectContext = buildProjectContextSummary(context);
519
+ const promptContextReceipts = buildPromptContextReceiptTimeline(context);
520
+ const processSupervision = buildProcessSupervisionSummary(context);
512
521
 
513
522
  return {
514
523
  provider,
@@ -565,6 +574,30 @@ export function buildAgentWorkspaceRuntimeSnapshot(context: CommandContext): Age
565
574
  localNoteCount: noteSnapshot.count,
566
575
  localNoteReviewQueueCount: noteSnapshot.reviewQueueCount,
567
576
  localNotes: noteSnapshot.items,
577
+ researchSourceCount: researchSourceSnapshot.count,
578
+ researchSourceCandidateCount: researchSourceSnapshot.candidate,
579
+ researchSourceReviewedCount: researchSourceSnapshot.reviewed,
580
+ researchSourceRejectedCount: researchSourceSnapshot.rejected,
581
+ researchSourceUsedCount: researchSourceSnapshot.used,
582
+ researchRunCount: researchRunSnapshot.count,
583
+ researchRunPlannedCount: researchRunSnapshot.planned,
584
+ researchRunRunningCount: researchRunSnapshot.running,
585
+ researchRunPausedCount: researchRunSnapshot.paused,
586
+ researchRunBlockedCount: researchRunSnapshot.blocked,
587
+ researchRunTerminalCount: researchRunSnapshot.terminal,
588
+ researchRuns: researchRunSnapshot.items,
589
+ researchBrowserRunnerContract,
590
+ researchVisualReportContract,
591
+ vibe,
592
+ projectContext,
593
+ promptContextReceipts,
594
+ processSupervision,
595
+ recentReviewerHandoffArtifactCount: recentReviewerHandoffs.count,
596
+ recentReviewerHandoffArtifacts: recentReviewerHandoffs.items,
597
+ reviewerReadinessBadge: reviewerBadge,
598
+ reviewPacketTimeline,
599
+ reviewPacketDefaults,
600
+ reviewPacketWizard,
568
601
  localRoutineCount: routineSnapshot.count,
569
602
  enabledRoutineCount: routineSnapshot.enabled,
570
603
  localRoutines: routineSnapshot.items,
@@ -589,6 +622,7 @@ export function buildAgentWorkspaceRuntimeSnapshot(context: CommandContext): Age
589
622
  delegatedReviewPolicy: 'explicit-build-delegation-only',
590
623
  companionAccess,
591
624
  channels,
625
+ channelSetupGuide,
592
626
  voiceProviderCount: voiceProviders.length,
593
627
  voiceStreamingProviderCount: voiceProviders.filter((entry) => entry.capabilities.includes('tts-stream')).length,
594
628
  voiceSttProviderCount: voiceProviders.filter((entry) => entry.capabilities.includes('stt')).length,
@@ -605,8 +639,8 @@ export function buildAgentWorkspaceRuntimeSnapshot(context: CommandContext): Age
605
639
  mcpConnectedServerCount: mcpSnapshot.connectedCount,
606
640
  mcpQuarantinedServerCount: mcpSnapshot.quarantinedCount,
607
641
  mcpAllowAllServerCount: mcpSnapshot.allowAllCount,
608
- browserToolExposureEnabled: readConfigBoolean(context, 'web.enabled', false),
609
- browserToolPublicBaseUrl: readConfigString(context, 'web.publicBaseUrl', '(not configured)'),
642
+ browserToolExposureEnabled: browserPwaEnabled,
643
+ browserToolPublicBaseUrl: browserPwaPublicBaseUrl,
610
644
  activeRuntimeProfile: inferActiveRuntimeProfile(context.workspace?.shellPaths?.homeDirectory ?? ''),
611
645
  selectedRuntimeProfile: selectedRuntimeProfile?.id ?? null,
612
646
  selectedRuntimeProfileExists: selectedRuntimeProfile?.exists ?? false,
@@ -618,6 +652,7 @@ export function buildAgentWorkspaceRuntimeSnapshot(context: CommandContext): Age
618
652
  localStarterTemplateCount: runtimeStarterTemplates.filter((template) => template.source === 'local').length,
619
653
  runtimeStarterTemplates: runtimeStarterTemplates.map(summarizeStarterTemplate),
620
654
  setupChecklist,
655
+ setupWizard,
621
656
  warnings,
622
657
  };
623
658
  }