@xopcai/xopc 0.0.110 → 0.0.112
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/README.md +46 -4
- package/README.zh-CN.md +46 -4
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/feishu/src/outbound/media-load.js +1 -1
- package/dist/extensions/feishu/src/workflow-progress.js +1 -1
- package/dist/extensions/telegram/src/adapters/streaming-adapter.js +1 -1
- package/dist/extensions/telegram/src/inbound-processor.js +1 -1
- package/dist/extensions/telegram/src/plugin.js +1 -1
- package/dist/extensions/telegram/src/routing-integration.js +2 -2
- package/dist/extensions/telegram/src/update-offset-store.js +1 -1
- package/dist/extensions/telegram/src/workflow-progress.js +1 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/extensions/weixin/src/api/api.js +2 -2
- package/dist/extensions/weixin/src/auth/accounts.js +1 -1
- package/dist/extensions/weixin/src/cdn/upload.js +1 -1
- package/dist/extensions/weixin/src/media/data-url.js +1 -1
- package/dist/extensions/weixin/src/messaging/debug-mode.js +1 -1
- package/dist/extensions/weixin/src/messaging/inbound.js +1 -1
- package/dist/extensions/weixin/src/messaging/process-message.js +1 -1
- package/dist/extensions/weixin/src/plugin.js +1 -1
- package/dist/extensions/weixin/src/storage/sync-buf.js +1 -1
- package/dist/extensions/weixin/src/workflow-progress.js +1 -1
- package/dist/gateway/static/root/apple-touch-icon.png +0 -0
- package/dist/gateway/static/root/assets/Combination-BzaXOLd9.js +41 -0
- package/dist/gateway/static/root/assets/agent-avatar-dicebear-EhRp-ZMa.js +1 -0
- package/dist/gateway/static/root/assets/agent-browser-settings-page-H4foVCiS.js +6 -0
- package/dist/gateway/static/root/assets/agent-defaults-tabbed-page-DDNw2oNU.js +1 -0
- package/dist/gateway/static/root/assets/agents-E_X2kzS1.js +71 -0
- package/dist/gateway/static/root/assets/app-management-settings-panel-BIy7KEsM.js +1 -0
- package/dist/gateway/static/root/assets/appearance-settings-DGQG8NwA.js +1 -0
- package/dist/gateway/static/root/assets/apps-page-BZLvInLr.js +1 -0
- package/dist/gateway/static/root/assets/archive-plugin-uuQPupqx.js +1 -0
- package/dist/gateway/static/root/assets/attachment-load-DBkv0cAv.js +2 -0
- package/dist/gateway/static/root/assets/{attachment-preview-renderer-CybMSIoS.js → attachment-preview-renderer-DonnL2dL.js} +1 -1
- package/dist/gateway/static/root/assets/binary-plugins-DxxN_VAR.js +2 -0
- package/dist/gateway/static/root/assets/block-editor-CwnUlRmO.js +180 -0
- package/dist/gateway/static/root/assets/channels-settings-BHvUKlzw.js +1 -0
- package/dist/gateway/static/root/assets/cn-JdwAhgNB.js +1 -0
- package/dist/gateway/static/root/assets/code-editor-dZTY2dRW.js +1 -0
- package/dist/gateway/static/root/assets/config-api-BD-NcD5d.js +3 -0
- package/dist/gateway/static/root/assets/config-reload-event-Bjh2zoKp.js +1 -0
- package/dist/gateway/static/root/assets/connectors-settings-VBzXcEXL.js +2 -0
- package/dist/gateway/static/root/assets/cron-api-C5DoipZA.js +1 -0
- package/dist/gateway/static/root/assets/cron-dreaming-jobs-nCMWCf0p.js +1 -0
- package/dist/gateway/static/root/assets/cron-page-BLTpdm34.js +3 -0
- package/dist/gateway/static/root/assets/dist-By6Rh2ee.js +1 -0
- package/dist/gateway/static/root/assets/dist-CkobR7mk.js +1 -0
- package/dist/gateway/static/root/assets/dist-DokQNVMQ.js +1 -0
- package/dist/gateway/static/root/assets/dreaming-scene-BHMRVEUS.js +4585 -0
- package/dist/gateway/static/root/assets/dreaming-settings-DSVhXTPq.js +1 -0
- package/dist/gateway/static/root/assets/extension-debug-page-BDHA9o_e.js +1 -0
- package/dist/gateway/static/root/assets/{extension-page-W1wiG38F.js → extension-page-DmDLVSPE.js} +1 -1
- package/dist/gateway/static/root/assets/extension-settings-page-1124aHw_.js +1 -0
- package/dist/gateway/static/root/assets/fetch-DOe56Wmy.js +1 -0
- package/dist/gateway/static/root/assets/format-cron-label-BsotZDO5.js +2 -0
- package/dist/gateway/static/root/assets/format-interval-label-tsMSvBSR.js +1 -0
- package/dist/gateway/static/root/assets/gateway-config-api-CsD4FC9D.js +1 -0
- package/dist/gateway/static/root/assets/gateway-settings-HQ8FBhY2.js +1 -0
- package/dist/gateway/static/root/assets/gateway-startup-retry-C1zg7pH3.js +1 -0
- package/dist/gateway/static/root/assets/goal-detail-page-BG3Onph0.js +1 -0
- package/dist/gateway/static/root/assets/goals-page-DgeKn8zL.js +2 -0
- package/dist/gateway/static/root/assets/goals-settings-B5nI6lgz.js +1 -0
- package/dist/gateway/static/root/assets/heartbeat-config-api-CIv42nJD.js +1 -0
- package/dist/gateway/static/root/assets/heartbeat-settings-DFcVuJ3M.js +1 -0
- package/dist/gateway/static/root/assets/html-workspace-editor-CQLWDiwE.js +1 -0
- package/dist/gateway/static/root/assets/index-5A_ZaABy.css +1 -0
- package/dist/gateway/static/root/assets/index-BTmbp2AU.js +121 -0
- package/dist/gateway/static/root/assets/interval-presets-DGP3S7OB.js +1 -0
- package/dist/gateway/static/root/assets/keyboard-shortcuts-settings-fETaDYQP.js +1 -0
- package/dist/gateway/static/root/assets/locale-store-DjbfSsfA.js +1 -0
- package/dist/gateway/static/root/assets/logs-page-B1-b27lK.js +2 -0
- package/dist/gateway/static/root/assets/markdown-editor-AssmZFx4.js +2 -0
- package/dist/gateway/static/root/assets/markdown-split-CgeBJMOD.js +1 -0
- package/dist/gateway/static/root/assets/media-plugins-C30GzlV2.js +1 -0
- package/dist/gateway/static/root/assets/mermaid-render-BbqDc_LQ.js +134 -0
- package/dist/gateway/static/root/assets/messages-BUUfPaZ9.js +3 -0
- package/dist/gateway/static/root/assets/middleware-Pd0e8Igk.js +1 -0
- package/dist/gateway/static/root/assets/models-hub-panel-DPcTS1-u.js +2 -0
- package/dist/gateway/static/root/assets/note-detail-page-xeGb4owe.js +2 -0
- package/dist/gateway/static/root/assets/note-image-lightbox-t1g0qZYh.js +1 -0
- package/dist/gateway/static/root/assets/note-time-hm6JO_Wi.js +1 -0
- package/dist/gateway/static/root/assets/notes-page-C_TdnKBe.js +1 -0
- package/dist/gateway/static/root/assets/preview-open-alternatives-DeWp9x5g.js +1 -0
- package/dist/gateway/static/root/assets/remote-access-hub-BtkPmJIN.js +1 -0
- package/dist/gateway/static/root/assets/save-bar-controls-BOaAOJI3.js +1 -0
- package/dist/gateway/static/root/assets/schedule-field-BLWLKqgw.js +1 -0
- package/dist/gateway/static/root/assets/schema-form-plqRFYT8.js +1 -0
- package/dist/gateway/static/root/assets/sessions-page-DOUjxzJm.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-qK_bnTrw.js +1 -0
- package/dist/gateway/static/root/assets/settings-collapsible-section-BP5zRrDI.js +1 -0
- package/dist/gateway/static/root/assets/settings-form-section-Bv8MZplG.js +1 -0
- package/dist/gateway/static/root/assets/settings-page-DmDfE1ww.js +1 -0
- package/dist/gateway/static/root/assets/setup-status-panel-BEFwNcIZ.js +1 -0
- package/dist/gateway/static/root/assets/share-preview-page-4OX1YCgp.js +2 -0
- package/dist/gateway/static/root/assets/shares-settings-CbKmJZot.js +1 -0
- package/dist/gateway/static/root/assets/skill-reload-api-YdtnUHtK.js +1 -0
- package/dist/gateway/static/root/assets/skills-page-DwW1IzQ0.js +2 -0
- package/dist/gateway/static/root/assets/system-settings-panel-CGy4f_s2.js +1 -0
- package/dist/gateway/static/root/assets/theme-store-CD2wtgZV.js +1 -0
- package/dist/gateway/static/root/assets/use-agent-defaults-form-BMuMvzl_.js +1 -0
- package/dist/gateway/static/root/assets/use-blob-object-url-D4BFuzZB.js +1 -0
- package/dist/gateway/static/root/assets/use-channel-catalog-CjGHnDvN.js +1 -0
- package/dist/gateway/static/root/assets/use-settings-tab-guard-BMMFa0oA.js +1 -0
- package/dist/gateway/static/root/assets/vendor-codemirror-CNP1wPe7.js +45 -0
- package/dist/gateway/static/root/assets/voice-api-key-field-DnRbhMNq.js +1 -0
- package/dist/gateway/static/root/assets/voice-player-store-D5vzWwls.js +1 -0
- package/dist/gateway/static/root/assets/{workflow-page.utils-EYg_xBQS.js → workflow-page.utils-tjGpRVnw.js} +1 -1
- package/dist/gateway/static/root/assets/workflows-page-DqqHKGj2.js +18 -0
- package/dist/gateway/static/root/favicon-16x16.png +0 -0
- package/dist/gateway/static/root/favicon-32x32.png +0 -0
- package/dist/gateway/static/root/favicon.ico +0 -0
- package/dist/gateway/static/root/favicon.svg +14 -12
- package/dist/gateway/static/root/index.html +18 -15
- package/dist/package.js +1 -1
- package/dist/src/agent/agent-manager.d.ts +28 -2
- package/dist/src/agent/agent-manager.js +82 -11
- package/dist/src/agent/agent-manager.js.map +1 -1
- package/dist/src/agent/agent-scope.js +1 -1
- package/dist/src/agent/bootstrap/load-bootstrap-files.js +1 -1
- package/dist/src/agent/context/workspace-seed.js +2 -2
- package/dist/src/agent/context/workspace-state.js +1 -1
- package/dist/src/agent/context/workspace.js +1 -1
- package/dist/src/agent/goals/checklist-judge.d.ts +5 -0
- package/dist/src/agent/goals/checklist-judge.js +26 -2
- package/dist/src/agent/goals/checklist-judge.js.map +1 -1
- package/dist/src/agent/goals/evaluate-turn.d.ts +5 -1
- package/dist/src/agent/goals/evaluate-turn.js +29 -3
- package/dist/src/agent/goals/evaluate-turn.js.map +1 -1
- package/dist/src/agent/goals/goal-locale.d.ts +0 -2
- package/dist/src/agent/goals/goal-locale.js +3 -16
- package/dist/src/agent/goals/goal-locale.js.map +1 -1
- package/dist/src/agent/goals/persistent-goal-service.d.ts +9 -0
- package/dist/src/agent/goals/persistent-goal-service.js +3 -2
- package/dist/src/agent/goals/persistent-goal-service.js.map +1 -1
- package/dist/src/agent/goals/post-turn.d.ts +7 -0
- package/dist/src/agent/goals/post-turn.js +70 -25
- package/dist/src/agent/goals/post-turn.js.map +1 -1
- package/dist/src/agent/goals/state.d.ts +0 -5
- package/dist/src/agent/goals/state.js +1 -96
- package/dist/src/agent/goals/state.js.map +1 -1
- package/dist/src/agent/image/load-image-media.js +2 -2
- package/dist/src/agent/ipc/inbox.js +3 -3
- package/dist/src/agent/ipc/socket.js +1 -1
- package/dist/src/agent/mcp/bundle-mcp-materialize.js +1 -1
- package/dist/src/agent/mcp/bundle-mcp-runtime.js +1 -1
- package/dist/src/agent/mcp/mcp-transport-config.js +1 -1
- package/dist/src/agent/mcp/mcp-transport.js +1 -1
- package/dist/src/agent/memory/builtin-memory-store.js +1 -1
- package/dist/src/agent/memory/dreaming/deep-promotion.js +1 -1
- package/dist/src/agent/memory/dreaming/events.js +1 -1
- package/dist/src/agent/memory/dreaming/last-run.js +1 -1
- package/dist/src/agent/memory/dreaming/light-sweep.js +1 -1
- package/dist/src/agent/memory/dreaming/preview.js +1 -1
- package/dist/src/agent/memory/dreaming/rem-patterns.js +1 -1
- package/dist/src/agent/memory/dreaming/short-term-store.js +1 -1
- package/dist/src/agent/memory/dreaming/utils.js +1 -1
- package/dist/src/agent/memory/memory-flush.js +1 -1
- package/dist/src/agent/memory/plugin-discovery.js +1 -1
- package/dist/src/agent/messaging/command-handler.d.ts +7 -0
- package/dist/src/agent/messaging/command-handler.js +11 -2
- package/dist/src/agent/messaging/command-handler.js.map +1 -1
- package/dist/src/agent/models/manager.js +1 -1
- package/dist/src/agent/prompt/memory/index.js +1 -1
- package/dist/src/agent/prompt/service-prompt-builder.js +2 -2
- package/dist/src/agent/reply/post-compaction-context.js +1 -1
- package/dist/src/agent/reply/workspace-boundary-read.js +1 -1
- package/dist/src/agent/sandbox/path-policy.js +2 -2
- package/dist/src/agent/service/direct-turn-helpers.d.ts +2 -0
- package/dist/src/agent/service/direct-turn-helpers.js +3 -2
- package/dist/src/agent/service/direct-turn-helpers.js.map +1 -1
- package/dist/src/agent/service/process-direct-streaming.js +10 -1
- package/dist/src/agent/service/process-direct-streaming.js.map +1 -1
- package/dist/src/agent/service/reconcile-dreaming-cron.js +8 -5
- package/dist/src/agent/service/reconcile-dreaming-cron.js.map +1 -1
- package/dist/src/agent/service.d.ts +2 -1
- package/dist/src/agent/service.js +30 -6
- package/dist/src/agent/service.js.map +1 -1
- package/dist/src/agent/service.types.d.ts +12 -0
- package/dist/src/agent/session/session-config-service.d.ts +8 -0
- package/dist/src/agent/session/session-config-service.js +20 -0
- package/dist/src/agent/session/session-config-service.js.map +1 -1
- package/dist/src/agent/session/session-inspector.js +1 -1
- package/dist/src/agent/skills/config.js +2 -2
- package/dist/src/agent/skills/filesystem-watcher.d.ts +19 -0
- package/dist/src/agent/skills/filesystem-watcher.js +182 -0
- package/dist/src/agent/skills/filesystem-watcher.js.map +1 -0
- package/dist/src/agent/skills/hub-hash.js +2 -2
- package/dist/src/agent/skills/hub-lock.js +1 -1
- package/dist/src/agent/skills/hub-pull.js +30 -36
- package/dist/src/agent/skills/hub-pull.js.map +1 -1
- package/dist/src/agent/skills/index.js +82 -38
- package/dist/src/agent/skills/index.js.map +1 -1
- package/dist/src/agent/skills/installer.js +2 -2
- package/dist/src/agent/skills/managed-store.d.ts +19 -0
- package/dist/src/agent/skills/managed-store.js +97 -38
- package/dist/src/agent/skills/managed-store.js.map +1 -1
- package/dist/src/agent/skills/skill-manage-ops.js +1 -1
- package/dist/src/agent/skills/skill-manager.d.ts +16 -6
- package/dist/src/agent/skills/skill-manager.js +79 -24
- package/dist/src/agent/skills/skill-manager.js.map +1 -1
- package/dist/src/agent/skills/skill-view-path.js +1 -1
- package/dist/src/agent/skills/test-framework.js +1 -1
- package/dist/src/agent/skills/types.d.ts +11 -0
- package/dist/src/agent/skills/watcher.js +1 -1
- package/dist/src/agent/starter-agents.js +1 -1
- package/dist/src/agent/tools/cronjob-tool.d.ts +8 -3
- package/dist/src/agent/tools/cronjob-tool.js +82 -24
- package/dist/src/agent/tools/cronjob-tool.js.map +1 -1
- package/dist/src/agent/tools/dreaming-tool.js +1 -1
- package/dist/src/agent/tools/edit.d.ts +2 -0
- package/dist/src/agent/tools/edit.js +10 -0
- package/dist/src/agent/tools/edit.js.map +1 -1
- package/dist/src/agent/tools/factory.js +17 -4
- package/dist/src/agent/tools/factory.js.map +1 -1
- package/dist/src/agent/tools/find.js +1 -1
- package/dist/src/agent/tools/goal-evidence-recorder.d.ts +6 -0
- package/dist/src/agent/tools/goal-evidence-recorder.js +34 -0
- package/dist/src/agent/tools/goal-evidence-recorder.js.map +1 -0
- package/dist/src/agent/tools/goal-tool.d.ts +19 -0
- package/dist/src/agent/tools/goal-tool.js +101 -0
- package/dist/src/agent/tools/goal-tool.js.map +1 -0
- package/dist/src/agent/tools/grep.js +1 -1
- package/dist/src/agent/tools/image-generate-tool.js +1 -1
- package/dist/src/agent/tools/index.d.ts +1 -0
- package/dist/src/agent/tools/index.js +2 -1
- package/dist/src/agent/tools/shell.d.ts +2 -0
- package/dist/src/agent/tools/shell.js +17 -2
- package/dist/src/agent/tools/shell.js.map +1 -1
- package/dist/src/agent/tools/skill-manage-tool.js +1 -1
- package/dist/src/agent/tools/workflow-tool.d.ts +1 -0
- package/dist/src/agent/tools/workflow-tool.js +11 -3
- package/dist/src/agent/tools/workflow-tool.js.map +1 -1
- package/dist/src/agent/tools/write.d.ts +2 -0
- package/dist/src/agent/tools/write.js +11 -0
- package/dist/src/agent/tools/write.js.map +1 -1
- package/dist/src/agent/workflow/catalog.js +1 -1
- package/dist/src/agent/workspace-runtime/registry.d.ts +5 -0
- package/dist/src/agent/workspace-runtime/registry.js +7 -0
- package/dist/src/agent/workspace-runtime/registry.js.map +1 -1
- package/dist/src/ai-assist/text-assist.d.ts +39 -0
- package/dist/src/ai-assist/text-assist.js +234 -0
- package/dist/src/ai-assist/text-assist.js.map +1 -0
- package/dist/src/auth/credentials.js +2 -2
- package/dist/src/auth/profiles/store.js +2 -2
- package/dist/src/auth/sync-provider-auth.js +1 -1
- package/dist/src/browser/cache-dir-policy.js +1 -1
- package/dist/src/browser/cdp-local-launcher.js +2 -2
- package/dist/src/browser/providers/browser-ext-install.js +4 -4
- package/dist/src/browser/providers/cloakbrowser.js +5 -5
- package/dist/src/browser/providers/playwright-doctor.js +1 -1
- package/dist/src/browser/stealth.js +1 -1
- package/dist/src/channels/attachments/inbound-persist.d.ts +7 -0
- package/dist/src/channels/attachments/inbound-persist.js +20 -2
- package/dist/src/channels/attachments/inbound-persist.js.map +1 -1
- package/dist/src/channels/outbound/persist-store.js +1 -1
- package/dist/src/channels/pairing/allow-from-file.js +1 -1
- package/dist/src/channels/pairing/pairing-store.js +2 -2
- package/dist/src/chat-commands/agent-edit.js +2 -2
- package/dist/src/chat-commands/builtins/config.js +3 -3
- package/dist/src/chat-commands/builtins/goal.d.ts +1 -1
- package/dist/src/chat-commands/builtins/goal.js +55 -97
- package/dist/src/chat-commands/builtins/goal.js.map +1 -1
- package/dist/src/chat-commands/builtins/subgoal.d.ts +1 -1
- package/dist/src/chat-commands/builtins/subgoal.js +49 -108
- package/dist/src/chat-commands/builtins/subgoal.js.map +1 -1
- package/dist/src/chat-commands/builtins/system.js +11 -4
- package/dist/src/chat-commands/builtins/system.js.map +1 -1
- package/dist/src/chat-commands/builtins/workflow.js +132 -8
- package/dist/src/chat-commands/builtins/workflow.js.map +1 -1
- package/dist/src/chat-commands/context.d.ts +6 -0
- package/dist/src/chat-commands/context.js +12 -0
- package/dist/src/chat-commands/context.js.map +1 -1
- package/dist/src/chat-commands/types.d.ts +7 -0
- package/dist/src/cli/command-catalog.js +43 -0
- package/dist/src/cli/command-catalog.js.map +1 -1
- package/dist/src/cli/command-loaders.js +1 -0
- package/dist/src/cli/command-loaders.js.map +1 -1
- package/dist/src/cli/command-manifest.js +4 -0
- package/dist/src/cli/command-manifest.js.map +1 -1
- package/dist/src/cli/commands/config.js +1 -1
- package/dist/src/cli/commands/cron.js +55 -16
- package/dist/src/cli/commands/cron.js.map +1 -1
- package/dist/src/cli/commands/doctor/checks/config-health.js +1 -1
- package/dist/src/cli/commands/doctor/checks/cron-health.js +2 -83
- package/dist/src/cli/commands/doctor/checks/cron-health.js.map +1 -1
- package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
- package/dist/src/cli/commands/doctor/checks/provider-auth.js +1 -1
- package/dist/src/cli/commands/doctor/checks/state-integrity.js +1 -1
- package/dist/src/cli/commands/doctor/checks/workspace-status.js +1 -1
- package/dist/src/cli/commands/extension-create.js +1 -1
- package/dist/src/cli/commands/extension-dev.js +2 -2
- package/dist/src/cli/commands/extension-marketplace.js +2 -2
- package/dist/src/cli/commands/extension-pack.js +2 -2
- package/dist/src/cli/commands/extension.js +3 -3
- package/dist/src/cli/commands/gateway/logs.js +1 -1
- package/dist/src/cli/commands/goal.d.ts +4 -0
- package/dist/src/cli/commands/goal.js +213 -0
- package/dist/src/cli/commands/goal.js.map +1 -0
- package/dist/src/cli/commands/image.js +1 -1
- package/dist/src/cli/commands/init.js +2 -2
- package/dist/src/cli/commands/models.js +1 -1
- package/dist/src/cli/commands/onboard.js +11 -5
- package/dist/src/cli/commands/onboard.js.map +1 -1
- package/dist/src/cli/commands/skills-test.js +1 -1
- package/dist/src/cli/templates.js +1 -1
- package/dist/src/cli/utils/gateway-client.js +1 -1
- package/dist/src/cli/utils/init-workspace-core.js +2 -2
- package/dist/src/config/agent-profile.js +1 -1
- package/dist/src/config/agent-typed-models.js +1 -1
- package/dist/src/config/gateway-bind.js +1 -1
- package/dist/src/config/index.js +8 -8
- package/dist/src/config/loader.js +4 -4
- package/dist/src/config/models-json.js +2 -2
- package/dist/src/config/paths-state.js +1 -1
- package/dist/src/config/paths.js +1 -1
- package/dist/src/config/profile.js +1 -1
- package/dist/src/config/reload.js +1 -1
- package/dist/src/config/schema.d.ts +115 -2
- package/dist/src/config/schema.js +63 -7
- package/dist/src/config/schema.js.map +1 -1
- package/dist/src/config/web-patch.d.ts +14 -1
- package/dist/src/config/web-patch.js +45 -8
- package/dist/src/config/web-patch.js.map +1 -1
- package/dist/src/config/workspace-path.js +1 -1
- package/dist/src/cron/executor.d.ts +2 -0
- package/dist/src/cron/executor.js +126 -70
- package/dist/src/cron/executor.js.map +1 -1
- package/dist/src/cron/index.d.ts +1 -1
- package/dist/src/cron/index.js +3 -3
- package/dist/src/cron/job-content.js +1 -0
- package/dist/src/cron/job-content.js.map +1 -1
- package/dist/src/cron/run-log-store.d.ts +1 -0
- package/dist/src/cron/run-log-store.js +4 -2
- package/dist/src/cron/run-log-store.js.map +1 -1
- package/dist/src/cron/schedule.d.ts +10 -0
- package/dist/src/cron/schedule.js +85 -0
- package/dist/src/cron/schedule.js.map +1 -0
- package/dist/src/cron/service.d.ts +34 -77
- package/dist/src/cron/service.js +327 -264
- package/dist/src/cron/service.js.map +1 -1
- package/dist/src/cron/types.d.ts +97 -49
- package/dist/src/cron/validation.d.ts +374 -86
- package/dist/src/cron/validation.js +156 -129
- package/dist/src/cron/validation.js.map +1 -1
- package/dist/src/cron/workflow-run-completion.js +1 -1
- package/dist/src/daemon/constants.js +1 -1
- package/dist/src/daemon/install-plan.js +2 -2
- package/dist/src/daemon/launchd.js +2 -2
- package/dist/src/daemon/schtasks.js +2 -2
- package/dist/src/daemon/systemd.js +2 -2
- package/dist/src/extensions/bundle-mcp.js +1 -1
- package/dist/src/extensions/discover-extensions.js +2 -2
- package/dist/src/extensions/health.js +1 -1
- package/dist/src/extensions/install.js +2 -2
- package/dist/src/extensions/loader.js +2 -2
- package/dist/src/extensions/lockfile.js +3 -3
- package/dist/src/extensions/security.js +1 -1
- package/dist/src/extensions/update.js +2 -2
- package/dist/src/gateway/agents-admin.js +2 -2
- package/dist/src/gateway/chat-stream/mapper.d.ts +1 -0
- package/dist/src/gateway/chat-stream/mapper.js +6 -2
- package/dist/src/gateway/chat-stream/mapper.js.map +1 -1
- package/dist/src/gateway/chat-stream/protocol.d.ts +2 -0
- package/dist/src/gateway/file-path-classifier.js +2 -2
- package/dist/src/gateway/hono/lib/config-payload.d.ts +14 -1
- package/dist/src/gateway/hono/lib/config-payload.js +1 -1
- package/dist/src/gateway/hono/lib/extension-store.js +2 -2
- package/dist/src/gateway/hono/lib/static-ui.js +2 -2
- package/dist/src/gateway/hono/oauth-async.js +1 -1
- package/dist/src/gateway/hono/routes/agents.js +1 -1
- package/dist/src/gateway/hono/routes/ai-assist.d.ts +3 -0
- package/dist/src/gateway/hono/routes/ai-assist.js +66 -0
- package/dist/src/gateway/hono/routes/ai-assist.js.map +1 -0
- package/dist/src/gateway/hono/routes/auth-registry-extensions.js +1 -1
- package/dist/src/gateway/hono/routes/commands-skills.js +7 -0
- package/dist/src/gateway/hono/routes/commands-skills.js.map +1 -1
- package/dist/src/gateway/hono/routes/config-patch/misc.js +1 -1
- package/dist/src/gateway/hono/routes/cron.js +24 -5
- package/dist/src/gateway/hono/routes/cron.js.map +1 -1
- package/dist/src/gateway/hono/routes/dreaming.js +1 -1
- package/dist/src/gateway/hono/routes/goals.d.ts +1 -1
- package/dist/src/gateway/hono/routes/goals.js +670 -173
- package/dist/src/gateway/hono/routes/goals.js.map +1 -1
- package/dist/src/gateway/hono/routes/home.d.ts +5 -0
- package/dist/src/gateway/hono/routes/home.js +90 -3
- package/dist/src/gateway/hono/routes/home.js.map +1 -1
- package/dist/src/gateway/hono/routes/host-fs.js +2 -2
- package/dist/src/gateway/hono/routes/lazy-bundles.js +8 -0
- package/dist/src/gateway/hono/routes/lazy-bundles.js.map +1 -1
- package/dist/src/gateway/hono/routes/models.js +1 -1
- package/dist/src/gateway/hono/routes/notes.js +20 -14
- package/dist/src/gateway/hono/routes/notes.js.map +1 -1
- package/dist/src/gateway/hono/routes/shares.js +1 -1
- package/dist/src/gateway/hono/routes/workflows.js +8 -4
- package/dist/src/gateway/hono/routes/workflows.js.map +1 -1
- package/dist/src/gateway/hono/routes/workspace.js +2 -2
- package/dist/src/gateway/hono/sse.js.map +1 -1
- package/dist/src/gateway/lock.js +3 -3
- package/dist/src/gateway/ports.js +1 -1
- package/dist/src/gateway/service/agent-runner.d.ts +2 -0
- package/dist/src/gateway/service/agent-runner.js +8 -4
- package/dist/src/gateway/service/agent-runner.js.map +1 -1
- package/dist/src/gateway/service/config-coordinator.js +1 -1
- package/dist/src/gateway/service/marketplace-service.d.ts +22 -10
- package/dist/src/gateway/service/marketplace-service.js +46 -5
- package/dist/src/gateway/service/marketplace-service.js.map +1 -1
- package/dist/src/gateway/service/run-gateway-agent.d.ts +3 -0
- package/dist/src/gateway/service/run-gateway-agent.js.map +1 -1
- package/dist/src/gateway/service.d.ts +8 -0
- package/dist/src/gateway/service.js +79 -6
- package/dist/src/gateway/service.js.map +1 -1
- package/dist/src/gateway/workspace-fs-file-list.js +1 -1
- package/dist/src/goals/goal-notifications.d.ts +29 -0
- package/dist/src/goals/goal-notifications.js +154 -0
- package/dist/src/goals/goal-notifications.js.map +1 -0
- package/dist/src/goals/goal-queue-store.d.ts +16 -0
- package/dist/src/goals/goal-queue-store.js +131 -0
- package/dist/src/goals/goal-queue-store.js.map +1 -0
- package/dist/src/goals/goal-queue-types.d.ts +31 -0
- package/dist/src/goals/goal-queue-types.js +1 -0
- package/dist/src/goals/goal-runner.d.ts +17 -0
- package/dist/src/goals/goal-runner.js +127 -0
- package/dist/src/goals/goal-runner.js.map +1 -0
- package/dist/src/goals/goal-service.d.ts +77 -0
- package/dist/src/goals/goal-service.js +261 -0
- package/dist/src/goals/goal-service.js.map +1 -0
- package/dist/src/goals/goal-store.d.ts +38 -0
- package/dist/src/goals/goal-store.js +404 -0
- package/dist/src/goals/goal-store.js.map +1 -0
- package/dist/src/goals/goal-workflow-judge.d.ts +13 -0
- package/dist/src/goals/goal-workflow-judge.js +147 -0
- package/dist/src/goals/goal-workflow-judge.js.map +1 -0
- package/dist/src/goals/index.d.ts +10 -0
- package/dist/src/goals/index.js +7 -0
- package/dist/src/goals/types.d.ts +119 -0
- package/dist/src/goals/types.js +1 -0
- package/dist/src/i18n/goals-bundle.js +1 -1
- package/dist/src/i18n/index.js +1 -1
- package/dist/src/i18n/share-tool-bundle.js +2 -2
- package/dist/src/infra/brew.js +1 -1
- package/dist/src/infra/package-json.js +1 -1
- package/dist/src/infra/package-update-steps.js +1 -1
- package/dist/src/infra/path-env.js +2 -2
- package/dist/src/infra/restart.js +1 -1
- package/dist/src/infra/stable-node-path.js +1 -1
- package/dist/src/infra/update-check.js +1 -1
- package/dist/src/infra/update-global.js +1 -1
- package/dist/src/infra/update-lock.js +2 -2
- package/dist/src/infra/update-restart.js +1 -1
- package/dist/src/infra/update-runner.js +1 -1
- package/dist/src/infra/update-startup.js +1 -1
- package/dist/src/infra/write-file-atomic.js +2 -2
- package/dist/src/media/store.js +1 -1
- package/dist/src/notes/agent-context.js +1 -1
- package/dist/src/notes/service.js +1 -1
- package/dist/src/notes/store.js +2 -2
- package/dist/src/project-trust/trust-store.js +2 -2
- package/dist/src/providers/auth-runtime/auth-profile-store.js +1 -1
- package/dist/src/providers/index.js +1 -1
- package/dist/src/providers/model-registry.js +4 -4
- package/dist/src/session/init-session-turn.js +2 -2
- package/dist/src/session/resolve-session.js +3 -3
- package/dist/src/session/session-title.js +2 -2
- package/dist/src/session/store.js +1 -1
- package/dist/src/share/share-auto.js +2 -2
- package/dist/src/share/share-store.js +3 -3
- package/dist/src/share/share-thumbnail.js +2 -2
- package/dist/src/share/share-zip.js +1 -1
- package/dist/src/share/site-share-store.js +3 -3
- package/dist/src/share/site-static-serve.js +1 -1
- package/dist/src/storage/sqlite/connection.js +1 -1
- package/dist/src/storage/sqlite/cron-job-repository.d.ts +6 -0
- package/dist/src/storage/sqlite/cron-job-repository.js +70 -0
- package/dist/src/storage/sqlite/cron-job-repository.js.map +1 -0
- package/dist/src/storage/sqlite/cron-run-repository.js +0 -1
- package/dist/src/storage/sqlite/cron-run-repository.js.map +1 -1
- package/dist/src/storage/sqlite/index.d.ts +1 -0
- package/dist/src/storage/sqlite/index.js +2 -1
- package/dist/src/storage/sqlite/memory-index-repository.js +2 -2
- package/dist/src/storage/sqlite/migrations/006_add_goals.sql +108 -0
- package/dist/src/storage/sqlite/migrations/007_goal_run_judge_schema.sql +4 -0
- package/dist/src/storage/sqlite/migrations/008_goal_queue_workflow_runs.sql +53 -0
- package/dist/src/storage/sqlite/migrations/009_cron_jobs.sql +24 -0
- package/dist/src/storage/sqlite/migrations/discover.js +1 -1
- package/dist/src/storage/sqlite/migrations/runner.d.ts +1 -1
- package/dist/src/storage/sqlite/migrations/runner.js +4 -4
- package/dist/src/storage/sqlite/migrations/runner.js.map +1 -1
- package/dist/src/storage/sqlite/migrations/runner.ts +1 -1
- package/dist/src/storage/sqlite/schema.js +2 -2
- package/dist/src/storage/sqlite/schema.sql +188 -0
- package/dist/src/tui/clipboard-image.js +3 -3
- package/dist/src/tui/extension-host/load-extensions.js +1 -1
- package/dist/src/tui/theme-manager.js +1 -1
- package/dist/src/tui/tui-command-formatters.js +4 -4
- package/dist/src/tui/tui-commands.js +2 -2
- package/dist/src/tui/tui-keybindings-file.js +1 -1
- package/dist/src/tui/tui-scoped-models.js +2 -2
- package/dist/src/tui/tui-settings.js +1 -1
- package/dist/src/tui/tui-startup-resources.js +1 -1
- package/dist/src/tui/tui.js +6 -6
- package/dist/src/tunnel/frpc-binary.js +4 -4
- package/dist/src/tunnel/frpc-config.js +1 -1
- package/dist/src/tunnel/frpc-extract.js +1 -1
- package/dist/src/tunnel/tunnel-state.js +1 -1
- package/dist/src/utils/logger/audit.js +1 -1
- package/dist/src/utils/logger/log-store.js +1 -1
- package/dist/src/utils/logger/rotation.js +1 -1
- package/dist/src/utils/logger/stats.d.ts +1 -1
- package/dist/src/utils/logger/streams.js +1 -1
- package/dist/src/voice/tts/audio.js +1 -1
- package/dist/src/voice/tts/providers/edge-speech.js +2 -2
- package/dist/src/workflows/domain/run.d.ts +1 -0
- package/dist/src/workflows/domain/run.js.map +1 -1
- package/dist/src/workflows/draft/workflow-draft-service.js +1 -1
- package/dist/src/workflows/engine/projector.js +23 -14
- package/dist/src/workflows/engine/projector.js.map +1 -1
- package/dist/src/workflows/engine/workflow-engine.d.ts +1 -0
- package/dist/src/workflows/engine/workflow-engine.js +36 -0
- package/dist/src/workflows/engine/workflow-engine.js.map +1 -1
- package/dist/src/workflows/index.js +1 -1
- package/dist/src/workflows/service/workflow-run-service.d.ts +1 -0
- package/dist/src/workflows/service/workflow-run-service.js +7 -3
- package/dist/src/workflows/service/workflow-run-service.js.map +1 -1
- package/dist/src/workflows/service/workflow-run-service.types.d.ts +1 -0
- package/dist/src/workflows/service/workflow-session-bridge.js +8 -1
- package/dist/src/workflows/service/workflow-session-bridge.js.map +1 -1
- package/dist/src/workflows/store/event-store.js +1 -1
- package/dist/src/workflows/store/run-index-store.d.ts +8 -0
- package/dist/src/workflows/store/run-index-store.js +58 -0
- package/dist/src/workflows/store/run-index-store.js.map +1 -0
- package/dist/src/workflows/store/run-store.d.ts +2 -0
- package/dist/src/workflows/store/run-store.js +15 -22
- package/dist/src/workflows/store/run-store.js.map +1 -1
- package/package.json +10 -5
- package/dist/gateway/static/root/assets/Combination-HAlzriaz.js +0 -41
- package/dist/gateway/static/root/assets/agents-CFFioJCI.js +0 -78
- package/dist/gateway/static/root/assets/apps-page-BYDmkbzG.js +0 -1
- package/dist/gateway/static/root/assets/channels-settings-CsbDaMvd.js +0 -1
- package/dist/gateway/static/root/assets/circle-check-C23XjkUj.js +0 -1
- package/dist/gateway/static/root/assets/copy-Dv6d4Dvw.js +0 -1
- package/dist/gateway/static/root/assets/cron-page-Apk-7p4p.js +0 -1
- package/dist/gateway/static/root/assets/dist-DmGDgpy2.js +0 -1
- package/dist/gateway/static/root/assets/extension-debug-page-pxFC-tUa.js +0 -1
- package/dist/gateway/static/root/assets/extension-settings-page-COXSv6xP.js +0 -1
- package/dist/gateway/static/root/assets/fetch-CFdKBnE6.js +0 -1
- package/dist/gateway/static/root/assets/gateway-startup-retry-DdngdObI.js +0 -1
- package/dist/gateway/static/root/assets/heartbeat-config-api-DcmAMYmN.js +0 -1
- package/dist/gateway/static/root/assets/index-C_2yKRJX.js +0 -4845
- package/dist/gateway/static/root/assets/index-DI5_GsZt.css +0 -1
- package/dist/gateway/static/root/assets/logs-page-DvTWUOzd.js +0 -2
- package/dist/gateway/static/root/assets/note-detail-page-CZbdugWZ.js +0 -180
- package/dist/gateway/static/root/assets/note-time-RdyBZxj3.js +0 -1
- package/dist/gateway/static/root/assets/notes-page-mEAwy3e1.js +0 -1
- package/dist/gateway/static/root/assets/schema-form-DEvdni_r.js +0 -1
- package/dist/gateway/static/root/assets/sessions-page-BsgffzV4.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-t6v8Dwb8.js +0 -2
- package/dist/gateway/static/root/assets/settings-form-section-BoYYZmJG.js +0 -1
- package/dist/gateway/static/root/assets/settings-page-ClIthYF8.js +0 -3
- package/dist/gateway/static/root/assets/share-preview-page-Dd9et7KD.js +0 -2
- package/dist/gateway/static/root/assets/skills-page-DEXtxyfQ.js +0 -2
- package/dist/gateway/static/root/assets/theme-store-BZozwAeK.js +0 -1
- package/dist/gateway/static/root/assets/url-DQRqHuL-.js +0 -3
- package/dist/gateway/static/root/assets/vendor-codemirror-DYoKfS8f.js +0 -45
- package/dist/gateway/static/root/assets/voice-api-key-field-CNrKzQrf.js +0 -1
- package/dist/gateway/static/root/assets/workflows-page-EMZkzJNN.js +0 -18
- package/dist/gateway/static/root/favicon-16.png +0 -0
- package/dist/gateway/static/root/favicon-32.png +0 -0
- package/dist/src/agent/goals/checklist-user.d.ts +0 -24
- package/dist/src/agent/goals/checklist-user.js +0 -92
- package/dist/src/agent/goals/checklist-user.js.map +0 -1
- package/dist/src/agent/goals/goal-run-store.d.ts +0 -19
- package/dist/src/agent/goals/goal-run-store.js +0 -138
- package/dist/src/agent/goals/goal-run-store.js.map +0 -1
- package/dist/src/agent/goals/goal-run-types.d.ts +0 -28
- package/dist/src/agent/goals/goal-run-types.js +0 -6
- package/dist/src/agent/goals/goal-run-types.js.map +0 -1
- package/dist/src/agent/goals/patch-from-user-action.d.ts +0 -20
- package/dist/src/agent/goals/patch-from-user-action.js +0 -103
- package/dist/src/agent/goals/patch-from-user-action.js.map +0 -1
- package/dist/src/cron/persistence.d.ts +0 -62
- package/dist/src/cron/persistence.js +0 -188
- package/dist/src/cron/persistence.js.map +0 -1
- /package/dist/gateway/static/root/assets/{note-detail-page-D4ZIVQbk.css → block-editor-D4ZIVQbk.css} +0 -0
|
@@ -1,18 +1,7 @@
|
|
|
1
|
-
import { init_paths, resolveCronDir, resolveCronJobsPath } from "../../../../config/paths.js";
|
|
2
1
|
import { init_loader, loadConfig } from "../../../../config/loader.js";
|
|
3
|
-
import { JobDataSchema } from "../../../../cron/validation.js";
|
|
4
|
-
import { existsSync, readFileSync } from "node:fs";
|
|
5
2
|
//#region src/cli/commands/doctor/checks/cron-health.ts
|
|
6
3
|
init_loader();
|
|
7
|
-
init_paths();
|
|
8
4
|
async function checkCronHealth(ctx) {
|
|
9
|
-
if (!existsSync(ctx.configPath)) return {
|
|
10
|
-
id: "cron-health",
|
|
11
|
-
label: "Cron",
|
|
12
|
-
status: "skip",
|
|
13
|
-
message: "No config file; skipped.",
|
|
14
|
-
hints: []
|
|
15
|
-
};
|
|
16
5
|
let cfg;
|
|
17
6
|
try {
|
|
18
7
|
cfg = loadConfig(ctx.configPath);
|
|
@@ -32,82 +21,12 @@ async function checkCronHealth(ctx) {
|
|
|
32
21
|
message: "Cron is disabled in config; skipped.",
|
|
33
22
|
hints: []
|
|
34
23
|
};
|
|
35
|
-
const cronDir = resolveCronDir();
|
|
36
|
-
if (!existsSync(cronDir)) return {
|
|
37
|
-
id: "cron-health",
|
|
38
|
-
label: "Cron",
|
|
39
|
-
status: "warn",
|
|
40
|
-
message: "Cron directory does not exist.",
|
|
41
|
-
hints: [cronDir, "Run: xopc init (creates cron directory)"]
|
|
42
|
-
};
|
|
43
|
-
const jobsPath = resolveCronJobsPath();
|
|
44
|
-
if (!existsSync(jobsPath)) return {
|
|
45
|
-
id: "cron-health",
|
|
46
|
-
label: "Cron",
|
|
47
|
-
status: "warn",
|
|
48
|
-
message: "Cron jobs file is missing.",
|
|
49
|
-
hints: [jobsPath]
|
|
50
|
-
};
|
|
51
|
-
let raw;
|
|
52
|
-
try {
|
|
53
|
-
raw = JSON.parse(readFileSync(jobsPath, "utf-8"));
|
|
54
|
-
} catch {
|
|
55
|
-
return {
|
|
56
|
-
id: "cron-health",
|
|
57
|
-
label: "Cron",
|
|
58
|
-
status: "warn",
|
|
59
|
-
message: "Cron jobs file is not valid JSON.",
|
|
60
|
-
hints: [jobsPath]
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
if (!raw || typeof raw !== "object" || !("jobs" in raw) || !Array.isArray(raw.jobs)) return {
|
|
64
|
-
id: "cron-health",
|
|
65
|
-
label: "Cron",
|
|
66
|
-
status: "warn",
|
|
67
|
-
message: "Cron jobs file has invalid structure (expected { jobs: [] }).",
|
|
68
|
-
hints: [jobsPath]
|
|
69
|
-
};
|
|
70
|
-
const jobs = raw.jobs;
|
|
71
|
-
const hints = [];
|
|
72
|
-
let valid = 0;
|
|
73
|
-
let enabled = 0;
|
|
74
|
-
let scheduleMissing = 0;
|
|
75
|
-
for (const j of jobs) {
|
|
76
|
-
const r = JobDataSchema.safeParse(j);
|
|
77
|
-
if (r.success) {
|
|
78
|
-
valid++;
|
|
79
|
-
if (r.data.enabled) {
|
|
80
|
-
enabled++;
|
|
81
|
-
if (!r.data.schedule?.trim()) {
|
|
82
|
-
scheduleMissing++;
|
|
83
|
-
hints.push(`Job "${r.data.name || r.data.id}" is enabled but has no schedule.`);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
} else {
|
|
87
|
-
hints.push("One or more job entries failed validation (check jobs.json).");
|
|
88
|
-
break;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
if (valid !== jobs.length) return {
|
|
92
|
-
id: "cron-health",
|
|
93
|
-
label: "Cron",
|
|
94
|
-
status: "warn",
|
|
95
|
-
message: "Some cron jobs are invalid or could not be validated.",
|
|
96
|
-
hints: hints.length ? hints.slice(0, 5) : [jobsPath]
|
|
97
|
-
};
|
|
98
|
-
if (scheduleMissing > 0) return {
|
|
99
|
-
id: "cron-health",
|
|
100
|
-
label: "Cron",
|
|
101
|
-
status: "warn",
|
|
102
|
-
message: `${scheduleMissing} enabled job(s) are missing a schedule.`,
|
|
103
|
-
hints: hints.slice(0, 5)
|
|
104
|
-
};
|
|
105
24
|
return {
|
|
106
25
|
id: "cron-health",
|
|
107
26
|
label: "Cron",
|
|
108
27
|
status: "pass",
|
|
109
|
-
message:
|
|
110
|
-
hints: [
|
|
28
|
+
message: "Cron is enabled. Scheduled jobs are stored in SQLite.",
|
|
29
|
+
hints: ["Run: xopc doctor --deep for SQLite integrity checks."]
|
|
111
30
|
};
|
|
112
31
|
}
|
|
113
32
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cron-health.js","names":[],"sources":["../../../../../../src/cli/commands/doctor/checks/cron-health.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"cron-health.js","names":[],"sources":["../../../../../../src/cli/commands/doctor/checks/cron-health.ts"],"sourcesContent":["import { loadConfig } from '../../../../config/loader.js';\nimport type { Config } from '../../../../config/schema.js';\nimport type { CheckResult, DoctorContext } from '../types.js';\n\nexport async function checkCronHealth(ctx: DoctorContext): Promise<CheckResult> {\n let cfg: Config;\n try {\n cfg = loadConfig(ctx.configPath);\n } catch {\n return {\n id: 'cron-health',\n label: 'Cron',\n status: 'skip',\n message: 'Config could not be loaded; skipped.',\n hints: [],\n };\n }\n\n if (cfg.cron?.enabled === false) {\n return {\n id: 'cron-health',\n label: 'Cron',\n status: 'skip',\n message: 'Cron is disabled in config; skipped.',\n hints: [],\n };\n }\n\n return {\n id: 'cron-health',\n label: 'Cron',\n status: 'pass',\n message: 'Cron is enabled. Scheduled jobs are stored in SQLite.',\n hints: ['Run: xopc doctor --deep for SQLite integrity checks.'],\n };\n}\n"],"mappings":";;aAA0D;AAI1D,eAAsB,gBAAgB,KAA0C;CAC9E,IAAI;AACJ,KAAI;AACF,QAAM,WAAW,IAAI,WAAW;SAC1B;AACN,SAAO;GACL,IAAI;GACJ,OAAO;GACP,QAAQ;GACR,SAAS;GACT,OAAO,EAAE;GACV;;AAGH,KAAI,IAAI,MAAM,YAAY,MACxB,QAAO;EACL,IAAI;EACJ,OAAO;EACP,QAAQ;EACR,SAAS;EACT,OAAO,EAAE;EACV;AAGH,QAAO;EACL,IAAI;EACJ,OAAO;EACP,QAAQ;EACR,SAAS;EACT,OAAO,CAAC,uDAAuD;EAChE"}
|
|
@@ -52,7 +52,7 @@ async function checkDatabaseSchema(ctx) {
|
|
|
52
52
|
id: "database-schema",
|
|
53
53
|
label: "Database schema",
|
|
54
54
|
status: "pass",
|
|
55
|
-
message: `SQLite schema v${status.dbVersion} (current release
|
|
55
|
+
message: `SQLite schema v${status.dbVersion} (current release v9).`,
|
|
56
56
|
hints: []
|
|
57
57
|
};
|
|
58
58
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { PROVIDER_ENV_MAP, getApiKeyFromEnv, init_env_keys } from "../../../../providers/env-keys.js";
|
|
1
2
|
import { getAgentDefaultModelRef, init_schema, parseModelRef } from "../../../../config/schema.js";
|
|
2
3
|
import { init_loader, loadConfig } from "../../../../config/loader.js";
|
|
3
|
-
import { PROVIDER_ENV_MAP, getApiKeyFromEnv, init_env_keys } from "../../../../providers/env-keys.js";
|
|
4
4
|
import { existsSync } from "node:fs";
|
|
5
5
|
//#region src/cli/commands/doctor/checks/provider-auth.ts
|
|
6
6
|
init_loader();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { init_agent_scope, resolveAgentProfileDir, resolveAgentWorkspaceDir, resolveDefaultAgentId } from "../../../../agent/agent-scope.js";
|
|
2
2
|
import { WORKSPACE_FILES, init_paths } from "../../../../config/paths.js";
|
|
3
3
|
import { init_loader, loadConfig } from "../../../../config/loader.js";
|
|
4
|
-
import { join } from "node:path";
|
|
5
4
|
import { existsSync } from "node:fs";
|
|
5
|
+
import { join } from "node:path";
|
|
6
6
|
//#region src/cli/commands/doctor/checks/workspace-status.ts
|
|
7
7
|
init_agent_scope();
|
|
8
8
|
init_loader();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PACKAGE_VERSION, init_package_version } from "../../package-version.js";
|
|
2
2
|
import { colors } from "../utils/colors.js";
|
|
3
|
-
import { join, resolve } from "node:path";
|
|
4
3
|
import { existsSync, mkdirSync, writeFileSync } from "node:fs";
|
|
4
|
+
import { join, resolve } from "node:path";
|
|
5
5
|
import { Command } from "commander";
|
|
6
6
|
//#region src/cli/commands/extension-create.ts
|
|
7
7
|
init_package_version();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PACKAGE_VERSION, init_package_version } from "../../package-version.js";
|
|
2
|
+
import { init_paths, resolveConfigPath, resolveExtensionsDir } from "../../config/paths.js";
|
|
2
3
|
import { createLogger } from "../../utils/logger/index.js";
|
|
3
4
|
import { init_logger } from "../../utils/logger.js";
|
|
4
|
-
import { init_paths, resolveConfigPath, resolveExtensionsDir } from "../../config/paths.js";
|
|
5
5
|
import { init_normalize_manifest, normalizeExtensionManifest } from "../../extensions/normalize-manifest.js";
|
|
6
6
|
import { init_loader, loadConfig } from "../../config/loader.js";
|
|
7
7
|
import { checkEngineCompatibility } from "../../extensions/engine-check.js";
|
|
@@ -11,8 +11,8 @@ import { runGatewayLoop } from "../../gateway/run-loop.js";
|
|
|
11
11
|
import "../../gateway/index.js";
|
|
12
12
|
import { colors } from "../utils/colors.js";
|
|
13
13
|
import { initWorkspace } from "../utils/init-workspace.js";
|
|
14
|
-
import { join, resolve } from "node:path";
|
|
15
14
|
import { existsSync, mkdirSync, readFileSync, symlinkSync, unlinkSync, watch } from "node:fs";
|
|
15
|
+
import { join, resolve } from "node:path";
|
|
16
16
|
import { Command } from "commander";
|
|
17
17
|
//#region src/cli/commands/extension-dev.ts
|
|
18
18
|
init_loader();
|
|
@@ -7,9 +7,9 @@ import { fetchRegistry, findExtension, getExtensionMarketplaceStoreBaseUrl, list
|
|
|
7
7
|
import { downloadExtensionStoreZipBuffer, resolveExtensionZipDownloadUrl, resolveExtensionsStoreBaseUrl } from "../../agent/skills/marketplace/adapters/store/store-api-client.js";
|
|
8
8
|
import { colors } from "../utils/colors.js";
|
|
9
9
|
import { validateExtensionPackageDirectory } from "./extension-pack.js";
|
|
10
|
-
import { join, resolve } from "node:path";
|
|
11
|
-
import { existsSync, readFileSync, rmSync, statSync } from "node:fs";
|
|
12
10
|
import { createHash } from "node:crypto";
|
|
11
|
+
import { existsSync, readFileSync, rmSync, statSync } from "node:fs";
|
|
12
|
+
import { join, resolve } from "node:path";
|
|
13
13
|
import { execSync } from "node:child_process";
|
|
14
14
|
import { confirm } from "@inquirer/prompts";
|
|
15
15
|
import { Command } from "commander";
|
|
@@ -5,9 +5,9 @@ import { init_normalize_manifest, normalizeExtensionManifest } from "../../exten
|
|
|
5
5
|
import { checkEngineCompatibility } from "../../extensions/engine-check.js";
|
|
6
6
|
import { collectExtensionPackageDependencyIssues } from "../../extensions/package-contract.js";
|
|
7
7
|
import { colors } from "../utils/colors.js";
|
|
8
|
-
import { basename, join, relative, resolve } from "node:path";
|
|
9
|
-
import { existsSync, mkdirSync, readFileSync, readdirSync, statSync, writeFileSync } from "node:fs";
|
|
10
8
|
import { createHash } from "node:crypto";
|
|
9
|
+
import { existsSync, mkdirSync, readFileSync, readdirSync, statSync, writeFileSync } from "node:fs";
|
|
10
|
+
import { basename, join, relative, resolve } from "node:path";
|
|
11
11
|
import { execSync } from "node:child_process";
|
|
12
12
|
import AdmZip from "adm-zip";
|
|
13
13
|
import { Command } from "commander";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PACKAGE_VERSION, init_package_version } from "../../package-version.js";
|
|
2
|
+
import { init_paths, resolveExtensionsDir } from "../../config/paths.js";
|
|
2
3
|
import { createLogger } from "../../utils/logger/index.js";
|
|
3
4
|
import { init_logger } from "../../utils/logger.js";
|
|
4
|
-
import { init_paths, resolveExtensionsDir } from "../../config/paths.js";
|
|
5
5
|
import { init_loader, loadConfig, saveConfig } from "../../config/loader.js";
|
|
6
6
|
import { checkEngineCompatibility } from "../../extensions/engine-check.js";
|
|
7
7
|
import { ExtensionLoader } from "../../extensions/loader.js";
|
|
@@ -14,9 +14,9 @@ import { createExtensionCreateCommand } from "./extension-create.js";
|
|
|
14
14
|
import { createExtensionDevCommand } from "./extension-dev.js";
|
|
15
15
|
import { createExtensionPackCommand } from "./extension-pack.js";
|
|
16
16
|
import { createExtensionInstallCommand, createExtensionPublishCommand, createExtensionSearchCommand, createExtensionUpdateCommand } from "./extension-marketplace.js";
|
|
17
|
-
import { join } from "node:path";
|
|
18
|
-
import { existsSync, readFileSync, readdirSync, statSync } from "node:fs";
|
|
19
17
|
import { createHash } from "node:crypto";
|
|
18
|
+
import { existsSync, readFileSync, readdirSync, statSync } from "node:fs";
|
|
19
|
+
import { join } from "node:path";
|
|
20
20
|
import { Command } from "commander";
|
|
21
21
|
//#region src/cli/commands/extension.ts
|
|
22
22
|
init_loader();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getContextWithOpts } from "../../context.js";
|
|
2
|
-
import path from "node:path";
|
|
3
2
|
import { existsSync, statSync, watch } from "node:fs";
|
|
4
3
|
import { readFile } from "node:fs/promises";
|
|
4
|
+
import path from "node:path";
|
|
5
5
|
import { Command } from "commander";
|
|
6
6
|
//#region src/cli/commands/gateway/logs.ts
|
|
7
7
|
function parseLineCount(value) {
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import { init_loader, loadConfig } from "../../config/loader.js";
|
|
2
|
+
import { closeXopcDatabase, openXopcDatabase } from "../../storage/sqlite/connection.js";
|
|
3
|
+
import "../../storage/sqlite/index.js";
|
|
4
|
+
import { GoalService } from "../../goals/goal-service.js";
|
|
5
|
+
import "../../goals/index.js";
|
|
6
|
+
import { formatExamples, register } from "../registry.js";
|
|
7
|
+
import { Command } from "commander";
|
|
8
|
+
//#region src/cli/commands/goal.ts
|
|
9
|
+
init_loader();
|
|
10
|
+
function parseEvidenceKind(raw) {
|
|
11
|
+
if (raw === "file" || raw === "diff" || raw === "command" || raw === "test" || raw === "link" || raw === "message" || raw === "artifact") return raw;
|
|
12
|
+
return "message";
|
|
13
|
+
}
|
|
14
|
+
function summarize(goal) {
|
|
15
|
+
const done = goal.checklist.filter((it) => it.status === "completed" || it.status === "impossible").length;
|
|
16
|
+
const progress = goal.checklist.length ? ` · checklist ${done}/${goal.checklist.length}` : "";
|
|
17
|
+
const next = goal.nextAction ? `\n Next: ${goal.nextAction}` : "";
|
|
18
|
+
const blocked = goal.blockedReason ? `\n Blocked: ${goal.blockedReason}` : "";
|
|
19
|
+
return ` ${goal.id} [${goal.status}] ${goal.title}\n Agent: ${goal.agentId} · turns ${goal.turnsUsed}/${goal.maxTurns}${progress}${next}${blocked}`;
|
|
20
|
+
}
|
|
21
|
+
async function withGoals(ctx, fn) {
|
|
22
|
+
openXopcDatabase();
|
|
23
|
+
try {
|
|
24
|
+
return await fn(new GoalService());
|
|
25
|
+
} finally {
|
|
26
|
+
closeXopcDatabase();
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
function printGoal(goal) {
|
|
30
|
+
console.log(summarize(goal));
|
|
31
|
+
if (goal.checklist.length) {
|
|
32
|
+
console.log("\nChecklist:");
|
|
33
|
+
goal.checklist.forEach((it, index) => {
|
|
34
|
+
const marker = it.status === "completed" ? "[x]" : it.status === "impossible" ? "[!]" : "[ ]";
|
|
35
|
+
const evidence = it.evidenceSummary ? ` (${it.evidenceSummary})` : "";
|
|
36
|
+
console.log(` ${index + 1}. ${marker} ${it.text}${evidence}`);
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
function createGoalCommand(ctx) {
|
|
41
|
+
const cmd = new Command("goal").description("Manage durable goals").addHelpText("after", formatExamples([
|
|
42
|
+
"xopc goal list",
|
|
43
|
+
"xopc goal new \"Ship v0.2 release\"",
|
|
44
|
+
"xopc goal show <goal-id>",
|
|
45
|
+
"xopc goal pause <goal-id>",
|
|
46
|
+
"xopc goal resume <goal-id>",
|
|
47
|
+
"xopc goal archive <goal-id>",
|
|
48
|
+
"xopc goal checklist add <goal-id> \"Tests pass\"",
|
|
49
|
+
"xopc goal evidence add <goal-id> \"CI passed\" --kind test"
|
|
50
|
+
]));
|
|
51
|
+
cmd.addCommand(new Command("list").description("List goals").option("--status <status>", "Filter status (comma-separated)").option("--agent-id <id>", "Filter by agent id").option("--session-key <key>", "Filter by linked session").option("--limit <n>", "Maximum rows", "20").action(async (options) => {
|
|
52
|
+
await withGoals(ctx, async (goals) => {
|
|
53
|
+
const rows = goals.list({
|
|
54
|
+
status: options.status?.split(",").map((s) => s.trim()).filter(Boolean),
|
|
55
|
+
agentId: options.agentId,
|
|
56
|
+
sessionKey: options.sessionKey,
|
|
57
|
+
limit: Number(options.limit) || 20
|
|
58
|
+
});
|
|
59
|
+
if (!rows.length) {
|
|
60
|
+
console.log("No goals.");
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
console.log("Goals:\n");
|
|
64
|
+
rows.forEach((goal) => console.log(`${summarize(goal)}\n`));
|
|
65
|
+
});
|
|
66
|
+
}));
|
|
67
|
+
cmd.addCommand(new Command("new").description("Create a goal").argument("<title>", "Goal title").option("--session-key <key>", "Link to a session key").option("--agent-id <id>", "Agent id").option("--max-turns <n>", "Turn budget").option("--priority <level>", "low, normal, or high", "normal").action(async (title, options) => {
|
|
68
|
+
const cfg = loadConfig(ctx.configPath);
|
|
69
|
+
await withGoals(ctx, async (goals) => {
|
|
70
|
+
const goal = goals.create({
|
|
71
|
+
title,
|
|
72
|
+
sessionKey: options.sessionKey,
|
|
73
|
+
agentId: options.agentId,
|
|
74
|
+
priority: options.priority === "low" || options.priority === "high" ? options.priority : "normal",
|
|
75
|
+
maxTurns: options.maxTurns ? Number(options.maxTurns) : void 0,
|
|
76
|
+
config: cfg,
|
|
77
|
+
source: "cli"
|
|
78
|
+
});
|
|
79
|
+
console.log(`Created goal ${goal.id}`);
|
|
80
|
+
console.log(` ${goal.title}`);
|
|
81
|
+
});
|
|
82
|
+
}));
|
|
83
|
+
cmd.addCommand(new Command("show").description("Show a goal").argument("<goal-id>", "Goal id").action(async (goalId) => {
|
|
84
|
+
await withGoals(ctx, async (goals) => {
|
|
85
|
+
const goal = goals.get(goalId);
|
|
86
|
+
if (!goal) {
|
|
87
|
+
console.error(`Goal not found: ${goalId}`);
|
|
88
|
+
process.exit(1);
|
|
89
|
+
}
|
|
90
|
+
printGoal(goal);
|
|
91
|
+
});
|
|
92
|
+
}));
|
|
93
|
+
for (const [name, description] of [
|
|
94
|
+
["pause", "Pause a goal"],
|
|
95
|
+
["resume", "Resume a goal"],
|
|
96
|
+
["archive", "Archive a goal"]
|
|
97
|
+
]) cmd.addCommand(new Command(name).description(description).argument("<goal-id>", "Goal id").action(async (goalId) => {
|
|
98
|
+
await withGoals(ctx, async (goals) => {
|
|
99
|
+
const goal = name === "pause" ? goals.pause(goalId) : name === "resume" ? goals.resume(goalId) : goals.archive(goalId);
|
|
100
|
+
if (!goal) {
|
|
101
|
+
console.error(`Goal not found: ${goalId}`);
|
|
102
|
+
process.exit(1);
|
|
103
|
+
}
|
|
104
|
+
console.log(`${description}: ${goal.title}`);
|
|
105
|
+
});
|
|
106
|
+
}));
|
|
107
|
+
cmd.addCommand(new Command("runs").description("List goal runs").argument("<goal-id>", "Goal id").option("--limit <n>", "Maximum rows", "20").action(async (goalId, options) => {
|
|
108
|
+
await withGoals(ctx, async (goals) => {
|
|
109
|
+
const runs = goals.listRuns(goalId, Number(options.limit) || 20);
|
|
110
|
+
if (!runs.length) {
|
|
111
|
+
console.log("No runs.");
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
runs.forEach((run) => {
|
|
115
|
+
const at = new Date(run.finishedAt ?? run.startedAt).toISOString();
|
|
116
|
+
console.log(` ${run.id} [${run.verdict ?? run.status}] ${at}`);
|
|
117
|
+
if (run.reason) console.log(` ${run.reason}`);
|
|
118
|
+
});
|
|
119
|
+
});
|
|
120
|
+
}));
|
|
121
|
+
const checklist = new Command("checklist").description("Manage goal checklist");
|
|
122
|
+
checklist.addCommand(new Command("add").argument("<goal-id>", "Goal id").argument("<text>", "Checklist item").action(async (goalId, text) => {
|
|
123
|
+
await withGoals(ctx, async (goals) => {
|
|
124
|
+
const goal = goals.updateChecklist(goalId, {
|
|
125
|
+
type: "add",
|
|
126
|
+
text
|
|
127
|
+
});
|
|
128
|
+
if (!goal) {
|
|
129
|
+
console.error(`Goal not found: ${goalId}`);
|
|
130
|
+
process.exit(1);
|
|
131
|
+
}
|
|
132
|
+
console.log(`Added checklist item to ${goal.title}`);
|
|
133
|
+
});
|
|
134
|
+
}));
|
|
135
|
+
checklist.addCommand(new Command("mark").argument("<goal-id>", "Goal id").argument("<number>", "1-based checklist item number").argument("<status>", "pending, completed, or impossible").action(async (goalId, number, status) => {
|
|
136
|
+
await withGoals(ctx, async (goals) => {
|
|
137
|
+
const goal = goals.get(goalId);
|
|
138
|
+
const item = goal?.checklist[Number(number) - 1];
|
|
139
|
+
if (!goal || !item) {
|
|
140
|
+
console.error(`Checklist item not found: ${number}`);
|
|
141
|
+
process.exit(1);
|
|
142
|
+
}
|
|
143
|
+
if (status !== "pending" && status !== "completed" && status !== "impossible") {
|
|
144
|
+
console.error("Status must be pending, completed, or impossible");
|
|
145
|
+
process.exit(1);
|
|
146
|
+
}
|
|
147
|
+
goals.updateChecklist(goalId, {
|
|
148
|
+
type: "mark",
|
|
149
|
+
itemId: item.id,
|
|
150
|
+
status
|
|
151
|
+
});
|
|
152
|
+
console.log(`Marked item #${number} ${status}`);
|
|
153
|
+
});
|
|
154
|
+
}));
|
|
155
|
+
cmd.addCommand(checklist);
|
|
156
|
+
const evidence = new Command("evidence").description("Manage goal evidence");
|
|
157
|
+
evidence.addCommand(new Command("list").argument("<goal-id>", "Goal id").option("--limit <n>", "Maximum rows", "20").action(async (goalId, options) => {
|
|
158
|
+
await withGoals(ctx, async (goals) => {
|
|
159
|
+
if (!goals.get(goalId)) {
|
|
160
|
+
console.error(`Goal not found: ${goalId}`);
|
|
161
|
+
process.exit(1);
|
|
162
|
+
}
|
|
163
|
+
const rows = goals.listEvidence(goalId, Number(options.limit) || 20);
|
|
164
|
+
if (!rows.length) {
|
|
165
|
+
console.log("No evidence.");
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
rows.forEach((item) => {
|
|
169
|
+
const at = new Date(item.createdAt).toISOString();
|
|
170
|
+
console.log(` ${item.id} [${item.kind}] ${item.title} · ${at}`);
|
|
171
|
+
if (item.uri) console.log(` URI: ${item.uri}`);
|
|
172
|
+
if (item.summary) console.log(` ${item.summary}`);
|
|
173
|
+
});
|
|
174
|
+
});
|
|
175
|
+
}));
|
|
176
|
+
evidence.addCommand(new Command("add").argument("<goal-id>", "Goal id").argument("<title>", "Evidence title").option("--kind <kind>", "file, diff, command, test, link, message, or artifact", "message").option("--summary <text>", "Evidence summary").option("--uri <uri>", "URI or local path").action(async (goalId, title, options) => {
|
|
177
|
+
await withGoals(ctx, async (goals) => {
|
|
178
|
+
if (!goals.get(goalId)) {
|
|
179
|
+
console.error(`Goal not found: ${goalId}`);
|
|
180
|
+
process.exit(1);
|
|
181
|
+
}
|
|
182
|
+
const evidence = goals.addEvidence({
|
|
183
|
+
goalId,
|
|
184
|
+
kind: parseEvidenceKind(options.kind),
|
|
185
|
+
title,
|
|
186
|
+
summary: typeof options.summary === "string" ? options.summary : void 0,
|
|
187
|
+
uri: typeof options.uri === "string" ? options.uri : void 0
|
|
188
|
+
});
|
|
189
|
+
console.log(`Added evidence ${evidence.id}`);
|
|
190
|
+
console.log(` [${evidence.kind}] ${evidence.title}`);
|
|
191
|
+
});
|
|
192
|
+
}));
|
|
193
|
+
cmd.addCommand(evidence);
|
|
194
|
+
return cmd;
|
|
195
|
+
}
|
|
196
|
+
register({
|
|
197
|
+
id: "goal",
|
|
198
|
+
name: "goal",
|
|
199
|
+
description: "Manage durable goals",
|
|
200
|
+
factory: createGoalCommand,
|
|
201
|
+
metadata: {
|
|
202
|
+
category: "utility",
|
|
203
|
+
examples: [
|
|
204
|
+
"xopc goal list",
|
|
205
|
+
"xopc goal new \"Ship the release\"",
|
|
206
|
+
"xopc goal show <goal-id>"
|
|
207
|
+
]
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
//#endregion
|
|
211
|
+
export { createGoalCommand };
|
|
212
|
+
|
|
213
|
+
//# sourceMappingURL=goal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"goal.js","names":[],"sources":["../../../../src/cli/commands/goal.ts"],"sourcesContent":["import { Command } from 'commander';\n\nimport { loadConfig } from '../../config/loader.js';\nimport { closeXopcDatabase, openXopcDatabase } from '../../storage/sqlite/index.js';\nimport { GoalService, type GoalEvidence, type GoalWithDetails } from '../../goals/index.js';\nimport { register, formatExamples, type CLIContext } from '../registry.js';\n\ntype EvidenceKind = GoalEvidence['kind'];\n\nfunction parseEvidenceKind(raw: string | undefined): EvidenceKind {\n if (\n raw === 'file' ||\n raw === 'diff' ||\n raw === 'command' ||\n raw === 'test' ||\n raw === 'link' ||\n raw === 'message' ||\n raw === 'artifact'\n ) {\n return raw;\n }\n return 'message';\n}\n\nfunction summarize(goal: GoalWithDetails): string {\n const done = goal.checklist.filter((it) => it.status === 'completed' || it.status === 'impossible').length;\n const progress = goal.checklist.length ? ` · checklist ${done}/${goal.checklist.length}` : '';\n const next = goal.nextAction ? `\\n Next: ${goal.nextAction}` : '';\n const blocked = goal.blockedReason ? `\\n Blocked: ${goal.blockedReason}` : '';\n return ` ${goal.id} [${goal.status}] ${goal.title}\\n Agent: ${goal.agentId} · turns ${goal.turnsUsed}/${goal.maxTurns}${progress}${next}${blocked}`;\n}\n\nasync function withGoals<T>(ctx: CLIContext, fn: (goals: GoalService) => Promise<T> | T): Promise<T> {\n openXopcDatabase();\n try {\n return await fn(new GoalService());\n } finally {\n closeXopcDatabase();\n }\n}\n\nfunction printGoal(goal: GoalWithDetails): void {\n console.log(summarize(goal));\n if (goal.checklist.length) {\n console.log('\\nChecklist:');\n goal.checklist.forEach((it, index) => {\n const marker = it.status === 'completed' ? '[x]' : it.status === 'impossible' ? '[!]' : '[ ]';\n const evidence = it.evidenceSummary ? ` (${it.evidenceSummary})` : '';\n console.log(` ${index + 1}. ${marker} ${it.text}${evidence}`);\n });\n }\n}\n\nfunction createGoalCommand(ctx: CLIContext): Command {\n const cmd = new Command('goal')\n .description('Manage durable goals')\n .addHelpText(\n 'after',\n formatExamples([\n 'xopc goal list',\n 'xopc goal new \"Ship v0.2 release\"',\n 'xopc goal show <goal-id>',\n 'xopc goal pause <goal-id>',\n 'xopc goal resume <goal-id>',\n 'xopc goal archive <goal-id>',\n 'xopc goal checklist add <goal-id> \"Tests pass\"',\n 'xopc goal evidence add <goal-id> \"CI passed\" --kind test',\n ]),\n );\n\n cmd.addCommand(\n new Command('list')\n .description('List goals')\n .option('--status <status>', 'Filter status (comma-separated)')\n .option('--agent-id <id>', 'Filter by agent id')\n .option('--session-key <key>', 'Filter by linked session')\n .option('--limit <n>', 'Maximum rows', '20')\n .action(async (options) => {\n await withGoals(ctx, async (goals) => {\n const rows = goals.list({\n status: options.status?.split(',').map((s: string) => s.trim()).filter(Boolean),\n agentId: options.agentId,\n sessionKey: options.sessionKey,\n limit: Number(options.limit) || 20,\n });\n if (!rows.length) {\n console.log('No goals.');\n return;\n }\n console.log('Goals:\\n');\n rows.forEach((goal) => console.log(`${summarize(goal)}\\n`));\n });\n }),\n );\n\n cmd.addCommand(\n new Command('new')\n .description('Create a goal')\n .argument('<title>', 'Goal title')\n .option('--session-key <key>', 'Link to a session key')\n .option('--agent-id <id>', 'Agent id')\n .option('--max-turns <n>', 'Turn budget')\n .option('--priority <level>', 'low, normal, or high', 'normal')\n .action(async (title, options) => {\n const cfg = loadConfig(ctx.configPath);\n await withGoals(ctx, async (goals) => {\n const goal = goals.create({\n title,\n sessionKey: options.sessionKey,\n agentId: options.agentId,\n priority: options.priority === 'low' || options.priority === 'high' ? options.priority : 'normal',\n maxTurns: options.maxTurns ? Number(options.maxTurns) : undefined,\n config: cfg,\n source: 'cli',\n });\n console.log(`Created goal ${goal.id}`);\n console.log(` ${goal.title}`);\n });\n }),\n );\n\n cmd.addCommand(\n new Command('show')\n .description('Show a goal')\n .argument('<goal-id>', 'Goal id')\n .action(async (goalId) => {\n await withGoals(ctx, async (goals) => {\n const goal = goals.get(goalId);\n if (!goal) {\n console.error(`Goal not found: ${goalId}`);\n process.exit(1);\n }\n printGoal(goal);\n });\n }),\n );\n\n for (const [name, description] of [\n ['pause', 'Pause a goal'],\n ['resume', 'Resume a goal'],\n ['archive', 'Archive a goal'],\n ] as const) {\n cmd.addCommand(\n new Command(name)\n .description(description)\n .argument('<goal-id>', 'Goal id')\n .action(async (goalId) => {\n await withGoals(ctx, async (goals) => {\n const goal =\n name === 'pause' ? goals.pause(goalId) : name === 'resume' ? goals.resume(goalId) : goals.archive(goalId);\n if (!goal) {\n console.error(`Goal not found: ${goalId}`);\n process.exit(1);\n }\n console.log(`${description}: ${goal.title}`);\n });\n }),\n );\n }\n\n cmd.addCommand(\n new Command('runs')\n .description('List goal runs')\n .argument('<goal-id>', 'Goal id')\n .option('--limit <n>', 'Maximum rows', '20')\n .action(async (goalId, options) => {\n await withGoals(ctx, async (goals) => {\n const runs = goals.listRuns(goalId, Number(options.limit) || 20);\n if (!runs.length) {\n console.log('No runs.');\n return;\n }\n runs.forEach((run) => {\n const at = new Date(run.finishedAt ?? run.startedAt).toISOString();\n console.log(` ${run.id} [${run.verdict ?? run.status}] ${at}`);\n if (run.reason) console.log(` ${run.reason}`);\n });\n });\n }),\n );\n\n const checklist = new Command('checklist').description('Manage goal checklist');\n checklist.addCommand(\n new Command('add')\n .argument('<goal-id>', 'Goal id')\n .argument('<text>', 'Checklist item')\n .action(async (goalId, text) => {\n await withGoals(ctx, async (goals) => {\n const goal = goals.updateChecklist(goalId, { type: 'add', text });\n if (!goal) {\n console.error(`Goal not found: ${goalId}`);\n process.exit(1);\n }\n console.log(`Added checklist item to ${goal.title}`);\n });\n }),\n );\n checklist.addCommand(\n new Command('mark')\n .argument('<goal-id>', 'Goal id')\n .argument('<number>', '1-based checklist item number')\n .argument('<status>', 'pending, completed, or impossible')\n .action(async (goalId, number, status) => {\n await withGoals(ctx, async (goals) => {\n const goal = goals.get(goalId);\n const item = goal?.checklist[Number(number) - 1];\n if (!goal || !item) {\n console.error(`Checklist item not found: ${number}`);\n process.exit(1);\n }\n if (status !== 'pending' && status !== 'completed' && status !== 'impossible') {\n console.error('Status must be pending, completed, or impossible');\n process.exit(1);\n }\n goals.updateChecklist(goalId, { type: 'mark', itemId: item.id, status });\n console.log(`Marked item #${number} ${status}`);\n });\n }),\n );\n cmd.addCommand(checklist);\n\n const evidence = new Command('evidence').description('Manage goal evidence');\n evidence.addCommand(\n new Command('list')\n .argument('<goal-id>', 'Goal id')\n .option('--limit <n>', 'Maximum rows', '20')\n .action(async (goalId, options) => {\n await withGoals(ctx, async (goals) => {\n if (!goals.get(goalId)) {\n console.error(`Goal not found: ${goalId}`);\n process.exit(1);\n }\n const rows = goals.listEvidence(goalId, Number(options.limit) || 20);\n if (!rows.length) {\n console.log('No evidence.');\n return;\n }\n rows.forEach((item) => {\n const at = new Date(item.createdAt).toISOString();\n console.log(` ${item.id} [${item.kind}] ${item.title} · ${at}`);\n if (item.uri) console.log(` URI: ${item.uri}`);\n if (item.summary) console.log(` ${item.summary}`);\n });\n });\n }),\n );\n evidence.addCommand(\n new Command('add')\n .argument('<goal-id>', 'Goal id')\n .argument('<title>', 'Evidence title')\n .option('--kind <kind>', 'file, diff, command, test, link, message, or artifact', 'message')\n .option('--summary <text>', 'Evidence summary')\n .option('--uri <uri>', 'URI or local path')\n .action(async (goalId, title, options) => {\n await withGoals(ctx, async (goals) => {\n if (!goals.get(goalId)) {\n console.error(`Goal not found: ${goalId}`);\n process.exit(1);\n }\n const evidence = goals.addEvidence({\n goalId,\n kind: parseEvidenceKind(options.kind),\n title,\n summary: typeof options.summary === 'string' ? options.summary : undefined,\n uri: typeof options.uri === 'string' ? options.uri : undefined,\n });\n console.log(`Added evidence ${evidence.id}`);\n console.log(` [${evidence.kind}] ${evidence.title}`);\n });\n }),\n );\n cmd.addCommand(evidence);\n\n return cmd;\n}\n\nregister({\n id: 'goal',\n name: 'goal',\n description: 'Manage durable goals',\n factory: createGoalCommand,\n metadata: {\n category: 'utility',\n examples: ['xopc goal list', 'xopc goal new \"Ship the release\"', 'xopc goal show <goal-id>'],\n },\n});\n\nexport { createGoalCommand };\n"],"mappings":"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"}
|
|
@@ -8,8 +8,8 @@ import { formatExamples, register } from "../registry.js";
|
|
|
8
8
|
import { getContextWithOpts } from "../context.js";
|
|
9
9
|
import "../../agent/image/index.js";
|
|
10
10
|
import { colors } from "../utils/colors.js";
|
|
11
|
-
import { join, resolve } from "node:path";
|
|
12
11
|
import { mkdir, writeFile } from "node:fs/promises";
|
|
12
|
+
import { join, resolve } from "node:path";
|
|
13
13
|
import { Command } from "commander";
|
|
14
14
|
//#region src/cli/commands/image.ts
|
|
15
15
|
init_loader();
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { resolveStateDir } from "../../config/paths-state.js";
|
|
2
2
|
import { resolveAgentWorkspaceDir } from "../../agent/agent-scope.js";
|
|
3
|
+
import { WORKSPACE_FILES, init_paths, resolveAgentDir, resolveAgentHomeDir, resolveAgentProfileDir, resolveConfigPath } from "../../config/paths.js";
|
|
3
4
|
import { createLogger } from "../../utils/logger/index.js";
|
|
4
5
|
import { init_logger } from "../../utils/logger.js";
|
|
5
|
-
import { WORKSPACE_FILES, init_paths, resolveAgentDir, resolveAgentHomeDir, resolveAgentProfileDir, resolveConfigPath } from "../../config/paths.js";
|
|
6
6
|
import { init_loader, loadConfig, saveConfig } from "../../config/loader.js";
|
|
7
7
|
import { formatExamples, register } from "../registry.js";
|
|
8
|
-
import { join } from "path";
|
|
9
8
|
import { existsSync } from "fs";
|
|
9
|
+
import { join } from "path";
|
|
10
10
|
import { mkdir, writeFile } from "fs/promises";
|
|
11
11
|
import { Command } from "commander";
|
|
12
12
|
//#region src/cli/commands/init.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { loadConfig, saveConfig } from "../../config/loader.js";
|
|
2
1
|
import { CredentialResolver, init_credentials } from "../../auth/credentials.js";
|
|
2
|
+
import { loadConfig, saveConfig } from "../../config/loader.js";
|
|
3
3
|
import { getAllModels, getAvailableModels, getConfiguredProviders, getProviderAuthState, getProviderDisplayName, init_providers, isProviderConfigured, providerSupportsApiKey, providerSupportsOAuth, resolveModel } from "../../providers/index.js";
|
|
4
4
|
import { formatExamples, register } from "../registry.js";
|
|
5
5
|
import { getContextWithOpts } from "../context.js";
|
|
@@ -15,6 +15,10 @@ init_schema();
|
|
|
15
15
|
function isInteractive() {
|
|
16
16
|
return process.stdin.isTTY && process.stdout.isTTY;
|
|
17
17
|
}
|
|
18
|
+
function printGitHubStarHint() {
|
|
19
|
+
console.log("\n⭐ If xopc helps you keep long-term AI work moving, please star the repo:");
|
|
20
|
+
console.log(" https://github.com/xopcai/xopc");
|
|
21
|
+
}
|
|
18
22
|
async function setupNonInteractive(_configPath, existingConfig) {
|
|
19
23
|
console.log("\n🤖 AI Model Configuration (Non-Interactive Mode)\n");
|
|
20
24
|
console.log("Current config:", JSON.stringify(existingConfig.agents?.defaults?.models?.chat, null, 2));
|
|
@@ -25,10 +29,11 @@ async function setupNonInteractive(_configPath, existingConfig) {
|
|
|
25
29
|
function createOnboardCommand(ctx) {
|
|
26
30
|
return new Command("onboard").description("Interactive setup wizard for xopc (gateway uses schema defaults)").addHelpText("after", formatExamples([
|
|
27
31
|
"xopc onboard # Full interactive setup",
|
|
32
|
+
"xopc onboard --quick # Configure model only, then launch locally",
|
|
28
33
|
"xopc onboard --model # Configure LLM model only",
|
|
29
34
|
"xopc onboard --channels # Configure messaging channels",
|
|
30
35
|
"xopc onboard --gateway # Apply default gateway settings (quiet)"
|
|
31
|
-
])).option("--model", "Configure LLM provider and model").option("--channels", "Configure messaging channels").option("--gateway", "Configure gateway WebUI").option("--all", "Configure everything (default)").action(async (options) => {
|
|
36
|
+
])).option("--quick", "Configure model only, then launch locally").option("--model", "Configure LLM provider and model").option("--channels", "Configure messaging channels").option("--gateway", "Configure gateway WebUI").option("--all", "Configure everything (default)").action(async (options) => {
|
|
32
37
|
try {
|
|
33
38
|
await runOnboard(options, ctx);
|
|
34
39
|
} catch (error) {
|
|
@@ -50,10 +55,10 @@ async function runOnboard(options, ctx) {
|
|
|
50
55
|
configPath,
|
|
51
56
|
workspacePath
|
|
52
57
|
})).config;
|
|
53
|
-
const doModel = options.model || options.all || !options.channels && !options.gateway;
|
|
54
|
-
const doChannels = options.channels || options.all || !options.model && !options.gateway;
|
|
55
|
-
const doGateway = options.gateway || options.all || !options.model && !options.channels;
|
|
56
|
-
const runFullWizard = !options.model && !options.channels && !options.gateway;
|
|
58
|
+
const doModel = options.quick || options.model || options.all || !options.channels && !options.gateway;
|
|
59
|
+
const doChannels = !options.quick && (options.channels || options.all || !options.model && !options.gateway);
|
|
60
|
+
const doGateway = !options.quick && (options.gateway || options.all || !options.model && !options.channels);
|
|
61
|
+
const runFullWizard = !options.quick && !options.model && !options.channels && !options.gateway;
|
|
57
62
|
/** Any setup step besides the unified launch prompt ran in interactive flow. */
|
|
58
63
|
const didConfigurableSteps = doModel || doChannels || doGateway;
|
|
59
64
|
if (!isInteractive()) {
|
|
@@ -117,6 +122,7 @@ async function runOnboard(options, ctx) {
|
|
|
117
122
|
console.log("\n📁 Files:");
|
|
118
123
|
console.log(" Config:", configPath);
|
|
119
124
|
console.log(" Workspace:", workspacePath);
|
|
125
|
+
printGitHubStarHint();
|
|
120
126
|
if (isInteractive() && didConfigurableSteps) await promptLaunchAfterOnboard(config, ctx, { doChannels });
|
|
121
127
|
process.exit(0);
|
|
122
128
|
}
|