@aexol/spectral 0.9.170 → 0.9.172

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/agent/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,EAIX,SAAS,EAET,MAAM,4BAA4B,CAAC;AAUpC,OAAO,EACN,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EACN,KAAK,WAAW,EAKhB,MAAM,aAAa,CAAC;AAErB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAOrD,OAAO,KAAK,EAAE,gBAAgB,IAAI,oBAAoB,EAAE,MAAM,8CAA8C,CAAC;AAsG7G;;;;;;;;;GASG;AACH,wBAAgB,yBAAyB,CACxC,gBAAgB,EAAE,MAAM,GAAG,SAAS,EACpC,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE,MAAM,GAAG,aAAa,GAAG,cAAc,GAAG,OAAO,GAAG,QAAQ,CAAC,GACpF,MAAM,CAYR;AAkID;;;GAGG;AACH,wBAAgB,oCAAoC,CACnD,cAAc,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,GAChD,IAAI,CAAC,oBAAoB,CAAC,gBAAgB,CAAC,EAAE,WAAW,CAAC,CAK3D;AAED,wBAAgB,oBAAoB,CACnC,SAAS,EAAE,MAAM,EAAE,GAAG,SAAS,EAC/B,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,YAAY,EACjB,GAAG,EAAE,gBAAgB,GACnB,SAAS,EAAE,CAwCb;AAicD,MAAM,CAAC,OAAO,UAAU,iBAAiB,CACxC,GAAG,EAAE,YAAY,EACjB,IAAI,CAAC,EAAE;IACN,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,iBAAiB,CAAC,EAAE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E,WAAW,KAAK,IAAI,CAAC;IACjD,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB,GACC,IAAI,CAgaN"}
@@ -145,6 +145,23 @@ export function buildSubagentSystemPrompt(baseSystemPrompt, agent) {
145
145
  const remainder = stripped.replace(/^\n+|\n+$/g, "");
146
146
  return remainder ? `${remainder}\n\n---\n\n${subagentBlock}` : subagentBlock;
147
147
  }
148
+ /** Projects out each result's `messages` transcript. */
149
+ function stripResultMessages(results) {
150
+ return results.map(({ messages: _messages, ...lightResult }) => lightResult);
151
+ }
152
+ /** Converts live subagent details into their persisted form.
153
+ *
154
+ * The frontend reads only `details.mode` (and the dedicated `subagent_end`
155
+ * event fields), never `details.results[].messages`. That transcript is dead
156
+ * weight in `events_jsonl` (~891KB per heavy subagent tool result), so it is
157
+ * dropped here at the persistence source.
158
+ */
159
+ function persistDetails(details) {
160
+ return {
161
+ ...details,
162
+ results: stripResultMessages(details.results),
163
+ };
164
+ }
148
165
  // ---------------------------------------------------------------------------
149
166
  // Helpers — message extraction
150
167
  // ---------------------------------------------------------------------------
@@ -797,7 +814,7 @@ export default function subagentExtension(ext, opts) {
797
814
  text: `Chain stopped at step ${i + 1} (${step.agent}): ${errorMsg}`,
798
815
  },
799
816
  ],
800
- details: makeDetails("chain")(results),
817
+ details: persistDetails(makeDetails("chain")(results)),
801
818
  isError: true,
802
819
  };
803
820
  }
@@ -817,7 +834,7 @@ export default function subagentExtension(ext, opts) {
817
834
  text: `Chain completed (${results.length} step${results.length > 1 ? "s" : ""})\n\n${chainSummaries.join("\n\n")}`,
818
835
  },
819
836
  ],
820
- details: makeDetails("chain")(results),
837
+ details: persistDetails(makeDetails("chain")(results)),
821
838
  };
822
839
  }
823
840
  // ── Parallel mode ───────────────────────────────────────────
@@ -855,7 +872,7 @@ export default function subagentExtension(ext, opts) {
855
872
  text: `Parallel: ${done}/${allResults.length} done, ${running} running...`,
856
873
  },
857
874
  ],
858
- details: makeDetails("parallel")([...allResults]),
875
+ details: persistDetails(makeDetails("parallel")([...allResults])),
859
876
  });
860
877
  }
861
878
  };
@@ -882,7 +899,7 @@ export default function subagentExtension(ext, opts) {
882
899
  text: `Parallel: ${successCount}/${results.length} succeeded\n\n${summaries.join("\n\n")}`,
883
900
  },
884
901
  ],
885
- details: makeDetails("parallel")(results),
902
+ details: persistDetails(makeDetails("parallel")(results)),
886
903
  };
887
904
  }
888
905
  // ── Single mode ─────────────────────────────────────────────
@@ -903,7 +920,7 @@ export default function subagentExtension(ext, opts) {
903
920
  text: `Agent ${result.stopReason || "failed"}: ${errorMsg}`,
904
921
  },
905
922
  ],
906
- details: makeDetails("single")([result]),
923
+ details: persistDetails(makeDetails("single")([result])),
907
924
  isError: true,
908
925
  };
909
926
  }
@@ -914,7 +931,7 @@ export default function subagentExtension(ext, opts) {
914
931
  text: getFinalOutput(result.messages) || "(no output)",
915
932
  },
916
933
  ],
917
- details: makeDetails("single")([result]),
934
+ details: persistDetails(makeDetails("single")([result])),
918
935
  };
919
936
  }
920
937
  const available = agents.map((a) => `${a.name} (${a.source})`).join(", ") || "none";
@@ -8433,14 +8433,9 @@ export declare enum InferenceStatus {
8433
8433
  }
8434
8434
  export declare enum ArtifactType {
8435
8435
  GRAPHQL = "GRAPHQL",
8436
- PRISMA = "PRISMA",
8437
- ROUTES = "ROUTES",
8438
8436
  FRONTEND = "FRONTEND",
8439
- WEBHOOKS = "WEBHOOKS",
8440
- CRON = "CRON",
8441
8437
  E2E = "E2E",
8442
- TECHNICAL_DOCS = "TECHNICAL_DOCS",
8443
- CUSTOM = "CUSTOM"
8438
+ BACKEND = "BACKEND"
8444
8439
  }
8445
8440
  export declare enum ModelApiFormat {
8446
8441
  AUTO = "AUTO",