@makaio/framework 1.0.0-dev-1781517341920 → 1.0.0-dev-1781729807808

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/dist/.makaio-build.json +2 -2
  2. package/dist/adapter-Cxcqmp04.mjs +1 -0
  3. package/dist/adapters/stream-session/index.d.mts +2 -0
  4. package/dist/await-trigger-Cjfj0yp_.mjs +1 -0
  5. package/dist/bus/index.mjs +1 -1
  6. package/dist/{canonical-model-BE7t86yt.mjs → canonical-model-C-jhofjd.mjs} +1 -1
  7. package/dist/compression-BPOKUc6y.mjs +1 -0
  8. package/dist/contracts/adapter/index.d.mts +2 -2
  9. package/dist/contracts/adapter/index.mjs +1 -1
  10. package/dist/contracts/adapter/schemas/session-lineage.d.mts +1 -1
  11. package/dist/contracts/artifact/index.d.mts +1 -1
  12. package/dist/contracts/canonical-model/index.mjs +1 -1
  13. package/dist/contracts/client/index.d.mts +1 -1
  14. package/dist/contracts/config/index.d.mts +12 -12
  15. package/dist/contracts/extension/index.d.mts +2 -2
  16. package/dist/contracts/extension/index.mjs +1 -1
  17. package/dist/contracts/facet/index.d.mts +1 -1
  18. package/dist/contracts/harness/index.d.mts +1 -1
  19. package/dist/contracts/index.d.mts +261 -65
  20. package/dist/contracts/index.mjs +1 -1
  21. package/dist/contracts/materialization/index.d.mts +3 -3
  22. package/dist/contracts/provider/index.d.mts +3 -3
  23. package/dist/contracts/provider/index.mjs +1 -1
  24. package/dist/contracts/session/index.d.mts +3 -3
  25. package/dist/contracts/session/index.mjs +1 -1
  26. package/dist/contracts/variant/index.d.mts +1 -1
  27. package/dist/definition-BJ_975aA.mjs +1 -0
  28. package/dist/{definition-CPc6oKaF.d.mts → definition-CZcVOhXZ.d.mts} +1 -1
  29. package/dist/{definition-B2FH_eOh.d.mts → definition-GOb_oOmb.d.mts} +13 -2
  30. package/dist/drizzle/0020_m_mqf47r9j.sql +1 -0
  31. package/dist/drizzle/meta/_journal.json +7 -0
  32. package/dist/{extension-DNrcv3V7.mjs → extension-CkU_hqra.mjs} +1 -1
  33. package/dist/{handlers-Cpy9Q8ho.mjs → handlers-dnpT_hsm.mjs} +1 -1
  34. package/dist/{index-C7vAbtvS.d.mts → index-BFW1X6SW.d.mts} +85 -46
  35. package/dist/{index-fTBtQ5fK.d.mts → index-BuaP2Q0b.d.mts} +16 -16
  36. package/dist/{index-BBteExwv.d.mts → index-ByRAbcZd.d.mts} +4 -2
  37. package/dist/{index-GuspCNLR.d.mts → index-C2XLjebs.d.mts} +8 -8
  38. package/dist/{index-Dun5uQwE.d.mts → index-CUYDEQvN.d.mts} +24 -3
  39. package/dist/{index-I6pLxh17.d.mts → index-CkpGuNLe.d.mts} +15 -15
  40. package/dist/{index-DWqgo739.d.mts → index-Cy75lJ1O.d.mts} +34 -34
  41. package/dist/{index-WKF5BHsw.d.mts → index-DUI1W-zN.d.mts} +8 -8
  42. package/dist/{index-BDnI2oqX.d.mts → index-Dbd0Tgba.d.mts} +2 -2
  43. package/dist/{index-CsP4Ckem.d.mts → index-Dn73XrXA.d.mts} +8 -8
  44. package/dist/{index-dFTsZFlh.d.mts → index-Dpu4e9NK.d.mts} +1 -1
  45. package/dist/{index-B8v52gGb.d.mts → index-HiAth5G0.d.mts} +60 -60
  46. package/dist/{index-BoI86whU.d.mts → index-WWYQEH0q.d.mts} +18 -18
  47. package/dist/{index-DVz3a2jZ.d.mts → index-XcnFGiKL.d.mts} +4 -4
  48. package/dist/{index-BM_y78ZA2.d.mts → index-cN4DkU5Y2.d.mts} +9 -9
  49. package/dist/kernel/extension/index.d.mts +1 -1
  50. package/dist/kernel/index.d.mts +2 -2
  51. package/dist/kernel/observability/index.d.mts +1 -1
  52. package/dist/{lib-DkLlhp9Z.mjs → lib-B-R6VZW0.mjs} +2 -2
  53. package/dist/{lib-jOuIcSs9.mjs → lib-BwYODPdd.mjs} +1 -1
  54. package/dist/mcp-http-server/index.mjs +1 -1
  55. package/dist/{namespace-CEqkI6Zu.d.mts → namespace-B091meTj.d.mts} +6 -6
  56. package/dist/{namespace-CN2TfSCY.d.mts → namespace-Ba1gUpUu.d.mts} +4 -4
  57. package/dist/{namespace-BAJTZXWc.d.mts → namespace-CO3DK1v_.d.mts} +60 -23
  58. package/dist/{namespace-H9A39Mx8.d.mts → namespace-CZgcOQTh.d.mts} +56 -56
  59. package/dist/{namespace-Cj7k5UH7.d.mts → namespace-Daq_-170.d.mts} +7 -7
  60. package/dist/package-DP8lk0-a.mjs +1 -0
  61. package/dist/package.json +1 -1
  62. package/dist/primitive-runtime-Dw6OC8w5.mjs +1 -0
  63. package/dist/{providers-namespace-C0C-Sb4N.d.mts → providers-namespace-B4INLPUc.d.mts} +7 -7
  64. package/dist/{registry-udUhXSIC.mjs → registry-CwjZvH2s.mjs} +2 -1
  65. package/dist/runtime-node/index.d.mts +1 -1
  66. package/dist/runtime-node/index.mjs +1 -1
  67. package/dist/runtime-node/workflow-worker/index.d.mts +1 -1
  68. package/dist/runtime-node/workflow-worker/index.mjs +1 -1
  69. package/dist/runtime-node/workflow-worker/worker-entry.mjs +1 -1
  70. package/dist/{schema-msWs4YhT.d.mts → schema-DcZifH6p.d.mts} +27 -1
  71. package/dist/{schemas-DMl7IKG-.d.mts → schemas-BbFAwUpf.d.mts} +5 -5
  72. package/dist/{schemas-Cae5dubB.d.mts → schemas-BqscWIoC.d.mts} +6 -6
  73. package/dist/{schemas-DuQ9EcLu2.d.mts → schemas-CTIaU6Rt2.d.mts} +12 -12
  74. package/dist/{schemas-CN9hprME.d.mts → schemas-IDGAJ_zv.d.mts} +6 -6
  75. package/dist/schemas-dNCdjOLB.mjs +1 -0
  76. package/dist/services/adapter-subsystem/index.d.mts +2 -2
  77. package/dist/services/adapter-subsystem/namespace.d.mts +1 -1
  78. package/dist/services/context-rules/index.d.mts +3 -3
  79. package/dist/services/execution-target/index.d.mts +2 -2
  80. package/dist/services/execution-target/namespace.d.mts +1 -1
  81. package/dist/services/execution-target/schemas.d.mts +1 -1
  82. package/dist/services/filesystem/namespace.d.mts +6 -6
  83. package/dist/services/filesystem/schemas.d.mts +3 -3
  84. package/dist/services/harness/index.d.mts +3 -3
  85. package/dist/services/index.d.mts +57 -57
  86. package/dist/services/index.mjs +1 -1
  87. package/dist/services/session/handlers/index.mjs +1 -1
  88. package/dist/services/session/index.d.mts +4 -4
  89. package/dist/services/session/index.mjs +1 -1
  90. package/dist/services/session/messages/namespace.d.mts +1 -1
  91. package/dist/services/session/storage/namespace.d.mts +1 -1
  92. package/dist/services/session/storage/schema.d.mts +1 -1
  93. package/dist/services/session/storage/schema.mjs +1 -1
  94. package/dist/services/session/testing/index.mjs +2 -1
  95. package/dist/services/settings/index.d.mts +1 -1
  96. package/dist/services/settings/namespace.d.mts +12 -12
  97. package/dist/services/settings/storage/extension-configs/namespace.d.mts +3 -3
  98. package/dist/services/settings/storage/index.d.mts +1 -1
  99. package/dist/services/settings/storage/providers-namespace.d.mts +1 -1
  100. package/dist/services/settings/storage/providers-namespace.mjs +1 -1
  101. package/dist/services/subagent-template/index.d.mts +1 -1
  102. package/dist/services/subagent-template/schemas.d.mts +1 -1
  103. package/dist/services/tool-approval/index.mjs +1 -1
  104. package/dist/services/tools/index.mjs +1 -1
  105. package/dist/services/tray-menu/index.d.mts +2 -2
  106. package/dist/services/tray-menu/namespace.d.mts +1 -1
  107. package/dist/services/tray-menu/schemas.d.mts +1 -1
  108. package/dist/session-DApMcL_0.mjs +1 -0
  109. package/dist/session-R-wciAdJ.mjs +39 -0
  110. package/dist/{session-lineage-DFkJgYt5.d.mts → session-lineage-D_8W1MI0.d.mts} +1 -1
  111. package/dist/storage/drizzle/client.mjs +1 -1
  112. package/dist/storage/drizzle/index.mjs +1 -1
  113. package/dist/{tool-approval-service-B_28RhuK.mjs → tool-approval-service-DhAqQqev.mjs} +1 -1
  114. package/dist/tools/index.d.mts +8 -0
  115. package/dist/tools-DeZIVtxe.mjs +1 -0
  116. package/dist/{types-DUNA749O.d.mts → types-CCsvoUTA.d.mts} +33 -15
  117. package/dist/workflow-engine/index.d.mts +49 -25
  118. package/dist/workflow-engine/index.mjs +1 -1
  119. package/dist/workflow-engine/package.mjs +1 -1
  120. package/dist/workflow-engine/workflow-orchestrator.mjs +1 -1
  121. package/dist/{workflow-worker-CjuRYLmJ.mjs → workflow-worker-DMFhz1q_.mjs} +1 -1
  122. package/package.json +1 -1
  123. package/dist/adapter-ux2xaQ6H.mjs +0 -1
  124. package/dist/await-trigger-uKEHY8E4.mjs +0 -1
  125. package/dist/compression-Cy9DIqyr.mjs +0 -1
  126. package/dist/definition-Bija4lGr.mjs +0 -1
  127. package/dist/package-lxB0vpby.mjs +0 -1
  128. package/dist/primitive-runtime-BSg8J7VX.mjs +0 -1
  129. package/dist/schemas-Dvm_0GDr.mjs +0 -1
  130. package/dist/session-Is5VSP2V.mjs +0 -1
  131. package/dist/session-ZAJrcudH.mjs +0 -39
  132. package/dist/tools-BpzJterj.mjs +0 -1
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "version": 1,
3
- "fingerprint": "ce3a3f119d787c03a75b9e1a4e90fa33d7d197bac9015bc025b414c3818018e7",
4
- "builtAt": "2026-06-15T09:56:49.802Z"
3
+ "fingerprint": "9a29677a7cb200427ba7766e10f109e3684cdaa79a62ac2ed15d0d63b8de5fec",
4
+ "builtAt": "2026-06-17T20:57:55.564Z"
5
5
  }
