@kodax-ai/kodax 0.7.97-beta.2 → 0.7.97-beta.3

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 (161) hide show
  1. package/CHANGELOG.md +96 -0
  2. package/README.md +55 -2
  3. package/README_CN.md +37 -1
  4. package/dist/artifacts/dist/contract.js +1 -1
  5. package/dist/artifacts/dist/contract.js.map +1 -1
  6. package/dist/artifacts/dist/document-render.d.ts +1 -1
  7. package/dist/artifacts/dist/document-render.js +41 -10
  8. package/dist/artifacts/dist/document-render.js.map +1 -1
  9. package/dist/artifacts/dist/kodax.js +1 -1
  10. package/dist/artifacts/dist/kodax.js.map +1 -1
  11. package/dist/artifacts/dist/libreoffice.d.ts +6 -1
  12. package/dist/artifacts/dist/libreoffice.js +37 -13
  13. package/dist/artifacts/dist/libreoffice.js.map +1 -1
  14. package/dist/artifacts/dist/runtime.js +13 -6
  15. package/dist/artifacts/dist/runtime.js.map +1 -1
  16. package/dist/artifacts/skills/artifact-review/SKILL.md +5 -1
  17. package/dist/chunks/agent-NWQPMZ7B.js +2 -0
  18. package/dist/chunks/agent-adapter-V3IPADCX.js +2 -0
  19. package/dist/chunks/argument-completer-VNKHT4X4.js +2 -0
  20. package/dist/chunks/{bedrock-native-Z5VNWF5U.js → bedrock-native-OEPOBW6W.js} +1 -1
  21. package/dist/chunks/{chunk-NSR4RW2F.js → chunk-3I2MIS4D.js} +1 -1
  22. package/dist/chunks/{chunk-RYBUYHDL.js → chunk-3Y5PBEOD.js} +1 -1
  23. package/dist/chunks/chunk-4FVCMKG2.js +20 -0
  24. package/dist/chunks/{chunk-F6GJXQNA.js → chunk-4GYXZTOD.js} +7 -7
  25. package/dist/chunks/{chunk-EISRVOBJ.js → chunk-4Z7ZHL6V.js} +2 -2
  26. package/dist/chunks/{chunk-W2CWO4PQ.js → chunk-576AAIQM.js} +1 -1
  27. package/dist/chunks/chunk-5E2P4RYS.js +4 -0
  28. package/dist/chunks/{chunk-X5M7TLJV.js → chunk-5LFQ5FVY.js} +1 -1
  29. package/dist/chunks/{chunk-WMMESRP3.js → chunk-6RDMSU4B.js} +1 -1
  30. package/dist/chunks/{chunk-3CP7AUWY.js → chunk-7BA4TSKC.js} +1 -1
  31. package/dist/chunks/{chunk-I325ER7D.js → chunk-AUU3N4V4.js} +1 -1
  32. package/dist/chunks/{chunk-DCE7XQUG.js → chunk-AYDLX2UK.js} +1 -1
  33. package/dist/chunks/{chunk-D36OIMV7.js → chunk-BP3NAYKY.js} +64 -64
  34. package/dist/chunks/{chunk-6TITQQAI.js → chunk-BSCSKJNC.js} +230 -229
  35. package/dist/chunks/{chunk-2HH5AS7E.js → chunk-DAQGOWKD.js} +88 -462
  36. package/dist/chunks/{chunk-UF3GZ5PO.js → chunk-EZF6ZRCO.js} +1 -1
  37. package/dist/chunks/chunk-F2TFWNVZ.js +2 -0
  38. package/dist/chunks/{chunk-53CJDQS2.js → chunk-FVXZ5L33.js} +1 -1
  39. package/dist/chunks/{chunk-MCDZNQWD.js → chunk-G32BMSHH.js} +75 -71
  40. package/dist/chunks/chunk-HJLYZ5AX.js +361 -0
  41. package/dist/chunks/{chunk-P55RJIOG.js → chunk-IOIFCU46.js} +1 -1
  42. package/dist/chunks/{chunk-DV5YPYLW.js → chunk-IR46ZHXU.js} +1 -1
  43. package/dist/chunks/chunk-NJDR5EEF.js +6 -0
  44. package/dist/chunks/{chunk-KDSO7V4O.js → chunk-OC3DQXN6.js} +1 -1
  45. package/dist/chunks/{chunk-J2L2NK6E.js → chunk-OMVAPRQI.js} +90 -57
  46. package/dist/chunks/chunk-OXCB2TRF.js +42 -0
  47. package/dist/chunks/{chunk-C6JGLEYD.js → chunk-P6R6V7EW.js} +1 -1
  48. package/dist/chunks/{chunk-SK3RRGHJ.js → chunk-PFBZ4ZXO.js} +28 -28
  49. package/dist/chunks/{chunk-V2XJSFFE.js → chunk-QDE6THC5.js} +1 -1
  50. package/dist/chunks/{chunk-EPK6EWRI.js → chunk-QRYEP34M.js} +1 -1
  51. package/dist/chunks/chunk-ROWYE472.js +460 -0
  52. package/dist/chunks/{chunk-R42S4BLA.js → chunk-SQGESMNC.js} +1 -1
  53. package/dist/chunks/{chunk-XZSFUGPN.js → chunk-U73VEVMP.js} +1 -1
  54. package/dist/chunks/{chunk-D425EZGC.js → chunk-V2TG7GNW.js} +1 -1
  55. package/dist/chunks/{chunk-QSZCR5GC.js → chunk-VRO2CDBY.js} +97 -97
  56. package/dist/chunks/{chunk-BBZWF2EA.js → chunk-WMQQQY3D.js} +1 -1
  57. package/dist/chunks/{chunk-JAF2YLZO.js → chunk-X3YYJJTF.js} +2 -2
  58. package/dist/chunks/{chunk-UL6YIT4M.js → chunk-XYRI6ER5.js} +1 -1
  59. package/dist/chunks/chunk-YRPB3LID.js +3 -0
  60. package/dist/chunks/{chunk-5MUVRFMU.js → chunk-ZDAU3LZ2.js} +1 -1
  61. package/dist/chunks/{chunk-WWPVEK6B.js → chunk-ZP3YSYWM.js} +10 -10
  62. package/dist/chunks/{client-LTIFNED5.js → client-NJ32JBC3.js} +1 -1
  63. package/dist/chunks/compaction-config-JBQGU3NO.js +2 -0
  64. package/dist/chunks/{construction-bootstrap-OAZKGI5Y.js → construction-bootstrap-CM47ZXG7.js} +1 -1
  65. package/dist/chunks/dist-O6BHIQEP.js +2 -0
  66. package/dist/chunks/{google-native-WLL27OV7.js → google-native-BV5GKT5B.js} +1 -1
  67. package/dist/chunks/host-PI5NL4W4.js +2 -0
  68. package/dist/chunks/{mistral-native-JXPIDDYZ.js → mistral-native-X42JCFZH.js} +1 -1
  69. package/dist/chunks/{model-DZF6URW3.js → model-MT3WJX76.js} +1 -1
  70. package/dist/chunks/{permission-YVVMLQ5I.js → permission-YVDVSE6H.js} +1 -1
  71. package/dist/chunks/{pi-messages-5LLOZH57.js → pi-messages-DVJANXV5.js} +1 -1
  72. package/dist/chunks/readline-helpers-5JS7UGTE.js +2 -0
  73. package/dist/chunks/run-manager-Y6VYEWSJ.js +2 -0
  74. package/dist/chunks/running-session-ANMBA5XV.js +2 -0
  75. package/dist/chunks/skills-XL2XIBWV.js +2 -0
  76. package/dist/chunks/{tool-dispatch-MLM3QTSU.js → tool-dispatch-2FOG65FC.js} +1 -1
  77. package/dist/chunks/{utils-2QNMYRGA.js → utils-XZ22R6VB.js} +1 -1
  78. package/dist/client-history.js +2 -0
  79. package/dist/history-turn.js +3 -0
  80. package/dist/index.d.ts +19 -19
  81. package/dist/index.js +2 -2
  82. package/dist/kodax_bootstrap.js +1 -1
  83. package/dist/kodax_cli.js +1472 -1810
  84. package/dist/kodax_doctor.js +1 -1
  85. package/dist/maintenance-scheduler.js +2 -0
  86. package/dist/manual-topics.json +32 -3
  87. package/dist/native/win32-x64/kodax-windows-sandbox.exe +0 -0
  88. package/dist/native/win32-x64/kodax-windows-text-transaction.node +0 -0
  89. package/dist/native/win32-x64/manifest.json +2 -2
  90. package/dist/one-shot-task.js +1 -1
  91. package/dist/provider-auth-cli.js +1 -1
  92. package/dist/runtime-daemon-schema.json +1 -1
  93. package/dist/sandbox-network-broker.js +93 -441
  94. package/dist/sdk-a2a.d.ts +13 -13
  95. package/dist/sdk-a2a.js +1 -1
  96. package/dist/sdk-agent.d.ts +17 -12
  97. package/dist/sdk-agent.js +1 -1
  98. package/dist/sdk-client.d.ts +6 -6
  99. package/dist/sdk-client.js +1 -1
  100. package/dist/sdk-coding.d.ts +17 -17
  101. package/dist/sdk-coding.js +1 -1
  102. package/dist/sdk-experimental-memory.d.ts +2 -2
  103. package/dist/sdk-experimental-memory.js +1 -1
  104. package/dist/sdk-llm.d.ts +4 -2
  105. package/dist/sdk-llm.js +1 -1
  106. package/dist/sdk-mcp.js +1 -1
  107. package/dist/sdk-media.d.ts +13 -13
  108. package/dist/sdk-media.js +1 -1
  109. package/dist/sdk-repl.d.ts +16 -16
  110. package/dist/sdk-repl.js +1 -1
  111. package/dist/sdk-runtime.d.ts +46 -46
  112. package/dist/sdk-runtime.js +1 -1
  113. package/dist/sdk-sandbox.js +1 -1
  114. package/dist/sdk-session.d.ts +7 -7
  115. package/dist/sdk-session.js +1 -1
  116. package/dist/sdk-skills.js +1 -1
  117. package/dist/semantic-worker.js +87 -435
  118. package/dist/storage-repair-cli.js +1 -1
  119. package/dist/types-chunks/{bash-prefix-extractor.d-CJliu5-D.d.ts → bash-prefix-extractor.d-BghXa_md.d.ts} +9 -3
  120. package/dist/types-chunks/{capsule.d-EMwSALqK.d.ts → capsule.d-BTlvC5qq.d.ts} +4 -4
  121. package/dist/types-chunks/{client-contract-B7q69yMA.d.ts → client-contract-B7ZSFKTv.d.ts} +52 -4
  122. package/dist/types-chunks/{controller.d-C0SAuNKu.d.ts → controller.d-Btu5FDdw.d.ts} +1 -1
  123. package/dist/types-chunks/{controller.d-D-hPLKaA.d.ts → controller.d-D6rEz5LS.d.ts} +3 -3
  124. package/dist/types-chunks/{history-retrieval.d-BwEUR9cb.d.ts → history-retrieval.d-B_AriUJp.d.ts} +1 -1
  125. package/dist/types-chunks/{manifest.d-YE3-AIeO.d.ts → manifest.d-Yyce-hHj.d.ts} +1 -1
  126. package/dist/types-chunks/{public-api.d-BhDU643p.d.ts → public-api.d-BLv3lFmw.d.ts} +9 -4
  127. package/dist/types-chunks/{review-inbox.d-Bgt46S7L.d.ts → review-inbox.d-yREk25Vf.d.ts} +2 -0
  128. package/dist/types-chunks/{review-packet.d-ChOfJaNI.d.ts → review-packet.d-xwXxHmML.d.ts} +1 -1
  129. package/dist/types-chunks/{run-manager.d-ChzguipG.d.ts → run-manager.d-D4sa9JYz.d.ts} +26 -12
  130. package/dist/types-chunks/{runtime-client-info-P_mRDG7j.d.ts → runtime-client-info-oRMrkHmb.d.ts} +2 -2
  131. package/dist/types-chunks/{runtime-event-BW5Pla7a.d.ts → runtime-event-BOyaILWg.d.ts} +3 -1
  132. package/dist/types-chunks/{sdk-runtime-cDe7qmN3.d.ts → sdk-runtime-CYyXmQok.d.ts} +27 -13
  133. package/dist/types-chunks/{sdk-session-D3pcSbnA.d.ts → sdk-session-D6mS5qgO.d.ts} +6 -3
  134. package/dist/types-chunks/{skill-invocation-error.d-gsNNDnnt.d.ts → skill-invocation-error.d-Be3qg4JQ.d.ts} +3 -3
  135. package/dist/types-chunks/{trusted-repl-entry-Bbkd2HlO.d.ts → trusted-repl-entry-YWNc4m-Z.d.ts} +7 -7
  136. package/dist/types-chunks/{types.d-BlXTogOo.d.ts → types.d-BQ-hbni4.d.ts} +1 -1
  137. package/dist/types-chunks/{utils.d-CxHyBvO6.d.ts → utils.d-C0F3Uf2X.d.ts} +6 -6
  138. package/dist/windows-effect-job-programs.json +4 -0
  139. package/docs/ARTIFACT_SDK.md +3 -3
  140. package/docs/CLIENT_CONTRACT.md +4 -2
  141. package/docs/SDK_MIGRATION.md +9 -5
  142. package/docs/SPACE_SDK_SEAMS.md +12 -1
  143. package/package.json +4 -3
  144. package/public_docs/README.md +10 -3
  145. package/public_docs/sdk/embedder-guide.md +1 -1
  146. package/dist/chunks/agent-DS7M57WD.js +0 -2
  147. package/dist/chunks/agent-adapter-TLWGGK3V.js +0 -2
  148. package/dist/chunks/argument-completer-OGCXKTRQ.js +0 -2
  149. package/dist/chunks/chunk-GJXOTOZB.js +0 -465
  150. package/dist/chunks/chunk-KE2NBMAP.js +0 -20
  151. package/dist/chunks/chunk-OGTRDK4Q.js +0 -359
  152. package/dist/chunks/chunk-R2HTPDI7.js +0 -2
  153. package/dist/chunks/chunk-SDPZFH6M.js +0 -4
  154. package/dist/chunks/chunk-XDMNJW6J.js +0 -42
  155. package/dist/chunks/compaction-config-ECMOFP5H.js +0 -2
  156. package/dist/chunks/dist-5J53DGAO.js +0 -2
  157. package/dist/chunks/host-65E5NM5P.js +0 -2
  158. package/dist/chunks/readline-helpers-UZXWBRXQ.js +0 -2
  159. package/dist/chunks/run-manager-ZFACIZM2.js +0 -2
  160. package/dist/chunks/running-session-Q5Y6A2QV.js +0 -2
  161. package/dist/chunks/skills-TJP6BLZJ.js +0 -2
package/dist/sdk-a2a.d.ts CHANGED
@@ -1,32 +1,32 @@
1
- import { ah as ExternalAgentRegistration, p as AgentEffectDeclaration, s as AgentExecutorFactory, b as AgentArtifactPolicy } from './types-chunks/types.d-BlXTogOo.js';
2
- import { b3 as RuntimeKodaXOptions, db as RuntimeWorkspaceBinding, aL as RuntimeExecutionToolPolicy, c_ as RuntimeUserMarkdownAgentRef, e as KodaXRuntime, aO as RuntimeExternalAgentsOptions } from './types-chunks/sdk-runtime-cDe7qmN3.js';
1
+ import { ah as ExternalAgentRegistration, p as AgentEffectDeclaration, s as AgentExecutorFactory, b as AgentArtifactPolicy } from './types-chunks/types.d-BQ-hbni4.js';
2
+ import { b3 as RuntimeKodaXOptions, db as RuntimeWorkspaceBinding, aL as RuntimeExecutionToolPolicy, c_ as RuntimeUserMarkdownAgentRef, e as KodaXRuntime, aO as RuntimeExternalAgentsOptions } from './types-chunks/sdk-runtime-CYyXmQok.js';
3
3
  import { d as IntegrationConfigSnapshot, f as IntegrationConfigStatus } from './types-chunks/integration-config.d-BNowXE8k.js';
4
4
  import './types-chunks/types.d-Bi8iUd6x.js';
5
- import './types-chunks/review-inbox.d-Bgt46S7L.js';
5
+ import './types-chunks/review-inbox.d-yREk25Vf.js';
6
6
  import './types-chunks/errors.d-D73qdYbS.js';
7
7
  import './types-chunks/types.d-D8qQjMeo.js';
8
8
  import './types-chunks/config.d-CJy1WENT.js';
9
9
  import './types-chunks/manager.d-BMH8Q6TV.js';
10
10
  import './types-chunks/capability.d-DapzKxy3.js';
11
- import './types-chunks/history-retrieval.d-BwEUR9cb.js';
12
- import './types-chunks/bash-prefix-extractor.d-CJliu5-D.js';
11
+ import './types-chunks/history-retrieval.d-B_AriUJp.js';
12
+ import './types-chunks/bash-prefix-extractor.d-BghXa_md.js';
13
13
  import 'vscode-languageserver-protocol';
14
- import './types-chunks/controller.d-D-hPLKaA.js';
14
+ import './types-chunks/controller.d-D6rEz5LS.js';
15
15
  import 'node:child_process';
16
16
  import './types-chunks/provider-credential-context.d-Dw-sWcnu.js';
17
17
  import './types-chunks/cost-tracker.d-D1CTx-IO.js';
18
18
  import './types-chunks/types-DDJu9iWX.js';
19
- import './types-chunks/skill-invocation-error.d-gsNNDnnt.js';
20
- import './types-chunks/run-manager.d-ChzguipG.js';
19
+ import './types-chunks/skill-invocation-error.d-Be3qg4JQ.js';
20
+ import './types-chunks/run-manager.d-D4sa9JYz.js';
21
21
  import './types-chunks/side-query.d-UFKdWSw7.js';
22
- import './types-chunks/manifest.d-YE3-AIeO.js';
23
- import './types-chunks/client-contract-B7q69yMA.js';
22
+ import './types-chunks/manifest.d-Yyce-hHj.js';
23
+ import './types-chunks/client-contract-B7ZSFKTv.js';
24
24
  import './types-chunks/provider-request-observation.d-CNe9vse3.js';
25
25
  import './types-chunks/task-results.d-XMdWq0eA.js';
26
- import './types-chunks/runtime-client-info-P_mRDG7j.js';
27
- import './types-chunks/utils.d-CxHyBvO6.js';
26
+ import './types-chunks/runtime-client-info-oRMrkHmb.js';
27
+ import './types-chunks/utils.d-C0F3Uf2X.js';
28
28
  import 'readline';
29
- import './types-chunks/public-api.d-BhDU643p.js';
29
+ import './types-chunks/public-api.d-BLv3lFmw.js';
30
30
  import 'child_process';
31
31
 
32
32
  declare const A2A_PROTOCOL_VERSION = "1.0";
