@makaio/framework 1.0.0-dev-1783940945655 → 1.0.0-dev-1783973359164

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 (120) hide show
  1. package/dist/.makaio-build.json +2 -2
  2. package/dist/adapter-subsystem/index.d.mts +10 -0
  3. package/dist/adapter-subsystem/index.mjs +1 -1
  4. package/dist/authority-state-bootstrap-CEuKScnL.mjs +1 -0
  5. package/dist/bus/index.d.mts +31 -31
  6. package/dist/bus/index.mjs +1 -1
  7. package/dist/{canonical-model-CVRCW9h7.mjs → canonical-model-C31NaBJs.mjs} +1 -1
  8. package/dist/clients/index.d.mts +5 -5
  9. package/dist/contracts/adapter/index.d.mts +2 -2
  10. package/dist/contracts/adapter/schemas/session-lineage.d.mts +1 -1
  11. package/dist/contracts/canonical-model/index.d.mts +1 -1
  12. package/dist/contracts/canonical-model/index.mjs +1 -1
  13. package/dist/contracts/client/index.d.mts +1 -1
  14. package/dist/contracts/extension/index.d.mts +2 -2
  15. package/dist/contracts/facet/index.d.mts +1 -1
  16. package/dist/contracts/index.d.mts +228 -160
  17. package/dist/contracts/index.mjs +1 -1
  18. package/dist/contracts/native-session-supervisor/index.d.mts +2 -2
  19. package/dist/contracts/session/index.d.mts +3 -3
  20. package/dist/contracts/shared/index.d.mts +1 -1
  21. package/dist/contracts/variant/index.d.mts +1 -1
  22. package/dist/contracts/workflow/index.d.mts +3 -3
  23. package/dist/contracts/workflow/index.mjs +1 -1
  24. package/dist/{detached-extension-handle-CTaQoolf.mjs → detached-extension-handle-vDK194QV.mjs} +1 -1
  25. package/dist/drizzle/0026_m_mrgvi7fq.sql +16 -0
  26. package/dist/drizzle/0027_m_mrgw0uzg.sql +1 -0
  27. package/dist/drizzle/0028_m_mrgx04i1.sql +1 -0
  28. package/dist/drizzle/0029_terminal-authority.sql +1 -0
  29. package/dist/drizzle/meta/_journal.json +28 -0
  30. package/dist/{index-Do7Wgio_2.d.mts → index-BDr2Ba122.d.mts} +1 -1
  31. package/dist/{index-p6dWV52m.d.mts → index-BKZAAWo2.d.mts} +330 -330
  32. package/dist/{index-CB2XTzvd.d.mts → index-Bbr5LEUc.d.mts} +1 -1
  33. package/dist/{index-5s_dN3cg2.d.mts → index-BmsPH78f2.d.mts} +33 -5
  34. package/dist/{index-BsEvzFey.d.mts → index-ButbwvVY.d.mts} +6 -6
  35. package/dist/{index-D5IEq4_E.d.mts → index-C2C1qH1Y.d.mts} +6 -4
  36. package/dist/{index-BtL7ONuM.d.mts → index-C6LZOiDv.d.mts} +149 -1
  37. package/dist/{index-DxatNFz7.d.mts → index-COC9jCdc.d.mts} +12 -12
  38. package/dist/{index-BcejR1Jc.d.mts → index-CtjLeK1F.d.mts} +1 -1
  39. package/dist/{index-Cw3cjGAT.d.mts → index-Cx8jGKOs.d.mts} +11 -11
  40. package/dist/{index-DNc1yLQs.d.mts → index-DHGW7dFf.d.mts} +8 -8
  41. package/dist/{index-DlUPWOh4.d.mts → index-DNkR5yTY.d.mts} +2876 -709
  42. package/dist/{index-iJP-l15K.d.mts → index-DXBiCH2y.d.mts} +27 -1
  43. package/dist/{index-CW6-0k3Z.d.mts → index-DlAfs3RD.d.mts} +105 -105
  44. package/dist/{index-sCOlgPyj.d.mts → index-DpZbaS7y.d.mts} +388 -388
  45. package/dist/{index-C9Q1E8Y-.d.mts → index-x2gFj3BK.d.mts} +38 -38
  46. package/dist/kernel/extension/index.d.mts +1 -1
  47. package/dist/kernel/index.d.mts +2 -2
  48. package/dist/kernel/observability/index.d.mts +1 -1
  49. package/dist/{load-extensions-BtUrq2_t.mjs → load-extensions-nqL5WAKj.mjs} +1 -1
  50. package/dist/mcp-http-server/index.d.mts +27 -90
  51. package/dist/mcp-http-server/index.mjs +1 -1
  52. package/dist/{namespace-CQBSXm1U.d.mts → namespace-B0uZIZYT.d.mts} +20 -20
  53. package/dist/{namespace-CfgtqUWS.d.mts → namespace-BoA6u44C.d.mts} +156 -156
  54. package/dist/{namespace-CpyL93kW.d.mts → namespace-CCZXyxSe.d.mts} +9 -9
  55. package/dist/{namespace-D3SQQgxa2.d.mts → namespace-CukqFYHf2.d.mts} +1 -1
  56. package/dist/{namespace-CGgOLxiW2.d.mts → namespace-rO-C2Dgu2.d.mts} +2 -2
  57. package/dist/package-BYpWkSuQ.mjs +1 -0
  58. package/dist/package-CsFFT9iR.mjs +7 -0
  59. package/dist/{package-CdBiknf3.d.mts → package-DG9GSY8M.d.mts} +52 -1
  60. package/dist/package.json +1 -1
  61. package/dist/rules/index.mjs +1 -1
  62. package/dist/runtime-node/extension-validation.mjs +1 -1
  63. package/dist/runtime-node/index.d.mts +4 -89
  64. package/dist/runtime-node/index.mjs +24 -24
  65. package/dist/runtime-node/makaio-config.mjs +1 -1
  66. package/dist/runtime-node/workflow-worker/index.d.mts +2 -2
  67. package/dist/runtime-node/workflow-worker/index.mjs +1 -1
  68. package/dist/runtime-node/workflow-worker/worker-entry.mjs +1 -1
  69. package/dist/{schema-BnTOFCdU.d.mts → schema-aOwmHxaF.d.mts} +1 -1
  70. package/dist/{schemas--uwN5dfK2.d.mts → schemas-CoJCTFod2.d.mts} +19 -19
  71. package/dist/{schemas-C17AifUQ.d.mts → schemas-OaBqeEUT.d.mts} +156 -156
  72. package/dist/schemas-th_nuC5t.mjs +1 -0
  73. package/dist/service-base/index.d.mts +4 -3
  74. package/dist/service-base/index.mjs +1 -1
  75. package/dist/services/agent-runtime/index.d.mts +2 -2
  76. package/dist/services/agent-runtime/namespace.d.mts +1 -1
  77. package/dist/services/agent-runtime/schemas.d.mts +1 -1
  78. package/dist/services/context-rules/index.d.mts +3 -3
  79. package/dist/services/execution-target/index.d.mts +1 -1
  80. package/dist/services/filesystem/namespace.d.mts +6 -6
  81. package/dist/services/filesystem/schemas.d.mts +3 -3
  82. package/dist/services/index.d.mts +104 -104
  83. package/dist/services/index.mjs +1 -1
  84. package/dist/services/session/index.d.mts +5 -5
  85. package/dist/services/session/messages/namespace.d.mts +1 -1
  86. package/dist/services/session/session-events/namespace.d.mts +1 -1
  87. package/dist/services/session/storage/namespace.d.mts +1 -1
  88. package/dist/services/session/storage/schema.d.mts +1 -1
  89. package/dist/services/settings/namespace.d.mts +16 -16
  90. package/dist/services/settings/storage/extension-configs/namespace.d.mts +3 -3
  91. package/dist/services/subagent/index.d.mts +2 -2
  92. package/dist/services/subagent/index.mjs +1 -1
  93. package/dist/services/subagent-template/index.d.mts +2 -2
  94. package/dist/services/subagent-template/namespace.d.mts +1 -1
  95. package/dist/services/subagent-template/schemas.d.mts +1 -1
  96. package/dist/services/tools/index.mjs +1 -1
  97. package/dist/{session-lineage-BLw8iWAj.d.mts → session-lineage-YShrn77v.d.mts} +1 -1
  98. package/dist/storage/drizzle/index.d.mts +8 -1
  99. package/dist/storage/drizzle/index.mjs +1 -1
  100. package/dist/tools/index.d.mts +1 -1
  101. package/dist/{tools-C8vqn1KY.mjs → tools-PC_L6g2m.mjs} +1 -1
  102. package/dist/{transition-Bfe8VVc1.d.mts → transition-CwUIm1hJ.d.mts} +8 -0
  103. package/dist/{types-q95p55BF.d.mts → types-BaDYigzD.d.mts} +567 -256
  104. package/dist/workflow-DFJYGjq_.mjs +1 -0
  105. package/dist/workflow-engine/index.d.mts +690 -87
  106. package/dist/workflow-engine/index.mjs +1 -1
  107. package/dist/workflow-engine/package.d.mts +1 -1
  108. package/dist/workflow-engine/package.mjs +1 -1
  109. package/dist/workflow-engine/workflow-orchestrator.mjs +1 -1
  110. package/dist/workflow-worker-BEFjCccX.mjs +1 -0
  111. package/package.json +9 -8
  112. package/dist/loop-gate-handlers-0a3dIY8O.mjs +0 -1
  113. package/dist/package-0gVhAVkO.mjs +0 -7
  114. package/dist/package-BwvGaKwn.mjs +0 -1
  115. package/dist/schemas-D6lj9NMg.mjs +0 -1
  116. package/dist/workflow-CvVAZ89A.mjs +0 -1
  117. package/dist/workflow-worker-CudfEstp.mjs +0 -1
  118. /package/dist/{await-trigger-D623tvig.mjs → await-trigger-DP-fTQc4.mjs} +0 -0
  119. /package/dist/{descriptor-to-package-D5SWf6TL.mjs → descriptor-to-package-Rs-OjOQU.mjs} +0 -0
  120. /package/dist/{esm-oHhRYTEn.mjs → esm-C_WW4-pP.mjs} +0 -0