@@ -0,0 +1 @@
1
+ import{_ as e,a as t,c as n,d as r,f as i,g as a,h as o,i as s,l as c,m as l,o as u,p as d,s as f,st as p,t as m,u as h,v as g}from"./schemas-dNCdjOLB.mjs";import"./compression-BPOKUc6y.mjs";import"./contracts/adapter/schemas/session-lineage.mjs";import{createBusNamespace as _}from"@makaio/framework/core";const v={getCapabilities:p,startAgent:g,infer:e,listAgents:a,getAgent:o,stopAgent:l,rehydrateAgent:d,getConfigSchema:i,"agent.created":r,"session.created":h,"session.discovered":m,"session.usage":c,"session.closed":n,log:f,error:u,initialized:t,quota:s},y=_(`adapter`,v),b=y.subjects;export{b as n,v as r,y as t};
@@ -447,6 +447,8 @@ interface StreamSessionConfig<TBus extends ScopedBus<string> = ScopedBus<string>
447
447
  agentId: string;
448
448
  /** Makaio session ID for tool execution context. Stable across turns. */
449
449
  sessionId?: string;
450
+ /** Provider-assigned session identifier forwarded to tool execution context. */
451
+ adapterSessionId?: string;
450
452
  /** Working directory for tool execution context. */
