@makaio/framework 1.0.0-dev-1790772200584 → 1.0.0-dev-1791396836202

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 (71) hide show
  1. package/dist/.makaio-build.json +2 -2
  2. package/dist/artifact-BbNQHNDL.mjs +1 -0
  3. package/dist/bus/index.d.mts +39 -9
  4. package/dist/bus/index.mjs +1 -1
  5. package/dist/{bus--m38BS3i.mjs → bus-CtT6XeB_.mjs} +4 -4
  6. package/dist/contracts/artifact/index.d.mts +3 -3
  7. package/dist/contracts/artifact/index.mjs +1 -1
  8. package/dist/contracts/capabilities/index.d.mts +1 -1
  9. package/dist/contracts/client/index.d.mts +1 -1
  10. package/dist/contracts/extension/index.d.mts +2 -2
  11. package/dist/contracts/index.d.mts +32 -32
  12. package/dist/contracts/index.mjs +1 -1
  13. package/dist/contracts/materialization/index.d.mts +2 -2
  14. package/dist/contracts/materialization/index.mjs +1 -1
  15. package/dist/contracts/session/index.d.mts +2 -2
  16. package/dist/contracts/worker/index.d.mts +1 -1
  17. package/dist/contracts/worker/index.mjs +1 -1
  18. package/dist/contracts/workflow/index.d.mts +2 -2
  19. package/dist/contracts/workflow/index.mjs +1 -1
  20. package/dist/fast-connection-FG3yAA7o.mjs +1 -0
  21. package/dist/{framework-packages-blqho6Nk.mjs → framework-packages-CdpSqDeo.mjs} +1 -1
  22. package/dist/inbound-hooks/fast-connection.d.mts +1 -1
  23. package/dist/inbound-hooks/fast-connection.mjs +1 -1
  24. package/dist/inbound-hooks/index.mjs +1 -1
  25. package/dist/{index-CBzHX2vt.d.mts → index-BXaNt9GP.d.mts} +1 -1
  26. package/dist/{index-21Tx9_N1.d.mts → index-CgcMrxhm.d.mts} +24 -24
  27. package/dist/{index-Dj60LBqi2.d.mts → index-ChwEMUbc2.d.mts} +3 -3
  28. package/dist/{index-DeSmhDs9.d.mts → index-CjM6Fi-N.d.mts} +1 -1
  29. package/dist/{index-v1-To1jx.d.mts → index-D5eIy_qx.d.mts} +4 -4
  30. package/dist/{index-CMmUS-p2.d.mts → index-DBkmFhrn.d.mts} +160 -38
  31. package/dist/{index-DulipRwg.d.mts → index-DnsMV2xK.d.mts} +10 -10
  32. package/dist/{index-vARKBSt9.d.mts → index-Rd9Teoza.d.mts} +16 -16
  33. package/dist/{index-Bxm5RUGG2.d.mts → index-chwNKVMu2.d.mts} +33 -33
  34. package/dist/{index-BPoX2Q9Z.d.mts → index-y6zuCdvH.d.mts} +58 -58
  35. package/dist/kernel/extension/index.d.mts +2 -2
  36. package/dist/kernel/index.d.mts +2 -2
  37. package/dist/kernel/observability/index.d.mts +1 -1
  38. package/dist/{materialization-BzSgnv2R.mjs → materialization-C1qlFBV2.mjs} +1 -1
  39. package/dist/{namespace-u4eoUCLp.d.mts → namespace-DZooy1DW.d.mts} +18 -18
  40. package/dist/node/transports/index.mjs +2 -2
  41. package/dist/package.json +1 -1
  42. package/dist/packages-BOM7wECe.mjs +1 -0
  43. package/dist/{packages-Fy4a6vQy.d.mts → packages-g6BtlUF9.d.mts} +9 -6
  44. package/dist/{schemas-BKE3qw_w.d.mts → schemas-DnrIc9g7.d.mts} +49 -10
  45. package/dist/{schemas-BQhtYuCM.d.mts → schemas-Y3EJu698.d.mts} +8 -8
  46. package/dist/{schemas-BvDsO8Is.mjs → schemas-uNzmiLso.mjs} +1 -1
  47. package/dist/services/filesystem/namespace.d.mts +6 -6
  48. package/dist/services/filesystem/schemas.d.mts +3 -3
  49. package/dist/services/index.d.mts +9 -9
  50. package/dist/services/index.mjs +1 -1
  51. package/dist/services/materialization/index.d.mts +1 -1
  52. package/dist/services/materialization/index.mjs +1 -1
  53. package/dist/services/session/index.d.mts +1 -1
  54. package/dist/services/session/session-events/namespace.d.mts +1 -1
  55. package/dist/services/settings/namespace.d.mts +8 -8
  56. package/dist/services/subagent-template/index.d.mts +1 -1
  57. package/dist/services/subagent-template/schemas.d.mts +1 -1
  58. package/dist/services/tools/index.mjs +1 -1
  59. package/dist/services/workflow-transitions/index.mjs +1 -1
  60. package/dist/{tools-Cbuj-ClQ.mjs → tools-EK2HiPee.mjs} +1 -1
  61. package/dist/{transition-DNNBGMtx.d.mts → transition-yohyGRmc.d.mts} +1 -1
  62. package/dist/{types-DsZBnL7z.d.mts → types-CRKyrt5_.d.mts} +12 -12
  63. package/dist/{view-builder-HU_v1Jg7.d.mts → view-builder-BjVjGZAI.d.mts} +2 -2
  64. package/dist/{worker-toBnRJ0A.mjs → worker-DulBFC0P.mjs} +1 -1
  65. package/dist/{workflow-BDDB6EJi.mjs → workflow-Dvv_8Xu6.mjs} +1 -1
  66. package/dist/workflow-engine/index.d.mts +39 -39
  67. package/dist/{workflow-transitions-CvT6P03B.mjs → workflow-transitions-ztq90FUj.mjs} +1 -1
  68. package/package.json +1 -1
  69. package/dist/artifact-XE82Q2bH.mjs +0 -1
  70. package/dist/fast-connection-CIZ6nL7o.mjs +0 -1
  71. package/dist/packages-CZ2x-Ver.mjs +0 -1
@@ -1,5 +1,5 @@
1
1
  import * as _$_makaio_contracts0 from "@makaio/framework/contracts";
2
- import { ArtifactKindRegistration, ExtensionServiceLifecycle, MakaioNodeExtension, RelationTypeRegistration } from "@makaio/framework/contracts";
2
+ import { ArtifactKindRegistration, ExtensionServiceLifecycle, MakaioNodeExtension, NormalizedRelationTypeRegistration } from "@makaio/framework/contracts";
3
3
  import { IMakaioBus } from "@makaio/framework/bus";
4
4
  import { BaseService } from "@makaio/framework/service-base";
5
5
  import { ArtifactViewBuilder, SurfaceBindingRegistration } from "@makaio/framework/contracts/materialization";
