@songsid/agend 2.3.1 → 2.3.2-beta.10
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 +21 -2
- package/dist/agent-cli.js.map +1 -1
- package/dist/agent-endpoint.js +5 -0
- package/dist/agent-endpoint.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/authority/authority-state.d.ts +4 -0
- package/dist/authority/authority-state.js +16 -10
- package/dist/authority/authority-state.js.map +1 -1
- package/dist/authority/session-authorizations.d.ts +7 -1
- package/dist/authority/session-authorizations.js +6 -4
- package/dist/authority/session-authorizations.js.map +1 -1
- package/dist/authority/web-authority.d.ts +19 -6
- package/dist/authority/web-authority.js +22 -8
- package/dist/authority/web-authority.js.map +1 -1
- package/dist/backend/kiro-identity.d.ts +64 -0
- package/dist/backend/kiro-identity.js +101 -0
- package/dist/backend/kiro-identity.js.map +1 -1
- 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.d.ts +71 -2
- package/dist/backend/kiro.js +352 -11
- package/dist/backend/kiro.js.map +1 -1
- package/dist/backend/types.d.ts +59 -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 +13 -0
- package/dist/channel/adapters/discord.js +103 -16
- package/dist/channel/adapters/discord.js.map +1 -1
- package/dist/channel/mcp-tools.js +34 -7
- 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/channel/types.d.ts +11 -0
- 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 +21 -2
- package/dist/cli.js.map +1 -1
- package/dist/config-validator.d.ts +7 -1
- package/dist/config-validator.js +92 -12
- package/dist/config-validator.js.map +1 -1
- package/dist/config.d.ts +19 -0
- package/dist/config.js +31 -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 +57 -3
- package/dist/daemon.js +330 -50
- package/dist/daemon.js.map +1 -1
- package/dist/dashboard-permissions.d.ts +20 -6
- package/dist/dashboard-permissions.js +58 -9
- package/dist/dashboard-permissions.js.map +1 -1
- package/dist/delivery-outbox.d.ts +12 -1
- package/dist/delivery-outbox.js +67 -15
- package/dist/delivery-outbox.js.map +1 -1
- package/dist/doctor.d.ts +3 -0
- package/dist/doctor.js +11 -1
- package/dist/doctor.js.map +1 -1
- package/dist/event-log.d.ts +5 -0
- package/dist/event-log.js +13 -0
- package/dist/event-log.js.map +1 -1
- package/dist/fleet-manager.d.ts +212 -0
- package/dist/fleet-manager.js +914 -111
- package/dist/fleet-manager.js.map +1 -1
- package/dist/fleet-process-handlers.d.ts +1 -0
- package/dist/fleet-process-handlers.js +9 -1
- package/dist/fleet-process-handlers.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 +14 -1
- package/dist/general-knowledge/skills/web-appearance/SKILL.canvas-worker-off.md +28 -5
- package/dist/general-knowledge/skills/web-appearance/SKILL.md +31 -8
- package/dist/general-knowledge/skills/web-dashboard/SKILL.canvas-worker-off.md +138 -59
- package/dist/general-knowledge/skills/web-dashboard/SKILL.md +145 -61
- package/dist/guest-seen-people.d.ts +38 -0
- package/dist/guest-seen-people.js +78 -0
- package/dist/guest-seen-people.js.map +1 -0
- package/dist/instance-config-impact.js +14 -6
- package/dist/instance-config-impact.js.map +1 -1
- package/dist/instance-lifecycle.d.ts +20 -0
- package/dist/instance-lifecycle.js +71 -13
- 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 +49 -0
- package/dist/kiro-migrate.js +105 -0
- package/dist/kiro-migrate.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 +7 -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 +120 -12
- 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/mac-auto-restore.d.ts +117 -0
- package/dist/mac-auto-restore.js +294 -0
- package/dist/mac-auto-restore.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 +8 -2
- package/dist/needs-you.js +6 -0
- 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 +258 -0
- package/dist/office-share.js +549 -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 +28 -2
- package/dist/outbound-schemas.js +29 -2
- package/dist/outbound-schemas.js.map +1 -1
- package/dist/public-web-gateway.js +16 -2
- 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/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 +28 -0
- package/dist/settings-api.js +148 -17
- package/dist/settings-api.js.map +1 -1
- package/dist/settings-change.js +54 -17
- package/dist/settings-change.js.map +1 -1
- package/dist/settings-effect.js +12 -3
- 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/start-attempt.d.ts +9 -5
- package/dist/start-attempt.js +27 -8
- package/dist/start-attempt.js.map +1 -1
- package/dist/start-failure-chat.d.ts +4 -0
- package/dist/start-failure-chat.js +23 -6
- package/dist/start-failure-chat.js.map +1 -1
- package/dist/start-failure-notice.d.ts +4 -0
- package/dist/start-failure-notice.js +8 -0
- package/dist/start-failure-notice.js.map +1 -1
- package/dist/start-failure.d.ts +25 -0
- package/dist/start-failure.js +75 -2
- package/dist/start-failure.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 +12 -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 +26 -2
- package/dist/transcript-sources.js +103 -40
- package/dist/transcript-sources.js.map +1 -1
- package/dist/turn-reply-guard.d.ts +25 -0
- package/dist/turn-reply-guard.js +111 -12
- package/dist/turn-reply-guard.js.map +1 -1
- package/dist/types.d.ts +46 -9
- package/dist/ui/backend-signin.js +68 -12
- package/dist/ui/chat-ambient.js +1 -1
- package/dist/ui/chat-effects.js +4 -4
- package/dist/ui/chat-render.js +5 -2
- package/dist/ui/chat-strings.js +4 -4
- package/dist/ui/chat-thread.js +2 -2
- package/dist/ui/first-run.js +2 -2
- package/dist/ui/fleet-canvas-view.js +114 -0
- package/dist/ui/fleet-canvas.js +15 -77
- package/dist/ui/fleet-office-editor.js +94 -14
- package/dist/ui/fleet-office-layout.js +235 -0
- package/dist/ui/fleet-office-model.js +12 -6
- package/dist/ui/fleet-office-overview.js +167 -0
- package/dist/ui/fleet-office-pack.d.ts +44 -0
- package/dist/ui/fleet-office-pack.js +352 -37
- package/dist/ui/fleet-office-skin.js +220 -36
- package/dist/ui/fleet-office-store.js +112 -7
- package/dist/ui/fleet-office-view.js +155 -0
- package/dist/ui/fleet-office-zones.js +264 -42
- package/dist/ui/fleet-office.js +957 -160
- package/dist/ui/fleet-usage.js +26 -21
- package/dist/ui/office-share-dialog.js +145 -0
- package/dist/ui/office-share-page.js +164 -0
- package/dist/ui/panel-chat.js +9 -2
- package/dist/ui/panel-details.js +2 -2
- package/dist/ui/panel-fleet.js +11 -77
- package/dist/ui/panel-log.js +4 -4
- package/dist/ui/panel-needs.js +4 -4
- package/dist/ui/panel-settings.js +608 -167
- package/dist/ui/search-dialog.js +26 -7
- package/dist/ui/settings-appearance.js +82 -29
- package/dist/ui/settings-apply.js +42 -7
- package/dist/ui/settings-dialogs.js +76 -23
- package/dist/ui/settings-draft.js +51 -0
- package/dist/ui/settings-guests.js +255 -79
- package/dist/ui/settings-learn.js +2 -2
- package/dist/ui/settings-model.js +16 -6
- package/dist/ui/settings-registry.js +146 -0
- package/dist/ui/settings-strings.js +116 -44
- package/dist/ui/settings-web-authority.js +34 -23
- package/dist/ui/shared/app-i18n.js +18 -2
- package/dist/ui/shared/app-nav.js +10 -5
- package/dist/ui/shared/app-prefs.js +80 -2
- package/dist/ui/shared/app-route.js +39 -5
- package/dist/ui/shared/app-shell.js +73 -10
- package/dist/ui/shared/app-stream.js +3 -1
- package/dist/ui/shared/app.css +307 -17
- package/dist/ui/shared/app.js +3 -0
- package/dist/ui/shared/effect-stock-trust.js +1 -1
- package/dist/ui/shared/identity-color.js +4 -4
- package/dist/ui/shared/office/cozy.png +0 -0
- package/dist/ui/shared/side-panel.js +95 -0
- package/dist/ui/shared/signin.js +2 -2
- package/dist/ui/shared/ui-dialog.js +6 -1
- package/dist/ui/shared/ui-icons.js +2 -0
- package/dist/ui/shared/web-authorize.js +13 -12
- 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 +26 -2
- package/dist/web-api.js +361 -5
- package/dist/web-api.js.map +1 -1
- package/dist/web-auth.js +8 -2
- 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-experimental.d.ts +1 -1
- package/dist/web-experimental.js +1 -1
- package/dist/web-experimental.js.map +1 -1
- package/dist/web-mod-agent.js +2 -2
- package/dist/web-mod-agent.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-skins.d.ts +109 -0
- package/dist/web-office-skins.js +299 -0
- package/dist/web-office-skins.js.map +1 -0
- package/dist/web-office-store.d.ts +8 -2
- package/dist/web-office-store.js +77 -14
- package/dist/web-office-store.js.map +1 -1
- package/dist/web-settings-patch.d.ts +8 -1
- package/dist/web-settings-patch.js +65 -5
- package/dist/web-settings-patch.js.map +1 -1
- package/dist/web-shell-routes.d.ts +4 -2
- package/dist/web-shell-routes.js +17 -7
- package/dist/web-shell-routes.js.map +1 -1
- package/dist/working-recovery.d.ts +104 -0
- package/dist/working-recovery.js +298 -0
- package/dist/working-recovery.js.map +1 -0
- package/dist/working-state-journal.d.ts +5 -1
- package/dist/working-state-journal.js +31 -3
- 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,QAAQ,EAAE,QAAQ,EAAE;IACpB,oBAAoB;IACpB,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC;CAC/C,CAAC;AAEF,MAAM,UAAU,iBAAiB,CAAC,IAAI,GAAiB,WAAW;IAChE,MAAM,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,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iB;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
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { RecoveryLive } from "./working-recovery.js";
|
|
1
2
|
import type { PaneContextSource } from "./pane-context-cache.js";
|
|
2
3
|
import type { WorkingStateObservation } from "./working-state-journal.js";
|
|
3
4
|
import { EventEmitter } from "node:events";
|
|
@@ -7,6 +8,7 @@ import { type PauseReason } from "./pause-marker.js";
|
|
|
7
8
|
import { MessageBus } from "./channel/message-bus.js";
|
|
8
9
|
import type { CliBackend, ErrorPattern, InstanceState, InstanceStateSnapshot } from "./backend/types.js";
|
|
9
10
|
import { HangDetector } from "./hang-detector.js";
|
|
11
|
+
import { type RemoteCardAction, type RemoteCardOutcome } from "./remote-card-answer.js";
|
|
10
12
|
import type { TmuxControlClient } from "./tmux-control.js";
|
|
11
13
|
import type { FleetInstructionsParams } from "./instructions.js";
|
|
12
14
|
import type { SpawnGate } from "./spawn-gate.js";
|
|
@@ -543,6 +545,8 @@ export declare class Daemon extends EventEmitter {
|
|
|
543
545
|
* skipResume — the #1209 gate reads this, never the resettable flag.
|
|
544
546
|
*/
|
|
545
547
|
private bootSkippedResume;
|
|
548
|
+
private recoveryCrashLoopFresh;
|
|
549
|
+
private recoveryFreshChoice;
|
|
546
550
|
private startupAborted;
|
|
547
551
|
/** First time the current on-screen blocking dialog was seen (0 = none); drives the parked report. */
|
|
548
552
|
private dialogParkedSince;
|
|
@@ -550,6 +554,12 @@ export declare class Daemon extends EventEmitter {
|
|
|
550
554
|
private dialogParkedKey;
|
|
551
555
|
private dialogParkedInteractionEpisode;
|
|
552
556
|
private dialogParkedReported;
|
|
557
|
+
/** #2675: the card on screen that a person can answer from the chat — what it asks, since when, and whether it was posted. */
|
|
558
|
+
private remoteCardShown;
|
|
559
|
+
/** #2675: when (performance.now, taken before its capture) the newest read the card tracker used was started. */
|
|
560
|
+
private remoteCardReadAt;
|
|
561
|
+
/** #2675: an answer from the chat is being keyed in (one at a time). */
|
|
562
|
+
private remoteCardAnswering;
|
|
553
563
|
/**
|
|
554
564
|
* #1691: the prompt at the bottom of the pane that no backend table knows — its block, since when (performance.now)
|
|
555
565
|
* it has been unchanged, and whether that has lasted UNRECOGNISED_PROMPT_STABLE_MS. Updated by the runtime scan.
|
|
@@ -932,6 +942,8 @@ export declare class Daemon extends EventEmitter {
|
|
|
932
942
|
private lastDetectedErrorType;
|
|
933
943
|
private static errorPatternKey;
|
|
934
944
|
/** Read the occurrence baseline so a lifecycle-owned restart can carry it forward. */
|
|
945
|
+
/** #2648: kiro only — what a model error on the current launch should do (see kiro-retired-model.ts). */
|
|
946
|
+
kiroModelError(): import("./backend/kiro-retired-model.js").KiroModelErrorVerdict | null;
|
|
935
947
|
getErrorPatternOccurrenceCount(type: ErrorPattern["type"], pattern: RegExp): number;
|
|
936
948
|
/** Seed a replacement daemon with an already-reported pattern count. */
|
|
937
949
|
seedErrorPatternOccurrenceCount(type: ErrorPattern["type"], pattern: RegExp, count: number): void;
|
|
@@ -1320,6 +1332,21 @@ export declare class Daemon extends EventEmitter {
|
|
|
1320
1332
|
private interactionOwner;
|
|
1321
1333
|
/** Cached, pure observation read; it never captures, constructs a backend or writes stdin. */
|
|
1322
1334
|
getInteractionSnapshot(): InteractionSnapshot;
|
|
1335
|
+
private ownedWorkingSession;
|
|
1336
|
+
private recoveryBootSettled;
|
|
1337
|
+
private recoveryBootWorkPending;
|
|
1338
|
+
private recoveryLegacyCovered;
|
|
1339
|
+
private recoveryNativeWork;
|
|
1340
|
+
private recoveryContinuationId;
|
|
1341
|
+
private recoveryCancelled;
|
|
1342
|
+
private workingRecoveryInputOwner;
|
|
1343
|
+
noteLegacyRestartReminder(): void;
|
|
1344
|
+
getWorkingRecoveryState(): RecoveryLive;
|
|
1345
|
+
/** Local system work: no user turn, channel reply target, wake or replay of an original request. */
|
|
1346
|
+
deliverWorkingRecovery(content: string, delivery: {
|
|
1347
|
+
deliveryId: string;
|
|
1348
|
+
attemptNo: number;
|
|
1349
|
+
}, admitted: () => boolean): Promise<void>;
|
|
1323
1350
|
private workingTurnDelivery;
|
|
1324
1351
|
private workingBackgroundObservation;
|
|
1325
1352
|
/** Pure metadata read: never discovers sessions, captures a pane or reads backend files. */
|
|
@@ -1432,6 +1459,8 @@ export declare class Daemon extends EventEmitter {
|
|
|
1432
1459
|
private currentReplyRecovery;
|
|
1433
1460
|
private queueMalformedReplyRecovery;
|
|
1434
1461
|
private reportUnrecoveredReplyDrop;
|
|
1462
|
+
/** Channel notice for a reply-drop. `rateLimit` shares the per-instance cooldown (#2544). */
|
|
1463
|
+
private deliverReplyDropNotice;
|
|
1435
1464
|
/** Relay the pane's final text to the channel, marked as a daemon proxy reply. */
|
|
1436
1465
|
private sendProxyReply;
|
|
1437
1466
|
/** Context-bound reply path shared by dead-MCP and malformed-call recovery. */
|
|
@@ -1703,7 +1732,8 @@ export declare class Daemon extends EventEmitter {
|
|
|
1703
1732
|
/**
|
|
1704
1733
|
* Arm the "keep going" nudge for the error occurrence just reported (`pattern` must be the one the lifecycle was
|
|
1705
1734
|
* handed). The nudge is sent once, `delayMs` from now on the MONOTONIC clock (a wall-clock step changes nothing),
|
|
1706
|
-
* and only if
|
|
1735
|
+
* and only if the failed turn still owns an empty idle composer — see {@link tickCapacityNudge}.
|
|
1736
|
+
* Cosmetic footer redraws are not new work. Returns false when there is nothing to arm.
|
|
1707
1737
|
*/
|
|
1708
1738
|
armCapacityNudge(pattern: RegExp, delayMs: number): boolean;
|
|
1709
1739
|
/**
|
|
@@ -1715,13 +1745,23 @@ export declare class Daemon extends EventEmitter {
|
|
|
1715
1745
|
prepareCapacityNudgePause(): Promise<CapacityNudgePauseGuard | null>;
|
|
1716
1746
|
/** Drop an armed nudge (the user stopped / paused the instance, or the lifecycle gave up on it). */
|
|
1717
1747
|
cancelCapacityNudge(reason: string): void;
|
|
1748
|
+
/** Only a dispatched channel promise needs a later cancellation notice. */
|
|
1749
|
+
markCapacityNudgePromised(target: string): void;
|
|
1750
|
+
private reportCapacityNudgeCancelled;
|
|
1751
|
+
/**
|
|
1752
|
+
* A failed turn must still be the last live transcript item, with no new
|
|
1753
|
+
* error occurrence, draft, queue, busy status or background work. Codex's
|
|
1754
|
+
* own periodic-redraw idle classifier recognises its empty composer/footer;
|
|
1755
|
+
* never infer inactivity from byte equality or a cached idle state alone.
|
|
1756
|
+
*/
|
|
1757
|
+
private capacityNudgePaneCurrent;
|
|
1718
1758
|
/** The first live composer of a spawn fixes what is history (see {@link nudgeBaselines}). */
|
|
1719
1759
|
private takeNudgeBaselines;
|
|
1720
1760
|
private static countOccurrences;
|
|
1721
1761
|
/**
|
|
1722
1762
|
* One monitor poll's look at an armed nudge. It is CANCELLED — never postponed — when anything about the instance
|
|
1723
|
-
* moved: a stop / pause / respawn (spawn generation or monitor epoch), a user cancel (delivery epoch), the pane
|
|
1724
|
-
* longer
|
|
1763
|
+
* moved: a stop / pause / respawn (spawn generation or monitor epoch), a user cancel (delivery epoch), the pane
|
|
1764
|
+
* no longer belonging to the failed turn (new output, a draft, another dialog), the
|
|
1725
1765
|
* agent working, or a message waiting for delivery. Only when it is due and still untouched is it fired — once — and
|
|
1726
1766
|
* the injection re-verifies everything under the pane-write lock.
|
|
1727
1767
|
*/
|
|
@@ -1750,6 +1790,20 @@ export declare class Daemon extends EventEmitter {
|
|
|
1750
1790
|
* dialog's static description and a count, never the pane: a pane can hold anything the agent printed.
|
|
1751
1791
|
*/
|
|
1752
1792
|
private noteDialogAnswer;
|
|
1793
|
+
/**
|
|
1794
|
+
* #2675: a held card a person can answer from the chat (the dialog's remoteCard reader) is posted once it has stayed
|
|
1795
|
+
* the same card for REMOTE_CARD_STABLE_MS — `remote_card` with what it asks; the fleet posts it with its buttons. When
|
|
1796
|
+
* it closes or another card replaces it, `remote_card_gone` retires that post. Moving through the card (ours or the
|
|
1797
|
+
* person's in the pane) is the same card: its identity has no cursor. `readAt` is when the pane's capture was started
|
|
1798
|
+
* (performance.now): a read that started before the newest one used here finishes late and says nothing about now —
|
|
1799
|
+
* it may neither retire a newer card nor bring an older one back (#2677 review).
|
|
1800
|
+
*/
|
|
1801
|
+
private trackRemoteCard;
|
|
1802
|
+
/**
|
|
1803
|
+
* #2675: answer the card on screen from the chat, as the person chose: only while it is the card they saw
|
|
1804
|
+
* (`identity`), on a verified cursor, under the pane write lock (remote-card-answer.ts). Never logs the answer.
|
|
1805
|
+
*/
|
|
1806
|
+
answerRemoteCard(identity: string, action: RemoteCardAction): Promise<RemoteCardOutcome>;
|
|
1753
1807
|
/**
|
|
1754
1808
|
* Remember how long a blocking dialog has been on screen. Once it has
|
|
1755
1809
|
* outlived DIALOG_PARKED_NOTIFY_MS — the auto-dismiss did not take, or the
|