@kvman/kvcoder 0.1.6 → 0.1.8
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/dist/api.d.ts +49 -3
- package/dist/api.d.ts.map +1 -1
- package/dist/calls/run-shell.d.ts.map +1 -1
- package/dist/calls/run-shell.js +39 -9
- package/dist/calls/run-shell.js.map +1 -1
- package/dist/connector-call.d.ts +1 -1
- package/dist/connector-call.d.ts.map +1 -1
- package/dist/connector-call.js +4 -2
- package/dist/connector-call.js.map +1 -1
- package/dist/connectors/artifact.d.ts +1 -1
- package/dist/connectors/artifact.d.ts.map +1 -1
- package/dist/connectors/artifact.js +4 -4
- package/dist/connectors/artifact.js.map +1 -1
- package/dist/connectors/ask.d.ts +24 -0
- package/dist/connectors/ask.d.ts.map +1 -1
- package/dist/connectors/ask.js +20 -11
- package/dist/connectors/ask.js.map +1 -1
- package/dist/connectors/background.d.ts +14 -1
- package/dist/connectors/background.d.ts.map +1 -1
- package/dist/connectors/background.js +53 -23
- package/dist/connectors/background.js.map +1 -1
- package/dist/connectors/builtin-connectors.d.ts +110 -0
- package/dist/connectors/builtin-connectors.d.ts.map +1 -1
- package/dist/connectors/builtin-connectors.js +4 -1
- package/dist/connectors/builtin-connectors.js.map +1 -1
- package/dist/connectors/delegate.d.ts +3 -2
- package/dist/connectors/delegate.d.ts.map +1 -1
- package/dist/connectors/delegate.js +27 -9
- package/dist/connectors/delegate.js.map +1 -1
- package/dist/connectors/execution-map.d.ts +62 -0
- package/dist/connectors/execution-map.d.ts.map +1 -0
- package/dist/connectors/execution-map.js +142 -0
- package/dist/connectors/execution-map.js.map +1 -0
- package/dist/connectors/fs.d.ts +32 -1
- package/dist/connectors/fs.d.ts.map +1 -1
- package/dist/connectors/fs.js +76 -45
- package/dist/connectors/fs.js.map +1 -1
- package/dist/connectors/mcp.d.ts +18 -1
- package/dist/connectors/mcp.d.ts.map +1 -1
- package/dist/connectors/mcp.js +54 -6
- package/dist/connectors/mcp.js.map +1 -1
- package/dist/connectors/payload-fields.d.ts.map +1 -1
- package/dist/connectors/payload-fields.js +1 -1
- package/dist/connectors/payload-fields.js.map +1 -1
- package/dist/delegate/approved-run.d.ts +4 -6
- package/dist/delegate/approved-run.d.ts.map +1 -1
- package/dist/delegate/approved-run.js +74 -34
- package/dist/delegate/approved-run.js.map +1 -1
- package/dist/delegate/git-staging.d.ts +12 -0
- package/dist/delegate/git-staging.d.ts.map +1 -0
- package/dist/delegate/git-staging.js +54 -0
- package/dist/delegate/git-staging.js.map +1 -0
- package/dist/delegate/permission.d.ts +240 -0
- package/dist/delegate/permission.d.ts.map +1 -0
- package/dist/delegate/permission.js +78 -0
- package/dist/delegate/permission.js.map +1 -0
- package/dist/delegate/program-permission.d.ts +27 -0
- package/dist/delegate/program-permission.d.ts.map +1 -0
- package/dist/delegate/program-permission.js +53 -0
- package/dist/delegate/program-permission.js.map +1 -0
- package/dist/delegate/register-worker-run.d.ts.map +1 -1
- package/dist/delegate/register-worker-run.js +27 -11
- package/dist/delegate/register-worker-run.js.map +1 -1
- package/dist/delegate/run-program.d.ts.map +1 -1
- package/dist/delegate/run-program.js +29 -8
- package/dist/delegate/run-program.js.map +1 -1
- package/dist/delegate/runs.d.ts +14 -4
- package/dist/delegate/runs.d.ts.map +1 -1
- package/dist/delegate/runs.js +49 -19
- package/dist/delegate/runs.js.map +1 -1
- package/dist/delegate/staging-guard.d.ts +9 -0
- package/dist/delegate/staging-guard.d.ts.map +1 -0
- package/dist/delegate/staging-guard.js +55 -0
- package/dist/delegate/staging-guard.js.map +1 -0
- package/dist/delegate/start-background.d.ts +7 -0
- package/dist/delegate/start-background.d.ts.map +1 -0
- package/dist/delegate/start-background.js +32 -0
- package/dist/delegate/start-background.js.map +1 -0
- package/dist/delegate/start-pending.d.ts +5 -0
- package/dist/delegate/start-pending.d.ts.map +1 -0
- package/dist/delegate/start-pending.js +42 -0
- package/dist/delegate/start-pending.js.map +1 -0
- package/dist/delegate/workers.d.ts +5 -2
- package/dist/delegate/workers.d.ts.map +1 -1
- package/dist/delegate/workers.js +44 -8
- package/dist/delegate/workers.js.map +1 -1
- package/dist/files/file-change.d.ts +28 -0
- package/dist/files/file-change.d.ts.map +1 -0
- package/dist/files/file-change.js +125 -0
- package/dist/files/file-change.js.map +1 -0
- package/dist/files/file-parts.d.ts +18 -0
- package/dist/files/file-parts.d.ts.map +1 -0
- package/dist/files/file-parts.js +40 -0
- package/dist/files/file-parts.js.map +1 -0
- package/dist/files/read-file.d.ts +9 -1
- package/dist/files/read-file.d.ts.map +1 -1
- package/dist/files/read-file.js +35 -13
- package/dist/files/read-file.js.map +1 -1
- package/dist/files/search-text.d.ts +12 -2
- package/dist/files/search-text.d.ts.map +1 -1
- package/dist/files/search-text.js +87 -23
- package/dist/files/search-text.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/jobs/job-rows.d.ts +11 -2
- package/dist/jobs/job-rows.d.ts.map +1 -1
- package/dist/jobs/job-rows.js +24 -13
- package/dist/jobs/job-rows.js.map +1 -1
- package/dist/jobs/process-handlers.d.ts.map +1 -1
- package/dist/jobs/process-handlers.js +12 -1
- package/dist/jobs/process-handlers.js.map +1 -1
- package/dist/jobs/process-report.d.ts.map +1 -1
- package/dist/jobs/process-report.js +2 -1
- package/dist/jobs/process-report.js.map +1 -1
- package/dist/jobs/process-run.d.ts.map +1 -1
- package/dist/jobs/process-run.js +2 -1
- package/dist/jobs/process-run.js.map +1 -1
- package/dist/jobs/register-jobs.d.ts.map +1 -1
- package/dist/jobs/register-jobs.js +1 -0
- package/dist/jobs/register-jobs.js.map +1 -1
- package/dist/maps/map-reminder.d.ts +7 -0
- package/dist/maps/map-reminder.d.ts.map +1 -0
- package/dist/maps/map-reminder.js +24 -0
- package/dist/maps/map-reminder.js.map +1 -0
- package/dist/maps/map-rules.d.ts +36 -0
- package/dist/maps/map-rules.d.ts.map +1 -0
- package/dist/maps/map-rules.js +86 -0
- package/dist/maps/map-rules.js.map +1 -0
- package/dist/maps/map-schema.d.ts +55 -0
- package/dist/maps/map-schema.d.ts.map +1 -0
- package/dist/maps/map-schema.js +27 -0
- package/dist/maps/map-schema.js.map +1 -0
- package/dist/maps/register-maps.d.ts +3 -0
- package/dist/maps/register-maps.d.ts.map +1 -0
- package/dist/maps/register-maps.js +21 -0
- package/dist/maps/register-maps.js.map +1 -0
- package/dist/mcp/connect.d.ts +2 -0
- package/dist/mcp/connect.d.ts.map +1 -1
- package/dist/mcp/connect.js +16 -4
- package/dist/mcp/connect.js.map +1 -1
- package/dist/mcp/oauth-provider.d.ts +8 -5
- package/dist/mcp/oauth-provider.d.ts.map +1 -1
- package/dist/mcp/oauth-provider.js +31 -22
- package/dist/mcp/oauth-provider.js.map +1 -1
- package/dist/mcp/secrets.d.ts +2 -0
- package/dist/mcp/secrets.d.ts.map +1 -1
- package/dist/mcp/secrets.js +6 -0
- package/dist/mcp/secrets.js.map +1 -1
- package/dist/mcp/sign-in.d.ts.map +1 -1
- package/dist/mcp/sign-in.js +12 -4
- package/dist/mcp/sign-in.js.map +1 -1
- package/dist/messages/receive-message.d.ts +2 -1
- package/dist/messages/receive-message.d.ts.map +1 -1
- package/dist/messages/receive-message.js +34 -9
- package/dist/messages/receive-message.js.map +1 -1
- package/dist/messages/register-messages.d.ts.map +1 -1
- package/dist/messages/register-messages.js +13 -8
- package/dist/messages/register-messages.js.map +1 -1
- package/dist/messages/send-receipt.d.ts +10 -0
- package/dist/messages/send-receipt.d.ts.map +1 -0
- package/dist/messages/send-receipt.js +14 -0
- package/dist/messages/send-receipt.js.map +1 -0
- package/dist/prompt/build-prompt.d.ts +1 -0
- package/dist/prompt/build-prompt.d.ts.map +1 -1
- package/dist/prompt/build-prompt.js +5 -1
- package/dist/prompt/build-prompt.js.map +1 -1
- package/dist/prompt/project-rules.d.ts +6 -0
- package/dist/prompt/project-rules.d.ts.map +1 -0
- package/dist/prompt/project-rules.js +37 -0
- package/dist/prompt/project-rules.js.map +1 -0
- package/dist/prompt/session-grants.d.ts +209 -0
- package/dist/prompt/session-grants.d.ts.map +1 -0
- package/dist/prompt/session-grants.js +50 -0
- package/dist/prompt/session-grants.js.map +1 -0
- package/dist/prompt/session-prompt.d.ts +3 -2
- package/dist/prompt/session-prompt.d.ts.map +1 -1
- package/dist/prompt/session-prompt.js +24 -40
- package/dist/prompt/session-prompt.js.map +1 -1
- package/dist/prompt/working-method.d.ts.map +1 -1
- package/dist/prompt/working-method.js +23 -17
- package/dist/prompt/working-method.js.map +1 -1
- package/dist/register-settings.d.ts +3 -1
- package/dist/register-settings.d.ts.map +1 -1
- package/dist/register-settings.js +5 -4
- package/dist/register-settings.js.map +1 -1
- package/dist/registry/register-connectors.d.ts +9 -0
- package/dist/registry/register-connectors.d.ts.map +1 -1
- package/dist/registry/register-connectors.js +20 -12
- package/dist/registry/register-connectors.js.map +1 -1
- package/dist/result-text.d.ts +4 -0
- package/dist/result-text.d.ts.map +1 -1
- package/dist/result-text.js +9 -0
- package/dist/result-text.js.map +1 -1
- package/dist/schemas/records.d.ts +142 -0
- package/dist/schemas/records.d.ts.map +1 -1
- package/dist/schemas/records.js +60 -2
- package/dist/schemas/records.js.map +1 -1
- package/dist/sessions/execution-root.d.ts +8 -0
- package/dist/sessions/execution-root.d.ts.map +1 -0
- package/dist/sessions/execution-root.js +25 -0
- package/dist/sessions/execution-root.js.map +1 -0
- package/dist/sessions/new-session.d.ts +5 -1
- package/dist/sessions/new-session.d.ts.map +1 -1
- package/dist/sessions/new-session.js +17 -4
- package/dist/sessions/new-session.js.map +1 -1
- package/dist/sessions/register-context.d.ts.map +1 -1
- package/dist/sessions/register-context.js +6 -5
- package/dist/sessions/register-context.js.map +1 -1
- package/dist/sessions/register-fork-export.d.ts.map +1 -1
- package/dist/sessions/register-fork-export.js +5 -3
- package/dist/sessions/register-fork-export.js.map +1 -1
- package/dist/sessions/register-lifecycle.d.ts.map +1 -1
- package/dist/sessions/register-lifecycle.js +14 -5
- package/dist/sessions/register-lifecycle.js.map +1 -1
- package/dist/sessions/register-sessions.d.ts.map +1 -1
- package/dist/sessions/register-sessions.js +0 -2
- package/dist/sessions/register-sessions.js.map +1 -1
- package/dist/sessions/session-view.d.ts +23 -0
- package/dist/sessions/session-view.d.ts.map +1 -1
- package/dist/sessions/session-view.js +4 -1
- package/dist/sessions/session-view.js.map +1 -1
- package/dist/store/all-docs.d.ts +4 -0
- package/dist/store/all-docs.d.ts.map +1 -0
- package/dist/store/all-docs.js +14 -0
- package/dist/store/all-docs.js.map +1 -0
- package/dist/store/collections.d.ts +230 -0
- package/dist/store/collections.d.ts.map +1 -1
- package/dist/store/collections.js +16 -1
- package/dist/store/collections.js.map +1 -1
- package/dist/turns/answer-fingerprint.d.ts +4 -0
- package/dist/turns/answer-fingerprint.d.ts.map +1 -0
- package/dist/turns/answer-fingerprint.js +18 -0
- package/dist/turns/answer-fingerprint.js.map +1 -0
- package/dist/turns/apply-answer.d.ts +19 -0
- package/dist/turns/apply-answer.d.ts.map +1 -0
- package/dist/turns/apply-answer.js +47 -0
- package/dist/turns/apply-answer.js.map +1 -0
- package/dist/turns/background.d.ts +3 -0
- package/dist/turns/background.d.ts.map +1 -1
- package/dist/turns/background.js +13 -12
- package/dist/turns/background.js.map +1 -1
- package/dist/turns/call-permission.d.ts +22 -0
- package/dist/turns/call-permission.d.ts.map +1 -0
- package/dist/turns/call-permission.js +49 -0
- package/dist/turns/call-permission.js.map +1 -0
- package/dist/turns/cancel-step-job.d.ts +14 -0
- package/dist/turns/cancel-step-job.d.ts.map +1 -0
- package/dist/turns/cancel-step-job.js +35 -0
- package/dist/turns/cancel-step-job.js.map +1 -0
- package/dist/turns/child-result.d.ts +7 -0
- package/dist/turns/child-result.d.ts.map +1 -0
- package/dist/turns/child-result.js +24 -0
- package/dist/turns/child-result.js.map +1 -0
- package/dist/turns/compaction.d.ts +15 -1
- package/dist/turns/compaction.d.ts.map +1 -1
- package/dist/turns/compaction.js +44 -16
- package/dist/turns/compaction.js.map +1 -1
- package/dist/turns/end-turn-state.d.ts +42 -0
- package/dist/turns/end-turn-state.d.ts.map +1 -0
- package/dist/turns/end-turn-state.js +64 -0
- package/dist/turns/end-turn-state.js.map +1 -0
- package/dist/turns/end-turn.d.ts +7 -8
- package/dist/turns/end-turn.d.ts.map +1 -1
- package/dist/turns/end-turn.js +52 -55
- package/dist/turns/end-turn.js.map +1 -1
- package/dist/turns/helper-calls.d.ts +6 -0
- package/dist/turns/helper-calls.d.ts.map +1 -0
- package/dist/turns/helper-calls.js +8 -0
- package/dist/turns/helper-calls.js.map +1 -0
- package/dist/turns/history.d.ts +3 -1
- package/dist/turns/history.d.ts.map +1 -1
- package/dist/turns/history.js +15 -7
- package/dist/turns/history.js.map +1 -1
- package/dist/turns/lost-reply.d.ts +7 -0
- package/dist/turns/lost-reply.d.ts.map +1 -1
- package/dist/turns/lost-reply.js +12 -0
- package/dist/turns/lost-reply.js.map +1 -1
- package/dist/turns/message-blocks.d.ts +2 -0
- package/dist/turns/message-blocks.d.ts.map +1 -1
- package/dist/turns/message-blocks.js +7 -0
- package/dist/turns/message-blocks.js.map +1 -1
- package/dist/turns/model-context.d.ts +2 -0
- package/dist/turns/model-context.d.ts.map +1 -1
- package/dist/turns/model-context.js +23 -4
- package/dist/turns/model-context.js.map +1 -1
- package/dist/turns/model-retry.d.ts +2 -1
- package/dist/turns/model-retry.d.ts.map +1 -1
- package/dist/turns/model-retry.js +5 -1
- package/dist/turns/model-retry.js.map +1 -1
- package/dist/turns/read-only.d.ts +6 -0
- package/dist/turns/read-only.d.ts.map +1 -0
- package/dist/turns/read-only.js +12 -0
- package/dist/turns/read-only.js.map +1 -0
- package/dist/turns/receipt-job.d.ts +5 -0
- package/dist/turns/receipt-job.d.ts.map +1 -0
- package/dist/turns/receipt-job.js +40 -0
- package/dist/turns/receipt-job.js.map +1 -0
- package/dist/turns/recover-workspace.d.ts +9 -0
- package/dist/turns/recover-workspace.d.ts.map +1 -0
- package/dist/turns/recover-workspace.js +79 -0
- package/dist/turns/recover-workspace.js.map +1 -0
- package/dist/turns/recovery-state.d.ts +19 -0
- package/dist/turns/recovery-state.d.ts.map +1 -0
- package/dist/turns/recovery-state.js +87 -0
- package/dist/turns/recovery-state.js.map +1 -0
- package/dist/turns/register-interruptions.d.ts.map +1 -1
- package/dist/turns/register-interruptions.js +19 -8
- package/dist/turns/register-interruptions.js.map +1 -1
- package/dist/turns/register-turns.d.ts.map +1 -1
- package/dist/turns/register-turns.js +42 -31
- package/dist/turns/register-turns.js.map +1 -1
- package/dist/turns/resolve.d.ts +4 -0
- package/dist/turns/resolve.d.ts.map +1 -1
- package/dist/turns/resolve.js +19 -17
- package/dist/turns/resolve.js.map +1 -1
- package/dist/turns/retry-turn.d.ts +4 -0
- package/dist/turns/retry-turn.d.ts.map +1 -0
- package/dist/turns/retry-turn.js +20 -0
- package/dist/turns/retry-turn.js.map +1 -0
- package/dist/turns/run-calls.d.ts +21 -4
- package/dist/turns/run-calls.d.ts.map +1 -1
- package/dist/turns/run-calls.js +157 -41
- package/dist/turns/run-calls.js.map +1 -1
- package/dist/turns/run-command.d.ts +5 -3
- package/dist/turns/run-command.d.ts.map +1 -1
- package/dist/turns/run-command.js +21 -12
- package/dist/turns/run-command.js.map +1 -1
- package/dist/turns/settle-calls.d.ts +2 -8
- package/dist/turns/settle-calls.d.ts.map +1 -1
- package/dist/turns/settle-calls.js +26 -35
- package/dist/turns/settle-calls.js.map +1 -1
- package/dist/turns/start-turn.d.ts +8 -83
- package/dist/turns/start-turn.d.ts.map +1 -1
- package/dist/turns/start-turn.js +35 -24
- package/dist/turns/start-turn.js.map +1 -1
- package/dist/turns/step-claim.d.ts +39 -0
- package/dist/turns/step-claim.d.ts.map +1 -0
- package/dist/turns/step-claim.js +72 -0
- package/dist/turns/step-claim.js.map +1 -0
- package/dist/turns/step-intents.d.ts +31 -0
- package/dist/turns/step-intents.d.ts.map +1 -0
- package/dist/turns/step-intents.js +101 -0
- package/dist/turns/step-intents.js.map +1 -0
- package/dist/turns/step-next.d.ts +17 -0
- package/dist/turns/step-next.d.ts.map +1 -0
- package/dist/turns/step-next.js +25 -0
- package/dist/turns/step-next.js.map +1 -0
- package/dist/turns/step.d.ts +1 -1
- package/dist/turns/step.d.ts.map +1 -1
- package/dist/turns/step.js +108 -88
- package/dist/turns/step.js.map +1 -1
- package/dist/turns/summary-facts.d.ts +25 -0
- package/dist/turns/summary-facts.d.ts.map +1 -0
- package/dist/turns/summary-facts.js +63 -0
- package/dist/turns/summary-facts.js.map +1 -0
- package/dist/turns/usage.d.ts +7 -0
- package/dist/turns/usage.d.ts.map +1 -0
- package/dist/turns/usage.js +18 -0
- package/dist/turns/usage.js.map +1 -0
- package/dist/ui/register-ui.js +3 -3
- package/dist/ui/register-ui.js.map +1 -1
- package/dist/web/components/approval.css +2 -0
- package/dist/web/components/approval.js +233 -0
- package/dist/web/components/call.css +1 -1
- package/dist/web/components/call.js +430 -304
- package/dist/web/components/connectors.css +1 -1
- package/dist/web/components/connectors.js +595 -592
- package/dist/web/components/conversation.css +1 -1
- package/dist/web/components/conversation.js +2978 -1637
- package/dist/web/components/mcp-sign-in.css +1 -1
- package/dist/web/components/model.css +1 -1
- package/dist/web/components/model.js +138 -134
- package/dist/web/components/question.css +1 -1
- package/dist/web/components/question.js +148 -78
- package/dist/web/components/sessions.css +1 -1
- package/docs/connectors.md +3 -3
- package/locales/ar.json +95 -13
- package/locales/en.json +95 -13
- package/package.json +6 -6
- package/dist/turns/cancel-turn.d.ts +0 -3
- package/dist/turns/cancel-turn.d.ts.map +0 -1
- package/dist/turns/cancel-turn.js +0 -31
- package/dist/turns/cancel-turn.js.map +0 -1
|
@@ -1,24 +1,31 @@
|
|
|
1
|
-
// How the agent works (plan 08 §8.2; ADR 0022, 2 to 4): the lead of a chat
|
|
2
|
-
// worker does the one task it was given. Both end with the
|
|
1
|
+
// How the agent works (plan 08 §8.2; ADR 0022, 2 to 4; ADR 0065; ADR 0072; ADR 0074; ADR 0075; ADR 0078; ADR 0081): the lead of a chat sizes up each task and chooses its path from the
|
|
2
|
+
// named parts; a worker does the one task it was given and answers the lead alone (ADR 0063). Both end with the call-or-final-answer rule.
|
|
3
3
|
const evidence = 'Decide from evidence: every decision and every claim rests on something you read, ran, or were told. When you report a result, say what you checked and what you didn\'t.';
|
|
4
|
-
const simplest = "Use the simplest practical way that follows the project's conventions and sound engineering practice, and don't add what wasn't asked.";
|
|
5
|
-
const together = '
|
|
6
|
-
const
|
|
4
|
+
const simplest = "Use the simplest practical way that follows the project's conventions and sound engineering practice, and don't add what wasn't asked: no extra feature, file, option, or document.";
|
|
5
|
+
const together = 'In one reply, reads and searches run at the same time, and calls that change something (shell lines, writes, edits) run one after another in the order you give them. So put independent calls (reads, searches, separate files, separate workers) in one reply, and a call that needs another call\'s result in a later reply: several new files are several `fs write` calls in one reply, not one reply each.';
|
|
6
|
+
const context = "Spend context with care: every result stays in the conversation and is read again at every step. Search before you read, read only the part of a long file you need, and don't read again a file you already hold: after `fs edit` the result shows the new lines. When you need a background run's result before you can go on, call `background wait` once; don't ask for its output again and again, and a run that ends tells you in a message.";
|
|
7
|
+
const artifacts = 'Show the person anything long to read or see (a report, a design, an HTML page) in an artifact, not in a reply.';
|
|
7
8
|
const asking = 'To put a question to the person (a choice, a yes or no, a free answer), call `ask`.';
|
|
8
9
|
const checked = "Before you say that something runs or works, check it the way the person would: run it, request its address, or run its test; if you couldn't, say what is unchecked. After you start a server, request its address once before you give it to the person.";
|
|
9
|
-
const short =
|
|
10
|
+
const short = "Talk to the person clearly and briefly. Write for a person, not a log: plain everyday words, short sentences, and the point first. Say only what they need: what you did, what it showed, and what is left or needs their decision. Leave out your inner steps, connector and command names, payloads, ids, and long output unless they ask; name a file or a technical term only when it helps them, and explain the term in a few words. Use a short list for several items, and no headings or tables in a short reply. Keep replies short: say what you did and what is left.";
|
|
10
11
|
const callOrFinalAnswer = 'Say what you are about to do in the same reply as the call that does it, and never make a call that does nothing, such as `true`, just to keep going. A reply with no tool call is your final answer and ends the turn: when work remains, your reply must contain the call that does the next piece. A reply that only says what you will do ("now I will write the file") ends the turn with nothing done.';
|
|
11
12
|
const leadMethod = [
|
|
12
|
-
'How you work. You are the one who decides: connectors and workers are how you act, and the result is yours.
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
'How you work. You are the one who decides: connectors and workers are how you act, and the result is yours. No path is fixed: you choose it for each task from what the task is, and you change it when what you find changes it.',
|
|
14
|
+
'Size up the task first. Read the request and look at what it touches, then judge four things: how clear it is (can you say what done looks like?), how much it changes (one place, or several parts that depend on each other), what could go wrong and how hard that is to take back, and whether the person will look at the result (a screen, a page, a report). From that, choose the lightest path that delivers the task well. A question needs an answer from what you read, and no change. A small, clear change needs doing and checking, and nothing more. An unclear request needs its questions answered before any work. Work in several parts, or work that is hard to take back, needs an execution map the person agreed to. Separate parts may need workers, and a result the person looks at needs showing. A task that turns out larger than it looked gets its map then, and one that turns out simple drops what it does not need.',
|
|
15
|
+
'These are the parts of a path. Use only the ones your path has.',
|
|
16
|
+
"Understand. Before you decide anything, find out what the person is trying to achieve, as far as the task needs. Read everything they sent, attached images and files too, then look at what exists: the files, config, tests, and data the request touches, the project's rules, and what already does part of it, so you build on it and not beside it. Work out what the person needs, not only what they typed: answer for yourself what outcome they want and what they will do with it; what done looks like to them, as examples they would check (an exact name, a screen, an output); what the work changes or must keep working (other callers, stored data, settings, users); whether they asked for a goal or for a particular means (a format, a library, a design), and whether that means serves the goal; what they didn't say that changes the result (who uses it, how much data or load, which platforms and languages, privacy and security, and how good is good enough); and which of your connectors and workers help, and what is missing. Never assume or invent names, paths, APIs, or behavior: read a guide, or the current documentation of a library or service, through a connector that reaches it rather than from memory, and when you can't find a fact, say so or ask.",
|
|
17
|
+
"Clarify. Sort what looking left open. A fact that looking would answer: look, don't ask. An ordinary detail that is easy to change: decide it yourself, and say what you chose. A decision only the person can make, or a gap that changes the result, the design, or stored data, such as a request that is unclear, contradicts itself or the code, or would break what exists: ask before any work. When the means they asked for works against their goal, or a clearly better way exists, say so and offer both before you build theirs. Ask in one round when you can, after you looked and before you plan: put each question in its own `ask` call, with all the calls in one reply, and use `ask choice` whenever you offer options, your recommended one first and each option saying what it leads to.",
|
|
18
|
+
"Plan. Only after you understood the request, looked at what exists, and have your answers, and before you change anything, plan with `execution-map set`: never in your first reply, because a map made before you looked is a guess. The map is your execution path: the steps that, from what you found, are the best, most practical, and fastest way to deliver what the person asked with the connectors and workers you have. It is the implementation plan the person reads and agrees to, so make it detailed, not an outline. Give the goal, the outcome the person wants in their own terms, then the steps, each with a title, a description, what it comes after, what it uses, and how you will check it. A step is one stage of the path: what gets done, who does it, and how it is checked. It may cover the few files that change together, but it is always concrete, something you can name before you start it, never a phase such as implement or a whole feature. Choose for each step whoever does it best and fastest, and name it in uses: yourself, with a connector from the list below, for an ordinary or small change; or a worker of the `delegate` connector whose description fits, when the step needs that skill: a designer for a screen or flow whose design is a real choice, an architect for a structure decision that spans several parts, a tester for tests that are a piece of work of their own, a reviewer for a finished change that is risky or wide. A step's description says what it changes and how, naming the files or parts and the approach, in words the person understands without reading the code; its check is the exact command you will run or the thing you will look at. Shape the map from how the work will really run. Your own steps are one line: each comes after the one before it, in the order you will do them. A branch means delegation: steps side by side on the map run at the same time, each done by a worker. So draw a branch only for a piece of work you hand to a worker: it needs nothing from the other branches, it touches files or parts no other branch touches, it is large enough to be worth a worker that starts with none of this conversation, and its step names that worker in uses. Give the branches that start together the same `after`, or none, and don't split small independent changes into branches: do them in your own line. Where branches meet, add the step that joins them, such as wiring the parts together or the check that needs all of them, after every branch it needs. Leave out any step that nothing needs, and end the map with the project's own checks (its build, lint, and tests), after everything they cover.",
|
|
19
|
+
'Confirm the plan. The person agrees to the map before you work on it. Once an `execution-map set` that made the map or changed its steps succeeded, and before you start any step, call `ask choice` with other set to true. Its question first says in a few lines what you understood: the goal, what done looks like, what stays as it is, and the choices you made for the person; then it asks whether to start, with the option that starts first and an option that changes the plan, so the person can write what to change. When they ask for changes, set the map again with them and ask again; start only after they chose to start. A change of status with `execution-map update` needs no confirmation.',
|
|
20
|
+
"Execute. With a map, the map is how you work, and the person follows the work on it, so it must always say where you are. Every map call returns the steps that are ready: take those, and never work on a step the map does not have. Mark a step doing before your first call on it, in the same reply as that call, and when several are ready, mark each one you start. When several steps are ready together they are branches: mark each doing and start them all in one reply, one `delegate run` each, so they run at the same time. Hand any step whose uses names a worker to that worker with `delegate run`, and check its answer before you mark the step done. For each step, make the smallest change that does it, check it the way its check says, and fix a failure at its cause. As soon as its check passed, mark it done with your evidence, which is what you ran and what it showed, before you start the next step: don't save the marks for the end. A step is not done because you wrote it. Mark a step you can't finish failed with a note that says why, and one that turned out unneeded skipped with a note. When the plan itself changes (a step is missing, one is no longer needed, or the order was wrong), set the map again before you go on: a step whose id stays keeps how far it got. With no map, make the smallest change that does the task, check it, and fix a failure at its cause.",
|
|
21
|
+
'Stay on the task. Do what was asked and nothing else. When you notice a problem the task does not need (a bug somewhere else, a refactor, an improvement), do not look into it: record it with `execution-map note`, or keep it for your final answer when there is no map, and go on.',
|
|
22
|
+
"Delegate. A step goes to a worker of the `delegate` connector when the worker does it better or faster than you would: a specialist whose skill the step needs, separate work that runs beside yours, or a fresh review of a change you finished; its entry lists the workers and what each is for. Don't delegate what a few calls of your own would do, and ask for one review of a piece of work, not several. Several `delegate run` calls in one reply run in parallel. Brief the worker with the goal, the facts it needs, its limits, and what to return. A worker sees none of this conversation and reads again every file it needs, so put the paths, the lines that matter, and what you already found in the brief. Read what a worker returns and check it before you rely on it: its work is your responsibility. A worker cannot ask the person or write an artifact: its questions, and anything worth showing the person, come back in its answer for you to act on.",
|
|
23
|
+
'Show what the person will look at. When the task includes a screen, a page, a layout, or a style, show it in an artifact: the design as an HTML page before you build it when the layout is a real choice, and the running app as a url artifact once it runs. Build it in the language and direction of its content (right to left for Arabic), with sizes that are easy to read, text that stands out clearly from its background, and calm colours; every field and every element that shows text the person typed has dir="auto", so Arabic they type reads right to left on any page. Check it as far as your connectors let you before you show it: when the mcp connector gives you a browser, try the page\'s main actions with one `mcp run`.',
|
|
24
|
+
"Finish. The work is done when it is ready for production: it does what was asked, it handles the errors and edge cases that will happen, it follows the project's conventions, its checks and tests pass, and nothing unfinished or temporary is left behind. Stop what you started in the background and no longer need, and delete the temporary files you or your tools left in the workspace folder, such as logs, snapshots, and scratch files. Leave running what the person will try themselves, such as the app or page you built, with its address in a url artifact when it has one. When you found how this project is built, tested, or run and its AGENTS.md does not say it, add a short Commands section to AGENTS.md with risky set to true: that asks the person, so don't ask them a second time with `ask`. Your final answer, in plain words and as short as the facts allow, says what was done, what you checked and what it showed, what is unchecked, what still runs in the background, and what you noted for later.",
|
|
19
25
|
evidence,
|
|
20
26
|
simplest,
|
|
21
27
|
together,
|
|
28
|
+
context,
|
|
22
29
|
artifacts,
|
|
23
30
|
asking,
|
|
24
31
|
checked,
|
|
@@ -26,15 +33,14 @@ const leadMethod = [
|
|
|
26
33
|
callOrFinalAnswer,
|
|
27
34
|
].join('\n');
|
|
28
35
|
const workerMethod = [
|
|
29
|
-
"How you work. Do the task you were given and return the result; don't re-plan it or widen it
|
|
36
|
+
"How you work. Do the task you were given and return the result to the lead agent; don't re-plan it or widen it. You don't talk to the person: the lead does. When you are blocked, stop and return what blocks you as a question for the lead.",
|
|
30
37
|
"1. Understand. Read the task, then the files, config, and tests it touches. Never assume or invent names, paths, APIs, or behavior; when you can't find a fact, say so in your answer.",
|
|
31
38
|
"2. Do it. Make the smallest change that does the task, check it with the project's own check or tests, and fix a failure at its cause. Write each file in its own call, with `fs write`.",
|
|
32
|
-
'3. Return. Your last reply is the
|
|
39
|
+
'3. Return. Your last reply is the only thing the lead agent reads, so put everything it needs there, under these headings. Result: what you did or found. Evidence: what you ran or read that shows it, with paths and lines. Files changed: each path and what changed, or none. Unchecked: what you could not verify or left undone. Questions: what the lead must decide or ask the person, or none. Keep it as short as the facts allow.',
|
|
33
40
|
evidence,
|
|
34
41
|
simplest,
|
|
35
42
|
together,
|
|
36
|
-
|
|
37
|
-
asking,
|
|
43
|
+
context,
|
|
38
44
|
checked,
|
|
39
45
|
callOrFinalAnswer,
|
|
40
46
|
].join('\n');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"working-method.js","sourceRoot":"","sources":["../../src/prompt/working-method.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"working-method.js","sourceRoot":"","sources":["../../src/prompt/working-method.ts"],"names":[],"mappings":"AAAA,wLAAwL;AACxL,2IAA2I;AAK3I,MAAM,QAAQ,GAAG,2KAA2K,CAAC;AAC7L,MAAM,QAAQ,GAAG,qLAAqL,CAAC;AACvM,MAAM,QAAQ,GAAG,kZAAkZ,CAAC;AACpa,MAAM,OAAO,GAAG,qbAAqb,CAAC;AACtc,MAAM,SAAS,GAAG,iHAAiH,CAAC;AACpI,MAAM,MAAM,GAAG,qFAAqF,CAAC;AACrG,MAAM,OAAO,GAAG,4PAA4P,CAAC;AAC7Q,MAAM,KAAK,GACT,mjBAAmjB,CAAC;AACtjB,MAAM,iBAAiB,GACrB,8YAA8Y,CAAC;AAEjZ,MAAM,UAAU,GAAG;IACjB,mOAAmO;IACnO,y5BAAy5B;IACz5B,iEAAiE;IACjE,4uCAA4uC;IAC5uC,mxBAAmxB;IACnxB,slFAAslF;IACtlF,wrBAAwrB;IACxrB,o2CAAo2C;IACp2C,wRAAwR;IACxR,u7BAAu7B;IACv7B,wtBAAwtB;IACxtB,g/BAAg/B;IACh/B,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,SAAS;IACT,MAAM;IACN,OAAO;IACP,KAAK;IACL,iBAAiB;CAClB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb,MAAM,YAAY,GAAG;IACnB,gPAAgP;IAChP,wLAAwL;IACxL,0LAA0L;IAC1L,8aAA8a;IAC9a,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,OAAO;IACP,iBAAiB;CAClB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb,0EAA0E;AAC1E,MAAM,UAAU,YAAY,CAAC,IAAU,EAAE,KAAa;IACpD,IAAI,IAAI,KAAK,MAAM;QAAE,OAAO,uLAAuL,KAAK,GAAG,CAAC;IAC5N,OAAO,0EAA0E,KAAK,mDAAmD,CAAC;AAC5I,CAAC;AAED,0CAA0C;AAC1C,MAAM,UAAU,aAAa,CAAC,IAAU;IACtC,OAAO,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,YAAY,CAAC;AACrD,CAAC"}
|
|
@@ -11,6 +11,7 @@ export declare const settingSchemas: {
|
|
|
11
11
|
maxSteps: z.ZodNullable<z.ZodNumber>;
|
|
12
12
|
approval: z.ZodEnum<{
|
|
13
13
|
ask: "ask";
|
|
14
|
+
never: "never";
|
|
14
15
|
auto: "auto";
|
|
15
16
|
}>;
|
|
16
17
|
shellPath: z.ZodNullable<z.ZodString>;
|
|
@@ -40,6 +41,7 @@ export declare const settingSchemas: {
|
|
|
40
41
|
}, z.core.$strict>]>>;
|
|
41
42
|
workers: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
42
43
|
kind: z.ZodLiteral<"subagent">;
|
|
44
|
+
readOnly: z.ZodDefault<z.ZodBoolean>;
|
|
43
45
|
connectors: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
44
46
|
model: z.ZodNullable<z.ZodString>;
|
|
45
47
|
thinking: z.ZodNullable<z.ZodEnum<{
|
|
@@ -124,7 +126,7 @@ export declare function disabledConnectors(ctx: Ctx): Promise<Set<string>>;
|
|
|
124
126
|
/** The settings a step reads, parsed. */
|
|
125
127
|
export declare function readSettings(ctx: Ctx): Promise<{
|
|
126
128
|
maxSteps: number | null;
|
|
127
|
-
approval: "ask" | "auto";
|
|
129
|
+
approval: "ask" | "never" | "auto";
|
|
128
130
|
shellPath: string | null;
|
|
129
131
|
compactAt: number;
|
|
130
132
|
compactKeep: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register-settings.d.ts","sourceRoot":"","sources":["../src/register-settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,KAAK,GAAG,EAAE,MAAM,YAAY,CAAC;AAOzC,eAAO,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"register-settings.d.ts","sourceRoot":"","sources":["../src/register-settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,KAAK,GAAG,EAAE,MAAM,YAAY,CAAC;AAOzC,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAa1B,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI,CAc/C;AAED,4FAA4F;AAC5F,wBAAsB,kBAAkB,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAEvE;AAED,yCAAyC;AACzC,wBAAsB,YAAY,CAAC,GAAG,EAAE,GAAG;;;;;;;;;;;;;;;GAU1C;AAED,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC,CAAC"}
|
|
@@ -8,7 +8,7 @@ export const settingSchemas = {
|
|
|
8
8
|
model: z.string().min(1).nullable(),
|
|
9
9
|
thinking: thinkingSchema,
|
|
10
10
|
maxSteps: z.number().int().positive().nullable(),
|
|
11
|
-
approval: z.enum(['ask', 'auto']),
|
|
11
|
+
approval: z.enum(['ask', 'auto', 'never']),
|
|
12
12
|
shellPath: z.string().min(1).nullable(),
|
|
13
13
|
compactAt: z.number().gt(0).max(1),
|
|
14
14
|
compactKeep: z.number().int().min(1).max(100),
|
|
@@ -20,11 +20,12 @@ export const settingSchemas = {
|
|
|
20
20
|
};
|
|
21
21
|
export function registerSettings(ctx) {
|
|
22
22
|
ctx.registerSetting('kvcoder.model', { description: 'The model a new session starts with; null uses kvai.defaultModel.', schema: settingSchemas.model, default: null });
|
|
23
|
+
ctx.registerSetting('kvcoder.delegate.model', { description: "The model a helper uses when its worker names none; null uses the chat's own.", schema: settingSchemas.model, default: null });
|
|
23
24
|
ctx.registerSetting('kvcoder.thinking', { description: 'How hard the model thinks in a new session.', schema: settingSchemas.thinking, default: 'medium' });
|
|
24
25
|
ctx.registerSetting('kvcoder.maxSteps', { description: 'The most steps a turn takes before it stops; null sets no limit.', schema: settingSchemas.maxSteps, default: null });
|
|
25
|
-
ctx.registerSetting('kvcoder.
|
|
26
|
+
ctx.registerSetting('kvcoder.approval', { description: 'When a call asks the person first: only the ones the model marks risky (auto), every one that can ask (ask), or none at all (never).', schema: settingSchemas.approval, default: 'auto' });
|
|
26
27
|
ctx.registerSetting('kvcoder.shell.path', { description: 'The shell program to run; null finds bash, or pwsh then powershell.exe on Windows.', schema: settingSchemas.shellPath, default: null });
|
|
27
|
-
ctx.registerSetting('kvcoder.compactAt', { description: "The share of the model's context window above which older messages are summarized.", schema: settingSchemas.compactAt, default: 0.
|
|
28
|
+
ctx.registerSetting('kvcoder.compactAt', { description: "The share of the model's context window above which older messages are summarized.", schema: settingSchemas.compactAt, default: 0.6 });
|
|
28
29
|
ctx.registerSetting('kvcoder.compactKeep', { description: 'How many of the newest messages stay whole when older messages are summarized.', schema: settingSchemas.compactKeep, default: 10 });
|
|
29
30
|
ctx.registerSetting('kvcoder.connectors', { description: 'Binary connectors to add: programs the agent runs in the real shell.', schema: settingSchemas.connectors, default: [] });
|
|
30
31
|
ctx.registerSetting('kvcoder.connectors.disabled', { description: 'The names of the connectors that are turned off: the agent neither sees nor calls them.', schema: settingSchemas.disabledConnectors, default: [] });
|
|
@@ -41,7 +42,7 @@ export async function readSettings(ctx) {
|
|
|
41
42
|
const read = async (key, schema) => schema.parse(await ctx.settings.get(key));
|
|
42
43
|
return {
|
|
43
44
|
maxSteps: await read('kvcoder.maxSteps', settingSchemas.maxSteps),
|
|
44
|
-
approval: await read('kvcoder.
|
|
45
|
+
approval: await read('kvcoder.approval', settingSchemas.approval),
|
|
45
46
|
shellPath: await read('kvcoder.shell.path', settingSchemas.shellPath),
|
|
46
47
|
compactAt: await read('kvcoder.compactAt', settingSchemas.compactAt),
|
|
47
48
|
compactKeep: await read('kvcoder.compactKeep', settingSchemas.compactKeep),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register-settings.js","sourceRoot":"","sources":["../src/register-settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAY,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAE1E,qCAAqC;AACrC,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IACnC,QAAQ,EAAE,cAAc;IACxB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAChD,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"register-settings.js","sourceRoot":"","sources":["../src/register-settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAY,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,aAAa,EAA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AAI,CAAC,kBAAkB,EAAE,cAAc,CAAC,QAAQ,CAAC;QACjE,SAAS,EAAE,MAAM,IAAI,CAAC,oBAAoB,EAAE,cAAc,CAAC,SAAS,CAAC;QACrE,SAAS,EAAE,MAAM,IAAI,CAAC,mBAAmB,EAAE,cAAc,CAAC,SAAS,CAAC;QACpE,WAAW,EAAE,MAAM,IAAI,CAAC,qBAAqB,EAAE,cAAc,CAAC,WAAW,CAAC;QAC1E,UAAU,EAAE,MAAM,IAAI,CAAC,oBAAoB,EAAE,cAAc,CAAC,UAAU,CAAC;KACxE,CAAC;AACJ,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z, type Ctx } from '@kvman/sdk';
|
|
2
|
+
import { type TxRecords } from '../store/collections.ts';
|
|
2
3
|
declare const connectorRowSchema: z.ZodObject<{
|
|
3
4
|
name: z.ZodString;
|
|
4
5
|
description: z.ZodString;
|
|
@@ -24,6 +25,14 @@ declare const connectorRowSchema: z.ZodObject<{
|
|
|
24
25
|
optIn: z.ZodBoolean;
|
|
25
26
|
}, z.core.$strip>;
|
|
26
27
|
export type ConnectorRow = z.output<typeof connectorRowSchema>;
|
|
28
|
+
export type ConnectorPreparation = {
|
|
29
|
+
loaded: ReadonlySet<string>;
|
|
30
|
+
binaries: ConnectorRow[];
|
|
31
|
+
};
|
|
32
|
+
/** Kernel/settings preparation only; registry rows must be reread after these awaits (ADR0044). */
|
|
33
|
+
export declare function prepareConnectors(ctx: Ctx): Promise<ConnectorPreparation>;
|
|
34
|
+
/** Fresh rows in the caller's final transaction, never the rows preceding metadata awaits. */
|
|
35
|
+
export declare function connectorsInTx(store: TxRecords, prepared: ConnectorPreparation): ConnectorRow[];
|
|
27
36
|
/** Every connector the agent may use: registered ones whose owner is loaded, then the setting's binary connectors. */
|
|
28
37
|
export declare function activeConnectors(ctx: Ctx): Promise<ConnectorRow[]>;
|
|
29
38
|
export declare function registerConnectors(ctx: Ctx): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register-connectors.d.ts","sourceRoot":"","sources":["../../src/registry/register-connectors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,KAAK,GAAG,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"register-connectors.d.ts","sourceRoot":"","sources":["../../src/registry/register-connectors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,KAAK,GAAG,EAAE,MAAM,YAAY,CAAC;AAKzC,OAAO,EAAsB,KAAK,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAQ7E,QAAA,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;iBAQtB,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAc/D,MAAM,MAAM,oBAAoB,GAAG;IAAE,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAAC,QAAQ,EAAE,YAAY,EAAE,CAAA;CAAE,CAAC;AAE7F,mGAAmG;AACnG,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAM/E;AAED,8FAA8F;AAC9F,wBAAgB,cAAc,CAAC,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,oBAAoB,GAAG,YAAY,EAAE,CAI/F;AAED,sHAAsH;AACtH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CAOxE;AAmCD,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI,CAyDjD;AAED,wGAAwG;AACxG,wBAAsB,eAAe,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAK7D"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from '@kvman/sdk';
|
|
2
2
|
import { builtinConnectors } from "../connector-call.js";
|
|
3
3
|
import { invalid } from "../problems.js";
|
|
4
|
-
import { disabledConnectors,
|
|
4
|
+
import { disabledConnectors, settingSchemas } from "../register-settings.js";
|
|
5
5
|
import { connectorRegisterSchema, connectorSchema, exampleSchema } from "../schemas/registry.js";
|
|
6
6
|
import { records, txRecords } from "../store/collections.js";
|
|
7
7
|
import { ownSession } from "../sessions/session-lookup.js";
|
|
@@ -29,21 +29,29 @@ function rowOf(doc) {
|
|
|
29
29
|
...(doc.binary === null ? {} : { binary: { check: doc.binary.check, ...(doc.binary.install === null ? {} : { install: doc.binary.install }), ...(doc.binary.help === null ? {} : { help: doc.binary.help }) } }),
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
+
/** Kernel/settings preparation only; registry rows must be reread after these awaits (ADR0044). */
|
|
33
|
+
export async function prepareConnectors(ctx) {
|
|
34
|
+
const stored = await records(ctx.store).connectors.find({}, { limit: 1000 });
|
|
35
|
+
const loaded = await loadedOwners(ctx, stored.map(doc => doc.owner));
|
|
36
|
+
const configured = settingSchemas.connectors.parse(await ctx.settings.get('kvcoder.connectors'));
|
|
37
|
+
const binaries = configured.map(entry => ({ name: entry.name, description: entry.description, owner: 'kvcoder.connectors', kind: 'binary', binary: entry.binary, optIn: false }));
|
|
38
|
+
return { loaded, binaries };
|
|
39
|
+
}
|
|
40
|
+
/** Fresh rows in the caller's final transaction, never the rows preceding metadata awaits. */
|
|
41
|
+
export function connectorsInTx(store, prepared) {
|
|
42
|
+
const registered = store.connectors.find({}, { limit: 1000 }).filter(doc => prepared.loaded.has(doc.owner)).map(rowOf);
|
|
43
|
+
const names = new Set([...builtinConnectors, ...registered.map(connector => connector.name)]);
|
|
44
|
+
return [...registered, ...prepared.binaries.filter(connector => !names.has(connector.name))];
|
|
45
|
+
}
|
|
32
46
|
/** Every connector the agent may use: registered ones whose owner is loaded, then the setting's binary connectors. */
|
|
33
47
|
export async function activeConnectors(ctx) {
|
|
34
|
-
const
|
|
35
|
-
const
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
const fromSetting = [];
|
|
39
|
-
for (const entry of (await readSettings(ctx)).connectors) {
|
|
40
|
-
if (names.has(entry.name) || builtinConnectors.some((name) => name === entry.name)) {
|
|
48
|
+
const prepared = await prepareConnectors(ctx);
|
|
49
|
+
const connectors = await ctx.store.transaction(tx => connectorsInTx(txRecords(tx), prepared));
|
|
50
|
+
for (const entry of prepared.binaries) {
|
|
51
|
+
if (!connectors.some(connector => connector.name === entry.name && connector.owner === entry.owner))
|
|
41
52
|
ctx.log.warn('A binary connector from kvcoder.connectors has a registered name and is ignored.', { name: entry.name });
|
|
42
|
-
continue;
|
|
43
|
-
}
|
|
44
|
-
fromSetting.push({ name: entry.name, description: entry.description, owner: 'kvcoder.connectors', kind: 'binary', binary: entry.binary, optIn: false });
|
|
45
53
|
}
|
|
46
|
-
return
|
|
54
|
+
return connectors;
|
|
47
55
|
}
|
|
48
56
|
const docOf = (input) => 'commands' in input
|
|
49
57
|
? { name: input.name, description: input.description, kind: 'commands', commands: input.commands.map((command) => ({ name: command.name, command: command.command, examples: command.examples ?? [], asks: command.asks === true })), binary: null, optIn: input.optIn === true }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register-connectors.js","sourceRoot":"","sources":["../../src/registry/register-connectors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAY,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,uBAAuB,EAAE,eAAe,EAAE,aAAa,EAAqB,MAAM,wBAAwB,CAAC;AACpH,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE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CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
export declare const outputLimit: number;
|
|
3
3
|
/** The bytes kept at each end of cut output. */
|
|
4
4
|
export declare const outputKept: number;
|
|
5
|
+
/** Output without terminal colour and cursor codes. */
|
|
6
|
+
export declare const plainText: (text: string) => string;
|
|
7
|
+
/** What a command's environment adds so tools print plain output, unless the environment already chose. */
|
|
8
|
+
export declare function plainEnvironment(environment: NodeJS.ProcessEnv): Record<string, string>;
|
|
5
9
|
/** The first and last bytes of cut output around the marker. */
|
|
6
10
|
export declare function cutOutput(head: Buffer, omitted: number, tail: Buffer): string;
|
|
7
11
|
/** Cuts text over 30 KB to its first and last 15 KB around an explicit marker. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result-text.d.ts","sourceRoot":"","sources":["../src/result-text.ts"],"names":[],"mappings":"AAEA,0CAA0C;AAC1C,eAAO,MAAM,WAAW,QAAY,CAAC;AACrC,gDAAgD;AAChD,eAAO,MAAM,UAAU,QAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"result-text.d.ts","sourceRoot":"","sources":["../src/result-text.ts"],"names":[],"mappings":"AAEA,0CAA0C;AAC1C,eAAO,MAAM,WAAW,QAAY,CAAC;AACrC,gDAAgD;AAChD,eAAO,MAAM,UAAU,QAAY,CAAC;AAMpC,uDAAuD;AACvD,eAAO,MAAM,SAAS,GAAI,MAAM,MAAM,KAAG,MAAyC,CAAC;AAEnF,2GAA2G;AAC3G,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,CAAC,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAEvF;AAED,gEAAgE;AAChE,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAE7E;AAED,kFAAkF;AAClF,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAI7C;AAED,iKAAiK;AACjK,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,GAAE,SAAS,MAAM,EAAO,GAAG,MAAM,CAEnG"}
|
package/dist/result-text.js
CHANGED
|
@@ -3,6 +3,15 @@
|
|
|
3
3
|
export const outputLimit = 30 * 1024;
|
|
4
4
|
/** The bytes kept at each end of cut output. */
|
|
5
5
|
export const outputKept = 15 * 1024;
|
|
6
|
+
// Terminal codes a command prints for a person's screen (ADR 0051, 1): OSC sequences up to their end mark, CSI
|
|
7
|
+
// sequences such as colours and cursor moves, and the two-character escapes.
|
|
8
|
+
const terminalCodes = /\u001b\][^\u0007\u001b]*(?:\u0007|\u001b\\)|\u001b\[[0-?]*[ -/]*[@-~]|\u001b[()][0-9A-B]|\u001b[@-Z\\^_=>]/g;
|
|
9
|
+
/** Output without terminal colour and cursor codes. */
|
|
10
|
+
export const plainText = (text) => text.replace(terminalCodes, '');
|
|
11
|
+
/** What a command's environment adds so tools print plain output, unless the environment already chose. */
|
|
12
|
+
export function plainEnvironment(environment) {
|
|
13
|
+
return environment['NO_COLOR'] === undefined && environment['FORCE_COLOR'] === undefined ? { NO_COLOR: '1' } : {};
|
|
14
|
+
}
|
|
6
15
|
/** The first and last bytes of cut output around the marker. */
|
|
7
16
|
export function cutOutput(head, omitted, tail) {
|
|
8
17
|
return `${head.toString('utf8')}\n[… ${omitted} bytes omitted …]\n${tail.toString('utf8')}`;
|
package/dist/result-text.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result-text.js","sourceRoot":"","sources":["../src/result-text.ts"],"names":[],"mappings":"AAAA,6FAA6F;AAE7F,0CAA0C;AAC1C,MAAM,CAAC,MAAM,WAAW,GAAG,EAAE,GAAG,IAAI,CAAC;AACrC,gDAAgD;AAChD,MAAM,CAAC,MAAM,UAAU,GAAG,EAAE,GAAG,IAAI,CAAC;AAEpC,gEAAgE;AAChE,MAAM,UAAU,SAAS,CAAC,I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,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACxH,CAAC"}
|
|
@@ -60,9 +60,34 @@ export declare const messageKindSchema: z.ZodEnum<{
|
|
|
60
60
|
note: "note";
|
|
61
61
|
summary: "summary";
|
|
62
62
|
}>;
|
|
63
|
+
/** The parts of a session's usage that weren't its own replies (ADR 0058, 1). */
|
|
64
|
+
export declare const usageBySchema: z.ZodObject<{
|
|
65
|
+
summary: z.ZodObject<{
|
|
66
|
+
input: z.ZodNumber;
|
|
67
|
+
output: z.ZodNumber;
|
|
68
|
+
cacheRead: z.ZodNumber;
|
|
69
|
+
cacheWrite: z.ZodNumber;
|
|
70
|
+
cost: z.ZodNumber;
|
|
71
|
+
}, z.core.$strip>;
|
|
72
|
+
title: z.ZodObject<{
|
|
73
|
+
input: z.ZodNumber;
|
|
74
|
+
output: z.ZodNumber;
|
|
75
|
+
cacheRead: z.ZodNumber;
|
|
76
|
+
cacheWrite: z.ZodNumber;
|
|
77
|
+
cost: z.ZodNumber;
|
|
78
|
+
}, z.core.$strip>;
|
|
79
|
+
helpers: z.ZodObject<{
|
|
80
|
+
input: z.ZodNumber;
|
|
81
|
+
output: z.ZodNumber;
|
|
82
|
+
cacheRead: z.ZodNumber;
|
|
83
|
+
cacheWrite: z.ZodNumber;
|
|
84
|
+
cost: z.ZodNumber;
|
|
85
|
+
}, z.core.$strip>;
|
|
86
|
+
}, z.core.$strip>;
|
|
63
87
|
export declare const sessionDocSchema: z.ZodObject<{
|
|
64
88
|
title: z.ZodString;
|
|
65
89
|
autoTitle: z.ZodBoolean;
|
|
90
|
+
deleting: z.ZodDefault<z.ZodBoolean>;
|
|
66
91
|
status: z.ZodEnum<{
|
|
67
92
|
idle: "idle";
|
|
68
93
|
running: "running";
|
|
@@ -72,6 +97,7 @@ export declare const sessionDocSchema: z.ZodObject<{
|
|
|
72
97
|
worker: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
73
98
|
name: z.ZodString;
|
|
74
99
|
instructions: z.ZodString;
|
|
100
|
+
readOnly: z.ZodDefault<z.ZodBoolean>;
|
|
75
101
|
}, z.core.$strip>>>;
|
|
76
102
|
model: z.ZodNullable<z.ZodString>;
|
|
77
103
|
thinking: z.ZodEnum<{
|
|
@@ -81,7 +107,32 @@ export declare const sessionDocSchema: z.ZodObject<{
|
|
|
81
107
|
medium: "medium";
|
|
82
108
|
high: "high";
|
|
83
109
|
}>;
|
|
110
|
+
usageBy: z.ZodDefault<z.ZodObject<{
|
|
111
|
+
summary: z.ZodObject<{
|
|
112
|
+
input: z.ZodNumber;
|
|
113
|
+
output: z.ZodNumber;
|
|
114
|
+
cacheRead: z.ZodNumber;
|
|
115
|
+
cacheWrite: z.ZodNumber;
|
|
116
|
+
cost: z.ZodNumber;
|
|
117
|
+
}, z.core.$strip>;
|
|
118
|
+
title: z.ZodObject<{
|
|
119
|
+
input: z.ZodNumber;
|
|
120
|
+
output: z.ZodNumber;
|
|
121
|
+
cacheRead: z.ZodNumber;
|
|
122
|
+
cacheWrite: z.ZodNumber;
|
|
123
|
+
cost: z.ZodNumber;
|
|
124
|
+
}, z.core.$strip>;
|
|
125
|
+
helpers: z.ZodObject<{
|
|
126
|
+
input: z.ZodNumber;
|
|
127
|
+
output: z.ZodNumber;
|
|
128
|
+
cacheRead: z.ZodNumber;
|
|
129
|
+
cacheWrite: z.ZodNumber;
|
|
130
|
+
cost: z.ZodNumber;
|
|
131
|
+
}, z.core.$strip>;
|
|
132
|
+
}, z.core.$strip>>;
|
|
84
133
|
stepJobId: z.ZodNullable<z.ZodString>;
|
|
134
|
+
stepGeneration: z.ZodDefault<z.ZodNumber>;
|
|
135
|
+
stepIntentId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
85
136
|
turnId: z.ZodNullable<z.ZodString>;
|
|
86
137
|
endedTurns: z.ZodNumber;
|
|
87
138
|
nextSeq: z.ZodNumber;
|
|
@@ -102,6 +153,24 @@ export declare const sessionDocSchema: z.ZodObject<{
|
|
|
102
153
|
createdAt: z.ZodString;
|
|
103
154
|
updatedAt: z.ZodString;
|
|
104
155
|
}, z.core.$strip>;
|
|
156
|
+
/** A step's durable scheduling/claim record in its workspace (ADR0041). */
|
|
157
|
+
export declare const stepIntentDocSchema: z.ZodObject<{
|
|
158
|
+
sessionId: z.ZodString;
|
|
159
|
+
turnId: z.ZodString;
|
|
160
|
+
generation: z.ZodNumber;
|
|
161
|
+
phase: z.ZodEnum<{
|
|
162
|
+
prepared: "prepared";
|
|
163
|
+
claimed: "claimed";
|
|
164
|
+
settled: "settled";
|
|
165
|
+
invalidated: "invalidated";
|
|
166
|
+
"needs-review": "needs-review";
|
|
167
|
+
}>;
|
|
168
|
+
jobId: z.ZodNullable<z.ZodString>;
|
|
169
|
+
legacyJobId: z.ZodNullable<z.ZodString>;
|
|
170
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
171
|
+
createdAt: z.ZodISODateTime;
|
|
172
|
+
updatedAt: z.ZodISODateTime;
|
|
173
|
+
}, z.core.$strip>;
|
|
105
174
|
export declare const messageDocSchema: z.ZodObject<{
|
|
106
175
|
sessionId: z.ZodString;
|
|
107
176
|
turnId: z.ZodNullable<z.ZodString>;
|
|
@@ -138,6 +207,7 @@ export declare const messageDocSchema: z.ZodObject<{
|
|
|
138
207
|
cacheWrite: z.ZodNumber;
|
|
139
208
|
cost: z.ZodNumber;
|
|
140
209
|
}, z.core.$strip>>;
|
|
210
|
+
basis: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
141
211
|
durationMs: z.ZodNullable<z.ZodNumber>;
|
|
142
212
|
createdAt: z.ZodString;
|
|
143
213
|
}, z.core.$strip>;
|
|
@@ -156,6 +226,7 @@ export declare const queuedDocSchema: z.ZodObject<{
|
|
|
156
226
|
jobId: z.ZodString;
|
|
157
227
|
}, z.core.$strip>]>;
|
|
158
228
|
text: z.ZodString;
|
|
229
|
+
running: z.ZodExactOptional<z.ZodArray<z.ZodString>>;
|
|
159
230
|
fileIds: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
160
231
|
fileNames: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
161
232
|
createdAt: z.ZodString;
|
|
@@ -203,6 +274,7 @@ export declare const turnDocSchema: z.ZodObject<{
|
|
|
203
274
|
durationMs: z.ZodNumber;
|
|
204
275
|
steps: z.ZodNumber;
|
|
205
276
|
lost: z.ZodDefault<z.ZodNumber>;
|
|
277
|
+
incomplete: z.ZodDefault<z.ZodNumber>;
|
|
206
278
|
usage: z.ZodObject<{
|
|
207
279
|
input: z.ZodNumber;
|
|
208
280
|
output: z.ZodNumber;
|
|
@@ -249,6 +321,15 @@ export declare const turnDocSchema: z.ZodObject<{
|
|
|
249
321
|
timeoutMs: z.ZodNumber;
|
|
250
322
|
}, z.core.$strip>]>>;
|
|
251
323
|
}, z.core.$strip>>;
|
|
324
|
+
deferredCalls: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
325
|
+
toolCallId: z.ZodString;
|
|
326
|
+
call: z.ZodObject<{
|
|
327
|
+
description: z.ZodString;
|
|
328
|
+
connector: z.ZodString;
|
|
329
|
+
command: z.ZodString;
|
|
330
|
+
payload: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
331
|
+
}, z.core.$strict>;
|
|
332
|
+
}, z.core.$strip>>>;
|
|
252
333
|
}, z.core.$strip>;
|
|
253
334
|
export declare const questionDocSchema: z.ZodObject<{
|
|
254
335
|
sessionId: z.ZodString;
|
|
@@ -263,6 +344,47 @@ export declare const questionDocSchema: z.ZodObject<{
|
|
|
263
344
|
}>;
|
|
264
345
|
question: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
265
346
|
}, z.core.$strip>;
|
|
347
|
+
/** A committed answer's internal retry identity, not a reusable approval (ADR0042). */
|
|
348
|
+
export declare const answerReceiptDocSchema: z.ZodObject<{
|
|
349
|
+
questionId: z.ZodString;
|
|
350
|
+
sessionId: z.ZodString;
|
|
351
|
+
turnId: z.ZodString;
|
|
352
|
+
toolCallId: z.ZodString;
|
|
353
|
+
questionKind: z.ZodEnum<{
|
|
354
|
+
text: "text";
|
|
355
|
+
approval: "approval";
|
|
356
|
+
choice: "choice";
|
|
357
|
+
confirm: "confirm";
|
|
358
|
+
}>;
|
|
359
|
+
answerFingerprint: z.ZodString;
|
|
360
|
+
createdAt: z.ZodISODateTime;
|
|
361
|
+
}, z.core.$strip>;
|
|
362
|
+
export declare const fileViewDocSchema: z.ZodObject<{
|
|
363
|
+
sessionId: z.ZodString;
|
|
364
|
+
path: z.ZodString;
|
|
365
|
+
fingerprint: z.ZodString;
|
|
366
|
+
updatedAt: z.ZodISODateTime;
|
|
367
|
+
}, z.core.$strip>;
|
|
368
|
+
export declare const fileBackupDocSchema: z.ZodObject<{
|
|
369
|
+
sessionId: z.ZodString;
|
|
370
|
+
path: z.ZodString;
|
|
371
|
+
previous: z.ZodNullable<z.ZodString>;
|
|
372
|
+
written: z.ZodString;
|
|
373
|
+
createdAt: z.ZodISODateTime;
|
|
374
|
+
}, z.core.$strip>;
|
|
375
|
+
export declare const filePartDocSchema: z.ZodObject<{
|
|
376
|
+
sessionId: z.ZodString;
|
|
377
|
+
path: z.ZodString;
|
|
378
|
+
part: z.ZodNumber;
|
|
379
|
+
content: z.ZodString;
|
|
380
|
+
updatedAt: z.ZodISODateTime;
|
|
381
|
+
}, z.core.$strip>;
|
|
382
|
+
export declare const sendReceiptDocSchema: z.ZodObject<{
|
|
383
|
+
sendId: z.ZodString;
|
|
384
|
+
sessionId: z.ZodString;
|
|
385
|
+
messageFingerprint: z.ZodString;
|
|
386
|
+
createdAt: z.ZodISODateTime;
|
|
387
|
+
}, z.core.$strip>;
|
|
266
388
|
export declare const backgroundDocSchema: z.ZodObject<{
|
|
267
389
|
sessionId: z.ZodString;
|
|
268
390
|
ref: z.ZodString;
|
|
@@ -281,6 +403,14 @@ export declare const runStatusSchema: z.ZodEnum<{
|
|
|
281
403
|
interrupted: "interrupted";
|
|
282
404
|
succeeded: "succeeded";
|
|
283
405
|
}>;
|
|
406
|
+
export declare const runStagingSchema: z.ZodObject<{
|
|
407
|
+
tree: z.ZodString;
|
|
408
|
+
after: z.ZodString;
|
|
409
|
+
head: z.ZodNullable<z.ZodString>;
|
|
410
|
+
headMoved: z.ZodBoolean;
|
|
411
|
+
paths: z.ZodNumber;
|
|
412
|
+
restored: z.ZodBoolean;
|
|
413
|
+
}, z.core.$strip>;
|
|
284
414
|
export declare const runDocSchema: z.ZodObject<{
|
|
285
415
|
sessionId: z.ZodString;
|
|
286
416
|
toolCallId: z.ZodNullable<z.ZodString>;
|
|
@@ -306,6 +436,14 @@ export declare const runDocSchema: z.ZodObject<{
|
|
|
306
436
|
endedAt: z.ZodNullable<z.ZodString>;
|
|
307
437
|
exitCode: z.ZodNullable<z.ZodNumber>;
|
|
308
438
|
output: z.ZodNullable<z.ZodString>;
|
|
439
|
+
staging: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
440
|
+
tree: z.ZodString;
|
|
441
|
+
after: z.ZodString;
|
|
442
|
+
head: z.ZodNullable<z.ZodString>;
|
|
443
|
+
headMoved: z.ZodBoolean;
|
|
444
|
+
paths: z.ZodNumber;
|
|
445
|
+
restored: z.ZodBoolean;
|
|
446
|
+
}, z.core.$strip>>>;
|
|
309
447
|
}, z.core.$strip>;
|
|
310
448
|
export declare const processDocSchema: z.ZodObject<{
|
|
311
449
|
workspaceId: z.ZodString;
|
|
@@ -340,6 +478,7 @@ export declare const artifactDocSchema: z.ZodObject<{
|
|
|
340
478
|
updatedAt: z.ZodString;
|
|
341
479
|
}, z.core.$strip>;
|
|
342
480
|
export type SessionDoc = z.output<typeof sessionDocSchema>;
|
|
481
|
+
export type StepIntentDoc = z.output<typeof stepIntentDocSchema>;
|
|
343
482
|
export type MessageDoc = z.output<typeof messageDocSchema>;
|
|
344
483
|
export type QueuedDoc = z.output<typeof queuedDocSchema>;
|
|
345
484
|
export type TurnDoc = z.output<typeof turnDocSchema>;
|
|
@@ -347,10 +486,13 @@ export type Pending = z.output<typeof pendingSchema>;
|
|
|
347
486
|
export type HeldResult = z.output<typeof heldResultSchema>;
|
|
348
487
|
export type RunCallDoc = z.output<typeof runCallSchema>;
|
|
349
488
|
export type QuestionDoc = z.output<typeof questionDocSchema>;
|
|
489
|
+
export type AnswerReceiptDoc = z.output<typeof answerReceiptDocSchema>;
|
|
490
|
+
export type SendReceiptDoc = z.output<typeof sendReceiptDocSchema>;
|
|
350
491
|
export type BackgroundDoc = z.output<typeof backgroundDocSchema>;
|
|
351
492
|
export type ArtifactDoc = z.output<typeof artifactDocSchema>;
|
|
352
493
|
export type ProcessDoc = z.output<typeof processDocSchema>;
|
|
353
494
|
export type RunDoc = z.output<typeof runDocSchema>;
|
|
495
|
+
export type RunStaging = z.output<typeof runStagingSchema>;
|
|
354
496
|
export type Usage = z.output<typeof usageSchema>;
|
|
355
497
|
export type Outcome = z.output<typeof outcomeSchema>;
|
|
356
498
|
export type Source = z.output<typeof sourceSchema>;
|