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/blun.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
|
|
|
@@ -21505,14 +21506,6 @@ var init_registry$4 = __esmMin((() => {
|
|
|
21505
21506
|
default: false,
|
|
21506
21507
|
surface: "core"
|
|
21507
21508
|
},
|
|
21508
|
-
{
|
|
21509
|
-
id: "agent_spine_timeline",
|
|
21510
|
-
title: "AgentSpine session transport",
|
|
21511
|
-
description: "Pass the current native record source to the enabled AgentSpine plugin.",
|
|
21512
|
-
env: "BLUN_EXPERIMENTAL_AGENT_SPINE_TIMELINE",
|
|
21513
|
-
default: false,
|
|
21514
|
-
surface: "core"
|
|
21515
|
-
},
|
|
21516
21509
|
{
|
|
21517
21510
|
id: "vision_reader",
|
|
21518
21511
|
title: "Vision reader",
|
|
@@ -185288,7 +185281,8 @@ var init_background = __esmMin((() => {
|
|
|
185288
185281
|
* Wait for a task to reach a terminal state.
|
|
185289
185282
|
* Returns immediately if already terminal. Times out after `timeoutMs`.
|
|
185290
185283
|
*/
|
|
185291
|
-
async wait(taskId, timeoutMs = 3e4) {
|
|
185284
|
+
async wait(taskId, timeoutMs = 3e4, signal) {
|
|
185285
|
+
signal?.throwIfAborted();
|
|
185292
185286
|
const entry = this.tasks.get(taskId);
|
|
185293
185287
|
if (!entry) return void 0;
|
|
185294
185288
|
if (TERMINAL_STATUSES.has(entry.status)) {
|
|
@@ -185297,7 +185291,7 @@ var init_background = __esmMin((() => {
|
|
|
185297
185291
|
}
|
|
185298
185292
|
if (timeoutMs <= 0) return this.toInfo(entry);
|
|
185299
185293
|
const timeout = timeoutOutcome(timeoutMs, void 0);
|
|
185300
|
-
await
|
|
185294
|
+
await toolLiveness642.waitForTaskTerminal(entry.terminal, timeout, signal);
|
|
185301
185295
|
if (TERMINAL_STATUSES.has(entry.status)) await entry.persistWriteQueue;
|
|
185302
185296
|
return this.toInfo(entry);
|
|
185303
185297
|
}
|
|
@@ -257026,6 +257020,7 @@ function fullOutputHint(output) {
|
|
|
257026
257020
|
}
|
|
257027
257021
|
var OUTPUT_PREVIEW_BYTES, PAGING_HINT_LINES, TaskOutputInputSchema, TaskOutputTool;
|
|
257028
257022
|
var init_task_output = __esmMin((() => {
|
|
257023
|
+
init_input_control();
|
|
257029
257024
|
init_zod$1();
|
|
257030
257025
|
init_background();
|
|
257031
257026
|
init_input_schema();
|
|
@@ -257052,16 +257047,27 @@ var init_task_output = __esmMin((() => {
|
|
|
257052
257047
|
description: `Reading output of task ${args.task_id}`,
|
|
257053
257048
|
approvalRule: this.name,
|
|
257054
257049
|
matchesRule: (ruleArgs) => matchesGlobRuleSubject(ruleArgs, args.task_id),
|
|
257055
|
-
execute: () => this.execute(args)
|
|
257050
|
+
execute: ({ signal }) => this.execute(args, signal)
|
|
257056
257051
|
};
|
|
257057
257052
|
}
|
|
257058
|
-
async execute(args) {
|
|
257053
|
+
async execute(args, signal = new AbortController().signal) {
|
|
257054
|
+
signal.throwIfAborted();
|
|
257055
|
+
const control642 = inputControl(signal);
|
|
257056
|
+
const epoch642 = control642.epoch;
|
|
257057
|
+
let waitReleasedForInput642 = false;
|
|
257059
257058
|
const info = this.manager.getTask(args.task_id);
|
|
257060
257059
|
if (!info) return {
|
|
257061
257060
|
isError: true,
|
|
257062
257061
|
output: `Task not found: ${args.task_id}`
|
|
257063
257062
|
};
|
|
257064
|
-
if (args.block && !isBackgroundTaskTerminal(info.status))
|
|
257063
|
+
if (args.block && !isBackgroundTaskTerminal(info.status)) {
|
|
257064
|
+
waitReleasedForInput642 = await toolLiveness642.waitForTaskInput({
|
|
257065
|
+
manager: this.manager, taskId: args.task_id,
|
|
257066
|
+
timeoutMs: (args.timeout ?? 30) * 1e3, signal,
|
|
257067
|
+
control: control642, initialEpoch: epoch642
|
|
257068
|
+
}) === "input";
|
|
257069
|
+
}
|
|
257070
|
+
signal.throwIfAborted();
|
|
257065
257071
|
const current = this.manager.getTask(args.task_id);
|
|
257066
257072
|
if (!current) return {
|
|
257067
257073
|
isError: true,
|
|
@@ -257069,7 +257075,8 @@ var init_task_output = __esmMin((() => {
|
|
|
257069
257075
|
};
|
|
257070
257076
|
const output = await this.manager.getOutputSnapshot(args.task_id, OUTPUT_PREVIEW_BYTES);
|
|
257071
257077
|
const lines = [formatPlainObject({
|
|
257072
|
-
retrievalStatus: retrievalStatus(current.status, args.block),
|
|
257078
|
+
retrievalStatus: retrievalStatus(current.status, args.block && !waitReleasedForInput642),
|
|
257079
|
+
waitReleasedForInput: waitReleasedForInput642 || void 0,
|
|
257073
257080
|
...current,
|
|
257074
257081
|
outputPath: output.outputPath,
|
|
257075
257082
|
terminalReason: terminalReason(current),
|
|
@@ -257485,6 +257492,7 @@ function buildSubagentDescriptions(subagents) {
|
|
|
257485
257492
|
}
|
|
257486
257493
|
var AgentToolInputSchema, BACKGROUND_AGENT_UNAVAILABLE, AgentTool, USER_INTERRUPTED_SUBAGENT_MESSAGE;
|
|
257487
257494
|
var init_agent$1 = __esmMin((() => {
|
|
257495
|
+
init_input_control();
|
|
257488
257496
|
init_zod$1();
|
|
257489
257497
|
init_tool_access();
|
|
257490
257498
|
init_errors$5();
|
|
@@ -257558,6 +257566,8 @@ var init_agent$1 = __esmMin((() => {
|
|
|
257558
257566
|
};
|
|
257559
257567
|
}
|
|
257560
257568
|
async execution(args, { toolCallId, signal }) {
|
|
257569
|
+
const control642 = inputControl(signal);
|
|
257570
|
+
const epoch642 = control642.epoch;
|
|
257561
257571
|
try {
|
|
257562
257572
|
signal.throwIfAborted();
|
|
257563
257573
|
const runInBackground = args.run_in_background === true;
|
|
@@ -257625,8 +257635,16 @@ var init_agent$1 = __esmMin((() => {
|
|
|
257625
257635
|
};
|
|
257626
257636
|
}
|
|
257627
257637
|
if (runInBackground) return { output: formatBackgroundAgentResult(taskId, handle, args.description, this.allowBackground) };
|
|
257628
|
-
|
|
257629
|
-
|
|
257638
|
+
const inputYield642 = toolLiveness642.createForegroundYield({
|
|
257639
|
+
control: control642, initialEpoch: epoch642, signal,
|
|
257640
|
+
enabled: this.allowBackground, idleMs: 0,
|
|
257641
|
+
detach: () => this.backgroundManager.detach(taskId),
|
|
257642
|
+
onError: error => this.log?.warn("Could not background active agent", { error })
|
|
257643
|
+
});
|
|
257644
|
+
try {
|
|
257645
|
+
if (await this.backgroundManager.waitForForegroundRelease(taskId) === "detached") return { output: formatBackgroundAgentResult(taskId, handle, args.description, this.allowBackground) };
|
|
257646
|
+
return await this.formatForegroundResult(taskId, handle);
|
|
257647
|
+
} finally { inputYield642.dispose(); }
|
|
257630
257648
|
} catch (error) {
|
|
257631
257649
|
return {
|
|
257632
257650
|
output: `subagent error: ${launchErrorMessage(error, signal)}`,
|
|
@@ -267509,6 +267527,7 @@ function rewriteWindowsNullRedirect(command) {
|
|
|
267509
267527
|
}
|
|
267510
267528
|
var MS_PER_SECOND, DEFAULT_TIMEOUT_S, MAX_TIMEOUT_S, DEFAULT_BACKGROUND_TIMEOUT_S, MAX_BACKGROUND_TIMEOUT_S, USER_INTERRUPT_REASON, BashInputSchema, SHELL_TIMEOUT_VARS, BashTool, WINDOWS_NUL_REDIRECT;
|
|
267511
267529
|
var init_bash = __esmMin((() => {
|
|
267530
|
+
init_input_control();
|
|
267512
267531
|
init_zod$1();
|
|
267513
267532
|
init_background();
|
|
267514
267533
|
init_render_prompt();
|
|
@@ -267672,6 +267691,9 @@ var init_bash = __esmMin((() => {
|
|
|
267672
267691
|
return this.kaos.execWithEnv(shellArgs, mergedEnv);
|
|
267673
267692
|
}
|
|
267674
267693
|
async execution(args, signal, onUpdate, onForegroundTaskStart) {
|
|
267694
|
+
const inputControl642 = inputControl(signal);
|
|
267695
|
+
const inputEpoch642 = inputControl642.epoch;
|
|
267696
|
+
let foregroundYield642;
|
|
267675
267697
|
const validationError = this.validateRunRequest(args, signal);
|
|
267676
267698
|
if (validationError !== void 0) return validationError;
|
|
267677
267699
|
const startsInBackground = args.run_in_background === true;
|
|
@@ -267696,6 +267718,7 @@ var init_bash = __esmMin((() => {
|
|
|
267696
267718
|
let foregroundTaskId;
|
|
267697
267719
|
const onProcessOutput = startsInBackground ? void 0 : (kind, text) => {
|
|
267698
267720
|
if (!collectForegroundOutput) return;
|
|
267721
|
+
if (text.length > 0) foregroundYield642?.touch();
|
|
267699
267722
|
onUpdate?.({
|
|
267700
267723
|
kind,
|
|
267701
267724
|
text
|
|
@@ -267725,6 +267748,13 @@ var init_bash = __esmMin((() => {
|
|
|
267725
267748
|
};
|
|
267726
267749
|
}
|
|
267727
267750
|
if (!startsInBackground) onForegroundTaskStart?.(taskId);
|
|
267751
|
+
foregroundYield642 = toolLiveness642.createForegroundYield({
|
|
267752
|
+
control: inputControl642, initialEpoch: inputEpoch642, signal,
|
|
267753
|
+
enabled: !startsInBackground && this.allowBackground,
|
|
267754
|
+
detach: () => this.backgroundManager.detach(taskId),
|
|
267755
|
+
onError: () => onUpdate?.({ kind: "status",
|
|
267756
|
+
text: "Could not move this command to the background; it remains running." }),
|
|
267757
|
+
});
|
|
267728
267758
|
if (startsInBackground) return this.backgroundStartedResult(taskId, proc, description, {
|
|
267729
267759
|
title: "Background task started",
|
|
267730
267760
|
brief: `Started ${taskId}`
|
|
@@ -267739,6 +267769,7 @@ var init_bash = __esmMin((() => {
|
|
|
267739
267769
|
}
|
|
267740
267770
|
return await this.foregroundCompletionResult(taskId, proc, builder, foregroundTimeoutMs);
|
|
267741
267771
|
} finally {
|
|
267772
|
+
foregroundYield642?.dispose();
|
|
267742
267773
|
collectForegroundOutput = false;
|
|
267743
267774
|
}
|
|
267744
267775
|
}
|
|
@@ -301900,73 +301931,6 @@ var init_mcp$2 = __esmMin((() => {
|
|
|
301900
301931
|
init_tool_naming();
|
|
301901
301932
|
init_types$7();
|
|
301902
301933
|
}));
|
|
301903
|
-
/** AgentSpine reads prompt text; binary media stays in the original model input. */
|
|
301904
|
-
function projectAgentSpinePrompt(input) {
|
|
301905
|
-
if (typeof input["hook_event_name"] !== "string" || !PROMPT_EVENTS.has(input["hook_event_name"]) || !Array.isArray(input["prompt"])) return input;
|
|
301906
|
-
let changed = false;
|
|
301907
|
-
const prompt = input["prompt"].map((part) => {
|
|
301908
|
-
if (!isRecord$19(part)) return part;
|
|
301909
|
-
const field = part["type"] === "image_url" ? "imageUrl" : part["type"] === "audio_url" ? "audioUrl" : part["type"] === "video_url" ? "videoUrl" : void 0;
|
|
301910
|
-
if (field === void 0 || !isRecord$19(part[field]) || typeof part[field]["url"] !== "string") return part;
|
|
301911
|
-
const serialized = JSON.stringify(part);
|
|
301912
|
-
changed = true;
|
|
301913
|
-
return {
|
|
301914
|
-
type: "media_reference",
|
|
301915
|
-
media_type: part["type"],
|
|
301916
|
-
sha256: createHash("sha256").update(serialized).digest("hex"),
|
|
301917
|
-
original_bytes: Buffer.byteLength(serialized)
|
|
301918
|
-
};
|
|
301919
|
-
});
|
|
301920
|
-
return changed ? {
|
|
301921
|
-
...input,
|
|
301922
|
-
prompt
|
|
301923
|
-
} : input;
|
|
301924
|
-
}
|
|
301925
|
-
function isRecord$19(value) {
|
|
301926
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
301927
|
-
}
|
|
301928
|
-
var PROMPT_EVENTS, EMPTY_RUNTIME, AgentSpineSessionRuntime;
|
|
301929
|
-
var init_agent_spine_runtime = __esmMin((() => {
|
|
301930
|
-
PROMPT_EVENTS = new Set([
|
|
301931
|
-
"UserPromptSubmit",
|
|
301932
|
-
"TurnStart",
|
|
301933
|
-
"SubagentStart"
|
|
301934
|
-
]);
|
|
301935
|
-
EMPTY_RUNTIME = Object.freeze({
|
|
301936
|
-
AGENTSPINE_KING_TIMELINE_SOURCE: "",
|
|
301937
|
-
AGENTSPINE_KING_WIRE_PROTOCOL_VERSION: "",
|
|
301938
|
-
AGENTSPINE_TIMELINE_TRANSPORT_SESSION_ID: "",
|
|
301939
|
-
AGENTSPINE_TIMELINE_SESSION_CAPABILITY: ""
|
|
301940
|
-
});
|
|
301941
|
-
AgentSpineSessionRuntime = class {
|
|
301942
|
-
#env = EMPTY_RUNTIME;
|
|
301943
|
-
#hooks;
|
|
301944
|
-
#servers;
|
|
301945
|
-
constructor(recipients) {
|
|
301946
|
-
this.#hooks = new Set(recipients?.hooks);
|
|
301947
|
-
this.#servers = new Map(Object.entries(recipients?.mcpServers ?? {}));
|
|
301948
|
-
}
|
|
301949
|
-
get hasRecipients() {
|
|
301950
|
-
return this.#hooks.size > 0 || this.#servers.size > 0;
|
|
301951
|
-
}
|
|
301952
|
-
bind(sessionId, source) {
|
|
301953
|
-
this.#env = EMPTY_RUNTIME;
|
|
301954
|
-
if (!sessionId || !/^[A-Za-z0-9][A-Za-z0-9:_.@/-]{0,127}$/.test(sessionId) || !source) return;
|
|
301955
|
-
this.#env = Object.freeze({
|
|
301956
|
-
AGENTSPINE_KING_TIMELINE_SOURCE: source.path,
|
|
301957
|
-
AGENTSPINE_KING_WIRE_PROTOCOL_VERSION: source.protocolVersion,
|
|
301958
|
-
AGENTSPINE_TIMELINE_TRANSPORT_SESSION_ID: sessionId,
|
|
301959
|
-
AGENTSPINE_TIMELINE_SESSION_CAPABILITY: `astc_${randomBytes(32).toString("base64url")}`
|
|
301960
|
-
});
|
|
301961
|
-
}
|
|
301962
|
-
forHook(hook) {
|
|
301963
|
-
return this.#hooks.has(hook) ? this.#env : EMPTY_RUNTIME;
|
|
301964
|
-
}
|
|
301965
|
-
forMcp(name, config) {
|
|
301966
|
-
return config.transport === "stdio" && this.#servers.get(name) === config ? this.#env : EMPTY_RUNTIME;
|
|
301967
|
-
}
|
|
301968
|
-
};
|
|
301969
|
-
}));
|
|
301970
301934
|
/**
|
|
301971
301935
|
* Detects the complete retired file-memory instruction signature. The embedded
|
|
301972
301936
|
* MEMORY.md content is untrusted, so callers must re-render the current profile
|
|
@@ -302757,7 +302721,6 @@ var init_session$3 = __esmMin((() => {
|
|
|
302757
302721
|
init_config$7();
|
|
302758
302722
|
init_mcp$2();
|
|
302759
302723
|
init_public_display();
|
|
302760
|
-
init_agent_spine_runtime();
|
|
302761
302724
|
init_profile();
|
|
302762
302725
|
init_legacy_memory();
|
|
302763
302726
|
init_provider_manager();
|
|
@@ -302814,7 +302777,6 @@ var init_session$3 = __esmMin((() => {
|
|
|
302814
302777
|
writeMetadataPromise = Promise.resolve();
|
|
302815
302778
|
agentsMdWarning;
|
|
302816
302779
|
accountMemoryContext = "";
|
|
302817
|
-
agentSpineRuntime;
|
|
302818
302780
|
mcpLoadStarted = false;
|
|
302819
302781
|
workAdmissionClosed = false;
|
|
302820
302782
|
agentOperations = new ExecutionLedger();
|
|
@@ -302844,9 +302806,7 @@ var init_session$3 = __esmMin((() => {
|
|
|
302844
302806
|
});
|
|
302845
302807
|
};
|
|
302846
302808
|
} });
|
|
302847
|
-
this.agentSpineRuntime = this.experimentalFlags.enabled("agent_spine_timeline") ? new AgentSpineSessionRuntime(options.agentSpineRuntime) : void 0;
|
|
302848
302809
|
this.visionReader = (this.experimentalFlags.enabled("vision_reader") ? createVisionReader(options.config?.services?.visionReader) : void 0) ?? createManagedMediaVisionReader(options.toolServices?.media);
|
|
302849
|
-
const agentSpineHooks = new Set(options.agentSpineRuntime?.hooks);
|
|
302850
302810
|
this.hookEngine = new HookEngine(options.hooks, {
|
|
302851
302811
|
onHookSettled: (hook, outcome) => {
|
|
302852
302812
|
if (!this.experimentalFlags.enabled("session_trace") || this.metadata.custom["blunTrace"] !== true) return;
|
|
@@ -302869,15 +302829,7 @@ var init_session$3 = __esmMin((() => {
|
|
|
302869
302829
|
},
|
|
302870
302830
|
cwd: options.kaos.getcwd(),
|
|
302871
302831
|
sessionId: options.id,
|
|
302872
|
-
|
|
302873
|
-
runtimeEnv: (hook) => {
|
|
302874
|
-
const hostEnv = options.hookRuntimeEnv?.(hook);
|
|
302875
|
-
const timelineEnv = this.agentSpineRuntime?.forHook(hook);
|
|
302876
|
-
return timelineEnv === void 0 ? hostEnv : {
|
|
302877
|
-
...hostEnv,
|
|
302878
|
-
...timelineEnv
|
|
302879
|
-
};
|
|
302880
|
-
}
|
|
302832
|
+
runtimeEnv: (hook) => options.hookRuntimeEnv?.(hook)
|
|
302881
302833
|
});
|
|
302882
302834
|
this.telemetry = options.telemetry ?? noopTelemetryClient;
|
|
302883
302835
|
this.toolKaos = options.kaos;
|
|
@@ -302890,14 +302842,7 @@ var init_session$3 = __esmMin((() => {
|
|
|
302890
302842
|
oauthService: new McpOAuthService({ blunHomeDir: options.blunHomeDir }),
|
|
302891
302843
|
log: this.log,
|
|
302892
302844
|
stdioCwd: options.kaos.getcwd(),
|
|
302893
|
-
|
|
302894
|
-
const hostEnv = options.mcpRuntimeEnv?.(name, config);
|
|
302895
|
-
const timelineEnv = this.agentSpineRuntime?.forMcp(name, config);
|
|
302896
|
-
return timelineEnv === void 0 ? hostEnv : {
|
|
302897
|
-
...hostEnv,
|
|
302898
|
-
...timelineEnv
|
|
302899
|
-
};
|
|
302900
|
-
}
|
|
302845
|
+
stdioRuntimeEnv: (name, config) => options.mcpRuntimeEnv?.(name, config)
|
|
302901
302846
|
});
|
|
302902
302847
|
this.lsp = options.lspServers === void 0 || Object.keys(options.lspServers).length === 0 ? void 0 : new LspManager({
|
|
302903
302848
|
cwd: options.kaos.getcwd(),
|
|
@@ -302911,7 +302856,7 @@ var init_session$3 = __esmMin((() => {
|
|
|
302911
302856
|
}).then(() => {
|
|
302912
302857
|
this.refreshAgentBuiltinTools();
|
|
302913
302858
|
});
|
|
302914
|
-
|
|
302859
|
+
this.startMcpServers();
|
|
302915
302860
|
}
|
|
302916
302861
|
setToolKaos(kaos) {
|
|
302917
302862
|
this.toolKaos = kaos;
|
|
@@ -303793,16 +303738,6 @@ var init_session$3 = __esmMin((() => {
|
|
|
303793
303738
|
return agent;
|
|
303794
303739
|
}
|
|
303795
303740
|
async triggerSessionStart(source) {
|
|
303796
|
-
if (this.agentSpineRuntime?.hasRecipients && !this.mcpLoadStarted) {
|
|
303797
|
-
try {
|
|
303798
|
-
const main = this.getReadyAgent("main");
|
|
303799
|
-
await main?.records.flush();
|
|
303800
|
-
this.agentSpineRuntime.bind(this.options.id, main?.records.fileSource);
|
|
303801
|
-
} catch {
|
|
303802
|
-
this.log.warn("Native session record source is unavailable.");
|
|
303803
|
-
}
|
|
303804
|
-
this.startMcpServers();
|
|
303805
|
-
}
|
|
303806
303741
|
await this.hookEngine.trigger("SessionStart", {
|
|
303807
303742
|
matcherValue: source,
|
|
303808
303743
|
inputData: { source }
|
|
@@ -337910,7 +337845,6 @@ var init_core_impl = __esmMin((() => {
|
|
|
337910
337845
|
background: config.background,
|
|
337911
337846
|
hooks: [...config.hooks ?? [], ...pluginHooks],
|
|
337912
337847
|
hookPluginId: (hook) => this.plugins.pluginForHook(hook),
|
|
337913
|
-
agentSpineRuntime: this.agentSpineRuntimeRecipients(pluginHooks, mcpConfig),
|
|
337914
337848
|
permissionRules: config.permission?.rules,
|
|
337915
337849
|
skills: this.resolveSessionSkillConfig(config),
|
|
337916
337850
|
mcpConfig,
|
|
@@ -338061,7 +337995,6 @@ var init_core_impl = __esmMin((() => {
|
|
|
338061
337995
|
background: config.background,
|
|
338062
337996
|
hooks: [...config.hooks ?? [], ...pluginHooks],
|
|
338063
337997
|
hookPluginId: (hook) => this.plugins.pluginForHook(hook),
|
|
338064
|
-
agentSpineRuntime: this.agentSpineRuntimeRecipients(pluginHooks, mcpConfig),
|
|
338065
337998
|
permissionRules: config.permission?.rules,
|
|
338066
337999
|
skills: this.resolveSessionSkillConfig(config),
|
|
338067
338000
|
mcpConfig,
|
|
@@ -338566,19 +338499,6 @@ var init_core_impl = __esmMin((() => {
|
|
|
338566
338499
|
}
|
|
338567
338500
|
};
|
|
338568
338501
|
}
|
|
338569
|
-
agentSpineRuntimeRecipients(pluginHooks, mcpConfig) {
|
|
338570
|
-
const plugin = this.plugins.get("agent-spine");
|
|
338571
|
-
if (plugin?.state !== "ok" || !plugin.enabled) return void 0;
|
|
338572
|
-
const hooks = pluginHooks.filter((hook) => hook.env?.["BLUN_PLUGIN_ROOT"] === plugin.root);
|
|
338573
|
-
const mcpServers = Object.fromEntries(Object.entries(mcpConfig?.servers ?? {}).filter(([name, config]) => {
|
|
338574
|
-
const origin = mcpConfig?.origins?.[name];
|
|
338575
|
-
return origin?.source === "plugin" && origin.pluginId === plugin.id && origin.pluginEnabled && config.transport === "stdio" && config.enabled !== false;
|
|
338576
|
-
}));
|
|
338577
|
-
return hooks.length > 0 || Object.keys(mcpServers).length > 0 ? {
|
|
338578
|
-
hooks,
|
|
338579
|
-
mcpServers
|
|
338580
|
-
} : void 0;
|
|
338581
|
-
}
|
|
338582
338502
|
async resolveCurrentMcpConfig(session) {
|
|
338583
338503
|
const snapshot = session.mcpConfigSnapshot();
|
|
338584
338504
|
const callerServers = Object.fromEntries(Object.entries(snapshot?.servers ?? {}).filter(([name]) => snapshot?.origins?.[name]?.source === "session"));
|
|
@@ -368624,7 +368544,7 @@ function optionalBuildString(value) {
|
|
|
368624
368544
|
var BLUN_BUILD_INFO;
|
|
368625
368545
|
var init_build_info = __esmMin((() => {
|
|
368626
368546
|
BLUN_BUILD_INFO = {
|
|
368627
|
-
version: optionalBuildString("9.1.
|
|
368547
|
+
version: optionalBuildString("9.1.643"),
|
|
368628
368548
|
channel: typeof __BLUN_CHANNEL__ === "string" ? optionalBuildString(__BLUN_CHANNEL__) : void 0,
|
|
368629
368549
|
commit: typeof __BLUN_COMMIT__ === "string" ? optionalBuildString(__BLUN_COMMIT__) : void 0,
|
|
368630
368550
|
buildTarget: typeof __BLUN_BUILD_TARGET__ === "string" ? optionalBuildString(__BLUN_BUILD_TARGET__) : void 0
|
|
@@ -493017,7 +492937,7 @@ var init_choice_picker = __esmMin((() => {
|
|
|
493017
492937
|
this.list = new SearchableList({
|
|
493018
492938
|
items: opts.options,
|
|
493019
492939
|
toSearchText: (o) => `${o.label} ${o.description ?? ""}`,
|
|
493020
|
-
pageSize: opts.pageSize,
|
|
492940
|
+
pageSize: opts.pageSize ?? 5,
|
|
493021
492941
|
initialIndex: Math.max(currentIdx, 0),
|
|
493022
492942
|
searchable: opts.searchable === true
|
|
493023
492943
|
});
|
|
@@ -493083,7 +493003,15 @@ var init_choice_picker = __esmMin((() => {
|
|
|
493083
493003
|
lines.push("");
|
|
493084
493004
|
if (searchable && view.query.length > 0) lines.push(currentTheme.fg("primary", ` ${uiText("common.search")}: `) + currentTheme.fg("text", view.query));
|
|
493085
493005
|
if (options.length === 0) lines.push(currentTheme.fg("textMuted", ` ${uiText("common.noMatches")}`));
|
|
493006
|
+
const selected = this.list.selected();
|
|
493007
|
+
if (selected?.description !== void 0 && selected.description.length > 0) {
|
|
493008
|
+
for (const detail of wrapDescription(selected.description, Math.max(1, width - 4))) {
|
|
493009
|
+
lines.push(currentTheme.fg(selected.descriptionTone ?? "textMuted", ` ${detail}`));
|
|
493010
|
+
}
|
|
493011
|
+
lines.push("");
|
|
493012
|
+
}
|
|
493086
493013
|
for (let i = view.page.start; i < view.page.end; i++) {
|
|
493014
|
+
if (i > view.page.start) lines.push("");
|
|
493087
493015
|
const opt = options[i];
|
|
493088
493016
|
const isSelected = i === view.selectedIndex;
|
|
493089
493017
|
const isCurrent = opt.value === this.opts.currentValue;
|
|
@@ -493093,11 +493021,6 @@ var init_choice_picker = __esmMin((() => {
|
|
|
493093
493021
|
line += labelStyle(opt.label);
|
|
493094
493022
|
if (isCurrent) line += " " + currentTheme.fg("success", currentMark());
|
|
493095
493023
|
lines.push(line);
|
|
493096
|
-
if (opt.description !== void 0 && opt.description.length > 0) {
|
|
493097
|
-
const descriptionWidth = Math.max(1, width - 4);
|
|
493098
|
-
const descriptionColor = isSelected && opt.descriptionTone !== void 0 ? opt.descriptionTone : "textMuted";
|
|
493099
|
-
for (const descLine of wrapDescription(opt.description, descriptionWidth)) lines.push(currentTheme.fg(descriptionColor, ` ${descLine}`));
|
|
493100
|
-
}
|
|
493101
493024
|
}
|
|
493102
493025
|
lines.push("");
|
|
493103
493026
|
if (view.page.pageCount > 1) lines.push(currentTheme.fg("textMuted", ` ${uiText("common.pageCount", {
|
|
@@ -504470,13 +504393,6 @@ var init_registry$1 = __esmMin((() => {
|
|
|
504470
504393
|
priority: 60,
|
|
504471
504394
|
availability: "always"
|
|
504472
504395
|
},
|
|
504473
|
-
{
|
|
504474
|
-
name: "agent-spine",
|
|
504475
|
-
aliases: [],
|
|
504476
|
-
descriptionKey: "command.plugins.description",
|
|
504477
|
-
priority: 61,
|
|
504478
|
-
availability: "idle-only"
|
|
504479
|
-
},
|
|
504480
504396
|
{
|
|
504481
504397
|
name: "telegram-access",
|
|
504482
504398
|
aliases: ["telegram-acces"],
|
|
@@ -507594,30 +507510,6 @@ var init_plugins = __esmMin((() => {
|
|
|
507594
507510
|
init_plugin_source_label();
|
|
507595
507511
|
init_plugin_marketplace();
|
|
507596
507512
|
}));
|
|
507597
|
-
function agentSpinePluginCommand(plugins) {
|
|
507598
|
-
const installed = plugins.find((plugin) => plugin.id === AGENT_SPINE_PLUGIN_ID);
|
|
507599
|
-
if (installed === void 0) return `install ${AGENT_SPINE_PLUGIN_SOURCE}`;
|
|
507600
|
-
if (!installed.enabled) return `enable ${AGENT_SPINE_PLUGIN_ID}`;
|
|
507601
|
-
return AGENT_SPINE_PLUGIN_ID;
|
|
507602
|
-
}
|
|
507603
|
-
async function handleAgentSpineCommand(host) {
|
|
507604
|
-
try {
|
|
507605
|
-
await handlePluginsCommand(host, agentSpinePluginCommand(await host.requireSession().listPlugins()));
|
|
507606
|
-
} catch (error) {
|
|
507607
|
-
host.showError(uiText("plugins.error.actionFailed", {
|
|
507608
|
-
command: "/agent-spine",
|
|
507609
|
-
error: formatErrorMessage$2(error)
|
|
507610
|
-
}));
|
|
507611
|
-
}
|
|
507612
|
-
}
|
|
507613
|
-
var AGENT_SPINE_PLUGIN_ID, AGENT_SPINE_PLUGIN_SOURCE;
|
|
507614
|
-
var init_agent_spine = __esmMin((() => {
|
|
507615
|
-
init_i18n();
|
|
507616
|
-
init_event_payload();
|
|
507617
|
-
init_plugins();
|
|
507618
|
-
AGENT_SPINE_PLUGIN_ID = "agent-spine";
|
|
507619
|
-
AGENT_SPINE_PLUGIN_SOURCE = "https://github.com/Maykbiletti/AgentSpine";
|
|
507620
|
-
}));
|
|
507621
507513
|
/** Local host authentication only; request text never supplies credentials or endpoints. */
|
|
507622
507514
|
async function handleLocalAuthCommand(host, args) {
|
|
507623
507515
|
if (!isExperimentalFlagEnabled("local_auth") || host.session?.connectionKind === "gateway" || host.getChannelCommandContext?.()) {
|
|
@@ -526197,9 +526089,6 @@ async function handleBuiltInSlashCommand(host, name, args, invokedName = name) {
|
|
|
526197
526089
|
case "plugins":
|
|
526198
526090
|
await handlePluginsCommand(host, args);
|
|
526199
526091
|
return;
|
|
526200
|
-
case "agent-spine":
|
|
526201
|
-
await handleAgentSpineCommand(host);
|
|
526202
|
-
return;
|
|
526203
526092
|
case "telegram-access":
|
|
526204
526093
|
handleTelegramAccessCommand(host);
|
|
526205
526094
|
return;
|
|
@@ -526368,7 +526257,6 @@ var init_dispatch = __esmMin((() => {
|
|
|
526368
526257
|
init_blun_tui$1();
|
|
526369
526258
|
init_dance();
|
|
526370
526259
|
init_event_payload();
|
|
526371
|
-
init_agent_spine();
|
|
526372
526260
|
init_auth();
|
|
526373
526261
|
init_btw();
|
|
526374
526262
|
init_copy();
|
|
@@ -526411,7 +526299,6 @@ var init_commands = __esmMin((() => {
|
|
|
526411
526299
|
init_types$2();
|
|
526412
526300
|
init_dispatch();
|
|
526413
526301
|
init_auth();
|
|
526414
|
-
init_agent_spine();
|
|
526415
526302
|
init_btw();
|
|
526416
526303
|
init_config$1();
|
|
526417
526304
|
init_swarm();
|
|
@@ -544345,11 +544232,11 @@ function promptStartupWorkspaceChoice(host, currentPath, copy) {
|
|
|
544345
544232
|
};
|
|
544346
544233
|
host.mountEditorReplacement(new ChoicePickerComponent({
|
|
544347
544234
|
title: copy.choiceTitle,
|
|
544235
|
+
notice: currentPath,
|
|
544348
544236
|
options: [
|
|
544349
544237
|
{
|
|
544350
544238
|
value: "use",
|
|
544351
|
-
label: copy.useCurrent
|
|
544352
|
-
description: currentPath
|
|
544239
|
+
label: copy.useCurrent
|
|
544353
544240
|
},
|
|
544354
544241
|
{
|
|
544355
544242
|
value: "change",
|
|
@@ -545155,7 +545042,6 @@ BlunTUI = class {
|
|
|
545155
545042
|
pluginCommandMap = /* @__PURE__ */ new Map();
|
|
545156
545043
|
imageStore = new ImageAttachmentStore();
|
|
545157
545044
|
fdPath = detectFdPath();
|
|
545158
|
-
fdDownloadStarted = false;
|
|
545159
545045
|
mentionFileSearch = createRipgrepMentionSearch(detectMentionSearchPath());
|
|
545160
545046
|
sessionEventUnsubscribe;
|
|
545161
545047
|
cancelInFlight;
|
|
@@ -545444,13 +545330,12 @@ activeApprovalPanel;
|
|
|
545444
545330
|
}
|
|
545445
545331
|
async start() {
|
|
545446
545332
|
this.registerSignalHandlers();
|
|
545447
|
-
this.startupWorkspaceSelectionPending = this.gatewayStartup === void 0;
|
|
545333
|
+
this.startupWorkspaceSelectionPending = this.gatewayStartup === void 0 && this.options.startup.sessionFlag === void 0 && !this.options.startup.continueLast;
|
|
545448
545334
|
try {
|
|
545449
545335
|
const shouldReplayHistory = await this.initMainTui();
|
|
545450
545336
|
this.startEventLoop();
|
|
545451
545337
|
try {
|
|
545452
545338
|
await this.finishStartup(shouldReplayHistory);
|
|
545453
|
-
if (this.session !== void 0 || this.state.startupState === "picker") this.startBackgroundFdAutocomplete();
|
|
545454
545339
|
} catch (error) {
|
|
545455
545340
|
this.disposeTerminalTracking();
|
|
545456
545341
|
this.state.ui.stop();
|
|
@@ -545538,16 +545423,6 @@ activeApprovalPanel;
|
|
|
545538
545423
|
});
|
|
545539
545424
|
this.clipboardImageHintController.start();
|
|
545540
545425
|
}
|
|
545541
|
-
startBackgroundFdAutocomplete() {
|
|
545542
|
-
if (this.gatewayStartup) return;
|
|
545543
|
-
if (this.fdPath !== null || this.fdDownloadStarted) return;
|
|
545544
|
-
this.fdDownloadStarted = true;
|
|
545545
|
-
ensureFdPath().then((fdPath) => {
|
|
545546
|
-
if (fdPath === null) return;
|
|
545547
|
-
this.fdPath = fdPath;
|
|
545548
|
-
this.setupAutocomplete();
|
|
545549
|
-
}).catch(() => {});
|
|
545550
|
-
}
|
|
545551
545426
|
async refreshProviderModelsInBackground() {
|
|
545552
545427
|
try {
|
|
545553
545428
|
const result = await this.authFlow.refreshProviderModels();
|
|
@@ -546371,6 +546246,7 @@ activeApprovalPanel;
|
|
|
546371
546246
|
const stream = this.shellOutputStreams.get(event.commandId);
|
|
546372
546247
|
if (stream === void 0) return;
|
|
546373
546248
|
stream.taskId = event.taskId;
|
|
546249
|
+
toolLiveness642.yieldRequestedLocalShell(this, event.commandId, stream);
|
|
546374
546250
|
}
|
|
546375
546251
|
cancelRunningShellCommand() {
|
|
546376
546252
|
const session = this.session;
|
|
@@ -546399,7 +546275,11 @@ activeApprovalPanel;
|
|
|
546399
546275
|
finishShellOutput(commandId, stdout, stderr, isError, backgrounded) {
|
|
546400
546276
|
const stream = this.shellOutputStreams.get(commandId);
|
|
546401
546277
|
if (stream === void 0) return;
|
|
546402
|
-
if (backgrounded === true)
|
|
546278
|
+
if (backgrounded === true) {
|
|
546279
|
+
toolLiveness642.releaseLocalShell(this, commandId, stream,
|
|
546280
|
+
uiText("blunTui.detach.movedTranscript"));
|
|
546281
|
+
return;
|
|
546282
|
+
}
|
|
546403
546283
|
stream.component.finish(stdout, stderr, isError);
|
|
546404
546284
|
stream.entry.content = formatBashOutputForDisplay(stdout, stderr, isError);
|
|
546405
546285
|
this.shellOutputStreams.delete(commandId);
|
|
@@ -546439,7 +546319,7 @@ activeApprovalPanel;
|
|
|
546439
546319
|
if (this.session !== void 0 && (this.stoppedInputSession === this.session || this.stoppedInputScopes?.get(this.session, this.state.queuedMessages[0]?.agentId ?? this.interactiveAgentId) !== void 0)) return false;
|
|
546440
546320
|
if (this.activeInputDelivery?.has(this.state.queuedMessages[0])) return false;
|
|
546441
546321
|
if (this.hasPendingQueueCommandCancellation()) return false;
|
|
546442
|
-
if (this.state.appState.isCompacting || this.
|
|
546322
|
+
if (this.state.appState.isCompacting || this.shellOutputStreams.size > 0 || this.state.appState.streamingPhase === "shell") return false;
|
|
546443
546323
|
const item = this.state.queuedMessages[0];
|
|
546444
546324
|
if (this.isShuttingDown || this.queueCommandRunning || this.localShellConsentRequest !== void 0 || this.queueSteerInFlight !== void 0 || this.manualPromptInFlight !== void 0 || this.editorReplacementActive || this.deferUserMessages || this.session === void 0 || this.state.appState.model.trim().length === 0 || item?.mode !== "channel") return false;
|
|
546445
546325
|
const guard = this.pendingChannelReplyGuard;
|
|
@@ -546861,6 +546741,8 @@ releaseChannelQueueAtSafePoint() {
|
|
|
546861
546741
|
const inFlightCount = this.queueSteerInFlight?.items.length ?? 0;
|
|
546862
546742
|
this.queueFlushBatchRemaining = inFlightCount + this.state.queuedMessages.length;
|
|
546863
546743
|
if (this.manualPromptInFlight !== void 0) this.manualPromptInFlight.flushRequested = this.queueFlushBatchRemaining > 0;
|
|
546744
|
+
if (this.queueFlushBatchRemaining > 0 && this.state.appState.streamingPhase === "shell")
|
|
546745
|
+
toolLiveness642.yieldLocalShellsForInput(this, true);
|
|
546864
546746
|
this.steerQueueFlushPrefix();
|
|
546865
546747
|
this.scheduleQueueDrain();
|
|
546866
546748
|
}
|
|
@@ -549506,6 +549388,7 @@ releaseChannelQueueAtSafePoint() {
|
|
|
549506
549388
|
return this.state.livePane.mode;
|
|
549507
549389
|
}
|
|
549508
549390
|
updateQueueDisplay() {
|
|
549391
|
+
(this.queueDeliveryNudge642 ??= new toolLiveness642.QueueDeliveryNudge(this)).sync();
|
|
549509
549392
|
this.syncChannelQueueDeadline();
|
|
549510
549393
|
this.state.queueContainer.clear();
|
|
549511
549394
|
const queued = [...this.queueSteerInFlight?.items ?? [], ...this.state.queuedMessages];
|
|
@@ -549572,9 +549455,8 @@ releaseChannelQueueAtSafePoint() {
|
|
|
549572
549455
|
this.showError(uiText("blunTui.detach.moveFailed", { error: formatErrorMessage$2(error) }));
|
|
549573
549456
|
return;
|
|
549574
549457
|
}
|
|
549575
|
-
|
|
549576
|
-
|
|
549577
|
-
this.shellOutputStreams.delete(commandId);
|
|
549458
|
+
toolLiveness642.releaseLocalShell(this, commandId, stream,
|
|
549459
|
+
uiText("blunTui.detach.movedTranscript"));
|
|
549578
549460
|
this.showDetachHint(uiText("blunTui.detach.movedView"));
|
|
549579
549461
|
}
|
|
549580
549462
|
async detachCurrentForegroundTask() {
|
|
@@ -561063,6 +560945,9 @@ function createProgram(version, onMain, onPluginNodeRunner = () => {}, onUpgrade
|
|
|
561063
560945
|
registerVisCommand(program);
|
|
561064
560946
|
registerSetupCommand(program, version);
|
|
561065
560947
|
registerBundledDocsCommand(program, version);
|
|
560948
|
+
program.command("fd-download").action(async () => {
|
|
560949
|
+
if (await ensureFdPath() === null) process.exitCode = 1;
|
|
560950
|
+
});
|
|
561066
560951
|
program.command("upgrade").alias("update").description("Upgrade BLUN to the latest version.").action(async () => {
|
|
561067
560952
|
await onUpgrade();
|
|
561068
560953
|
});
|