@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,494 @@
|
|
|
1
|
+
import type { AgentWorkspaceActionResult, AgentWorkspaceLocalEditor } from './agent-workspace-types.ts';
|
|
2
|
+
|
|
3
|
+
type AgentWorkspaceFieldReader = (fieldId: string) => string;
|
|
4
|
+
|
|
5
|
+
export interface AgentArtifactBrowserWorkspaceToolArgs {
|
|
6
|
+
readonly mode: 'list' | 'show' | 'export' | 'package' | 'archive';
|
|
7
|
+
readonly artifactId?: string;
|
|
8
|
+
readonly artifactIds?: readonly string[];
|
|
9
|
+
readonly destinationPath?: string;
|
|
10
|
+
readonly overwrite?: boolean;
|
|
11
|
+
readonly query?: string;
|
|
12
|
+
readonly kind?: string;
|
|
13
|
+
readonly mimeType?: string;
|
|
14
|
+
readonly purpose?: string;
|
|
15
|
+
readonly source?: string;
|
|
16
|
+
readonly limit?: number;
|
|
17
|
+
readonly includeContent?: boolean;
|
|
18
|
+
readonly previewBytes?: number;
|
|
19
|
+
readonly confirm?: true;
|
|
20
|
+
readonly explicitUserRequest?: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface AgentArtifactKnowledgePromotionWorkspaceToolArgs {
|
|
24
|
+
readonly sourceKind: 'artifact';
|
|
25
|
+
readonly artifactId: string;
|
|
26
|
+
readonly title?: string;
|
|
27
|
+
readonly tags?: readonly string[];
|
|
28
|
+
readonly folderPath?: string;
|
|
29
|
+
readonly connectorId?: string;
|
|
30
|
+
readonly confirm: true;
|
|
31
|
+
readonly explicitUserRequest: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function readPositiveInteger(value: string): number | null {
|
|
35
|
+
if (!value.trim()) return null;
|
|
36
|
+
const parsed = Number(value);
|
|
37
|
+
if (!Number.isFinite(parsed)) return null;
|
|
38
|
+
return Math.max(1, Math.trunc(parsed));
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function isAffirmative(value: string): boolean {
|
|
42
|
+
const normalized = value.trim().toLowerCase();
|
|
43
|
+
return normalized === 'yes' || normalized === 'true';
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function splitList(value: string): readonly string[] {
|
|
47
|
+
return value
|
|
48
|
+
.split(/[,\n]/)
|
|
49
|
+
.map((entry) => entry.trim())
|
|
50
|
+
.filter(Boolean);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function createAgentArtifactBrowserEditor(): AgentWorkspaceLocalEditor {
|
|
54
|
+
return {
|
|
55
|
+
kind: 'artifact-browser',
|
|
56
|
+
mode: 'create',
|
|
57
|
+
title: 'Browse Artifacts',
|
|
58
|
+
selectedFieldIndex: 0,
|
|
59
|
+
message: 'List saved uploads, exports, generated media, source artifacts, and comparison artifacts from the shared Agent artifact store. This is read-only.',
|
|
60
|
+
fields: [
|
|
61
|
+
{ id: 'query', label: 'Search', value: '', required: false, multiline: false, hint: 'Optional search across id, filename, MIME type, source, sha256, and redacted metadata.' },
|
|
62
|
+
{ id: 'kind', label: 'Kind', value: '', required: false, multiline: false, hint: 'Optional exact kind: file, image, audio, video, document, archive, or data.' },
|
|
63
|
+
{ id: 'mimeType', label: 'MIME type', value: '', required: false, multiline: false, hint: 'Optional MIME substring such as markdown, json, image, or pdf.' },
|
|
64
|
+
{ id: 'purpose', label: 'Purpose', value: '', required: false, multiline: false, hint: 'Optional artifact metadata purpose such as agent-model-compare.' },
|
|
65
|
+
{ id: 'source', label: 'Source', value: '', required: false, multiline: false, hint: 'Optional source URI or metadata source filter.' },
|
|
66
|
+
{ id: 'limit', label: 'Limit', value: '25', required: false, multiline: false, hint: 'Maximum rows to return. Defaults to 25.' },
|
|
67
|
+
],
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function createAgentArtifactShowEditor(): AgentWorkspaceLocalEditor {
|
|
72
|
+
return {
|
|
73
|
+
kind: 'artifact-show',
|
|
74
|
+
mode: 'create',
|
|
75
|
+
title: 'Show Artifact',
|
|
76
|
+
selectedFieldIndex: 0,
|
|
77
|
+
message: 'Inspect one saved artifact by id. Content preview is bounded and text-only; binary bytes and base64 stay out of the transcript.',
|
|
78
|
+
fields: [
|
|
79
|
+
{ id: 'artifactId', label: 'Artifact id', value: '', required: true, multiline: false, hint: 'Saved artifact id such as artifact-123.' },
|
|
80
|
+
{ id: 'includeContent', label: 'Preview content', value: 'yes', required: false, multiline: false, hint: 'yes/no. Yes includes a bounded preview for text-like artifacts.' },
|
|
81
|
+
{ id: 'previewBytes', label: 'Preview bytes', value: '2048', required: false, multiline: false, hint: 'Maximum text bytes to preview. Defaults to 2048.' },
|
|
82
|
+
],
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function createAgentArtifactPromoteKnowledgeEditor(): AgentWorkspaceLocalEditor {
|
|
87
|
+
return {
|
|
88
|
+
kind: 'artifact-promote-knowledge',
|
|
89
|
+
mode: 'create',
|
|
90
|
+
title: 'Promote Artifact to Knowledge',
|
|
91
|
+
selectedFieldIndex: 0,
|
|
92
|
+
message: 'Promote one reviewed saved artifact into isolated Agent Knowledge by id. This writes only through the Agent Knowledge artifact ingest route.',
|
|
93
|
+
fields: [
|
|
94
|
+
{ id: 'artifactId', label: 'Artifact id', value: '', required: true, multiline: false, hint: 'Saved artifact id to ingest into Agent Knowledge.' },
|
|
95
|
+
{ id: 'title', label: 'Title', value: '', required: false, multiline: false, hint: 'Optional source title for Agent Knowledge.' },
|
|
96
|
+
{ id: 'tags', label: 'Tags', value: 'artifact', required: false, multiline: false, hint: 'Comma-separated optional tags.' },
|
|
97
|
+
{ id: 'folderPath', label: 'Folder', value: '', required: false, multiline: false, hint: 'Optional Agent Knowledge folder path.' },
|
|
98
|
+
{ id: 'connectorId', label: 'Connector id', value: 'goodvibes-agent-artifact-browser', required: false, multiline: false, hint: 'Optional connector id for provenance. Default is goodvibes-agent-artifact-browser.' },
|
|
99
|
+
{ id: 'confirm', label: 'Confirm', value: '', required: true, multiline: false, hint: 'Type yes to ingest this artifact into isolated Agent Knowledge.' },
|
|
100
|
+
],
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export function createAgentArtifactExportEditor(): AgentWorkspaceLocalEditor {
|
|
105
|
+
return {
|
|
106
|
+
kind: 'artifact-export-file',
|
|
107
|
+
mode: 'create',
|
|
108
|
+
title: 'Export Artifact',
|
|
109
|
+
selectedFieldIndex: 0,
|
|
110
|
+
message: 'Copy one saved artifact to a workspace file. The export preserves exact bytes, refuses overwrite unless enabled, and never prints artifact content.',
|
|
111
|
+
fields: [
|
|
112
|
+
{ id: 'artifactId', label: 'Artifact id', value: '', required: true, multiline: false, hint: 'Saved artifact id such as artifact-123.' },
|
|
113
|
+
{ id: 'destinationPath', label: 'Destination path', value: '', required: true, multiline: false, hint: 'Workspace-relative path such as exports/report.md.' },
|
|
114
|
+
{ id: 'overwrite', label: 'Overwrite existing', value: 'no', required: false, multiline: false, hint: 'yes/no. Keep no unless replacing a reviewed file.' },
|
|
115
|
+
{ id: 'confirm', label: 'Confirm', value: '', required: true, multiline: false, hint: 'Type yes to copy this artifact to the destination path.' },
|
|
116
|
+
],
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export function createAgentArtifactPackageEditor(): AgentWorkspaceLocalEditor {
|
|
121
|
+
return {
|
|
122
|
+
kind: 'artifact-export-package',
|
|
123
|
+
mode: 'create',
|
|
124
|
+
title: 'Export Artifact Package',
|
|
125
|
+
selectedFieldIndex: 0,
|
|
126
|
+
message: 'Copy multiple saved artifacts into a workspace package directory or ZIP archive with exact bytes, a redacted manifest, and a README. Existing outputs require overwrite confirmation.',
|
|
127
|
+
fields: [
|
|
128
|
+
{ id: 'artifactIds', label: 'Artifact ids', value: '', required: true, multiline: true, hint: 'Comma-separated or newline-separated saved artifact ids.' },
|
|
129
|
+
{ id: 'packageFormat', label: 'Format', value: 'directory', required: false, multiline: false, hint: 'directory or zip. Directory keeps files reviewable; zip creates one archive file.' },
|
|
130
|
+
{ id: 'destinationPath', label: 'Destination path', value: '', required: true, multiline: false, hint: 'Workspace-relative directory such as exports/research-package, or ZIP path such as exports/research-package.zip.' },
|
|
131
|
+
{ id: 'overwrite', label: 'Overwrite existing', value: 'no', required: false, multiline: false, hint: 'yes/no. Keep no unless replacing a reviewed package output.' },
|
|
132
|
+
{ id: 'confirm', label: 'Confirm', value: '', required: true, multiline: false, hint: 'Type yes to copy these artifacts to the package output.' },
|
|
133
|
+
],
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export function buildAgentArtifactBrowserToolArgs(
|
|
138
|
+
readField: AgentWorkspaceFieldReader,
|
|
139
|
+
): AgentArtifactBrowserWorkspaceToolArgs {
|
|
140
|
+
const limit = readPositiveInteger(readField('limit'));
|
|
141
|
+
const query = readField('query').trim();
|
|
142
|
+
const kind = readField('kind').trim();
|
|
143
|
+
const mimeType = readField('mimeType').trim();
|
|
144
|
+
const purpose = readField('purpose').trim();
|
|
145
|
+
const source = readField('source').trim();
|
|
146
|
+
return {
|
|
147
|
+
mode: 'list',
|
|
148
|
+
...(query ? { query } : {}),
|
|
149
|
+
...(kind ? { kind } : {}),
|
|
150
|
+
...(mimeType ? { mimeType } : {}),
|
|
151
|
+
...(purpose ? { purpose } : {}),
|
|
152
|
+
...(source ? { source } : {}),
|
|
153
|
+
...(limit !== null ? { limit } : {}),
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export function buildAgentArtifactShowToolArgs(
|
|
158
|
+
readField: AgentWorkspaceFieldReader,
|
|
159
|
+
): AgentArtifactBrowserWorkspaceToolArgs {
|
|
160
|
+
const previewBytes = readPositiveInteger(readField('previewBytes'));
|
|
161
|
+
return {
|
|
162
|
+
mode: 'show',
|
|
163
|
+
artifactId: readField('artifactId').trim(),
|
|
164
|
+
includeContent: isAffirmative(readField('includeContent')),
|
|
165
|
+
...(previewBytes !== null ? { previewBytes } : {}),
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export function buildAgentArtifactPromoteKnowledgeToolArgs(
|
|
170
|
+
readField: AgentWorkspaceFieldReader,
|
|
171
|
+
explicitUserRequest: string,
|
|
172
|
+
): AgentArtifactKnowledgePromotionWorkspaceToolArgs {
|
|
173
|
+
const title = readField('title').trim();
|
|
174
|
+
const folderPath = readField('folderPath').trim();
|
|
175
|
+
const connectorId = readField('connectorId').trim();
|
|
176
|
+
const tags = splitList(readField('tags'));
|
|
177
|
+
return {
|
|
178
|
+
sourceKind: 'artifact',
|
|
179
|
+
artifactId: readField('artifactId').trim(),
|
|
180
|
+
...(title ? { title } : {}),
|
|
181
|
+
...(tags.length > 0 ? { tags } : {}),
|
|
182
|
+
...(folderPath ? { folderPath } : {}),
|
|
183
|
+
...(connectorId ? { connectorId } : {}),
|
|
184
|
+
confirm: true,
|
|
185
|
+
explicitUserRequest,
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
export function buildAgentArtifactExportToolArgs(
|
|
190
|
+
readField: AgentWorkspaceFieldReader,
|
|
191
|
+
explicitUserRequest: string,
|
|
192
|
+
): AgentArtifactBrowserWorkspaceToolArgs {
|
|
193
|
+
return {
|
|
194
|
+
mode: 'export',
|
|
195
|
+
artifactId: readField('artifactId').trim(),
|
|
196
|
+
destinationPath: readField('destinationPath').trim(),
|
|
197
|
+
overwrite: isAffirmative(readField('overwrite')),
|
|
198
|
+
confirm: true,
|
|
199
|
+
explicitUserRequest,
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
export function buildAgentArtifactPackageToolArgs(
|
|
204
|
+
readField: AgentWorkspaceFieldReader,
|
|
205
|
+
explicitUserRequest: string,
|
|
206
|
+
): AgentArtifactBrowserWorkspaceToolArgs {
|
|
207
|
+
const artifactIds = splitList(readField('artifactIds'));
|
|
208
|
+
const packageFormat = readField('packageFormat').trim().toLowerCase();
|
|
209
|
+
const mode = packageFormat === 'zip' || packageFormat === 'archive' ? 'archive' : 'package';
|
|
210
|
+
return {
|
|
211
|
+
mode,
|
|
212
|
+
artifactIds,
|
|
213
|
+
destinationPath: readField('destinationPath').trim(),
|
|
214
|
+
overwrite: isAffirmative(readField('overwrite')),
|
|
215
|
+
confirm: true,
|
|
216
|
+
explicitUserRequest,
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
export function buildAgentArtifactBrowserPromptSubmission(
|
|
221
|
+
editor: AgentWorkspaceLocalEditor,
|
|
222
|
+
readField: AgentWorkspaceFieldReader,
|
|
223
|
+
promptDispatchAvailable: boolean,
|
|
224
|
+
): {
|
|
225
|
+
readonly kind: 'editor';
|
|
226
|
+
readonly editor: AgentWorkspaceLocalEditor;
|
|
227
|
+
readonly status: string;
|
|
228
|
+
readonly actionResult: AgentWorkspaceActionResult;
|
|
229
|
+
} | {
|
|
230
|
+
readonly kind: 'prompt';
|
|
231
|
+
readonly prompt: string;
|
|
232
|
+
readonly status: string;
|
|
233
|
+
readonly actionResult: AgentWorkspaceActionResult;
|
|
234
|
+
} {
|
|
235
|
+
if (!promptDispatchAvailable) {
|
|
236
|
+
return {
|
|
237
|
+
kind: 'editor',
|
|
238
|
+
editor: {
|
|
239
|
+
...editor,
|
|
240
|
+
message: 'Prompt dispatch is unavailable in this runtime. Use agent_harness mode:"run_workspace_action" with this editor schema.',
|
|
241
|
+
},
|
|
242
|
+
status: 'Prompt dispatch unavailable.',
|
|
243
|
+
actionResult: {
|
|
244
|
+
kind: 'error',
|
|
245
|
+
title: 'Prompt dispatch unavailable',
|
|
246
|
+
detail: 'This runtime cannot submit the artifact browser request from the workspace form.',
|
|
247
|
+
safety: 'read-only',
|
|
248
|
+
},
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
const args = editor.kind === 'artifact-show'
|
|
253
|
+
? buildAgentArtifactShowToolArgs(readField)
|
|
254
|
+
: buildAgentArtifactBrowserToolArgs(readField);
|
|
255
|
+
const prompt = [
|
|
256
|
+
editor.kind === 'artifact-show'
|
|
257
|
+
? 'Show one saved Agent artifact with the `agent_artifacts` tool.'
|
|
258
|
+
: 'Browse saved Agent artifacts with the `agent_artifacts` tool.',
|
|
259
|
+
`Use mode: ${JSON.stringify(args.mode)}.`,
|
|
260
|
+
args.artifactId ? `Artifact id: ${JSON.stringify(args.artifactId)}.` : 'Artifact id: none.',
|
|
261
|
+
args.query ? `Search query: ${JSON.stringify(args.query)}.` : 'Search query: none.',
|
|
262
|
+
args.kind ? `Kind filter: ${JSON.stringify(args.kind)}.` : 'Kind filter: none.',
|
|
263
|
+
args.mimeType ? `MIME filter: ${JSON.stringify(args.mimeType)}.` : 'MIME filter: none.',
|
|
264
|
+
args.purpose ? `Purpose filter: ${JSON.stringify(args.purpose)}.` : 'Purpose filter: none.',
|
|
265
|
+
args.source ? `Source filter: ${JSON.stringify(args.source)}.` : 'Source filter: none.',
|
|
266
|
+
typeof args.limit === 'number' ? `Limit: ${args.limit}.` : 'Limit: default.',
|
|
267
|
+
args.mode === 'show' ? `Preview content: ${args.includeContent ? 'yes' : 'no'}.` : 'Preview content: list metadata only.',
|
|
268
|
+
'This is read-only. Do not delete, publish, or inline binary/base64 artifact bytes.',
|
|
269
|
+
].join('\n');
|
|
270
|
+
|
|
271
|
+
return {
|
|
272
|
+
kind: 'prompt',
|
|
273
|
+
prompt,
|
|
274
|
+
status: editor.kind === 'artifact-show' ? 'Submitting artifact inspection request.' : 'Submitting artifact browser request.',
|
|
275
|
+
actionResult: {
|
|
276
|
+
kind: 'guidance',
|
|
277
|
+
title: editor.kind === 'artifact-show' ? 'Artifact inspection' : 'Artifact browser',
|
|
278
|
+
detail: 'Submitted a read-only request to inspect saved Agent artifacts.',
|
|
279
|
+
safety: 'read-only',
|
|
280
|
+
},
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
export function buildAgentArtifactPromoteKnowledgePromptSubmission(
|
|
285
|
+
editor: AgentWorkspaceLocalEditor,
|
|
286
|
+
readField: AgentWorkspaceFieldReader,
|
|
287
|
+
promptDispatchAvailable: boolean,
|
|
288
|
+
): {
|
|
289
|
+
readonly kind: 'editor';
|
|
290
|
+
readonly editor: AgentWorkspaceLocalEditor;
|
|
291
|
+
readonly status: string;
|
|
292
|
+
readonly actionResult?: AgentWorkspaceActionResult;
|
|
293
|
+
} | {
|
|
294
|
+
readonly kind: 'prompt';
|
|
295
|
+
readonly prompt: string;
|
|
296
|
+
readonly status: string;
|
|
297
|
+
readonly actionResult: AgentWorkspaceActionResult;
|
|
298
|
+
} {
|
|
299
|
+
if (!isAffirmative(readField('confirm'))) {
|
|
300
|
+
return {
|
|
301
|
+
kind: 'editor',
|
|
302
|
+
editor: { ...editor, message: 'Type yes to confirm artifact ingest into isolated Agent Knowledge.' },
|
|
303
|
+
status: 'Artifact Knowledge promotion not confirmed.',
|
|
304
|
+
};
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
if (!promptDispatchAvailable) {
|
|
308
|
+
return {
|
|
309
|
+
kind: 'editor',
|
|
310
|
+
editor: {
|
|
311
|
+
...editor,
|
|
312
|
+
message: 'Prompt dispatch is unavailable in this runtime. Use agent_harness mode:"run_workspace_action" with this editor schema.',
|
|
313
|
+
},
|
|
314
|
+
status: 'Prompt dispatch unavailable.',
|
|
315
|
+
actionResult: {
|
|
316
|
+
kind: 'error',
|
|
317
|
+
title: 'Prompt dispatch unavailable',
|
|
318
|
+
detail: 'This runtime cannot submit artifact Knowledge promotion from the workspace form.',
|
|
319
|
+
safety: 'safe',
|
|
320
|
+
},
|
|
321
|
+
};
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
const args = buildAgentArtifactPromoteKnowledgeToolArgs(
|
|
325
|
+
readField,
|
|
326
|
+
'Promote a reviewed saved Agent artifact into isolated Agent Knowledge.',
|
|
327
|
+
);
|
|
328
|
+
const prompt = [
|
|
329
|
+
'Promote one reviewed saved Agent artifact into isolated Agent Knowledge.',
|
|
330
|
+
'Use the `agent_knowledge_ingest` tool with these arguments:',
|
|
331
|
+
`sourceKind: ${JSON.stringify(args.sourceKind)}`,
|
|
332
|
+
`artifactId: ${JSON.stringify(args.artifactId)}`,
|
|
333
|
+
args.title ? `title: ${JSON.stringify(args.title)}` : 'title: none',
|
|
334
|
+
args.tags && args.tags.length > 0 ? `tags: ${JSON.stringify(args.tags)}` : 'tags: none',
|
|
335
|
+
args.folderPath ? `folderPath: ${JSON.stringify(args.folderPath)}` : 'folderPath: none',
|
|
336
|
+
args.connectorId ? `connectorId: ${JSON.stringify(args.connectorId)}` : 'connectorId: default',
|
|
337
|
+
'confirm: true',
|
|
338
|
+
`explicitUserRequest: ${JSON.stringify(args.explicitUserRequest)}`,
|
|
339
|
+
'Policy: isolated Agent Knowledge only; no default knowledge, no alternate knowledge segment, and no artifact deletion.',
|
|
340
|
+
].join('\n');
|
|
341
|
+
|
|
342
|
+
return {
|
|
343
|
+
kind: 'prompt',
|
|
344
|
+
prompt,
|
|
345
|
+
status: 'Submitting artifact Knowledge promotion request.',
|
|
346
|
+
actionResult: {
|
|
347
|
+
kind: 'guidance',
|
|
348
|
+
title: 'Artifact Knowledge promotion',
|
|
349
|
+
detail: 'Submitted a confirmed request to ingest one saved artifact into isolated Agent Knowledge.',
|
|
350
|
+
safety: 'safe',
|
|
351
|
+
},
|
|
352
|
+
};
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
export function buildAgentArtifactExportPromptSubmission(
|
|
356
|
+
editor: AgentWorkspaceLocalEditor,
|
|
357
|
+
readField: AgentWorkspaceFieldReader,
|
|
358
|
+
promptDispatchAvailable: boolean,
|
|
359
|
+
): {
|
|
360
|
+
readonly kind: 'editor';
|
|
361
|
+
readonly editor: AgentWorkspaceLocalEditor;
|
|
362
|
+
readonly status: string;
|
|
363
|
+
readonly actionResult?: AgentWorkspaceActionResult;
|
|
364
|
+
} | {
|
|
365
|
+
readonly kind: 'prompt';
|
|
366
|
+
readonly prompt: string;
|
|
367
|
+
readonly status: string;
|
|
368
|
+
readonly actionResult: AgentWorkspaceActionResult;
|
|
369
|
+
} {
|
|
370
|
+
if (!isAffirmative(readField('confirm'))) {
|
|
371
|
+
return {
|
|
372
|
+
kind: 'editor',
|
|
373
|
+
editor: { ...editor, message: 'Type yes to confirm copying this artifact to the destination path.' },
|
|
374
|
+
status: 'Artifact export not confirmed.',
|
|
375
|
+
};
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
if (!promptDispatchAvailable) {
|
|
379
|
+
return {
|
|
380
|
+
kind: 'editor',
|
|
381
|
+
editor: {
|
|
382
|
+
...editor,
|
|
383
|
+
message: 'Prompt dispatch is unavailable in this runtime. Use agent_harness mode:"run_workspace_action" with this editor schema.',
|
|
384
|
+
},
|
|
385
|
+
status: 'Prompt dispatch unavailable.',
|
|
386
|
+
actionResult: {
|
|
387
|
+
kind: 'error',
|
|
388
|
+
title: 'Prompt dispatch unavailable',
|
|
389
|
+
detail: 'This runtime cannot submit artifact export from the workspace form.',
|
|
390
|
+
safety: 'safe',
|
|
391
|
+
},
|
|
392
|
+
};
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
const args = buildAgentArtifactExportToolArgs(
|
|
396
|
+
readField,
|
|
397
|
+
'Export a reviewed saved Agent artifact to a workspace file.',
|
|
398
|
+
);
|
|
399
|
+
const prompt = [
|
|
400
|
+
'Export one reviewed saved Agent artifact to a workspace file.',
|
|
401
|
+
'Use the `agent_artifacts` tool with these arguments:',
|
|
402
|
+
`mode: ${JSON.stringify(args.mode)}`,
|
|
403
|
+
`artifactId: ${JSON.stringify(args.artifactId)}`,
|
|
404
|
+
`destinationPath: ${JSON.stringify(args.destinationPath)}`,
|
|
405
|
+
`overwrite: ${args.overwrite ? 'true' : 'false'}`,
|
|
406
|
+
'confirm: true',
|
|
407
|
+
`explicitUserRequest: ${JSON.stringify(args.explicitUserRequest)}`,
|
|
408
|
+
'Policy: copy exact artifact bytes to the workspace path; do not print content, delete artifacts, or write outside the project.',
|
|
409
|
+
].join('\n');
|
|
410
|
+
|
|
411
|
+
return {
|
|
412
|
+
kind: 'prompt',
|
|
413
|
+
prompt,
|
|
414
|
+
status: 'Submitting artifact export request.',
|
|
415
|
+
actionResult: {
|
|
416
|
+
kind: 'guidance',
|
|
417
|
+
title: 'Artifact export',
|
|
418
|
+
detail: 'Submitted a confirmed request to copy one saved artifact to a workspace file.',
|
|
419
|
+
safety: 'safe',
|
|
420
|
+
},
|
|
421
|
+
};
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
export function buildAgentArtifactPackagePromptSubmission(
|
|
425
|
+
editor: AgentWorkspaceLocalEditor,
|
|
426
|
+
readField: AgentWorkspaceFieldReader,
|
|
427
|
+
promptDispatchAvailable: boolean,
|
|
428
|
+
): {
|
|
429
|
+
readonly kind: 'editor';
|
|
430
|
+
readonly editor: AgentWorkspaceLocalEditor;
|
|
431
|
+
readonly status: string;
|
|
432
|
+
readonly actionResult?: AgentWorkspaceActionResult;
|
|
433
|
+
} | {
|
|
434
|
+
readonly kind: 'prompt';
|
|
435
|
+
readonly prompt: string;
|
|
436
|
+
readonly status: string;
|
|
437
|
+
readonly actionResult: AgentWorkspaceActionResult;
|
|
438
|
+
} {
|
|
439
|
+
if (!isAffirmative(readField('confirm'))) {
|
|
440
|
+
return {
|
|
441
|
+
kind: 'editor',
|
|
442
|
+
editor: { ...editor, message: 'Type yes to confirm copying these artifacts to the package output.' },
|
|
443
|
+
status: 'Artifact package export not confirmed.',
|
|
444
|
+
};
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
if (!promptDispatchAvailable) {
|
|
448
|
+
return {
|
|
449
|
+
kind: 'editor',
|
|
450
|
+
editor: {
|
|
451
|
+
...editor,
|
|
452
|
+
message: 'Prompt dispatch is unavailable in this runtime. Use agent_harness mode:"run_workspace_action" with this editor schema.',
|
|
453
|
+
},
|
|
454
|
+
status: 'Prompt dispatch unavailable.',
|
|
455
|
+
actionResult: {
|
|
456
|
+
kind: 'error',
|
|
457
|
+
title: 'Prompt dispatch unavailable',
|
|
458
|
+
detail: 'This runtime cannot submit artifact package export from the workspace form.',
|
|
459
|
+
safety: 'safe',
|
|
460
|
+
},
|
|
461
|
+
};
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
const args = buildAgentArtifactPackageToolArgs(
|
|
465
|
+
readField,
|
|
466
|
+
readField('packageFormat').trim().toLowerCase() === 'zip' || readField('packageFormat').trim().toLowerCase() === 'archive'
|
|
467
|
+
? 'Export reviewed saved Agent artifacts to a workspace ZIP archive.'
|
|
468
|
+
: 'Export reviewed saved Agent artifacts to a workspace package directory.',
|
|
469
|
+
);
|
|
470
|
+
const outputKind = args.mode === 'archive' ? 'ZIP archive' : 'package directory';
|
|
471
|
+
const prompt = [
|
|
472
|
+
`Export reviewed saved Agent artifacts to a workspace ${outputKind}.`,
|
|
473
|
+
'Use the `agent_artifacts` tool with these arguments:',
|
|
474
|
+
`mode: ${JSON.stringify(args.mode)}`,
|
|
475
|
+
`artifactIds: ${JSON.stringify(args.artifactIds ?? [])}`,
|
|
476
|
+
`destinationPath: ${JSON.stringify(args.destinationPath)}`,
|
|
477
|
+
`overwrite: ${args.overwrite ? 'true' : 'false'}`,
|
|
478
|
+
'confirm: true',
|
|
479
|
+
`explicitUserRequest: ${JSON.stringify(args.explicitUserRequest)}`,
|
|
480
|
+
'Policy: copy exact artifact bytes into the workspace output with a redacted manifest and README; do not print content, delete artifacts, or write outside the project.',
|
|
481
|
+
].join('\n');
|
|
482
|
+
|
|
483
|
+
return {
|
|
484
|
+
kind: 'prompt',
|
|
485
|
+
prompt,
|
|
486
|
+
status: 'Submitting artifact package export request.',
|
|
487
|
+
actionResult: {
|
|
488
|
+
kind: 'guidance',
|
|
489
|
+
title: 'Artifact package export',
|
|
490
|
+
detail: `Submitted a confirmed request to copy selected saved artifacts to a workspace ${outputKind}.`,
|
|
491
|
+
safety: 'safe',
|
|
492
|
+
},
|
|
493
|
+
};
|
|
494
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ArtifactDescriptor } from '@pellux/goodvibes-sdk/platform/artifacts';
|
|
2
|
+
|
|
3
|
+
export function readArtifactMetadataString(metadata: Readonly<Record<string, unknown>>, key: string): string {
|
|
4
|
+
const value = metadata[key];
|
|
5
|
+
return typeof value === 'string' ? value.trim() : '';
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export function readArtifactMetadataStringList(metadata: Readonly<Record<string, unknown>>, key: string): readonly string[] {
|
|
9
|
+
const value = metadata[key];
|
|
10
|
+
if (!Array.isArray(value)) return [];
|
|
11
|
+
return value.filter((entry): entry is string => typeof entry === 'string' && entry.trim().length > 0);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export function readArtifactMetadataNumber(metadata: Readonly<Record<string, unknown>>, key: string): number | null {
|
|
15
|
+
const value = metadata[key];
|
|
16
|
+
return typeof value === 'number' && Number.isFinite(value) ? value : null;
|
|
17
|
+
}
|
|
@@ -664,9 +664,13 @@ export function createAgentWorkspaceBasicCommandEditor(kind: AgentWorkspaceBasic
|
|
|
664
664
|
mode: 'create',
|
|
665
665
|
title: 'Delegate Build Work to GoodVibes TUI',
|
|
666
666
|
selectedFieldIndex: 0,
|
|
667
|
-
message: 'Send one explicit build/fix/review task to GoodVibes TUI/shared-session routes. Type yes on the final field to confirm.',
|
|
667
|
+
message: 'Send one explicit build/fix/review task to GoodVibes TUI/shared-session routes with a visible handoff brief. Type yes on the final field to confirm.',
|
|
668
668
|
fields: [
|
|
669
669
|
{ id: 'task', label: 'Original task', value: '', required: true, multiline: true, hint: 'Paste the full original user ask. Ctrl-J inserts a new line.' },
|
|
670
|
+
{ id: 'reason', label: 'Why delegate', value: '', required: false, multiline: true, hint: 'Isolation, remote host, separate worktree, parallelism, TUI workflow, or review need. Ctrl-J inserts a new line.' },
|
|
671
|
+
{ id: 'success', label: 'Success criteria', value: '', required: false, multiline: true, hint: 'Expected evidence: diff, tests, artifact, findings, or completion signal. Ctrl-J inserts a new line.' },
|
|
672
|
+
{ id: 'workspace', label: 'Workspace hint', value: '', required: false, multiline: false, hint: 'Optional target workspace, branch, worktree, machine, or package.' },
|
|
673
|
+
{ id: 'priority', label: 'Priority', value: '', required: false, multiline: false, hint: 'Optional priority, deadline, or sequencing note.' },
|
|
670
674
|
{ id: 'review', label: 'Request delegated review', value: '', required: false, multiline: false, hint: 'yes/no. Blank means no delegated review request.' },
|
|
671
675
|
{ id: 'confirm', label: 'Confirm', value: '', required: true, multiline: false, hint: 'Type yes to run /delegate for this task.' },
|
|
672
676
|
],
|