@makaio/framework 1.0.0-dev-1789178369476 → 1.0.0-dev-1789178780636

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 (89) hide show
  1. package/dist/.makaio-build.json +2 -2
  2. package/dist/adapters/claude/index.d.mts +5 -5
  3. package/dist/{artifact-DGxKwbHE.mjs → artifact-CH7yhgti.mjs} +1 -1
  4. package/dist/bus/index.d.mts +1 -1
  5. package/dist/bus/index.mjs +1 -1
  6. package/dist/bus-CPlKKH4v.mjs +9 -0
  7. package/dist/contracts/adapter/index.d.mts +1 -1
  8. package/dist/contracts/artifact/index.d.mts +1 -1
  9. package/dist/contracts/artifact/index.mjs +1 -1
  10. package/dist/contracts/capabilities/index.d.mts +1 -1
  11. package/dist/contracts/client/index.d.mts +1 -1
  12. package/dist/contracts/extension/index.d.mts +2 -2
  13. package/dist/contracts/extension/index.mjs +1 -1
  14. package/dist/contracts/index.d.mts +44 -44
  15. package/dist/contracts/index.mjs +1 -1
  16. package/dist/contracts/materialization/index.mjs +1 -1
  17. package/dist/contracts/session/index.d.mts +2 -2
  18. package/dist/contracts/skill/index.d.mts +1 -1
  19. package/dist/contracts/variant/index.d.mts +1 -1
  20. package/dist/contracts/worker/index.d.mts +1 -1
  21. package/dist/contracts/worker/index.mjs +1 -1
  22. package/dist/contracts/workflow/index.d.mts +1 -1
  23. package/dist/contracts/workflow/index.mjs +1 -1
  24. package/dist/{extension-D8uLQSDc.mjs → extension-DRwry8GA.mjs} +1 -1
  25. package/dist/{index-BqtdO-uk.d.mts → index-4GaVggnR.d.mts} +41 -41
  26. package/dist/{index-C1nSuiG0.d.mts → index-B6WkHnCQ.d.mts} +1 -1
  27. package/dist/{index-B4pPwpKk.d.mts → index-BDRfiSz8.d.mts} +1 -1
  28. package/dist/{index-U--ajOHy.d.mts → index-BI8PuDkI.d.mts} +1 -1
  29. package/dist/{index-D0xS-mYt.d.mts → index-CA3Uzki8.d.mts} +10 -10
  30. package/dist/{index-C6e9cwAl2.d.mts → index-CdWxSwhQ2.d.mts} +4 -4
  31. package/dist/{index-Du4wUv9q.d.mts → index-CsLb9M1M.d.mts} +7 -7
  32. package/dist/{index-B3fuld9X.d.mts → index-DI07GxEW.d.mts} +5 -5
  33. package/dist/{index-CdgRoaey.d.mts → index-DNgrWs5j.d.mts} +21 -21
  34. package/dist/{index-zmDRR8gv2.d.mts → index-DVocx__-2.d.mts} +11 -11
  35. package/dist/{index-a_peDAyG.d.mts → index-DhunnX8V.d.mts} +13 -7
  36. package/dist/{index-gu4mzfTr.d.mts → index-GPTSqhvy.d.mts} +1 -1
  37. package/dist/{index-DyVXhEBC2.d.mts → index-GpfGF9AO2.d.mts} +3 -3
  38. package/dist/{index-HMb0RcTG2.d.mts → index-KnN2OyWD2.d.mts} +36 -36
  39. package/dist/{index-GFf4oKBg2.d.mts → index-iVisrVdC2.d.mts} +37 -37
  40. package/dist/{index-T-aAKybB.d.mts → index-xsaaa85T.d.mts} +8 -8
  41. package/dist/kernel/extension/index.d.mts +1 -1
  42. package/dist/kernel/index.d.mts +2 -2
  43. package/dist/kernel/observability/index.d.mts +1 -1
  44. package/dist/kind-registration-WrdMzWmV.mjs +1 -0
  45. package/dist/{materialization-kP_vEXV3.mjs → materialization-C_92G2CL.mjs} +1 -1
  46. package/dist/{namespace-DM5vykb7.d.mts → namespace-BrqkCnyt.d.mts} +4 -4
  47. package/dist/{namespace-f6Kz5cwX.d.mts → namespace-CjvSQYRJ.d.mts} +12 -12
  48. package/dist/{namespace-B5IFLQc-.d.mts → namespace-DQpBf2CK.d.mts} +6 -6
  49. package/dist/{namespace-C_tttgJ8.d.mts → namespace-DlOQmhgX.d.mts} +18 -18
  50. package/dist/{namespace-CPGTaFqO.d.mts → namespace-Phxf0Lep.d.mts} +2 -2
  51. package/dist/{namespace-LSHmxtMn.d.mts → namespace-uCaKZm89.d.mts} +4 -4
  52. package/dist/package.json +1 -1
  53. package/dist/runtime-node/workflow-execution-bus-access.mjs +1 -1
  54. package/dist/{schemas-CJKDu4Kt.d.mts → schemas-2_D4iVbb.d.mts} +1 -1
  55. package/dist/{schemas-Cj6Gbqch.d.mts → schemas-BcynDWi-.d.mts} +7 -7
  56. package/dist/{schemas-CPNdGMLf.d.mts → schemas-COiUhOce.d.mts} +8 -8
  57. package/dist/{schemas-CEJe8O6P.d.mts → schemas-DlVKv9QC.d.mts} +4 -4
  58. package/dist/{schemas-rlb0IQ-G.mjs → schemas-Dl_3zv9l.mjs} +1 -1
  59. package/dist/{schemas-CeItAAQM.d.mts → schemas-uA8246K9.d.mts} +8 -8
  60. package/dist/services/adapter-runtime/index.d.mts +3 -3
  61. package/dist/services/adapter-runtime/namespace.d.mts +1 -1
  62. package/dist/services/adapter-runtime/schemas.d.mts +1 -1
  63. package/dist/services/adapter-subsystem/index.d.mts +2 -2
  64. package/dist/services/adapter-subsystem/namespace.d.mts +1 -1
  65. package/dist/services/context-rules/index.d.mts +3 -3
  66. package/dist/services/execution-target/index.d.mts +2 -2
  67. package/dist/services/execution-target/namespace.d.mts +1 -1
  68. package/dist/services/execution-target/schemas.d.mts +1 -1
  69. package/dist/services/filesystem/namespace.d.mts +6 -6
  70. package/dist/services/filesystem/schemas.d.mts +3 -3
  71. package/dist/services/index.d.mts +36 -36
  72. package/dist/services/provider-context/index.d.mts +1 -1
  73. package/dist/services/session/handlers/index.d.mts +1 -1
  74. package/dist/services/session/index.d.mts +5 -5
  75. package/dist/services/session/messages/namespace.d.mts +1 -1
  76. package/dist/services/session/session-events/namespace.d.mts +1 -1
  77. package/dist/services/settings/namespace.d.mts +8 -8
  78. package/dist/services/subagent-template/index.d.mts +1 -1
  79. package/dist/services/subagent-template/schemas.d.mts +1 -1
  80. package/dist/services/tray-menu/index.d.mts +2 -2
  81. package/dist/services/tray-menu/namespace.d.mts +1 -1
  82. package/dist/services/tray-menu/schemas.d.mts +1 -1
  83. package/dist/{types-7QB81mzR.d.mts → types-DhbllltK.d.mts} +15 -15
  84. package/dist/{worker-DWEma08Q.mjs → worker-IIubsEFG.mjs} +1 -1
  85. package/dist/{workflow-DA2yJJK-.mjs → workflow-dVr_9gaf.mjs} +1 -1
  86. package/dist/workflow-engine/index.d.mts +39 -39
  87. package/package.json +1 -1
  88. package/dist/bus-CyrTcF8F.mjs +0 -9
  89. package/dist/kind-registration-BcNuwXPC.mjs +0 -1
