@songsid/agend 2.3.2-beta.1 → 2.3.2-beta.11
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/THIRD_PARTY_NOTICES.md +40 -0
- package/dist/agent-cli.js +69 -2
- package/dist/agent-cli.js.map +1 -1
- package/dist/agent-endpoint.js +11 -0
- package/dist/agent-endpoint.js.map +1 -1
- package/dist/agent-whats-new.js +3 -0
- package/dist/agent-whats-new.js.map +1 -1
- package/dist/antigravity-usage-scan.d.ts +58 -0
- package/dist/antigravity-usage-scan.js +257 -0
- package/dist/antigravity-usage-scan.js.map +1 -0
- package/dist/antigravity-usage-worker.d.ts +1 -0
- package/dist/antigravity-usage-worker.js +10 -0
- package/dist/antigravity-usage-worker.js.map +1 -0
- package/dist/auth-api.js +4 -0
- package/dist/auth-api.js.map +1 -1
- package/dist/backend/kiro-classic-archive.d.ts +52 -0
- package/dist/backend/kiro-classic-archive.js +444 -0
- package/dist/backend/kiro-classic-archive.js.map +1 -0
- package/dist/backend/kiro-identity.d.ts +83 -0
- package/dist/backend/kiro-identity.js +144 -0
- package/dist/backend/kiro-identity.js.map +1 -1
- package/dist/backend/kiro-migration-verify.d.ts +10 -0
- package/dist/backend/kiro-migration-verify.js +52 -0
- package/dist/backend/kiro-migration-verify.js.map +1 -0
- package/dist/backend/kiro-retired-model.d.ts +62 -0
- package/dist/backend/kiro-retired-model.js +160 -0
- package/dist/backend/kiro-retired-model.js.map +1 -0
- package/dist/backend/kiro-v2-store-worker.js +21 -1
- package/dist/backend/kiro-v2-store-worker.js.map +1 -1
- package/dist/backend/kiro-v2-store.d.ts +8 -0
- package/dist/backend/kiro-v2-store.js.map +1 -1
- package/dist/backend/kiro.d.ts +169 -2
- package/dist/backend/kiro.js +703 -28
- package/dist/backend/kiro.js.map +1 -1
- package/dist/backend/types.d.ts +108 -0
- package/dist/backend/types.js +9 -0
- package/dist/backend/types.js.map +1 -1
- package/dist/backend-signin-guide.d.ts +1 -0
- package/dist/backend-signin-guide.js +9 -0
- package/dist/backend-signin-guide.js.map +1 -0
- package/dist/backend-signin-pending.d.ts +10 -0
- package/dist/backend-signin-pending.js +44 -0
- package/dist/backend-signin-pending.js.map +1 -0
- package/dist/browser-backend-signins.d.ts +56 -0
- package/dist/browser-backend-signins.js +189 -0
- package/dist/browser-backend-signins.js.map +1 -0
- package/dist/cache-ledger.d.ts +38 -2
- package/dist/cache-ledger.js +133 -8
- package/dist/cache-ledger.js.map +1 -1
- package/dist/cache-prices.d.ts +2 -1
- package/dist/cache-prices.js +5 -2
- package/dist/cache-prices.js.map +1 -1
- package/dist/cache-service.d.ts +68 -0
- package/dist/cache-service.js +355 -13
- package/dist/cache-service.js.map +1 -1
- package/dist/channel/adapters/discord.d.ts +11 -0
- package/dist/channel/adapters/discord.js +71 -14
- package/dist/channel/adapters/discord.js.map +1 -1
- package/dist/channel/ipc-timeouts.js +3 -0
- package/dist/channel/ipc-timeouts.js.map +1 -1
- package/dist/channel/mcp-tools.js +41 -2
- package/dist/channel/mcp-tools.js.map +1 -1
- package/dist/channel/tool-router.js +2 -1
- package/dist/channel/tool-router.js.map +1 -1
- package/dist/classic-channel-manager.d.ts +11 -0
- package/dist/classic-channel-manager.js +39 -1
- package/dist/classic-channel-manager.js.map +1 -1
- package/dist/cli.js +54 -2
- package/dist/cli.js.map +1 -1
- package/dist/config-validator.d.ts +7 -1
- package/dist/config-validator.js +55 -10
- package/dist/config-validator.js.map +1 -1
- package/dist/config.d.ts +19 -0
- package/dist/config.js +33 -1
- package/dist/config.js.map +1 -1
- package/dist/cpu-quota.d.ts +23 -0
- package/dist/cpu-quota.js +86 -0
- package/dist/cpu-quota.js.map +1 -0
- package/dist/daemon.d.ts +68 -0
- package/dist/daemon.js +448 -26
- package/dist/daemon.js.map +1 -1
- package/dist/dashboard-permissions.d.ts +31 -6
- package/dist/dashboard-permissions.js +84 -9
- package/dist/dashboard-permissions.js.map +1 -1
- package/dist/doctor.js +2 -1
- package/dist/doctor.js.map +1 -1
- package/dist/fleet-control-audit.d.ts +1 -1
- package/dist/fleet-control-audit.js +3 -0
- package/dist/fleet-control-audit.js.map +1 -1
- package/dist/fleet-manager.d.ts +133 -2
- package/dist/fleet-manager.js +905 -94
- package/dist/fleet-manager.js.map +1 -1
- package/dist/forged-envelope-scan.d.ts +9 -0
- package/dist/forged-envelope-scan.js +30 -5
- package/dist/forged-envelope-scan.js.map +1 -1
- package/dist/general-knowledge/skills/credential-profiles/SKILL.md +5 -2
- package/dist/general-knowledge/skills/kiro-engine-migration/SKILL.md +24 -1
- package/dist/general-knowledge/skills/web-appearance/SKILL.canvas-worker-off.md +49 -1
- package/dist/general-knowledge/skills/web-appearance/SKILL.md +49 -1
- package/dist/general-knowledge/skills/web-dashboard/SKILL.canvas-worker-off.md +47 -9
- package/dist/general-knowledge/skills/web-dashboard/SKILL.md +54 -11
- package/dist/instance-config-impact.js +10 -5
- package/dist/instance-config-impact.js.map +1 -1
- package/dist/instance-lifecycle.d.ts +23 -0
- package/dist/instance-lifecycle.js +62 -12
- package/dist/instance-lifecycle.js.map +1 -1
- package/dist/kiro-db-reader.d.ts +5 -0
- package/dist/kiro-db-reader.js +18 -0
- package/dist/kiro-db-reader.js.map +1 -1
- package/dist/kiro-engine-status.d.ts +2 -0
- package/dist/kiro-engine-status.js +9 -0
- package/dist/kiro-engine-status.js.map +1 -1
- package/dist/kiro-migrate.d.ts +60 -0
- package/dist/kiro-migrate.js +160 -0
- package/dist/kiro-migrate.js.map +1 -0
- package/dist/kiro-session-proof.d.ts +41 -0
- package/dist/kiro-session-proof.js +89 -0
- package/dist/kiro-session-proof.js.map +1 -0
- package/dist/kiro-transcript-lane.d.ts +2 -0
- package/dist/kiro-transcript-lane.js.map +1 -1
- package/dist/kiro-transcript-worker.js +1 -0
- package/dist/kiro-transcript-worker.js.map +1 -1
- package/dist/kiro-tui-forensic.d.ts +12 -0
- package/dist/kiro-tui-forensic.js +110 -0
- package/dist/kiro-tui-forensic.js.map +1 -0
- package/dist/kiro-usage-run.d.ts +7 -0
- package/dist/kiro-usage-run.js +39 -0
- package/dist/kiro-usage-run.js.map +1 -0
- package/dist/kiro-usage-scan.d.ts +49 -0
- package/dist/kiro-usage-scan.js +223 -0
- package/dist/kiro-usage-scan.js.map +1 -0
- package/dist/kiro-usage-worker.d.ts +1 -0
- package/dist/kiro-usage-worker.js +10 -0
- package/dist/kiro-usage-worker.js.map +1 -0
- package/dist/kiro-usage.d.ts +58 -0
- package/dist/kiro-usage.js +310 -0
- package/dist/kiro-usage.js.map +1 -0
- package/dist/locale.js +230 -8
- package/dist/locale.js.map +1 -1
- package/dist/log-service.js +1 -1
- package/dist/log-service.js.map +1 -1
- package/dist/login-url.d.ts +4 -0
- package/dist/login-url.js +22 -0
- package/dist/login-url.js.map +1 -0
- package/dist/needs-you-hub.d.ts +2 -1
- package/dist/needs-you-hub.js +1 -1
- package/dist/needs-you-hub.js.map +1 -1
- package/dist/needs-you.d.ts +10 -2
- package/dist/needs-you.js +10 -2
- package/dist/needs-you.js.map +1 -1
- package/dist/notice-delivery.d.ts +16 -0
- package/dist/notice-delivery.js +35 -0
- package/dist/notice-delivery.js.map +1 -0
- package/dist/office-share-page.d.ts +16 -0
- package/dist/office-share-page.js +85 -0
- package/dist/office-share-page.js.map +1 -0
- package/dist/office-share-service.d.ts +91 -0
- package/dist/office-share-service.js +176 -0
- package/dist/office-share-service.js.map +1 -0
- package/dist/office-share.d.ts +268 -0
- package/dist/office-share.js +574 -0
- package/dist/office-share.js.map +1 -0
- package/dist/opencode-usage-scan.d.ts +28 -0
- package/dist/opencode-usage-scan.js +92 -0
- package/dist/opencode-usage-scan.js.map +1 -0
- package/dist/opencode-usage-worker.d.ts +1 -0
- package/dist/opencode-usage-worker.js +10 -0
- package/dist/opencode-usage-worker.js.map +1 -0
- package/dist/outbound-handlers.js +22 -2
- package/dist/outbound-handlers.js.map +1 -1
- package/dist/outbound-schemas.d.ts +65 -2
- package/dist/outbound-schemas.js +56 -2
- package/dist/outbound-schemas.js.map +1 -1
- package/dist/public-web-gateway.js +7 -1
- package/dist/public-web-gateway.js.map +1 -1
- package/dist/quickstart-api.js +13 -2
- package/dist/quickstart-api.js.map +1 -1
- package/dist/quickstart.js +2 -1
- package/dist/quickstart.js.map +1 -1
- package/dist/remote-card-answer.d.ts +83 -0
- package/dist/remote-card-answer.js +208 -0
- package/dist/remote-card-answer.js.map +1 -0
- package/dist/remote-card-prompt.d.ts +38 -0
- package/dist/remote-card-prompt.js +86 -0
- package/dist/remote-card-prompt.js.map +1 -0
- package/dist/reply-triggers.d.ts +2 -0
- package/dist/reply-triggers.js +3 -0
- package/dist/reply-triggers.js.map +1 -0
- package/dist/settings-api.d.ts +2 -0
- package/dist/settings-api.js +41 -16
- package/dist/settings-api.js.map +1 -1
- package/dist/settings-change.js +20 -14
- package/dist/settings-change.js.map +1 -1
- package/dist/settings-effect.js +7 -1
- package/dist/settings-effect.js.map +1 -1
- package/dist/settings-instance-patch.js +4 -1
- package/dist/settings-instance-patch.js.map +1 -1
- package/dist/setup-form.d.ts +1 -1
- package/dist/setup-form.js +55 -6
- package/dist/setup-form.js.map +1 -1
- package/dist/setup-host.d.ts +9 -0
- package/dist/setup-host.js +127 -6
- package/dist/setup-host.js.map +1 -1
- package/dist/setup-signin-assets.d.ts +2 -0
- package/dist/setup-signin-assets.js +6 -0
- package/dist/setup-signin-assets.js.map +1 -0
- package/dist/setup-wizard.js +2 -0
- package/dist/setup-wizard.js.map +1 -1
- package/dist/structured-signin-transport.d.ts +8 -0
- package/dist/structured-signin-transport.js +79 -0
- package/dist/structured-signin-transport.js.map +1 -0
- package/dist/structured-signin.d.ts +131 -0
- package/dist/structured-signin.js +388 -0
- package/dist/structured-signin.js.map +1 -0
- package/dist/tool-permissions.js +29 -0
- package/dist/tool-permissions.js.map +1 -1
- package/dist/topic-commands.js +6 -2
- package/dist/topic-commands.js.map +1 -1
- package/dist/transcript-sources.d.ts +27 -2
- package/dist/transcript-sources.js +104 -40
- package/dist/transcript-sources.js.map +1 -1
- package/dist/turn-reply-guard.d.ts +1 -1
- package/dist/turn-reply-guard.js +1 -1
- package/dist/turn-reply-guard.js.map +1 -1
- package/dist/types.d.ts +33 -8
- package/dist/ui/backend-signin.js +63 -10
- package/dist/ui/chat-store.js +3 -2
- package/dist/ui/chat-strings.js +4 -4
- package/dist/ui/fleet-office-editor.js +68 -11
- package/dist/ui/fleet-office-layout.js +110 -35
- package/dist/ui/fleet-office-model.js +6 -3
- package/dist/ui/fleet-office-overview.js +167 -0
- package/dist/ui/fleet-office-pack.d.ts +13 -3
- package/dist/ui/fleet-office-pack.js +214 -24
- package/dist/ui/fleet-office-skin.js +98 -23
- package/dist/ui/fleet-office-store.js +82 -5
- package/dist/ui/fleet-office-view.js +5 -4
- package/dist/ui/fleet-office-zones.js +232 -21
- package/dist/ui/fleet-office.js +549 -186
- package/dist/ui/fleet-usage.js +19 -15
- package/dist/ui/office-share-dialog.js +145 -0
- package/dist/ui/office-share-page.js +164 -0
- package/dist/ui/panel-chat.js +22 -3
- package/dist/ui/panel-log.js +4 -4
- package/dist/ui/panel-needs.js +5 -5
- package/dist/ui/panel-settings.js +38 -12
- package/dist/ui/settings-dialogs.js +8 -1
- package/dist/ui/settings-guests.js +17 -7
- package/dist/ui/settings-model.js +22 -6
- package/dist/ui/settings-registry.js +4 -0
- package/dist/ui/settings-strings.js +18 -2
- package/dist/ui/shared/app-i18n.js +4 -2
- package/dist/ui/shared/app-shell.js +14 -6
- package/dist/ui/shared/app-stream.js +2 -1
- package/dist/ui/shared/app.css +85 -4
- package/dist/ui/shared/office/cozy.png +0 -0
- package/dist/ui/shared/side-panel.js +95 -0
- package/dist/ui/structured-signin.js +115 -0
- package/dist/usage-report.d.ts +20 -0
- package/dist/usage-report.js +54 -17
- package/dist/usage-report.js.map +1 -1
- package/dist/usage-rollup.d.ts +9 -1
- package/dist/usage-rollup.js +20 -4
- package/dist/usage-rollup.js.map +1 -1
- package/dist/web-api.d.ts +23 -1
- package/dist/web-api.js +292 -3
- package/dist/web-api.js.map +1 -1
- package/dist/web-auth.js +1 -1
- package/dist/web-auth.js.map +1 -1
- package/dist/web-backend-login.d.ts +1 -7
- package/dist/web-backend-login.js +2 -24
- package/dist/web-backend-login.js.map +1 -1
- package/dist/web-office-acts.d.ts +173 -0
- package/dist/web-office-acts.js +285 -0
- package/dist/web-office-acts.js.map +1 -0
- package/dist/web-office-pack-read.d.ts +35 -0
- package/dist/web-office-pack-read.js +252 -0
- package/dist/web-office-pack-read.js.map +1 -0
- package/dist/web-office-pack-tools.d.ts +232 -0
- package/dist/web-office-pack-tools.js +754 -0
- package/dist/web-office-pack-tools.js.map +1 -0
- package/dist/web-office-skins.d.ts +71 -6
- package/dist/web-office-skins.js +321 -35
- package/dist/web-office-skins.js.map +1 -1
- package/dist/web-office-store.d.ts +5 -2
- package/dist/web-office-store.js +69 -10
- package/dist/web-office-store.js.map +1 -1
- package/dist/web-settings-patch.d.ts +2 -1
- package/dist/web-settings-patch.js +4 -1
- package/dist/web-settings-patch.js.map +1 -1
- package/dist/working-recovery.d.ts +2 -2
- package/dist/working-recovery.js +43 -8
- package/dist/working-recovery.js.map +1 -1
- package/dist/working-state-journal.d.ts +2 -0
- package/dist/working-state-journal.js +16 -1
- package/dist/working-state-journal.js.map +1 -1
- package/package.json +3 -2
- package/templates/windows-shortcuts.ps1 +155 -140
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
import { availableParallelism, platform } from "node:os";
|
|
3
|
+
const defaultDeps = {
|
|
4
|
+
platform: platform(),
|
|
5
|
+
availableParallelism,
|
|
6
|
+
readFile: (path) => readFileSync(path, "utf8"),
|
|
7
|
+
};
|
|
8
|
+
export function effectiveCpuCount(deps = defaultDeps) {
|
|
9
|
+
const parallelism = Math.max(1, Math.floor(deps.availableParallelism()) || 1);
|
|
10
|
+
if (deps.platform !== "linux")
|
|
11
|
+
return parallelism;
|
|
12
|
+
const quota = cgroupCpuQuota(deps);
|
|
13
|
+
return quota == null ? parallelism : Math.max(1, Math.min(parallelism, Math.ceil(quota)));
|
|
14
|
+
}
|
|
15
|
+
/** The tightest CFS quota on this process, in CPUs; null when unlimited or unreadable. */
|
|
16
|
+
export function cgroupCpuQuota(deps) {
|
|
17
|
+
let selfCgroup;
|
|
18
|
+
try {
|
|
19
|
+
selfCgroup = deps.readFile("/proc/self/cgroup");
|
|
20
|
+
}
|
|
21
|
+
catch {
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
const lines = selfCgroup.split("\n");
|
|
25
|
+
const v2 = lines.find(l => l.startsWith("0::"));
|
|
26
|
+
if (v2) {
|
|
27
|
+
const fromV2 = v2Quota(deps, v2.slice(3).trim());
|
|
28
|
+
if (fromV2 != null)
|
|
29
|
+
return fromV2;
|
|
30
|
+
}
|
|
31
|
+
// Hybrid hosts list both; a v1 cpu controller line is "N:cpu,cpuacct:/path" (any order).
|
|
32
|
+
const v1 = lines.map(l => l.split(":")).find(p => p.length >= 3 && p[1].split(",").includes("cpu"));
|
|
33
|
+
return v1 ? v1Quota(deps, v1.slice(2).join(":").trim()) : null;
|
|
34
|
+
}
|
|
35
|
+
/** A cgroup's own quota says nothing about its parents': check every level up to the mount. */
|
|
36
|
+
function ancestry(base, path) {
|
|
37
|
+
const segments = path.split("/").filter(Boolean);
|
|
38
|
+
// A path outside our cgroup namespace ("/../..") does not exist under our mount: only the mount root applies.
|
|
39
|
+
if (segments.includes(".."))
|
|
40
|
+
return [base];
|
|
41
|
+
const dirs = [];
|
|
42
|
+
for (let i = segments.length; i >= 0; i--)
|
|
43
|
+
dirs.push([base, ...segments.slice(0, i)].join("/"));
|
|
44
|
+
return dirs;
|
|
45
|
+
}
|
|
46
|
+
function v2Quota(deps, path) {
|
|
47
|
+
let tightest = null;
|
|
48
|
+
for (const dir of ancestry("/sys/fs/cgroup", path)) {
|
|
49
|
+
let text;
|
|
50
|
+
try {
|
|
51
|
+
text = deps.readFile(`${dir}/cpu.max`);
|
|
52
|
+
}
|
|
53
|
+
catch {
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
const match = /^(\d+|max)\s+(\d+)\s*$/.exec(text.trim());
|
|
57
|
+
if (!match || match[1] === "max")
|
|
58
|
+
continue;
|
|
59
|
+
const cpus = Number(match[1]) / Number(match[2]);
|
|
60
|
+
if (Number.isFinite(cpus) && cpus > 0 && (tightest == null || cpus < tightest))
|
|
61
|
+
tightest = cpus;
|
|
62
|
+
}
|
|
63
|
+
return tightest;
|
|
64
|
+
}
|
|
65
|
+
function v1Quota(deps, path) {
|
|
66
|
+
let tightest = null;
|
|
67
|
+
for (const mount of ["/sys/fs/cgroup/cpu", "/sys/fs/cgroup/cpu,cpuacct"]) {
|
|
68
|
+
for (const dir of ancestry(mount, path)) {
|
|
69
|
+
let quota, period;
|
|
70
|
+
try {
|
|
71
|
+
quota = Number(deps.readFile(`${dir}/cpu.cfs_quota_us`).trim());
|
|
72
|
+
period = Number(deps.readFile(`${dir}/cpu.cfs_period_us`).trim());
|
|
73
|
+
}
|
|
74
|
+
catch {
|
|
75
|
+
continue;
|
|
76
|
+
}
|
|
77
|
+
if (!Number.isFinite(quota) || !Number.isFinite(period) || quota <= 0 || period <= 0)
|
|
78
|
+
continue; // -1 = unlimited
|
|
79
|
+
const cpus = quota / period;
|
|
80
|
+
if (tightest == null || cpus < tightest)
|
|
81
|
+
tightest = cpus;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return tightest;
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=cpu-quota.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cpu-quota.js","sourceRoot":"","sources":["../src/cpu-quota.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAuBzD,MAAM,WAAW,GAAiB;IAChC,QA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AAC,CAAC;YACpE,CAAC;YAAC,MAAM,CAAC;gBAAC,SAAS;YAAC,CAAC;YACrB,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,MAAM,IAAI,CAAC;gBAAE,SAAS,CAAC,iBAAiB;YACjH,MAAM,IAAI,GAAG,KAAK,GAAG,MAAM,CAAC;YAC5B,IAAI,QAAQ,IAAI,IAAI,IAAI,IAAI,GAAG,QAAQ;gBAAE,QAAQ,GAAG,IAAI,CAAC;QAC3D,CAAC;IACH,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
package/dist/daemon.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ import { type PauseReason } from "./pause-marker.js";
|
|
|
8
8
|
import { MessageBus } from "./channel/message-bus.js";
|
|
9
9
|
import type { CliBackend, ErrorPattern, InstanceState, InstanceStateSnapshot } from "./backend/types.js";
|
|
10
10
|
import { HangDetector } from "./hang-detector.js";
|
|
11
|
+
import { type RemoteCardAction, type RemoteCardOutcome } from "./remote-card-answer.js";
|
|
11
12
|
import type { TmuxControlClient } from "./tmux-control.js";
|
|
12
13
|
import type { FleetInstructionsParams } from "./instructions.js";
|
|
13
14
|
import type { SpawnGate } from "./spawn-gate.js";
|
|
@@ -460,6 +461,13 @@ export declare class Daemon extends EventEmitter {
|
|
|
460
461
|
logTranscriptPath(): string | null;
|
|
461
462
|
/** #1218 (kiro): the launch this daemon's backend last built, for the Log's reason only (kiro-log-gate.ts). */
|
|
462
463
|
logLaunch(): KiroLogLaunch | null;
|
|
464
|
+
kiroMigrationIdle(): Promise<boolean>;
|
|
465
|
+
/** One read-only migration observation. Never types into a pane or selects a picker. */
|
|
466
|
+
kiroMigrationObservation(): Promise<{
|
|
467
|
+
sessionId: string;
|
|
468
|
+
model: string;
|
|
469
|
+
transcript: string;
|
|
470
|
+
} | null>;
|
|
463
471
|
private guardian;
|
|
464
472
|
private adapter;
|
|
465
473
|
private pendingIpcRequests;
|
|
@@ -553,6 +561,12 @@ export declare class Daemon extends EventEmitter {
|
|
|
553
561
|
private dialogParkedKey;
|
|
554
562
|
private dialogParkedInteractionEpisode;
|
|
555
563
|
private dialogParkedReported;
|
|
564
|
+
/** #2675: the card on screen that a person can answer from the chat — what it asks, since when, and whether it was posted. */
|
|
565
|
+
private remoteCardShown;
|
|
566
|
+
/** #2675: when (performance.now, taken before its capture) the newest read the card tracker used was started. */
|
|
567
|
+
private remoteCardReadAt;
|
|
568
|
+
/** #2675: an answer from the chat is being keyed in (one at a time). */
|
|
569
|
+
private remoteCardAnswering;
|
|
556
570
|
/**
|
|
557
571
|
* #1691: the prompt at the bottom of the pane that no backend table knows — its block, since when (performance.now)
|
|
558
572
|
* it has been unchanged, and whether that has lasted UNRECOGNISED_PROMPT_STABLE_MS. Updated by the runtime scan.
|
|
@@ -935,6 +949,8 @@ export declare class Daemon extends EventEmitter {
|
|
|
935
949
|
private lastDetectedErrorType;
|
|
936
950
|
private static errorPatternKey;
|
|
937
951
|
/** Read the occurrence baseline so a lifecycle-owned restart can carry it forward. */
|
|
952
|
+
/** #2648: kiro only — what a model error on the current launch should do (see kiro-retired-model.ts). */
|
|
953
|
+
kiroModelError(): import("./backend/kiro-retired-model.js").KiroModelErrorVerdict | null;
|
|
938
954
|
getErrorPatternOccurrenceCount(type: ErrorPattern["type"], pattern: RegExp): number;
|
|
939
955
|
/** Seed a replacement daemon with an already-reported pattern count. */
|
|
940
956
|
seedErrorPatternOccurrenceCount(type: ErrorPattern["type"], pattern: RegExp, count: number): void;
|
|
@@ -1781,6 +1797,22 @@ export declare class Daemon extends EventEmitter {
|
|
|
1781
1797
|
* dialog's static description and a count, never the pane: a pane can hold anything the agent printed.
|
|
1782
1798
|
*/
|
|
1783
1799
|
private noteDialogAnswer;
|
|
1800
|
+
/**
|
|
1801
|
+
* #2675: a held card a person can answer from the chat (the dialog's remoteCard reader) is posted once it has stayed
|
|
1802
|
+
* the same card for REMOTE_CARD_STABLE_MS — `remote_card` with what it asks; the fleet posts it with its buttons. When
|
|
1803
|
+
* it closes or another card replaces it, `remote_card_gone` retires that post. Moving through the card (ours or the
|
|
1804
|
+
* person's in the pane) is the same card: its identity has no cursor. `readAt` is when the pane's capture was started
|
|
1805
|
+
* (performance.now): a read that started before the newest one used here finishes late and says nothing about now —
|
|
1806
|
+
* it may neither retire a newer card nor bring an older one back (#2677 review).
|
|
1807
|
+
*/
|
|
1808
|
+
private trackRemoteCard;
|
|
1809
|
+
/** #2675: the card's post was used up without answering it (refused, stopped part-way): post it again once it holds still. */
|
|
1810
|
+
repostRemoteCard(): void;
|
|
1811
|
+
/**
|
|
1812
|
+
* #2675: answer the card on screen from the chat, as the person chose: only while it is the card they saw
|
|
1813
|
+
* (`identity`), on a verified cursor, under the pane write lock (remote-card-answer.ts). Never logs the answer.
|
|
1814
|
+
*/
|
|
1815
|
+
answerRemoteCard(identity: string, action: RemoteCardAction): Promise<RemoteCardOutcome>;
|
|
1784
1816
|
/**
|
|
1785
1817
|
* Remember how long a blocking dialog has been on screen. Once it has
|
|
1786
1818
|
* outlived DIALOG_PARKED_NOTIFY_MS — the auto-dismiss did not take, or the
|
|
@@ -1820,8 +1852,26 @@ export declare class Daemon extends EventEmitter {
|
|
|
1820
1852
|
* while a fresh capture reads its composer as "steer" — or "idle" once the turn has ended (`allowIdle`, the pre-write
|
|
1821
1853
|
* re-check). "queue" (the user's choice), text in the box, or a screen it cannot read: not now — the caller waits for
|
|
1822
1854
|
* the idle prompt as for any message. AgEnD never switches the mode. Backends without the reader are not asked.
|
|
1855
|
+
* #2676: an ordinary message (`steerOnly` false) goes in on "queue" too — kiro takes it into the same tray either way,
|
|
1856
|
+
* held for the turn's end instead of steered into it.
|
|
1823
1857
|
*/
|
|
1824
1858
|
private steerComposerAdmits;
|
|
1859
|
+
/** #2682: a busy composer's typed input reaches the CLI's own turn (busyTurnTakesInput); an idle box, or no reader: yes. */
|
|
1860
|
+
private busyInputReachesTurn;
|
|
1861
|
+
/**
|
|
1862
|
+
* #2676: whether an ordinary message may be typed into this CLI's busy composer — a mode-switched one (kiro TUI) on a
|
|
1863
|
+
* launch whose busy composer AgEnD drives (the same evidence as a steer: KIRO_STEER_VERIFIED). The legacy UI, an
|
|
1864
|
+
* unlisted version and every backend without the reader answer false; claude and codex hand off by
|
|
1865
|
+
* supportsQueuedInput instead.
|
|
1866
|
+
*/
|
|
1867
|
+
private composerTakesBusyInput;
|
|
1868
|
+
/**
|
|
1869
|
+
* #2676: whether the box can show this payload as this delivery's paste before the Enter (steerPasteIsOurs): its
|
|
1870
|
+
* first line, or a collapsed paste's line count. A one-line payload kiro would collapse (over 500 characters) shows only
|
|
1871
|
+
* a character count, which kiro's own normalisation (tabs widened) makes no proof: it waits for the idle prompt.
|
|
1872
|
+
* kiro measures after widening each tab to its 2-column stop, so a tab is counted as 2 here (at most what it becomes).
|
|
1873
|
+
*/
|
|
1874
|
+
private composerCanShowPaste;
|
|
1825
1875
|
/**
|
|
1826
1876
|
* #1405: one look at a mode-switched composer for a steer's own proof: on the tmux of this write, inside `deadline`
|
|
1827
1877
|
* (monotonic) — the capture is raced against the time left and a late answer dropped — and `current` asked after the
|
|
@@ -2274,6 +2324,24 @@ export declare class Daemon extends EventEmitter {
|
|
|
2274
2324
|
* silently, confirming and removing nothing. Never throws into the spawn.
|
|
2275
2325
|
*/
|
|
2276
2326
|
private ensureBackendAgent;
|
|
2327
|
+
/**
|
|
2328
|
+
* M-2025: after a tui/V3 launch is ready, type `/session-id` and `/title` once
|
|
2329
|
+
* each, under the pane-write lock, with the same fences as {@link ensureBackendAgent}.
|
|
2330
|
+
* Does not touch the delivery epoch. A mismatch with the #2617 pin is surfaced;
|
|
2331
|
+
* the pin is never replaced by a file-store guess. Legacy backends return null
|
|
2332
|
+
* from sessionProof().
|
|
2333
|
+
*
|
|
2334
|
+
* #2683: these are AgEnD's own housekeeping, so unlike a delivery (which may join
|
|
2335
|
+
* a person's draft) each one goes only into a composer the final capture shows
|
|
2336
|
+
* positively EMPTY; Enter only once a capture shows exactly the command in the box;
|
|
2337
|
+
* and it counts as run only once the box is empty again — a command left in the
|
|
2338
|
+
* box stops here (it is taken back when the box shows exactly it), and nothing
|
|
2339
|
+
* else is typed after it. The id is taken only from kiro's `/session-id` alert
|
|
2340
|
+
* (readSessionIdAlert) on a capture after the command ran, and never when that
|
|
2341
|
+
* alert was already on the final capture before it was typed: an announcement
|
|
2342
|
+
* that was there before is not an answer to this request.
|
|
2343
|
+
*/
|
|
2344
|
+
private ensureKiroSessionProof;
|
|
2277
2345
|
/**
|
|
2278
2346
|
* Startup budget for this launch: the backend's override (resume-aware), never
|
|
2279
2347
|
* below a user-configured startup_timeout_ms; undefined = trySpawn's default.
|