@@ -1 +1 @@
1
- import{agents as e,sessions as t}from"./session/storage/schema.mjs";import{n,t as r}from"../schema-cus0dJ81.mjs";import{t as i}from"../schema-BI0aCHvV.mjs";import{i as a,n as o,r as s,t as c}from"../namespace-DwQtzlY-.mjs";import{A as l,B as u,C as d,D as f,E as p,F as m,M as h,N as ee,O as te,P as g,S as ne,T as re,V as ie,_ as ae,a as oe,b as se,c as ce,d as le,f as ue,g as de,h as fe,i as pe,j as me,k as he,l as ge,m as _e,n as ve,o as ye,p as be,r as xe,s as Se,t as Ce,u as we,v as Te,w as Ee,y as De}from"../handlers-RGs3eC9X.mjs";import{TurnStorageNamespace as Oe,TurnStorageSubjects as ke}from"./turn/namespace.mjs";import{SessionStorageNamespace as Ae,SessionStorageSubjects as je}from"./session/storage/namespace.mjs";import{$ as Me,A as Ne,B as _,C as v,D as y,E as b,F as Pe,G as Fe,H as Ie,I as Le,J as x,K as Re,L as ze,M as Be,N as Ve,O as He,Q as Ue,R as We,S as Ge,T as Ke,U as qe,V as Je,W as Ye,X as Xe,Y as Ze,Z as Qe,a as $e,b as et,c as tt,et as nt,i as rt,j as it,k as at,l as ot,nt as st,o as ct,q as lt,r as ut,s as dt,t as ft,tt as pt,u as mt,w as ht,x as gt,z as _t}from"../session-CAjudDuJ.mjs";import{t as vt}from"../namespace-D7pE2QWv.mjs";import{ProviderStorageNamespace as yt}from"./settings/storage/providers-namespace.mjs";import{a as bt,o as xt,r as St,t as Ct}from"../provider-context-BYkMl--1.mjs";import{AdapterRuntimeSchemas as wt,ResolveIdRequestSchema as Tt,ResolveIdResponseSchema as Et,ResolveNameRequestSchema as Dt,ResolveNameResponseSchema as Ot}from"./adapter-runtime/schemas.mjs";import{AdapterRuntimeNamespace as S,AdapterRuntimeSubjects as kt}from"./adapter-runtime/namespace.mjs";import{A as At,C as jt,M as Mt,N as Nt,O as Pt,T as Ft,_ as It,a as Lt,b as Rt,c as zt,i as Bt,j as Vt,k as Ht,l as Ut,n as Wt,o as Gt,r as Kt,s as qt,t as Jt,v as Yt,w as Xt,x as Zt,y as Qt}from"../schemas-C-J4W1ID.mjs";import{ExecutionTargetNamespace as C,ExecutionTargetSubjects as $t}from"./execution-target/namespace.mjs";import{MessageStorageNamespace as en,MessageStorageSubjects as tn}from"./session/messages/namespace.mjs";import{TurnStorageNamespace as nn}from"./session/turns/namespace.mjs";import{BugEntrySchema as rn,CompressRequestSchema as an,CompressResponseSchema as on,CompressionEventSchema as sn,CompressionSchemas as cn,ExtractedContextSchema as ln,TechnicalDetailsSchema as un,TodoEntrySchema as dn}from"./compression/schemas.mjs";import{PreferenceItemSchema as fn,PreferenceKeySchema as pn,PreferenceValueSchema as mn,PreferencesSchemas as hn}from"./preferences/schemas.mjs";import{PreferencesNamespace as w,PreferencesSubjects as gn}from"./preferences/storage-namespace.mjs";import{t as _n}from"../namespace-DDx4NVJm.mjs";import{A as vn,B as yn,C as bn,D as xn,E as Sn,F as Cn,G as wn,H as Tn,I as En,J as Dn,K as On,L as kn,M as An,N as jn,O as Mn,P as Nn,R as Pn,S as Fn,T,U as In,V as Ln,W as Rn,Y as zn,_ as Bn,a as E,b as Vn,c as Hn,d as Un,f as Wn,g as D,h as Gn,i as O,j as Kn,k as qn,l as Jn,m as Yn,o as Xn,p as k,q as Zn,r as Qn,s as A,u as $n,v as j,w as er,x as tr,y as nr,z as rr}from"../tools-C8vqn1KY.mjs";import{t as ir}from"../capability-service-Dg2bU8qc.mjs";import{a as ar,c as or,i as sr,l as cr,n as lr,o as M,r as ur,s as dr,t as fr,u as pr}from"../model-registry-C8MInDtX.mjs";import{t as mr}from"../tool-approval-service-Dh0XI21f.mjs";import{TrayMenuEntrySchema as hr,TrayMenuGroupEntrySchema as gr,TrayMenuGroupSchema as _r,TrayMenuItemClickedSchema as vr,TrayMenuListEntrySchema as yr,TrayMenuMetadataSchema as br,TrayMenuSchemas as xr,TrayMenuSectionSchema as Sr}from"./tray-menu/schemas.mjs";import{TrayMenuNamespace as N,TrayMenuSubjects as Cr}from"./tray-menu/namespace.mjs";import{t as wr}from"../tray-menu-service-Bonl2KXf.mjs";import{n as Tr}from"../handler-4pKQi3eo.mjs";import{a as Er,i as Dr,n as Or,r as kr,t as Ar}from"../package-BwvGaKwn.mjs";import{FsNamespace as jr}from"./filesystem/namespace.mjs";import"./capability/index.mjs";import"./tool-approval/index.mjs";import"./tray-menu/index.mjs";import"./subagent/index.mjs";import{AgentInstanceStatusSchema as Mr,AgentRuntimeSchemas as Nr,AgentRuntimeSelectionSchema as Pr}from"./agent-runtime/schemas.mjs";import{AgentRuntimeNamespace as P,AgentRuntimeSubjects as Fr}from"./agent-runtime/namespace.mjs";import{CodebaseChangedEventSchema as Ir,CodebaseSchemas as Lr}from"./codebase/schemas.mjs";import{CodebaseNamespace as F,CodebaseSubjects as Rr}from"./codebase/namespace.mjs";import{CompressionNamespace as I,CompressionSubjects as zr}from"./compression/namespace.mjs";import{r as Br,t as Vr}from"../storage-namespace-BzE2M4Hq.mjs";import{DefinitionNamespace as Hr}from"./definition/namespace.mjs";import{DialogNamespace as Ur}from"./dialog/namespace.mjs";import{a as Wr,i as L,n as Gr,t as Kr}from"../execution-target-Bg2wpfML.mjs";import{CLIDetectionNamespace as qr}from"./cli-detection/namespace.mjs";import{LocalNotificationNamespace as Jr}from"./local-notification/namespace.mjs";import{t as Yr}from"../namespace-Xp9-g_r-.mjs";import{ExtensionConfigStorageNamespace as Xr}from"./settings/storage/extension-configs/namespace.mjs";import{ClientStorageNamespace as Zr}from"./settings/storage/clients-namespace.mjs";import{SubagentTemplateCompletedEventSchema as Qr,SubagentTemplateCreateSchema as $r,SubagentTemplateInstanceSchema as ei,SubagentTemplateInstanceStatusSchema as ti,SubagentTemplateKernelSchemas as ni,SubagentTemplateSchema as ri,SubagentTemplateSettingsSchemas as ii,SubagentTemplateSpawnRequestSchema as ai,SubagentTemplateSpawnedEventSchema as oi,SubagentTemplateSummarySchema as si,SubagentTemplateUpdateSchema as ci}from"./subagent-template/schemas.mjs";import{r as li,t as ui}from"../namespace-HsI0Jbbr.mjs";import{SubagentTemplateKernelNamespace as R,SubagentTemplateSubjects as di}from"./subagent-template/namespace.mjs";import{i as fi,n as pi,r as mi,t as hi}from"../identity-2qUT1NME.mjs";import"./adapter-runtime/index.mjs";import"./agent-runtime/index.mjs";import"./codebase/index.mjs";import"./compression/index.mjs";import"./preferences/index.mjs";import"./subagent-template/index.mjs";import{ArtifactSubjects as gi}from"@makaio/framework/contracts";import{ImportCursorStorageNamespace as _i}from"@makaio/framework/adapters";import{ModelRegistryPublicNamespace as vi}from"@makaio/framework/contracts/model-registry";function yi(e){return{source:`extension`,ownerKey:`extension:${e}`}}function bi(e,t){for(let n of e.values())if(n.registry===t)for(let e of n.registrations)t.registerKind(e,n.owner)}function xi(){let e=new Map,t=t=>{let n=e.get(t);if(n){e.delete(t);for(let e=n.registrations.length-1;e>=0;--e){let t=n.registrations[e];n.registry.deregisterKind(t.kind,t.schemaVersion,n.owner)}bi(e,n.registry)}};return{filter:e=>(e.artifactKinds?.kinds?.length??0)>0,async processActivated(n,r,i){let a=i.getService(E);if(!a)throw Error(`ArtifactSchemaRegistry is not available — ensure artifact-schema-registry is started before extensions with artifactKinds.`);let o=(r.artifactKinds?.kinds??[]).map(e=>e.toRegistration()),s=yi(n);t(n);for(let e of o)a.registerKind(e,s);e.set(n,{registry:a,owner:s,registrations:o})},async processStopped(e){try{t(e)}catch(t){console.error(`[ArtifactContributionProcessor] Deregister error for "${e}":`,t)}}}}function Si(e,t,n){return{...n,filter:{...n.filter,kind:e,schemaVersion:t}}}function Ci(){let e=new Map,t=t=>{let n=e.get(t);n&&(e.delete(t),n.cleanup())};return{filter:e=>{let t=e.artifactLifecycleHooks!=null,n=(e.artifactKinds?.kinds??[]).some(e=>(e.hooks?.hooks.length??0)>0);return t||n},async processActivated(n,r,i){let a=i.getService(O);if(!a)throw Error(`ArtifactLifecycleHookRegistry is not available — ensure artifact-lifecycle-hook-registry is started before extensions with artifact lifecycle hooks.`);let o=r.artifactLifecycleHooks?[...await r.artifactLifecycleHooks.createHooks({bus:i.bus,extensionName:n})]:[],s=[];for(let e of r.artifactKinds?.kinds??[])if(e.hooks)for(let t of e.hooks.hooks)s.push(Si(e.kind,e.schemaVersion,t));let c=[...o,...s];t(n);let l=a.registerHooks(n,c);e.set(n,{cleanup:l})},async processStopped(e){try{t(e)}catch(t){console.error(`[ArtifactLifecycleHookContributionProcessor] Deregister error for "${e}":`,t)}}}}async function wi(e){let t=e.maxDepth??5,n={bus:e.bus,kindRegistry:e.kindRegistry,maxDepth:t,resolvedByKey:new Map,kindDefaultsCache:new Map,walkedByKey:new Set,refIndexByKey:new Map,refMetadataByKey:new Map,resolved:[],refs:[]},r=await B(n,e.ref);if(!r)throw Error(`artifact.resolveContext: root artifact '${e.ref.kind}:${e.ref.id}:${e.ref.revision}' not found`);return n.resolved.push(r),await z(n,r,H(await V(n,r),e.selectors),0,new Set([Z(e.ref)])),{rootRef:e.ref,refs:n.refs,resolved:n.resolved}}async function z(e,t,n,r,i){let a=Pi(t,n,r,i);if(e.walkedByKey.has(a))return;e.walkedByKey.add(a);let o=ji(t);for(let a of t.relations)await Ti(e,o,a,n,r,i)}async function Ti(e,t,n,r,i,a){let o=r?.[n.type];if(o?.hint===`omit`)return;let s=o?.hint??`link`;if(!Ei(o,n.target)){W(e,U(t,n,s,`not-selected`));return}if(n.target.refClass!==`artifact`){W(e,U(t,n,s,`unsupported-ref-class`));return}let c=Z(n.target),l=a.has(c);if(i>=e.maxDepth&&!l){W(e,U(t,n,s,`depth-exceeded`));return}let u=e.resolvedByKey.has(c),d=await B(e,n.target);if(!d){W(e,U(t,n,s,`not-found`));return}if(W(e,{sourceRef:t,target:n.target,relationType:n.type,hint:s,status:`resolved`},{resolvedViaBackEdge:l}),u||e.resolved.push(d),l)return;let f=(o.depth??1)-1,p=f>0?{[n.type]:{...o,depth:f}}:void 0,m=H(H(await V(e,d),p),o.nested),h=new Set(a);h.add(c),await z(e,d,m,i+1,h)}async function B(e,t){let n=Z(t);if(e.resolvedByKey.has(n))return e.resolvedByKey.get(n)??null;let{artifact:r}=await e.bus.request(gi.resolve,{ref:t});return e.resolvedByKey.set(n,r),r}async function V(e,t){let n=JSON.stringify([t.kind,t.schemaVersion]);if(e.kindDefaultsCache.has(n))return e.kindDefaultsCache.get(n);let r=(await e.kindRegistry.getKind(t.kind,t.schemaVersion))?.defaultContext;return e.kindDefaultsCache.set(n,r),r}function H(e,t){if(!t)return e;if(!e)return t;let n={...e};for(let[e,r]of Object.entries(t))n[e]=r;return n}function Ei(e,t){return e?e.kinds?e.kinds.includes(Di(t)):!0:!1}function Di(e){return e.refClass===`local`?e.artifact.kind:e.kind}function U(e,t,n,r){return{sourceRef:e,target:t.target,relationType:t.type,hint:n,status:`unresolved`,reason:r}}function W(e,t,n){let r=Mi(t),i=e.refIndexByKey.get(r);if(i===void 0){e.refIndexByKey.set(r,e.refs.length),J(e,r,t,n),e.refs.push(t);return}let a=e.refs[i];if(a){if(t.status===`unresolved`&&t.reason===`depth-exceeded`){if(!Oi(a,Ai(e,r)))return;q(e,i,r,t,n);return}if(a.status===`unresolved`&&a.reason===`depth-exceeded`){if(t.status===`resolved`&&X(n)||t.status===`unresolved`&&!G(t.reason,a.reason))return;q(e,i,r,t,n);return}if(t.status===`unresolved`&&a.status===`unresolved`){G(t.reason,a.reason)&&q(e,i,r,t,n);return}if(t.status===`resolved`&&a.status===`unresolved`){q(e,i,r,t,n);return}t.status===`resolved`&&!X(n)&&Y(e,r,n)}}function Oi(e,t){return e.status===`resolved`?t:G(`depth-exceeded`,e.reason)}function G(e,t){return K(e)>K(t)}function K(e){return e===`not-selected`?0:e===`depth-exceeded`?1:2}function q(e,t,n,r,i){J(e,n,r,i),e.refs[t]=r}function J(e,t,n,r){if(n.status===`resolved`){Y(e,t,r);return}ki(e,t)}function Y(e,t,n){e.refMetadataByKey.set(t,n??{resolvedViaBackEdge:!1})}function ki(e,t){e.refMetadataByKey.delete(t)}function Ai(e,t){return X(e.refMetadataByKey.get(t))}function X(e){return e?.resolvedViaBackEdge===!0}function ji(e){return{refClass:`artifact`,kind:e.kind,id:e.id,revision:e.revision}}function Z(e){return JSON.stringify([e.kind,e.id,e.revision])}function Mi(e){return JSON.stringify([Z(e.sourceRef),e.relationType,Ni(e.target)])}function Ni(e){return e.refClass===`artifact`?JSON.stringify([`artifact`,e.kind,e.id,e.revision]):e.refClass===`local`?JSON.stringify([`local`,Z(e.artifact),e.localId]):JSON.stringify([`evidence`,e.kind,e.id,e.revision??null,e.locator??null])}function Pi(e,t,n,r){return JSON.stringify([e.kind,e.id,e.revision,n,t??null,[...r].sort()])}function Q(e,t){for(let n of e.values())if(n.registry===t)for(let e of n.registrations)t.registerNamespace(e)}function Fi(){let e=new Map,t=(t,n)=>{if(n){for(let e of n.registrations)n.registry.registerNamespace(e);e.set(t,n)}},n=t=>{let n=e.get(t);if(n){e.delete(t);for(let e=n.registrations.length-1;e>=0;--e){let t=n.registrations[e];n.registry.deregisterNamespace(t.namespace)}Q(e,n.registry)}};return{filter:e=>(e.facetNamespaces?.namespaces?.length??0)>0,async processActivated(r,i,a){let o=a.getService(A);if(!o)throw Error(`FacetNamespaceRegistry is not available — ensure facet-namespace-registry is started before extensions with facetNamespaces.`);let s=(i.facetNamespaces?.namespaces??[]).map(e=>e.toRegistration()),c=e.get(r);n(r);let l=[];try{for(let e of s)o.registerNamespace(e),l.push(e)}catch(n){for(let e=l.length-1;e>=0;--e)o.deregisterNamespace(l[e].namespace);throw Q(e,o),t(r,c),n}e.set(r,{registry:o,registrations:s})},async processStopped(e){try{n(e)}catch(t){console.error(`[FacetNamespaceContributionProcessor] Deregister error for "${e}":`,t)}}}}function $(e,t){for(let n of e.values())if(n.registry===t)for(let e of n.registrations)t.registerBinding(e)}function Ii(){let e=new Map,t=(t,n)=>{if(n){for(let e of n.registrations)n.registry.registerBinding(e);e.set(t,n)}},n=t=>{let n=e.get(t);if(n){e.delete(t);for(let e=n.registrations.length-1;e>=0;--e){let t=n.registrations[e];n.registry.deregisterBinding(t.id)}$(e,n.registry)}};return{filter:e=>(e.surfaceBindings?.bindings?.length??0)>0,async processActivated(r,i,a){let o=a.getService(k);if(!o)throw Error(`SurfaceBindingRegistry is not available — ensure surface-binding-registry is started before extensions with surfaceBindings.`);let s=(i.surfaceBindings?.bindings??[]).map(e=>e.toRegistration()),c=e.get(r);n(r);let l=[];try{for(let e of s)o.registerBinding(e),l.push(e)}catch(n){for(let e=l.length-1;e>=0;--e)o.deregisterBinding(l[e].id);throw $(e,o),t(r,c),n}e.set(r,{registry:o,registrations:s})},async processStopped(e){try{n(e)}catch(t){console.error(`[SurfaceBindingContributionProcessor] Deregister error for "${e}":`,t)}}}}function Li(){let e=new Map;return{filter:e=>!!e.workflowBlocks?.blocks,async processActivated(t,n,r){let i=r.getService(j);if(!i)throw Error(`WorkflowBlockRegistry is not available — ensure workflow-block-registry is started before extensions with workflowBlocks.`);await i.register(t,n.workflowBlocks.blocks),e.set(t,()=>i.deregister(t))},async processStopped(t){let n=e.get(t);if(n){try{await n()}catch(e){console.error(`[WorkflowBlockContributionProcessor] Deregister error for "${t}":`,e)}e.delete(t)}}}}function Ri(){let e=new Map;return{filter:e=>!!(e.transitionRules?.rules?.length||e.transitionActions?.actions),async processActivated(t,n,r){let i=r.getService(D);if(!i)throw Error(`TransitionContributionProcessor: TransitionPipelineService is not available — ensure '${D.name}' is started before extensions with transitionRules or transitionActions.`);let a=n.transitionRules?.rules??[],o=n.transitionActions?.actions,s=a.length>0,c=o!==void 0;s&&zi(t,a),c&&Bi(t,o);let l=!1,u=!1;try{s&&(i.ruleRegistry.register(t,a),l=!0),c&&(i.actionRegistry.register(t,o),u=!0)}catch(e){throw l&&i.ruleRegistry.deregister(t),u&&i.actionRegistry.deregister(t),e}e.set(t,()=>{s&&i.ruleRegistry.deregister(t),c&&i.actionRegistry.deregister(t)})},async processStopped(t){let n=e.get(t);if(n){try{n()}catch(e){console.error(`[TransitionContributionProcessor] Deregister error for "${t}":`,e)}e.delete(t)}}}}function zi(e,t){let n=`${e}.`;for(let e of t)if(!e.id.startsWith(n))throw Error(`TransitionContributionProcessor: rule '${e.id}' must be namespaced by extension '${n}'`)}function Bi(e,t){let n=`${e}.`;for(let e of Object.keys(t))if(!e.startsWith(n))throw Error(`TransitionContributionProcessor: action type '${e}' must be namespaced by extension '${n}'`)}const Vi=[S,vt,P,g,qr,Zr,F,I,Br,Vr,Hr,Ur,L,C,Xr,jr,Tr,_i,Jr,x,M,vi,w,Yr,yt,_n,ui,N,Oe,R,li];export{hi as AdapterIdentityRegistry,nt as AdapterRegistry,S as AdapterRuntimeNamespace,wt as AdapterRuntimeSchemas,kt as AdapterRuntimeSubjects,Mr as AgentInstanceStatusSchema,P as AgentRuntimeNamespace,Nr as AgentRuntimeSchemas,Pr as AgentRuntimeSelectionSchema,Fr as AgentRuntimeSubjects,g as AgentStorageNamespace,m as AgentStorageSubjects,Zn as ArtifactLifecycleHookRegistry,O as ArtifactLifecycleHookRegistryToken,Dn as ArtifactLifecycleHookRejectedError,zn as ArtifactSchemaRegistry,E as ArtifactSchemaRegistryToken,rn as BugEntrySchema,_t as CONNECTOR_SWAP_DEFAULT_PIPELINE,fr as CachedRegistryFetcher,Rn as CanonicalModelResolutionError,In as CanonicalModelResolver,Tn as CanonicalModelService,ir as CapabilityService,Xn as CapabilityToken,Ir as CodebaseChangedEventSchema,F as CodebaseNamespace,Lr as CodebaseSchemas,Rr as CodebaseSubjects,an as CompressRequestSchema,on as CompressResponseSchema,sn as CompressionEventSchema,I as CompressionNamespace,cn as CompressionSchemas,zr as CompressionSubjects,It as ContainerCreatedSchema,Yt as ContainerDestroyedSchema,Jt as ContainerIsolatedExecutionTargetSchema,Qt as ContainerIsolatedSpawnRequestSchema,Wt as ContainerLocalExecutionTargetSchema,Rt as ContainerLocalSpawnRequestSchema,Zt as ContainerRuntimeSchema,Kr as ContainerSpawnNamespace,Gr as ContainerSpawnSubjects,jt as ContainerStartedSchema,Xt as ContainerStateSchema,Ft as ContainerStoppedSchema,ft as ContextWindowTracker,L as DockerNamespace,Wr as DockerSubjects,dt as EmbeddingIndexManager,Kt as ExecutionTargetInputSchema,Bt as ExecutionTargetListQuerySchema,C as ExecutionTargetNamespace,Lt as ExecutionTargetResolveRequestSchema,Gt as ExecutionTargetSchema,qt as ExecutionTargetSchemas,$t as ExecutionTargetSubjects,zt as ExecutionTargetTypeSchema,ln as ExtractedContextSchema,On as FacetNamespaceRegistry,A as FacetNamespaceRegistryToken,lr as FallbackRegistryFetcher,Vi as FrameworkServicesCoreNamespaces,Ut as LocalExecutionTargetSchema,ct as MakaioSession,pt as MakaioSessionService,x as MessageRoutingNamespace,Ze as MessageRoutingSubjects,en as MessageStorageNamespace,tn as MessageStorageSubjects,M as ModelRegistryNamespace,ur as ModelRegistryProviderNotFoundError,or as ModelRegistrySchema,cr as ModelRegistrySchemas,sr as ModelRegistryService,dr as ModelRegistrySubjects,Hn as ModelRegistryToken,fn as PreferenceItemSchema,pn as PreferenceKeySchema,mn as PreferenceValueSchema,w as PreferencesNamespace,hn as PreferencesSchemas,gn as PreferencesSubjects,Ct as ProviderContextActivationError,pr as ProviderModelOverrideSchema,Tt as ResolveIdRequestSchema,Et as ResolveIdResponseSchema,Dt as ResolveNameRequestSchema,Ot as ResolveNameResponseSchema,bt as RuntimeProviderContextResolutionError,ze as SessionBridge,Jn as SessionBridgeToken,c as SessionEventStorageNamespace,o as SessionEventStorageSubjects,Pe as SessionExtensionContextImpl,Ye as SessionOrchestrator,$n as SessionOrchestratorToken,Ae as SessionStorageNamespace,je as SessionStorageSubjects,Un as SessionStorageToken,Wn as SessionToken,Fe as SessionTurnManager,Pt as SpawnRequestSchema,Ht as SpawnResponseSchema,At as StatusRequestSchema,Vt as StatusResponseSchema,Mt as StopRequestSchema,Nt as StopResponseSchema,kr as SubagentFailureFinalizationError,Er as SubagentManager,Dr as SubagentService,Ar as SubagentServiceToken,Qr as SubagentTemplateCompletedEventSchema,$r as SubagentTemplateCreateSchema,ei as SubagentTemplateInstanceSchema,ti as SubagentTemplateInstanceStatusSchema,R as SubagentTemplateKernelNamespace,ni as SubagentTemplateKernelSchemas,ri as SubagentTemplateSchema,ii as SubagentTemplateSettingsSchemas,ai as SubagentTemplateSpawnRequestSchema,oi as SubagentTemplateSpawnedEventSchema,di as SubagentTemplateSubjects,si as SubagentTemplateSummarySchema,ci as SubagentTemplateUpdateSchema,wn as SurfaceBindingRegistry,k as SurfaceBindingRegistryToken,un as TechnicalDetailsSchema,dn as TodoEntrySchema,mr as ToolApprovalService,Yn as ToolApprovalToken,yn as ToolRegistry,Gn as ToolRegistryToken,kn as TransitionActionRegistry,Cn as TransitionPipelineService,D as TransitionPipelineToken,En as TransitionRuleRegistry,hr as TrayMenuEntrySchema,gr as TrayMenuGroupEntrySchema,_r as TrayMenuGroupSchema,vr as TrayMenuItemClickedSchema,yr as TrayMenuListEntrySchema,br as TrayMenuMetadataSchema,N as TrayMenuNamespace,xr as TrayMenuSchemas,Sr as TrayMenuSectionSchema,wr as TrayMenuService,Cr as TrayMenuSubjects,Bn as TrayMenuToken,Re as Turn,qe as TurnContextEnricher,nn as TurnStorageNamespace,ke as TurnStorageSubjects,Pn as WORKFLOW_START_ACTION_TYPE,rr as WorkflowBlockRegistry,j as WorkflowBlockRegistryToken,he as actionRegistry,St as activateProviderContext,e as agents,nr as artifactLifecycleHookRegistryPackage,Vn as artifactSchemaRegistryPackage,ve as assembleForkContext,pi as buildDeterministicAdapterId,f as buildRecoveryContext,ne as buildRecoveryContextWithPipeline,l as buildSessionContext,le as buildTurnInitiator,Ln as canonicalModelPackage,tr as capabilityPackage,xi as createArtifactKindContributionProcessor,Ci as createArtifactLifecycleHookContributionProcessor,Fi as createFacetNamespaceContributionProcessor,Fn as createModelRegistryPackage,Le as createSessionExtensionContext,Ii as createSurfaceBindingContributionProcessor,Qn as createToolContributionProcessor,Ri as createTransitionContributionProcessor,Li as createWorkflowBlockContributionProcessor,d as ensureAgentCwd,Ee as ensureAgentModel,fe as extractTextContent,bn as facetNamespaceRegistryPackage,gt as fetchAgentsBySession,Ge as fetchMessageCountsBySession,v as fetchPreviewBySession,He as fetchSessionPreviewMaps,ue as findTurnByAgent,er as frameworkCorePackages,te as getFullConversation,be as getOrCreateSession,ot as importCursors,mt as importCursorsDual,Ve as kindToBranchKind,at as mapAgentsBySession,ht as mapRowToSession,Ne as mapToSession,ar as mergeModelMetadata,Xe as messageRouting,Qe as messageRoutingDual,i as messages,ae as normalizeSelectionString,de as normalizeToBlocks,Ke as parseForkTransforms,We as pickFallbackRuntimeOptions,re as recoverAgent,ce as registerAbandonHandler,mi as registerAdapterRuntimeIdentityHandlers,ge as registerAttachHandler,ye as registerBuiltInActions,oe as registerCompressHandler,rt as registerCompressLineageResolver,st as registerCoreSessionServiceHandlers,it as registerDrizzleAgentStorage,tt as registerDrizzleImportCursorStorage,lt as registerDrizzleMessageRoutingStorage,Me as registerDrizzleMessageStorage,u as registerDrizzleSessionEventStorage,y as registerDrizzleSessionStorage,se as registerDrizzleTurnStorage,pe as registerForkHandler,et as registerFtsSearchHandler,Je as registerGetStatusCountsHandler,_ as registerListActionsHandler,b as registerMemoryAgentStorage,Ue as registerMemoryMessageStorage,ie as registerMemorySessionEventStorage,Be as registerMemorySessionStorage,De as registerMemoryTurnStorage,xe as registerMergeHandler,$e as registerParentResolver,Ie as registerResumeHandler,ut as registerSpawningToolCallResolver,Se as resetBuiltInActionsRegistration,me as resolveAdapterId,Te as resolveAdapterNameById,wi as resolveArtifactContext,fi as resolveDeterministicAdapterId,h as resolveExecutionTarget,ee as resolveModelCapabilities,xt as resolveRuntimeProviderContext,_e as resolveTargetAgents,Ce as routeToAgents,we as routeToAgentsCore,T as sessionBridgePackage,s as sessionEvents,a as sessionEventsDual,Sn as sessionOrchestratorPackage,xn as sessionPackage,Mn as sessionStoragePackage,t as sessions,Or as subagentServicePackage,qn as surfaceBindingRegistryPackage,vn as toolApprovalPackage,Kn as toolRegistryPackage,An as transitionPipelinePackage,jn as trayMenuPackage,r as turns,n as turnsDual,p as verifyAndRecoverAgents,Nn as workflowBlockRegistryPackage};
1
+ import{agents as e,sessions as t}from"./session/storage/schema.mjs";import{n,t as r}from"../schema-cus0dJ81.mjs";import{t as i}from"../schema-BI0aCHvV.mjs";import{i as a,n as o,r as s,t as c}from"../namespace-DwQtzlY-.mjs";import{A as l,B as u,C as d,D as f,E as p,F as m,M as h,N as ee,O as te,P as g,S as ne,T as re,V as ie,_ as ae,a as oe,b as se,c as ce,d as le,f as ue,g as de,h as fe,i as pe,j as me,k as he,l as ge,m as _e,n as ve,o as ye,p as be,r as xe,s as Se,t as Ce,u as we,v as Te,w as Ee,y as De}from"../handlers-RGs3eC9X.mjs";import{TurnStorageNamespace as Oe,TurnStorageSubjects as ke}from"./turn/namespace.mjs";import{SessionStorageNamespace as Ae,SessionStorageSubjects as je}from"./session/storage/namespace.mjs";import{$ as Me,A as Ne,B as _,C as v,D as y,E as b,F as Pe,G as Fe,H as Ie,I as Le,J as x,K as Re,L as ze,M as Be,N as Ve,O as He,Q as Ue,R as We,S as Ge,T as Ke,U as qe,V as Je,W as Ye,X as Xe,Y as Ze,Z as Qe,a as $e,b as et,c as tt,et as nt,i as rt,j as it,k as at,l as ot,nt as st,o as ct,q as lt,r as ut,s as dt,t as ft,tt as pt,u as mt,w as ht,x as gt,z as _t}from"../session-CAjudDuJ.mjs";import{t as vt}from"../namespace-D7pE2QWv.mjs";import{ProviderStorageNamespace as yt}from"./settings/storage/providers-namespace.mjs";import{a as bt,o as xt,r as St,t as Ct}from"../provider-context-BYkMl--1.mjs";import{AdapterRuntimeSchemas as wt,ResolveIdRequestSchema as Tt,ResolveIdResponseSchema as Et,ResolveNameRequestSchema as Dt,ResolveNameResponseSchema as Ot}from"./adapter-runtime/schemas.mjs";import{AdapterRuntimeNamespace as S,AdapterRuntimeSubjects as kt}from"./adapter-runtime/namespace.mjs";import{A as At,C as jt,M as Mt,N as Nt,O as Pt,T as Ft,_ as It,a as Lt,b as Rt,c as zt,i as Bt,j as Vt,k as Ht,l as Ut,n as Wt,o as Gt,r as Kt,s as qt,t as Jt,v as Yt,w as Xt,x as Zt,y as Qt}from"../schemas-C-J4W1ID.mjs";import{ExecutionTargetNamespace as C,ExecutionTargetSubjects as $t}from"./execution-target/namespace.mjs";import{MessageStorageNamespace as en,MessageStorageSubjects as tn}from"./session/messages/namespace.mjs";import{TurnStorageNamespace as nn}from"./session/turns/namespace.mjs";import{BugEntrySchema as rn,CompressRequestSchema as an,CompressResponseSchema as on,CompressionEventSchema as sn,CompressionSchemas as cn,ExtractedContextSchema as ln,TechnicalDetailsSchema as un,TodoEntrySchema as dn}from"./compression/schemas.mjs";import{PreferenceItemSchema as fn,PreferenceKeySchema as pn,PreferenceValueSchema as mn,PreferencesSchemas as hn}from"./preferences/schemas.mjs";import{PreferencesNamespace as w,PreferencesSubjects as gn}from"./preferences/storage-namespace.mjs";import{t as _n}from"../namespace-DDx4NVJm.mjs";import{A as vn,B as yn,C as bn,D as xn,E as Sn,F as Cn,G as wn,H as Tn,I as En,J as Dn,K as On,L as kn,M as An,N as jn,O as Mn,P as Nn,R as Pn,S as Fn,T as In,U as Ln,V as Rn,W as zn,Y as T,_ as Bn,a as E,b as Vn,c as Hn,d as Un,f as Wn,g as D,h as Gn,i as O,j as Kn,k as qn,l as Jn,m as Yn,o as Xn,p as k,q as Zn,r as Qn,s as A,u as $n,v as j,w as er,x as tr,y as nr,z as rr}from"../tools-PC_L6g2m.mjs";import{t as ir}from"../capability-service-Dg2bU8qc.mjs";import{a as ar,c as or,i as sr,l as cr,n as lr,o as M,r as ur,s as dr,t as fr,u as pr}from"../model-registry-C8MInDtX.mjs";import{t as mr}from"../tool-approval-service-Dh0XI21f.mjs";import{TrayMenuEntrySchema as hr,TrayMenuGroupEntrySchema as gr,TrayMenuGroupSchema as _r,TrayMenuItemClickedSchema as vr,TrayMenuListEntrySchema as yr,TrayMenuMetadataSchema as br,TrayMenuSchemas as xr,TrayMenuSectionSchema as Sr}from"./tray-menu/schemas.mjs";import{TrayMenuNamespace as N,TrayMenuSubjects as Cr}from"./tray-menu/namespace.mjs";import{t as wr}from"../tray-menu-service-Bonl2KXf.mjs";import{n as Tr}from"../handler-4pKQi3eo.mjs";import{a as Er,i as Dr,n as Or,o as kr,r as Ar,t as jr}from"../package-BYpWkSuQ.mjs";import{FsNamespace as Mr}from"./filesystem/namespace.mjs";import"./capability/index.mjs";import"./tool-approval/index.mjs";import"./tray-menu/index.mjs";import"./subagent/index.mjs";import{AgentInstanceStatusSchema as Nr,AgentRuntimeSchemas as Pr,AgentRuntimeSelectionSchema as Fr}from"./agent-runtime/schemas.mjs";import{AgentRuntimeNamespace as P,AgentRuntimeSubjects as Ir}from"./agent-runtime/namespace.mjs";import{CodebaseChangedEventSchema as Lr,CodebaseSchemas as Rr}from"./codebase/schemas.mjs";import{CodebaseNamespace as F,CodebaseSubjects as zr}from"./codebase/namespace.mjs";import{CompressionNamespace as I,CompressionSubjects as Br}from"./compression/namespace.mjs";import{r as Vr,t as Hr}from"../storage-namespace-BzE2M4Hq.mjs";import{DefinitionNamespace as Ur}from"./definition/namespace.mjs";import{DialogNamespace as Wr}from"./dialog/namespace.mjs";import{a as Gr,i as L,n as Kr,t as qr}from"../execution-target-Bg2wpfML.mjs";import{CLIDetectionNamespace as Jr}from"./cli-detection/namespace.mjs";import{LocalNotificationNamespace as Yr}from"./local-notification/namespace.mjs";import{t as Xr}from"../namespace-Xp9-g_r-.mjs";import{ExtensionConfigStorageNamespace as Zr}from"./settings/storage/extension-configs/namespace.mjs";import{ClientStorageNamespace as Qr}from"./settings/storage/clients-namespace.mjs";import{SubagentTemplateCompletedEventSchema as $r,SubagentTemplateCreateSchema as ei,SubagentTemplateInstanceSchema as ti,SubagentTemplateInstanceStatusSchema as ni,SubagentTemplateKernelSchemas as ri,SubagentTemplateSchema as ii,SubagentTemplateSettingsSchemas as ai,SubagentTemplateSpawnRequestSchema as oi,SubagentTemplateSpawnedEventSchema as si,SubagentTemplateSummarySchema as ci,SubagentTemplateUpdateSchema as li}from"./subagent-template/schemas.mjs";import{r as ui,t as di}from"../namespace-HsI0Jbbr.mjs";import{SubagentTemplateKernelNamespace as R,SubagentTemplateSubjects as fi}from"./subagent-template/namespace.mjs";import{i as pi,n as mi,r as hi,t as gi}from"../identity-2qUT1NME.mjs";import"./adapter-runtime/index.mjs";import"./agent-runtime/index.mjs";import"./codebase/index.mjs";import"./compression/index.mjs";import"./preferences/index.mjs";import"./subagent-template/index.mjs";import{ArtifactSubjects as _i}from"@makaio/framework/contracts";import{ImportCursorStorageNamespace as vi}from"@makaio/framework/adapters";import{ModelRegistryPublicNamespace as yi}from"@makaio/framework/contracts/model-registry";function bi(e){return{source:`extension`,ownerKey:`extension:${e}`}}function xi(e,t){for(let n of e.values())if(n.registry===t)for(let e of n.registrations)t.registerKind(e,n.owner)}function Si(){let e=new Map,t=t=>{let n=e.get(t);if(n){e.delete(t);for(let e=n.registrations.length-1;e>=0;--e){let t=n.registrations[e];n.registry.deregisterKind(t.kind,t.schemaVersion,n.owner)}xi(e,n.registry)}};return{filter:e=>(e.artifactKinds?.kinds?.length??0)>0,async processActivated(n,r,i){let a=i.getService(E);if(!a)throw Error(`ArtifactSchemaRegistry is not available — ensure artifact-schema-registry is started before extensions with artifactKinds.`);let o=(r.artifactKinds?.kinds??[]).map(e=>e.toRegistration()),s=bi(n);t(n);for(let e of o)a.registerKind(e,s);e.set(n,{registry:a,owner:s,registrations:o})},async processStopped(e){try{t(e)}catch(t){console.error(`[ArtifactContributionProcessor] Deregister error for "${e}":`,t)}}}}function Ci(e,t,n){return{...n,filter:{...n.filter,kind:e,schemaVersion:t}}}function wi(){let e=new Map,t=t=>{let n=e.get(t);n&&(e.delete(t),n.cleanup())};return{filter:e=>{let t=e.artifactLifecycleHooks!=null,n=(e.artifactKinds?.kinds??[]).some(e=>(e.hooks?.hooks.length??0)>0);return t||n},async processActivated(n,r,i){let a=i.getService(O);if(!a)throw Error(`ArtifactLifecycleHookRegistry is not available — ensure artifact-lifecycle-hook-registry is started before extensions with artifact lifecycle hooks.`);let o=r.artifactLifecycleHooks?[...await r.artifactLifecycleHooks.createHooks({bus:i.bus,extensionName:n})]:[],s=[];for(let e of r.artifactKinds?.kinds??[])if(e.hooks)for(let t of e.hooks.hooks)s.push(Ci(e.kind,e.schemaVersion,t));let c=[...o,...s];t(n);let l=a.registerHooks(n,c);e.set(n,{cleanup:l})},async processStopped(e){try{t(e)}catch(t){console.error(`[ArtifactLifecycleHookContributionProcessor] Deregister error for "${e}":`,t)}}}}async function Ti(e){let t=e.maxDepth??5,n={bus:e.bus,kindRegistry:e.kindRegistry,maxDepth:t,resolvedByKey:new Map,kindDefaultsCache:new Map,walkedByKey:new Set,refIndexByKey:new Map,refMetadataByKey:new Map,resolved:[],refs:[]},r=await B(n,e.ref);if(!r)throw Error(`artifact.resolveContext: root artifact '${e.ref.kind}:${e.ref.id}:${e.ref.revision}' not found`);return n.resolved.push(r),await z(n,r,H(await V(n,r),e.selectors),0,new Set([Z(e.ref)])),{rootRef:e.ref,refs:n.refs,resolved:n.resolved}}async function z(e,t,n,r,i){let a=Fi(t,n,r,i);if(e.walkedByKey.has(a))return;e.walkedByKey.add(a);let o=Mi(t);for(let a of t.relations)await Ei(e,o,a,n,r,i)}async function Ei(e,t,n,r,i,a){let o=r?.[n.type];if(o?.hint===`omit`)return;let s=o?.hint??`link`;if(!Di(o,n.target)){W(e,U(t,n,s,`not-selected`));return}if(n.target.refClass!==`artifact`){W(e,U(t,n,s,`unsupported-ref-class`));return}let c=Z(n.target),l=a.has(c);if(i>=e.maxDepth&&!l){W(e,U(t,n,s,`depth-exceeded`));return}let u=e.resolvedByKey.has(c),d=await B(e,n.target);if(!d){W(e,U(t,n,s,`not-found`));return}if(W(e,{sourceRef:t,target:n.target,relationType:n.type,hint:s,status:`resolved`},{resolvedViaBackEdge:l}),u||e.resolved.push(d),l)return;let f=(o.depth??1)-1,p=f>0?{[n.type]:{...o,depth:f}}:void 0,m=H(H(await V(e,d),p),o.nested),h=new Set(a);h.add(c),await z(e,d,m,i+1,h)}async function B(e,t){let n=Z(t);if(e.resolvedByKey.has(n))return e.resolvedByKey.get(n)??null;let{artifact:r}=await e.bus.request(_i.resolve,{ref:t});return e.resolvedByKey.set(n,r),r}async function V(e,t){let n=JSON.stringify([t.kind,t.schemaVersion]);if(e.kindDefaultsCache.has(n))return e.kindDefaultsCache.get(n);let r=(await e.kindRegistry.getKind(t.kind,t.schemaVersion))?.defaultContext;return e.kindDefaultsCache.set(n,r),r}function H(e,t){if(!t)return e;if(!e)return t;let n={...e};for(let[e,r]of Object.entries(t))n[e]=r;return n}function Di(e,t){return e?e.kinds?e.kinds.includes(Oi(t)):!0:!1}function Oi(e){return e.refClass===`local`?e.artifact.kind:e.kind}function U(e,t,n,r){return{sourceRef:e,target:t.target,relationType:t.type,hint:n,status:`unresolved`,reason:r}}function W(e,t,n){let r=Ni(t),i=e.refIndexByKey.get(r);if(i===void 0){e.refIndexByKey.set(r,e.refs.length),J(e,r,t,n),e.refs.push(t);return}let a=e.refs[i];if(a){if(t.status===`unresolved`&&t.reason===`depth-exceeded`){if(!ki(a,ji(e,r)))return;q(e,i,r,t,n);return}if(a.status===`unresolved`&&a.reason===`depth-exceeded`){if(t.status===`resolved`&&X(n)||t.status===`unresolved`&&!G(t.reason,a.reason))return;q(e,i,r,t,n);return}if(t.status===`unresolved`&&a.status===`unresolved`){G(t.reason,a.reason)&&q(e,i,r,t,n);return}if(t.status===`resolved`&&a.status===`unresolved`){q(e,i,r,t,n);return}t.status===`resolved`&&!X(n)&&Y(e,r,n)}}function ki(e,t){return e.status===`resolved`?t:G(`depth-exceeded`,e.reason)}function G(e,t){return K(e)>K(t)}function K(e){return e===`not-selected`?0:e===`depth-exceeded`?1:2}function q(e,t,n,r,i){J(e,n,r,i),e.refs[t]=r}function J(e,t,n,r){if(n.status===`resolved`){Y(e,t,r);return}Ai(e,t)}function Y(e,t,n){e.refMetadataByKey.set(t,n??{resolvedViaBackEdge:!1})}function Ai(e,t){e.refMetadataByKey.delete(t)}function ji(e,t){return X(e.refMetadataByKey.get(t))}function X(e){return e?.resolvedViaBackEdge===!0}function Mi(e){return{refClass:`artifact`,kind:e.kind,id:e.id,revision:e.revision}}function Z(e){return JSON.stringify([e.kind,e.id,e.revision])}function Ni(e){return JSON.stringify([Z(e.sourceRef),e.relationType,Pi(e.target)])}function Pi(e){return e.refClass===`artifact`?JSON.stringify([`artifact`,e.kind,e.id,e.revision]):e.refClass===`local`?JSON.stringify([`local`,Z(e.artifact),e.localId]):JSON.stringify([`evidence`,e.kind,e.id,e.revision??null,e.locator??null])}function Fi(e,t,n,r){return JSON.stringify([e.kind,e.id,e.revision,n,t??null,[...r].sort()])}function Q(e,t){for(let n of e.values())if(n.registry===t)for(let e of n.registrations)t.registerNamespace(e)}function Ii(){let e=new Map,t=(t,n)=>{if(n){for(let e of n.registrations)n.registry.registerNamespace(e);e.set(t,n)}},n=t=>{let n=e.get(t);if(n){e.delete(t);for(let e=n.registrations.length-1;e>=0;--e){let t=n.registrations[e];n.registry.deregisterNamespace(t.namespace)}Q(e,n.registry)}};return{filter:e=>(e.facetNamespaces?.namespaces?.length??0)>0,async processActivated(r,i,a){let o=a.getService(A);if(!o)throw Error(`FacetNamespaceRegistry is not available — ensure facet-namespace-registry is started before extensions with facetNamespaces.`);let s=(i.facetNamespaces?.namespaces??[]).map(e=>e.toRegistration()),c=e.get(r);n(r);let l=[];try{for(let e of s)o.registerNamespace(e),l.push(e)}catch(n){for(let e=l.length-1;e>=0;--e)o.deregisterNamespace(l[e].namespace);throw Q(e,o),t(r,c),n}e.set(r,{registry:o,registrations:s})},async processStopped(e){try{n(e)}catch(t){console.error(`[FacetNamespaceContributionProcessor] Deregister error for "${e}":`,t)}}}}function $(e,t){for(let n of e.values())if(n.registry===t)for(let e of n.registrations)t.registerBinding(e)}function Li(){let e=new Map,t=(t,n)=>{if(n){for(let e of n.registrations)n.registry.registerBinding(e);e.set(t,n)}},n=t=>{let n=e.get(t);if(n){e.delete(t);for(let e=n.registrations.length-1;e>=0;--e){let t=n.registrations[e];n.registry.deregisterBinding(t.id)}$(e,n.registry)}};return{filter:e=>(e.surfaceBindings?.bindings?.length??0)>0,async processActivated(r,i,a){let o=a.getService(k);if(!o)throw Error(`SurfaceBindingRegistry is not available — ensure surface-binding-registry is started before extensions with surfaceBindings.`);let s=(i.surfaceBindings?.bindings??[]).map(e=>e.toRegistration()),c=e.get(r);n(r);let l=[];try{for(let e of s)o.registerBinding(e),l.push(e)}catch(n){for(let e=l.length-1;e>=0;--e)o.deregisterBinding(l[e].id);throw $(e,o),t(r,c),n}e.set(r,{registry:o,registrations:s})},async processStopped(e){try{n(e)}catch(t){console.error(`[SurfaceBindingContributionProcessor] Deregister error for "${e}":`,t)}}}}function Ri(){let e=new Map;return{filter:e=>!!e.workflowBlocks?.blocks,async processActivated(t,n,r){let i=r.getService(j);if(!i)throw Error(`WorkflowBlockRegistry is not available — ensure workflow-block-registry is started before extensions with workflowBlocks.`);await i.register(t,n.workflowBlocks.blocks),e.set(t,()=>i.deregister(t))},async processStopped(t){let n=e.get(t);if(n){try{await n()}catch(e){console.error(`[WorkflowBlockContributionProcessor] Deregister error for "${t}":`,e)}e.delete(t)}}}}function zi(){let e=new Map;return{filter:e=>!!(e.transitionRules?.rules?.length||e.transitionActions?.actions),async processActivated(t,n,r){let i=r.getService(D);if(!i)throw Error(`TransitionContributionProcessor: TransitionPipelineService is not available — ensure '${D.name}' is started before extensions with transitionRules or transitionActions.`);let a=n.transitionRules?.rules??[],o=n.transitionActions?.actions,s=a.length>0,c=o!==void 0;s&&Bi(t,a),c&&Vi(t,o);let l=!1,u=!1;try{s&&(i.ruleRegistry.register(t,a),l=!0),c&&(i.actionRegistry.register(t,o),u=!0)}catch(e){throw l&&i.ruleRegistry.deregister(t),u&&i.actionRegistry.deregister(t),e}e.set(t,()=>{s&&i.ruleRegistry.deregister(t),c&&i.actionRegistry.deregister(t)})},async processStopped(t){let n=e.get(t);if(n){try{n()}catch(e){console.error(`[TransitionContributionProcessor] Deregister error for "${t}":`,e)}e.delete(t)}}}}function Bi(e,t){let n=`${e}.`;for(let e of t)if(!e.id.startsWith(n))throw Error(`TransitionContributionProcessor: rule '${e.id}' must be namespaced by extension '${n}'`)}function Vi(e,t){let n=`${e}.`;for(let e of Object.keys(t))if(!e.startsWith(n))throw Error(`TransitionContributionProcessor: action type '${e}' must be namespaced by extension '${n}'`)}const Hi=[S,vt,P,g,Jr,Qr,F,I,Vr,Hr,Ur,Wr,L,C,Zr,Mr,Tr,vi,Yr,x,M,yi,w,Xr,yt,_n,di,N,Oe,R,ui];export{gi as AdapterIdentityRegistry,nt as AdapterRegistry,S as AdapterRuntimeNamespace,wt as AdapterRuntimeSchemas,kt as AdapterRuntimeSubjects,Nr as AgentInstanceStatusSchema,P as AgentRuntimeNamespace,Pr as AgentRuntimeSchemas,Fr as AgentRuntimeSelectionSchema,Ir as AgentRuntimeSubjects,g as AgentStorageNamespace,m as AgentStorageSubjects,Zn as ArtifactLifecycleHookRegistry,O as ArtifactLifecycleHookRegistryToken,Dn as ArtifactLifecycleHookRejectedError,T as ArtifactSchemaRegistry,E as ArtifactSchemaRegistryToken,rn as BugEntrySchema,_t as CONNECTOR_SWAP_DEFAULT_PIPELINE,fr as CachedRegistryFetcher,zn as CanonicalModelResolutionError,Ln as CanonicalModelResolver,Tn as CanonicalModelService,ir as CapabilityService,Xn as CapabilityToken,Lr as CodebaseChangedEventSchema,F as CodebaseNamespace,Rr as CodebaseSchemas,zr as CodebaseSubjects,an as CompressRequestSchema,on as CompressResponseSchema,sn as CompressionEventSchema,I as CompressionNamespace,cn as CompressionSchemas,Br as CompressionSubjects,It as ContainerCreatedSchema,Yt as ContainerDestroyedSchema,Jt as ContainerIsolatedExecutionTargetSchema,Qt as ContainerIsolatedSpawnRequestSchema,Wt as ContainerLocalExecutionTargetSchema,Rt as ContainerLocalSpawnRequestSchema,Zt as ContainerRuntimeSchema,qr as ContainerSpawnNamespace,Kr as ContainerSpawnSubjects,jt as ContainerStartedSchema,Xt as ContainerStateSchema,Ft as ContainerStoppedSchema,ft as ContextWindowTracker,L as DockerNamespace,Gr as DockerSubjects,dt as EmbeddingIndexManager,Kt as ExecutionTargetInputSchema,Bt as ExecutionTargetListQuerySchema,C as ExecutionTargetNamespace,Lt as ExecutionTargetResolveRequestSchema,Gt as ExecutionTargetSchema,qt as ExecutionTargetSchemas,$t as ExecutionTargetSubjects,zt as ExecutionTargetTypeSchema,ln as ExtractedContextSchema,On as FacetNamespaceRegistry,A as FacetNamespaceRegistryToken,lr as FallbackRegistryFetcher,Hi as FrameworkServicesCoreNamespaces,Ut as LocalExecutionTargetSchema,ct as MakaioSession,pt as MakaioSessionService,x as MessageRoutingNamespace,Ze as MessageRoutingSubjects,en as MessageStorageNamespace,tn as MessageStorageSubjects,M as ModelRegistryNamespace,ur as ModelRegistryProviderNotFoundError,or as ModelRegistrySchema,cr as ModelRegistrySchemas,sr as ModelRegistryService,dr as ModelRegistrySubjects,Hn as ModelRegistryToken,fn as PreferenceItemSchema,pn as PreferenceKeySchema,mn as PreferenceValueSchema,w as PreferencesNamespace,hn as PreferencesSchemas,gn as PreferencesSubjects,Ct as ProviderContextActivationError,pr as ProviderModelOverrideSchema,Tt as ResolveIdRequestSchema,Et as ResolveIdResponseSchema,Dt as ResolveNameRequestSchema,Ot as ResolveNameResponseSchema,bt as RuntimeProviderContextResolutionError,ze as SessionBridge,Jn as SessionBridgeToken,c as SessionEventStorageNamespace,o as SessionEventStorageSubjects,Pe as SessionExtensionContextImpl,Ye as SessionOrchestrator,$n as SessionOrchestratorToken,Ae as SessionStorageNamespace,je as SessionStorageSubjects,Un as SessionStorageToken,Wn as SessionToken,Fe as SessionTurnManager,Pt as SpawnRequestSchema,Ht as SpawnResponseSchema,At as StatusRequestSchema,Vt as StatusResponseSchema,Mt as StopRequestSchema,Nt as StopResponseSchema,Dr as SubagentFailureFinalizationError,kr as SubagentManager,Er as SubagentService,jr as SubagentServiceToken,$r as SubagentTemplateCompletedEventSchema,ei as SubagentTemplateCreateSchema,ti as SubagentTemplateInstanceSchema,ni as SubagentTemplateInstanceStatusSchema,R as SubagentTemplateKernelNamespace,ri as SubagentTemplateKernelSchemas,ii as SubagentTemplateSchema,ai as SubagentTemplateSettingsSchemas,oi as SubagentTemplateSpawnRequestSchema,si as SubagentTemplateSpawnedEventSchema,fi as SubagentTemplateSubjects,ci as SubagentTemplateSummarySchema,li as SubagentTemplateUpdateSchema,wn as SurfaceBindingRegistry,k as SurfaceBindingRegistryToken,un as TechnicalDetailsSchema,dn as TodoEntrySchema,mr as ToolApprovalService,Yn as ToolApprovalToken,yn as ToolRegistry,Gn as ToolRegistryToken,kn as TransitionActionRegistry,Cn as TransitionPipelineService,D as TransitionPipelineToken,En as TransitionRuleRegistry,hr as TrayMenuEntrySchema,gr as TrayMenuGroupEntrySchema,_r as TrayMenuGroupSchema,vr as TrayMenuItemClickedSchema,yr as TrayMenuListEntrySchema,br as TrayMenuMetadataSchema,N as TrayMenuNamespace,xr as TrayMenuSchemas,Sr as TrayMenuSectionSchema,wr as TrayMenuService,Cr as TrayMenuSubjects,Bn as TrayMenuToken,Re as Turn,qe as TurnContextEnricher,nn as TurnStorageNamespace,ke as TurnStorageSubjects,Pn as WORKFLOW_START_ACTION_TYPE,rr as WorkflowBlockRegistry,j as WorkflowBlockRegistryToken,he as actionRegistry,St as activateProviderContext,e as agents,nr as artifactLifecycleHookRegistryPackage,Vn as artifactSchemaRegistryPackage,ve as assembleForkContext,mi as buildDeterministicAdapterId,f as buildRecoveryContext,ne as buildRecoveryContextWithPipeline,l as buildSessionContext,le as buildTurnInitiator,Rn as canonicalModelPackage,tr as capabilityPackage,Si as createArtifactKindContributionProcessor,wi as createArtifactLifecycleHookContributionProcessor,Ii as createFacetNamespaceContributionProcessor,Fn as createModelRegistryPackage,Le as createSessionExtensionContext,Or as createSubagentServicePackage,Li as createSurfaceBindingContributionProcessor,Qn as createToolContributionProcessor,zi as createTransitionContributionProcessor,Ri as createWorkflowBlockContributionProcessor,d as ensureAgentCwd,Ee as ensureAgentModel,fe as extractTextContent,bn as facetNamespaceRegistryPackage,gt as fetchAgentsBySession,Ge as fetchMessageCountsBySession,v as fetchPreviewBySession,He as fetchSessionPreviewMaps,ue as findTurnByAgent,er as frameworkCorePackages,te as getFullConversation,be as getOrCreateSession,ot as importCursors,mt as importCursorsDual,Ve as kindToBranchKind,at as mapAgentsBySession,ht as mapRowToSession,Ne as mapToSession,ar as mergeModelMetadata,Xe as messageRouting,Qe as messageRoutingDual,i as messages,ae as normalizeSelectionString,de as normalizeToBlocks,Ke as parseForkTransforms,We as pickFallbackRuntimeOptions,re as recoverAgent,ce as registerAbandonHandler,hi as registerAdapterRuntimeIdentityHandlers,ge as registerAttachHandler,ye as registerBuiltInActions,oe as registerCompressHandler,rt as registerCompressLineageResolver,st as registerCoreSessionServiceHandlers,it as registerDrizzleAgentStorage,tt as registerDrizzleImportCursorStorage,lt as registerDrizzleMessageRoutingStorage,Me as registerDrizzleMessageStorage,u as registerDrizzleSessionEventStorage,y as registerDrizzleSessionStorage,se as registerDrizzleTurnStorage,pe as registerForkHandler,et as registerFtsSearchHandler,Je as registerGetStatusCountsHandler,_ as registerListActionsHandler,b as registerMemoryAgentStorage,Ue as registerMemoryMessageStorage,ie as registerMemorySessionEventStorage,Be as registerMemorySessionStorage,De as registerMemoryTurnStorage,xe as registerMergeHandler,$e as registerParentResolver,Ie as registerResumeHandler,ut as registerSpawningToolCallResolver,Se as resetBuiltInActionsRegistration,me as resolveAdapterId,Te as resolveAdapterNameById,Ti as resolveArtifactContext,pi as resolveDeterministicAdapterId,h as resolveExecutionTarget,ee as resolveModelCapabilities,xt as resolveRuntimeProviderContext,_e as resolveTargetAgents,Ce as routeToAgents,we as routeToAgentsCore,In as sessionBridgePackage,s as sessionEvents,a as sessionEventsDual,Sn as sessionOrchestratorPackage,xn as sessionPackage,Mn as sessionStoragePackage,t as sessions,Ar as subagentServicePackage,qn as surfaceBindingRegistryPackage,vn as toolApprovalPackage,Kn as toolRegistryPackage,An as transitionPipelinePackage,jn as trayMenuPackage,r as turns,n as turnsDual,p as verifyAndRecoverAgents,Nn as workflowBlockRegistryPackage};
@@ -1,10 +1,10 @@
1
- import { $ as ingestCompletedTurn, $t as RecoveryConfig, A as SelectTurn, At as registerMemorySessionStorage, B as OBSERVED_SESSION_INGESTION_POLICY_CAPABILITY_ID, Bt as normalizeSelectionString, C as MessageRoutingSubjects, Ct as fetchPreviewBySession, D as registerMemoryMessageStorage, Dt as registerDrizzleAgentStorage, E as messages, Et as registerFtsSearchHandler, F as EmbeddingIndexManager, Ft as SessionBridge, G as unregisterObservedSessionIngestionPolicyProvider, Gt as actionRegistry, H as ObservedSessionIngestionPolicyImportStatus, Ht as registerListActionsHandler, I as registerDrizzleImportCursorStorage, It as assembleForkContext, J as isPolicyDiscoveredObservedSession, Jt as ContextWindowTracker, K as LogImportTriggerSubjects, Kt as registerGetStatusCountsHandler, L as importCursors, Lt as FallbackRuntimeOptions, M as turnsDual, Mt as AgentStorageSubjects, N as registerMemoryTurnStorage, Nt as SessionExtensionContextImpl, O as registerDrizzleMessageStorage, Ot as registerMemoryAgentStorage, P as registerDrizzleTurnStorage, Pt as createSessionExtensionContext, Q as IngestTurnMessage, Qt as buildTurnInitiator, R as importCursorsDual, Rt as pickFallbackRuntimeOptions, S as MessageRoutingNamespace, St as fetchMessageCountsBySession, T as SelectMessage, Tt as parseForkTransforms, U as ObservedSessionIngestionPolicyInput, Ut as registerBuiltInActions, V as ObservedSessionIngestionPolicyDecision, Vt as resolveAdapterNameById, W as registerObservedSessionIngestionPolicyProvider, Wt as resetBuiltInActionsRegistration, X as IngestCompletedTurnParams, Xt as ContextWindowTrackerConfig, Y as isTrackingStub, Yt as AgentContextState, Z as IngestCompletedTurnResult, Zt as SessionContextWindowState, _ as InsertMessageRouting, _n as SessionOrchestrator, _t as mapAgentsBySession, a as buildSessionContext, an as buildRecoveryContext, at as emitSessionTurnStarted, b as messageRoutingDual, bt as SearchSessionRow, c as kindToBranchKind, cn as resolveModelCapabilities, ct as registerDrizzleSessionEventStorage, d as registerSpawningToolCallResolver, dn as resolveTargetAgents, dt as SelectSessionEvent, en as buildRecoveryContextWithPipeline, et as EventTransform, f as registerCompressLineageResolver, fn as extractTextContent, ft as sessionEvents, g as StartTurnOptions, gn as ISessionOrchestrator, gt as fetchSessionPreviewMaps, h as MakaioSessionConfig, hn as AdapterRegistry, ht as SessionPreviewMaps, i as getFullConversation, in as verifyAndRecoverAgents, it as appendSessionLifecycleEvent, j as turns, jt as AgentStorageNamespace, k as InsertTurn, kt as registerDrizzleSessionStorage, l as toSessionLineage, ln as findTurnByAgent, lt as registerMemorySessionEventStorage, m as MakaioSession, mn as TurnContextEnricher, mt as getSessionAncestorChain, n as NativeLocalityIntent, nn as ensureAgentModel, nt as SessionTurnStartedPayload, o as BuildContextOptions, on as resolveAdapterId, ot as emitSessionUserMessageSent, p as registerParentResolver, pn as normalizeToBlocks, pt as sessionEventsDual, q as ObservedSessionIngestionService, qt as registerResumeHandler, r as evaluateNativeLocality, rn as recoverAgent, rt as SessionUserMessageSentPayload, s as ContextAssemblyResult, sn as resolveExecutionTarget, st as registerSessionLifecycleEventWriters, t as NativeLocalityInput, tn as ensureAgentCwd, tt as SessionLifecycleEventArgs, u as registerSessionDiscoveredHandler, un as getOrCreateSession, ut as InsertSessionEvent, v as SelectMessageRouting, vn as registerCoreSessionServiceHandlers, vt as mapToSession, w as InsertMessage, wt as mapRowToSession, x as registerDrizzleMessageRoutingStorage, xt as fetchAgentsBySession, y as messageRouting, yn as MakaioSessionService, yt as SearchFilters, z as IObservedSessionIngestionPolicyProvider, zt as CONNECTOR_SWAP_DEFAULT_PIPELINE } from "../../index-Do7Wgio_2.mjs";
1
+ import { $ as ingestCompletedTurn, $t as RecoveryConfig, A as SelectTurn, At as registerMemorySessionStorage, B as OBSERVED_SESSION_INGESTION_POLICY_CAPABILITY_ID, Bt as normalizeSelectionString, C as MessageRoutingSubjects, Ct as fetchPreviewBySession, D as registerMemoryMessageStorage, Dt as registerDrizzleAgentStorage, E as messages, Et as registerFtsSearchHandler, F as EmbeddingIndexManager, Ft as SessionBridge, G as unregisterObservedSessionIngestionPolicyProvider, Gt as actionRegistry, H as ObservedSessionIngestionPolicyImportStatus, Ht as registerListActionsHandler, I as registerDrizzleImportCursorStorage, It as assembleForkContext, J as isPolicyDiscoveredObservedSession, Jt as ContextWindowTracker, K as LogImportTriggerSubjects, Kt as registerGetStatusCountsHandler, L as importCursors, Lt as FallbackRuntimeOptions, M as turnsDual, Mt as AgentStorageSubjects, N as registerMemoryTurnStorage, Nt as SessionExtensionContextImpl, O as registerDrizzleMessageStorage, Ot as registerMemoryAgentStorage, P as registerDrizzleTurnStorage, Pt as createSessionExtensionContext, Q as IngestTurnMessage, Qt as buildTurnInitiator, R as importCursorsDual, Rt as pickFallbackRuntimeOptions, S as MessageRoutingNamespace, St as fetchMessageCountsBySession, T as SelectMessage, Tt as parseForkTransforms, U as ObservedSessionIngestionPolicyInput, Ut as registerBuiltInActions, V as ObservedSessionIngestionPolicyDecision, Vt as resolveAdapterNameById, W as registerObservedSessionIngestionPolicyProvider, Wt as resetBuiltInActionsRegistration, X as IngestCompletedTurnParams, Xt as ContextWindowTrackerConfig, Y as isTrackingStub, Yt as AgentContextState, Z as IngestCompletedTurnResult, Zt as SessionContextWindowState, _ as InsertMessageRouting, _n as SessionOrchestrator, _t as mapAgentsBySession, a as buildSessionContext, an as buildRecoveryContext, at as emitSessionTurnStarted, b as messageRoutingDual, bt as SearchSessionRow, c as kindToBranchKind, cn as resolveModelCapabilities, ct as registerDrizzleSessionEventStorage, d as registerSpawningToolCallResolver, dn as resolveTargetAgents, dt as SelectSessionEvent, en as buildRecoveryContextWithPipeline, et as EventTransform, f as registerCompressLineageResolver, fn as extractTextContent, ft as sessionEvents, g as StartTurnOptions, gn as ISessionOrchestrator, gt as fetchSessionPreviewMaps, h as MakaioSessionConfig, hn as AdapterRegistry, ht as SessionPreviewMaps, i as getFullConversation, in as verifyAndRecoverAgents, it as appendSessionLifecycleEvent, j as turns, jt as AgentStorageNamespace, k as InsertTurn, kt as registerDrizzleSessionStorage, l as toSessionLineage, ln as findTurnByAgent, lt as registerMemorySessionEventStorage, m as MakaioSession, mn as TurnContextEnricher, mt as getSessionAncestorChain, n as NativeLocalityIntent, nn as ensureAgentModel, nt as SessionTurnStartedPayload, o as BuildContextOptions, on as resolveAdapterId, ot as emitSessionUserMessageSent, p as registerParentResolver, pn as normalizeToBlocks, pt as sessionEventsDual, q as ObservedSessionIngestionService, qt as registerResumeHandler, r as evaluateNativeLocality, rn as recoverAgent, rt as SessionUserMessageSentPayload, s as ContextAssemblyResult, sn as resolveExecutionTarget, st as registerSessionLifecycleEventWriters, t as NativeLocalityInput, tn as ensureAgentCwd, tt as SessionLifecycleEventArgs, u as registerSessionDiscoveredHandler, un as getOrCreateSession, ut as InsertSessionEvent, v as SelectMessageRouting, vn as registerCoreSessionServiceHandlers, vt as mapToSession, w as InsertMessage, wt as mapRowToSession, x as registerDrizzleMessageRoutingStorage, xt as fetchAgentsBySession, y as messageRouting, yn as MakaioSessionService, yt as SearchFilters, z as IObservedSessionIngestionPolicyProvider, zt as CONNECTOR_SWAP_DEFAULT_PIPELINE } from "../../index-BDr2Ba122.mjs";
2
2
  import { a as registerCompressHandler, c as SessionTurnManager, d as TurnContext, f as TurnPairStateChange, i as registerForkHandler, l as Turn, m as TurnResult, n as routeToAgents, o as registerAttachHandler, p as TurnPairTerminalOutcome, r as registerMergeHandler, s as registerAbandonHandler, t as routeToAgentsCore, u as TurnConfig } from "../../index-T96ydgVk.mjs";
