@songsid/agend 2.3.2-beta.4 → 2.3.2-beta.5
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/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/backend/kiro-identity.d.ts +45 -0
- package/dist/backend/kiro-identity.js +74 -0
- package/dist/backend/kiro-identity.js.map +1 -1
- package/dist/backend/kiro.d.ts +15 -0
- package/dist/backend/kiro.js +42 -5
- package/dist/backend/kiro.js.map +1 -1
- package/dist/backend/types.d.ts +6 -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/mcp-tools.js +3 -1
- package/dist/channel/mcp-tools.js.map +1 -1
- package/dist/cli.js +21 -2
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +19 -0
- package/dist/config.js +25 -0
- 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.js +6 -3
- package/dist/daemon.js.map +1 -1
- package/dist/fleet-manager.d.ts +35 -0
- package/dist/fleet-manager.js +233 -11
- package/dist/fleet-manager.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-dashboard/SKILL.canvas-worker-off.md +6 -3
- package/dist/general-knowledge/skills/web-dashboard/SKILL.md +6 -3
- package/dist/instance-lifecycle.d.ts +9 -0
- package/dist/instance-lifecycle.js +27 -1
- 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-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 +70 -2
- 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 +8 -2
- package/dist/needs-you.js +6 -0
- package/dist/needs-you.js.map +1 -1
- 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 +4 -0
- package/dist/outbound-schemas.js +4 -0
- package/dist/outbound-schemas.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/setup-form.d.ts +1 -1
- package/dist/setup-form.js +7 -1
- package/dist/setup-form.js.map +1 -1
- package/dist/setup-host.d.ts +9 -0
- package/dist/setup-host.js +124 -5
- 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 +2 -0
- package/dist/tool-permissions.js.map +1 -1
- package/dist/topic-commands.js +4 -1
- package/dist/topic-commands.js.map +1 -1
- package/dist/transcript-sources.d.ts +26 -2
- package/dist/transcript-sources.js +87 -40
- package/dist/transcript-sources.js.map +1 -1
- package/dist/types.d.ts +3 -2
- package/dist/ui/backend-signin.js +63 -10
- package/dist/ui/fleet-usage.js +19 -15
- package/dist/ui/panel-log.js +2 -2
- package/dist/ui/panel-needs.js +4 -4
- package/dist/ui/shared/app-i18n.js +2 -2
- package/dist/ui/shared/app.css +1 -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 +1 -0
- package/dist/web-api.js +99 -0
- 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/package.json +2 -1
- package/templates/windows-shortcuts.ps1 +7 -5
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* #2122 §10 step 2: Kiro's usage, ESTIMATED. Kiro records no token counts (design §10.1: every `request_metadata` token
|
|
3
|
+
* field is null in the classic store, every `*_token_count` 0 in the TUI one, and V3 has no such field), so each turn is
|
|
4
|
+
* estimated from its text size the way tokscale does — the same basis as the user's tokscale-based reports (the user's
|
|
5
|
+
* decision, option B). Kiro keeps a conversation in one of three stores, by engine:
|
|
6
|
+
* - classic (legacy UI, engine v1): `<XDG_DATA_HOME>/kiro-cli/data.sqlite3`, table `conversations_v2` — kiroClassicTurns;
|
|
7
|
+
* - TUI (engine v2): `<KIRO_HOME>/sessions/cli/<id>.json` with its `<id>.jsonl` — kiroTuiTurns;
|
|
8
|
+
* - V3 (KAS): `<KIRO_HOME>/sessions/<bucket>/sess_<id>/{session.json, messages.jsonl}` — kiroKasTurns.
|
|
9
|
+
* The estimate:
|
|
10
|
+
* - fresh input: ceil(bytes / 4) of the prompt (its recorded `user_prompt_length`, else the prompt text) plus the tool
|
|
11
|
+
* results the turn sent;
|
|
12
|
+
* - output: ceil(bytes / 4) of the response (`response_size`, TUI `assistant_response_length`, else its text);
|
|
13
|
+
* - cache read: the context the turn resent, `floor(window × context_usage_percentage / 100) − fresh input` (never below
|
|
14
|
+
* 0); the window is the conversation's `context_window_tokens` (classic: none → no cache read; TUI: none → 200,000;
|
|
15
|
+
* V3 records none: 200,000);
|
|
16
|
+
* - cache write and reasoning: 0. A real count, should Kiro ever record one above 0, is taken instead.
|
|
17
|
+
* Credits are not read: the user's plan is not billed in them (design §10.2).
|
|
18
|
+
*
|
|
19
|
+
* The estimation formula and field mapping follow tokscale (github.com/junhoyeo/tokscale,
|
|
20
|
+
* crates/tokscale-core/src/sessions/kiro.rs at 669fdaeec54502a30468adbfa97789bb7ee2b762), MIT License,
|
|
21
|
+
* Copyright (c) 2025 Junho Yeo — see THIRD_PARTY_NOTICES.md. The code is AgEnD's own. Pure: no I/O.
|
|
22
|
+
*/
|
|
23
|
+
import type { Turn } from "./cache-ledger.js";
|
|
24
|
+
/** The window when a TUI or V3 session records none (tokscale's DEFAULT_CONTEXT_WINDOW). */
|
|
25
|
+
export declare const KIRO_DEFAULT_WINDOW = 200000;
|
|
26
|
+
export interface KiroClassicTurn extends Turn {
|
|
27
|
+
index: number;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* The estimated turns of one classic conversation (`conversations_v2.value`, parsed) whose request started after
|
|
31
|
+
* `after` (ms). One turn per `history[]` entry with `request_metadata`; an entry estimated at nothing is skipped.
|
|
32
|
+
*/
|
|
33
|
+
export declare function kiroClassicTurns(conversation: unknown, after: number): KiroClassicTurn[];
|
|
34
|
+
/** The request start times a classic conversation recorded (for the cross-store dedup below). */
|
|
35
|
+
export declare function kiroClassicRequestTimes(conversation: unknown): number[];
|
|
36
|
+
export interface KiroTuiTurn extends Turn {
|
|
37
|
+
index: number;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* The estimated turns of one TUI session — its `<id>.json` (parsed) and the lines of its `<id>.jsonl` — that started
|
|
41
|
+
* after `after` (ms). Only the messages a turn's `message_ids` name count toward it: the sidecar also carries the
|
|
42
|
+
* messages a conversation brought over from the classic engine.
|
|
43
|
+
*
|
|
44
|
+
* Dedup across stores (design §10.1): a conversation can have turns in both engines under one id. A TUI turn whose
|
|
45
|
+
* window [end − turn_duration, end] holds a request of the same conversation's classic record (`classicTimes`) is that
|
|
46
|
+
* request's, counted from the classic store: it is dropped here.
|
|
47
|
+
*/
|
|
48
|
+
export declare function kiroTuiTurns(session: unknown, jsonlLines: Iterable<string>, after: number, classicTimes?: readonly number[]): KiroTuiTurn[];
|
|
49
|
+
/**
|
|
50
|
+
* The estimated turns of one V3 (KAS) session — its `session.json` (parsed) and the lines of its `messages.jsonl` — that
|
|
51
|
+
* started after `after` (ms). A turn runs to its `turn_end`: its `user` text and `tool_result` text are its fresh input,
|
|
52
|
+
* its `assistant` text its output, and its last `contextUsage` its context. The window is 200,000 (V3 records none).
|
|
53
|
+
*
|
|
54
|
+
* A session converted from another engine (`ensure-session`: a new id, the history copied in) holds turns that store
|
|
55
|
+
* already counted: a turn that ended before the session was created (`createdAt`) is not counted again, nor one whose
|
|
56
|
+
* window holds a request of its source's classic record (`classicTimes`).
|
|
57
|
+
*/
|
|
58
|
+
export declare function kiroKasTurns(session: unknown, jsonlLines: Iterable<string>, after: number, classicTimes?: readonly number[]): Turn[];
|
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
/** The window when a TUI or V3 session records none (tokscale's DEFAULT_CONTEXT_WINDOW). */
|
|
2
|
+
export const KIRO_DEFAULT_WINDOW = 200_000;
|
|
3
|
+
const obj = (v) => (v && typeof v === "object" && !Array.isArray(v) ? v : null);
|
|
4
|
+
const at = (v, ...path) => { let c = v; for (const k of path)
|
|
5
|
+
c = obj(c)?.[k]; return c; };
|
|
6
|
+
/** A count as recorded; anything that is not a finite number is absent. */
|
|
7
|
+
const count = (v) => (typeof v === "number" && Number.isFinite(v) ? v : null);
|
|
8
|
+
const positive = (v) => { const n = count(v); return n !== null && n > 0 ? n : null; };
|
|
9
|
+
const estimate = (bytes) => Math.ceil(Math.max(0, bytes) / 4);
|
|
10
|
+
const bytes = (s) => Buffer.byteLength(s, "utf8");
|
|
11
|
+
const chars = (s) => { let n = 0; for (const _ of s)
|
|
12
|
+
n++; return n; };
|
|
13
|
+
const modelOf = (info) => {
|
|
14
|
+
const m = at(info, "model_id");
|
|
15
|
+
return typeof m === "string" && m.trim() ? m : "unknown";
|
|
16
|
+
};
|
|
17
|
+
const turn = (t, model, input, read, output, requests = 1) => ({ t, model, prompt: input + read, uncached: input, read, write5m: 0, write1h: 0, write: null, output, ...(requests > 1 ? { requests } : {}) });
|
|
18
|
+
/** The classic store's tool results: the bytes of every `Text`/`text` string inside, else of the whole JSON. */
|
|
19
|
+
function classicToolResultBytes(value) {
|
|
20
|
+
const walk = (v) => {
|
|
21
|
+
if (Array.isArray(v))
|
|
22
|
+
return v.reduce((n, x) => n + walk(x), 0);
|
|
23
|
+
const o = obj(v);
|
|
24
|
+
if (!o)
|
|
25
|
+
return 0;
|
|
26
|
+
let n = 0;
|
|
27
|
+
for (const [k, x] of Object.entries(o))
|
|
28
|
+
n += (k === "Text" || k === "text") && typeof x === "string" ? bytes(x) : walk(x);
|
|
29
|
+
return n;
|
|
30
|
+
};
|
|
31
|
+
const found = walk(value);
|
|
32
|
+
return found > 0 ? found : bytes(JSON.stringify(value) ?? "");
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* The estimated turns of one classic conversation (`conversations_v2.value`, parsed) whose request started after
|
|
36
|
+
* `after` (ms). One turn per `history[]` entry with `request_metadata`; an entry estimated at nothing is skipped.
|
|
37
|
+
*/
|
|
38
|
+
export function kiroClassicTurns(conversation, after) {
|
|
39
|
+
const model = modelOf(at(conversation, "model_info"));
|
|
40
|
+
const window = count(at(conversation, "model_info", "context_window_tokens")) ?? 0;
|
|
41
|
+
const history = at(conversation, "history");
|
|
42
|
+
if (!Array.isArray(history))
|
|
43
|
+
return [];
|
|
44
|
+
const out = [];
|
|
45
|
+
history.forEach((entry, index) => {
|
|
46
|
+
const meta = obj(at(entry, "request_metadata"));
|
|
47
|
+
if (!meta)
|
|
48
|
+
return;
|
|
49
|
+
const t = positive(meta.request_start_timestamp_ms) ?? positive(meta.stream_end_timestamp_ms) ?? 0;
|
|
50
|
+
if (!(t > after))
|
|
51
|
+
return;
|
|
52
|
+
const nested = obj(meta.token_usage) ?? obj(meta.usage);
|
|
53
|
+
const real = (...keys) => { for (const k of keys) {
|
|
54
|
+
const v = positive(meta[k]) ?? positive(nested?.[k]);
|
|
55
|
+
if (v !== null)
|
|
56
|
+
return v;
|
|
57
|
+
} return null; };
|
|
58
|
+
const realInput = real("input_tokens", "uncached_input_tokens", "input_token_count");
|
|
59
|
+
const realOutput = real("output_tokens", "output_token_count");
|
|
60
|
+
const realRead = real("cache_read_input_tokens", "cache_read_tokens", "cache_read");
|
|
61
|
+
const content = at(entry, "user", "content");
|
|
62
|
+
const promptText = at(content, "Prompt", "prompt");
|
|
63
|
+
const promptBytes = positive(meta.user_prompt_length) ?? (typeof promptText === "string" ? bytes(promptText) : 0);
|
|
64
|
+
const toolBytes = obj(content) && "ToolUseResults" in obj(content) ? classicToolResultBytes(obj(content).ToolUseResults) : 0;
|
|
65
|
+
const fresh = estimate(promptBytes + toolBytes);
|
|
66
|
+
const pct = count(meta.context_usage_percentage) ?? 0;
|
|
67
|
+
const context = window > 0 && pct > 0 ? Math.floor(window * pct / 100) : 0;
|
|
68
|
+
const input = realInput ?? fresh;
|
|
69
|
+
const read = realRead ?? (realInput === null ? Math.max(context - fresh, 0) : 0);
|
|
70
|
+
const output = realOutput ?? estimate(count(meta.response_size) ?? 0);
|
|
71
|
+
if (input + output === 0)
|
|
72
|
+
return;
|
|
73
|
+
const requests = positive(meta.request_count) ?? positive(meta.user_turn_request_count) ?? positive(meta.total_request_count) ?? 1;
|
|
74
|
+
out.push({ ...turn(t, model, input, read, output, requests), index });
|
|
75
|
+
});
|
|
76
|
+
return out;
|
|
77
|
+
}
|
|
78
|
+
/** The request start times a classic conversation recorded (for the cross-store dedup below). */
|
|
79
|
+
export function kiroClassicRequestTimes(conversation) {
|
|
80
|
+
const history = at(conversation, "history");
|
|
81
|
+
if (!Array.isArray(history))
|
|
82
|
+
return [];
|
|
83
|
+
const out = [];
|
|
84
|
+
for (const e of history) {
|
|
85
|
+
const t = positive(at(e, "request_metadata", "request_start_timestamp_ms"));
|
|
86
|
+
if (t !== null)
|
|
87
|
+
out.push(t);
|
|
88
|
+
}
|
|
89
|
+
return out;
|
|
90
|
+
}
|
|
91
|
+
/** A TUI or V3 timestamp: an RFC 3339 string, or a number in seconds (below 1e12) or milliseconds. */
|
|
92
|
+
function v3Time(v) {
|
|
93
|
+
if (typeof v === "string") {
|
|
94
|
+
const t = Date.parse(v);
|
|
95
|
+
return Number.isFinite(t) && t > 0 ? t : null;
|
|
96
|
+
}
|
|
97
|
+
const n = count(v);
|
|
98
|
+
if (n === null || n <= 0)
|
|
99
|
+
return null;
|
|
100
|
+
return Math.abs(n) < 1e12 ? Math.round(n * 1000) : n;
|
|
101
|
+
}
|
|
102
|
+
const secsOf = (d) => {
|
|
103
|
+
const s = count(at(d, "secs")), ns = count(at(d, "nanos"));
|
|
104
|
+
return s === null ? null : s + (ns ?? 0) / 1e9;
|
|
105
|
+
};
|
|
106
|
+
/** TUI tool results (a `ToolResults` line's `data.content`): the text of each toolResult's content data. */
|
|
107
|
+
function v3ToolResultBytes(content) {
|
|
108
|
+
if (!Array.isArray(content))
|
|
109
|
+
return 0;
|
|
110
|
+
let n = 0;
|
|
111
|
+
for (const part of content) {
|
|
112
|
+
if (at(part, "kind") !== "toolResult")
|
|
113
|
+
continue;
|
|
114
|
+
const inner = at(part, "data", "content");
|
|
115
|
+
if (!Array.isArray(inner))
|
|
116
|
+
continue;
|
|
117
|
+
for (const x of inner) {
|
|
118
|
+
const d = obj(x)?.data;
|
|
119
|
+
if (d === undefined)
|
|
120
|
+
continue;
|
|
121
|
+
n += typeof d === "string" ? bytes(d) : bytes(JSON.stringify(d) ?? "");
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
return n;
|
|
125
|
+
}
|
|
126
|
+
const textChars = (content) => {
|
|
127
|
+
if (!Array.isArray(content))
|
|
128
|
+
return 0;
|
|
129
|
+
let n = 0;
|
|
130
|
+
for (const p of content) {
|
|
131
|
+
const k = at(p, "kind"), d = at(p, "data");
|
|
132
|
+
if ((k === undefined || k === null || k === "text") && typeof d === "string")
|
|
133
|
+
n += chars(d);
|
|
134
|
+
}
|
|
135
|
+
return n;
|
|
136
|
+
};
|
|
137
|
+
/**
|
|
138
|
+
* The estimated turns of one TUI session — its `<id>.json` (parsed) and the lines of its `<id>.jsonl` — that started
|
|
139
|
+
* after `after` (ms). Only the messages a turn's `message_ids` name count toward it: the sidecar also carries the
|
|
140
|
+
* messages a conversation brought over from the classic engine.
|
|
141
|
+
*
|
|
142
|
+
* Dedup across stores (design §10.1): a conversation can have turns in both engines under one id. A TUI turn whose
|
|
143
|
+
* window [end − turn_duration, end] holds a request of the same conversation's classic record (`classicTimes`) is that
|
|
144
|
+
* request's, counted from the classic store: it is dropped here.
|
|
145
|
+
*/
|
|
146
|
+
export function kiroTuiTurns(session, jsonlLines, after, classicTimes = []) {
|
|
147
|
+
const info = at(session, "session_state", "rts_model_state", "model_info");
|
|
148
|
+
const model = modelOf(info);
|
|
149
|
+
const window = positive(at(info, "context_window_tokens")) ?? KIRO_DEFAULT_WINDOW;
|
|
150
|
+
const turns = at(session, "session_state", "conversation_metadata", "user_turn_metadatas");
|
|
151
|
+
if (!Array.isArray(turns) || !turns.length)
|
|
152
|
+
return [];
|
|
153
|
+
const byId = new Map();
|
|
154
|
+
let pendingPrompt = null, pendingTools = 0;
|
|
155
|
+
for (const line of jsonlLines) {
|
|
156
|
+
let e;
|
|
157
|
+
try {
|
|
158
|
+
e = JSON.parse(line);
|
|
159
|
+
}
|
|
160
|
+
catch {
|
|
161
|
+
continue;
|
|
162
|
+
}
|
|
163
|
+
const kind = at(e, "kind");
|
|
164
|
+
if (kind === "ToolResults") {
|
|
165
|
+
pendingTools += v3ToolResultBytes(at(e, "data", "content"));
|
|
166
|
+
continue;
|
|
167
|
+
}
|
|
168
|
+
const id = at(e, "data", "message_id");
|
|
169
|
+
if (typeof id !== "string")
|
|
170
|
+
continue;
|
|
171
|
+
const c = textChars(at(e, "data", "content"));
|
|
172
|
+
if (kind === "Prompt")
|
|
173
|
+
pendingPrompt = { chars: c, at: v3Time(at(e, "data", "meta", "timestamp")) };
|
|
174
|
+
else if (kind === "AssistantMessage") {
|
|
175
|
+
const m = byId.get(id) ?? { prompt: 0, assistant: 0, tools: 0, promptAt: null };
|
|
176
|
+
if (pendingPrompt) {
|
|
177
|
+
m.prompt += pendingPrompt.chars;
|
|
178
|
+
m.promptAt ??= pendingPrompt.at;
|
|
179
|
+
pendingPrompt = null;
|
|
180
|
+
}
|
|
181
|
+
m.assistant += c;
|
|
182
|
+
m.tools += pendingTools;
|
|
183
|
+
pendingTools = 0;
|
|
184
|
+
byId.set(id, m);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
const out = [];
|
|
188
|
+
turns.forEach((tm, index) => {
|
|
189
|
+
let prompt = 0, assistant = 0, tools = 0, promptAt = null;
|
|
190
|
+
const ids = at(tm, "message_ids");
|
|
191
|
+
for (const id of Array.isArray(ids) ? ids : []) {
|
|
192
|
+
const m = typeof id === "string" ? byId.get(id) : undefined;
|
|
193
|
+
if (!m)
|
|
194
|
+
continue;
|
|
195
|
+
prompt += m.prompt;
|
|
196
|
+
assistant += m.assistant;
|
|
197
|
+
tools += m.tools;
|
|
198
|
+
promptAt ??= m.promptAt;
|
|
199
|
+
}
|
|
200
|
+
const end = v3Time(at(tm, "end_timestamp"));
|
|
201
|
+
const t = promptAt ?? end;
|
|
202
|
+
if (t === null || !(t > after))
|
|
203
|
+
return;
|
|
204
|
+
if (end !== null && classicTimes.length) {
|
|
205
|
+
const secs = secsOf(at(tm, "turn_duration"));
|
|
206
|
+
const start = secs === null ? (promptAt ?? end) : end - secs * 1000;
|
|
207
|
+
if (classicTimes.some(c => c >= start && c <= end))
|
|
208
|
+
return;
|
|
209
|
+
}
|
|
210
|
+
const realInput = positive(at(tm, "input_token_count")), realOutput = positive(at(tm, "output_token_count"));
|
|
211
|
+
const realRead = positive(at(tm, "cache_read_input_token_count"));
|
|
212
|
+
const fresh = estimate((positive(at(tm, "user_prompt_length")) ?? prompt) + tools);
|
|
213
|
+
const input = realInput ?? fresh;
|
|
214
|
+
const pct = count(at(tm, "context_usage_percentage")) ?? 0;
|
|
215
|
+
const read = realRead ?? Math.max((pct > 0 ? Math.floor(window * pct / 100) : 0) - input, 0);
|
|
216
|
+
const responseBytes = positive(at(tm, "assistant_response_length"));
|
|
217
|
+
const output = realOutput ?? estimate(responseBytes ?? assistant);
|
|
218
|
+
if (input + output === 0)
|
|
219
|
+
return;
|
|
220
|
+
out.push({ ...turn(t, model, input, read, output, positive(at(tm, "total_request_count")) ?? 1), index });
|
|
221
|
+
});
|
|
222
|
+
return out;
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* The estimated turns of one V3 (KAS) session — its `session.json` (parsed) and the lines of its `messages.jsonl` — that
|
|
226
|
+
* started after `after` (ms). A turn runs to its `turn_end`: its `user` text and `tool_result` text are its fresh input,
|
|
227
|
+
* its `assistant` text its output, and its last `contextUsage` its context. The window is 200,000 (V3 records none).
|
|
228
|
+
*
|
|
229
|
+
* A session converted from another engine (`ensure-session`: a new id, the history copied in) holds turns that store
|
|
230
|
+
* already counted: a turn that ended before the session was created (`createdAt`) is not counted again, nor one whose
|
|
231
|
+
* window holds a request of its source's classic record (`classicTimes`).
|
|
232
|
+
*/
|
|
233
|
+
export function kiroKasTurns(session, jsonlLines, after, classicTimes = []) {
|
|
234
|
+
const model = typeof at(session, "modelId") === "string" && String(at(session, "modelId")).trim() ? String(at(session, "modelId")) : "unknown";
|
|
235
|
+
const created = v3Time(at(session, "createdAt"));
|
|
236
|
+
const turns = [];
|
|
237
|
+
let cur = null;
|
|
238
|
+
const fresh = () => ({ prompt: 0, assistant: 0, tools: 0, pct: 0, promptAt: null, endAt: null, elapsed: null, requests: 0 });
|
|
239
|
+
const close = () => { if (cur && (cur.prompt || cur.assistant || cur.tools))
|
|
240
|
+
turns.push(cur); cur = null; };
|
|
241
|
+
for (const line of jsonlLines) {
|
|
242
|
+
let e;
|
|
243
|
+
try {
|
|
244
|
+
e = JSON.parse(line);
|
|
245
|
+
}
|
|
246
|
+
catch {
|
|
247
|
+
continue;
|
|
248
|
+
}
|
|
249
|
+
const p = obj(at(e, "payload"));
|
|
250
|
+
if (!p || typeof p.type !== "string")
|
|
251
|
+
continue;
|
|
252
|
+
const ts = v3Time(at(e, "timestamp"));
|
|
253
|
+
const text = typeof p.content === "string" ? chars(p.content) : 0;
|
|
254
|
+
switch (p.type) {
|
|
255
|
+
case "user":
|
|
256
|
+
cur ??= fresh();
|
|
257
|
+
cur.prompt += text;
|
|
258
|
+
cur.promptAt ??= ts;
|
|
259
|
+
break;
|
|
260
|
+
case "assistant":
|
|
261
|
+
if (cur)
|
|
262
|
+
cur.assistant += text;
|
|
263
|
+
break;
|
|
264
|
+
case "tool_result":
|
|
265
|
+
cur ??= fresh();
|
|
266
|
+
cur.tools += text;
|
|
267
|
+
break;
|
|
268
|
+
case "session_metadata": {
|
|
269
|
+
const pct = count(at(p, "value", "usagePercentage"));
|
|
270
|
+
if (p.key === "contextUsage" && cur && pct !== null)
|
|
271
|
+
cur.pct = pct;
|
|
272
|
+
break;
|
|
273
|
+
}
|
|
274
|
+
case "usage_summary": {
|
|
275
|
+
const el = count(p.elapsedTime);
|
|
276
|
+
if (cur && el !== null)
|
|
277
|
+
cur.elapsed = el;
|
|
278
|
+
if (cur && Array.isArray(p.requestIds))
|
|
279
|
+
cur.requests = p.requestIds.length;
|
|
280
|
+
break;
|
|
281
|
+
}
|
|
282
|
+
case "turn_end":
|
|
283
|
+
if (cur)
|
|
284
|
+
cur.endAt = ts;
|
|
285
|
+
close();
|
|
286
|
+
break;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
// A turn still being written (no turn_end yet) is not counted now: counted unfinished, the rest of it would come after
|
|
290
|
+
// the cursor's `after` and never be added. It is counted, whole, once it ends.
|
|
291
|
+
const out = [];
|
|
292
|
+
for (const t of turns) {
|
|
293
|
+
const at0 = t.promptAt ?? t.endAt;
|
|
294
|
+
if (at0 === null || !(at0 > after))
|
|
295
|
+
continue;
|
|
296
|
+
if (created !== null && t.endAt !== null && t.endAt < created)
|
|
297
|
+
continue;
|
|
298
|
+
const end = t.endAt ?? at0, start = t.promptAt ?? (t.elapsed !== null ? end - t.elapsed : end);
|
|
299
|
+
if (classicTimes.some(c => c >= start && c <= end))
|
|
300
|
+
continue;
|
|
301
|
+
const input = estimate(t.prompt + t.tools);
|
|
302
|
+
const read = Math.max((t.pct > 0 ? Math.floor(KIRO_DEFAULT_WINDOW * t.pct / 100) : 0) - input, 0);
|
|
303
|
+
const output = estimate(t.assistant);
|
|
304
|
+
if (input + output === 0)
|
|
305
|
+
continue;
|
|
306
|
+
out.push(turn(at0, model, input, read, output, Math.max(1, t.requests)));
|
|
307
|
+
}
|
|
308
|
+
return out;
|
|
309
|
+
}
|
|
310
|
+
//# sourceMappingURL=kiro-usage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kiro-usage.js","sourceRoot":"","sources":["../src/kiro-usage.ts"],"names":[],"mappings":"AAwBA,4FAA4F;AAC5F,MAAM,CAAC,MAAM,mBAAmB,GAAG,OAAO,CAAC;AAG3C,MAAM,GAAG,GAAG,CAAC,CAAU,EAAc,EAAE,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAQ,CAAC,CA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AM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,mBAAmB,GAAG,CAAC,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,EAAE,CAAC,CAAC,CAAC;QAClG,MAAM,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;QACrC,IAAI,KAAK,GAAG,MAAM,KAAK,CAAC;YAAE,SAAS;QACnC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC3E,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
package/dist/locale.js
CHANGED
|
@@ -245,6 +245,8 @@ const enMessages = {
|
|
|
245
245
|
"inst.session_oom_retry_busy": "This instance is finishing another restart. Wait for it to finish, then explicitly retry the stopped session.",
|
|
246
246
|
"inst.session_oom_save_failed": "The stop could not be saved: fix storage before restarting the fleet.",
|
|
247
247
|
"needs.reason.auth_paused": "Paused: sign-in needed",
|
|
248
|
+
"needs.reason.backend_signin": "Backend sign-in needed",
|
|
249
|
+
"login.browser_cleanup_failed": "Sign-in cleanup could not be confirmed. Close the AgEnD-owned login process and restart AgEnD before retrying.",
|
|
248
250
|
"needs.reason.crashed": "Crashed",
|
|
249
251
|
"needs.reason.delivery_uncertain": "Could not confirm delivery",
|
|
250
252
|
"needs.reason.delivery_failed": "Delivery failed",
|
|
@@ -341,6 +343,36 @@ const enMessages = {
|
|
|
341
343
|
"kiro.untagged_steering": "kiro: an AgEnD instructions file from before this version (.kiro/steering/agend-<instance>.md, without a fleet tag) is still in this directory. AgEnD cannot tell which fleet wrote it, so it keeps it; delete it by hand once every fleet using this directory has upgraded.",
|
|
342
344
|
"kiro.no_instance_agent": "kiro-cli {0} has no `--agent` / `--resume-id` (needs {1} or newer), so this instance runs as before: kiro instances sharing its working directory can see each other's tools and conversations. Run `kiro-cli update` to isolate them.",
|
|
343
345
|
"kiro.identity_legacy": "kiro: this launch runs as before and is NOT isolated from other kiro instances in the same directory ({0}). The next launch tries again.",
|
|
346
|
+
"kiro_migrate.not_fleet_instance": "'{0}' is not a fleet instance. ClassicBot kiro channels are not moved by migrate_kiro_instance yet.",
|
|
347
|
+
"kiro_migrate.not_kiro": "'{0}' runs on {1}, not kiro-cli.",
|
|
348
|
+
"kiro_migrate.not_legacy": "'{0}' already runs kiro_ui: {1}; only a classic (legacy) instance is moved.",
|
|
349
|
+
"kiro_migrate.no_directory": "'{0}' has no working_directory, so its conversation cannot be found.",
|
|
350
|
+
"kiro_migrate.refused_already_tui": "'{0}' already has a TUI conversation on record (or a move under way); it is not moved again.",
|
|
351
|
+
"kiro_migrate.refused_unreadable": "AgEnD cannot read the kiro conversation records of '{0}', so it cannot tell which conversation to carry. Nothing was changed.",
|
|
352
|
+
"kiro_migrate.refused_name": "'{0}' cannot be recorded as a kiro conversation owner.",
|
|
353
|
+
"kiro_migrate.no_classic": "'{0}' has no classic conversation on record to carry over (it started fresh, or ran without its own record). Moving it would start an empty TUI conversation; ask again with start_fresh: true if that is intended.",
|
|
354
|
+
"kiro_migrate.prompt_title": "🔀 Move {0} from kiro classic to the TUI engine?",
|
|
355
|
+
"kiro_migrate.prompt_carry": "Its classic conversation {0} is resumed once under the TUI: kiro copies the whole history over, and the classic copy stops being updated.",
|
|
356
|
+
"kiro_migrate.prompt_fresh": "It has no classic conversation to carry: it starts an empty TUI conversation.",
|
|
357
|
+
"kiro_migrate.prompt_one_way": "One-way: afterwards AgEnD refuses to launch it on classic again (that would resume the old copy and lose the work done since).",
|
|
358
|
+
"kiro_migrate.prompt_restart": "It is running: it restarts now (about 1–3 minutes).",
|
|
359
|
+
"kiro_migrate.prompt_next_start": "It is not running: the move takes effect at its next start.",
|
|
360
|
+
"kiro_migrate.confirm_button": "Move it",
|
|
361
|
+
"kiro_migrate.cancel_button": "Cancel",
|
|
362
|
+
"kiro_migrate.expired": "The kiro move of {0} was not confirmed in time; nothing was changed.",
|
|
363
|
+
"kiro_migrate.cancelled": "The kiro move of {0} was cancelled; nothing was changed.",
|
|
364
|
+
"kiro_migrate.applying": "Moving {0} to the TUI engine…",
|
|
365
|
+
"kiro_migrate.changed": "{0} changed since the move was asked for; nothing was changed. Ask again.",
|
|
366
|
+
"kiro_migrate.save_failed": "Could not save fleet.yaml for {0} ({1}); nothing was changed.",
|
|
367
|
+
"kiro_migrate.done": "✅ {0} now runs on kiro's TUI engine.",
|
|
368
|
+
"kiro_migrate.done_next_start": "✅ {0} is set to kiro's TUI engine; the move happens at its next start.",
|
|
369
|
+
"kiro_migrate.done_restart_failed": "⚠️ {0} is set to kiro's TUI engine, but its restart failed ({1}); the move happens at its next start.",
|
|
370
|
+
"kiro_migrate.done_carry": "Its first TUI launch resumes its classic conversation {0} once and records it as its own; if that launch starts fresh instead, it says so in its topic.",
|
|
371
|
+
"kiro_migrate.done_fresh": "It starts with an empty conversation.",
|
|
372
|
+
"kiro_migrate.requested": "Asked in General for a fleet admin's confirmation. Nothing changes until it is confirmed.",
|
|
373
|
+
"kiro_migrate.no_general": "There is no General topic to ask a fleet admin in, so the move cannot be confirmed.",
|
|
374
|
+
"kiro.engine_floor": "{0} has run on kiro's {2} engine, so AgEnD will not launch it on {1}: that would resume the old copy of its conversation from before the move and lose everything done since. Set kiro_ui back to {2}.",
|
|
375
|
+
"kiro.tui_no_plan_fresh": "kiro: this TUI launch starts a fresh conversation. AgEnD could not pick this instance's own conversation, and kiro's plain --resume could pick another instance's or fork a classic one.",
|
|
344
376
|
"kiro.upgrade_shared_directory": "kiro: started fresh because another configured kiro instance shares this directory. The pre-upgrade conversation was left untouched; AgEnD cannot safely assign it to either instance.",
|
|
345
377
|
"kiro.upgrade_claimed_conversation": "kiro: started fresh because the newest pre-upgrade conversation is already claimed by another instance or was given up. AgEnD left that conversation untouched.",
|
|
346
378
|
"kiro.upgrade_unknown_peers": "kiro: started fresh because AgEnD could not verify the other configured kiro instances. The pre-upgrade conversations were left untouched.",
|
|
@@ -357,9 +389,11 @@ const enMessages = {
|
|
|
357
389
|
"inst.mcp_recovered": "✅ `{0}`'s MCP server is serving again — the earlier \"MCP server died\" report is retracted and no restart will happen. (A replacement or a sub-agent's server had left a dead pid behind; the live connection was verified at the IPC layer.)",
|
|
358
390
|
"inst.muse_relay_exhausted": "⚠️ {0}: Muse usage relay failed and did not recover — usage is unavailable, and the CLI is being moved back to a direct connection (session preserved).",
|
|
359
391
|
"inst.crashed_respawned": "⚠️ {0} crashed and respawned.",
|
|
360
|
-
"prompt_file.fleet_dir_fallback": "⚠️ {0}: the file: reference resolves to {2}, which does not exist, so {1} (relative to the fleet's directory) was used instead. Relative paths now mean the instance's working directory; make the path absolute or move the file.
|
|
392
|
+
"prompt_file.fleet_dir_fallback": "⚠️ {0}: the file: reference resolves to {2}, which does not exist, so {1} (relative to the fleet's directory) was used instead. Relative paths now mean the instance's working directory; make the path absolute or move the file. A later release will remove this fallback.",
|
|
361
393
|
"inst.crashed_respawned_log": "⚠️ {0} crashed and respawned. Check ~/.agend/daemon.log for details.",
|
|
362
394
|
"inst.restarted_no_context": "⚠️ {0}: restarted without context (snapshot injection failed)",
|
|
395
|
+
"inst.context_lost": "⚠️ {0} could not resume its previous conversation ({1} failed starts) and started a fresh one. It does not remember what came before; the old session is set aside in its instance folder, not deleted.",
|
|
396
|
+
"inst.context_lost_general": "⚠️ {0} started a fresh conversation after {1} failed resumes — its previous context is lost to it. The old session is set aside in its instance folder.",
|
|
363
397
|
"inst.respawn_paused": "⚠️ {0} crashed 3+ times shortly after launch — paused for recovery. Check logs or run `/wake` to restart.",
|
|
364
398
|
"inst.recovered": "✅ {0}: recovered after {1}",
|
|
365
399
|
"cross_instance.message_too_large": "Message too long ({0}; limit {1}). Shorten it, or send a file path so the recipient can read the content directly.",
|
|
@@ -1523,6 +1557,8 @@ const zhTWMessages = {
|
|
|
1523
1557
|
"inst.session_oom_retry_busy": "這個 Agent 正在完成另一次重啟。請等它結束後,再明確重試已停止的工作階段。",
|
|
1524
1558
|
"inst.session_oom_save_failed": "無法儲存停止紀錄:請先修復儲存空間或權限,再重啟 fleet。",
|
|
1525
1559
|
"needs.reason.auth_paused": "已暫停:需要登入",
|
|
1560
|
+
"needs.reason.backend_signin": "後端需要登入",
|
|
1561
|
+
"login.browser_cleanup_failed": "無法確認登入程序已關閉。請先關閉 AgEnD 的登入程序,重新啟動 AgEnD 後再試。",
|
|
1526
1562
|
"needs.reason.crashed": "已崩潰",
|
|
1527
1563
|
"needs.reason.delivery_uncertain": "無法確認是否送達",
|
|
1528
1564
|
"needs.reason.delivery_failed": "傳送失敗",
|
|
@@ -1619,6 +1655,36 @@ const zhTWMessages = {
|
|
|
1619
1655
|
"kiro.untagged_steering": "kiro:這個目錄還留有舊版 AgEnD 的指示檔(.kiro/steering/agend-<instance>.md,沒有 fleet 標記)。AgEnD 無法判斷是哪個 fleet 寫的,所以保留它;等所有使用這個目錄的 fleet 都升級後,請手動刪除。",
|
|
1620
1656
|
"kiro.no_instance_agent": "kiro-cli {0} 沒有 `--agent` / `--resume-id`(需要 {1} 以上),所以這個 instance 照舊執行:同一個工作目錄裡的 kiro instance 會看到彼此的工具和對話。執行 `kiro-cli update` 即可讓它們隔離。",
|
|
1621
1657
|
"kiro.identity_legacy": "kiro:這次啟動照舊執行,與同目錄的其他 kiro instance「沒有」隔離({0})。下次啟動會再試。",
|
|
1658
|
+
"kiro_migrate.not_fleet_instance": "'{0}' 不是 fleet instance。migrate_kiro_instance 目前還不搬 ClassicBot 的 kiro 頻道。",
|
|
1659
|
+
"kiro_migrate.not_kiro": "'{0}' 用的是 {1},不是 kiro-cli。",
|
|
1660
|
+
"kiro_migrate.not_legacy": "'{0}' 已經是 kiro_ui: {1};只搬經典(legacy)instance。",
|
|
1661
|
+
"kiro_migrate.no_directory": "'{0}' 沒有 working_directory,找不到它的對話。",
|
|
1662
|
+
"kiro_migrate.refused_already_tui": "'{0}' 已經有 TUI 對話紀錄(或搬移進行中),不會再搬一次。",
|
|
1663
|
+
"kiro_migrate.refused_unreadable": "AgEnD 讀不到 '{0}' 的 kiro 對話紀錄,無法判斷要帶哪個對話過去。什麼都沒改。",
|
|
1664
|
+
"kiro_migrate.refused_name": "'{0}' 無法登記為 kiro 對話的擁有者。",
|
|
1665
|
+
"kiro_migrate.no_classic": "'{0}' 沒有可帶過去的經典對話紀錄(它是全新開始,或沒有自己的紀錄)。搬過去會是空的 TUI 對話;若確實要這樣,請加上 start_fresh: true 再要求一次。",
|
|
1666
|
+
"kiro_migrate.prompt_title": "🔀 要把 {0} 從 kiro 經典引擎搬到 TUI 引擎嗎?",
|
|
1667
|
+
"kiro_migrate.prompt_carry": "它的經典對話 {0} 會在 TUI 下接續一次:kiro 會把整段歷史複製過去,經典那份從此不再更新。",
|
|
1668
|
+
"kiro_migrate.prompt_fresh": "它沒有可帶的經典對話:會從空的 TUI 對話開始。",
|
|
1669
|
+
"kiro_migrate.prompt_one_way": "單向:之後 AgEnD 不會再用經典引擎啟動它(那會接回舊副本,失去之後做的事)。",
|
|
1670
|
+
"kiro_migrate.prompt_restart": "它正在執行:會立刻重啟(約 1–3 分鐘)。",
|
|
1671
|
+
"kiro_migrate.prompt_next_start": "它沒在執行:下次啟動時生效。",
|
|
1672
|
+
"kiro_migrate.confirm_button": "搬過去",
|
|
1673
|
+
"kiro_migrate.cancel_button": "取消",
|
|
1674
|
+
"kiro_migrate.expired": "{0} 的 kiro 搬移沒有及時確認;什麼都沒改。",
|
|
1675
|
+
"kiro_migrate.cancelled": "{0} 的 kiro 搬移已取消;什麼都沒改。",
|
|
1676
|
+
"kiro_migrate.applying": "正在把 {0} 搬到 TUI 引擎…",
|
|
1677
|
+
"kiro_migrate.changed": "{0} 在要求之後有變動;什麼都沒改。請重新要求。",
|
|
1678
|
+
"kiro_migrate.save_failed": "無法為 {0} 儲存 fleet.yaml({1});什麼都沒改。",
|
|
1679
|
+
"kiro_migrate.done": "✅ {0} 現在在 kiro 的 TUI 引擎上執行。",
|
|
1680
|
+
"kiro_migrate.done_next_start": "✅ {0} 已設為 kiro 的 TUI 引擎;下次啟動時搬移。",
|
|
1681
|
+
"kiro_migrate.done_restart_failed": "⚠️ {0} 已設為 kiro 的 TUI 引擎,但重啟失敗({1});下次啟動時搬移。",
|
|
1682
|
+
"kiro_migrate.done_carry": "它第一次以 TUI 啟動時會接續經典對話 {0} 一次,並登記為它自己的對話;若那次啟動改開新對話,會在它的 topic 說明。",
|
|
1683
|
+
"kiro_migrate.done_fresh": "它會從空的對話開始。",
|
|
1684
|
+
"kiro_migrate.requested": "已在 General 請 fleet admin 確認。確認前不會有任何變更。",
|
|
1685
|
+
"kiro_migrate.no_general": "沒有 General topic 可以請 fleet admin 確認,所以無法搬移。",
|
|
1686
|
+
"kiro.engine_floor": "{0} 已經在 kiro 的 {2} 引擎上執行過,所以 AgEnD 不會用 {1} 啟動它:那會接回搬移前的舊對話副本,之後做的事全部遺失。請把 kiro_ui 改回 {2}。",
|
|
1687
|
+
"kiro.tui_no_plan_fresh": "kiro:這次 TUI 啟動會開一個新對話。AgEnD 無法選定這個 instance 自己的對話,而 kiro 的 --resume 可能接到別的 instance 的對話,或把經典對話分岔出一份。",
|
|
1622
1688
|
"kiro.upgrade_shared_directory": "kiro:另一個已設定的 kiro instance 共用這個目錄,因此本次開新對話。升級前的對話保持原樣;AgEnD 無法安全判定它屬於哪個 instance。",
|
|
1623
1689
|
"kiro.upgrade_claimed_conversation": "kiro:升級前最新的對話已被其他 instance 認領,或已被放棄,因此本次開新對話。AgEnD 沒有修改該對話。",
|
|
1624
1690
|
"kiro.upgrade_unknown_peers": "kiro:AgEnD 無法確認其他已設定的 kiro instance,因此本次開新對話。升級前的對話保持原樣。",
|
|
@@ -1635,9 +1701,11 @@ const zhTWMessages = {
|
|
|
1635
1701
|
"inst.mcp_recovered": "✅ `{0}` 的 MCP server 仍在服務 —— 先前的「MCP server 已終止」警報作廢,不會重啟。(是替換或子 agent 的 server 留下了死 pid;活的連線已在 IPC 層驗證。)",
|
|
1636
1702
|
"inst.muse_relay_exhausted": "⚠️ {0}:Muse 用量 relay 失效且無法恢復 —— 用量暫不可用,CLI 正移回直接連線(session 保留)。",
|
|
1637
1703
|
"inst.crashed_respawned": "⚠️ {0} 已崩潰並重生。",
|
|
1638
|
-
"prompt_file.fleet_dir_fallback": "⚠️ {0}:file: 參照解析為 {2},但該檔案不存在,所以改用了 {1}(相對於 Fleet 目錄)。相對路徑現在以 instance 的 working_directory
|
|
1704
|
+
"prompt_file.fleet_dir_fallback": "⚠️ {0}:file: 參照解析為 {2},但該檔案不存在,所以改用了 {1}(相對於 Fleet 目錄)。相對路徑現在以 instance 的 working_directory 為準;請改成絕對路徑或搬移檔案。之後的版本會移除這個退回機制。",
|
|
1639
1705
|
"inst.crashed_respawned_log": "⚠️ {0} 已崩潰並重生。詳見 ~/.agend/daemon.log。",
|
|
1640
1706
|
"inst.restarted_no_context": "⚠️ {0}:已重啟但無 Context(snapshot 注入失敗)",
|
|
1707
|
+
"inst.context_lost": "⚠️ {0} 無法接續先前的對話(啟動失敗 {1} 次),已改用全新對話。它不記得之前的內容;舊 session 已移到它的 instance 資料夾保留,沒有刪除。",
|
|
1708
|
+
"inst.context_lost_general": "⚠️ {0} 在 {1} 次 resume 失敗後改用全新對話,先前的 context 已遺失。舊 session 已移到它的 instance 資料夾保留。",
|
|
1641
1709
|
"inst.respawn_paused": "⚠️ {0} 連續 crash 3+ 次 — 已暫停恢復。檢查 log 或執行 `/wake` 重啟。",
|
|
1642
1710
|
"inst.recovered": "✅ {0}:{1} 後恢復",
|
|
1643
1711
|
"cross_instance.message_too_large": "訊息過長({0};上限 {1})。請精簡內容,或改傳檔案路徑讓對方自行讀取。",
|