@scotthuang/agent-knock-knock 0.12.10 → 0.12.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +35 -0
- package/README.md +5 -5
- package/dist/src/callback-cli-adapter.d.ts +47 -0
- package/dist/src/callback-cli-adapter.js +156 -0
- package/dist/src/callback-cli-adapter.js.map +1 -0
- package/dist/src/callback-outbox-policy.d.ts +95 -0
- package/dist/src/callback-outbox-policy.js +149 -0
- package/dist/src/callback-outbox-policy.js.map +1 -0
- package/dist/src/callback-outbox-service.d.ts +247 -0
- package/dist/src/callback-outbox-service.js +1053 -0
- package/dist/src/callback-outbox-service.js.map +1 -0
- package/dist/src/callback-outbox-settlement.d.ts +54 -0
- package/dist/src/callback-outbox-settlement.js +241 -0
- package/dist/src/callback-outbox-settlement.js.map +1 -0
- package/dist/src/canonical-json.d.ts +1 -0
- package/dist/src/canonical-json.js +14 -0
- package/dist/src/canonical-json.js.map +1 -0
- package/dist/src/claude-lifecycle-compatibility.js +15 -0
- package/dist/src/claude-lifecycle-compatibility.js.map +1 -1
- package/dist/src/claude-local-transcript-provider.d.ts +21 -1
- package/dist/src/claude-local-transcript-provider.js +139 -19
- package/dist/src/claude-local-transcript-provider.js.map +1 -1
- package/dist/src/cli-command-runtime.d.ts +14 -0
- package/dist/src/cli-command-runtime.js +164 -0
- package/dist/src/cli-command-runtime.js.map +1 -0
- package/dist/src/cli-core.d.ts +4 -42
- package/dist/src/cli-core.js +906 -27535
- package/dist/src/cli-core.js.map +1 -1
- package/dist/src/cli-runtime-context.d.ts +57 -0
- package/dist/src/cli-runtime-context.js +118 -0
- package/dist/src/cli-runtime-context.js.map +1 -0
- package/dist/src/codex-lifecycle-compatibility.js +2 -1
- package/dist/src/codex-lifecycle-compatibility.js.map +1 -1
- package/dist/src/codex-local-session-provider.d.ts +18 -0
- package/dist/src/codex-local-session-provider.js +67 -0
- package/dist/src/codex-local-session-provider.js.map +1 -1
- package/dist/src/codex-session-provider.js +1 -3
- package/dist/src/codex-session-provider.js.map +1 -1
- package/dist/src/conversation-trace.d.ts +30 -0
- package/dist/src/conversation-trace.js +185 -0
- package/dist/src/conversation-trace.js.map +1 -0
- package/dist/src/deferred-foreground-application-service.d.ts +84 -0
- package/dist/src/deferred-foreground-application-service.js +742 -0
- package/dist/src/deferred-foreground-application-service.js.map +1 -0
- package/dist/src/deferred-foreground-authority-cli-adapter.d.ts +78 -0
- package/dist/src/deferred-foreground-authority-cli-adapter.js +724 -0
- package/dist/src/deferred-foreground-authority-cli-adapter.js.map +1 -0
- package/dist/src/deferred-foreground-boundary.d.ts +61 -0
- package/dist/src/deferred-foreground-boundary.js +2 -0
- package/dist/src/deferred-foreground-boundary.js.map +1 -0
- package/dist/src/deferred-foreground-capability.d.ts +4 -0
- package/dist/src/deferred-foreground-capability.js +184 -0
- package/dist/src/deferred-foreground-capability.js.map +1 -0
- package/dist/src/deferred-foreground-preparation-cli-adapter.d.ts +53 -0
- package/dist/src/deferred-foreground-preparation-cli-adapter.js +210 -0
- package/dist/src/deferred-foreground-preparation-cli-adapter.js.map +1 -0
- package/dist/src/deferred-foreground-preparation-service.d.ts +72 -0
- package/dist/src/deferred-foreground-preparation-service.js +179 -0
- package/dist/src/deferred-foreground-preparation-service.js.map +1 -0
- package/dist/src/deferred-foreground-recovery-cli-adapter.d.ts +139 -0
- package/dist/src/deferred-foreground-recovery-cli-adapter.js +1125 -0
- package/dist/src/deferred-foreground-recovery-cli-adapter.js.map +1 -0
- package/dist/src/deferred-foreground-recovery-service.d.ts +48 -0
- package/dist/src/deferred-foreground-recovery-service.js +91 -0
- package/dist/src/deferred-foreground-recovery-service.js.map +1 -0
- package/dist/src/deferred-foreground-transfer-policy.d.ts +2 -0
- package/dist/src/deferred-foreground-transfer-policy.js +10 -0
- package/dist/src/deferred-foreground-transfer-policy.js.map +1 -0
- package/dist/src/deferred-foreground-transfer.js +43 -101
- package/dist/src/deferred-foreground-transfer.js.map +1 -1
- package/dist/src/doctor-capabilities.d.ts +9 -0
- package/dist/src/doctor-capabilities.js +22 -0
- package/dist/src/doctor-capabilities.js.map +1 -1
- package/dist/src/durable-json-file.d.ts +22 -0
- package/dist/src/durable-json-file.js +127 -0
- package/dist/src/durable-json-file.js.map +1 -0
- package/dist/src/file-lock-cli-adapter.d.ts +43 -0
- package/dist/src/file-lock-cli-adapter.js +150 -0
- package/dist/src/file-lock-cli-adapter.js.map +1 -0
- package/dist/src/herdr-terminal-control-provider.js +1 -3
- package/dist/src/herdr-terminal-control-provider.js.map +1 -1
- package/dist/src/install-doctor-command-adapter.d.ts +17 -0
- package/dist/src/install-doctor-command-adapter.js +225 -0
- package/dist/src/install-doctor-command-adapter.js.map +1 -0
- package/dist/src/live-lifecycle-evidence.js +76 -46
- package/dist/src/live-lifecycle-evidence.js.map +1 -1
- package/dist/src/live-lifecycle-smoke.js +74 -50
- package/dist/src/live-lifecycle-smoke.js.map +1 -1
- package/dist/src/managed-session.d.ts +2 -0
- package/dist/src/managed-session.js +24 -0
- package/dist/src/managed-session.js.map +1 -1
- package/dist/src/managed-turn-recovery-service.d.ts +86 -0
- package/dist/src/managed-turn-recovery-service.js +145 -0
- package/dist/src/managed-turn-recovery-service.js.map +1 -0
- package/dist/src/mutation-transaction.d.ts +48 -0
- package/dist/src/mutation-transaction.js +73 -0
- package/dist/src/mutation-transaction.js.map +1 -0
- package/dist/src/native-thread-lifecycle-cli-adapter.d.ts +154 -0
- package/dist/src/native-thread-lifecycle-cli-adapter.js +786 -0
- package/dist/src/native-thread-lifecycle-cli-adapter.js.map +1 -0
- package/dist/src/native-thread-lifecycle-ledger-cli-adapter.d.ts +25 -0
- package/dist/src/native-thread-lifecycle-ledger-cli-adapter.js +50 -0
- package/dist/src/native-thread-lifecycle-ledger-cli-adapter.js.map +1 -0
- package/dist/src/native-thread-lifecycle-query-service.d.ts +75 -0
- package/dist/src/native-thread-lifecycle-query-service.js +297 -0
- package/dist/src/native-thread-lifecycle-query-service.js.map +1 -0
- package/dist/src/native-thread-lifecycle-recovery-adapter.d.ts +45 -0
- package/dist/src/native-thread-lifecycle-recovery-adapter.js +154 -0
- package/dist/src/native-thread-lifecycle-recovery-adapter.js.map +1 -0
- package/dist/src/native-thread-lifecycle-recovery-service.d.ts +211 -0
- package/dist/src/native-thread-lifecycle-recovery-service.js +1093 -0
- package/dist/src/native-thread-lifecycle-recovery-service.js.map +1 -0
- package/dist/src/native-thread-resume-snapshot-policy.d.ts +73 -0
- package/dist/src/native-thread-resume-snapshot-policy.js +218 -0
- package/dist/src/native-thread-resume-snapshot-policy.js.map +1 -0
- package/dist/src/native-thread-resume-snapshot.d.ts +3 -61
- package/dist/src/native-thread-resume-snapshot.js +2 -143
- package/dist/src/native-thread-resume-snapshot.js.map +1 -1
- package/dist/src/native-thread-transition-application.d.ts +147 -0
- package/dist/src/native-thread-transition-application.js +974 -0
- package/dist/src/native-thread-transition-application.js.map +1 -0
- package/dist/src/native-thread-transition-policy.d.ts +127 -0
- package/dist/src/native-thread-transition-policy.js +154 -0
- package/dist/src/native-thread-transition-policy.js.map +1 -0
- package/dist/src/native-thread-transition-resource-adapter.d.ts +12 -0
- package/dist/src/native-thread-transition-resource-adapter.js +44 -0
- package/dist/src/native-thread-transition-resource-adapter.js.map +1 -0
- package/dist/src/native-thread-transition-settlement-service.d.ts +94 -0
- package/dist/src/native-thread-transition-settlement-service.js +134 -0
- package/dist/src/native-thread-transition-settlement-service.js.map +1 -0
- package/dist/src/native-thread-transition-verification-adapter.d.ts +62 -0
- package/dist/src/native-thread-transition-verification-adapter.js +451 -0
- package/dist/src/native-thread-transition-verification-adapter.js.map +1 -0
- package/dist/src/openclaw-callback-transport.d.ts +64 -0
- package/dist/src/openclaw-callback-transport.js +583 -0
- package/dist/src/openclaw-callback-transport.js.map +1 -0
- package/dist/src/openclaw-plugin-callback-adapter.d.ts +1 -0
- package/dist/src/openclaw-plugin-callback-adapter.js +341 -0
- package/dist/src/openclaw-plugin-callback-adapter.js.map +1 -0
- package/dist/src/openclaw-plugin-command-adapter.d.ts +16 -0
- package/dist/src/openclaw-plugin-command-adapter.js +1427 -0
- package/dist/src/openclaw-plugin-command-adapter.js.map +1 -0
- package/dist/src/openclaw-plugin-helpers.js +48 -38
- package/dist/src/openclaw-plugin-helpers.js.map +1 -1
- package/dist/src/openclaw-plugin-schemas.d.ts +382 -0
- package/dist/src/openclaw-plugin-schemas.js +394 -0
- package/dist/src/openclaw-plugin-schemas.js.map +1 -0
- package/dist/src/openclaw-plugin-supervisor.d.ts +6 -0
- package/dist/src/openclaw-plugin-supervisor.js +85 -0
- package/dist/src/openclaw-plugin-supervisor.js.map +1 -0
- package/dist/src/openclaw-plugin.js +7 -2212
- package/dist/src/openclaw-plugin.js.map +1 -1
- package/dist/src/protocol.d.ts +5 -0
- package/dist/src/protocol.js +59 -3
- package/dist/src/protocol.js.map +1 -1
- package/dist/src/session-store.d.ts +1 -0
- package/dist/src/session-store.js +84 -106
- package/dist/src/session-store.js.map +1 -1
- package/dist/src/store.js +2 -1
- package/dist/src/store.js.map +1 -1
- package/dist/src/terminal-acceptance-application-service.d.ts +65 -0
- package/dist/src/terminal-acceptance-application-service.js +63 -0
- package/dist/src/terminal-acceptance-application-service.js.map +1 -0
- package/dist/src/terminal-acceptance-cli-adapter.d.ts +210 -0
- package/dist/src/terminal-acceptance-cli-adapter.js +957 -0
- package/dist/src/terminal-acceptance-cli-adapter.js.map +1 -0
- package/dist/src/terminal-action-projection.d.ts +291 -0
- package/dist/src/terminal-action-projection.js +353 -0
- package/dist/src/terminal-action-projection.js.map +1 -0
- package/dist/src/terminal-agent-bridge.d.ts +3 -0
- package/dist/src/terminal-agent-bridge.js +29 -8
- package/dist/src/terminal-agent-bridge.js.map +1 -1
- package/dist/src/terminal-authority-policy.d.ts +141 -0
- package/dist/src/terminal-authority-policy.js +367 -0
- package/dist/src/terminal-authority-policy.js.map +1 -0
- package/dist/src/terminal-binding-authority.d.ts +118 -0
- package/dist/src/terminal-binding-authority.js +245 -0
- package/dist/src/terminal-binding-authority.js.map +1 -0
- package/dist/src/terminal-binding-reconciliation-service.d.ts +75 -0
- package/dist/src/terminal-binding-reconciliation-service.js +73 -0
- package/dist/src/terminal-binding-reconciliation-service.js.map +1 -0
- package/dist/src/terminal-command-cli-adapter.d.ts +375 -0
- package/dist/src/terminal-command-cli-adapter.js +3128 -0
- package/dist/src/terminal-command-cli-adapter.js.map +1 -0
- package/dist/src/terminal-control-ref.d.ts +4 -0
- package/dist/src/terminal-control-ref.js +11 -8
- package/dist/src/terminal-control-ref.js.map +1 -1
- package/dist/src/terminal-delegate-cli-adapter.d.ts +41 -0
- package/dist/src/terminal-delegate-cli-adapter.js +242 -0
- package/dist/src/terminal-delegate-cli-adapter.js.map +1 -0
- package/dist/src/terminal-dispatch-abort.d.ts +22 -0
- package/dist/src/terminal-dispatch-abort.js +30 -0
- package/dist/src/terminal-dispatch-abort.js.map +1 -0
- package/dist/src/terminal-dispatch-application.d.ts +115 -0
- package/dist/src/terminal-dispatch-application.js +478 -0
- package/dist/src/terminal-dispatch-application.js.map +1 -0
- package/dist/src/terminal-dispatch-capability.d.ts +63 -0
- package/dist/src/terminal-dispatch-capability.js +133 -0
- package/dist/src/terminal-dispatch-capability.js.map +1 -0
- package/dist/src/terminal-dispatch-completion-cli-adapter.d.ts +22 -0
- package/dist/src/terminal-dispatch-completion-cli-adapter.js +96 -0
- package/dist/src/terminal-dispatch-completion-cli-adapter.js.map +1 -0
- package/dist/src/terminal-dispatch-composition.d.ts +79 -0
- package/dist/src/terminal-dispatch-composition.js +2 -0
- package/dist/src/terminal-dispatch-composition.js.map +1 -0
- package/dist/src/terminal-dispatch-execution.d.ts +290 -0
- package/dist/src/terminal-dispatch-execution.js +916 -0
- package/dist/src/terminal-dispatch-execution.js.map +1 -0
- package/dist/src/terminal-dispatch-ledger-codec.d.ts +110 -0
- package/dist/src/terminal-dispatch-ledger-codec.js +399 -0
- package/dist/src/terminal-dispatch-ledger-codec.js.map +1 -0
- package/dist/src/terminal-dispatch-policy.d.ts +93 -0
- package/dist/src/terminal-dispatch-policy.js +122 -0
- package/dist/src/terminal-dispatch-policy.js.map +1 -0
- package/dist/src/terminal-dispatch-presenter.d.ts +65 -0
- package/dist/src/terminal-dispatch-presenter.js +258 -0
- package/dist/src/terminal-dispatch-presenter.js.map +1 -0
- package/dist/src/terminal-dispatch-receipt.d.ts +79 -0
- package/dist/src/terminal-dispatch-receipt.js +314 -0
- package/dist/src/terminal-dispatch-receipt.js.map +1 -0
- package/dist/src/terminal-dispatch-recovery-cli-adapter.d.ts +132 -0
- package/dist/src/terminal-dispatch-recovery-cli-adapter.js +1330 -0
- package/dist/src/terminal-dispatch-recovery-cli-adapter.js.map +1 -0
- package/dist/src/terminal-dispatch-recovery-service.d.ts +271 -0
- package/dist/src/terminal-dispatch-recovery-service.js +374 -0
- package/dist/src/terminal-dispatch-recovery-service.js.map +1 -0
- package/dist/src/terminal-dispatch-repository-cli-adapter.d.ts +35 -0
- package/dist/src/terminal-dispatch-repository-cli-adapter.js +257 -0
- package/dist/src/terminal-dispatch-repository-cli-adapter.js.map +1 -0
- package/dist/src/terminal-handoff-application-service.d.ts +7 -0
- package/dist/src/terminal-handoff-application-service.js +18 -0
- package/dist/src/terminal-handoff-application-service.js.map +1 -0
- package/dist/src/terminal-handoff-cli-adapter.d.ts +229 -0
- package/dist/src/terminal-handoff-cli-adapter.js +1389 -0
- package/dist/src/terminal-handoff-cli-adapter.js.map +1 -0
- package/dist/src/terminal-handoff-facts.d.ts +12 -0
- package/dist/src/terminal-handoff-facts.js +16 -0
- package/dist/src/terminal-handoff-facts.js.map +1 -0
- package/dist/src/terminal-identity-authority-cli-adapter.d.ts +318 -0
- package/dist/src/terminal-identity-authority-cli-adapter.js +1072 -0
- package/dist/src/terminal-identity-authority-cli-adapter.js.map +1 -0
- package/dist/src/terminal-identity-authority-service.d.ts +48 -0
- package/dist/src/terminal-identity-authority-service.js +45 -0
- package/dist/src/terminal-identity-authority-service.js.map +1 -0
- package/dist/src/terminal-list-cli-adapter.d.ts +250 -0
- package/dist/src/terminal-list-cli-adapter.js +2226 -0
- package/dist/src/terminal-list-cli-adapter.js.map +1 -0
- package/dist/src/terminal-list-renderer.d.ts +32 -0
- package/dist/src/terminal-list-renderer.js +568 -0
- package/dist/src/terminal-list-renderer.js.map +1 -0
- package/dist/src/terminal-maintenance-cli-adapter.d.ts +102 -0
- package/dist/src/terminal-maintenance-cli-adapter.js +1059 -0
- package/dist/src/terminal-maintenance-cli-adapter.js.map +1 -0
- package/dist/src/terminal-monitor-application-service.d.ts +275 -0
- package/dist/src/terminal-monitor-application-service.js +982 -0
- package/dist/src/terminal-monitor-application-service.js.map +1 -0
- package/dist/src/terminal-monitor-cli-adapter.d.ts +130 -0
- package/dist/src/terminal-monitor-cli-adapter.js +442 -0
- package/dist/src/terminal-monitor-cli-adapter.js.map +1 -0
- package/dist/src/terminal-monitor-decision-policy.d.ts +98 -0
- package/dist/src/terminal-monitor-decision-policy.js +246 -0
- package/dist/src/terminal-monitor-decision-policy.js.map +1 -0
- package/dist/src/terminal-monitor-launch-plan.d.ts +45 -0
- package/dist/src/terminal-monitor-launch-plan.js +94 -0
- package/dist/src/terminal-monitor-launch-plan.js.map +1 -0
- package/dist/src/terminal-monitor-ownership-policy.d.ts +31 -0
- package/dist/src/terminal-monitor-ownership-policy.js +64 -0
- package/dist/src/terminal-monitor-ownership-policy.js.map +1 -0
- package/dist/src/terminal-monitor-poll-policy.d.ts +48 -0
- package/dist/src/terminal-monitor-poll-policy.js +67 -0
- package/dist/src/terminal-monitor-poll-policy.js.map +1 -0
- package/dist/src/terminal-monitor-reconciliation-eligibility.d.ts +53 -0
- package/dist/src/terminal-monitor-reconciliation-eligibility.js +114 -0
- package/dist/src/terminal-monitor-reconciliation-eligibility.js.map +1 -0
- package/dist/src/terminal-monitor-state-cli-adapter.d.ts +106 -0
- package/dist/src/terminal-monitor-state-cli-adapter.js +1501 -0
- package/dist/src/terminal-monitor-state-cli-adapter.js.map +1 -0
- package/dist/src/terminal-monitor-state-reconciliation-service.d.ts +87 -0
- package/dist/src/terminal-monitor-state-reconciliation-service.js +106 -0
- package/dist/src/terminal-monitor-state-reconciliation-service.js.map +1 -0
- package/dist/src/terminal-monitor-supervision-cli-adapter.d.ts +122 -0
- package/dist/src/terminal-monitor-supervision-cli-adapter.js +685 -0
- package/dist/src/terminal-monitor-supervision-cli-adapter.js.map +1 -0
- package/dist/src/terminal-process-facts.d.ts +2 -0
- package/dist/src/terminal-process-facts.js +19 -0
- package/dist/src/terminal-process-facts.js.map +1 -0
- package/dist/src/terminal-process-source.d.ts +13 -4
- package/dist/src/terminal-process-source.js +75 -21
- package/dist/src/terminal-process-source.js.map +1 -1
- package/dist/src/terminal-runtime-cli-adapter.d.ts +80 -0
- package/dist/src/terminal-runtime-cli-adapter.js +488 -0
- package/dist/src/terminal-runtime-cli-adapter.js.map +1 -0
- package/dist/src/terminal-scoped-approval-authority.d.ts +62 -0
- package/dist/src/terminal-scoped-approval-authority.js +281 -0
- package/dist/src/terminal-scoped-approval-authority.js.map +1 -0
- package/dist/src/terminal-selector-projection-service.d.ts +26 -0
- package/dist/src/terminal-selector-projection-service.js +81 -0
- package/dist/src/terminal-selector-projection-service.js.map +1 -0
- package/dist/src/terminal-status-cli-adapter.d.ts +116 -0
- package/dist/src/terminal-status-cli-adapter.js +495 -0
- package/dist/src/terminal-status-cli-adapter.js.map +1 -0
- package/dist/src/terminal-status-facts.d.ts +56 -0
- package/dist/src/terminal-status-facts.js +199 -0
- package/dist/src/terminal-status-facts.js.map +1 -0
- package/dist/src/terminal-submission-acceptance.d.ts +6 -148
- package/dist/src/terminal-submission-acceptance.js +2 -229
- package/dist/src/terminal-submission-acceptance.js.map +1 -1
- package/dist/src/terminal-submission-facts.d.ts +123 -0
- package/dist/src/terminal-submission-facts.js +205 -0
- package/dist/src/terminal-submission-facts.js.map +1 -0
- package/dist/src/terminal-turn-binding-authority-cli-adapter.d.ts +14 -0
- package/dist/src/terminal-turn-binding-authority-cli-adapter.js +90 -0
- package/dist/src/terminal-turn-binding-authority-cli-adapter.js.map +1 -0
- package/dist/src/value-guards.d.ts +4 -0
- package/dist/src/value-guards.js +12 -0
- package/dist/src/value-guards.js.map +1 -0
- package/dist/src/verified-dead-agent-policy.d.ts +192 -0
- package/dist/src/verified-dead-agent-policy.js +262 -0
- package/dist/src/verified-dead-agent-policy.js.map +1 -0
- package/docs/quickstart-tmux.md +1 -1
- package/package.json +3 -1
- package/templates/openclaw-skills/agent-knock-knock/SKILL.md +1 -1
|
@@ -0,0 +1,394 @@
|
|
|
1
|
+
import { EXECUTOR_KINDS } from "./executors.js";
|
|
2
|
+
export const sendParameters = {
|
|
3
|
+
type: "object",
|
|
4
|
+
additionalProperties: false,
|
|
5
|
+
required: ["request"],
|
|
6
|
+
not: {
|
|
7
|
+
anyOf: [
|
|
8
|
+
{ required: ["session_id", "selector"] },
|
|
9
|
+
{ required: ["session_id", "expected_terminal_token"] }
|
|
10
|
+
]
|
|
11
|
+
},
|
|
12
|
+
properties: {
|
|
13
|
+
session_id: {
|
|
14
|
+
type: "string",
|
|
15
|
+
minLength: 1,
|
|
16
|
+
description: "Strict session-scoped AKK id only when the current list action prefills it. This preserves that exact native context and never follows the pane after a human switches threads. A rollout-backed Codex Session is a continuing context label but is not a direct ordinary-send target; use that terminal row's selector/token action instead. Discovery selectors, terminal ids, and turn ids are never session_id destinations."
|
|
17
|
+
},
|
|
18
|
+
selector: {
|
|
19
|
+
type: "string",
|
|
20
|
+
minLength: 1,
|
|
21
|
+
description: "Terminal-scoped selector: codex, claude, only, latest, an @short-ref, or a live terminal id. Use one only when explicitly named by the user or prefilled by list; never infer it. A follow-current handoff action uses the exact full terminal id together with expected_terminal_token. Legacy discovery selectors remain supported. Omit both target fields only when AKK should attach the unique eligible idle pane."
|
|
22
|
+
},
|
|
23
|
+
expected_terminal_token: {
|
|
24
|
+
type: "string",
|
|
25
|
+
minLength: 1,
|
|
26
|
+
description: "Fresh terminal snapshot token prefilled by the same terminal row's follow-current send action. Preserve it exactly with that action's full terminal selector; never infer, copy, reuse, or combine it with session_id."
|
|
27
|
+
},
|
|
28
|
+
request: {
|
|
29
|
+
type: "string",
|
|
30
|
+
minLength: 1,
|
|
31
|
+
description: "Message for the coding agent. Each accepted ordinary send creates a new turn inside the selected session without clearing native agent context."
|
|
32
|
+
},
|
|
33
|
+
type: {
|
|
34
|
+
type: "string",
|
|
35
|
+
enum: ["task"],
|
|
36
|
+
description: "Ordinary sends always create a task turn. Use agent_knock_knock_respond for an answer to an in-flight turn."
|
|
37
|
+
},
|
|
38
|
+
idleTimeoutMinutes: {
|
|
39
|
+
type: "number",
|
|
40
|
+
description: "Minutes an idle or completed AKK Turn record is retained before controlled reconciliation closes it."
|
|
41
|
+
},
|
|
42
|
+
agentTimeoutMinutes: {
|
|
43
|
+
type: "number",
|
|
44
|
+
description: "Callback timeout in minutes; terminal bridge tasks treat it as an inactivity timeout."
|
|
45
|
+
},
|
|
46
|
+
agentHardTimeoutMinutes: {
|
|
47
|
+
type: "number",
|
|
48
|
+
exclusiveMinimum: 0,
|
|
49
|
+
description: "Maximum terminal monitor lifetime in minutes."
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
export const respondParameters = {
|
|
54
|
+
type: "object",
|
|
55
|
+
additionalProperties: false,
|
|
56
|
+
required: ["turn_id", "request"],
|
|
57
|
+
properties: {
|
|
58
|
+
turn_id: {
|
|
59
|
+
type: "string",
|
|
60
|
+
description: "Authoritative AKK turn id from a question or blocked callback, never a discovery selector or terminal id. A response continues this exact in-flight turn and does not create a new turn."
|
|
61
|
+
},
|
|
62
|
+
request: {
|
|
63
|
+
type: "string",
|
|
64
|
+
description: "Answer or decision for the coding agent's exact in-flight turn."
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
export const listParameters = {
|
|
69
|
+
type: "object",
|
|
70
|
+
additionalProperties: false,
|
|
71
|
+
properties: {
|
|
72
|
+
agent: {
|
|
73
|
+
type: "string",
|
|
74
|
+
enum: EXECUTOR_KINDS
|
|
75
|
+
},
|
|
76
|
+
status: {
|
|
77
|
+
type: "string"
|
|
78
|
+
},
|
|
79
|
+
all: {
|
|
80
|
+
type: "boolean"
|
|
81
|
+
},
|
|
82
|
+
noApprovalScan: {
|
|
83
|
+
type: "boolean",
|
|
84
|
+
description: "When true, list live terminals without scanning their panes for approval prompts."
|
|
85
|
+
},
|
|
86
|
+
terminalDebug: {
|
|
87
|
+
type: "boolean",
|
|
88
|
+
description: "When true, include terminal-provider discovery diagnostics for debugging Gateway environment issues."
|
|
89
|
+
},
|
|
90
|
+
idleTimeoutMinutes: {
|
|
91
|
+
type: "number"
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
export const listResumableThreadsParameters = {
|
|
96
|
+
type: "object",
|
|
97
|
+
additionalProperties: false,
|
|
98
|
+
required: ["terminal_id"],
|
|
99
|
+
properties: {
|
|
100
|
+
terminal_id: {
|
|
101
|
+
type: "string",
|
|
102
|
+
minLength: 1,
|
|
103
|
+
pattern: "^terminal:v[0-9]+:\\S+$",
|
|
104
|
+
description: "Exact full terminal_id from the selected terminal row's current available_actions. Do not use a short ref, session id, turn id, or constructed selector."
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
export const nativeInspectParameters = {
|
|
109
|
+
type: "object",
|
|
110
|
+
additionalProperties: false,
|
|
111
|
+
required: ["terminal_id", "inspection", "expected_binding_token"],
|
|
112
|
+
properties: {
|
|
113
|
+
terminal_id: {
|
|
114
|
+
type: "string",
|
|
115
|
+
minLength: 1,
|
|
116
|
+
pattern: "^terminal:v[0-9]+:\\S+$",
|
|
117
|
+
description: "Exact full terminal_id from the same current native_inspect action as expected_binding_token. Never use a short ref, Session id, Turn id, or constructed selector."
|
|
118
|
+
},
|
|
119
|
+
inspection: {
|
|
120
|
+
type: "string",
|
|
121
|
+
enum: ["status"],
|
|
122
|
+
description: "Closed adapter-owned inspection kind. Exact Codex 0.146.0/0.146.1/0.147.0/0.148.0 and Claude Code 2.1.218/2.1.226/2.1.237 /status profiles are supported; this is never an arbitrary native command string."
|
|
123
|
+
},
|
|
124
|
+
expected_binding_token: {
|
|
125
|
+
type: "string",
|
|
126
|
+
minLength: 1,
|
|
127
|
+
description: "Fresh snapshot-bound terminal and binding token prefilled by this terminal's current native_inspect action. Never guess, construct, or reuse it after another terminal action."
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
export const newThreadParameters = {
|
|
132
|
+
type: "object",
|
|
133
|
+
additionalProperties: false,
|
|
134
|
+
required: ["terminal_id", "expected_binding_token"],
|
|
135
|
+
properties: {
|
|
136
|
+
terminal_id: {
|
|
137
|
+
type: "string",
|
|
138
|
+
minLength: 1,
|
|
139
|
+
pattern: "^terminal:v[0-9]+:\\S+$",
|
|
140
|
+
description: "Exact full terminal_id from the same current lifecycle snapshot as expected_binding_token."
|
|
141
|
+
},
|
|
142
|
+
expected_binding_token: {
|
|
143
|
+
type: "string",
|
|
144
|
+
minLength: 1,
|
|
145
|
+
description: "Fresh compare-and-swap token prefilled by this terminal's available new_thread action or returned by agent_knock_knock_list_resumable_threads. Never guess, construct, or reuse it after another terminal action."
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
export const reconcileBindingParameters = {
|
|
150
|
+
type: "object",
|
|
151
|
+
additionalProperties: false,
|
|
152
|
+
required: [
|
|
153
|
+
"terminal_id",
|
|
154
|
+
"conflicting_session_id",
|
|
155
|
+
"expected_session_revision",
|
|
156
|
+
"expected_binding_token",
|
|
157
|
+
"expected_terminal_token"
|
|
158
|
+
],
|
|
159
|
+
properties: {
|
|
160
|
+
terminal_id: {
|
|
161
|
+
type: "string",
|
|
162
|
+
minLength: 1,
|
|
163
|
+
pattern: "^terminal:v[0-9]+:\\S+$",
|
|
164
|
+
description: "Exact full terminal_id from the same current reconcile_binding action as every expected token."
|
|
165
|
+
},
|
|
166
|
+
conflicting_session_id: {
|
|
167
|
+
type: "string",
|
|
168
|
+
minLength: 1,
|
|
169
|
+
description: "Exact conflicting managed Session id prefilled by AKK list. Never choose or construct one independently."
|
|
170
|
+
},
|
|
171
|
+
expected_session_revision: {
|
|
172
|
+
type: "integer",
|
|
173
|
+
minimum: 1,
|
|
174
|
+
description: "Exact managed Session revision from the advertised reconcile_binding action."
|
|
175
|
+
},
|
|
176
|
+
expected_binding_token: {
|
|
177
|
+
type: "string",
|
|
178
|
+
minLength: 1,
|
|
179
|
+
description: "Fresh fingerprint of the conflicting binding from the advertised action."
|
|
180
|
+
},
|
|
181
|
+
expected_terminal_token: {
|
|
182
|
+
type: "string",
|
|
183
|
+
minLength: 1,
|
|
184
|
+
description: "Fresh fingerprint of the live terminal process incarnation from the same advertised action."
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
export const resumeThreadParameters = {
|
|
189
|
+
type: "object",
|
|
190
|
+
additionalProperties: false,
|
|
191
|
+
required: [
|
|
192
|
+
"terminal_id",
|
|
193
|
+
"native_thread_id",
|
|
194
|
+
"expected_binding_token",
|
|
195
|
+
"candidate_token"
|
|
196
|
+
],
|
|
197
|
+
properties: {
|
|
198
|
+
terminal_id: {
|
|
199
|
+
type: "string",
|
|
200
|
+
minLength: 1,
|
|
201
|
+
pattern: "^terminal:v[0-9]+:\\S+$",
|
|
202
|
+
description: "Exact full terminal_id passed to agent_knock_knock_list_resumable_threads."
|
|
203
|
+
},
|
|
204
|
+
native_thread_id: {
|
|
205
|
+
type: "string",
|
|
206
|
+
pattern: "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
|
|
207
|
+
description: "Complete native thread UUID from a resumable=true row returned for this exact terminal. Never truncate, guess, or select an unavailable row."
|
|
208
|
+
},
|
|
209
|
+
expected_binding_token: {
|
|
210
|
+
type: "string",
|
|
211
|
+
minLength: 1,
|
|
212
|
+
description: "Fresh compare-and-swap token from the same agent_knock_knock_list_resumable_threads result as native_thread_id."
|
|
213
|
+
},
|
|
214
|
+
candidate_token: {
|
|
215
|
+
type: "string",
|
|
216
|
+
minLength: 1,
|
|
217
|
+
description: "Opaque fingerprint from the selected resumable thread row in the same current list result. It binds resume to that exact historical file/evidence snapshot; never construct or reuse it."
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
};
|
|
221
|
+
export const renewParameters = {
|
|
222
|
+
type: "object",
|
|
223
|
+
additionalProperties: false,
|
|
224
|
+
not: { required: ["turn_id", "conversation_id"] },
|
|
225
|
+
anyOf: [
|
|
226
|
+
{ required: ["turn_id"] },
|
|
227
|
+
{ required: ["conversation_id"] }
|
|
228
|
+
],
|
|
229
|
+
properties: {
|
|
230
|
+
turn_id: {
|
|
231
|
+
type: "string",
|
|
232
|
+
description: "Authoritative AKK turn id whose monitoring should be renewed."
|
|
233
|
+
},
|
|
234
|
+
conversation_id: {
|
|
235
|
+
type: "string",
|
|
236
|
+
deprecated: true,
|
|
237
|
+
description: "Deprecated compatibility alias for turn_id."
|
|
238
|
+
},
|
|
239
|
+
minutes: {
|
|
240
|
+
type: "number",
|
|
241
|
+
exclusiveMinimum: 0,
|
|
242
|
+
description: "New terminal inactivity timeout in minutes."
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
};
|
|
246
|
+
export const retryCallbackParameters = {
|
|
247
|
+
type: "object",
|
|
248
|
+
additionalProperties: false,
|
|
249
|
+
not: { required: ["turn_id", "conversation_id"] },
|
|
250
|
+
anyOf: [
|
|
251
|
+
{ required: ["turn_id"] },
|
|
252
|
+
{ required: ["conversation_id"] }
|
|
253
|
+
],
|
|
254
|
+
properties: {
|
|
255
|
+
turn_id: {
|
|
256
|
+
type: "string",
|
|
257
|
+
description: "Authoritative AKK turn id whose persisted callback should be retried."
|
|
258
|
+
},
|
|
259
|
+
conversation_id: {
|
|
260
|
+
type: "string",
|
|
261
|
+
deprecated: true,
|
|
262
|
+
description: "Deprecated compatibility alias for turn_id."
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
};
|
|
266
|
+
export const statusParameters = {
|
|
267
|
+
type: "object",
|
|
268
|
+
additionalProperties: false,
|
|
269
|
+
not: { required: ["turn_id", "conversation_id"] },
|
|
270
|
+
anyOf: [
|
|
271
|
+
{ required: ["turn_id"] },
|
|
272
|
+
{ required: ["conversation_id"] }
|
|
273
|
+
],
|
|
274
|
+
properties: {
|
|
275
|
+
turn_id: {
|
|
276
|
+
type: "string",
|
|
277
|
+
description: "Authoritative AKK turn id to inspect."
|
|
278
|
+
},
|
|
279
|
+
conversation_id: {
|
|
280
|
+
type: "string",
|
|
281
|
+
deprecated: true,
|
|
282
|
+
description: "Deprecated legacy Turn alias, or the exact raw-terminal selector prefilled by that terminal row's available status action. Managed Turn status must use turn_id; never construct or guess a raw-terminal selector."
|
|
283
|
+
},
|
|
284
|
+
idleTimeoutMinutes: {
|
|
285
|
+
type: "number"
|
|
286
|
+
},
|
|
287
|
+
trace: {
|
|
288
|
+
type: "boolean",
|
|
289
|
+
description: "Include a safe executor trace summary with tool calls, permission requests, monitor events, and redacted thinking markers."
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
};
|
|
293
|
+
export const cancelParameters = {
|
|
294
|
+
type: "object",
|
|
295
|
+
additionalProperties: false,
|
|
296
|
+
not: { required: ["turn_id", "conversation_id"] },
|
|
297
|
+
anyOf: [
|
|
298
|
+
{ required: ["turn_id"] },
|
|
299
|
+
{ required: ["conversation_id"] }
|
|
300
|
+
],
|
|
301
|
+
properties: {
|
|
302
|
+
turn_id: {
|
|
303
|
+
type: "string",
|
|
304
|
+
description: "Authoritative AKK turn id to interrupt."
|
|
305
|
+
},
|
|
306
|
+
conversation_id: {
|
|
307
|
+
type: "string",
|
|
308
|
+
deprecated: true,
|
|
309
|
+
description: "Deprecated legacy Turn alias, or the exact raw-terminal selector prefilled by that terminal row's available cancel action. Managed Turn cancellation must use turn_id; never construct or guess a raw-terminal selector."
|
|
310
|
+
},
|
|
311
|
+
idleTimeoutMinutes: {
|
|
312
|
+
type: "number"
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
};
|
|
316
|
+
export const closeParameters = {
|
|
317
|
+
type: "object",
|
|
318
|
+
additionalProperties: false,
|
|
319
|
+
not: {
|
|
320
|
+
anyOf: [
|
|
321
|
+
{ required: ["turn_id", "conversation_id"] },
|
|
322
|
+
{ required: ["expected_message_id", "expected_transition_id"] },
|
|
323
|
+
{ required: ["expected_handoff_token", "conversation_id"] },
|
|
324
|
+
{ required: ["expected_handoff_token", "expected_message_id"] },
|
|
325
|
+
{ required: ["expected_handoff_token", "expected_transition_id"] }
|
|
326
|
+
]
|
|
327
|
+
},
|
|
328
|
+
anyOf: [
|
|
329
|
+
{ required: ["turn_id"] },
|
|
330
|
+
{ required: ["conversation_id"] }
|
|
331
|
+
],
|
|
332
|
+
properties: {
|
|
333
|
+
turn_id: {
|
|
334
|
+
type: "string",
|
|
335
|
+
description: "Authoritative AKK turn id whose managed record should be closed."
|
|
336
|
+
},
|
|
337
|
+
conversation_id: {
|
|
338
|
+
type: "string",
|
|
339
|
+
deprecated: true,
|
|
340
|
+
description: "Deprecated legacy Turn alias, or an exact list-prefilled raw-terminal/orphan recovery selector. Managed Turn close must use turn_id; never construct or guess a raw-terminal selector."
|
|
341
|
+
},
|
|
342
|
+
reason: {
|
|
343
|
+
type: "string"
|
|
344
|
+
},
|
|
345
|
+
expected_message_id: {
|
|
346
|
+
type: "string",
|
|
347
|
+
description: "Required only to clear an orphaned terminal dispatch shown by AKK list. Must exactly match that entry's current message_id and must not be combined with expected_transition_id."
|
|
348
|
+
},
|
|
349
|
+
expected_transition_id: {
|
|
350
|
+
type: "string",
|
|
351
|
+
description: "Required only to recover an unresolved native-thread lifecycle transition shown by AKK list. Must exactly match that entry's current transition_id and must not be combined with expected_message_id."
|
|
352
|
+
},
|
|
353
|
+
expected_handoff_token: {
|
|
354
|
+
type: "string",
|
|
355
|
+
description: "Snapshot fence for the exact managed Turn close advertised only by terminals[].handoff_decision.choices.take_over_current.action. Copy that complete action only after explicit user confirmation; it requires turn_id and reason=superseded_by_human_context_switch, and cannot be combined with a raw-terminal target or another close fence."
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
};
|
|
359
|
+
export const approveParameters = {
|
|
360
|
+
type: "object",
|
|
361
|
+
additionalProperties: false,
|
|
362
|
+
required: ["expected_approval_fingerprint"],
|
|
363
|
+
not: { required: ["turn_id", "conversation_id"] },
|
|
364
|
+
anyOf: [
|
|
365
|
+
{ required: ["turn_id"] },
|
|
366
|
+
{ required: ["conversation_id"] }
|
|
367
|
+
],
|
|
368
|
+
allOf: [
|
|
369
|
+
{
|
|
370
|
+
if: { required: ["expected_terminal_token"] },
|
|
371
|
+
then: { required: ["conversation_id"] }
|
|
372
|
+
}
|
|
373
|
+
],
|
|
374
|
+
properties: {
|
|
375
|
+
turn_id: {
|
|
376
|
+
type: "string",
|
|
377
|
+
description: "Authoritative AKK turn id containing the approval prompt."
|
|
378
|
+
},
|
|
379
|
+
conversation_id: {
|
|
380
|
+
type: "string",
|
|
381
|
+
deprecated: true,
|
|
382
|
+
description: "Deprecated legacy Turn alias, or the exact raw-terminal selector prefilled by that terminal row's available approval action. Managed Turn approval must use turn_id; never construct or guess a raw-terminal selector."
|
|
383
|
+
},
|
|
384
|
+
expected_approval_fingerprint: {
|
|
385
|
+
type: "string",
|
|
386
|
+
description: "Exact approval fingerprint returned by the latest status or approval-required callback. The prompt is captured again and must still match before keys are sent."
|
|
387
|
+
},
|
|
388
|
+
expected_terminal_token: {
|
|
389
|
+
type: "string",
|
|
390
|
+
description: "Only for a terminal-scoped manual Codex approval prefilled by the latest AKK list action. Preserve it exactly with that action's full conversation_id; never construct, reuse, or use it for automatic approval."
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
};
|
|
394
|
+
//# sourceMappingURL=openclaw-plugin-schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openclaw-plugin-schemas.js","sourceRoot":"","sources":["../../src/openclaw-plugin-schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,IAAI,EAAE,QAAQ;IACd,oBAAoB,EAAE,KAAK;IAC3B,QAAQ,EAAE,CAAC,SAAS,CAAC;IACrB,GAAG,EAAE;QACH,KAAK,EAAE;YACL,EAAE,QAAQ,EAAE,CAAC,YAAY,EAAE,UAAU,CAAC,EAAE;YACxC,EAAE,QAAQ,EAAE,CAAC,YAAY,EAAE,yBAAyB,CAAC,EAAE;SACxD;KACF;IACD,UAAU,EAAE;QACV,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,SAAS,EAAE,CAAC;YACZ,WAAW,EACT,kaAAka;SACra;QACD,QAAQ,EAAE;YACR,IAAI,EAAE,QAAQ;YACd,SAAS,EAAE,CAAC;YACZ,WAAW,EACT,0ZAA0Z;SAC7Z;QACD,uBAAuB,EAAE;YACvB,IAAI,EAAE,QAAQ;YACd,SAAS,EAAE,CAAC;YACZ,WAAW,EACT,wNAAwN;SAC3N;QACD,OAAO,EAAE;YACP,IAAI,EAAE,QAAQ;YACd,SAAS,EAAE,CAAC;YACZ,WAAW,EACT,iJAAiJ;SACpJ;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,CAAC,MAAM,CAAC;YACd,WAAW,EACT,6GAA6G;SAChH;QACD,kBAAkB,EAAE;YAClB,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,sGAAsG;SACzG;QACD,mBAAmB,EAAE;YACnB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,uFAAuF;SACrG;QACD,uBAAuB,EAAE;YACvB,IAAI,EAAE,QAAQ;YACd,gBAAgB,EAAE,CAAC;YACnB,WAAW,EAA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AE,QAAQ;YACd,WAAW,EACT,iKAAiK;SACpK;QACD,uBAAuB,EAAE;YACvB,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,kNAAkN;SACrN;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { pushOptional, runCli, runCliAsync } from "./openclaw-plugin-command-adapter.js";
|
|
2
|
+
import { resolvePluginStoreDir } from "./openclaw-plugin-helpers.js";
|
|
3
|
+
import { isRecord } from "./value-guards.js";
|
|
4
|
+
export const MONITOR_SUPERVISOR_INTERVAL_MS = 5_000;
|
|
5
|
+
export function createMonitorReconciliationService(api, configuredIntervalMs) {
|
|
6
|
+
const intervalMs = Number.isFinite(configuredIntervalMs) &&
|
|
7
|
+
configuredIntervalMs > 0
|
|
8
|
+
? Math.max(50, Math.ceil(configuredIntervalMs))
|
|
9
|
+
: MONITOR_SUPERVISOR_INTERVAL_MS;
|
|
10
|
+
let stopped = true;
|
|
11
|
+
let timer;
|
|
12
|
+
let inFlight;
|
|
13
|
+
const reconciliationArgs = (reason) => {
|
|
14
|
+
const config = isRecord(api.pluginConfig) ? api.pluginConfig : {};
|
|
15
|
+
const args = ["reconcile-monitors", "--reason", reason];
|
|
16
|
+
if (reason === "monitor_supervision") {
|
|
17
|
+
args.push("--terminal-monitors-only");
|
|
18
|
+
}
|
|
19
|
+
pushOptional(args, "--store-dir", resolvePluginStoreDir(config));
|
|
20
|
+
return args;
|
|
21
|
+
};
|
|
22
|
+
const report = (result, reason) => {
|
|
23
|
+
if (reason === "startup_reconciliation" ||
|
|
24
|
+
Number(result.launched ?? 0) > 0 ||
|
|
25
|
+
Number(result.errors ?? 0) > 0) {
|
|
26
|
+
const label = reason === "startup_reconciliation"
|
|
27
|
+
? "monitor reconciliation"
|
|
28
|
+
: `monitor ${reason}`;
|
|
29
|
+
api.logger.info?.(`agent-knock-knock ${label}: ` +
|
|
30
|
+
`checked=${result.checked ?? 0} launched=${result.launched ?? 0} ` +
|
|
31
|
+
`already_running=${result.already_running ?? 0} skipped=${result.skipped ?? 0} ` +
|
|
32
|
+
`errors=${result.errors ?? 0}`);
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
const schedule = () => {
|
|
36
|
+
if (stopped) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
timer = setTimeout(() => {
|
|
40
|
+
timer = undefined;
|
|
41
|
+
inFlight = supervise().finally(() => {
|
|
42
|
+
inFlight = undefined;
|
|
43
|
+
schedule();
|
|
44
|
+
});
|
|
45
|
+
}, intervalMs);
|
|
46
|
+
timer.unref?.();
|
|
47
|
+
};
|
|
48
|
+
const supervise = async () => {
|
|
49
|
+
try {
|
|
50
|
+
const result = await runCliAsync(api, reconciliationArgs("monitor_supervision"));
|
|
51
|
+
report(result, "monitor_supervision");
|
|
52
|
+
}
|
|
53
|
+
catch (error) {
|
|
54
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
55
|
+
api.logger.warn?.(`agent-knock-knock monitor supervision deferred after error: ${message}`);
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
return {
|
|
59
|
+
id: "agent-knock-knock-monitor-reconciliation",
|
|
60
|
+
start() {
|
|
61
|
+
if (!stopped) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
stopped = false;
|
|
65
|
+
try {
|
|
66
|
+
const result = runCli(api, reconciliationArgs("startup_reconciliation"));
|
|
67
|
+
report(result, "startup_reconciliation");
|
|
68
|
+
}
|
|
69
|
+
catch (error) {
|
|
70
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
71
|
+
api.logger.warn?.(`agent-knock-knock monitor reconciliation skipped after startup error: ${message}`);
|
|
72
|
+
}
|
|
73
|
+
schedule();
|
|
74
|
+
},
|
|
75
|
+
async stop() {
|
|
76
|
+
stopped = true;
|
|
77
|
+
if (timer) {
|
|
78
|
+
clearTimeout(timer);
|
|
79
|
+
timer = undefined;
|
|
80
|
+
}
|
|
81
|
+
await inFlight;
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=openclaw-plugin-supervisor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openclaw-plugin-supervisor.js","sourceRoot":"","sources":["../../src/openclaw-plugin-supervisor.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,MAAM,EACN,WAAW,EACZ,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,MAAM,CAAC,MAAM,8BAA8B,GAAG,KAAK,CAAC;AAEpD,MAAM,UAAU,kCAAkC,CAChD,GAAG,EACH,oBAA4B;IAE5B,MAAM,UAAU,GAAG,MAAM,CAAC,QAAQ,CAAC,oBAAoB,CAAC;QACtD,oBAAoB,GAAG,CAAC;QACxB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;QAC/C,CAAC,CAAC,8BAA8B,CAAC;IACnC,IAAI,OAAO,GAAG,IAAI,CAAC;IACnB,IAAI,KAAgD,CAAC;IACrD,IAAI,QAAmC,CAAC;IAExC,MAAM,kBAAkB,GAAG,CAAC,MAAc,EAAY,EAAE;QACtD,MAAM,MAAM,GAAG,QAAQ,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;QAClE,MAAM,IAAI,GAAG,CAAC,oBAAoB,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC;QACxD,IAAI,MAAM,KAAK,qBAAqB,EAAE,CAAC;YACrC,IAAI,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC;QACxC,CAAC;QACD,YAAY,CAAC,IAAI,EAAE,aAAa,EAAE,qBAAqB,CAAC,MAAM,CAAC,CAAC,CAAC;QACj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