3
3
  import { l as resolveRuntimeProviderContext } from "../../index-CagRgpXI2.mjs";
4
- import { i as SessionStorageSubjects, r as SessionStorageNamespace } from "../../namespace-CQBSXm1U.mjs";
5
- import { a as agents, c as sessionsDual, o as agentsDual, s as sessions } from "../../schema-BnTOFCdU.mjs";
6
- import { n as SessionEventStorageSubjects, t as SessionEventStorageNamespace } from "../../namespace-CpyL93kW.mjs";
4
+ import { i as SessionStorageSubjects, r as SessionStorageNamespace } from "../../namespace-B0uZIZYT.mjs";
5
+ import { a as agents, c as sessionsDual, o as agentsDual, s as sessions } from "../../schema-aOwmHxaF.mjs";
6
+ import { n as SessionEventStorageSubjects, t as SessionEventStorageNamespace } from "../../namespace-CCZXyxSe.mjs";
7
7
  import { t as TurnStorageNamespace } from "../../namespace-Dar3O6iT.mjs";
8
8
  import { n as TurnStorageSubjects } from "../../namespace-DoNigVgx.mjs";
9
- import { i as MessageStorageSubjects, r as MessageStorageNamespace } from "../../namespace-D3SQQgxa2.mjs";
9
+ import { i as MessageStorageSubjects, r as MessageStorageNamespace } from "../../namespace-CukqFYHf2.mjs";
10
10
  export { AdapterRegistry, AgentContextState, AgentStorageNamespace, AgentStorageSubjects, BuildContextOptions, CONNECTOR_SWAP_DEFAULT_PIPELINE, ContextAssemblyResult, ContextWindowTracker, ContextWindowTrackerConfig, EmbeddingIndexManager, EventTransform, FallbackRuntimeOptions, IObservedSessionIngestionPolicyProvider, ISessionOrchestrator, IngestCompletedTurnParams, IngestCompletedTurnResult, IngestTurnMessage, InsertMessage, InsertMessageRouting, InsertSessionEvent, InsertTurn, LogImportTriggerSubjects, MakaioSession, MakaioSessionConfig, MakaioSessionService, MessageRoutingNamespace, MessageRoutingSubjects, MessageStorageNamespace, MessageStorageSubjects, NativeLocalityInput, NativeLocalityIntent, OBSERVED_SESSION_INGESTION_POLICY_CAPABILITY_ID, ObservedSessionIngestionPolicyDecision, ObservedSessionIngestionPolicyImportStatus, ObservedSessionIngestionPolicyInput, ObservedSessionIngestionService, RecoveryConfig, SearchFilters, SearchSessionRow, SelectMessage, SelectMessageRouting, SelectSessionEvent, SelectTurn, SessionBridge, SessionContextWindowState, SessionEventStorageNamespace, SessionEventStorageSubjects, SessionExtensionContextImpl, SessionLifecycleEventArgs, SessionOrchestrator, SessionPreviewMaps, SessionStorageNamespace, SessionStorageSubjects, SessionTurnManager, SessionTurnStartedPayload, SessionUserMessageSentPayload, StartTurnOptions, Turn, TurnConfig, TurnContext, TurnContextEnricher, TurnPairStateChange, TurnPairTerminalOutcome, TurnResult, TurnStorageNamespace, TurnStorageSubjects, actionRegistry, agents, agentsDual, appendSessionLifecycleEvent, assembleForkContext, buildRecoveryContext, buildRecoveryContextWithPipeline, buildSessionContext, buildTurnInitiator, createSessionExtensionContext, emitSessionTurnStarted, emitSessionUserMessageSent, ensureAgentCwd, ensureAgentModel, evaluateNativeLocality, extractTextContent, fetchAgentsBySession, fetchMessageCountsBySession, fetchPreviewBySession, fetchSessionPreviewMaps, findTurnByAgent, getFullConversation, getOrCreateSession, getSessionAncestorChain, importCursors, importCursorsDual, ingestCompletedTurn, isPolicyDiscoveredObservedSession, isTrackingStub, kindToBranchKind, mapAgentsBySession, mapRowToSession, mapToSession, messageRouting, messageRoutingDual, messages, normalizeSelectionString, normalizeToBlocks, parseForkTransforms, pickFallbackRuntimeOptions, recoverAgent, registerAbandonHandler, registerAttachHandler, registerBuiltInActions, registerCompressHandler, registerCompressLineageResolver, registerCoreSessionServiceHandlers, registerDrizzleAgentStorage, registerDrizzleImportCursorStorage, registerDrizzleMessageRoutingStorage, registerDrizzleMessageStorage, registerDrizzleSessionEventStorage, registerDrizzleSessionStorage, registerDrizzleTurnStorage, registerForkHandler, registerFtsSearchHandler, registerGetStatusCountsHandler, registerListActionsHandler, registerMemoryAgentStorage, registerMemoryMessageStorage, registerMemorySessionEventStorage, registerMemorySessionStorage, registerMemoryTurnStorage, registerMergeHandler, registerObservedSessionIngestionPolicyProvider, registerParentResolver, registerResumeHandler, registerSessionDiscoveredHandler, registerSessionLifecycleEventWriters, registerSpawningToolCallResolver, resetBuiltInActionsRegistration, resolveAdapterId, resolveAdapterNameById, resolveExecutionTarget, resolveModelCapabilities, resolveRuntimeProviderContext, resolveTargetAgents, routeToAgents, routeToAgentsCore, sessionEvents, sessionEventsDual, sessions, sessionsDual, toSessionLineage, turns, turnsDual, unregisterObservedSessionIngestionPolicyProvider, verifyAndRecoverAgents };
