@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.
- package/CHANGELOG.md +329 -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 +138903 -91477
- 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 +58 -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 +116 -45
- package/docs/voice-and-live-tts.md +3 -1
- package/package.json +3 -2
- package/release/release-notes.md +142 -5
- package/release/release-readiness.json +124 -94
- 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 +294 -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-artifact-receipts.ts +366 -0
- package/src/agent/setup-wizard-checkpoint.ts +140 -0
- package/src/agent/setup-wizard.ts +683 -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 +313 -30
- package/src/input/agent-workspace-setup-checkpoint-action.ts +127 -0
- package/src/input/agent-workspace-setup-snapshot.ts +217 -0
- package/src/input/agent-workspace-setup.ts +61 -1
- package/src/input/agent-workspace-snapshot.ts +184 -149
- package/src/input/agent-workspace-types.ts +287 -2
- package/src/input/agent-workspace.ts +23 -1
- 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/input/setup-wizard-live-receipts.ts +76 -0
- package/src/main.ts +15 -15
- package/src/panels/qr-panel.ts +2 -2
- package/src/renderer/agent-workspace-context-lines.ts +701 -0
- package/src/renderer/agent-workspace.ts +68 -421
- 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-policy.ts +75 -0
- package/src/tools/agent-harness-agent-orchestration.ts +791 -0
- package/src/tools/agent-harness-autonomy-intake.ts +785 -0
- package/src/tools/agent-harness-autonomy-live-records.ts +742 -0
- package/src/tools/agent-harness-autonomy-queue-types.ts +88 -0
- package/src/tools/agent-harness-autonomy-queue.ts +571 -0
- package/src/tools/agent-harness-autonomy-watcher-read-models.ts +509 -0
- package/src/tools/agent-harness-background-processes-types.ts +35 -0
- package/src/tools/agent-harness-background-processes.ts +798 -0
- package/src/tools/agent-harness-browser-cockpit-route.ts +373 -0
- package/src/tools/agent-harness-browser-control.ts +346 -0
- package/src/tools/agent-harness-browser-pwa-read-models.ts +622 -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-device-live-read-models.ts +366 -0
- 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 +385 -0
- package/src/tools/agent-harness-file-recovery.ts +135 -0
- package/src/tools/agent-harness-interactive-runtime-records.ts +421 -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 +269 -0
- package/src/tools/agent-harness-local-model-cookbook.ts +238 -0
- package/src/tools/agent-harness-local-model-endpoints.ts +788 -0
- package/src/tools/agent-harness-local-model-smoke.ts +277 -0
- package/src/tools/agent-harness-local-model-url.ts +78 -0
- package/src/tools/agent-harness-media-posture.ts +223 -2
- package/src/tools/agent-harness-memory-external-providers.ts +796 -0
- package/src/tools/agent-harness-memory-posture.ts +672 -0
- package/src/tools/agent-harness-memory-provider-certification.ts +219 -0
- package/src/tools/agent-harness-memory-refinement.ts +340 -0
- package/src/tools/agent-harness-metadata.ts +100 -168
- package/src/tools/agent-harness-mode-catalog.ts +86 -33
- package/src/tools/agent-harness-model-catalog.ts +162 -0
- package/src/tools/agent-harness-model-provider-health.ts +283 -0
- package/src/tools/agent-harness-model-readiness.ts +432 -0
- package/src/tools/agent-harness-model-routing-types.ts +327 -0
- package/src/tools/agent-harness-model-routing-utils.ts +30 -0
- package/src/tools/agent-harness-model-routing.ts +165 -193
- package/src/tools/agent-harness-operator-methods.ts +115 -133
- package/src/tools/agent-harness-pairing-posture.ts +452 -18
- package/src/tools/agent-harness-personal-ops-certification.ts +116 -0
- 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 +270 -0
- package/src/tools/agent-harness-personal-ops-operations.ts +225 -0
- package/src/tools/agent-harness-personal-ops-provider-records.ts +358 -0
- package/src/tools/agent-harness-personal-ops-provider-task-records.ts +321 -0
- package/src/tools/agent-harness-personal-ops-records.ts +684 -0
- package/src/tools/agent-harness-personal-ops-runner.ts +637 -0
- package/src/tools/agent-harness-personal-ops-types.ts +240 -0
- package/src/tools/agent-harness-personal-ops.ts +613 -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-remote-read-models.ts +541 -0
- package/src/tools/agent-harness-research-briefing.ts +446 -0
- package/src/tools/agent-harness-research-live-read-models.ts +500 -0
- package/src/tools/agent-harness-research-queue.ts +250 -0
- package/src/tools/agent-harness-research-runs.ts +307 -0
- package/src/tools/agent-harness-research-workflow.ts +395 -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 +102 -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 +533 -0
- package/src/tools/agent-harness-sudo-posture.ts +114 -0
- package/src/tools/agent-harness-tool-schema.ts +142 -7
- package/src/tools/agent-harness-tool-types.ts +83 -0
- package/src/tools/agent-harness-tool-utils.ts +43 -0
- package/src/tools/agent-harness-tool.ts +319 -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 +253 -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 +735 -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-runner.ts +367 -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 +515 -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,141 @@
|
|
|
1
|
+
import type { AgentWorkspaceCategory } from './agent-workspace-types.ts';
|
|
2
|
+
import { settingAction } from './agent-workspace-category-actions.ts';
|
|
3
|
+
|
|
4
|
+
export const AGENT_WORKSPACE_ONBOARDING_DETAIL_CATEGORIES: readonly AgentWorkspaceCategory[] = [
|
|
5
|
+
{
|
|
6
|
+
id: 'onboarding-channels',
|
|
7
|
+
group: 'ONBOARDING',
|
|
8
|
+
label: 'Messaging',
|
|
9
|
+
summary: 'Choose remote channels, then fill only the fields for enabled channels.',
|
|
10
|
+
detail: 'Enable the channels you actually want. Channel credentials and default targets are saved as Agent settings or secret refs.',
|
|
11
|
+
actions: [
|
|
12
|
+
settingAction({ id: 'channel-ntfy-enabled', label: 'Use ntfy', detail: 'Toggle ntfy notifications and chat routing.', key: 'surfaces.ntfy.enabled' }),
|
|
13
|
+
settingAction({ id: 'channel-ntfy-base-url', label: 'ntfy base URL', detail: 'Set the ntfy server URL.', key: 'surfaces.ntfy.baseUrl', visibleWhenKey: 'surfaces.ntfy.enabled', visibleWhenValue: true }),
|
|
14
|
+
settingAction({ id: 'channel-ntfy-chat-topic', label: 'ntfy chat topic', detail: 'Set the topic routed into active terminal chat.', key: 'surfaces.ntfy.chatTopic', visibleWhenKey: 'surfaces.ntfy.enabled', visibleWhenValue: true }),
|
|
15
|
+
settingAction({ id: 'channel-ntfy-agent-topic', label: 'ntfy agent topic', detail: 'Set the topic routed to Agent work.', key: 'surfaces.ntfy.agentTopic', visibleWhenKey: 'surfaces.ntfy.enabled', visibleWhenValue: true }),
|
|
16
|
+
settingAction({ id: 'channel-ntfy-default-topic', label: 'ntfy default topic', detail: 'Set the default outbound notification topic.', key: 'surfaces.ntfy.topic', visibleWhenKey: 'surfaces.ntfy.enabled', visibleWhenValue: true }),
|
|
17
|
+
settingAction({ id: 'channel-ntfy-remote-topic', label: 'ntfy remote topic', detail: 'Set the daemon-owned remote chat topic.', key: 'surfaces.ntfy.remoteTopic', visibleWhenKey: 'surfaces.ntfy.enabled', visibleWhenValue: true }),
|
|
18
|
+
settingAction({ id: 'channel-ntfy-token', label: 'ntfy token', detail: 'Store the ntfy access token or secret reference.', key: 'surfaces.ntfy.token', visibleWhenKey: 'surfaces.ntfy.enabled', visibleWhenValue: true }),
|
|
19
|
+
settingAction({ id: 'channel-ntfy-priority', label: 'ntfy priority', detail: 'Set default ntfy priority from 1 to 5.', key: 'surfaces.ntfy.defaultPriority', visibleWhenKey: 'surfaces.ntfy.enabled', visibleWhenValue: true }),
|
|
20
|
+
settingAction({ id: 'channel-slack-enabled', label: 'Use Slack', detail: 'Toggle Slack adapter configuration.', key: 'surfaces.slack.enabled' }),
|
|
21
|
+
settingAction({ id: 'channel-slack-bot-token', label: 'Slack bot token', detail: 'Store the Slack bot token or secret reference.', key: 'surfaces.slack.botToken', visibleWhenKey: 'surfaces.slack.enabled', visibleWhenValue: true }),
|
|
22
|
+
settingAction({ id: 'channel-slack-app-token', label: 'Slack app token', detail: 'Store the Slack app token or secret reference.', key: 'surfaces.slack.appToken', visibleWhenKey: 'surfaces.slack.enabled', visibleWhenValue: true }),
|
|
23
|
+
settingAction({ id: 'channel-slack-signing-secret', label: 'Slack signing secret', detail: 'Store the Slack signing secret or secret reference.', key: 'surfaces.slack.signingSecret', visibleWhenKey: 'surfaces.slack.enabled', visibleWhenValue: true }),
|
|
24
|
+
settingAction({ id: 'channel-slack-default-channel', label: 'Slack default channel', detail: 'Set the default Slack channel for notifications and replies.', key: 'surfaces.slack.defaultChannel', visibleWhenKey: 'surfaces.slack.enabled', visibleWhenValue: true }),
|
|
25
|
+
settingAction({ id: 'channel-slack-workspace', label: 'Slack workspace ID', detail: 'Set the Slack workspace id for route binding.', key: 'surfaces.slack.workspaceId', visibleWhenKey: 'surfaces.slack.enabled', visibleWhenValue: true }),
|
|
26
|
+
settingAction({ id: 'channel-discord-enabled', label: 'Use Discord', detail: 'Toggle Discord adapter configuration.', key: 'surfaces.discord.enabled' }),
|
|
27
|
+
settingAction({ id: 'channel-discord-bot-token', label: 'Discord bot token', detail: 'Store the Discord bot token or secret reference.', key: 'surfaces.discord.botToken', visibleWhenKey: 'surfaces.discord.enabled', visibleWhenValue: true }),
|
|
28
|
+
settingAction({ id: 'channel-discord-application', label: 'Discord application ID', detail: 'Set the Discord application id.', key: 'surfaces.discord.applicationId', visibleWhenKey: 'surfaces.discord.enabled', visibleWhenValue: true }),
|
|
29
|
+
settingAction({ id: 'channel-discord-public-key', label: 'Discord public key', detail: 'Set the Discord application public key.', key: 'surfaces.discord.publicKey', visibleWhenKey: 'surfaces.discord.enabled', visibleWhenValue: true }),
|
|
30
|
+
settingAction({ id: 'channel-discord-guild', label: 'Discord guild ID', detail: 'Set the default Discord guild id.', key: 'surfaces.discord.guildId', visibleWhenKey: 'surfaces.discord.enabled', visibleWhenValue: true }),
|
|
31
|
+
settingAction({ id: 'channel-discord-default-channel', label: 'Discord default channel', detail: 'Set the default Discord channel id.', key: 'surfaces.discord.defaultChannelId', visibleWhenKey: 'surfaces.discord.enabled', visibleWhenValue: true }),
|
|
32
|
+
settingAction({ id: 'channel-webhook-enabled', label: 'Use webhooks', detail: 'Toggle generic webhook delivery.', key: 'surfaces.webhook.enabled' }),
|
|
33
|
+
settingAction({ id: 'channel-webhook-target', label: 'Webhook target URL', detail: 'Set the default outbound webhook target URL.', key: 'surfaces.webhook.defaultTarget', visibleWhenKey: 'surfaces.webhook.enabled', visibleWhenValue: true }),
|
|
34
|
+
settingAction({ id: 'channel-webhook-secret', label: 'Webhook secret', detail: 'Store the shared webhook secret or secret reference.', key: 'surfaces.webhook.secret', visibleWhenKey: 'surfaces.webhook.enabled', visibleWhenValue: true }),
|
|
35
|
+
settingAction({ id: 'channel-webhook-timeout', label: 'Webhook timeout', detail: 'Set outbound webhook timeout in milliseconds.', key: 'surfaces.webhook.timeoutMs', visibleWhenKey: 'surfaces.webhook.enabled', visibleWhenValue: true }),
|
|
36
|
+
settingAction({ id: 'channel-telegram-enabled', label: 'Use Telegram', detail: 'Toggle Telegram bot delivery.', key: 'surfaces.telegram.enabled' }),
|
|
37
|
+
settingAction({ id: 'channel-telegram-bot-token', label: 'Telegram bot token', detail: 'Store the Telegram bot token or secret reference.', key: 'surfaces.telegram.botToken', visibleWhenKey: 'surfaces.telegram.enabled', visibleWhenValue: true }),
|
|
38
|
+
settingAction({ id: 'channel-telegram-bot-username', label: 'Telegram bot username', detail: 'Set the Telegram bot username.', key: 'surfaces.telegram.botUsername', visibleWhenKey: 'surfaces.telegram.enabled', visibleWhenValue: true }),
|
|
39
|
+
settingAction({ id: 'channel-telegram-chat', label: 'Telegram chat ID', detail: 'Set the default Telegram chat, group, or channel id.', key: 'surfaces.telegram.defaultChatId', visibleWhenKey: 'surfaces.telegram.enabled', visibleWhenValue: true }),
|
|
40
|
+
settingAction({ id: 'channel-telegram-mode', label: 'Telegram mode', detail: 'Cycle webhook or polling ingress mode.', key: 'surfaces.telegram.mode', visibleWhenKey: 'surfaces.telegram.enabled', visibleWhenValue: true }),
|
|
41
|
+
settingAction({ id: 'channel-telegram-webhook-secret', label: 'Telegram webhook secret', detail: 'Store the Telegram webhook secret or secret reference.', key: 'surfaces.telegram.webhookSecret', visibleWhenKey: 'surfaces.telegram.enabled', visibleWhenValue: true }),
|
|
42
|
+
settingAction({ id: 'channel-googlechat-enabled', label: 'Use Google Chat', detail: 'Toggle Google Chat delivery.', key: 'surfaces.googleChat.enabled' }),
|
|
43
|
+
settingAction({ id: 'channel-googlechat-webhook', label: 'Google Chat webhook', detail: 'Set the Google Chat webhook or app callback URL.', key: 'surfaces.googleChat.webhookUrl', visibleWhenKey: 'surfaces.googleChat.enabled', visibleWhenValue: true }),
|
|
44
|
+
settingAction({ id: 'channel-googlechat-space', label: 'Google Chat space', detail: 'Set the default Google Chat space id.', key: 'surfaces.googleChat.spaceId', visibleWhenKey: 'surfaces.googleChat.enabled', visibleWhenValue: true }),
|
|
45
|
+
settingAction({ id: 'channel-googlechat-app-id', label: 'Google Chat app ID', detail: 'Set the Google Chat app id.', key: 'surfaces.googleChat.appId', visibleWhenKey: 'surfaces.googleChat.enabled', visibleWhenValue: true }),
|
|
46
|
+
settingAction({ id: 'channel-googlechat-verification', label: 'Google Chat verification', detail: 'Store the Google Chat verification token or secret reference.', key: 'surfaces.googleChat.verificationToken', visibleWhenKey: 'surfaces.googleChat.enabled', visibleWhenValue: true }),
|
|
47
|
+
settingAction({ id: 'channel-homeassistant-enabled', label: 'Use home automation', detail: 'Toggle home automation conversation and event delivery.', key: 'surfaces.homeassistant.enabled' }),
|
|
48
|
+
settingAction({ id: 'channel-homeassistant-url', label: 'Home automation URL', detail: 'Set the home automation instance URL.', key: 'surfaces.homeassistant.instanceUrl', visibleWhenKey: 'surfaces.homeassistant.enabled', visibleWhenValue: true }),
|
|
49
|
+
settingAction({ id: 'channel-homeassistant-token', label: 'Home automation token', detail: 'Store the home automation access token or secret reference.', key: 'surfaces.homeassistant.accessToken', visibleWhenKey: 'surfaces.homeassistant.enabled', visibleWhenValue: true }),
|
|
50
|
+
settingAction({ id: 'channel-homeassistant-webhook-secret', label: 'Home automation webhook secret', detail: 'Store the shared secret used to verify inbound callbacks.', key: 'surfaces.homeassistant.webhookSecret', visibleWhenKey: 'surfaces.homeassistant.enabled', visibleWhenValue: true }),
|
|
51
|
+
settingAction({ id: 'channel-homeassistant-conversation', label: 'Home automation conversation', detail: 'Set the default conversation id.', key: 'surfaces.homeassistant.defaultConversationId', visibleWhenKey: 'surfaces.homeassistant.enabled', visibleWhenValue: true }),
|
|
52
|
+
settingAction({ id: 'channel-homeassistant-device-id', label: 'Home automation device ID', detail: 'Set the stable device id exposed to the home automation surface.', key: 'surfaces.homeassistant.deviceId', visibleWhenKey: 'surfaces.homeassistant.enabled', visibleWhenValue: true }),
|
|
53
|
+
settingAction({ id: 'channel-homeassistant-device-name', label: 'Home automation device name', detail: 'Set the device display name exposed to the home automation surface.', key: 'surfaces.homeassistant.deviceName', visibleWhenKey: 'surfaces.homeassistant.enabled', visibleWhenValue: true }),
|
|
54
|
+
settingAction({ id: 'channel-homeassistant-event-type', label: 'Home automation event type', detail: 'Set the event type used for daemon-to-home automation delivery.', key: 'surfaces.homeassistant.eventType', visibleWhenKey: 'surfaces.homeassistant.enabled', visibleWhenValue: true }),
|
|
55
|
+
settingAction({ id: 'channel-homeassistant-session-ttl', label: 'Home automation session TTL', detail: 'Set the idle TTL for remote home automation conversation sessions.', key: 'surfaces.homeassistant.remoteSessionTtlMs', visibleWhenKey: 'surfaces.homeassistant.enabled', visibleWhenValue: true }),
|
|
56
|
+
settingAction({ id: 'channel-signal-enabled', label: 'Use Signal', detail: 'Toggle Signal bridge delivery.', key: 'surfaces.signal.enabled' }),
|
|
57
|
+
settingAction({ id: 'channel-signal-bridge', label: 'Signal bridge URL', detail: 'Set the Signal bridge base URL.', key: 'surfaces.signal.bridgeUrl', visibleWhenKey: 'surfaces.signal.enabled', visibleWhenValue: true }),
|
|
58
|
+
settingAction({ id: 'channel-signal-account', label: 'Signal account', detail: 'Set the Signal account id or phone number.', key: 'surfaces.signal.account', visibleWhenKey: 'surfaces.signal.enabled', visibleWhenValue: true }),
|
|
59
|
+
settingAction({ id: 'channel-signal-token', label: 'Signal token', detail: 'Store the Signal bridge token or secret reference.', key: 'surfaces.signal.token', visibleWhenKey: 'surfaces.signal.enabled', visibleWhenValue: true }),
|
|
60
|
+
settingAction({ id: 'channel-signal-recipient', label: 'Signal recipient', detail: 'Set the default Signal recipient or group.', key: 'surfaces.signal.defaultRecipient', visibleWhenKey: 'surfaces.signal.enabled', visibleWhenValue: true }),
|
|
61
|
+
settingAction({ id: 'channel-whatsapp-enabled', label: 'Use WhatsApp', detail: 'Toggle WhatsApp delivery.', key: 'surfaces.whatsapp.enabled' }),
|
|
62
|
+
settingAction({ id: 'channel-whatsapp-provider', label: 'WhatsApp provider', detail: 'Cycle Meta Cloud API or bridge provider mode.', key: 'surfaces.whatsapp.provider', visibleWhenKey: 'surfaces.whatsapp.enabled', visibleWhenValue: true }),
|
|
63
|
+
settingAction({ id: 'channel-whatsapp-token', label: 'WhatsApp access token', detail: 'Store the WhatsApp provider access token or secret reference.', key: 'surfaces.whatsapp.accessToken', visibleWhenKey: 'surfaces.whatsapp.enabled', visibleWhenValue: true }),
|
|
64
|
+
settingAction({ id: 'channel-whatsapp-phone-id', label: 'WhatsApp phone number ID', detail: 'Set the WhatsApp phone number id.', key: 'surfaces.whatsapp.phoneNumberId', visibleWhenKey: 'surfaces.whatsapp.enabled', visibleWhenValue: true }),
|
|
65
|
+
settingAction({ id: 'channel-whatsapp-business-id', label: 'WhatsApp business ID', detail: 'Set the WhatsApp business account id.', key: 'surfaces.whatsapp.businessAccountId', visibleWhenKey: 'surfaces.whatsapp.enabled', visibleWhenValue: true }),
|
|
66
|
+
settingAction({ id: 'channel-whatsapp-verify', label: 'WhatsApp verify token', detail: 'Store the WhatsApp verify token or secret reference.', key: 'surfaces.whatsapp.verifyToken', visibleWhenKey: 'surfaces.whatsapp.enabled', visibleWhenValue: true }),
|
|
67
|
+
settingAction({ id: 'channel-whatsapp-signing', label: 'WhatsApp signing secret', detail: 'Store the WhatsApp signing secret or secret reference.', key: 'surfaces.whatsapp.signingSecret', visibleWhenKey: 'surfaces.whatsapp.enabled', visibleWhenValue: true }),
|
|
68
|
+
settingAction({ id: 'channel-whatsapp-recipient', label: 'WhatsApp recipient', detail: 'Set the default WhatsApp recipient or chat id.', key: 'surfaces.whatsapp.defaultRecipient', visibleWhenKey: 'surfaces.whatsapp.enabled', visibleWhenValue: true }),
|
|
69
|
+
settingAction({ id: 'channel-imessage-enabled', label: 'Use iMessage', detail: 'Toggle iMessage bridge delivery.', key: 'surfaces.imessage.enabled' }),
|
|
70
|
+
settingAction({ id: 'channel-imessage-bridge', label: 'iMessage bridge URL', detail: 'Set the iMessage bridge base URL.', key: 'surfaces.imessage.bridgeUrl', visibleWhenKey: 'surfaces.imessage.enabled', visibleWhenValue: true }),
|
|
71
|
+
settingAction({ id: 'channel-imessage-account', label: 'iMessage account', detail: 'Set the iMessage account id.', key: 'surfaces.imessage.account', visibleWhenKey: 'surfaces.imessage.enabled', visibleWhenValue: true }),
|
|
72
|
+
settingAction({ id: 'channel-imessage-token', label: 'iMessage token', detail: 'Store the iMessage bridge token or secret reference.', key: 'surfaces.imessage.token', visibleWhenKey: 'surfaces.imessage.enabled', visibleWhenValue: true }),
|
|
73
|
+
settingAction({ id: 'channel-imessage-chat', label: 'iMessage chat ID', detail: 'Set the default iMessage chat id.', key: 'surfaces.imessage.defaultChatId', visibleWhenKey: 'surfaces.imessage.enabled', visibleWhenValue: true }),
|
|
74
|
+
],
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
id: 'onboarding-voice-media',
|
|
78
|
+
group: 'ONBOARDING',
|
|
79
|
+
label: 'Voice & Phone',
|
|
80
|
+
summary: 'Configure voice controls, spoken output, and SMS or phone-call delivery.',
|
|
81
|
+
detail: 'Use this page for saved voice/TTS settings and telephony credentials. Generating media is available later from Voice & Media.',
|
|
82
|
+
actions: [
|
|
83
|
+
settingAction({ id: 'voice-enabled', label: 'Use voice controls', detail: 'Toggle the optional local voice control surface.', key: 'ui.voiceEnabled' }),
|
|
84
|
+
settingAction({ id: 'voice-tts-provider', label: 'TTS provider', detail: 'Set the default text-to-speech provider id.', key: 'tts.provider' }),
|
|
85
|
+
settingAction({ id: 'voice-tts-voice', label: 'TTS voice', detail: 'Set the default text-to-speech voice id.', key: 'tts.voice' }),
|
|
86
|
+
settingAction({ id: 'telephony-enabled', label: 'Use telephony', detail: 'Toggle SMS, voice call, or telephony bridge delivery.', key: 'surfaces.telephony.enabled' }),
|
|
87
|
+
settingAction({ id: 'telephony-provider', label: 'Telephony provider', detail: 'Cycle direct provider or bridge mode.', key: 'surfaces.telephony.provider', visibleWhenKey: 'surfaces.telephony.enabled', visibleWhenValue: true }),
|
|
88
|
+
settingAction({ id: 'telephony-mode', label: 'Telephony mode', detail: 'Cycle SMS, voice call, or bridge delivery mode.', key: 'surfaces.telephony.mode', visibleWhenKey: 'surfaces.telephony.enabled', visibleWhenValue: true }),
|
|
89
|
+
settingAction({ id: 'telephony-bridge-url', label: 'Telephony bridge URL', detail: 'Set the telephony bridge base URL.', key: 'surfaces.telephony.bridgeUrl', visibleWhenKey: 'surfaces.telephony.enabled', visibleWhenValue: true }),
|
|
90
|
+
settingAction({ id: 'telephony-token', label: 'Telephony bridge token', detail: 'Store the telephony bridge token or secret reference.', key: 'surfaces.telephony.token', visibleWhenKey: 'surfaces.telephony.enabled', visibleWhenValue: true }),
|
|
91
|
+
settingAction({ id: 'telephony-account-sid', label: 'Twilio account SID', detail: 'Set the Twilio account SID for provider-direct delivery.', key: 'surfaces.telephony.accountSid', visibleWhenKey: 'surfaces.telephony.enabled', visibleWhenValue: true }),
|
|
92
|
+
settingAction({ id: 'telephony-auth-token', label: 'Twilio auth token', detail: 'Store the Twilio auth token or secret reference.', key: 'surfaces.telephony.authToken', visibleWhenKey: 'surfaces.telephony.enabled', visibleWhenValue: true }),
|
|
93
|
+
settingAction({ id: 'telephony-from', label: 'Sender phone number', detail: 'Set the default caller or sender phone number.', key: 'surfaces.telephony.fromNumber', visibleWhenKey: 'surfaces.telephony.enabled', visibleWhenValue: true }),
|
|
94
|
+
settingAction({ id: 'telephony-recipient', label: 'Recipient phone number', detail: 'Set the default telephony recipient number.', key: 'surfaces.telephony.defaultRecipient', visibleWhenKey: 'surfaces.telephony.enabled', visibleWhenValue: true }),
|
|
95
|
+
settingAction({ id: 'telephony-webhook-secret', label: 'Telephony webhook secret', detail: 'Store the shared telephony webhook secret or secret reference.', key: 'surfaces.telephony.webhookSecret', visibleWhenKey: 'surfaces.telephony.enabled', visibleWhenValue: true }),
|
|
96
|
+
settingAction({ id: 'telephony-voice-language', label: 'Voice language', detail: 'Set the BCP-47 language code for voice-call text-to-speech.', key: 'surfaces.telephony.voiceLanguage', visibleWhenKey: 'surfaces.telephony.enabled', visibleWhenValue: true }),
|
|
97
|
+
],
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
id: 'onboarding-context',
|
|
101
|
+
group: 'ONBOARDING',
|
|
102
|
+
label: 'Local Context',
|
|
103
|
+
summary: 'Create/import memory, personas, skills, routines, notes, and Knowledge.',
|
|
104
|
+
detail: 'Use this page to seed the assistant with durable local context. These forms create Agent-owned records or ingest reviewed sources.',
|
|
105
|
+
actions: [
|
|
106
|
+
{ id: 'context-vibe-status', label: 'Inspect VIBE.md', detail: 'Show project/global VIBE.md personality files, blocked files, and init paths before relying on a custom assistant feel.', kind: 'guidance', safety: 'read-only' },
|
|
107
|
+
{ id: 'context-project-files', label: 'Inspect project context', detail: 'List secret-scanned .hermes.md, HERMES.md, AGENTS.md, CLAUDE.md, SOUL.md, and Cursor context files with blocked/truncated status.', kind: 'guidance', safety: 'read-only' },
|
|
108
|
+
{ id: 'context-project-file', label: 'Inspect one context file', detail: 'Inspect one loaded or blocked project context file by id, target, or query through the read-only context-file control.', kind: 'guidance', safety: 'read-only' },
|
|
109
|
+
{ id: 'context-prompt-context', label: 'Prompt context', detail: 'Inspect the applied prompt context order, selected memory/persona/skill/routine records, suppressed context, and approximate token budget.', kind: 'guidance', safety: 'read-only' },
|
|
110
|
+
{ id: 'context-profile-from-discovered', label: 'Profile from discovered files', detail: 'Create an isolated Agent profile from reviewed local persona, skill, and routine files.', editorKind: 'profile-from-discovered', kind: 'editor', safety: 'safe' },
|
|
111
|
+
{ id: 'context-persona-discovery', label: 'Import persona files', detail: 'Import discovered persona files into the Agent persona registry.', editorKind: 'persona-discovery-import', kind: 'editor', safety: 'safe' },
|
|
112
|
+
{ id: 'context-skill-discovery', label: 'Import skill files', detail: 'Import discovered skill files into the Agent skill registry.', editorKind: 'skill-discovery-import', kind: 'editor', safety: 'safe' },
|
|
113
|
+
{ id: 'context-routine-discovery', label: 'Import routine files', detail: 'Import discovered routine files into the Agent routine registry.', editorKind: 'routine-discovery-import', kind: 'editor', safety: 'safe' },
|
|
114
|
+
{ id: 'context-create-persona', label: 'Create persona', detail: 'Create and optionally activate an Agent-local persona.', editorKind: 'persona', kind: 'editor', safety: 'safe' },
|
|
115
|
+
{ id: 'context-create-memory', label: 'Create starter memory', detail: 'Create one durable local memory record.', editorKind: 'memory', kind: 'editor', safety: 'safe' },
|
|
116
|
+
{ id: 'context-create-skill', label: 'Create skill', detail: 'Create one reusable Agent-local skill.', editorKind: 'skill', kind: 'editor', safety: 'safe' },
|
|
117
|
+
{ id: 'context-create-routine', label: 'Create routine', detail: 'Create one reusable Agent-local routine.', editorKind: 'routine', kind: 'editor', safety: 'safe' },
|
|
118
|
+
{ id: 'context-create-note', label: 'Create note', detail: 'Create one Agent-local scratchpad note.', editorKind: 'note', kind: 'editor', safety: 'safe' },
|
|
119
|
+
{ id: 'context-knowledge-url', label: 'Ingest URL', detail: 'Ingest a reviewed URL into isolated Agent Knowledge after confirmation.', editorKind: 'knowledge-url', kind: 'editor', safety: 'safe' },
|
|
120
|
+
{ id: 'context-knowledge-file', label: 'Ingest file', detail: 'Ingest a local file into isolated Agent Knowledge after confirmation.', editorKind: 'knowledge-file', kind: 'editor', safety: 'safe' },
|
|
121
|
+
{ id: 'context-knowledge-bookmarks', label: 'Import bookmarks', detail: 'Import a browser bookmark export into isolated Agent Knowledge.', editorKind: 'knowledge-bookmarks', kind: 'editor', safety: 'safe' },
|
|
122
|
+
{ id: 'context-knowledge-browser-history', label: 'Import browser history', detail: 'Import local browser history or bookmarks into isolated Agent Knowledge.', editorKind: 'knowledge-browser-history', kind: 'editor', safety: 'safe' },
|
|
123
|
+
],
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
id: 'onboarding-automation',
|
|
127
|
+
group: 'ONBOARDING',
|
|
128
|
+
label: 'Automation Setup',
|
|
129
|
+
summary: 'Set scheduled work limits for reminders and routines.',
|
|
130
|
+
detail: 'Use this page to enable automation and set bounded run limits. Creating actual reminders and routines remains a separate confirmed action.',
|
|
131
|
+
actions: [
|
|
132
|
+
settingAction({ id: 'automation-enabled', label: 'Use automation', detail: 'Toggle the automation subsystem for reminders and scheduled routines.', key: 'automation.enabled' }),
|
|
133
|
+
settingAction({ id: 'automation-max-concurrent', label: 'Concurrent runs', detail: 'Set the maximum automation runs that can execute concurrently.', key: 'automation.maxConcurrentRuns', visibleWhenKey: 'automation.enabled', visibleWhenValue: true }),
|
|
134
|
+
settingAction({ id: 'automation-history-limit', label: 'Run history limit', detail: 'Set the number of run history entries retained per automation job.', key: 'automation.runHistoryLimit', visibleWhenKey: 'automation.enabled', visibleWhenValue: true }),
|
|
135
|
+
settingAction({ id: 'automation-default-timeout', label: 'Default timeout', detail: 'Set the default automation run timeout in milliseconds.', key: 'automation.defaultTimeoutMs', visibleWhenKey: 'automation.enabled', visibleWhenValue: true }),
|
|
136
|
+
settingAction({ id: 'automation-catch-up', label: 'Catch-up window', detail: 'Set how long startup should catch up missed automation runs.', key: 'automation.catchUpWindowMinutes', visibleWhenKey: 'automation.enabled', visibleWhenValue: true }),
|
|
137
|
+
settingAction({ id: 'automation-failure-cooldown', label: 'Failure cooldown', detail: 'Set the cooldown after a failed automation run.', key: 'automation.failureCooldownMs', visibleWhenKey: 'automation.enabled', visibleWhenValue: true }),
|
|
138
|
+
settingAction({ id: 'automation-delete-after-run', label: 'Delete one-shot jobs', detail: 'Toggle deleting one-shot automation jobs after their first successful run.', key: 'automation.deleteAfterRun', visibleWhenKey: 'automation.enabled', visibleWhenValue: true }),
|
|
139
|
+
],
|
|
140
|
+
},
|
|
141
|
+
];
|
|
@@ -20,6 +20,11 @@ function optionalRememberArgs(value: string): string {
|
|
|
20
20
|
return isAffirmative(trimmed) ? ' --remember' : ' --no-remember';
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
function optionalCommandArg(flag: string, value: string): string {
|
|
24
|
+
const trimmed = value.trim();
|
|
25
|
+
return trimmed ? ` ${flag} ${quoteSlashCommandArg(trimmed)}` : '';
|
|
26
|
+
}
|
|
27
|
+
|
|
23
28
|
function unconfirmed(editor: AgentWorkspaceLocalEditor, message: string): AgentWorkspaceOperationsCommandEditorSubmission {
|
|
24
29
|
return {
|
|
25
30
|
kind: 'editor',
|
|
@@ -162,6 +167,54 @@ export function buildAgentWorkspaceOperationsCommandEditorSubmission(
|
|
|
162
167
|
},
|
|
163
168
|
};
|
|
164
169
|
}
|
|
170
|
+
if (editor.kind === 'schedule-edit') {
|
|
171
|
+
if (!isAffirmative(readField('confirm'))) return unconfirmed(editor, 'Schedule edit not confirmed. Type yes, then press Enter.');
|
|
172
|
+
const scheduleKind = readField('scheduleKind').trim();
|
|
173
|
+
const scheduleValue = readField('scheduleValue').trim();
|
|
174
|
+
if ((scheduleKind && !scheduleValue) || (!scheduleKind && scheduleValue)) {
|
|
175
|
+
return unconfirmed(editor, 'Schedule type and schedule value must be set together.');
|
|
176
|
+
}
|
|
177
|
+
const hasChange = Boolean(
|
|
178
|
+
scheduleKind
|
|
179
|
+
|| readField('timezone').trim()
|
|
180
|
+
|| readField('scheduleName').trim()
|
|
181
|
+
|| readField('task').trim()
|
|
182
|
+
|| readField('successCriteria').trim()
|
|
183
|
+
|| readField('prompt').trim(),
|
|
184
|
+
);
|
|
185
|
+
if (!hasChange) return unconfirmed(editor, 'Schedule edit needs at least one changed field.');
|
|
186
|
+
const task = readField('task').trim();
|
|
187
|
+
const successCriteria = readField('successCriteria').trim();
|
|
188
|
+
if ((task && !successCriteria) || (!task && successCriteria)) {
|
|
189
|
+
return unconfirmed(editor, 'Task and success criteria must be set together.');
|
|
190
|
+
}
|
|
191
|
+
if (readField('prompt').trim() && task) {
|
|
192
|
+
return unconfirmed(editor, 'Use either Exact prompt or Task, not both.');
|
|
193
|
+
}
|
|
194
|
+
const command = [
|
|
195
|
+
'/schedule edit',
|
|
196
|
+
quoteSlashCommandArg(readField('scheduleId')),
|
|
197
|
+
scheduleKind && scheduleValue ? `--${scheduleKind} ${quoteSlashCommandArg(scheduleValue)}` : '',
|
|
198
|
+
optionalCommandArg('--timezone', readField('timezone')).trim(),
|
|
199
|
+
optionalCommandArg('--name', readField('scheduleName')).trim(),
|
|
200
|
+
optionalCommandArg('--task', readField('task')).trim(),
|
|
201
|
+
optionalCommandArg('--success-criteria', readField('successCriteria')).trim(),
|
|
202
|
+
optionalCommandArg('--prompt', readField('prompt')).trim(),
|
|
203
|
+
'--yes',
|
|
204
|
+
].filter(Boolean).join(' ');
|
|
205
|
+
return {
|
|
206
|
+
kind: 'dispatch',
|
|
207
|
+
command,
|
|
208
|
+
status: 'Opening confirmed schedule edit.',
|
|
209
|
+
actionResult: {
|
|
210
|
+
kind: 'dispatched',
|
|
211
|
+
title: 'Opening confirmed schedule edit',
|
|
212
|
+
detail: 'The workspace handed an explicit connected-host schedule edit to the shell-owned command router.',
|
|
213
|
+
command,
|
|
214
|
+
safety: 'safe',
|
|
215
|
+
},
|
|
216
|
+
};
|
|
217
|
+
}
|
|
165
218
|
if (editor.kind === 'routine-receipt' || editor.kind === 'schedule-receipt') {
|
|
166
219
|
const routine = editor.kind === 'routine-receipt';
|
|
167
220
|
const command = `/${routine ? 'routines' : 'schedule'} receipt ${quoteSlashCommandArg(readField('receiptId'))}`;
|
|
@@ -18,6 +18,7 @@ export type AgentWorkspaceOperationsCommandEditorKind = Extract<
|
|
|
18
18
|
| 'automation-run-cancel'
|
|
19
19
|
| 'automation-run-retry'
|
|
20
20
|
| 'schedule-run'
|
|
21
|
+
| 'schedule-edit'
|
|
21
22
|
| 'routine-receipt'
|
|
22
23
|
| 'schedule-receipt'
|
|
23
24
|
>;
|
|
@@ -39,6 +40,7 @@ export function isAgentWorkspaceOperationsCommandEditorKind(kind: AgentWorkspace
|
|
|
39
40
|
|| kind === 'automation-run-cancel'
|
|
40
41
|
|| kind === 'automation-run-retry'
|
|
41
42
|
|| kind === 'schedule-run'
|
|
43
|
+
|| kind === 'schedule-edit'
|
|
42
44
|
|| kind === 'routine-receipt'
|
|
43
45
|
|| kind === 'schedule-receipt';
|
|
44
46
|
}
|
|
@@ -131,6 +133,26 @@ export function createAgentWorkspaceOperationsCommandEditor(kind: AgentWorkspace
|
|
|
131
133
|
],
|
|
132
134
|
};
|
|
133
135
|
}
|
|
136
|
+
if (kind === 'schedule-edit') {
|
|
137
|
+
return {
|
|
138
|
+
kind,
|
|
139
|
+
mode: 'update',
|
|
140
|
+
title: 'Edit Schedule',
|
|
141
|
+
selectedFieldIndex: 0,
|
|
142
|
+
message: 'Edit one connected-host schedule name, cadence, or prompt. This requires typed confirmation and never creates a hidden local job.',
|
|
143
|
+
fields: [
|
|
144
|
+
{ id: 'scheduleId', label: 'Schedule id', value: '', required: true, multiline: false, hint: 'Schedule id from List schedules or the autonomy queue.' },
|
|
145
|
+
{ id: 'scheduleKind', label: 'Schedule type', value: '', required: false, multiline: false, hint: 'Optional. at, every, or cron. Leave blank to keep cadence.' },
|
|
146
|
+
{ id: 'scheduleValue', label: 'Schedule value', value: '', required: false, multiline: false, hint: 'Required with Schedule type. Examples: 0 9 * * *, 7d, or an ISO timestamp.' },
|
|
147
|
+
{ id: 'timezone', label: 'Timezone', value: '', required: false, multiline: false, hint: 'Optional IANA timezone for cron schedules, for example America/Chicago.' },
|
|
148
|
+
{ id: 'scheduleName', label: 'Schedule name', value: '', required: false, multiline: false, hint: 'Optional replacement display name.' },
|
|
149
|
+
{ id: 'task', label: 'Task', value: '', required: false, multiline: true, hint: 'Optional replacement autonomous task. Ctrl-J inserts a new line.' },
|
|
150
|
+
{ id: 'successCriteria', label: 'Success criteria', value: '', required: false, multiline: true, hint: 'Required with Task so scheduled runs know what success means.' },
|
|
151
|
+
{ id: 'prompt', label: 'Exact prompt', value: '', required: false, multiline: true, hint: 'Optional exact prompt replacement. Do not combine with Task.' },
|
|
152
|
+
{ id: 'confirm', label: 'Confirm', value: '', required: true, multiline: false, hint: 'Type yes to run /schedule edit with --yes.' },
|
|
153
|
+
],
|
|
154
|
+
};
|
|
155
|
+
}
|
|
134
156
|
if (kind === 'plan-approve') {
|
|
135
157
|
return {
|
|
136
158
|
kind,
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import type { AgentWorkspaceActionResult, AgentWorkspaceLocalEditor } from './agent-workspace-types.ts';
|
|
2
|
+
|
|
3
|
+
type AgentWorkspaceFieldReader = (fieldId: string) => string;
|
|
4
|
+
|
|
5
|
+
const SECRETISH = /token|secret|password|authorization|credential|api[-_]?key/i;
|
|
6
|
+
|
|
7
|
+
export interface AgentResearchReportWorkspaceToolArgs {
|
|
8
|
+
readonly title: string;
|
|
9
|
+
readonly question: string;
|
|
10
|
+
readonly summary?: string;
|
|
11
|
+
readonly reportMarkdown?: string;
|
|
12
|
+
readonly sources: readonly {
|
|
13
|
+
readonly title: string;
|
|
14
|
+
readonly url?: string;
|
|
15
|
+
readonly credibility?: string;
|
|
16
|
+
readonly note?: string;
|
|
17
|
+
}[];
|
|
18
|
+
readonly findings?: readonly string[];
|
|
19
|
+
readonly gaps?: readonly string[];
|
|
20
|
+
readonly recommendations?: readonly string[];
|
|
21
|
+
readonly methodology?: string;
|
|
22
|
+
readonly confidence?: string;
|
|
23
|
+
readonly requireCitationCoverage?: boolean;
|
|
24
|
+
readonly visualReport?: boolean;
|
|
25
|
+
readonly tags?: readonly string[];
|
|
26
|
+
readonly confirm: true;
|
|
27
|
+
readonly explicitUserRequest: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function splitList(value: string): readonly string[] {
|
|
31
|
+
return value
|
|
32
|
+
.split(/\n/)
|
|
33
|
+
.map((entry) => entry.replace(/^[-*]\s+/, '').trim())
|
|
34
|
+
.filter(Boolean);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function splitTags(value: string): readonly string[] {
|
|
38
|
+
return value.split(/[,\n]/).map((entry) => entry.trim()).filter(Boolean);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function isAffirmative(value: string): boolean {
|
|
42
|
+
const normalized = value.trim().toLowerCase();
|
|
43
|
+
return normalized === 'yes' || normalized === 'true';
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function sanitizeSourceUrl(value: string): string {
|
|
47
|
+
try {
|
|
48
|
+
const url = new URL(value);
|
|
49
|
+
for (const key of [...url.searchParams.keys()]) {
|
|
50
|
+
if (SECRETISH.test(key)) url.searchParams.set(key, '<redacted>');
|
|
51
|
+
}
|
|
52
|
+
return url.toString();
|
|
53
|
+
} catch {
|
|
54
|
+
return value.replace(/([?&\s](?:token|secret|password|authorization|credential|api[-_]?key)=)[^\s&]+/gi, '$1<redacted>');
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function parseSources(value: string): AgentResearchReportWorkspaceToolArgs['sources'] {
|
|
59
|
+
return splitList(value).map((line) => {
|
|
60
|
+
const parts = line.split('|').map((part) => part.trim()).filter(Boolean);
|
|
61
|
+
const urlIndex = parts.findIndex((part) => /^https?:\/\//i.test(part));
|
|
62
|
+
const url = urlIndex >= 0 ? parts[urlIndex] : '';
|
|
63
|
+
const detailStart = urlIndex >= 0 ? urlIndex + 1 : 1;
|
|
64
|
+
const nonUrlParts = parts.filter((_, index) => index !== urlIndex);
|
|
65
|
+
const title = urlIndex === 0 ? (nonUrlParts.length > 1 ? nonUrlParts[0] : url) : (parts[0] ?? url ?? line);
|
|
66
|
+
const noteParts = parts.slice(detailStart + 1);
|
|
67
|
+
return {
|
|
68
|
+
title: title || line,
|
|
69
|
+
...(url ? { url: sanitizeSourceUrl(url) } : {}),
|
|
70
|
+
...(parts[detailStart] ? { credibility: parts[detailStart] } : {}),
|
|
71
|
+
...(noteParts.length > 0 ? { note: noteParts.join(' | ') } : {}),
|
|
72
|
+
};
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function createAgentResearchReportEditor(): AgentWorkspaceLocalEditor {
|
|
77
|
+
return {
|
|
78
|
+
kind: 'research-report',
|
|
79
|
+
mode: 'create',
|
|
80
|
+
title: 'Save Research Report',
|
|
81
|
+
selectedFieldIndex: 0,
|
|
82
|
+
message: 'Save a reviewed source-grounded report artifact with citation coverage and a visual report packet. Sources are required; this does not ingest knowledge.',
|
|
83
|
+
fields: [
|
|
84
|
+
{ id: 'title', label: 'Title', value: '', required: true, multiline: false, hint: 'Short report title.' },
|
|
85
|
+
{ id: 'question', label: 'Question', value: '', required: true, multiline: true, hint: 'The research question this report answers.' },
|
|
86
|
+
{ id: 'summary', label: 'Summary', value: '', required: false, multiline: true, hint: 'Optional executive summary.' },
|
|
87
|
+
{ id: 'reportMarkdown', label: 'Report markdown', value: '', required: false, multiline: true, hint: 'Full reviewed report body. Use [S1], [S2], etc. for citations when possible.' },
|
|
88
|
+
{ id: 'sources', label: 'Sources', value: '', required: true, multiline: true, hint: 'One per line: title | https://source | high/medium/low | note.' },
|
|
89
|
+
{ id: 'findings', label: 'Findings', value: '', required: false, multiline: true, hint: 'Optional one finding per line.' },
|
|
90
|
+
{ id: 'gaps', label: 'Gaps', value: '', required: false, multiline: true, hint: 'Optional caveats or unresolved questions, one per line.' },
|
|
91
|
+
{ id: 'recommendations', label: 'Recommendations', value: '', required: false, multiline: true, hint: 'Optional next actions, one per line.' },
|
|
92
|
+
{ id: 'methodology', label: 'Method', value: '', required: false, multiline: true, hint: 'How sources were found, filtered, and judged.' },
|
|
93
|
+
{ id: 'confidence', label: 'Confidence', value: 'medium', required: false, multiline: false, hint: 'Overall confidence such as high, medium, low, or mixed.' },
|
|
94
|
+
{ id: 'visualReport', label: 'Visual packet', value: 'yes', required: false, multiline: false, hint: 'Type yes to add at-a-glance, evidence matrix, findings board, dated sources, and handoff checklist sections.' },
|
|
95
|
+
{ id: 'requireCitationCoverage', label: 'Require citations', value: '', required: false, multiline: false, hint: 'Type yes to require every listed source to be cited as [S1], [S2], etc. in the report body.' },
|
|
96
|
+
{ id: 'tags', label: 'Tags', value: 'research', required: false, multiline: false, hint: 'Comma-separated optional artifact tags.' },
|
|
97
|
+
{ id: 'confirm', label: 'Confirm', value: '', required: true, multiline: false, hint: 'Type yes to save this report as an artifact.' },
|
|
98
|
+
],
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export function buildAgentResearchReportToolArgs(
|
|
103
|
+
readField: AgentWorkspaceFieldReader,
|
|
104
|
+
explicitUserRequest: string,
|
|
105
|
+
): AgentResearchReportWorkspaceToolArgs {
|
|
106
|
+
const summary = readField('summary').trim();
|
|
107
|
+
const reportMarkdown = readField('reportMarkdown').trim();
|
|
108
|
+
const findings = splitList(readField('findings'));
|
|
109
|
+
const gaps = splitList(readField('gaps'));
|
|
110
|
+
const recommendations = splitList(readField('recommendations'));
|
|
111
|
+
const methodology = readField('methodology').trim();
|
|
112
|
+
const confidence = readField('confidence').trim();
|
|
113
|
+
const visualReport = isAffirmative(readField('visualReport'));
|
|
114
|
+
const requireCitationCoverage = isAffirmative(readField('requireCitationCoverage'));
|
|
115
|
+
const tags = splitTags(readField('tags'));
|
|
116
|
+
return {
|
|
117
|
+
title: readField('title').trim(),
|
|
118
|
+
question: readField('question').trim(),
|
|
119
|
+
...(summary ? { summary } : {}),
|
|
120
|
+
...(reportMarkdown ? { reportMarkdown } : {}),
|
|
121
|
+
sources: parseSources(readField('sources')),
|
|
122
|
+
...(findings.length > 0 ? { findings } : {}),
|
|
123
|
+
...(gaps.length > 0 ? { gaps } : {}),
|
|
124
|
+
...(recommendations.length > 0 ? { recommendations } : {}),
|
|
125
|
+
...(methodology ? { methodology } : {}),
|
|
126
|
+
...(confidence ? { confidence } : {}),
|
|
127
|
+
...(visualReport ? { visualReport } : {}),
|
|
128
|
+
...(requireCitationCoverage ? { requireCitationCoverage } : {}),
|
|
129
|
+
...(tags.length > 0 ? { tags } : {}),
|
|
130
|
+
confirm: true,
|
|
131
|
+
explicitUserRequest,
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export function buildAgentResearchReportPromptSubmission(
|
|
136
|
+
editor: AgentWorkspaceLocalEditor,
|
|
137
|
+
readField: AgentWorkspaceFieldReader,
|
|
138
|
+
promptDispatchAvailable: boolean,
|
|
139
|
+
): {
|
|
140
|
+
readonly kind: 'editor';
|
|
141
|
+
readonly editor: AgentWorkspaceLocalEditor;
|
|
142
|
+
readonly status: string;
|
|
143
|
+
readonly actionResult?: AgentWorkspaceActionResult;
|
|
144
|
+
} | {
|
|
145
|
+
readonly kind: 'prompt';
|
|
146
|
+
readonly prompt: string;
|
|
147
|
+
readonly status: string;
|
|
148
|
+
readonly actionResult: AgentWorkspaceActionResult;
|
|
149
|
+
} {
|
|
150
|
+
if (!isAffirmative(readField('confirm'))) {
|
|
151
|
+
return {
|
|
152
|
+
kind: 'editor',
|
|
153
|
+
editor: { ...editor, message: 'Type yes to confirm saving this sourced report as an artifact.' },
|
|
154
|
+
status: 'Research report save not confirmed.',
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
if (!promptDispatchAvailable) {
|
|
159
|
+
return {
|
|
160
|
+
kind: 'editor',
|
|
161
|
+
editor: {
|
|
162
|
+
...editor,
|
|
163
|
+
message: 'Prompt dispatch is unavailable in this runtime. Use agent_harness mode:"run_workspace_action" with this editor schema.',
|
|
164
|
+
},
|
|
165
|
+
status: 'Prompt dispatch unavailable.',
|
|
166
|
+
actionResult: {
|
|
167
|
+
kind: 'error',
|
|
168
|
+
title: 'Prompt dispatch unavailable',
|
|
169
|
+
detail: 'This runtime cannot submit research report saving from the workspace form.',
|
|
170
|
+
safety: 'safe',
|
|
171
|
+
},
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
const args = buildAgentResearchReportToolArgs(
|
|
176
|
+
readField,
|
|
177
|
+
'Save a reviewed source-grounded research report as an Agent artifact.',
|
|
178
|
+
);
|
|
179
|
+
const prompt = [
|
|
180
|
+
'Save this reviewed source-grounded research report as an Agent artifact.',
|
|
181
|
+
'Use the `research` tool with these arguments:',
|
|
182
|
+
'action: "report"',
|
|
183
|
+
`title: ${JSON.stringify(args.title)}`,
|
|
184
|
+
`question: ${JSON.stringify(args.question)}`,
|
|
185
|
+
args.summary ? `summary: ${JSON.stringify(args.summary)}` : 'summary: none',
|
|
186
|
+
args.reportMarkdown ? `reportMarkdown: ${JSON.stringify(args.reportMarkdown)}` : 'reportMarkdown: none',
|
|
187
|
+
`sources: ${JSON.stringify(args.sources)}`,
|
|
188
|
+
args.findings ? `findings: ${JSON.stringify(args.findings)}` : 'findings: none',
|
|
189
|
+
args.gaps ? `gaps: ${JSON.stringify(args.gaps)}` : 'gaps: none',
|
|
190
|
+
args.recommendations ? `recommendations: ${JSON.stringify(args.recommendations)}` : 'recommendations: none',
|
|
191
|
+
args.methodology ? `methodology: ${JSON.stringify(args.methodology)}` : 'methodology: none',
|
|
192
|
+
args.confidence ? `confidence: ${JSON.stringify(args.confidence)}` : 'confidence: none',
|
|
193
|
+
args.visualReport ? 'visualReport: true' : 'visualReport: false',
|
|
194
|
+
args.requireCitationCoverage ? 'requireCitationCoverage: true' : 'requireCitationCoverage: false',
|
|
195
|
+
args.tags ? `tags: ${JSON.stringify(args.tags)}` : 'tags: none',
|
|
196
|
+
'confirm: true',
|
|
197
|
+
`explicitUserRequest: ${JSON.stringify(args.explicitUserRequest)}`,
|
|
198
|
+
'Policy: save a sourced report artifact with optional visual packet only; do not ingest knowledge or send external messages.',
|
|
199
|
+
].join('\n');
|
|
200
|
+
|
|
201
|
+
return {
|
|
202
|
+
kind: 'prompt',
|
|
203
|
+
prompt,
|
|
204
|
+
status: 'Submitting research report artifact request.',
|
|
205
|
+
actionResult: {
|
|
206
|
+
kind: 'guidance',
|
|
207
|
+
title: 'Research report artifact',
|
|
208
|
+
detail: 'Submitted a confirmed request to save a reviewed source-grounded report artifact with visual packet.',
|
|
209
|
+
safety: 'safe',
|
|
210
|
+
},
|
|
211
|
+
};
|
|
212
|
+
}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import type { AgentWorkspaceActionResult, AgentWorkspaceLocalEditor } from './agent-workspace-types.ts';
|
|
2
|
+
|
|
3
|
+
type AgentWorkspaceFieldReader = (fieldId: string) => string;
|
|
4
|
+
|
|
5
|
+
export interface AgentResearchRunWorkspaceToolArgs {
|
|
6
|
+
readonly mode: 'create';
|
|
7
|
+
readonly title: string;
|
|
8
|
+
readonly question: string;
|
|
9
|
+
readonly goal?: string;
|
|
10
|
+
readonly plan?: readonly string[];
|
|
11
|
+
readonly nextSteps?: readonly string[];
|
|
12
|
+
readonly sourceIds?: readonly string[];
|
|
13
|
+
readonly note?: string;
|
|
14
|
+
readonly confirm: true;
|
|
15
|
+
readonly explicitUserRequest: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function splitList(value: string): readonly string[] {
|
|
19
|
+
return value
|
|
20
|
+
.split(/[\n,]/)
|
|
21
|
+
.map((entry) => entry.replace(/^[-*]\s+/, '').trim())
|
|
22
|
+
.filter(Boolean);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function isAffirmative(value: string): boolean {
|
|
26
|
+
const normalized = value.trim().toLowerCase();
|
|
27
|
+
return normalized === 'yes' || normalized === 'true';
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export function createAgentResearchRunEditor(): AgentWorkspaceLocalEditor {
|
|
31
|
+
return {
|
|
32
|
+
kind: 'research-run',
|
|
33
|
+
mode: 'create',
|
|
34
|
+
title: 'Start Research Run',
|
|
35
|
+
selectedFieldIndex: 0,
|
|
36
|
+
message: 'Create a visible checkpointable research run. This records local run state only; web research, source review, reports, and Knowledge ingest stay separate.',
|
|
37
|
+
fields: [
|
|
38
|
+
{ id: 'title', label: 'Title', value: '', required: true, multiline: false, hint: 'Short name for this research run.' },
|
|
39
|
+
{ id: 'question', label: 'Question', value: '', required: true, multiline: true, hint: 'Research question the run should answer.' },
|
|
40
|
+
{ id: 'goal', label: 'Goal', value: '', required: false, multiline: true, hint: 'User-visible outcome. Defaults to the question.' },
|
|
41
|
+
{ id: 'plan', label: 'Plan', value: '', required: false, multiline: true, hint: 'One research step per line. Ctrl-J inserts a new line.' },
|
|
42
|
+
{ id: 'nextSteps', label: 'Next steps', value: '', required: false, multiline: true, hint: 'Immediate next actions to keep the run resumable.' },
|
|
43
|
+
{ id: 'sourceIds', label: 'Source ids', value: '', required: false, multiline: false, hint: 'Optional comma-separated local source ids already known.' },
|
|
44
|
+
{ id: 'note', label: 'Note', value: '', required: false, multiline: true, hint: 'Optional context, caveat, or initial checkpoint note.' },
|
|
45
|
+
{ id: 'confirm', label: 'Confirm', value: '', required: true, multiline: false, hint: 'Type yes to create the visible local run.' },
|
|
46
|
+
],
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function buildAgentResearchRunToolArgs(
|
|
51
|
+
readField: AgentWorkspaceFieldReader,
|
|
52
|
+
explicitUserRequest: string,
|
|
53
|
+
): AgentResearchRunWorkspaceToolArgs {
|
|
54
|
+
const goal = readField('goal').trim();
|
|
55
|
+
const plan = splitList(readField('plan'));
|
|
56
|
+
const nextSteps = splitList(readField('nextSteps'));
|
|
57
|
+
const sourceIds = splitList(readField('sourceIds'));
|
|
58
|
+
const note = readField('note').trim();
|
|
59
|
+
return {
|
|
60
|
+
mode: 'create',
|
|
61
|
+
title: readField('title').trim(),
|
|
62
|
+
question: readField('question').trim(),
|
|
63
|
+
...(goal ? { goal } : {}),
|
|
64
|
+
...(plan.length > 0 ? { plan } : {}),
|
|
65
|
+
...(nextSteps.length > 0 ? { nextSteps } : {}),
|
|
66
|
+
...(sourceIds.length > 0 ? { sourceIds } : {}),
|
|
67
|
+
...(note ? { note } : {}),
|
|
68
|
+
confirm: true,
|
|
69
|
+
explicitUserRequest,
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function buildAgentResearchRunPromptSubmission(
|
|
74
|
+
editor: AgentWorkspaceLocalEditor,
|
|
75
|
+
readField: AgentWorkspaceFieldReader,
|
|
76
|
+
promptDispatchAvailable: boolean,
|
|
77
|
+
): {
|
|
78
|
+
readonly kind: 'editor';
|
|
79
|
+
readonly editor: AgentWorkspaceLocalEditor;
|
|
80
|
+
readonly status: string;
|
|
81
|
+
readonly actionResult?: AgentWorkspaceActionResult;
|
|
82
|
+
} | {
|
|
83
|
+
readonly kind: 'prompt';
|
|
84
|
+
readonly prompt: string;
|
|
85
|
+
readonly status: string;
|
|
86
|
+
readonly actionResult: AgentWorkspaceActionResult;
|
|
87
|
+
} {
|
|
88
|
+
if (!isAffirmative(readField('confirm'))) {
|
|
89
|
+
return {
|
|
90
|
+
kind: 'editor',
|
|
91
|
+
editor: { ...editor, message: 'Type yes to create this visible local research run.' },
|
|
92
|
+
status: 'Research run creation not confirmed.',
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
if (!promptDispatchAvailable) {
|
|
97
|
+
return {
|
|
98
|
+
kind: 'editor',
|
|
99
|
+
editor: {
|
|
100
|
+
...editor,
|
|
101
|
+
message: 'Prompt dispatch is unavailable in this runtime. Use research action:"create_run" with these fields.',
|
|
102
|
+
},
|
|
103
|
+
status: 'Prompt dispatch unavailable.',
|
|
104
|
+
actionResult: {
|
|
105
|
+
kind: 'error',
|
|
106
|
+
title: 'Prompt dispatch unavailable',
|
|
107
|
+
detail: 'This runtime cannot submit research run creation from the workspace form.',
|
|
108
|
+
safety: 'safe',
|
|
109
|
+
},
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
const args = buildAgentResearchRunToolArgs(
|
|
114
|
+
readField,
|
|
115
|
+
'Create one visible checkpointable local research run.',
|
|
116
|
+
);
|
|
117
|
+
const prompt = [
|
|
118
|
+
'Create this visible checkpointable local research run.',
|
|
119
|
+
'Use the `research` tool with these arguments:',
|
|
120
|
+
'action: "create_run"',
|
|
121
|
+
`title: ${JSON.stringify(args.title)}`,
|
|
122
|
+
`question: ${JSON.stringify(args.question)}`,
|
|
123
|
+
args.goal ? `goal: ${JSON.stringify(args.goal)}` : 'goal: none',
|
|
124
|
+
args.plan ? `plan: ${JSON.stringify(args.plan)}` : 'plan: none',
|
|
125
|
+
args.nextSteps ? `nextSteps: ${JSON.stringify(args.nextSteps)}` : 'nextSteps: none',
|
|
126
|
+
args.sourceIds ? `sourceIds: ${JSON.stringify(args.sourceIds)}` : 'sourceIds: none',
|
|
127
|
+
args.note ? `note: ${JSON.stringify(args.note)}` : 'note: none',
|
|
128
|
+
'confirm: true',
|
|
129
|
+
`explicitUserRequest: ${JSON.stringify(args.explicitUserRequest)}`,
|
|
130
|
+
'Policy: local visible run state only; do not perform web research, save a report, ingest Knowledge, or send external messages.',
|
|
131
|
+
].join('\n');
|
|
132
|
+
|
|
133
|
+
return {
|
|
134
|
+
kind: 'prompt',
|
|
135
|
+
prompt,
|
|
136
|
+
status: 'Submitting research run creation request.',
|
|
137
|
+
actionResult: {
|
|
138
|
+
kind: 'guidance',
|
|
139
|
+
title: 'Research run',
|
|
140
|
+
detail: 'Submitted a request to create a visible checkpointable local research run.',
|
|
141
|
+
safety: 'safe',
|
|
142
|
+
},
|
|
143
|
+
};
|
|
144
|
+
}
|