opencode-anthropic-multi-account 0.3.15 → 0.3.16

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.
@@ -2249,6 +2249,7 @@ var STATIC_HEADER_NAMES = [
2249
2249
  "x-app",
2250
2250
  "x-stainless-timeout"
2251
2251
  ];
2252
+ var FABLE_CAPTURE_MODEL_PATTERN = /^(?:fable(?:1m)?|claude-fable-\d+(?:[-._]\d+)*(?:\[1m\])?)$/i;
2252
2253
  var bundledCcVersion = fingerprint_data_default.cc_version;
2253
2254
  var SUPPORTED_CC_RANGE = {
2254
2255
  min: "1.0.0",
@@ -2430,6 +2431,9 @@ function pickTextBlock(value) {
2430
2431
  }
2431
2432
  return toText(value);
2432
2433
  }
2434
+ function isFableCaptureModel(value) {
2435
+ return typeof value === "string" && FABLE_CAPTURE_MODEL_PATTERN.test(value);
2436
+ }
2433
2437
  function extractCCVersion(...sources) {
2434
2438
  for (const source of sources) {
2435
2439
  if (!source) {
@@ -2568,16 +2572,19 @@ function loadTemplate() {
2568
2572
  function extractTemplate(captured) {
2569
2573
  const systemBlocks = captured.body.system;
2570
2574
  const tools = captured.body.tools;
2571
- if (!Array.isArray(systemBlocks) || systemBlocks.length !== 3 || !Array.isArray(tools) || tools.length === 0) {
2575
+ const fableModel = isFableCaptureModel(captured.body.model);
2576
+ const splitFablePrompt = Array.isArray(systemBlocks) && systemBlocks.length === 4 && fableModel && pickTextBlock(systemBlocks[2])?.trimStart().startsWith("# Reporting outcomes") === true;
2577
+ if (!Array.isArray(systemBlocks) || systemBlocks.length !== 3 && !splitFablePrompt || !Array.isArray(tools) || tools.length === 0) {
2572
2578
  return null;
2573
2579
  }
2574
2580
  const billingHeader = pickTextBlock(systemBlocks[0]);
2575
2581
  const agentIdentity = pickTextBlock(systemBlocks[1]);
2576
- const systemPrompt = pickTextBlock(systemBlocks[2]);
2582
+ const promptTexts = (splitFablePrompt ? systemBlocks.slice(2) : [systemBlocks[2]]).map(pickTextBlock);
2577
2583
  const extractedTools = tools.filter(isTemplateTool).map((tool) => ({ ...tool }));
2578
- if (!billingHeader || !agentIdentity || !systemPrompt || extractedTools.length === 0) {
2584
+ if (!billingHeader || !agentIdentity || promptTexts.some((text) => !text) || extractedTools.length === 0) {
2579
2585
  return null;
2580
2586
  }
2587
+ const systemPrompt = promptTexts.join("\n\n");
2581
2588
  const toolNames2 = extractedTools.map((tool) => tool.name);
2582
2589
  const headerValues = extractStaticHeaderValues(captured.headers);
2583
2590
  const bodyFieldOrder = Object.keys(captured.body);
@@ -2846,4 +2853,4 @@ export {
2846
2853
  setFingerprintCaptureTestOverridesForTest,
2847
2854
  resetFingerprintCaptureForTest
2848
2855
  };
2849
- //# sourceMappingURL=chunk-KLKWGBD5.js.map
2856
+ //# sourceMappingURL=chunk-6LDKSNBQ.js.map