@makaio/framework 1.0.0-dev-1783355411417 → 1.0.0-dev-1783477169057
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.
- package/dist/.makaio-build.json +2 -2
- package/dist/adapter-Lx6K7yQS.mjs +1 -0
- package/dist/adapter-subsystem/index.mjs +1 -1
- package/dist/adapters/config/index.d.mts +1 -1
- package/dist/adapters/index.d.mts +219 -40
- package/dist/adapters/index.mjs +6 -6
- package/dist/adapters/node.d.mts +1 -1
- package/dist/adapters/node.mjs +4 -4
- package/dist/{base-orchestrator-BNysGvaM.d.mts → base-orchestrator-J1WKAUkF.d.mts} +32 -3
- package/dist/bus/index.d.mts +22 -22
- package/dist/bus/index.mjs +1 -1
- package/dist/client-l1Rq5p6X.mjs +1 -0
- package/dist/clients/index.d.mts +30 -0
- package/dist/clients/index.mjs +2 -2
- package/dist/contracts/adapter/index.d.mts +2 -2
- package/dist/contracts/adapter/index.mjs +1 -1
- package/dist/contracts/adapter/schemas/session-lineage.d.mts +1 -1
- package/dist/contracts/adapter/schemas/session-lineage.mjs +1 -1
- package/dist/contracts/artifact/index.d.mts +1 -1
- package/dist/contracts/canonical-model/index.d.mts +1 -1
- package/dist/contracts/client/index.d.mts +2 -2
- package/dist/contracts/client/index.mjs +1 -1
- package/dist/contracts/config/index.d.mts +12 -12
- package/dist/contracts/extension/index.d.mts +3 -3
- package/dist/contracts/facet/index.d.mts +1 -1
- package/dist/contracts/harness/index.d.mts +1 -1
- package/dist/contracts/index.d.mts +454 -276
- package/dist/contracts/index.mjs +1 -1
- package/dist/contracts/materialization/index.d.mts +3 -3
- package/dist/contracts/provider/index.d.mts +1 -1
- package/dist/contracts/session/index.d.mts +3 -3
- package/dist/contracts/session/index.mjs +1 -1
- package/dist/contracts/shared/index.d.mts +1 -1
- package/dist/contracts/skill/index.d.mts +1 -1
- package/dist/contracts/variant/index.d.mts +1 -1
- package/dist/contracts/workflow/index.d.mts +2 -2
- package/dist/{definition-b9jyJqPD.d.mts → definition-DePb3ke-.d.mts} +1 -1
- package/dist/drizzle/0023_m_mr9gc37m.sql +1 -0
- package/dist/drizzle/meta/_journal.json +7 -0
- package/dist/handlers-B74FvKlA.mjs +57 -0
- package/dist/hooks/index.d.mts +19 -2
- package/dist/{identity-BarL3JYI.mjs → identity-DC3Pk0ps.mjs} +1 -1
- package/dist/{index-BwGfdbI0.d.mts → index-2fK9iSHI.d.mts} +9 -9
- package/dist/{index-D7rWAEY0.d.mts → index-B-6DtLLz.d.mts} +1 -1
- package/dist/{index-4eP9DRL_.d.mts → index-B3fjN5HX.d.mts} +7 -7
- package/dist/{index-O08Q2ikz.d.mts → index-BMbmoarE.d.mts} +8 -8
- package/dist/{index-DV4nRk0h.d.mts → index-BX1MxwFr.d.mts} +28 -28
- package/dist/{index-CqCe7Phc.d.mts → index-BcwOnvUh.d.mts} +6 -6
- package/dist/{index-D6aAzr32.d.mts → index-BeouVICp.d.mts} +36 -36
- package/dist/{index-DQYj8-53.d.mts → index-BjO4Zkap.d.mts} +1 -1
- package/dist/{index-B5w-0Gg9.d.mts → index-Bl42SCEI.d.mts} +8 -8
- package/dist/{index-BYfSAJRC.d.mts → index-BvTd61i5.d.mts} +151 -29
- package/dist/{index-3X0368CL.d.mts → index-CA-AJbq6.d.mts} +4 -4
- package/dist/{index-C5C1tk9f.d.mts → index-CQQcnpev.d.mts} +41 -41
- package/dist/{index-BKZhnb2B.d.mts → index-C_xQM96Y.d.mts} +802 -422
- package/dist/{index-31vR1sxk.d.mts → index-CwFSL4xI.d.mts} +144 -21
- package/dist/{index-WHUV7neB.d.mts → index-DMz-2ACU.d.mts} +105 -105
- package/dist/{index-3J0HZlPH.d.mts → index-DScUb-hF.d.mts} +334 -13
- package/dist/{index-DEzdNQum.d.mts → index-Di84JjS0.d.mts} +2 -2
- package/dist/{index-DvHYpi-J.d.mts → index-Dv4oGVZK.d.mts} +1246 -397
- package/dist/{index-CaerrEDH.d.mts → index-NkNbYFud.d.mts} +1 -1
- package/dist/{index-D9-vOJvZ.d.mts → index-h5go5Dtd.d.mts} +1 -1
- package/dist/{index-DLNRgZPo2.d.mts → index-j_X5xefv2.d.mts} +26 -26
- package/dist/{index-C6Ys8pxt.d.mts → index-uM4KZopE.d.mts} +9 -9
- package/dist/kernel/extension/index.d.mts +1 -1
- package/dist/kernel/index.d.mts +2 -2
- package/dist/kernel/observability/index.d.mts +1 -1
- package/dist/{namespace-j7vFsmYL.d.mts → namespace-3yGm4WF9.d.mts} +2 -2
- package/dist/{namespace-D8P8Sxce2.d.mts → namespace-6sIu5nBI2.d.mts} +2 -2
- package/dist/{namespace-B3ol3pc-.d.mts → namespace-BigVYQyx.d.mts} +12 -0
- package/dist/{namespace-DmqoDDRD.d.mts → namespace-Boh42UoL.d.mts} +66 -22
- package/dist/{namespace-CfvtDD_U.d.mts → namespace-COEUMuHL.d.mts} +156 -156
- package/dist/{namespace-B4cV_pk3.d.mts → namespace-D94HrTtq.d.mts} +58 -58
- package/dist/{namespace-DhDY0juT.d.mts → namespace-OLAh9wHU.d.mts} +375 -27
- package/dist/{namespace-Bm77p82L.d.mts → namespace-TPbegIMi.d.mts} +27 -27
- package/dist/{package-MmQvNJ3u.d.mts → package-B6mEMD8r.d.mts} +5 -0
- package/dist/{package-BmRhhi-3.mjs → package-BQn_RTo7.mjs} +1 -1
- package/dist/package.json +1 -1
- package/dist/{schema-DLNBajAV.d.mts → schema-B5vHi7Uu.d.mts} +28 -1
- package/dist/{schemas-CoFCV42v.d.mts → schemas-CDBn9MTz.d.mts} +156 -156
- package/dist/schemas-CkOigLAT.mjs +1 -0
- package/dist/{schemas-lnE9YoG7.d.mts → schemas-CscdPqCt.d.mts} +3 -3
- package/dist/{schemas-DMMWmWjq.d.mts → schemas-D512XweP.d.mts} +4 -4
- package/dist/{schemas-DuuVuhHX2.d.mts → schemas-DOV4UouN2.d.mts} +13 -13
- package/dist/{schemas-DmGRSeIq.d.mts → schemas-t6h9oSct.d.mts} +28 -1
- package/dist/services/adapter-runtime/index.d.mts +4 -4
- package/dist/services/adapter-runtime/index.mjs +1 -1
- package/dist/services/adapter-runtime/namespace.d.mts +1 -1
- package/dist/services/adapter-runtime/schemas.d.mts +2 -2
- package/dist/services/adapter-runtime/schemas.mjs +1 -1
- package/dist/services/adapter-subsystem/index.d.mts +2 -2
- package/dist/services/adapter-subsystem/namespace.d.mts +1 -1
- package/dist/services/agent-runtime/index.d.mts +2 -2
- package/dist/services/agent-runtime/namespace.d.mts +1 -1
- package/dist/services/agent-runtime/schemas.d.mts +1 -1
- package/dist/services/context-rules/index.d.mts +8 -8
- package/dist/services/execution-target/index.d.mts +1 -1
- package/dist/services/filesystem/namespace.d.mts +12 -12
- package/dist/services/filesystem/schemas.d.mts +6 -6
- package/dist/services/git/namespace.d.mts +2 -2
- package/dist/services/git/schemas.d.mts +1 -1
- package/dist/services/harness/index.d.mts +3 -3
- package/dist/services/index.d.mts +147 -140
- package/dist/services/index.mjs +1 -1
- package/dist/services/log-import/browser.d.mts +2 -2
- package/dist/services/log-import/index.d.mts +15 -2
- package/dist/services/log-import/index.mjs +2 -2
- package/dist/services/log-import/log-import.d.mts +1 -1
- package/dist/services/log-import/namespace.d.mts +2 -2
- package/dist/services/log-import/schemas.d.mts +1 -1
- package/dist/services/session/handlers/index.d.mts +1 -1
- package/dist/services/session/handlers/index.mjs +1 -1
- package/dist/services/session/index.d.mts +7 -7
- package/dist/services/session/index.mjs +1 -1
- package/dist/services/session/messages/namespace.d.mts +1 -1
- package/dist/services/session/session-events/namespace.d.mts +1 -1
- package/dist/services/session/storage/namespace.d.mts +1 -1
- package/dist/services/session/storage/schema.d.mts +1 -1
- package/dist/services/session/storage/schema.mjs +1 -1
- package/dist/services/session/testing/index.mjs +3 -2
- package/dist/services/session-editor/index.d.mts +1 -1
- package/dist/services/settings/namespace.d.mts +10 -10
- package/dist/services/settings/storage/extension-configs/namespace.d.mts +3 -3
- package/dist/services/subagent-template/index.d.mts +2 -2
- package/dist/services/subagent-template/namespace.d.mts +1 -1
- package/dist/services/subagent-template/schemas.d.mts +1 -1
- package/dist/services/tool-approval/index.mjs +1 -1
- package/dist/services/tools/index.mjs +1 -1
- package/dist/services/tray-menu/index.d.mts +2 -2
- package/dist/services/tray-menu/namespace.d.mts +1 -1
- package/dist/services/tray-menu/schemas.d.mts +1 -1
- package/dist/session-CoGaTin6.mjs +69 -0
- package/dist/session-Dp7z5N1d.mjs +1 -0
- package/dist/{session-lineage-DR-9DU-U.d.mts → session-lineage-C1M7-O3C.d.mts} +3 -3
- package/dist/{tool-approval-service-MU_DmJsf.mjs → tool-approval-service-BNXgr-az.mjs} +1 -1
- package/dist/tools-BaO4GYj0.mjs +1 -0
- package/dist/{transition-Dq41YCkc.d.mts → transition-Bbjlwv5K.d.mts} +1 -1
- package/dist/{types-BMS6yfLS.d.mts → types-BNW5n6qm.d.mts} +1 -1
- package/dist/{types-BMlzmWp6.d.mts → types-CNkx2awa.d.mts} +12 -1
- package/dist/{types-Cse8s_cD.d.mts → types-D7W0ntGr.d.mts} +45 -18
- package/dist/{types-C76EP81O.d.mts → types-jruUn6oW.d.mts} +694 -282
- package/dist/workflow-engine/index.d.mts +41 -41
- package/dist/workflow-engine/index.mjs +1 -1
- package/dist/workflow-engine/package.d.mts +1 -1
- package/dist/workflow-engine/package.mjs +1 -1
- package/package.json +1 -1
- package/dist/adapter-BRxCc72E.mjs +0 -1
- package/dist/client-BgUjVbXX.mjs +0 -1
- package/dist/handlers-v47Gbsr1.mjs +0 -57
- package/dist/schemas-ftgVeWIG.mjs +0 -1
- package/dist/session-CKWfn3oc.mjs +0 -1
- package/dist/session-DCbJwYEU.mjs +0 -69
- package/dist/tools-BrNm-een.mjs +0 -1
package/dist/services/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{agents as e,sessions as t}from"./session/storage/schema.mjs";import{n,t as r}from"../schema-CHp6I33k.mjs";import{t as i}from"../schema-7aKBGB7S.mjs";import{i as a,n as o,r as s,t as c}from"../namespace-dFBD2ZmS.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,_ as ie,a as ae,b as oe,c as se,d as ce,f as le,g as ue,h as de,i as fe,j as pe,k as me,l as he,m as ge,n as _e,o as ve,p as ye,r as be,s as xe,t as Se,u as Ce,v as we,w as Te,x as Ee,y as De,z as _}from"../handlers-v47Gbsr1.mjs";import{TurnStorageNamespace as v,TurnStorageSubjects as y}from"./turn/namespace.mjs";import{SessionStorageNamespace as b,SessionStorageSubjects as x}from"./session/storage/namespace.mjs";import{$ as S,A as C,B as w,C as T,D as E,E as Oe,F as ke,G as Ae,H as je,I as Me,J as Ne,K as D,L as Pe,M as Fe,O as Ie,P as Le,Q as Re,R as ze,S as Be,T as Ve,U as He,V as Ue,W as We,X as Ge,Y as Ke,Z as qe,a as Je,b as Ye,c as Xe,et as Ze,i as Qe,j as $e,k as et,l as tt,o as nt,q as rt,r as it,s as at,t as ot,u as st,w as ct,x as lt,y as ut,z as dt}from"../session-DCbJwYEU.mjs";import{t as ft}from"../namespace-DBHwyhME.mjs";import{n as pt,r as mt,t as ht}from"../provider-context-DC_eq7es.mjs";import{AdapterRuntimeSchemas as gt,ResolveIdRequestSchema as _t,ResolveIdResponseSchema as vt,ResolveNameRequestSchema as yt,ResolveNameResponseSchema as bt}from"./adapter-runtime/schemas.mjs";import{AdapterRuntimeNamespace as O,AdapterRuntimeSubjects as xt}from"./adapter-runtime/namespace.mjs";import{ProviderStorageNamespace as St}from"./settings/storage/providers-namespace.mjs";import{ContainerIsolatedExecutionTargetSchema as Ct,ContainerLocalExecutionTargetSchema as wt,ExecutionTargetInputSchema as Tt,ExecutionTargetListQuerySchema as Et,ExecutionTargetResolveRequestSchema as Dt,ExecutionTargetSchema as Ot,ExecutionTargetSchemas as kt,ExecutionTargetTypeSchema as At,LocalExecutionTargetSchema as jt}from"./execution-target/schemas.mjs";import{ExecutionTargetNamespace as k,ExecutionTargetSubjects as Mt}from"./execution-target/namespace.mjs";import{MessageStorageNamespace as Nt,MessageStorageSubjects as Pt}from"./session/messages/namespace.mjs";import{TurnStorageNamespace as Ft}from"./session/turns/namespace.mjs";import{BugEntrySchema as It,CompressRequestSchema as Lt,CompressResponseSchema as Rt,CompressionEventSchema as zt,CompressionSchemas as Bt,ExtractedContextSchema as Vt,TechnicalDetailsSchema as Ht,TodoEntrySchema as Ut}from"./compression/schemas.mjs";import{PreferenceItemSchema as Wt,PreferenceKeySchema as Gt,PreferenceValueSchema as Kt,PreferencesSchemas as qt}from"./preferences/schemas.mjs";import{PreferencesNamespace as A,PreferencesSubjects as Jt}from"./preferences/storage-namespace.mjs";import{t as Yt}from"../namespace-wke7juzy.mjs";import{A as Xt,B as Zt,C as Qt,D as $t,E as en,F as tn,G as nn,H as rn,I as an,J as on,K as sn,L as cn,M as ln,N as un,O as dn,P as fn,R as pn,S as mn,T as hn,U as gn,V as _n,W as vn,Y as yn,_ as bn,a as j,b as xn,c as Sn,d as Cn,f as wn,g as M,h as Tn,i as N,j as En,k as Dn,l as On,m as kn,o as An,p as P,q as jn,r as Mn,s as F,u as I,v as L,w as Nn,x as Pn,y as Fn,z as In}from"../tools-BrNm-een.mjs";import{t as Ln}from"../capability-service-XlymTzz1.mjs";import{a as Rn,c as zn,i as Bn,l as Vn,n as Hn,o as R,r as Un,s as Wn,t as Gn,u as Kn}from"../model-registry-rYICIwyR.mjs";import{t as qn}from"../tool-approval-service-MU_DmJsf.mjs";import{TrayMenuEntrySchema as Jn,TrayMenuGroupEntrySchema as Yn,TrayMenuGroupSchema as Xn,TrayMenuItemClickedSchema as Zn,TrayMenuListEntrySchema as Qn,TrayMenuMetadataSchema as $n,TrayMenuSchemas as er,TrayMenuSectionSchema as tr}from"./tray-menu/schemas.mjs";import{TrayMenuNamespace as z,TrayMenuSubjects as nr}from"./tray-menu/namespace.mjs";import{t as rr}from"../tray-menu-service-B2AxiQqL.mjs";import{n as ir}from"../handler-BFNvtv5t.mjs";import{i as ar,n as or,r as sr,t as cr}from"../package-CF_Zm2v4.mjs";import{FsNamespace as lr}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 ur,AgentRuntimeSchemas as dr,AgentRuntimeSelectionSchema as fr}from"./agent-runtime/schemas.mjs";import{AgentRuntimeNamespace as B,AgentRuntimeSubjects as pr}from"./agent-runtime/namespace.mjs";import{CodebaseChangedEventSchema as mr,CodebaseSchemas as hr}from"./codebase/schemas.mjs";import{CodebaseNamespace as V,CodebaseSubjects as gr}from"./codebase/namespace.mjs";import{CompressionNamespace as H,CompressionSubjects as _r}from"./compression/namespace.mjs";import{r as vr,t as yr}from"../storage-namespace-D5q9CrBp.mjs";import{DefinitionNamespace as br}from"./definition/namespace.mjs";import{DialogNamespace as xr}from"./dialog/namespace.mjs";import{_ as Sr,c as Cr,d as wr,f as Tr,g as Er,h as Dr,i as Or,l as kr,m as Ar,n as jr,o as Mr,p as Nr,r as U,s as Pr,t as Fr,u as Ir,v as Lr,y as Rr}from"../execution-target-BR8bLkCR.mjs";import{CLIDetectionNamespace as zr}from"./cli-detection/namespace.mjs";import{LocalNotificationNamespace as Br}from"./local-notification/namespace.mjs";import{t as Vr}from"../namespace-CVMZVqB5.mjs";import{ExtensionConfigStorageNamespace as Hr}from"./settings/storage/extension-configs/namespace.mjs";import{ClientStorageNamespace as Ur}from"./settings/storage/clients-namespace.mjs";import{SubagentTemplateCompletedEventSchema as Wr,SubagentTemplateCreateSchema as Gr,SubagentTemplateInstanceSchema as Kr,SubagentTemplateInstanceStatusSchema as qr,SubagentTemplateKernelSchemas as Jr,SubagentTemplateSchema as Yr,SubagentTemplateSettingsSchemas as Xr,SubagentTemplateSpawnRequestSchema as Zr,SubagentTemplateSpawnedEventSchema as Qr,SubagentTemplateSummarySchema as $r,SubagentTemplateUpdateSchema as ei}from"./subagent-template/schemas.mjs";import{r as ti,t as ni}from"../namespace-BO3tODGC.mjs";import{SubagentTemplateKernelNamespace as W,SubagentTemplateSubjects as ri}from"./subagent-template/namespace.mjs";import{i as ii,n as ai,r as oi,t as si}from"../identity-BarL3JYI.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 ci}from"@makaio/framework/contracts";import{ImportCursorStorageNamespace as li}from"@makaio/framework/adapters";import{ModelRegistryPublicNamespace as ui}from"@makaio/framework/contracts/model-registry";function di(e){return{source:`extension`,ownerKey:`extension:${e}`}}function fi(e,t){for(let n of e.values())if(n.registry===t)for(let e of n.registrations)t.registerKind(e,n.owner)}function pi(){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)}fi(e,n.registry)}};return{filter:e=>(e.artifactKinds?.kinds?.length??0)>0,async processActivated(n,r,i){let a=i.getService(j);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=di(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 mi(e,t,n){return{...n,filter:{...n.filter,kind:e,schemaVersion:t}}}function hi(){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(N);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(mi(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 gi(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,resolved:[],refs:[]},r=await K(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 G(n,r,J(await q(n,r),e.selectors),0,new Set([Z(e.ref)])),{rootRef:e.ref,refs:n.refs,resolved:n.resolved}}async function G(e,t,n,r,i){let a=Ci(t,n,r,i);if(e.walkedByKey.has(a))return;e.walkedByKey.add(a);let o=bi(t);for(let a of t.relations)await _i(e,o,a,n,r,i)}async function _i(e,t,n,r,i,a){let o=r?.[n.type];if(o?.hint===`omit`)return;let s=o?.hint??`link`;if(!vi(o,n.target)){X(e,Y(t,n,s,`not-selected`));return}if(n.target.refClass!==`artifact`){X(e,Y(t,n,s,`unsupported-ref-class`));return}let c=Z(n.target),l=a.has(c);if(i>=e.maxDepth&&!l){X(e,Y(t,n,s,`depth-exceeded`));return}let u=e.resolvedByKey.has(c),d=await K(e,n.target);if(!d){X(e,Y(t,n,s,`not-found`));return}if(X(e,{sourceRef:t,target:n.target,relationType:n.type,hint:s,status:`resolved`}),u||e.resolved.push(d),l)return;let f=(o.depth??1)-1,p=f>0?{[n.type]:{...o,depth:f}}:void 0,m=J(J(await q(e,d),p),o.nested),h=new Set(a);h.add(c),await G(e,d,m,i+1,h)}async function K(e,t){let n=Z(t);if(e.resolvedByKey.has(n))return e.resolvedByKey.get(n)??null;let{artifact:r}=await e.bus.request(ci.resolve,{ref:t});return e.resolvedByKey.set(n,r),r}async function q(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 J(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 vi(e,t){return e?e.kinds?e.kinds.includes(yi(t)):!0:!1}function yi(e){return e.refClass===`local`?e.artifact.kind:e.kind}function Y(e,t,n,r){return{sourceRef:e,target:t.target,relationType:t.type,hint:n,status:`unresolved`,reason:r}}function X(e,t){let n=xi(t),r=e.refIndexByKey.get(n);if(r===void 0){e.refIndexByKey.set(n,e.refs.length),e.refs.push(t);return}t.status===`resolved`&&e.refs[r]?.status===`unresolved`&&(e.refs[r]=t)}function bi(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 xi(e){return JSON.stringify([Z(e.sourceRef),e.relationType,Si(e.target)])}function Si(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 Ci(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 wi(){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(F);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 Ti(){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(P);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 Ei(){let e=new Map;return{filter:e=>!!e.workflowBlocks?.blocks,async processActivated(t,n,r){let i=r.getService(L);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 Di(){let e=new Map;return{filter:e=>!!(e.transitionRules?.rules?.length||e.transitionActions?.actions),async processActivated(t,n,r){let i=r.getService(M);if(!i)throw Error(`TransitionContributionProcessor: TransitionPipelineService is not available — ensure '${M.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&&Oi(t,a),c&&ki(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 Oi(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 ki(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 Ai=[O,ft,B,g,zr,Ur,V,H,vr,yr,br,xr,U,k,Hr,lr,ir,li,Br,D,R,ui,A,Vr,St,Yt,ni,z,v,W,ti];export{si as AdapterIdentityRegistry,Re as AdapterRegistry,O as AdapterRuntimeNamespace,gt as AdapterRuntimeSchemas,xt as AdapterRuntimeSubjects,ur as AgentInstanceStatusSchema,B as AgentRuntimeNamespace,dr as AgentRuntimeSchemas,fr as AgentRuntimeSelectionSchema,pr as AgentRuntimeSubjects,g as AgentStorageNamespace,m as AgentStorageSubjects,jn as ArtifactLifecycleHookRegistry,N as ArtifactLifecycleHookRegistryToken,on as ArtifactLifecycleHookRejectedError,yn as ArtifactSchemaRegistry,j as ArtifactSchemaRegistryToken,It as BugEntrySchema,ze as CONNECTOR_SWAP_DEFAULT_PIPELINE,Gn as CachedRegistryFetcher,vn as CanonicalModelResolutionError,gn as CanonicalModelResolver,rn as CanonicalModelService,Ln as CapabilityService,An as CapabilityToken,mr as CodebaseChangedEventSchema,V as CodebaseNamespace,hr as CodebaseSchemas,gr as CodebaseSubjects,Lt as CompressRequestSchema,Rt as CompressResponseSchema,zt as CompressionEventSchema,H as CompressionNamespace,Bt as CompressionSchemas,_r as CompressionSubjects,Mr as ContainerCreatedSchema,Pr as ContainerDestroyedSchema,Ct as ContainerIsolatedExecutionTargetSchema,Cr as ContainerIsolatedSpawnRequestSchema,wt as ContainerLocalExecutionTargetSchema,kr as ContainerLocalSpawnRequestSchema,Ir as ContainerRuntimeSchema,Fr as ContainerSpawnNamespace,jr as ContainerSpawnSubjects,wr as ContainerStartedSchema,Tr as ContainerStateSchema,Nr as ContainerStoppedSchema,ot as ContextWindowTracker,U as DockerNamespace,Or as DockerSubjects,at as EmbeddingIndexManager,Tt as ExecutionTargetInputSchema,Et as ExecutionTargetListQuerySchema,k as ExecutionTargetNamespace,Dt as ExecutionTargetResolveRequestSchema,Ot as ExecutionTargetSchema,kt as ExecutionTargetSchemas,Mt as ExecutionTargetSubjects,At as ExecutionTargetTypeSchema,Vt as ExtractedContextSchema,sn as FacetNamespaceRegistry,F as FacetNamespaceRegistryToken,Hn as FallbackRegistryFetcher,Ai as FrameworkServicesCoreNamespaces,jt as LocalExecutionTargetSchema,nt as MakaioSession,S as MakaioSessionService,D as MessageRoutingNamespace,rt as MessageRoutingSubjects,Nt as MessageStorageNamespace,Pt as MessageStorageSubjects,R as ModelRegistryNamespace,Un as ModelRegistryProviderNotFoundError,zn as ModelRegistrySchema,Vn as ModelRegistrySchemas,Bn as ModelRegistryService,Wn as ModelRegistrySubjects,Sn as ModelRegistryToken,Wt as PreferenceItemSchema,Gt as PreferenceKeySchema,Kt as PreferenceValueSchema,A as PreferencesNamespace,qt as PreferencesSchemas,Jt as PreferencesSubjects,Kn as ProviderModelOverrideSchema,_t as ResolveIdRequestSchema,vt as ResolveIdResponseSchema,yt as ResolveNameRequestSchema,bt as ResolveNameResponseSchema,Me as SessionBridge,On as SessionBridgeToken,c as SessionEventStorageNamespace,o as SessionEventStorageSubjects,Le as SessionExtensionContextImpl,He as SessionOrchestrator,I as SessionOrchestratorToken,b as SessionStorageNamespace,x as SessionStorageSubjects,Cn as SessionStorageToken,wn as SessionToken,We as SessionTurnManager,Ar as SpawnRequestSchema,Dr as SpawnResponseSchema,Er as StatusRequestSchema,Sr as StatusResponseSchema,Lr as StopRequestSchema,Rr as StopResponseSchema,ar as SubagentManager,sr as SubagentService,cr as SubagentServiceToken,Wr as SubagentTemplateCompletedEventSchema,Gr as SubagentTemplateCreateSchema,Kr as SubagentTemplateInstanceSchema,qr as SubagentTemplateInstanceStatusSchema,W as SubagentTemplateKernelNamespace,Jr as SubagentTemplateKernelSchemas,Yr as SubagentTemplateSchema,Xr as SubagentTemplateSettingsSchemas,Zr as SubagentTemplateSpawnRequestSchema,Qr as SubagentTemplateSpawnedEventSchema,ri as SubagentTemplateSubjects,$r as SubagentTemplateSummarySchema,ei as SubagentTemplateUpdateSchema,nn as SurfaceBindingRegistry,P as SurfaceBindingRegistryToken,Ht as TechnicalDetailsSchema,Ut as TodoEntrySchema,qn as ToolApprovalService,kn as ToolApprovalToken,Zt as ToolRegistry,Tn as ToolRegistryToken,cn as TransitionActionRegistry,tn as TransitionPipelineService,M as TransitionPipelineToken,an as TransitionRuleRegistry,Jn as TrayMenuEntrySchema,Yn as TrayMenuGroupEntrySchema,Xn as TrayMenuGroupSchema,Zn as TrayMenuItemClickedSchema,Qn as TrayMenuListEntrySchema,$n as TrayMenuMetadataSchema,z as TrayMenuNamespace,er as TrayMenuSchemas,tr as TrayMenuSectionSchema,rr as TrayMenuService,nr as TrayMenuSubjects,bn as TrayMenuToken,De as Turn,je as TurnContextEnricher,Ft as TurnStorageNamespace,y as TurnStorageSubjects,pn as WORKFLOW_START_ACTION_TYPE,In as WorkflowBlockRegistry,L as WorkflowBlockRegistryToken,me as actionRegistry,ht as activateProviderContext,pt as activateProviderContextStrict,e as agents,Fn as artifactLifecycleHookRegistryPackage,xn as artifactSchemaRegistryPackage,_e as assembleForkContext,ai as buildDeterministicAdapterId,mt as buildProviderContext,f as buildRecoveryContext,ne as buildRecoveryContextWithPipeline,l as buildSessionContext,ye as buildTurnInitiator,_n as canonicalModelPackage,Pn as capabilityPackage,pi as createArtifactKindContributionProcessor,hi as createArtifactLifecycleHookContributionProcessor,wi as createFacetNamespaceContributionProcessor,mn as createModelRegistryPackage,ke as createSessionExtensionContext,Ti as createSurfaceBindingContributionProcessor,Mn as createToolContributionProcessor,Di as createTransitionContributionProcessor,Ei as createWorkflowBlockContributionProcessor,d as ensureAgentCwd,Te as ensureAgentModel,ie as extractTextContent,Qt as facetNamespaceRegistryPackage,Ye as fetchAgentsBySession,lt as fetchMessageCountsBySession,Be as fetchPreviewBySession,E as fetchSessionPreviewMaps,ge as findTurnByAgent,Nn as frameworkCorePackages,te as getFullConversation,de as getOrCreateSession,tt as importCursors,st as importCursorsDual,Fe as kindToBranchKind,Ie as mapAgentsBySession,T as mapRowToSession,et as mapToSession,Rn as mergeModelMetadata,Ne as messageRouting,Ke as messageRoutingDual,i as messages,ce as normalizeSelectionString,we as normalizeToBlocks,ct as parseForkTransforms,Pe as pickFallbackRuntimeOptions,re as recoverAgent,se as registerAbandonHandler,oi as registerAdapterRuntimeIdentityHandlers,Ce as registerAttachHandler,ve as registerBuiltInActions,ae as registerCompressHandler,Qe as registerCompressLineageResolver,Ze as registerCoreSessionServiceHandlers,C as registerDrizzleAgentStorage,Xe as registerDrizzleImportCursorStorage,Ae as registerDrizzleMessageRoutingStorage,qe as registerDrizzleMessageStorage,_ as registerDrizzleSessionEventStorage,Oe as registerDrizzleSessionStorage,Ee as registerDrizzleTurnStorage,fe as registerForkHandler,ut as registerFtsSearchHandler,w as registerGetStatusCountsHandler,dt as registerListActionsHandler,Ve as registerMemoryAgentStorage,Ge as registerMemoryMessageStorage,u as registerMemorySessionEventStorage,$e as registerMemorySessionStorage,oe as registerMemoryTurnStorage,be as registerMergeHandler,Je as registerParentResolver,Ue as registerResumeHandler,it as registerSpawningToolCallResolver,xe as resetBuiltInActionsRegistration,pe as resolveAdapterId,le as resolveAdapterNameById,gi as resolveArtifactContext,ii as resolveDeterministicAdapterId,h as resolveExecutionTarget,ee as resolveModelCapabilities,ue as resolveTargetAgents,Se as routeToAgents,he as routeToAgentsCore,hn as sessionBridgePackage,s as sessionEvents,a as sessionEventsDual,en as sessionOrchestratorPackage,$t as sessionPackage,dn as sessionStoragePackage,t as sessions,or as subagentServicePackage,Dn as surfaceBindingRegistryPackage,Xt as toolApprovalPackage,En as toolRegistryPackage,ln as transitionPipelinePackage,un as trayMenuPackage,r as turns,n as turnsDual,p as verifyAndRecoverAgents,fn as workflowBlockRegistryPackage};
|
|
1
|
+
import{agents as e,sessions as t}from"./session/storage/schema.mjs";import{n,t as r}from"../schema-CHp6I33k.mjs";import{t as i}from"../schema-7aKBGB7S.mjs";import{i as a,n as o,r as s,t as c}from"../namespace-dFBD2ZmS.mjs";import{A as l,B as u,C as d,D as f,E as p,F as m,I as h,M as ee,N as te,O as ne,P as re,T as ie,V as ae,_ as oe,a as se,b as ce,c as le,d as ue,f as de,g as fe,h as pe,i as me,j as he,k as ge,l as _e,m as ve,n as ye,o as be,p as xe,r as Se,s as Ce,t as we,u as Te,v as Ee,w as De,x as Oe,y as ke}from"../handlers-B74FvKlA.mjs";import{TurnStorageNamespace as Ae,TurnStorageSubjects as je}from"./turn/namespace.mjs";import{SessionStorageNamespace as Me,SessionStorageSubjects as Ne}from"./session/storage/namespace.mjs";import{$ as g,A as _,B as v,C as y,D as b,E as Pe,F as Fe,G as Ie,H as Le,I as Re,J as ze,K as Be,L as Ve,M as He,N as Ue,O as We,Q as Ge,R as Ke,S as qe,T as Je,U as Ye,V as Xe,W as Ze,X as Qe,Y as $e,Z as et,a as tt,b as nt,c as rt,et as it,i as at,j as ot,k as st,l as ct,o as lt,q as x,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-CoGaTin6.mjs";import{t as vt}from"../namespace-DBHwyhME.mjs";import{n as yt,r as bt,t as xt}from"../provider-context-DC_eq7es.mjs";import{AdapterRuntimeSchemas as St,ResolveIdRequestSchema as Ct,ResolveIdResponseSchema as wt,ResolveNameRequestSchema as Tt,ResolveNameResponseSchema as Et}from"./adapter-runtime/schemas.mjs";import{AdapterRuntimeNamespace as S,AdapterRuntimeSubjects as Dt}from"./adapter-runtime/namespace.mjs";import{ProviderStorageNamespace as Ot}from"./settings/storage/providers-namespace.mjs";import{ContainerIsolatedExecutionTargetSchema as kt,ContainerLocalExecutionTargetSchema as At,ExecutionTargetInputSchema as jt,ExecutionTargetListQuerySchema as Mt,ExecutionTargetResolveRequestSchema as Nt,ExecutionTargetSchema as Pt,ExecutionTargetSchemas as Ft,ExecutionTargetTypeSchema as It,LocalExecutionTargetSchema as Lt}from"./execution-target/schemas.mjs";import{ExecutionTargetNamespace as C,ExecutionTargetSubjects as Rt}from"./execution-target/namespace.mjs";import{MessageStorageNamespace as zt,MessageStorageSubjects as Bt}from"./session/messages/namespace.mjs";import{TurnStorageNamespace as Vt}from"./session/turns/namespace.mjs";import{BugEntrySchema as Ht,CompressRequestSchema as Ut,CompressResponseSchema as Wt,CompressionEventSchema as Gt,CompressionSchemas as Kt,ExtractedContextSchema as qt,TechnicalDetailsSchema as Jt,TodoEntrySchema as Yt}from"./compression/schemas.mjs";import{PreferenceItemSchema as Xt,PreferenceKeySchema as Zt,PreferenceValueSchema as Qt,PreferencesSchemas as $t}from"./preferences/schemas.mjs";import{PreferencesNamespace as w,PreferencesSubjects as en}from"./preferences/storage-namespace.mjs";import{t as tn}from"../namespace-wke7juzy.mjs";import{A as nn,B as rn,C as an,D as on,E as sn,F as cn,G as ln,H as un,I as dn,J as fn,K as pn,L as mn,M as hn,N as gn,O as _n,P as vn,R as yn,S as bn,T as xn,U as Sn,V as Cn,W as wn,Y as Tn,_ as En,a as T,b as Dn,c as On,d as kn,f as An,g as E,h as jn,i as D,j as Mn,k as O,l as Nn,m as Pn,o as Fn,p as k,q as In,r as Ln,s as A,u as Rn,v as j,w as zn,x as Bn,y as Vn,z as Hn}from"../tools-BaO4GYj0.mjs";import{t as Un}from"../capability-service-XlymTzz1.mjs";import{a as Wn,c as Gn,i as Kn,l as qn,n as Jn,o as M,r as Yn,s as Xn,t as Zn,u as Qn}from"../model-registry-rYICIwyR.mjs";import{t as $n}from"../tool-approval-service-BNXgr-az.mjs";import{TrayMenuEntrySchema as er,TrayMenuGroupEntrySchema as tr,TrayMenuGroupSchema as nr,TrayMenuItemClickedSchema as rr,TrayMenuListEntrySchema as ir,TrayMenuMetadataSchema as ar,TrayMenuSchemas as or,TrayMenuSectionSchema as sr}from"./tray-menu/schemas.mjs";import{TrayMenuNamespace as N,TrayMenuSubjects as cr}from"./tray-menu/namespace.mjs";import{t as lr}from"../tray-menu-service-B2AxiQqL.mjs";import{n as ur}from"../handler-BFNvtv5t.mjs";import{i as dr,n as fr,r as pr,t as mr}from"../package-CF_Zm2v4.mjs";import{FsNamespace as hr}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 gr,AgentRuntimeSchemas as _r,AgentRuntimeSelectionSchema as vr}from"./agent-runtime/schemas.mjs";import{AgentRuntimeNamespace as P,AgentRuntimeSubjects as yr}from"./agent-runtime/namespace.mjs";import{CodebaseChangedEventSchema as br,CodebaseSchemas as xr}from"./codebase/schemas.mjs";import{CodebaseNamespace as F,CodebaseSubjects as Sr}from"./codebase/namespace.mjs";import{CompressionNamespace as I,CompressionSubjects as Cr}from"./compression/namespace.mjs";import{r as wr,t as Tr}from"../storage-namespace-D5q9CrBp.mjs";import{DefinitionNamespace as Er}from"./definition/namespace.mjs";import{DialogNamespace as Dr}from"./dialog/namespace.mjs";import{_ as Or,c as kr,d as Ar,f as jr,g as Mr,h as Nr,i as Pr,l as Fr,m as Ir,n as Lr,o as Rr,p as zr,r as L,s as Br,t as Vr,u as Hr,v as Ur,y as Wr}from"../execution-target-BR8bLkCR.mjs";import{CLIDetectionNamespace as Gr}from"./cli-detection/namespace.mjs";import{LocalNotificationNamespace as Kr}from"./local-notification/namespace.mjs";import{t as qr}from"../namespace-CVMZVqB5.mjs";import{ExtensionConfigStorageNamespace as Jr}from"./settings/storage/extension-configs/namespace.mjs";import{ClientStorageNamespace as Yr}from"./settings/storage/clients-namespace.mjs";import{SubagentTemplateCompletedEventSchema as Xr,SubagentTemplateCreateSchema as Zr,SubagentTemplateInstanceSchema as Qr,SubagentTemplateInstanceStatusSchema as $r,SubagentTemplateKernelSchemas as ei,SubagentTemplateSchema as ti,SubagentTemplateSettingsSchemas as ni,SubagentTemplateSpawnRequestSchema as ri,SubagentTemplateSpawnedEventSchema as ii,SubagentTemplateSummarySchema as ai,SubagentTemplateUpdateSchema as oi}from"./subagent-template/schemas.mjs";import{r as si,t as ci}from"../namespace-BO3tODGC.mjs";import{SubagentTemplateKernelNamespace as R,SubagentTemplateSubjects as li}from"./subagent-template/namespace.mjs";import{i as ui,n as di,r as fi,t as pi}from"../identity-DC3Pk0ps.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 mi}from"@makaio/framework/contracts";import{ImportCursorStorageNamespace as hi}from"@makaio/framework/adapters";import{ModelRegistryPublicNamespace as gi}from"@makaio/framework/contracts/model-registry";function _i(e){return{source:`extension`,ownerKey:`extension:${e}`}}function vi(e,t){for(let n of e.values())if(n.registry===t)for(let e of n.registrations)t.registerKind(e,n.owner)}function yi(){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)}vi(e,n.registry)}};return{filter:e=>(e.artifactKinds?.kinds?.length??0)>0,async processActivated(n,r,i){let a=i.getService(T);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=_i(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 bi(e,t,n){return{...n,filter:{...n.filter,kind:e,schemaVersion:t}}}function xi(){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(D);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(bi(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 Si(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=Mi(t,n,r,i);if(e.walkedByKey.has(a))return;e.walkedByKey.add(a);let o=ki(t);for(let a of t.relations)await Ci(e,o,a,n,r,i)}async function Ci(e,t,n,r,i,a){let o=r?.[n.type];if(o?.hint===`omit`)return;let s=o?.hint??`link`;if(!wi(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(mi.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 wi(e,t){return e?e.kinds?e.kinds.includes(Ti(t)):!0:!1}function Ti(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=Ai(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(!Ei(a,Oi(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 Ei(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}Di(e,t)}function Y(e,t,n){e.refMetadataByKey.set(t,n??{resolvedViaBackEdge:!1})}function Di(e,t){e.refMetadataByKey.delete(t)}function Oi(e,t){return X(e.refMetadataByKey.get(t))}function X(e){return e?.resolvedViaBackEdge===!0}function ki(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 Ai(e){return JSON.stringify([Z(e.sourceRef),e.relationType,ji(e.target)])}function ji(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 Mi(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 Ni(){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 Pi(){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 Fi(){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 Ii(){let e=new Map;return{filter:e=>!!(e.transitionRules?.rules?.length||e.transitionActions?.actions),async processActivated(t,n,r){let i=r.getService(E);if(!i)throw Error(`TransitionContributionProcessor: TransitionPipelineService is not available — ensure '${E.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&&Li(t,a),c&&Ri(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 Li(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 Ri(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 zi=[S,vt,P,m,Gr,Yr,F,I,wr,Tr,Er,Dr,L,C,Jr,hr,ur,hi,Kr,x,M,gi,w,qr,Ot,tn,ci,N,Ae,R,si];export{pi as AdapterIdentityRegistry,g as AdapterRegistry,S as AdapterRuntimeNamespace,St as AdapterRuntimeSchemas,Dt as AdapterRuntimeSubjects,gr as AgentInstanceStatusSchema,P as AgentRuntimeNamespace,_r as AgentRuntimeSchemas,vr as AgentRuntimeSelectionSchema,yr as AgentRuntimeSubjects,m as AgentStorageNamespace,h as AgentStorageSubjects,In as ArtifactLifecycleHookRegistry,D as ArtifactLifecycleHookRegistryToken,fn as ArtifactLifecycleHookRejectedError,Tn as ArtifactSchemaRegistry,T as ArtifactSchemaRegistryToken,Ht as BugEntrySchema,_t as CONNECTOR_SWAP_DEFAULT_PIPELINE,Zn as CachedRegistryFetcher,wn as CanonicalModelResolutionError,Sn as CanonicalModelResolver,un as CanonicalModelService,Un as CapabilityService,Fn as CapabilityToken,br as CodebaseChangedEventSchema,F as CodebaseNamespace,xr as CodebaseSchemas,Sr as CodebaseSubjects,Ut as CompressRequestSchema,Wt as CompressResponseSchema,Gt as CompressionEventSchema,I as CompressionNamespace,Kt as CompressionSchemas,Cr as CompressionSubjects,Rr as ContainerCreatedSchema,Br as ContainerDestroyedSchema,kt as ContainerIsolatedExecutionTargetSchema,kr as ContainerIsolatedSpawnRequestSchema,At as ContainerLocalExecutionTargetSchema,Fr as ContainerLocalSpawnRequestSchema,Hr as ContainerRuntimeSchema,Vr as ContainerSpawnNamespace,Lr as ContainerSpawnSubjects,Ar as ContainerStartedSchema,jr as ContainerStateSchema,zr as ContainerStoppedSchema,ft as ContextWindowTracker,L as DockerNamespace,Pr as DockerSubjects,dt as EmbeddingIndexManager,jt as ExecutionTargetInputSchema,Mt as ExecutionTargetListQuerySchema,C as ExecutionTargetNamespace,Nt as ExecutionTargetResolveRequestSchema,Pt as ExecutionTargetSchema,Ft as ExecutionTargetSchemas,Rt as ExecutionTargetSubjects,It as ExecutionTargetTypeSchema,qt as ExtractedContextSchema,pn as FacetNamespaceRegistry,A as FacetNamespaceRegistryToken,Jn as FallbackRegistryFetcher,zi as FrameworkServicesCoreNamespaces,Lt as LocalExecutionTargetSchema,lt as MakaioSession,it as MakaioSessionService,x as MessageRoutingNamespace,ze as MessageRoutingSubjects,zt as MessageStorageNamespace,Bt as MessageStorageSubjects,M as ModelRegistryNamespace,Yn as ModelRegistryProviderNotFoundError,Gn as ModelRegistrySchema,qn as ModelRegistrySchemas,Kn as ModelRegistryService,Xn as ModelRegistrySubjects,On as ModelRegistryToken,Xt as PreferenceItemSchema,Zt as PreferenceKeySchema,Qt as PreferenceValueSchema,w as PreferencesNamespace,$t as PreferencesSchemas,en as PreferencesSubjects,Qn as ProviderModelOverrideSchema,Ct as ResolveIdRequestSchema,wt as ResolveIdResponseSchema,Tt as ResolveNameRequestSchema,Et as ResolveNameResponseSchema,Ve as SessionBridge,Nn as SessionBridgeToken,c as SessionEventStorageNamespace,o as SessionEventStorageSubjects,Fe as SessionExtensionContextImpl,Ze as SessionOrchestrator,Rn as SessionOrchestratorToken,Me as SessionStorageNamespace,Ne as SessionStorageSubjects,kn as SessionStorageToken,An as SessionToken,Ie as SessionTurnManager,Ir as SpawnRequestSchema,Nr as SpawnResponseSchema,Mr as StatusRequestSchema,Or as StatusResponseSchema,Ur as StopRequestSchema,Wr as StopResponseSchema,dr as SubagentManager,pr as SubagentService,mr as SubagentServiceToken,Xr as SubagentTemplateCompletedEventSchema,Zr as SubagentTemplateCreateSchema,Qr as SubagentTemplateInstanceSchema,$r as SubagentTemplateInstanceStatusSchema,R as SubagentTemplateKernelNamespace,ei as SubagentTemplateKernelSchemas,ti as SubagentTemplateSchema,ni as SubagentTemplateSettingsSchemas,ri as SubagentTemplateSpawnRequestSchema,ii as SubagentTemplateSpawnedEventSchema,li as SubagentTemplateSubjects,ai as SubagentTemplateSummarySchema,oi as SubagentTemplateUpdateSchema,ln as SurfaceBindingRegistry,k as SurfaceBindingRegistryToken,Jt as TechnicalDetailsSchema,Yt as TodoEntrySchema,$n as ToolApprovalService,Pn as ToolApprovalToken,rn as ToolRegistry,jn as ToolRegistryToken,mn as TransitionActionRegistry,cn as TransitionPipelineService,E as TransitionPipelineToken,dn as TransitionRuleRegistry,er as TrayMenuEntrySchema,tr as TrayMenuGroupEntrySchema,nr as TrayMenuGroupSchema,rr as TrayMenuItemClickedSchema,ir as TrayMenuListEntrySchema,ar as TrayMenuMetadataSchema,N as TrayMenuNamespace,or as TrayMenuSchemas,sr as TrayMenuSectionSchema,lr as TrayMenuService,cr as TrayMenuSubjects,En as TrayMenuToken,ke as Turn,Ye as TurnContextEnricher,Vt as TurnStorageNamespace,je as TurnStorageSubjects,yn as WORKFLOW_START_ACTION_TYPE,Hn as WorkflowBlockRegistry,j as WorkflowBlockRegistryToken,l as actionRegistry,xt as activateProviderContext,yt as activateProviderContextStrict,e as agents,Vn as artifactLifecycleHookRegistryPackage,Dn as artifactSchemaRegistryPackage,ye as assembleForkContext,di as buildDeterministicAdapterId,bt as buildProviderContext,ne as buildRecoveryContext,d as buildRecoveryContextWithPipeline,he as buildSessionContext,xe as buildTurnInitiator,Cn as canonicalModelPackage,Bn as capabilityPackage,yi as createArtifactKindContributionProcessor,xi as createArtifactLifecycleHookContributionProcessor,Ni as createFacetNamespaceContributionProcessor,bn as createModelRegistryPackage,Re as createSessionExtensionContext,Pi as createSurfaceBindingContributionProcessor,Ln as createToolContributionProcessor,Ii as createTransitionContributionProcessor,Fi as createWorkflowBlockContributionProcessor,De as ensureAgentCwd,ie as ensureAgentModel,oe as extractTextContent,an as facetNamespaceRegistryPackage,gt as fetchAgentsBySession,qe as fetchMessageCountsBySession,y as fetchPreviewBySession,We as fetchSessionPreviewMaps,ve as findTurnByAgent,zn as frameworkCorePackages,ge as getFullConversation,pe as getOrCreateSession,ct as importCursors,mt as importCursorsDual,Ue as kindToBranchKind,st as mapAgentsBySession,ht as mapRowToSession,_ as mapToSession,Wn as mergeModelMetadata,$e as messageRouting,Qe as messageRoutingDual,i as messages,ue as normalizeSelectionString,Ee as normalizeToBlocks,Je as parseForkTransforms,Ke as pickFallbackRuntimeOptions,p as recoverAgent,le as registerAbandonHandler,fi as registerAdapterRuntimeIdentityHandlers,Te as registerAttachHandler,be as registerBuiltInActions,se as registerCompressHandler,at as registerCompressLineageResolver,pt as registerCoreSessionServiceHandlers,ot as registerDrizzleAgentStorage,rt as registerDrizzleImportCursorStorage,Be as registerDrizzleMessageRoutingStorage,Ge as registerDrizzleMessageStorage,u as registerDrizzleSessionEventStorage,b as registerDrizzleSessionStorage,Oe as registerDrizzleTurnStorage,me as registerForkHandler,nt as registerFtsSearchHandler,Xe as registerGetStatusCountsHandler,v as registerListActionsHandler,Pe as registerMemoryAgentStorage,et as registerMemoryMessageStorage,ae as registerMemorySessionEventStorage,He as registerMemorySessionStorage,ce as registerMemoryTurnStorage,Se as registerMergeHandler,tt as registerParentResolver,Le as registerResumeHandler,ut as registerSpawningToolCallResolver,Ce as resetBuiltInActionsRegistration,ee as resolveAdapterId,de as resolveAdapterNameById,Si as resolveArtifactContext,ui as resolveDeterministicAdapterId,te as resolveExecutionTarget,re as resolveModelCapabilities,fe as resolveTargetAgents,we as routeToAgents,_e as routeToAgentsCore,xn as sessionBridgePackage,s as sessionEvents,a as sessionEventsDual,sn as sessionOrchestratorPackage,on as sessionPackage,_n as sessionStoragePackage,t as sessions,fr as subagentServicePackage,O as surfaceBindingRegistryPackage,nn as toolApprovalPackage,Mn as toolRegistryPackage,hn as transitionPipelinePackage,gn as trayMenuPackage,r as turns,n as turnsDual,f as verifyAndRecoverAgents,vn as workflowBlockRegistryPackage};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as LogImporterInfo } from "../../index-
|
|
2
|
-
import { a as OrchestratorFactory, i as OrchestratorEntry, r as LogImporterRegistration, t as LogImportRegistryOptions } from "../../types-
|
|
1
|
+
import { t as LogImporterInfo } from "../../index-B-6DtLLz.mjs";
|
|
2
|
+
import { a as OrchestratorFactory, i as OrchestratorEntry, r as LogImporterRegistration, t as LogImportRegistryOptions } from "../../types-CNkx2awa.mjs";
|
|
3
3
|
export { type LogImportRegistryOptions, type LogImporterInfo, type LogImporterRegistration, type OrchestratorEntry, type OrchestratorFactory };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as LogImportSettings, t as LogImporterInfo } from "../../index-
|
|
2
|
-
import { a as OrchestratorFactory, i as OrchestratorEntry, n as LogImportServiceInstance, o as LogImportRegistry, r as LogImporterRegistration, t as LogImportRegistryOptions } from "../../types-
|
|
1
|
+
import { i as LogImportSettings, t as LogImporterInfo } from "../../index-B-6DtLLz.mjs";
|
|
2
|
+
import { a as OrchestratorFactory, i as OrchestratorEntry, n as LogImportServiceInstance, o as LogImportRegistry, r as LogImporterRegistration, t as LogImportRegistryOptions } from "../../types-CNkx2awa.mjs";
|
|
3
3
|
import { LogImportNamespace, LogImportSubjects } from "./namespace.mjs";
|
|
4
4
|
import { IMakaioBus } from "@makaio/framework/bus";
|
|
5
5
|
import * as _$_makaio_contracts0 from "@makaio/framework/contracts";
|
|
@@ -92,6 +92,13 @@ interface PersistImportResultContext {
|
|
|
92
92
|
adapterName: string;
|
|
93
93
|
/** Log file path on disk; only the root segment owns it. */
|
|
94
94
|
logFilePath?: string | null;
|
|
95
|
+
/**
|
|
96
|
+
* Machine identifier of the machine that owns the imported sessions.
|
|
97
|
+
* Always caller-supplied; never derived inside import handlers.
|
|
98
|
+
* Pass `undefined` to omit (leaves stored value untouched).
|
|
99
|
+
* Pass `null` to explicitly store NULL.
|
|
100
|
+
*/
|
|
101
|
+
machineId?: string | null;
|
|
95
102
|
/**
|
|
96
103
|
* Marker stamped on the `session.turn.*` events emitted for ingested turns.
|
|
97
104
|
* Defaults to `'backfill'` (historical/watcher imports); hook-triggered
|
|
@@ -134,6 +141,12 @@ declare function importFromFileContent(params: {
|
|
|
134
141
|
adapterId: string;
|
|
135
142
|
sourceFilePath?: string;
|
|
136
143
|
persistedLogFilePath?: string;
|
|
144
|
+
/**
|
|
145
|
+
* Machine identifier of the machine that owns the imported sessions.
|
|
146
|
+
* Always caller-supplied; never derived here. Pass `undefined` to omit
|
|
147
|
+
* (leaves stored value untouched), `null` to explicitly store NULL.
|
|
148
|
+
*/
|
|
149
|
+
machineId?: string | null;
|
|
137
150
|
/**
|
|
138
151
|
* Marker stamped on `session.turn.*` events emitted for ingested turns.
|
|
139
152
|
* Defaults to `'backfill'` (applied at the {@link importSegmentTree} boundary).
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{LogImportNamespace as e,LogImportSubjects as t}from"./namespace.mjs";import{z as n}from"zod";import*as r from"node:fs/promises";import{basename as i,dirname as a,isAbsolute as o,join as s,relative as c,resolve as l,sep as u}from"node:path";import{MakaioBus as d}from"@makaio/framework/bus";import{COMPRESS_SESSION_LINEAGE_KIND as f,CapabilitySubjects as p,FORK_SESSION_LINEAGE_KIND as m,ROOT_SESSION_LINEAGE_KIND as h,SUBAGENT_SESSION_LINEAGE_KIND as ee,extensionToken as te}from"@makaio/framework/contracts";import{defineDialectSchema as
|
|
2
|
-
`).filter(e=>e.trim());for(let e of n){let n=t.parseRecord(e,r);n&&i.push(n)}}else{let n=t.parseRecord(e,r);n&&i.push(n)}return i}function de(e,n){return e.on(t.scan,async t=>{let{adapterName:i}=t.payload,a=n(i);if(!a){t.setResult({adapterName:i,sessionsFound:0,newSessions:0});return}let{importer:o,logFilePattern:s,adapterName:c}=a,l=o.getLogDirectory();try{await r.access(l)}catch{t.setResult({adapterName:i,sessionsFound:0,newSessions:0});return}let u=s.endsWith(`.jsonl`),d=await M(l,s),f=0,p=0;for(let t of d)try{let n=N(await r.readFile(t,`utf8`),o,u,t);if(n.length===0)continue;let i=C(o.extractSessionContext(n).sessionEvent);f++;let{created:a}=await e.request(b.importUpsert,w(i,c,i.cwd,t,i.startedAt));a&&p++}catch(e){console.warn(`[LogImportRegistry] Failed to process ${t}:`,e instanceof Error?e.message:e)}t.setResult({adapterName:i,sessionsFound:f,newSessions:p})})}async function P(e,t,n,i,a,o,s){try{let o=await r.stat(a),c=o.size===i,l=t.extractSessionContext(n);t.processRecords(n,l);let u={adapterSessionId:s,model:l.model,cwd:l.cwd,sessionEvent:l.sessionEvent,startedEvent:l.startedEvent,state:t.serializeState(l.state)};await e.request(v.set,{filePath:a,bytesRead:i,lastModified:c?o.mtime.toISOString():new Date(0).toISOString(),sessionContext:u})}catch(e){console.warn(`[importFromFileContent] Failed to persist import cursor`,{adapterName:o,adapterSessionId:s,filePath:a,error:e instanceof Error?e.message:String(e),stack:e instanceof Error?e.stack:void 0})}}async function F(e,t,n,r,i){let a=i.find(e=>e.origin===`compact`),o=a?.contentText??null,s=r.timestamp??a?.timestamp??Date.now();await E(e,{sessionId:t,eventId:`session-compacted:${t}:${n}`,timestamp:s,trigger:r.trigger,preTokens:r.preTokens,summary:o,compressChildSessionId:n})}async function I(e,t,n){for(let r of n)await e.request(ae.upsertByAdapterMessageId,{sessionId:t,turnId:null,adapterMessageId:r.adapterMessageId,role:r.role,contentText:r.contentText,blocks:r.blocks,agentId:r.agentId,adapterSessionId:r.adapterSessionId,timestamp:r.timestamp,...r.origin!==void 0&&{origin:r.origin}})}function L(e){return{adapterMessageId:e.adapterMessageId,role:e.role,contentText:e.contentText,blocks:e.blocks,agentId:e.agentId,adapterSessionId:e.adapterSessionId,timestamp:e.timestamp,...e.origin!==void 0&&{origin:e.origin}}}async function R(e,t,n,r,i){let a=new Map(n.messages.map(e=>[e.adapterMessageId,e])),o=new Set,s=0;for(let[n,c]of r.entries()){let l=[],u=new Set;for(let e of c.adapterMessageIds){let t=a.get(e);if(t===void 0){console.warn(`[importSegmentTree] Turn ${n+1}/${r.length} references an unknown member; skipping it`);continue}u.add(e),l.push(L(t))}if(!u.has(c.turnAnchorId)){console.warn(`[importSegmentTree] Turn ${n+1}/${r.length} is missing its anchor; skipping turn`);continue}(await oe(e,{sessionId:t,turnAnchorId:c.turnAnchorId,startedAt:c.startedAt,completedAt:c.completedAt,status:c.status??`completed`,ingestionMarker:i,messages:l})).created&&(s+=1);for(let e of u)o.add(e)}return{turnMemberIds:o,createdTurnCount:s}}async function z(e,t,n,r){let i=n.ingestionMarker??`backfill`,a=T(t,n.model,n.cwd),o=t.messages.length>0?t.messages.reduce((e,t)=>Math.min(e,t.timestamp),1/0):void 0,s=await e.requestOptional(b.getByAdapterSessionId,{adapterSessionId:a.adapterSessionId,source:n.adapterName});if(s.handled&&s.data.session!==null){let e=s.data.session;if(se(e))return{sessionId:e.sessionId,messageCount:0,turnCount:0}}let{sessionId:c}=await e.request(b.importUpsert,w(a,n.adapterName,n.cwd,n.logFilePath,o,n.adapterId,void 0,t.isSidechain)),l=0;if(t.turns!==void 0&&t.turns.length>0){let{turnMemberIds:n,createdTurnCount:r}=await R(e,c,t,t.turns,i);l+=r,await I(e,c,t.messages.filter(e=>!n.has(e.adapterMessageId)))}else await I(e,c,t.messages);r!==void 0&&t.compaction!==void 0&&await F(e,r,c,t.compaction,t.messages);let u=t.messages.length,d={adapterId:n.adapterId,adapterName:n.adapterName,model:n.model,cwd:n.cwd,logFilePath:null,ingestionMarker:i};for(let n of t.children??[]){let t=await z(e,n,d,c);u+=t.messageCount,l+=t.turnCount}return await e.request(b.updateImportStatus,{sessionId:c,importStatus:`imported`}),{sessionId:c,messageCount:u,turnCount:l}}async function B(e,t,n){let r=C(t.sessionEvent);return z(e,ie(t),{adapterId:n.adapterId,adapterName:n.adapterName,model:r.model,cwd:r.cwd,logFilePath:n.logFilePath,ingestionMarker:n.ingestionMarker})}async function V(e){let{bus:t,importer:n,content:r,isJsonl:i,adapterName:a,adapterId:o,sourceFilePath:s,persistedLogFilePath:c}=e,l=N(r,n,i,s);if(l.length===0)throw Error(`No valid records found`);let u=n.processLogFile(l),d=ue(c,s,C(u.sessionEvent).cwd),{sessionId:f,messageCount:p,turnCount:m}=await B(t,u,{adapterId:o,adapterName:a,logFilePath:d,ingestionMarker:e.ingestionMarker});return d!==void 0&&await P(t,n,l,Buffer.byteLength(r,`utf8`),d,a,u.adapterSessionId),{sessionId:f,messageCount:p,turnCount:m}}function H(e,n){return e.on(t.uploadFiles,async t=>{let{adapterName:r,files:i}=t.payload,a=n(r);if(!a){t.setResult({adapterName:r,filesProcessed:i.length,sessionsImported:0,errors:i.map(e=>({filename:e.filename,error:`No importer registered for this adapter`}))});return}let{importer:o,logFilePattern:s,adapterName:c,id:l}=a,u=s.endsWith(`.jsonl`),d=0,f=[];for(let t of i)try{await V({bus:e,importer:o,content:Buffer.from(t.contentBase64,`base64`).toString(`utf8`),isJsonl:u,adapterName:c,adapterId:l,sourceFilePath:t.filename}),d++}catch(e){f.push({filename:t.filename,error:e instanceof Error?e.message:String(e)})}t.setResult({adapterName:r,filesProcessed:i.length,sessionsImported:d,errors:f})})}function U(e,n){return e.on(t.importSession,async t=>{let{adapterSessionId:i,adapterName:a,ingestionMarker:o}=t.payload,{session:s}=await e.request(b.getByAdapterSessionId,{adapterSessionId:i,source:a});if(!s)throw Error(`Session not found for external ID: ${i}`);if(s.source!==a)throw Error(`Session '${i}' belongs to adapter '${s.source}', not '${a}'`);if(!s.logFilePath)throw Error(`No log file path recorded for session with external ID '${i}'. Re-run a discovery scan to populate the file path.`);let c=n(a);if(!c)throw Error(`No importer registered for adapter '${a}'`);let{importer:l,logFilePattern:u,adapterName:d,id:f}=c,p=u.endsWith(`.jsonl`),{sessionId:m,messageCount:h}=await V({bus:e,importer:l,content:await r.readFile(s.logFilePath,`utf8`),isJsonl:p,adapterName:d,adapterId:f,sourceFilePath:s.logFilePath,persistedLogFilePath:s.logFilePath,ingestionMarker:o??`backfill`});t.setResult({sessionId:m,messageCount:h})})}const W=new Map;async function fe(e,t,n){let{filePath:i,adapterName:a}=n,o=t(a);if(o===void 0)return{status:`skipped`,reason:`no-importer`};try{await r.stat(i)}catch{return{status:`skipped`,reason:`file-missing`}}let s=await r.readFile(i,`utf8`),c=o.logFilePattern.endsWith(`.jsonl`),{sessionId:l,messageCount:u,turnCount:d}=await V({bus:e,importer:o.importer,content:s,isJsonl:c,adapterName:o.adapterName,adapterId:o.id,sourceFilePath:i,persistedLogFilePath:i,ingestionMarker:n.ingestionMarker??`live`});return{status:`imported`,sessionId:l,messageCount:u,turnCount:d}}function G(e,n){return e.on(t.importFile,async t=>{let{filePath:r}=t.payload,i=(W.get(r)??Promise.resolve()).then(()=>fe(e,n,t.payload)),a=i.then(()=>void 0,()=>void 0);W.set(r,a),a.then(()=>{W.get(r)===a&&W.delete(r)}),t.setResult(await i)})}function K(e){return e.hasAdapterContribution?`adapter`:`extension`}function pe(e){if(!e||typeof e!=`object`)return!1;let t=e,n=t.registration;return typeof t.id==`string`&&typeof t.displayName==`string`&&typeof t.adapterName==`string`&&!!n&&typeof n==`object`&&typeof n.LogImporterClass==`function`&&typeof n.logFilePattern==`string`&&(n.LogOrchestratorClass===void 0||typeof n.LogOrchestratorClass==`function`)&&(n.LogDiscoveryOrchestratorClass===void 0||typeof n.LogDiscoveryOrchestratorClass==`function`)}function me(e,t,n){return{enabled:n?.enabled??!0,pollIntervalMs:n?.pollIntervalMs,eventsPerSecond:n?.eventsPerSecond,adapterId:e,adapterName:t,checkMakaioManaged:n?.checkMakaioManaged}}function he(e,t,n,r,i){if(!r&&!i)return null;let a=me(e,t,n);return e=>a.enabled?e===`discover`&&i?new i(a):e===`import`&&r?new r(a):null:null}async function ge(e,n,r,i){try{let a=await r.requestOptional(t.getMode,{adapterName:n});if(!a.handled)return;let{mode:o}=a.data;if(o===`disabled`)return;await i(e,o)}catch(e){console.warn(`[LogImport] Failed to restore persisted mode for '${n}':`,e)}}async function q(e,t,n){if(!pe(e)||n.getImporter(e.id)!==void 0)return;await n.register({id:e.id,adapterName:e.adapterName,displayName:e.displayName,source:K({hasAdapterContribution:!0}),importer:new e.registration.LogImporterClass({adapterId:e.id,adapterName:e.adapterName}),logFilePattern:e.registration.logFilePattern,clientId:e.registration.clientId});let r=he(e.id,e.adapterName,e.logImportConfig,e.registration.LogOrchestratorClass,e.registration.LogDiscoveryOrchestratorClass);r&&n.setOrchestratorFactory(e.id,r),await ge(e.id,e.adapterName,t,(e,t)=>n.switchMode(e,t))}async function _e(e,t,n){let r=e.on(p.register,async t=>{await q(t.payload.provider,e,n)},{filter:{capabilityId:`log-import`}});for(let r of t?.getProviders(`log-import`)??[])await q(r,e,n);return r}async function J(e,t){let n=e.get(t);if(n)try{n.orchestrator.isRunning()&&await n.orchestrator.stop()}finally{try{await n.orchestrator.dispose()}finally{e.delete(t)}}}async function ve(e,t){try{await e.start()}catch(n){try{try{e.isRunning()&&await e.stop()}finally{await e.dispose()}}catch(e){console.warn(`[LogImportRegistry] Failed to clean up orchestrator after start failure for '${t}'.`,e instanceof Error?e.message:String(e))}throw n}}var Y=class{bus;capabilityService;registrations=new Map;orchestrators=new Map;cleanupHandlers=[];initialized=!1;constructor(e){this.bus=e?.bus??d,this.capabilityService=e?.capabilityService}async init(){if(this.initialized)return;let e=this.bus.on(t.listImporters,e=>{let t=this.listImporters();e.setResult({importers:t})});this.cleanupHandlers.push(e);let n=de(this.bus,e=>this.getImporterByAdapterName(e));this.cleanupHandlers.push(n);let r=H(this.bus,e=>this.getImporterByAdapterName(e));this.cleanupHandlers.push(r);let i=U(this.bus,e=>this.getImporterByAdapterName(e));this.cleanupHandlers.push(i);let a=G(this.bus,e=>this.getImporterByAdapterName(e));this.cleanupHandlers.push(a);let o=await _e(this.bus,this.capabilityService,this);this.cleanupHandlers.push(o),this.initialized=!0}async register(e){if(this.registrations.has(e.id))throw Error(`Log importer '${e.id}' is already registered`);this.registrations.set(e.id,e)}async unregister(e){if(!this.registrations.has(e))throw Error(`Log importer '${e}' is not registered`);await J(this.orchestrators,e),this.registrations.delete(e)}async startImporter(e){if(!this.registrations.get(e))throw Error(`Log importer '${e}' is not registered`);let t=this.orchestrators.get(e);if(!t)throw Error(`No orchestrator available for '${e}'. Orchestrators must be created and provided by the adapter or extension before starting.`);t.orchestrator.isRunning()||(await t.orchestrator.start(),t.isManaged=!0)}async stopImporter(e){let t=this.orchestrators.get(e);t&&(t.orchestrator.isRunning()&&await t.orchestrator.stop(),t.isManaged=!1)}async switchMode(e,t){let n=this.registrations.get(e);if(!n)throw Error(`Log importer '${e}' is not registered`);if(await J(this.orchestrators,e),t===`disabled`||!n.orchestratorFactory)return;let r=n.orchestratorFactory(t);r&&(await ve(r,e),this.orchestrators.set(e,{orchestrator:r,isManaged:!0}))}async startDiscovery(e){return this.switchMode(e,`discover`)}setOrchestratorFactory(e,t){let n=this.registrations.get(e);if(!n)throw Error(`Cannot set orchestrator factory for unregistered importer '${e}'`);this.registrations.set(e,{...n,orchestratorFactory:t})}listImporters(){let e=[];for(let[,t]of this.registrations){let n=this.orchestrators.get(t.id)?.orchestrator.isRunning()??!1;e.push({id:t.id,adapterName:t.adapterName,displayName:t.displayName,source:t.source,logFilePattern:t.logFilePattern,isRunning:n,supportsManualImport:t.supportsManualImport??!0,...t.clientId!==void 0&&{clientId:t.clientId}})}return e}getImporter(e){let t=this.registrations.get(e);return t?{...t}:void 0}getImporterByAdapterName(e){for(let t of this.registrations.values())if(t.adapterName===e)return{...t}}detectImporter(e){let t,n=0;for(let r of this.registrations.values()){let i=r.importer.canHandle(e);if(i===!1)continue;let a=i===!0?1:i.confidence;a>n&&(n=a,t=r)}return t}async registerOrchestrator(e,t){if(!this.registrations.has(e))throw Error(`Cannot register orchestrator for unregistered importer '${e}'`);await J(this.orchestrators,e),this.orchestrators.set(e,{orchestrator:t,isManaged:!1})}async destroy(){if(!(!this.initialized&&this.orchestrators.size===0&&this.cleanupHandlers.length===0)){for(let[e]of this.orchestrators)await J(this.orchestrators,e);for(let e of this.cleanupHandlers)e();this.cleanupHandlers.length=0,this.initialized=!1}}};const X=te(`log-import-registry`),ye={name:X.name,displayName:`Log Import Registry`,version:`0.1.0`,critical:!0,namespaces:[e],create:e=>new Y({bus:e.bus})};function be(e,t,n){return{enabled:n?.enabled??!0,pollIntervalMs:n?.pollIntervalMs,eventsPerSecond:n?.eventsPerSecond,adapterId:e,adapterName:t,checkMakaioManaged:n?.checkMakaioManaged}}function xe(e,t,n){if(!n.LogOrchestratorClass&&!n.LogDiscoveryOrchestratorClass)return null;let r=be(e,t,n.logImportConfig);return e=>r.enabled?e===`discover`&&n.LogDiscoveryOrchestratorClass?new n.LogDiscoveryOrchestratorClass(r):e===`import`&&n.LogOrchestratorClass?new n.LogOrchestratorClass(r):null:null}function Se(){let e=new Map;return{filter:e=>!!e.logImport,processActivated:async(t,n,r)=>{let{logImport:i}=n;if(!i)return;let a=r.getService(X);if(!a)throw Error(`[LogImportContributionProcessor] LogImportRegistry is not available. Ensure '${X.name}' is listed as a dependency before activating '${t}'.`);let{adapterName:o,displayName:s,config:c}=i,l=c,u=`package:${t}`,d=K({hasAdapterContribution:!!n.adapters?.length}),f=new l.LogImporterClass({adapterId:u,adapterName:o});await a.register({id:u,adapterName:o,displayName:s,source:d,importer:f,logFilePattern:l.logFilePattern??``,clientId:l.clientId,supportsManualImport:l.supportsManualImport});try{let e=xe(u,o,l);e&&a.setOrchestratorFactory(u,e)}catch(e){try{await a.unregister(u)}catch(e){console.error(`[LogImportContributionProcessor] Rollback of log importer '${u}' failed:`,e)}throw e}console.info(`[LogImportContributionProcessor] Registered log importer '${o}' from package: ${t}`),e.set(u,async()=>{try{await a.unregister(u)}catch(e){console.error(`[LogImportContributionProcessor] Failed to unregister log importer '${u}' during cleanup:`,e)}})},processStopped:async t=>{let n=`package:${t}`,r=e.get(n);r&&(e.delete(n),await r())}}}const Ce={linked:`linked`,persisted:`persisted`,finalized:`finalized`},Z=g(`log_import_settings`,e=>({adapterName:e.text(`adapter_name`).primaryKey(),mode:e.textEnum(`mode`,{enum:[`disabled`,`discover`,`import`]}).notNull().default(`disabled`),createdAt:e.epochMs(`created_at`).notNull(),updatedAt:e.epochMs(`updated_at`).notNull()})),we=Z.sqlite,Te=Z.postgres,Q=ne({logImportSettings:we},{logImportSettings:Te});function $(e){return{adapterName:e.adapterName,mode:e.mode,createdAt:e.createdAt,updatedAt:e.updatedAt}}function Ee(e){let{bus:n,db:r}=e,{logImportSettings:i}=_(r,Q);return n.on(t.getMode,async e=>{let{adapterName:t}=e.payload,[n]=await r.select().from(i).where(re(i.adapterName,t)).limit(1);e.setResult({mode:n?.mode??`disabled`})})}function De(e){let{bus:n,db:r}=e,{logImportSettings:i}=_(r,Q);return n.on(t.setMode,async e=>{let{adapterName:t,mode:n}=e.payload,a=Date.now();await r.insert(i).values({adapterName:t,mode:n,createdAt:a,updatedAt:a}).onConflictDoUpdate({target:i.adapterName,set:{mode:n,updatedAt:a}}),e.setResult({success:!0})})}function Oe(e){let{bus:n,db:r}=e,{logImportSettings:i}=_(r,Q);return n.on(t.listSettings,async e=>{let t=await r.select().from(i);e.setResult({settings:t.map($)})})}function ke(e,t){let n={bus:e,db:t},r=[Ee(n),De(n),Oe(n)];return()=>r.forEach(e=>e())}export{Ce as ImportPhase,e as LogImportNamespace,Y as LogImportRegistry,X as LogImportRegistryToken,t as LogImportSubjects,E as appendSessionCompactedEvent,Se as createLogImportContributionProcessor,V as importFromFileContent,ye as logImportRegistryPackage,B as persistImportResultTree,ke as registerDrizzleLogImportStorage,G as registerImportFileHandler,$ as rowToSettings};
|
|
1
|
+
import{LogImportNamespace as e,LogImportSubjects as t}from"./namespace.mjs";import{z as n}from"zod";import*as r from"node:fs/promises";import{basename as i,dirname as a,isAbsolute as o,join as s,relative as c,resolve as l,sep as u}from"node:path";import{MakaioBus as d}from"@makaio/framework/bus";import{COMPRESS_SESSION_LINEAGE_KIND as f,CapabilitySubjects as p,FORK_SESSION_LINEAGE_KIND as m,ROOT_SESSION_LINEAGE_KIND as h,SUBAGENT_SESSION_LINEAGE_KIND as ee,extensionToken as te}from"@makaio/framework/contracts";import{defineDialectSchema as g,defineDualTable as ne,resolveSchema as _}from"@makaio/framework/storage/drizzle";import{eq as v}from"drizzle-orm";import{ImportCursorStorageSubjects as re,toImportSegment as ie}from"@makaio/framework/adapters";import{MessageStorageSubjects as ae,SessionEventStorageSubjects as y,SessionStorageSubjects as b,ingestCompletedTurn as oe,isPolicyDiscoveredObservedSession as se,toSessionLineage as x}from"@makaio/framework/services/session";function S(e,t){return t===void 0?{}:{[e]:t}}const ce=n.discriminatedUnion(`kind`,[n.object({adapterSessionId:n.string(),kind:n.literal(h),parentAdapterSessionId:n.null().default(null),forkPointMessageId:n.null().default(null),model:n.string().nullable().default(null),cwd:n.string().nullable().default(null),startedAt:n.number().finite().optional()}),n.object({adapterSessionId:n.string(),kind:n.literal(m),parentAdapterSessionId:n.string(),forkPointMessageId:n.string(),model:n.string().nullable().default(null),cwd:n.string().nullable().default(null),startedAt:n.number().finite().optional()}),n.object({adapterSessionId:n.string(),kind:n.literal(ee),parentAdapterSessionId:n.string(),forkPointMessageId:n.null().default(null),model:n.string().nullable().default(null),cwd:n.string().nullable().default(null),startedAt:n.number().finite().optional()}),n.object({adapterSessionId:n.string(),kind:n.literal(f),parentAdapterSessionId:n.string(),forkPointMessageId:n.null().default(null),model:n.string().nullable().default(null),cwd:n.string().nullable().default(null),startedAt:n.number().finite().optional()})]);function C(e){return ce.parse(e.payload)}function w(e){let{metadata:t,source:n,cwd:r,logFilePath:i,startedAt:a,adapterId:o,clientId:s,isSidechain:c,machineId:l}=e,u=x(t);return{externalSessionId:t.adapterSessionId,source:n,cwd:r,...S(`logFilePath`,i),...S(`startedAt`,a),...S(`adapterId`,o),...S(`clientId`,s),...S(`isSidechain`,c),...S(`machineId`,l),...u}}function T(e,t,n){let r={adapterSessionId:e.adapterSessionId,model:t,cwd:n};switch(e.lineage.kind){case`root`:return{...r,kind:`root`,parentAdapterSessionId:null,forkPointMessageId:null};case`fork`:if(e.lineage.parentAdapterSessionId==null)throw Error(`Fork segment ${e.adapterSessionId} missing parentAdapterSessionId`);if(e.lineage.forkPointMessageId==null)throw Error(`Fork segment ${e.adapterSessionId} missing forkPointMessageId`);return{...r,kind:`fork`,parentAdapterSessionId:e.lineage.parentAdapterSessionId,forkPointMessageId:e.lineage.forkPointMessageId};case`subagent`:if(e.lineage.parentAdapterSessionId==null)throw Error(`Subagent segment ${e.adapterSessionId} missing parentAdapterSessionId`);return{...r,kind:`subagent`,parentAdapterSessionId:e.lineage.parentAdapterSessionId,forkPointMessageId:null};case`compress`:if(e.lineage.parentAdapterSessionId==null)throw Error(`Compress segment ${e.adapterSessionId} missing parentAdapterSessionId`);return{...r,kind:`compress`,parentAdapterSessionId:e.lineage.parentAdapterSessionId,forkPointMessageId:null};default:{let t=e.lineage.kind;throw Error(`Unknown lineage kind: ${String(t)}`)}}}async function E(e,t){let{events:n}=await e.request(y.getByIds,{sessionId:t.sessionId,eventIds:[t.eventId]});if(!(n.length>0))try{await e.request(y.append,{event:{sessionId:t.sessionId,eventId:t.eventId,timestamp:t.timestamp,type:`session.compacted`,payload:{trigger:t.trigger,preTokens:t.preTokens,summary:t.summary,compressChildSessionId:t.compressChildSessionId}}})}catch(n){let{events:r}=await e.request(y.getByIds,{sessionId:t.sessionId,eventIds:[t.eventId]});if(r.length>0)return;throw n}}const D=new Map,O=`MAKAIO_GLOBSTAR_DIR`,k=`MAKAIO_GLOBSTAR`,A=`MAKAIO_STAR`;function j(e){return e.replace(/[\\/]+/g,`/`).replace(/^\.\/+/,``)}function le(e,t){let n=j(e),r=j(t),a=r.includes(`/`)?n:i(n);if(r.length>200)return!1;if(!r.includes(`*`))return a===r;let o=0;for(let e of r)if(e===`*`&&(o+=1,o>64))return!1;let s=D.get(r);if(s)return D.delete(r),D.set(r,s),s.test(a);let c=r.replace(/\*\*\//g,O).replace(/\*\*/g,k).replace(/\*/g,A).replace(/[.+^${}()|[\]\\]/g,`\\$&`).replaceAll(O,`(?:.*/)?`).replaceAll(k,`.*`).replaceAll(A,`[^/]*`),l=RegExp(`^${c}$`);if(D.size>=512){let e=D.keys().next();e.done||D.delete(e.value)}return D.set(r,l),l.test(a)}async function M(e,t,n=e){let i=[];try{let a=await r.readdir(e,{withFileTypes:!0});for(let r of a){let a=s(e,r.name);if(r.isDirectory()){let e=await M(a,t,n);i.push(...e)}else if(r.isFile()){if(!le(c(n,a).split(u).join(`/`),t))continue;i.push(a)}}}catch{}return i}function ue(e,t,n){if(e!==void 0){if(o(e))return e;if(t&&o(t))return l(a(t),e);if(n&&o(n))return l(n,e)}}function N(e,t,n=!0,r){let i=[];if(n){let n=e.split(`
|
|
2
|
+
`).filter(e=>e.trim());for(let e of n){let n=t.parseRecord(e,r);n&&i.push(n)}}else{let n=t.parseRecord(e,r);n&&i.push(n)}return i}function de(e,n){return e.on(t.scan,async t=>{let{adapterName:i}=t.payload,a=n(i);if(!a){t.setResult({adapterName:i,sessionsFound:0,newSessions:0});return}let{importer:o,logFilePattern:s,adapterName:c,machineId:l}=a,u=o.getLogDirectory();try{await r.access(u)}catch{t.setResult({adapterName:i,sessionsFound:0,newSessions:0});return}let d=s.endsWith(`.jsonl`),f=await M(u,s),p=0,m=0;for(let t of f)try{let n=N(await r.readFile(t,`utf8`),o,d,t);if(n.length===0)continue;let i=C(o.extractSessionContext(n).sessionEvent);p++;let{created:a}=await e.request(b.importUpsert,w({metadata:i,source:c,cwd:i.cwd,logFilePath:t,startedAt:i.startedAt,machineId:l}));a&&m++}catch(e){console.warn(`[LogImportRegistry] Failed to process ${t}:`,e instanceof Error?e.message:e)}t.setResult({adapterName:i,sessionsFound:p,newSessions:m})})}async function fe(e,t,n,i,a,o,s){try{let o=await r.stat(a),c=o.size===i,l=t.extractSessionContext(n);t.processRecords(n,l);let u={adapterSessionId:s,model:l.model,cwd:l.cwd,sessionEvent:l.sessionEvent,startedEvent:l.startedEvent,state:t.serializeState(l.state)};await e.request(re.set,{filePath:a,bytesRead:i,lastModified:c?o.mtime.toISOString():new Date(0).toISOString(),sessionContext:u})}catch(e){console.warn(`[importFromFileContent] Failed to persist import cursor`,{adapterName:o,adapterSessionId:s,filePath:a,error:e instanceof Error?e.message:String(e),stack:e instanceof Error?e.stack:void 0})}}async function P(e,t,n,r,i){let a=i.find(e=>e.origin===`compact`),o=a?.contentText??null,s=r.timestamp??a?.timestamp??Date.now();await E(e,{sessionId:t,eventId:`session-compacted:${t}:${n}`,timestamp:s,trigger:r.trigger,preTokens:r.preTokens,summary:o,compressChildSessionId:n})}async function F(e,t,n){for(let r of n)await e.request(ae.upsertByAdapterMessageId,{sessionId:t,turnId:null,adapterMessageId:r.adapterMessageId,role:r.role,contentText:r.contentText,blocks:r.blocks,agentId:r.agentId,adapterSessionId:r.adapterSessionId,timestamp:r.timestamp,...r.origin!==void 0&&{origin:r.origin}})}function I(e){return{adapterMessageId:e.adapterMessageId,role:e.role,contentText:e.contentText,blocks:e.blocks,agentId:e.agentId,adapterSessionId:e.adapterSessionId,timestamp:e.timestamp,...e.origin!==void 0&&{origin:e.origin}}}async function L(e,t,n,r,i){let a=new Map(n.messages.map(e=>[e.adapterMessageId,e])),o=new Set,s=0;for(let[n,c]of r.entries()){let l=[],u=new Set;for(let e of c.adapterMessageIds){let t=a.get(e);if(t===void 0){console.warn(`[importSegmentTree] Turn ${n+1}/${r.length} references an unknown member; skipping it`);continue}u.add(e),l.push(I(t))}if(!u.has(c.turnAnchorId)){console.warn(`[importSegmentTree] Turn ${n+1}/${r.length} is missing its anchor; skipping turn`);continue}(await oe(e,{sessionId:t,turnAnchorId:c.turnAnchorId,startedAt:c.startedAt,completedAt:c.completedAt,status:c.status??`completed`,ingestionMarker:i,messages:l})).created&&(s+=1);for(let e of u)o.add(e)}return{turnMemberIds:o,createdTurnCount:s}}async function R(e,t,n,r){let i=n.ingestionMarker??`backfill`,a=T(t,n.model,n.cwd),o=t.messages.length>0?t.messages.reduce((e,t)=>Math.min(e,t.timestamp),1/0):void 0,s=await e.requestOptional(b.getByAdapterSessionId,{adapterSessionId:a.adapterSessionId,source:n.adapterName});if(s.handled&&s.data.session!==null){let e=s.data.session;if(se(e))return{sessionId:e.sessionId,messageCount:0,turnCount:0}}let{sessionId:c}=await e.request(b.importUpsert,w({metadata:a,source:n.adapterName,cwd:n.cwd,logFilePath:n.logFilePath,startedAt:o,adapterId:n.adapterId,isSidechain:t.isSidechain,machineId:n.machineId})),l=0;if(t.turns!==void 0&&t.turns.length>0){let{turnMemberIds:n,createdTurnCount:r}=await L(e,c,t,t.turns,i);l+=r,await F(e,c,t.messages.filter(e=>!n.has(e.adapterMessageId)))}else await F(e,c,t.messages);r!==void 0&&t.compaction!==void 0&&await P(e,r,c,t.compaction,t.messages);let u=t.messages.length,d={adapterId:n.adapterId,adapterName:n.adapterName,model:n.model,cwd:n.cwd,logFilePath:null,machineId:n.machineId,ingestionMarker:i};for(let n of t.children??[]){let t=await R(e,n,d,c);u+=t.messageCount,l+=t.turnCount}return await e.request(b.updateImportStatus,{sessionId:c,importStatus:`imported`}),{sessionId:c,messageCount:u,turnCount:l}}async function z(e,t,n){let r=C(t.sessionEvent);return R(e,ie(t),{adapterId:n.adapterId,adapterName:n.adapterName,model:r.model,cwd:r.cwd,logFilePath:n.logFilePath,machineId:n.machineId,ingestionMarker:n.ingestionMarker})}async function B(e){let{bus:t,importer:n,content:r,isJsonl:i,adapterName:a,adapterId:o,sourceFilePath:s,persistedLogFilePath:c}=e,l=N(r,n,i,s);if(l.length===0)throw Error(`No valid records found`);let u=n.processLogFile(l),d=ue(c,s,C(u.sessionEvent).cwd),{sessionId:f,messageCount:p,turnCount:m}=await z(t,u,{adapterId:o,adapterName:a,logFilePath:d,machineId:e.machineId,ingestionMarker:e.ingestionMarker});return d!==void 0&&await fe(t,n,l,Buffer.byteLength(r,`utf8`),d,a,u.adapterSessionId),{sessionId:f,messageCount:p,turnCount:m}}function V(e,n){return e.on(t.uploadFiles,async t=>{let{adapterName:r,files:i}=t.payload,a=n(r);if(!a){t.setResult({adapterName:r,filesProcessed:i.length,sessionsImported:0,errors:i.map(e=>({filename:e.filename,error:`No importer registered for this adapter`}))});return}let{importer:o,logFilePattern:s,adapterName:c,id:l}=a,u=s.endsWith(`.jsonl`),d=0,f=[];for(let t of i)try{await B({bus:e,importer:o,content:Buffer.from(t.contentBase64,`base64`).toString(`utf8`),isJsonl:u,adapterName:c,adapterId:l,sourceFilePath:t.filename}),d++}catch(e){f.push({filename:t.filename,error:e instanceof Error?e.message:String(e)})}t.setResult({adapterName:r,filesProcessed:i.length,sessionsImported:d,errors:f})})}function H(e,n){return e.on(t.importSession,async t=>{let{adapterSessionId:i,adapterName:a,ingestionMarker:o}=t.payload,{session:s}=await e.request(b.getByAdapterSessionId,{adapterSessionId:i,source:a});if(!s)throw Error(`Session not found for external ID: ${i}`);if(s.source!==a)throw Error(`Session '${i}' belongs to adapter '${s.source}', not '${a}'`);if(!s.logFilePath)throw Error(`No log file path recorded for session with external ID '${i}'. Re-run a discovery scan to populate the file path.`);let c=n(a);if(!c)throw Error(`No importer registered for adapter '${a}'`);let{importer:l,logFilePattern:u,adapterName:d,id:f}=c,p=u.endsWith(`.jsonl`),{sessionId:m,messageCount:h}=await B({bus:e,importer:l,content:await r.readFile(s.logFilePath,`utf8`),isJsonl:p,adapterName:d,adapterId:f,machineId:c.machineId,sourceFilePath:s.logFilePath,persistedLogFilePath:s.logFilePath,ingestionMarker:o??`backfill`});t.setResult({sessionId:m,messageCount:h})})}const U=new Map;async function pe(e,t,n){let{filePath:i,adapterName:a}=n,o=t(a);if(o===void 0)return{status:`skipped`,reason:`no-importer`};try{await r.stat(i)}catch{return{status:`skipped`,reason:`file-missing`}}let s=await r.readFile(i,`utf8`),c=o.logFilePattern.endsWith(`.jsonl`),{sessionId:l,messageCount:u,turnCount:d}=await B({bus:e,importer:o.importer,content:s,isJsonl:c,adapterName:o.adapterName,adapterId:o.id,machineId:o.machineId,sourceFilePath:i,persistedLogFilePath:i,ingestionMarker:n.ingestionMarker??`live`});return{status:`imported`,sessionId:l,messageCount:u,turnCount:d}}function W(e,n){return e.on(t.importFile,async t=>{let{filePath:r}=t.payload,i=(U.get(r)??Promise.resolve()).then(()=>pe(e,n,t.payload)),a=i.then(()=>void 0,()=>void 0);U.set(r,a),a.then(()=>{U.get(r)===a&&U.delete(r)}),t.setResult(await i)})}function G(e){return e.hasAdapterContribution?`adapter`:`extension`}function K(e){let{adapterId:t,adapterName:n,logImportConfig:r,machineId:i,clientId:a}=e;return{enabled:r?.enabled??!0,pollIntervalMs:r?.pollIntervalMs,eventsPerSecond:r?.eventsPerSecond,adapterId:t,adapterName:n,checkMakaioManaged:r?.checkMakaioManaged,clientId:a,machineId:i}}function me(e){if(!e||typeof e!=`object`)return!1;let t=e,n=t.registration;return typeof t.id==`string`&&typeof t.displayName==`string`&&typeof t.adapterName==`string`&&!!n&&typeof n==`object`&&typeof n.LogImporterClass==`function`&&typeof n.logFilePattern==`string`&&(n.LogOrchestratorClass===void 0||typeof n.LogOrchestratorClass==`function`)&&(n.LogDiscoveryOrchestratorClass===void 0||typeof n.LogDiscoveryOrchestratorClass==`function`)}function he(e,t,n,r,i,a,o){if(!r&&!i)return null;let s=K({adapterId:e,adapterName:t,logImportConfig:n,machineId:a,clientId:o});return e=>s.enabled?e===`discover`&&i?new i(s):e===`import`&&r?new r(s):null:null}async function ge(e,n,r,i){try{let a=await r.requestOptional(t.getMode,{adapterName:n});if(!a.handled)return;let{mode:o}=a.data;if(o===`disabled`)return;await i(e,o)}catch(e){console.warn(`[LogImport] Failed to restore persisted mode for '${n}':`,e)}}async function q(e,t,n){if(!me(e)||n.getImporter(e.id)!==void 0)return;await n.register({id:e.id,adapterName:e.adapterName,displayName:e.displayName,source:G({hasAdapterContribution:!0}),importer:new e.registration.LogImporterClass({adapterId:e.id,adapterName:e.adapterName}),logFilePattern:e.registration.logFilePattern,clientId:e.registration.clientId,machineId:e.machineId});let r=he(e.id,e.adapterName,e.logImportConfig,e.registration.LogOrchestratorClass,e.registration.LogDiscoveryOrchestratorClass,e.machineId,e.registration.clientId);r&&n.setOrchestratorFactory(e.id,r),await ge(e.id,e.adapterName,t,(e,t)=>n.switchMode(e,t))}async function _e(e,t,n){let r=e.on(p.register,async t=>{await q(t.payload.provider,e,n)},{filter:{capabilityId:`log-import`}});for(let r of t?.getProviders(`log-import`)??[])await q(r,e,n);return r}async function J(e,t){let n=e.get(t);if(n)try{n.orchestrator.isRunning()&&await n.orchestrator.stop()}finally{try{await n.orchestrator.dispose()}finally{e.delete(t)}}}async function ve(e,t){try{await e.start()}catch(n){try{try{e.isRunning()&&await e.stop()}finally{await e.dispose()}}catch(e){console.warn(`[LogImportRegistry] Failed to clean up orchestrator after start failure for '${t}'.`,e instanceof Error?e.message:String(e))}throw n}}var Y=class{bus;capabilityService;registrations=new Map;orchestrators=new Map;cleanupHandlers=[];initialized=!1;constructor(e){this.bus=e?.bus??d,this.capabilityService=e?.capabilityService}async init(){if(this.initialized)return;let e=this.bus.on(t.listImporters,e=>{let t=this.listImporters();e.setResult({importers:t})});this.cleanupHandlers.push(e);let n=de(this.bus,e=>this.getImporterByAdapterName(e));this.cleanupHandlers.push(n);let r=V(this.bus,e=>this.getImporterByAdapterName(e));this.cleanupHandlers.push(r);let i=H(this.bus,e=>this.getImporterByAdapterName(e));this.cleanupHandlers.push(i);let a=W(this.bus,e=>this.getImporterByAdapterName(e));this.cleanupHandlers.push(a);let o=await _e(this.bus,this.capabilityService,this);this.cleanupHandlers.push(o),this.initialized=!0}async register(e){if(this.registrations.has(e.id))throw Error(`Log importer '${e.id}' is already registered`);this.registrations.set(e.id,e)}async unregister(e){if(!this.registrations.has(e))throw Error(`Log importer '${e}' is not registered`);await J(this.orchestrators,e),this.registrations.delete(e)}async startImporter(e){if(!this.registrations.get(e))throw Error(`Log importer '${e}' is not registered`);let t=this.orchestrators.get(e);if(!t)throw Error(`No orchestrator available for '${e}'. Orchestrators must be created and provided by the adapter or extension before starting.`);t.orchestrator.isRunning()||(await t.orchestrator.start(),t.isManaged=!0)}async stopImporter(e){let t=this.orchestrators.get(e);t&&(t.orchestrator.isRunning()&&await t.orchestrator.stop(),t.isManaged=!1)}async switchMode(e,t){let n=this.registrations.get(e);if(!n)throw Error(`Log importer '${e}' is not registered`);if(await J(this.orchestrators,e),t===`disabled`||!n.orchestratorFactory)return;let r=n.orchestratorFactory(t);r&&(await ve(r,e),this.orchestrators.set(e,{orchestrator:r,isManaged:!0}))}async startDiscovery(e){return this.switchMode(e,`discover`)}setOrchestratorFactory(e,t){let n=this.registrations.get(e);if(!n)throw Error(`Cannot set orchestrator factory for unregistered importer '${e}'`);this.registrations.set(e,{...n,orchestratorFactory:t})}listImporters(){let e=[];for(let[,t]of this.registrations){let n=this.orchestrators.get(t.id)?.orchestrator.isRunning()??!1;e.push({id:t.id,adapterName:t.adapterName,displayName:t.displayName,source:t.source,logFilePattern:t.logFilePattern,isRunning:n,supportsManualImport:t.supportsManualImport??!0,...t.clientId!==void 0&&{clientId:t.clientId}})}return e}getImporter(e){let t=this.registrations.get(e);return t?{...t}:void 0}getImporterByAdapterName(e){for(let t of this.registrations.values())if(t.adapterName===e)return{...t}}detectImporter(e){let t,n=0;for(let r of this.registrations.values()){let i=r.importer.canHandle(e);if(i===!1)continue;let a=i===!0?1:i.confidence;a>n&&(n=a,t=r)}return t}async registerOrchestrator(e,t){if(!this.registrations.has(e))throw Error(`Cannot register orchestrator for unregistered importer '${e}'`);await J(this.orchestrators,e),this.orchestrators.set(e,{orchestrator:t,isManaged:!1})}async destroy(){if(!(!this.initialized&&this.orchestrators.size===0&&this.cleanupHandlers.length===0)){for(let[e]of this.orchestrators)await J(this.orchestrators,e);for(let e of this.cleanupHandlers)e();this.cleanupHandlers.length=0,this.initialized=!1}}};const X=te(`log-import-registry`),ye={name:X.name,displayName:`Log Import Registry`,version:`0.1.0`,critical:!0,namespaces:[e],create:e=>new Y({bus:e.bus})};function be(e,t,n,r){if(!n.LogOrchestratorClass&&!n.LogDiscoveryOrchestratorClass)return null;let i=K({adapterId:e,adapterName:t,logImportConfig:n.logImportConfig,machineId:r,clientId:n.clientId});return e=>i.enabled?e===`discover`&&n.LogDiscoveryOrchestratorClass?new n.LogDiscoveryOrchestratorClass(i):e===`import`&&n.LogOrchestratorClass?new n.LogOrchestratorClass(i):null:null}function xe(){let e=new Map;return{filter:e=>!!e.logImport,processActivated:async(t,n,r)=>{let{logImport:i}=n;if(!i)return;let a=r.getService(X);if(!a)throw Error(`[LogImportContributionProcessor] LogImportRegistry is not available. Ensure '${X.name}' is listed as a dependency before activating '${t}'.`);let{adapterName:o,displayName:s,config:c}=i,l=c,u=`package:${t}`,d=G({hasAdapterContribution:!!n.adapters?.length}),f=new l.LogImporterClass({adapterId:u,adapterName:o});await a.register({id:u,adapterName:o,displayName:s,source:d,importer:f,logFilePattern:l.logFilePattern??``,clientId:l.clientId,supportsManualImport:l.supportsManualImport,machineId:r.machineId});try{let e=be(u,o,l,r.machineId);e&&a.setOrchestratorFactory(u,e)}catch(e){try{await a.unregister(u)}catch(e){console.error(`[LogImportContributionProcessor] Rollback of log importer '${u}' failed:`,e)}throw e}console.info(`[LogImportContributionProcessor] Registered log importer '${o}' from package: ${t}`),e.set(u,async()=>{try{await a.unregister(u)}catch(e){console.error(`[LogImportContributionProcessor] Failed to unregister log importer '${u}' during cleanup:`,e)}})},processStopped:async t=>{let n=`package:${t}`,r=e.get(n);r&&(e.delete(n),await r())}}}const Se={linked:`linked`,persisted:`persisted`,finalized:`finalized`},Z=ne(`log_import_settings`,e=>({adapterName:e.text(`adapter_name`).primaryKey(),mode:e.textEnum(`mode`,{enum:[`disabled`,`discover`,`import`]}).notNull().default(`disabled`),createdAt:e.epochMs(`created_at`).notNull(),updatedAt:e.epochMs(`updated_at`).notNull()})),Ce=Z.sqlite,we=Z.postgres,Q=g({logImportSettings:Ce},{logImportSettings:we});function $(e){return{adapterName:e.adapterName,mode:e.mode,createdAt:e.createdAt,updatedAt:e.updatedAt}}function Te(e){let{bus:n,db:r}=e,{logImportSettings:i}=_(r,Q);return n.on(t.getMode,async e=>{let{adapterName:t}=e.payload,[n]=await r.select().from(i).where(v(i.adapterName,t)).limit(1);e.setResult({mode:n?.mode??`disabled`})})}function Ee(e){let{bus:n,db:r}=e,{logImportSettings:i}=_(r,Q);return n.on(t.setMode,async e=>{let{adapterName:t,mode:n}=e.payload,a=Date.now();await r.insert(i).values({adapterName:t,mode:n,createdAt:a,updatedAt:a}).onConflictDoUpdate({target:i.adapterName,set:{mode:n,updatedAt:a}}),e.setResult({success:!0})})}function De(e){let{bus:n,db:r}=e,{logImportSettings:i}=_(r,Q);return n.on(t.listSettings,async e=>{let t=await r.select().from(i);e.setResult({settings:t.map($)})})}function Oe(e,t){let n={bus:e,db:t},r=[Te(n),Ee(n),De(n)];return()=>r.forEach(e=>e())}export{Se as ImportPhase,e as LogImportNamespace,Y as LogImportRegistry,X as LogImportRegistryToken,t as LogImportSubjects,E as appendSessionCompactedEvent,xe as createLogImportContributionProcessor,B as importFromFileContent,ye as logImportRegistryPackage,z as persistImportResultTree,Oe as registerDrizzleLogImportStorage,W as registerImportFileHandler,$ as rowToSettings};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as IMPORT_LAST_SCAN_CATEGORY, r as LogImportMode, t as LogImporterInfo } from "../../index-
|
|
1
|
+
import { n as IMPORT_LAST_SCAN_CATEGORY, r as LogImportMode, t as LogImporterInfo } from "../../index-B-6DtLLz.mjs";
|
|
2
2
|
import { LogImportSubjects } from "./namespace.mjs";
|
|
3
3
|
export { IMPORT_LAST_SCAN_CATEGORY, type LogImportMode, LogImportSubjects, type LogImporterInfo };
|
|
@@ -74,8 +74,8 @@ declare const LogImportNamespace: _$_makaio_core0.BusNamespaceDefinition<"log-im
|
|
|
74
74
|
adapterName: _$zod.ZodString;
|
|
75
75
|
displayName: _$zod.ZodString;
|
|
76
76
|
source: _$zod.ZodEnum<{
|
|
77
|
-
adapter: "adapter";
|
|
78
77
|
extension: "extension";
|
|
78
|
+
adapter: "adapter";
|
|
79
79
|
}>;
|
|
80
80
|
logFilePattern: _$zod.ZodString;
|
|
81
81
|
isRunning: _$zod.ZodBoolean;
|
|
@@ -261,8 +261,8 @@ declare const LogImportSubjects: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fla
|
|
|
261
261
|
adapterName: _$zod.ZodString;
|
|
262
262
|
displayName: _$zod.ZodString;
|
|
263
263
|
source: _$zod.ZodEnum<{
|
|
264
|
-
adapter: "adapter";
|
|
265
264
|
extension: "extension";
|
|
265
|
+
adapter: "adapter";
|
|
266
266
|
}>;
|
|
267
267
|
logFilePattern: _$zod.ZodString;
|
|
268
268
|
isRunning: _$zod.ZodBoolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as registerCompressHandler, i as registerForkHandler, n as routeToAgents, o as registerAttachHandler, r as registerMergeHandler, s as registerAbandonHandler, t as routeToAgentsCore } from "../../../index-
|
|
1
|
+
import { a as registerCompressHandler, i as registerForkHandler, n as routeToAgents, o as registerAttachHandler, r as registerMergeHandler, s as registerAbandonHandler, t as routeToAgentsCore } from "../../../index-BvTd61i5.mjs";
|
|
2
2
|
export { registerAbandonHandler, registerAttachHandler, registerCompressHandler, registerForkHandler, registerMergeHandler, routeToAgents, routeToAgentsCore };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,c as t,i as n,l as r,r as i,t as a,u as o}from"../../../handlers-
|
|
1
|
+
import{a as e,c as t,i as n,l as r,r as i,t as a,u as o}from"../../../handlers-B74FvKlA.mjs";export{t as registerAbandonHandler,o as registerAttachHandler,e as registerCompressHandler,n as registerForkHandler,i as registerMergeHandler,a as routeToAgents,r as routeToAgentsCore};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { a as registerCompressHandler, c as SessionTurnManager, d as Turn, f as TurnConfig, h as TurnStateChange, i as registerForkHandler, l as TurnCompleteCallback, m as TurnResult, n as routeToAgents, o as registerAttachHandler, p as TurnContext, r as registerMergeHandler, s as registerAbandonHandler, t as routeToAgentsCore, u as TurnCompletionResult } from "../../index-
|
|
1
|
+
import { $ as ingestCompletedTurn, $t as ensureAgentCwd, A as SelectTurn, At as AgentStorageSubjects, B as OBSERVED_SESSION_INGESTION_POLICY_CAPABILITY_ID, Bt as registerListActionsHandler, C as MessageRoutingSubjects, Ct as parseForkTransforms, D as registerMemoryMessageStorage, Dt as registerDrizzleSessionStorage, E as messages, Et as registerMemoryAgentStorage, F as EmbeddingIndexManager, Ft as FallbackRuntimeOptions, G as unregisterObservedSessionIngestionPolicyProvider, Gt as registerResumeHandler, H as ObservedSessionIngestionPolicyImportStatus, Ht as resetBuiltInActionsRegistration, I as registerDrizzleImportCursorStorage, It as pickFallbackRuntimeOptions, J as isPolicyDiscoveredObservedSession, Jt as ContextWindowTrackerConfig, K as LogImportTriggerSubjects, Kt as ContextWindowTracker, L as importCursors, Lt as CONNECTOR_SWAP_DEFAULT_PIPELINE, M as turnsDual, Mt as createSessionExtensionContext, N as registerMemoryTurnStorage, Nt as SessionBridge, O as registerDrizzleMessageStorage, Ot as registerMemorySessionStorage, P as registerDrizzleTurnStorage, Pt as assembleForkContext, Q as IngestTurnMessage, Qt as buildRecoveryContextWithPipeline, R as importCursorsDual, Rt as normalizeSelectionString, S as MessageRoutingNamespace, St as mapRowToSession, T as SelectMessage, Tt as registerDrizzleAgentStorage, U as ObservedSessionIngestionPolicyInput, Ut as actionRegistry, V as ObservedSessionIngestionPolicyDecision, Vt as registerBuiltInActions, W as registerObservedSessionIngestionPolicyProvider, Wt as registerGetStatusCountsHandler, X as IngestCompletedTurnParams, Xt as buildTurnInitiator, Y as isTrackingStub, Yt as SessionContextWindowState, Z as IngestCompletedTurnResult, Zt as RecoveryConfig, _ as InsertMessageRouting, _n as MakaioSessionService, _t as SearchFilters, a as buildSessionContext, an as resolveExecutionTarget, at as registerSessionLifecycleEventWriters, b as messageRoutingDual, bt as fetchMessageCountsBySession, c as kindToBranchKind, cn as getOrCreateSession, ct as InsertSessionEvent, d as registerSpawningToolCallResolver, dn as normalizeToBlocks, dt as sessionEventsDual, en as ensureAgentModel, et as EventTransform, f as registerCompressLineageResolver, fn as TurnContextEnricher, ft as getSessionAncestorChain, g as StartTurnOptions, gn as registerCoreSessionServiceHandlers, gt as mapToSession, h as MakaioSessionConfig, hn as SessionOrchestrator, ht as mapAgentsBySession, i as getFullConversation, in as resolveAdapterId, it as emitSessionTurnStarted, j as turns, jt as SessionExtensionContextImpl, k as InsertTurn, kt as AgentStorageNamespace, l as toSessionLineage, ln as resolveTargetAgents, lt as SelectSessionEvent, m as MakaioSession, mn as ISessionOrchestrator, mt as fetchSessionPreviewMaps, n as NativeLocalityIntent, nn as verifyAndRecoverAgents, nt as SessionTurnStartedPayload, o as BuildContextOptions, on as resolveModelCapabilities, ot as registerDrizzleSessionEventStorage, p as registerParentResolver, pn as AdapterRegistry, pt as SessionPreviewMaps, q as ObservedSessionIngestionService, qt as AgentContextState, r as evaluateNativeLocality, rn as buildRecoveryContext, rt as appendSessionLifecycleEvent, s as ContextAssemblyResult, sn as findTurnByAgent, st as registerMemorySessionEventStorage, t as NativeLocalityInput, tn as recoverAgent, tt as SessionLifecycleEventArgs, u as registerSessionDiscoveredHandler, un as extractTextContent, ut as sessionEvents, v as SelectMessageRouting, vt as SearchSessionRow, w as InsertMessage, wt as registerFtsSearchHandler, x as registerDrizzleMessageRoutingStorage, xt as fetchPreviewBySession, y as messageRouting, yt as fetchAgentsBySession, z as IObservedSessionIngestionPolicyProvider, zt as resolveAdapterNameById } from "../../index-DScUb-hF.mjs";
|
|
2
|
+
import { a as registerCompressHandler, c as SessionTurnManager, d as Turn, f as TurnConfig, h as TurnStateChange, i as registerForkHandler, l as TurnCompleteCallback, m as TurnResult, n as routeToAgents, o as registerAttachHandler, p as TurnContext, r as registerMergeHandler, s as registerAbandonHandler, t as routeToAgentsCore, u as TurnCompletionResult } from "../../index-BvTd61i5.mjs";
|
|
3
3
|
import { r as buildProviderContext } from "../../index-DtwGhFFQ.mjs";
|
|
4
|
-
import { i as SessionStorageSubjects, r as SessionStorageNamespace } from "../../namespace-
|
|
5
|
-
import { a as agents, c as sessionsDual, o as agentsDual, s as sessions } from "../../schema-
|
|
6
|
-
import { n as SessionEventStorageSubjects, t as SessionEventStorageNamespace } from "../../namespace-
|
|
4
|
+
import { i as SessionStorageSubjects, r as SessionStorageNamespace } from "../../namespace-Boh42UoL.mjs";
|
|
5
|
+
import { a as agents, c as sessionsDual, o as agentsDual, s as sessions } from "../../schema-B5vHi7Uu.mjs";
|
|
6
|
+
import { n as SessionEventStorageSubjects, t as SessionEventStorageNamespace } from "../../namespace-OLAh9wHU.mjs";
|
|
7
7
|
import { t as TurnStorageNamespace } from "../../namespace-D1_9WVCo.mjs";
|
|
8
8
|
import { n as TurnStorageSubjects } from "../../namespace-DAj_riOn.mjs";
|
|
9
|
-
import { i as MessageStorageSubjects, r as MessageStorageNamespace } from "../../namespace-
|
|
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, OBSERVED_SESSION_INGESTION_POLICY_CAPABILITY_ID, ObservedSessionIngestionPolicyDecision, ObservedSessionIngestionPolicyImportStatus, ObservedSessionIngestionPolicyInput, RecoveryConfig, SearchFilters, SearchSessionRow, SelectMessage, SelectMessageRouting, SelectSessionEvent, SelectTurn, SessionBridge, SessionContextWindowState, SessionEventStorageNamespace, SessionEventStorageSubjects, SessionExtensionContextImpl, SessionLifecycleEventArgs, SessionOrchestrator, SessionPreviewMaps, SessionStorageNamespace, SessionStorageSubjects, SessionTurnManager, SessionTurnStartedPayload, StartTurnOptions, Turn, TurnCompleteCallback, TurnCompletionResult, TurnConfig, TurnContext, TurnContextEnricher, TurnResult, TurnStateChange, TurnStorageNamespace, TurnStorageSubjects, actionRegistry, agents, agentsDual, appendSessionLifecycleEvent, assembleForkContext, buildProviderContext, buildRecoveryContext, buildRecoveryContextWithPipeline, buildSessionContext, buildTurnInitiator, createSessionExtensionContext, emitSessionTurnStarted, ensureAgentCwd, ensureAgentModel, extractTextContent, fetchAgentsBySession, fetchMessageCountsBySession, fetchPreviewBySession, fetchSessionPreviewMaps, findTurnByAgent, getFullConversation, getOrCreateSession, getSessionAncestorChain, importCursors, importCursorsDual, ingestCompletedTurn, isPolicyDiscoveredObservedSession, 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, resolveTargetAgents, routeToAgents, routeToAgentsCore, sessionEvents, sessionEventsDual, sessions, sessionsDual, toSessionLineage, turns, turnsDual, unregisterObservedSessionIngestionPolicyProvider, verifyAndRecoverAgents };
|
|
9
|
+
import { i as MessageStorageSubjects, r as MessageStorageNamespace } from "../../namespace-TPbegIMi.mjs";
|
|
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, StartTurnOptions, Turn, TurnCompleteCallback, TurnCompletionResult, TurnConfig, TurnContext, TurnContextEnricher, TurnResult, TurnStateChange, TurnStorageNamespace, TurnStorageSubjects, actionRegistry, agents, agentsDual, appendSessionLifecycleEvent, assembleForkContext, buildProviderContext, buildRecoveryContext, buildRecoveryContextWithPipeline, buildSessionContext, buildTurnInitiator, createSessionExtensionContext, emitSessionTurnStarted, 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, resolveTargetAgents, routeToAgents, routeToAgentsCore, sessionEvents, sessionEventsDual, sessions, sessionsDual, toSessionLineage, turns, turnsDual, unregisterObservedSessionIngestionPolicyProvider, verifyAndRecoverAgents };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{agents as e,agentsDual as t,sessions as n,sessionsDual as r}from"./storage/schema.mjs";import{n as i,t as a}from"../../schema-CHp6I33k.mjs";import{t as o}from"../../schema-7aKBGB7S.mjs";import{i as s,n as c,r as l,t as u}from"../../namespace-dFBD2ZmS.mjs";import{A as d,B as f,C as p,D as m,E as h,F as g,I as _,L as v,M as y,N as b,O as x,P as S,R as C,S as w,T,
|
|
1
|
+
import{agents as e,agentsDual as t,sessions as n,sessionsDual as r}from"./storage/schema.mjs";import{n as i,t as a}from"../../schema-CHp6I33k.mjs";import{t as o}from"../../schema-7aKBGB7S.mjs";import{i as s,n as c,r as l,t as u}from"../../namespace-dFBD2ZmS.mjs";import{A as d,B as f,C as p,D as m,E as h,F as g,I as _,L as v,M as y,N as b,O as x,P as S,R as C,S as w,T,V as E,_ as D,a as O,b as k,c as A,d as j,f as M,g as N,h as P,i as F,j as I,k as L,l as R,m as z,n as B,o as V,p as H,r as U,s as W,t as G,u as K,v as q,w as J,x as Y,y as X,z as Z}from"../../handlers-B74FvKlA.mjs";import{TurnStorageSubjects as Q}from"../turn/namespace.mjs";import{SessionStorageNamespace as $,SessionStorageSubjects as ee}from"./storage/namespace.mjs";import{$ as te,A as ne,B as re,C as ie,D as ae,E as oe,F as se,G as ce,H as le,I as ue,J as de,K as fe,L as pe,M as me,N as he,O as ge,P as _e,Q as ve,R as ye,S as be,T as xe,U as Se,V as Ce,W as we,X as Te,Y as Ee,Z as De,_ as Oe,a as ke,b as Ae,c as je,d as Me,et as Ne,f as Pe,g as Fe,h as Ie,i as Le,j as Re,k as ze,l as Be,m as Ve,n as He,o as Ue,p as We,q as Ge,r as Ke,s as qe,t as Je,tt as Ye,u as Xe,v as Ze,w as Qe,x as $e,y as et,z as tt}from"../../session-CoGaTin6.mjs";import{r as nt}from"../../provider-context-DC_eq7es.mjs";import{MessageStorageNamespace as rt,MessageStorageSubjects as it}from"./messages/namespace.mjs";import{TurnStorageNamespace as at}from"./turns/namespace.mjs";export{te as AdapterRegistry,g as AgentStorageNamespace,_ as AgentStorageSubjects,tt as CONNECTOR_SWAP_DEFAULT_PIPELINE,Je as ContextWindowTracker,qe as EmbeddingIndexManager,Me as LogImportTriggerSubjects,Ue as MakaioSession,Ne as MakaioSessionService,Ge as MessageRoutingNamespace,de as MessageRoutingSubjects,rt as MessageStorageNamespace,it as MessageStorageSubjects,Ie as OBSERVED_SESSION_INGESTION_POLICY_CAPABILITY_ID,Pe as ObservedSessionIngestionService,pe as SessionBridge,u as SessionEventStorageNamespace,c as SessionEventStorageSubjects,se as SessionExtensionContextImpl,we as SessionOrchestrator,$ as SessionStorageNamespace,ee as SessionStorageSubjects,ce as SessionTurnManager,X as Turn,Se as TurnContextEnricher,at as TurnStorageNamespace,Q as TurnStorageSubjects,d as actionRegistry,e as agents,t as agentsDual,v as appendSessionLifecycleEvent,B as assembleForkContext,nt as buildProviderContext,x as buildRecoveryContext,p as buildRecoveryContextWithPipeline,I as buildSessionContext,H as buildTurnInitiator,ue as createSessionExtensionContext,C as emitSessionTurnStarted,J as ensureAgentCwd,T as ensureAgentModel,w as evaluateNativeLocality,D as extractTextContent,$e as fetchAgentsBySession,be as fetchMessageCountsBySession,ie as fetchPreviewBySession,ge as fetchSessionPreviewMaps,z as findTurnByAgent,L as getFullConversation,P as getOrCreateSession,et as getSessionAncestorChain,Be as importCursors,Xe as importCursorsDual,Ze as ingestCompletedTurn,We as isPolicyDiscoveredObservedSession,Ve as isTrackingStub,he as kindToBranchKind,ze as mapAgentsBySession,Qe as mapRowToSession,ne as mapToSession,Ee as messageRouting,Te as messageRoutingDual,o as messages,j as normalizeSelectionString,q as normalizeToBlocks,xe as parseForkTransforms,ye as pickFallbackRuntimeOptions,h as recoverAgent,A as registerAbandonHandler,K as registerAttachHandler,V as registerBuiltInActions,O as registerCompressHandler,Le as registerCompressLineageResolver,Ye as registerCoreSessionServiceHandlers,Re as registerDrizzleAgentStorage,je as registerDrizzleImportCursorStorage,fe as registerDrizzleMessageRoutingStorage,ve as registerDrizzleMessageStorage,f as registerDrizzleSessionEventStorage,ae as registerDrizzleSessionStorage,Y as registerDrizzleTurnStorage,F as registerForkHandler,Ae as registerFtsSearchHandler,Ce as registerGetStatusCountsHandler,re as registerListActionsHandler,oe as registerMemoryAgentStorage,De as registerMemoryMessageStorage,E as registerMemorySessionEventStorage,me as registerMemorySessionStorage,k as registerMemoryTurnStorage,U as registerMergeHandler,Fe as registerObservedSessionIngestionPolicyProvider,ke as registerParentResolver,le as registerResumeHandler,He as registerSessionDiscoveredHandler,Z as registerSessionLifecycleEventWriters,Ke as registerSpawningToolCallResolver,W as resetBuiltInActionsRegistration,y as resolveAdapterId,M as resolveAdapterNameById,b as resolveExecutionTarget,S as resolveModelCapabilities,N as resolveTargetAgents,G as routeToAgents,R as routeToAgentsCore,l as sessionEvents,s as sessionEventsDual,n as sessions,r as sessionsDual,_e as toSessionLineage,a as turns,i as turnsDual,Oe as unregisterObservedSessionIngestionPolicyProvider,m as verifyAndRecoverAgents};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as MessageStorageSubjects, n as MessagePageCursorSchema, r as MessageStorageNamespace, t as MessagePageCursor } from "../../../namespace-
|
|
1
|
+
import { i as MessageStorageSubjects, n as MessagePageCursorSchema, r as MessageStorageNamespace, t as MessagePageCursor } from "../../../namespace-TPbegIMi.mjs";
|
|
2
2
|
export { MessagePageCursor, MessagePageCursorSchema, MessageStorageNamespace, MessageStorageSubjects };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as SessionEventStorageSubjects, t as SessionEventStorageNamespace } from "../../../namespace-
|
|
1
|
+
import { n as SessionEventStorageSubjects, t as SessionEventStorageNamespace } from "../../../namespace-OLAh9wHU.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-
|
|
1
|
+
import { a as SessionWithPreview, i as SessionStorageSubjects, n as SessionPreviewDataSchema, o as SessionWithPreviewSchema, r as SessionStorageNamespace, t as SessionPreviewData } from "../../../namespace-Boh42UoL.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-
|
|
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-B5vHi7Uu.mjs";
|
|
2
2
|
export { InsertAgent, InsertSession, SelectAgent, SelectSession, agents, agentsDual, sessions, sessionsDual };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{check as e,index as t,uniqueIndex as n}from"drizzle-orm/sqlite-core";import{check as r,index as i,uniqueIndex as a}from"drizzle-orm/pg-core";import{defineDualTable as o}from"@makaio/framework/storage/drizzle";import{sql as s}from"drizzle-orm";const c=o(`sessions`,e=>({sessionId:e.text(`session_id`).primaryKey(),createdAt:e.epochMs(`created_at`).notNull(),lastActivityAt:e.epochMs(`last_activity_at`).notNull(),status:e.textEnum(`status`,{enum:[`active`,`closed`,`archived`,`discovered`]}).notNull(),leadAgentId:e.text(`lead_agent_id`),parentSessionId:e.text(`parent_session_id`),contextInheritance:e.textEnum(`context_inheritance`,{enum:[`parent-history`,`none`]}),rootSessionId:e.text(`root_session_id`),forkPointMessageId:e.text(`fork_point_message_id`),branchKind:e.textEnum(`branch_kind`,{enum:[`fork`,`branch`,`subagent`,`compress`,`rewrite`,`coordinator`,`aside`]}),adapterName:e.text(`adapter_name`),adapterSessionId:e.text(`adapter_session_id`),adapterId:e.text(`adapter_id`),clientId:e.text(`client_id`),clientAccountId:e.text(`client_account_id`),lastClientIdentityObservation:e.text(`last_client_identity_observation`),isOrchestrated:e.bool(`is_orchestrated`).default(!1),title:e.text(`title`),summary:e.text(`summary`),summaryUpdatedAt:e.epochMs(`summary_updated_at`),isImported:e.bool(`is_imported`).default(!1),forkTransforms:e.text(`fork_transforms`),targetWorkingDirectory:e.text(`target_working_directory`),executionTargetId:e.text(`execution_target_id`),approvalPolicyOverride:e.textEnum(`approval_policy_override`,{enum:[`reject`,`always-ask`,`full-access`]}),metadata:e.jsonCol(`metadata`),spawningToolCallId:e.text(`spawning_tool_call_id`),source:e.text(`source`),parentExternalSessionId:e.text(`parent_external_session_id`),logFilePath:e.text(`log_file_path`),discoveredAt:e.epochMs(`discovered_at`),importStatus:e.textEnum(`import_status`,{enum:[`discovered`,`imported`,`tracking`]}),isSidechain:e.bool(`is_sidechain`)}),{sqlite:r=>[n(`uniq_sessions_source_adapter_session_id`).on(r.source,r.adapterSessionId),n(`uniq_sessions_log_file_path`).on(r.logFilePath),t(`sessions_adapter_session_id_idx`).on(r.adapterSessionId),t(`idx_sessions_import_status`).on(r.importStatus),t(`sessions_execution_target_id_idx`).on(r.executionTargetId),t(`idx_sessions_parent_session_id`).on(r.parentSessionId),e(`sessions_import_status_check`,s`${r.importStatus} IS NULL OR ${r.importStatus} IN ('discovered', 'imported', 'tracking')`),e(`sessions_context_inheritance_check`,s`${r.contextInheritance} IS NULL OR ${r.contextInheritance} IN ('parent-history', 'none')`)],postgres:e=>[a(`uniq_sessions_source_adapter_session_id`).on(e.source,e.adapterSessionId),a(`uniq_sessions_log_file_path`).on(e.logFilePath),i(`sessions_adapter_session_id_idx`).on(e.adapterSessionId),i(`idx_sessions_import_status`).on(e.importStatus),i(`sessions_execution_target_id_idx`).on(e.executionTargetId),i(`idx_sessions_parent_session_id`).on(e.parentSessionId),r(`sessions_import_status_check`,s`${e.importStatus} IS NULL OR ${e.importStatus} IN ('discovered', 'imported', 'tracking')`),r(`sessions_context_inheritance_check`,s`${e.contextInheritance} IS NULL OR ${e.contextInheritance} IN ('parent-history', 'none')`)]}),l=c.sqlite,u=o(`agents`,e=>({agentId:e.text(`agent_id`).primaryKey(),adapterId:e.text(`adapter_id`).notNull(),adapterName:e.text(`adapter_name`).notNull(),sessionId:e.text(`session_id`).notNull().references(()=>c.columnPair(`sessionId`),{onDelete:`cascade`}),adapterSessionId:e.text(`adapter_session_id`),model:e.text(`model`),cwd:e.text(`cwd`),allowedDirectories:e.jsonCol(`allowed_directories`),providerConfigId:e.text(`provider_config_id`),personaId:e.text(`persona_id`),profileId:e.text(`profile_id`),harnessId:e.text(`harness_id`),clientId:e.text(`client_id`),compressionMode:e.text(`compression_mode`),role:e.textEnum(`role`,{enum:[`lead`,`member`]}).notNull(),status:e.textEnum(`status`,{enum:[`idle`,`active`,`dead`,`disposed`]}).notNull(),createdAt:e.epochMs(`created_at`).notNull(),lastActivityAt:e.epochMs(`last_activity_at`).notNull()}),{sqlite:e=>[t(`agents_session_id_idx`).on(e.sessionId),t(`agents_adapter_name_idx`).on(e.adapterName),t(`agents_status_idx`).on(e.status),t(`agents_client_id_idx`).on(e.clientId)],postgres:e=>[i(`agents_session_id_idx`).on(e.sessionId),i(`agents_adapter_name_idx`).on(e.adapterName),i(`agents_status_idx`).on(e.status),i(`agents_client_id_idx`).on(e.clientId)]}),d=u.sqlite;export{d as agents,u as agentsDual,l as sessions,c as sessionsDual};
|
|
1
|
+
import{check as e,index as t,uniqueIndex as n}from"drizzle-orm/sqlite-core";import{check as r,index as i,uniqueIndex as a}from"drizzle-orm/pg-core";import{defineDualTable as o}from"@makaio/framework/storage/drizzle";import{sql as s}from"drizzle-orm";const c=o(`sessions`,e=>({sessionId:e.text(`session_id`).primaryKey(),createdAt:e.epochMs(`created_at`).notNull(),lastActivityAt:e.epochMs(`last_activity_at`).notNull(),status:e.textEnum(`status`,{enum:[`active`,`closed`,`archived`,`discovered`]}).notNull(),leadAgentId:e.text(`lead_agent_id`),parentSessionId:e.text(`parent_session_id`),contextInheritance:e.textEnum(`context_inheritance`,{enum:[`parent-history`,`none`]}),rootSessionId:e.text(`root_session_id`),forkPointMessageId:e.text(`fork_point_message_id`),branchKind:e.textEnum(`branch_kind`,{enum:[`fork`,`branch`,`subagent`,`compress`,`rewrite`,`coordinator`,`aside`]}),adapterName:e.text(`adapter_name`),adapterSessionId:e.text(`adapter_session_id`),adapterId:e.text(`adapter_id`),clientId:e.text(`client_id`),clientAccountId:e.text(`client_account_id`),lastClientIdentityObservation:e.text(`last_client_identity_observation`),isOrchestrated:e.bool(`is_orchestrated`).default(!1),title:e.text(`title`),summary:e.text(`summary`),summaryUpdatedAt:e.epochMs(`summary_updated_at`),isImported:e.bool(`is_imported`).default(!1),forkTransforms:e.text(`fork_transforms`),targetWorkingDirectory:e.text(`target_working_directory`),executionTargetId:e.text(`execution_target_id`),approvalPolicyOverride:e.textEnum(`approval_policy_override`,{enum:[`reject`,`always-ask`,`full-access`]}),metadata:e.jsonCol(`metadata`),spawningToolCallId:e.text(`spawning_tool_call_id`),source:e.text(`source`),parentExternalSessionId:e.text(`parent_external_session_id`),logFilePath:e.text(`log_file_path`),discoveredAt:e.epochMs(`discovered_at`),importStatus:e.textEnum(`import_status`,{enum:[`discovered`,`imported`,`tracking`]}),isSidechain:e.bool(`is_sidechain`),machineId:e.text(`machine_id`)}),{sqlite:r=>[n(`uniq_sessions_source_adapter_session_id`).on(r.source,r.adapterSessionId),n(`uniq_sessions_log_file_path`).on(r.logFilePath),t(`sessions_adapter_session_id_idx`).on(r.adapterSessionId),t(`idx_sessions_import_status`).on(r.importStatus),t(`sessions_execution_target_id_idx`).on(r.executionTargetId),t(`idx_sessions_parent_session_id`).on(r.parentSessionId),e(`sessions_import_status_check`,s`${r.importStatus} IS NULL OR ${r.importStatus} IN ('discovered', 'imported', 'tracking')`),e(`sessions_context_inheritance_check`,s`${r.contextInheritance} IS NULL OR ${r.contextInheritance} IN ('parent-history', 'none')`)],postgres:e=>[a(`uniq_sessions_source_adapter_session_id`).on(e.source,e.adapterSessionId),a(`uniq_sessions_log_file_path`).on(e.logFilePath),i(`sessions_adapter_session_id_idx`).on(e.adapterSessionId),i(`idx_sessions_import_status`).on(e.importStatus),i(`sessions_execution_target_id_idx`).on(e.executionTargetId),i(`idx_sessions_parent_session_id`).on(e.parentSessionId),r(`sessions_import_status_check`,s`${e.importStatus} IS NULL OR ${e.importStatus} IN ('discovered', 'imported', 'tracking')`),r(`sessions_context_inheritance_check`,s`${e.contextInheritance} IS NULL OR ${e.contextInheritance} IN ('parent-history', 'none')`)]}),l=c.sqlite,u=o(`agents`,e=>({agentId:e.text(`agent_id`).primaryKey(),adapterId:e.text(`adapter_id`).notNull(),adapterName:e.text(`adapter_name`).notNull(),sessionId:e.text(`session_id`).notNull().references(()=>c.columnPair(`sessionId`),{onDelete:`cascade`}),adapterSessionId:e.text(`adapter_session_id`),model:e.text(`model`),cwd:e.text(`cwd`),allowedDirectories:e.jsonCol(`allowed_directories`),providerConfigId:e.text(`provider_config_id`),personaId:e.text(`persona_id`),profileId:e.text(`profile_id`),harnessId:e.text(`harness_id`),clientId:e.text(`client_id`),compressionMode:e.text(`compression_mode`),role:e.textEnum(`role`,{enum:[`lead`,`member`]}).notNull(),status:e.textEnum(`status`,{enum:[`idle`,`active`,`dead`,`disposed`]}).notNull(),createdAt:e.epochMs(`created_at`).notNull(),lastActivityAt:e.epochMs(`last_activity_at`).notNull()}),{sqlite:e=>[t(`agents_session_id_idx`).on(e.sessionId),t(`agents_adapter_name_idx`).on(e.adapterName),t(`agents_status_idx`).on(e.status),t(`agents_client_id_idx`).on(e.clientId)],postgres:e=>[i(`agents_session_id_idx`).on(e.sessionId),i(`agents_adapter_name_idx`).on(e.adapterName),i(`agents_status_idx`).on(e.status),i(`agents_client_id_idx`).on(e.clientId)]}),d=u.sqlite;export{d as agents,u as agentsDual,l as sessions,c as sessionsDual};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"../../../namespace-dFBD2ZmS.mjs";import{
|
|
1
|
+
import{n as e}from"../../../namespace-dFBD2ZmS.mjs";import{I as t}from"../../../handlers-B74FvKlA.mjs";import{TurnStorageSubjects as n}from"../../turn/namespace.mjs";import{SessionStorageSubjects as r}from"../storage/namespace.mjs";import{J as i}from"../../../session-CoGaTin6.mjs";import{n as a}from"../../../namespace-DBHwyhME.mjs";import{AdapterRuntimeSubjects as o}from"../../adapter-runtime/namespace.mjs";import{ProviderStorageSubjects as s}from"../../settings/storage/providers-namespace.mjs";import{ExecutionTargetSubjects as c}from"../../execution-target/namespace.mjs";import{MessageStorageSubjects as l}from"../messages/namespace.mjs";import{t as u}from"../../../identity-DC3Pk0ps.mjs";import{MakaioBus as d}from"@makaio/framework/bus";import{AdapterSubjects as f}from"@makaio/framework/contracts";import{getRawSqlExecutor as p}from"@makaio/framework/storage/drizzle";import{sql as m}from"drizzle-orm";import{buildStoredCredentialRef as h}from"@makaio/framework/contracts/config";function g(e){let t=new u(e);return{registerHandlers(){let n=[d.on(f.initialized,e=>{t.rememberAdapterId(e.payload.adapterId,e.payload.adapterName)}),d.on(o.resolveId,e=>{let n=t.resolveId(e.payload);e.setResult({adapterId:n})}),d.on(o.getMachineId,t=>{t.setResult({machineId:e})}),d.on(o.resolveName,e=>{let n=t.resolveAdapterName(e.payload.adapterId);if(!n)throw Error(`Adapter not found for adapterId="${e.payload.adapterId}"`);e.setResult({adapterName:n})})];return()=>{for(let e of n)e()}},async registerKnownAdapter(e,n){let r=n??t.resolveId({adapterName:e});await d.emit(f.initialized,{adapterName:e,adapterId:r,capabilities:[]})}}}function _(e){let t=g(e);return{registry:t,unsubscribe:t.registerHandlers()}}const v=[m`
|
|
2
2
|
CREATE TABLE IF NOT EXISTS sessions (
|
|
3
3
|
session_id TEXT PRIMARY KEY,
|
|
4
4
|
created_at INTEGER NOT NULL,
|
|
@@ -42,7 +42,8 @@ import{n as e}from"../../../namespace-dFBD2ZmS.mjs";import{F as t}from"../../../
|
|
|
42
42
|
import_status IS NULL
|
|
43
43
|
OR import_status IN ('discovered', 'imported', 'tracking')
|
|
44
44
|
),
|
|
45
|
-
is_sidechain INTEGER
|
|
45
|
+
is_sidechain INTEGER,
|
|
46
|
+
machine_id TEXT
|
|
46
47
|
)
|
|
47
48
|
`,m`CREATE UNIQUE INDEX IF NOT EXISTS uniq_sessions_source_adapter_session_id ON sessions(source, adapter_session_id)`,m`CREATE UNIQUE INDEX IF NOT EXISTS uniq_sessions_log_file_path ON sessions(log_file_path)`,m`CREATE INDEX IF NOT EXISTS sessions_adapter_session_id_idx ON sessions(adapter_session_id)`,m`CREATE INDEX IF NOT EXISTS idx_sessions_import_status ON sessions(import_status)`,m`CREATE INDEX IF NOT EXISTS sessions_execution_target_id_idx ON sessions(execution_target_id)`,m`
|
|
48
49
|
CREATE TABLE IF NOT EXISTS agents (
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as PipelineStep, i as ActionResultSchema, n as ActionCategorySchema, o as SessionEditorAction, r as ActionResult, t as ActionCategory } from "../../types-
|
|
1
|
+
import { a as PipelineStep, i as ActionResultSchema, n as ActionCategorySchema, o as SessionEditorAction, r as ActionResult, t as ActionCategory } from "../../types-BNW5n6qm.mjs";
|
|
2
2
|
import * as _$zod from "zod";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import * as _$_makaio_core0 from "@makaio/framework/core";
|
|
@@ -518,18 +518,18 @@ declare const SubagentTemplateSettingsNamespace: _$_makaio_core0.BusNamespaceDef
|
|
|
518
518
|
create: {
|
|
519
519
|
request: _$zod.ZodObject<{
|
|
520
520
|
name: _$zod.ZodString;
|
|
521
|
-
enabled: _$zod.ZodDefault<_$zod.ZodBoolean>;
|
|
522
521
|
adapterName: _$zod.ZodString;
|
|
523
522
|
providerConfigId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
524
523
|
model: _$zod.ZodOptional<_$zod.ZodString>;
|
|
525
|
-
systemPrompt: _$zod.ZodOptional<_$zod.ZodString>;
|
|
526
|
-
allowedTools: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
|
|
527
|
-
disallowedTools: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
|
|
528
|
-
allowedDirectories: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
|
|
529
524
|
contextMode: _$zod.ZodDefault<_$zod.ZodEnum<{
|
|
530
525
|
fork: "fork";
|
|
531
526
|
fresh: "fresh";
|
|
532
527
|
}>>;
|
|
528
|
+
disallowedTools: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
|
|
529
|
+
allowedDirectories: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
|
|
530
|
+
systemPrompt: _$zod.ZodOptional<_$zod.ZodString>;
|
|
531
|
+
enabled: _$zod.ZodDefault<_$zod.ZodBoolean>;
|
|
532
|
+
allowedTools: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
|
|
533
533
|
}, _$zod_v4_core0.$strip>;
|
|
534
534
|
response: _$zod.ZodObject<{
|
|
535
535
|
id: _$zod.ZodString;
|
|
@@ -609,18 +609,18 @@ declare const SubagentTemplateSettingsSubjects: _$_makaio_core0.BusSubjects<_$_m
|
|
|
609
609
|
create: {
|
|
610
610
|
request: _$zod.ZodObject<{
|
|
611
611
|
name: _$zod.ZodString;
|
|
612
|
-
enabled: _$zod.ZodDefault<_$zod.ZodBoolean>;
|
|
613
612
|
adapterName: _$zod.ZodString;
|
|
614
613
|
providerConfigId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
615
614
|
model: _$zod.ZodOptional<_$zod.ZodString>;
|
|
616
|
-
systemPrompt: _$zod.ZodOptional<_$zod.ZodString>;
|
|
617
|
-
allowedTools: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
|
|
618
|
-
disallowedTools: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
|
|
619
|
-
allowedDirectories: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
|
|
620
615
|
contextMode: _$zod.ZodDefault<_$zod.ZodEnum<{
|
|
621
616
|
fork: "fork";
|
|
622
617
|
fresh: "fresh";
|
|
623
618
|
}>>;
|
|
619
|
+
disallowedTools: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
|
|
620
|
+
allowedDirectories: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
|
|
621
|
+
systemPrompt: _$zod.ZodOptional<_$zod.ZodString>;
|
|
622
|
+
enabled: _$zod.ZodDefault<_$zod.ZodBoolean>;
|
|
623
|
+
allowedTools: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
|
|
624
624
|
}, _$zod_v4_core0.$strip>;
|
|
625
625
|
response: _$zod.ZodObject<{
|
|
626
626
|
id: _$zod.ZodString;
|
|
@@ -17,8 +17,8 @@ declare const ExtensionConfigSchema: z.ZodObject<{
|
|
|
17
17
|
declare const ExtensionConfigInputSchema: z.ZodObject<{
|
|
18
18
|
id: z.ZodString;
|
|
19
19
|
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
20
|
-
enabled: z.ZodBoolean;
|
|
21
20
|
extensionName: z.ZodString;
|
|
21
|
+
enabled: z.ZodBoolean;
|
|
22
22
|
scope: z.ZodString;
|
|
23
23
|
}, z.core.$strip>;
|
|
24
24
|
/** Query schema for listing extension configs. */
|
|
@@ -62,8 +62,8 @@ declare const ExtensionConfigStorageNamespace: _$_makaio_storage_core0.StorageNa
|
|
|
62
62
|
extensionConfig: z.ZodObject<{
|
|
63
63
|
id: z.ZodString;
|
|
64
64
|
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
65
|
-
enabled: z.ZodBoolean;
|
|
66
65
|
extensionName: z.ZodString;
|
|
66
|
+
enabled: z.ZodBoolean;
|
|
67
67
|
scope: z.ZodString;
|
|
68
68
|
}, z.core.$strip>;
|
|
69
69
|
}, z.core.$strip>;
|
|
@@ -130,8 +130,8 @@ declare const ExtensionConfigStorageSubjects: _$_makaio_core0.BusSubjects<_$_mak
|
|
|
130
130
|
extensionConfig: z.ZodObject<{
|
|
131
131
|
id: z.ZodString;
|
|
132
132
|
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
133
|
-
enabled: z.ZodBoolean;
|
|
134
133
|
extensionName: z.ZodString;
|
|
134
|
+
enabled: z.ZodBoolean;
|
|
135
135
|
scope: z.ZodString;
|
|
136
136
|
}, z.core.$strip>;
|
|
137
137
|
}, z.core.$strip>;
|
|
@@ -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-
|
|
2
|
-
import { n as SubagentTemplateSubjects, t as SubagentTemplateKernelNamespace } from "../../namespace-
|
|
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-DOV4UouN2.mjs";
|
|
2
|
+
import { n as SubagentTemplateSubjects, t as SubagentTemplateKernelNamespace } from "../../namespace-6sIu5nBI2.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-
|
|
1
|
+
import { n as SubagentTemplateSubjects, t as SubagentTemplateKernelNamespace } from "../../namespace-6sIu5nBI2.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-
|
|
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-DOV4UouN2.mjs";
|
|
2
2
|
export { SubagentTemplate, SubagentTemplateCompletedEventSchema, SubagentTemplateCreate, SubagentTemplateCreateSchema, SubagentTemplateInstance, SubagentTemplateInstanceSchema, SubagentTemplateInstanceStatus, SubagentTemplateInstanceStatusSchema, SubagentTemplateKernelSchemas, SubagentTemplateSchema, SubagentTemplateSettingsSchemas, SubagentTemplateSpawnRequest, SubagentTemplateSpawnRequestSchema, SubagentTemplateSpawnedEventSchema, SubagentTemplateSummary, SubagentTemplateSummarySchema, SubagentTemplateUpdate, SubagentTemplateUpdateSchema };
|