package/dist/sdk-a2a.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // @kodax-ai/kodax — bundled distribution. See docs/ADR.md ADR-022 + ADR-024.
2
- import{a as Fe,b as Ge,c as ae,d as p,e as ce,f as Xe,g as Ve,h as Q,i as N,j as we,k as $,l as D,m as G,n as X,o as ri,p as ke,q as R,r as ee,s as Qe,t as Ze,u as ii,v as z,w as B,x as Ye,z as de}from"./chunks/chunk-NSR4RW2F.js";import"./chunks/chunk-6TITQQAI.js";import"./chunks/chunk-53CJDQS2.js";import"./chunks/chunk-MCDZNQWD.js";import"./chunks/chunk-ZQYWDI4O.js";import{o as et,u as tt}from"./chunks/chunk-EISRVOBJ.js";import"./chunks/chunk-DCE7XQUG.js";import"./chunks/chunk-QSZCR5GC.js";import"./chunks/chunk-V2XJSFFE.js";import"./chunks/chunk-JAF2YLZO.js";import"./chunks/chunk-DV5YPYLW.js";import"./chunks/chunk-X5M7TLJV.js";import"./chunks/chunk-C6JGLEYD.js";import"./chunks/chunk-D36OIMV7.js";import"./chunks/chunk-BBZWF2EA.js";import"./chunks/chunk-F6GJXQNA.js";import"./chunks/chunk-XDMNJW6J.js";import"./chunks/chunk-RYBUYHDL.js";import"./chunks/chunk-4Y6U7AH4.js";import"./chunks/chunk-EPK6EWRI.js";import"./chunks/chunk-ISLK6R2P.js";import"./chunks/chunk-OGTRDK4Q.js";import"./chunks/chunk-GZUWQZJD.js";import"./chunks/chunk-W2CWO4PQ.js";import"./chunks/chunk-TQ475LOI.js";import"./chunks/chunk-65652LR4.js";import"./chunks/chunk-5MUVRFMU.js";import"./chunks/chunk-2HH5AS7E.js";import{h as j}from"./chunks/chunk-J2L2NK6E.js";import"./chunks/chunk-KDSO7V4O.js";import"./chunks/chunk-SK3RRGHJ.js";import"./chunks/chunk-WMMESRP3.js";import"./chunks/chunk-QP47JIWP.js";import"./chunks/chunk-52EN2777.js";import"./chunks/chunk-UF3GZ5PO.js";import"./chunks/chunk-KE2NBMAP.js";import"./chunks/chunk-V5RCDBKU.js";import"./chunks/chunk-KDLOPBFZ.js";import{a as s}from"./chunks/chunk-V4WSBIXB.js";var V="1.0",Se="kodax-a2a-v1-jsonrpc";import{lookup as Gt}from"node:dns/promises";import{request as Xt}from"node:http";import{request as Vt}from"node:https";import{BlockList as Qt,isIP as nt}from"node:net";import{Readable as Zt}from"node:stream";var ue=new Qt;ue.addSubnet("127.0.0.0",8,"ipv4");ue.addAddress("::1","ipv6");function Re(t){let e=nt(t);return e===4?ue.check(t,"ipv4"):e===6&&ue.check(t,"ipv6")}s(Re,"isLoopbackAddress");function Yt(t){let e=t.toLowerCase();return e==="localhost"||e==="127.0.0.1"||e==="::1"}s(Yt,"isExactLoopbackHostname");function Te(t){let e=t.split(".").map(Number),[n,r,i,o]=e;return e.length!==4||n===void 0||r===void 0||i===void 0||o===void 0?!0:n===0||n===10||n===127||n===100&&r>=64&&r<=127||n===169&&r===254||n===172&&r>=16&&r<=31||n===192&&r===168||n===192&&r===0&&i===0&&o!==9&&o!==10||n===192&&r===0&&i===2||n===198&&(r===18||r===19)||n===198&&r===51&&i===100||n===203&&r===0&&i===113||n>=224}s(Te,"isPrivateIpv4");function en(t){if(Re(t))return!0;let e=t.toLowerCase(),n=/^::ffff:(\d+\.\d+\.\d+\.\d+)$/.exec(e)?.[1];if(n)return Te(n);let r=/^::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/.exec(e);if(r?.[1]&&r[2]){let i=Number.parseInt(r[1],16),o=Number.parseInt(r[2],16);return Te(`${i>>8}.${i&255}.${o>>8}.${o&255}`)}return e==="::"||e==="::1"||e.startsWith("fc")||e.startsWith("fd")||e.startsWith("fe8")||e.startsWith("fe9")||e.startsWith("fea")||e.startsWith("feb")||e.startsWith("ff")}s(en,"isPrivateIpv6");function tn(t){let e=nt(t);return e===4?Te(t):e===6?en(t):!0}s(tn,"isPrivateAddress");async function rt(t,e){if(t.protocol!=="https:"&&t.protocol!=="http:")throw new p(-32602,"A2A URL must use HTTP or HTTPS.");if(!e.allowedOrigins.includes(t.origin))throw new p(-32602,`A2A origin is not allowed: ${t.origin}`);if(t.username||t.password)throw new p(-32602,"A2A URL must not include credentials.");let n=t.hostname.startsWith("[")&&t.hostname.endsWith("]")?t.hostname.slice(1,-1):t.hostname,r=await Gt(n,{all:!0,verbatim:!0});if(r.length===0)throw new p(-32602,"A2A hostname did not resolve.");if(n.toLowerCase()==="localhost"&&!r.every(a=>Re(a.address)))throw new p(-32602,"A2A localhost target must resolve only to loopback addresses.");let i=Yt(n)&&r.every(a=>Re(a.address));if(t.protocol==="http:"&&!i&&e.allowInsecureHttp!==!0)throw new p(-32602,"Non-loopback A2A targets must use HTTPS unless plaintext HTTP is explicitly allowed.");if(!e.allowPrivateAddresses&&r.some(a=>tn(a.address)))throw new p(-32602,"A2A private network targets are not allowed.");let o=r[0];if(o===void 0||o.family!==4&&o.family!==6)throw new p(-32602,"A2A hostname returned an unsupported address.");return{address:o.address,family:o.family}}s(rt,"validateA2AUrl");async function nn(t,e){await rt(t,e)}s(nn,"assertSafeA2AUrl");function rn(t){if(t==null||typeof t=="string")return t??void 0;if(t instanceof URLSearchParams)return t.toString();if(t instanceof Uint8Array)return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new p(-32602,"A2A request body type is not supported by the safe transport.")}s(rn,"encodeRequestBody");function on(t){return((e,n,r)=>{if(typeof n=="object"&&n.all){r(null,[t]);return}r(null,t.address,t.family)})}s(on,"pinnedLookup");function sn(t,e,n){return new Promise((r,i)=>{let o=new Headers(e.headers);o.set("accept-encoding","identity");let a=(t.protocol==="https:"?Vt:Xt)(t,{method:e.method,headers:Object.fromEntries(o),lookup:on(n),signal:e.signal??void 0},c=>{let d=new Headers;for(let A=0;A<c.rawHeaders.length;A+=2){let h=c.rawHeaders[A],y=c.rawHeaders[A+1];h!==void 0&&y!==void 0&&d.append(h,y)}let l=c.statusCode??500,u=e.method!=="HEAD"&&l!==204&&l!==205&&l!==304?Zt.toWeb(c):null;r(new Response(u,{status:l,statusText:c.statusMessage,headers:d}))});a.once("error",i),a.end(rn(e.body))})}s(sn,"requestValidatedAddress");async function Ee(t,e,n,r){let i=await rt(t,n);return r!==void 0?r(t,e):sn(t,e,i)}s(Ee,"openSafeA2AResponse");async function an(t,e){let n=t.headers.get("content-length");if(n&&Number(n)>e)throw new p(-32603,"A2A response is too large.");if(!t.body)return new Uint8Array;let r=t.body.getReader(),i=[],o=0;for(;;){let d=await r.read();if(d.done)break;if(o+=d.value.byteLength,o>e)throw await r.cancel(),new p(-32603,"A2A response is too large.");i.push(d.value)}let a=new Uint8Array(o),c=0;for(let d of i)a.set(d,c),c+=d.byteLength;return a}s(an,"boundedBody");function cn(t,e){if(!t)return{signal:e,cleanup:s(()=>{},"cleanup")};let n=new AbortController,r=s(()=>n.abort(t.reason),"abortFromCaller"),i=s(()=>n.abort(e.reason),"abortFromDeadline");return t.aborted?r():t.addEventListener("abort",r,{once:!0}),e.aborted?i():e.addEventListener("abort",i,{once:!0}),{signal:n.signal,cleanup:s(()=>{t.removeEventListener("abort",r),e.removeEventListener("abort",i)},"cleanup")}}s(cn,"combineAbortSignals");async function H(t,e,n,r){let i=t,o=new Headers(e.headers).get("authorization");for(let a=0;a<=n.maxRedirects;a+=1){let c=new AbortController,d=setTimeout(()=>c.abort(new Error("A2A request timed out.")),n.requestTimeoutMs),l=cn(e.signal,c.signal),f=new Headers(e.headers);o===null?f.delete("authorization"):f.set("authorization",o);try{let u=await Ee(i,{...e,headers:f,redirect:"manual",signal:l.signal},n,r);if(u.status<300||u.status>=400)return{response:u,body:await an(u,n.maxResponseBytes),url:i};let A=u.headers.get("location");if(!A||a===n.maxRedirects)throw new p(-32603,"A2A redirect limit exceeded.");let h=new URL(A,i);await u.body?.cancel(),h.origin!==i.origin&&(o=null),i=h}finally{clearTimeout(d),l.cleanup()}}throw new p(-32603,"A2A redirect limit exceeded.")}s(H,"safeA2AFetch");function J(t){return new TextDecoder("utf-8",{fatal:!0}).decode(t)}s(J,"decodeUtf8");import{createHash as pn,randomUUID as be}from"node:crypto";import*as M from"oauth4webapi";var dn=6e4,un=1e3,ln=.1;function An(t,e){return new Response(e.byteLength===0?null:J(e),{status:t.status,statusText:t.statusText,headers:t.headers})}s(An,"oauthResponse");function fn(t,e){if(e===void 0||e<=0)return t;let n=e*1e3,r=Math.min(dn,Math.max(un,n*ln));return t+Math.max(0,n-r)}s(fn,"cacheExpiry");function it(t){let e=N(t.clientId,"OAuth 2.0 clientId");if(t.clientAuthenticationMethod!=="basic"&&t.clientAuthenticationMethod!=="post")throw new Error("OAuth 2.0 clientAuthenticationMethod must be basic or post.");let n=t.clientAuthenticationMethod,r=t.scopes===void 0?void 0:Q(t.scopes,"OAuth 2.0 scopes"),i=$(t.issuer,"OAuth 2.0 issuer"),o=D(t.tokenUrl,"OAuth 2.0 token endpoint"),a=t.resource===void 0?void 0:G(t.resource,"OAuth 2.0 resource"),c={issuer:i,token_endpoint:o.href},d={client_id:e},l={...t.networkPolicy,maxRedirects:0},f=t.now??Date.now,u,A,h=0;async function y(w){let m=n==="post"?M.ClientSecretPost(w):M.ClientSecretBasic(w),T=new URLSearchParams;r&&r.length>0&&T.set("scope",r.join(" ")),a!==void 0&&T.set("resource",a);let g={[M.customFetch]:async(S,C)=>{if(new URL(S).href!==o.href)throw new Error("OAuth 2.0 token request targeted an unexpected endpoint.");let L=await H(o,{method:C.method,headers:C.headers,body:C.body,redirect:"manual",...C.signal!==void 0?{signal:C.signal}:{}},l,t.fetch);return An(L.response,L.body)}};o.protocol==="http:"&&(g[M.allowInsecureRequests]=!0);let k;try{let S=await M.clientCredentialsGrantRequest(c,d,m,T,g);k=await M.processClientCredentialsResponse(c,d,S)}catch{throw new Error("OAuth 2.0 client credentials token request failed.")}if(k.token_type!=="bearer")throw new Error("OAuth 2.0 token endpoint did not return a Bearer access token.");let O=f();return{value:`Bearer ${k.access_token}`,expiresAt:fn(O,k.expires_in)}}return s(y,"requestAuthorization"),{async getAuthorization(w){if(w.length===0)throw new Error("OAuth 2.0 client secret is required.");let m=f();if(u!==void 0&&u.expiresAt>m)return u.value;if(A!==void 0)return A;let T=h,g;return g=y(w).then(k=>(h===T&&k.expiresAt>f()&&(u=k),k.value)).finally(()=>{A===g&&(A=void 0)}),A=g,g},invalidate(w){if(w!==void 0){u?.value===w&&(u=void 0);return}h+=1,u=void 0,A=void 0}}}s(it,"createOAuth2ClientCredentialsTokenManager");var ot=4,st=/^[A-Za-z0-9\-._~+/=]$/u;function le(t){return t!==void 0&&/^Bearer\s+\S+$/iu.test(t)}s(le,"isBearerAuthorization");function hn(t,e){let n="",r=0;for(;r<t.length;){let i=t.indexOf(e,r);if(i<0)return n+t.slice(r);let o=i===0?void 0:t[i-1],a=i+e.length,c=a===t.length?void 0:t[a],d=o===void 0||!st.test(o),l=c===void 0||!st.test(c);n+=t.slice(r,i),d&&l?(n+="[REDACTED]",r=a):(n+=e,r=a)}return n}s(hn,"replaceBoundedToken");function re(t){return Array.isArray(t)?`[${t.map(re).join(",")}]`:R(t)?`{${Object.keys(t).sort().map(e=>`${JSON.stringify(e)}:${re(t[e])}`).join(",")}}`:JSON.stringify(t)??"null"}s(re,"stableJson");function at(t){return`sha256:${pn("sha256").update(t).digest("hex")}`}s(at,"sha256");var xe=class{static{s(this,"AuthorizationRedactor")}#e=[];#n=new Map;remember(e){if(!e)return;let n=this.#e.indexOf(e);n>=0&&this.#e.splice(n,1),this.#e.unshift(e),this.#e.length>ot&&(this.#e.length=ot)}retain(e){if(!e)return()=>{};this.remember(e),this.#n.set(e,(this.#n.get(e)??0)+1);let n=!1;return()=>{if(n)return;n=!0;let r=(this.#n.get(e)??1)-1;r===0?this.#n.delete(e):this.#n.set(e,r)}}redactText(e){let n=[...new Set([...this.#n.keys(),...this.#e])],r=n.sort((o,a)=>a.length-o.length).reduce((o,a)=>o.split(a).join("[REDACTED]"),e),i=n.flatMap(o=>{let a=/^Bearer\s+(\S+)$/iu.exec(o)?.[1];return a?[a]:[]}).sort((o,a)=>a.length-o.length);return[...new Set(i)].reduce((o,a)=>hn(o,a),r)}redactContent(e){return typeof e=="string"?this.redactText(e):Array.isArray(e)?e.map(n=>this.redactContent(n)):R(e)?Object.fromEntries(Object.entries(e).map(([n,r])=>[n,this.redactContent(r)])):e}redactPart(e){return{...e,...e.text===void 0?{}:{text:this.redactText(e.text)},...e.raw===void 0?{}:{raw:this.redactText(e.raw)},...e.url===void 0?{}:{url:this.redactText(e.url)},...e.data===void 0?{}:{data:this.redactContent(e.data)},...e.metadata===void 0?{}:{metadata:this.redactContent(e.metadata)},...e.filename===void 0?{}:{filename:this.redactText(e.filename)}}}redactMessage(e){return{...e,parts:e.parts.map(n=>this.redactPart(n)),...e.metadata===void 0?{}:{metadata:this.redactContent(e.metadata)}}}redactArtifact(e){return{...e,...e.name===void 0?{}:{name:this.redactText(e.name)},...e.description===void 0?{}:{description:this.redactText(e.description)},parts:e.parts.map(n=>this.redactPart(n)),...e.metadata===void 0?{}:{metadata:this.redactContent(e.metadata)}}}redactTask(e){return{...e,status:{...e.status,...e.status.message===void 0?{}:{message:this.redactMessage(e.status.message)}},...e.artifacts===void 0?{}:{artifacts:e.artifacts.map(n=>this.redactArtifact(n))},...e.history===void 0?{}:{history:e.history.map(n=>this.redactMessage(n))},...e.metadata===void 0?{}:{metadata:this.redactContent(e.metadata)}}}redactError(e){let n=this.redactText(e instanceof Error?e.message:String(e));return e instanceof p?new p(e.code,n,e.httpStatus,this.redactContent(e.data),e.headers):new Error(n)}};function ct(t,e){let n=new URL(e).origin;if(!t.allowedOrigins.some(i=>new URL(i).origin===n))throw new Error(`A2A endpoint origin is not allowed by network policy: ${n}`);return{...t,allowedOrigins:[n]}}s(ct,"endpointNetworkPolicy");function gn(t){if(t!==void 0){if(!R(t)||typeof t.scheme!="string")throw new Error("A2A registration authentication is invalid.");if(t.type==="http-bearer")return{type:"http-bearer",scheme:t.scheme};if(t.type!=="oauth2-client-credentials"||typeof t.issuer!="string"||typeof t.tokenUrl!="string"||typeof t.clientId!="string"||!Array.isArray(t.scopes)||!t.scopes.every(e=>typeof e=="string")||!["client-secret-basic","client-secret-post"].includes(String(t.clientAuthentication)))throw new Error("A2A registration OAuth2 authentication is invalid.");return{type:"oauth2-client-credentials",scheme:t.scheme,issuer:t.issuer,tokenUrl:t.tokenUrl,clientId:t.clientId,scopes:t.scopes,...typeof t.resource=="string"?{resource:t.resource}:{},clientAuthentication:t.clientAuthentication}}}s(gn,"executorAuthentication");function W(t){let e=t.executorConfig;if(!R(e))throw new Error("A2A registration executorConfig is missing.");if(typeof e.agentCardUrl!="string"||typeof e.interfaceUrl!="string")throw new Error("A2A registration endpoints are invalid.");let n=gn(e.authentication);return{agentCardUrl:e.agentCardUrl,interfaceUrl:e.interfaceUrl,...typeof e.tenant=="string"?{tenant:e.tenant}:{},...n?{authentication:n}:{}}}s(W,"executorConfig");function mn(t,e){let n=t.supportedInterfaces.find(i=>i.protocolBinding.toUpperCase()==="JSONRPC"&&i.protocolVersion==="1.0");if(!n)throw new Error("Agent Card has no supported A2A 1.0 JSONRPC interface.");let r=new URL(n.url);if(r.username||r.password||r.hash)throw new Error("A2A interface URL must not contain credentials or a fragment.");if(r.origin!==e.origin)throw new Error("A2A interface must use the same origin as the trusted Agent Card.");return n}s(mn,"chooseInterface");function yn(t){if(t===void 0)return;if(!R(t))throw new Error("A2A authentication must be an object.");let e=N(t.scheme,"A2A authentication.scheme");if(t.type==="http-bearer")return{type:"http-bearer",scheme:e,credentialRef:N(t.credentialRef,"A2A authentication.credentialRef")};if(t.type!=="oauth2-client-credentials")throw new Error("A2A authentication.type must be http-bearer or oauth2-client-credentials.");if(t.clientAuthentication!=="client-secret-basic"&&t.clientAuthentication!=="client-secret-post")throw new Error("A2A authentication.clientAuthentication is invalid.");return{type:"oauth2-client-credentials",scheme:e,issuer:$(t.issuer,"Configured OAuth2 issuer"),tokenUrl:D(t.tokenUrl,"Configured OAuth2 token endpoint").href,clientId:N(t.clientId,"Configured OAuth2 clientId"),clientSecretRef:N(t.clientSecretRef,"Configured OAuth2 clientSecretRef"),scopes:Q(t.scopes,"Configured OAuth2 scopes"),...t.resource===void 0?{}:{resource:G(t.resource,"Configured OAuth2 resource")},clientAuthentication:t.clientAuthentication}}s(yn,"validatedClientAuthentication");function wn(t){let e=t.credentialRef===void 0?void 0:N(t.credentialRef,"A2A credentialRef"),n=yn(t.authentication);if(t.credentialRef!==void 0&&t.authentication!==void 0)throw new Error("A2A registration cannot combine credentialRef with structured authentication.");return{agentId:t.agentId,agentCardUrl:t.agentCardUrl,...e!==void 0?{credentialRef:e}:{},...n!==void 0?{authentication:n}:{},effects:t.effects}}s(wn,"validatedRegistrationInput");function kn(t,e,n){if(t.authentication)return[[{schemeName:t.authentication.scheme,kind:t.authentication.type,...t.authentication.type==="oauth2-client-credentials"?{scopes:t.authentication.scopes}:{}}]];let r=le(n);if(!t.credentialRef&&!r)return[[]];let i=X(e.securitySchemes,e.securityRequirements);return Object.values(i.schemes).flatMap(o=>o.kind==="http-bearer"?[[{schemeName:o.name,kind:"http-bearer"}]]:[])}s(kn,"configuredCapabilityCandidates");function dt(t,e){for(let n of t){if(n.schemes.length!==1)continue;let r=n.schemes[0].scheme;if(e.some(i=>i.schemeName===r.name&&i.kind===r.kind))return r}}s(dt,"matchingDeclaredScheme");function Sn(t,e){let n=X(t.securitySchemes,t.securityRequirements),r=ke(n,e).filter(a=>a.schemes.length<=1);if(r.length===0)return null;let i=dt(r,e),o=[];for(let a of t.skills){let c=X(t.securitySchemes,a.securityRequirements),d=ke(c,e).filter(l=>l.schemes.length<=1);d.length!==0&&(o.push(a.id),i??=dt(d,e))}return t.skills.length>0&&o.length===0?null:{skillIds:o,...i?{declaredScheme:i}:{}}}s(Sn,"evaluateSecurityCapabilities");function Rn(t,e,n){if(t.credentialRef!==void 0&&t.authentication!==void 0)throw new Error("A2A registration cannot combine credentialRef with structured authentication.");if(n!==void 0&&!le(n))throw new Error("A2A options.authorization must be a valid Bearer authorization.");let r=le(n),i=t.credentialRef!==void 0||t.authentication!==void 0||r,o;for(let h of kn(t,e,n)){let y=Sn(e,h);if(y&&(!i||y.declaredScheme)){o=y;break}}if(!o)throw new Error(i?"Configured A2A authentication cannot fully satisfy the Agent Card and any advertised Skill security requirements.":"Agent Card or at least one advertised Skill requires authentication, but no compatible A2A authentication is configured.");if(!i)return{skillIds:o.skillIds};let a=o.declaredScheme,c=t.authentication;if(!c&&!t.credentialRef&&r)return{skillIds:o.skillIds};if(!c)return{credentialRef:t.credentialRef,authentication:{type:"http-bearer",scheme:a.name},skillIds:o.skillIds};if(c.type==="http-bearer")return{credentialRef:c.credentialRef,authentication:{type:"http-bearer",scheme:c.scheme},skillIds:o.skillIds};if(a.kind!=="oauth2-client-credentials")throw new Error("Configured OAuth2 authentication does not match the selected Agent Card scheme.");let d=a,l=$(c.issuer,"Configured OAuth2 issuer"),f=D(c.tokenUrl,"Configured OAuth2 token endpoint").href,u=c.resource===void 0?void 0:G(c.resource,"Configured OAuth2 resource");if(new URL(d.tokenUrl).href!==f)throw new Error("Configured OAuth2 tokenUrl does not match the selected Agent Card security scheme.");let A=c.scopes.find(h=>!d.scopes.includes(h));if(A)throw new Error(`Configured OAuth2 scope is not declared by the Agent Card: ${A}`);return{credentialRef:c.clientSecretRef,authentication:{type:"oauth2-client-credentials",scheme:c.scheme,issuer:l,tokenUrl:f,clientId:c.clientId,scopes:c.scopes,...u?{resource:u}:{},clientAuthentication:c.clientAuthentication},skillIds:o.skillIds}}s(Rn,"planClientAuthentication");function Ie(t,e){try{return JSON.parse(t)}catch{throw new Error(`${e} returned invalid JSON.`)}}s(Ie,"parseJson");function At(t){let e=t.maxTaskResponseBytes??t.networkPolicy.maxResponseBytes;if(!Number.isSafeInteger(e)||e<=0)throw new Error("A2A maxTaskResponseBytes must be a positive safe integer.");return e}s(At,"taskResponseBytes");function Tn(t){return{...t.networkPolicy,maxResponseBytes:At(t)}}s(Tn,"taskNetworkPolicy");async function ft(t,e){let n=wn(t),r=await H(new URL(n.agentCardUrl),{headers:{accept:"application/json"}},e.networkPolicy,e.fetch);if(!r.response.ok)throw new Error(`Agent Card request failed with HTTP ${r.response.status}.`);if(!ee(r.response.headers.get("content-type")))throw new Error("Agent Card response is not JSON.");let i=Ze(Ie(J(r.body),"Agent Card")),o=i.capabilities.extensions?.filter(f=>f.required)??[];if(o.length>0)throw new Error(`Agent Card required A2A extension(s) are unsupported: ${o.map(f=>f.uri).join(", ")}`);let a=mn(i,r.url),c=Rn(n,i,e.authorization),d=re({agentCardUrl:r.url.href,interfaceUrl:a.url,protocolBinding:a.protocolBinding,protocolVersion:a.protocolVersion,tenant:a.tenant??"",authentication:c.authentication??null}),l=at(re({card:i,endpointIdentity:d,credentialRef:c.credentialRef??null,effects:n.effects}));return{agentCard:i,registration:{agentId:n.agentId,displayName:i.name,description:i.description,enabled:!0,executorId:Se,protocol:"a2a",configurationRevision:l,endpointIdentityHash:at(d),...c.credentialRef?{credentialRef:c.credentialRef}:{},executorConfig:{agentCardUrl:r.url.href,interfaceUrl:a.url,...a.tenant?{tenant:a.tenant}:{},...c.authentication?{authentication:c.authentication}:{}},skills:c.skillIds,inputModalities:i.defaultInputModes,outputModalities:i.defaultOutputModes,capabilities:{streaming:i.capabilities.streaming?"supported":"unsupported",durableTasks:"supported",inputRequired:"supported",cancellation:"supported",artifacts:"supported"},effects:{remote:n.effects.remote,workspace:"proposal"},health:{status:"healthy",checkedAt:new Date().toISOString()}}}}s(ft,"discoverA2ARegistration");function ne(t){return t.metadata??{}}s(ne,"metadata");function Pe(t){if(t===null||typeof t=="string"||typeof t=="boolean"||typeof t=="number"&&Number.isFinite(t))return t;if(Array.isArray(t))return t.map(Pe);if(R(t)){let e={};for(let[n,r]of Object.entries(t))e[n]=Pe(r);return e}throw new Error("A2A response metadata must be JSON-safe.")}s(Pe,"toAgentJsonValue");function ut(t){let e=ne(t).directMessage;return e===void 0?void 0:z(e)}s(ut,"directMessage");function En(t){return{TASK_STATE_UNSPECIFIED:"unknown",TASK_STATE_SUBMITTED:"submitted",TASK_STATE_WORKING:"working",TASK_STATE_COMPLETED:"completed",TASK_STATE_FAILED:"failed",TASK_STATE_CANCELED:"canceled",TASK_STATE_INPUT_REQUIRED:"input-required",TASK_STATE_REJECTED:"rejected",TASK_STATE_AUTH_REQUIRED:"auth-required"}[t]??"unknown"}s(En,"taskState");function Ce(t){return t.flatMap(e=>e.text===void 0?[]:[e.text]).join(`
2
+ import{a as Fe,b as Ge,c as ae,d as p,e as ce,f as Xe,g as Ve,h as Q,i as N,j as we,k as $,l as D,m as G,n as X,o as ri,p as ke,q as R,r as ee,s as Qe,t as Ze,u as ii,v as z,w as B,x as Ye,z as de}from"./chunks/chunk-3I2MIS4D.js";import"./chunks/chunk-BSCSKJNC.js";import"./chunks/chunk-G32BMSHH.js";import"./chunks/chunk-AYDLX2UK.js";import"./chunks/chunk-FVXZ5L33.js";import"./chunks/chunk-ZQYWDI4O.js";import{o as et,u as tt}from"./chunks/chunk-4Z7ZHL6V.js";import"./chunks/chunk-VRO2CDBY.js";import"./chunks/chunk-P6R6V7EW.js";import"./chunks/chunk-BP3NAYKY.js";import"./chunks/chunk-QDE6THC5.js";import"./chunks/chunk-WMQQQY3D.js";import"./chunks/chunk-X3YYJJTF.js";import"./chunks/chunk-4GYXZTOD.js";import"./chunks/chunk-576AAIQM.js";import"./chunks/chunk-IR46ZHXU.js";import"./chunks/chunk-OXCB2TRF.js";import"./chunks/chunk-3Y5PBEOD.js";import"./chunks/chunk-5LFQ5FVY.js";import"./chunks/chunk-4Y6U7AH4.js";import"./chunks/chunk-QRYEP34M.js";import"./chunks/chunk-ISLK6R2P.js";import"./chunks/chunk-HJLYZ5AX.js";import"./chunks/chunk-GZUWQZJD.js";import"./chunks/chunk-TQ475LOI.js";import"./chunks/chunk-65652LR4.js";import"./chunks/chunk-ZDAU3LZ2.js";import"./chunks/chunk-DAQGOWKD.js";import{h as j}from"./chunks/chunk-OMVAPRQI.js";import"./chunks/chunk-OC3DQXN6.js";import"./chunks/chunk-PFBZ4ZXO.js";import"./chunks/chunk-52EN2777.js";import"./chunks/chunk-6RDMSU4B.js";import"./chunks/chunk-QP47JIWP.js";import"./chunks/chunk-EZF6ZRCO.js";import"./chunks/chunk-4FVCMKG2.js";import"./chunks/chunk-V5RCDBKU.js";import"./chunks/chunk-KDLOPBFZ.js";import{a as s}from"./chunks/chunk-V4WSBIXB.js";var V="1.0",Se="kodax-a2a-v1-jsonrpc";import{lookup as Gt}from"node:dns/promises";import{request as Xt}from"node:http";import{request as Vt}from"node:https";import{BlockList as Qt,isIP as nt}from"node:net";import{Readable as Zt}from"node:stream";var ue=new Qt;ue.addSubnet("127.0.0.0",8,"ipv4");ue.addAddress("::1","ipv6");function Re(t){let e=nt(t);return e===4?ue.check(t,"ipv4"):e===6&&ue.check(t,"ipv6")}s(Re,"isLoopbackAddress");function Yt(t){let e=t.toLowerCase();return e==="localhost"||e==="127.0.0.1"||e==="::1"}s(Yt,"isExactLoopbackHostname");function Te(t){let e=t.split(".").map(Number),[n,r,i,o]=e;return e.length!==4||n===void 0||r===void 0||i===void 0||o===void 0?!0:n===0||n===10||n===127||n===100&&r>=64&&r<=127||n===169&&r===254||n===172&&r>=16&&r<=31||n===192&&r===168||n===192&&r===0&&i===0&&o!==9&&o!==10||n===192&&r===0&&i===2||n===198&&(r===18||r===19)||n===198&&r===51&&i===100||n===203&&r===0&&i===113||n>=224}s(Te,"isPrivateIpv4");function en(t){if(Re(t))return!0;let e=t.toLowerCase(),n=/^::ffff:(\d+\.\d+\.\d+\.\d+)$/.exec(e)?.[1];if(n)return Te(n);let r=/^::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/.exec(e);if(r?.[1]&&r[2]){let i=Number.parseInt(r[1],16),o=Number.parseInt(r[2],16);return Te(`${i>>8}.${i&255}.${o>>8}.${o&255}`)}return e==="::"||e==="::1"||e.startsWith("fc")||e.startsWith("fd")||e.startsWith("fe8")||e.startsWith("fe9")||e.startsWith("fea")||e.startsWith("feb")||e.startsWith("ff")}s(en,"isPrivateIpv6");function tn(t){let e=nt(t);return e===4?Te(t):e===6?en(t):!0}s(tn,"isPrivateAddress");async function rt(t,e){if(t.protocol!=="https:"&&t.protocol!=="http:")throw new p(-32602,"A2A URL must use HTTP or HTTPS.");if(!e.allowedOrigins.includes(t.origin))throw new p(-32602,`A2A origin is not allowed: ${t.origin}`);if(t.username||t.password)throw new p(-32602,"A2A URL must not include credentials.");let n=t.hostname.startsWith("[")&&t.hostname.endsWith("]")?t.hostname.slice(1,-1):t.hostname,r=await Gt(n,{all:!0,verbatim:!0});if(r.length===0)throw new p(-32602,"A2A hostname did not resolve.");if(n.toLowerCase()==="localhost"&&!r.every(a=>Re(a.address)))throw new p(-32602,"A2A localhost target must resolve only to loopback addresses.");let i=Yt(n)&&r.every(a=>Re(a.address));if(t.protocol==="http:"&&!i&&e.allowInsecureHttp!==!0)throw new p(-32602,"Non-loopback A2A targets must use HTTPS unless plaintext HTTP is explicitly allowed.");if(!e.allowPrivateAddresses&&r.some(a=>tn(a.address)))throw new p(-32602,"A2A private network targets are not allowed.");let o=r[0];if(o===void 0||o.family!==4&&o.family!==6)throw new p(-32602,"A2A hostname returned an unsupported address.");return{address:o.address,family:o.family}}s(rt,"validateA2AUrl");async function nn(t,e){await rt(t,e)}s(nn,"assertSafeA2AUrl");function rn(t){if(t==null||typeof t=="string")return t??void 0;if(t instanceof URLSearchParams)return t.toString();if(t instanceof Uint8Array)return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new p(-32602,"A2A request body type is not supported by the safe transport.")}s(rn,"encodeRequestBody");function on(t){return((e,n,r)=>{if(typeof n=="object"&&n.all){r(null,[t]);return}r(null,t.address,t.family)})}s(on,"pinnedLookup");function sn(t,e,n){return new Promise((r,i)=>{let o=new Headers(e.headers);o.set("accept-encoding","identity");let a=(t.protocol==="https:"?Vt:Xt)(t,{method:e.method,headers:Object.fromEntries(o),lookup:on(n),signal:e.signal??void 0},c=>{let d=new Headers;for(let A=0;A<c.rawHeaders.length;A+=2){let h=c.rawHeaders[A],y=c.rawHeaders[A+1];h!==void 0&&y!==void 0&&d.append(h,y)}let l=c.statusCode??500,u=e.method!=="HEAD"&&l!==204&&l!==205&&l!==304?Zt.toWeb(c):null;r(new Response(u,{status:l,statusText:c.statusMessage,headers:d}))});a.once("error",i),a.end(rn(e.body))})}s(sn,"requestValidatedAddress");async function Ee(t,e,n,r){let i=await rt(t,n);return r!==void 0?r(t,e):sn(t,e,i)}s(Ee,"openSafeA2AResponse");async function an(t,e){let n=t.headers.get("content-length");if(n&&Number(n)>e)throw new p(-32603,"A2A response is too large.");if(!t.body)return new Uint8Array;let r=t.body.getReader(),i=[],o=0;for(;;){let d=await r.read();if(d.done)break;if(o+=d.value.byteLength,o>e)throw await r.cancel(),new p(-32603,"A2A response is too large.");i.push(d.value)}let a=new Uint8Array(o),c=0;for(let d of i)a.set(d,c),c+=d.byteLength;return a}s(an,"boundedBody");function cn(t,e){if(!t)return{signal:e,cleanup:s(()=>{},"cleanup")};let n=new AbortController,r=s(()=>n.abort(t.reason),"abortFromCaller"),i=s(()=>n.abort(e.reason),"abortFromDeadline");return t.aborted?r():t.addEventListener("abort",r,{once:!0}),e.aborted?i():e.addEventListener("abort",i,{once:!0}),{signal:n.signal,cleanup:s(()=>{t.removeEventListener("abort",r),e.removeEventListener("abort",i)},"cleanup")}}s(cn,"combineAbortSignals");async function H(t,e,n,r){let i=t,o=new Headers(e.headers).get("authorization");for(let a=0;a<=n.maxRedirects;a+=1){let c=new AbortController,d=setTimeout(()=>c.abort(new Error("A2A request timed out.")),n.requestTimeoutMs),l=cn(e.signal,c.signal),f=new Headers(e.headers);o===null?f.delete("authorization"):f.set("authorization",o);try{let u=await Ee(i,{...e,headers:f,redirect:"manual",signal:l.signal},n,r);if(u.status<300||u.status>=400)return{response:u,body:await an(u,n.maxResponseBytes),url:i};let A=u.headers.get("location");if(!A||a===n.maxRedirects)throw new p(-32603,"A2A redirect limit exceeded.");let h=new URL(A,i);await u.body?.cancel(),h.origin!==i.origin&&(o=null),i=h}finally{clearTimeout(d),l.cleanup()}}throw new p(-32603,"A2A redirect limit exceeded.")}s(H,"safeA2AFetch");function J(t){return new TextDecoder("utf-8",{fatal:!0}).decode(t)}s(J,"decodeUtf8");import{createHash as pn,randomUUID as be}from"node:crypto";import*as M from"oauth4webapi";var dn=6e4,un=1e3,ln=.1;function An(t,e){return new Response(e.byteLength===0?null:J(e),{status:t.status,statusText:t.statusText,headers:t.headers})}s(An,"oauthResponse");function fn(t,e){if(e===void 0||e<=0)return t;let n=e*1e3,r=Math.min(dn,Math.max(un,n*ln));return t+Math.max(0,n-r)}s(fn,"cacheExpiry");function it(t){let e=N(t.clientId,"OAuth 2.0 clientId");if(t.clientAuthenticationMethod!=="basic"&&t.clientAuthenticationMethod!=="post")throw new Error("OAuth 2.0 clientAuthenticationMethod must be basic or post.");let n=t.clientAuthenticationMethod,r=t.scopes===void 0?void 0:Q(t.scopes,"OAuth 2.0 scopes"),i=$(t.issuer,"OAuth 2.0 issuer"),o=D(t.tokenUrl,"OAuth 2.0 token endpoint"),a=t.resource===void 0?void 0:G(t.resource,"OAuth 2.0 resource"),c={issuer:i,token_endpoint:o.href},d={client_id:e},l={...t.networkPolicy,maxRedirects:0},f=t.now??Date.now,u,A,h=0;async function y(w){let m=n==="post"?M.ClientSecretPost(w):M.ClientSecretBasic(w),T=new URLSearchParams;r&&r.length>0&&T.set("scope",r.join(" ")),a!==void 0&&T.set("resource",a);let g={[M.customFetch]:async(S,C)=>{if(new URL(S).href!==o.href)throw new Error("OAuth 2.0 token request targeted an unexpected endpoint.");let L=await H(o,{method:C.method,headers:C.headers,body:C.body,redirect:"manual",...C.signal!==void 0?{signal:C.signal}:{}},l,t.fetch);return An(L.response,L.body)}};o.protocol==="http:"&&(g[M.allowInsecureRequests]=!0);let k;try{let S=await M.clientCredentialsGrantRequest(c,d,m,T,g);k=await M.processClientCredentialsResponse(c,d,S)}catch{throw new Error("OAuth 2.0 client credentials token request failed.")}if(k.token_type!=="bearer")throw new Error("OAuth 2.0 token endpoint did not return a Bearer access token.");let O=f();return{value:`Bearer ${k.access_token}`,expiresAt:fn(O,k.expires_in)}}return s(y,"requestAuthorization"),{async getAuthorization(w){if(w.length===0)throw new Error("OAuth 2.0 client secret is required.");let m=f();if(u!==void 0&&u.expiresAt>m)return u.value;if(A!==void 0)return A;let T=h,g;return g=y(w).then(k=>(h===T&&k.expiresAt>f()&&(u=k),k.value)).finally(()=>{A===g&&(A=void 0)}),A=g,g},invalidate(w){if(w!==void 0){u?.value===w&&(u=void 0);return}h+=1,u=void 0,A=void 0}}}s(it,"createOAuth2ClientCredentialsTokenManager");var ot=4,st=/^[A-Za-z0-9\-._~+/=]$/u;function le(t){return t!==void 0&&/^Bearer\s+\S+$/iu.test(t)}s(le,"isBearerAuthorization");function hn(t,e){let n="",r=0;for(;r<t.length;){let i=t.indexOf(e,r);if(i<0)return n+t.slice(r);let o=i===0?void 0:t[i-1],a=i+e.length,c=a===t.length?void 0:t[a],d=o===void 0||!st.test(o),l=c===void 0||!st.test(c);n+=t.slice(r,i),d&&l?(n+="[REDACTED]",r=a):(n+=e,r=a)}return n}s(hn,"replaceBoundedToken");function re(t){return Array.isArray(t)?`[${t.map(re).join(",")}]`:R(t)?`{${Object.keys(t).sort().map(e=>`${JSON.stringify(e)}:${re(t[e])}`).join(",")}}`:JSON.stringify(t)??"null"}s(re,"stableJson");function at(t){return`sha256:${pn("sha256").update(t).digest("hex")}`}s(at,"sha256");var xe=class{static{s(this,"AuthorizationRedactor")}#e=[];#n=new Map;remember(e){if(!e)return;let n=this.#e.indexOf(e);n>=0&&this.#e.splice(n,1),this.#e.unshift(e),this.#e.length>ot&&(this.#e.length=ot)}retain(e){if(!e)return()=>{};this.remember(e),this.#n.set(e,(this.#n.get(e)??0)+1);let n=!1;return()=>{if(n)return;n=!0;let r=(this.#n.get(e)??1)-1;r===0?this.#n.delete(e):this.#n.set(e,r)}}redactText(e){let n=[...new Set([...this.#n.keys(),...this.#e])],r=n.sort((o,a)=>a.length-o.length).reduce((o,a)=>o.split(a).join("[REDACTED]"),e),i=n.flatMap(o=>{let a=/^Bearer\s+(\S+)$/iu.exec(o)?.[1];return a?[a]:[]}).sort((o,a)=>a.length-o.length);return[...new Set(i)].reduce((o,a)=>hn(o,a),r)}redactContent(e){return typeof e=="string"?this.redactText(e):Array.isArray(e)?e.map(n=>this.redactContent(n)):R(e)?Object.fromEntries(Object.entries(e).map(([n,r])=>[n,this.redactContent(r)])):e}redactPart(e){return{...e,...e.text===void 0?{}:{text:this.redactText(e.text)},...e.raw===void 0?{}:{raw:this.redactText(e.raw)},...e.url===void 0?{}:{url:this.redactText(e.url)},...e.data===void 0?{}:{data:this.redactContent(e.data)},...e.metadata===void 0?{}:{metadata:this.redactContent(e.metadata)},...e.filename===void 0?{}:{filename:this.redactText(e.filename)}}}redactMessage(e){return{...e,parts:e.parts.map(n=>this.redactPart(n)),...e.metadata===void 0?{}:{metadata:this.redactContent(e.metadata)}}}redactArtifact(e){return{...e,...e.name===void 0?{}:{name:this.redactText(e.name)},...e.description===void 0?{}:{description:this.redactText(e.description)},parts:e.parts.map(n=>this.redactPart(n)),...e.metadata===void 0?{}:{metadata:this.redactContent(e.metadata)}}}redactTask(e){return{...e,status:{...e.status,...e.status.message===void 0?{}:{message:this.redactMessage(e.status.message)}},...e.artifacts===void 0?{}:{artifacts:e.artifacts.map(n=>this.redactArtifact(n))},...e.history===void 0?{}:{history:e.history.map(n=>this.redactMessage(n))},...e.metadata===void 0?{}:{metadata:this.redactContent(e.metadata)}}}redactError(e){let n=this.redactText(e instanceof Error?e.message:String(e));return e instanceof p?new p(e.code,n,e.httpStatus,this.redactContent(e.data),e.headers):new Error(n)}};function ct(t,e){let n=new URL(e).origin;if(!t.allowedOrigins.some(i=>new URL(i).origin===n))throw new Error(`A2A endpoint origin is not allowed by network policy: ${n}`);return{...t,allowedOrigins:[n]}}s(ct,"endpointNetworkPolicy");function gn(t){if(t!==void 0){if(!R(t)||typeof t.scheme!="string")throw new Error("A2A registration authentication is invalid.");if(t.type==="http-bearer")return{type:"http-bearer",scheme:t.scheme};if(t.type!=="oauth2-client-credentials"||typeof t.issuer!="string"||typeof t.tokenUrl!="string"||typeof t.clientId!="string"||!Array.isArray(t.scopes)||!t.scopes.every(e=>typeof e=="string")||!["client-secret-basic","client-secret-post"].includes(String(t.clientAuthentication)))throw new Error("A2A registration OAuth2 authentication is invalid.");return{type:"oauth2-client-credentials",scheme:t.scheme,issuer:t.issuer,tokenUrl:t.tokenUrl,clientId:t.clientId,scopes:t.scopes,...typeof t.resource=="string"?{resource:t.resource}:{},clientAuthentication:t.clientAuthentication}}}s(gn,"executorAuthentication");function W(t){let e=t.executorConfig;if(!R(e))throw new Error("A2A registration executorConfig is missing.");if(typeof e.agentCardUrl!="string"||typeof e.interfaceUrl!="string")throw new Error("A2A registration endpoints are invalid.");let n=gn(e.authentication);return{agentCardUrl:e.agentCardUrl,interfaceUrl:e.interfaceUrl,...typeof e.tenant=="string"?{tenant:e.tenant}:{},...n?{authentication:n}:{}}}s(W,"executorConfig");function mn(t,e){let n=t.supportedInterfaces.find(i=>i.protocolBinding.toUpperCase()==="JSONRPC"&&i.protocolVersion==="1.0");if(!n)throw new Error("Agent Card has no supported A2A 1.0 JSONRPC interface.");let r=new URL(n.url);if(r.username||r.password||r.hash)throw new Error("A2A interface URL must not contain credentials or a fragment.");if(r.origin!==e.origin)throw new Error("A2A interface must use the same origin as the trusted Agent Card.");return n}s(mn,"chooseInterface");function yn(t){if(t===void 0)return;if(!R(t))throw new Error("A2A authentication must be an object.");let e=N(t.scheme,"A2A authentication.scheme");if(t.type==="http-bearer")return{type:"http-bearer",scheme:e,credentialRef:N(t.credentialRef,"A2A authentication.credentialRef")};if(t.type!=="oauth2-client-credentials")throw new Error("A2A authentication.type must be http-bearer or oauth2-client-credentials.");if(t.clientAuthentication!=="client-secret-basic"&&t.clientAuthentication!=="client-secret-post")throw new Error("A2A authentication.clientAuthentication is invalid.");return{type:"oauth2-client-credentials",scheme:e,issuer:$(t.issuer,"Configured OAuth2 issuer"),tokenUrl:D(t.tokenUrl,"Configured OAuth2 token endpoint").href,clientId:N(t.clientId,"Configured OAuth2 clientId"),clientSecretRef:N(t.clientSecretRef,"Configured OAuth2 clientSecretRef"),scopes:Q(t.scopes,"Configured OAuth2 scopes"),...t.resource===void 0?{}:{resource:G(t.resource,"Configured OAuth2 resource")},clientAuthentication:t.clientAuthentication}}s(yn,"validatedClientAuthentication");function wn(t){let e=t.credentialRef===void 0?void 0:N(t.credentialRef,"A2A credentialRef"),n=yn(t.authentication);if(t.credentialRef!==void 0&&t.authentication!==void 0)throw new Error("A2A registration cannot combine credentialRef with structured authentication.");return{agentId:t.agentId,agentCardUrl:t.agentCardUrl,...e!==void 0?{credentialRef:e}:{},...n!==void 0?{authentication:n}:{},effects:t.effects}}s(wn,"validatedRegistrationInput");function kn(t,e,n){if(t.authentication)return[[{schemeName:t.authentication.scheme,kind:t.authentication.type,...t.authentication.type==="oauth2-client-credentials"?{scopes:t.authentication.scopes}:{}}]];let r=le(n);if(!t.credentialRef&&!r)return[[]];let i=X(e.securitySchemes,e.securityRequirements);return Object.values(i.schemes).flatMap(o=>o.kind==="http-bearer"?[[{schemeName:o.name,kind:"http-bearer"}]]:[])}s(kn,"configuredCapabilityCandidates");function dt(t,e){for(let n of t){if(n.schemes.length!==1)continue;let r=n.schemes[0].scheme;if(e.some(i=>i.schemeName===r.name&&i.kind===r.kind))return r}}s(dt,"matchingDeclaredScheme");function Sn(t,e){let n=X(t.securitySchemes,t.securityRequirements),r=ke(n,e).filter(a=>a.schemes.length<=1);if(r.length===0)return null;let i=dt(r,e),o=[];for(let a of t.skills){let c=X(t.securitySchemes,a.securityRequirements),d=ke(c,e).filter(l=>l.schemes.length<=1);d.length!==0&&(o.push(a.id),i??=dt(d,e))}return t.skills.length>0&&o.length===0?null:{skillIds:o,...i?{declaredScheme:i}:{}}}s(Sn,"evaluateSecurityCapabilities");function Rn(t,e,n){if(t.credentialRef!==void 0&&t.authentication!==void 0)throw new Error("A2A registration cannot combine credentialRef with structured authentication.");if(n!==void 0&&!le(n))throw new Error("A2A options.authorization must be a valid Bearer authorization.");let r=le(n),i=t.credentialRef!==void 0||t.authentication!==void 0||r,o;for(let h of kn(t,e,n)){let y=Sn(e,h);if(y&&(!i||y.declaredScheme)){o=y;break}}if(!o)throw new Error(i?"Configured A2A authentication cannot fully satisfy the Agent Card and any advertised Skill security requirements.":"Agent Card or at least one advertised Skill requires authentication, but no compatible A2A authentication is configured.");if(!i)return{skillIds:o.skillIds};let a=o.declaredScheme,c=t.authentication;if(!c&&!t.credentialRef&&r)return{skillIds:o.skillIds};if(!c)return{credentialRef:t.credentialRef,authentication:{type:"http-bearer",scheme:a.name},skillIds:o.skillIds};if(c.type==="http-bearer")return{credentialRef:c.credentialRef,authentication:{type:"http-bearer",scheme:c.scheme},skillIds:o.skillIds};if(a.kind!=="oauth2-client-credentials")throw new Error("Configured OAuth2 authentication does not match the selected Agent Card scheme.");let d=a,l=$(c.issuer,"Configured OAuth2 issuer"),f=D(c.tokenUrl,"Configured OAuth2 token endpoint").href,u=c.resource===void 0?void 0:G(c.resource,"Configured OAuth2 resource");if(new URL(d.tokenUrl).href!==f)throw new Error("Configured OAuth2 tokenUrl does not match the selected Agent Card security scheme.");let A=c.scopes.find(h=>!d.scopes.includes(h));if(A)throw new Error(`Configured OAuth2 scope is not declared by the Agent Card: ${A}`);return{credentialRef:c.clientSecretRef,authentication:{type:"oauth2-client-credentials",scheme:c.scheme,issuer:l,tokenUrl:f,clientId:c.clientId,scopes:c.scopes,...u?{resource:u}:{},clientAuthentication:c.clientAuthentication},skillIds:o.skillIds}}s(Rn,"planClientAuthentication");function Ie(t,e){try{return JSON.parse(t)}catch{throw new Error(`${e} returned invalid JSON.`)}}s(Ie,"parseJson");function At(t){let e=t.maxTaskResponseBytes??t.networkPolicy.maxResponseBytes;if(!Number.isSafeInteger(e)||e<=0)throw new Error("A2A maxTaskResponseBytes must be a positive safe integer.");return e}s(At,"taskResponseBytes");function Tn(t){return{...t.networkPolicy,maxResponseBytes:At(t)}}s(Tn,"taskNetworkPolicy");async function ft(t,e){let n=wn(t),r=await H(new URL(n.agentCardUrl),{headers:{accept:"application/json"}},e.networkPolicy,e.fetch);if(!r.response.ok)throw new Error(`Agent Card request failed with HTTP ${r.response.status}.`);if(!ee(r.response.headers.get("content-type")))throw new Error("Agent Card response is not JSON.");let i=Ze(Ie(J(r.body),"Agent Card")),o=i.capabilities.extensions?.filter(f=>f.required)??[];if(o.length>0)throw new Error(`Agent Card required A2A extension(s) are unsupported: ${o.map(f=>f.uri).join(", ")}`);let a=mn(i,r.url),c=Rn(n,i,e.authorization),d=re({agentCardUrl:r.url.href,interfaceUrl:a.url,protocolBinding:a.protocolBinding,protocolVersion:a.protocolVersion,tenant:a.tenant??"",authentication:c.authentication??null}),l=at(re({card:i,endpointIdentity:d,credentialRef:c.credentialRef??null,effects:n.effects}));return{agentCard:i,registration:{agentId:n.agentId,displayName:i.name,description:i.description,enabled:!0,executorId:Se,protocol:"a2a",configurationRevision:l,endpointIdentityHash:at(d),...c.credentialRef?{credentialRef:c.credentialRef}:{},executorConfig:{agentCardUrl:r.url.href,interfaceUrl:a.url,...a.tenant?{tenant:a.tenant}:{},...c.authentication?{authentication:c.authentication}:{}},skills:c.skillIds,inputModalities:i.defaultInputModes,outputModalities:i.defaultOutputModes,capabilities:{streaming:i.capabilities.streaming?"supported":"unsupported",durableTasks:"supported",inputRequired:"supported",cancellation:"supported",artifacts:"supported"},effects:{remote:n.effects.remote,workspace:"proposal"},health:{status:"healthy",checkedAt:new Date().toISOString()}}}}s(ft,"discoverA2ARegistration");function ne(t){return t.metadata??{}}s(ne,"metadata");function Pe(t){if(t===null||typeof t=="string"||typeof t=="boolean"||typeof t=="number"&&Number.isFinite(t))return t;if(Array.isArray(t))return t.map(Pe);if(R(t)){let e={};for(let[n,r]of Object.entries(t))e[n]=Pe(r);return e}throw new Error("A2A response metadata must be JSON-safe.")}s(Pe,"toAgentJsonValue");function ut(t){let e=ne(t).directMessage;return e===void 0?void 0:z(e)}s(ut,"directMessage");function En(t){return{TASK_STATE_UNSPECIFIED:"unknown",TASK_STATE_SUBMITTED:"submitted",TASK_STATE_WORKING:"working",TASK_STATE_COMPLETED:"completed",TASK_STATE_FAILED:"failed",TASK_STATE_CANCELED:"canceled",TASK_STATE_INPUT_REQUIRED:"input-required",TASK_STATE_REJECTED:"rejected",TASK_STATE_AUTH_REQUIRED:"auth-required"}[t]??"unknown"}s(En,"taskState");function Ce(t){return t.flatMap(e=>e.text===void 0?[]:[e.text]).join(`
3
3
  `)}s(Ce,"textFromParts");function pt(t,e){let n=t.mediaType??(t.data!==void 0?"application/json":"application/octet-stream"),r=t.raw!==void 0?`data:${n};base64,${t.raw}`:t.data!==void 0?`data:${n};base64,${Buffer.from(JSON.stringify(t.data),"utf8").toString("base64")}`:void 0,i=t.url??r;if(i)return{name:e,...t.mediaType?{mimeType:t.mediaType}:{},...t.raw!==void 0?{size:Buffer.from(t.raw,"base64").byteLength}:{},uri:i,provenance:"a2a"}}s(pt,"partArtifactReference");function bn(t){let e=t.parts.find(n=>n.url!==void 0||n.raw!==void 0||n.data!==void 0);return e?pt(e,t.name??t.artifactId):void 0}s(bn,"artifactReference");function te(t){let e=(t.artifacts??[]).flatMap(i=>Ce(i.parts)),n=t.status.message?Ce(t.status.message.parts):"",r=[...e,n].filter(Boolean).join(`
4
4
  `);return{state:En(t.status.state),...r?{output:r}:{},...t.status.state==="TASK_STATE_FAILED"?{error:n||"Remote A2A task failed."}:{},...t.artifacts?.length?{artifacts:t.artifacts.flatMap(i=>bn(i)??[])}:{}}}s(te,"snapshotFromTask");function ve(t){let e=Ce(t.parts),n=t.parts.flatMap((r,i)=>{if(r.text!==void 0)return[];let o=pt(r,r.filename??`message-part-${i+1}`);return o?[o]:[]});return{state:"completed",...e?{output:e}:{},...n.length>0?{artifacts:n}:{}}}s(ve,"snapshotFromMessage");function lt(t){return t==="completed"||t==="failed"||t==="canceled"||t==="rejected"}s(lt,"isTerminal");function vn(t,e,n){let r=t.get(e.artifactId);t.set(e.artifactId,n&&r?{...r,...e,parts:[...r.parts,...e.parts]}:e)}s(vn,"mergeStreamArtifact");var Ae=class{constructor(e,n,r,i,o){this.registration=e;this.context=n;this.options=r;this.oauthTokenManager=i;this.releaseOAuthTokenManager=o}registration;context;options;oauthTokenManager;releaseOAuthTokenManager;static{s(this,"A2AClientExecutor")}#e=!1;#n=new Set;#t=new xe;async preflight(){try{return W(this.registration),{ok:!0}}catch(e){return{ok:!1,reasons:[e instanceof Error?e.message:String(e)]}}}async start(e,n){let r=e.idempotencyKey;if(!r)throw new Error("A2A executor requires an idempotency key.");let i=await this.sendMessage({message:{messageId:r,role:"ROLE_USER",parts:[{text:e.input??e.objective,mediaType:"text/plain"}]},configuration:{returnImmediately:!0}},n);if(R(i.task)){let o=B(i.task);return{idempotencyKey:r,remoteTaskId:o.id,...o.contextId?{metadata:{contextId:o.contextId}}:{}}}if(i.message!==void 0){let o=this.#t.redactMessage(z(i.message));return{idempotencyKey:r,metadata:{directMessage:Pe(o)}}}throw new Error("A2A SendMessage returned neither task nor message.")}async*events(e){let n=ut(e);if(n){yield await this.authorizeArtifacts(ve(this.#t.redactMessage(n)));return}if(this.registration.capabilities.streaming==="supported")try{yield*this.streamEvents(e);return}catch(r){if(this.#e)return;j({source:"a2a.client",level:"warn",message:"A2A event stream failed; polling fallback started.",detail:r}),yield{progress:{message:"A2A stream unavailable; polling."}}}for(;!this.#e;){let r=await this.get(e);if(yield r,lt(r.state)||r.state==="input-required"||r.state==="auth-required")return;await new Promise(i=>setTimeout(i,this.options.pollIntervalMs))}}async get(e){let n=ut(e);if(n)return this.authorizeArtifacts(ve(this.#t.redactMessage(n)));if(!e.remoteTaskId)throw new Error("A2A task reference has no remote task ID.");let r=B(await this.rpc("GetTask",this.taskParams(e)));return this.assertTaskReference(r,e),this.authorizeArtifacts(te(this.#t.redactTask(r)))}async sendInput(e,n){if(!e.remoteTaskId)throw new Error("Direct A2A responses cannot accept input.");await this.sendMessage({message:{messageId:be(),taskId:e.remoteTaskId,...typeof ne(e).contextId=="string"?{contextId:ne(e).contextId}:{},role:"ROLE_USER",parts:[{text:n.content,mediaType:"text/plain"}]},configuration:{returnImmediately:!0}})}async cancel(e){if(!e.remoteTaskId)return this.get(e);let n=B(await this.rpc("CancelTask",this.taskParams(e)));return this.assertTaskReference(n,e),this.authorizeArtifacts(te(this.#t.redactTask(n)))}async reconcile(e){return this.get(e)}async dispose(){if(!this.#e){this.#e=!0;try{for(let e of this.#n)e.abort(new Error("A2A executor disposed."))}finally{this.releaseOAuthTokenManager?.()}}}async*streamEvents(e){if(!e.remoteTaskId)throw new Error("A2A stream requires a remote task ID.");let n=W(this.registration),r=new URL(n.interfaceUrl),i=new Headers({accept:"text/event-stream","a2a-version":"1.0","content-type":"application/json"}),o=new AbortController,a=be();this.#n.add(o);let c,d,l=s(()=>{d!==void 0&&clearTimeout(d),d=void 0},"disarmTimeout"),f=s(u=>{l(),d=setTimeout(()=>o.abort(new Error(u)),this.options.networkPolicy.requestTimeoutMs),d.unref?.()},"armTimeout");try{f("A2A stream connection timed out.");let u=await this.openStreamResponse(r,i,o.signal,{jsonrpc:"2.0",id:a,method:"SubscribeToTask",params:this.taskParams(e)}),A=u.response;if(c=u.releaseAuthorization,l(),!A.ok||!A.body)throw new Error(`A2A stream failed with HTTP ${A.status}.`);if(!Qe(A.headers.get("content-type")))throw new Error("A2A stream returned an invalid content type.");let h=A.body.getReader(),y=new TextDecoder,w=new Map,m="",T=0;for(;!this.#e;){f("A2A stream was idle for too long.");let g=await h.read();if(l(),g.done)break;if(T+=g.value.byteLength,T>At(this.options))throw new Error("A2A stream exceeded the response size limit.");m+=y.decode(g.value,{stream:!0});let k=m.split(/\r?\n\r?\n/);m=k.pop()??"";for(let O of k){let S=O.split(/\r?\n/).filter(L=>L.startsWith("data:")).map(L=>L.slice(5).trimStart()).join(`
5
5
  `);if(!S)continue;let C=await this.snapshotFromStreamPayload(Ie(S,"A2A stream"),a,e,w);if(C&&(yield C,C.state&&(lt(C.state)||C.state==="input-required"||C.state==="auth-required")))return}}if(!this.#e)throw new Error("A2A event stream ended before the task reached a stable state.")}catch(u){throw this.#t.redactError(u)}finally{l(),c?.(),this.#n.delete(o)}}async snapshotFromStreamPayload(e,n,r,i){if(!R(e))throw new Error("A2A stream frame is invalid.");if(e.jsonrpc!=="2.0"||e.id!==n)throw new Error("A2A stream frame has an invalid JSON-RPC version or response id.");if(e.error!==void 0){let o=R(e.error)?e.error:{},a=typeof o.message=="string"?o.message:"A2A stream error.";throw new p(typeof o.code=="number"?o.code:-32603,this.#t.redactText(a))}if(R(e.result)){if(e.result.task!==void 0){let o=B(e.result.task);this.assertTaskReference(o,r),i.clear();for(let a of o.artifacts??[])i.set(a.artifactId,a);return this.authorizeArtifacts(te(this.#t.redactTask(o)))}if(e.result.message!==void 0){let o=z(e.result.message);if(o.taskId!==void 0&&o.taskId!==r.remoteTaskId)throw new Error("A2A stream message belongs to a different task.");return this.authorizeArtifacts(ve(this.#t.redactMessage(o)))}if(R(e.result.statusUpdate)&&R(e.result.statusUpdate.status)){this.assertStreamTaskScope(e.result.statusUpdate,r);let o=B({id:r.remoteTaskId,contextId:e.result.statusUpdate.contextId,status:e.result.statusUpdate.status,...i.size>0?{artifacts:[...i.values()]}:{}});return this.authorizeArtifacts(te(this.#t.redactTask(o)))}if(R(e.result.artifactUpdate)&&e.result.artifactUpdate.artifact!==void 0){this.assertStreamTaskScope(e.result.artifactUpdate,r);let o=B({id:r.remoteTaskId,contextId:e.result.artifactUpdate.contextId,status:{state:"TASK_STATE_WORKING"},artifacts:[e.result.artifactUpdate.artifact]}),a=o.artifacts?.[0];if(!a)throw new Error("A2A artifact update has no artifact.");vn(i,a,e.result.artifactUpdate.append===!0);let c={...o,artifacts:[...i.values()]};return this.authorizeArtifacts(te(this.#t.redactTask(c)))}}}async authorizeArtifacts(e){for(let n of e.artifacts??[])await this.context.authorizeArtifact(n);return e}assertTaskReference(e,n){if(e.id!==n.remoteTaskId)throw new Error("A2A response belongs to a different task id.");let r=ne(n).contextId;if(typeof r=="string"&&e.contextId&&e.contextId!==r)throw new Error("A2A response belongs to a different task context.")}assertStreamTaskScope(e,n){if(typeof e.taskId!="string"||e.taskId!==n.remoteTaskId)throw new Error("A2A stream event belongs to a different task.");let r=ne(n).contextId;if(typeof e.contextId!="string"||typeof r=="string"&&e.contextId!==r)throw new Error("A2A stream event belongs to a different task context.")}async openStreamResponse(e,n,r,i){let o=s(a=>{let c=new Headers(n);return a&&c.set("authorization",a),Ee(e,{method:"POST",headers:c,redirect:"manual",signal:r,body:JSON.stringify(i)},this.options.networkPolicy,this.options.fetch)},"open");return this.withAuthorization(async a=>{let c=this.#t.retain(a);try{let d=await o(a);if(d.status===401)throw await d.body?.cancel(),new p(-32600,"A2A authentication was rejected.",401);return{response:d,releaseAuthorization:c}}catch(d){throw c(),d}})}taskParams(e){let n=W(this.registration);return{id:e.remoteTaskId,...n.tenant?{tenant:n.tenant}:{}}}async sendMessage(e,n){let r=await this.rpc("SendMessage",{...e,...W(this.registration).tenant?{tenant:W(this.registration).tenant}:{}},n);if(!R(r))throw new Error("A2A SendMessage result is invalid.");return r}async rpc(e,n,r){if(this.#e)throw new Error("A2A executor is disposed.");return this.withAuthorization(i=>this.rpcWithAuthorization(e,n,i,r))}redactRpcResult(e,n){return e==="GetTask"||e==="CancelTask"?this.#t.redactTask(B(n)):e!=="SendMessage"||!R(n)?n:{...n,...n.task===void 0?{}:{task:this.#t.redactTask(B(n.task))},...n.message===void 0?{}:{message:this.#t.redactMessage(z(n.message))}}}async withAuthorization(e){let n=W(this.registration).authentication;if(!n){if(this.options.authorization!==void 0&&!le(this.options.authorization))throw new Error("A2A options.authorization must be a valid Bearer authorization.");let c=this.#t.retain(this.options.authorization);try{return await e(this.options.authorization)}catch(d){throw this.#t.redactError(d)}finally{c()}}let r=this.registration.credentialRef;if(!r)throw new Error("Authenticated A2A registration has no credential reference.");let i=s(c=>this.context.withCredential(r,async d=>{let l,f;try{return l=n.type==="http-bearer"?`Bearer ${d}`:await this.requireOAuthTokenManager().getAuthorization(d),f=this.#t.retain(l),{ok:!0,value:await e(l)}}catch(u){if(c&&n.type==="oauth2-client-credentials"&&u instanceof p&&u.httpStatus===401&&l!==void 0)return{ok:!1,rejectedAuthorization:l};throw this.#t.redactError(u)}finally{f?.()}}),"execute"),o=await i(n.type==="oauth2-client-credentials");if(o.ok)return o.value;this.requireOAuthTokenManager().invalidate(o.rejectedAuthorization);let a=await i(!1);if(!a.ok)throw new Error("A2A OAuth2 retry did not produce a result.");return a.value}requireOAuthTokenManager(){if(!this.oauthTokenManager)throw new Error("A2A OAuth2 token manager is unavailable.");return this.oauthTokenManager}async rpcWithAuthorization(e,n,r,i){let o=W(this.registration),a=new Headers({accept:"application/json","a2a-version":"1.0","content-type":"application/json"});r&&a.set("authorization",r);let c=be(),d=await H(new URL(o.interfaceUrl),{method:"POST",headers:a,body:JSON.stringify({jsonrpc:"2.0",id:c,method:e,params:n}),...i?{signal:i}:{}},Tn(this.options),this.options.fetch);if(d.response.status===401)throw new p(-32600,"A2A authentication was rejected.",401);if(!ee(d.response.headers.get("content-type")))throw new Error("A2A JSON-RPC response has an invalid content type.");let l=Ie(J(d.body),"A2A endpoint");if(!R(l))throw new Error("A2A JSON-RPC response is invalid.");if(l.jsonrpc!=="2.0"||l.id!==c)throw new Error("A2A JSON-RPC response has an invalid version or response id.");let f=Object.hasOwn(l,"result"),u=Object.hasOwn(l,"error");if(f===u)throw new Error("A2A JSON-RPC response must contain exactly one result or error.");if(u)throw!R(l.error)||typeof l.error.code!="number"||typeof l.error.message!="string"?new Error("A2A JSON-RPC error response is invalid."):new p(l.error.code,this.#t.redactText(l.error.message),d.response.status,this.#t.redactContent(l.error.data));if(!d.response.ok)throw new Error(`A2A request failed with HTTP ${d.response.status}.`);return this.redactRpcResult(e,l.result)}};function ht(t){let e=new Map;return{executorId:Se,protocol:"a2a",async create(n,r){let i=typeof t=="function"?t(n):t,o=W(n),a=o.authentication,c={...i,networkPolicy:ct(i.networkPolicy,o.interfaceUrl)},d;if(a?.type==="oauth2-client-credentials"){let A=ct(i.networkPolicy,a.tokenUrl),h=re({authentication:a,credentialRef:n.credentialRef??"",networkPolicy:A}),y=e.get(n.agentId);if(d=y?.key===h&&y.fetch===i.fetch?y:void 0,!d){let w=it({issuer:a.issuer,tokenUrl:a.tokenUrl,clientId:a.clientId,scopes:a.scopes,...a.resource?{resource:a.resource}:{},clientAuthenticationMethod:a.clientAuthentication==="client-secret-post"?"post":"basic",networkPolicy:A,...i.fetch?{fetch:i.fetch}:{}});d={key:h,fetch:i.fetch,manager:w,references:0},e.set(n.agentId,d)}}if(!d)return new Ae(n,r,c);let l=d;l.references+=1;let f=!1,u=s(()=>{f||(f=!0,l.references-=1,l.references===0&&(l.manager.invalidate(),e.get(n.agentId)===l&&e.delete(n.agentId)))},"releaseOAuthTokenManager");return new Ae(n,r,c,l.manager,u)}}}s(ht,"createA2AAgentExecutorFactory");import{createHash as xn,randomUUID as oe}from"node:crypto";import K from"node:fs";import{createServer as In}from"node:http";import v from"node:path";import{Readable as gt}from"node:stream";var P=new Set(["TASK_STATE_COMPLETED","TASK_STATE_FAILED","TASK_STATE_CANCELED","TASK_STATE_REJECTED"]),Tt=new Set(["completed","failed","cancelled","interrupted"]),Pn=new Set(["TASK_STATE_UNSPECIFIED","TASK_STATE_SUBMITTED","TASK_STATE_WORKING","TASK_STATE_COMPLETED","TASK_STATE_FAILED","TASK_STATE_CANCELED","TASK_STATE_INPUT_REQUIRED","TASK_STATE_REJECTED","TASK_STATE_AUTH_REQUIRED"]),Cn=new Set(["CreateTaskPushNotificationConfig","GetTaskPushNotificationConfig","ListTaskPushNotificationConfigs","DeleteTaskPushNotificationConfig"]),On=4,_n=8,Un=24*1024*1024,mt=new Set([1,7,9,11,13,15,17,19,20,21,22,23,25,37,42,43,53,69,77,79,87,95,101,102,103,104,109,110,111,113,115,117,119,123,135,137,139,143,161,179,389,427,465,512,513,514,515,526,530,531,532,540,548,554,556,563,587,601,636,989,990,993,995,1719,1720,1723,2049,3659,4045,4190,5060,5061,6e3,6566,6665,6666,6667,6668,6669,6679,6697,10080]),Mn=16;function Ln(t,e,n){return new Promise((r,i)=>{let o=s(c=>{t.off("listening",a),i(c)},"onError"),a=s(()=>{t.off("error",o),r()},"onListening");t.once("error",o),t.once("listening",a),t.listen(e,n)})}s(Ln,"listenNodeServer");function yt(t){return new Promise((e,n)=>{t.close(r=>r?n(r):e())})}s(yt,"closeNodeServer");function E(t){return t().toISOString()}s(E,"nowIso");function q(t){return xn("sha256").update(t).digest("hex")}s(q,"sha256");function Oe(t){let e=t.securityRealm;if(typeof e!="string"||e.trim().length===0)throw new Error("A2A authentication.securityRealm must be a non-empty stable string.");return e}s(Oe,"securityRealm");function Et(t){let e=t.toLowerCase().replace(/^\[|\]$/g,"");return e==="localhost"||e==="127.0.0.1"||e==="::1"}s(Et,"isLoopbackHostname");function Nn(t){let e=new URL(t);if(e.protocol!=="https:"&&!(e.protocol==="http:"&&Et(e.hostname)))throw new Error("Published A2A base URL must use HTTPS, except on loopback.");if(e.username||e.password)throw new Error("Published A2A base URL must not contain credentials.");return e}s(Nn,"validateBaseUrl");function Dn(t){let n={SendMessage:"send-message",SendStreamingMessage:"send-streaming-message",GetTask:"get-task",ListTasks:"list-tasks",CancelTask:"cancel-task",SubscribeToTask:"subscribe-to-task",GetExtendedAgentCard:"get-extended-agent-card"}[t];if(!n)throw new p(-32601,"Method not found.");return n}s(Dn,"operationForMethod");function qn(t){return{queued:"TASK_STATE_SUBMITTED",running:"TASK_STATE_WORKING",waiting_agent:"TASK_STATE_WORKING",recovering:"TASK_STATE_WORKING",waiting_permission:"TASK_STATE_WORKING",waiting_user_input:"TASK_STATE_INPUT_REQUIRED",unknown:"TASK_STATE_FAILED",completed:"TASK_STATE_COMPLETED",failed:"TASK_STATE_FAILED",cancelled:"TASK_STATE_CANCELED",interrupted:"TASK_STATE_FAILED"}[t]}s(qn,"statusState");function $n(t){return!Tt.has(t)&&t!=="unknown"}s($n,"isLiveRunPhase");function Ne(t,e,n){return{messageId:oe(),taskId:t,contextId:e,role:"ROLE_AGENT",parts:[{text:n,mediaType:"text/plain"}]}}s(Ne,"agentMessage");function Bn(t){let e=Nn(t);return e.pathname=`${e.pathname.replace(/\/$/,"")}/a2a`,e.search="",e.hash="",e.href}s(Bn,"interfaceUrl");function _e(t,e){if(t!==void 0){if(!Number.isSafeInteger(t)||t<0)throw new p(-32602,`${e} must be a non-negative integer.`);return t}}s(_e,"parseHistoryLength");function Ue(t){if(typeof t?.id!="string"||t.id.length===0)throw new p(-32602,"Task id is required.");return t.id}s(Ue,"requiredTaskId");function Kn(t){if(!(!R(t)||typeof t.label!="string"||typeof t.value!="string"))return{label:t.label,value:t.value,...typeof t.description=="string"?{description:t.description}:{}}}s(Kn,"publicInputOption");function wt(t){if(!R(t)||typeof t.question!="string")return;let e=Array.isArray(t.options)?t.options.flatMap(n=>{let r=Kn(n);return r?[r]:[]}):void 0;return{question:t.question,...typeof t.header=="string"?{header:t.header}:{},...typeof t.kind=="string"?{kind:t.kind}:{},...e?{options:e}:{},...typeof t.multiSelect=="boolean"?{multiSelect:t.multiSelect}:{},...Number.isSafeInteger(t.minSelections)?{minSelections:t.minSelections}:{},...Number.isSafeInteger(t.maxSelections)?{maxSelections:t.maxSelections}:{},...typeof t.allowCustomInput=="boolean"?{allowCustomInput:t.allowCustomInput}:{},...typeof t.customInputLabel=="string"?{customInputLabel:t.customInputLabel}:{},...typeof t.customInputPrompt=="string"?{customInputPrompt:t.customInputPrompt}:{}}}s(wt,"publicInputQuestion");function jn(t){return R(t)?Array.isArray(t.questions)?{questions:t.questions.flatMap(n=>{let r=wt(n);return r?[r]:[]})}:wt(t)??{}:{}}s(jn,"publicInputOptions");function kt(t,e,n){let r=jn(n.options),i="";try{i=JSON.stringify(r)}catch{i="{}"}let o=i.length>4096?`${i.slice(0,4093)}...`:i;return{...Ne(t,e,`Input required (${n.kind}): ${o}`),metadata:{"kodax.ai/user-input":{kind:n.kind,options:r}}}}s(kt,"pendingInputMessage");function zn(t,e){let n=t.parts.find(i=>i.data!==void 0)?.data;if(n!==void 0)return n;let r=t.parts.flatMap(i=>i.text===void 0?[]:[i.text]).join(`
@@ -1,8 +1,8 @@
1
- import { as as KodaXSessionData, aD as KodaXSessionPromotionRecord, ac as KodaXExtensionStore, ad as KodaXExtensionStoreEntry, ai as KodaXJsonValue, a$ as MemoryContextIdentity, aR as MemoryActionProposal, b7 as MemoryItemRef, aS as MemoryApplicability, ax as KodaXSessionLineage, al as KodaXMemoryOutcomeDigest, at as KodaXSessionEntry, aH as KodaXSessionStorage, af as KodaXGoalState, ae as KodaXGoalEventType, av as KodaXSessionGoalEntry, ao as KodaXSessionArtifactLedgerEntry, o as AgentBudgetExhausted, G as AgentMetadataValue, D as AgentLimitReached } from './types-chunks/review-inbox.d-Bgt46S7L.js';
2
- export { A as AgentActor, a as AgentActorClient, b as AgentActorOwner, c as AgentActorSaveAttempt, d as AgentActorSaveDiagnostics, e as AgentActorSavePhase, f as AgentActorSaveTiming, g as AgentActorSnapshot, h as AgentActorSnapshotV1, i as AgentActorSnapshotV2, j as AgentActorState, k as AgentActorStore, l as AgentArtifactDescriptor, m as AgentBudgetAdmission, n as AgentBudgetAdmissionInput, p as AgentBudgetPort, q as AgentCapabilities, r as AgentDataClassification, s as AgentDetail, t as AgentEvent, u as AgentEventKind, v as AgentExecutionInput, w as AgentExecutionKind, x as AgentExecutionResult, y as AgentFollowupResult, z as AgentForkTurns, B as AgentInterruptScope, C as AgentIterationProgress, E as AgentListEntry, F as AgentMailboxMessage, H as AgentMutationOptions, I as AgentOutput, J as AgentProgressItem, K as AgentProgressKind, L as AgentProgressUpdate, M as AgentSpawnInput, N as AgentTreeSnapshot, O as AgentTurn, P as AgentTurnExecutor, Q as AgentTurnRef, R as AgentTurnState, S as AgentTurnSummary, T as EpisodeReviewActionInput, U as EpisodeReviewActionReceipt, V as EpisodeReviewBranchChangedError, W as EpisodeReviewClaim, X as EpisodeReviewDecision, Y as EpisodeReviewDecisionInput, Z as EpisodeReviewDrainEligibility, _ as EpisodeReviewDrainOptions, $ as EpisodeReviewDrainResult, a0 as EpisodeReviewFailure, a1 as EpisodeReviewFailureKind, a2 as EpisodeReviewInputCheckpoint, a3 as EpisodeReviewInputSpec, a4 as EpisodeReviewJobSnapshot, a5 as EpisodeReviewJobState, a6 as EpisodeReviewJobStatus, a7 as EpisodeReviewReceipt, a8 as KodaXCompactMemoryProgress, a9 as KodaXCompactMemorySeed, aa as KodaXExtensionSessionRecord, ab as KodaXExtensionSessionState, ag as KodaXGoalStatus, ah as KodaXHandledMemoryOperation, aj as KodaXMemoryInfluenceRef, ak as KodaXMemoryIntent, am as KodaXMemoryOutcomeEvidence, an as KodaXSessionArchiveMarkerEntry, ap as KodaXSessionBranchSummaryEntry, aq as KodaXSessionClientNoticeEntry, ar as KodaXSessionCompactionEntry, au as KodaXSessionEntryBase, aw as KodaXSessionLabelEntry, ay as KodaXSessionMemoryOutcomeDigestEntry, az as KodaXSessionMemoryReviewReceiptEntry, aA as KodaXSessionMessageEntry, aB as KodaXSessionMeta, aC as KodaXSessionNavigationOptions, aE as KodaXSessionRewindMarkerEntry, aF as KodaXSessionRuntimeInfo, aG as KodaXSessionScope, aI as KodaXSessionTreeNode, aJ as KodaXSessionUiHistoryItem, aK as KodaXSessionUiHistoryItemType, aL as KodaXSessionUiTextHistoryItem, aM as KodaXSessionUiTextHistoryItemType, aN as KodaXSessionUiToolCall, aO as KodaXSessionUiToolCallStatus, aP as KodaXSessionUiToolGroupHistoryItem, aQ as KodaXSessionWorkspaceKind, aT as MemoryApplyPreview, aU as MemoryApplyResult, aV as MemoryApproval, aW as MemoryAuthority, aZ as MemoryBodySnapshot, a_ as MemoryClaimKind, b0 as MemoryController, b1 as MemoryCuratorInput, b2 as MemoryEpisodeReviewResult, b3 as MemoryEvent, b4 as MemoryGovernanceFinding, b5 as MemoryGovernanceFindingKind, b6 as MemoryGovernanceReport, b8 as MemoryLifecycle, b9 as MemoryLifecycleOperationResult, ba as MemoryManagementController, bb as MemoryPack, bc as MemoryPackHint, bd as MemoryPackInput, be as MemoryPackTraceMetadata, bf as MemoryProposalAction, bg as MemoryRefFilter, bh as MemoryRefKind, bi as MemoryRejectResult, bj as MemoryRememberInput, bk as MemoryRememberResult, bl as MemoryReviewCandidateRef, bm as MemoryReviewDraftAction, bn as MemoryReviewInput, bo as MemoryReviewModelInput, bp as MemoryReviewPersistenceDecision, bq as MemoryReviewPersistenceKind, br as MemoryReviewPlan, bs as MemoryReviewRunner, bt as MemoryReviewTrigger, bu as MemoryScope, bv as MemorySourceAdapter, bw as MemoryVisibility, bx as PendingEpisodeReview, by as PendingEpisodeReviewFilter, bz as PendingEpisodeReviewSummary, bA as PendingEpisodeReviewV1, bB as PendingEpisodeReviewV2, bC as SessionErrorMetadata, bD as captureEpisodeReviewBranchEpoch, bE as claimEpisodeReview, bF as commitEpisodeReviewAction, bG as commitEpisodeReviewDecision, bH as completeEpisodeReview, bI as completeFencedEpisodeReview, bJ as deferEpisodeReview, bK as discardFencedEpisodeReview, bL as drainPendingEpisodeReviews, bM as failEpisodeReviewApply, bN as failEpisodeReviewAttempt, bO as freezeEpisodeReviewInput, bP as hashMemoryIdentityComponent, bQ as inspectEpisodeReviewJob, bR as isMemoryManagementController, bS as listPendingEpisodeReviewSummaries, bT as listPendingEpisodeReviews, bU as matchesMemoryApplicability, bV as memoryApplicabilityFingerprint, bW as persistPendingEpisodeReview, bX as withEpisodeReviewClaimAuthority, bY as withPendingEpisodeReviewSessionFence } from './types-chunks/review-inbox.d-Bgt46S7L.js';
3
- export { C as CompactionContext, a as CompactionEntry, b as CompactionEntryPayload, c as CompactionPolicy, d as CreateWorkflowCapsuleInput, D as DefaultSummaryCompaction, e as DefaultSummaryCompactionOptions, K as KODAX_API_MIN_INTERVAL, f as KODAX_DEFAULT_TIMEOUT, g as KODAX_HARD_TIMEOUT, h as KODAX_MAX_INCOMPLETE_RETRIES, i as KODAX_MAX_MAXTOKENS_RETRIES, j as KODAX_MAX_RETRIES, k as KODAX_MAX_TOKENS, l as KODAX_RETRY_BASE_DELAY, m as KODAX_STAGGER_DELAY, L as LINEAGE_ENTRY_TYPES, n as LineageArtifactLedgerPayload, o as LineageCompaction, p as LineageCompactionDelegates, q as LineageEntryType, r as LineageExtension, s as LineageLabelPayload, t as LineageTreeNode, P as PROMISE_PATTERN, u as PolicyCompactionResult, W as WORKFLOW_CAPSULE_API_VERSION, v as WORKFLOW_CAPSULE_FORMAT, w as WORKFLOW_CAPSULE_VERSION, x as WorkflowCapsule, y as WorkflowCapsuleEnvironmentRequirement, z as WorkflowCapsuleInputs, A as WorkflowCapsuleIntent, B as WorkflowCapsuleProvenance, E as WorkflowCapsuleRequirements, F as WorkflowQualityLintFinding, G as WorkflowQualityLintOptions, H as WorkflowQualityLintSeverity, _ as _resetActiveRootQueueRoutesForTests, I as actorQueueId, J as appendSessionLineageLabel, M as applyLineageTruncation, N as applySessionCompaction, O as archiveOldIslands, Q as assertRestrictedWorkflowQuality, R as buildSessionTree, S as buildWorkflowCapsuleIntent, T as cleanupIncompleteToolCalls, U as countActiveLineageMessages, V as countTokens, X as createSessionLineage, Y as createWorkflowCapsule, Z as createWorkflowModuleFromCapsule, $ as estimateTokens, a0 as evictOldIslandMessageContent, a1 as extractArtifactLedger, a2 as extractFileOps, a3 as extractTitleFromMessages, a4 as findPreviousUserEntryId, a5 as forkSessionLineage, a6 as generateSessionId, a7 as generateSessionIdSync, a8 as getAgentConfigHome, a9 as getAgentConfigPath, aa as getAppDataDir, ab as getSessionLineagePath, ac as getSessionMessageEntryId, ad as getSessionMessagesFromLineage, ae as isPathInsideDirectory, af as lintRestrictedWorkflowSource, ag as mergeArtifactLedger, ah as mergeFileOps, ai as registerActiveRootQueueRoute, aj as resolveActiveRootQueueRoute, ak as resolveExecutionPath, al as resolveSessionLineageTarget, am as rewindSessionLineage, an as setAgentConfigHome, ao as setSessionLineageActiveEntry, ap as validateAndFixToolHistory, aq as validateWorkflowCapsule } from './types-chunks/capsule.d-EMwSALqK.js';
4
- import { aW as Span, bf as Trace, d as Agent, P as Handoff, aJ as RunnerToolCall, aM as RunnerToolResult, i as AgentMessage, h as AgentManifest, ae as ManifestPatch, U as InvariantId, aq as QualityInvariant, ar as QueueEventListener, at as QueuedMessage, E as EnqueueInput, w as DequeueFilter, aj as MessagePriority, as as QueuedInputArtifact, x as DiscoveredInstance, aU as SessionMeta, aV as SessionStateSnapshot, b2 as StateWriterFs, T as InstanceDiscoveryFs, b1 as StateWriter, b4 as StopHookContext, b6 as StopHookResult, b5 as StopHookFn, Y as LearnedAreaStore } from './types-chunks/controller.d-D-hPLKaA.js';
5
- export { A as AdmissionAuditOptions, a as AdmissionCtx, b as AdmissionVerdict, c as AdmittedHandle, e as AgentActorController, f as AgentControllerHealth, g as AgentControllerOptions, j as AgentMiddlewareDeclaration, k as AgentReasoningProfile, l as AgentSpanData, m as AgentTool, C as CONTEXT_SAFETY_FLOOR_TOKENS, n as CONTEXT_SAFETY_RATIO, o as CommitLearnedSkillRevisionInput, p as CompactionSpanData, q as ContextCapacityError, r as ContextCapacityInput, s as CreateLearnedSkillRecordInput, t as CurrentTodoSummary, D as DEFAULT_SYSTEM_CAP, u as DeclarativeSkillSpec, v as Deliverable, y as DiscoveryOptions, z as EvidenceSpanData, B as ExactInvokedSkillSnapshot, F as FanoutSpanData, G as GenerationSpanData, H as GenerationSuspensionError, I as Guardrail, J as GuardrailBlockedError, K as GuardrailContext, L as GuardrailEscalateError, M as GuardrailPermissionIntent, N as GuardrailSpanData, O as GuardrailVerdict, Q as HandoffSpanData, R as InMemorySessionOptions, S as InputGuardrail, V as InvariantResult, W as InvariantSession, X as LearnedAreaPaths, Z as LearnedSkillBindingAdmission, _ as LearnedSkillCanaryOutcome, $ as LearnedSkillDecisionDisposition, a0 as LearnedSkillInvocationAdmission, a1 as LearnedSkillInvokedReceipt, a2 as LearnedSkillOfferedReceipt, a3 as LearnedSkillOutcomeReceipt, a4 as LearnedSkillUsageReceipt, a5 as LearningReviewEvidencePacket, a6 as LearningReviewQualification, a7 as LearningReviewVerifierFact, a8 as MAX_TOOL_LOOP_ITERATIONS, a9 as ManagedChildCleanupSummary, aa as ManagedChildProcessMetadata, ab as ManagedChildRegistrationOptions, ac as ManagedRunChildCleanupResult, ad as ManagedRunChildProcessReference, af as MemoryDecisionTraceReceipt, ag as MessageDelivery, ah as MessageEntry, ai as MessageMode, ak as NormalizedLearnedSkillDecision, al as ObserveCtx, am as OutputGuardrail, an as PersistedSessionState, ao as PresetDispatcher, ap as PresetTracingContext, au as RESERVE_SHRINK_FLOOR_TOKENS, av as ReadonlyMutationTracker, aw as ReadonlyRecorder, ax as ReasoningDepth, ay as RecentlyModifiedFile, az as RunEvent, aA as RunOptions, aB as RunResult, aC as RunnableTool, aD as Runner, aE as RunnerEvent, aF as RunnerIterationLimitError, aG as RunnerLlmResult, aH as RunnerLlmReturn, aI as RunnerRecoveryTranscriptCarrier, aK as RunnerToolContext, aL as RunnerToolObserver, aN as RunnerToolResultBatch, aO as RunnerToolResultBatchTransform, aP as Session, aQ as SessionDispatchResult, aR as SessionEntry, aS as SessionExtension, aT as SessionForkOptions, aX as SpanData, aY as SpanError, aZ as SpanImpl, a_ as SpanImplOptions, a$ as StagedLearnedSkillArtifact, b0 as StartTraceOptions, b3 as StateWriterOptions, b7 as StopHookSpanData, b8 as SystemCap, b9 as TerminalCtx, ba as ToolBeforeOutcome, bb as ToolCallSpanData, bc as ToolCapability, bd as ToolGuardrail, be as ToolPermission, bg as TraceOptions, bh as Tracer, bi as TracerOptions, bj as UnifiedLearningReviewModelInput, bk as UnifiedLearningReviewResult, bl as UnifiedLearningReviewRunner, bm as _resetAdmittedAgentBindings, bn as _resetPresetDispatchers, bo as admitAndRecordLearnedSkillInvocation, bp as admitLearnedSkillBinding, bq as attachRunnerRecoveryTranscript, br as buildAssistantMessageFromLlmResult, bs as buildSystemPrompt, bt as buildToolResultMessage, bu as calculateContextSafetyMargin, bv as calculateMaxContextInputTokens, bw as cleanupManagedRunChildProcess, bx as cleanupRegisteredManagedChildren, by as collectGuardrails, bz as commitLearnedSkillRevision, bA as completeLearnedSkillOutcome, bB as completeLearnedSkillSessionOutcomes, bC as createAgent, bD as createAgentActorController, bE as createHandoff, bF as createInMemorySession, bG as createInvariantSessionForAgent, bH as createLearnedCapabilityScope, bI as createLearnedSkillRecord, bJ as createStateWriter, bK as createTrace, bL as defaultTracer, bM as detectInstructionsInjection, bN as discoverInstances, bO as eventFromCapability, bP as exactInvokedSkillSnapshotForSession, bQ as exceedsContextCapacity, bR as executeRunnerToolCall, bS as extractAssistantTextFromMessage, bT as getAdmittedAgentBindings, bU as invokeLearnedSkillCanary, bV as isLearnedCapabilityRecordV2, bW as isRunnableTool, bX as isRunnerIterationLimitError, bY as isRunnerLlmResult, bZ as isUnifiedLearningReviewModelInput, b_ as listLearnedSkillUsageReceipts, b$ as normalizeAgentReasoningProfile, c0 as normalizeUnifiedLearningReview, c1 as quarantineLearnedSkillRevision, c2 as readRunnerRecoveryTranscript, c3 as reclaimReservedResponseTokens, c4 as reconcileLearnedSkillBindingOutcomes, c5 as recordLearnedSkillOffered, c6 as registerManagedChildProcess, c7 as registerPresetDispatcher, c8 as releaseLearnedSkillBinding, c9 as renderDeclarativeSkill, ca as resolveLearnedAreaPaths, cb as resolveProjectLearnedAreaRoot, cc as runAdmissionAudit, cd as runInputGuardrails, ce as runOutputGuardrails, cf as runToolAfterGuardrails, cg as runToolBeforeGuardrails, ch as sanitizeUnifiedLearningReviewInput, ci as setAdmittedAgentBindings, cj as stageLearnedSkillRevision, ck as validateDeclarativeSkillSpec, cl as withManagedChildProcessConfigHome } from './types-chunks/controller.d-D-hPLKaA.js';
1
+ import { as as KodaXSessionData, aD as KodaXSessionPromotionRecord, ac as KodaXExtensionStore, ad as KodaXExtensionStoreEntry, ai as KodaXJsonValue, a$ as MemoryContextIdentity, aR as MemoryActionProposal, b7 as MemoryItemRef, aS as MemoryApplicability, ax as KodaXSessionLineage, al as KodaXMemoryOutcomeDigest, at as KodaXSessionEntry, aH as KodaXSessionStorage, af as KodaXGoalState, ae as KodaXGoalEventType, av as KodaXSessionGoalEntry, ao as KodaXSessionArtifactLedgerEntry, o as AgentBudgetExhausted, G as AgentMetadataValue, D as AgentLimitReached } from './types-chunks/review-inbox.d-yREk25Vf.js';
2
+ export { A as AgentActor, a as AgentActorClient, b as AgentActorOwner, c as AgentActorSaveAttempt, d as AgentActorSaveDiagnostics, e as AgentActorSavePhase, f as AgentActorSaveTiming, g as AgentActorSnapshot, h as AgentActorSnapshotV1, i as AgentActorSnapshotV2, j as AgentActorState, k as AgentActorStore, l as AgentArtifactDescriptor, m as AgentBudgetAdmission, n as AgentBudgetAdmissionInput, p as AgentBudgetPort, q as AgentCapabilities, r as AgentDataClassification, s as AgentDetail, t as AgentEvent, u as AgentEventKind, v as AgentExecutionInput, w as AgentExecutionKind, x as AgentExecutionResult, y as AgentFollowupResult, z as AgentForkTurns, B as AgentInterruptScope, C as AgentIterationProgress, E as AgentListEntry, F as AgentMailboxMessage, H as AgentMutationOptions, I as AgentOutput, J as AgentProgressItem, K as AgentProgressKind, L as AgentProgressUpdate, M as AgentSpawnInput, N as AgentTreeSnapshot, O as AgentTurn, P as AgentTurnExecutor, Q as AgentTurnRef, R as AgentTurnState, S as AgentTurnSummary, T as EpisodeReviewActionInput, U as EpisodeReviewActionReceipt, V as EpisodeReviewBranchChangedError, W as EpisodeReviewClaim, X as EpisodeReviewDecision, Y as EpisodeReviewDecisionInput, Z as EpisodeReviewDrainEligibility, _ as EpisodeReviewDrainOptions, $ as EpisodeReviewDrainResult, a0 as EpisodeReviewFailure, a1 as EpisodeReviewFailureKind, a2 as EpisodeReviewInputCheckpoint, a3 as EpisodeReviewInputSpec, a4 as EpisodeReviewJobSnapshot, a5 as EpisodeReviewJobState, a6 as EpisodeReviewJobStatus, a7 as EpisodeReviewReceipt, a8 as KodaXCompactMemoryProgress, a9 as KodaXCompactMemorySeed, aa as KodaXExtensionSessionRecord, ab as KodaXExtensionSessionState, ag as KodaXGoalStatus, ah as KodaXHandledMemoryOperation, aj as KodaXMemoryInfluenceRef, ak as KodaXMemoryIntent, am as KodaXMemoryOutcomeEvidence, an as KodaXSessionArchiveMarkerEntry, ap as KodaXSessionBranchSummaryEntry, aq as KodaXSessionClientNoticeEntry, ar as KodaXSessionCompactionEntry, au as KodaXSessionEntryBase, aw as KodaXSessionLabelEntry, ay as KodaXSessionMemoryOutcomeDigestEntry, az as KodaXSessionMemoryReviewReceiptEntry, aA as KodaXSessionMessageEntry, aB as KodaXSessionMeta, aC as KodaXSessionNavigationOptions, aE as KodaXSessionRewindMarkerEntry, aF as KodaXSessionRuntimeInfo, aG as KodaXSessionScope, aI as KodaXSessionTreeNode, aJ as KodaXSessionUiHistoryItem, aK as KodaXSessionUiHistoryItemType, aL as KodaXSessionUiTextHistoryItem, aM as KodaXSessionUiTextHistoryItemType, aN as KodaXSessionUiToolCall, aO as KodaXSessionUiToolCallStatus, aP as KodaXSessionUiToolGroupHistoryItem, aQ as KodaXSessionWorkspaceKind, aT as MemoryApplyPreview, aU as MemoryApplyResult, aV as MemoryApproval, aW as MemoryAuthority, aZ as MemoryBodySnapshot, a_ as MemoryClaimKind, b0 as MemoryController, b1 as MemoryCuratorInput, b2 as MemoryEpisodeReviewResult, b3 as MemoryEvent, b4 as MemoryGovernanceFinding, b5 as MemoryGovernanceFindingKind, b6 as MemoryGovernanceReport, b8 as MemoryLifecycle, b9 as MemoryLifecycleOperationResult, ba as MemoryManagementController, bb as MemoryPack, bc as MemoryPackHint, bd as MemoryPackInput, be as MemoryPackTraceMetadata, bf as MemoryProposalAction, bg as MemoryRefFilter, bh as MemoryRefKind, bi as MemoryRejectResult, bj as MemoryRememberInput, bk as MemoryRememberResult, bl as MemoryReviewCandidateRef, bm as MemoryReviewDraftAction, bn as MemoryReviewInput, bo as MemoryReviewModelInput, bp as MemoryReviewPersistenceDecision, bq as MemoryReviewPersistenceKind, br as MemoryReviewPlan, bs as MemoryReviewRunner, bt as MemoryReviewTrigger, bu as MemoryScope, bv as MemorySourceAdapter, bw as MemoryVisibility, bx as PendingEpisodeReview, by as PendingEpisodeReviewFilter, bz as PendingEpisodeReviewSummary, bA as PendingEpisodeReviewV1, bB as PendingEpisodeReviewV2, bC as SessionErrorMetadata, bD as captureEpisodeReviewBranchEpoch, bE as claimEpisodeReview, bF as commitEpisodeReviewAction, bG as commitEpisodeReviewDecision, bH as completeEpisodeReview, bI as completeFencedEpisodeReview, bJ as deferEpisodeReview, bK as discardFencedEpisodeReview, bL as drainPendingEpisodeReviews, bM as failEpisodeReviewApply, bN as failEpisodeReviewAttempt, bO as freezeEpisodeReviewInput, bP as hashMemoryIdentityComponent, bQ as inspectEpisodeReviewJob, bR as isMemoryManagementController, bS as listPendingEpisodeReviewSummaries, bT as listPendingEpisodeReviews, bU as matchesMemoryApplicability, bV as memoryApplicabilityFingerprint, bW as persistPendingEpisodeReview, bX as withEpisodeReviewClaimAuthority, bY as withPendingEpisodeReviewSessionFence } from './types-chunks/review-inbox.d-yREk25Vf.js';
3
+ export { C as CompactionContext, a as CompactionEntry, b as CompactionEntryPayload, c as CompactionPolicy, d as CreateWorkflowCapsuleInput, D as DefaultSummaryCompaction, e as DefaultSummaryCompactionOptions, K as KODAX_API_MIN_INTERVAL, f as KODAX_DEFAULT_TIMEOUT, g as KODAX_HARD_TIMEOUT, h as KODAX_MAX_INCOMPLETE_RETRIES, i as KODAX_MAX_MAXTOKENS_RETRIES, j as KODAX_MAX_RETRIES, k as KODAX_MAX_TOKENS, l as KODAX_RETRY_BASE_DELAY, m as KODAX_STAGGER_DELAY, L as LINEAGE_ENTRY_TYPES, n as LineageArtifactLedgerPayload, o as LineageCompaction, p as LineageCompactionDelegates, q as LineageEntryType, r as LineageExtension, s as LineageLabelPayload, t as LineageTreeNode, P as PROMISE_PATTERN, u as PolicyCompactionResult, W as WORKFLOW_CAPSULE_API_VERSION, v as WORKFLOW_CAPSULE_FORMAT, w as WORKFLOW_CAPSULE_VERSION, x as WorkflowCapsule, y as WorkflowCapsuleEnvironmentRequirement, z as WorkflowCapsuleInputs, A as WorkflowCapsuleIntent, B as WorkflowCapsuleProvenance, E as WorkflowCapsuleRequirements, F as WorkflowQualityLintFinding, G as WorkflowQualityLintOptions, H as WorkflowQualityLintSeverity, _ as _resetActiveRootQueueRoutesForTests, I as actorQueueId, J as appendSessionLineageLabel, M as applyLineageTruncation, N as applySessionCompaction, O as archiveOldIslands, Q as assertRestrictedWorkflowQuality, R as buildSessionTree, S as buildWorkflowCapsuleIntent, T as cleanupIncompleteToolCalls, U as countActiveLineageMessages, V as countTokens, X as createSessionLineage, Y as createWorkflowCapsule, Z as createWorkflowModuleFromCapsule, $ as estimateTokens, a0 as evictOldIslandMessageContent, a1 as extractArtifactLedger, a2 as extractFileOps, a3 as extractTitleFromMessages, a4 as findPreviousUserEntryId, a5 as forkSessionLineage, a6 as generateSessionId, a7 as generateSessionIdSync, a8 as getAgentConfigHome, a9 as getAgentConfigPath, aa as getAppDataDir, ab as getSessionLineagePath, ac as getSessionMessageEntryId, ad as getSessionMessagesFromLineage, ae as isPathInsideDirectory, af as lintRestrictedWorkflowSource, ag as mergeArtifactLedger, ah as mergeFileOps, ai as registerActiveRootQueueRoute, aj as resolveActiveRootQueueRoute, ak as resolveExecutionPath, al as resolveSessionLineageTarget, am as rewindSessionLineage, an as setAgentConfigHome, ao as setSessionLineageActiveEntry, ap as validateAndFixToolHistory, aq as validateWorkflowCapsule } from './types-chunks/capsule.d-BTlvC5qq.js';
4
+ import { aW as Span, bf as Trace, d as Agent, P as Handoff, aJ as RunnerToolCall, aM as RunnerToolResult, i as AgentMessage, h as AgentManifest, ae as ManifestPatch, U as InvariantId, aq as QualityInvariant, ar as QueueEventListener, at as QueuedMessage, E as EnqueueInput, w as DequeueFilter, aj as MessagePriority, as as QueuedInputArtifact, x as DiscoveredInstance, aU as SessionMeta, aV as SessionStateSnapshot, b2 as StateWriterFs, T as InstanceDiscoveryFs, b1 as StateWriter, b4 as StopHookContext, b6 as StopHookResult, b5 as StopHookFn, Y as LearnedAreaStore } from './types-chunks/controller.d-D6rEz5LS.js';
5
+ export { A as AdmissionAuditOptions, a as AdmissionCtx, b as AdmissionVerdict, c as AdmittedHandle, e as AgentActorController, f as AgentControllerHealth, g as AgentControllerOptions, j as AgentMiddlewareDeclaration, k as AgentReasoningProfile, l as AgentSpanData, m as AgentTool, C as CONTEXT_SAFETY_FLOOR_TOKENS, n as CONTEXT_SAFETY_RATIO, o as CommitLearnedSkillRevisionInput, p as CompactionSpanData, q as ContextCapacityError, r as ContextCapacityInput, s as CreateLearnedSkillRecordInput, t as CurrentTodoSummary, D as DEFAULT_SYSTEM_CAP, u as DeclarativeSkillSpec, v as Deliverable, y as DiscoveryOptions, z as EvidenceSpanData, B as ExactInvokedSkillSnapshot, F as FanoutSpanData, G as GenerationSpanData, H as GenerationSuspensionError, I as Guardrail, J as GuardrailBlockedError, K as GuardrailContext, L as GuardrailEscalateError, M as GuardrailPermissionIntent, N as GuardrailSpanData, O as GuardrailVerdict, Q as HandoffSpanData, R as InMemorySessionOptions, S as InputGuardrail, V as InvariantResult, W as InvariantSession, X as LearnedAreaPaths, Z as LearnedSkillBindingAdmission, _ as LearnedSkillCanaryOutcome, $ as LearnedSkillDecisionDisposition, a0 as LearnedSkillInvocationAdmission, a1 as LearnedSkillInvokedReceipt, a2 as LearnedSkillOfferedReceipt, a3 as LearnedSkillOutcomeReceipt, a4 as LearnedSkillUsageReceipt, a5 as LearningReviewEvidencePacket, a6 as LearningReviewQualification, a7 as LearningReviewVerifierFact, a8 as MAX_TOOL_LOOP_ITERATIONS, a9 as ManagedChildCleanupSummary, aa as ManagedChildProcessMetadata, ab as ManagedChildRegistrationOptions, ac as ManagedRunChildCleanupResult, ad as ManagedRunChildProcessReference, af as MemoryDecisionTraceReceipt, ag as MessageDelivery, ah as MessageEntry, ai as MessageMode, ak as NormalizedLearnedSkillDecision, al as ObserveCtx, am as OutputGuardrail, an as PersistedSessionState, ao as PresetDispatcher, ap as PresetTracingContext, au as RESERVE_SHRINK_FLOOR_TOKENS, av as ReadonlyMutationTracker, aw as ReadonlyRecorder, ax as ReasoningDepth, ay as RecentlyModifiedFile, az as RunEvent, aA as RunOptions, aB as RunResult, aC as RunnableTool, aD as Runner, aE as RunnerEvent, aF as RunnerIterationLimitError, aG as RunnerLlmResult, aH as RunnerLlmReturn, aI as RunnerRecoveryTranscriptCarrier, aK as RunnerToolContext, aL as RunnerToolObserver, aN as RunnerToolResultBatch, aO as RunnerToolResultBatchTransform, aP as Session, aQ as SessionDispatchResult, aR as SessionEntry, aS as SessionExtension, aT as SessionForkOptions, aX as SpanData, aY as SpanError, aZ as SpanImpl, a_ as SpanImplOptions, a$ as StagedLearnedSkillArtifact, b0 as StartTraceOptions, b3 as StateWriterOptions, b7 as StopHookSpanData, b8 as SystemCap, b9 as TerminalCtx, ba as ToolBeforeOutcome, bb as ToolCallSpanData, bc as ToolCapability, bd as ToolGuardrail, be as ToolPermission, bg as TraceOptions, bh as Tracer, bi as TracerOptions, bj as UnifiedLearningReviewModelInput, bk as UnifiedLearningReviewResult, bl as UnifiedLearningReviewRunner, bm as _resetAdmittedAgentBindings, bn as _resetPresetDispatchers, bo as admitAndRecordLearnedSkillInvocation, bp as admitLearnedSkillBinding, bq as attachRunnerRecoveryTranscript, br as buildAssistantMessageFromLlmResult, bs as buildSystemPrompt, bt as buildToolResultMessage, bu as calculateContextSafetyMargin, bv as calculateMaxContextInputTokens, bw as cleanupManagedRunChildProcess, bx as cleanupRegisteredManagedChildren, by as collectGuardrails, bz as commitLearnedSkillRevision, bA as completeLearnedSkillOutcome, bB as completeLearnedSkillSessionOutcomes, bC as createAgent, bD as createAgentActorController, bE as createHandoff, bF as createInMemorySession, bG as createInvariantSessionForAgent, bH as createLearnedCapabilityScope, bI as createLearnedSkillRecord, bJ as createStateWriter, bK as createTrace, bL as defaultTracer, bM as detectInstructionsInjection, bN as discoverInstances, bO as eventFromCapability, bP as exactInvokedSkillSnapshotForSession, bQ as exceedsContextCapacity, bR as executeRunnerToolCall, bS as extractAssistantTextFromMessage, bT as getAdmittedAgentBindings, bU as invokeLearnedSkillCanary, bV as isLearnedCapabilityRecordV2, bW as isRunnableTool, bX as isRunnerIterationLimitError, bY as isRunnerLlmResult, bZ as isUnifiedLearningReviewModelInput, b_ as listLearnedSkillUsageReceipts, b$ as normalizeAgentReasoningProfile, c0 as normalizeUnifiedLearningReview, c1 as quarantineLearnedSkillRevision, c2 as readRunnerRecoveryTranscript, c3 as reclaimReservedResponseTokens, c4 as reconcileLearnedSkillBindingOutcomes, c5 as recordLearnedSkillOffered, c6 as registerManagedChildProcess, c7 as registerPresetDispatcher, c8 as releaseLearnedSkillBinding, c9 as renderDeclarativeSkill, ca as resolveLearnedAreaPaths, cb as resolveProjectLearnedAreaRoot, cc as runAdmissionAudit, cd as runInputGuardrails, ce as runOutputGuardrails, cf as runToolAfterGuardrails, cg as runToolBeforeGuardrails, ch as sanitizeUnifiedLearningReviewInput, ci as setAdmittedAgentBindings, cj as stageLearnedSkillRevision, ck as validateDeclarativeSkillSpec, cl as withManagedChildProcessConfigHome } from './types-chunks/controller.d-D6rEz5LS.js';
6
6
  import { N as KodaXProviderStreamOptions, s as KodaXImageBlock, v as KodaXMessage, aj as KodaXToolDefinition, ao as KodaXToolUseBlock, W as KodaXReasoningRequest, j as KodaXEphemeralSuffix, L as KodaXProviderRequestProjection, ah as KodaXTokenUsage } from './types-chunks/types.d-Bi8iUd6x.js';
7
7
  export { b as KodaXAssuranceIntent, h as KodaXContentBlock, k as KodaXExecutionMode, l as KodaXExecutionPattern, x as KodaXMutationSurface, C as KodaXProviderConfig, Q as KodaXReasoningCapability, U as KodaXReasoningMode, Y as KodaXRedactedThinkingBlock, a0 as KodaXRiskLevel, a2 as KodaXStreamResult, a3 as KodaXTaskActionability, a4 as KodaXTaskBudgetOverrides, a5 as KodaXTaskComplexity, a6 as KodaXTaskFamily, a7 as KodaXTaskResultMetadata, a8 as KodaXTaskResultSource, a9 as KodaXTaskRoutingDecision, aa as KodaXTaskType, ab as KodaXTaskWorkIntent, ac as KodaXTextBlock, ad as KodaXThinkingBlock, ae as KodaXThinkingBudgetMap, af as KodaXThinkingDepth, ak as KodaXToolResultBlock } from './types-chunks/types.d-Bi8iUd6x.js';
8
8
  import { C as CapabilityCache, b as CapabilityCacheSource } from './types-chunks/capability-learning.d-BXDEOON2.js';
@@ -11,9 +11,9 @@ export { C as CapabilityKind, a as CapabilityProvider, b as CapabilityResult, c
11
11
  export { I as ImageValidation, v as validateImageBytes } from './types-chunks/image-validation.d-ACJcj02o.js';
12
12
  import { K as KodaXBaseProvider } from './types-chunks/errors.d-D73qdYbS.js';
13
13
  import { ChildProcess } from 'node:child_process';
14
- import { ao as KodaXInputArtifactSource, am as KodaXImageMediaType, aq as KodaXVideoMediaType, ak as KodaXFileInputArtifact, al as KodaXImageInputArtifact, ap as KodaXVideoInputArtifact, an as KodaXInputArtifact, aE as LearningActionDriver, aO as LearningQuery, aN as LearningPage, ay as LearnedCapabilityRecord, aQ as LearningSurfaceSnapshot, aJ as LearningEvent, aP as LearningSubscribeOptions, aL as LearningExplicitUserAuthority, aB as LearnedCapabilityScope, a8 as CompactionUpdate, a3 as CompactionConfig, a6 as CompactionRequestMetrics, a4 as CompactionDetails, a7 as CompactionResult, bD as WorkflowRunState, bf as WorkflowOutcome, b0 as WorkflowApi, be as WorkflowModule, a$ as WorkflowAgentBackend, ba as WorkflowLimits, b5 as WorkflowEvent, bb as WorkflowLogEvent, bJ as WorkflowTaskResult, y as AgentExecutorPlaneStore, a9 as CreateAgentExecutorPlaneOptions, u as AgentExecutorPlane, ag as ExternalAgentProtocol, s as AgentExecutorFactory } from './types-chunks/types.d-BlXTogOo.js';
15
- export { A as ASK_USER_BACK_SIGNAL, a as ASK_USER_CUSTOM_INPUT_SIGNAL, b as AgentArtifactPolicy, c as AgentArtifactPolicyDecision, d as AgentArtifactPolicyInput, e as AgentArtifactReference, f as AgentCapabilityDeclaration, g as AgentCapabilityRequirements, h as AgentContinuationInput, i as AgentCredentialBroker, j as AgentDispatchContext, k as AgentDispatchPolicy, l as AgentDispatchPolicyDecision, m as AgentDispatchPolicyInput, n as AgentDispatchabilitySnapshot, o as AgentDispatchabilityStatus, p as AgentEffectDeclaration, q as AgentExecutor, r as AgentExecutorEvent, t as AgentExecutorFactoryContext, v as AgentExecutorPlaneBackgroundErrorContext, w as AgentExecutorPlaneBackgroundErrorHandler, x as AgentExecutorPlaneBinding, z as AgentExecutorPreflightResult, B as AgentExecutorProtocol, C as AgentExecutorTaskReference, D as AgentExecutorTaskSnapshot, E as AgentJsonObject, F as AgentJsonValue, G as AgentPreflightInput, H as AgentPreflightResult, I as AgentRegistrationEnabledMutationOptions, J as AgentRegistrationMutationOptions, K as AgentRegistrationService, L as AgentTaskCancellation, M as AgentTaskCorrelation, N as AgentTaskEvent, O as AgentTaskFilter, P as AgentTaskProgress, Q as AgentTaskRegistrationSnapshot, R as AgentTaskService, S as AgentTaskSnapshot, T as AgentTaskStartInput, U as AgentTaskState, V as AgentTaskUsage, W as AskUserAnswer, X as AskUserCustomInputAnswer, Y as AskUserMultiOptions, Z as AskUserQuestionItem, _ as AskUserQuestionOptions, $ as AskUserSelectionAnswer, a0 as AskUserUnanswered, a1 as CapabilitySupport, a2 as CompactionAnchor, a5 as CompactionReport, aa as DispatchableAgentDescriptor, ab as DispatchableAgentListing, ac as DispatchableAgentOrigin, ad as DispatchableAgentQuery, ae as ExternalAgentEffectDeclaration, af as ExternalAgentHealth, ah as ExternalAgentRegistration, ai as ExternalAgentRegistrationSummary, aj as FileOperations, ar as LearnedCapabilityArtifact, as as LearnedCapabilityCanary, at as LearnedCapabilityCanaryBinding, au as LearnedCapabilityCanaryInvocation, av as LearnedCapabilityCarrier, aw as LearnedCapabilityLifecycle, ax as LearnedCapabilityProvenance, az as LearnedCapabilityRecordV1, aA as LearnedCapabilityRecordV2, aC as LearnedCapabilitySource, aD as LearningAction, aF as LearningCapabilityError, aG as LearningCapabilityErrorCode, aH as LearningClientEventState, aI as LearningClientRecord, aK as LearningEventKind, aM as LearningNotificationState, aR as LocalAgentTaskInput, aS as LocalAgentTaskUpdate, aT as ManagedRunClassification, aU as ManagedRunHooks, aV as ManagedWorkflowRun, aW as ManagedWorkflowSnapshot, aX as ManagedWorkflowStatus, aY as StartManagedRunInput, aZ as UserInteraction, a_ as UserInteractionPromptContext, b1 as WorkflowApproval, b2 as WorkflowApprovalSummary, b3 as WorkflowArtifactRef, b4 as WorkflowBudget, b6 as WorkflowEventCorrelation, b7 as WorkflowEventRecorder, b8 as WorkflowEventType, b9 as WorkflowIsolation, bc as WorkflowMeta, bd as WorkflowModelHint, bg as WorkflowOutcomeError, bh as WorkflowOutcomeResult, bi as WorkflowOutcomeStatus, bj as WorkflowOutcomeUsage, bk as WorkflowParallelOptions, bl as WorkflowProcessArtifact, bm as WorkflowProcessCounts, bn as WorkflowProcessEvent, bo as WorkflowProcessItem, bp as WorkflowProcessItemKind, bq as WorkflowProcessItemOrigin, br as WorkflowProcessItemStatus, bs as WorkflowProcessMetadata, bt as WorkflowProcessProgress, bu as WorkflowProcessSnapshot, bv as WorkflowProcessSource, bw as WorkflowProcessStatus, bx as WorkflowProcessSummaryStatus, by as WorkflowProcessTokenUsage, bz as WorkflowProcessTracker, bA as WorkflowProcessTrackerOptions, bB as WorkflowRun, bC as WorkflowRunManager, bE as WorkflowRunStatus, bF as WorkflowSpawnAgentInput, bG as WorkflowSynthesis, bH as WorkflowSynthesizeInput, bI as WorkflowTaskHandle, bK as WorkflowTaskSnapshot, bL as WorkflowTaskStatus, bM as WorkflowTaskSummaryEventUpdate, bN as WorkflowTaskSummaryKind, bO as WorkflowTaskSummaryUpdate, bP as WorkflowTaskUsage, bQ as WorkflowTaskVerification, bR as WorkflowTaskVerificationResult, bS as WorkflowWaitOptions, bT as asSingleSelection, bU as assertLearnedCapabilityTransition, bV as canTransitionLearnedCapability, bW as createWorkflowProcessTracker, bX as createWorkflowRunManager, bY as getActiveUserInteraction, bZ as getDefaultWorkflowRunManager, b_ as isAskUserCustomInputAnswer, b$ as isAskUserUnanswered, c0 as isFinalWorkflowProcessStatus, c1 as learningEventIdFor, c2 as learningEventKindForLifecycle, c3 as normalizeHostMetadata, c4 as setActiveUserInteraction, c5 as slugifyLearnedCapabilityName } from './types-chunks/types.d-BlXTogOo.js';
16
- export { C as CreateMemoryControlPlaneOptions, M as MemoryControlPlane, c as createMemoryControlPlane } from './types-chunks/controller.d-C0SAuNKu.js';
14
+ import { ao as KodaXInputArtifactSource, am as KodaXImageMediaType, aq as KodaXVideoMediaType, ak as KodaXFileInputArtifact, al as KodaXImageInputArtifact, ap as KodaXVideoInputArtifact, an as KodaXInputArtifact, aE as LearningActionDriver, aO as LearningQuery, aN as LearningPage, ay as LearnedCapabilityRecord, aQ as LearningSurfaceSnapshot, aJ as LearningEvent, aP as LearningSubscribeOptions, aL as LearningExplicitUserAuthority, aB as LearnedCapabilityScope, a8 as CompactionUpdate, a3 as CompactionConfig, a6 as CompactionRequestMetrics, a4 as CompactionDetails, a7 as CompactionResult, bD as WorkflowRunState, bf as WorkflowOutcome, b0 as WorkflowApi, be as WorkflowModule, a$ as WorkflowAgentBackend, ba as WorkflowLimits, b5 as WorkflowEvent, bb as WorkflowLogEvent, bJ as WorkflowTaskResult, y as AgentExecutorPlaneStore, a9 as CreateAgentExecutorPlaneOptions, u as AgentExecutorPlane, ag as ExternalAgentProtocol, s as AgentExecutorFactory } from './types-chunks/types.d-BQ-hbni4.js';
15
+ export { A as ASK_USER_BACK_SIGNAL, a as ASK_USER_CUSTOM_INPUT_SIGNAL, b as AgentArtifactPolicy, c as AgentArtifactPolicyDecision, d as AgentArtifactPolicyInput, e as AgentArtifactReference, f as AgentCapabilityDeclaration, g as AgentCapabilityRequirements, h as AgentContinuationInput, i as AgentCredentialBroker, j as AgentDispatchContext, k as AgentDispatchPolicy, l as AgentDispatchPolicyDecision, m as AgentDispatchPolicyInput, n as AgentDispatchabilitySnapshot, o as AgentDispatchabilityStatus, p as AgentEffectDeclaration, q as AgentExecutor, r as AgentExecutorEvent, t as AgentExecutorFactoryContext, v as AgentExecutorPlaneBackgroundErrorContext, w as AgentExecutorPlaneBackgroundErrorHandler, x as AgentExecutorPlaneBinding, z as AgentExecutorPreflightResult, B as AgentExecutorProtocol, C as AgentExecutorTaskReference, D as AgentExecutorTaskSnapshot, E as AgentJsonObject, F as AgentJsonValue, G as AgentPreflightInput, H as AgentPreflightResult, I as AgentRegistrationEnabledMutationOptions, J as AgentRegistrationMutationOptions, K as AgentRegistrationService, L as AgentTaskCancellation, M as AgentTaskCorrelation, N as AgentTaskEvent, O as AgentTaskFilter, P as AgentTaskProgress, Q as AgentTaskRegistrationSnapshot, R as AgentTaskService, S as AgentTaskSnapshot, T as AgentTaskStartInput, U as AgentTaskState, V as AgentTaskUsage, W as AskUserAnswer, X as AskUserCustomInputAnswer, Y as AskUserMultiOptions, Z as AskUserQuestionItem, _ as AskUserQuestionOptions, $ as AskUserSelectionAnswer, a0 as AskUserUnanswered, a1 as CapabilitySupport, a2 as CompactionAnchor, a5 as CompactionReport, aa as DispatchableAgentDescriptor, ab as DispatchableAgentListing, ac as DispatchableAgentOrigin, ad as DispatchableAgentQuery, ae as ExternalAgentEffectDeclaration, af as ExternalAgentHealth, ah as ExternalAgentRegistration, ai as ExternalAgentRegistrationSummary, aj as FileOperations, ar as LearnedCapabilityArtifact, as as LearnedCapabilityCanary, at as LearnedCapabilityCanaryBinding, au as LearnedCapabilityCanaryInvocation, av as LearnedCapabilityCarrier, aw as LearnedCapabilityLifecycle, ax as LearnedCapabilityProvenance, az as LearnedCapabilityRecordV1, aA as LearnedCapabilityRecordV2, aC as LearnedCapabilitySource, aD as LearningAction, aF as LearningCapabilityError, aG as LearningCapabilityErrorCode, aH as LearningClientEventState, aI as LearningClientRecord, aK as LearningEventKind, aM as LearningNotificationState, aR as LocalAgentTaskInput, aS as LocalAgentTaskUpdate, aT as ManagedRunClassification, aU as ManagedRunHooks, aV as ManagedWorkflowRun, aW as ManagedWorkflowSnapshot, aX as ManagedWorkflowStatus, aY as StartManagedRunInput, aZ as UserInteraction, a_ as UserInteractionPromptContext, b1 as WorkflowApproval, b2 as WorkflowApprovalSummary, b3 as WorkflowArtifactRef, b4 as WorkflowBudget, b6 as WorkflowEventCorrelation, b7 as WorkflowEventRecorder, b8 as WorkflowEventType, b9 as WorkflowIsolation, bc as WorkflowMeta, bd as WorkflowModelHint, bg as WorkflowOutcomeError, bh as WorkflowOutcomeResult, bi as WorkflowOutcomeStatus, bj as WorkflowOutcomeUsage, bk as WorkflowParallelOptions, bl as WorkflowProcessArtifact, bm as WorkflowProcessCounts, bn as WorkflowProcessEvent, bo as WorkflowProcessItem, bp as WorkflowProcessItemKind, bq as WorkflowProcessItemOrigin, br as WorkflowProcessItemStatus, bs as WorkflowProcessMetadata, bt as WorkflowProcessProgress, bu as WorkflowProcessSnapshot, bv as WorkflowProcessSource, bw as WorkflowProcessStatus, bx as WorkflowProcessSummaryStatus, by as WorkflowProcessTokenUsage, bz as WorkflowProcessTracker, bA as WorkflowProcessTrackerOptions, bB as WorkflowRun, bC as WorkflowRunManager, bE as WorkflowRunStatus, bF as WorkflowSpawnAgentInput, bG as WorkflowSynthesis, bH as WorkflowSynthesizeInput, bI as WorkflowTaskHandle, bK as WorkflowTaskSnapshot, bL as WorkflowTaskStatus, bM as WorkflowTaskSummaryEventUpdate, bN as WorkflowTaskSummaryKind, bO as WorkflowTaskSummaryUpdate, bP as WorkflowTaskUsage, bQ as WorkflowTaskVerification, bR as WorkflowTaskVerificationResult, bS as WorkflowWaitOptions, bT as asSingleSelection, bU as assertLearnedCapabilityTransition, bV as canTransitionLearnedCapability, bW as createWorkflowProcessTracker, bX as createWorkflowRunManager, bY as getActiveUserInteraction, bZ as getDefaultWorkflowRunManager, b_ as isAskUserCustomInputAnswer, b$ as isAskUserUnanswered, c0 as isFinalWorkflowProcessStatus, c1 as learningEventIdFor, c2 as learningEventKindForLifecycle, c3 as normalizeHostMetadata, c4 as setActiveUserInteraction, c5 as slugifyLearnedCapabilityName } from './types-chunks/types.d-BQ-hbni4.js';
16
+ export { C as CreateMemoryControlPlaneOptions, M as MemoryControlPlane, c as createMemoryControlPlane } from './types-chunks/controller.d-Btu5FDdw.js';
17
17
  import { R as ResolvedSkillSource } from './types-chunks/types.d-D8qQjMeo.js';
18
18
  export { I as ISkillRegistry, a as IVariableResolver, L as LearnedSkillDiscoveryConfig, S as Skill, b as SkillArtifact, c as SkillContext, d as SkillDynamicContextExecutor, e as SkillFile, f as SkillFrontmatter, g as SkillHook, h as SkillHooks, i as SkillMetadata, j as SkillPathsConfig, k as SkillResult, l as SkillSource, m as getDefaultSkillPaths, n as getSkillPathsFlat } from './types-chunks/types.d-D8qQjMeo.js';
19
19
  export { M as McpConnectMode, a as McpServerConfig, b as McpServersConfig, c as McpTransportKind } from './types-chunks/config.d-CJy1WENT.js';
@@ -22,9 +22,9 @@ export { A as AuthorizationServerMetadata, D as DiscoveredOAuthEndpoints, M as M
22
22
  export { createMcpTestServerFixture } from './sdk-mcp.js';
23
23
  export { D as DiscoveryResult, E as ExecutionMode, a as ExecutionOptions, S as SkillExecutor, b as SkillExpansionResult, c as SkillRegistry, V as VariableResolver, d as clearPluginSkillPaths, e as createExecutor, f as createResolver, g as discoverSkills, h as discoverSkillsWithMonorepo, i as executeSkill, j as expandSkillForLLM, k as formatSkillActivationMessage, l as formatSkillsSystemPrompt, m as getNestedSkillPaths, n as getSkillRegistry, o as initializeSkillRegistry, p as listPluginSkillPaths, q as loadFullSkill, r as loadSkillFileContent, s as loadSkillMetadata, t as parseArguments, u as parseSkillMarkdown, v as registerPluginSkillPath, w as resetSkillRegistry, x as resolveSkillContent, y as unregisterPluginSkillPath } from './types-chunks/sdk-skills-C-UA1A6I.js';
24
24
  export { K as KodaXTaskResultReport, r as readTaskResultReports } from './types-chunks/task-results.d-XMdWq0eA.js';
25
- export { K as KodaXSessionHistoryHit, a as KodaXSessionHistoryReadOptions, b as KodaXSessionHistoryReadResult, c as KodaXSessionHistoryScope, d as KodaXSessionHistorySearchOptions, e as KodaXSessionHistorySearchResult, f as KodaXSessionHistorySource, r as readSessionHistoryEntry, s as searchSessionHistory, g as searchSessionHistoryCooperatively, v as validateSessionHistorySearchQuery } from './types-chunks/history-retrieval.d-BwEUR9cb.js';
26
- import { b as WorkflowScriptManifest } from './types-chunks/manifest.d-YE3-AIeO.js';
27
- export { W as WORKFLOW_PATTERN_IDS, a as WorkflowPatternId, v as validateWorkflowScriptManifest } from './types-chunks/manifest.d-YE3-AIeO.js';
25
+ export { K as KodaXSessionHistoryHit, a as KodaXSessionHistoryReadOptions, b as KodaXSessionHistoryReadResult, c as KodaXSessionHistoryScope, d as KodaXSessionHistorySearchOptions, e as KodaXSessionHistorySearchResult, f as KodaXSessionHistorySource, r as readSessionHistoryEntry, s as searchSessionHistory, g as searchSessionHistoryCooperatively, v as validateSessionHistorySearchQuery } from './types-chunks/history-retrieval.d-B_AriUJp.js';
26
+ import { b as WorkflowScriptManifest } from './types-chunks/manifest.d-Yyce-hHj.js';
27
+ export { W as WORKFLOW_PATTERN_IDS, a as WorkflowPatternId, v as validateWorkflowScriptManifest } from './types-chunks/manifest.d-Yyce-hHj.js';
28
28
 
29
29
  declare function sessionMetadataRevision(id: string, data: Pick<KodaXSessionData, 'tag' | 'runtimeInfo'>): string;
30
30
  /** Evaluate under the Session's writer lock; promotion and its receipt commit together. */
@@ -664,6 +664,8 @@ declare function readCurrentProcessWindowsJobIdentity(): {
664
664
  readonly processStartIdentity?: string;
665
665
  readonly supervisorProcessStartIdentity?: string;
666
666
  } | undefined;
667
+ /** Observe one exact global Job. Unavailable evidence never authorizes recovery. */
668
+ declare function readWindowsJobActiveProcessCount(name: string): Promise<number | undefined>;
667
669
  declare function rememberChildProcessTree(child: ChildProcess): string | undefined;
668
670
  declare function killPidTree(pid: number, options?: ProcessTreeKillOptions): Promise<ProcessTreeKillResult>;
669
671
  declare function killPidTreeSync(pid: number): ProcessTreeKillResult;
@@ -2888,6 +2890,7 @@ interface CompactionProviderRequest {
2888
2890
  readonly modelOverride?: string;
2889
2891
  readonly ephemeralSuffix?: KodaXEphemeralSuffix;
2890
2892
  readonly promptCacheKey?: string;
2893
+ readonly maxOutputTokens?: number;
2891
2894
  }
2892
2895
  interface CompactionProviderObserver {
2893
2896
  readonly onPrepared?: (request: CompactionProviderRequest, projection: KodaXProviderRequestProjection) => void;
@@ -2899,6 +2902,8 @@ interface CompactionProviderObserver {
2899
2902
  interface CompactionProviderRouting {
2900
2903
  readonly promptCacheKey?: string;
2901
2904
  readonly reasoning?: boolean | KodaXReasoningRequest;
2905
+ /** Host capacity may be smaller than the selected summary model's window. */
2906
+ readonly contextWindow?: number;
2902
2907
  }
2903
2908
  declare function buildCompactionCacheInstruction(promptSnapshot: KodaXCompactionPromptSnapshot, protectedTailMessageCount?: number): string;
2904
2909
  declare function buildCompactionPromptSnapshot(args: {
@@ -3513,5 +3518,5 @@ declare class AgentTurnScheduler {
3513
3518
  restore(turnIds: readonly string[]): void;
3514
3519
  }
3515
3520
 
3516
- export { Agent, AgentActorStoreConflictError, AgentBudgetExhausted, AgentBudgetExhaustedError, AgentCancellationUncertainError, AgentControlError, AgentExecutionError, AgentExecutorFactory, AgentExecutorPlane, AgentExecutorPlaneInitializationError, AgentExecutorPlaneStore, AgentLimitReached, AgentLimitReachedError, AgentManifest, AgentMessage, AgentMetadataValue, AgentOwnerConflictError, AgentOwnerUnknownError, AgentRevisionConflictError, AgentSettlementPersistenceError, AgentShutdownPersistenceError, AgentStartUncertainError, AgentTurnScheduler, BUN_BE_BUN_ENV, CAPABILITY_CACHE_FILENAME, COMPACTED_HISTORY_RECOVERY_GUIDANCE, COMPACTION_PROTECTION_RATIO, COMPACTION_SUMMARY_PREFIX, CORE_INVARIANTS, CapabilityCache, CapabilityCacheSource, CompactionConfig, CompactionDetails, CompactionRequestMetrics, CompactionResult, CompactionUpdate, ConsoleTracingProcessor, CreateAgentExecutorPlaneOptions, DEFAULT_COMPACTION_TRIGGER_PERCENT, DEFAULT_CONTEXT_WINDOW, DEFAULT_IDLE_YIELD_MAX_ITERATIONS, DEFAULT_MICROCOMPACTION_CONFIG, DEFAULT_POST_COMPACT_CONFIG, DEFAULT_SUMMARY_PROMPT, DEFAULT_UPDATE_SUMMARY_PROMPT, DequeueFilter, DiscoveredInstance, ELECTRON_NODE_ENV_SCRUB_IMPORT, ELECTRON_RUN_AS_NODE_ENV, EnqueueInput, ExternalAgentProtocol, ExternalAgentRegistrationConflictError, FileExtensionStore, FileLearningCenterService, FileTracingProcessor, HARDENED_ENV_VARS, HARDENING_OPT_OUT_ENV, Handoff, ImageResizeError, InstanceDiscoveryFs, InvariantId, KODAX_FILE_MEDIA_TYPES, KODAX_IMAGE_MEDIA_TYPES, KODAX_VIDEO_MEDIA_TYPES, KodaXExtensionStore, KodaXExtensionStoreEntry, KodaXFileInputArtifact, KodaXFileLockTimeoutError, KodaXGoalEventType, KodaXGoalState, KodaXImageBlock, KodaXImageInputArtifact, KodaXImageMediaType, KodaXInputArtifact, KodaXInputArtifactSource, KodaXJsonValue, KodaXMediaError, KodaXMemoryOutcomeDigest, KodaXMessage, KodaXProviderStreamOptions, KodaXReasoningRequest, KodaXSessionArtifactLedgerEntry, KodaXSessionData, KodaXSessionEntry, KodaXSessionGoalEntry, KodaXSessionLineage, KodaXSessionPromotionRecord, KodaXSessionStorage, KodaXTokenUsage, KodaXToolDefinition, KodaXToolUseBlock, KodaXVideoInputArtifact, KodaXVideoMediaType, LearnedAreaStore, LearnedCapabilityRecord, LearnedCapabilityScope, LearningActionDriver, LearningEvent, LearningExplicitUserAuthority, LearningPage, LearningQuery, LearningSubscribeOptions, LearningSurfaceSnapshot, MAX_COMPACTION_TRIGGER_PERCENT, MAX_DIMENSION, MAX_ENTRYPOINT_BYTES, MAX_ENTRYPOINT_LINES, MAX_SKILL_MD_BYTES, MAX_SKILL_SUPPORT_FILE_BYTES, MEMORY_POLICY_VERSION, MIN_COMPACTION_TRIGGER_PERCENT, ManifestPatch, MemoryActionProposal, MemoryApplicability, MemoryContextIdentity, MemoryItemRef, MessagePriority, MessageQueue, PASTE_TMP_DIR_ENV, PASTE_TMP_TTL_MS, POST_COMPACT_MAX_TOKENS_PER_FILE, POST_COMPACT_TOKEN_BUDGET, PROTECTED_TOOL_NAMES, QualityInvariant, QueuedInputArtifact, QueuedInputArtifactError, QueuedMessage, ResolvedSkillSource, RunnerToolCall, RunnerToolResult, SessionMeta, SessionStateSnapshot, Span, StateWriter, StateWriterFs, StopHookContext, StopHookFn, StopHookResult, TARGET_RAW_SIZE_BYTES, Trace, WindowsManagedProcessStartError, WorkflowAbortError, WorkflowAgentBackend, WorkflowApi, WorkflowBudgetError, WorkflowEvent, WorkflowLimitError, WorkflowLimits, WorkflowLogEvent, WorkflowModule, WorkflowOutcome, WorkflowRunState, WorkflowScriptExecutionError, WorkflowScriptManifest, WorkflowTaskFailedError, WorkflowTaskResult, YIELD_TOOL_NAMES, _emitSpanEnd, _emitSpanStart, _emitTraceEnd, _getRegisteredProcessors, _resetAdmissionMetrics, _resetInvariantRegistry, _resetMessageQueueForTests, acquireLearningFileLock as acquireKodaXFileLock, addTracingProcessor, appendGoalEntry, appendMemoryClientNotice, appendMemoryOutcomeDigest, appendMemoryReviewReceipt, applyManifestPatch, applyProcessHardening, applySkillLearningProposal, approveStoredLearningProposal, assertNoGitInstallPrompt, assertNoGitInstallPromptSync, bootstrapTeamMode, buildCompactionCacheInstruction, buildCompactionPromptSnapshot, buildFileContentMessages, buildOtherInstancesPromptBlock, buildPostCompactAttachments, buildRecoverySeed, buildWorkflowOutcome, canMarkCreatedByAgent, clearCapabilityCache, collectUserQueryLedger, compact, composeIdleYieldUserMessage, composePatches, computeSkillConsumerImpact, containWindowsEffectProcess, countLastAssistantToolCalls, createAgentExecutorPlane, createExtensionStore, createFileArtifactFromPath, createImageArtifactFromPath, createLearnedSkillActionDriver, createLearningCenterService, createLegacyToolPairingLookup, createLlmJudgedStopHook, createMemoryAgentExecutorPlaneStore, createReferenceAgentExecutorFactory, createRestrictedWorkflowModule, createRuntimeDeliveryPredicate, createVideoArtifactFromPath, createWorkflowRuntime, decideSkillGovernance, detectHandoffSignal, detectIdleYield, dispatchSkillCreatorTool, editDistance, emitHandoffSpan, emitKodaXDiagnostic, enqueueWithArtifacts, evidenceTrail, finalOwner, findFuzzyToolMatch, findLegacyToolPairingRestorations, formatKodaXDiagnostic, generateSummary, getActiveMcpCallContext, getActiveMemoryOutcomeReviewIds, getActiveTeamModeWriter, getAdmissionMetricsSnapshot, getCachedRejectedEfforts, getCapabilityCacheFile, getInvariant, getLearnedExtensionToolName, getMessageQueue, getModelInputCapabilities, getProviderReasoningCacheOptions, gracefulCompactDegradation, handoffLegality, hashCwd, inferImageMediaType, inferVideoMediaType, injectPostCompactAttachments, invokeLlmJudge, isAdmissionDebugEnabled, isAutoManagedMemoryFile, isChildProcessExited, isCurrentProcessWindowsJobContained, isEmptyLikeSummary, isGoalEntry, isIdleYieldEnabled, isLearnedExtensionCommandAllowed, isSkillCreatorDispatchAction, killChildProcessTree, killChildProcessTreeSync, killPidTree, killPidTreeSync, listRegisteredInvariants, loadCapabilityCache, maybeDrainMidTurn, memoryMutationHandle, memoryProposalRevision, mergeUserQueryLedger, microcompact, midTurnDrainPriority, migrateLegacyLearnedSkillsForProject, needsCompaction, normalizeCompactionConfig, normalizePastedImage, normalizeRecoveryPrompt, normalizeWorkflowLimits, parseMemoryFile, parseMemoryType, parseMemoryTypeFromFilename, parseScalarFields, parseUserQueryLedger, persistCompactedSessionHistory, persistImageAsBlock, prepareInternalNodeLaunch, prepareJavaScriptChildLaunch, prepareWindowsManagedProcess, projectLearningProposals, promoteSessionMetadata, prunePasteTmpDir, readAndNormalizeClipboardImage, readClipboardImage, readCurrentProcessWindowsJobIdentity, readLatestGoalFromBranch, readLatestGoalState, readLearningProposalStore, readProcessStartIdentities, readProcessStartIdentity, readSkillTrustLedger, readSkillUsageLedger, reclaimStaleLearningFileLock as reclaimStaleKodaXFileLock, recordCompletedTurnLearning, recordProceduralLearning, recordRejectedEffort, recordSkillUsage, registerCoreInvariants, registerInvariant, rememberChildProcessTree, renderUserQueryLedger, replaceSystemMessage, resetCapabilityCacheMemoForTesting, resolveCompactionPolicy, resolveContextWindow, resolveEffectiveInvariants, resolveLearningProposalStore, resolveMemoryEntrypoint, resolveMemoryRoot, resolveRequiredInvariants, resolveScopedMemoryRoot, resolveSkillSnapshotLocation, resolveSkillTrustLedger, resolveSkillUsageLedger, retryContextPersistence, runFanOut, runRestrictedWorkflowScript, runWithIdleYield, runWithMcpCallContext, runWorkflow, sanitizeProjectKey, sanitizePromptSafeMemoryClaim, serializeConversation, sessionMetadataRevision, setActiveTeamModeWriter, setKodaXDiagnosticSink, setTracingProcessors, shouldCompact, shutdownTracing, stripHardenedEnvVars, terminateWindowsEffectJob, triageProceduralLearning, truncateEntrypointContent, tryAcquireStorageFileLock, tryGitRemote, updateActiveTeamMode, updateLearningProposalStatus, updateSkillTrustLedger, upsertLearningProposal, validateExtensionStoreSnapshot, validateInputArtifactsForModel, validateRestrictedWorkflowSource, waitForChildProcessExit, waitForWakeEvent, windowsSandboxSidHasActiveProcesses, windowsSandboxSidHasOtherProcesses, withLearningFileLock as withKodaXFileLock, withStorageFileLock };
3521
+ export { Agent, AgentActorStoreConflictError, AgentBudgetExhausted, AgentBudgetExhaustedError, AgentCancellationUncertainError, AgentControlError, AgentExecutionError, AgentExecutorFactory, AgentExecutorPlane, AgentExecutorPlaneInitializationError, AgentExecutorPlaneStore, AgentLimitReached, AgentLimitReachedError, AgentManifest, AgentMessage, AgentMetadataValue, AgentOwnerConflictError, AgentOwnerUnknownError, AgentRevisionConflictError, AgentSettlementPersistenceError, AgentShutdownPersistenceError, AgentStartUncertainError, AgentTurnScheduler, BUN_BE_BUN_ENV, CAPABILITY_CACHE_FILENAME, COMPACTED_HISTORY_RECOVERY_GUIDANCE, COMPACTION_PROTECTION_RATIO, COMPACTION_SUMMARY_PREFIX, CORE_INVARIANTS, CapabilityCache, CapabilityCacheSource, CompactionConfig, CompactionDetails, CompactionRequestMetrics, CompactionResult, CompactionUpdate, ConsoleTracingProcessor, CreateAgentExecutorPlaneOptions, DEFAULT_COMPACTION_TRIGGER_PERCENT, DEFAULT_CONTEXT_WINDOW, DEFAULT_IDLE_YIELD_MAX_ITERATIONS, DEFAULT_MICROCOMPACTION_CONFIG, DEFAULT_POST_COMPACT_CONFIG, DEFAULT_SUMMARY_PROMPT, DEFAULT_UPDATE_SUMMARY_PROMPT, DequeueFilter, DiscoveredInstance, ELECTRON_NODE_ENV_SCRUB_IMPORT, ELECTRON_RUN_AS_NODE_ENV, EnqueueInput, ExternalAgentProtocol, ExternalAgentRegistrationConflictError, FileExtensionStore, FileLearningCenterService, FileTracingProcessor, HARDENED_ENV_VARS, HARDENING_OPT_OUT_ENV, Handoff, ImageResizeError, InstanceDiscoveryFs, InvariantId, KODAX_FILE_MEDIA_TYPES, KODAX_IMAGE_MEDIA_TYPES, KODAX_VIDEO_MEDIA_TYPES, KodaXExtensionStore, KodaXExtensionStoreEntry, KodaXFileInputArtifact, KodaXFileLockTimeoutError, KodaXGoalEventType, KodaXGoalState, KodaXImageBlock, KodaXImageInputArtifact, KodaXImageMediaType, KodaXInputArtifact, KodaXInputArtifactSource, KodaXJsonValue, KodaXMediaError, KodaXMemoryOutcomeDigest, KodaXMessage, KodaXProviderStreamOptions, KodaXReasoningRequest, KodaXSessionArtifactLedgerEntry, KodaXSessionData, KodaXSessionEntry, KodaXSessionGoalEntry, KodaXSessionLineage, KodaXSessionPromotionRecord, KodaXSessionStorage, KodaXTokenUsage, KodaXToolDefinition, KodaXToolUseBlock, KodaXVideoInputArtifact, KodaXVideoMediaType, LearnedAreaStore, LearnedCapabilityRecord, LearnedCapabilityScope, LearningActionDriver, LearningEvent, LearningExplicitUserAuthority, LearningPage, LearningQuery, LearningSubscribeOptions, LearningSurfaceSnapshot, MAX_COMPACTION_TRIGGER_PERCENT, MAX_DIMENSION, MAX_ENTRYPOINT_BYTES, MAX_ENTRYPOINT_LINES, MAX_SKILL_MD_BYTES, MAX_SKILL_SUPPORT_FILE_BYTES, MEMORY_POLICY_VERSION, MIN_COMPACTION_TRIGGER_PERCENT, ManifestPatch, MemoryActionProposal, MemoryApplicability, MemoryContextIdentity, MemoryItemRef, MessagePriority, MessageQueue, PASTE_TMP_DIR_ENV, PASTE_TMP_TTL_MS, POST_COMPACT_MAX_TOKENS_PER_FILE, POST_COMPACT_TOKEN_BUDGET, PROTECTED_TOOL_NAMES, QualityInvariant, QueuedInputArtifact, QueuedInputArtifactError, QueuedMessage, ResolvedSkillSource, RunnerToolCall, RunnerToolResult, SessionMeta, SessionStateSnapshot, Span, StateWriter, StateWriterFs, StopHookContext, StopHookFn, StopHookResult, TARGET_RAW_SIZE_BYTES, Trace, WindowsManagedProcessStartError, WorkflowAbortError, WorkflowAgentBackend, WorkflowApi, WorkflowBudgetError, WorkflowEvent, WorkflowLimitError, WorkflowLimits, WorkflowLogEvent, WorkflowModule, WorkflowOutcome, WorkflowRunState, WorkflowScriptExecutionError, WorkflowScriptManifest, WorkflowTaskFailedError, WorkflowTaskResult, YIELD_TOOL_NAMES, _emitSpanEnd, _emitSpanStart, _emitTraceEnd, _getRegisteredProcessors, _resetAdmissionMetrics, _resetInvariantRegistry, _resetMessageQueueForTests, acquireLearningFileLock as acquireKodaXFileLock, addTracingProcessor, appendGoalEntry, appendMemoryClientNotice, appendMemoryOutcomeDigest, appendMemoryReviewReceipt, applyManifestPatch, applyProcessHardening, applySkillLearningProposal, approveStoredLearningProposal, assertNoGitInstallPrompt, assertNoGitInstallPromptSync, bootstrapTeamMode, buildCompactionCacheInstruction, buildCompactionPromptSnapshot, buildFileContentMessages, buildOtherInstancesPromptBlock, buildPostCompactAttachments, buildRecoverySeed, buildWorkflowOutcome, canMarkCreatedByAgent, clearCapabilityCache, collectUserQueryLedger, compact, composeIdleYieldUserMessage, composePatches, computeSkillConsumerImpact, containWindowsEffectProcess, countLastAssistantToolCalls, createAgentExecutorPlane, createExtensionStore, createFileArtifactFromPath, createImageArtifactFromPath, createLearnedSkillActionDriver, createLearningCenterService, createLegacyToolPairingLookup, createLlmJudgedStopHook, createMemoryAgentExecutorPlaneStore, createReferenceAgentExecutorFactory, createRestrictedWorkflowModule, createRuntimeDeliveryPredicate, createVideoArtifactFromPath, createWorkflowRuntime, decideSkillGovernance, detectHandoffSignal, detectIdleYield, dispatchSkillCreatorTool, editDistance, emitHandoffSpan, emitKodaXDiagnostic, enqueueWithArtifacts, evidenceTrail, finalOwner, findFuzzyToolMatch, findLegacyToolPairingRestorations, formatKodaXDiagnostic, generateSummary, getActiveMcpCallContext, getActiveMemoryOutcomeReviewIds, getActiveTeamModeWriter, getAdmissionMetricsSnapshot, getCachedRejectedEfforts, getCapabilityCacheFile, getInvariant, getLearnedExtensionToolName, getMessageQueue, getModelInputCapabilities, getProviderReasoningCacheOptions, gracefulCompactDegradation, handoffLegality, hashCwd, inferImageMediaType, inferVideoMediaType, injectPostCompactAttachments, invokeLlmJudge, isAdmissionDebugEnabled, isAutoManagedMemoryFile, isChildProcessExited, isCurrentProcessWindowsJobContained, isEmptyLikeSummary, isGoalEntry, isIdleYieldEnabled, isLearnedExtensionCommandAllowed, isSkillCreatorDispatchAction, killChildProcessTree, killChildProcessTreeSync, killPidTree, killPidTreeSync, listRegisteredInvariants, loadCapabilityCache, maybeDrainMidTurn, memoryMutationHandle, memoryProposalRevision, mergeUserQueryLedger, microcompact, midTurnDrainPriority, migrateLegacyLearnedSkillsForProject, needsCompaction, normalizeCompactionConfig, normalizePastedImage, normalizeRecoveryPrompt, normalizeWorkflowLimits, parseMemoryFile, parseMemoryType, parseMemoryTypeFromFilename, parseScalarFields, parseUserQueryLedger, persistCompactedSessionHistory, persistImageAsBlock, prepareInternalNodeLaunch, prepareJavaScriptChildLaunch, prepareWindowsManagedProcess, projectLearningProposals, promoteSessionMetadata, prunePasteTmpDir, readAndNormalizeClipboardImage, readClipboardImage, readCurrentProcessWindowsJobIdentity, readLatestGoalFromBranch, readLatestGoalState, readLearningProposalStore, readProcessStartIdentities, readProcessStartIdentity, readSkillTrustLedger, readSkillUsageLedger, readWindowsJobActiveProcessCount, reclaimStaleLearningFileLock as reclaimStaleKodaXFileLock, recordCompletedTurnLearning, recordProceduralLearning, recordRejectedEffort, recordSkillUsage, registerCoreInvariants, registerInvariant, rememberChildProcessTree, renderUserQueryLedger, replaceSystemMessage, resetCapabilityCacheMemoForTesting, resolveCompactionPolicy, resolveContextWindow, resolveEffectiveInvariants, resolveLearningProposalStore, resolveMemoryEntrypoint, resolveMemoryRoot, resolveRequiredInvariants, resolveScopedMemoryRoot, resolveSkillSnapshotLocation, resolveSkillTrustLedger, resolveSkillUsageLedger, retryContextPersistence, runFanOut, runRestrictedWorkflowScript, runWithIdleYield, runWithMcpCallContext, runWorkflow, sanitizeProjectKey, sanitizePromptSafeMemoryClaim, serializeConversation, sessionMetadataRevision, setActiveTeamModeWriter, setKodaXDiagnosticSink, setTracingProcessors, shouldCompact, shutdownTracing, stripHardenedEnvVars, terminateWindowsEffectJob, triageProceduralLearning, truncateEntrypointContent, tryAcquireStorageFileLock, tryGitRemote, updateActiveTeamMode, updateLearningProposalStatus, updateSkillTrustLedger, upsertLearningProposal, validateExtensionStoreSnapshot, validateInputArtifactsForModel, validateRestrictedWorkflowSource, waitForChildProcessExit, waitForWakeEvent, windowsSandboxSidHasActiveProcesses, windowsSandboxSidHasOtherProcesses, withLearningFileLock as withKodaXFileLock, withStorageFileLock };
3517
3522
  export type { AdmissionMetricsSnapshot, AgentControlErrorCode, ApproveStoredLearningProposalOptions, BuildWorkflowOutcomeInput, CompactionCacheContext, CompactionProviderObserver, CompactionProviderRequest, CompactionProviderRouting, CompactionTriggerSource, CompletedTurnLearningCandidate, CompletedTurnLearningInput, CompletedTurnLearningRecordResult, ConsoleTracingProcessorOptions, CreateFileArtifactFromPathOptions, CreateImageArtifactFromPathOptions, CreateLearnedSkillActionDriverOptions, CreateLearningCenterServiceOptions, CreateLlmJudgedStopHookOptions, CreateVideoArtifactFromPathOptions, CreateWorkflowRuntimeOptions, DiscardedLearningReport, DurableMemoryScope, EnqueueWithArtifactsInput, EntrypointTruncation, EnvelopeAggregateCapacityContext, EnvelopeAggregateEnforcer, FanOutOutcome, FanOutProgressEvent, FileTracingProcessorOptions, GetModelInputCapabilitiesInput, GitInstallPromptOptions, GovernedSkillSource, GracefulCompactionCapacity, HandoffSignal, IdleYieldSnapshot, InternalNodeLaunch, InvokeLlmJudgeOptions, JavaScriptChildLaunch, KodaXCompactionPromptSection, KodaXCompactionPromptSnapshot, KodaXCompactionPromptVariant, KodaXDiagnostic, KodaXDiagnosticLevel, KodaXDiagnosticSink, KodaXInputCapabilityStatus, KodaXMediaErrorCode, KodaXMediaErrorOptions, KodaXModalityInputCapability, LearningCandidate, LearningCenterService, LearningIntakeRecordResult, LearningProposalProjection, LearningProposalReviewStatus, LearningProposalStoreReadResult, LearningRisk, LearningUserLabel, LegacyLearnedSkillMigrationResult, LegacyToolPairingLookup, LegacyToolPairingRestoration, LlmJudgeFailureReason, MaybeDrainMidTurnInput, MemoryExecutionContext, MemoryFrontmatter, MemoryHandoffMetadata, MemoryLearningHandoff, MemoryType, MemoryWriteOrigin, MicrocompactionConfig, ModelInputCapabilities, NormalizeImageOptions, NormalizedImage, ParsedMemoryFile, PersistCompactedSessionHistoryInput, PersistImageAsBlockOptions, PostCompactAttachments, PostCompactConfig, PrepareInternalNodeLaunchOptions, PrepareJavaScriptChildLaunchOptions, ProceduralLearningDestination, ProceduralLearningInput, ProceduralLearningResult, ProcessTreeKillOptions, ProcessTreeKillResult, ProcessTreeKillStatus, ReasoningLearningHandoff, RecordProceduralLearningInput, RecoverySeed, RecoverySeedInput, ReferenceAgentExecutorFactoryOptions, RenderOptions, ResolvedCompactionPolicy, RestrictedWorkflowModuleInput, ReviewableLearningProposal, RunFanOutOptions, RunFanOutResult, RunRestrictedWorkflowScriptOptions, RunWithIdleYieldOptions, RunWithIdleYieldRunResult, ShouldCompactInput, SkillConsumerImpact, SkillConsumerImpactScanInput, SkillGovernanceAction, SkillGovernanceDecision, SkillGovernanceInput, SkillGovernanceMode, SkillLearningApplyInput, SkillLearningProposal, SkillMutationApplyResult, SkillMutationChange, SkillOwnership, SkillSnapshotLocation, SkillTrustLedgerReadResult, SkillTrustRecord, SkillTrustState, SkillTrustUpdateInput, SkillTrustUpdateResult, SkillUsageEvent, SkillUsageEventInput, SkillUsageLedgerReadResult, SkillUsageRecord, SkillUsageRecordResult, SkillWriteOrigin, StorageFileLock, StoredLearningApplyPlan, StoredLearningApprovalResult, StoredLearningProposal, StoredSkillLearningApplyPlan, TeamModeBootstrapOptions, TeamModeHandle, TraceOnlyLearningReport, TracingProcessor, UserQueryLedgerEntry, ValidateInputArtifactsOptions, ValidateRestrictedWorkflowSourceOptions, WaitForWakeEventOptions, WakeEvent, WindowsEffectJob, WindowsManagedProcessInput, WindowsSandboxSidProbeLauncher, WorkflowLearningHandoff, WorkflowLearningSuggestedAction, WorkflowModuleResolver, WorkflowResultCache, WorkflowRunOutcome, WorkflowRuntimeHandle };
package/dist/sdk-agent.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // @kodax-ai/kodax — bundled distribution. See docs/ADR.md ADR-022 + ADR-024.
2
- import{$ as bo,$a as gr,$c as Wp,$d as Wt,$e as Wx,A as G,Aa as Lo,Ab as De,Ac as up,Ad as ut,Ae as ux,B as H,Ba as Mo,Bb as Ee,Bc as vp,Bd as vt,Be as vx,C as M,Ca as No,Cb as Fe,Cc as wp,Cd as wt,Ce as wx,D as N,Da as Oo,Db as Ge,Dc as yp,Dd as yt,De as yx,E as O,Ea as Po,Eb as He,Ec as zp,Ed as zt,Ee as zx,F as P,Fa as Qo,Fb as Ie,Fc as Ap,Fd as At,Fe as Ax,G as Q,Ga as Ro,Gb as Je,Gc as Bp,Gd as Bt,Ge as Bx,H as R,Ha as So,Hb as Ke,Hc as Cp,Hd as Ct,He as Cx,I as S,Ia as To,Ib as Le,Ic as Dp,Id as Dt,Ie as Dx,J as T,Ja as Uo,Jb as Me,Jc as Ep,Jd as Et,Je as Ex,K as U,Ka as Vo,Kb as Ne,Kc as Fp,Kd as Ft,Ke as Fx,L as V,La as Wo,Lb as Oe,Lc as Gp,Ld as Gt,Le as Gx,M as W,Ma as Xo,Mb as Pe,Mc as Hp,Md as Ht,Me as Hx,N as X,Na as Yo,Nb as Qe,Nc as Ip,Nd as It,Ne as Ix,O as Y,Oa as Zo,Ob as Re,Oc as Jp,Od as Jt,Oe as Jx,P as Z,Pa as _o,Pb as Se,Pc as Kp,Pd as Kt,Pe as Kx,Q as _,Qa as $o,Qb as Te,Qc as Lp,Qd as Lt,Qe as Lx,R as $,Ra as or,Rb as Xe,Rc as Mp,Rd as Mt,Re as Mx,S as oo,Sa as rr,Sb as mf,Sc as Np,Sd as Nt,Se as Nx,T as ro,Ta as er,Tb as pf,Tc as Op,Td as Ot,Te as Ox,U as eo,Ua as fr,Ub as tf,Uc as Pp,Ud as Pt,Ue as Px,V as fo,Va as mr,Vb as xf,Vc as Qp,Vd as Qt,Ve as Qx,W as mo,Wa as pr,Wb as af,Wc as Rp,Wd as Rt,We as Rx,X as po,Xa as ar,Xb as bf,Xc as Sp,Xd as St,Xe as Sx,Y as to,Ya as br,Yb as cf,Yc as Tp,Yd as Tt,Ye as Tx,Z as xo,Za as cr,Zb as Vm,Zc as Up,Zd as Ut,Ze as Ux,_ as ao,_a as dr,_b as Wm,_c as Vp,_d as Vt,_e as Vx,a as o,aa as co,ab as hr,ac as Xm,ad as Xp,ae as Xt,af as Xx,b as r,ba as go,bb as ir,bc as Ym,bd as Yp,be as Yt,bf as Yx,c as e,ca as ho,cb as jr,cc as Zm,cd as Zp,ce as Zt,cf as Zx,d as f,da as io,db as kr,dc as _m,dd as _p,de as _t,df as _x,e as c,ea as jo,eb as Cr,ec as $m,ed as $p,ee as $t,ef as $x,f as d,fa as ko,fb as Dr,fc as op,fd as ot,fe as ox,ff as oa,g,ga as lo,gb as Er,gc as rp,gd as rt,ge as rx,gf as ra,h,ha as no,hb as Fr,hc as ep,hd as et,he as ex,hf as ea,i,ia as qo,ib as Gr,ic as fp,id as ft,ie as fx,if as fa,j,ja as so,jb as Hr,jc as mp,jd as mt,je as mx,jf as ma,k,ka as uo,kb as Ir,kc as pp,kd as pt,ke as px,kf as pa,l,la as vo,lb as Jr,lc as tp,ld as tt,le as tx,lf as ta,m as n,ma as wo,mb as Kr,mc as xp,md as xt,me as xx,mf as xa,n as q,na as yo,nb as Lr,nc as ap,nd as at,ne as ax,nf as aa,o as s,oa as zo,ob as Mr,oc as bp,od as bt,oe as bx,of as ba,p as u,pa as Ao,pb as Nr,pc as cp,pd as ct,pe as cx,pf as ca,q as v,qa as Bo,qb as Or,qc as dp,qd as dt,qe as dx,qf as da,r as w,ra as Co,rb as Pr,rc as gp,rd as gt,re as gx,rf as ga,s as y,sa as Do,sb as Qr,sc as hp,sd as ht,se as hx,t as z,ta as Eo,tb as Rr,tc as ip,td as it,te as ix,u as A,ua as Fo,ub as Sr,uc as jp,ud as jt,ue as jx,v as B,va as Go,vb as ye,vc as kp,vd as kt,ve as kx,w as C,wa as Ho,wb as ze,wc as lp,wd as lt,we as lx,x as D,xa as Io,xb as Ae,xc as np,xd as nt,xe as nx,y as E,ya as Jo,yb as Be,yc as qp,yd as qt,ye as qx,z as F,za as Ko,zb as Ce,zc as sp,zd as st,ze as sx}from"./chunks/chunk-2HH5AS7E.js";import{$ as sf,$a as sm,Aa as Vf,B as yr,Ba as Wf,C as zr,Ca as Xf,D as Ar,Da as Yf,E as Br,Ea as Zf,F as Ue,Fa as _f,G as Ve,Ga as $f,H as We,Ha as om,I as Ye,Ia as rm,J as Ze,Ja as em,K as _e,Ka as fm,L as $e,La as mm,M as of,Ma as pm,N as rf,Na as tm,O as ef,Oa as xm,P as ff,Pa as am,Q as df,Qa as bm,R as gf,Ra as cm,S as hf,Sa as dm,T as jf,Ta as gm,U as kf,Ua as hm,V as lf,Va as im,Wa as jm,Xa as km,Ya as lm,Z as nf,Za as nm,_ as qf,_a as qm,a as m,aa as uf,ab as um,b as p,ba as vf,bb as vm,c as t,ca as wf,cb as wm,d as x,da as yf,db as ym,e as a,ea as zf,eb as zm,f as b,fa as Af,fb as Am,g as J,ga as Bf,gb as Bm,h as K,ha as Cf,hb as Cm,i as L,ia as Df,ib as Dm,j as tr,ja as Ef,jb as Em,k as xr,ka as Ff,kb as Fm,l as lr,la as Gf,lb as Gm,m as nr,ma as Hf,mb as Hm,na as If,nb as Im,o as qr,oa as Jf,ob as Jm,p as sr,pa as Kf,pb as Km,q as ur,qa as Lf,qb as Lm,r as vr,ra as Mf,rb as Mm,sa as Nf,sb as Nm,ta as Of,tb as Om,ua as Pf,ub as Pm,va as Qf,vb as Qm,w as wr,wa as Rf,wb as Rm,xa as Sf,xb as Sm,ya as Tf,yb as Tm,za as Uf,zb as Um}from"./chunks/chunk-J2L2NK6E.js";import{A as le,B as ne,C as qe,D as se,E as ue,F as ve,G as we,a as Tr,b as Ur,c as Vr,d as Wr,e as Xr,f as Yr,g as Zr,h as _r,i as $r,j as oe,k as re,l as ee,m as fe,n as me,o as pe,p as te,q as xe,r as ae,s as be,t as ce,u as de,v as ge,w as he,x as ie,y as je,z as ke}from"./chunks/chunk-KDSO7V4O.js";import"./chunks/chunk-SK3RRGHJ.js";import"./chunks/chunk-WMMESRP3.js";import"./chunks/chunk-QP47JIWP.js";import"./chunks/chunk-52EN2777.js";import"./chunks/chunk-UF3GZ5PO.js";import{$ as I}from"./chunks/chunk-KE2NBMAP.js";import"./chunks/chunk-V5RCDBKU.js";import"./chunks/chunk-KDLOPBFZ.js";import"./chunks/chunk-V4WSBIXB.js";export{Nr as ASK_USER_BACK_SIGNAL,Or as ASK_USER_CUSTOM_INPUT_SIGNAL,da as AgentActorController,ma as AgentActorStoreConflictError,ea as AgentBudgetExhaustedError,Xx as AgentCancellationUncertainError,ba as AgentControlError,oa as AgentExecutionError,Zx as AgentExecutorPlaneInitializationError,ra as AgentLimitReachedError,pa as AgentOwnerConflictError,ta as AgentOwnerUnknownError,fa as AgentRevisionConflictError,xa as AgentSettlementPersistenceError,aa as AgentShutdownPersistenceError,Wx as AgentStartUncertainError,ca as AgentTurnScheduler,dr as BUN_BE_BUN_ENV,_o as CAPABILITY_CACHE_FILENAME,qt as COMPACTED_HISTORY_RECOVERY_GUIDANCE,ct as COMPACTION_PROTECTION_RATIO,nt as COMPACTION_SUMMARY_PREFIX,z as CONTEXT_SAFETY_FLOOR_TOKENS,A as CONTEXT_SAFETY_RATIO,Yo as CORE_INVARIANTS,oo as ConsoleTracingProcessor,C as ContextCapacityError,xt as DEFAULT_COMPACTION_TRIGGER_PERCENT,kx as DEFAULT_CONTEXT_WINDOW,Ee as DEFAULT_IDLE_YIELD_MAX_ITERATIONS,cx as DEFAULT_MICROCOMPACTION_CONFIG,zt as DEFAULT_POST_COMPACT_CONFIG,et as DEFAULT_SUMMARY_PROMPT,io as DEFAULT_SYSTEM_CAP,ft as DEFAULT_UPDATE_SUMMARY_PROMPT,Q as DefaultSummaryCompaction,gr as ELECTRON_NODE_ENV_SCRUB_IMPORT,cr as ELECTRON_RUN_AS_NODE_ENV,$m as EpisodeReviewBranchChangedError,_m as EpisodeReviewFailure,Yx as ExternalAgentRegistrationConflictError,d as FileExtensionStore,fm as FileLearningCenterService,ro as FileTracingProcessor,B as GenerationSuspensionError,Co as GuardrailBlockedError,Do as GuardrailEscalateError,ar as HARDENED_ENV_VARS,br as HARDENING_OPT_OUT_ENV,fe as ImageResizeError,so as InvariantSession,u as KODAX_API_MIN_INTERVAL,i as KODAX_DEFAULT_TIMEOUT,se as KODAX_FILE_MEDIA_TYPES,j as KODAX_HARD_TIMEOUT,ne as KODAX_IMAGE_MEDIA_TYPES,n as KODAX_MAX_INCOMPLETE_RETRIES,q as KODAX_MAX_MAXTOKENS_RETRIES,k as KODAX_MAX_RETRIES,h as KODAX_MAX_TOKENS,l as KODAX_RETRY_BASE_DELAY,s as KODAX_STAGGER_DELAY,qe as KODAX_VIDEO_MEDIA_TYPES,Cf as KodaXFileLockTimeoutError,ee as KodaXMediaError,Vp as LINEAGE_ENTRY_TYPES,om as LearnedAreaStore,Vf as LearningCapabilityError,Yp as LineageCompaction,Wp as LineageExtension,bt as MAX_COMPACTION_TRIGGER_PERCENT,be as MAX_DIMENSION,af as MAX_ENTRYPOINT_BYTES,xf as MAX_ENTRYPOINT_LINES,zf as MAX_SKILL_MD_BYTES,Af as MAX_SKILL_SUPPORT_FILE_BYTES,vo as MAX_TOOL_LOOP_ITERATIONS,Xe as MEMORY_POLICY_VERSION,at as MIN_COMPACTION_TRIGGER_PERCENT,Ep as McpAuthRequiredError,Rp as McpCapabilityProvider,Dp as McpExpiredSessionError,Sp as McpManager,Qp as McpServerRuntime,Fp as McpTransportCleanupIncompleteError,Zm as MemoryControlPlane,Tr as MessageQueue,ie as PASTE_TMP_DIR_ENV,je as PASTE_TMP_TTL_MS,yt as POST_COMPACT_MAX_TOKENS_PER_FILE,wt as POST_COMPACT_TOKEN_BUDGET,v as PROMISE_PATTERN,lt as PROTECTED_TOOL_NAMES,ye as QueuedInputArtifactError,G as RESERVE_SHRINK_FLOOR_TOKENS,To as Runner,Oo as RunnerIterationLimitError,Om as SkillExecutor,Km as SkillRegistry,R as SpanImpl,ce as TARGET_RAW_SIZE_BYTES,_ as Tracer,Gm as VariableResolver,Ox as WORKFLOW_CAPSULE_API_VERSION,Mx as WORKFLOW_CAPSULE_FORMAT,Nx as WORKFLOW_CAPSULE_VERSION,wx as WORKFLOW_PATTERN_IDS,Kr as WindowsManagedProcessStartError,Bx as WorkflowAbortError,Dx as WorkflowBudgetError,qx as WorkflowEventRecorder,Cx as WorkflowLimitError,Ix as WorkflowScriptExecutionError,Ex as WorkflowTaskFailedError,_r as YIELD_TOOL_NAMES,X as _emitSpanEnd,W as _emitSpanStart,Y as _emitTraceEnd,V as _getRegisteredProcessors,Zr as _resetActiveRootQueueRoutesForTests,go as _resetAdmissionMetrics,qo as _resetAdmittedAgentBindings,xo as _resetInvariantRegistry,Vr as _resetMessageQueueForTests,Ro as _resetPresetDispatchers,Ef as acquireKodaXFileLock,Wr as actorQueueId,T as addTracingProcessor,wm as admitAndRecordLearnedSkillInvocation,im as admitLearnedSkillBinding,ax as appendGoalEntry,Yt as appendMemoryClientNotice,Vt as appendMemoryOutcomeDigest,Wt as appendMemoryReviewReceipt,Lt as appendSessionLineageLabel,Nt as applyLineageTruncation,eo as applyManifestPatch,hr as applyProcessHardening,Mt as applySessionCompaction,Kf as applySkillLearningProposal,Lf as approveStoredLearningProposal,Ut as archiveOldIslands,Qr as asSingleSelection,Xf as assertLearnedCapabilityTransition,tr as assertNoGitInstallPrompt,xr as assertNoGitInstallPromptSync,Ax as assertRestrictedWorkflowQuality,Mo as attachRunnerRecoveryTranscript,Ne as bootstrapTeamMode,Ao as buildAssistantMessageFromLlmResult,mt as buildCompactionCacheInstruction,pt as buildCompactionPromptSnapshot,Ct as buildFileContentMessages,Pp as buildInitializeCapabilities,Je as buildOtherInstancesPromptBlock,At as buildPostCompactAttachments,hx as buildRecoverySeed,St as buildSessionTree,So as buildSystemPrompt,Bo as buildToolResultMessage,Sx as buildWorkflowCapsuleIntent,nx as buildWorkflowOutcome,D as calculateContextSafetyMargin,F as calculateMaxContextInputTokens,wf as canMarkCreatedByAgent,Wf as canTransitionLearnedCapability,op as captureEpisodeReviewBranchEpoch,ep as claimEpisodeReview,Pe as cleanupIncompleteToolCalls,Cr as cleanupManagedRunChildProcess,Fr as cleanupRegisteredManagedChildren,mr as clearCapabilityCache,jf as clearPluginSkillPaths,Eo as collectGuardrails,ht as collectUserQueryLedger,pp as commitEpisodeReviewAction,mp as commitEpisodeReviewDecision,hm as commitLearnedSkillRevision,vt as compact,jp as completeEpisodeReview,cp as completeFencedEpisodeReview,lm as completeLearnedSkillOutcome,ym as completeLearnedSkillSessionOutcomes,De as composeIdleYieldUserMessage,fo as composePatches,Tf as computeSkillConsumerImpact,Gr as containWindowsEffectProcess,Tt as countActiveLineageMessages,Ae as countLastAssistantToolCalls,y as countTokens,N as createAgent,ga as createAgentActorController,_x as createAgentExecutorPlane,Pm as createExecutor,g as createExtensionStore,xe as createFileArtifactFromPath,O as createHandoff,te as createImageArtifactFromPath,P as createInMemorySession,uo as createInvariantSessionForAgent,am as createLearnedCapabilityScope,sm as createLearnedSkillActionDriver,gm as createLearnedSkillRecord,mm as createLearningCenterService,Dt as createLegacyToolPairingLookup,Te as createLlmJudgedStopHook,vp as createMcpCapabilityId,Tp as createMcpManager,Up as createMcpTestServerFixture,Gp as createMcpTransport,Vx as createMemoryAgentExecutorPlaneStore,Ym as createMemoryControlPlane,$x as createReferenceAgentExecutorFactory,Hm as createResolver,Lx as createRestrictedWorkflowModule,oe as createRuntimeDeliveryPredicate,Gt as createSessionLineage,He as createStateWriter,S as createTrace,ae as createVideoArtifactFromPath,Qx as createWorkflowCapsule,Rx as createWorkflowModuleFromCapsule,vx as createWorkflowProcessTracker,Tx as createWorkflowRunManager,Gx as createWorkflowRuntime,yf as decideSkillGovernance,up as defaultMcpCacheDir,$ as defaultTracer,bp as deferEpisodeReview,Jo as detectHandoffSignal,Be as detectIdleYield,jo as detectInstructionsInjection,dp as discardFencedEpisodeReview,Kp as discoverAuthorizationServerMetadata,Ie as discoverInstances,Lp as discoverOAuthEndpoints,Jp as discoverProtectedResourceMetadata,Cm as discoverSkills,Em as discoverSkillsWithMonorepo,Um as dispatchSkillCreatorTool,lp as drainPendingEpisodeReviews,Qe as editDistance,Lo as emitHandoffSpan,K as emitKodaXDiagnostic,we as enqueueWithArtifacts,w as estimateTokens,rm as eventFromCapability,Ot as evictOldIslandMessageContent,Vo as evidenceTrail,Bm as exactInvokedSkillSnapshotForSession,E as exceedsContextCapacity,zo as executeRunnerToolCall,Qm as executeSkill,Rm as expandSkillForLLM,$p as extractArtifactLedger,Uo as extractAssistantTextFromMessage,Zp as extractFileOps,Ip as extractInsufficientScope,Hp as extractResourceMetadataUrl,$t as extractTitleFromMessages,ap as failEpisodeReviewApply,xp as failEpisodeReviewAttempt,Wo as finalOwner,Re as findFuzzyToolMatch,Et as findLegacyToolPairingRestorations,Pt as findPreviousUserEntryId,Rt as forkSessionLineage,L as formatKodaXDiagnostic,Sm as formatSkillActivationMessage,Jm as formatSkillsSystemPrompt,fp as freezeEpisodeReviewInput,_t as generateSessionId,Zt as generateSessionIdSync,tt as generateSummary,Cp as getActiveMcpCallContext,Xt as getActiveMemoryOutcomeReviewIds,Le as getActiveTeamModeWriter,Sr as getActiveUserInteraction,co as getAdmissionMetricsSnapshot,no as getAdmittedAgentBindings,p as getAgentConfigHome,t as getAgentConfigPath,b as getAppDataDir,rr as getCachedRejectedEfforts,$o as getCapabilityCacheFile,kf as getDefaultSkillPaths,Ux as getDefaultWorkflowRunManager,po as getInvariant,pm as getLearnedExtensionToolName,Ap as getMcpCachePaths,Ur as getMessageQueue,ue as getModelInputCapabilities,Dm as getNestedSkillPaths,er as getProviderReasoningCacheOptions,Ht as getSessionLineagePath,Ft as getSessionMessageEntryId,It as getSessionMessagesFromLineage,lf as getSkillPathsFlat,Lm as getSkillRegistry,jx as gracefulCompactDegradation,Xo as handoffLegality,Ze as hashCwd,Ve as hashMemoryIdentityComponent,me as inferImageMediaType,pe as inferVideoMediaType,Mm as initializeSkillRegistry,Bt as injectPostCompactAttachments,gp as inspectEpisodeReviewJob,km as invokeLearnedSkillCanary,Se as invokeLlmJudge,ho as isAdmissionDebugEnabled,Pr as isAskUserCustomInputAnswer,Mr as isAskUserUnanswered,ef as isAutoManagedMemoryFile,lr as isChildProcessExited,ur as isCurrentProcessWindowsJobContained,st as isEmptyLikeSummary,sx as isFinalWorkflowProcessStatus,bx as isGoalEntry,ze as isIdleYieldEnabled,qm as isLearnedCapabilityRecordV2,tm as isLearnedExtensionCommandAllowed,cf as isMemoryManagementController,x as isPathInsideDirectory,wo as isRunnableTool,Po as isRunnerIterationLimitError,yo as isRunnerLlmResult,Tm as isSkillCreatorDispatchAction,qp as isUnifiedLearningReviewModelInput,Ar as killChildProcessTree,Br as killChildProcessTreeSync,yr as killPidTree,zr as killPidTreeSync,_f as learningEventIdFor,Zf as learningEventKindForLifecycle,zx as lintRestrictedWorkflowSource,Am as listLearnedSkillUsageReceipts,ip as listPendingEpisodeReviewSummaries,hp as listPendingEpisodeReviews,hf as listPluginSkillPaths,to as listRegisteredInvariants,or as loadCapabilityCache,sf as loadFullSkill,uf as loadSkillFileContent,qf as loadSkillMetadata,Op as loadValidToken,Ue as matchesMemoryApplicability,re as maybeDrainMidTurn,We as memoryApplicabilityFingerprint,Wm as memoryMutationHandle,Vm as memoryProposalRevision,ot as mergeArtifactLedger,_p as mergeFileOps,it as mergeUserQueryLedger,dx as microcompact,$r as midTurnDrainPriority,um as migrateLegacyLearnedSkillsForProject,ut as needsCompaction,M as normalizeAgentReasoningProfile,dt as normalizeCompactionConfig,ux as normalizeHostMetadata,wp as normalizeMcpCapabilityId,de as normalizePastedImage,gx as normalizeRecoveryPrompt,sp as normalizeUnifiedLearningReview,Fx as normalizeWorkflowLimits,Fm as parseArguments,yp as parseMcpCapabilityId,pf as parseMemoryFile,mf as parseMemoryType,ff as parseMemoryTypeFromFilename,tf as parseScalarFields,nf as parseSkillMarkdown,kt as parseUserQueryLedger,Np as performOAuthLogin,px as persistCompactedSessionHistory,ke as persistImageAsBlock,rp as persistPendingEpisodeReview,ir as prepareInternalNodeLaunch,jr as prepareJavaScriptChildLaunch,Lr as prepareWindowsManagedProcess,em as projectLearningProposals,r as promoteSessionMetadata,le as prunePasteTmpDir,nm as quarantineLearnedSkillRevision,he as readAndNormalizeClipboardImage,ge as readClipboardImage,vr as readCurrentProcessWindowsJobIdentity,tx as readLatestGoalFromBranch,xx as readLatestGoalState,Gf as readLearningProposalStore,qr as readProcessStartIdentities,sr as readProcessStartIdentity,No as readRunnerRecoveryTranscript,fx as readSessionHistoryEntry,Rf as readSkillTrustLedger,Pf as readSkillUsageLedger,Xp as readTaskResultReports,H as reclaimReservedResponseTokens,Ff as reclaimStaleKodaXFileLock,zm as reconcileLearnedSkillBindingOutcomes,Uf as recordCompletedTurnLearning,vm as recordLearnedSkillOffered,Mf as recordProceduralLearning,fr as recordRejectedEffort,Qf as recordSkillUsage,Xr as registerActiveRootQueueRoute,Zo as registerCoreInvariants,mo as registerInvariant,Er as registerManagedChildProcess,Mp as registerOAuthClient,df as registerPluginSkillPath,Qo as registerPresetDispatcher,jm as releaseLearnedSkillBinding,wr as rememberChildProcessTree,cm as renderDeclarativeSkill,jt as renderUserQueryLedger,Ko as replaceSystemMessage,pr as resetCapabilityCacheMemoForTesting,Nm as resetSkillRegistry,Yr as resolveActiveRootQueueRoute,gt as resolveCompactionPolicy,lx as resolveContextWindow,bo as resolveEffectiveInvariants,a as resolveExecutionPath,$f as resolveLearnedAreaPaths,If as resolveLearningProposalStore,of as resolveMemoryEntrypoint,$e as resolveMemoryRoot,xm as resolveProjectLearnedAreaRoot,ao as resolveRequiredInvariants,rf as resolveScopedMemoryRoot,Jt as resolveSessionLineageTarget,Im as resolveSkillContent,Bf as resolveSkillSnapshotLocation,Of as resolveSkillTrustLedger,Nf as resolveSkillUsageLedger,mx as retryContextPersistence,Qt as rewindSessionLineage,ko as runAdmissionAudit,Ge as runFanOut,Fo as runInputGuardrails,Go as runOutputGuardrails,Kx as runRestrictedWorkflowScript,Io as runToolAfterGuardrails,Ho as runToolBeforeGuardrails,Fe as runWithIdleYield,Bp as runWithMcpCallContext,Hx as runWorkflow,Ye as sanitizeProjectKey,Xm as sanitizePromptSafeMemoryClaim,np as sanitizeUnifiedLearningReviewInput,zp as searchMcpCatalog,ox as searchSessionHistory,ex as searchSessionHistoryCooperatively,rt as serializeConversation,o as sessionMetadataRevision,Ke as setActiveTeamModeWriter,Rr as setActiveUserInteraction,lo as setAdmittedAgentBindings,m as setAgentConfigHome,J as setKodaXDiagnosticSink,Kt as setSessionLineageActiveEntry,U as setTracingProcessors,ix as shouldCompact,Z as shutdownTracing,Yf as slugifyLearnedCapabilityName,dm as stageLearnedSkillRevision,kr as stripHardenedEnvVars,Hr as terminateWindowsEffectJob,vf as triageProceduralLearning,bf as truncateEntrypointContent,e as tryAcquireStorageFileLock,_e as tryGitRemote,gf as unregisterPluginSkillPath,Me as updateActiveTeamMode,Jf as updateLearningProposalStatus,Sf as updateSkillTrustLedger,Hf as upsertLearningProposal,Oe as validateAndFixToolHistory,bm as validateDeclarativeSkillSpec,c as validateExtensionStoreSnapshot,I as validateImageBytes,ve as validateInputArtifactsForModel,Jx as validateRestrictedWorkflowSource,rx as validateSessionHistorySearchQuery,Px as validateWorkflowCapsule,yx as validateWorkflowScriptManifest,nr as waitForChildProcessExit,Ce as waitForWakeEvent,Ir as windowsSandboxSidHasActiveProcesses,Jr as windowsSandboxSidHasOtherProcesses,tp as withEpisodeReviewClaimAuthority,Df as withKodaXFileLock,Dr as withManagedChildProcessConfigHome,kp as withPendingEpisodeReviewSessionFence,f as withStorageFileLock};
2
+ import{$ as bo,$a as gr,$c as Xp,$d as Xt,$e as Xx,A as G,Aa as Lo,Ab as Ee,Ac as vp,Ad as vt,Ae as vx,B as H,Ba as Mo,Bb as Fe,Bc as wp,Bd as wt,Be as wx,C as M,Ca as No,Cb as Ge,Cc as yp,Cd as yt,Ce as yx,D as N,Da as Oo,Db as He,Dc as zp,Dd as zt,De as zx,E as O,Ea as Po,Eb as Ie,Ec as Ap,Ed as At,Ee as Ax,F as P,Fa as Qo,Fb as Je,Fc as Bp,Fd as Bt,Fe as Bx,G as Q,Ga as Ro,Gb as Ke,Gc as Cp,Gd as Ct,Ge as Cx,H as R,Ha as So,Hb as Le,Hc as Dp,Hd as Dt,He as Dx,I as S,Ia as To,Ib as Me,Ic as Ep,Id as Et,Ie as Ex,J as T,Ja as Uo,Jb as Ne,Jc as Fp,Jd as Ft,Je as Fx,K as U,Ka as Vo,Kb as Oe,Kc as Gp,Kd as Gt,Ke as Gx,L as V,La as Wo,Lb as Pe,Lc as Hp,Ld as Ht,Le as Hx,M as W,Ma as Xo,Mb as Qe,Mc as Ip,Md as It,Me as Ix,N as X,Na as Yo,Nb as Re,Nc as Jp,Nd as Jt,Ne as Jx,O as Y,Oa as Zo,Ob as Se,Oc as Kp,Od as Kt,Oe as Kx,P as Z,Pa as _o,Pb as Te,Pc as Lp,Pd as Lt,Pe as Lx,Q as _,Qa as $o,Qb as Ue,Qc as Mp,Qd as Mt,Qe as Mx,R as $,Ra as or,Rb as Ye,Rc as Np,Rd as Nt,Re as Nx,S as oo,Sa as rr,Sb as pf,Sc as Op,Sd as Ot,Se as Ox,T as ro,Ta as er,Tb as tf,Tc as Pp,Td as Pt,Te as Px,U as eo,Ua as fr,Ub as xf,Uc as Qp,Ud as Qt,Ue as Qx,V as fo,Va as mr,Vb as af,Vc as Rp,Vd as Rt,Ve as Rx,W as mo,Wa as pr,Wb as bf,Wc as Sp,Wd as St,We as Sx,X as po,Xa as ar,Xb as cf,Xc as Tp,Xd as Tt,Xe as Tx,Y as to,Ya as br,Yb as df,Yc as Up,Yd as Ut,Ye as Ux,Z as xo,Za as cr,Zb as Wm,Zc as Vp,Zd as Vt,Ze as Vx,_ as ao,_a as dr,_b as Xm,_c as Wp,_d as Wt,_e as Wx,a as o,aa as co,ab as hr,ac as Ym,ad as Yp,ae as Yt,af as Yx,b as r,ba as go,bb as ir,bc as Zm,bd as Zp,be as Zt,bf as Zx,c as e,ca as ho,cb as jr,cc as _m,cd as _p,ce as _t,cf as _x,d as f,da as io,db as kr,dc as $m,dd as $p,de as $t,df as $x,e as c,ea as jo,eb as Dr,ec as op,ed as ot,ee as ox,ef as oa,f as d,fa as ko,fb as Er,fc as rp,fd as rt,fe as rx,ff as ra,g,ga as lo,gb as Fr,gc as ep,gd as et,ge as ex,gf as ea,h,ha as no,hb as Gr,hc as fp,hd as ft,he as fx,hf as fa,i,ia as qo,ib as Hr,ic as mp,id as mt,ie as mx,if as ma,j,ja as so,jb as Ir,jc as pp,jd as pt,je as px,jf as pa,k,ka as uo,kb as Jr,kc as tp,kd as tt,ke as tx,kf as ta,l,la as vo,lb as Kr,lc as xp,ld as xt,le as xx,lf as xa,m as n,ma as wo,mb as Lr,mc as ap,md as at,me as ax,mf as aa,n as q,na as yo,nb as Mr,nc as bp,nd as bt,ne as bx,nf as ba,o as s,oa as zo,ob as Nr,oc as cp,od as ct,oe as cx,of as ca,p as u,pa as Ao,pb as Or,pc as dp,pd as dt,pe as dx,pf as da,q as v,qa as Bo,qb as Pr,qc as gp,qd as gt,qe as gx,qf as ga,r as w,ra as Co,rb as Qr,rc as hp,rd as ht,re as hx,rf as ha,s as y,sa as Do,sb as Rr,sc as ip,sd as it,se as ix,t as z,ta as Eo,tb as Sr,tc as jp,td as jt,te as jx,u as A,ua as Fo,ub as Tr,uc as kp,ud as kt,ue as kx,v as B,va as Go,vb as ze,vc as lp,vd as lt,ve as lx,w as C,wa as Ho,wb as Ae,wc as np,wd as nt,we as nx,x as D,xa as Io,xb as Be,xc as qp,xd as qt,xe as qx,y as E,ya as Jo,yb as Ce,yc as sp,yd as st,ye as sx,z as F,za as Ko,zb as De,zc as up,zd as ut,ze as ux}from"./chunks/chunk-DAQGOWKD.js";import{$ as sf,$a as sm,Aa as Vf,Ab as Vm,Ba as Wf,C as zr,Ca as Xf,D as Ar,Da as Yf,E as Br,Ea as Zf,F as Cr,Fa as _f,G as Ve,Ga as $f,H as We,Ha as om,I as Xe,Ia as rm,J as Ze,Ja as em,K as _e,Ka as fm,L as $e,La as mm,M as of,Ma as pm,N as rf,Na as tm,O as ef,Oa as xm,P as ff,Pa as am,Q as mf,Qa as bm,R as gf,Ra as cm,S as hf,Sa as dm,T as jf,Ta as gm,U as kf,Ua as hm,V as lf,Va as im,W as nf,Wa as jm,Xa as km,Ya as lm,Za as nm,_ as qf,_a as qm,a as m,aa as uf,ab as um,b as p,ba as vf,bb as vm,c as t,ca as wf,cb as wm,d as x,da as yf,db as ym,e as a,ea as zf,eb as zm,f as b,fa as Af,fb as Am,g as J,ga as Bf,gb as Bm,h as K,ha as Cf,hb as Cm,i as L,ia as Df,ib as Dm,j as tr,ja as Ef,jb as Em,k as xr,ka as Ff,kb as Fm,l as lr,la as Gf,lb as Gm,m as nr,ma as Hf,mb as Hm,na as If,nb as Im,o as qr,oa as Jf,ob as Jm,p as sr,pa as Kf,pb as Km,q as ur,qa as Lf,qb as Lm,r as vr,ra as Mf,rb as Mm,s as wr,sa as Nf,sb as Nm,ta as Of,tb as Om,ua as Pf,ub as Pm,va as Qf,vb as Qm,wa as Rf,wb as Rm,x as yr,xa as Sf,xb as Sm,ya as Tf,yb as Tm,za as Uf,zb as Um}from"./chunks/chunk-OMVAPRQI.js";import{A as ne,B as qe,C as se,D as ue,E as ve,F as we,G as ye,a as Ur,b as Vr,c as Wr,d as Xr,e as Yr,f as Zr,g as _r,h as $r,i as oe,j as re,k as ee,l as fe,m as me,n as pe,o as te,p as xe,q as ae,r as be,s as ce,t as de,u as ge,v as he,w as ie,x as je,y as ke,z as le}from"./chunks/chunk-OC3DQXN6.js";import"./chunks/chunk-PFBZ4ZXO.js";import"./chunks/chunk-52EN2777.js";import"./chunks/chunk-6RDMSU4B.js";import"./chunks/chunk-QP47JIWP.js";import"./chunks/chunk-EZF6ZRCO.js";import{$ as I}from"./chunks/chunk-4FVCMKG2.js";import"./chunks/chunk-V5RCDBKU.js";import"./chunks/chunk-KDLOPBFZ.js";import"./chunks/chunk-V4WSBIXB.js";export{Or as ASK_USER_BACK_SIGNAL,Pr as ASK_USER_CUSTOM_INPUT_SIGNAL,ga as AgentActorController,pa as AgentActorStoreConflictError,fa as AgentBudgetExhaustedError,Yx as AgentCancellationUncertainError,ca as AgentControlError,ra as AgentExecutionError,_x as AgentExecutorPlaneInitializationError,ea as AgentLimitReachedError,ta as AgentOwnerConflictError,xa as AgentOwnerUnknownError,ma as AgentRevisionConflictError,aa as AgentSettlementPersistenceError,ba as AgentShutdownPersistenceError,Xx as AgentStartUncertainError,da as AgentTurnScheduler,dr as BUN_BE_BUN_ENV,_o as CAPABILITY_CACHE_FILENAME,st as COMPACTED_HISTORY_RECOVERY_GUIDANCE,dt as COMPACTION_PROTECTION_RATIO,qt as COMPACTION_SUMMARY_PREFIX,z as CONTEXT_SAFETY_FLOOR_TOKENS,A as CONTEXT_SAFETY_RATIO,Yo as CORE_INVARIANTS,oo as ConsoleTracingProcessor,C as ContextCapacityError,at as DEFAULT_COMPACTION_TRIGGER_PERCENT,lx as DEFAULT_CONTEXT_WINDOW,Fe as DEFAULT_IDLE_YIELD_MAX_ITERATIONS,dx as DEFAULT_MICROCOMPACTION_CONFIG,At as DEFAULT_POST_COMPACT_CONFIG,ft as DEFAULT_SUMMARY_PROMPT,io as DEFAULT_SYSTEM_CAP,mt as DEFAULT_UPDATE_SUMMARY_PROMPT,Q as DefaultSummaryCompaction,gr as ELECTRON_NODE_ENV_SCRUB_IMPORT,cr as ELECTRON_RUN_AS_NODE_ENV,op as EpisodeReviewBranchChangedError,$m as EpisodeReviewFailure,Zx as ExternalAgentRegistrationConflictError,d as FileExtensionStore,mm as FileLearningCenterService,ro as FileTracingProcessor,B as GenerationSuspensionError,Co as GuardrailBlockedError,Do as GuardrailEscalateError,ar as HARDENED_ENV_VARS,br as HARDENING_OPT_OUT_ENV,me as ImageResizeError,so as InvariantSession,u as KODAX_API_MIN_INTERVAL,i as KODAX_DEFAULT_TIMEOUT,ue as KODAX_FILE_MEDIA_TYPES,j as KODAX_HARD_TIMEOUT,qe as KODAX_IMAGE_MEDIA_TYPES,n as KODAX_MAX_INCOMPLETE_RETRIES,q as KODAX_MAX_MAXTOKENS_RETRIES,k as KODAX_MAX_RETRIES,h as KODAX_MAX_TOKENS,l as KODAX_RETRY_BASE_DELAY,s as KODAX_STAGGER_DELAY,se as KODAX_VIDEO_MEDIA_TYPES,Df as KodaXFileLockTimeoutError,fe as KodaXMediaError,Wp as LINEAGE_ENTRY_TYPES,rm as LearnedAreaStore,Wf as LearningCapabilityError,Zp as LineageCompaction,Xp as LineageExtension,ct as MAX_COMPACTION_TRIGGER_PERCENT,ce as MAX_DIMENSION,bf as MAX_ENTRYPOINT_BYTES,af as MAX_ENTRYPOINT_LINES,Af as MAX_SKILL_MD_BYTES,Bf as MAX_SKILL_SUPPORT_FILE_BYTES,vo as MAX_TOOL_LOOP_ITERATIONS,Ye as MEMORY_POLICY_VERSION,bt as MIN_COMPACTION_TRIGGER_PERCENT,Fp as McpAuthRequiredError,Sp as McpCapabilityProvider,Ep as McpExpiredSessionError,Tp as McpManager,Rp as McpServerRuntime,Gp as McpTransportCleanupIncompleteError,_m as MemoryControlPlane,Ur as MessageQueue,je as PASTE_TMP_DIR_ENV,ke as PASTE_TMP_TTL_MS,zt as POST_COMPACT_MAX_TOKENS_PER_FILE,yt as POST_COMPACT_TOKEN_BUDGET,v as PROMISE_PATTERN,nt as PROTECTED_TOOL_NAMES,ze as QueuedInputArtifactError,G as RESERVE_SHRINK_FLOOR_TOKENS,To as Runner,Oo as RunnerIterationLimitError,Pm as SkillExecutor,Lm as SkillRegistry,R as SpanImpl,de as TARGET_RAW_SIZE_BYTES,_ as Tracer,Hm as VariableResolver,Px as WORKFLOW_CAPSULE_API_VERSION,Nx as WORKFLOW_CAPSULE_FORMAT,Ox as WORKFLOW_CAPSULE_VERSION,yx as WORKFLOW_PATTERN_IDS,Lr as WindowsManagedProcessStartError,Cx as WorkflowAbortError,Ex as WorkflowBudgetError,sx as WorkflowEventRecorder,Dx as WorkflowLimitError,Jx as WorkflowScriptExecutionError,Fx as WorkflowTaskFailedError,$r as YIELD_TOOL_NAMES,X as _emitSpanEnd,W as _emitSpanStart,Y as _emitTraceEnd,V as _getRegisteredProcessors,_r as _resetActiveRootQueueRoutesForTests,go as _resetAdmissionMetrics,qo as _resetAdmittedAgentBindings,xo as _resetInvariantRegistry,Wr as _resetMessageQueueForTests,Ro as _resetPresetDispatchers,Ff as acquireKodaXFileLock,Xr as actorQueueId,T as addTracingProcessor,ym as admitAndRecordLearnedSkillInvocation,jm as admitLearnedSkillBinding,bx as appendGoalEntry,Zt as appendMemoryClientNotice,Wt as appendMemoryOutcomeDigest,Xt as appendMemoryReviewReceipt,Mt as appendSessionLineageLabel,Ot as applyLineageTruncation,eo as applyManifestPatch,hr as applyProcessHardening,Nt as applySessionCompaction,Lf as applySkillLearningProposal,Mf as approveStoredLearningProposal,Vt as archiveOldIslands,Rr as asSingleSelection,Yf as assertLearnedCapabilityTransition,tr as assertNoGitInstallPrompt,xr as assertNoGitInstallPromptSync,Bx as assertRestrictedWorkflowQuality,Mo as attachRunnerRecoveryTranscript,Oe as bootstrapTeamMode,Ao as buildAssistantMessageFromLlmResult,pt as buildCompactionCacheInstruction,tt as buildCompactionPromptSnapshot,Dt as buildFileContentMessages,Qp as buildInitializeCapabilities,Ke as buildOtherInstancesPromptBlock,Bt as buildPostCompactAttachments,ix as buildRecoverySeed,Tt as buildSessionTree,So as buildSystemPrompt,Bo as buildToolResultMessage,Tx as buildWorkflowCapsuleIntent,qx as buildWorkflowOutcome,D as calculateContextSafetyMargin,F as calculateMaxContextInputTokens,yf as canMarkCreatedByAgent,Xf as canTransitionLearnedCapability,rp as captureEpisodeReviewBranchEpoch,fp as claimEpisodeReview,Qe as cleanupIncompleteToolCalls,Dr as cleanupManagedRunChildProcess,Gr as cleanupRegisteredManagedChildren,mr as clearCapabilityCache,kf as clearPluginSkillPaths,Eo as collectGuardrails,it as collectUserQueryLedger,tp as commitEpisodeReviewAction,pp as commitEpisodeReviewDecision,im as commitLearnedSkillRevision,wt as compact,kp as completeEpisodeReview,dp as completeFencedEpisodeReview,nm as completeLearnedSkillOutcome,zm as completeLearnedSkillSessionOutcomes,Ee as composeIdleYieldUserMessage,fo as composePatches,Uf as computeSkillConsumerImpact,Hr as containWindowsEffectProcess,Ut as countActiveLineageMessages,Be as countLastAssistantToolCalls,y as countTokens,N as createAgent,ha as createAgentActorController,$x as createAgentExecutorPlane,Qm as createExecutor,g as createExtensionStore,ae as createFileArtifactFromPath,O as createHandoff,xe as createImageArtifactFromPath,P as createInMemorySession,uo as createInvariantSessionForAgent,bm as createLearnedCapabilityScope,um as createLearnedSkillActionDriver,hm as createLearnedSkillRecord,pm as createLearningCenterService,Et as createLegacyToolPairingLookup,Ue as createLlmJudgedStopHook,wp as createMcpCapabilityId,Up as createMcpManager,Vp as createMcpTestServerFixture,Hp as createMcpTransport,Wx as createMemoryAgentExecutorPlaneStore,Zm as createMemoryControlPlane,oa as createReferenceAgentExecutorFactory,Im as createResolver,Mx as createRestrictedWorkflowModule,re as createRuntimeDeliveryPredicate,Ht as createSessionLineage,Ie as createStateWriter,S as createTrace,be as createVideoArtifactFromPath,Rx as createWorkflowCapsule,Sx as createWorkflowModuleFromCapsule,wx as createWorkflowProcessTracker,Ux as createWorkflowRunManager,Hx as createWorkflowRuntime,zf as decideSkillGovernance,vp as defaultMcpCacheDir,$ as defaultTracer,cp as deferEpisodeReview,Jo as detectHandoffSignal,Ce as detectIdleYield,jo as detectInstructionsInjection,gp as discardFencedEpisodeReview,Lp as discoverAuthorizationServerMetadata,Je as discoverInstances,Mp as discoverOAuthEndpoints,Kp as discoverProtectedResourceMetadata,Dm as discoverSkills,Fm as discoverSkillsWithMonorepo,Vm as dispatchSkillCreatorTool,np as drainPendingEpisodeReviews,Re as editDistance,Lo as emitHandoffSpan,K as emitKodaXDiagnostic,ye as enqueueWithArtifacts,w as estimateTokens,em as eventFromCapability,Pt as evictOldIslandMessageContent,Vo as evidenceTrail,Cm as exactInvokedSkillSnapshotForSession,E as exceedsContextCapacity,zo as executeRunnerToolCall,Rm as executeSkill,Sm as expandSkillForLLM,ot as extractArtifactLedger,Uo as extractAssistantTextFromMessage,_p as extractFileOps,Jp as extractInsufficientScope,Ip as extractResourceMetadataUrl,ox as extractTitleFromMessages,bp as failEpisodeReviewApply,ap as failEpisodeReviewAttempt,Wo as finalOwner,Se as findFuzzyToolMatch,Ft as findLegacyToolPairingRestorations,Qt as findPreviousUserEntryId,St as forkSessionLineage,L as formatKodaXDiagnostic,Tm as formatSkillActivationMessage,Km as formatSkillsSystemPrompt,mp as freezeEpisodeReviewInput,$t as generateSessionId,_t as generateSessionIdSync,xt as generateSummary,Dp as getActiveMcpCallContext,Yt as getActiveMemoryOutcomeReviewIds,Me as getActiveTeamModeWriter,Tr as getActiveUserInteraction,co as getAdmissionMetricsSnapshot,no as getAdmittedAgentBindings,p as getAgentConfigHome,t as getAgentConfigPath,b as getAppDataDir,rr as getCachedRejectedEfforts,$o as getCapabilityCacheFile,lf as getDefaultSkillPaths,Vx as getDefaultWorkflowRunManager,po as getInvariant,tm as getLearnedExtensionToolName,Bp as getMcpCachePaths,Vr as getMessageQueue,ve as getModelInputCapabilities,Em as getNestedSkillPaths,er as getProviderReasoningCacheOptions,It as getSessionLineagePath,Gt as getSessionMessageEntryId,Jt as getSessionMessagesFromLineage,nf as getSkillPathsFlat,Mm as getSkillRegistry,kx as gracefulCompactDegradation,Xo as handoffLegality,_e as hashCwd,We as hashMemoryIdentityComponent,pe as inferImageMediaType,te as inferVideoMediaType,Nm as initializeSkillRegistry,Ct as injectPostCompactAttachments,hp as inspectEpisodeReviewJob,lm as invokeLearnedSkillCanary,Te as invokeLlmJudge,ho as isAdmissionDebugEnabled,Qr as isAskUserCustomInputAnswer,Nr as isAskUserUnanswered,ff as isAutoManagedMemoryFile,lr as isChildProcessExited,ur as isCurrentProcessWindowsJobContained,ut as isEmptyLikeSummary,ux as isFinalWorkflowProcessStatus,cx as isGoalEntry,Ae as isIdleYieldEnabled,sm as isLearnedCapabilityRecordV2,xm as isLearnedExtensionCommandAllowed,df as isMemoryManagementController,x as isPathInsideDirectory,wo as isRunnableTool,Po as isRunnerIterationLimitError,yo as isRunnerLlmResult,Um as isSkillCreatorDispatchAction,sp as isUnifiedLearningReviewModelInput,Br as killChildProcessTree,Cr as killChildProcessTreeSync,zr as killPidTree,Ar as killPidTreeSync,$f as learningEventIdFor,_f as learningEventKindForLifecycle,Ax as lintRestrictedWorkflowSource,Bm as listLearnedSkillUsageReceipts,jp as listPendingEpisodeReviewSummaries,ip as listPendingEpisodeReviews,jf as listPluginSkillPaths,to as listRegisteredInvariants,or as loadCapabilityCache,uf as loadFullSkill,vf as loadSkillFileContent,sf as loadSkillMetadata,Pp as loadValidToken,Ve as matchesMemoryApplicability,ee as maybeDrainMidTurn,Xe as memoryApplicabilityFingerprint,Xm as memoryMutationHandle,Wm as memoryProposalRevision,rt as mergeArtifactLedger,$p as mergeFileOps,jt as mergeUserQueryLedger,gx as microcompact,oe as midTurnDrainPriority,vm as migrateLegacyLearnedSkillsForProject,vt as needsCompaction,M as normalizeAgentReasoningProfile,gt as normalizeCompactionConfig,vx as normalizeHostMetadata,yp as normalizeMcpCapabilityId,ge as normalizePastedImage,hx as normalizeRecoveryPrompt,up as normalizeUnifiedLearningReview,Gx as normalizeWorkflowLimits,Gm as parseArguments,zp as parseMcpCapabilityId,tf as parseMemoryFile,pf as parseMemoryType,mf as parseMemoryTypeFromFilename,xf as parseScalarFields,qf as parseSkillMarkdown,lt as parseUserQueryLedger,Op as performOAuthLogin,tx as persistCompactedSessionHistory,le as persistImageAsBlock,ep as persistPendingEpisodeReview,ir as prepareInternalNodeLaunch,jr as prepareJavaScriptChildLaunch,Mr as prepareWindowsManagedProcess,fm as projectLearningProposals,r as promoteSessionMetadata,ne as prunePasteTmpDir,qm as quarantineLearnedSkillRevision,ie as readAndNormalizeClipboardImage,he as readClipboardImage,vr as readCurrentProcessWindowsJobIdentity,xx as readLatestGoalFromBranch,ax as readLatestGoalState,Hf as readLearningProposalStore,qr as readProcessStartIdentities,sr as readProcessStartIdentity,No as readRunnerRecoveryTranscript,mx as readSessionHistoryEntry,Sf as readSkillTrustLedger,Qf as readSkillUsageLedger,Yp as readTaskResultReports,wr as readWindowsJobActiveProcessCount,H as reclaimReservedResponseTokens,Gf as reclaimStaleKodaXFileLock,Am as reconcileLearnedSkillBindingOutcomes,Vf as recordCompletedTurnLearning,wm as recordLearnedSkillOffered,Nf as recordProceduralLearning,fr as recordRejectedEffort,Rf as recordSkillUsage,Yr as registerActiveRootQueueRoute,Zo as registerCoreInvariants,mo as registerInvariant,Fr as registerManagedChildProcess,Np as registerOAuthClient,gf as registerPluginSkillPath,Qo as registerPresetDispatcher,km as releaseLearnedSkillBinding,yr as rememberChildProcessTree,dm as renderDeclarativeSkill,kt as renderUserQueryLedger,Ko as replaceSystemMessage,pr as resetCapabilityCacheMemoForTesting,Om as resetSkillRegistry,Zr as resolveActiveRootQueueRoute,ht as resolveCompactionPolicy,nx as resolveContextWindow,bo as resolveEffectiveInvariants,a as resolveExecutionPath,om as resolveLearnedAreaPaths,Jf as resolveLearningProposalStore,rf as resolveMemoryEntrypoint,of as resolveMemoryRoot,am as resolveProjectLearnedAreaRoot,ao as resolveRequiredInvariants,ef as resolveScopedMemoryRoot,Kt as resolveSessionLineageTarget,Jm as resolveSkillContent,Cf as resolveSkillSnapshotLocation,Pf as resolveSkillTrustLedger,Of as resolveSkillUsageLedger,px as retryContextPersistence,Rt as rewindSessionLineage,ko as runAdmissionAudit,He as runFanOut,Fo as runInputGuardrails,Go as runOutputGuardrails,Lx as runRestrictedWorkflowScript,Io as runToolAfterGuardrails,Ho as runToolBeforeGuardrails,Ge as runWithIdleYield,Cp as runWithMcpCallContext,Ix as runWorkflow,Ze as sanitizeProjectKey,Ym as sanitizePromptSafeMemoryClaim,qp as sanitizeUnifiedLearningReviewInput,Ap as searchMcpCatalog,rx as searchSessionHistory,fx as searchSessionHistoryCooperatively,et as serializeConversation,o as sessionMetadataRevision,Le as setActiveTeamModeWriter,Sr as setActiveUserInteraction,lo as setAdmittedAgentBindings,m as setAgentConfigHome,J as setKodaXDiagnosticSink,Lt as setSessionLineageActiveEntry,U as setTracingProcessors,jx as shouldCompact,Z as shutdownTracing,Zf as slugifyLearnedCapabilityName,gm as stageLearnedSkillRevision,kr as stripHardenedEnvVars,Ir as terminateWindowsEffectJob,wf as triageProceduralLearning,cf as truncateEntrypointContent,e as tryAcquireStorageFileLock,$e as tryGitRemote,hf as unregisterPluginSkillPath,Ne as updateActiveTeamMode,Kf as updateLearningProposalStatus,Tf as updateSkillTrustLedger,If as upsertLearningProposal,Pe as validateAndFixToolHistory,cm as validateDeclarativeSkillSpec,c as validateExtensionStoreSnapshot,I as validateImageBytes,we as validateInputArtifactsForModel,Kx as validateRestrictedWorkflowSource,ex as validateSessionHistorySearchQuery,Qx as validateWorkflowCapsule,zx as validateWorkflowScriptManifest,nr as waitForChildProcessExit,De as waitForWakeEvent,Jr as windowsSandboxSidHasActiveProcesses,Kr as windowsSandboxSidHasOtherProcesses,xp as withEpisodeReviewClaimAuthority,Ef as withKodaXFileLock,Er as withManagedChildProcessConfigHome,lp as withPendingEpisodeReviewSessionFence,f as withStorageFileLock};
@@ -1,12 +1,12 @@
1
- import { aS as KodaXToolVisibilityMeta, ax as ClientStartupProgress, aN as KodaXProductClient, o as ClientExitReceipt } from './types-chunks/client-contract-B7q69yMA.js';
2
- export { C as ClientAutoModeStats, a as ClientCapabilityProbeResult, b as ClientCommandInfo, c as ClientCommandInput, d as ClientCommandResult, e as ClientCommandService, f as ClientCompactSessionResult, g as ClientConfig, h as ClientContextBudget, i as ClientContextBudgetFact, j as ClientCreateSessionInput, k as ClientEffectiveConfigValue, l as ClientEffectiveExecutionConfig, m as ClientExecutionFactsPage, n as ClientExecutionTarget, p as ClientExitRecovery, q as ClientExtensionDiagnostics, r as ClientExtensionSource, s as ClientGoalCreateInput, t as ClientHistoryBoundary, u as ClientHistoryIssue, v as ClientHistoryPage, w as ClientHistoryReadOptions, x as ClientHistorySearchInput, y as ClientHistorySearchResult, z as ClientHostStartupPhase, A as ClientImageAttachmentContent, B as ClientInputAcceptance, D as ClientInputAdmissionError, E as ClientInteraction, F as ClientInteractionResponse, G as ClientInteractionResult, H as ClientItemContent, I as ClientItemReadOptions, J as ClientLearningService, K as ClientLearningSubscription, L as ClientLifecycleService, M as ClientLineageEntry, N as ClientLineageLabelInput, O as ClientLineageSummary, P as ClientLoadedExtension, Q as ClientMcpServerConfig, R as ClientMcpServerStatus, S as ClientMcpTool, T as ClientMemoryController, U as ClientMemoryPlane, V as ClientMemoryProposal, W as ClientMemoryRebuildResult, X as ClientMemoryService, Y as ClientModelCatalog, Z as ClientModelSelection, _ as ClientObservation, $ as ClientObservationStatus, a0 as ClientObserveOptions, a1 as ClientPermissionDecision, a2 as ClientPermissionGrant, a3 as ClientPermissionGrants, a4 as ClientPermissionInteractionOptions, a5 as ClientPromoteSessionInput, a6 as ClientProviderInfo, a7 as ClientProviderRequestFact, a8 as ClientQueuedInput, a9 as ClientRepoIntelligenceHostStatus, aa as ClientRepoIntelligenceStatus, ab as ClientReviewInput, ac as ClientReviewService, ad as ClientRunFailureDetail, ae as ClientRunOutcome, af as ClientRunStatus, ag as ClientRunStopReceipt, ah as ClientRunTerminal, ai as ClientSession, aj as ClientSessionActivity, ak as ClientSessionCancelInput, al as ClientSessionCancelReceipt, am as ClientSessionFilter, an as ClientSessionForkInput, ao as ClientSessionGoal, ap as ClientSessionPromotionResult, aq as ClientSessionRecoverInput, ar as ClientSessionSettings, as as ClientSessionSettingsPatch, at as ClientSessionSettingsSnapshot, au as ClientSessionSummary, av as ClientSessionView, aw as ClientSkillInfo, ay as ClientStatisticsService, az as ClientSubmitInput, aA as ClientToolExecutionFact, aB as ClientToolInvocationInput, aC as ClientUsageTotals, aD as ClientViewItem, aE as ClientWorkflowEvent, aF as ClientWorkflowProcess, aG as ClientWorkflowRun, aH as ClientWorkflowStartInput, aI as ClientWorkflowStartMetadata, aJ as ClientWorkflowStartResult, aK as ClientWorkflowStartSource, aL as KodaXAgentProfile, aM as KodaXEffectiveTaskConfig, aO as KodaXRuntimeVerificationContract, aP as KodaXTaskCapabilityHint, aQ as KodaXTaskVerificationContract, aR as KodaXTaskVerificationCriterion, aT as KodaXToolVisibilityPolicy } from './types-chunks/client-contract-B7q69yMA.js';
3
- import { r as RuntimeExecutionProfileSource, q as RuntimeExecutionProfile, d as RuntimeClientInfo, a as KodaXClientHostAuthorization } from './types-chunks/runtime-client-info-P_mRDG7j.js';
4
- export { K as KodaXClientExecutionRequest, b as KodaXClientHostServices, c as KodaXClientWorkflowHostPolicy, R as RuntimeBusinessBinding, k as RuntimeDefaultSkill, l as RuntimeExecutionAuthorization, m as RuntimeExecutionBindingRequest, n as RuntimeExecutionBindingResolver, o as RuntimeExecutionBindingService, p as RuntimeExecutionBindingSnapshot } from './types-chunks/runtime-client-info-P_mRDG7j.js';
5
- import './types-chunks/review-inbox.d-Bgt46S7L.js';
1
+ import { aU as KodaXToolVisibilityMeta, az as ClientStartupProgress, aP as KodaXProductClient, o as ClientExitReceipt } from './types-chunks/client-contract-B7ZSFKTv.js';
2
+ export { C as ClientAutoModeStats, a as ClientCapabilityProbeResult, b as ClientCommandInfo, c as ClientCommandInput, d as ClientCommandResult, e as ClientCommandService, f as ClientCompactSessionResult, g as ClientConfig, h as ClientContextBudget, i as ClientContextBudgetFact, j as ClientCreateSessionInput, k as ClientEffectiveConfigValue, l as ClientEffectiveExecutionConfig, m as ClientExecutionFactsPage, n as ClientExecutionTarget, p as ClientExitRecovery, q as ClientExtensionDiagnostics, r as ClientExtensionSource, s as ClientGoalCreateInput, t as ClientHistoryBoundary, u as ClientHistoryIssue, v as ClientHistoryPage, w as ClientHistoryReadOptions, x as ClientHistorySearchInput, y as ClientHistorySearchResult, z as ClientHistoryTurnResolution, A as ClientHistoryTurnSelector, B as ClientHostStartupPhase, D as ClientImageAttachmentContent, E as ClientInputAcceptance, F as ClientInputAdmissionError, G as ClientInteraction, H as ClientInteractionResponse, I as ClientInteractionResult, J as ClientItemContent, K as ClientItemReadOptions, L as ClientLearningService, M as ClientLearningSubscription, N as ClientLifecycleService, O as ClientLineageEntry, P as ClientLineageLabelInput, Q as ClientLineageSummary, R as ClientLoadedExtension, S as ClientMcpServerConfig, T as ClientMcpServerStatus, U as ClientMcpTool, V as ClientMemoryController, W as ClientMemoryPlane, X as ClientMemoryProposal, Y as ClientMemoryRebuildResult, Z as ClientMemoryService, _ as ClientModelCatalog, $ as ClientModelSelection, a0 as ClientObservation, a1 as ClientObservationStatus, a2 as ClientObserveOptions, a3 as ClientPermissionDecision, a4 as ClientPermissionGrant, a5 as ClientPermissionGrants, a6 as ClientPermissionInteractionOptions, a7 as ClientPromoteSessionInput, a8 as ClientProviderInfo, a9 as ClientProviderRequestFact, aa as ClientQueuedInput, ab as ClientRepoIntelligenceHostStatus, ac as ClientRepoIntelligenceStatus, ad as ClientReviewInput, ae as ClientReviewService, af as ClientRunFailureDetail, ag as ClientRunOutcome, ah as ClientRunStatus, ai as ClientRunStopReceipt, aj as ClientRunTerminal, ak as ClientSession, al as ClientSessionActivity, am as ClientSessionCancelInput, an as ClientSessionCancelReceipt, ao as ClientSessionFilter, ap as ClientSessionForkInput, aq as ClientSessionGoal, ar as ClientSessionPromotionResult, as as ClientSessionRecoverInput, at as ClientSessionSettings, au as ClientSessionSettingsPatch, av as ClientSessionSettingsSnapshot, aw as ClientSessionSummary, ax as ClientSessionView, ay as ClientSkillInfo, aA as ClientStatisticsService, aB as ClientSubmitInput, aC as ClientToolExecutionFact, aD as ClientToolInvocationInput, aE as ClientUsageTotals, aF as ClientViewItem, aG as ClientWorkflowEvent, aH as ClientWorkflowProcess, aI as ClientWorkflowRun, aJ as ClientWorkflowStartInput, aK as ClientWorkflowStartMetadata, aL as ClientWorkflowStartResult, aM as ClientWorkflowStartSource, aN as KodaXAgentProfile, aO as KodaXEffectiveTaskConfig, aQ as KodaXRuntimeVerificationContract, aR as KodaXTaskCapabilityHint, aS as KodaXTaskVerificationContract, aT as KodaXTaskVerificationCriterion, aV as KodaXToolVisibilityPolicy } from './types-chunks/client-contract-B7ZSFKTv.js';
3
+ import { r as RuntimeExecutionProfileSource, q as RuntimeExecutionProfile, d as RuntimeClientInfo, a as KodaXClientHostAuthorization } from './types-chunks/runtime-client-info-oRMrkHmb.js';
4
+ export { K as KodaXClientExecutionRequest, b as KodaXClientHostServices, c as KodaXClientWorkflowHostPolicy, R as RuntimeBusinessBinding, k as RuntimeDefaultSkill, l as RuntimeExecutionAuthorization, m as RuntimeExecutionBindingRequest, n as RuntimeExecutionBindingResolver, o as RuntimeExecutionBindingService, p as RuntimeExecutionBindingSnapshot } from './types-chunks/runtime-client-info-oRMrkHmb.js';
5
+ import './types-chunks/review-inbox.d-yREk25Vf.js';
6
6
  import './types-chunks/types.d-Bi8iUd6x.js';
7
7
  import './types-chunks/provider-request-observation.d-CNe9vse3.js';
8
8
  import './types-chunks/provider-credential-context.d-Dw-sWcnu.js';
9
- import './types-chunks/types.d-BlXTogOo.js';
9
+ import './types-chunks/types.d-BQ-hbni4.js';
10
10
  import './types-chunks/task-results.d-XMdWq0eA.js';
11
11
 
12
12
  /** Pure builder. Predicates require a Host catalog; Main's registry is never authoritative. */
@@ -1,2 +1,2 @@
1
1
  // @kodax-ai/kodax — bundled distribution. See docs/ADR.md ADR-022 + ADR-024.
2
- import{b,c,d}from"./chunks/chunk-R2HTPDI7.js";import{a}from"./chunks/chunk-GJXOTOZB.js";import"./chunks/chunk-W33QJA3M.js";import"./chunks/chunk-WWPVEK6B.js";import"./chunks/chunk-45ZP2YHG.js";import"./chunks/chunk-SDPZFH6M.js";import"./chunks/chunk-6TITQQAI.js";import"./chunks/chunk-53CJDQS2.js";import"./chunks/chunk-MCDZNQWD.js";import"./chunks/chunk-ZQYWDI4O.js";import"./chunks/chunk-EISRVOBJ.js";import"./chunks/chunk-DCE7XQUG.js";import"./chunks/chunk-AGUM5SWX.js";import"./chunks/chunk-3CP7AUWY.js";import"./chunks/chunk-P55RJIOG.js";import"./chunks/chunk-QSZCR5GC.js";import"./chunks/chunk-V2XJSFFE.js";import"./chunks/chunk-JAF2YLZO.js";import"./chunks/chunk-DV5YPYLW.js";import"./chunks/chunk-X5M7TLJV.js";import"./chunks/chunk-C6JGLEYD.js";import"./chunks/chunk-D36OIMV7.js";import"./chunks/chunk-BBZWF2EA.js";import"./chunks/chunk-F6GJXQNA.js";import"./chunks/chunk-XDMNJW6J.js";import"./chunks/chunk-RYBUYHDL.js";import"./chunks/chunk-4Y6U7AH4.js";import"./chunks/chunk-EPK6EWRI.js";import"./chunks/chunk-ISLK6R2P.js";import"./chunks/chunk-OGTRDK4Q.js";import"./chunks/chunk-GZUWQZJD.js";import"./chunks/chunk-W2CWO4PQ.js";import"./chunks/chunk-TQ475LOI.js";import"./chunks/chunk-65652LR4.js";import"./chunks/chunk-5MUVRFMU.js";import"./chunks/chunk-2HH5AS7E.js";import"./chunks/chunk-J2L2NK6E.js";import"./chunks/chunk-KDSO7V4O.js";import"./chunks/chunk-SK3RRGHJ.js";import"./chunks/chunk-WMMESRP3.js";import"./chunks/chunk-QP47JIWP.js";import"./chunks/chunk-52EN2777.js";import"./chunks/chunk-UF3GZ5PO.js";import"./chunks/chunk-KE2NBMAP.js";import"./chunks/chunk-V5RCDBKU.js";import"./chunks/chunk-KDLOPBFZ.js";import"./chunks/chunk-V4WSBIXB.js";export{d as connectKodaXClient,a as createExecutionProfile,c as ensureKodaXClient,b as readKodaXClientExits};
2
+ import{b,c,d}from"./chunks/chunk-F2TFWNVZ.js";import{a}from"./chunks/chunk-ROWYE472.js";import"./chunks/chunk-W33QJA3M.js";import"./chunks/chunk-YRPB3LID.js";import"./chunks/chunk-ZP3YSYWM.js";import"./chunks/chunk-45ZP2YHG.js";import"./chunks/chunk-5E2P4RYS.js";import"./chunks/chunk-BSCSKJNC.js";import"./chunks/chunk-G32BMSHH.js";import"./chunks/chunk-AYDLX2UK.js";import"./chunks/chunk-FVXZ5L33.js";import"./chunks/chunk-ZQYWDI4O.js";import"./chunks/chunk-4Z7ZHL6V.js";import"./chunks/chunk-AGUM5SWX.js";import"./chunks/chunk-7BA4TSKC.js";import"./chunks/chunk-IOIFCU46.js";import"./chunks/chunk-VRO2CDBY.js";import"./chunks/chunk-P6R6V7EW.js";import"./chunks/chunk-BP3NAYKY.js";import"./chunks/chunk-QDE6THC5.js";import"./chunks/chunk-WMQQQY3D.js";import"./chunks/chunk-X3YYJJTF.js";import"./chunks/chunk-4GYXZTOD.js";import"./chunks/chunk-576AAIQM.js";import"./chunks/chunk-IR46ZHXU.js";import"./chunks/chunk-OXCB2TRF.js";import"./chunks/chunk-3Y5PBEOD.js";import"./chunks/chunk-5LFQ5FVY.js";import"./chunks/chunk-4Y6U7AH4.js";import"./chunks/chunk-QRYEP34M.js";import"./chunks/chunk-ISLK6R2P.js";import"./chunks/chunk-HJLYZ5AX.js";import"./chunks/chunk-GZUWQZJD.js";import"./chunks/chunk-TQ475LOI.js";import"./chunks/chunk-65652LR4.js";import"./chunks/chunk-ZDAU3LZ2.js";import"./chunks/chunk-DAQGOWKD.js";import"./chunks/chunk-OMVAPRQI.js";import"./chunks/chunk-OC3DQXN6.js";import"./chunks/chunk-PFBZ4ZXO.js";import"./chunks/chunk-52EN2777.js";import"./chunks/chunk-6RDMSU4B.js";import"./chunks/chunk-QP47JIWP.js";import"./chunks/chunk-EZF6ZRCO.js";import"./chunks/chunk-4FVCMKG2.js";import"./chunks/chunk-V5RCDBKU.js";import"./chunks/chunk-KDLOPBFZ.js";import"./chunks/chunk-V4WSBIXB.js";export{d as connectKodaXClient,a as createExecutionProfile,c as ensureKodaXClient,b as readKodaXClientExits};