@@ -1,2 +1,2 @@
1
- import { i as MessageStorageSubjects, n as MessagePageCursorSchema, r as MessageStorageNamespace, t as MessagePageCursor } from "../../../namespace-D3SQQgxa2.mjs";
1
+ import { i as MessageStorageSubjects, n as MessagePageCursorSchema, r as MessageStorageNamespace, t as MessagePageCursor } from "../../../namespace-CukqFYHf2.mjs";
2
2
  export { MessagePageCursor, MessagePageCursorSchema, MessageStorageNamespace, MessageStorageSubjects };
@@ -1,2 +1,2 @@
1
- import { n as SessionEventStorageSubjects, t as SessionEventStorageNamespace } from "../../../namespace-CpyL93kW.mjs";
1
+ import { n as SessionEventStorageSubjects, t as SessionEventStorageNamespace } from "../../../namespace-CCZXyxSe.mjs";
2
2
  export { SessionEventStorageNamespace, SessionEventStorageSubjects };
@@ -1,2 +1,2 @@
1
- import { a as SessionWithPreview, i as SessionStorageSubjects, n as SessionPreviewDataSchema, o as SessionWithPreviewSchema, r as SessionStorageNamespace, t as SessionPreviewData } from "../../../namespace-CQBSXm1U.mjs";
1
+ import { a as SessionWithPreview, i as SessionStorageSubjects, n as SessionPreviewDataSchema, o as SessionWithPreviewSchema, r as SessionStorageNamespace, t as SessionPreviewData } from "../../../namespace-B0uZIZYT.mjs";
2
2
  export { SessionPreviewData, SessionPreviewDataSchema, SessionStorageNamespace, SessionStorageSubjects, SessionWithPreview, SessionWithPreviewSchema };