451
453
  cwd: string;
452
454
  /** Initial model identifier; mutable per turn via `updateModel()`. */
@@ -0,0 +1 @@
1
+ import{pathToFileURL as e}from"node:url";import{mkdir as t,rm as n,writeFile as r}from"node:fs/promises";import{basename as i,join as a}from"node:path";import{randomBytes as o}from"node:crypto";import{WorkflowDefinitionSchema as s,WorkflowError as c,WorkflowErrorCode as l}from"@makaio/framework/contracts";import{tmpdir as u}from"node:os";function d(e,t,n=[]){return{type:`makaio.workflow-worker.ready`,executionId:e,cancelSubject:t,adapters:n}}function f(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.type===`makaio.workflow-worker.ready`&&typeof t.executionId==`string`&&typeof t.cancelSubject==`string`&&Array.isArray(t.adapters)&&t.adapters.every(e=>typeof e==`string`)}function p(e){if(typeof e!=`object`||!e)throw new c(l.NOT_EXECUTABLE,`Invalid workflow module default export: expected an object with 'definition' and 'runtimeHandlers', got ${typeof e}.`);let t=e;if(!(t.runtimeHandlers instanceof Map))throw new c(l.NOT_EXECUTABLE,`Invalid workflow module default export: 'runtimeHandlers' must be a Map instance.`);let n=s.safeParse(t.definition);if(!n.success)throw new c(l.NOT_EXECUTABLE,`Invalid workflow module default export: 'definition' must satisfy WorkflowDefinitionSchema. `+n.error.message);let r=m(t.zodSchemas)?t.zodSchemas:void 0;return{definition:n.data,runtimeHandlers:t.runtimeHandlers,...r===void 0?{}:{zodSchemas:r}}}function m(e){return typeof e==`object`&&!!e&&!Array.isArray(e)&&`gates`in e}async function h(e,s){let c=i(e);if(!c||c===`.`||c===`..`)throw Error(`Invalid workflow source filename: ${e}`);let l=a(u(),`makaio-wf-${o(6).toString(`hex`)}`);await t(l,{recursive:!0});let d=a(l,c.endsWith(`.mjs`)?c:`${c}.mjs`);try{await r(d,s,`utf8`)}catch(e){throw await n(l,{recursive:!0,force:!0}).catch(()=>{}),e}return{tempDir:l,tempPath:d}}function g(e){return typeof e==`object`&&e&&Array.isArray(e.workflows)?e.workflows.map(p):[p(e)]}async function _(t){if(t.kind===`path`)return g((await import(e(t.path).href)).default);let{tempDir:r,tempPath:i}=await h(t.filename,t.source);try{return g((await import(e(i).href)).default)}finally{await n(r,{recursive:!0,force:!0})}}async function v(e){if(e.kind===`definition`)throw new c(l.NOT_EXECUTABLE,`Definition-sourced workers are handled by the workflow executor, not the file loader. Received source: ${JSON.stringify(e)}`);let t=await _(e);if(t.length!==1)throw new c(l.NOT_EXECUTABLE,`loadWorkflowModule expects a single workflow export, but the module exported ${String(t.length)} workflows. Use loadWorkflowModules for bundle exports.`);return t[0]}async function y(e){if(e.source.kind===`definition`){if(e.definition===void 0)throw Error(`Definition-sourced worker config for workflowId "${e.source.workflowId}" is missing the required 'definition' field. Ensure the executor populates WorkflowWorkerConfig.definition before dispatching.`);return{definition:e.definition,runtimeHandlers:new Map}}let t=await v(e.source);return b(e,t),e.definition===void 0?t:{...t,definition:e.definition}}function b(e,t){if(e.workflowId!==e.executionId&&t.definition.id!==e.workflowId)throw new c(l.SOURCE_MISMATCH,`Source-backed workflow for logical workflow '${e.workflowId}' loaded definition '${t.definition.id}'.`)}function x(e){let t=e.indexOf(`.`);if(t<=0||t===e.length-1)throw Error(`Invalid trigger subject: ${e}`);return{subject:e.slice(t+1),$meta:{namespace:e.slice(0,t),isRequest:!1,payload:{},local:!1,channel:!1}}}function S(e,t,n){return new Promise((r,i)=>{if(n.aborted){i(n.reason??Error(`Await-trigger aborted`));return}let a=[];function o(){for(let e of a)e();a.length=0}let s=()=>{o(),i(n.reason??Error(`Await-trigger aborted`))};n.addEventListener(`abort`,s,{once:!0}),a.push(()=>n.removeEventListener(`abort`,s));try{for(let n of t){let t=x(n.subject),i=e.on(t,e=>{o(),r(e.payload)},n.filter?{filter:n.filter}:void 0);a.push(i)}}catch(e){o(),i(e)}})}async function C(e,t,n,r){let i=(t.definition.triggers??[]).filter(e=>e.type===`bus-event`);if(Object.keys(e.triggerPayload).length!==0||i.length===0)return e;let a=await S(n,i,r);return{...e,triggerPayload:a}}export{d as a,_ as i,y as n,f as o,v as r,C as t};