@@ -63,6 +63,7 @@ declare class ArtifactSchemaRegistry extends BaseService {
63
63
  private readonly kindContributions;
64
64
  /** Monotone counter for contribution insertion order. */
65
65
  private nextKindContributionOrder;
66
+ /** Relation types by name, stored in normal form (shorthand folded into `endpoints`). */
66
67
  private readonly relationTypes;
67
68
  /**
68
69
  * @param bus - Bus instance used for handler registration and event emission.
@@ -153,10 +154,12 @@ declare class ArtifactSchemaRegistry extends BaseService {
153
154
  /**
154
155
  * Store a relation type registration.
155
156
  *
156
- * An identical re-registration (same type and symmetry) is silently accepted.
157
- * A registration that differs only in symmetry is rejected with an error.
157
+ * Contributions for the same type from several modules are merged: their endpoint
158
+ * entries are unioned and the result is kept in normal form. An identical
159
+ * re-registration merges to the same normal form.
160
+ * Conflicts on per-type properties (`symmetry`, differing `implication`) throw.
158
161
  * @param registration - Relation type registration payload received from the bus RPC.
159
- * @throws If a conflicting registration for the same type already exists.
162
+ * @throws RelationTypeConflictError If a conflicting registration for the same type already exists.
160
163
  */
161
164
  private storeRelationType;
162
165
  /**
@@ -169,9 +172,9 @@ declare class ArtifactSchemaRegistry extends BaseService {
169
172
  /**
170
173
  * Look up a relation type registration by type string.
171
174
  * @param type - Relation type string.
172
- * @returns The registration record, or `undefined` if not found.
175
+ * @returns The registration record in normal form, or `undefined` if not found.
173
176
  */
174
- getRelationType(type: string): RelationTypeRegistration | undefined;
177
+ getRelationType(type: string): NormalizedRelationTypeRegistration | undefined;
175
178
  /**
176
179
  * Service teardown hook.
177
180
  *
@@ -695,19 +695,48 @@ declare const ArtifactRevisionSchema: z.ZodObject<{
695
695
  timestamp: z.ZodNumber;
696
696
  createdAt: z.ZodOptional<z.ZodNumber>;
697
697
  }, z.core.$strip>;
698
+ /** Reference classes a relation target may belong to. */
699
+ declare const RelationTargetRefClassSchema: z.ZodEnum<{
700
+ local: "local";
701
+ evidence: "evidence";
702
+ artifact: "artifact";
703
+ entity: "entity";
704
+ }>;
705
+ /**
706
+ * One permitted endpoint pair of a relation type.
707
+ * An omitted list is open. A present list is an allowlist, so an empty list permits nothing.
708
+ */
709
+ declare const RelationEndpointSchema: z.ZodObject<{
710
+ sourceKinds: z.ZodOptional<z.ZodArray<z.ZodString>>;
711
+ targetKinds: z.ZodOptional<z.ZodArray<z.ZodString>>;
712
+ targetRefClasses: z.ZodOptional<z.ZodArray<z.ZodEnum<{
713
+ local: "local";
714
+ evidence: "evidence";
715
+ artifact: "artifact";
716
+ entity: "entity";
717
+ }>>>;
718
+ }, z.core.$strip>;
698
719
  /**
699
720
  * Registration record for a named relation type.
700
721
  *
701
- * Relation type registrations declare the semantics and valid endpoints
702
- * for a given relation `type` string.
722
+ * A registration declares the verb (`type`, `symmetry`, `implication`) and the
723
+ * endpoint pairs it may connect. `symmetry` and `implication` describe the verb
724
+ * as a whole, not an individual pair. Pairs are declared either through
725
+ * `endpoints` (a list of permitted pairs) or through the shorthand fields
726
+ * `sourceKinds`, `targetKinds` and `targetRefClasses`, which stand for exactly
727
+ * one endpoint. The two forms are mutually exclusive.
703
728
  */
704
729
  declare const RelationTypeRegistrationSchema: z.ZodObject<{
705
- type: z.ZodString;
706
- symmetry: z.ZodEnum<{
707
- asymmetric: "asymmetric";
708
- symmetric: "symmetric";
709
- }>;
710
- implication: z.ZodOptional<z.ZodString>;
730
+ endpoints: z.ZodOptional<z.ZodArray<z.ZodObject<{
731
+ sourceKinds: z.ZodOptional<z.ZodArray<z.ZodString>>;
732
+ targetKinds: z.ZodOptional<z.ZodArray<z.ZodString>>;
733
+ targetRefClasses: z.ZodOptional<z.ZodArray<z.ZodEnum<{
734
+ local: "local";
735
+ evidence: "evidence";
736
+ artifact: "artifact";
737
+ entity: "entity";
738
+ }>>>;
739
+ }, z.core.$strip>>>;
711
740
  sourceKinds: z.ZodOptional<z.ZodArray<z.ZodString>>;
712
741
  targetKinds: z.ZodOptional<z.ZodArray<z.ZodString>>;
713
742
  targetRefClasses: z.ZodOptional<z.ZodArray<z.ZodEnum<{
@@ -716,6 +745,12 @@ declare const RelationTypeRegistrationSchema: z.ZodObject<{
716
745
  artifact: "artifact";
717
746
  entity: "entity";
718
747
  }>>>;
748
+ type: z.ZodString;
749
+ symmetry: z.ZodEnum<{
750
+ asymmetric: "asymmetric";
751
+ symmetric: "symmetric";
752
+ }>;
753
+ implication: z.ZodOptional<z.ZodString>;
719
754
  }, z.core.$strip>;
720
755
  /**
721
756
  * Query parameters for retrieving artifact revisions from the store.
@@ -1134,7 +1169,11 @@ type ArtifactRevision$1<TData extends Record<string, unknown> = Record<string, u
1134
1169
  data: TData;
1135
1170
  };
1136
1171
  /** Registration record for a named relation type. */
1137
- type RelationTypeRegistration$1 = z.infer<typeof RelationTypeRegistrationSchema>;
1172
+ type RelationTypeRegistration = z.infer<typeof RelationTypeRegistrationSchema>;
1173
+ /** Reference classes a relation target may belong to. */
1174
+ type RelationTargetRefClass = z.infer<typeof RelationTargetRefClassSchema>;
1175
+ /** One permitted endpoint pair of a relation type. */
1176
+ type RelationEndpoint = z.infer<typeof RelationEndpointSchema>;
1138
1177
  /** Query parameters for retrieving artifact revisions from the store. */
1139
1178
  type ArtifactQueryRequest = z.infer<typeof ArtifactQueryRequestSchema>;
1140
1179
  /** Request to compare two artifact revisions. */
@@ -1142,4 +1181,4 @@ type ArtifactCompareRequest = z.infer<typeof ArtifactCompareRequestSchema>;
1142
1181
  /** Result of comparing two artifact revisions. */
1143
1182
  type ArtifactCompareResponse = z.infer<typeof ArtifactCompareResponseSchema>;
1144
1183
  //#endregion
1145
- export { ArtifactPartAreaSchema as $, ConfidenceMetadata as A, ARTIFACT_CATEGORY_LIFECYCLE_STATES as B, ArtifactScope as C, ConfidenceBasisSchema as D, ConfidenceBasis as E, EvidenceRefSchema as F, ArtifactEvidenceRequirementsSchema as G, ArtifactCategorySchema as H, LocalRef as I, ArtifactKindView as J, ArtifactKindRegistration$1 as K, LocalRefSchema as L, EntityRef as M, EntityRefSchema as N, ConfidenceLevel as O, EvidenceRef as P, ArtifactPartArea as Q, RelationTypeRegistration$1 as R, ArtifactRevisionSchema as S, ArtifactStatusPathSchema as T, ArtifactDataPathSchema as U, ArtifactCategory as V, ArtifactEvidenceRequirements as W, ArtifactLifecycleState as X, ArtifactKindViewSchema as Y, ArtifactLifecycleStateSchema as Z, ArtifactRelationTarget as _, ArtifactCompareResponse as a, ArtifactUniquenessRule as at, ArtifactRepresentationsSchema as b, ArtifactObservationSchema as c, ArtifactRef$1 as ct, ArtifactQueryScope as d, ArtifactRelationRequirement as et, ArtifactQueryScopeSchema as f, ArtifactRelationSchema as g, ArtifactRelationQueryTargetSchema as h, ArtifactCompareRequestSchema as i, ArtifactSchemaVersionSchema as it, ConfidenceMetadataSchema as j, ConfidenceLevelSchema as k, ArtifactQueryRequest as l, ArtifactRefSchema as lt, ArtifactRelationQueryTarget as m, ArtifactActorSchema as n, ArtifactRelationRequirementConditionSchema as nt, ArtifactCompareResponseSchema as o, ArtifactUniquenessRuleSchema as ot, ArtifactRelation as p, ArtifactKindRegistrationSchema$1 as q, ArtifactCompareRequest as r, ArtifactRelationRequirementSchema as rt, ArtifactObservation$1 as s, ArtifactUniquenessSelectorSchema as st, ArtifactActor as t, ArtifactRelationRequirementCondition as tt, ArtifactQueryRequestSchema as u, ArtifactRelationTargetSchema as v, ArtifactScopeSchema as w, ArtifactRevision$1 as x, ArtifactRepresentations as y, RelationTypeRegistrationSchema as z };
1184
+ export { ArtifactLifecycleState as $, ConfidenceMetadata as A, RelationTargetRefClass as B, ArtifactScope as C, ConfidenceBasisSchema as D, ConfidenceBasis as E, EvidenceRefSchema as F, ArtifactCategorySchema as G, RelationTypeRegistrationSchema as H, LocalRef as I, ArtifactEvidenceRequirementsSchema as J, ArtifactDataPathSchema as K, LocalRefSchema as L, EntityRef as M, EntityRefSchema as N, ConfidenceLevel as O, EvidenceRef as P, ArtifactKindViewSchema as Q, RelationEndpoint as R, ArtifactRevisionSchema as S, ArtifactStatusPathSchema as T, ARTIFACT_CATEGORY_LIFECYCLE_STATES as U, RelationTypeRegistration as V, ArtifactCategory as W, ArtifactKindRegistrationSchema$1 as X, ArtifactKindRegistration$1 as Y, ArtifactKindView as Z, ArtifactRelationTarget as _, ArtifactCompareResponse as a, ArtifactRelationRequirementConditionSchema as at, ArtifactRepresentationsSchema as b, ArtifactObservationSchema as c, ArtifactUniquenessRule as ct, ArtifactQueryScope as d, ArtifactRef$1 as dt, ArtifactLifecycleStateSchema as et, ArtifactQueryScopeSchema as f, ArtifactRefSchema as ft, ArtifactRelationSchema as g, ArtifactRelationQueryTargetSchema as h, ArtifactCompareRequestSchema as i, ArtifactRelationRequirementCondition as it, ConfidenceMetadataSchema as j, ConfidenceLevelSchema as k, ArtifactQueryRequest as l, ArtifactUniquenessRuleSchema as lt, ArtifactRelationQueryTarget as m, ArtifactActorSchema as n, ArtifactPartAreaSchema as nt, ArtifactCompareResponseSchema as o, ArtifactRelationRequirementSchema as ot, ArtifactRelation as p, ArtifactEvidenceRequirements as q, ArtifactCompareRequest as r, ArtifactRelationRequirement as rt, ArtifactObservation$1 as s, ArtifactSchemaVersionSchema as st, ArtifactActor as t, ArtifactPartArea as tt, ArtifactQueryRequestSchema as u, ArtifactUniquenessSelectorSchema as ut, ArtifactRelationTargetSchema as v, ArtifactScopeSchema as w, ArtifactRevision$1 as x, ArtifactRepresentations as y, RelationEndpointSchema as z };
@@ -15,8 +15,8 @@ declare const SubagentTemplateSchema: z.ZodObject<{
15
15
  model: z.ZodOptional<z.ZodString>;
16
16
  systemPrompt: z.ZodOptional<z.ZodString>;
17
17
  contextMode: z.ZodDefault<z.ZodEnum<{
18
- fork: "fork";
19
18
  fresh: "fresh";
19
+ fork: "fork";
20
20
  }>>;
21
21
  allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
22
22
  disallowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -45,6 +45,7 @@ type SubagentTemplateSummary = z.infer<typeof SubagentTemplateSummarySchema>;
45
45
  declare const SubagentTemplateCreateSchema: z.ZodObject<{
46
46
  name: z.ZodString;
47
47
  enabled: z.ZodDefault<z.ZodBoolean>;
48
+ adapterName: z.ZodString;
48
49
  providerConfigId: z.ZodOptional<z.ZodString>;
49
50
  model: z.ZodOptional<z.ZodString>;
50
51
  systemPrompt: z.ZodOptional<z.ZodString>;
@@ -52,10 +53,9 @@ declare const SubagentTemplateCreateSchema: z.ZodObject<{
52
53
  disallowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
53
54
  allowedDirectories: z.ZodOptional<z.ZodArray<z.ZodString>>;
54
55
  contextMode: z.ZodDefault<z.ZodEnum<{
55
- fork: "fork";
56
56
  fresh: "fresh";
57
+ fork: "fork";
57
58
  }>>;
58
- adapterName: z.ZodString;
59
59
  }, z.core.$strip>;
60
60
  type SubagentTemplateCreate = z.infer<typeof SubagentTemplateCreateSchema>;
61
61
  /**
@@ -69,8 +69,8 @@ declare const SubagentTemplateUpdateSchema: z.ZodObject<{
69
69
  model: z.ZodOptional<z.ZodOptional<z.ZodString>>;
70
70
  systemPrompt: z.ZodOptional<z.ZodOptional<z.ZodString>>;
71
71
  contextMode: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
72
- fork: "fork";
73
72
  fresh: "fresh";
73
+ fork: "fork";
74
74
  }>>>;
75
75
  allowedTools: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
76
76
  disallowedTools: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
@@ -114,8 +114,8 @@ declare const SubagentTemplateSettingsSchemas: {
114
114
  model: z.ZodOptional<z.ZodString>;
115
115
  systemPrompt: z.ZodOptional<z.ZodString>;
116
116
  contextMode: z.ZodDefault<z.ZodEnum<{
117
- fork: "fork";
118
117
  fresh: "fresh";
118
+ fork: "fork";
119
119
  }>>;
120
120
  allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
121
121
  disallowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -130,6 +130,7 @@ declare const SubagentTemplateSettingsSchemas: {
130
130
  request: z.ZodObject<{
131
131
  name: z.ZodString;
132
132
  enabled: z.ZodDefault<z.ZodBoolean>;
133
+ adapterName: z.ZodString;
133
134
  providerConfigId: z.ZodOptional<z.ZodString>;
134
135
  model: z.ZodOptional<z.ZodString>;
135
136
  systemPrompt: z.ZodOptional<z.ZodString>;
@@ -137,10 +138,9 @@ declare const SubagentTemplateSettingsSchemas: {
137
138
  disallowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
138
139
  allowedDirectories: z.ZodOptional<z.ZodArray<z.ZodString>>;
139
140
  contextMode: z.ZodDefault<z.ZodEnum<{
140
- fork: "fork";
141
141
  fresh: "fresh";
142
+ fork: "fork";
142
143
  }>>;
143
- adapterName: z.ZodString;
144
144
  }, z.core.$strip>;
145
145
  response: z.ZodObject<{
146
146
  id: z.ZodString;
@@ -155,8 +155,8 @@ declare const SubagentTemplateSettingsSchemas: {
155
155
  model: z.ZodOptional<z.ZodOptional<z.ZodString>>;
156
156
  systemPrompt: z.ZodOptional<z.ZodOptional<z.ZodString>>;
157
157
  contextMode: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
158
- fork: "fork";
159
158
  fresh: "fresh";
159
+ fork: "fork";
160
160
  }>>>;
161
161
  allowedTools: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
162
162
  disallowedTools: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
@@ -1 +1 @@
1
- import{n as e,o as t}from"./json-value-DM-EjTC1.mjs";import{d as n,r,w as i}from"./kind-registration-CdjmVxY_.mjs";import{t as a}from"./repo-context-cO-TLEGN.mjs";import{z as o}from"zod";const s=o.string().min(1).regex(/\S/),c=o.strictObject({refClass:o.literal(`artifact`),kind:s,id:s,revision:s}),l=`x-makaio-value-type`,u=`evidence/v1`,d=o.string().min(1).regex(/\S/),f=o.strictObject({kind:o.literal(`whole-source`)}),p=o.strictObject({kind:o.literal(`lines`),startLine:o.number().int().positive(),lineCount:o.number().int().positive()}),m=o.strictObject({kind:o.literal(`data-path`),path:r}),h=o.strictObject({kind:o.literal(`git-file`),repository:a.strict(),path:d,commit:o.string().regex(/^(?:[0-9a-fA-F]{40}|[0-9a-fA-F]{64})$/)}),g=o.strictObject({kind:o.literal(`confluence-page`),site:d,pageId:d,version:o.number().int().positive()}),_=o.strictObject({kind:o.literal(`artifact`),reference:c}),v=o.union([o.strictObject({source:h,location:o.union([f,p]),excerpt:o.string().optional()}),o.strictObject({source:g,location:f,excerpt:o.string().optional()}),o.strictObject({source:_,location:o.union([f,m]),excerpt:o.string().optional()})]).meta({title:`EvidenceValue`,description:`An immutable, directly cited source and its source-specific location.`,[l]:u}),y=o.string().regex(/^(?:\/(?:[^~/]|~[01])*)+$/,`Expected a data-relative JSON Pointer`),b=o.object({kind:o.string().min(1),id:o.string().min(1),displayName:o.string().optional()}),x=o.object({level:o.string().min(1),ids:o.record(o.string().min(1),o.string().min(1)).optional()}).superRefine((e,t)=>{e.level!==`global`&&(!e.ids||Object.keys(e.ids).length===0)&&t.addIssue({code:o.ZodIssueCode.custom,path:[`ids`],message:`ids is required when scope level is not 'global'`})}),S=o.object({level:o.string().min(1),ids:o.record(o.string().min(1),o.string().min(1)).optional()}),C=o.object({refClass:o.literal(`local`).default(`local`),artifact:c,localId:o.string().min(1)}),w=o.object({refClass:o.literal(`evidence`).default(`evidence`),kind:o.string().min(1),id:o.string().min(1),revision:o.string().min(1).optional(),locator:o.string().min(1).optional()}),T=o.strictObject({refClass:o.literal(`entity`),entityType:o.string().min(1),id:o.string().min(1)}),E=o.discriminatedUnion(`refClass`,[c,C,w,T]);function D(e){return!e||typeof e!=`object`||Array.isArray(e)||`refClass`in e?e:`artifact`in e&&`localId`in e?{...e,refClass:`local`}:`locator`in e||!(`revision`in e)?{...e,refClass:`evidence`}:{...e,refClass:`artifact`}}const O=o.preprocess(D,E),k=o.discriminatedUnion(`refClass`,[c.extend({revision:c.shape.revision.optional()}),C,w,T]);function A(e){return!e||typeof e!=`object`||Array.isArray(e)||`refClass`in e?e:`artifact`in e&&`localId`in e?{...e,refClass:`local`}:`locator`in e?{...e,refClass:`evidence`}:{...e,refClass:`artifact`}}const j=o.preprocess(A,k),M=o.object({type:o.string().min(1),sourceLocalId:o.string().min(1).regex(/\S/).optional(),target:O}),N=o.enum([`assumed`,`inferred`,`stated`,`confirmed`,`verified`]),P=o.object({kind:o.string().min(1),actor:b,timestamp:o.number().int().nonnegative(),detail:o.string().optional(),evidenceRef:O.optional()}),F=o.object({level:N,basis:o.array(P)}),I=o.object({id:o.string().min(1),kind:o.string().min(1),summary:o.string().min(1),detail:o.string().optional(),severity:o.enum([`info`,`warning`,`blocker`]).optional(),tags:o.array(o.string().min(1)).optional(),regarding:o.union([c,C]).optional(),evidence:o.union([c,w]).optional(),actor:b,timestamp:o.number().int().nonnegative()}),L=o.object({markdown:o.string().optional(),summary:o.string().optional(),plaintext:o.string().optional()}),R=o.object({kind:c.shape.kind,id:c.shape.id,slug:i,revision:c.shape.revision,scope:x,schemaVersion:n,data:e,relations:o.array(M),evidence:o.array(v).optional(),confidence:F.optional(),representations:L.optional(),actor:b,timestamp:o.number().int().nonnegative(),createdAt:o.number().int().nonnegative().optional()}),z=o.object({type:o.string().min(1),symmetry:o.enum([`asymmetric`,`symmetric`]),implication:o.string().min(1).optional(),sourceKinds:o.array(o.string().min(1)).optional(),targetKinds:o.array(o.string().min(1)).optional(),targetRefClasses:o.array(o.enum([`artifact`,`local`,`evidence`,`entity`])).optional()}),B=o.object({kind:o.string().min(1).optional(),scope:S.optional(),ids:o.array(o.string().min(1)).optional(),slug:i.optional(),currentOnly:o.boolean().optional(),search:o.string().optional(),relation:o.object({type:o.string().min(1).optional(),target:j.optional()}).optional(),confidence:o.object({maxLevel:N.optional(),minLevel:N.optional()}).optional(),indexed:o.record(o.string(),t).optional(),limit:o.number().int().min(1).optional()}),V=o.object({base:c,target:c}),H=o.object({base:R,target:R,changedPaths:o.array(o.string())});export{v as C,u as S,T as _,B as a,z as b,M as c,R as d,x as f,F as g,N as h,I as i,O as l,P as m,V as n,S as o,y as p,H as r,j as s,b as t,L as u,w as v,c as w,l as x,C as y};
1
+ import{n as e,o as t}from"./json-value-DM-EjTC1.mjs";import{d as n,r,w as i}from"./kind-registration-CdjmVxY_.mjs";import{t as a}from"./repo-context-cO-TLEGN.mjs";import{z as o}from"zod";const s=o.string().min(1).regex(/\S/),c=o.strictObject({refClass:o.literal(`artifact`),kind:s,id:s,revision:s}),l=`x-makaio-value-type`,u=`evidence/v1`,d=o.string().min(1).regex(/\S/),f=o.strictObject({kind:o.literal(`whole-source`)}),p=o.strictObject({kind:o.literal(`lines`),startLine:o.number().int().positive(),lineCount:o.number().int().positive()}),m=o.strictObject({kind:o.literal(`data-path`),path:r}),h=o.strictObject({kind:o.literal(`git-file`),repository:a.strict(),path:d,commit:o.string().regex(/^(?:[0-9a-fA-F]{40}|[0-9a-fA-F]{64})$/)}),g=o.strictObject({kind:o.literal(`confluence-page`),site:d,pageId:d,version:o.number().int().positive()}),_=o.strictObject({kind:o.literal(`artifact`),reference:c}),v=o.union([o.strictObject({source:h,location:o.union([f,p]),excerpt:o.string().optional()}),o.strictObject({source:g,location:f,excerpt:o.string().optional()}),o.strictObject({source:_,location:o.union([f,m]),excerpt:o.string().optional()})]).meta({title:`EvidenceValue`,description:`An immutable, directly cited source and its source-specific location.`,[l]:u}),y=o.string().regex(/^(?:\/(?:[^~/]|~[01])*)+$/,`Expected a data-relative JSON Pointer`),b=o.object({kind:o.string().min(1),id:o.string().min(1),displayName:o.string().optional()}),x=o.object({level:o.string().min(1),ids:o.record(o.string().min(1),o.string().min(1)).optional()}).superRefine((e,t)=>{e.level!==`global`&&(!e.ids||Object.keys(e.ids).length===0)&&t.addIssue({code:o.ZodIssueCode.custom,path:[`ids`],message:`ids is required when scope level is not 'global'`})}),S=o.object({level:o.string().min(1),ids:o.record(o.string().min(1),o.string().min(1)).optional()}),C=o.object({refClass:o.literal(`local`).default(`local`),artifact:c,localId:o.string().min(1)}),w=o.object({refClass:o.literal(`evidence`).default(`evidence`),kind:o.string().min(1),id:o.string().min(1),revision:o.string().min(1).optional(),locator:o.string().min(1).optional()}),T=o.strictObject({refClass:o.literal(`entity`),entityType:o.string().min(1),id:o.string().min(1)}),E=o.discriminatedUnion(`refClass`,[c,C,w,T]);function D(e){return!e||typeof e!=`object`||Array.isArray(e)||`refClass`in e?e:`artifact`in e&&`localId`in e?{...e,refClass:`local`}:`locator`in e||!(`revision`in e)?{...e,refClass:`evidence`}:{...e,refClass:`artifact`}}const O=o.preprocess(D,E),k=o.discriminatedUnion(`refClass`,[c.extend({revision:c.shape.revision.optional()}),C,w,T]);function A(e){return!e||typeof e!=`object`||Array.isArray(e)||`refClass`in e?e:`artifact`in e&&`localId`in e?{...e,refClass:`local`}:`locator`in e?{...e,refClass:`evidence`}:{...e,refClass:`artifact`}}const j=o.preprocess(A,k),M=o.object({type:o.string().min(1),sourceLocalId:o.string().min(1).regex(/\S/).optional(),target:O}),N=o.enum([`assumed`,`inferred`,`stated`,`confirmed`,`verified`]),P=o.object({kind:o.string().min(1),actor:b,timestamp:o.number().int().nonnegative(),detail:o.string().optional(),evidenceRef:O.optional()}),F=o.object({level:N,basis:o.array(P)}),I=o.object({id:o.string().min(1),kind:o.string().min(1),summary:o.string().min(1),detail:o.string().optional(),severity:o.enum([`info`,`warning`,`blocker`]).optional(),tags:o.array(o.string().min(1)).optional(),regarding:o.union([c,C]).optional(),evidence:o.union([c,w]).optional(),actor:b,timestamp:o.number().int().nonnegative()}),L=o.object({markdown:o.string().optional(),summary:o.string().optional(),plaintext:o.string().optional()}),R=o.object({kind:c.shape.kind,id:c.shape.id,slug:i,revision:c.shape.revision,scope:x,schemaVersion:n,data:e,relations:o.array(M),evidence:o.array(v).optional(),confidence:F.optional(),representations:L.optional(),actor:b,timestamp:o.number().int().nonnegative(),createdAt:o.number().int().nonnegative().optional()}),z=o.enum([`artifact`,`local`,`evidence`,`entity`]),B=o.object({sourceKinds:o.array(o.string().min(1)).optional(),targetKinds:o.array(o.string().min(1)).optional(),targetRefClasses:o.array(z).optional()}),V=o.object({type:o.string().min(1),symmetry:o.enum([`asymmetric`,`symmetric`]),implication:o.string().min(1).optional(),...B.shape,endpoints:o.array(B).min(1).optional()}).superRefine((e,t)=>{e.endpoints!==void 0&&(e.sourceKinds!==void 0||e.targetKinds!==void 0||e.targetRefClasses!==void 0)&&t.addIssue({code:`custom`,path:[`endpoints`],message:`endpoints cannot be combined with the shorthand fields sourceKinds, targetKinds or targetRefClasses`})}),H=o.object({kind:o.string().min(1).optional(),scope:S.optional(),ids:o.array(o.string().min(1)).optional(),slug:i.optional(),currentOnly:o.boolean().optional(),search:o.string().optional(),relation:o.object({type:o.string().min(1).optional(),target:j.optional()}).optional(),confidence:o.object({maxLevel:N.optional(),minLevel:N.optional()}).optional(),indexed:o.record(o.string(),t).optional(),limit:o.number().int().min(1).optional()}),U=o.object({base:c,target:c}),W=o.object({base:R,target:R,changedPaths:o.array(o.string())});export{u as C,l as S,c as T,T as _,H as a,B as b,M as c,R as d,x as f,F as g,N as h,I as i,O as l,P as m,U as n,S as o,y as p,W as r,j as s,b as t,L as u,w as v,v as w,V as x,C as y};
@@ -10,8 +10,8 @@ declare const FsNamespace: _$_makaio_core0.BusNamespaceDefinition<"fs", {
10
10
  changed: _$zod.ZodObject<{
11
11
  path: _$zod.ZodString;
12
12
  kind: _$zod.ZodEnum<{
13
- create: "create";
14
13
  change: "change";
14
+ create: "create";
15
15
  delete: "delete";
16
16
  }>;
17
17
  }, _$zod_v4_core0.$strip>;
@@ -19,8 +19,8 @@ declare const FsNamespace: _$_makaio_core0.BusNamespaceDefinition<"fs", {
19
19
  changes: _$zod.ZodArray<_$zod.ZodObject<{
20
20
  path: _$zod.ZodString;
21
21
  kind: _$zod.ZodEnum<{
22
- create: "create";
23
22
  change: "change";
23
+ create: "create";
24
24
  delete: "delete";
25
25
  }>;
26
26
  }, _$zod_v4_core0.$strip>>;
@@ -153,8 +153,8 @@ declare const FsSubjects: _$_makaio_core0.BusSubjects<_$_makaio_core0.FlatSubjec
153
153
  changed: _$zod.ZodObject<{
154
154
  path: _$zod.ZodString;
155
155
  kind: _$zod.ZodEnum<{
156
- create: "create";
157
156
  change: "change";
157
+ create: "create";
158
158
  delete: "delete";
159
159
  }>;
160
160
  }, _$zod_v4_core0.$strip>;
@@ -162,8 +162,8 @@ declare const FsSubjects: _$_makaio_core0.BusSubjects<_$_makaio_core0.FlatSubjec
162
162
  changes: _$zod.ZodArray<_$zod.ZodObject<{
163
163
  path: _$zod.ZodString;
164
164
  kind: _$zod.ZodEnum<{
165
- create: "create";
166
165
  change: "change";
166
+ create: "create";
167
167
  delete: "delete";
168
168
  }>;
169
169
  }, _$zod_v4_core0.$strip>>;
@@ -294,8 +294,8 @@ declare const FileSystemSubjects: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
294
294
  changed: _$zod.ZodObject<{
295
295
  path: _$zod.ZodString;
296
296
  kind: _$zod.ZodEnum<{
297
- create: "create";
298
297
  change: "change";
298
+ create: "create";
299
299
  delete: "delete";
300
300
  }>;
301
301
  }, _$zod_v4_core0.$strip>;
@@ -303,8 +303,8 @@ declare const FileSystemSubjects: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fl
303
303
  changes: _$zod.ZodArray<_$zod.ZodObject<{
304
304
  path: _$zod.ZodString;
305
305
  kind: _$zod.ZodEnum<{
306
- create: "create";
307
306
  change: "change";
307
+ create: "create";
308
308
  delete: "delete";
309
309
  }>;
310
310
  }, _$zod_v4_core0.$strip>>;
@@ -5,8 +5,8 @@ import { z } from "zod";
5
5
  * File change kind.
6
6
  */
7
7
  declare const FsChangeKindSchema: z.ZodEnum<{
8
- create: "create";
9
8
  change: "change";
9
+ create: "create";
10
10
  delete: "delete";
11
11
  }>;
12
12
  type FsChangeKind = z.infer<typeof FsChangeKindSchema>;
@@ -16,8 +16,8 @@ type FsChangeKind = z.infer<typeof FsChangeKindSchema>;
16
16
  declare const FsChangedSchema: z.ZodObject<{
17
17
  path: z.ZodString;
18
18
  kind: z.ZodEnum<{
19
- create: "create";
20
19
  change: "change";
20
+ create: "create";
21
21
  delete: "delete";
22
22
  }>;
23
23
  }, z.core.$strip>;
@@ -29,8 +29,8 @@ declare const FsBatchSchema: z.ZodObject<{
29
29
  changes: z.ZodArray<z.ZodObject<{
30
30
  path: z.ZodString;
31
31
  kind: z.ZodEnum<{
32
- create: "create";
33
32
  change: "change";
33
+ create: "create";
34
34
  delete: "delete";
35
35
  }>;
36
36
  }, z.core.$strip>>;
@@ -20,11 +20,11 @@ import { C as SessionTurnManager, D as TurnPairStateChange, E as TurnContext, O
20
20
  import { a as activateProviderContext, c as RuntimeProviderContextResolutionErrorCode, l as resolveRuntimeProviderContext, n as ProviderContextActivationErrorCode, s as RuntimeProviderContextResolutionError, t as ProviderContextActivationError } from "../index-BBrLhtLK.mjs";
21
21
  import { i as SessionStorageSubjects, r as SessionStorageNamespace } from "../namespace-Dt7hJA-a.mjs";
22
22
  import { g as sessions, u as agents } from "../schema-C58MdqlI.mjs";
23
- import { n as SessionEventStorageSubjects, t as SessionEventStorageNamespace } from "../namespace-u4eoUCLp.mjs";
23
+ import { n as SessionEventStorageSubjects, t as SessionEventStorageNamespace } from "../namespace-DZooy1DW.mjs";
24
24
  import { t as TurnStorageNamespace } from "../namespace-CO9J3NB-2.mjs";
25
25
  import { n as TurnStorageSubjects } from "../namespace-D8pSI--d.mjs";
26
26
  import { i as MessageStorageSubjects, r as MessageStorageNamespace } from "../namespace-BG35KNtw.mjs";
27
- import { v as ArtifactSchemaRegistry } from "../packages-Fy4a6vQy.mjs";
27
+ import { v as ArtifactSchemaRegistry } from "../packages-g6BtlUF9.mjs";
28
28
  import { a as createToolContributionProcessor, c as ToolRegistryOptions, d as ToolsetPolicy, f as ToolsetPolicyProvider, l as ToolsWithToolsetsResult, o as ToolRegistry, s as ListToolsFilter, u as ToolsetInfo } from "../index-BS3GYAN9.mjs";
29
29
  import { a as WORKFLOW_START_ACTION_TYPE, i as TransitionActionRegistry, n as TransitionPipelineService, r as TransitionRuleRegistry, t as createTransitionContributionProcessor } from "../index-B-ZgZuHg.mjs";
30
30
  import { n as ToolApprovalServiceOptions, t as ToolApprovalService } from "../index-C5u82-qr.mjs";
@@ -35,7 +35,7 @@ import { C as ModelRegistrySchemas, S as ModelRegistrySchema, T as ProviderModel
35
35
  import { a as InternalPendingRequest, c as SubagentServiceToken, d as SubagentFailureFinalizationError, f as SubagentFailureFinalizationErrorCode, i as InputResolver, l as createSubagentServicePackage, n as TrackOptions, o as SpawnOptions, p as SubagentService, r as AwaitResult, s as TrackedSubagent, t as SubagentManager, u as subagentServicePackage } from "../index-yfLm_tCv.mjs";
36
36
  import { a as PreferenceValueSchema, i as PreferenceKeySchema, n as PreferenceItemSchema, o as PreferencesSchemas, r as PreferenceKey, t as PreferenceItem } from "../schemas-DrrpHMbF2.mjs";
37
37
  import { n as PreferencesSubjects, t as PreferencesNamespace } from "../storage-namespace-DoxNJ9Cg.mjs";
38
- 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-BQhtYuCM.mjs";
38
+ 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-Y3EJu698.mjs";
39
39
  import { n as SubagentTemplateSubjects, t as SubagentTemplateKernelNamespace } from "../namespace-CytKzWBF.mjs";
40
40
  import * as _$zod from "zod";
41
41
  import * as _$_makaio_core0 from "@makaio/framework/core";
@@ -5227,8 +5227,8 @@ declare const FrameworkServicesCoreNamespaces: readonly [_$_makaio_core0.BusName
5227
5227
  changed: _$zod.ZodObject<{
5228
5228
  path: _$zod.ZodString;
5229
5229
  kind: _$zod.ZodEnum<{
5230
- create: "create";
5231
5230
  change: "change";
5231
+ create: "create";
5232
5232
  delete: "delete";
5233
5233
  }>;
5234
5234
  }, _$zod_v4_core0.$strip>;
@@ -5236,8 +5236,8 @@ declare const FrameworkServicesCoreNamespaces: readonly [_$_makaio_core0.BusName
5236
5236
  changes: _$zod.ZodArray<_$zod.ZodObject<{
5237
5237
  path: _$zod.ZodString;
5238
5238
  kind: _$zod.ZodEnum<{
5239
- create: "create";
5240
5239
  change: "change";
5240
+ create: "create";
5241
5241
  delete: "delete";
5242
5242
  }>;
5243
5243
  }, _$zod_v4_core0.$strip>>;
@@ -7803,8 +7803,8 @@ declare const FrameworkServicesCoreNamespaces: readonly [_$_makaio_core0.BusName
7803
7803
  model: _$zod.ZodOptional<_$zod.ZodString>;
7804
7804
  systemPrompt: _$zod.ZodOptional<_$zod.ZodString>;
7805
7805
  contextMode: _$zod.ZodDefault<_$zod.ZodEnum<{
7806
- fork: "fork";
7807
7806
  fresh: "fresh";
7807
+ fork: "fork";
7808
7808
  }>>;
7809
7809
  allowedTools: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
7810
7810
  disallowedTools: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
@@ -7819,6 +7819,7 @@ declare const FrameworkServicesCoreNamespaces: readonly [_$_makaio_core0.BusName
7819
7819
  request: _$zod.ZodObject<{
7820
7820
  name: _$zod.ZodString;
7821
7821
  enabled: _$zod.ZodDefault<_$zod.ZodBoolean>;
7822
+ adapterName: _$zod.ZodString;
7822
7823
  providerConfigId: _$zod.ZodOptional<_$zod.ZodString>;
7823
7824
  model: _$zod.ZodOptional<_$zod.ZodString>;
7824
7825
  systemPrompt: _$zod.ZodOptional<_$zod.ZodString>;
@@ -7826,10 +7827,9 @@ declare const FrameworkServicesCoreNamespaces: readonly [_$_makaio_core0.BusName
7826
7827
  disallowedTools: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
7827
7828
  allowedDirectories: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
7828
7829
  contextMode: _$zod.ZodDefault<_$zod.ZodEnum<{
7829
- fork: "fork";
7830
7830
  fresh: "fresh";
7831
+ fork: "fork";
7831
7832
  }>>;
7832
- adapterName: _$zod.ZodString;
7833
7833
  }, _$zod_v4_core0.$strip>;
7834
7834
  response: _$zod.ZodObject<{
7835
7835
  id: _$zod.ZodString;
@@ -7844,8 +7844,8 @@ declare const FrameworkServicesCoreNamespaces: readonly [_$_makaio_core0.BusName
7844
7844
  model: _$zod.ZodOptional<_$zod.ZodOptional<_$zod.ZodString>>;
7845
7845
  systemPrompt: _$zod.ZodOptional<_$zod.ZodOptional<_$zod.ZodString>>;
7846
7846
  contextMode: _$zod.ZodOptional<_$zod.ZodDefault<_$zod.ZodEnum<{
7847
- fork: "fork";
7848
7847
  fresh: "fresh";
7848
+ fork: "fork";
7849
7849
  }>>>;
7850
7850
  allowedTools: _$zod.ZodOptional<_$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>>;
7851
7851
  disallowedTools: _$zod.ZodOptional<_$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>>;
@@ -1 +1 @@
1
- import{agents as e,sessions as t}from"./session/storage/schema.mjs";import{t as n}from"../schema-CdUStsjr.mjs";import{t as r}from"../schema-C0lK_6u-.mjs";import{n as i,r as a,t as o}from"../namespace-D-_gP6_l.mjs";import{$ as s,A as c,B as l,D as u,G as ee,H as te,K as ne,L as re,M as ie,O as ae,R as oe,Tt as se,U as ce,V as le,W as ue,Z as de,a as fe,b as pe,c as me,d as he,f as ge,i as _e,j as ve,k as ye,l as be,n as xe,nt as Se,o as Ce,r as we,s as Te,t as Ee,tt as De,wt as Oe,x as ke,z as Ae}from"../handlers-DmEPQqPX.mjs";import{TurnStorageNamespace as je,TurnStorageSubjects as Me}from"./turn/namespace.mjs";import{a as Ne,i as d}from"../ownership-recovery-guard-C00rcqvz.mjs";import{SessionStorageNamespace as f,SessionStorageSubjects as p}from"./session/storage/namespace.mjs";import{AdapterRuntimeSchemas as m,ResolveIdRequestSchema as h,ResolveIdResponseSchema as g,ResolveLiveIdentityRequestSchema as _,ResolveLiveIdentityResponseSchema as v,ResolveNameRequestSchema as y,ResolveNameResponseSchema as b}from"./adapter-runtime/schemas.mjs";import{AdapterRuntimeNamespace as x,AdapterRuntimeSubjects as Pe}from"./adapter-runtime/namespace.mjs";import{$ as Fe,A as Ie,B as Le,C as Re,E as ze,F as Be,G as Ve,H as He,I as Ue,J as We,K as Ge,L as Ke,M as qe,N as Je,P as Ye,R as Xe,S as Ze,T as Qe,U as $e,V as et,X as tt,Y as S,Z as nt,a as rt,b as it,c as at,et as ot,i as st,j as ct,k as lt,l as ut,nt as dt,o as ft,r as pt,rt as mt,s as ht,t as gt,tt as _t,w as vt,x as yt,z as bt}from"../session-BjV4HPCQ.mjs";import{n as xt}from"../namespace-DaFbUCqO.mjs";import{ProviderStorageNamespace as St}from"./settings/storage/providers-namespace.mjs";import{A as Ct,E as wt,M as Tt,N as Et,O as Dt,S as Ot,T as kt,_ as At,a as jt,b as Mt,c as Nt,i as Pt,j as Ft,k as It,l as Lt,n as Rt,o as zt,r as Bt,s as Vt,t as Ht,v as Ut,w as Wt,x as Gt,y as Kt}from"../schemas-D9hVAoP5.mjs";import{ExecutionTargetNamespace as C,ExecutionTargetSubjects as qt}from"./execution-target/namespace.mjs";import{MessageStorageNamespace as Jt,MessageStorageSubjects as Yt}from"./session/messages/namespace.mjs";import{a as Xt,o as Zt,r as Qt,t as $t}from"../provider-context-DHS1LRQA.mjs";import{TurnStorageNamespace as en}from"./session/turns/namespace.mjs";import{i as tn,n as nn,r as rn,t as an}from"../identity-DBdzjf61.mjs";import{BugEntrySchema as on,CompressRequestSchema as sn,CompressResponseSchema as cn,CompressionEventSchema as ln,CompressionSchemas as un,ExtractedContextSchema as dn,TechnicalDetailsSchema as fn,TodoEntrySchema as pn}from"./compression/schemas.mjs";import{PreferenceItemSchema as mn,PreferenceKeySchema as hn,PreferenceValueSchema as gn,PreferencesSchemas as _n}from"./preferences/schemas.mjs";import{PreferencesNamespace as w,PreferencesSubjects as vn}from"./preferences/storage-namespace.mjs";import{t as yn}from"../namespace-BWTEnslo.mjs";import{l as bn,n as xn,p as Sn,r as Cn,t as wn}from"../ownership-memory-handler-BkB4ondL.mjs";import{_ as Tn,g as T,v as En}from"../packages-CZ2x-Ver.mjs";import{A as Dn,B as On,C as kn,D as An,E as jn,F as Mn,H as Nn,I as Pn,L as Fn,M as In,N as E,O as Ln,P as Rn,R as zn,S as Bn,T as Vn,V as Hn,_ as Un,a as Wn,b as Gn,c as D,d as Kn,f as O,g as qn,h as Jn,i as Yn,j as Xn,k as Zn,l as Qn,m as $n,n as k,o as er,p as tr,r as nr,s as rr,t as A,u as ir,v as ar,w as or,x as sr,y as cr,z as lr}from"../framework-packages-blqho6Nk.mjs";import{n as ur,r as dr,t as fr}from"../package-B6mFblgK.mjs";import{a as pr,c as mr,i as hr,l as gr,n as _r,o as j,r as vr,s as yr,t as br,u as xr}from"../model-registry-BJbUh4uw.mjs";import{t as Sr}from"../tool-approval-service-Bc0IC6Hj.mjs";import{TrayMenuEntrySchema as Cr,TrayMenuGroupEntrySchema as wr,TrayMenuGroupSchema as Tr,TrayMenuItemClickedSchema as Er,TrayMenuListEntrySchema as Dr,TrayMenuMetadataSchema as Or,TrayMenuSchemas as kr,TrayMenuSectionSchema as Ar}from"./tray-menu/schemas.mjs";import{TrayMenuNamespace as M,TrayMenuSubjects as jr}from"./tray-menu/namespace.mjs";import{t as Mr}from"../tray-menu-service-DGhHTNyy.mjs";import{n as Nr}from"../handler-BY2DDdyI.mjs";import{a as Pr,i as Fr,n as Ir,o as Lr,r as Rr,t as zr}from"../package-C_PVR-xw.mjs";import{FsNamespace as Br}from"./filesystem/namespace.mjs";import{r as Vr}from"../tools-Cbuj-ClQ.mjs";import{t as Hr}from"../workflow-transitions-CvT6P03B.mjs";import"./capability/index.mjs";import{a as Ur,i as Wr,n as Gr,r as Kr,t as qr}from"../code-execution-Bdqurit9.mjs";import"./tool-approval/index.mjs";import"./tray-menu/index.mjs";import"./subagent/index.mjs";import{AgentInstanceStatusSchema as Jr,AgentRuntimeSchemas as Yr,AgentRuntimeSelectionSchema as Xr}from"./agent-runtime/schemas.mjs";import{AgentRuntimeNamespace as N,AgentRuntimeSubjects as Zr}from"./agent-runtime/namespace.mjs";import{CodebaseChangedEventSchema as Qr,CodebaseSchemas as $r}from"./codebase/schemas.mjs";import{CodebaseNamespace as P,CodebaseSubjects as ei}from"./codebase/namespace.mjs";import{CompressionNamespace as F,CompressionSubjects as ti}from"./compression/namespace.mjs";import{r as ni,t as ri}from"../storage-namespace-CYZOP3RS.mjs";import{DefinitionNamespace as ii}from"./definition/namespace.mjs";import{DialogNamespace as ai}from"./dialog/namespace.mjs";import{a as oi,i as I,n as si,t as ci}from"../execution-target-BumuKpUR.mjs";import{CLIDetectionNamespace as li}from"./cli-detection/namespace.mjs";import{LocalNotificationNamespace as ui}from"./local-notification/namespace.mjs";import{t as di}from"../namespace-D1tJewLB.mjs";import{ExtensionConfigStorageNamespace as fi}from"./settings/storage/extension-configs/namespace.mjs";import{ClientStorageNamespace as pi}from"./settings/storage/clients-namespace.mjs";import{SubagentTemplateCompletedEventSchema as mi,SubagentTemplateCreateSchema as hi,SubagentTemplateInstanceSchema as gi,SubagentTemplateInstanceStatusSchema as _i,SubagentTemplateKernelSchemas as vi,SubagentTemplateSchema as yi,SubagentTemplateSettingsSchemas as bi,SubagentTemplateSpawnRequestSchema as xi,SubagentTemplateSpawnedEventSchema as Si,SubagentTemplateSummarySchema as Ci,SubagentTemplateUpdateSchema as wi}from"./subagent-template/schemas.mjs";import{r as Ti,t as Ei}from"../namespace-BG-DwVwA.mjs";import{SubagentTemplateKernelNamespace as L,SubagentTemplateSubjects as Di}from"./subagent-template/namespace.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 R}from"@makaio/framework/contracts";import{ImportCursorStorageNamespace as Oi}from"@makaio/framework/adapters";import{artifactRevisionKey as z}from"@makaio/framework/contracts/artifact";import{ModelRegistryPublicNamespace as ki}from"@makaio/framework/contracts/model-registry";function Ai(e){return{source:`extension`,ownerKey:`extension:${e}`}}function ji(e,t){for(let n of e.values())if(n.registry===t)for(let e of n.registrations)t.registerKind(e,n.owner)}function Mi(){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)}ji(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=Ai(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 Ni(e,t,n){return{...n,filter:{...n.filter,kind:e,schemaVersion:t}}}function Pi(){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(A);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(Ni(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)}}}}function B(e,t){return{sourceRef:e.sourceRef,target:e.target,relationType:e.relationType,sourceLocalId:e.sourceLocalId,...e.direction?{direction:e.direction}:{},hint:e.selector?.hint??`link`,...t}}function V(e,t,n){let r=Ri(t),i=e.refIndexByKey.get(r);if(i===void 0){e.refIndexByKey.set(r,e.refs.length),G(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(!Fi(a,Li(e,r)))return;W(e,i,r,t,n);return}if(a.status===`unresolved`&&a.reason===`depth-exceeded`){if(t.status===`resolved`&&q(n)||t.status===`unresolved`&&!H(t.reason,a.reason))return;W(e,i,r,t,n);return}if(t.status===`unresolved`&&a.status===`unresolved`){H(t.reason,a.reason)&&W(e,i,r,t,n);return}if(t.status===`resolved`&&a.status===`unresolved`){W(e,i,r,t,n);return}t.status===`resolved`&&!q(n)&&K(e,r,n)}}function Fi(e,t){return e.status===`resolved`?t:H(`depth-exceeded`,e.reason)}function H(e,t){return U(e)>U(t)}function U(e){return e===`not-selected`?0:e===`depth-exceeded`?1:2}function W(e,t,n,r,i){G(e,n,r,i),e.refs[t]=r}function G(e,t,n,r){if(n.status===`resolved`){K(e,t,r);return}Ii(e,t)}function K(e,t,n){e.refMetadataByKey.set(t,n??{resolvedViaBackEdge:!1})}function Ii(e,t){e.refMetadataByKey.delete(t)}function Li(e,t){return q(e.refMetadataByKey.get(t))}function q(e){return e?.resolvedViaBackEdge===!0}function Ri(e){return JSON.stringify([z(e.sourceRef),e.sourceLocalId??null,e.relationType,e.direction??`outbound`,zi(e.target)])}function zi(e){return e.refClass===`entity`?JSON.stringify([`entity`,e.entityType,e.id]):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])}async function Bi(e){let t=e.maxDepth??5,n={bus:e.bus,maxDepth:t,resolvedByKey:new Map,walkedByKey:new Set,inboundByKey:new Map,refIndexByKey:new Map,refMetadataByKey:new Map,resolved:[],refs:[]},r=await X(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 J(n,r,e.selectors,0,new Set([z(e.ref)])),{rootRef:e.ref,refs:n.refs,resolved:n.resolved}}async function J(e,t,n,r,i){let a=qi(t,n,r,i);if(e.walkedByKey.has(a))return;e.walkedByKey.add(a);let o=Q(t);for(let a of t.relations)await Vi(e,o,a,n,r,i);for(let[t,a]of Object.entries(n??{}))a.direction===`inbound`&&await Hi(e,o,t,a,r,i)}async function Vi(e,t,n,r,i,a){let o=r?.[n.type];if(o?.hint===`omit`)return;let s=o?.direction===`inbound`?void 0:o,{target:c}=n,l={sourceRef:t,relationType:n.type,sourceLocalId:n.sourceLocalId,selector:s};if(c.refClass!==`artifact`){let t=Z(s,c)?`unsupported-ref-class`:`not-selected`;V(e,B({...l,target:c},{status:`unresolved`,reason:t}));return}await Y(e,{...l,target:c,load:()=>X(e,c)},i,a)}async function Hi(e,t,n,r,i,a){if(r.hint===`omit`)return;let o=JSON.stringify([n,t.kind,t.id]),s=e.inboundByKey.get(o);if(!s){let{artifacts:r}=await e.bus.request(R.query,{relation:{type:n,target:{refClass:`artifact`,kind:t.kind,id:t.id}},currentOnly:!0});s=r,e.inboundByKey.set(o,s)}for(let o of s){let s=Q(o);for(let c of o.relations)c.type!==n||!Gi(c.target,t)||await Y(e,{sourceRef:t,target:s,relationType:n,sourceLocalId:c.sourceLocalId,direction:`inbound`,selector:r,load:()=>X(e,s,async()=>o)},i,a)}}async function Y(e,t,n,r){let{selector:i,target:a}=t;if(!Z(i,a)){V(e,B(t,{status:`unresolved`,reason:`not-selected`}));return}let o=z(a),s=r.has(o);if(n>=e.maxDepth&&!s){V(e,B(t,{status:`unresolved`,reason:`depth-exceeded`}));return}let c=e.resolvedByKey.has(o),l=await t.load();if(!l){V(e,B(t,{status:`unresolved`,reason:`not-found`}));return}V(e,B(t,{status:`resolved`}),{resolvedViaBackEdge:s}),c||e.resolved.push(l),!s&&await Ui(e,l,o,t.relationType,i,n,r)}async function Ui(e,t,n,r,i,a,o){let s=(i.depth??1)-1;await J(e,t,Wi(s>0?{[r]:{...i,depth:s}}:void 0,i.nested),a+1,new Set([...o,n]))}async function X(e,t,n=async()=>(await e.bus.request(R.resolve,{ref:t})).artifact){let r=z(t);if(e.resolvedByKey.has(r))return e.resolvedByKey.get(r)??null;let i=await n();return e.resolvedByKey.set(r,i),i}function Wi(e,t){return!t||!e?t??e:{...e,...t}}function Z(e,t){if(!e)return!1;if(!e.kinds)return!0;let n=Ki(t);return n!==void 0&&e.kinds.includes(n)}function Gi(e,t){return e.refClass===`artifact`&&e.kind===t.kind&&e.id===t.id}function Ki(e){if(e.refClass!==`entity`)return e.refClass===`local`?e.artifact.kind:e.kind}function Q(e){return{refClass:`artifact`,kind:e.kind,id:e.id,revision:e.revision}}function qi(e,t,n,r){return JSON.stringify([e.kind,e.id,e.revision,n,t??null,[...r].sort()])}function $(e,t){for(let n of e.values())if(n.registry===t)for(let e of n.registrations)t.registerNamespace(e)}function Ji(){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)}$(e,n.registry)}};return{filter:e=>(e.facetNamespaces?.namespaces?.length??0)>0,async processActivated(r,i,a){let o=a.getService(k);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 $(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 Yi(){let e=new Map;return{filter:e=>!!e.workflowBlocks?.blocks,async processActivated(t,n,r){let i=r.getService(O);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 Xi(e){let t=new Map,n=e=>{let n=t.get(e);n&&(t.delete(e),n())},r=async(e,n,r)=>{let i=n.reactions;if(!i)return;let a=r.getService(E);if(!a)throw Error(`ReactionRegistry is not available — ensure reaction-registry is started before extensions with reactions.`);let o=await i.createReactions(r);a.register(e,o),t.set(e,()=>a.deregister(e))};return{filter:e=>e.name===E.name||!!e.reactions,async processActivated(n,i,a){if(n===E.name){let n=[];e.forEachActiveExtension((e,t,r)=>{t.reactions&&n.push([e,t,r])});try{for(let[e,t,i]of n)await r(e,t,i)}catch(e){throw t.clear(),e}return}await r(n,i,a)},async processStopped(e){if(e===E.name){t.clear();return}try{n(e)}catch(t){console.error(`[ReactionContributionProcessor] Deregister error for "${e}":`,t)}}}}const Zi=[x,xt,N,d,li,pi,P,F,ni,ri,ii,ai,I,C,fi,Br,Nr,Oi,ui,S,j,ki,w,di,St,yn,Ei,M,je,L,Ti];export{an as AdapterIdentityRegistry,_t as AdapterRegistry,x as AdapterRuntimeNamespace,m as AdapterRuntimeSchemas,Pe as AdapterRuntimeSubjects,Jr as AgentInstanceStatusSchema,N as AgentRuntimeNamespace,Yr as AgentRuntimeSchemas,Xr as AgentRuntimeSelectionSchema,Zr as AgentRuntimeSubjects,d as AgentStorageNamespace,Ne as AgentStorageSubjects,Hn as ArtifactLifecycleHookRegistry,A as ArtifactLifecycleHookRegistryToken,Nn as ArtifactLifecycleHookRejectedError,En as ArtifactSchemaRegistry,T as ArtifactSchemaRegistryToken,on as BugEntrySchema,Xe as CONNECTOR_SWAP_DEFAULT_PIPELINE,br as CachedRegistryFetcher,lr as CanonicalModelResolutionError,zn as CanonicalModelResolver,Fn as CanonicalModelService,dr as CapabilityService,fr as CapabilityToken,Kr as CodeExecutionService,qr as CodeExecutionServiceToken,Qr as CodebaseChangedEventSchema,P as CodebaseNamespace,$r as CodebaseSchemas,ei as CodebaseSubjects,sn as CompressRequestSchema,cn as CompressResponseSchema,ln as CompressionEventSchema,F as CompressionNamespace,un as CompressionSchemas,ti as CompressionSubjects,At as ContainerCreatedSchema,Ut as ContainerDestroyedSchema,Ht as ContainerIsolatedExecutionTargetSchema,Kt as ContainerIsolatedSpawnRequestSchema,Rt as ContainerLocalExecutionTargetSchema,Mt as ContainerLocalSpawnRequestSchema,Gt as ContainerLocalWorkflowSpawnRequestSchema,Ot as ContainerRuntimeSchema,ci as ContainerSpawnNamespace,si as ContainerSpawnSubjects,Wt as ContainerStartedSchema,kt as ContainerStateSchema,wt as ContainerStoppedSchema,gt as ContextWindowTracker,I as DockerNamespace,oi as DockerSubjects,ht as EmbeddingIndexManager,Bt as ExecutionTargetInputSchema,Pt as ExecutionTargetListQuerySchema,C as ExecutionTargetNamespace,jt as ExecutionTargetResolveRequestSchema,zt as ExecutionTargetSchema,Vt as ExecutionTargetSchemas,qt as ExecutionTargetSubjects,Nt as ExecutionTargetTypeSchema,dn as ExtractedContextSchema,On as FacetNamespaceRegistry,k as FacetNamespaceRegistryToken,_r as FallbackRegistryFetcher,Zi as FrameworkServicesCoreNamespaces,Lt as LocalExecutionTargetSchema,ft as MakaioSession,dt as MakaioSessionService,S as MessageRoutingNamespace,tt as MessageRoutingSubjects,Jt as MessageStorageNamespace,Yt as MessageStorageSubjects,j as ModelRegistryNamespace,vr as ModelRegistryProviderNotFoundError,mr as ModelRegistrySchema,gr as ModelRegistrySchemas,hr as ModelRegistryService,yr as ModelRegistrySubjects,nr as ModelRegistryToken,mn as PreferenceItemSchema,hn as PreferenceKeySchema,gn as PreferenceValueSchema,w as PreferencesNamespace,_n as PreferencesSchemas,vn as PreferencesSubjects,$t as ProviderContextActivationError,xr as ProviderModelOverrideSchema,Mn as ReactionRegistry,E as ReactionRegistryToken,h as ResolveIdRequestSchema,g as ResolveIdResponseSchema,_ as ResolveLiveIdentityRequestSchema,v as ResolveLiveIdentityResponseSchema,y as ResolveNameRequestSchema,b as ResolveNameResponseSchema,Xt as RuntimeProviderContextResolutionError,Ue as SessionBridge,Yn as SessionBridgeToken,o as SessionEventStorageNamespace,i as SessionEventStorageSubjects,Ye as SessionExtensionContextImpl,$e as SessionOrchestrator,Wn as SessionOrchestratorToken,de as SessionStartError,f as SessionStorageNamespace,p as SessionStorageSubjects,er as SessionStorageToken,rr as SessionToken,Ve as SessionTurnManager,Dt as SpawnRequestSchema,It as SpawnResponseSchema,Ct as StatusRequestSchema,Ft as StatusResponseSchema,Tt as StopRequestSchema,Et as StopResponseSchema,Fr as SubagentFailureFinalizationError,Lr as SubagentManager,Pr as SubagentService,zr as SubagentServiceToken,mi as SubagentTemplateCompletedEventSchema,hi as SubagentTemplateCreateSchema,gi as SubagentTemplateInstanceSchema,_i as SubagentTemplateInstanceStatusSchema,L as SubagentTemplateKernelNamespace,vi as SubagentTemplateKernelSchemas,yi as SubagentTemplateSchema,bi as SubagentTemplateSettingsSchemas,xi as SubagentTemplateSpawnRequestSchema,Si as SubagentTemplateSpawnedEventSchema,Di as SubagentTemplateSubjects,Ci as SubagentTemplateSummarySchema,wi as SubagentTemplateUpdateSchema,fn as TechnicalDetailsSchema,pn as TodoEntrySchema,Sr as ToolApprovalService,D as ToolApprovalToken,In as ToolRegistry,Qn as ToolRegistryToken,Zn as TransitionActionRegistry,An as TransitionPipelineService,ir as TransitionPipelineToken,Ln as TransitionRuleRegistry,Cr as TrayMenuEntrySchema,wr as TrayMenuGroupEntrySchema,Tr as TrayMenuGroupSchema,Er as TrayMenuItemClickedSchema,Dr as TrayMenuListEntrySchema,Or as TrayMenuMetadataSchema,M as TrayMenuNamespace,kr as TrayMenuSchemas,Ar as TrayMenuSectionSchema,Mr as TrayMenuService,jr as TrayMenuSubjects,Kn as TrayMenuToken,Ge as Turn,He as TurnContextEnricher,en as TurnStorageNamespace,Me as TurnStorageSubjects,Dn as WORKFLOW_START_ACTION_TYPE,Xn as WorkflowBlockRegistry,O as WorkflowBlockRegistryToken,Ae as actionRegistry,Qt as activateProviderContext,e as agents,tr as artifactLifecycleHookRegistryPackage,Tn as artifactSchemaRegistryPackage,xe as assembleForkContext,nn as buildDeterministicAdapterId,re as buildRecoveryContext,ae as buildRecoveryContextWithPipeline,l as buildSessionContext,le as buildTurnInitiator,Pn as canonicalModelPackage,ur as capabilityPackage,Gr as codeExecutionPackage,Mi as createArtifactKindContributionProcessor,Pi as createArtifactLifecycleHookContributionProcessor,Ur as createEffectiveExecutionSignal,Ji as createFacetNamespaceContributionProcessor,$n as createFrameworkCorePackages,Jn as createModelRegistryPackage,Xi as createReactionContributionProcessor,Be as createSessionExtensionContext,Sn as createSessionStorageMemoryState,Ir as createSubagentServicePackage,Vr as createToolContributionProcessor,Hr as createTransitionContributionProcessor,Yi as createWorkflowBlockContributionProcessor,ye as ensureAgentCwd,c as ensureAgentModel,ee as extractTextContent,qn as facetNamespaceRegistryPackage,yt as fetchAgentsBySession,Ze as fetchMessageCountsBySession,Re as fetchPreviewBySession,Ie as fetchSessionPreviewMaps,te as findTurnByAgent,Un as frameworkCorePackages,oe as getFullConversation,ce as getOrCreateSession,ut as importCursors,bn as kindToBranchKind,ct as mapAgentsBySession,vt as mapRowToSession,qe as mapToSession,pr as mergeModelMetadata,nt as messageRouting,r as messages,he as normalizeSelectionString,ne as normalizeToBlocks,Qe as parseForkTransforms,Ke as pickFallbackRuntimeOptions,Rn as reactionRegistryPackage,ve as recoverAgent,me as registerAbandonHandler,rn as registerAdapterRuntimeIdentityHandlers,be as registerAttachHandler,Ce as registerBuiltInActions,fe as registerCompressHandler,st as registerCompressLineageResolver,mt as registerCoreSessionServiceHandlers,Je as registerDrizzleAgentStorage,at as registerDrizzleImportCursorStorage,We as registerDrizzleMessageRoutingStorage,ot as registerDrizzleMessageStorage,Oe as registerDrizzleSessionEventStorage,ze as registerDrizzleSessionOwnershipStorage,lt as registerDrizzleSessionStorage,ke as registerDrizzleTurnStorage,_e as registerForkHandler,it as registerFtsSearchHandler,Le as registerGetStatusCountsHandler,bt as registerListActionsHandler,xn as registerMemoryAgentStorage,Fe as registerMemoryMessageStorage,se as registerMemorySessionEventStorage,wn as registerMemorySessionOwnershipStorage,Cn as registerMemorySessionStorage,pe as registerMemoryTurnStorage,we as registerMergeHandler,rt as registerParentResolver,et as registerResumeHandler,pt as registerSpawningToolCallResolver,Te as resetBuiltInActionsRegistration,s as resolveAdapterId,ge as resolveAdapterNameById,Bi as resolveArtifactContext,tn as resolveDeterministicAdapterId,De as resolveExecutionTarget,Se as resolveModelCapabilities,Zt as resolveRuntimeProviderContext,ue as resolveTargetAgents,Ee as routeToAgents,u as routeToAgentsCore,Wr as selectCodeExecutionProvider,ar as sessionBridgePackage,a as sessionEvents,cr as sessionOrchestratorPackage,Gn as sessionPackage,sr as sessionStoragePackage,t as sessions,Rr as subagentServicePackage,Bn as toolApprovalPackage,kn as toolRegistryPackage,or as transitionPipelinePackage,Vn as trayMenuPackage,n as turns,ie as verifyAndRecoverAgents,jn as workflowBlockRegistryPackage};
1
+ import{agents as e,sessions as t}from"./session/storage/schema.mjs";import{t as n}from"../schema-CdUStsjr.mjs";import{t as r}from"../schema-C0lK_6u-.mjs";import{n as i,r as a,t as o}from"../namespace-D-_gP6_l.mjs";import{$ as s,A as c,B as l,D as u,G as ee,H as te,K as ne,L as re,M as ie,O as ae,R as oe,Tt as se,U as ce,V as le,W as ue,Z as de,a as fe,b as pe,c as me,d as he,f as ge,i as _e,j as ve,k as ye,l as be,n as xe,nt as Se,o as Ce,r as we,s as Te,t as Ee,tt as De,wt as Oe,x as ke,z as Ae}from"../handlers-DmEPQqPX.mjs";import{TurnStorageNamespace as je,TurnStorageSubjects as Me}from"./turn/namespace.mjs";import{a as Ne,i as d}from"../ownership-recovery-guard-C00rcqvz.mjs";import{SessionStorageNamespace as f,SessionStorageSubjects as p}from"./session/storage/namespace.mjs";import{AdapterRuntimeSchemas as m,ResolveIdRequestSchema as h,ResolveIdResponseSchema as g,ResolveLiveIdentityRequestSchema as _,ResolveLiveIdentityResponseSchema as v,ResolveNameRequestSchema as y,ResolveNameResponseSchema as b}from"./adapter-runtime/schemas.mjs";import{AdapterRuntimeNamespace as x,AdapterRuntimeSubjects as Pe}from"./adapter-runtime/namespace.mjs";import{$ as Fe,A as Ie,B as Le,C as Re,E as ze,F as Be,G as Ve,H as He,I as Ue,J as We,K as Ge,L as Ke,M as qe,N as Je,P as Ye,R as Xe,S as Ze,T as Qe,U as $e,V as et,X as tt,Y as S,Z as nt,a as rt,b as it,c as at,et as ot,i as st,j as ct,k as lt,l as ut,nt as dt,o as ft,r as pt,rt as mt,s as ht,t as gt,tt as _t,w as vt,x as yt,z as bt}from"../session-BjV4HPCQ.mjs";import{n as xt}from"../namespace-DaFbUCqO.mjs";import{ProviderStorageNamespace as St}from"./settings/storage/providers-namespace.mjs";import{A as Ct,E as wt,M as Tt,N as Et,O as Dt,S as Ot,T as kt,_ as At,a as jt,b as Mt,c as Nt,i as Pt,j as Ft,k as It,l as Lt,n as Rt,o as zt,r as Bt,s as Vt,t as Ht,v as Ut,w as Wt,x as Gt,y as Kt}from"../schemas-D9hVAoP5.mjs";import{ExecutionTargetNamespace as C,ExecutionTargetSubjects as qt}from"./execution-target/namespace.mjs";import{MessageStorageNamespace as Jt,MessageStorageSubjects as Yt}from"./session/messages/namespace.mjs";import{a as Xt,o as Zt,r as Qt,t as $t}from"../provider-context-DHS1LRQA.mjs";import{TurnStorageNamespace as en}from"./session/turns/namespace.mjs";import{i as tn,n as nn,r as rn,t as an}from"../identity-DBdzjf61.mjs";import{BugEntrySchema as on,CompressRequestSchema as sn,CompressResponseSchema as cn,CompressionEventSchema as ln,CompressionSchemas as un,ExtractedContextSchema as dn,TechnicalDetailsSchema as fn,TodoEntrySchema as pn}from"./compression/schemas.mjs";import{PreferenceItemSchema as mn,PreferenceKeySchema as hn,PreferenceValueSchema as gn,PreferencesSchemas as _n}from"./preferences/schemas.mjs";import{PreferencesNamespace as w,PreferencesSubjects as vn}from"./preferences/storage-namespace.mjs";import{t as yn}from"../namespace-BWTEnslo.mjs";import{l as bn,n as xn,p as Sn,r as Cn,t as wn}from"../ownership-memory-handler-BkB4ondL.mjs";import{_ as Tn,g as T,v as En}from"../packages-BOM7wECe.mjs";import{A as Dn,B as On,C as kn,D as An,E as jn,F as Mn,H as Nn,I as Pn,L as Fn,M as In,N as E,O as Ln,P as Rn,R as zn,S as Bn,T as Vn,V as Hn,_ as Un,a as Wn,b as Gn,c as D,d as Kn,f as O,g as qn,h as Jn,i as Yn,j as Xn,k as Zn,l as Qn,m as $n,n as k,o as er,p as tr,r as nr,s as rr,t as A,u as ir,v as ar,w as or,x as sr,y as cr,z as lr}from"../framework-packages-CdpSqDeo.mjs";import{n as ur,r as dr,t as fr}from"../package-B6mFblgK.mjs";import{a as pr,c as mr,i as hr,l as gr,n as _r,o as j,r as vr,s as yr,t as br,u as xr}from"../model-registry-BJbUh4uw.mjs";import{t as Sr}from"../tool-approval-service-Bc0IC6Hj.mjs";import{TrayMenuEntrySchema as Cr,TrayMenuGroupEntrySchema as wr,TrayMenuGroupSchema as Tr,TrayMenuItemClickedSchema as Er,TrayMenuListEntrySchema as Dr,TrayMenuMetadataSchema as Or,TrayMenuSchemas as kr,TrayMenuSectionSchema as Ar}from"./tray-menu/schemas.mjs";import{TrayMenuNamespace as M,TrayMenuSubjects as jr}from"./tray-menu/namespace.mjs";import{t as Mr}from"../tray-menu-service-DGhHTNyy.mjs";import{n as Nr}from"../handler-BY2DDdyI.mjs";import{a as Pr,i as Fr,n as Ir,o as Lr,r as Rr,t as zr}from"../package-C_PVR-xw.mjs";import{FsNamespace as Br}from"./filesystem/namespace.mjs";import{r as Vr}from"../tools-EK2HiPee.mjs";import{t as Hr}from"../workflow-transitions-ztq90FUj.mjs";import"./capability/index.mjs";import{a as Ur,i as Wr,n as Gr,r as Kr,t as qr}from"../code-execution-Bdqurit9.mjs";import"./tool-approval/index.mjs";import"./tray-menu/index.mjs";import"./subagent/index.mjs";import{AgentInstanceStatusSchema as Jr,AgentRuntimeSchemas as Yr,AgentRuntimeSelectionSchema as Xr}from"./agent-runtime/schemas.mjs";import{AgentRuntimeNamespace as N,AgentRuntimeSubjects as Zr}from"./agent-runtime/namespace.mjs";import{CodebaseChangedEventSchema as Qr,CodebaseSchemas as $r}from"./codebase/schemas.mjs";import{CodebaseNamespace as P,CodebaseSubjects as ei}from"./codebase/namespace.mjs";import{CompressionNamespace as F,CompressionSubjects as ti}from"./compression/namespace.mjs";import{r as ni,t as ri}from"../storage-namespace-CYZOP3RS.mjs";import{DefinitionNamespace as ii}from"./definition/namespace.mjs";import{DialogNamespace as ai}from"./dialog/namespace.mjs";import{a as oi,i as I,n as si,t as ci}from"../execution-target-BumuKpUR.mjs";import{CLIDetectionNamespace as li}from"./cli-detection/namespace.mjs";import{LocalNotificationNamespace as ui}from"./local-notification/namespace.mjs";import{t as di}from"../namespace-D1tJewLB.mjs";import{ExtensionConfigStorageNamespace as fi}from"./settings/storage/extension-configs/namespace.mjs";import{ClientStorageNamespace as pi}from"./settings/storage/clients-namespace.mjs";import{SubagentTemplateCompletedEventSchema as mi,SubagentTemplateCreateSchema as hi,SubagentTemplateInstanceSchema as gi,SubagentTemplateInstanceStatusSchema as _i,SubagentTemplateKernelSchemas as vi,SubagentTemplateSchema as yi,SubagentTemplateSettingsSchemas as bi,SubagentTemplateSpawnRequestSchema as xi,SubagentTemplateSpawnedEventSchema as Si,SubagentTemplateSummarySchema as Ci,SubagentTemplateUpdateSchema as wi}from"./subagent-template/schemas.mjs";import{r as Ti,t as Ei}from"../namespace-BG-DwVwA.mjs";import{SubagentTemplateKernelNamespace as L,SubagentTemplateSubjects as Di}from"./subagent-template/namespace.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 R}from"@makaio/framework/contracts";import{ImportCursorStorageNamespace as Oi}from"@makaio/framework/adapters";import{artifactRevisionKey as z}from"@makaio/framework/contracts/artifact";import{ModelRegistryPublicNamespace as ki}from"@makaio/framework/contracts/model-registry";function Ai(e){return{source:`extension`,ownerKey:`extension:${e}`}}function ji(e,t){for(let n of e.values())if(n.registry===t)for(let e of n.registrations)t.registerKind(e,n.owner)}function Mi(){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)}ji(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=Ai(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 Ni(e,t,n){return{...n,filter:{...n.filter,kind:e,schemaVersion:t}}}function Pi(){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(A);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(Ni(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)}}}}function B(e,t){return{sourceRef:e.sourceRef,target:e.target,relationType:e.relationType,sourceLocalId:e.sourceLocalId,...e.direction?{direction:e.direction}:{},hint:e.selector?.hint??`link`,...t}}function V(e,t,n){let r=Ri(t),i=e.refIndexByKey.get(r);if(i===void 0){e.refIndexByKey.set(r,e.refs.length),G(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(!Fi(a,Li(e,r)))return;W(e,i,r,t,n);return}if(a.status===`unresolved`&&a.reason===`depth-exceeded`){if(t.status===`resolved`&&q(n)||t.status===`unresolved`&&!H(t.reason,a.reason))return;W(e,i,r,t,n);return}if(t.status===`unresolved`&&a.status===`unresolved`){H(t.reason,a.reason)&&W(e,i,r,t,n);return}if(t.status===`resolved`&&a.status===`unresolved`){W(e,i,r,t,n);return}t.status===`resolved`&&!q(n)&&K(e,r,n)}}function Fi(e,t){return e.status===`resolved`?t:H(`depth-exceeded`,e.reason)}function H(e,t){return U(e)>U(t)}function U(e){return e===`not-selected`?0:e===`depth-exceeded`?1:2}function W(e,t,n,r,i){G(e,n,r,i),e.refs[t]=r}function G(e,t,n,r){if(n.status===`resolved`){K(e,t,r);return}Ii(e,t)}function K(e,t,n){e.refMetadataByKey.set(t,n??{resolvedViaBackEdge:!1})}function Ii(e,t){e.refMetadataByKey.delete(t)}function Li(e,t){return q(e.refMetadataByKey.get(t))}function q(e){return e?.resolvedViaBackEdge===!0}function Ri(e){return JSON.stringify([z(e.sourceRef),e.sourceLocalId??null,e.relationType,e.direction??`outbound`,zi(e.target)])}function zi(e){return e.refClass===`entity`?JSON.stringify([`entity`,e.entityType,e.id]):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])}async function Bi(e){let t=e.maxDepth??5,n={bus:e.bus,maxDepth:t,resolvedByKey:new Map,walkedByKey:new Set,inboundByKey:new Map,refIndexByKey:new Map,refMetadataByKey:new Map,resolved:[],refs:[]},r=await X(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 J(n,r,e.selectors,0,new Set([z(e.ref)])),{rootRef:e.ref,refs:n.refs,resolved:n.resolved}}async function J(e,t,n,r,i){let a=qi(t,n,r,i);if(e.walkedByKey.has(a))return;e.walkedByKey.add(a);let o=Q(t);for(let a of t.relations)await Vi(e,o,a,n,r,i);for(let[t,a]of Object.entries(n??{}))a.direction===`inbound`&&await Hi(e,o,t,a,r,i)}async function Vi(e,t,n,r,i,a){let o=r?.[n.type];if(o?.hint===`omit`)return;let s=o?.direction===`inbound`?void 0:o,{target:c}=n,l={sourceRef:t,relationType:n.type,sourceLocalId:n.sourceLocalId,selector:s};if(c.refClass!==`artifact`){let t=Z(s,c)?`unsupported-ref-class`:`not-selected`;V(e,B({...l,target:c},{status:`unresolved`,reason:t}));return}await Y(e,{...l,target:c,load:()=>X(e,c)},i,a)}async function Hi(e,t,n,r,i,a){if(r.hint===`omit`)return;let o=JSON.stringify([n,t.kind,t.id]),s=e.inboundByKey.get(o);if(!s){let{artifacts:r}=await e.bus.request(R.query,{relation:{type:n,target:{refClass:`artifact`,kind:t.kind,id:t.id}},currentOnly:!0});s=r,e.inboundByKey.set(o,s)}for(let o of s){let s=Q(o);for(let c of o.relations)c.type!==n||!Gi(c.target,t)||await Y(e,{sourceRef:t,target:s,relationType:n,sourceLocalId:c.sourceLocalId,direction:`inbound`,selector:r,load:()=>X(e,s,async()=>o)},i,a)}}async function Y(e,t,n,r){let{selector:i,target:a}=t;if(!Z(i,a)){V(e,B(t,{status:`unresolved`,reason:`not-selected`}));return}let o=z(a),s=r.has(o);if(n>=e.maxDepth&&!s){V(e,B(t,{status:`unresolved`,reason:`depth-exceeded`}));return}let c=e.resolvedByKey.has(o),l=await t.load();if(!l){V(e,B(t,{status:`unresolved`,reason:`not-found`}));return}V(e,B(t,{status:`resolved`}),{resolvedViaBackEdge:s}),c||e.resolved.push(l),!s&&await Ui(e,l,o,t.relationType,i,n,r)}async function Ui(e,t,n,r,i,a,o){let s=(i.depth??1)-1;await J(e,t,Wi(s>0?{[r]:{...i,depth:s}}:void 0,i.nested),a+1,new Set([...o,n]))}async function X(e,t,n=async()=>(await e.bus.request(R.resolve,{ref:t})).artifact){let r=z(t);if(e.resolvedByKey.has(r))return e.resolvedByKey.get(r)??null;let i=await n();return e.resolvedByKey.set(r,i),i}function Wi(e,t){return!t||!e?t??e:{...e,...t}}function Z(e,t){if(!e)return!1;if(!e.kinds)return!0;let n=Ki(t);return n!==void 0&&e.kinds.includes(n)}function Gi(e,t){return e.refClass===`artifact`&&e.kind===t.kind&&e.id===t.id}function Ki(e){if(e.refClass!==`entity`)return e.refClass===`local`?e.artifact.kind:e.kind}function Q(e){return{refClass:`artifact`,kind:e.kind,id:e.id,revision:e.revision}}function qi(e,t,n,r){return JSON.stringify([e.kind,e.id,e.revision,n,t??null,[...r].sort()])}function $(e,t){for(let n of e.values())if(n.registry===t)for(let e of n.registrations)t.registerNamespace(e)}function Ji(){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)}$(e,n.registry)}};return{filter:e=>(e.facetNamespaces?.namespaces?.length??0)>0,async processActivated(r,i,a){let o=a.getService(k);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 $(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 Yi(){let e=new Map;return{filter:e=>!!e.workflowBlocks?.blocks,async processActivated(t,n,r){let i=r.getService(O);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 Xi(e){let t=new Map,n=e=>{let n=t.get(e);n&&(t.delete(e),n())},r=async(e,n,r)=>{let i=n.reactions;if(!i)return;let a=r.getService(E);if(!a)throw Error(`ReactionRegistry is not available — ensure reaction-registry is started before extensions with reactions.`);let o=await i.createReactions(r);a.register(e,o),t.set(e,()=>a.deregister(e))};return{filter:e=>e.name===E.name||!!e.reactions,async processActivated(n,i,a){if(n===E.name){let n=[];e.forEachActiveExtension((e,t,r)=>{t.reactions&&n.push([e,t,r])});try{for(let[e,t,i]of n)await r(e,t,i)}catch(e){throw t.clear(),e}return}await r(n,i,a)},async processStopped(e){if(e===E.name){t.clear();return}try{n(e)}catch(t){console.error(`[ReactionContributionProcessor] Deregister error for "${e}":`,t)}}}}const Zi=[x,xt,N,d,li,pi,P,F,ni,ri,ii,ai,I,C,fi,Br,Nr,Oi,ui,S,j,ki,w,di,St,yn,Ei,M,je,L,Ti];export{an as AdapterIdentityRegistry,_t as AdapterRegistry,x as AdapterRuntimeNamespace,m as AdapterRuntimeSchemas,Pe as AdapterRuntimeSubjects,Jr as AgentInstanceStatusSchema,N as AgentRuntimeNamespace,Yr as AgentRuntimeSchemas,Xr as AgentRuntimeSelectionSchema,Zr as AgentRuntimeSubjects,d as AgentStorageNamespace,Ne as AgentStorageSubjects,Hn as ArtifactLifecycleHookRegistry,A as ArtifactLifecycleHookRegistryToken,Nn as ArtifactLifecycleHookRejectedError,En as ArtifactSchemaRegistry,T as ArtifactSchemaRegistryToken,on as BugEntrySchema,Xe as CONNECTOR_SWAP_DEFAULT_PIPELINE,br as CachedRegistryFetcher,lr as CanonicalModelResolutionError,zn as CanonicalModelResolver,Fn as CanonicalModelService,dr as CapabilityService,fr as CapabilityToken,Kr as CodeExecutionService,qr as CodeExecutionServiceToken,Qr as CodebaseChangedEventSchema,P as CodebaseNamespace,$r as CodebaseSchemas,ei as CodebaseSubjects,sn as CompressRequestSchema,cn as CompressResponseSchema,ln as CompressionEventSchema,F as CompressionNamespace,un as CompressionSchemas,ti as CompressionSubjects,At as ContainerCreatedSchema,Ut as ContainerDestroyedSchema,Ht as ContainerIsolatedExecutionTargetSchema,Kt as ContainerIsolatedSpawnRequestSchema,Rt as ContainerLocalExecutionTargetSchema,Mt as ContainerLocalSpawnRequestSchema,Gt as ContainerLocalWorkflowSpawnRequestSchema,Ot as ContainerRuntimeSchema,ci as ContainerSpawnNamespace,si as ContainerSpawnSubjects,Wt as ContainerStartedSchema,kt as ContainerStateSchema,wt as ContainerStoppedSchema,gt as ContextWindowTracker,I as DockerNamespace,oi as DockerSubjects,ht as EmbeddingIndexManager,Bt as ExecutionTargetInputSchema,Pt as ExecutionTargetListQuerySchema,C as ExecutionTargetNamespace,jt as ExecutionTargetResolveRequestSchema,zt as ExecutionTargetSchema,Vt as ExecutionTargetSchemas,qt as ExecutionTargetSubjects,Nt as ExecutionTargetTypeSchema,dn as ExtractedContextSchema,On as FacetNamespaceRegistry,k as FacetNamespaceRegistryToken,_r as FallbackRegistryFetcher,Zi as FrameworkServicesCoreNamespaces,Lt as LocalExecutionTargetSchema,ft as MakaioSession,dt as MakaioSessionService,S as MessageRoutingNamespace,tt as MessageRoutingSubjects,Jt as MessageStorageNamespace,Yt as MessageStorageSubjects,j as ModelRegistryNamespace,vr as ModelRegistryProviderNotFoundError,mr as ModelRegistrySchema,gr as ModelRegistrySchemas,hr as ModelRegistryService,yr as ModelRegistrySubjects,nr as ModelRegistryToken,mn as PreferenceItemSchema,hn as PreferenceKeySchema,gn as PreferenceValueSchema,w as PreferencesNamespace,_n as PreferencesSchemas,vn as PreferencesSubjects,$t as ProviderContextActivationError,xr as ProviderModelOverrideSchema,Mn as ReactionRegistry,E as ReactionRegistryToken,h as ResolveIdRequestSchema,g as ResolveIdResponseSchema,_ as ResolveLiveIdentityRequestSchema,v as ResolveLiveIdentityResponseSchema,y as ResolveNameRequestSchema,b as ResolveNameResponseSchema,Xt as RuntimeProviderContextResolutionError,Ue as SessionBridge,Yn as SessionBridgeToken,o as SessionEventStorageNamespace,i as SessionEventStorageSubjects,Ye as SessionExtensionContextImpl,$e as SessionOrchestrator,Wn as SessionOrchestratorToken,de as SessionStartError,f as SessionStorageNamespace,p as SessionStorageSubjects,er as SessionStorageToken,rr as SessionToken,Ve as SessionTurnManager,Dt as SpawnRequestSchema,It as SpawnResponseSchema,Ct as StatusRequestSchema,Ft as StatusResponseSchema,Tt as StopRequestSchema,Et as StopResponseSchema,Fr as SubagentFailureFinalizationError,Lr as SubagentManager,Pr as SubagentService,zr as SubagentServiceToken,mi as SubagentTemplateCompletedEventSchema,hi as SubagentTemplateCreateSchema,gi as SubagentTemplateInstanceSchema,_i as SubagentTemplateInstanceStatusSchema,L as SubagentTemplateKernelNamespace,vi as SubagentTemplateKernelSchemas,yi as SubagentTemplateSchema,bi as SubagentTemplateSettingsSchemas,xi as SubagentTemplateSpawnRequestSchema,Si as SubagentTemplateSpawnedEventSchema,Di as SubagentTemplateSubjects,Ci as SubagentTemplateSummarySchema,wi as SubagentTemplateUpdateSchema,fn as TechnicalDetailsSchema,pn as TodoEntrySchema,Sr as ToolApprovalService,D as ToolApprovalToken,In as ToolRegistry,Qn as ToolRegistryToken,Zn as TransitionActionRegistry,An as TransitionPipelineService,ir as TransitionPipelineToken,Ln as TransitionRuleRegistry,Cr as TrayMenuEntrySchema,wr as TrayMenuGroupEntrySchema,Tr as TrayMenuGroupSchema,Er as TrayMenuItemClickedSchema,Dr as TrayMenuListEntrySchema,Or as TrayMenuMetadataSchema,M as TrayMenuNamespace,kr as TrayMenuSchemas,Ar as TrayMenuSectionSchema,Mr as TrayMenuService,jr as TrayMenuSubjects,Kn as TrayMenuToken,Ge as Turn,He as TurnContextEnricher,en as TurnStorageNamespace,Me as TurnStorageSubjects,Dn as WORKFLOW_START_ACTION_TYPE,Xn as WorkflowBlockRegistry,O as WorkflowBlockRegistryToken,Ae as actionRegistry,Qt as activateProviderContext,e as agents,tr as artifactLifecycleHookRegistryPackage,Tn as artifactSchemaRegistryPackage,xe as assembleForkContext,nn as buildDeterministicAdapterId,re as buildRecoveryContext,ae as buildRecoveryContextWithPipeline,l as buildSessionContext,le as buildTurnInitiator,Pn as canonicalModelPackage,ur as capabilityPackage,Gr as codeExecutionPackage,Mi as createArtifactKindContributionProcessor,Pi as createArtifactLifecycleHookContributionProcessor,Ur as createEffectiveExecutionSignal,Ji as createFacetNamespaceContributionProcessor,$n as createFrameworkCorePackages,Jn as createModelRegistryPackage,Xi as createReactionContributionProcessor,Be as createSessionExtensionContext,Sn as createSessionStorageMemoryState,Ir as createSubagentServicePackage,Vr as createToolContributionProcessor,Hr as createTransitionContributionProcessor,Yi as createWorkflowBlockContributionProcessor,ye as ensureAgentCwd,c as ensureAgentModel,ee as extractTextContent,qn as facetNamespaceRegistryPackage,yt as fetchAgentsBySession,Ze as fetchMessageCountsBySession,Re as fetchPreviewBySession,Ie as fetchSessionPreviewMaps,te as findTurnByAgent,Un as frameworkCorePackages,oe as getFullConversation,ce as getOrCreateSession,ut as importCursors,bn as kindToBranchKind,ct as mapAgentsBySession,vt as mapRowToSession,qe as mapToSession,pr as mergeModelMetadata,nt as messageRouting,r as messages,he as normalizeSelectionString,ne as normalizeToBlocks,Qe as parseForkTransforms,Ke as pickFallbackRuntimeOptions,Rn as reactionRegistryPackage,ve as recoverAgent,me as registerAbandonHandler,rn as registerAdapterRuntimeIdentityHandlers,be as registerAttachHandler,Ce as registerBuiltInActions,fe as registerCompressHandler,st as registerCompressLineageResolver,mt as registerCoreSessionServiceHandlers,Je as registerDrizzleAgentStorage,at as registerDrizzleImportCursorStorage,We as registerDrizzleMessageRoutingStorage,ot as registerDrizzleMessageStorage,Oe as registerDrizzleSessionEventStorage,ze as registerDrizzleSessionOwnershipStorage,lt as registerDrizzleSessionStorage,ke as registerDrizzleTurnStorage,_e as registerForkHandler,it as registerFtsSearchHandler,Le as registerGetStatusCountsHandler,bt as registerListActionsHandler,xn as registerMemoryAgentStorage,Fe as registerMemoryMessageStorage,se as registerMemorySessionEventStorage,wn as registerMemorySessionOwnershipStorage,Cn as registerMemorySessionStorage,pe as registerMemoryTurnStorage,we as registerMergeHandler,rt as registerParentResolver,et as registerResumeHandler,pt as registerSpawningToolCallResolver,Te as resetBuiltInActionsRegistration,s as resolveAdapterId,ge as resolveAdapterNameById,Bi as resolveArtifactContext,tn as resolveDeterministicAdapterId,De as resolveExecutionTarget,Se as resolveModelCapabilities,Zt as resolveRuntimeProviderContext,ue as resolveTargetAgents,Ee as routeToAgents,u as routeToAgentsCore,Wr as selectCodeExecutionProvider,ar as sessionBridgePackage,a as sessionEvents,cr as sessionOrchestratorPackage,Gn as sessionPackage,sr as sessionStoragePackage,t as sessions,Rr as subagentServicePackage,Bn as toolApprovalPackage,kn as toolRegistryPackage,or as transitionPipelinePackage,Vn as trayMenuPackage,n as turns,ie as verifyAndRecoverAgents,jn as workflowBlockRegistryPackage};
@@ -1,4 +1,4 @@
1
- import { _ as ArtifactViewBuilderRegistry, a as artifactViewBuilderRegistryPackage, c as surfaceBindingRegistryPackage, d as MaterializationOperationRequestOrigin, f as MaterializationOperationScope, g as ArtifactViewBuilderCollisionError, h as ArtifactViewService, i as SurfaceBindingRegistryToken, l as MaterializationOperationCoordinator, m as SurfaceBindingRegistry, n as ArtifactViewServiceToken, o as artifactViewServicePackage, p as MaterializationProviderObject, r as MaterializationOperationCoordinatorToken, s as materializationOperationCoordinatorPackage, t as ArtifactViewBuilderRegistryToken, u as MaterializationOperationLease } from "../../packages-Fy4a6vQy.mjs";
1
+ import { _ as ArtifactViewBuilderRegistry, a as artifactViewBuilderRegistryPackage, c as surfaceBindingRegistryPackage, d as MaterializationOperationRequestOrigin, f as MaterializationOperationScope, g as ArtifactViewBuilderCollisionError, h as ArtifactViewService, i as SurfaceBindingRegistryToken, l as MaterializationOperationCoordinator, m as SurfaceBindingRegistry, n as ArtifactViewServiceToken, o as artifactViewServicePackage, p as MaterializationProviderObject, r as MaterializationOperationCoordinatorToken, s as materializationOperationCoordinatorPackage, t as ArtifactViewBuilderRegistryToken, u as MaterializationOperationLease } from "../../packages-g6BtlUF9.mjs";
2
2
  import { ArtifactKindRegistration, ArtifactRevision, ArtifactViewLevel, ArtifactViewModel } from "@makaio/framework/contracts";
3
3
  import { ContributionProcessor } from "@makaio/framework/kernel";
4
4
 
@@ -1 +1 @@
1
- import{a as e,c as t,d as n,f as r,h as i,i as a,l as o,m as s,n as c,o as l,p as u,r as d,s as f,t as p,u as m}from"../../packages-CZ2x-Ver.mjs";function h(){let e=new Map;return{filter:e=>e.artifactViewBuilders!=null,async processActivated(t,n,r){let i=n.artifactViewBuilders;if(!i)return;let a=r.getService(p);if(!a)throw Error(`ArtifactViewBuilderRegistry is not available — ensure artifact-view-builder-registry is started before extensions with artifact view builders.`);let o=await i.createBuilders();a.replaceBuildersForOwner(t,o),e.set(t,a)},async processStopped(t){let n=e.get(t);n&&(e.delete(t),n.removeBuildersForOwner(t))}}}function g(e,t){for(let n of e.values())if(n.registry===t)for(let e of n.registrations)t.registerBinding(e)}function _(){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)}g(e,n.registry)}};return{filter:e=>(e.surfaceBindings?.bindings?.length??0)>0,async processActivated(r,i,o){let s=o.getService(a);if(!s)throw Error(`SurfaceBindingRegistry is not available — ensure surface-binding-registry is started before extensions with surfaceBindings.`);let c=(i.surfaceBindings?.bindings??[]).map(e=>e.toRegistration()),l=e.get(r);n(r);let u=[];try{for(let e of c)s.registerBinding(e),u.push(e)}catch(n){for(let e=u.length-1;e>=0;--e)s.deregisterBinding(u[e].id);throw g(e,s),t(r,l),n}e.set(r,{registry:s,registrations:c})},async processStopped(e){try{n(e)}catch(t){console.error(`[SurfaceBindingContributionProcessor] Deregister error for "${e}":`,t)}}}}export{s as ArtifactViewBuilderCollisionError,i as ArtifactViewBuilderRegistry,p as ArtifactViewBuilderRegistryToken,n as ArtifactViewService,c as ArtifactViewServiceToken,r as GENERIC_ARTIFACT_VIEW_BUILDER_VERSION,o as MaterializationOperationCoordinator,d as MaterializationOperationCoordinatorToken,m as SurfaceBindingRegistry,a as SurfaceBindingRegistryToken,e as artifactViewBuilderRegistryPackage,l as artifactViewServicePackage,u as buildGenericArtifactView,h as createArtifactViewBuilderContributionProcessor,_ as createSurfaceBindingContributionProcessor,f as materializationOperationCoordinatorPackage,t as surfaceBindingRegistryPackage};
1
+ import{a as e,c as t,d as n,f as r,h as i,i as a,l as o,m as s,n as c,o as l,p as u,r as d,s as f,t as p,u as m}from"../../packages-BOM7wECe.mjs";function h(){let e=new Map;return{filter:e=>e.artifactViewBuilders!=null,async processActivated(t,n,r){let i=n.artifactViewBuilders;if(!i)return;let a=r.getService(p);if(!a)throw Error(`ArtifactViewBuilderRegistry is not available — ensure artifact-view-builder-registry is started before extensions with artifact view builders.`);let o=await i.createBuilders();a.replaceBuildersForOwner(t,o),e.set(t,a)},async processStopped(t){let n=e.get(t);n&&(e.delete(t),n.removeBuildersForOwner(t))}}}function g(e,t){for(let n of e.values())if(n.registry===t)for(let e of n.registrations)t.registerBinding(e)}function _(){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)}g(e,n.registry)}};return{filter:e=>(e.surfaceBindings?.bindings?.length??0)>0,async processActivated(r,i,o){let s=o.getService(a);if(!s)throw Error(`SurfaceBindingRegistry is not available — ensure surface-binding-registry is started before extensions with surfaceBindings.`);let c=(i.surfaceBindings?.bindings??[]).map(e=>e.toRegistration()),l=e.get(r);n(r);let u=[];try{for(let e of c)s.registerBinding(e),u.push(e)}catch(n){for(let e=u.length-1;e>=0;--e)s.deregisterBinding(u[e].id);throw g(e,s),t(r,l),n}e.set(r,{registry:s,registrations:c})},async processStopped(e){try{n(e)}catch(t){console.error(`[SurfaceBindingContributionProcessor] Deregister error for "${e}":`,t)}}}}export{s as ArtifactViewBuilderCollisionError,i as ArtifactViewBuilderRegistry,p as ArtifactViewBuilderRegistryToken,n as ArtifactViewService,c as ArtifactViewServiceToken,r as GENERIC_ARTIFACT_VIEW_BUILDER_VERSION,o as MaterializationOperationCoordinator,d as MaterializationOperationCoordinatorToken,m as SurfaceBindingRegistry,a as SurfaceBindingRegistryToken,e as artifactViewBuilderRegistryPackage,l as artifactViewServicePackage,u as buildGenericArtifactView,h as createArtifactViewBuilderContributionProcessor,_ as createSurfaceBindingContributionProcessor,f as materializationOperationCoordinatorPackage,t as surfaceBindingRegistryPackage};
@@ -3,7 +3,7 @@ import { C as SessionTurnManager, D as TurnPairStateChange, E as TurnContext, O
3
3
  import { l as resolveRuntimeProviderContext } from "../../index-BBrLhtLK.mjs";
4
4
  import { i as SessionStorageSubjects, r as SessionStorageNamespace } from "../../namespace-Dt7hJA-a.mjs";
5
5
  import { _ as sessionsDual, c as adapterSessionClaims, d as agentsDual, g as sessions, l as adapterSessionClaimsDual, u as agents } from "../../schema-C58MdqlI.mjs";
6
- import { n as SessionEventStorageSubjects, t as SessionEventStorageNamespace } from "../../namespace-u4eoUCLp.mjs";
6
+ import { n as SessionEventStorageSubjects, t as SessionEventStorageNamespace } from "../../namespace-DZooy1DW.mjs";
7
7
  import { t as TurnStorageNamespace } from "../../namespace-CO9J3NB-2.mjs";
8
8
  import { n as TurnStorageSubjects } from "../../namespace-D8pSI--d.mjs";
9
9
  import { i as MessageStorageSubjects, r as MessageStorageNamespace } from "../../namespace-BG35KNtw.mjs";
@@ -1,2 +1,2 @@
1
- import { n as SessionEventStorageSubjects, t as SessionEventStorageNamespace } from "../../../namespace-u4eoUCLp.mjs";
1
+ import { n as SessionEventStorageSubjects, t as SessionEventStorageNamespace } from "../../../namespace-DZooy1DW.mjs";
2
2
  export { SessionEventStorageNamespace, SessionEventStorageSubjects };