@dotobokuri/fleet-console 1.65.0 → 1.67.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.
Files changed (66) hide show
  1. package/dist/cli.mjs +137 -4
  2. package/dist/client/assets/{_baseUniq-DyzqDsbR.js → _baseUniq-DG32CEpb.js} +1 -1
  3. package/dist/client/assets/{arc-D9PB38OE.js → arc-CoHkSCMF.js} +1 -1
  4. package/dist/client/assets/{architectureDiagram-Q4EWVU46-0L3Tlker.js → architectureDiagram-Q4EWVU46-f0RKHqJg.js} +1 -1
  5. package/dist/client/assets/{blockDiagram-DXYQGD6D-BCAdqHmo.js → blockDiagram-DXYQGD6D-Dxb3hLAV.js} +1 -1
  6. package/dist/client/assets/{c4Diagram-AHTNJAMY-oK3f-N6i.js → c4Diagram-AHTNJAMY-C5q_ahSd.js} +1 -1
  7. package/dist/client/assets/channel-C-Qx-Oi-.js +1 -0
  8. package/dist/client/assets/{chunk-4BX2VUAB-CIYxtKO7.js → chunk-4BX2VUAB-BS0W4Fpt.js} +1 -1
  9. package/dist/client/assets/{chunk-4TB4RGXK-CKA_-tPR.js → chunk-4TB4RGXK-p03eWKTO.js} +1 -1
  10. package/dist/client/assets/{chunk-55IACEB6-ArIbE5m1.js → chunk-55IACEB6-BB1ALVX2.js} +1 -1
  11. package/dist/client/assets/{chunk-EDXVE4YY-bGzMBuDL.js → chunk-EDXVE4YY-DV4N-Npm.js} +1 -1
  12. package/dist/client/assets/{chunk-FMBD7UC4-CZUkX3ry.js → chunk-FMBD7UC4-Da8VspnD.js} +1 -1
  13. package/dist/client/assets/{chunk-OYMX7WX6-CNXmIVXX.js → chunk-OYMX7WX6-CWTmAQhy.js} +1 -1
  14. package/dist/client/assets/{chunk-QZHKN3VN-B3t4h1MD.js → chunk-QZHKN3VN-DE9xUsy3.js} +1 -1
  15. package/dist/client/assets/{chunk-YZCP3GAM-CdGF0f8H.js → chunk-YZCP3GAM-BxriNNdB.js} +1 -1
  16. package/dist/client/assets/classDiagram-6PBFFD2Q-DA7e8Mft.js +1 -0
  17. package/dist/client/assets/classDiagram-v2-HSJHXN6E-DA7e8Mft.js +1 -0
  18. package/dist/client/assets/clone-Rpb38n4i.js +1 -0
  19. package/dist/client/assets/{cose-bilkent-S5V4N54A-BESjfcni.js → cose-bilkent-S5V4N54A-B4sjskIn.js} +1 -1
  20. package/dist/client/assets/{dagre-KV5264BT-WpQhPw2a.js → dagre-KV5264BT-oJms5aS3.js} +1 -1
  21. package/dist/client/assets/{diagram-5BDNPKRD-BfAkutIX.js → diagram-5BDNPKRD-BAbLGddM.js} +1 -1
  22. package/dist/client/assets/{diagram-G4DWMVQ6-C9I16SLL.js → diagram-G4DWMVQ6-BrhRQwe-.js} +1 -1
  23. package/dist/client/assets/{diagram-MMDJMWI5-CVJMM2zJ.js → diagram-MMDJMWI5-Buxu7Ng3.js} +1 -1
  24. package/dist/client/assets/{diagram-TYMM5635-DTqr7jJ3.js → diagram-TYMM5635-Cnp__7LJ.js} +1 -1
  25. package/dist/client/assets/{erDiagram-SMLLAGMA-B09ElCdB.js → erDiagram-SMLLAGMA-ctmZHrVO.js} +1 -1
  26. package/dist/client/assets/{flowDiagram-DWJPFMVM-C93jg-t6.js → flowDiagram-DWJPFMVM-DsQXJqF_.js} +1 -1
  27. package/dist/client/assets/{ganttDiagram-T4ZO3ILL-5Js2lpdY.js → ganttDiagram-T4ZO3ILL-SAFJNY9M.js} +1 -1
  28. package/dist/client/assets/{gitGraphDiagram-UUTBAWPF-BxGzg1Rc.js → gitGraphDiagram-UUTBAWPF-Bd5Dq0vQ.js} +1 -1
  29. package/dist/client/assets/{graph-BkRyh4eN.js → graph-DzMOPhFp.js} +1 -1
  30. package/dist/client/assets/index-BLA_qnPk.css +1 -0
  31. package/dist/client/assets/index-CGE8u6Es.js +465 -0
  32. package/dist/client/assets/{infoDiagram-42DDH7IO-DZPp1lR6.js → infoDiagram-42DDH7IO-BrEfG9P4.js} +1 -1
  33. package/dist/client/assets/{ishikawaDiagram-UXIWVN3A-CXTuQ2Bb.js → ishikawaDiagram-UXIWVN3A-Dg22orvH.js} +1 -1
  34. package/dist/client/assets/{journeyDiagram-VCZTEJTY--u6tYqhF.js → journeyDiagram-VCZTEJTY-DEcjEc6c.js} +1 -1
  35. package/dist/client/assets/{kanban-definition-6JOO6SKY-CGMEohiQ.js → kanban-definition-6JOO6SKY-C2Xa4znN.js} +1 -1
  36. package/dist/client/assets/{layout-Bzu8ET7F.js → layout-B7E_-0ev.js} +1 -1
  37. package/dist/client/assets/{linear-B6htRUTP.js → linear-BXJsh3FL.js} +1 -1
  38. package/dist/client/assets/{mermaid.core-CtpLAI-c.js → mermaid.core-CdZpLnyY.js} +4 -4
  39. package/dist/client/assets/{min-CEURoL5k.js → min-CEAFFcJY.js} +1 -1
  40. package/dist/client/assets/{mindmap-definition-QFDTVHPH-B-HiXlEN.js → mindmap-definition-QFDTVHPH-iXzcnu1C.js} +1 -1
  41. package/dist/client/assets/{pieDiagram-DEJITSTG-DQgiLkTU.js → pieDiagram-DEJITSTG-CdRN75ad.js} +1 -1
  42. package/dist/client/assets/{quadrantDiagram-34T5L4WZ-xLh7CKRW.js → quadrantDiagram-34T5L4WZ-Dscl0EFH.js} +1 -1
  43. package/dist/client/assets/{requirementDiagram-MS252O5E-O1SOxLMB.js → requirementDiagram-MS252O5E-CLmSCaQs.js} +1 -1
  44. package/dist/client/assets/{sankeyDiagram-XADWPNL6-D-mh4ZYc.js → sankeyDiagram-XADWPNL6-BfPk87jf.js} +1 -1
  45. package/dist/client/assets/{sequenceDiagram-FGHM5R23-Dp2XhLFP.js → sequenceDiagram-FGHM5R23-DE8sU8ej.js} +1 -1
  46. package/dist/client/assets/{stateDiagram-FHFEXIEX-UQkaQPQt.js → stateDiagram-FHFEXIEX-BmaQc1Nm.js} +1 -1
  47. package/dist/client/assets/stateDiagram-v2-QKLJ7IA2-TcoFpvuT.js +1 -0
  48. package/dist/client/assets/{timeline-definition-GMOUNBTQ-DDMfKpma.js → timeline-definition-GMOUNBTQ-C4Z0umzx.js} +1 -1
  49. package/dist/client/assets/{vennDiagram-DHZGUBPP-DaGxBzx2.js → vennDiagram-DHZGUBPP-BKlcRXlE.js} +1 -1
  50. package/dist/client/assets/{wardley-RL74JXVD-DBNvUuF6.js → wardley-RL74JXVD-B0RT7bAW.js} +1 -1
  51. package/dist/client/assets/{wardleyDiagram-NUSXRM2D-IbDED74Y.js → wardleyDiagram-NUSXRM2D-mx28kvam.js} +1 -1
  52. package/dist/client/assets/{xychartDiagram-5P7HB3ND-0RafK-TZ.js → xychartDiagram-5P7HB3ND-DU6qIPI0.js} +1 -1
  53. package/dist/client/index.html +2 -2
  54. package/dist/fleet-plugins/ledger/routes.mjs +130 -1
  55. package/dist/fleet-plugins/quota/routes.mjs +130 -1
  56. package/dist/fleet-plugins/scuttlebutt/routes.mjs +130 -1
  57. package/dist/fleet-plugins/terminal/routes.mjs +747 -115
  58. package/dist/fleet.mjs +370 -57
  59. package/package.json +1 -1
  60. package/dist/client/assets/channel-CzEHIBah.js +0 -1
  61. package/dist/client/assets/classDiagram-6PBFFD2Q-jNK4g1rr.js +0 -1
  62. package/dist/client/assets/classDiagram-v2-HSJHXN6E-jNK4g1rr.js +0 -1
  63. package/dist/client/assets/clone-DggrGKv8.js +0 -1
  64. package/dist/client/assets/index-BSVaW3Ov.js +0 -465
  65. package/dist/client/assets/index-DxjgOu3C.css +0 -1
  66. package/dist/client/assets/stateDiagram-v2-QKLJ7IA2-CRw5Ot78.js +0 -1
