blun-king-cli 9.1.642 → 9.1.644
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/LIESMICH.txt +18 -0
- package/README.md +20 -6
- package/bin/blun.js +3 -3
- package/bin/king.js +3 -3
- package/bin/launcher-mode.js +125 -126
- package/bin/launcher-runtime.js +603 -616
- package/bin/plugin-bootstrap.js +339 -405
- package/bin/rename-private-staging.cjs +2 -2
- package/bin/retired-bundled-plugins.cjs +84 -0
- package/bin/startup-security-host.cjs +105 -0
- package/bin/startup-security.cjs +9 -105
- package/bin/startup-warning-policy.cjs +22 -0
- package/bin/update-lease-installer.cjs +125 -0
- package/bin/update-lease-sockets.cjs +228 -0
- package/bin/update-lease.js +22 -327
- package/bin/verify-bundled-agent-sources.cjs +2 -4
- package/blun.mjs +78 -193
- package/bundled-agent-sources.json +1 -552
- package/package.json +4 -6
- package/tool-liveness642/index.cjs +7 -0
- package/tool-liveness642/queue-delivery.cjs +109 -0
- package/tool-liveness642/receipt.json +40 -0
- package/tool-liveness642/shell-yield.cjs +43 -0
- package/tool-liveness642/task-wait.cjs +45 -0
- package/versionierung/BELEG.json +43 -0
- package/versionierung/LIESMICH.md +5 -0
- package/versionierung/urspruenglicher-overlay-beleg.json +39 -0
- package/worker-host.mjs +48 -128
- package/agent-spine-plugin/.claude-plugin/marketplace.json +0 -20
- package/agent-spine-plugin/.claude-plugin/plugin.json +0 -14
- package/agent-spine-plugin/.codex-plugin/plugin.json +0 -47
- package/agent-spine-plugin/.mcp.json +0 -8
- package/agent-spine-plugin/CHANGELOG.md +0 -1614
- package/agent-spine-plugin/LICENSE +0 -186
- package/agent-spine-plugin/README.md +0 -432
- package/agent-spine-plugin/assets/agentspine-banner.svg +0 -32
- package/agent-spine-plugin/bin/agentspine-mcp.js +0 -4
- package/agent-spine-plugin/bin/agentspine.js +0 -7
- package/agent-spine-plugin/blun.plugin.json +0 -68
- package/agent-spine-plugin/docs/acceptance.md +0 -61
- package/agent-spine-plugin/docs/artifact-evaluation.md +0 -93
- package/agent-spine-plugin/docs/host-integration.md +0 -193
- package/agent-spine-plugin/docs/preflight-recall.md +0 -71
- package/agent-spine-plugin/docs/preservation-contract.md +0 -53
- package/agent-spine-plugin/docs/quality-gates.md +0 -50
- package/agent-spine-plugin/docs/session-timeline.md +0 -112
- package/agent-spine-plugin/docs/source-roots.md +0 -113
- package/agent-spine-plugin/docs/world-model.md +0 -119
- package/agent-spine-plugin/hooks/codex.json +0 -47
- package/agent-spine-plugin/hooks/hooks.json +0 -106
- package/agent-spine-plugin/hooks/version.json +0 -5
- package/agent-spine-plugin/package.json +0 -77
- package/agent-spine-plugin/scripts/check-codex-install.js +0 -226
- package/agent-spine-plugin/scripts/check-hosts.js +0 -208
- package/agent-spine-plugin/scripts/check-install-hook.js +0 -227
- package/agent-spine-plugin/scripts/check-install-selfstarter.js +0 -154
- package/agent-spine-plugin/scripts/check-install.js +0 -478
- package/agent-spine-plugin/scripts/check-line-budget.js +0 -58
- package/agent-spine-plugin/scripts/check-syntax.js +0 -29
- package/agent-spine-plugin/scripts/github-actions.js +0 -11
- package/agent-spine-plugin/scripts/hermetic-process.js +0 -191
- package/agent-spine-plugin/scripts/release-check.js +0 -150
- package/agent-spine-plugin/scripts/run-acceptance.js +0 -19
- package/agent-spine-plugin/scripts/run-checks.js +0 -50
- package/agent-spine-plugin/scripts/run-tests-hermetic.js +0 -112
- package/agent-spine-plugin/skills/agent-spine/SKILL.md +0 -99
- package/agent-spine-plugin/spine-example/1-identity.md +0 -12
- package/agent-spine-plugin/spine-example/2-voice.md +0 -6
- package/agent-spine-plugin/spine-example/3-conduct.md +0 -8
- package/agent-spine-plugin/spine-example/4-history.md +0 -4
- package/agent-spine-plugin/src/cli-agent.js +0 -315
- package/agent-spine-plugin/src/cli-attention.js +0 -95
- package/agent-spine-plugin/src/cli-autonomy.js +0 -36
- package/agent-spine-plugin/src/cli-common.js +0 -71
- package/agent-spine-plugin/src/cli-continuity.js +0 -116
- package/agent-spine-plugin/src/cli-core.js +0 -128
- package/agent-spine-plugin/src/cli-diagnostics.js +0 -291
- package/agent-spine-plugin/src/cli-host.js +0 -21
- package/agent-spine-plugin/src/cli-learning.js +0 -320
- package/agent-spine-plugin/src/cli-premortem.js +0 -16
- package/agent-spine-plugin/src/cli-sharing.js +0 -230
- package/agent-spine-plugin/src/cli.js +0 -181
- package/agent-spine-plugin/src/codex-reader-launcher.js +0 -182
- package/agent-spine-plugin/src/hook.js +0 -500
- package/agent-spine-plugin/src/index.js +0 -108
- package/agent-spine-plugin/src/lib/acceptance.js +0 -435
- package/agent-spine-plugin/src/lib/action-lesson-recall.js +0 -118
- package/agent-spine-plugin/src/lib/attention-context.js +0 -167
- package/agent-spine-plugin/src/lib/attention-events.js +0 -113
- package/agent-spine-plugin/src/lib/attention-privacy.js +0 -72
- package/agent-spine-plugin/src/lib/attention-schema.js +0 -164
- package/agent-spine-plugin/src/lib/attention-storage.js +0 -93
- package/agent-spine-plugin/src/lib/attention.js +0 -164
- package/agent-spine-plugin/src/lib/audit-premortem.js +0 -223
- package/agent-spine-plugin/src/lib/audit.js +0 -401
- package/agent-spine-plugin/src/lib/authentication.js +0 -515
- package/agent-spine-plugin/src/lib/autonomy-policy.js +0 -110
- package/agent-spine-plugin/src/lib/autonomy-store.js +0 -202
- package/agent-spine-plugin/src/lib/autonomy.js +0 -8
- package/agent-spine-plugin/src/lib/briefing.js +0 -493
- package/agent-spine-plugin/src/lib/catalog-document-read.js +0 -51
- package/agent-spine-plugin/src/lib/catalog.js +0 -167
- package/agent-spine-plugin/src/lib/channel-continuity.js +0 -19
- package/agent-spine-plugin/src/lib/channel-runtime.js +0 -665
- package/agent-spine-plugin/src/lib/codex-installation.js +0 -231
- package/agent-spine-plugin/src/lib/codex-skill-installation.js +0 -211
- package/agent-spine-plugin/src/lib/context.js +0 -156
- package/agent-spine-plugin/src/lib/continuity.js +0 -338
- package/agent-spine-plugin/src/lib/coordination.js +0 -577
- package/agent-spine-plugin/src/lib/delivery-agent-usage.js +0 -231
- package/agent-spine-plugin/src/lib/delivery-assignment.js +0 -220
- package/agent-spine-plugin/src/lib/delivery-command-actions.js +0 -462
- package/agent-spine-plugin/src/lib/delivery-knowledge.js +0 -78
- package/agent-spine-plugin/src/lib/delivery-premortem-binding.js +0 -107
- package/agent-spine-plugin/src/lib/delivery-premortem-closure.js +0 -171
- package/agent-spine-plugin/src/lib/delivery-premortem-codec.js +0 -45
- package/agent-spine-plugin/src/lib/delivery-premortem-correction.js +0 -101
- package/agent-spine-plugin/src/lib/delivery-premortem-file.js +0 -21
- package/agent-spine-plugin/src/lib/delivery-premortem-index.js +0 -493
- package/agent-spine-plugin/src/lib/delivery-premortem-inspection.js +0 -37
- package/agent-spine-plugin/src/lib/delivery-premortem-recovery.js +0 -120
- package/agent-spine-plugin/src/lib/delivery-premortem-rejection.js +0 -65
- package/agent-spine-plugin/src/lib/delivery-premortem-results.js +0 -28
- package/agent-spine-plugin/src/lib/delivery-premortem-session-guard.js +0 -46
- package/agent-spine-plugin/src/lib/delivery-premortem-write-ledger.js +0 -285
- package/agent-spine-plugin/src/lib/delivery-premortem.js +0 -499
- package/agent-spine-plugin/src/lib/delivery-shell-heredoc.js +0 -115
- package/agent-spine-plugin/src/lib/delivery-shell-substitutions.js +0 -111
- package/agent-spine-plugin/src/lib/delivery-shell-wrapper.js +0 -64
- package/agent-spine-plugin/src/lib/delivery-target.js +0 -73
- package/agent-spine-plugin/src/lib/delivery-verification.js +0 -445
- package/agent-spine-plugin/src/lib/documents.js +0 -239
- package/agent-spine-plugin/src/lib/feed-transport.js +0 -499
- package/agent-spine-plugin/src/lib/filesystem-retry.js +0 -34
- package/agent-spine-plugin/src/lib/gateway-common.js +0 -68
- package/agent-spine-plugin/src/lib/gateway-control.js +0 -370
- package/agent-spine-plugin/src/lib/gateway-delivery.js +0 -103
- package/agent-spine-plugin/src/lib/gateway-execution.js +0 -350
- package/agent-spine-plugin/src/lib/gateway-group-response.js +0 -128
- package/agent-spine-plugin/src/lib/gateway-host-fencing.js +0 -92
- package/agent-spine-plugin/src/lib/gateway-host-lifecycle.js +0 -193
- package/agent-spine-plugin/src/lib/gateway-inspection.js +0 -85
- package/agent-spine-plugin/src/lib/gateway-knowledge.js +0 -129
- package/agent-spine-plugin/src/lib/gateway-policy-provenance.js +0 -197
- package/agent-spine-plugin/src/lib/gateway-premortem-disposition.js +0 -82
- package/agent-spine-plugin/src/lib/gateway-premortem.js +0 -363
- package/agent-spine-plugin/src/lib/gateway-prepared-host.js +0 -28
- package/agent-spine-plugin/src/lib/gateway-runs.js +0 -345
- package/agent-spine-plugin/src/lib/gateway-runtime-identity.js +0 -31
- package/agent-spine-plugin/src/lib/gateway-runtime-records.js +0 -21
- package/agent-spine-plugin/src/lib/gateway-runtime.js +0 -18
- package/agent-spine-plugin/src/lib/gateway-state-transaction.js +0 -356
- package/agent-spine-plugin/src/lib/gateway-state.js +0 -344
- package/agent-spine-plugin/src/lib/graph.js +0 -337
- package/agent-spine-plugin/src/lib/hook-artifact-guards.js +0 -356
- package/agent-spine-plugin/src/lib/hook-audit.js +0 -43
- package/agent-spine-plugin/src/lib/hook-briefing-use.js +0 -78
- package/agent-spine-plugin/src/lib/hook-context.js +0 -441
- package/agent-spine-plugin/src/lib/hook-final-message.js +0 -26
- package/agent-spine-plugin/src/lib/hook-input.js +0 -27
- package/agent-spine-plugin/src/lib/hook-output.js +0 -284
- package/agent-spine-plugin/src/lib/hook-premortem.js +0 -257
- package/agent-spine-plugin/src/lib/hook-process-advisory.js +0 -36
- package/agent-spine-plugin/src/lib/hook-protection.js +0 -95
- package/agent-spine-plugin/src/lib/hook-stop-verification.js +0 -84
- package/agent-spine-plugin/src/lib/hook-timeline.js +0 -102
- package/agent-spine-plugin/src/lib/host-instruction-budget.js +0 -11
- package/agent-spine-plugin/src/lib/https-transport.js +0 -392
- package/agent-spine-plugin/src/lib/identifier-analysis.js +0 -446
- package/agent-spine-plugin/src/lib/indexed-memory-offline.js +0 -40
- package/agent-spine-plugin/src/lib/indexed-memory.js +0 -298
- package/agent-spine-plugin/src/lib/knowledge-evidence.js +0 -431
- package/agent-spine-plugin/src/lib/learning-applications.js +0 -441
- package/agent-spine-plugin/src/lib/learning-artifact-evaluator.js +0 -114
- package/agent-spine-plugin/src/lib/learning-candidates.js +0 -274
- package/agent-spine-plugin/src/lib/learning-context.js +0 -137
- package/agent-spine-plugin/src/lib/learning-delivery-contracts.js +0 -310
- package/agent-spine-plugin/src/lib/learning-evaluation-contracts.js +0 -350
- package/agent-spine-plugin/src/lib/learning-evaluation-registration.js +0 -372
- package/agent-spine-plugin/src/lib/learning-evaluation-revocation.js +0 -292
- package/agent-spine-plugin/src/lib/learning-evidence-contracts.js +0 -321
- package/agent-spine-plugin/src/lib/learning-findings.js +0 -458
- package/agent-spine-plugin/src/lib/learning-measurement-contracts.js +0 -285
- package/agent-spine-plugin/src/lib/learning-measurements.js +0 -265
- package/agent-spine-plugin/src/lib/learning-outcome-contracts.js +0 -165
- package/agent-spine-plugin/src/lib/learning-outcomes.js +0 -343
- package/agent-spine-plugin/src/lib/learning-reconciliation.js +0 -290
- package/agent-spine-plugin/src/lib/learning-retry-contracts.js +0 -188
- package/agent-spine-plugin/src/lib/learning-schema.js +0 -229
- package/agent-spine-plugin/src/lib/learning-scope-targets.js +0 -424
- package/agent-spine-plugin/src/lib/learning-state-upgrade.js +0 -477
- package/agent-spine-plugin/src/lib/learning-status-configuration.js +0 -476
- package/agent-spine-plugin/src/lib/learning-storage.js +0 -203
- package/agent-spine-plugin/src/lib/learning-trial-recovery.js +0 -218
- package/agent-spine-plugin/src/lib/learning-validation-contracts.js +0 -375
- package/agent-spine-plugin/src/lib/learning-validation-renewal.js +0 -298
- package/agent-spine-plugin/src/lib/learning-validation-runtime.js +0 -234
- package/agent-spine-plugin/src/lib/learning.js +0 -36
- package/agent-spine-plugin/src/lib/lesson-recall-session.js +0 -172
- package/agent-spine-plugin/src/lib/mcp-autonomy-tools.js +0 -37
- package/agent-spine-plugin/src/lib/mcp-delivery-completion.js +0 -124
- package/agent-spine-plugin/src/lib/mcp-delivery-tools.js +0 -45
- package/agent-spine-plugin/src/lib/mcp-premortem.js +0 -68
- package/agent-spine-plugin/src/lib/mcp-runtime.js +0 -355
- package/agent-spine-plugin/src/lib/mcp-source-context.js +0 -61
- package/agent-spine-plugin/src/lib/mcp-timeline-tools.js +0 -240
- package/agent-spine-plugin/src/lib/mcp-world-tools.js +0 -52
- package/agent-spine-plugin/src/lib/object-transport.js +0 -206
- package/agent-spine-plugin/src/lib/owned-file-lock.js +0 -182
- package/agent-spine-plugin/src/lib/paths.js +0 -109
- package/agent-spine-plugin/src/lib/peer-transport.js +0 -283
- package/agent-spine-plugin/src/lib/persona-runtime.js +0 -581
- package/agent-spine-plugin/src/lib/pre-answer-timeline-recall.js +0 -104
- package/agent-spine-plugin/src/lib/preflight-delivery-id.js +0 -27
- package/agent-spine-plugin/src/lib/preflight.js +0 -688
- package/agent-spine-plugin/src/lib/project-portfolio.js +0 -176
- package/agent-spine-plugin/src/lib/runtime.js +0 -13
- package/agent-spine-plugin/src/lib/selfstarter-core.js +0 -382
- package/agent-spine-plugin/src/lib/selfstarter-jobs.js +0 -149
- package/agent-spine-plugin/src/lib/selfstarter-lease.js +0 -204
- package/agent-spine-plugin/src/lib/selfstarter-policy.js +0 -90
- package/agent-spine-plugin/src/lib/selfstarter-workspace.js +0 -111
- package/agent-spine-plugin/src/lib/selfstarter.js +0 -11
- package/agent-spine-plugin/src/lib/session-timeline-auth.js +0 -316
- package/agent-spine-plugin/src/lib/session-timeline-codex.js +0 -69
- package/agent-spine-plugin/src/lib/session-timeline-contract.js +0 -56
- package/agent-spine-plugin/src/lib/session-timeline-enrollment-source.js +0 -38
- package/agent-spine-plugin/src/lib/session-timeline-enrollment-storage.js +0 -128
- package/agent-spine-plugin/src/lib/session-timeline-enrollment-transport.js +0 -15
- package/agent-spine-plugin/src/lib/session-timeline-enrollment.js +0 -478
- package/agent-spine-plugin/src/lib/session-timeline-event-extract.js +0 -186
- package/agent-spine-plugin/src/lib/session-timeline-host-origin.js +0 -73
- package/agent-spine-plugin/src/lib/session-timeline-host-receipt.js +0 -117
- package/agent-spine-plugin/src/lib/session-timeline-invocation.js +0 -201
- package/agent-spine-plugin/src/lib/session-timeline-king.js +0 -93
- package/agent-spine-plugin/src/lib/session-timeline-prior.js +0 -57
- package/agent-spine-plugin/src/lib/session-timeline-provider.js +0 -36
- package/agent-spine-plugin/src/lib/session-timeline-query.js +0 -56
- package/agent-spine-plugin/src/lib/session-timeline-results.js +0 -56
- package/agent-spine-plugin/src/lib/session-timeline-root.js +0 -11
- package/agent-spine-plugin/src/lib/session-timeline-search.js +0 -82
- package/agent-spine-plugin/src/lib/session-timeline-sid-acl.js +0 -213
- package/agent-spine-plugin/src/lib/session-timeline-source-open.js +0 -30
- package/agent-spine-plugin/src/lib/session-timeline-source.js +0 -80
- package/agent-spine-plugin/src/lib/session-timeline-state.js +0 -45
- package/agent-spine-plugin/src/lib/session-timeline-transport.js +0 -42
- package/agent-spine-plugin/src/lib/session-timeline-windows-acl.js +0 -145
- package/agent-spine-plugin/src/lib/session-timeline.js +0 -462
- package/agent-spine-plugin/src/lib/sharing.js +0 -969
- package/agent-spine-plugin/src/lib/source-roots.js +0 -475
- package/agent-spine-plugin/src/lib/source-tree-scan.js +0 -178
- package/agent-spine-plugin/src/lib/sqlite-transport.js +0 -501
- package/agent-spine-plugin/src/lib/task-knowledge-context.js +0 -99
- package/agent-spine-plugin/src/lib/telegram-adapter.js +0 -119
- package/agent-spine-plugin/src/lib/timeline-continuation-update.js +0 -100
- package/agent-spine-plugin/src/lib/timeline-tool-guard.js +0 -225
- package/agent-spine-plugin/src/lib/timeline-user-feedback.js +0 -216
- package/agent-spine-plugin/src/lib/timeline-world-capture.js +0 -233
- package/agent-spine-plugin/src/lib/voice-runtime.js +0 -39
- package/agent-spine-plugin/src/lib/world-knowledge.js +0 -306
- package/agent-spine-plugin/src/lib/world-model.js +0 -333
- package/agent-spine-plugin/src/mcp.js +0 -456
- package/agent-spine-plugin/src/version.js +0 -1
- package/agent-spine-plugin/src/worker.js +0 -257
- package/bin/agentspine-king-goal-inbox.mjs +0 -127
- package/bin/agentspine-king-goal-intake.mjs +0 -106
- package/bin/agentspine-king-host-runner.mjs +0 -109
- package/bin/agentspine-king-snapshot-policy.cjs +0 -80
- package/bin/agentspine-king-status-policy.mjs +0 -226
- package/bin/agentspine-king-worker-host.mjs +0 -160
- package/bin/managed-plugin-selection.cjs +0 -141
- package/bin/verify-agent-behavior.cjs +0 -122
- package/bin/verify-agent-components.cjs +0 -104
package/worker-host.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
// BLUN_BUILD_INPUT_SHA256:e50c78300e52dc6fc7d8003478fe2fa01fe7fdff8b1a749e108e6627de244e7e
|
|
3
|
+
import toolLiveness642 from "./tool-liveness642/index.cjs";
|
|
3
4
|
/*! wasm-webp 0.1.0
|
|
4
5
|
MIT License
|
|
5
6
|
|
|
@@ -21279,14 +21280,6 @@ const FLAG_DEFINITIONS = [
|
|
|
21279
21280
|
default: false,
|
|
21280
21281
|
surface: "core"
|
|
21281
21282
|
},
|
|
21282
|
-
{
|
|
21283
|
-
id: "agent_spine_timeline",
|
|
21284
|
-
title: "AgentSpine session transport",
|
|
21285
|
-
description: "Pass the current native record source to the enabled AgentSpine plugin.",
|
|
21286
|
-
env: "BLUN_EXPERIMENTAL_AGENT_SPINE_TIMELINE",
|
|
21287
|
-
default: false,
|
|
21288
|
-
surface: "core"
|
|
21289
|
-
},
|
|
21290
21283
|
{
|
|
21291
21284
|
id: "vision_reader",
|
|
21292
21285
|
title: "Vision reader",
|
|
@@ -184894,7 +184887,8 @@ var BackgroundManager = class {
|
|
|
184894
184887
|
* Wait for a task to reach a terminal state.
|
|
184895
184888
|
* Returns immediately if already terminal. Times out after `timeoutMs`.
|
|
184896
184889
|
*/
|
|
184897
|
-
async wait(taskId, timeoutMs = 3e4) {
|
|
184890
|
+
async wait(taskId, timeoutMs = 3e4, signal) {
|
|
184891
|
+
signal?.throwIfAborted();
|
|
184898
184892
|
const entry = this.tasks.get(taskId);
|
|
184899
184893
|
if (!entry) return void 0;
|
|
184900
184894
|
if (TERMINAL_STATUSES.has(entry.status)) {
|
|
@@ -184903,7 +184897,7 @@ var BackgroundManager = class {
|
|
|
184903
184897
|
}
|
|
184904
184898
|
if (timeoutMs <= 0) return this.toInfo(entry);
|
|
184905
184899
|
const timeout = timeoutOutcome(timeoutMs, void 0);
|
|
184906
|
-
await
|
|
184900
|
+
await toolLiveness642.waitForTaskTerminal(entry.terminal, timeout, signal);
|
|
184907
184901
|
if (TERMINAL_STATUSES.has(entry.status)) await entry.persistWriteQueue;
|
|
184908
184902
|
return this.toInfo(entry);
|
|
184909
184903
|
}
|
|
@@ -256776,16 +256770,27 @@ var TaskOutputTool = class {
|
|
|
256776
256770
|
description: `Reading output of task ${args.task_id}`,
|
|
256777
256771
|
approvalRule: this.name,
|
|
256778
256772
|
matchesRule: (ruleArgs) => matchesGlobRuleSubject(ruleArgs, args.task_id),
|
|
256779
|
-
execute: () => this.execute(args)
|
|
256773
|
+
execute: ({ signal }) => this.execute(args, signal)
|
|
256780
256774
|
};
|
|
256781
256775
|
}
|
|
256782
|
-
async execute(args) {
|
|
256776
|
+
async execute(args, signal = new AbortController().signal) {
|
|
256777
|
+
signal.throwIfAborted();
|
|
256778
|
+
const control642 = inputControl(signal);
|
|
256779
|
+
const epoch642 = control642.epoch;
|
|
256780
|
+
let waitReleasedForInput642 = false;
|
|
256783
256781
|
const info = this.manager.getTask(args.task_id);
|
|
256784
256782
|
if (!info) return {
|
|
256785
256783
|
isError: true,
|
|
256786
256784
|
output: `Task not found: ${args.task_id}`
|
|
256787
256785
|
};
|
|
256788
|
-
if (args.block && !isBackgroundTaskTerminal(info.status))
|
|
256786
|
+
if (args.block && !isBackgroundTaskTerminal(info.status)) {
|
|
256787
|
+
waitReleasedForInput642 = await toolLiveness642.waitForTaskInput({
|
|
256788
|
+
manager: this.manager, taskId: args.task_id,
|
|
256789
|
+
timeoutMs: (args.timeout ?? 30) * 1e3, signal,
|
|
256790
|
+
control: control642, initialEpoch: epoch642
|
|
256791
|
+
}) === "input";
|
|
256792
|
+
}
|
|
256793
|
+
signal.throwIfAborted();
|
|
256789
256794
|
const current = this.manager.getTask(args.task_id);
|
|
256790
256795
|
if (!current) return {
|
|
256791
256796
|
isError: true,
|
|
@@ -256793,7 +256798,8 @@ var TaskOutputTool = class {
|
|
|
256793
256798
|
};
|
|
256794
256799
|
const output = await this.manager.getOutputSnapshot(args.task_id, OUTPUT_PREVIEW_BYTES);
|
|
256795
256800
|
const lines = [formatPlainObject({
|
|
256796
|
-
retrievalStatus: retrievalStatus(current.status, args.block),
|
|
256801
|
+
retrievalStatus: retrievalStatus(current.status, args.block && !waitReleasedForInput642),
|
|
256802
|
+
waitReleasedForInput: waitReleasedForInput642 || void 0,
|
|
256797
256803
|
...current,
|
|
256798
256804
|
outputPath: output.outputPath,
|
|
256799
256805
|
terminalReason: terminalReason(current),
|
|
@@ -257179,6 +257185,8 @@ var AgentTool = class {
|
|
|
257179
257185
|
};
|
|
257180
257186
|
}
|
|
257181
257187
|
async execution(args, { toolCallId, signal }) {
|
|
257188
|
+
const control642 = inputControl(signal);
|
|
257189
|
+
const epoch642 = control642.epoch;
|
|
257182
257190
|
try {
|
|
257183
257191
|
signal.throwIfAborted();
|
|
257184
257192
|
const runInBackground = args.run_in_background === true;
|
|
@@ -257246,8 +257254,16 @@ var AgentTool = class {
|
|
|
257246
257254
|
};
|
|
257247
257255
|
}
|
|
257248
257256
|
if (runInBackground) return { output: formatBackgroundAgentResult(taskId, handle, args.description, this.allowBackground) };
|
|
257249
|
-
|
|
257250
|
-
|
|
257257
|
+
const inputYield642 = toolLiveness642.createForegroundYield({
|
|
257258
|
+
control: control642, initialEpoch: epoch642, signal,
|
|
257259
|
+
enabled: this.allowBackground, idleMs: 0,
|
|
257260
|
+
detach: () => this.backgroundManager.detach(taskId),
|
|
257261
|
+
onError: error => this.log?.warn("Could not background active agent", { error })
|
|
257262
|
+
});
|
|
257263
|
+
try {
|
|
257264
|
+
if (await this.backgroundManager.waitForForegroundRelease(taskId) === "detached") return { output: formatBackgroundAgentResult(taskId, handle, args.description, this.allowBackground) };
|
|
257265
|
+
return await this.formatForegroundResult(taskId, handle);
|
|
257266
|
+
} finally { inputYield642.dispose(); }
|
|
257251
257267
|
} catch (error) {
|
|
257252
257268
|
return {
|
|
257253
257269
|
output: `subagent error: ${launchErrorMessage(error, signal)}`,
|
|
@@ -267095,6 +267111,9 @@ var BashTool = class BashTool {
|
|
|
267095
267111
|
return this.kaos.execWithEnv(shellArgs, mergedEnv);
|
|
267096
267112
|
}
|
|
267097
267113
|
async execution(args, signal, onUpdate, onForegroundTaskStart) {
|
|
267114
|
+
const inputControl642 = inputControl(signal);
|
|
267115
|
+
const inputEpoch642 = inputControl642.epoch;
|
|
267116
|
+
let foregroundYield642;
|
|
267098
267117
|
const validationError = this.validateRunRequest(args, signal);
|
|
267099
267118
|
if (validationError !== void 0) return validationError;
|
|
267100
267119
|
const startsInBackground = args.run_in_background === true;
|
|
@@ -267119,6 +267138,7 @@ var BashTool = class BashTool {
|
|
|
267119
267138
|
let foregroundTaskId;
|
|
267120
267139
|
const onProcessOutput = startsInBackground ? void 0 : (kind, text) => {
|
|
267121
267140
|
if (!collectForegroundOutput) return;
|
|
267141
|
+
if (text.length > 0) foregroundYield642?.touch();
|
|
267122
267142
|
onUpdate?.({
|
|
267123
267143
|
kind,
|
|
267124
267144
|
text
|
|
@@ -267148,6 +267168,13 @@ var BashTool = class BashTool {
|
|
|
267148
267168
|
};
|
|
267149
267169
|
}
|
|
267150
267170
|
if (!startsInBackground) onForegroundTaskStart?.(taskId);
|
|
267171
|
+
foregroundYield642 = toolLiveness642.createForegroundYield({
|
|
267172
|
+
control: inputControl642, initialEpoch: inputEpoch642, signal,
|
|
267173
|
+
enabled: !startsInBackground && this.allowBackground,
|
|
267174
|
+
detach: () => this.backgroundManager.detach(taskId),
|
|
267175
|
+
onError: () => onUpdate?.({ kind: "status",
|
|
267176
|
+
text: "Could not move this command to the background; it remains running." }),
|
|
267177
|
+
});
|
|
267151
267178
|
if (startsInBackground) return this.backgroundStartedResult(taskId, proc, description, {
|
|
267152
267179
|
title: "Background task started",
|
|
267153
267180
|
brief: `Started ${taskId}`
|
|
@@ -267162,6 +267189,7 @@ var BashTool = class BashTool {
|
|
|
267162
267189
|
}
|
|
267163
267190
|
return await this.foregroundCompletionResult(taskId, proc, builder, foregroundTimeoutMs);
|
|
267164
267191
|
} finally {
|
|
267192
|
+
foregroundYield642?.dispose();
|
|
267165
267193
|
collectForegroundOutput = false;
|
|
267166
267194
|
}
|
|
267167
267195
|
}
|
|
@@ -300860,71 +300888,6 @@ function mergeCallerMcpServers(base, callerServers) {
|
|
|
300860
300888
|
}
|
|
300861
300889
|
};
|
|
300862
300890
|
}
|
|
300863
|
-
const PROMPT_EVENTS = new Set([
|
|
300864
|
-
"UserPromptSubmit",
|
|
300865
|
-
"TurnStart",
|
|
300866
|
-
"SubagentStart"
|
|
300867
|
-
]);
|
|
300868
|
-
/** AgentSpine reads prompt text; binary media stays in the original model input. */
|
|
300869
|
-
function projectAgentSpinePrompt(input) {
|
|
300870
|
-
if (typeof input["hook_event_name"] !== "string" || !PROMPT_EVENTS.has(input["hook_event_name"]) || !Array.isArray(input["prompt"])) return input;
|
|
300871
|
-
let changed = false;
|
|
300872
|
-
const prompt = input["prompt"].map((part) => {
|
|
300873
|
-
if (!isRecord$1(part)) return part;
|
|
300874
|
-
const field = part["type"] === "image_url" ? "imageUrl" : part["type"] === "audio_url" ? "audioUrl" : part["type"] === "video_url" ? "videoUrl" : void 0;
|
|
300875
|
-
if (field === void 0 || !isRecord$1(part[field]) || typeof part[field]["url"] !== "string") return part;
|
|
300876
|
-
const serialized = JSON.stringify(part);
|
|
300877
|
-
changed = true;
|
|
300878
|
-
return {
|
|
300879
|
-
type: "media_reference",
|
|
300880
|
-
media_type: part["type"],
|
|
300881
|
-
sha256: createHash("sha256").update(serialized).digest("hex"),
|
|
300882
|
-
original_bytes: Buffer.byteLength(serialized)
|
|
300883
|
-
};
|
|
300884
|
-
});
|
|
300885
|
-
return changed ? {
|
|
300886
|
-
...input,
|
|
300887
|
-
prompt
|
|
300888
|
-
} : input;
|
|
300889
|
-
}
|
|
300890
|
-
function isRecord$1(value) {
|
|
300891
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
300892
|
-
}
|
|
300893
|
-
const EMPTY_RUNTIME = Object.freeze({
|
|
300894
|
-
AGENTSPINE_KING_TIMELINE_SOURCE: "",
|
|
300895
|
-
AGENTSPINE_KING_WIRE_PROTOCOL_VERSION: "",
|
|
300896
|
-
AGENTSPINE_TIMELINE_TRANSPORT_SESSION_ID: "",
|
|
300897
|
-
AGENTSPINE_TIMELINE_SESSION_CAPABILITY: ""
|
|
300898
|
-
});
|
|
300899
|
-
/** Local transport only; this does not authenticate a customer or authorize history. */
|
|
300900
|
-
var AgentSpineSessionRuntime = class {
|
|
300901
|
-
#env = EMPTY_RUNTIME;
|
|
300902
|
-
#hooks;
|
|
300903
|
-
#servers;
|
|
300904
|
-
constructor(recipients) {
|
|
300905
|
-
this.#hooks = new Set(recipients?.hooks);
|
|
300906
|
-
this.#servers = new Map(Object.entries(recipients?.mcpServers ?? {}));
|
|
300907
|
-
}
|
|
300908
|
-
get hasRecipients() {
|
|
300909
|
-
return this.#hooks.size > 0 || this.#servers.size > 0;
|
|
300910
|
-
}
|
|
300911
|
-
bind(sessionId, source) {
|
|
300912
|
-
this.#env = EMPTY_RUNTIME;
|
|
300913
|
-
if (!sessionId || !/^[A-Za-z0-9][A-Za-z0-9:_.@/-]{0,127}$/.test(sessionId) || !source) return;
|
|
300914
|
-
this.#env = Object.freeze({
|
|
300915
|
-
AGENTSPINE_KING_TIMELINE_SOURCE: source.path,
|
|
300916
|
-
AGENTSPINE_KING_WIRE_PROTOCOL_VERSION: source.protocolVersion,
|
|
300917
|
-
AGENTSPINE_TIMELINE_TRANSPORT_SESSION_ID: sessionId,
|
|
300918
|
-
AGENTSPINE_TIMELINE_SESSION_CAPABILITY: `astc_${randomBytes(32).toString("base64url")}`
|
|
300919
|
-
});
|
|
300920
|
-
}
|
|
300921
|
-
forHook(hook) {
|
|
300922
|
-
return this.#hooks.has(hook) ? this.#env : EMPTY_RUNTIME;
|
|
300923
|
-
}
|
|
300924
|
-
forMcp(name, config) {
|
|
300925
|
-
return config.transport === "stdio" && this.#servers.get(name) === config ? this.#env : EMPTY_RUNTIME;
|
|
300926
|
-
}
|
|
300927
|
-
};
|
|
300928
300891
|
const LEGACY_LOCAL_MEMORY_HEADING = "## Persistent memory — your cross-session memory";
|
|
300929
300892
|
const LEGACY_LOCAL_MEMORY_LOCATION = "You have a persistent file-based memory at `";
|
|
300930
300893
|
const LEGACY_LOCAL_MEMORY_SAVE = "When the user tells you something worth remembering (preferences, facts about them, project context, corrections), SAVE it:";
|
|
@@ -301713,7 +301676,6 @@ var Session$1 = class {
|
|
|
301713
301676
|
writeMetadataPromise = Promise.resolve();
|
|
301714
301677
|
agentsMdWarning;
|
|
301715
301678
|
accountMemoryContext = "";
|
|
301716
|
-
agentSpineRuntime;
|
|
301717
301679
|
mcpLoadStarted = false;
|
|
301718
301680
|
workAdmissionClosed = false;
|
|
301719
301681
|
agentOperations = new ExecutionLedger();
|
|
@@ -301743,9 +301705,7 @@ var Session$1 = class {
|
|
|
301743
301705
|
});
|
|
301744
301706
|
};
|
|
301745
301707
|
} });
|
|
301746
|
-
this.agentSpineRuntime = this.experimentalFlags.enabled("agent_spine_timeline") ? new AgentSpineSessionRuntime(options.agentSpineRuntime) : void 0;
|
|
301747
301708
|
this.visionReader = (this.experimentalFlags.enabled("vision_reader") ? createVisionReader(options.config?.services?.visionReader) : void 0) ?? createManagedMediaVisionReader(options.toolServices?.media);
|
|
301748
|
-
const agentSpineHooks = new Set(options.agentSpineRuntime?.hooks);
|
|
301749
301709
|
this.hookEngine = new HookEngine(options.hooks, {
|
|
301750
301710
|
onHookSettled: (hook, outcome) => {
|
|
301751
301711
|
if (!this.experimentalFlags.enabled("session_trace") || this.metadata.custom["blunTrace"] !== true) return;
|
|
@@ -301768,15 +301728,7 @@ var Session$1 = class {
|
|
|
301768
301728
|
},
|
|
301769
301729
|
cwd: options.kaos.getcwd(),
|
|
301770
301730
|
sessionId: options.id,
|
|
301771
|
-
|
|
301772
|
-
runtimeEnv: (hook) => {
|
|
301773
|
-
const hostEnv = options.hookRuntimeEnv?.(hook);
|
|
301774
|
-
const timelineEnv = this.agentSpineRuntime?.forHook(hook);
|
|
301775
|
-
return timelineEnv === void 0 ? hostEnv : {
|
|
301776
|
-
...hostEnv,
|
|
301777
|
-
...timelineEnv
|
|
301778
|
-
};
|
|
301779
|
-
}
|
|
301731
|
+
runtimeEnv: (hook) => options.hookRuntimeEnv?.(hook)
|
|
301780
301732
|
});
|
|
301781
301733
|
this.telemetry = options.telemetry ?? noopTelemetryClient;
|
|
301782
301734
|
this.toolKaos = options.kaos;
|
|
@@ -301789,14 +301741,7 @@ var Session$1 = class {
|
|
|
301789
301741
|
oauthService: new McpOAuthService({ blunHomeDir: options.blunHomeDir }),
|
|
301790
301742
|
log: this.log,
|
|
301791
301743
|
stdioCwd: options.kaos.getcwd(),
|
|
301792
|
-
|
|
301793
|
-
const hostEnv = options.mcpRuntimeEnv?.(name, config);
|
|
301794
|
-
const timelineEnv = this.agentSpineRuntime?.forMcp(name, config);
|
|
301795
|
-
return timelineEnv === void 0 ? hostEnv : {
|
|
301796
|
-
...hostEnv,
|
|
301797
|
-
...timelineEnv
|
|
301798
|
-
};
|
|
301799
|
-
}
|
|
301744
|
+
stdioRuntimeEnv: (name, config) => options.mcpRuntimeEnv?.(name, config)
|
|
301800
301745
|
});
|
|
301801
301746
|
this.lsp = options.lspServers === void 0 || Object.keys(options.lspServers).length === 0 ? void 0 : new LspManager({
|
|
301802
301747
|
cwd: options.kaos.getcwd(),
|
|
@@ -301810,7 +301755,7 @@ var Session$1 = class {
|
|
|
301810
301755
|
}).then(() => {
|
|
301811
301756
|
this.refreshAgentBuiltinTools();
|
|
301812
301757
|
});
|
|
301813
|
-
|
|
301758
|
+
this.startMcpServers();
|
|
301814
301759
|
}
|
|
301815
301760
|
setToolKaos(kaos) {
|
|
301816
301761
|
this.toolKaos = kaos;
|
|
@@ -302692,16 +302637,6 @@ var Session$1 = class {
|
|
|
302692
302637
|
return agent;
|
|
302693
302638
|
}
|
|
302694
302639
|
async triggerSessionStart(source) {
|
|
302695
|
-
if (this.agentSpineRuntime?.hasRecipients && !this.mcpLoadStarted) {
|
|
302696
|
-
try {
|
|
302697
|
-
const main = this.getReadyAgent("main");
|
|
302698
|
-
await main?.records.flush();
|
|
302699
|
-
this.agentSpineRuntime.bind(this.options.id, main?.records.fileSource);
|
|
302700
|
-
} catch {
|
|
302701
|
-
this.log.warn("Native session record source is unavailable.");
|
|
302702
|
-
}
|
|
302703
|
-
this.startMcpServers();
|
|
302704
|
-
}
|
|
302705
302640
|
await this.hookEngine.trigger("SessionStart", {
|
|
302706
302641
|
matcherValue: source,
|
|
302707
302642
|
inputData: { source }
|
|
@@ -336075,7 +336010,6 @@ var BlunCore = class {
|
|
|
336075
336010
|
background: config.background,
|
|
336076
336011
|
hooks: [...config.hooks ?? [], ...pluginHooks],
|
|
336077
336012
|
hookPluginId: (hook) => this.plugins.pluginForHook(hook),
|
|
336078
|
-
agentSpineRuntime: this.agentSpineRuntimeRecipients(pluginHooks, mcpConfig),
|
|
336079
336013
|
permissionRules: config.permission?.rules,
|
|
336080
336014
|
skills: this.resolveSessionSkillConfig(config),
|
|
336081
336015
|
mcpConfig,
|
|
@@ -336226,7 +336160,6 @@ var BlunCore = class {
|
|
|
336226
336160
|
background: config.background,
|
|
336227
336161
|
hooks: [...config.hooks ?? [], ...pluginHooks],
|
|
336228
336162
|
hookPluginId: (hook) => this.plugins.pluginForHook(hook),
|
|
336229
|
-
agentSpineRuntime: this.agentSpineRuntimeRecipients(pluginHooks, mcpConfig),
|
|
336230
336163
|
permissionRules: config.permission?.rules,
|
|
336231
336164
|
skills: this.resolveSessionSkillConfig(config),
|
|
336232
336165
|
mcpConfig,
|
|
@@ -336731,19 +336664,6 @@ var BlunCore = class {
|
|
|
336731
336664
|
}
|
|
336732
336665
|
};
|
|
336733
336666
|
}
|
|
336734
|
-
agentSpineRuntimeRecipients(pluginHooks, mcpConfig) {
|
|
336735
|
-
const plugin = this.plugins.get("agent-spine");
|
|
336736
|
-
if (plugin?.state !== "ok" || !plugin.enabled) return void 0;
|
|
336737
|
-
const hooks = pluginHooks.filter((hook) => hook.env?.["BLUN_PLUGIN_ROOT"] === plugin.root);
|
|
336738
|
-
const mcpServers = Object.fromEntries(Object.entries(mcpConfig?.servers ?? {}).filter(([name, config]) => {
|
|
336739
|
-
const origin = mcpConfig?.origins?.[name];
|
|
336740
|
-
return origin?.source === "plugin" && origin.pluginId === plugin.id && origin.pluginEnabled && config.transport === "stdio" && config.enabled !== false;
|
|
336741
|
-
}));
|
|
336742
|
-
return hooks.length > 0 || Object.keys(mcpServers).length > 0 ? {
|
|
336743
|
-
hooks,
|
|
336744
|
-
mcpServers
|
|
336745
|
-
} : void 0;
|
|
336746
|
-
}
|
|
336747
336667
|
async resolveCurrentMcpConfig(session) {
|
|
336748
336668
|
const snapshot = session.mcpConfigSnapshot();
|
|
336749
336669
|
const callerServers = Object.fromEntries(Object.entries(snapshot?.servers ?? {}).filter(([name]) => snapshot?.origins?.[name]?.source === "session"));
|
|
@@ -350406,7 +350326,7 @@ function optionalBuildString(value) {
|
|
|
350406
350326
|
return typeof value === "string" && value.length > 0 ? value : void 0;
|
|
350407
350327
|
}
|
|
350408
350328
|
const BLUN_BUILD_INFO = {
|
|
350409
|
-
version: optionalBuildString("9.1.
|
|
350329
|
+
version: optionalBuildString("9.1.643"),
|
|
350410
350330
|
channel: typeof __BLUN_CHANNEL__ === "string" ? optionalBuildString(__BLUN_CHANNEL__) : void 0,
|
|
350411
350331
|
commit: typeof __BLUN_COMMIT__ === "string" ? optionalBuildString(__BLUN_COMMIT__) : void 0,
|
|
350412
350332
|
buildTarget: typeof __BLUN_BUILD_TARGET__ === "string" ? optionalBuildString(__BLUN_BUILD_TARGET__) : void 0
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "agent-spine",
|
|
3
|
-
"description": "Non-destructive identity and memory infrastructure for AI agents.",
|
|
4
|
-
"owner": {
|
|
5
|
-
"name": "Mayk Biletti"
|
|
6
|
-
},
|
|
7
|
-
"plugins": [
|
|
8
|
-
{
|
|
9
|
-
"name": "agent-spine",
|
|
10
|
-
"source": ".",
|
|
11
|
-
"description": "Map existing rules, soul, and memory without rewriting source files.",
|
|
12
|
-
"version": "0.73.0",
|
|
13
|
-
"author": {
|
|
14
|
-
"name": "Mayk Biletti"
|
|
15
|
-
},
|
|
16
|
-
"category": "development",
|
|
17
|
-
"tags": ["agents", "identity", "memory", "mcp"]
|
|
18
|
-
}
|
|
19
|
-
]
|
|
20
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "agent-spine",
|
|
3
|
-
"version": "0.73.0",
|
|
4
|
-
"description": "A non-destructive identity and memory spine for Claude Code agents.",
|
|
5
|
-
"author": {
|
|
6
|
-
"name": "Mayk Biletti",
|
|
7
|
-
"url": "https://github.com/Maykbiletti"
|
|
8
|
-
},
|
|
9
|
-
"homepage": "https://github.com/Maykbiletti/AgentSpine",
|
|
10
|
-
"repository": "https://github.com/Maykbiletti/AgentSpine",
|
|
11
|
-
"license": "Apache-2.0",
|
|
12
|
-
"keywords": ["identity", "memory", "mcp", "agents"],
|
|
13
|
-
"mcpServers": "./.mcp.json"
|
|
14
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "agent-spine",
|
|
3
|
-
"version": "0.73.0",
|
|
4
|
-
"description": "A non-destructive identity and memory spine for Codex agents.",
|
|
5
|
-
"author": {
|
|
6
|
-
"name": "Mayk Biletti",
|
|
7
|
-
"url": "https://github.com/Maykbiletti"
|
|
8
|
-
},
|
|
9
|
-
"homepage": "https://github.com/Maykbiletti/AgentSpine",
|
|
10
|
-
"repository": "https://github.com/Maykbiletti/AgentSpine",
|
|
11
|
-
"license": "Apache-2.0",
|
|
12
|
-
"keywords": [
|
|
13
|
-
"identity",
|
|
14
|
-
"memory",
|
|
15
|
-
"mcp",
|
|
16
|
-
"agents"
|
|
17
|
-
],
|
|
18
|
-
"skills": "./skills/",
|
|
19
|
-
"hooks": "./hooks/codex.json",
|
|
20
|
-
"mcpServers": {
|
|
21
|
-
"agent-spine": {
|
|
22
|
-
"command": "node",
|
|
23
|
-
"args": [
|
|
24
|
-
"${PLUGIN_ROOT}/src/mcp.js"
|
|
25
|
-
]
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
"interface": {
|
|
29
|
-
"displayName": "AgentSpine",
|
|
30
|
-
"shortDescription": "Identity and memory without rewriting your files.",
|
|
31
|
-
"longDescription": "Maps existing rules, soul, memory, and linked Markdown into a verifiable context spine while preserving every source byte.",
|
|
32
|
-
"developerName": "BLUN",
|
|
33
|
-
"category": "Developer Tools",
|
|
34
|
-
"capabilities": [
|
|
35
|
-
"Read",
|
|
36
|
-
"MCP",
|
|
37
|
-
"Hooks",
|
|
38
|
-
"Worker"
|
|
39
|
-
],
|
|
40
|
-
"websiteURL": "https://github.com/Maykbiletti/AgentSpine",
|
|
41
|
-
"defaultPrompt": [
|
|
42
|
-
"Map this project's existing agent identity.",
|
|
43
|
-
"Show the active rules, soul, and memory layers.",
|
|
44
|
-
"Verify that protected sources are unchanged."
|
|
45
|
-
]
|
|
46
|
-
}
|
|
47
|
-
}
|