@@ -1,2 +1,2 @@
1
- import { a as agents, c as sessionsDual, i as SelectSession, n as InsertSession, o as agentsDual, r as SelectAgent, s as sessions, t as InsertAgent } from "../../../schema-BnTOFCdU.mjs";
1
+ import { a as agents, c as sessionsDual, i as SelectSession, n as InsertSession, o as agentsDual, r as SelectAgent, s as sessions, t as InsertAgent } from "../../../schema-aOwmHxaF.mjs";
2
2
  export { InsertAgent, InsertSession, SelectAgent, SelectSession, agents, agentsDual, sessions, sessionsDual };
@@ -496,8 +496,8 @@ declare const SubagentTemplateSettingsNamespace: _$_makaio_core0.BusNamespaceDef
496
496
  model: _$zod.ZodOptional<_$zod.ZodString>;
497
497
  systemPrompt: _$zod.ZodOptional<_$zod.ZodString>;
498
498
  contextMode: _$zod.ZodDefault<_$zod.ZodEnum<{
499
- fresh: "fresh";
500
499
  fork: "fork";
500
+ fresh: "fresh";
501
501
  }>>;
502
502
  allowedTools: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
503
503
  disallowedTools: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
@@ -512,17 +512,17 @@ declare const SubagentTemplateSettingsNamespace: _$_makaio_core0.BusNamespaceDef
512
512
  request: _$zod.ZodObject<{
513
513
  name: _$zod.ZodString;
514
514
  enabled: _$zod.ZodDefault<_$zod.ZodBoolean>;
515
- adapterName: _$zod.ZodString;
516
515
  providerConfigId: _$zod.ZodOptional<_$zod.ZodString>;
517
516
  model: _$zod.ZodOptional<_$zod.ZodString>;
517
+ systemPrompt: _$zod.ZodOptional<_$zod.ZodString>;
518
+ allowedTools: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
519
+ disallowedTools: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
520
+ allowedDirectories: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
518
521
  contextMode: _$zod.ZodDefault<_$zod.ZodEnum<{
519
- fresh: "fresh";
520
522
  fork: "fork";
523
+ fresh: "fresh";
521
524
  }>>;
522
- disallowedTools: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
523
- allowedDirectories: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
524
- systemPrompt: _$zod.ZodOptional<_$zod.ZodString>;
525
- allowedTools: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
525
+ adapterName: _$zod.ZodString;
526
526
  }, _$zod_v4_core0.$strip>;