package/dist/fleet.mjs CHANGED
@@ -21975,18 +21975,25 @@ function withheldClaudeSkillStub(name, tokens, budget) {
21975
21975
  var CLAUDE_WEB_SEARCH_TOOL_NAME = "WebSearch";
21976
21976
  var ANTHROPIC_WEB_SEARCH_TOOL_NAME = "web_search";
21977
21977
  var ANTHROPIC_WEB_SEARCH_TOOL_TYPE = "web_search_20250305";
21978
- function isClaudeWebSearchTool(tool) {
21979
- return tool.type === ANTHROPIC_WEB_SEARCH_TOOL_TYPE || tool.name === CLAUDE_WEB_SEARCH_TOOL_NAME || tool.name === ANTHROPIC_WEB_SEARCH_TOOL_NAME;
21978
+ var CLAUDE_WEB_SEARCH_TOOL_IDENTIFIERS = [
21979
+ CLAUDE_WEB_SEARCH_TOOL_NAME,
21980
+ ANTHROPIC_WEB_SEARCH_TOOL_NAME,
21981
+ ANTHROPIC_WEB_SEARCH_TOOL_TYPE
21982
+ ];
21983
+ function matchesToolIdentifier(tool, identifiers) {
21984
+ return typeof tool.name === "string" && identifiers.has(tool.name) || typeof tool.type === "string" && identifiers.has(tool.type);
21980
21985
  }
21981
- function isClaudeWebSearchToolChoice(choice) {
21982
- return choice?.type === "tool" && (choice.name === CLAUDE_WEB_SEARCH_TOOL_NAME || choice.name === ANTHROPIC_WEB_SEARCH_TOOL_NAME);
21986
+ function matchesToolChoice(choice, identifiers) {
21987
+ return choice?.type === "tool" && typeof choice.name === "string" && identifiers.has(choice.name);
21983
21988
  }
21984
- function omitClaudeWebSearchTools(request) {
21989
+ function omitClaudeClientTools(request, names) {
21990
+ const identifiers = new Set(names);
21991
+ if (identifiers.size === 0) return { request, changed: false };
21985
21992
  const tools = request.tools;
21986
- const kept = tools?.filter((tool) => !isClaudeWebSearchTool(tool));
21993
+ const kept = tools?.filter((tool) => !matchesToolIdentifier(tool, identifiers));
21987
21994
  const toolsChanged = tools !== void 0 && kept !== void 0 && kept.length !== tools.length;
21988
21995
  const choice = request.tool_choice;
21989
- const choiceChanged = isClaudeWebSearchToolChoice(choice);
21996
+ const choiceChanged = matchesToolChoice(choice, identifiers);
21990
21997
  if (!toolsChanged && !choiceChanged) {
21991
21998
  return { request, changed: false };
21992
21999
  }
@@ -22005,6 +22012,42 @@ function omitClaudeWebSearchTools(request) {
22005
22012
  changed: true
22006
22013
  };
22007
22014
  }
22015
+ var CLAUDE_USAGE_LIMIT_DIRECTIVE = /^\s*\[Usage limit [^\]]*\]\s*$/;
22016
+ function stripClaudeUsageLimitDirectives(messages) {
22017
+ let removed = 0;
22018
+ const kept = [];
22019
+ for (const message of messages) {
22020
+ const stripped = stripUsageLimitBlocks(message);
22021
+ removed += stripped.removed;
22022
+ if (stripped.message !== null) kept.push(stripped.message);
22023
+ }
22024
+ if (removed === 0) return { messages, changed: false, removed: 0 };
22025
+ const last = kept[kept.length - 1];
22026
+ if (last === void 0 || last.role === "assistant") {
22027
+ return { messages, changed: false, removed: 0 };
22028
+ }
22029
+ return { messages: kept, changed: true, removed };
22030
+ }
22031
+ function stripUsageLimitBlocks(message) {
22032
+ const content = message.content;
22033
+ if (typeof content === "string") {
22034
+ return isClaudeUsageLimitDirective(content) ? { message: null, removed: 1 } : { message, removed: 0 };
22035
+ }
22036
+ if (!Array.isArray(content)) return { message, removed: 0 };
22037
+ const kept = content.filter(
22038
+ (block) => !(isClaudeTextBlock(block) && isClaudeUsageLimitDirective(block.text))
22039
+ );
22040
+ const removed = content.length - kept.length;
22041
+ if (removed === 0) return { message, removed: 0 };
22042
+ if (kept.length === 0) return { message: null, removed };
22043
+ return { message: { ...message, content: kept }, removed };
22044
+ }
22045
+ function isClaudeUsageLimitDirective(text) {
22046
+ return CLAUDE_USAGE_LIMIT_DIRECTIVE.test(text);
22047
+ }
22048
+ function omitClaudeWebSearchTools(request) {
22049
+ return omitClaudeClientTools(request, CLAUDE_WEB_SEARCH_TOOL_IDENTIFIERS);
22050
+ }
22008
22051
  var benchmarks_default = {
22009
22052
  version: 2,
22010
22053
  sources: {
@@ -22227,7 +22270,7 @@ var models_default = {
22227
22270
  codex: {
22228
22271
  name: "Codex",
22229
22272
  defaultModel: "gpt-5.6-sol",
22230
- source: "codex app-server model/list (codex-cli 0.147.0, observed 2026-08-11) for model/effort/service-tier and the unsuffixed 272000 defaults; Fleet catalog effort ladders are capped at max because harness launch capabilities are not model rungs; 2026-08-17 production Codex live observations added explicit 1M (1000000) variants on the same upstream bases",
22273
+ source: "codex app-server model/list (codex-cli 0.147.0, observed 2026-08-11) for model/effort/service-tier and the unsuffixed 272000 defaults; Fleet catalog effort ladders are capped at max because harness launch capabilities are not model rungs; 2026-08-17 production Codex live observations added explicit 524K (524288) and explicit 1M (1000000) variants on the same upstream bases",
22231
22274
  models: [
22232
22275
  {
22233
22276
  modelId: "gpt-5.6-sol",
@@ -22355,6 +22398,135 @@ var models_default = {
22355
22398
  ],
22356
22399
  benchmarkKey: "gpt-5.6-luna"
22357
22400
  },
22401
+ {
22402
+ modelId: "gpt-5.6-sol-524k",
22403
+ name: "GPT-5.6-Sol-524K",
22404
+ capabilityClass: "flagship",
22405
+ providerModelId: "gpt-5.6-sol",
22406
+ contextWindow: 524288,
22407
+ effort: {
22408
+ supported: true,
22409
+ levels: [
22410
+ "low",
22411
+ "medium",
22412
+ "high",
22413
+ "xhigh",
22414
+ "max"
22415
+ ]
22416
+ },
22417
+ aliases: [
22418
+ "gpt-5.6-sol-524k"
22419
+ ],
22420
+ benchmarkKey: "gpt-5.6-sol"
22421
+ },
22422
+ {
22423
+ modelId: "gpt-5.6-sol-524k-fast",
22424
+ name: "GPT-5.6-Sol-524K-Fast",
22425
+ capabilityClass: "flagship",
22426
+ providerModelId: "gpt-5.6-sol",
22427
+ serviceTier: "priority",
22428
+ contextWindow: 524288,
22429
+ effort: {
22430
+ supported: true,
22431
+ levels: [
22432
+ "low",
22433
+ "medium",
22434
+ "high",
22435
+ "xhigh",
22436
+ "max"
22437
+ ]
22438
+ },
22439
+ aliases: [
22440
+ "gpt-5.6-sol-524k-fast"
22441
+ ],
22442
+ benchmarkKey: "gpt-5.6-sol"
22443
+ },
22444
+ {
22445
+ modelId: "gpt-5.6-luna-524k",
22446
+ name: "GPT-5.6-Luna-524K",
22447
+ capabilityClass: "light",
22448
+ providerModelId: "gpt-5.6-luna",
22449
+ contextWindow: 524288,
22450
+ effort: {
22451
+ supported: true,
22452
+ levels: [
22453
+ "low",
22454
+ "medium",
22455
+ "high",
22456
+ "xhigh",
22457
+ "max"
22458
+ ]
22459
+ },
22460
+ aliases: [
22461
+ "gpt-5.6-luna-524k"
22462
+ ],
22463
+ benchmarkKey: "gpt-5.6-luna"
22464
+ },
22465
+ {
22466
+ modelId: "gpt-5.6-luna-524k-fast",
22467
+ name: "GPT-5.6-Luna-524K-Fast",
22468
+ capabilityClass: "light",
22469
+ providerModelId: "gpt-5.6-luna",
22470
+ serviceTier: "priority",
22471
+ contextWindow: 524288,
22472
+ effort: {
22473
+ supported: true,
22474
+ levels: [
22475
+ "low",
22476
+ "medium",
22477
+ "high",
22478
+ "xhigh",
22479
+ "max"
22480
+ ]
22481
+ },
22482
+ aliases: [
22483
+ "gpt-5.6-luna-524k-fast"
22484
+ ],
22485
+ benchmarkKey: "gpt-5.6-luna"
22486
+ },
22487
+ {
22488
+ modelId: "gpt-5.6-terra-524k",
22489
+ name: "GPT-5.6-Terra-524K",
22490
+ capabilityClass: "standard",
22491
+ providerModelId: "gpt-5.6-terra",
22492
+ contextWindow: 524288,
22493
+ effort: {
22494
+ supported: true,
22495
+ levels: [
22496
+ "low",
22497
+ "medium",
22498
+ "high",
22499
+ "xhigh",
22500
+ "max"
22501
+ ]
22502
+ },
22503
+ aliases: [
22504
+ "gpt-5.6-terra-524k"
22505
+ ],
22506
+ benchmarkKey: "gpt-5.6-terra"
22507
+ },
22508
+ {
22509
+ modelId: "gpt-5.6-terra-524k-fast",
22510
+ name: "GPT-5.6-Terra-524K-Fast",
22511
+ capabilityClass: "standard",
22512
+ providerModelId: "gpt-5.6-terra",
22513
+ serviceTier: "priority",
22514
+ contextWindow: 524288,
22515
+ effort: {
22516
+ supported: true,
22517
+ levels: [
22518
+ "low",
22519
+ "medium",
22520
+ "high",
22521
+ "xhigh",
22522
+ "max"
22523
+ ]
22524
+ },
22525
+ aliases: [
22526
+ "gpt-5.6-terra-524k-fast"
22527
+ ],
22528
+ benchmarkKey: "gpt-5.6-terra"
22529
+ },
22358
22530
  {
22359
22531
  modelId: "gpt-5.6-sol-1m",
22360
22532
  name: "GPT-5.6-Sol-1M",
@@ -28317,22 +28489,42 @@ function parseXaiEventStream(body2, options, functionCallTimeoutMs) {
28317
28489
  functionCallTimeoutMs
28318
28490
  );
28319
28491
  }
28492
+ var XAI_ASSEMBLY_DEADLINE = /* @__PURE__ */ Symbol("xai-assembly-deadline");
28320
28493
  async function* assembleXaiFunctionCalls(source, controller, timeoutMs) {
28321
28494
  const iterator = source[Symbol.asyncIterator]();
28322
28495
  const pending = /* @__PURE__ */ new Map();
28496
+ let snapshot;
28323
28497
  let completedNormally = false;
28324
28498
  try {
28325
28499
  while (true) {
28326
28500
  const deadlineAt = earliestXaiFunctionCallDeadline(pending);
28327
- const result = deadlineAt === void 0 ? await iterator.next() : await nextXaiEventBeforeDeadline(iterator, deadlineAt, controller, timeoutMs);
28501
+ const result = deadlineAt === void 0 ? await iterator.next() : await nextXaiEventBeforeDeadline(iterator, deadlineAt);
28502
+ if (result === XAI_ASSEMBLY_DEADLINE) {
28503
+ yield* salvageXaiPendingCalls(
28504
+ pending,
28505
+ snapshot,
28506
+ `function call assembly exceeded ${timeoutMs}ms`,
28507
+ controller
28508
+ );
28509
+ completedNormally = true;
28510
+ return;
28511
+ }
28328
28512
  if (result.done) {
28329
28513
  if (pending.size > 0) {
28330
- throw incompleteXaiFunctionCall("stream ended before function call output_item.done");
28514
+ yield* salvageXaiPendingCalls(
28515
+ pending,
28516
+ snapshot,
28517
+ "stream ended before function call output_item.done",
28518
+ controller
28519
+ );
28331
28520
  }
28332
28521
  completedNormally = true;
28333
28522
  return;
28334
28523
  }
28335
28524
  const event = result.value;
28525
+ if (event.type === "response.created") {
28526
+ snapshot = event.response;
28527
+ }
28336
28528
  if (event.type === "response.completed" && pending.size > 0) {
28337
28529
  throw incompleteXaiFunctionCall("response.completed arrived before function call output_item.done");
28338
28530
  }
@@ -28343,10 +28535,18 @@ async function* assembleXaiFunctionCalls(source, controller, timeoutMs) {
28343
28535
  // Each call gets a full timeout from its own added event. Waiting uses the
28344
28536
  // earliest active deadline, so a later parallel call is never shortened by
28345
28537
  // an earlier call's age.
28346
- deadlineAt: Date.now() + timeoutMs
28538
+ deadlineAt: Date.now() + timeoutMs,
28539
+ argumentsBuffer: ""
28347
28540
  });
28348
28541
  continue;
28349
28542
  }
28543
+ if (event.type === "response.function_call_arguments.delta") {
28544
+ const call = pending.get(xaiFunctionCallKey(event.output_index, event.item_id));
28545
+ if (call !== void 0) {
28546
+ call.argumentsBuffer += event.delta;
28547
+ }
28548
+ continue;
28549
+ }
28350
28550
  if (event.type === "response.function_call_arguments.done") {
28351
28551
  const call = pending.get(xaiFunctionCallKey(event.output_index, event.item_id));
28352
28552
  if (call !== void 0) {
@@ -28392,24 +28592,60 @@ function earliestXaiFunctionCallDeadline(pending) {
28392
28592
  }
28393
28593
  return earliest;
28394
28594
  }
28395
- async function nextXaiEventBeforeDeadline(iterator, deadlineAt, controller, timeoutMs) {
28396
- const remainingMs = deadlineAt - Date.now();
28397
- if (remainingMs <= 0) {
28398
- const error51 = incompleteXaiFunctionCall(`function call assembly exceeded ${timeoutMs}ms`);
28595
+ async function* salvageXaiPendingCalls(pending, snapshot, reason, controller) {
28596
+ const salvageable = [...pending.values()].every(
28597
+ (call) => completeXaiArguments(call) !== void 0
28598
+ );
28599
+ if (snapshot === void 0 || !salvageable) {
28600
+ const error51 = incompleteXaiFunctionCall(reason);
28399
28601
  controller.abort(error51);
28400
28602
  throw error51;
28401
28603
  }
28604
+ wireLog("xai-responses.function_call.salvaged", {
28605
+ reason,
28606
+ calls: pending.size
28607
+ });
28608
+ controller.abort(incompleteXaiFunctionCall(reason));
28609
+ for (const [key, call] of pending) {
28610
+ const args = completeXaiArguments(call) ?? "";
28611
+ const item = { ...call.added.item, arguments: args };
28612
+ yield call.added;
28613
+ yield {
28614
+ type: "response.function_call_arguments.done",
28615
+ item_id: call.added.item.id,
28616
+ output_index: call.added.output_index,
28617
+ arguments: args
28618
+ };
28619
+ yield { type: "response.output_item.done", output_index: call.added.output_index, item };
28620
+ pending.delete(key);
28621
+ }
28622
+ yield { type: "response.completed", response: { ...snapshot, usage: null } };
28623
+ }
28624
+ function completeXaiArguments(call) {
28625
+ const candidate = call.argumentsDone?.arguments ?? call.argumentsBuffer;
28626
+ if (candidate.length === 0) return void 0;
28627
+ let parsed;
28628
+ try {
28629
+ parsed = JSON.parse(candidate);
28630
+ } catch {
28631
+ return void 0;
28632
+ }
28633
+ return typeof parsed === "object" && parsed !== null && !Array.isArray(parsed) ? candidate : void 0;
28634
+ }
28635
+ async function nextXaiEventBeforeDeadline(iterator, deadlineAt) {
28636
+ const remainingMs = deadlineAt - Date.now();
28637
+ if (remainingMs <= 0) {
28638
+ return XAI_ASSEMBLY_DEADLINE;
28639
+ }
28402
28640
  let timeout;
28403
28641
  const next = iterator.next();
28404
28642
  void next.catch(() => void 0);
28405
28643
  try {
28406
28644
  return await Promise.race([
28407
28645
  next,
28408
- new Promise((_, reject) => {
28646
+ new Promise((resolve3) => {
28409
28647
  timeout = setTimeout(() => {
28410
- const error51 = incompleteXaiFunctionCall(`function call assembly exceeded ${timeoutMs}ms`);
28411
- controller.abort(error51);
28412
- reject(error51);
28648
+ resolve3(XAI_ASSEMBLY_DEADLINE);
28413
28649
  }, remainingMs);
28414
28650
  })
28415
28651
  ]);
@@ -28444,6 +28680,10 @@ function parseEventFrame3(frame) {
28444
28680
  }
28445
28681
  return canonicalEvent3(parsed);
28446
28682
  }
28683
+ var XAI_EOS_SENTINEL = "<|eos|>";
28684
+ function withoutXaiSentinel(text) {
28685
+ return text.includes(XAI_EOS_SENTINEL) ? text.split(XAI_EOS_SENTINEL).join("") : text;
28686
+ }
28447
28687
  function canonicalEvent3(value) {
28448
28688
  if (!isRecord7(value) || typeof value.type !== "string") {
28449
28689
  throw new UpstreamProtocolError("Grok CLI SSE event was not an object with a type");
@@ -28463,25 +28703,30 @@ function canonicalEvent3(value) {
28463
28703
  content_index: number32(value.content_index, "content_index"),
28464
28704
  part: {
28465
28705
  type: "output_text",
28466
- text: typeof part.text === "string" ? part.text : ""
28706
+ text: typeof part.text === "string" ? withoutXaiSentinel(part.text) : ""
28467
28707
  }
28468
28708
  };
28469
28709
  }
28470
- case "response.output_text.delta":
28710
+ case "response.output_text.delta": {
28711
+ const delta = withoutXaiSentinel(string32(value.delta, "delta"));
28712
+ if (delta.length === 0) {
28713
+ return void 0;
28714
+ }
28471
28715
  return {
28472
28716
  type: value.type,
28473
28717
  item_id: string32(value.item_id, "item_id"),
28474
28718
  output_index: number32(value.output_index, "output_index"),
28475
28719
  content_index: number32(value.content_index, "content_index"),
28476
- delta: string32(value.delta, "delta")
28720
+ delta
28477
28721
  };
28722
+ }
28478
28723
  case "response.output_text.done":
28479
28724
  return {
28480
28725
  type: value.type,
28481
28726
  item_id: string32(value.item_id, "item_id"),
28482
28727
  output_index: number32(value.output_index, "output_index"),
28483
28728
  content_index: number32(value.content_index, "content_index"),
28484
- text: string32(value.text, "text")
28729
+ text: withoutXaiSentinel(string32(value.text, "text"))
28485
28730
  };
28486
28731
  case "response.reasoning_summary_text.delta":
28487
28732
  case "response.reasoning_text.delta":
@@ -28503,11 +28748,17 @@ function canonicalEvent3(value) {
28503
28748
  item
28504
28749
  };
28505
28750
  }
28506
- // Hold argument fragments until the Grok CLI proxy's partial-JSON behavior is observed.
28507
- // The `.done` event carries the complete argument object, which downstream treats as the
28508
- // remainder when nothing was streamed ahead of it.
28751
+ // Fragments still never reach the client the assembler absorbs them and the `.done`
28752
+ // event carries the complete argument object. They are decoded rather than discarded
28753
+ // because this proxy has been measured ending a stream with the whole argument object
28754
+ // delivered as fragments and no terminal frame; the buffer is that turn's only copy.
28509
28755
  case "response.function_call_arguments.delta":
28510
- return void 0;
28756
+ return {
28757
+ type: value.type,
28758
+ item_id: string32(value.item_id, "item_id"),
28759
+ output_index: number32(value.output_index, "output_index"),
28760
+ delta: string32(value.delta, "delta")
28761
+ };
28511
28762
  case "response.function_call_arguments.done":
28512
28763
  return {
28513
28764
  type: value.type,
@@ -28977,6 +29228,10 @@ function isCursorNativeRedirectToolName(name) {
28977
29228
  const leaf = toolLeafName3(name).replace(/[_-]/g, "").toLowerCase();
28978
29229
  return ["grep", "bash", "shellcommand", "execcommand"].includes(leaf);
28979
29230
  }
29231
+ function isCursorWithheldToolName(name) {
29232
+ const leaf = toolLeafName3(name).replace(/[_-]/g, "").toLowerCase();
29233
+ return ["bash", "shellcommand", "execcommand"].includes(leaf);
29234
+ }
28980
29235
  function cursorNativeExecRedirect(exec2, tools, providerIdentifier) {
28981
29236
  const messageId = numberValue2(exec2.id ?? 0);
28982
29237
  const execId = stringValue2(exec2.execId) || `redirect-${messageId}`;
@@ -29188,22 +29443,23 @@ function grepArguments(tool, input) {
29188
29443
  args.path = input.path;
29189
29444
  }
29190
29445
  const optionMappings = [
29191
- [input.glob || void 0, "glob"],
29192
- [input.outputMode, "output_mode"],
29193
- [input.caseInsensitive ? true : void 0, "case_insensitive"],
29194
- [input.contextBefore, "context_before"],
29195
- [input.contextAfter, "context_after"],
29196
- [input.context, "context"],
29197
- [input.type, "type"],
29198
- [input.headLimit, "head_limit"],
29199
- [input.multiline ? true : void 0, "multiline"],
29200
- [input.sort, "sort"],
29201
- [input.sortAscending, "sort_ascending"],
29202
- [input.offset, "offset"]
29446
+ [input.glob || void 0, ["glob"]],
29447
+ [input.outputMode, ["output_mode"]],
29448
+ [input.caseInsensitive ? true : void 0, ["-i", "case_insensitive"]],
29449
+ [input.contextBefore, ["-B", "context_before"]],
29450
+ [input.contextAfter, ["-A", "context_after"]],
29451
+ [input.context, ["context", "-C"]],
29452
+ [input.type, ["type"]],
29453
+ [input.headLimit, ["head_limit"]],
29454
+ [input.multiline ? true : void 0, ["multiline"]],
29455
+ [input.sort, ["sort"]],
29456
+ [input.sortAscending, ["sort_ascending"]],
29457
+ [input.offset, ["offset"]]
29203
29458
  ];
29204
- for (const [value, key] of optionMappings) {
29459
+ for (const [value, candidates] of optionMappings) {
29205
29460
  if (value === void 0) continue;
29206
- if (!schemaHasProperty(tool.inputSchemaValue, key)) return null;
29461
+ const key = firstSchemaProperty(tool.inputSchemaValue, candidates);
29462
+ if (key === void 0) return null;
29207
29463
  args[key] = value;
29208
29464
  }
29209
29465
  return args;
@@ -30822,7 +31078,7 @@ function applyCursorToolBudget(request) {
30822
31078
  const supportsDeferredLoading = declaredTools.some((tool) => isCursorToolSearchName(tool.name));
30823
31079
  const sourceTools = declaredTools.filter((tool) => {
30824
31080
  const explicitlySelected = referencedNames.has(tool.name) || cursorToolMatches(tool.name, selectedName);
30825
- if (isCursorNativeRedirectToolName(tool.name) && !explicitlySelected) return false;
31081
+ if (isCursorWithheldToolName(tool.name) && !explicitlySelected) return false;
30826
31082
  return !supportsDeferredLoading || tool.defer_loading !== true || isCursorToolSearchName(tool.name) || explicitlySelected;
30827
31083
  });
30828
31084
  const wireTools = sourceTools.map(toCursorWireTool);
@@ -33123,6 +33379,63 @@ function sortGatewayModelsByProvider(models) {
33123
33379
  return GATEWAY_MODELS.indexOf(left) - GATEWAY_MODELS.indexOf(right);
33124
33380
  });
33125
33381
  }
33382
+ var codexRequestPolicy = {
33383
+ provider: "codex",
33384
+ shapeRequest: (request, steps) => steps.withholdWebSearchTools(steps.pruneSkillPayloads(request))
33385
+ };
33386
+ var cursorRequestPolicy = {
33387
+ provider: "cursor",
33388
+ shapeRequest: (request, steps) => steps.withholdWebSearchTools(steps.pruneSkillPayloads(request))
33389
+ };
33390
+ var kimiRequestPolicy = {
33391
+ provider: "kimi",
33392
+ shapeRequest: (request, steps) => steps.pruneSkillPayloads(request)
33393
+ };
33394
+ var opencodeGoRequestPolicy = {
33395
+ provider: "opencode",
33396
+ shapeRequest: (request, steps) => steps.withholdWebSearchTools(steps.pruneSkillPayloads(request))
33397
+ };
33398
+ var xaiRequestPolicy = {
33399
+ provider: "xai",
33400
+ shapeRequest: (request, steps) => steps.withholdWebSearchTools(steps.pruneSkillPayloads(request))
33401
+ };
33402
+ var POLICIES = {
33403
+ codex: codexRequestPolicy,
33404
+ cursor: cursorRequestPolicy,
33405
+ kimi: kimiRequestPolicy,
33406
+ // The provider id is `opencode`; its folder carries the `-go` subscription name.
33407
+ opencode: opencodeGoRequestPolicy,
33408
+ xai: xaiRequestPolicy
33409
+ };
33410
+ function resolveGatewayRequestPolicy(provider) {
33411
+ return POLICIES[provider];
33412
+ }
33413
+ function applyGatewayRequestPolicy(request, target2, withheldSkills) {
33414
+ const context = {
33415
+ target: target2,
33416
+ upstreamModel: upstreamModelId(target2),
33417
+ withheldSkills
33418
+ };
33419
+ const policy = resolveGatewayRequestPolicy(target2.provider);
33420
+ return policy.shapeRequest(request, buildPolicySteps(context), context);
33421
+ }
33422
+ function buildPolicySteps(context) {
33423
+ return {
33424
+ pruneSkillPayloads: (request) => {
33425
+ const pruned = pruneClaudeSkillPayloads(request.messages, {
33426
+ ...typeof context.target.contextWindow === "number" ? { contextWindow: context.target.contextWindow } : {},
33427
+ model: context.upstreamModel,
33428
+ withheld: context.withheldSkills
33429
+ });
33430
+ for (const skill of pruned.withheld) context.withheldSkills.add(skill.name);
33431
+ return pruned.changed ? { ...request, messages: [...pruned.messages] } : request;
33432
+ },
33433
+ withholdWebSearchTools: (request) => {
33434
+ const omitted = omitClaudeWebSearchTools(request);
33435
+ return omitted.changed ? omitted.request : request;
33436
+ }
33437
+ };
33438
+ }
33126
33439
  var HOP_BY_HOP_HEADERS = /* @__PURE__ */ new Set([
33127
33440
  "connection",
33128
33441
  "content-encoding",
@@ -33341,19 +33654,11 @@ function createAiGatewayRouter(deps) {
33341
33654
  writeAnthropicError(res, 403, "permission_error", `AI gateway model is not enabled: ${requested}`);
33342
33655
  return true;
33343
33656
  }
33344
- if (target2) {
33345
- const pruned = pruneClaudeSkillPayloads(body2.messages, {
33346
- ...typeof target2.contextWindow === "number" ? { contextWindow: target2.contextWindow } : {},
33347
- model: upstreamModelId(target2),
33348
- withheld: withheldSkills
33349
- });
33350
- for (const skill of pruned.withheld) withheldSkills.add(skill.name);
33351
- if (pruned.changed) body2 = { ...body2, messages: [...pruned.messages] };
33352
- }
33353
- if (target2 && target2.provider !== "kimi") {
33354
- const omitted = omitClaudeWebSearchTools(body2);
33355
- if (omitted.changed) body2 = omitted.request;
33657
+ const withoutUsageLimitDirectives = stripClaudeUsageLimitDirectives(body2.messages);
33658
+ if (withoutUsageLimitDirectives.changed) {
33659
+ body2 = { ...body2, messages: [...withoutUsageLimitDirectives.messages] };
33356
33660
  }
33661
+ if (target2) body2 = applyGatewayRequestPolicy(body2, target2, withheldSkills);
33357
33662
  let credential = "";
33358
33663
  let chatgptAccountId = "";
33359
33664
  if (target2?.provider === "cursor") {
@@ -34547,9 +34852,13 @@ function buildClaudeGatewayArgs(context) {
34547
34852
  ]),
34548
34853
  ...context.mcpServers.length > 0 ? ["--mcp-config", buildClaudeMcpConfig(context.mcpServers)] : [],
34549
34854
  ...buildSettingsArgs(context.skillOverrides),
34855
+ ...buildSearchToolArgs(),
34550
34856
  "--dangerously-skip-permissions"
34551
34857
  ];
34552
34858
  }
34859
+ function buildSearchToolArgs() {
34860
+ return ["--allowedTools", "Grep,Glob"];
34861
+ }
34553
34862
  function buildSettingsArgs(skillOverrides) {
34554
34863
  if (skillOverrides === void 0 || Object.keys(skillOverrides).length === 0) return [];
34555
34864
  return ["--settings", JSON.stringify({ skillOverrides })];
@@ -53603,7 +53912,9 @@ var SHIM_NAMED_EXPORTS = {
53603
53912
  "@fleet-console/sdk/operations/browser": ["ApiError", "OperationBody", "assertOperationNode", "fetchOperationCatalog", "hasForbiddenBrowserPayloadKey"],
53604
53913
  "@fleet-console/sdk/notifications/browser": ["defineNotificationKind"],
53605
53914
  "@fleet-console/sdk/react/browser": ["PluginErrorBoundary", "React", "Select", "useSelect"],
53606
- "@fleet-console/sdk/components/failure-notice": ["FailureNotice"]
53915
+ "@fleet-console/sdk/components/failure-notice": ["FailureNotice"],
53916
+ "@fleet-console/sdk/components/effort-track": ["EffortGaugeGlyph", "EffortTrack", "effortLadderPosition", "gatedEffortNames", "resolveRowEffort"],
53917
+ "@fleet-console/sdk/components/launch-provider-glyphs": ["groupModelsByLaunchProvider", "isLaunchProviderGlyphId", "launchEtcGlyph", "launchProviderCaption", "launchProviderFromGroupId", "launchProviderFromModelId", "launchProviderFromOperationPayload", "launchProviderGlyph"]
53607
53918
  };
53608
53919
 
53609
53920
  // core/host/plugin-host/plugin-host.ts
@@ -53737,7 +54048,9 @@ var SHIM_DEFINITIONS = [
53737
54048
  { name: "sdk-operations-browser", specifier: "@fleet-console/sdk/operations/browser", globalKey: "@fleet-console/sdk/operations/browser", namedExports: SHIM_NAMED_EXPORTS["@fleet-console/sdk/operations/browser"] ?? [] },
53738
54049
  { name: "sdk-notifications-browser", specifier: "@fleet-console/sdk/notifications/browser", globalKey: "@fleet-console/sdk/notifications/browser", namedExports: SHIM_NAMED_EXPORTS["@fleet-console/sdk/notifications/browser"] ?? [] },
53739
54050
  { name: "sdk-react-browser", specifier: "@fleet-console/sdk/react/browser", globalKey: "@fleet-console/sdk/react/browser", namedExports: SHIM_NAMED_EXPORTS["@fleet-console/sdk/react/browser"] ?? [] },
53740
- { name: "sdk-components-failure-notice", specifier: "@fleet-console/sdk/components/failure-notice", globalKey: "@fleet-console/sdk/components/failure-notice", namedExports: SHIM_NAMED_EXPORTS["@fleet-console/sdk/components/failure-notice"] ?? [] }
54051
+ { name: "sdk-components-failure-notice", specifier: "@fleet-console/sdk/components/failure-notice", globalKey: "@fleet-console/sdk/components/failure-notice", namedExports: SHIM_NAMED_EXPORTS["@fleet-console/sdk/components/failure-notice"] ?? [] },
54052
+ { name: "sdk-components-effort-track", specifier: "@fleet-console/sdk/components/effort-track", globalKey: "@fleet-console/sdk/components/effort-track", namedExports: SHIM_NAMED_EXPORTS["@fleet-console/sdk/components/effort-track"] ?? [] },
54053
+ { name: "sdk-components-launch-provider-glyphs", specifier: "@fleet-console/sdk/components/launch-provider-glyphs", globalKey: "@fleet-console/sdk/components/launch-provider-glyphs", namedExports: SHIM_NAMED_EXPORTS["@fleet-console/sdk/components/launch-provider-glyphs"] ?? [] }
53741
54054
  ];
53742
54055
  var SHIM_URL_BY_SPECIFIER = new Map(SHIM_DEFINITIONS.map((definition) => [definition.specifier, `/plugin-runtime/shim/${definition.name}.mjs`]));
53743
54056
  var SHIM_BY_NAME = new Map(SHIM_DEFINITIONS.map((definition) => [definition.name, definition]));
@@ -54268,7 +54581,7 @@ var ConsoleReleaseNotesUnavailableError = class extends Error {
54268
54581
  var RELEASE_NOTE_HEADINGS = ["Added", "Changed", "Fixed", "Removed", "Breaking Changes"];
54269
54582
  var VERSION_HEADER_PATTERN = /^## \[([^\]]+)\](?: - ([0-9]{4}-[0-9]{2}-[0-9]{2}))?$/;
54270
54583
  var SECTION_HEADER_PATTERN = /^### (Added|Changed|Fixed|Removed|Breaking Changes)$/;
54271
- var PRODUCT_HEADER_PATTERN = /^### (fleet-(?:cli|console|desktop))$/;
54584
+ var PRODUCT_HEADER_PATTERN = /^### (fleet-(?:cli|console|desktop|mobile))$/;
54272
54585
  var RETIRED_PRODUCT_HEADER_PATTERN = /^### fleet-(?:plugin|core)$/;
54273
54586
  var PRODUCT_SECTION_HEADER_PATTERN = /^#### (Added|Changed|Fixed|Removed|Breaking Changes)$/;
54274
54587
  var BULLET_PATTERN = /^- (.+)$/;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dotobokuri/fleet-console",
3
- "version": "1.65.0",
3
+ "version": "1.67.0",
4
4
  "description": "Fleet Console — sole owner of the fleet and fleet-console bins, Console web surface, and thin Claude Code launcher.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1 +0,0 @@
1
- import{ap as o,aq as n}from"./mermaid.core-CtpLAI-c.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-CKA_-tPR.js";import{_ as i}from"./mermaid.core-CtpLAI-c.js";import"./chunk-FMBD7UC4-CZUkX3ry.js";import"./chunk-YZCP3GAM-CdGF0f8H.js";import"./chunk-55IACEB6-ArIbE5m1.js";import"./chunk-EDXVE4YY-bGzMBuDL.js";import"./index-BSVaW3Ov.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-CKA_-tPR.js";import{_ as i}from"./mermaid.core-CtpLAI-c.js";import"./chunk-FMBD7UC4-CZUkX3ry.js";import"./chunk-YZCP3GAM-CdGF0f8H.js";import"./chunk-55IACEB6-ArIbE5m1.js";import"./chunk-EDXVE4YY-bGzMBuDL.js";import"./index-BSVaW3Ov.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-BkRyh4eN.js";var e=4;function a(o){return r(o,e)}export{a as c};