@dotobokuri/fleet-console 1.46.0 → 1.47.0
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/dist/client/assets/{_baseUniq-CaqaUUIT.js → _baseUniq-kGlxZURL.js} +1 -1
- package/dist/client/assets/{arc-B4MjkR5w.js → arc-0MFZHiK0.js} +1 -1
- package/dist/client/assets/{architectureDiagram-Q4EWVU46-wP-4WWY-.js → architectureDiagram-Q4EWVU46--RIddBvw.js} +1 -1
- package/dist/client/assets/{blockDiagram-DXYQGD6D-D5Y2AdkX.js → blockDiagram-DXYQGD6D-BeAbiibf.js} +1 -1
- package/dist/client/assets/{c4Diagram-AHTNJAMY-hKNJrUod.js → c4Diagram-AHTNJAMY-DRkTrRQf.js} +1 -1
- package/dist/client/assets/channel-Ba1lW0bI.js +1 -0
- package/dist/client/assets/{chunk-4BX2VUAB-RdaAserw.js → chunk-4BX2VUAB-BpSILXNJ.js} +1 -1
- package/dist/client/assets/{chunk-4TB4RGXK-BVvGheRq.js → chunk-4TB4RGXK-ghYBwdri.js} +1 -1
- package/dist/client/assets/{chunk-55IACEB6-BKBu793s.js → chunk-55IACEB6-D-DtPH2C.js} +1 -1
- package/dist/client/assets/{chunk-EDXVE4YY-CF6P1HJI.js → chunk-EDXVE4YY-59RlsQG_.js} +1 -1
- package/dist/client/assets/{chunk-FMBD7UC4-DYrffXxC.js → chunk-FMBD7UC4-Hi26IR8N.js} +1 -1
- package/dist/client/assets/{chunk-OYMX7WX6-ggkv39bf.js → chunk-OYMX7WX6-BRgJcTlv.js} +1 -1
- package/dist/client/assets/{chunk-QZHKN3VN-DfsoMKS1.js → chunk-QZHKN3VN-BRc2Mimo.js} +1 -1
- package/dist/client/assets/{chunk-YZCP3GAM-nK3fd1vK.js → chunk-YZCP3GAM-CpPUsJ-2.js} +1 -1
- package/dist/client/assets/classDiagram-6PBFFD2Q-CrjH2VLS.js +1 -0
- package/dist/client/assets/classDiagram-v2-HSJHXN6E-CrjH2VLS.js +1 -0
- package/dist/client/assets/clone-CSapyzZ9.js +1 -0
- package/dist/client/assets/{cose-bilkent-S5V4N54A-BXTuHPIj.js → cose-bilkent-S5V4N54A-CU7M4-h6.js} +1 -1
- package/dist/client/assets/{dagre-KV5264BT-Bz4nIBUS.js → dagre-KV5264BT-DsP2pvSV.js} +1 -1
- package/dist/client/assets/{diagram-5BDNPKRD-ByqgG2sy.js → diagram-5BDNPKRD-BIsHIEFX.js} +1 -1
- package/dist/client/assets/{diagram-G4DWMVQ6-D6Bh5CCC.js → diagram-G4DWMVQ6-kszOBtB4.js} +1 -1
- package/dist/client/assets/{diagram-MMDJMWI5-CfDQLuVW.js → diagram-MMDJMWI5-Cn5sUEtw.js} +1 -1
- package/dist/client/assets/{diagram-TYMM5635-KI98IUyc.js → diagram-TYMM5635-CDdfKXq-.js} +1 -1
- package/dist/client/assets/{erDiagram-SMLLAGMA-CqprUEiC.js → erDiagram-SMLLAGMA-CI6i4IOF.js} +1 -1
- package/dist/client/assets/{flowDiagram-DWJPFMVM-ABvSPDqG.js → flowDiagram-DWJPFMVM-7foBBYZ0.js} +1 -1
- package/dist/client/assets/{ganttDiagram-T4ZO3ILL-Dsx-U_Nn.js → ganttDiagram-T4ZO3ILL-BtCT8Kyl.js} +1 -1
- package/dist/client/assets/{gitGraphDiagram-UUTBAWPF-BSUFEUnR.js → gitGraphDiagram-UUTBAWPF-BnG43YXm.js} +1 -1
- package/dist/client/assets/{graph-CzNfjcWq.js → graph-BJfoQM9L.js} +1 -1
- package/dist/client/assets/index-BQvUTYMt.js +482 -0
- package/dist/client/assets/index-DpllFOQw.css +1 -0
- package/dist/client/assets/{infoDiagram-42DDH7IO-Ds0ENS7R.js → infoDiagram-42DDH7IO-fSjQnpO3.js} +1 -1
- package/dist/client/assets/{ishikawaDiagram-UXIWVN3A-B18YRUdD.js → ishikawaDiagram-UXIWVN3A-CikjAzZU.js} +1 -1
- package/dist/client/assets/{journeyDiagram-VCZTEJTY-BupFc-Zd.js → journeyDiagram-VCZTEJTY-CXlhn41B.js} +1 -1
- package/dist/client/assets/{kanban-definition-6JOO6SKY-BSLofAt_.js → kanban-definition-6JOO6SKY-ZSgxxWjz.js} +1 -1
- package/dist/client/assets/{layout-Dv50_a5m.js → layout-Cn9VNxzb.js} +1 -1
- package/dist/client/assets/{linear-BrKghOcX.js → linear-D-4NsXnb.js} +1 -1
- package/dist/client/assets/{mermaid.core-CxEBNiNY.js → mermaid.core-DIF6Bqhc.js} +4 -4
- package/dist/client/assets/{min-CCGzVC9y.js → min-BO2TWSJi.js} +1 -1
- package/dist/client/assets/{mindmap-definition-QFDTVHPH-BrgndQgy.js → mindmap-definition-QFDTVHPH-Bmigbv3o.js} +1 -1
- package/dist/client/assets/{pieDiagram-DEJITSTG-DaQb845q.js → pieDiagram-DEJITSTG-56EjQ8_u.js} +1 -1
- package/dist/client/assets/{quadrantDiagram-34T5L4WZ-BKqKJrUA.js → quadrantDiagram-34T5L4WZ-B-mdpysI.js} +1 -1
- package/dist/client/assets/{requirementDiagram-MS252O5E-DDEiXfFB.js → requirementDiagram-MS252O5E-C-16L-rK.js} +1 -1
- package/dist/client/assets/{sankeyDiagram-XADWPNL6-Bz8ZuIVc.js → sankeyDiagram-XADWPNL6-Dpi8Xvd6.js} +1 -1
- package/dist/client/assets/{sequenceDiagram-FGHM5R23-DIKllaFC.js → sequenceDiagram-FGHM5R23-Bb2L9XDw.js} +1 -1
- package/dist/client/assets/{stateDiagram-FHFEXIEX-DVGXi05S.js → stateDiagram-FHFEXIEX-z1AMjFur.js} +1 -1
- package/dist/client/assets/stateDiagram-v2-QKLJ7IA2-CKmEKJLy.js +1 -0
- package/dist/client/assets/{timeline-definition-GMOUNBTQ-BysxZqEH.js → timeline-definition-GMOUNBTQ-DHXjAJin.js} +1 -1
- package/dist/client/assets/{vennDiagram-DHZGUBPP-zKrKFH0U.js → vennDiagram-DHZGUBPP-Cw9QDGZk.js} +1 -1
- package/dist/client/assets/{wardley-RL74JXVD-Bfs1dQE_.js → wardley-RL74JXVD-CDHq7H5N.js} +1 -1
- package/dist/client/assets/{wardleyDiagram-NUSXRM2D-9Nv_Fl4e.js → wardleyDiagram-NUSXRM2D-B0P1pItE.js} +1 -1
- package/dist/client/assets/{xychartDiagram-5P7HB3ND-BxnDNWHU.js → xychartDiagram-5P7HB3ND-B5jXRxLe.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/fleet-plugins/terminal/routes.mjs +148 -110
- package/package.json +1 -1
- package/dist/client/assets/channel-Cy7Wdt-y.js +0 -1
- package/dist/client/assets/classDiagram-6PBFFD2Q-BXKZy3mo.js +0 -1
- package/dist/client/assets/classDiagram-v2-HSJHXN6E-BXKZy3mo.js +0 -1
- package/dist/client/assets/clone-BaDkZwuY.js +0 -1
- package/dist/client/assets/index-DJz5h6Wn.js +0 -482
- package/dist/client/assets/index-DuMyAui7.css +0 -1
- package/dist/client/assets/stateDiagram-v2-QKLJ7IA2-BpjJbYdv.js +0 -1
|
@@ -32221,15 +32221,15 @@ var DEEP_DIVE2 = {
|
|
|
32221
32221
|
name: "Deep Dive",
|
|
32222
32222
|
prompt: String.raw`## Deep Dive Standing Order
|
|
32223
32223
|
|
|
32224
|
-
A cross-cutting verification procedure
|
|
32224
|
+
A cross-cutting verification procedure. It is not a phase of its own — it interrupts the current step, runs to completion, and then resumes that step. Throughout, never flatten uncertainty into confident-sounding summaries — preserve and surface ambiguity honestly.
|
|
32225
32225
|
|
|
32226
32226
|
### Trigger
|
|
32227
|
-
|
|
32227
|
+
Entry is routed by the Result Integrity trigger mapping table. This order owns unverified claims only; ambiguity or thin evidence is a confidence gap and re-enters Context Confidence instead.
|
|
32228
32228
|
|
|
32229
32229
|
### Procedure
|
|
32230
|
-
1. **
|
|
32231
|
-
2. **
|
|
32232
|
-
-
|
|
32230
|
+
1. **Choose the scan.** Scan it yourself when the result is short and confined to ground already read this session; give it its own run otherwise. These are alternatives, not steps.
|
|
32231
|
+
2. **Run that scan.** Yours sweeps for speculation markers (e.g., "likely", "probably", "I think", "may be", "not sure but…"). Its own run gets explicit instructions:
|
|
32232
|
+
- *"Review the following analysis for speculative, assumed, or unverified claims. Flag each with evidence of why it is speculative and what verification is needed."*
|
|
32233
32233
|
3. **Follow-up verification** — For each identified speculative element, start a verification run that seeks independent confirmation or refutation.
|
|
32234
32234
|
4. **Repeat** until all speculative elements are either **confirmed with evidence** or explicitly flagged as **unresolvable unknowns**.
|
|
32235
32235
|
|
|
@@ -36982,7 +36982,9 @@ function projectClaudeContextInputTokens(inputTokens, advertisedContextWindow, u
|
|
|
36982
36982
|
);
|
|
36983
36983
|
}
|
|
36984
36984
|
async function* projectAnthropicResponseUsage(chunks, options) {
|
|
36985
|
-
|
|
36985
|
+
const contextWindow = canProjectClaudeContextWindow(options.contextWindow) ? options.contextWindow : void 0;
|
|
36986
|
+
const responseModel = typeof options.responseModel === "string" && options.responseModel.length > 0 ? options.responseModel : void 0;
|
|
36987
|
+
if (contextWindow === void 0 && responseModel === void 0) {
|
|
36986
36988
|
yield* chunks;
|
|
36987
36989
|
return;
|
|
36988
36990
|
}
|
|
@@ -36990,7 +36992,8 @@ async function* projectAnthropicResponseUsage(chunks, options) {
|
|
|
36990
36992
|
if (mediaType === "text/event-stream") {
|
|
36991
36993
|
yield* projectSseUsage(
|
|
36992
36994
|
chunks,
|
|
36993
|
-
|
|
36995
|
+
contextWindow,
|
|
36996
|
+
responseModel,
|
|
36994
36997
|
positiveLimit(options.maxSseFrameBytes, DEFAULT_MAX_SSE_FRAME_BYTES)
|
|
36995
36998
|
);
|
|
36996
36999
|
return;
|
|
@@ -36998,14 +37001,15 @@ async function* projectAnthropicResponseUsage(chunks, options) {
|
|
|
36998
37001
|
if (mediaType === "application/json" || mediaType?.endsWith("+json")) {
|
|
36999
37002
|
yield* projectJsonUsage(
|
|
37000
37003
|
chunks,
|
|
37001
|
-
|
|
37004
|
+
contextWindow,
|
|
37005
|
+
responseModel,
|
|
37002
37006
|
positiveLimit(options.maxJsonBytes, DEFAULT_MAX_JSON_BYTES)
|
|
37003
37007
|
);
|
|
37004
37008
|
return;
|
|
37005
37009
|
}
|
|
37006
37010
|
yield* chunks;
|
|
37007
37011
|
}
|
|
37008
|
-
async function* projectJsonUsage(chunks, contextWindow, maxBytes) {
|
|
37012
|
+
async function* projectJsonUsage(chunks, contextWindow, responseModel, maxBytes) {
|
|
37009
37013
|
const buffered = [];
|
|
37010
37014
|
let bufferedBytes = 0;
|
|
37011
37015
|
let passthrough = false;
|
|
@@ -37025,10 +37029,10 @@ async function* projectJsonUsage(chunks, contextWindow, maxBytes) {
|
|
|
37025
37029
|
}
|
|
37026
37030
|
if (passthrough || bufferedBytes === 0) return;
|
|
37027
37031
|
const original = concatChunks(buffered, bufferedBytes);
|
|
37028
|
-
const projected = projectJsonBytes(original, contextWindow);
|
|
37032
|
+
const projected = projectJsonBytes(original, contextWindow, responseModel);
|
|
37029
37033
|
yield projected ?? original;
|
|
37030
37034
|
}
|
|
37031
|
-
async function* projectSseUsage(chunks, contextWindow, maxFrameBytes) {
|
|
37035
|
+
async function* projectSseUsage(chunks, contextWindow, responseModel, maxFrameBytes) {
|
|
37032
37036
|
let buffered = new Uint8Array(0);
|
|
37033
37037
|
let oversizedFrame = false;
|
|
37034
37038
|
for await (const chunk of chunks) {
|
|
@@ -37055,7 +37059,7 @@ async function* projectSseUsage(chunks, contextWindow, maxFrameBytes) {
|
|
|
37055
37059
|
const frame = buffered.slice(0, separator.index);
|
|
37056
37060
|
const separatorBytes = buffered.slice(separator.index, separator.index + separator.length);
|
|
37057
37061
|
const originalFrame = buffered.slice(0, separator.index + separator.length);
|
|
37058
|
-
const projectedFrame = frame.byteLength > maxFrameBytes ? void 0 : projectSseFrame(frame, contextWindow);
|
|
37062
|
+
const projectedFrame = frame.byteLength > maxFrameBytes ? void 0 : projectSseFrame(frame, contextWindow, responseModel);
|
|
37059
37063
|
yield projectedFrame === void 0 ? originalFrame : concatBytes(projectedFrame, separatorBytes);
|
|
37060
37064
|
buffered = buffered.slice(separator.index + separator.length);
|
|
37061
37065
|
}
|
|
@@ -37069,17 +37073,17 @@ async function* projectSseUsage(chunks, contextWindow, maxFrameBytes) {
|
|
|
37069
37073
|
}
|
|
37070
37074
|
if (buffered.byteLength > 0) yield buffered;
|
|
37071
37075
|
}
|
|
37072
|
-
function projectJsonBytes(bytes, contextWindow) {
|
|
37076
|
+
function projectJsonBytes(bytes, contextWindow, responseModel) {
|
|
37073
37077
|
let parsed;
|
|
37074
37078
|
try {
|
|
37075
37079
|
parsed = JSON.parse(new TextDecoder("utf-8", { fatal: true }).decode(bytes));
|
|
37076
37080
|
} catch {
|
|
37077
37081
|
return void 0;
|
|
37078
37082
|
}
|
|
37079
|
-
const projected = projectAnthropicUsageEnvelope(parsed, contextWindow);
|
|
37083
|
+
const projected = projectAnthropicUsageEnvelope(parsed, contextWindow, responseModel);
|
|
37080
37084
|
return projected.changed ? new TextEncoder().encode(JSON.stringify(projected.value)) : void 0;
|
|
37081
37085
|
}
|
|
37082
|
-
function projectSseFrame(frame, contextWindow) {
|
|
37086
|
+
function projectSseFrame(frame, contextWindow, responseModel) {
|
|
37083
37087
|
let text2;
|
|
37084
37088
|
try {
|
|
37085
37089
|
text2 = new TextDecoder("utf-8", { fatal: true }).decode(frame);
|
|
@@ -37105,7 +37109,7 @@ function projectSseFrame(frame, contextWindow) {
|
|
|
37105
37109
|
} catch {
|
|
37106
37110
|
return void 0;
|
|
37107
37111
|
}
|
|
37108
|
-
const projected = projectAnthropicUsageEnvelope(parsed, contextWindow);
|
|
37112
|
+
const projected = projectAnthropicUsageEnvelope(parsed, contextWindow, responseModel);
|
|
37109
37113
|
if (!projected.changed) return void 0;
|
|
37110
37114
|
const firstDataIndex = dataIndexes[0];
|
|
37111
37115
|
const dataIndexSet = new Set(dataIndexes);
|
|
@@ -37119,20 +37123,33 @@ function projectSseFrame(frame, contextWindow) {
|
|
|
37119
37123
|
}
|
|
37120
37124
|
return new TextEncoder().encode(outputLines.join(newline2));
|
|
37121
37125
|
}
|
|
37122
|
-
function projectAnthropicUsageEnvelope(value, contextWindow) {
|
|
37126
|
+
function projectAnthropicUsageEnvelope(value, contextWindow, responseModel) {
|
|
37123
37127
|
if (!isRecord4(value)) return { changed: false, value };
|
|
37124
37128
|
let projectedValue = value;
|
|
37125
37129
|
let changed = false;
|
|
37126
|
-
|
|
37127
|
-
|
|
37128
|
-
|
|
37129
|
-
|
|
37130
|
+
if (contextWindow !== void 0) {
|
|
37131
|
+
const topLevelUsage = projectUsageProperty(projectedValue, "usage", contextWindow);
|
|
37132
|
+
if (topLevelUsage.changed) {
|
|
37133
|
+
projectedValue = topLevelUsage.value;
|
|
37134
|
+
changed = true;
|
|
37135
|
+
}
|
|
37136
|
+
const message = projectedValue.message;
|
|
37137
|
+
if (isRecord4(message)) {
|
|
37138
|
+
const messageUsage = projectUsageProperty(message, "usage", contextWindow);
|
|
37139
|
+
if (messageUsage.changed) {
|
|
37140
|
+
projectedValue = { ...projectedValue, message: messageUsage.value };
|
|
37141
|
+
changed = true;
|
|
37142
|
+
}
|
|
37143
|
+
}
|
|
37130
37144
|
}
|
|
37131
|
-
|
|
37132
|
-
|
|
37133
|
-
|
|
37134
|
-
|
|
37135
|
-
|
|
37145
|
+
if (responseModel !== void 0) {
|
|
37146
|
+
if (typeof projectedValue.model === "string" && projectedValue.model !== responseModel) {
|
|
37147
|
+
projectedValue = { ...projectedValue, model: responseModel };
|
|
37148
|
+
changed = true;
|
|
37149
|
+
}
|
|
37150
|
+
const message = projectedValue.message;
|
|
37151
|
+
if (isRecord4(message) && typeof message.model === "string" && message.model !== responseModel) {
|
|
37152
|
+
projectedValue = { ...projectedValue, message: { ...message, model: responseModel } };
|
|
37136
37153
|
changed = true;
|
|
37137
37154
|
}
|
|
37138
37155
|
}
|
|
@@ -37754,7 +37771,6 @@ function gatewayModelIdentity(model) {
|
|
|
37754
37771
|
function buildGatewayModelConstraints(model) {
|
|
37755
37772
|
const ladder = model.effort.supported ? model.effort.levels.filter((level) => ANTHROPIC_EFFORT_RUNGS.has(level)) : [];
|
|
37756
37773
|
return {
|
|
37757
|
-
identity: gatewayModelIdentity(model),
|
|
37758
37774
|
provider: model.provider,
|
|
37759
37775
|
...model.contextWindow !== void 0 ? { contextWindow: model.contextWindow } : {},
|
|
37760
37776
|
effortLadder: Object.freeze([...ladder]),
|
|
@@ -43350,6 +43366,65 @@ function createOpencodeGoAdapter(wire, options = {}) {
|
|
|
43350
43366
|
});
|
|
43351
43367
|
}
|
|
43352
43368
|
|
|
43369
|
+
// ../../packages/fleet-admiral/src/agent-cli/gateway-agents.ts
|
|
43370
|
+
var GENERAL_PURPOSE_AGENT_PROMPT = [
|
|
43371
|
+
"You are a Fleet execution agent. Do the assigned work directly; do not re-delegate the whole assignment.",
|
|
43372
|
+
'Treat host objective/scope/constraints/references as binding contracts. Do not silently re-plan, expand scope, or substitute a "cleaner" design \u2014 finish as instructed, then optionally suggest alternatives. On ambiguity or conflict, stop and report the blocker instead of guessing.',
|
|
43373
|
+
"",
|
|
43374
|
+
"Pick ONE mode from the task and stay in it:",
|
|
43375
|
+
"- recon: read-only facts; least-invasive evidence path; cite path:line",
|
|
43376
|
+
"- decide: read-only; one simplest viable recommendation; no implementation checklist",
|
|
43377
|
+
"- implement: edit within scope; verify what you changed; report compliance and any deviations",
|
|
43378
|
+
"- verify: hunt real defects with evidence+impact; PASS/FAIL; fix only if asked",
|
|
43379
|
+
"",
|
|
43380
|
+
"Search only as needed for the chosen mode. Prefer known paths over broad sweeps. Do not default to exhaustive multi-strategy hunting.",
|
|
43381
|
+
"NEVER create files unless they are absolutely necessary. ALWAYS prefer editing an existing file to creating a new one.",
|
|
43382
|
+
"NEVER proactively create documentation files (*.md) or README files. Only create documentation files if explicitly requested.",
|
|
43383
|
+
"Final reply: concise essentials only \u2014 mode, what changed or found, key evidence (path:line when relevant), and blockers/deviations."
|
|
43384
|
+
].join("\n");
|
|
43385
|
+
function buildGatewayCustomAgents(exposed) {
|
|
43386
|
+
const agents = {};
|
|
43387
|
+
for (const model of exposed) {
|
|
43388
|
+
const modelId = toClaudeGatewayModelId(model);
|
|
43389
|
+
const constraints = buildGatewayModelConstraints(model);
|
|
43390
|
+
if (constraints.effortSupported) {
|
|
43391
|
+
for (const effort of constraints.effortLadder) {
|
|
43392
|
+
const name2 = toGatewayAgentName(modelId, effort);
|
|
43393
|
+
agents[name2] = {
|
|
43394
|
+
description: gatewayAgentDescription(modelId, name2, effort),
|
|
43395
|
+
prompt: GENERAL_PURPOSE_AGENT_PROMPT,
|
|
43396
|
+
model: modelId,
|
|
43397
|
+
effort
|
|
43398
|
+
};
|
|
43399
|
+
}
|
|
43400
|
+
continue;
|
|
43401
|
+
}
|
|
43402
|
+
const name = toGatewayAgentName(modelId);
|
|
43403
|
+
agents[name] = {
|
|
43404
|
+
description: gatewayAgentDescription(modelId, name),
|
|
43405
|
+
prompt: GENERAL_PURPOSE_AGENT_PROMPT,
|
|
43406
|
+
model: modelId
|
|
43407
|
+
};
|
|
43408
|
+
}
|
|
43409
|
+
return agents;
|
|
43410
|
+
}
|
|
43411
|
+
function toGatewayAgentName(modelId, effort) {
|
|
43412
|
+
const stripped = modelId.startsWith("claude-gateway--") ? modelId.slice("claude-gateway--".length) : modelId;
|
|
43413
|
+
const base = stripped.replace(/\[1m\]/g, "-1m").replace(/[^A-Za-z0-9]+/g, "-").replace(/^-+|-+$/g, "").toLowerCase();
|
|
43414
|
+
const stem = base.length > 0 ? base : "model";
|
|
43415
|
+
return effort === void 0 ? stem : `${stem}-${effort}`;
|
|
43416
|
+
}
|
|
43417
|
+
function gatewayAgentDescription(modelId, name, effort) {
|
|
43418
|
+
const effortPart = effort === void 0 ? "no effort control" : `effort ${effort}`;
|
|
43419
|
+
return [
|
|
43420
|
+
`Gateway model ${modelId}, ${effortPart}.`,
|
|
43421
|
+
"Fleet execution agent that runs one mode \u2014 recon, decide, implement, or verify. Name the mode in the task.",
|
|
43422
|
+
"Use after calling gateway_models when this roster entry fits the stage.",
|
|
43423
|
+
`Select this identity by the agent type name ${name}. The model id above is a value for a model field and is rejected wherever a name is expected.`,
|
|
43424
|
+
...effort === void 0 ? [] : [`That name already carries ${effort}, so pinning a reasoning effort alongside it is redundant.`]
|
|
43425
|
+
].join(" ");
|
|
43426
|
+
}
|
|
43427
|
+
|
|
43353
43428
|
// ../../packages/fleet-admiral/src/ai-gateway/role-fit.ts
|
|
43354
43429
|
var ROLE_FIT = Object.freeze({
|
|
43355
43430
|
"codex::gpt-5.6-sol": Object.freeze({
|
|
@@ -43415,32 +43490,49 @@ function gatewayRoleFit(identity) {
|
|
|
43415
43490
|
var UNSUPPORTED_QUOTA = Object.freeze({ status: "unsupported" });
|
|
43416
43491
|
var PARENT_PROVIDER_ID = "claude";
|
|
43417
43492
|
function buildGatewayLoadout(input) {
|
|
43418
|
-
const
|
|
43493
|
+
const placed = input.exposed.map((model) => ({
|
|
43494
|
+
provider: model.provider,
|
|
43495
|
+
entry: toLoadoutModel(model, input.defaultModel)
|
|
43496
|
+
}));
|
|
43419
43497
|
return {
|
|
43420
|
-
revision: loadoutRevision(
|
|
43498
|
+
revision: loadoutRevision(placed.map(({ entry }) => entry)),
|
|
43421
43499
|
catalogUpdatedAt: GATEWAY_MODELS_UPDATED_AT,
|
|
43422
|
-
|
|
43423
|
-
providers: buildProviders(input.exposed, input.quota, input.now ?? Date.now)
|
|
43500
|
+
providers: buildProviders(placed, input.quota, input.now ?? Date.now)
|
|
43424
43501
|
};
|
|
43425
43502
|
}
|
|
43426
43503
|
function toLoadoutModel(model, defaultModel) {
|
|
43504
|
+
const modelId = toClaudeGatewayModelId(model);
|
|
43505
|
+
const { provider: _provider, ...constraints } = buildGatewayModelConstraints(model);
|
|
43427
43506
|
return {
|
|
43428
|
-
|
|
43429
|
-
|
|
43430
|
-
constraints
|
|
43507
|
+
agentTypes: toAgentTypeSelectors(modelId, constraints),
|
|
43508
|
+
modelId,
|
|
43509
|
+
constraints,
|
|
43431
43510
|
roleFit: gatewayRoleFit(gatewayModelIdentity(model)) ?? null,
|
|
43432
43511
|
isSessionDefault: defaultModel !== void 0 && defaultModel.id === model.id
|
|
43433
43512
|
};
|
|
43434
43513
|
}
|
|
43435
|
-
function
|
|
43514
|
+
function toAgentTypeSelectors(id, constraints) {
|
|
43515
|
+
if (!constraints.effortSupported) {
|
|
43516
|
+
return Object.freeze({ none: toGatewayAgentName(id) });
|
|
43517
|
+
}
|
|
43518
|
+
return Object.freeze(Object.fromEntries(
|
|
43519
|
+
constraints.effortLadder.map((effort) => [effort, toGatewayAgentName(id, effort)])
|
|
43520
|
+
));
|
|
43521
|
+
}
|
|
43522
|
+
function buildProviders(placed, quota, now) {
|
|
43436
43523
|
const ids = [PARENT_PROVIDER_ID];
|
|
43437
|
-
for (const
|
|
43438
|
-
if (!ids.includes(
|
|
43524
|
+
for (const { provider } of placed) {
|
|
43525
|
+
if (!ids.includes(provider)) ids.push(provider);
|
|
43439
43526
|
}
|
|
43440
43527
|
for (const id of Object.keys(quota ?? {})) {
|
|
43441
43528
|
if (!ids.includes(id)) ids.push(id);
|
|
43442
43529
|
}
|
|
43443
|
-
return ids.map((id) =>
|
|
43530
|
+
return Object.freeze(Object.fromEntries(ids.map((id) => [id, {
|
|
43531
|
+
quota: enrichProviderQuota(quota?.[id], now) ?? UNSUPPORTED_QUOTA,
|
|
43532
|
+
models: Object.freeze(
|
|
43533
|
+
placed.filter((candidate) => candidate.provider === id).map(({ entry }) => entry)
|
|
43534
|
+
)
|
|
43535
|
+
}])));
|
|
43444
43536
|
}
|
|
43445
43537
|
var MS_PER_HOUR = 36e5;
|
|
43446
43538
|
var CADENCE_SESSION_MAX_MS = 20 * MS_PER_HOUR;
|
|
@@ -43506,7 +43598,7 @@ function enrichQuotaWindow(window, at) {
|
|
|
43506
43598
|
function loadoutRevision(models) {
|
|
43507
43599
|
const material = [
|
|
43508
43600
|
GATEWAY_MODELS_UPDATED_AT,
|
|
43509
|
-
...models.map((model) => `${model.
|
|
43601
|
+
...models.map((model) => `${model.modelId}:${model.isSessionDefault ? "1" : "0"}`).sort()
|
|
43510
43602
|
].join("\n");
|
|
43511
43603
|
return createHash("sha256").update(material).digest("hex").slice(0, 12);
|
|
43512
43604
|
}
|
|
@@ -43527,19 +43619,17 @@ var GATEWAY_MODELS_DOCTRINE = {
|
|
|
43527
43619
|
`Do not carry an earlier read forward as if it were still current. The revision tracks roster and default changes only, never allowance movement, so equal revisions do not mean equal quotas.`,
|
|
43528
43620
|
`Do not treat the response as a recommendation to act on unread. It reports facts; the choice and its justification stay with you.`
|
|
43529
43621
|
],
|
|
43622
|
+
// 이 목록은 필드 사전이 아니라 판정 규칙이다. 응답을 보면 알 수 있는 것은 빼고,
|
|
43623
|
+
// 틀리면 조용히 실패하는 것만 남긴다 — 길어질수록 읽히지 않고, 읽히지 않으면 없는 것과 같다.
|
|
43530
43624
|
usageGuidelines: [
|
|
43531
|
-
`
|
|
43532
|
-
`
|
|
43533
|
-
`
|
|
43534
|
-
`
|
|
43535
|
-
`
|
|
43536
|
-
`
|
|
43537
|
-
`
|
|
43538
|
-
`
|
|
43539
|
-
`An unpinned stage spends whatever this session is currently running on, so its provider is the baseline an offload is measured against. The roster cannot identify that provider \u2014 it is registered once per runtime and cannot see which model a given session launched with \u2014 so match it yourself against the model you are running, and read that provider's window.`,
|
|
43540
|
-
`isSessionDefault reflects what Settings currently designates, not necessarily what an already-running session launched with; the two diverge when the setting is changed mid-session.`,
|
|
43541
|
-
`constraints.homolineage marks a model sharing the parent session's lineage. It can move spend off that allowance, but adds no independence to a panel whose value comes from differing judgement.`,
|
|
43542
|
-
`constraints.identity collapses service-tier siblings, so a measurement recorded against one covers the other.`
|
|
43625
|
+
`Two spellings, never interchangeable. agentTypes names this identity once per reasoning rung, so selecting by name already carries the level and nothing further pins effort; modelId is the model as a value. Neither derives from the other \u2014 the transform behind a name collapses ".", "[1m]", and "--" all into "-". Prefer a name: a wrong name fails loudly, while modelId reaches whatever the catalog holds, including a model the user turned off, in silence.`,
|
|
43626
|
+
`Names are registered once at session start; this roster is re-read live. A model exposed mid-session therefore appears here under a name that will not resolve until a new session \u2014 that, and not a stale roster, is what an unknown-name failure means.`,
|
|
43627
|
+
`Each provider entry pairs one allowance with the exposed models it serves, so the window to read against a model is in the same entry. claude serves none by design: it is what an unpinned run spends, and the baseline an offload is measured against. A model in no entry is one the user turned off.`,
|
|
43628
|
+
`effortLadder is the whole set of levels that survive \u2014 anything outside it is clamped upstream with no signal, and some models have no effort control at all.`,
|
|
43629
|
+
`roleFit null means unmeasured, never unsuitable: quality then gives no reason to prefer an identity, so the choice falls to allowance and never back to this session's own model. homolineage marks shared lineage with that session \u2014 useful for moving spend, useless where independent judgement is the product.`,
|
|
43630
|
+
`Read pressure before doing arithmetic of your own; it is the verdict on one window, combining headroom with burn pace against that window's own clock, and it never says which model to choose. Compare usedPercent only within one cadence \u2014 a shared window id does not mean a shared length. Where a provider splits into pools, quotaScope picks the window that applies and the isAggregate one stays out of headroom math. recoveryHalfLifeMs prices the drain: weeks of lockout for a monthly window, hours for a session one.`,
|
|
43631
|
+
`Absence is never safety. A missing derived field means the reading could not support it, and status "unsupported" means the allowance could not be read at all.`,
|
|
43632
|
+
`The roster cannot tell which provider this session itself runs on \u2014 it is registered once per runtime \u2014 so make that match yourself and read that window. isSessionDefault reflects Settings as it stands now, not what an already-running session launched with.`
|
|
43543
43633
|
]
|
|
43544
43634
|
};
|
|
43545
43635
|
function buildGatewayModelsToolSpec(deps) {
|
|
@@ -43806,63 +43896,6 @@ function buildClaudeMcpConfig(servers) {
|
|
|
43806
43896
|
});
|
|
43807
43897
|
}
|
|
43808
43898
|
|
|
43809
|
-
// ../../packages/fleet-admiral/src/agent-cli/gateway-agents.ts
|
|
43810
|
-
var GENERAL_PURPOSE_AGENT_PROMPT = [
|
|
43811
|
-
"You are a Fleet execution agent. Do the assigned work directly; do not re-delegate the whole assignment.",
|
|
43812
|
-
'Treat host objective/scope/constraints/references as binding contracts. Do not silently re-plan, expand scope, or substitute a "cleaner" design \u2014 finish as instructed, then optionally suggest alternatives. On ambiguity or conflict, stop and report the blocker instead of guessing.',
|
|
43813
|
-
"",
|
|
43814
|
-
"Pick ONE mode from the task and stay in it:",
|
|
43815
|
-
"- recon: read-only facts; least-invasive evidence path; cite path:line",
|
|
43816
|
-
"- decide: read-only; one simplest viable recommendation; no implementation checklist",
|
|
43817
|
-
"- implement: edit within scope; verify what you changed; report compliance and any deviations",
|
|
43818
|
-
"- verify: hunt real defects with evidence+impact; PASS/FAIL; fix only if asked",
|
|
43819
|
-
"",
|
|
43820
|
-
"Search only as needed for the chosen mode. Prefer known paths over broad sweeps. Do not default to exhaustive multi-strategy hunting.",
|
|
43821
|
-
"NEVER create files unless they are absolutely necessary. ALWAYS prefer editing an existing file to creating a new one.",
|
|
43822
|
-
"NEVER proactively create documentation files (*.md) or README files. Only create documentation files if explicitly requested.",
|
|
43823
|
-
"Final reply: concise essentials only \u2014 mode, what changed or found, key evidence (path:line when relevant), and blockers/deviations."
|
|
43824
|
-
].join("\n");
|
|
43825
|
-
function buildGatewayCustomAgents(exposed) {
|
|
43826
|
-
const agents = {};
|
|
43827
|
-
for (const model of exposed) {
|
|
43828
|
-
const modelId = toClaudeGatewayModelId(model);
|
|
43829
|
-
const constraints = buildGatewayModelConstraints(model);
|
|
43830
|
-
if (constraints.effortSupported) {
|
|
43831
|
-
for (const effort of constraints.effortLadder) {
|
|
43832
|
-
const name2 = toGatewayAgentName(modelId, effort);
|
|
43833
|
-
agents[name2] = {
|
|
43834
|
-
description: gatewayAgentDescription(model, modelId, effort),
|
|
43835
|
-
prompt: GENERAL_PURPOSE_AGENT_PROMPT,
|
|
43836
|
-
model: modelId,
|
|
43837
|
-
effort
|
|
43838
|
-
};
|
|
43839
|
-
}
|
|
43840
|
-
continue;
|
|
43841
|
-
}
|
|
43842
|
-
const name = toGatewayAgentName(modelId);
|
|
43843
|
-
agents[name] = {
|
|
43844
|
-
description: gatewayAgentDescription(model, modelId),
|
|
43845
|
-
prompt: GENERAL_PURPOSE_AGENT_PROMPT,
|
|
43846
|
-
model: modelId
|
|
43847
|
-
};
|
|
43848
|
-
}
|
|
43849
|
-
return agents;
|
|
43850
|
-
}
|
|
43851
|
-
function toGatewayAgentName(modelId, effort) {
|
|
43852
|
-
const stripped = modelId.startsWith("claude-gateway--") ? modelId.slice("claude-gateway--".length) : modelId;
|
|
43853
|
-
const base = stripped.replace(/\[1m\]/g, "-1m").replace(/[^A-Za-z0-9]+/g, "-").replace(/^-+|-+$/g, "").toLowerCase();
|
|
43854
|
-
const stem = base.length > 0 ? base : "model";
|
|
43855
|
-
return effort === void 0 ? stem : `${stem}-${effort}`;
|
|
43856
|
-
}
|
|
43857
|
-
function gatewayAgentDescription(model, modelId, effort) {
|
|
43858
|
-
const effortPart = effort === void 0 ? "no effort control" : `effort ${effort}`;
|
|
43859
|
-
return [
|
|
43860
|
-
`Gateway model ${model.displayName} (${modelId}), ${effortPart}.`,
|
|
43861
|
-
"Fleet execution agent that runs one mode \u2014 recon, decide, implement, or verify. Name the mode in the task.",
|
|
43862
|
-
"Use after calling gateway_models when this roster entry fits the stage."
|
|
43863
|
-
].join(" ");
|
|
43864
|
-
}
|
|
43865
|
-
|
|
43866
43899
|
// ../../packages/fleet-admiral/src/agent-cli/assets.generated.ts
|
|
43867
43900
|
var EMBEDDED_AGENT_CLI_SKILL_ASSETS = [
|
|
43868
43901
|
{ relativePath: "assumption-audit/SKILL.md", content: "---\nname: assumption-audit\ndescription: Resolve decision-shaped blocking gaps one at a time \u2014 Context Confidence gate failures during an active protocol, or pre-engagement requirements ambiguity routed by the Command Integrity Standing Order.\n---\n\nUse this auxiliary skill only when a decision-shaped blocking gap has been found: either the active protocol or Context Confidence re-entry path surfaced it, or the Command Integrity Standing Order routed a pre-engagement requirements ambiguity here before a protocol mode loads. This skill is not a protocol mode, does not replace the active protocol, and cannot declare the planning boundary passed by itself.\n\nFor each unresolved blocking gap, triage the gap before questioning:\n\n- **Scout-shaped**: the answer should come from direct file reads, focused reconnaissance, carrier scouting, or another verifiable evidence source. Send the workflow back to that evidence-gathering path instead of asking the user to decide.\n- **Decision-shaped**: the answer depends on preference, scope, risk appetite, product intent, or authority that evidence alone cannot settle. Ask exactly one question for this gap.\n- **Escalation-shaped**: the answer requires authority beyond the current operator, changes the mission boundary, repeatedly fails to resolve, or would weaken the active protocol's required gate. Escalate to the user.\n\nWhen a gap is decision-shaped, ask one question at a time. Present your recommended answer first, then give one or two concrete alternatives when useful. Walk decision dependencies one branch at a time until the current gap is resolved; do not bundle unrelated gaps into the same question.\n\nAfter the gap is answered, report the resolved decision in one short line and return control to the caller: the active protocol or Context Confidence Standing Order on re-entry, or the Protocol Gate when invoked pre-engagement. An active workflow must re-evaluate confidence and re-apply the required planning boundary gate before planning proceeds.\n" },
|
|
@@ -56258,9 +56291,10 @@ async function proxyAnthropicMessages(res, body, options) {
|
|
|
56258
56291
|
return;
|
|
56259
56292
|
}
|
|
56260
56293
|
const rawBody = readResponseBody(upstream.body);
|
|
56261
|
-
const responseBody = options.contextWindow === void 0 ? rawBody : projectAnthropicResponseUsage(rawBody, {
|
|
56294
|
+
const responseBody = options.contextWindow === void 0 && options.responseModel === void 0 ? rawBody : projectAnthropicResponseUsage(rawBody, {
|
|
56262
56295
|
contentType: upstream.headers.get("content-type"),
|
|
56263
|
-
contextWindow: options.contextWindow
|
|
56296
|
+
contextWindow: options.contextWindow,
|
|
56297
|
+
responseModel: options.responseModel
|
|
56264
56298
|
});
|
|
56265
56299
|
for await (const chunk of responseBody) {
|
|
56266
56300
|
if (!res.write(chunk)) await drain(res);
|
|
@@ -56349,8 +56383,10 @@ async function proxyToOpencode(requestHeaders, res, body, model, contextWindow,
|
|
|
56349
56383
|
const value = requestHeaders[name];
|
|
56350
56384
|
if (typeof value === "string") headers[name] = value;
|
|
56351
56385
|
}
|
|
56386
|
+
const responseModel = typeof body.model === "string" ? body.model : void 0;
|
|
56352
56387
|
await proxyAnthropicMessages(res, opencodeRequestBody(body, model), {
|
|
56353
56388
|
contextWindow,
|
|
56389
|
+
responseModel,
|
|
56354
56390
|
fetchImpl,
|
|
56355
56391
|
headers,
|
|
56356
56392
|
signal,
|
|
@@ -56589,8 +56625,10 @@ async function proxyToKimi(requestHeaders, res, body, model, contextWindow, apiK
|
|
|
56589
56625
|
const value = requestHeaders[name];
|
|
56590
56626
|
if (typeof value === "string") headers[name] = value;
|
|
56591
56627
|
}
|
|
56628
|
+
const responseModel = typeof body.model === "string" ? body.model : void 0;
|
|
56592
56629
|
await proxyAnthropicMessages(res, kimiRequestBody(body, model), {
|
|
56593
56630
|
contextWindow,
|
|
56631
|
+
responseModel,
|
|
56594
56632
|
fetchImpl,
|
|
56595
56633
|
headers,
|
|
56596
56634
|
signal,
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ap as o,aq as n}from"./mermaid.core-CxEBNiNY.js";const t=(a,r)=>o.lang.round(n.parse(a)[r]);export{t as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as a,c as s,a as e,C as t}from"./chunk-4TB4RGXK-BVvGheRq.js";import{_ as i}from"./mermaid.core-CxEBNiNY.js";import"./chunk-FMBD7UC4-DYrffXxC.js";import"./chunk-YZCP3GAM-nK3fd1vK.js";import"./chunk-55IACEB6-BKBu793s.js";import"./chunk-EDXVE4YY-CF6P1HJI.js";import"./index-DJz5h6Wn.js";var n={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{n as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as a,c as s,a as e,C as t}from"./chunk-4TB4RGXK-BVvGheRq.js";import{_ as i}from"./mermaid.core-CxEBNiNY.js";import"./chunk-FMBD7UC4-DYrffXxC.js";import"./chunk-YZCP3GAM-nK3fd1vK.js";import"./chunk-55IACEB6-BKBu793s.js";import"./chunk-EDXVE4YY-CF6P1HJI.js";import"./index-DJz5h6Wn.js";var n={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{n as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as r}from"./graph-CzNfjcWq.js";var e=4;function a(o){return r(o,e)}export{a as c};
|