527
527
  response: _$zod.ZodObject<{
528
528
  id: _$zod.ZodString;
@@ -537,8 +537,8 @@ declare const SubagentTemplateSettingsNamespace: _$_makaio_core0.BusNamespaceDef
537
537
  model: _$zod.ZodOptional<_$zod.ZodOptional<_$zod.ZodString>>;
538
538
  systemPrompt: _$zod.ZodOptional<_$zod.ZodOptional<_$zod.ZodString>>;
539
539
  contextMode: _$zod.ZodOptional<_$zod.ZodDefault<_$zod.ZodEnum<{
540
- fresh: "fresh";
541
540
  fork: "fork";
541
+ fresh: "fresh";
542
542
  }>>>;
543
543
  allowedTools: _$zod.ZodOptional<_$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>>;
544
544
  disallowedTools: _$zod.ZodOptional<_$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>>;
@@ -587,8 +587,8 @@ declare const SubagentTemplateSettingsSubjects: _$_makaio_core0.BusSubjects<_$_m
587
587
  model: _$zod.ZodOptional<_$zod.ZodString>;
588
588
  systemPrompt: _$zod.ZodOptional<_$zod.ZodString>;
589
589
  contextMode: _$zod.ZodDefault<_$zod.ZodEnum<{
590
- fresh: "fresh";
591
590
  fork: "fork";
591
+ fresh: "fresh";
592
592
  }>>;
593
593
  allowedTools: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
594
594
  disallowedTools: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
@@ -603,17 +603,17 @@ declare const SubagentTemplateSettingsSubjects: _$_makaio_core0.BusSubjects<_$_m
603
603
  request: _$zod.ZodObject<{
604
604
  name: _$zod.ZodString;
605
605
  enabled: _$zod.ZodDefault<_$zod.ZodBoolean>;
606
- adapterName: _$zod.ZodString;
607
606
  providerConfigId: _$zod.ZodOptional<_$zod.ZodString>;
608
607
  model: _$zod.ZodOptional<_$zod.ZodString>;
608
+ systemPrompt: _$zod.ZodOptional<_$zod.ZodString>;
609
+ allowedTools: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
610
+ disallowedTools: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
611
+ allowedDirectories: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
609
612
  contextMode: _$zod.ZodDefault<_$zod.ZodEnum<{
610
- fresh: "fresh";
611
613
  fork: "fork";
614
+ fresh: "fresh";
612
615
  }>>;
613
- disallowedTools: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
614
- allowedDirectories: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
615
- systemPrompt: _$zod.ZodOptional<_$zod.ZodString>;
616
- allowedTools: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
616
+ adapterName: _$zod.ZodString;
617
617
  }, _$zod_v4_core0.$strip>;
618
618
  response: _$zod.ZodObject<{
619
619
  id: _$zod.ZodString;
@@ -628,8 +628,8 @@ declare const SubagentTemplateSettingsSubjects: _$_makaio_core0.BusSubjects<_$_m
628
628
  model: _$zod.ZodOptional<_$zod.ZodOptional<_$zod.ZodString>>;
629
629
  systemPrompt: _$zod.ZodOptional<_$zod.ZodOptional<_$zod.ZodString>>;
630
630
  contextMode: _$zod.ZodOptional<_$zod.ZodDefault<_$zod.ZodEnum<{
631
- fresh: "fresh";
632
631
  fork: "fork";
632
+ fresh: "fresh";
633
633
  }>>>;
634
634
  allowedTools: _$zod.ZodOptional<_$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>>;
635
635
  disallowedTools: _$zod.ZodOptional<_$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>>;
@@ -18,8 +18,8 @@ declare const ExtensionConfigInputSchema: z.ZodObject<{
18
18
  id: z.ZodString;
19
19
  config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
20
20
  enabled: z.ZodBoolean;
21
- extensionName: z.ZodString;
22
21
  scope: z.ZodString;
22
+ extensionName: z.ZodString;
23
23
  }, z.core.$strip>;
24
24
  /** Query schema for listing extension configs. */
25
25
  declare const ExtensionConfigListQuerySchema: z.ZodObject<{
@@ -63,8 +63,8 @@ declare const ExtensionConfigStorageNamespace: _$_makaio_storage_core0.StorageNa
63
63
  id: z.ZodString;
64
64
  config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
65
65
  enabled: z.ZodBoolean;
66
- extensionName: z.ZodString;
67
66
  scope: z.ZodString;
67
+ extensionName: z.ZodString;
68
68
  }, z.core.$strip>;
69
69
  }, z.core.$strip>;
70
70
  response: z.ZodObject<{
@@ -131,8 +131,8 @@ declare const ExtensionConfigStorageSubjects: _$_makaio_core0.BusSubjects<_$_mak
131
131
  id: z.ZodString;
132
132
  config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
133
133
  enabled: z.ZodBoolean;
134
- extensionName: z.ZodString;
135
134
  scope: z.ZodString;
135
+ extensionName: z.ZodString;
136
136
  }, z.core.$strip>;
137
137
  }, z.core.$strip>;
