@pellux/goodvibes-agent 1.1.7 → 1.2.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.
- package/CHANGELOG.md +170 -0
- package/README.md +46 -30
- package/dist/package/{ast-grep-napi.linux-x64-gnu-mkk8xwww.node → ast-grep-napi.linux-x64-gnu-swtppvy9.node} +0 -0
- package/dist/package/{ast-grep-napi.linux-x64-musl-ryqtgdv6.node → ast-grep-napi.linux-x64-musl-ttfcdtap.node} +0 -0
- package/dist/package/main.js +132577 -91483
- package/docs/README.md +14 -7
- package/docs/channels-remote-and-api.md +8 -5
- package/docs/connected-host.md +14 -12
- package/docs/getting-started.md +56 -30
- package/docs/knowledge-artifacts-and-multimodal.md +7 -5
- package/docs/project-planning.md +2 -2
- package/docs/providers-and-routing.md +11 -3
- package/docs/tools-and-commands.md +114 -45
- package/docs/voice-and-live-tts.md +3 -1
- package/package.json +3 -2
- package/release/release-notes.md +130 -5
- package/release/release-readiness.json +120 -90
- package/src/agent/assistant-cockpit.ts +247 -0
- package/src/agent/autonomy-schedule-format.ts +96 -0
- package/src/agent/autonomy-schedule.ts +514 -0
- package/src/agent/channel-delivery-receipts.ts +292 -0
- package/src/agent/competitive-feature-inventory.ts +296 -0
- package/src/agent/document-registry-types.ts +106 -0
- package/src/agent/document-registry.ts +734 -0
- package/src/agent/harness-control.ts +2 -2
- package/src/agent/memory-prompt.ts +2 -2
- package/src/agent/operator-actions.ts +50 -6
- package/src/agent/persona-registry.ts +8 -0
- package/src/agent/project-context-files.ts +273 -0
- package/src/agent/prompt-context-receipts.ts +502 -0
- package/src/agent/reminder-schedule-format.ts +16 -2
- package/src/agent/research-run-registry.ts +582 -0
- package/src/agent/research-source-registry.ts +441 -0
- package/src/agent/routine-registry.ts +19 -3
- package/src/agent/routine-schedule-format.ts +27 -2
- package/src/agent/runtime-profile-starters.ts +7 -0
- package/src/agent/runtime-profile.ts +106 -4
- package/src/agent/schedule-edit-format.ts +129 -0
- package/src/agent/schedule-edit.ts +496 -0
- package/src/agent/schedule-next-routes.ts +42 -0
- package/src/agent/setup-wizard-checkpoint.ts +140 -0
- package/src/agent/setup-wizard.ts +447 -0
- package/src/agent/skill-registry-types.ts +102 -0
- package/src/agent/skill-registry.ts +81 -107
- package/src/agent/vibe-confirmation-routes.ts +62 -0
- package/src/agent/vibe-file.ts +285 -0
- package/src/cli/agent-knowledge-command.ts +45 -2
- package/src/cli/help.ts +3 -0
- package/src/cli/profiles-command.ts +25 -11
- package/src/config/agent-settings-policy.ts +1 -18
- package/src/input/agent-workspace-activation.ts +53 -0
- package/src/input/agent-workspace-artifact-browser-editor.ts +494 -0
- package/src/input/agent-workspace-artifact-metadata.ts +17 -0
- package/src/input/agent-workspace-basic-command-editors.ts +5 -1
- package/src/input/agent-workspace-categories.ts +153 -155
- package/src/input/agent-workspace-channel-triage.ts +481 -0
- package/src/input/agent-workspace-channels.ts +263 -0
- package/src/input/agent-workspace-command-editor.ts +152 -0
- package/src/input/agent-workspace-context-snapshot.ts +349 -0
- package/src/input/agent-workspace-delegation-editor-submission.ts +8 -0
- package/src/input/agent-workspace-document-editor.ts +502 -0
- package/src/input/agent-workspace-document-ops-editor.ts +523 -0
- package/src/input/agent-workspace-host-category.ts +1 -1
- package/src/input/agent-workspace-local-library-snapshot.ts +167 -0
- package/src/input/agent-workspace-model-compare-editor.ts +376 -0
- package/src/input/agent-workspace-model-compare-prompt-submission.ts +552 -0
- package/src/input/agent-workspace-model-compare-types.ts +82 -0
- package/src/input/agent-workspace-model-compare-utils.ts +35 -0
- package/src/input/agent-workspace-onboarding-categories.ts +141 -0
- package/src/input/agent-workspace-operations-command-editor-submission.ts +53 -0
- package/src/input/agent-workspace-operations-command-editors.ts +22 -0
- package/src/input/agent-workspace-research-report-editor.ts +212 -0
- package/src/input/agent-workspace-research-run-editor.ts +144 -0
- package/src/input/agent-workspace-research-source-editor.ts +167 -0
- package/src/input/agent-workspace-review-packet-snapshot.ts +593 -0
- package/src/input/agent-workspace-review-packet-utils.ts +265 -0
- package/src/input/agent-workspace-settings.ts +262 -30
- package/src/input/agent-workspace-setup-checkpoint-action.ts +127 -0
- package/src/input/agent-workspace-setup-snapshot.ts +198 -0
- package/src/input/agent-workspace-setup.ts +34 -1
- package/src/input/agent-workspace-snapshot.ts +162 -147
- package/src/input/agent-workspace-types.ts +287 -2
- package/src/input/agent-workspace.ts +18 -0
- package/src/input/command-registry.ts +9 -2
- package/src/input/commands/agent-runtime-profile-runtime.ts +28 -13
- package/src/input/commands/channels-runtime.ts +102 -114
- package/src/input/commands/delegation-runtime.ts +87 -24
- package/src/input/commands/knowledge-browser-flags.ts +12 -0
- package/src/input/commands/knowledge.ts +28 -14
- package/src/input/commands/operator-actions-runtime.ts +6 -3
- package/src/input/commands/schedule-runtime.ts +71 -14
- package/src/input/commands/session-content.ts +2 -2
- package/src/input/commands/shell-core.ts +2 -0
- package/src/input/commands/vibe-runtime.ts +140 -0
- package/src/input/commands.ts +2 -0
- package/src/input/connected-host-routes.ts +123 -0
- package/src/input/settings-modal-types.ts +14 -0
- package/src/main.ts +15 -15
- package/src/panels/qr-panel.ts +2 -2
- package/src/renderer/agent-workspace-context-lines.ts +686 -0
- package/src/renderer/agent-workspace.ts +30 -419
- package/src/renderer/settings-modal-helpers.ts +12 -0
- package/src/renderer/settings-modal.ts +12 -0
- package/src/runtime/bootstrap-command-context.ts +11 -1
- package/src/runtime/bootstrap-command-parts.ts +14 -3
- package/src/runtime/bootstrap-core.ts +39 -1
- package/src/runtime/bootstrap-shell.ts +6 -0
- package/src/runtime/bootstrap.ts +113 -30
- package/src/runtime/connected-host-auth.ts +3 -2
- package/src/runtime/execution-ledger.ts +231 -0
- package/src/runtime/services.ts +88 -10
- package/src/runtime/tool-permission-safety.ts +199 -5
- package/src/shell/session-continuity-hints.ts +39 -0
- package/src/tools/agent-artifacts-tool.ts +606 -0
- package/src/tools/agent-audit-tool.ts +155 -0
- package/src/tools/agent-autonomy-schedule-tool.ts +238 -0
- package/src/tools/agent-autonomy-tool.ts +140 -0
- package/src/tools/agent-channel-send-tool.ts +24 -2
- package/src/tools/agent-channels-tool.ts +140 -0
- package/src/tools/agent-computer-tool.ts +168 -0
- package/src/tools/agent-context-policy.ts +137 -7
- package/src/tools/agent-context-tool.ts +143 -0
- package/src/tools/agent-delegation-tool.ts +128 -0
- package/src/tools/agent-device-tool.ts +240 -0
- package/src/tools/agent-documents-tool.ts +684 -0
- package/src/tools/agent-execution-tool.ts +230 -0
- package/src/tools/agent-harness-agent-orchestration.ts +703 -0
- package/src/tools/agent-harness-autonomy-intake.ts +785 -0
- package/src/tools/agent-harness-autonomy-live-records.ts +588 -0
- package/src/tools/agent-harness-autonomy-queue-types.ts +88 -0
- package/src/tools/agent-harness-autonomy-queue.ts +560 -0
- package/src/tools/agent-harness-background-processes-types.ts +35 -0
- package/src/tools/agent-harness-background-processes.ts +794 -0
- package/src/tools/agent-harness-browser-cockpit-route.ts +219 -0
- package/src/tools/agent-harness-browser-control.ts +338 -0
- package/src/tools/agent-harness-channel-metadata.ts +168 -10
- package/src/tools/agent-harness-cli-command-policy.ts +110 -0
- package/src/tools/agent-harness-command-catalog.ts +4 -2
- package/src/tools/agent-harness-command-runner.ts +42 -0
- package/src/tools/agent-harness-connected-host-status.ts +7 -4
- package/src/tools/agent-harness-delegation-posture.ts +234 -19
- package/src/tools/agent-harness-document-ops-reviewer-readiness.ts +234 -0
- package/src/tools/agent-harness-document-ops-types.ts +72 -0
- package/src/tools/agent-harness-document-ops.ts +671 -0
- package/src/tools/agent-harness-execution-history.ts +489 -0
- package/src/tools/agent-harness-execution-posture.ts +382 -0
- package/src/tools/agent-harness-file-recovery.ts +135 -0
- package/src/tools/agent-harness-keybinding-metadata.ts +16 -12
- package/src/tools/agent-harness-learning-curator-common.ts +102 -0
- package/src/tools/agent-harness-learning-curator-consolidation.ts +295 -0
- package/src/tools/agent-harness-learning-curator-proposals.ts +606 -0
- package/src/tools/agent-harness-learning-curator-types.ts +151 -0
- package/src/tools/agent-harness-learning-curator.ts +417 -0
- package/src/tools/agent-harness-local-model-benchmarks.ts +199 -0
- package/src/tools/agent-harness-local-model-cookbook.ts +238 -0
- package/src/tools/agent-harness-local-model-endpoints.ts +673 -0
- package/src/tools/agent-harness-media-posture.ts +208 -2
- package/src/tools/agent-harness-memory-posture.ts +556 -0
- package/src/tools/agent-harness-metadata.ts +100 -168
- package/src/tools/agent-harness-mode-catalog.ts +84 -33
- package/src/tools/agent-harness-model-catalog.ts +162 -0
- package/src/tools/agent-harness-model-provider-health.ts +186 -0
- package/src/tools/agent-harness-model-readiness.ts +406 -0
- package/src/tools/agent-harness-model-routing-types.ts +266 -0
- package/src/tools/agent-harness-model-routing-utils.ts +30 -0
- package/src/tools/agent-harness-model-routing.ts +137 -190
- package/src/tools/agent-harness-operator-methods.ts +115 -133
- package/src/tools/agent-harness-pairing-posture.ts +431 -18
- package/src/tools/agent-harness-personal-ops-discovery.ts +533 -0
- package/src/tools/agent-harness-personal-ops-intake.ts +385 -0
- package/src/tools/agent-harness-personal-ops-lanes.ts +204 -0
- package/src/tools/agent-harness-personal-ops-records.ts +732 -0
- package/src/tools/agent-harness-personal-ops-runner.ts +637 -0
- package/src/tools/agent-harness-personal-ops-types.ts +222 -0
- package/src/tools/agent-harness-personal-ops.ts +606 -0
- package/src/tools/agent-harness-project-context.ts +144 -0
- package/src/tools/agent-harness-prompt-context.ts +589 -0
- package/src/tools/agent-harness-provider-account-metadata.ts +2 -2
- package/src/tools/agent-harness-release-evidence.ts +9 -7
- package/src/tools/agent-harness-release-readiness.ts +9 -7
- package/src/tools/agent-harness-research-briefing.ts +427 -0
- package/src/tools/agent-harness-research-queue.ts +250 -0
- package/src/tools/agent-harness-research-runs.ts +295 -0
- package/src/tools/agent-harness-research-workflow.ts +322 -0
- package/src/tools/agent-harness-security-posture.ts +2 -2
- package/src/tools/agent-harness-service-posture.ts +9 -9
- package/src/tools/agent-harness-session-metadata.ts +3 -3
- package/src/tools/agent-harness-setup-connected-host.ts +501 -0
- package/src/tools/agent-harness-setup-describe.ts +557 -0
- package/src/tools/agent-harness-setup-handoffs.ts +502 -0
- package/src/tools/agent-harness-setup-model-helpers.ts +101 -0
- package/src/tools/agent-harness-setup-plan.ts +253 -0
- package/src/tools/agent-harness-setup-posture-types.ts +218 -0
- package/src/tools/agent-harness-setup-posture-utils.ts +173 -0
- package/src/tools/agent-harness-setup-posture.ts +449 -221
- package/src/tools/agent-harness-setup-smoke.ts +508 -0
- package/src/tools/agent-harness-sudo-posture.ts +114 -0
- package/src/tools/agent-harness-tool-schema.ts +120 -7
- package/src/tools/agent-harness-tool-types.ts +78 -0
- package/src/tools/agent-harness-tool-utils.ts +43 -0
- package/src/tools/agent-harness-tool.ts +311 -370
- package/src/tools/agent-harness-ui-surface-metadata.ts +76 -69
- package/src/tools/agent-harness-ui-surface-types.ts +46 -0
- package/src/tools/agent-harness-vibe-health.ts +105 -0
- package/src/tools/agent-harness-workspace-action-runner.ts +149 -0
- package/src/tools/agent-harness-workspace-actions.ts +114 -8
- package/src/tools/agent-harness-workspace-editor-execution.ts +214 -0
- package/src/tools/agent-harness-workspace-editor-runner.ts +755 -0
- package/src/tools/agent-host-tool.ts +159 -0
- package/src/tools/agent-knowledge-ingest-tool.ts +34 -1
- package/src/tools/agent-learning-consolidation-core.ts +327 -0
- package/src/tools/agent-learning-consolidation-tool.ts +758 -0
- package/src/tools/agent-memory-tool.ts +214 -0
- package/src/tools/agent-model-compare-export.ts +315 -0
- package/src/tools/agent-model-compare-handoff.ts +592 -0
- package/src/tools/agent-model-compare-judgment.ts +633 -0
- package/src/tools/agent-model-compare-run.ts +722 -0
- package/src/tools/agent-model-compare-tool.ts +698 -0
- package/src/tools/agent-model-compare-types.ts +191 -0
- package/src/tools/agent-model-compare-utils.ts +93 -0
- package/src/tools/agent-models-tool.ts +208 -0
- package/src/tools/agent-operator-action-tool.ts +1 -1
- package/src/tools/agent-operator-method-tool.ts +643 -0
- package/src/tools/agent-personal-ops-tool.ts +197 -0
- package/src/tools/agent-policy-explanation.ts +415 -0
- package/src/tools/agent-research-report-tool.ts +608 -0
- package/src/tools/agent-research-runs-tool.ts +434 -0
- package/src/tools/agent-research-sources-tool.ts +443 -0
- package/src/tools/agent-research-tool.ts +687 -0
- package/src/tools/agent-review-packet-presets-core.ts +757 -0
- package/src/tools/agent-review-packet-presets-tool.ts +466 -0
- package/src/tools/agent-review-packet-share-tool.ts +305 -0
- package/src/tools/agent-route-planner-candidates-setup.ts +411 -0
- package/src/tools/agent-route-planner-candidates-surfaces.ts +432 -0
- package/src/tools/agent-route-planner-candidates-work.ts +251 -0
- package/src/tools/agent-route-planner-helpers.ts +667 -0
- package/src/tools/agent-route-planner.ts +185 -0
- package/src/tools/agent-route-tool.ts +105 -0
- package/src/tools/agent-schedule-edit-tool.ts +210 -0
- package/src/tools/agent-schedule-tool.ts +282 -0
- package/src/tools/agent-security-tool.ts +145 -0
- package/src/tools/agent-sessions-tool.ts +122 -0
- package/src/tools/agent-settings-import-tool.ts +104 -0
- package/src/tools/agent-settings-tool.ts +176 -0
- package/src/tools/agent-setup-tool.ts +226 -0
- package/src/tools/agent-support-tool.ts +122 -0
- package/src/tools/agent-terminal-process-tools.ts +167 -0
- package/src/tools/agent-tool-policy-guard-types.ts +77 -0
- package/src/tools/agent-tool-policy-guard.ts +106 -85
- package/src/tools/agent-vibe-tool.ts +297 -0
- package/src/tools/agent-work-plan-tool.ts +265 -6
- package/src/tools/agent-workspace-tool.ts +305 -0
- package/src/tools/artifact-archive.ts +169 -0
- package/src/tools/tool-definition-compaction.ts +36 -0
- package/src/version.ts +1 -1
|
@@ -0,0 +1,502 @@
|
|
|
1
|
+
import { quoteRouteValue, provisionConnectedHostTokenRoute } from './agent-harness-setup-posture-utils.ts';
|
|
2
|
+
import type { SetupHandoffCard, SetupPlanItem, SetupRepairCard } from './agent-harness-setup-posture-types.ts';
|
|
3
|
+
|
|
4
|
+
export function setupHandoff(options: SetupHandoffCard): SetupHandoffCard {
|
|
5
|
+
return options;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export function confirmedWorkspaceActionRoute(actionId: string, explicitUserRequest: string): string {
|
|
9
|
+
return `agent_harness mode:"run_workspace_action" actionId:"${quoteRouteValue(actionId)}" confirm:true explicitUserRequest:"${quoteRouteValue(explicitUserRequest)}"`;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function inspectWorkspaceActionRoute(actionId: string): string {
|
|
13
|
+
return `agent_harness mode:"workspace_action" actionId:"${quoteRouteValue(actionId)}" includeParameters:true`;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function openSurfaceRoute(surfaceId: string, explicitUserRequest: string): string {
|
|
17
|
+
return `agent_harness mode:"open_ui_surface" surfaceId:"${quoteRouteValue(surfaceId)}" confirm:true explicitUserRequest:"${quoteRouteValue(explicitUserRequest)}"`;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export function handoffFromRepairCard(card: SetupRepairCard): SetupHandoffCard | null {
|
|
21
|
+
if (!card.modelRoute) return null;
|
|
22
|
+
return setupHandoff({
|
|
23
|
+
id: card.id,
|
|
24
|
+
label: card.label,
|
|
25
|
+
kind: card.methodId ? 'operator-method' : 'diagnostic',
|
|
26
|
+
effect: card.effect,
|
|
27
|
+
userRoute: card.userRoute,
|
|
28
|
+
modelRoute: card.modelRoute,
|
|
29
|
+
nextStep: card.effect === 'confirmed-effect'
|
|
30
|
+
? 'Confirm only after the diagnostic card proves this mutation is the right repair.'
|
|
31
|
+
: 'Inspect this diagnostic before choosing any host repair.',
|
|
32
|
+
safety: card.safety,
|
|
33
|
+
...(card.effect === 'confirmed-effect' ? { requiresConfirmation: true } : {}),
|
|
34
|
+
...(card.prerequisite ? { prerequisite: card.prerequisite } : {}),
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function connectedHostReadinessHandoffs(item: SetupPlanItem): readonly SetupHandoffCard[] {
|
|
39
|
+
const repairCards = item.repairCards ?? [];
|
|
40
|
+
const recommendedRepairs = repairCards
|
|
41
|
+
.filter((card) => card.state === 'available' && card.recommendation === 'recommended')
|
|
42
|
+
.map(handoffFromRepairCard)
|
|
43
|
+
.filter((card): card is SetupHandoffCard => card !== null)
|
|
44
|
+
.slice(0, 2);
|
|
45
|
+
const bootstrap = item.bootstrapPlan
|
|
46
|
+
? [setupHandoff({
|
|
47
|
+
id: 'connected-host-bootstrap',
|
|
48
|
+
label: item.bootstrapPlan.status === 'recommended' ? 'Show host bootstrap checklist' : 'Show host bootstrap reference',
|
|
49
|
+
kind: 'user-command',
|
|
50
|
+
effect: 'user-run',
|
|
51
|
+
userRoute: item.userRoute,
|
|
52
|
+
modelRoute: 'setup action:"item" setupItemId:"connected-host-readiness"',
|
|
53
|
+
nextStep: 'Show the Bun install, service start, binary verification, and reconnect commands for the user to run on the owning host.',
|
|
54
|
+
safety: item.bootstrapPlan.policy,
|
|
55
|
+
})]
|
|
56
|
+
: [];
|
|
57
|
+
return [
|
|
58
|
+
setupHandoff({
|
|
59
|
+
id: 'connected-host-status',
|
|
60
|
+
label: 'Inspect connected-host status',
|
|
61
|
+
kind: 'diagnostic',
|
|
62
|
+
effect: 'read-only',
|
|
63
|
+
userRoute: item.userRoute,
|
|
64
|
+
modelRoute: 'host action:"status" includeParameters:true',
|
|
65
|
+
nextStep: 'Check reachability, compatibility, token posture, and Agent Knowledge readiness before repair.',
|
|
66
|
+
safety: 'Read-only host diagnostic; redacts token values.',
|
|
67
|
+
}),
|
|
68
|
+
...recommendedRepairs,
|
|
69
|
+
...bootstrap,
|
|
70
|
+
setupHandoff({
|
|
71
|
+
id: 'service-posture',
|
|
72
|
+
label: 'Inspect service posture',
|
|
73
|
+
kind: 'diagnostic',
|
|
74
|
+
effect: 'read-only',
|
|
75
|
+
userRoute: 'Agent Workspace -> Home -> Doctor diagnostics',
|
|
76
|
+
modelRoute: 'host action:"services" includeParameters:true',
|
|
77
|
+
nextStep: 'Review endpoint binding, reachability, and logs when host status is inconclusive.',
|
|
78
|
+
safety: 'Read-only service diagnostic.',
|
|
79
|
+
}),
|
|
80
|
+
];
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function setupHandoffsForItem(item: SetupPlanItem): readonly SetupHandoffCard[] {
|
|
84
|
+
switch (item.id) {
|
|
85
|
+
case 'connected-host-readiness':
|
|
86
|
+
return connectedHostReadinessHandoffs(item);
|
|
87
|
+
case 'connected-host-auth': {
|
|
88
|
+
const authPosture = item.authPosture;
|
|
89
|
+
const tokenUsable = authPosture?.operatorToken.usable === true;
|
|
90
|
+
return [
|
|
91
|
+
tokenUsable
|
|
92
|
+
? setupHandoff({
|
|
93
|
+
id: 'verify-connected-host-auth',
|
|
94
|
+
label: 'Verify connected-host auth',
|
|
95
|
+
kind: 'diagnostic',
|
|
96
|
+
effect: 'read-only',
|
|
97
|
+
userRoute: item.userRoute,
|
|
98
|
+
modelRoute: 'host action:"status" includeParameters:true',
|
|
99
|
+
nextStep: 'Verify protected route readiness and Agent Knowledge before relying on daemon-backed automation.',
|
|
100
|
+
safety: 'Read-only diagnostic; token values are never returned.',
|
|
101
|
+
})
|
|
102
|
+
: setupHandoff({
|
|
103
|
+
id: 'provision-connected-host-token',
|
|
104
|
+
label: 'Provision connected-host token',
|
|
105
|
+
kind: 'confirmed-route',
|
|
106
|
+
effect: 'confirmed-effect',
|
|
107
|
+
userRoute: item.userRoute,
|
|
108
|
+
modelRoute: authPosture?.routes.provisionTokenRoute ?? provisionConnectedHostTokenRoute(),
|
|
109
|
+
nextStep: 'Create or repair the local companion token file, then rerun auth and connected-host status.',
|
|
110
|
+
safety: 'Confirmed local token provisioning; returns only path, fingerprint, peer id, and timestamps, never the raw token.',
|
|
111
|
+
requiresConfirmation: true,
|
|
112
|
+
}),
|
|
113
|
+
setupHandoff({
|
|
114
|
+
id: 'pairing-posture',
|
|
115
|
+
label: 'Inspect pairing posture',
|
|
116
|
+
kind: 'diagnostic',
|
|
117
|
+
effect: 'read-only',
|
|
118
|
+
userRoute: 'Agent Workspace -> Host -> Connected-host auth owner',
|
|
119
|
+
modelRoute: 'agent_harness mode:"pairing_posture" includeParameters:true',
|
|
120
|
+
nextStep: 'Use the visible QR/manual pairing routes when the user needs a non-file token handoff.',
|
|
121
|
+
safety: 'Read-only pairing posture; no token is printed by setup posture.',
|
|
122
|
+
}),
|
|
123
|
+
];
|
|
124
|
+
}
|
|
125
|
+
case 'goodvibes-settings-import':
|
|
126
|
+
return [
|
|
127
|
+
setupHandoff({
|
|
128
|
+
id: 'preview-goodvibes-settings-import',
|
|
129
|
+
label: 'Preview GoodVibes import',
|
|
130
|
+
kind: 'workspace-action',
|
|
131
|
+
effect: 'read-only',
|
|
132
|
+
userRoute: item.userRoute,
|
|
133
|
+
modelRoute: 'import_goodvibes_settings action:"preview"',
|
|
134
|
+
nextStep: 'Show importable setting and subscription counts before any import.',
|
|
135
|
+
safety: 'Read-only preview; raw provider secrets are not returned.',
|
|
136
|
+
}),
|
|
137
|
+
setupHandoff({
|
|
138
|
+
id: 'apply-goodvibes-settings-import',
|
|
139
|
+
label: 'Apply GoodVibes import',
|
|
140
|
+
kind: 'workspace-action',
|
|
141
|
+
effect: 'confirmed-effect',
|
|
142
|
+
userRoute: item.userRoute,
|
|
143
|
+
modelRoute: 'setup action:"import_settings" confirm:true explicitUserRequest:"Import reviewed shared GoodVibes settings into Agent-owned state."',
|
|
144
|
+
nextStep: 'Apply only after the user has reviewed the preview and wants Agent to import the values.',
|
|
145
|
+
safety: 'Confirmed Agent-owned settings import; does not mutate source GoodVibes platform stores.',
|
|
146
|
+
requiresConfirmation: true,
|
|
147
|
+
}),
|
|
148
|
+
];
|
|
149
|
+
case 'provider-access':
|
|
150
|
+
return [
|
|
151
|
+
setupHandoff({
|
|
152
|
+
id: 'open-main-model-picker',
|
|
153
|
+
label: 'Open main model picker',
|
|
154
|
+
kind: 'ui-surface',
|
|
155
|
+
effect: 'visible-navigation',
|
|
156
|
+
userRoute: item.userRoute,
|
|
157
|
+
modelRoute: openSurfaceRoute('model-picker', 'Choose the main provider and model route for normal assistant turns.'),
|
|
158
|
+
nextStep: 'Let the user choose the normal assistant route in the visible provider/model picker.',
|
|
159
|
+
safety: 'Visible UI navigation; provider/model selection remains in the shared picker flow.',
|
|
160
|
+
requiresConfirmation: true,
|
|
161
|
+
}),
|
|
162
|
+
setupHandoff({
|
|
163
|
+
id: 'inspect-model-routing',
|
|
164
|
+
label: 'Inspect model routing',
|
|
165
|
+
kind: 'diagnostic',
|
|
166
|
+
effect: 'read-only',
|
|
167
|
+
userRoute: 'Agent Workspace -> Model Routing',
|
|
168
|
+
modelRoute: 'models action:"status" includeParameters:true',
|
|
169
|
+
nextStep: 'Inspect current route, provider readiness, local recipes, and route quality before choosing.',
|
|
170
|
+
safety: 'Read-only model routing posture.',
|
|
171
|
+
}),
|
|
172
|
+
setupHandoff({
|
|
173
|
+
id: 'inspect-provider-accounts',
|
|
174
|
+
label: 'Inspect provider accounts',
|
|
175
|
+
kind: 'diagnostic',
|
|
176
|
+
effect: 'read-only',
|
|
177
|
+
userRoute: 'Agent Workspace -> Start -> Provider accounts',
|
|
178
|
+
modelRoute: 'models action:"providers" includeParameters:true',
|
|
179
|
+
nextStep: 'Review provider account readiness and credential posture without printing secrets.',
|
|
180
|
+
safety: 'Read-only account posture; secret values are never returned.',
|
|
181
|
+
}),
|
|
182
|
+
];
|
|
183
|
+
case 'install-smoke':
|
|
184
|
+
return [
|
|
185
|
+
setupHandoff({
|
|
186
|
+
id: 'run-setup-smoke',
|
|
187
|
+
label: item.status === 'blocked' ? 'List smoke blockers' : 'Run setup smoke',
|
|
188
|
+
kind: 'confirmed-route',
|
|
189
|
+
effect: 'confirmed-effect',
|
|
190
|
+
userRoute: item.userRoute,
|
|
191
|
+
modelRoute: 'setup action:"smoke" setupItemId:"install-smoke" confirm:true explicitUserRequest:"Run the install smoke checks."',
|
|
192
|
+
nextStep: item.status === 'blocked'
|
|
193
|
+
? 'Return the exact blocked checks and user-run checks without running shell or host commands implicitly.'
|
|
194
|
+
: 'Capture the setup smoke result and then save redacted user-run evidence.',
|
|
195
|
+
safety: 'Confirmed token-safe setup smoke; no package, host, or shell commands run implicitly.',
|
|
196
|
+
requiresConfirmation: true,
|
|
197
|
+
}),
|
|
198
|
+
setupHandoff({
|
|
199
|
+
id: 'inspect-smoke-plan',
|
|
200
|
+
label: 'Inspect smoke plan',
|
|
201
|
+
kind: 'diagnostic',
|
|
202
|
+
effect: 'read-only',
|
|
203
|
+
userRoute: item.userRoute,
|
|
204
|
+
modelRoute: 'setup action:"item" setupItemId:"install-smoke"',
|
|
205
|
+
nextStep: 'Review check status, success criteria, and policy before asking the user to run evidence commands.',
|
|
206
|
+
safety: 'Read-only smoke plan.',
|
|
207
|
+
}),
|
|
208
|
+
];
|
|
209
|
+
case 'local-model-readiness':
|
|
210
|
+
return [
|
|
211
|
+
setupHandoff({
|
|
212
|
+
id: 'inspect-local-model-cookbook',
|
|
213
|
+
label: 'Inspect local model cookbook',
|
|
214
|
+
kind: 'diagnostic',
|
|
215
|
+
effect: 'read-only',
|
|
216
|
+
userRoute: item.userRoute,
|
|
217
|
+
modelRoute: 'models action:"local" includeParameters:true',
|
|
218
|
+
nextStep: 'Review detected local routes, top recipe, setup gaps, and benchmark route before changing defaults.',
|
|
219
|
+
safety: 'Read-only model cookbook; local server install/start remains user-run.',
|
|
220
|
+
}),
|
|
221
|
+
setupHandoff({
|
|
222
|
+
id: 'open-local-model-picker',
|
|
223
|
+
label: 'Open model picker',
|
|
224
|
+
kind: 'ui-surface',
|
|
225
|
+
effect: 'visible-navigation',
|
|
226
|
+
userRoute: 'Agent Workspace -> Model Routing',
|
|
227
|
+
modelRoute: openSurfaceRoute('model-picker', 'Review or choose the main local model route.'),
|
|
228
|
+
nextStep: 'Use the visible picker only after local readiness and benchmark evidence are reviewed.',
|
|
229
|
+
safety: 'Visible UI navigation; route change stays explicit.',
|
|
230
|
+
requiresConfirmation: true,
|
|
231
|
+
}),
|
|
232
|
+
];
|
|
233
|
+
case 'agent-knowledge':
|
|
234
|
+
return [
|
|
235
|
+
setupHandoff({
|
|
236
|
+
id: 'agent-knowledge-status',
|
|
237
|
+
label: 'Inspect Agent Knowledge status',
|
|
238
|
+
kind: 'diagnostic',
|
|
239
|
+
effect: 'read-only',
|
|
240
|
+
userRoute: item.userRoute,
|
|
241
|
+
modelRoute: 'agent_knowledge action:"status"',
|
|
242
|
+
nextStep: 'Verify isolated Agent Knowledge readiness, counts, and connector posture before ingesting sources.',
|
|
243
|
+
safety: 'Read-only Agent Knowledge status; never falls back to default knowledge.',
|
|
244
|
+
}),
|
|
245
|
+
setupHandoff({
|
|
246
|
+
id: 'open-knowledge-panel',
|
|
247
|
+
label: 'Open Knowledge panel',
|
|
248
|
+
kind: 'ui-surface',
|
|
249
|
+
effect: 'visible-navigation',
|
|
250
|
+
userRoute: item.userRoute,
|
|
251
|
+
modelRoute: openSurfaceRoute('knowledge-panel', 'Review isolated Agent Knowledge readiness.'),
|
|
252
|
+
nextStep: 'Open the visible Knowledge workspace for source, search, connector, and ingest controls.',
|
|
253
|
+
safety: 'Visible UI navigation; ingest and review actions remain separate confirmed routes.',
|
|
254
|
+
requiresConfirmation: true,
|
|
255
|
+
}),
|
|
256
|
+
];
|
|
257
|
+
case 'local-behavior':
|
|
258
|
+
return [
|
|
259
|
+
setupHandoff({
|
|
260
|
+
id: 'review-local-behavior',
|
|
261
|
+
label: 'Review local behavior',
|
|
262
|
+
kind: 'diagnostic',
|
|
263
|
+
effect: 'read-only',
|
|
264
|
+
userRoute: item.userRoute,
|
|
265
|
+
modelRoute: 'memory action:"curator" includeParameters:true',
|
|
266
|
+
nextStep: 'Review memory, notes, personas, skills, routines, and suggested local behavior updates.',
|
|
267
|
+
safety: 'Read-only curator posture; creates and imports stay confirmed workspace actions.',
|
|
268
|
+
}),
|
|
269
|
+
setupHandoff({
|
|
270
|
+
id: 'capture-learned-behavior',
|
|
271
|
+
label: 'Capture learned behavior',
|
|
272
|
+
kind: 'workspace-action',
|
|
273
|
+
effect: 'confirmed-effect',
|
|
274
|
+
userRoute: 'Agent Workspace -> Local Context',
|
|
275
|
+
modelRoute: confirmedWorkspaceActionRoute('learned-behavior', 'Save a reviewed lesson, workflow, or operating style as Agent-local behavior.'),
|
|
276
|
+
nextStep: 'Create a persona, skill, or routine only from a reviewed user-visible lesson.',
|
|
277
|
+
safety: 'Confirmed Agent-local behavior write; no default knowledge write.',
|
|
278
|
+
requiresConfirmation: true,
|
|
279
|
+
}),
|
|
280
|
+
];
|
|
281
|
+
case 'vibe-personality':
|
|
282
|
+
return [
|
|
283
|
+
setupHandoff({
|
|
284
|
+
id: 'inspect-vibe-status',
|
|
285
|
+
label: 'Inspect VIBE.md status',
|
|
286
|
+
kind: 'diagnostic',
|
|
287
|
+
effect: 'read-only',
|
|
288
|
+
userRoute: item.userRoute,
|
|
289
|
+
modelRoute: 'vibe action:"status"',
|
|
290
|
+
nextStep: 'Review applied, blocked, and truncated VIBE.md personality files before relying on custom assistant tone.',
|
|
291
|
+
safety: 'Read-only personality inspection; blocked VIBE.md content is not loaded into the prompt.',
|
|
292
|
+
}),
|
|
293
|
+
setupHandoff({
|
|
294
|
+
id: 'show-vibe-status',
|
|
295
|
+
label: 'Show VIBE.md status',
|
|
296
|
+
kind: 'diagnostic',
|
|
297
|
+
effect: 'read-only',
|
|
298
|
+
userRoute: item.userRoute,
|
|
299
|
+
modelRoute: 'vibe action:"show" scope:"project"',
|
|
300
|
+
nextStep: 'Inspect the project VIBE.md body only after the file passes the VIBE.md secret-looking content scan.',
|
|
301
|
+
safety: 'Read-only personality file inspection; blocked file bodies are never returned.',
|
|
302
|
+
}),
|
|
303
|
+
setupHandoff({
|
|
304
|
+
id: 'init-project-vibe',
|
|
305
|
+
label: 'Create project VIBE.md',
|
|
306
|
+
kind: 'confirmed-route',
|
|
307
|
+
effect: 'confirmed-effect',
|
|
308
|
+
userRoute: item.userRoute,
|
|
309
|
+
modelRoute: 'vibe action:"init" scope:"project" confirm:true explicitUserRequest:"Create a project VIBE.md personality file."',
|
|
310
|
+
nextStep: 'Create a starter project personality file only when the user wants a local assistant vibe.',
|
|
311
|
+
safety: 'Confirmed local file write in the current project scope.',
|
|
312
|
+
requiresConfirmation: true,
|
|
313
|
+
}),
|
|
314
|
+
setupHandoff({
|
|
315
|
+
id: 'import-vibe-persona',
|
|
316
|
+
label: 'Import VIBE.md persona',
|
|
317
|
+
kind: 'confirmed-route',
|
|
318
|
+
effect: 'confirmed-effect',
|
|
319
|
+
userRoute: item.userRoute,
|
|
320
|
+
modelRoute: 'vibe action:"import_persona" scope:"project" review:true use:true confirm:true explicitUserRequest:"Import the project VIBE.md into a reviewed active persona."',
|
|
321
|
+
nextStep: 'Use this when the user wants VIBE.md to become reviewed Agent-local persona context.',
|
|
322
|
+
safety: 'Confirmed Agent-local persona write; does not ingest VIBE.md into default knowledge.',
|
|
323
|
+
requiresConfirmation: true,
|
|
324
|
+
}),
|
|
325
|
+
];
|
|
326
|
+
case 'communication-channels':
|
|
327
|
+
return [
|
|
328
|
+
setupHandoff({
|
|
329
|
+
id: 'inspect-channels',
|
|
330
|
+
label: 'Inspect channel readiness',
|
|
331
|
+
kind: 'diagnostic',
|
|
332
|
+
effect: 'read-only',
|
|
333
|
+
userRoute: item.userRoute,
|
|
334
|
+
modelRoute: 'channels action:"status" includeParameters:true',
|
|
335
|
+
nextStep: 'Review paired surfaces, delivery targets, and channel safety before sending or enabling reminders.',
|
|
336
|
+
safety: 'Read-only channel posture; no external message is sent.',
|
|
337
|
+
}),
|
|
338
|
+
setupHandoff({
|
|
339
|
+
id: 'open-channels-workspace',
|
|
340
|
+
label: 'Open Channels workspace',
|
|
341
|
+
kind: 'ui-surface',
|
|
342
|
+
effect: 'visible-navigation',
|
|
343
|
+
userRoute: item.userRoute,
|
|
344
|
+
modelRoute: 'agent_harness mode:"open_ui_surface" surfaceId:"agent-workspace" target:"channels" confirm:true explicitUserRequest:"Open the Channels workspace for communication setup."',
|
|
345
|
+
nextStep: 'Use visible channel setup only for surfaces where the assistant should be reachable.',
|
|
346
|
+
safety: 'Visible UI navigation; channel pairing and delivery remain explicit.',
|
|
347
|
+
requiresConfirmation: true,
|
|
348
|
+
}),
|
|
349
|
+
];
|
|
350
|
+
case 'sudo-execution-posture':
|
|
351
|
+
return [
|
|
352
|
+
setupHandoff({
|
|
353
|
+
id: 'inspect-sudo-posture',
|
|
354
|
+
label: 'Inspect sudo posture',
|
|
355
|
+
kind: 'diagnostic',
|
|
356
|
+
effect: 'read-only',
|
|
357
|
+
userRoute: item.userRoute,
|
|
358
|
+
modelRoute: 'setup action:"item" setupItemId:"sudo-execution-posture"',
|
|
359
|
+
nextStep: 'Review foreground-only escalation posture, SUDO_PASSWORD presence, blocked background routes, and missing SDK/daemon contracts.',
|
|
360
|
+
safety: 'Read-only setup posture; raw sudo password values are never read, stored, or returned.',
|
|
361
|
+
}),
|
|
362
|
+
setupHandoff({
|
|
363
|
+
id: 'inspect-process-parity',
|
|
364
|
+
label: 'Inspect process parity',
|
|
365
|
+
kind: 'diagnostic',
|
|
366
|
+
effect: 'read-only',
|
|
367
|
+
userRoute: 'Agent Workspace -> Computer Use -> Background processes',
|
|
368
|
+
modelRoute: 'process action:"capabilities"',
|
|
369
|
+
nextStep: 'Check process list, poll, wait, log, kill, write, PTY, and sudo parity before choosing a process route.',
|
|
370
|
+
safety: 'Read-only parity report; does not start, stop, write to, or escalate a process.',
|
|
371
|
+
}),
|
|
372
|
+
setupHandoff({
|
|
373
|
+
id: 'inspect-foreground-shell-route',
|
|
374
|
+
label: 'Inspect foreground shell route',
|
|
375
|
+
kind: 'diagnostic',
|
|
376
|
+
effect: 'read-only',
|
|
377
|
+
userRoute: 'Agent Workspace -> Computer Use -> Local shell',
|
|
378
|
+
modelRoute: 'execution action:"route" id:"local-shell-command"',
|
|
379
|
+
nextStep: 'Use only visible foreground shell execution for explicit user-requested sudo until safe credential mediation exists.',
|
|
380
|
+
safety: 'Read-only route inspection; actual shell execution remains governed by the foreground exec policy.',
|
|
381
|
+
}),
|
|
382
|
+
setupHandoff({
|
|
383
|
+
id: 'review-sudo-env-guidance',
|
|
384
|
+
label: 'Review SUDO_PASSWORD guidance',
|
|
385
|
+
kind: 'user-command',
|
|
386
|
+
effect: 'user-run',
|
|
387
|
+
userRoute: item.sudoPosture?.credentialSignal.envFilePath ?? '~/.goodvibes/.env',
|
|
388
|
+
modelRoute: 'setup action:"item" setupItemId:"sudo-execution-posture"',
|
|
389
|
+
nextStep: 'If a future safe credential contract requires SUDO_PASSWORD, the user configures it outside Agent and Agent only reports presence.',
|
|
390
|
+
safety: 'No Agent write route exists for sudo credentials; password values stay outside model-visible output.',
|
|
391
|
+
}),
|
|
392
|
+
];
|
|
393
|
+
case 'automation-review':
|
|
394
|
+
return [
|
|
395
|
+
setupHandoff({
|
|
396
|
+
id: 'inspect-autonomy-queue',
|
|
397
|
+
label: 'Inspect autonomy queue',
|
|
398
|
+
kind: 'diagnostic',
|
|
399
|
+
effect: 'read-only',
|
|
400
|
+
userRoute: item.userRoute,
|
|
401
|
+
modelRoute: 'autonomy action:"queue" includeParameters:true',
|
|
402
|
+
nextStep: 'Review visible schedules, approvals, work plans, automation runs, receipts, and cancel routes.',
|
|
403
|
+
safety: 'Read-only autonomy queue posture.',
|
|
404
|
+
}),
|
|
405
|
+
setupHandoff({
|
|
406
|
+
id: 'open-automation-workspace',
|
|
407
|
+
label: 'Open Automation workspace',
|
|
408
|
+
kind: 'ui-surface',
|
|
409
|
+
effect: 'visible-navigation',
|
|
410
|
+
userRoute: 'Agent Workspace -> Automation',
|
|
411
|
+
modelRoute: 'agent_harness mode:"open_ui_surface" surfaceId:"agent-workspace" target:"automation" confirm:true explicitUserRequest:"Open Automation workspace for schedule and background work setup."',
|
|
412
|
+
nextStep: 'Create reminders or promote routines only through confirmed visible forms.',
|
|
413
|
+
safety: 'Visible UI navigation; schedule and run mutations remain confirmed.',
|
|
414
|
+
requiresConfirmation: true,
|
|
415
|
+
}),
|
|
416
|
+
];
|
|
417
|
+
case 'browser-desktop-control':
|
|
418
|
+
return [
|
|
419
|
+
setupHandoff({
|
|
420
|
+
id: 'inspect-browser-desktop-route',
|
|
421
|
+
label: 'Inspect browser and desktop route',
|
|
422
|
+
kind: 'tool-discovery',
|
|
423
|
+
effect: 'read-only',
|
|
424
|
+
userRoute: item.userRoute,
|
|
425
|
+
modelRoute: item.modelRoute,
|
|
426
|
+
nextStep: 'Review MCP trust, connection, schema freshness, and execution route before live UI automation.',
|
|
427
|
+
safety: 'Read-only tool posture; no browser or desktop action is executed.',
|
|
428
|
+
}),
|
|
429
|
+
setupHandoff({
|
|
430
|
+
id: 'open-tools-mcp-workspace',
|
|
431
|
+
label: 'Open Tools & MCP workspace',
|
|
432
|
+
kind: 'ui-surface',
|
|
433
|
+
effect: 'visible-navigation',
|
|
434
|
+
userRoute: item.userRoute,
|
|
435
|
+
modelRoute: 'agent_harness mode:"open_ui_surface" surfaceId:"agent-workspace" target:"tools" confirm:true explicitUserRequest:"Open Tools and MCP setup for browser or desktop control."',
|
|
436
|
+
nextStep: 'Configure and review only trusted browser or desktop connectors.',
|
|
437
|
+
safety: 'Visible UI navigation; connector writes stay in confirmed setup forms.',
|
|
438
|
+
requiresConfirmation: true,
|
|
439
|
+
}),
|
|
440
|
+
];
|
|
441
|
+
case 'build-delegation':
|
|
442
|
+
return [
|
|
443
|
+
setupHandoff({
|
|
444
|
+
id: 'inspect-delegation-posture',
|
|
445
|
+
label: 'Inspect delegation posture',
|
|
446
|
+
kind: 'diagnostic',
|
|
447
|
+
effect: 'read-only',
|
|
448
|
+
userRoute: item.userRoute,
|
|
449
|
+
modelRoute: 'delegation action:"status" includeParameters:true',
|
|
450
|
+
nextStep: 'Check explicit GoodVibes TUI handoff routes and boundaries before delegating code work.',
|
|
451
|
+
safety: 'Read-only delegation posture; no task is delegated.',
|
|
452
|
+
}),
|
|
453
|
+
setupHandoff({
|
|
454
|
+
id: 'delegate-build-task',
|
|
455
|
+
label: 'Delegate build task',
|
|
456
|
+
kind: 'workspace-action',
|
|
457
|
+
effect: 'confirmed-effect',
|
|
458
|
+
userRoute: 'Agent Workspace -> Build Delegation',
|
|
459
|
+
modelRoute: confirmedWorkspaceActionRoute('delegate-task', 'Delegate one explicit build, fix, review, or isolation task to GoodVibes TUI.'),
|
|
460
|
+
nextStep: 'Use only when isolation, parallelism, remote execution, or explicit user request makes delegation helpful.',
|
|
461
|
+
safety: 'Confirmed delegation; preserves the original ask and keeps review explicit.',
|
|
462
|
+
requiresConfirmation: true,
|
|
463
|
+
}),
|
|
464
|
+
];
|
|
465
|
+
case 'finish-onboarding':
|
|
466
|
+
return [
|
|
467
|
+
setupHandoff({
|
|
468
|
+
id: 'finish-onboarding',
|
|
469
|
+
label: 'Apply and close onboarding',
|
|
470
|
+
kind: 'workspace-action',
|
|
471
|
+
effect: 'confirmed-effect',
|
|
472
|
+
userRoute: 'Agent Workspace -> Finish',
|
|
473
|
+
modelRoute: 'setup action:"finish" confirm:true explicitUserRequest:"Finish Agent onboarding after setup review."',
|
|
474
|
+
nextStep: 'Persist the setup completion marker only after the assistant is usable.',
|
|
475
|
+
safety: 'Confirmed local onboarding marker write; no provider, host, channel, or automation mutation.',
|
|
476
|
+
requiresConfirmation: true,
|
|
477
|
+
}),
|
|
478
|
+
setupHandoff({
|
|
479
|
+
id: 'open-onboarding',
|
|
480
|
+
label: 'Open onboarding',
|
|
481
|
+
kind: 'ui-surface',
|
|
482
|
+
effect: 'visible-navigation',
|
|
483
|
+
userRoute: item.userRoute,
|
|
484
|
+
modelRoute: openSurfaceRoute('onboarding', 'Review Agent onboarding before finishing setup.'),
|
|
485
|
+
nextStep: 'Review selected setup choices in the visible onboarding surface.',
|
|
486
|
+
safety: 'Visible UI navigation only.',
|
|
487
|
+
requiresConfirmation: true,
|
|
488
|
+
}),
|
|
489
|
+
];
|
|
490
|
+
default:
|
|
491
|
+
return [setupHandoff({
|
|
492
|
+
id: `${item.id}-inspect`,
|
|
493
|
+
label: `Inspect ${item.label}`,
|
|
494
|
+
kind: 'diagnostic',
|
|
495
|
+
effect: 'read-only',
|
|
496
|
+
userRoute: item.userRoute,
|
|
497
|
+
modelRoute: item.modelRoute,
|
|
498
|
+
nextStep: item.nextAction,
|
|
499
|
+
safety: 'Read-only setup inspection unless the returned route explicitly requires confirmation.',
|
|
500
|
+
})];
|
|
501
|
+
}
|
|
502
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import type { BrowserControlPosture } from './agent-harness-browser-control.ts';
|
|
2
|
+
import { previewAgentWorkspaceTuiSettingsImport } from '../input/agent-workspace-settings.ts';
|
|
3
|
+
import { readRecord, readString, readStringArray } from './agent-harness-setup-posture-utils.ts';
|
|
4
|
+
import type { SetupPlanStatus } from './agent-harness-setup-posture-types.ts';
|
|
5
|
+
|
|
6
|
+
export function browserControlSignals(posture: BrowserControlPosture): readonly string[] {
|
|
7
|
+
const signals: string[] = [];
|
|
8
|
+
if (posture.toolMatches.length > 0) signals.push(`tools: ${posture.toolMatches.join(', ')}`);
|
|
9
|
+
if (posture.mcpServers.length > 0) {
|
|
10
|
+
signals.push(...posture.mcpServers.slice(0, 5).map((server) => (
|
|
11
|
+
`mcp:${server.name} ${server.connected ? 'connected' : 'disconnected'} ${server.readiness} role=${server.role} trust=${server.trustMode} schema=${server.schemaFreshness}`
|
|
12
|
+
)));
|
|
13
|
+
}
|
|
14
|
+
if (signals.length === 0) signals.push('No browser, desktop, computer-use, screenshot, or screen-recording tool is configured.');
|
|
15
|
+
return signals;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export function settingsImportChangeCount(preview: ReturnType<typeof previewAgentWorkspaceTuiSettingsImport>): number {
|
|
19
|
+
if (!preview) return 0;
|
|
20
|
+
return preview.summary.settingsToImport
|
|
21
|
+
+ preview.summary.activeSubscriptionsToImport
|
|
22
|
+
+ preview.summary.pendingSubscriptionsToImport;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export function settingsImportSignals(preview: ReturnType<typeof previewAgentWorkspaceTuiSettingsImport>): readonly string[] {
|
|
26
|
+
if (!preview) return ['Import preview unavailable in this runtime.'];
|
|
27
|
+
return [
|
|
28
|
+
`settings to import: ${preview.summary.settingsToImport}`,
|
|
29
|
+
`active subscriptions to import: ${preview.summary.activeSubscriptionsToImport}`,
|
|
30
|
+
`pending subscriptions to import: ${preview.summary.pendingSubscriptionsToImport}`,
|
|
31
|
+
`unchanged items: ${preview.summary.settingsUnchanged + preview.summary.subscriptionsUnchanged}`,
|
|
32
|
+
`parse issues: ${preview.summary.parseErrors}`,
|
|
33
|
+
];
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export function topLocalModelRecipe(cookbook: Record<string, unknown>): Record<string, unknown> {
|
|
37
|
+
const recipes = Array.isArray(cookbook.recipes) ? cookbook.recipes.map(readRecord) : [];
|
|
38
|
+
return recipes[0] ?? {};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function localModelSetupReadiness(cookbook: Record<string, unknown>): Record<string, unknown> {
|
|
42
|
+
const detected = readRecord(cookbook.detected);
|
|
43
|
+
const topRecipe = topLocalModelRecipe(cookbook);
|
|
44
|
+
const setupPlan = readRecord(topRecipe.setupPlan);
|
|
45
|
+
const readiness = readRecord(topRecipe.readiness);
|
|
46
|
+
return {
|
|
47
|
+
cookbookStatus: readString(cookbook.status),
|
|
48
|
+
recommendation: readString(cookbook.recommendation),
|
|
49
|
+
detected: {
|
|
50
|
+
stacks: readStringArray(detected.stacks),
|
|
51
|
+
providerIds: readStringArray(detected.providerIds),
|
|
52
|
+
modelRoutes: readStringArray(detected.modelRoutes),
|
|
53
|
+
},
|
|
54
|
+
topRecipe: {
|
|
55
|
+
id: readString(topRecipe.id),
|
|
56
|
+
label: readString(topRecipe.label),
|
|
57
|
+
fitScore: topRecipe.fitScore ?? null,
|
|
58
|
+
fitLevel: topRecipe.fitLevel ?? null,
|
|
59
|
+
readinessScore: topRecipe.readinessScore ?? null,
|
|
60
|
+
readinessLevel: topRecipe.readinessLevel ?? null,
|
|
61
|
+
detected: topRecipe.detected === true,
|
|
62
|
+
setupStatus: readString(setupPlan.status),
|
|
63
|
+
missingSignals: Array.isArray(readiness.missingSignals) ? readiness.missingSignals.slice(0, 3) : [],
|
|
64
|
+
},
|
|
65
|
+
readinessRubric: cookbook.readinessRubric ?? null,
|
|
66
|
+
benchmarkHistory: cookbook.benchmarkHistory ?? null,
|
|
67
|
+
nextActions: readStringArray(cookbook.nextActions).slice(0, 4),
|
|
68
|
+
inspectRoute: 'models action:"local" includeParameters:true',
|
|
69
|
+
inspectRecipeRoute: 'models action:"route" modelRouteId:"local-model-cookbook"',
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function localModelSetupSignals(cookbook: Record<string, unknown>): readonly string[] {
|
|
74
|
+
const readiness = localModelSetupReadiness(cookbook);
|
|
75
|
+
const detected = readRecord(readiness.detected);
|
|
76
|
+
const topRecipe = readRecord(readiness.topRecipe);
|
|
77
|
+
const stacks = readStringArray(detected.stacks);
|
|
78
|
+
const routes = readStringArray(detected.modelRoutes);
|
|
79
|
+
const providerIds = readStringArray(detected.providerIds);
|
|
80
|
+
const signals = [
|
|
81
|
+
`cookbook status: ${readString(readiness.cookbookStatus) || 'unknown'}`,
|
|
82
|
+
stacks.length > 0 ? `detected stacks: ${stacks.join(', ')}` : 'detected stacks: none',
|
|
83
|
+
routes.length > 0 ? `detected model routes: ${routes.join(', ')}` : providerIds.length > 0 ? `detected providers: ${providerIds.join(', ')}` : 'detected local routes: none',
|
|
84
|
+
`top recipe: ${readString(topRecipe.label) || 'unknown'} readiness=${topRecipe.readinessScore ?? 'unknown'} fit=${topRecipe.fitScore ?? 'unknown'}`,
|
|
85
|
+
];
|
|
86
|
+
return signals;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export function localModelSetupStatus(cookbook: Record<string, unknown>): SetupPlanStatus {
|
|
90
|
+
return readString(cookbook.status) === 'detected-local-route' ? 'ready' : 'recommended';
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export function localModelSetupNextAction(cookbook: Record<string, unknown>): string {
|
|
94
|
+
const readiness = localModelSetupReadiness(cookbook);
|
|
95
|
+
const topRecipe = readRecord(readiness.topRecipe);
|
|
96
|
+
if (readString(cookbook.status) === 'detected-local-route') {
|
|
97
|
+
return 'Inspect detected local model readiness, then run the benchmark prompt before making a local route the default.';
|
|
98
|
+
}
|
|
99
|
+
const topLabel = readString(topRecipe.label) || 'the top local recipe';
|
|
100
|
+
return `Review ${topLabel} setupPlan, start the local server outside Agent, refresh models, then run the benchmark prompt before changing the default route.`;
|
|
101
|
+
}
|