@@ -1 +0,0 @@
1
- import{n as e}from"./json-value-DM-EjTC1.mjs";import{a as t,n}from"./json-tree-Cmb_BzHr.mjs";import{z as r}from"zod";function i(e){return a(e)?e:void 0}function a(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function o(e,t){if(!a(e))return!1;let n=e.type;return n===t?!0:Array.isArray(n)&&n.length===1&&n[0]===t}const s=`[]`;function c(e,t){return Object.keys(t).length===0?e:e?t:!1}function l(e,t){if(t===`#`)return e;if(!t.startsWith(`#/`))return;let n=e;for(let e of t.slice(2).split(`/`)){let t=i(n),r=e.replace(/~1/g,`/`).replace(/~0/g,`~`);if(!t||!Object.hasOwn(t,r))return;n=t[r]}return n}function u(e,t){let n=t.$ref;if(typeof n!=`string`)return;let r=l(e,n);if(typeof r==`boolean`){if(e.$schema!==`https://json-schema.org/draft/2020-12/schema`)return r;let{$ref:n,...i}=t;return c(r,i)}let a=i(r);if(!a||e.$schema!==`https://json-schema.org/draft/2020-12/schema`)return a;let{$ref:o,...s}=t;return Object.keys(s).length===0?a:{...a,allOf:[s,...Array.isArray(a.allOf)?a.allOf:[]]}}function d(e,t){for(let[n,r]of Object.entries(t))e[n]=Object.hasOwn(e,n)?{allOf:[e[n],r]}:r}function f(e){return Array.isArray(e.required)?e.required.filter(e=>typeof e==`string`):[]}function p(e,t){let n=i(e.properties);if(!n||!Object.hasOwn(n,t))return;let r=n[t];return typeof r==`boolean`?r:i(r)}function m(e,t,n){if(typeof t.$ref==`string`){if(n.has(t.$ref))return;let r=u(e,t);return a(r)?m(e,r,new Set([...n,t.$ref])):void 0}if(!Array.isArray(t.allOf))return t;let{allOf:r,...o}=t,s={},c={},l=new Set;for(let t of[o,...r]){let r=i(t),a=r?m(e,r,n):void 0;if(!a||a.anyOf||a.oneOf)return;if(a.type!==void 0){if(s.type!==void 0&&s.type!==a.type)return;s.type=a.type}if(a.items!==void 0){if(s.items!==void 0)return;s.items=a.items}d(c,i(a.properties)??{});for(let e of f(a))l.add(e)}return{...s,properties:c,required:[...l]}}function h(e,t,n,r,i,a,o,s){if(a.has(n))return;let c=u(e,t);return typeof c==`boolean`?r.length===0?[c]:void 0:c?v(e,c,r,i,new Set([...a,n]),o,s):void 0}function g(e,t,n,r){if(!o(t,`array`))return;let a=t.items;if(typeof a==`boolean`)return n.length===0?[a]:void 0;let s=i(a);return s?v(e,s,n,r):void 0}function _(e,t,n){if(typeof n.$ref!=`string`)return{node:{...n,allOf:[t,...Array.isArray(n.allOf)?n.allOf:[]]}};let r=u(e,n);return a(r)?{node:{...r,allOf:[t,...Array.isArray(r.allOf)?r.allOf:[]]},ref:n.$ref}:{node:{allOf:[t,n]}}}function v(e,t,n,r,a=new Set,s=!1,c=!1){if(typeof t.$ref==`string`){let i=t.$ref;return h(e,t,i,n,r,a,s,c)}let l=Array.isArray(t.anyOf)?`anyOf`:`oneOf`,u=t[l];if(Array.isArray(u)){let{[l]:o,...d}=t,f=u.map(t=>{let o=i(t);if(!o)return;let{node:l,ref:u}=_(e,d,o);return v(e,l,n,r,u===void 0?a:new Set([...a,u]),s,c)});return f.every(e=>e!==void 0)?f.flatMap(e=>e??[]):void 0}if(Array.isArray(t.allOf)){let i=m(e,t,a);return i?v(e,i,n,r,a,s,c):void 0}if(n.length===0)return[t];let[d,...b]=n;if(d===`[]`)return g(e,t,b,r||c);if(!(!o(t,`object`)&&!(t.type===void 0&&s))&&!(!d||r&&!f(t).includes(d)))return y(e,p(t,d),b,r,c)}function y(e,t,n,r,i){return typeof t==`boolean`?n.length===0?[t]:void 0:t?v(e,t,n,r,new Set,!1,i):void 0}function b(e,t,n){return v(e,e,[...t],n?.required??!1,new Set,!0,n?.requiredAfterElement??!1)}function x(e,t){return b(e,t.split(`.`))!==void 0}function S(e){let t=[],n=(e,n)=>{let r=i(e);r&&t.push({node:r,path:n})};for(let t of[`properties`,`patternProperties`,`$defs`,`definitions`,`dependentSchemas`,`dependencies`])for(let[r,a]of Object.entries(i(e[t])??{}))n(a,[t,r]);for(let t of[`allOf`,`anyOf`,`oneOf`,`prefixItems`,`items`]){let r=e[t];Array.isArray(r)&&r.forEach((e,r)=>n(e,[t,r]))}for(let t of[`items`,`additionalItems`,`additionalProperties`,`unevaluatedItems`,`unevaluatedProperties`,`propertyNames`,`contains`,`not`,`if`,`then`,`else`,`contentSchema`])n(e[t],[t]);return t}function C(e,t=[`dataSchema`]){if(Array.isArray(e.prefixItems)||Array.isArray(e.items))throw Error(`Unsupported tuple serialization at ${t.join(`.`)}: use an array schema or an explicit JSON Schema registration`);for(let n of S(e))C(n.node,[...t,...n.path])}function w(e,t,n=new Set){if(t.additionalProperties===!1)return!0;if(typeof t.$ref==`string`&&!n.has(t.$ref)){let r=u(e,t);if(r===void 0||a(r)&&w(e,r,new Set([...n,t.$ref])))return!0}return S(t).some(t=>w(e,t.node,n))}function T(e,t,n,r){if(Object.hasOwn(t,`$ref`)&&typeof t.$ref!=`string`&&n.addIssue({code:`custom`,path:[...r,`$ref`],message:`Schema reference must be a string`}),typeof t.$ref==`string`&&!t.$ref.startsWith(`#`)&&n.addIssue({code:`custom`,path:[...r,`$ref`],message:`Only fragment schema references are supported; absolute and document-relative references are outside the artifact registration profile`}),Object.hasOwn(t,`$anchor`)&&n.addIssue({code:`custom`,path:[...r,`$anchor`],message:`Named schema anchors are not supported; use local JSON Pointer references`}),typeof t.$ref==`string`&&t.$ref.startsWith(`#`)&&t.$ref.length>1&&!t.$ref.startsWith(`#/`)&&n.addIssue({code:`custom`,path:[...r,`$ref`],message:`Named schema references are not supported; use local JSON Pointer references`}),typeof t.$ref==`string`&&(t.$ref===`#`||t.$ref.startsWith(`#/`))){let a=l(e,t.$ref);!i(a)&&typeof a!=`boolean`&&n.addIssue({code:`custom`,path:[...r,`$ref`],message:`Fragment schema reference must resolve to an existing object or boolean schema`})}}function E(e,t,n,r=[`dataSchema`]){Object.hasOwn(t,`$async`)&&t.$async!==!1&&n.addIssue({code:`custom`,path:[...r,`$async`],message:`Asynchronous artifact schemas are not supported`}),T(e,t,n,r);for(let e of[`anyOf`,`oneOf`]){let i=t[e];Array.isArray(i)&&i.some(e=>typeof e==`boolean`)&&n.addIssue({code:`custom`,path:[...r,e],message:`Unsupported boolean union alternative: use object schema declarations`})}Array.isArray(t.allOf)&&(w(e,t)||!m(e,t,new Set))&&n.addIssue({code:`custom`,path:[...r,`allOf`],message:`Unsupported intersection: use open compatible conjuncts or a single closed object schema`});for(let i of S(t))E(e,i.node,n,[...r,...i.path])}function D(e,t){E(e.dataSchema,e.dataSchema,t);let n=v(e.dataSchema,e.dataSchema,e.titlePath.split(`.`),!0,new Set,!0);(!n?.length||n.some(e=>!o(e,`string`)))&&t.addIssue({code:`custom`,path:[`titlePath`],message:`titlePath must select a required string in every data schema variant`});let r=[...(e.indexedFields??[]).map((e,t)=>({path:e,location:[`indexedFields`,t]})),...(e.searchableFields??[]).map((e,t)=>({path:e,location:[`searchableFields`,t]})),...(e.uniqueness??[]).flatMap((e,t)=>e.by.flatMap((e,n)=>e.kind===`data`?[{path:e.path,location:[`uniqueness`,t,`by`,n,`path`]}]:[])),...Object.entries(e.views??{}).flatMap(([e,t])=>t.fields.map((t,n)=>({path:t,location:[`views`,e,`fields`,n]})))];for(let{path:n,location:i}of r)x(e.dataSchema,n)||t.addIssue({code:`custom`,path:i,message:`Data path ${n} must select a declared field`})}function O(e,t){let n=e;for(let e of t.split(`.`)){if(typeof n!=`object`||!n||Array.isArray(n)||!Object.hasOwn(n,e))throw Error(`Artifact title is missing at ${t}`);n=Reflect.get(n,e)}if(typeof n!=`string`||n.trim().length===0)throw Error(`Artifact title at ${t} must be a nonblank string`);return n}function k(e,t){let n=e.addressableParts;if(!n||n.length===0)return;let r=new Set;for(let[i,a]of n.entries())r.has(a.path)&&t.addIssue({code:`custom`,path:[`addressableParts`,i,`path`],message:`addressableParts[${i}].path duplicates an earlier area; each declared area must have a distinct path`}),r.add(a.path),A(e.dataSchema,a,i,t)}function A(e,t,n,r){let i=b(e,t.path.split(`.`));if(!i||i.length===0){r.addIssue({code:`custom`,path:[`addressableParts`,n,`path`],message:`addressableParts[${n}].path must select a declared location in every data schema variant`});return}if(i.some(e=>!o(e,`array`))){r.addIssue({code:`custom`,path:[`addressableParts`,n,`path`],message:`addressableParts[${n}].path must select an array schema in every data schema variant`});return}if(i.some(e=>typeof e==`object`&&(Array.isArray(e.prefixItems)||Array.isArray(e.items)))){r.addIssue({code:`custom`,path:[`addressableParts`,n,`path`],message:`addressableParts[${n}].path selects a tuple schema; tuples are outside the addressable-parts profile (homogeneous arrays only)`});return}j(e,t,n,r)}function j(e,t,n,r){let i=()=>{r.addIssue({code:`custom`,path:[`addressableParts`,n,`idPath`],message:`addressableParts[${n}].idPath must select a required string in every element variant`})},a=t.idPath.split(`.`),s=b(e,[...t.path.split(`.`),`[]`,...a],{requiredAfterElement:!0});if(!s||s.length===0){i();return}s.some(e=>!o(e,`string`))&&i()}function M(e,r){let i=[],a=new Map;for(let o of e){let e=t(r,o.path.split(`.`));if(e===void 0)continue;if(!Array.isArray(e)){i.push({path:o.path,reason:`declared part area must be an array; found ${typeof e}`});continue}let s=o.idPath.split(`.`);for(let[r,c]of e.entries()){let e=`${o.path}.${r}.${o.idPath}`;if(!n(c)){i.push({path:e,reason:`part element is not an object; local identifier cannot be read`});continue}let l=t(c,s);if(typeof l!=`string`){i.push({path:e,reason:l===void 0?`local identifier is missing`:`local identifier must be a string; found ${typeof l}`});continue}if(/^\s*$/.test(l)){i.push({path:e,reason:`local identifier must be a non-empty, non-whitespace-only string`});continue}let u=a.get(l);u===void 0?a.set(l,e):i.push({path:e,reason:`duplicate local identifier "${l}"; also found at ${u}`})}}return i}const N=[`ARTIFACT_NOT_FOUND`,`KIND_NOT_REGISTERED`,`NO_PARTS_DECLARED`,`PART_NOT_FOUND`,`DUPLICATE_LOCAL_ID`],P=r.strictObject({code:r.enum(N),message:r.string().min(1),repair:r.string().min(1)});function F(e,r,i){if(e.length===0)return{ok:!1,reason:`NO_PARTS_DECLARED`};let a;for(let o of e){let e=t(r,o.path.split(`.`));if(!Array.isArray(e))continue;let s=o.idPath.split(`.`);for(let r of e)if(n(r)&&t(r,s)===i){if(a!==void 0)return{ok:!1,reason:`DUPLICATE_LOCAL_ID`};a={areaPath:o.path,part:r}}}return a===void 0?{ok:!1,reason:`PART_NOT_FOUND`}:{ok:!0,areaPath:a.areaPath,part:a.part}}const I=r.number().int().positive(),L=r.enum([`knowledge`,`commitment`,`interaction`,`record`]),R=r.string().regex(/^[A-Za-z_$][\w$-]*(?:\.[A-Za-z_$][\w$-]*)*$/),z=r.strictObject({fields:r.array(R).min(1)}),B=new Set([`full`]),V={knowledge:[`valid`,`retired`],commitment:[`proposed`,`decided`,`fulfilled`,`revoked`],interaction:[`open`,`resolved`,`closed-without-resolution`],record:[]},H=r.enum([...V.knowledge,...V.commitment,...V.interaction]),U=r.strictObject({relationType:r.string().trim().min(1),targetKinds:r.array(r.string().trim().min(1)).min(1).optional(),minItems:r.number().int().nonnegative(),maxItems:r.number().int().nonnegative().optional()}).refine(e=>e.maxItems===void 0||e.maxItems>=e.minItems,{path:[`maxItems`],message:`maxItems must be at least minItems`}),W=r.discriminatedUnion(`kind`,[r.strictObject({kind:r.literal(`data`),path:R}),r.strictObject({kind:r.literal(`relation-target`),relationType:r.string().trim().min(1)})]),G=r.strictObject({path:R,idPath:R}),K=r.strictObject({by:r.array(W).min(1),lifecycleStates:r.array(H).min(1).optional()}),q=r.strictObject({minItems:r.number().int().nonnegative()}),J=r.enum([`http://json-schema.org/draft-07/schema#`,`https://json-schema.org/draft/2020-12/schema`]).optional(),Y=r.strictObject({kind:r.string().trim().min(1),description:r.string().trim().min(1),schemaVersion:I,category:L,dataSchema:e,titlePath:R,relations:r.array(U).optional(),uniqueness:r.array(K).optional(),evidenceRequirements:q.optional(),indexedFields:r.array(R).optional(),searchableFields:r.array(R).optional(),addressableParts:r.array(G).min(1).optional(),views:r.record(r.string().trim().min(1),z).optional()}).superRefine((e,t)=>{J.safeParse(e.dataSchema.$schema).success||t.addIssue({code:`custom`,path:[`dataSchema`,`$schema`],message:`Unsupported data schema dialect: omit $schema for draft-7 or declare the supported draft-7 or 2020-12 URI`});let n=V[e.category];e.uniqueness?.forEach((r,i)=>{r.lifecycleStates?.some(e=>!n.includes(e))&&t.addIssue({code:`custom`,path:[`uniqueness`,i,`lifecycleStates`],message:`Lifecycle conditions are incompatible with category ${e.category}`})}),Object.keys(e.views??{}).forEach(e=>{B.has(e)&&t.addIssue({code:`custom`,path:[`views`,e],message:`Artifact kind view ${e} is reserved for the generic complete-payload view`})}),D(e,t),k(e,t)});export{O as S,k as _,Y as a,b,G as c,K as d,W as f,F as g,M as h,q as i,U as l,P as m,L as n,z as o,N as p,R as r,H as s,V as t,I as u,s as v,x,C as y};