138
138
  response: z.ZodObject<{
@@ -1,2 +1,2 @@
1
- import { a as InternalPendingRequest, c as SubagentServiceToken, d as SubagentFailureFinalizationErrorCode, f as SubagentService, i as InputResolver, l as subagentServicePackage, m as isPeerAuthorizedToDelegate, n as TrackOptions, o as SpawnOptions, p as SpawnDelegationAllowSet, r as AwaitResult, s as TrackedSubagent, t as SubagentManager, u as SubagentFailureFinalizationError } from "../../index-5s_dN3cg2.mjs";
2
- export { AwaitResult, InputResolver, InternalPendingRequest, SpawnDelegationAllowSet, SpawnOptions, SubagentFailureFinalizationError, SubagentFailureFinalizationErrorCode, SubagentManager, SubagentService, SubagentServiceToken, TrackOptions, TrackedSubagent, isPeerAuthorizedToDelegate, subagentServicePackage };
1
+ import { a as InternalPendingRequest, c as SubagentServiceToken, d as SubagentFailureFinalizationError, f as SubagentFailureFinalizationErrorCode, h as isPeerAuthorizedToDelegate, i as InputResolver, l as createSubagentServicePackage, m as SpawnDelegationAllowSet, n as TrackOptions, o as SpawnOptions, p as SubagentService, r as AwaitResult, s as TrackedSubagent, t as SubagentManager, u as subagentServicePackage } from "../../index-BmsPH78f2.mjs";
2
+ export { AwaitResult, InputResolver, InternalPendingRequest, SpawnDelegationAllowSet, SpawnOptions, SubagentFailureFinalizationError, SubagentFailureFinalizationErrorCode, SubagentManager, SubagentService, SubagentServiceToken, TrackOptions, TrackedSubagent, createSubagentServicePackage, isPeerAuthorizedToDelegate, subagentServicePackage };
@@ -1 +1 @@
1
- import{a as e,i as t,n,o as r,r as i,t as a}from"../../package-BwvGaKwn.mjs";export{i as SubagentFailureFinalizationError,e as SubagentManager,t as SubagentService,a as SubagentServiceToken,r as isPeerAuthorizedToDelegate,n as subagentServicePackage};
1
+ import{a as e,i as t,n,o as r,r as i,s as a,t as o}from"../../package-BYpWkSuQ.mjs";export{t as SubagentFailureFinalizationError,r as SubagentManager,e as SubagentService,o as SubagentServiceToken,n as createSubagentServicePackage,a as isPeerAuthorizedToDelegate,i as subagentServicePackage};
@@ -1,3 +1,3 @@
1
- import { _ as SubagentTemplateUpdate, a as SubagentTemplateInstance, c as SubagentTemplateInstanceStatusSchema, d as SubagentTemplateSettingsSchemas, f as SubagentTemplateSpawnRequest, g as SubagentTemplateSummarySchema, h as SubagentTemplateSummary, i as SubagentTemplateCreateSchema, l as SubagentTemplateKernelSchemas, m as SubagentTemplateSpawnedEventSchema, n as SubagentTemplateCompletedEventSchema, o as SubagentTemplateInstanceSchema, p as SubagentTemplateSpawnRequestSchema, r as SubagentTemplateCreate, s as SubagentTemplateInstanceStatus, t as SubagentTemplate, u as SubagentTemplateSchema, v as SubagentTemplateUpdateSchema } from "../../schemas--uwN5dfK2.mjs";
2
- import { n as SubagentTemplateSubjects, t as SubagentTemplateKernelNamespace } from "../../namespace-CGgOLxiW2.mjs";
1
+ import { _ as SubagentTemplateUpdate, a as SubagentTemplateInstance, c as SubagentTemplateInstanceStatusSchema, d as SubagentTemplateSettingsSchemas, f as SubagentTemplateSpawnRequest, g as SubagentTemplateSummarySchema, h as SubagentTemplateSummary, i as SubagentTemplateCreateSchema, l as SubagentTemplateKernelSchemas, m as SubagentTemplateSpawnedEventSchema, n as SubagentTemplateCompletedEventSchema, o as SubagentTemplateInstanceSchema, p as SubagentTemplateSpawnRequestSchema, r as SubagentTemplateCreate, s as SubagentTemplateInstanceStatus, t as SubagentTemplate, u as SubagentTemplateSchema, v as SubagentTemplateUpdateSchema } from "../../schemas-CoJCTFod2.mjs";
2
+ import { n as SubagentTemplateSubjects, t as SubagentTemplateKernelNamespace } from "../../namespace-rO-C2Dgu2.mjs";
3
3
  export { type SubagentTemplate, SubagentTemplateCompletedEventSchema, type SubagentTemplateCreate, SubagentTemplateCreateSchema, type SubagentTemplateInstance, SubagentTemplateInstanceSchema, type SubagentTemplateInstanceStatus, SubagentTemplateInstanceStatusSchema, SubagentTemplateKernelNamespace, SubagentTemplateKernelSchemas, SubagentTemplateSchema, SubagentTemplateSettingsSchemas, type SubagentTemplateSpawnRequest, SubagentTemplateSpawnRequestSchema, SubagentTemplateSpawnedEventSchema, SubagentTemplateSubjects, type SubagentTemplateSummary, SubagentTemplateSummarySchema, type SubagentTemplateUpdate, SubagentTemplateUpdateSchema };
@@ -1,2 +1,2 @@
1
- import { n as SubagentTemplateSubjects, t as SubagentTemplateKernelNamespace } from "../../namespace-CGgOLxiW2.mjs";
1
+ import { n as SubagentTemplateSubjects, t as SubagentTemplateKernelNamespace } from "../../namespace-rO-C2Dgu2.mjs";
2
2
  export { SubagentTemplateKernelNamespace, SubagentTemplateSubjects };
@@ -1,2 +1,2 @@
1
- import { _ as SubagentTemplateUpdate, a as SubagentTemplateInstance, c as SubagentTemplateInstanceStatusSchema, d as SubagentTemplateSettingsSchemas, f as SubagentTemplateSpawnRequest, g as SubagentTemplateSummarySchema, h as SubagentTemplateSummary, i as SubagentTemplateCreateSchema, l as SubagentTemplateKernelSchemas, m as SubagentTemplateSpawnedEventSchema, n as SubagentTemplateCompletedEventSchema, o as SubagentTemplateInstanceSchema, p as SubagentTemplateSpawnRequestSchema, r as SubagentTemplateCreate, s as SubagentTemplateInstanceStatus, t as SubagentTemplate, u as SubagentTemplateSchema, v as SubagentTemplateUpdateSchema } from "../../schemas--uwN5dfK2.mjs";
1
+ import { _ as SubagentTemplateUpdate, a as SubagentTemplateInstance, c as SubagentTemplateInstanceStatusSchema, d as SubagentTemplateSettingsSchemas, f as SubagentTemplateSpawnRequest, g as SubagentTemplateSummarySchema, h as SubagentTemplateSummary, i as SubagentTemplateCreateSchema, l as SubagentTemplateKernelSchemas, m as SubagentTemplateSpawnedEventSchema, n as SubagentTemplateCompletedEventSchema, o as SubagentTemplateInstanceSchema, p as SubagentTemplateSpawnRequestSchema, r as SubagentTemplateCreate, s as SubagentTemplateInstanceStatus, t as SubagentTemplate, u as SubagentTemplateSchema, v as SubagentTemplateUpdateSchema } from "../../schemas-CoJCTFod2.mjs";
2
2
  export { SubagentTemplate, SubagentTemplateCompletedEventSchema, SubagentTemplateCreate, SubagentTemplateCreateSchema, SubagentTemplateInstance, SubagentTemplateInstanceSchema, SubagentTemplateInstanceStatus, SubagentTemplateInstanceStatusSchema, SubagentTemplateKernelSchemas, SubagentTemplateSchema, SubagentTemplateSettingsSchemas, SubagentTemplateSpawnRequest, SubagentTemplateSpawnRequestSchema, SubagentTemplateSpawnedEventSchema, SubagentTemplateSummary, SubagentTemplateSummarySchema, SubagentTemplateUpdate, SubagentTemplateUpdateSchema };
@@ -1 +1 @@
1
- import{B as e,n as t,r as n,t as r}from"../../tools-C8vqn1KY.mjs";export{r as FILE_ACCESS_RULES_KEY,e as ToolRegistry,n as createToolContributionProcessor,t as extractToolFilePath};
1
+ import{B as e,n as t,r as n,t as r}from"../../tools-PC_L6g2m.mjs";export{r as FILE_ACCESS_RULES_KEY,e as ToolRegistry,n as createToolContributionProcessor,t as extractToolFilePath};
@@ -14,8 +14,8 @@ declare const COMPRESS_SESSION_LINEAGE_KIND: "compress";
14
14
  /** Discriminates the relationship of a session to its parent. */
15
15
  declare const SessionLineageKindSchema: z.ZodEnum<{
16
16
  fork: "fork";
17
- root: "root";
18
17
  subagent: "subagent";
18
+ root: "root";
19
19
  compress: "compress";
20
20
  }>;
21
21
  type SessionLineageKind = z.infer<typeof SessionLineageKindSchema>;
@@ -675,6 +675,13 @@ type LibSQLTransactionExecutor = MakaioDatabase['transaction'];
675
675
  * @typeParam T - Callback result type
676
676
  */
677
677
  type TransactionCallback<T> = Parameters<LibSQLTransactionExecutor>[0] extends ((tx: infer TTx) => Promise<unknown>) ? (tx: TTx) => Promise<T> : never;
678
+ /**
679
+ * Serialize one database operation with transactions using the same handle.
680
+ * @param db - Makaio database instance.
681
+ * @param operation - Async database work that must not overlap a transaction.
682
+ * @returns Result returned by the operation.
683
+ */
684
+ declare function serializeDatabaseOperation<T>(db: MakaioDatabase, operation: () => Promise<T>): Promise<T>;
678
685
  /**
679
686
  * Execute a database transaction through a shared transaction seam.
680
687
  *
@@ -1087,4 +1094,4 @@ declare module '@makaio/framework/storage' {
1087
1094
  }
1088
1095
  }
1089
1096
  //#endregion
1090
- export { DATABASE_DIALECT, type DialectSchema, type DrizzleHandlerRegistration, DrizzleSchemaRecord, type DrizzleWriteResult, type DualBuilder, type DualColumnBuilderBase, type DualColumnBundle, type DualColumnRef, type DualReferenceActions, type DualTable, type DualTableExtras, type Equal, type FtsMessageExcerptHit, type FtsMessageSearchInput, type FtsSearchStrategy, type FtsSessionCountInput, type FtsSessionSearchInput, type MakaioDatabase, NON_BASELINE_GENERATION_LEGS, type PostgresTwinSchema, type RawSqlExecutor, type RawSqlSession, STORAGE_ENGINE_URL_HINTS, type StorageDialect, type StorageEngine, type StorageEngineCapabilities, type StorageEngineErrorClassifiers, type StorageEngineGenerationLeg, type StorageEngineMigrationBehavior, type StorageEngineUrlHint, type StorageEngineUrlResolution, type StorageNamespace, type StorageNamespaceConfig, type StorageNamespaceExtensions, type TransactionCallback, affectedRowCount, brandDatabase, buildFirstUserMessagePreviewQuery, createStorageNamespace, defineDialectSchema, defineDualTable, describeMissingStorageEngine, didAffectRows, executeTransaction, findGenerationLegForDialect, findStorageEngine, getDatabaseDialect, getRawSqlExecutor, getStorageEngine, importRuntimeModule, isSqliteDuplicateObjectError, isSqliteUniqueViolationError, quoteSqlIdentifier, readErrorCode, registerDrizzleHandlers, registerStorageEngine, resolveSchema, resolveStorageEngine, resolveStorageEngineForUrl, sanitizeFtsQuery, someInCauseChain, sqliteFtsSearchStrategy, sqliteStorageEngine };
1097
+ export { DATABASE_DIALECT, type DialectSchema, type DrizzleHandlerRegistration, DrizzleSchemaRecord, type DrizzleWriteResult, type DualBuilder, type DualColumnBuilderBase, type DualColumnBundle, type DualColumnRef, type DualReferenceActions, type DualTable, type DualTableExtras, type Equal, type FtsMessageExcerptHit, type FtsMessageSearchInput, type FtsSearchStrategy, type FtsSessionCountInput, type FtsSessionSearchInput, type MakaioDatabase, NON_BASELINE_GENERATION_LEGS, type PostgresTwinSchema, type RawSqlExecutor, type RawSqlSession, STORAGE_ENGINE_URL_HINTS, type StorageDialect, type StorageEngine, type StorageEngineCapabilities, type StorageEngineErrorClassifiers, type StorageEngineGenerationLeg, type StorageEngineMigrationBehavior, type StorageEngineUrlHint, type StorageEngineUrlResolution, type StorageNamespace, type StorageNamespaceConfig, type StorageNamespaceExtensions, type TransactionCallback, affectedRowCount, brandDatabase, buildFirstUserMessagePreviewQuery, createStorageNamespace, defineDialectSchema, defineDualTable, describeMissingStorageEngine, didAffectRows, executeTransaction, findGenerationLegForDialect, findStorageEngine, getDatabaseDialect, getRawSqlExecutor, getStorageEngine, importRuntimeModule, isSqliteDuplicateObjectError, isSqliteUniqueViolationError, quoteSqlIdentifier, readErrorCode, registerDrizzleHandlers, registerStorageEngine, resolveSchema, resolveStorageEngine, resolveStorageEngineForUrl, sanitizeFtsQuery, serializeDatabaseOperation, someInCauseChain, sqliteFtsSearchStrategy, sqliteStorageEngine };
@@ -1 +1 @@
1
- import{C as e,S as t,_ as n,a as r,b as i,c as a,d as o,f as s,g as c,h as l,i as u,l as d,m as f,n as p,o as m,p as h,r as g,s as _,t as v,u as y,v as b,x,y as S}from"../../registry-TJjQgTgp.mjs";import{autoPk as C,bool as w,epochMs as T,float8 as E,jsonCol as D}from"./columns/sqlite.mjs";import{autoPk as O,bool as k,epochMs as A,float8 as j,jsonCol as M}from"./columns/postgres.mjs";import{integer as N,sqliteTable as P,text as F}from"drizzle-orm/sqlite-core";import{bigint as I,integer as L,pgTable as R,text as z}from"drizzle-orm/pg-core";import{getTableColumns as B}from"drizzle-orm";import{createStorageNamespace as V}from"@makaio/framework/storage";const H=[{dialect:`postgres`,enginePackageName:`@makaio/storage-pg`,chainDirName:`drizzle-postgres`,drizzleConfigSpecifier:`drizzle.config.ts`,normalizeScriptSpecifier:`scripts/normalize-migrations.ts`}];function U(e){return H.find(t=>t.dialect===e)}async function W(e,t){let n=G.get(e)??Promise.resolve(),r=()=>{},i=new Promise(e=>{r=e}),a=n.catch(()=>void 0).then(()=>i);G.set(e,a),await n.catch(()=>void 0);try{return await e.transaction(t)}finally{r(),G.get(e)===a&&G.delete(e)}}const G=new WeakMap;function K(e){return(t,n,r)=>e(t,n,r)}function q(e,t){return{sqlite:e,postgres:t}}function J(t,n){return n[e(t)]}function Y(e,t){let n=(e,t)=>({sqlite:e,postgres:t,notNull:()=>n(e.notNull(),t.notNull()),default:r=>n(e.default(r),t.default(r)),primaryKey:()=>n(e.primaryKey(),t.primaryKey()),unique:r=>n(e.unique(r),t.unique(r)),$type:()=>n(e,t),references:(r,i)=>n(e.references(()=>r().sqlite,i),t.references(()=>r().postgres,i))});return n(e,t)}const X={text:e=>Y(F(e),z(e)),textEnum:(e,t)=>Y(F(e,t),z(e,t)),epochMs:e=>Y(T(e),A(e)),bool:e=>Y(w(e),k(e)),jsonCol:e=>Y(D(e),M(e)),autoPk:e=>Y(C(e),O(e)),float8:e=>Y(E(e),j(e)),int4:e=>Y(N(e),L(e)),int8:e=>Y(N(e),I(e,{mode:`number`}))};function Z(e,t,n){let r=t(X),i={},a={};for(let[e,t]of Object.entries(r))i[e]=t.sqlite,a[e]=t.postgres;let o=P(e,i,n?.sqlite),s=R(e,a,n?.postgres),c=B(o),l=B(s);return{sqlite:o,postgres:s,columnPair(e){return{sqlite:c[e],postgres:l[e]}}}}export{t as DATABASE_DIALECT,H as NON_BASELINE_GENERATION_LEGS,f as STORAGE_ENGINE_URL_HINTS,i as affectedRowCount,b as brandDatabase,d as buildFirstUserMessagePreviewQuery,V as createStorageNamespace,q as defineDialectSchema,Z as defineDualTable,l as describeMissingStorageEngine,x as didAffectRows,W as executeTransaction,U as findGenerationLegForDialect,v as findStorageEngine,e as getDatabaseDialect,S as getRawSqlExecutor,p as getStorageEngine,n as importRuntimeModule,y as isSqliteDuplicateObjectError,o as isSqliteUniqueViolationError,c as quoteSqlIdentifier,s as readErrorCode,K as registerDrizzleHandlers,g as registerStorageEngine,J as resolveSchema,u as resolveStorageEngine,r as resolveStorageEngineForUrl,a as sanitizeFtsQuery,h as someInCauseChain,_ as sqliteFtsSearchStrategy,m as sqliteStorageEngine};
1
+ import{C as e,S as t,_ as n,a as r,b as i,c as a,d as o,f as s,g as c,h as l,i as u,l as d,m as f,n as p,o as m,p as h,r as g,s as _,t as v,u as y,v as b,x,y as S}from"../../registry-TJjQgTgp.mjs";import{autoPk as C,bool as w,epochMs as T,float8 as E,jsonCol as D}from"./columns/sqlite.mjs";import{autoPk as O,bool as k,epochMs as A,float8 as j,jsonCol as M}from"./columns/postgres.mjs";import{integer as N,sqliteTable as P,text as F}from"drizzle-orm/sqlite-core";import{bigint as I,integer as L,pgTable as R,text as z}from"drizzle-orm/pg-core";import{getTableColumns as B}from"drizzle-orm";import{createStorageNamespace as V}from"@makaio/framework/storage";const H=[{dialect:`postgres`,enginePackageName:`@makaio/storage-pg`,chainDirName:`drizzle-postgres`,drizzleConfigSpecifier:`drizzle.config.ts`,normalizeScriptSpecifier:`scripts/normalize-migrations.ts`}];function U(e){return H.find(t=>t.dialect===e)}async function W(e,t){let n=K.get(e)??Promise.resolve(),r=Promise.withResolvers(),i=n.catch(()=>void 0).then(()=>r.promise);K.set(e,i),await n.catch(()=>void 0);try{return await t()}finally{r.resolve(),K.get(e)===i&&K.delete(e)}}async function G(e,t){return W(e,()=>e.transaction(t))}const K=new WeakMap;function q(e){return(t,n,r)=>e(t,n,r)}function J(e,t){return{sqlite:e,postgres:t}}function Y(t,n){return n[e(t)]}function X(e,t){let n=(e,t)=>({sqlite:e,postgres:t,notNull:()=>n(e.notNull(),t.notNull()),default:r=>n(e.default(r),t.default(r)),primaryKey:()=>n(e.primaryKey(),t.primaryKey()),unique:r=>n(e.unique(r),t.unique(r)),$type:()=>n(e,t),references:(r,i)=>n(e.references(()=>r().sqlite,i),t.references(()=>r().postgres,i))});return n(e,t)}const Z={text:e=>X(F(e),z(e)),textEnum:(e,t)=>X(F(e,t),z(e,t)),epochMs:e=>X(T(e),A(e)),bool:e=>X(w(e),k(e)),jsonCol:e=>X(D(e),M(e)),autoPk:e=>X(C(e),O(e)),float8:e=>X(E(e),j(e)),int4:e=>X(N(e),L(e)),int8:e=>X(N(e),I(e,{mode:`number`}))};function Q(e,t,n){let r=t(Z),i={},a={};for(let[e,t]of Object.entries(r))i[e]=t.sqlite,a[e]=t.postgres;let o=P(e,i,n?.sqlite),s=R(e,a,n?.postgres),c=B(o),l=B(s);return{sqlite:o,postgres:s,columnPair(e){return{sqlite:c[e],postgres:l[e]}}}}export{t as DATABASE_DIALECT,H as NON_BASELINE_GENERATION_LEGS,f as STORAGE_ENGINE_URL_HINTS,i as affectedRowCount,b as brandDatabase,d as buildFirstUserMessagePreviewQuery,V as createStorageNamespace,J as defineDialectSchema,Q as defineDualTable,l as describeMissingStorageEngine,x as didAffectRows,G as executeTransaction,U as findGenerationLegForDialect,v as findStorageEngine,e as getDatabaseDialect,S as getRawSqlExecutor,p as getStorageEngine,n as importRuntimeModule,y as isSqliteDuplicateObjectError,o as isSqliteUniqueViolationError,c as quoteSqlIdentifier,s as readErrorCode,q as registerDrizzleHandlers,g as registerStorageEngine,Y as resolveSchema,u as resolveStorageEngine,r as resolveStorageEngineForUrl,a as sanitizeFtsQuery,W as serializeDatabaseOperation,h as someInCauseChain,_ as sqliteFtsSearchStrategy,m as sqliteStorageEngine};
@@ -823,7 +823,7 @@ interface FileAccessRules {
823
823
  /**
824
824
  * Provides filesystem access rules for a given working directory.
825
825
  * @param cwd - Absolute working directory
826
- * @param allowedDirectories - Directory allow-list from the active execution policy
826
+ * @param allowedDirectories - Directory allow-list from the active execution policy (`[]` denies all paths)
827
827
  */
828
828
  type FileAccessRuleProvider = (cwd: string, allowedDirectories?: readonly string[]) => Promise<FileAccessRules>;
829
829
  /** Constraints key for FileAccessRules in MakaioContext.constraints. */