@makaio/framework 1.0.0-dev-1783439621927 → 1.0.0-dev-1783615060726

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 (111) hide show
  1. package/dist/.makaio-build.json +2 -2
  2. package/dist/adapters/config/index.d.mts +1 -1
  3. package/dist/adapters/index.d.mts +106 -167
  4. package/dist/adapters/index.mjs +6 -6
  5. package/dist/adapters/node.d.mts +1 -1
  6. package/dist/adapters/node.mjs +4 -4
  7. package/dist/{base-orchestrator-ODRyDBzu.d.mts → base-orchestrator-J1WKAUkF.d.mts} +24 -3
  8. package/dist/bus/index.mjs +1 -1
  9. package/dist/{client-n0OJiTt1.mjs → client-l1Rq5p6X.mjs} +1 -1
  10. package/dist/clients/index.d.mts +30 -0
  11. package/dist/clients/index.mjs +2 -2
  12. package/dist/contracts/adapter/index.d.mts +2 -2
  13. package/dist/contracts/adapter/schemas/session-lineage.d.mts +1 -1
  14. package/dist/contracts/artifact/index.d.mts +1 -1
  15. package/dist/contracts/client/index.d.mts +2 -2
  16. package/dist/contracts/client/index.mjs +1 -1
  17. package/dist/contracts/config/index.d.mts +6 -6
  18. package/dist/contracts/extension/index.d.mts +3 -3
  19. package/dist/contracts/facet/index.d.mts +1 -1
  20. package/dist/contracts/harness/index.d.mts +1 -1
  21. package/dist/contracts/index.d.mts +105 -105
  22. package/dist/contracts/index.mjs +1 -1
  23. package/dist/contracts/materialization/index.d.mts +3 -3
  24. package/dist/contracts/provider/index.d.mts +1 -1
  25. package/dist/contracts/session/index.d.mts +2 -2
  26. package/dist/contracts/session/index.mjs +1 -1
  27. package/dist/contracts/shared/index.d.mts +1 -1
  28. package/dist/contracts/variant/index.d.mts +1 -1
  29. package/dist/contracts/workflow/index.d.mts +2 -2
  30. package/dist/{definition-DpkfJi8v.d.mts → definition-DePb3ke-.d.mts} +1 -1
  31. package/dist/{index-BwGfdbI0.d.mts → index-2fK9iSHI.d.mts} +9 -9
  32. package/dist/{index-DTBQOCar.d.mts → index-BMbmoarE.d.mts} +16 -16
  33. package/dist/{index-DmJ-OpTD.d.mts → index-BSprsrul.d.mts} +82 -44
  34. package/dist/{index-D7Fu3375.d.mts → index-BbQpQ1N3.d.mts} +3 -3
  35. package/dist/{index-B5Uczo3R.d.mts → index-C9FCWOhp.d.mts} +28 -28
  36. package/dist/{index-NkNbYFud.d.mts → index-CaerrEDH.d.mts} +1 -1
  37. package/dist/{index-BvjLe_w9.d.mts → index-Cx1Bm6WD.d.mts} +8 -8
  38. package/dist/{index-CwHP8Jxs.d.mts → index-D8wmMJLi.d.mts} +189 -1
  39. package/dist/{index-CYHWOXUm.d.mts → index-DEzdNQum.d.mts} +1 -1
  40. package/dist/{index-BIZeIA5k.d.mts → index-DKaEpPFS.d.mts} +9 -9
  41. package/dist/{index-DS6kxiFl.d.mts → index-DWu3qrwe.d.mts} +29 -29
  42. package/dist/{index-DFK3tpEY.d.mts → index-DZ14azod.d.mts} +79 -16
  43. package/dist/{index-B3fjN5HX.d.mts → index-DZPNuWMc.d.mts} +4 -4
  44. package/dist/{index-C8k2f_E0.d.mts → index-DoEF9LAc.d.mts} +1 -1
  45. package/dist/{index-Cyi7y_aG.d.mts → index-Qd1Qom8M.d.mts} +16 -16
  46. package/dist/{index-Dtb2cVJz.d.mts → index-S7lj2TLp.d.mts} +81 -81
  47. package/dist/kernel/extension/index.d.mts +1 -1
  48. package/dist/kernel/index.d.mts +2 -2
  49. package/dist/kernel/observability/index.d.mts +1 -1
  50. package/dist/{namespace-JFzrlNs4.d.mts → namespace-CZK2ff3B.d.mts} +5 -5
  51. package/dist/{namespace-DRXQyBe0.d.mts → namespace-Ceg3zkt2.d.mts} +24 -0
  52. package/dist/{namespace-BLER-Qom.d.mts → namespace-CfvtDD_U.d.mts} +2 -2
  53. package/dist/{namespace-6sIu5nBI2.d.mts → namespace-D8P8Sxce2.d.mts} +2 -2
  54. package/dist/{namespace-D4Uf5Mw_.d.mts → namespace-Dc94fHZW.d.mts} +18 -18
  55. package/dist/{namespace-CGxFYDlK.d.mts → namespace-DuUCiVmK.d.mts} +26 -26
  56. package/dist/{namespace-C74bbsdZ.d.mts → namespace-j7vFsmYL.d.mts} +2 -2
  57. package/dist/node/transports/index.d.mts +25 -3
  58. package/dist/node/transports/index.mjs +1 -1
  59. package/dist/package.json +1 -1
  60. package/dist/{schemas-CurUbHy4.d.mts → schemas-BemsLc_V.d.mts} +4 -4
  61. package/dist/{schemas-9S9Y9PHT2.d.mts → schemas-Br-rSxPE2.d.mts} +11 -11
  62. package/dist/{schemas-B_t6oOK-.d.mts → schemas-CoFCV42v.d.mts} +2 -2
  63. package/dist/{schemas-DXeGCbJ9.d.mts → schemas-D512XweP.d.mts} +5 -5
  64. package/dist/{schemas-DnmbwE_V.d.mts → schemas-DWfo0wp4.d.mts} +7 -7
  65. package/dist/{schemas-CW6YsPT4.d.mts → schemas-lnE9YoG7.d.mts} +3 -3
  66. package/dist/services/adapter-subsystem/index.d.mts +2 -2
  67. package/dist/services/adapter-subsystem/namespace.d.mts +1 -1
  68. package/dist/services/agent-runtime/index.d.mts +2 -2
  69. package/dist/services/agent-runtime/namespace.d.mts +1 -1
  70. package/dist/services/agent-runtime/schemas.d.mts +1 -1
  71. package/dist/services/context-rules/index.d.mts +6 -6
  72. package/dist/services/filesystem/namespace.d.mts +6 -6
  73. package/dist/services/filesystem/schemas.d.mts +3 -3
  74. package/dist/services/index.d.mts +43 -43
  75. package/dist/services/index.mjs +1 -1
  76. package/dist/services/log-import/index.mjs +2 -2
  77. package/dist/services/preferences/index.d.mts +2 -2
  78. package/dist/services/preferences/schemas.d.mts +1 -1
  79. package/dist/services/preferences/storage-namespace.d.mts +2 -2
  80. package/dist/services/session/index.d.mts +5 -5
  81. package/dist/services/session/index.mjs +1 -1
  82. package/dist/services/session/messages/namespace.d.mts +1 -1
  83. package/dist/services/session/session-events/namespace.d.mts +1 -1
  84. package/dist/services/session/storage/namespace.d.mts +1 -1
  85. package/dist/services/session/testing/index.mjs +1 -1
  86. package/dist/services/settings/namespace.d.mts +8 -8
  87. package/dist/services/settings/storage/extension-configs/namespace.d.mts +3 -3
  88. package/dist/services/subagent-template/index.d.mts +2 -2
  89. package/dist/services/subagent-template/namespace.d.mts +1 -1
  90. package/dist/services/subagent-template/schemas.d.mts +1 -1
  91. package/dist/services/tool-approval/index.mjs +1 -1
  92. package/dist/services/tools/index.mjs +1 -1
  93. package/dist/services/tray-menu/index.d.mts +2 -2
  94. package/dist/services/tray-menu/namespace.d.mts +1 -1
  95. package/dist/services/tray-menu/schemas.d.mts +1 -1
  96. package/dist/session-CX6QDhi2.mjs +76 -0
  97. package/dist/{session-Dp7z5N1d.mjs → session-D5rVMqmE.mjs} +1 -1
  98. package/dist/{session-lineage-C1M7-O3C.d.mts → session-lineage-NBFNVkUE.d.mts} +1 -1
  99. package/dist/{storage-namespace-BvRF22by.d.mts → storage-namespace-Di1A3DMm.d.mts} +10 -10
  100. package/dist/{tool-approval-service-BIbUSuqg.mjs → tool-approval-service-DEiMKTv9.mjs} +1 -1
  101. package/dist/tools-CGFZkB7F.mjs +1 -0
  102. package/dist/{transition-DYorNHZu.d.mts → transition-CmI3q3FA.d.mts} +1 -1
  103. package/dist/{types-9XCB1aPK.d.mts → types-Dhou-Itn.d.mts} +14 -14
  104. package/dist/{types-N_BOtTqt.d.mts → types-VwMx5_lS.d.mts} +31 -1
  105. package/dist/ui-kernel/index.d.mts +4 -4
  106. package/dist/ui-kernel/pages/namespace.d.mts +4 -4
  107. package/dist/ui-kernel/pages/schemas.d.mts +1 -1
  108. package/dist/workflow-engine/index.d.mts +69 -69
  109. package/package.json +1 -1
  110. package/dist/session-CZUrp7gC.mjs +0 -69
  111. package/dist/tools-Yz8XyiwA.mjs +0 -1
@@ -1,2 +1,2 @@
1
- import { a as AgentRuntimeSelectionSchema, i as AgentRuntimeSelection, n as AgentInstanceStatusSchema, r as AgentRuntimeSchemas, t as AgentInstanceStatus } from "../../schemas-B_t6oOK-.mjs";
1
+ import { a as AgentRuntimeSelectionSchema, i as AgentRuntimeSelection, n as AgentInstanceStatusSchema, r as AgentRuntimeSchemas, t as AgentInstanceStatus } from "../../schemas-CoFCV42v.mjs";
2
2
  export { AgentInstanceStatus, AgentInstanceStatusSchema, AgentRuntimeSchemas, AgentRuntimeSelection, AgentRuntimeSelectionSchema };
@@ -160,9 +160,9 @@ declare const ResolvedContextRulesSchema: z.ZodObject<{
160
160
  declare const ContextRuleChangedEventSchema: z.ZodObject<{
161
161
  ruleId: z.ZodString;
162
162
  changeType: z.ZodEnum<{
163
- deleted: "deleted";
164
- created: "created";
165
163
  updated: "updated";
164
+ created: "created";
165
+ deleted: "deleted";
166
166
  }>;
167
167
  previous: z.ZodNullable<z.ZodObject<{
168
168
  scope: z.ZodEnum<{
@@ -313,9 +313,9 @@ declare const ContextRulesServiceNamespace: _$_makaio_core0.BusNamespaceDefiniti
313
313
  changed: _$zod.ZodObject<{
314
314
  ruleId: _$zod.ZodString;
315
315
  changeType: _$zod.ZodEnum<{
316
- deleted: "deleted";
317
- created: "created";
318
316
  updated: "updated";
317
+ created: "created";
318
+ deleted: "deleted";
319
319
  }>;
320
320
  previous: _$zod.ZodNullable<_$zod.ZodObject<{
321
321
  scope: _$zod.ZodEnum<{
@@ -383,9 +383,9 @@ declare const ContextRulesServiceSubjects: _$_makaio_core0.BusSubjects<_$_makaio
383
383
  changed: _$zod.ZodObject<{
384
384
  ruleId: _$zod.ZodString;
385
385
  changeType: _$zod.ZodEnum<{
386
- deleted: "deleted";
387
- created: "created";
388
386
  updated: "updated";
387
+ created: "created";
388
+ deleted: "deleted";
389
389
  }>;
390
390
  previous: _$zod.ZodNullable<_$zod.ZodObject<{
391
391
  scope: _$zod.ZodEnum<{
@@ -10,18 +10,18 @@ declare const FsNamespace: _$_makaio_core0.BusNamespaceDefinition<"fs", {
10
10
  changed: _$zod.ZodObject<{
11
11
  path: _$zod.ZodString;
12
12
  kind: _$zod.ZodEnum<{
13
+ change: "change";
13
14
  delete: "delete";
14
15
  create: "create";
15
- change: "change";
16
16
  }>;
17
17
  }, _$zod_v4_core0.$strip>;
18
18
  batch: _$zod.ZodObject<{
19
19
  changes: _$zod.ZodArray<_$zod.ZodObject<{
20
20
  path: _$zod.ZodString;
21
21
  kind: _$zod.ZodEnum<{
22
+ change: "change";
22
23
  delete: "delete";
23
24
  create: "create";
24
- change: "change";
25
25
  }>;
26
26
  }, _$zod_v4_core0.$strip>>;
27
27
  }, _$zod_v4_core0.$strip>;
@@ -153,18 +153,18 @@ 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
+ change: "change";
156
157
  delete: "delete";
157
158
  create: "create";
158
- change: "change";
159
159
  }>;
160
160
  }, _$zod_v4_core0.$strip>;
161
161
  batch: _$zod.ZodObject<{
162
162
  changes: _$zod.ZodArray<_$zod.ZodObject<{
163
163
  path: _$zod.ZodString;
164
164
  kind: _$zod.ZodEnum<{
165
+ change: "change";
165
166
  delete: "delete";
166
167
  create: "create";
167
- change: "change";
168
168
  }>;
169
169
  }, _$zod_v4_core0.$strip>>;
170
170
  }, _$zod_v4_core0.$strip>;
@@ -294,18 +294,18 @@ 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
+ change: "change";
297
298
  delete: "delete";
298
299
  create: "create";
299
- change: "change";
300
300
  }>;
301
301
  }, _$zod_v4_core0.$strip>;
302
302
  batch: _$zod.ZodObject<{
303
303
  changes: _$zod.ZodArray<_$zod.ZodObject<{
304
304
  path: _$zod.ZodString;
305
305
  kind: _$zod.ZodEnum<{
306
+ change: "change";
306
307
  delete: "delete";
307
308
  create: "create";
308
- change: "change";
309
309
  }>;
310
310
  }, _$zod_v4_core0.$strip>>;
311
311
  }, _$zod_v4_core0.$strip>;
@@ -5,9 +5,9 @@ import { z } from "zod";
5
5
  * File change kind.
6
6
  */
7
7
  declare const FsChangeKindSchema: z.ZodEnum<{
8
+ change: "change";
8
9
  delete: "delete";
9
10
  create: "create";
10
- change: "change";
11
11
  }>;
12
12
  type FsChangeKind = z.infer<typeof FsChangeKindSchema>;
13
13
  /**
@@ -16,9 +16,9 @@ type FsChangeKind = z.infer<typeof FsChangeKindSchema>;
16
16
  declare const FsChangedSchema: z.ZodObject<{
17
17
  path: z.ZodString;
18
18
  kind: z.ZodEnum<{
19
+ change: "change";
19
20
  delete: "delete";
20
21
  create: "create";
21
- change: "change";
22
22
  }>;
23
23
  }, z.core.$strip>;
24
24
  type FsChanged = z.infer<typeof FsChangedSchema>;
@@ -29,9 +29,9 @@ declare const FsBatchSchema: z.ZodObject<{
29
29
  changes: z.ZodArray<z.ZodObject<{
30
30
  path: z.ZodString;
31
31
  kind: z.ZodEnum<{
32
+ change: "change";
32
33
  delete: "delete";
33
34
  create: "create";
34
- change: "change";
35
35
  }>;
36
36
  }, z.core.$strip>>;
37
37
  }, z.core.$strip>;
@@ -1,9 +1,9 @@
1
1
  import { c as ResolveIdResponse, d as ResolveNameRequestSchema, f as ResolveNameResponse, l as ResolveIdResponseSchema, o as ResolveIdRequest, p as ResolveNameResponseSchema, s as ResolveIdRequestSchema, t as AdapterRuntimeSchemas, u as ResolveNameRequest } from "../schemas-t6h9oSct.mjs";
2
2
  import { n as AdapterRuntimeSubjects, t as AdapterRuntimeNamespace } from "../namespace-BigVYQyx.mjs";
3
3
  import { a as resolveDeterministicAdapterId, i as registerAdapterRuntimeIdentityHandlers, n as RegisteredAdapterRuntimeIdentityHandlers, r as buildDeterministicAdapterId, t as AdapterIdentityRegistry } from "../index-h5go5Dtd.mjs";
4
- import { _ as BindingRecord } from "../index-Cyi7y_aG.mjs";
5
- import { a as AgentRuntimeSelectionSchema, i as AgentRuntimeSelection, n as AgentInstanceStatusSchema, r as AgentRuntimeSchemas, t as AgentInstanceStatus } from "../schemas-B_t6oOK-.mjs";
6
- import { n as AgentRuntimeSubjects, t as AgentRuntimeNamespace } from "../namespace-BLER-Qom.mjs";
4
+ import { _ as BindingRecord } from "../index-Qd1Qom8M.mjs";
5
+ import { a as AgentRuntimeSelectionSchema, i as AgentRuntimeSelection, n as AgentInstanceStatusSchema, r as AgentRuntimeSchemas, t as AgentInstanceStatus } from "../schemas-CoFCV42v.mjs";
6
+ import { n as AgentRuntimeSubjects, t as AgentRuntimeNamespace } from "../namespace-CfvtDD_U.mjs";
7
7
  import { t as CapabilityService } from "../index-C4nStEdA.mjs";
8
8
  import { n as CodebaseSubjects, t as CodebaseNamespace } from "../namespace-CQ8uza7o.mjs";
9
9
  import { n as CodebaseChangedEventSchema, r as CodebaseSchemas, t as CodebaseChangedEvent } from "../schemas-DKncXGnb.mjs";
@@ -13,26 +13,26 @@ import { a as ContextRuleInput, n as ContextRuleAction, t as ContextRule } from
13
13
  import { a as ExecutionTargetInputSchema, c as ExecutionTargetResolveRequest, d as ExecutionTargetSchemas, f as ExecutionTargetType, i as ExecutionTargetInput, l as ExecutionTargetResolveRequestSchema, m as LocalExecutionTargetSchema, n as ContainerLocalExecutionTargetSchema, o as ExecutionTargetListQuery, p as ExecutionTargetTypeSchema, r as ExecutionTarget, s as ExecutionTargetListQuerySchema, t as ContainerIsolatedExecutionTargetSchema, u as ExecutionTargetSchema } from "../schemas-D4zaFE2p.mjs";
14
14
  import { n as ExecutionTargetSubjects, t as ExecutionTargetNamespace } from "../namespace-65uwTpbg.mjs";
15
15
  import { A as StatusResponseSchema, C as SpawnRequest, D as StatusRequest, E as SpawnResponseSchema, M as StopRequestSchema, N as StopResponse, O as StatusRequestSchema, P as StopResponseSchema, S as ContainerStoppedSchema, T as SpawnResponse, _ as ContainerStarted, b as ContainerStateSchema, c as ContainerCreatedSchema, d as ContainerIsolatedSpawnRequest, f as ContainerIsolatedSpawnRequestSchema, g as ContainerRuntimeSchema, h as ContainerRuntime, i as DockerSubjects, j as StopRequest, k as StatusResponse, l as ContainerDestroyed, m as ContainerLocalSpawnRequestSchema, n as ContainerSpawnSubjects, p as ContainerLocalSpawnRequest, r as DockerNamespace, s as ContainerCreated, t as ContainerSpawnNamespace, u as ContainerDestroyedSchema, v as ContainerStartedSchema, w as SpawnRequestSchema, x as ContainerStopped, y as ContainerState } from "../index-CqCe7Phc.mjs";
16
- import { $t as recoverAgent, A as SelectTurn, At as createSessionExtensionContext, Bt as resetBuiltInActionsRegistration, C as MessageRoutingSubjects, Ct as registerDrizzleAgentStorage, D as registerMemoryMessageStorage, Dt as AgentStorageNamespace, E as messages, Et as registerMemorySessionStorage, F as EmbeddingIndexManager, Ft as CONNECTOR_SWAP_DEFAULT_PIPELINE, Gt as AgentContextState, Ht as registerGetStatusCountsHandler, I as registerDrizzleImportCursorStorage, It as normalizeSelectionString, Jt as buildTurnInitiator, Kt as ContextWindowTrackerConfig, L as importCursors, Lt as resolveAdapterNameById, M as turnsDual, Mt as assembleForkContext, N as registerMemoryTurnStorage, Nt as FallbackRuntimeOptions, O as registerDrizzleMessageStorage, Ot as AgentStorageSubjects, P as registerDrizzleTurnStorage, Pt as pickFallbackRuntimeOptions, Q as EventTransform, Qt as ensureAgentModel, R as importCursorsDual, Rt as registerListActionsHandler, S as MessageRoutingNamespace, St as registerFtsSearchHandler, T as SelectMessage, Tt as registerDrizzleSessionStorage, Ut as registerResumeHandler, Vt as actionRegistry, Wt as ContextWindowTracker, Xt as buildRecoveryContextWithPipeline, Yt as RecoveryConfig, Zt as ensureAgentCwd, _ as InsertMessageRouting, _t as fetchAgentsBySession, a as buildSessionContext, an as findTurnByAgent, at as registerMemorySessionEventStorage, b as messageRoutingDual, bt as mapRowToSession, c as kindToBranchKind, cn as extractTextContent, ct as sessionEvents, d as registerSpawningToolCallResolver, dn as AdapterRegistry, dt as SessionPreviewMaps, en as verifyAndRecoverAgents, f as registerCompressLineageResolver, fn as ISessionOrchestrator, ft as fetchSessionPreviewMaps, g as StartTurnOptions, gt as SearchSessionRow, h as MakaioSessionConfig, hn as MakaioSessionService, ht as SearchFilters, i as getFullConversation, in as resolveModelCapabilities, it as registerDrizzleSessionEventStorage, j as turns, jt as SessionBridge, k as InsertTurn, kt as SessionExtensionContextImpl, ln as normalizeToBlocks, lt as sessionEventsDual, m as MakaioSession, mn as registerCoreSessionServiceHandlers, mt as mapToSession, nn as resolveAdapterId, o as BuildContextOptions, on as getOrCreateSession, ot as InsertSessionEvent, p as registerParentResolver, pn as SessionOrchestrator, pt as mapAgentsBySession, qt as SessionContextWindowState, rn as resolveExecutionTarget, s as ContextAssemblyResult, sn as resolveTargetAgents, st as SelectSessionEvent, tn as buildRecoveryContext, un as TurnContextEnricher, v as SelectMessageRouting, vt as fetchMessageCountsBySession, w as InsertMessage, wt as registerMemoryAgentStorage, x as registerDrizzleMessageRoutingStorage, xt as parseForkTransforms, y as messageRouting, yt as fetchPreviewBySession, zt as registerBuiltInActions } from "../index-CwHP8Jxs.mjs";
16
+ import { $t as ensureAgentCwd, A as SelectTurn, At as AgentStorageSubjects, Bt as registerListActionsHandler, C as MessageRoutingSubjects, Ct as parseForkTransforms, D as registerMemoryMessageStorage, Dt as registerDrizzleSessionStorage, E as messages, Et as registerMemoryAgentStorage, F as EmbeddingIndexManager, Ft as FallbackRuntimeOptions, Gt as registerResumeHandler, Ht as resetBuiltInActionsRegistration, I as registerDrizzleImportCursorStorage, It as pickFallbackRuntimeOptions, Jt as ContextWindowTrackerConfig, Kt as ContextWindowTracker, L as importCursors, Lt as CONNECTOR_SWAP_DEFAULT_PIPELINE, M as turnsDual, Mt as createSessionExtensionContext, N as registerMemoryTurnStorage, Nt as SessionBridge, O as registerDrizzleMessageStorage, Ot as registerMemorySessionStorage, P as registerDrizzleTurnStorage, Pt as assembleForkContext, Qt as buildRecoveryContextWithPipeline, R as importCursorsDual, Rt as normalizeSelectionString, S as MessageRoutingNamespace, St as mapRowToSession, T as SelectMessage, Tt as registerDrizzleAgentStorage, Ut as actionRegistry, Vt as registerBuiltInActions, Wt as registerGetStatusCountsHandler, Xt as buildTurnInitiator, Yt as SessionContextWindowState, Zt as RecoveryConfig, _ as InsertMessageRouting, _n as MakaioSessionService, _t as SearchFilters, a as buildSessionContext, an as resolveExecutionTarget, b as messageRoutingDual, bt as fetchMessageCountsBySession, c as kindToBranchKind, cn as getOrCreateSession, ct as InsertSessionEvent, d as registerSpawningToolCallResolver, dn as normalizeToBlocks, dt as sessionEventsDual, en as ensureAgentModel, et as EventTransform, f as registerCompressLineageResolver, fn as TurnContextEnricher, g as StartTurnOptions, gn as registerCoreSessionServiceHandlers, gt as mapToSession, h as MakaioSessionConfig, hn as SessionOrchestrator, ht as mapAgentsBySession, i as getFullConversation, in as resolveAdapterId, j as turns, jt as SessionExtensionContextImpl, k as InsertTurn, kt as AgentStorageNamespace, ln as resolveTargetAgents, lt as SelectSessionEvent, m as MakaioSession, mn as ISessionOrchestrator, mt as fetchSessionPreviewMaps, nn as verifyAndRecoverAgents, o as BuildContextOptions, on as resolveModelCapabilities, ot as registerDrizzleSessionEventStorage, p as registerParentResolver, pn as AdapterRegistry, pt as SessionPreviewMaps, qt as AgentContextState, rn as buildRecoveryContext, s as ContextAssemblyResult, sn as findTurnByAgent, st as registerMemorySessionEventStorage, tn as recoverAgent, un as extractTextContent, ut as sessionEvents, v as SelectMessageRouting, vt as SearchSessionRow, w as InsertMessage, wt as registerFtsSearchHandler, x as registerDrizzleMessageRoutingStorage, xt as fetchPreviewBySession, y as messageRouting, yt as fetchAgentsBySession, zt as resolveAdapterNameById } from "../index-D8wmMJLi.mjs";
17
17
  import { a as registerCompressHandler, c as SessionTurnManager, d as Turn, f as TurnConfig, h as TurnStateChange, i as registerForkHandler, l as TurnCompleteCallback, m as TurnResult, n as routeToAgents, o as registerAttachHandler, p as TurnContext, r as registerMergeHandler, s as registerAbandonHandler, t as routeToAgentsCore, u as TurnCompletionResult } from "../index-BvTd61i5.mjs";
18
18
  import { n as activateProviderContextStrict, r as buildProviderContext, t as activateProviderContext } from "../index-DtwGhFFQ.mjs";
19
- import { i as SessionStorageSubjects, r as SessionStorageNamespace } from "../namespace-DRXQyBe0.mjs";
19
+ import { i as SessionStorageSubjects, r as SessionStorageNamespace } from "../namespace-Ceg3zkt2.mjs";
20
20
  import { a as agents, s as sessions } from "../schema-B9goOieO.mjs";
21
- import { n as SessionEventStorageSubjects, t as SessionEventStorageNamespace } from "../namespace-D4Uf5Mw_.mjs";
21
+ import { n as SessionEventStorageSubjects, t as SessionEventStorageNamespace } from "../namespace-Dc94fHZW.mjs";
22
22
  import { t as TurnStorageNamespace } from "../namespace-D1_9WVCo.mjs";
23
23
  import { n as TurnStorageSubjects } from "../namespace-DAj_riOn.mjs";
24
- import { i as MessageStorageSubjects, r as MessageStorageNamespace } from "../namespace-JFzrlNs4.mjs";
24
+ import { i as MessageStorageSubjects, r as MessageStorageNamespace } from "../namespace-CZK2ff3B.mjs";
25
25
  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-Cr9lh21j.mjs";
26
26
  import { t as ToolApprovalService } from "../index-BvLXySoB2.mjs";
27
27
  import { t as TrayMenuService } from "../index-DUD7wikz2.mjs";
28
- import { a as TrayMenuGroupSchema, c as TrayMenuListEntry, d as TrayMenuSchemas, f as TrayMenuSectionSchema, i as TrayMenuGroupEntrySchema, l as TrayMenuListEntrySchema, n as TrayMenuEntrySchema, o as TrayMenuItemClicked, r as TrayMenuGroup, s as TrayMenuItemClickedSchema, t as TrayMenuEntry, u as TrayMenuMetadataSchema } from "../schemas-CW6YsPT4.mjs";
29
- import { n as TrayMenuSubjects, t as TrayMenuNamespace } from "../namespace-C74bbsdZ.mjs";
28
+ import { a as TrayMenuGroupSchema, c as TrayMenuListEntry, d as TrayMenuSchemas, f as TrayMenuSectionSchema, i as TrayMenuGroupEntrySchema, l as TrayMenuListEntrySchema, n as TrayMenuEntrySchema, o as TrayMenuItemClicked, r as TrayMenuGroup, s as TrayMenuItemClickedSchema, t as TrayMenuEntry, u as TrayMenuMetadataSchema } from "../schemas-lnE9YoG7.mjs";
29
+ import { n as TrayMenuSubjects, t as TrayMenuNamespace } from "../namespace-j7vFsmYL.mjs";
30
30
  import { C as ModelRegistrySchemas, S as ModelRegistrySchema, T as ProviderModelOverrideSchema, _ as ModelRegistryGetLabModelsResponse, a as ModelRegistryService, b as ModelRegistryRefreshRequest, c as IModelRegistryFetcher, d as ModelRegistry, f as ModelRegistryCheckModelInProvidersRequest, g as ModelRegistryGetLabModelsRequest, h as ModelRegistryGetForProviderResponse, i as ModelRegistryProviderNotFoundError, l as ModelRegistryNamespace, m as ModelRegistryGetForProviderRequest, n as CachedRegistryFetcher, o as ModelRegistryServiceOptions, p as ModelRegistryCheckModelInProvidersResponse, r as FallbackRegistryFetcher, s as IModelRegistryCache, t as mergeModelMetadata, u as ModelRegistrySubjects, v as ModelRegistryGetProviderModelsRequest, w as ProviderModelOverride, x as ModelRegistryRefreshResponse, y as ModelRegistryGetProviderModelsResponse } from "../index-OGIC4puQ.mjs";
31
31
  import { a as InternalPendingRequest, c as SubagentServiceToken, i as InputResolver, l as subagentServicePackage, n as TrackOptions, o as SpawnOptions, r as AwaitResult, s as TrackedSubagent, t as SubagentManager, u as SubagentService } from "../index-C23g_M_J2.mjs";
32
- import { a as PreferenceValueSchema, i as PreferenceKeySchema, n as PreferenceItemSchema, o as PreferencesSchemas, r as PreferenceKey, t as PreferenceItem } from "../schemas-DnmbwE_V.mjs";
33
- import { n as PreferencesSubjects, t as PreferencesNamespace } from "../storage-namespace-BvRF22by.mjs";
34
- 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-9S9Y9PHT2.mjs";
35
- import { n as SubagentTemplateSubjects, t as SubagentTemplateKernelNamespace } from "../namespace-6sIu5nBI2.mjs";
32
+ import { a as PreferenceValueSchema, i as PreferenceKeySchema, n as PreferenceItemSchema, o as PreferencesSchemas, r as PreferenceKey, t as PreferenceItem } from "../schemas-DWfo0wp4.mjs";
33
+ import { n as PreferencesSubjects, t as PreferencesNamespace } from "../storage-namespace-Di1A3DMm.mjs";
34
+ 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-Br-rSxPE2.mjs";
35
+ import { n as SubagentTemplateSubjects, t as SubagentTemplateKernelNamespace } from "../namespace-D8P8Sxce2.mjs";
36
36
  import * as _$zod from "zod";
37
37
  import { z } from "zod";
38
38
  import * as _$_makaio_core0 from "@makaio/framework/core";
@@ -1390,8 +1390,8 @@ declare const FrameworkServicesCoreNamespaces: readonly [_$_makaio_core0.BusName
1390
1390
  name: _$zod.ZodString;
1391
1391
  endpointOverrides: _$zod.ZodOptional<_$zod.ZodRecord<_$zod.ZodString, _$zod.ZodString>>;
1392
1392
  modelVisibility: _$zod.ZodOptional<_$zod.ZodRecord<_$zod.ZodString, _$zod.ZodEnum<{
1393
- enabled: "enabled";
1394
1393
  disabled: "disabled";
1394
+ enabled: "enabled";
1395
1395
  visible: "visible";
1396
1396
  }>>>;
1397
1397
  modelFilterMode: _$zod.ZodEnum<{
@@ -1417,8 +1417,8 @@ declare const FrameworkServicesCoreNamespaces: readonly [_$_makaio_core0.BusName
1417
1417
  name: _$zod.ZodString;
1418
1418
  endpointOverrides: _$zod.ZodOptional<_$zod.ZodRecord<_$zod.ZodString, _$zod.ZodString>>;
1419
1419
  modelVisibility: _$zod.ZodOptional<_$zod.ZodRecord<_$zod.ZodString, _$zod.ZodEnum<{
1420
- enabled: "enabled";
1421
1420
  disabled: "disabled";
1421
+ enabled: "enabled";
1422
1422
  visible: "visible";
1423
1423
  }>>>;
1424
1424
  modelFilterMode: _$zod.ZodEnum<{
@@ -1444,8 +1444,8 @@ declare const FrameworkServicesCoreNamespaces: readonly [_$_makaio_core0.BusName
1444
1444
  name: _$zod.ZodString;
1445
1445
  endpointOverrides: _$zod.ZodOptional<_$zod.ZodRecord<_$zod.ZodString, _$zod.ZodString>>;
1446
1446
  modelVisibility: _$zod.ZodOptional<_$zod.ZodRecord<_$zod.ZodString, _$zod.ZodEnum<{
1447
- enabled: "enabled";
1448
1447
  disabled: "disabled";
1448
+ enabled: "enabled";
1449
1449
  visible: "visible";
1450
1450
  }>>>;
1451
1451
  modelFilterMode: _$zod.ZodEnum<{
@@ -1508,8 +1508,8 @@ declare const FrameworkServicesCoreNamespaces: readonly [_$_makaio_core0.BusName
1508
1508
  name: _$zod.ZodString;
1509
1509
  endpointOverrides: _$zod.ZodOptional<_$zod.ZodRecord<_$zod.ZodString, _$zod.ZodString>>;
1510
1510
  modelVisibility: _$zod.ZodOptional<_$zod.ZodRecord<_$zod.ZodString, _$zod.ZodEnum<{
1511
- enabled: "enabled";
1512
1511
  disabled: "disabled";
1512
+ enabled: "enabled";
1513
1513
  visible: "visible";
1514
1514
  }>>>;
1515
1515
  modelFilterMode: _$zod.ZodEnum<{
@@ -1657,8 +1657,8 @@ declare const FrameworkServicesCoreNamespaces: readonly [_$_makaio_core0.BusName
1657
1657
  openai: _$zod.ZodOptional<_$zod.ZodString>;
1658
1658
  }, _$zod_v4_core0.$strip>>;
1659
1659
  modelVisibility: _$zod.ZodOptional<_$zod.ZodRecord<_$zod.ZodString, _$zod.ZodEnum<{
1660
- enabled: "enabled";
1661
1660
  disabled: "disabled";
1661
+ enabled: "enabled";
1662
1662
  visible: "visible";
1663
1663
  }>>>;
1664
1664
  modelFilterMode: _$zod.ZodOptional<_$zod.ZodEnum<{
@@ -1674,8 +1674,8 @@ declare const FrameworkServicesCoreNamespaces: readonly [_$_makaio_core0.BusName
1674
1674
  name: _$zod.ZodString;
1675
1675
  endpointOverrides: _$zod.ZodOptional<_$zod.ZodRecord<_$zod.ZodString, _$zod.ZodString>>;
1676
1676
  modelVisibility: _$zod.ZodOptional<_$zod.ZodRecord<_$zod.ZodString, _$zod.ZodEnum<{
1677
- enabled: "enabled";
1678
1677
  disabled: "disabled";
1678
+ enabled: "enabled";
1679
1679
  visible: "visible";
1680
1680
  }>>>;
1681
1681
  modelFilterMode: _$zod.ZodEnum<{
@@ -1700,8 +1700,8 @@ declare const FrameworkServicesCoreNamespaces: readonly [_$_makaio_core0.BusName
1700
1700
  openai: _$zod.ZodOptional<_$zod.ZodString>;
1701
1701
  }, _$zod_v4_core0.$strip>>>;
1702
1702
  modelVisibility: _$zod.ZodOptional<_$zod.ZodRecord<_$zod.ZodString, _$zod.ZodEnum<{
1703
- enabled: "enabled";
1704
1703
  disabled: "disabled";
1704
+ enabled: "enabled";
1705
1705
  visible: "visible";
1706
1706
  }>>>;
1707
1707
  enabled: _$zod.ZodOptional<_$zod.ZodBoolean>;
@@ -1714,8 +1714,8 @@ declare const FrameworkServicesCoreNamespaces: readonly [_$_makaio_core0.BusName
1714
1714
  name: _$zod.ZodString;
1715
1715
  endpointOverrides: _$zod.ZodOptional<_$zod.ZodRecord<_$zod.ZodString, _$zod.ZodString>>;
1716
1716
  modelVisibility: _$zod.ZodOptional<_$zod.ZodRecord<_$zod.ZodString, _$zod.ZodEnum<{
1717
- enabled: "enabled";
1718
1717
  disabled: "disabled";
1718
+ enabled: "enabled";
1719
1719
  visible: "visible";
1720
1720
  }>>>;
1721
1721
  modelFilterMode: _$zod.ZodEnum<{
@@ -1742,8 +1742,8 @@ declare const FrameworkServicesCoreNamespaces: readonly [_$_makaio_core0.BusName
1742
1742
  name: _$zod.ZodString;
1743
1743
  endpointOverrides: _$zod.ZodOptional<_$zod.ZodRecord<_$zod.ZodString, _$zod.ZodString>>;
1744
1744
  modelVisibility: _$zod.ZodOptional<_$zod.ZodRecord<_$zod.ZodString, _$zod.ZodEnum<{
1745
- enabled: "enabled";
1746
1745
  disabled: "disabled";
1746
+ enabled: "enabled";
1747
1747
  visible: "visible";
1748
1748
  }>>>;
1749
1749
  modelFilterMode: _$zod.ZodEnum<{
@@ -1777,8 +1777,8 @@ declare const FrameworkServicesCoreNamespaces: readonly [_$_makaio_core0.BusName
1777
1777
  name: _$zod.ZodString;
1778
1778
  endpointOverrides: _$zod.ZodOptional<_$zod.ZodRecord<_$zod.ZodString, _$zod.ZodString>>;
1779
1779
  modelVisibility: _$zod.ZodOptional<_$zod.ZodRecord<_$zod.ZodString, _$zod.ZodEnum<{
1780
- enabled: "enabled";
1781
1780
  disabled: "disabled";
1781
+ enabled: "enabled";
1782
1782
  visible: "visible";
1783
1783
  }>>>;
1784
1784
  modelFilterMode: _$zod.ZodEnum<{
@@ -1809,8 +1809,8 @@ declare const FrameworkServicesCoreNamespaces: readonly [_$_makaio_core0.BusName
1809
1809
  name: _$zod.ZodString;
1810
1810
  endpointOverrides: _$zod.ZodOptional<_$zod.ZodRecord<_$zod.ZodString, _$zod.ZodString>>;
1811
1811
  modelVisibility: _$zod.ZodOptional<_$zod.ZodRecord<_$zod.ZodString, _$zod.ZodEnum<{
1812
- enabled: "enabled";
1813
1812
  disabled: "disabled";
1813
+ enabled: "enabled";
1814
1814
  visible: "visible";
1815
1815
  }>>>;
1816
1816
  modelFilterMode: _$zod.ZodEnum<{
@@ -1914,8 +1914,8 @@ declare const FrameworkServicesCoreNamespaces: readonly [_$_makaio_core0.BusName
1914
1914
  name: _$zod.ZodString;
1915
1915
  endpointOverrides: _$zod.ZodOptional<_$zod.ZodRecord<_$zod.ZodString, _$zod.ZodString>>;
1916
1916
  modelVisibility: _$zod.ZodOptional<_$zod.ZodRecord<_$zod.ZodString, _$zod.ZodEnum<{
1917
- enabled: "enabled";
1918
1917
  disabled: "disabled";
1918
+ enabled: "enabled";
1919
1919
  visible: "visible";
1920
1920
  }>>>;
1921
1921
  modelFilterMode: _$zod.ZodEnum<{
@@ -1934,8 +1934,8 @@ declare const FrameworkServicesCoreNamespaces: readonly [_$_makaio_core0.BusName
1934
1934
  name: _$zod.ZodString;
1935
1935
  endpointOverrides: _$zod.ZodOptional<_$zod.ZodRecord<_$zod.ZodString, _$zod.ZodString>>;
1936
1936
  modelVisibility: _$zod.ZodOptional<_$zod.ZodRecord<_$zod.ZodString, _$zod.ZodEnum<{
1937
- enabled: "enabled";
1938
1937
  disabled: "disabled";
1938
+ enabled: "enabled";
1939
1939
  visible: "visible";
1940
1940
  }>>>;
1941
1941
  modelFilterMode: _$zod.ZodEnum<{
@@ -2395,9 +2395,9 @@ declare const FrameworkServicesCoreNamespaces: readonly [_$_makaio_core0.BusName
2395
2395
  status: _$zod.ZodEnum<{
2396
2396
  completed: "completed";
2397
2397
  cancelled: "cancelled";
2398
+ failed: "failed";
2398
2399
  running: "running";
2399
2400
  waiting_input: "waiting_input";
2400
- failed: "failed";
2401
2401
  }>;
2402
2402
  result: _$zod.ZodOptional<_$zod.ZodString>;
2403
2403
  error: _$zod.ZodOptional<_$zod.ZodString>;
@@ -3263,9 +3263,9 @@ declare const FrameworkServicesCoreNamespaces: readonly [_$_makaio_core0.BusName
3263
3263
  changed: _$zod.ZodObject<{
3264
3264
  ruleId: _$zod.ZodString;
3265
3265
  changeType: _$zod.ZodEnum<{
3266
- deleted: "deleted";
3267
- created: "created";
3268
3266
  updated: "updated";
3267
+ created: "created";
3268
+ deleted: "deleted";
3269
3269
  }>;
3270
3270
  previous: _$zod.ZodNullable<_$zod.ZodObject<{
3271
3271
  scope: _$zod.ZodEnum<{
@@ -3815,8 +3815,8 @@ declare const FrameworkServicesCoreNamespaces: readonly [_$_makaio_core0.BusName
3815
3815
  id: _$zod.ZodString;
3816
3816
  config: _$zod.ZodOptional<_$zod.ZodRecord<_$zod.ZodString, _$zod.ZodUnknown>>;
3817
3817
  enabled: _$zod.ZodBoolean;
3818
- extensionName: _$zod.ZodString;
3819
3818
  scope: _$zod.ZodString;
3819
+ extensionName: _$zod.ZodString;
3820
3820
  }, _$zod_v4_core0.$strip>;
3821
3821
  }, _$zod_v4_core0.$strip>;
3822
3822
  response: _$zod.ZodObject<{
@@ -3863,18 +3863,18 @@ declare const FrameworkServicesCoreNamespaces: readonly [_$_makaio_core0.BusName
3863
3863
  changed: _$zod.ZodObject<{
3864
3864
  path: _$zod.ZodString;
3865
3865
  kind: _$zod.ZodEnum<{
3866
+ change: "change";
3866
3867
  delete: "delete";
3867
3868
  create: "create";
3868
- change: "change";
3869
3869
  }>;
3870
3870
  }, _$zod_v4_core0.$strip>;
3871
3871
  batch: _$zod.ZodObject<{
3872
3872
  changes: _$zod.ZodArray<_$zod.ZodObject<{
3873
3873
  path: _$zod.ZodString;
3874
3874
  kind: _$zod.ZodEnum<{
3875
+ change: "change";
3875
3876
  delete: "delete";
3876
3877
  create: "create";
3877
- change: "change";
3878
3878
  }>;
3879
3879
  }, _$zod_v4_core0.$strip>>;
3880
3880
  }, _$zod_v4_core0.$strip>;
@@ -5122,9 +5122,9 @@ declare const FrameworkServicesCoreNamespaces: readonly [_$_makaio_core0.BusName
5122
5122
  scope: _$zod.ZodString;
5123
5123
  context: _$zod.ZodOptional<_$zod.ZodString>;
5124
5124
  viewport: _$zod.ZodOptional<_$zod.ZodEnum<{
5125
- mobile: "mobile";
5126
5125
  desktop: "desktop";
5127
5126
  tablet: "tablet";
5127
+ mobile: "mobile";
5128
5128
  }>>;
5129
5129
  }, _$zod_v4_core0.$strip>;
5130
5130
  category: _$zod.ZodString;
@@ -5143,9 +5143,9 @@ declare const FrameworkServicesCoreNamespaces: readonly [_$_makaio_core0.BusName
5143
5143
  scope: _$zod.ZodString;
5144
5144
  context: _$zod.ZodOptional<_$zod.ZodString>;
5145
5145
  viewport: _$zod.ZodOptional<_$zod.ZodEnum<{
5146
- mobile: "mobile";
5147
5146
  desktop: "desktop";
5148
5147
  tablet: "tablet";
5148
+ mobile: "mobile";
5149
5149
  }>>;
5150
5150
  }, _$zod_v4_core0.$strip>;
5151
5151
  category: _$zod.ZodString;
@@ -5165,9 +5165,9 @@ declare const FrameworkServicesCoreNamespaces: readonly [_$_makaio_core0.BusName
5165
5165
  scope: _$zod.ZodString;
5166
5166
  context: _$zod.ZodOptional<_$zod.ZodString>;
5167
5167
  viewport: _$zod.ZodOptional<_$zod.ZodEnum<{
5168
- mobile: "mobile";
5169
5168
  desktop: "desktop";
5170
5169
  tablet: "tablet";
5170
+ mobile: "mobile";
5171
5171
  }>>;
5172
5172
  }, _$zod_v4_core0.$strip>;
5173
5173
  category: _$zod.ZodString;
@@ -5186,9 +5186,9 @@ declare const FrameworkServicesCoreNamespaces: readonly [_$_makaio_core0.BusName
5186
5186
  scope: _$zod.ZodOptional<_$zod.ZodString>;
5187
5187
  context: _$zod.ZodOptional<_$zod.ZodOptional<_$zod.ZodString>>;
5188
5188
  viewport: _$zod.ZodOptional<_$zod.ZodOptional<_$zod.ZodEnum<{
5189
- mobile: "mobile";
5190
5189
  desktop: "desktop";
5191
5190
  tablet: "tablet";
5191
+ mobile: "mobile";
5192
5192
  }>>>;
5193
5193
  }, _$zod_v4_core0.$strip>>;
5194
5194
  category: _$zod.ZodOptional<_$zod.ZodString>;
@@ -5203,9 +5203,9 @@ declare const FrameworkServicesCoreNamespaces: readonly [_$_makaio_core0.BusName
5203
5203
  scope: _$zod.ZodString;
5204
5204
  context: _$zod.ZodOptional<_$zod.ZodString>;
5205
5205
  viewport: _$zod.ZodOptional<_$zod.ZodEnum<{
5206
- mobile: "mobile";
5207
5206
  desktop: "desktop";
5208
5207
  tablet: "tablet";
5208
+ mobile: "mobile";
5209
5209
  }>>;
5210
5210
  }, _$zod_v4_core0.$strip>;
5211
5211
  category: _$zod.ZodString;
@@ -5784,9 +5784,9 @@ declare const FrameworkServicesCoreNamespaces: readonly [_$_makaio_core0.BusName
5784
5784
  groupId: _$zod.ZodString;
5785
5785
  entries: _$zod.ZodArray<_$zod.ZodObject<{
5786
5786
  metadata: _$zod.ZodOptional<_$zod.ZodRecord<_$zod.ZodString, _$zod.ZodUnknown>>;
5787
+ enabled: _$zod.ZodDefault<_$zod.ZodBoolean>;
5787
5788
  label: _$zod.ZodString;
5788
5789
  priority: _$zod.ZodDefault<_$zod.ZodNumber>;
5789
- enabled: _$zod.ZodDefault<_$zod.ZodBoolean>;
5790
5790
  entryId: _$zod.ZodString;
5791
5791
  }, _$zod_v4_core0.$strip>>;
5792
5792
  section: _$zod.ZodEnum<{
@@ -6281,9 +6281,9 @@ declare const FrameworkServicesCoreNamespaces: readonly [_$_makaio_core0.BusName
6281
6281
  status: _$zod.ZodEnum<{
6282
6282
  completed: "completed";
6283
6283
  cancelled: "cancelled";
6284
+ failed: "failed";
6284
6285
  running: "running";
6285
6286
  waiting_input: "waiting_input";
6286
- failed: "failed";
6287
6287
  }>;
6288
6288
  result: _$zod.ZodOptional<_$zod.ZodString>;
6289
6289
  error: _$zod.ZodOptional<_$zod.ZodString>;
@@ -6343,8 +6343,8 @@ declare const FrameworkServicesCoreNamespaces: readonly [_$_makaio_core0.BusName
6343
6343
  model: _$zod.ZodOptional<_$zod.ZodString>;
6344
6344
  systemPrompt: _$zod.ZodOptional<_$zod.ZodString>;
6345
6345
  contextMode: _$zod.ZodDefault<_$zod.ZodEnum<{
6346
- fork: "fork";
6347
6346
  fresh: "fresh";
6347
+ fork: "fork";
6348
6348
  }>>;
6349
6349
  allowedTools: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
6350
6350
  disallowedTools: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
@@ -6358,8 +6358,8 @@ declare const FrameworkServicesCoreNamespaces: readonly [_$_makaio_core0.BusName
6358
6358
  create: {
6359
6359
  request: _$zod.ZodObject<{
6360
6360
  name: _$zod.ZodString;
6361
- adapterName: _$zod.ZodString;
6362
6361
  enabled: _$zod.ZodDefault<_$zod.ZodBoolean>;
6362
+ adapterName: _$zod.ZodString;
6363
6363
  providerConfigId: _$zod.ZodOptional<_$zod.ZodString>;
6364
6364
  model: _$zod.ZodOptional<_$zod.ZodString>;
6365
6365
  systemPrompt: _$zod.ZodOptional<_$zod.ZodString>;
@@ -6367,8 +6367,8 @@ declare const FrameworkServicesCoreNamespaces: readonly [_$_makaio_core0.BusName
6367
6367
  disallowedTools: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
6368
6368
  allowedDirectories: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
6369
6369
  contextMode: _$zod.ZodDefault<_$zod.ZodEnum<{
6370
- fork: "fork";
6371
6370
  fresh: "fresh";
6371
+ fork: "fork";
6372
6372
  }>>;
6373
6373
  }, _$zod_v4_core0.$strip>;
6374
6374
  response: _$zod.ZodObject<{
@@ -6384,8 +6384,8 @@ declare const FrameworkServicesCoreNamespaces: readonly [_$_makaio_core0.BusName
6384
6384
  model: _$zod.ZodOptional<_$zod.ZodOptional<_$zod.ZodString>>;
6385
6385
  systemPrompt: _$zod.ZodOptional<_$zod.ZodOptional<_$zod.ZodString>>;
6386
6386
  contextMode: _$zod.ZodOptional<_$zod.ZodDefault<_$zod.ZodEnum<{
6387
- fork: "fork";
6388
6387
  fresh: "fresh";
6388
+ fork: "fork";
6389
6389
  }>>>;
6390
6390
  allowedTools: _$zod.ZodOptional<_$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>>;
6391
6391
  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{n,t as r}from"../schema-CHp6I33k.mjs";import{t as i}from"../schema-7aKBGB7S.mjs";import{i as a,n as o,r as s,t as c}from"../namespace-dFBD2ZmS.mjs";import{A as l,B as u,C as d,D as f,E as p,F as m,I as h,M as ee,N as te,O as ne,P as re,T as ie,V as ae,_ as oe,a as se,b as ce,c as le,d as ue,f as de,g as fe,h as pe,i as me,j as he,k as ge,l as _e,m as ve,n as ye,o as be,p as xe,r as Se,s as Ce,t as we,u as Te,v as Ee,w as De,x as Oe,y as ke}from"../handlers-B74FvKlA.mjs";import{TurnStorageNamespace as Ae,TurnStorageSubjects as je}from"./turn/namespace.mjs";import{SessionStorageNamespace as Me,SessionStorageSubjects as Ne}from"./session/storage/namespace.mjs";import{$ as g,A as _,B as v,C as y,D as b,E as Pe,F as Fe,G as Ie,H as Le,I as Re,J as ze,K as x,L as Be,M as Ve,O as He,P as Ue,Q as We,R as Ge,S as Ke,T as qe,U as Je,V as Ye,W as Xe,X as Ze,Y as Qe,Z as $e,a as et,b as tt,c as nt,et as rt,i as it,j as at,k as ot,l as st,o as ct,q as lt,r as ut,s as dt,t as ft,u as pt,w as mt,x as ht,y as gt,z as _t}from"../session-CZUrp7gC.mjs";import{t as vt}from"../namespace-DBHwyhME.mjs";import{n as yt,r as bt,t as xt}from"../provider-context-DC_eq7es.mjs";import{AdapterRuntimeSchemas as St,ResolveIdRequestSchema as Ct,ResolveIdResponseSchema as wt,ResolveNameRequestSchema as Tt,ResolveNameResponseSchema as Et}from"./adapter-runtime/schemas.mjs";import{AdapterRuntimeNamespace as S,AdapterRuntimeSubjects as Dt}from"./adapter-runtime/namespace.mjs";import{ProviderStorageNamespace as Ot}from"./settings/storage/providers-namespace.mjs";import{ContainerIsolatedExecutionTargetSchema as kt,ContainerLocalExecutionTargetSchema as At,ExecutionTargetInputSchema as jt,ExecutionTargetListQuerySchema as Mt,ExecutionTargetResolveRequestSchema as Nt,ExecutionTargetSchema as Pt,ExecutionTargetSchemas as Ft,ExecutionTargetTypeSchema as It,LocalExecutionTargetSchema as Lt}from"./execution-target/schemas.mjs";import{ExecutionTargetNamespace as C,ExecutionTargetSubjects as Rt}from"./execution-target/namespace.mjs";import{MessageStorageNamespace as zt,MessageStorageSubjects as Bt}from"./session/messages/namespace.mjs";import{TurnStorageNamespace as Vt}from"./session/turns/namespace.mjs";import{BugEntrySchema as Ht,CompressRequestSchema as Ut,CompressResponseSchema as Wt,CompressionEventSchema as Gt,CompressionSchemas as Kt,ExtractedContextSchema as qt,TechnicalDetailsSchema as Jt,TodoEntrySchema as Yt}from"./compression/schemas.mjs";import{PreferenceItemSchema as Xt,PreferenceKeySchema as Zt,PreferenceValueSchema as Qt,PreferencesSchemas as $t}from"./preferences/schemas.mjs";import{PreferencesNamespace as w,PreferencesSubjects as en}from"./preferences/storage-namespace.mjs";import{t as tn}from"../namespace-wke7juzy.mjs";import{A as nn,B as rn,C as an,D as on,E as sn,F as cn,G as ln,H as un,I as dn,J as fn,K as pn,L as mn,M as hn,N as gn,O as _n,P as vn,R as yn,S as bn,T as xn,U as Sn,V as Cn,W as wn,Y as Tn,_ as En,a as T,b as Dn,c as On,d as kn,f as An,g as E,h as jn,i as D,j as Mn,k as O,l as Nn,m as Pn,o as Fn,p as k,q as In,r as Ln,s as A,u as Rn,v as j,w as zn,x as Bn,y as Vn,z as Hn}from"../tools-Yz8XyiwA.mjs";import{t as Un}from"../capability-service-XlymTzz1.mjs";import{a as Wn,c as Gn,i as Kn,l as qn,n as Jn,o as M,r as Yn,s as Xn,t as Zn,u as Qn}from"../model-registry-rYICIwyR.mjs";import{t as $n}from"../tool-approval-service-BIbUSuqg.mjs";import{TrayMenuEntrySchema as er,TrayMenuGroupEntrySchema as tr,TrayMenuGroupSchema as nr,TrayMenuItemClickedSchema as rr,TrayMenuListEntrySchema as ir,TrayMenuMetadataSchema as ar,TrayMenuSchemas as or,TrayMenuSectionSchema as sr}from"./tray-menu/schemas.mjs";import{TrayMenuNamespace as N,TrayMenuSubjects as cr}from"./tray-menu/namespace.mjs";import{t as lr}from"../tray-menu-service-B2AxiQqL.mjs";import{n as ur}from"../handler-BFNvtv5t.mjs";import{i as dr,n as fr,r as pr,t as mr}from"../package-CF_Zm2v4.mjs";import{FsNamespace as hr}from"./filesystem/namespace.mjs";import"./capability/index.mjs";import"./tool-approval/index.mjs";import"./tray-menu/index.mjs";import"./subagent/index.mjs";import{AgentInstanceStatusSchema as gr,AgentRuntimeSchemas as _r,AgentRuntimeSelectionSchema as vr}from"./agent-runtime/schemas.mjs";import{AgentRuntimeNamespace as P,AgentRuntimeSubjects as yr}from"./agent-runtime/namespace.mjs";import{CodebaseChangedEventSchema as br,CodebaseSchemas as xr}from"./codebase/schemas.mjs";import{CodebaseNamespace as F,CodebaseSubjects as Sr}from"./codebase/namespace.mjs";import{CompressionNamespace as I,CompressionSubjects as Cr}from"./compression/namespace.mjs";import{r as wr,t as Tr}from"../storage-namespace-D5q9CrBp.mjs";import{DefinitionNamespace as Er}from"./definition/namespace.mjs";import{DialogNamespace as Dr}from"./dialog/namespace.mjs";import{_ as Or,c as kr,d as Ar,f as jr,g as Mr,h as Nr,i as Pr,l as Fr,m as Ir,n as Lr,o as Rr,p as zr,r as L,s as Br,t as Vr,u as Hr,v as Ur,y as Wr}from"../execution-target-BR8bLkCR.mjs";import{CLIDetectionNamespace as Gr}from"./cli-detection/namespace.mjs";import{LocalNotificationNamespace as Kr}from"./local-notification/namespace.mjs";import{t as qr}from"../namespace-CVMZVqB5.mjs";import{ExtensionConfigStorageNamespace as Jr}from"./settings/storage/extension-configs/namespace.mjs";import{ClientStorageNamespace as Yr}from"./settings/storage/clients-namespace.mjs";import{SubagentTemplateCompletedEventSchema as Xr,SubagentTemplateCreateSchema as Zr,SubagentTemplateInstanceSchema as Qr,SubagentTemplateInstanceStatusSchema as $r,SubagentTemplateKernelSchemas as ei,SubagentTemplateSchema as ti,SubagentTemplateSettingsSchemas as ni,SubagentTemplateSpawnRequestSchema as ri,SubagentTemplateSpawnedEventSchema as ii,SubagentTemplateSummarySchema as ai,SubagentTemplateUpdateSchema as oi}from"./subagent-template/schemas.mjs";import{r as si,t as ci}from"../namespace-BO3tODGC.mjs";import{SubagentTemplateKernelNamespace as R,SubagentTemplateSubjects as li}from"./subagent-template/namespace.mjs";import{i as ui,n as di,r as fi,t as pi}from"../identity-DC3Pk0ps.mjs";import"./adapter-runtime/index.mjs";import"./agent-runtime/index.mjs";import"./codebase/index.mjs";import"./compression/index.mjs";import"./preferences/index.mjs";import"./subagent-template/index.mjs";import{ArtifactSubjects as mi}from"@makaio/framework/contracts";import{ImportCursorStorageNamespace as hi}from"@makaio/framework/adapters";import{ModelRegistryPublicNamespace as gi}from"@makaio/framework/contracts/model-registry";function _i(e){return{source:`extension`,ownerKey:`extension:${e}`}}function vi(e,t){for(let n of e.values())if(n.registry===t)for(let e of n.registrations)t.registerKind(e,n.owner)}function yi(){let e=new Map,t=t=>{let n=e.get(t);if(n){e.delete(t);for(let e=n.registrations.length-1;e>=0;--e){let t=n.registrations[e];n.registry.deregisterKind(t.kind,t.schemaVersion,n.owner)}vi(e,n.registry)}};return{filter:e=>(e.artifactKinds?.kinds?.length??0)>0,async processActivated(n,r,i){let a=i.getService(T);if(!a)throw Error(`ArtifactSchemaRegistry is not available — ensure artifact-schema-registry is started before extensions with artifactKinds.`);let o=(r.artifactKinds?.kinds??[]).map(e=>e.toRegistration()),s=_i(n);t(n);for(let e of o)a.registerKind(e,s);e.set(n,{registry:a,owner:s,registrations:o})},async processStopped(e){try{t(e)}catch(t){console.error(`[ArtifactContributionProcessor] Deregister error for "${e}":`,t)}}}}function bi(e,t,n){return{...n,filter:{...n.filter,kind:e,schemaVersion:t}}}function xi(){let e=new Map,t=t=>{let n=e.get(t);n&&(e.delete(t),n.cleanup())};return{filter:e=>{let t=e.artifactLifecycleHooks!=null,n=(e.artifactKinds?.kinds??[]).some(e=>(e.hooks?.hooks.length??0)>0);return t||n},async processActivated(n,r,i){let a=i.getService(D);if(!a)throw Error(`ArtifactLifecycleHookRegistry is not available — ensure artifact-lifecycle-hook-registry is started before extensions with artifact lifecycle hooks.`);let o=r.artifactLifecycleHooks?[...await r.artifactLifecycleHooks.createHooks({bus:i.bus,extensionName:n})]:[],s=[];for(let e of r.artifactKinds?.kinds??[])if(e.hooks)for(let t of e.hooks.hooks)s.push(bi(e.kind,e.schemaVersion,t));let c=[...o,...s];t(n);let l=a.registerHooks(n,c);e.set(n,{cleanup:l})},async processStopped(e){try{t(e)}catch(t){console.error(`[ArtifactLifecycleHookContributionProcessor] Deregister error for "${e}":`,t)}}}}async function Si(e){let t=e.maxDepth??5,n={bus:e.bus,kindRegistry:e.kindRegistry,maxDepth:t,resolvedByKey:new Map,kindDefaultsCache:new Map,walkedByKey:new Set,refIndexByKey:new Map,refMetadataByKey:new Map,resolved:[],refs:[]},r=await B(n,e.ref);if(!r)throw Error(`artifact.resolveContext: root artifact '${e.ref.kind}:${e.ref.id}:${e.ref.revision}' not found`);return n.resolved.push(r),await z(n,r,H(await V(n,r),e.selectors),0,new Set([Z(e.ref)])),{rootRef:e.ref,refs:n.refs,resolved:n.resolved}}async function z(e,t,n,r,i){let a=Mi(t,n,r,i);if(e.walkedByKey.has(a))return;e.walkedByKey.add(a);let o=ki(t);for(let a of t.relations)await Ci(e,o,a,n,r,i)}async function Ci(e,t,n,r,i,a){let o=r?.[n.type];if(o?.hint===`omit`)return;let s=o?.hint??`link`;if(!wi(o,n.target)){W(e,U(t,n,s,`not-selected`));return}if(n.target.refClass!==`artifact`){W(e,U(t,n,s,`unsupported-ref-class`));return}let c=Z(n.target),l=a.has(c);if(i>=e.maxDepth&&!l){W(e,U(t,n,s,`depth-exceeded`));return}let u=e.resolvedByKey.has(c),d=await B(e,n.target);if(!d){W(e,U(t,n,s,`not-found`));return}if(W(e,{sourceRef:t,target:n.target,relationType:n.type,hint:s,status:`resolved`},{resolvedViaBackEdge:l}),u||e.resolved.push(d),l)return;let f=(o.depth??1)-1,p=f>0?{[n.type]:{...o,depth:f}}:void 0,m=H(H(await V(e,d),p),o.nested),h=new Set(a);h.add(c),await z(e,d,m,i+1,h)}async function B(e,t){let n=Z(t);if(e.resolvedByKey.has(n))return e.resolvedByKey.get(n)??null;let{artifact:r}=await e.bus.request(mi.resolve,{ref:t});return e.resolvedByKey.set(n,r),r}async function V(e,t){let n=JSON.stringify([t.kind,t.schemaVersion]);if(e.kindDefaultsCache.has(n))return e.kindDefaultsCache.get(n);let r=(await e.kindRegistry.getKind(t.kind,t.schemaVersion))?.defaultContext;return e.kindDefaultsCache.set(n,r),r}function H(e,t){if(!t)return e;if(!e)return t;let n={...e};for(let[e,r]of Object.entries(t))n[e]=r;return n}function wi(e,t){return e?e.kinds?e.kinds.includes(Ti(t)):!0:!1}function Ti(e){return e.refClass===`local`?e.artifact.kind:e.kind}function U(e,t,n,r){return{sourceRef:e,target:t.target,relationType:t.type,hint:n,status:`unresolved`,reason:r}}function W(e,t,n){let r=Ai(t),i=e.refIndexByKey.get(r);if(i===void 0){e.refIndexByKey.set(r,e.refs.length),J(e,r,t,n),e.refs.push(t);return}let a=e.refs[i];if(a){if(t.status===`unresolved`&&t.reason===`depth-exceeded`){if(!Ei(a,Oi(e,r)))return;q(e,i,r,t,n);return}if(a.status===`unresolved`&&a.reason===`depth-exceeded`){if(t.status===`resolved`&&X(n)||t.status===`unresolved`&&!G(t.reason,a.reason))return;q(e,i,r,t,n);return}if(t.status===`unresolved`&&a.status===`unresolved`){G(t.reason,a.reason)&&q(e,i,r,t,n);return}if(t.status===`resolved`&&a.status===`unresolved`){q(e,i,r,t,n);return}t.status===`resolved`&&!X(n)&&Y(e,r,n)}}function Ei(e,t){return e.status===`resolved`?t:G(`depth-exceeded`,e.reason)}function G(e,t){return K(e)>K(t)}function K(e){return e===`not-selected`?0:e===`depth-exceeded`?1:2}function q(e,t,n,r,i){J(e,n,r,i),e.refs[t]=r}function J(e,t,n,r){if(n.status===`resolved`){Y(e,t,r);return}Di(e,t)}function Y(e,t,n){e.refMetadataByKey.set(t,n??{resolvedViaBackEdge:!1})}function Di(e,t){e.refMetadataByKey.delete(t)}function Oi(e,t){return X(e.refMetadataByKey.get(t))}function X(e){return e?.resolvedViaBackEdge===!0}function ki(e){return{refClass:`artifact`,kind:e.kind,id:e.id,revision:e.revision}}function Z(e){return JSON.stringify([e.kind,e.id,e.revision])}function Ai(e){return JSON.stringify([Z(e.sourceRef),e.relationType,ji(e.target)])}function ji(e){return e.refClass===`artifact`?JSON.stringify([`artifact`,e.kind,e.id,e.revision]):e.refClass===`local`?JSON.stringify([`local`,Z(e.artifact),e.localId]):JSON.stringify([`evidence`,e.kind,e.id,e.revision??null,e.locator??null])}function Mi(e,t,n,r){return JSON.stringify([e.kind,e.id,e.revision,n,t??null,[...r].sort()])}function Q(e,t){for(let n of e.values())if(n.registry===t)for(let e of n.registrations)t.registerNamespace(e)}function Ni(){let e=new Map,t=(t,n)=>{if(n){for(let e of n.registrations)n.registry.registerNamespace(e);e.set(t,n)}},n=t=>{let n=e.get(t);if(n){e.delete(t);for(let e=n.registrations.length-1;e>=0;--e){let t=n.registrations[e];n.registry.deregisterNamespace(t.namespace)}Q(e,n.registry)}};return{filter:e=>(e.facetNamespaces?.namespaces?.length??0)>0,async processActivated(r,i,a){let o=a.getService(A);if(!o)throw Error(`FacetNamespaceRegistry is not available — ensure facet-namespace-registry is started before extensions with facetNamespaces.`);let s=(i.facetNamespaces?.namespaces??[]).map(e=>e.toRegistration()),c=e.get(r);n(r);let l=[];try{for(let e of s)o.registerNamespace(e),l.push(e)}catch(n){for(let e=l.length-1;e>=0;--e)o.deregisterNamespace(l[e].namespace);throw Q(e,o),t(r,c),n}e.set(r,{registry:o,registrations:s})},async processStopped(e){try{n(e)}catch(t){console.error(`[FacetNamespaceContributionProcessor] Deregister error for "${e}":`,t)}}}}function $(e,t){for(let n of e.values())if(n.registry===t)for(let e of n.registrations)t.registerBinding(e)}function Pi(){let e=new Map,t=(t,n)=>{if(n){for(let e of n.registrations)n.registry.registerBinding(e);e.set(t,n)}},n=t=>{let n=e.get(t);if(n){e.delete(t);for(let e=n.registrations.length-1;e>=0;--e){let t=n.registrations[e];n.registry.deregisterBinding(t.id)}$(e,n.registry)}};return{filter:e=>(e.surfaceBindings?.bindings?.length??0)>0,async processActivated(r,i,a){let o=a.getService(k);if(!o)throw Error(`SurfaceBindingRegistry is not available — ensure surface-binding-registry is started before extensions with surfaceBindings.`);let s=(i.surfaceBindings?.bindings??[]).map(e=>e.toRegistration()),c=e.get(r);n(r);let l=[];try{for(let e of s)o.registerBinding(e),l.push(e)}catch(n){for(let e=l.length-1;e>=0;--e)o.deregisterBinding(l[e].id);throw $(e,o),t(r,c),n}e.set(r,{registry:o,registrations:s})},async processStopped(e){try{n(e)}catch(t){console.error(`[SurfaceBindingContributionProcessor] Deregister error for "${e}":`,t)}}}}function Fi(){let e=new Map;return{filter:e=>!!e.workflowBlocks?.blocks,async processActivated(t,n,r){let i=r.getService(j);if(!i)throw Error(`WorkflowBlockRegistry is not available — ensure workflow-block-registry is started before extensions with workflowBlocks.`);await i.register(t,n.workflowBlocks.blocks),e.set(t,()=>i.deregister(t))},async processStopped(t){let n=e.get(t);if(n){try{await n()}catch(e){console.error(`[WorkflowBlockContributionProcessor] Deregister error for "${t}":`,e)}e.delete(t)}}}}function Ii(){let e=new Map;return{filter:e=>!!(e.transitionRules?.rules?.length||e.transitionActions?.actions),async processActivated(t,n,r){let i=r.getService(E);if(!i)throw Error(`TransitionContributionProcessor: TransitionPipelineService is not available — ensure '${E.name}' is started before extensions with transitionRules or transitionActions.`);let a=n.transitionRules?.rules??[],o=n.transitionActions?.actions,s=a.length>0,c=o!==void 0;s&&Li(t,a),c&&Ri(t,o);let l=!1,u=!1;try{s&&(i.ruleRegistry.register(t,a),l=!0),c&&(i.actionRegistry.register(t,o),u=!0)}catch(e){throw l&&i.ruleRegistry.deregister(t),u&&i.actionRegistry.deregister(t),e}e.set(t,()=>{s&&i.ruleRegistry.deregister(t),c&&i.actionRegistry.deregister(t)})},async processStopped(t){let n=e.get(t);if(n){try{n()}catch(e){console.error(`[TransitionContributionProcessor] Deregister error for "${t}":`,e)}e.delete(t)}}}}function Li(e,t){let n=`${e}.`;for(let e of t)if(!e.id.startsWith(n))throw Error(`TransitionContributionProcessor: rule '${e.id}' must be namespaced by extension '${n}'`)}function Ri(e,t){let n=`${e}.`;for(let e of Object.keys(t))if(!e.startsWith(n))throw Error(`TransitionContributionProcessor: action type '${e}' must be namespaced by extension '${n}'`)}const zi=[S,vt,P,m,Gr,Yr,F,I,wr,Tr,Er,Dr,L,C,Jr,hr,ur,hi,Kr,x,M,gi,w,qr,Ot,tn,ci,N,Ae,R,si];export{pi as AdapterIdentityRegistry,We as AdapterRegistry,S as AdapterRuntimeNamespace,St as AdapterRuntimeSchemas,Dt as AdapterRuntimeSubjects,gr as AgentInstanceStatusSchema,P as AgentRuntimeNamespace,_r as AgentRuntimeSchemas,vr as AgentRuntimeSelectionSchema,yr as AgentRuntimeSubjects,m as AgentStorageNamespace,h as AgentStorageSubjects,In as ArtifactLifecycleHookRegistry,D as ArtifactLifecycleHookRegistryToken,fn as ArtifactLifecycleHookRejectedError,Tn as ArtifactSchemaRegistry,T as ArtifactSchemaRegistryToken,Ht as BugEntrySchema,Ge as CONNECTOR_SWAP_DEFAULT_PIPELINE,Zn as CachedRegistryFetcher,wn as CanonicalModelResolutionError,Sn as CanonicalModelResolver,un as CanonicalModelService,Un as CapabilityService,Fn as CapabilityToken,br as CodebaseChangedEventSchema,F as CodebaseNamespace,xr as CodebaseSchemas,Sr as CodebaseSubjects,Ut as CompressRequestSchema,Wt as CompressResponseSchema,Gt as CompressionEventSchema,I as CompressionNamespace,Kt as CompressionSchemas,Cr as CompressionSubjects,Rr as ContainerCreatedSchema,Br as ContainerDestroyedSchema,kt as ContainerIsolatedExecutionTargetSchema,kr as ContainerIsolatedSpawnRequestSchema,At as ContainerLocalExecutionTargetSchema,Fr as ContainerLocalSpawnRequestSchema,Hr as ContainerRuntimeSchema,Vr as ContainerSpawnNamespace,Lr as ContainerSpawnSubjects,Ar as ContainerStartedSchema,jr as ContainerStateSchema,zr as ContainerStoppedSchema,ft as ContextWindowTracker,L as DockerNamespace,Pr as DockerSubjects,dt as EmbeddingIndexManager,jt as ExecutionTargetInputSchema,Mt as ExecutionTargetListQuerySchema,C as ExecutionTargetNamespace,Nt as ExecutionTargetResolveRequestSchema,Pt as ExecutionTargetSchema,Ft as ExecutionTargetSchemas,Rt as ExecutionTargetSubjects,It as ExecutionTargetTypeSchema,qt as ExtractedContextSchema,pn as FacetNamespaceRegistry,A as FacetNamespaceRegistryToken,Jn as FallbackRegistryFetcher,zi as FrameworkServicesCoreNamespaces,Lt as LocalExecutionTargetSchema,ct as MakaioSession,g as MakaioSessionService,x as MessageRoutingNamespace,lt as MessageRoutingSubjects,zt as MessageStorageNamespace,Bt as MessageStorageSubjects,M as ModelRegistryNamespace,Yn as ModelRegistryProviderNotFoundError,Gn as ModelRegistrySchema,qn as ModelRegistrySchemas,Kn as ModelRegistryService,Xn as ModelRegistrySubjects,On as ModelRegistryToken,Xt as PreferenceItemSchema,Zt as PreferenceKeySchema,Qt as PreferenceValueSchema,w as PreferencesNamespace,$t as PreferencesSchemas,en as PreferencesSubjects,Qn as ProviderModelOverrideSchema,Ct as ResolveIdRequestSchema,wt as ResolveIdResponseSchema,Tt as ResolveNameRequestSchema,Et as ResolveNameResponseSchema,Re as SessionBridge,Nn as SessionBridgeToken,c as SessionEventStorageNamespace,o as SessionEventStorageSubjects,Ue as SessionExtensionContextImpl,Je as SessionOrchestrator,Rn as SessionOrchestratorToken,Me as SessionStorageNamespace,Ne as SessionStorageSubjects,kn as SessionStorageToken,An as SessionToken,Xe as SessionTurnManager,Ir as SpawnRequestSchema,Nr as SpawnResponseSchema,Mr as StatusRequestSchema,Or as StatusResponseSchema,Ur as StopRequestSchema,Wr as StopResponseSchema,dr as SubagentManager,pr as SubagentService,mr as SubagentServiceToken,Xr as SubagentTemplateCompletedEventSchema,Zr as SubagentTemplateCreateSchema,Qr as SubagentTemplateInstanceSchema,$r as SubagentTemplateInstanceStatusSchema,R as SubagentTemplateKernelNamespace,ei as SubagentTemplateKernelSchemas,ti as SubagentTemplateSchema,ni as SubagentTemplateSettingsSchemas,ri as SubagentTemplateSpawnRequestSchema,ii as SubagentTemplateSpawnedEventSchema,li as SubagentTemplateSubjects,ai as SubagentTemplateSummarySchema,oi as SubagentTemplateUpdateSchema,ln as SurfaceBindingRegistry,k as SurfaceBindingRegistryToken,Jt as TechnicalDetailsSchema,Yt as TodoEntrySchema,$n as ToolApprovalService,Pn as ToolApprovalToken,rn as ToolRegistry,jn as ToolRegistryToken,mn as TransitionActionRegistry,cn as TransitionPipelineService,E as TransitionPipelineToken,dn as TransitionRuleRegistry,er as TrayMenuEntrySchema,tr as TrayMenuGroupEntrySchema,nr as TrayMenuGroupSchema,rr as TrayMenuItemClickedSchema,ir as TrayMenuListEntrySchema,ar as TrayMenuMetadataSchema,N as TrayMenuNamespace,or as TrayMenuSchemas,sr as TrayMenuSectionSchema,lr as TrayMenuService,cr as TrayMenuSubjects,En as TrayMenuToken,ke as Turn,Le as TurnContextEnricher,Vt as TurnStorageNamespace,je as TurnStorageSubjects,yn as WORKFLOW_START_ACTION_TYPE,Hn as WorkflowBlockRegistry,j as WorkflowBlockRegistryToken,l as actionRegistry,xt as activateProviderContext,yt as activateProviderContextStrict,e as agents,Vn as artifactLifecycleHookRegistryPackage,Dn as artifactSchemaRegistryPackage,ye as assembleForkContext,di as buildDeterministicAdapterId,bt as buildProviderContext,ne as buildRecoveryContext,d as buildRecoveryContextWithPipeline,he as buildSessionContext,xe as buildTurnInitiator,Cn as canonicalModelPackage,Bn as capabilityPackage,yi as createArtifactKindContributionProcessor,xi as createArtifactLifecycleHookContributionProcessor,Ni as createFacetNamespaceContributionProcessor,bn as createModelRegistryPackage,Fe as createSessionExtensionContext,Pi as createSurfaceBindingContributionProcessor,Ln as createToolContributionProcessor,Ii as createTransitionContributionProcessor,Fi as createWorkflowBlockContributionProcessor,De as ensureAgentCwd,ie as ensureAgentModel,oe as extractTextContent,an as facetNamespaceRegistryPackage,tt as fetchAgentsBySession,ht as fetchMessageCountsBySession,Ke as fetchPreviewBySession,b as fetchSessionPreviewMaps,ve as findTurnByAgent,zn as frameworkCorePackages,ge as getFullConversation,pe as getOrCreateSession,st as importCursors,pt as importCursorsDual,Ve as kindToBranchKind,He as mapAgentsBySession,y as mapRowToSession,ot as mapToSession,Wn as mergeModelMetadata,ze as messageRouting,Qe as messageRoutingDual,i as messages,ue as normalizeSelectionString,Ee as normalizeToBlocks,mt as parseForkTransforms,Be as pickFallbackRuntimeOptions,p as recoverAgent,le as registerAbandonHandler,fi as registerAdapterRuntimeIdentityHandlers,Te as registerAttachHandler,be as registerBuiltInActions,se as registerCompressHandler,it as registerCompressLineageResolver,rt as registerCoreSessionServiceHandlers,_ as registerDrizzleAgentStorage,nt as registerDrizzleImportCursorStorage,Ie as registerDrizzleMessageRoutingStorage,$e as registerDrizzleMessageStorage,u as registerDrizzleSessionEventStorage,Pe as registerDrizzleSessionStorage,Oe as registerDrizzleTurnStorage,me as registerForkHandler,gt as registerFtsSearchHandler,v as registerGetStatusCountsHandler,_t as registerListActionsHandler,qe as registerMemoryAgentStorage,Ze as registerMemoryMessageStorage,ae as registerMemorySessionEventStorage,at as registerMemorySessionStorage,ce as registerMemoryTurnStorage,Se as registerMergeHandler,et as registerParentResolver,Ye as registerResumeHandler,ut as registerSpawningToolCallResolver,Ce as resetBuiltInActionsRegistration,ee as resolveAdapterId,de as resolveAdapterNameById,Si as resolveArtifactContext,ui as resolveDeterministicAdapterId,te as resolveExecutionTarget,re as resolveModelCapabilities,fe as resolveTargetAgents,we as routeToAgents,_e as routeToAgentsCore,xn as sessionBridgePackage,s as sessionEvents,a as sessionEventsDual,sn as sessionOrchestratorPackage,on as sessionPackage,_n as sessionStoragePackage,t as sessions,fr as subagentServicePackage,O as surfaceBindingRegistryPackage,nn as toolApprovalPackage,Mn as toolRegistryPackage,hn as transitionPipelinePackage,gn as trayMenuPackage,r as turns,n as turnsDual,f as verifyAndRecoverAgents,vn as workflowBlockRegistryPackage};
1
+ import{agents as e,sessions as t}from"./session/storage/schema.mjs";import{n,t as r}from"../schema-CHp6I33k.mjs";import{t as i}from"../schema-7aKBGB7S.mjs";import{i as a,n as o,r as s,t as c}from"../namespace-dFBD2ZmS.mjs";import{A as l,B as u,C as d,D as f,E as p,F as m,I as h,M as ee,N as te,O as ne,P as re,T as ie,V as ae,_ as oe,a as se,b as ce,c as le,d as ue,f as de,g as fe,h as pe,i as me,j as he,k as ge,l as _e,m as ve,n as ye,o as be,p as xe,r as Se,s as Ce,t as we,u as Te,v as Ee,w as De,x as Oe,y as ke}from"../handlers-B74FvKlA.mjs";import{TurnStorageNamespace as Ae,TurnStorageSubjects as je}from"./turn/namespace.mjs";import{SessionStorageNamespace as Me,SessionStorageSubjects as Ne}from"./session/storage/namespace.mjs";import{$ as g,A as _,B as v,C as y,D as b,E as Pe,F as Fe,G as Ie,H as Le,I as Re,J as ze,K as Be,L as Ve,M as He,N as Ue,O as We,Q as Ge,R as Ke,S as qe,T as Je,U as Ye,V as Xe,W as Ze,X as Qe,Y as $e,Z as et,a as tt,b as nt,c as rt,et as it,i as at,j as ot,k as st,l as ct,o as lt,q as x,r as ut,s as dt,t as ft,tt as pt,u as mt,w as ht,x as gt,z as _t}from"../session-CX6QDhi2.mjs";import{t as vt}from"../namespace-DBHwyhME.mjs";import{n as yt,r as bt,t as xt}from"../provider-context-DC_eq7es.mjs";import{AdapterRuntimeSchemas as St,ResolveIdRequestSchema as Ct,ResolveIdResponseSchema as wt,ResolveNameRequestSchema as Tt,ResolveNameResponseSchema as Et}from"./adapter-runtime/schemas.mjs";import{AdapterRuntimeNamespace as S,AdapterRuntimeSubjects as Dt}from"./adapter-runtime/namespace.mjs";import{ProviderStorageNamespace as Ot}from"./settings/storage/providers-namespace.mjs";import{ContainerIsolatedExecutionTargetSchema as kt,ContainerLocalExecutionTargetSchema as At,ExecutionTargetInputSchema as jt,ExecutionTargetListQuerySchema as Mt,ExecutionTargetResolveRequestSchema as Nt,ExecutionTargetSchema as Pt,ExecutionTargetSchemas as Ft,ExecutionTargetTypeSchema as It,LocalExecutionTargetSchema as Lt}from"./execution-target/schemas.mjs";import{ExecutionTargetNamespace as C,ExecutionTargetSubjects as Rt}from"./execution-target/namespace.mjs";import{MessageStorageNamespace as zt,MessageStorageSubjects as Bt}from"./session/messages/namespace.mjs";import{TurnStorageNamespace as Vt}from"./session/turns/namespace.mjs";import{BugEntrySchema as Ht,CompressRequestSchema as Ut,CompressResponseSchema as Wt,CompressionEventSchema as Gt,CompressionSchemas as Kt,ExtractedContextSchema as qt,TechnicalDetailsSchema as Jt,TodoEntrySchema as Yt}from"./compression/schemas.mjs";import{PreferenceItemSchema as Xt,PreferenceKeySchema as Zt,PreferenceValueSchema as Qt,PreferencesSchemas as $t}from"./preferences/schemas.mjs";import{PreferencesNamespace as w,PreferencesSubjects as en}from"./preferences/storage-namespace.mjs";import{t as tn}from"../namespace-wke7juzy.mjs";import{A as nn,B as rn,C as an,D as on,E as sn,F as cn,G as ln,H as un,I as dn,J as fn,K as pn,L as mn,M as hn,N as gn,O as _n,P as vn,R as yn,S as bn,T as xn,U as Sn,V as Cn,W as wn,Y as Tn,_ as En,a as T,b as Dn,c as On,d as kn,f as An,g as E,h as jn,i as D,j as Mn,k as O,l as Nn,m as Pn,o as Fn,p as k,q as In,r as Ln,s as A,u as Rn,v as j,w as zn,x as Bn,y as Vn,z as Hn}from"../tools-CGFZkB7F.mjs";import{t as Un}from"../capability-service-XlymTzz1.mjs";import{a as Wn,c as Gn,i as Kn,l as qn,n as Jn,o as M,r as Yn,s as Xn,t as Zn,u as Qn}from"../model-registry-rYICIwyR.mjs";import{t as $n}from"../tool-approval-service-DEiMKTv9.mjs";import{TrayMenuEntrySchema as er,TrayMenuGroupEntrySchema as tr,TrayMenuGroupSchema as nr,TrayMenuItemClickedSchema as rr,TrayMenuListEntrySchema as ir,TrayMenuMetadataSchema as ar,TrayMenuSchemas as or,TrayMenuSectionSchema as sr}from"./tray-menu/schemas.mjs";import{TrayMenuNamespace as N,TrayMenuSubjects as cr}from"./tray-menu/namespace.mjs";import{t as lr}from"../tray-menu-service-B2AxiQqL.mjs";import{n as ur}from"../handler-BFNvtv5t.mjs";import{i as dr,n as fr,r as pr,t as mr}from"../package-CF_Zm2v4.mjs";import{FsNamespace as hr}from"./filesystem/namespace.mjs";import"./capability/index.mjs";import"./tool-approval/index.mjs";import"./tray-menu/index.mjs";import"./subagent/index.mjs";import{AgentInstanceStatusSchema as gr,AgentRuntimeSchemas as _r,AgentRuntimeSelectionSchema as vr}from"./agent-runtime/schemas.mjs";import{AgentRuntimeNamespace as P,AgentRuntimeSubjects as yr}from"./agent-runtime/namespace.mjs";import{CodebaseChangedEventSchema as br,CodebaseSchemas as xr}from"./codebase/schemas.mjs";import{CodebaseNamespace as F,CodebaseSubjects as Sr}from"./codebase/namespace.mjs";import{CompressionNamespace as I,CompressionSubjects as Cr}from"./compression/namespace.mjs";import{r as wr,t as Tr}from"../storage-namespace-D5q9CrBp.mjs";import{DefinitionNamespace as Er}from"./definition/namespace.mjs";import{DialogNamespace as Dr}from"./dialog/namespace.mjs";import{_ as Or,c as kr,d as Ar,f as jr,g as Mr,h as Nr,i as Pr,l as Fr,m as Ir,n as Lr,o as Rr,p as zr,r as L,s as Br,t as Vr,u as Hr,v as Ur,y as Wr}from"../execution-target-BR8bLkCR.mjs";import{CLIDetectionNamespace as Gr}from"./cli-detection/namespace.mjs";import{LocalNotificationNamespace as Kr}from"./local-notification/namespace.mjs";import{t as qr}from"../namespace-CVMZVqB5.mjs";import{ExtensionConfigStorageNamespace as Jr}from"./settings/storage/extension-configs/namespace.mjs";import{ClientStorageNamespace as Yr}from"./settings/storage/clients-namespace.mjs";import{SubagentTemplateCompletedEventSchema as Xr,SubagentTemplateCreateSchema as Zr,SubagentTemplateInstanceSchema as Qr,SubagentTemplateInstanceStatusSchema as $r,SubagentTemplateKernelSchemas as ei,SubagentTemplateSchema as ti,SubagentTemplateSettingsSchemas as ni,SubagentTemplateSpawnRequestSchema as ri,SubagentTemplateSpawnedEventSchema as ii,SubagentTemplateSummarySchema as ai,SubagentTemplateUpdateSchema as oi}from"./subagent-template/schemas.mjs";import{r as si,t as ci}from"../namespace-BO3tODGC.mjs";import{SubagentTemplateKernelNamespace as R,SubagentTemplateSubjects as li}from"./subagent-template/namespace.mjs";import{i as ui,n as di,r as fi,t as pi}from"../identity-DC3Pk0ps.mjs";import"./adapter-runtime/index.mjs";import"./agent-runtime/index.mjs";import"./codebase/index.mjs";import"./compression/index.mjs";import"./preferences/index.mjs";import"./subagent-template/index.mjs";import{ArtifactSubjects as mi}from"@makaio/framework/contracts";import{ImportCursorStorageNamespace as hi}from"@makaio/framework/adapters";import{ModelRegistryPublicNamespace as gi}from"@makaio/framework/contracts/model-registry";function _i(e){return{source:`extension`,ownerKey:`extension:${e}`}}function vi(e,t){for(let n of e.values())if(n.registry===t)for(let e of n.registrations)t.registerKind(e,n.owner)}function yi(){let e=new Map,t=t=>{let n=e.get(t);if(n){e.delete(t);for(let e=n.registrations.length-1;e>=0;--e){let t=n.registrations[e];n.registry.deregisterKind(t.kind,t.schemaVersion,n.owner)}vi(e,n.registry)}};return{filter:e=>(e.artifactKinds?.kinds?.length??0)>0,async processActivated(n,r,i){let a=i.getService(T);if(!a)throw Error(`ArtifactSchemaRegistry is not available — ensure artifact-schema-registry is started before extensions with artifactKinds.`);let o=(r.artifactKinds?.kinds??[]).map(e=>e.toRegistration()),s=_i(n);t(n);for(let e of o)a.registerKind(e,s);e.set(n,{registry:a,owner:s,registrations:o})},async processStopped(e){try{t(e)}catch(t){console.error(`[ArtifactContributionProcessor] Deregister error for "${e}":`,t)}}}}function bi(e,t,n){return{...n,filter:{...n.filter,kind:e,schemaVersion:t}}}function xi(){let e=new Map,t=t=>{let n=e.get(t);n&&(e.delete(t),n.cleanup())};return{filter:e=>{let t=e.artifactLifecycleHooks!=null,n=(e.artifactKinds?.kinds??[]).some(e=>(e.hooks?.hooks.length??0)>0);return t||n},async processActivated(n,r,i){let a=i.getService(D);if(!a)throw Error(`ArtifactLifecycleHookRegistry is not available — ensure artifact-lifecycle-hook-registry is started before extensions with artifact lifecycle hooks.`);let o=r.artifactLifecycleHooks?[...await r.artifactLifecycleHooks.createHooks({bus:i.bus,extensionName:n})]:[],s=[];for(let e of r.artifactKinds?.kinds??[])if(e.hooks)for(let t of e.hooks.hooks)s.push(bi(e.kind,e.schemaVersion,t));let c=[...o,...s];t(n);let l=a.registerHooks(n,c);e.set(n,{cleanup:l})},async processStopped(e){try{t(e)}catch(t){console.error(`[ArtifactLifecycleHookContributionProcessor] Deregister error for "${e}":`,t)}}}}async function Si(e){let t=e.maxDepth??5,n={bus:e.bus,kindRegistry:e.kindRegistry,maxDepth:t,resolvedByKey:new Map,kindDefaultsCache:new Map,walkedByKey:new Set,refIndexByKey:new Map,refMetadataByKey:new Map,resolved:[],refs:[]},r=await B(n,e.ref);if(!r)throw Error(`artifact.resolveContext: root artifact '${e.ref.kind}:${e.ref.id}:${e.ref.revision}' not found`);return n.resolved.push(r),await z(n,r,H(await V(n,r),e.selectors),0,new Set([Z(e.ref)])),{rootRef:e.ref,refs:n.refs,resolved:n.resolved}}async function z(e,t,n,r,i){let a=Mi(t,n,r,i);if(e.walkedByKey.has(a))return;e.walkedByKey.add(a);let o=ki(t);for(let a of t.relations)await Ci(e,o,a,n,r,i)}async function Ci(e,t,n,r,i,a){let o=r?.[n.type];if(o?.hint===`omit`)return;let s=o?.hint??`link`;if(!wi(o,n.target)){W(e,U(t,n,s,`not-selected`));return}if(n.target.refClass!==`artifact`){W(e,U(t,n,s,`unsupported-ref-class`));return}let c=Z(n.target),l=a.has(c);if(i>=e.maxDepth&&!l){W(e,U(t,n,s,`depth-exceeded`));return}let u=e.resolvedByKey.has(c),d=await B(e,n.target);if(!d){W(e,U(t,n,s,`not-found`));return}if(W(e,{sourceRef:t,target:n.target,relationType:n.type,hint:s,status:`resolved`},{resolvedViaBackEdge:l}),u||e.resolved.push(d),l)return;let f=(o.depth??1)-1,p=f>0?{[n.type]:{...o,depth:f}}:void 0,m=H(H(await V(e,d),p),o.nested),h=new Set(a);h.add(c),await z(e,d,m,i+1,h)}async function B(e,t){let n=Z(t);if(e.resolvedByKey.has(n))return e.resolvedByKey.get(n)??null;let{artifact:r}=await e.bus.request(mi.resolve,{ref:t});return e.resolvedByKey.set(n,r),r}async function V(e,t){let n=JSON.stringify([t.kind,t.schemaVersion]);if(e.kindDefaultsCache.has(n))return e.kindDefaultsCache.get(n);let r=(await e.kindRegistry.getKind(t.kind,t.schemaVersion))?.defaultContext;return e.kindDefaultsCache.set(n,r),r}function H(e,t){if(!t)return e;if(!e)return t;let n={...e};for(let[e,r]of Object.entries(t))n[e]=r;return n}function wi(e,t){return e?e.kinds?e.kinds.includes(Ti(t)):!0:!1}function Ti(e){return e.refClass===`local`?e.artifact.kind:e.kind}function U(e,t,n,r){return{sourceRef:e,target:t.target,relationType:t.type,hint:n,status:`unresolved`,reason:r}}function W(e,t,n){let r=Ai(t),i=e.refIndexByKey.get(r);if(i===void 0){e.refIndexByKey.set(r,e.refs.length),J(e,r,t,n),e.refs.push(t);return}let a=e.refs[i];if(a){if(t.status===`unresolved`&&t.reason===`depth-exceeded`){if(!Ei(a,Oi(e,r)))return;q(e,i,r,t,n);return}if(a.status===`unresolved`&&a.reason===`depth-exceeded`){if(t.status===`resolved`&&X(n)||t.status===`unresolved`&&!G(t.reason,a.reason))return;q(e,i,r,t,n);return}if(t.status===`unresolved`&&a.status===`unresolved`){G(t.reason,a.reason)&&q(e,i,r,t,n);return}if(t.status===`resolved`&&a.status===`unresolved`){q(e,i,r,t,n);return}t.status===`resolved`&&!X(n)&&Y(e,r,n)}}function Ei(e,t){return e.status===`resolved`?t:G(`depth-exceeded`,e.reason)}function G(e,t){return K(e)>K(t)}function K(e){return e===`not-selected`?0:e===`depth-exceeded`?1:2}function q(e,t,n,r,i){J(e,n,r,i),e.refs[t]=r}function J(e,t,n,r){if(n.status===`resolved`){Y(e,t,r);return}Di(e,t)}function Y(e,t,n){e.refMetadataByKey.set(t,n??{resolvedViaBackEdge:!1})}function Di(e,t){e.refMetadataByKey.delete(t)}function Oi(e,t){return X(e.refMetadataByKey.get(t))}function X(e){return e?.resolvedViaBackEdge===!0}function ki(e){return{refClass:`artifact`,kind:e.kind,id:e.id,revision:e.revision}}function Z(e){return JSON.stringify([e.kind,e.id,e.revision])}function Ai(e){return JSON.stringify([Z(e.sourceRef),e.relationType,ji(e.target)])}function ji(e){return e.refClass===`artifact`?JSON.stringify([`artifact`,e.kind,e.id,e.revision]):e.refClass===`local`?JSON.stringify([`local`,Z(e.artifact),e.localId]):JSON.stringify([`evidence`,e.kind,e.id,e.revision??null,e.locator??null])}function Mi(e,t,n,r){return JSON.stringify([e.kind,e.id,e.revision,n,t??null,[...r].sort()])}function Q(e,t){for(let n of e.values())if(n.registry===t)for(let e of n.registrations)t.registerNamespace(e)}function Ni(){let e=new Map,t=(t,n)=>{if(n){for(let e of n.registrations)n.registry.registerNamespace(e);e.set(t,n)}},n=t=>{let n=e.get(t);if(n){e.delete(t);for(let e=n.registrations.length-1;e>=0;--e){let t=n.registrations[e];n.registry.deregisterNamespace(t.namespace)}Q(e,n.registry)}};return{filter:e=>(e.facetNamespaces?.namespaces?.length??0)>0,async processActivated(r,i,a){let o=a.getService(A);if(!o)throw Error(`FacetNamespaceRegistry is not available — ensure facet-namespace-registry is started before extensions with facetNamespaces.`);let s=(i.facetNamespaces?.namespaces??[]).map(e=>e.toRegistration()),c=e.get(r);n(r);let l=[];try{for(let e of s)o.registerNamespace(e),l.push(e)}catch(n){for(let e=l.length-1;e>=0;--e)o.deregisterNamespace(l[e].namespace);throw Q(e,o),t(r,c),n}e.set(r,{registry:o,registrations:s})},async processStopped(e){try{n(e)}catch(t){console.error(`[FacetNamespaceContributionProcessor] Deregister error for "${e}":`,t)}}}}function $(e,t){for(let n of e.values())if(n.registry===t)for(let e of n.registrations)t.registerBinding(e)}function Pi(){let e=new Map,t=(t,n)=>{if(n){for(let e of n.registrations)n.registry.registerBinding(e);e.set(t,n)}},n=t=>{let n=e.get(t);if(n){e.delete(t);for(let e=n.registrations.length-1;e>=0;--e){let t=n.registrations[e];n.registry.deregisterBinding(t.id)}$(e,n.registry)}};return{filter:e=>(e.surfaceBindings?.bindings?.length??0)>0,async processActivated(r,i,a){let o=a.getService(k);if(!o)throw Error(`SurfaceBindingRegistry is not available — ensure surface-binding-registry is started before extensions with surfaceBindings.`);let s=(i.surfaceBindings?.bindings??[]).map(e=>e.toRegistration()),c=e.get(r);n(r);let l=[];try{for(let e of s)o.registerBinding(e),l.push(e)}catch(n){for(let e=l.length-1;e>=0;--e)o.deregisterBinding(l[e].id);throw $(e,o),t(r,c),n}e.set(r,{registry:o,registrations:s})},async processStopped(e){try{n(e)}catch(t){console.error(`[SurfaceBindingContributionProcessor] Deregister error for "${e}":`,t)}}}}function Fi(){let e=new Map;return{filter:e=>!!e.workflowBlocks?.blocks,async processActivated(t,n,r){let i=r.getService(j);if(!i)throw Error(`WorkflowBlockRegistry is not available — ensure workflow-block-registry is started before extensions with workflowBlocks.`);await i.register(t,n.workflowBlocks.blocks),e.set(t,()=>i.deregister(t))},async processStopped(t){let n=e.get(t);if(n){try{await n()}catch(e){console.error(`[WorkflowBlockContributionProcessor] Deregister error for "${t}":`,e)}e.delete(t)}}}}function Ii(){let e=new Map;return{filter:e=>!!(e.transitionRules?.rules?.length||e.transitionActions?.actions),async processActivated(t,n,r){let i=r.getService(E);if(!i)throw Error(`TransitionContributionProcessor: TransitionPipelineService is not available — ensure '${E.name}' is started before extensions with transitionRules or transitionActions.`);let a=n.transitionRules?.rules??[],o=n.transitionActions?.actions,s=a.length>0,c=o!==void 0;s&&Li(t,a),c&&Ri(t,o);let l=!1,u=!1;try{s&&(i.ruleRegistry.register(t,a),l=!0),c&&(i.actionRegistry.register(t,o),u=!0)}catch(e){throw l&&i.ruleRegistry.deregister(t),u&&i.actionRegistry.deregister(t),e}e.set(t,()=>{s&&i.ruleRegistry.deregister(t),c&&i.actionRegistry.deregister(t)})},async processStopped(t){let n=e.get(t);if(n){try{n()}catch(e){console.error(`[TransitionContributionProcessor] Deregister error for "${t}":`,e)}e.delete(t)}}}}function Li(e,t){let n=`${e}.`;for(let e of t)if(!e.id.startsWith(n))throw Error(`TransitionContributionProcessor: rule '${e.id}' must be namespaced by extension '${n}'`)}function Ri(e,t){let n=`${e}.`;for(let e of Object.keys(t))if(!e.startsWith(n))throw Error(`TransitionContributionProcessor: action type '${e}' must be namespaced by extension '${n}'`)}const zi=[S,vt,P,m,Gr,Yr,F,I,wr,Tr,Er,Dr,L,C,Jr,hr,ur,hi,Kr,x,M,gi,w,qr,Ot,tn,ci,N,Ae,R,si];export{pi as AdapterIdentityRegistry,g as AdapterRegistry,S as AdapterRuntimeNamespace,St as AdapterRuntimeSchemas,Dt as AdapterRuntimeSubjects,gr as AgentInstanceStatusSchema,P as AgentRuntimeNamespace,_r as AgentRuntimeSchemas,vr as AgentRuntimeSelectionSchema,yr as AgentRuntimeSubjects,m as AgentStorageNamespace,h as AgentStorageSubjects,In as ArtifactLifecycleHookRegistry,D as ArtifactLifecycleHookRegistryToken,fn as ArtifactLifecycleHookRejectedError,Tn as ArtifactSchemaRegistry,T as ArtifactSchemaRegistryToken,Ht as BugEntrySchema,_t as CONNECTOR_SWAP_DEFAULT_PIPELINE,Zn as CachedRegistryFetcher,wn as CanonicalModelResolutionError,Sn as CanonicalModelResolver,un as CanonicalModelService,Un as CapabilityService,Fn as CapabilityToken,br as CodebaseChangedEventSchema,F as CodebaseNamespace,xr as CodebaseSchemas,Sr as CodebaseSubjects,Ut as CompressRequestSchema,Wt as CompressResponseSchema,Gt as CompressionEventSchema,I as CompressionNamespace,Kt as CompressionSchemas,Cr as CompressionSubjects,Rr as ContainerCreatedSchema,Br as ContainerDestroyedSchema,kt as ContainerIsolatedExecutionTargetSchema,kr as ContainerIsolatedSpawnRequestSchema,At as ContainerLocalExecutionTargetSchema,Fr as ContainerLocalSpawnRequestSchema,Hr as ContainerRuntimeSchema,Vr as ContainerSpawnNamespace,Lr as ContainerSpawnSubjects,Ar as ContainerStartedSchema,jr as ContainerStateSchema,zr as ContainerStoppedSchema,ft as ContextWindowTracker,L as DockerNamespace,Pr as DockerSubjects,dt as EmbeddingIndexManager,jt as ExecutionTargetInputSchema,Mt as ExecutionTargetListQuerySchema,C as ExecutionTargetNamespace,Nt as ExecutionTargetResolveRequestSchema,Pt as ExecutionTargetSchema,Ft as ExecutionTargetSchemas,Rt as ExecutionTargetSubjects,It as ExecutionTargetTypeSchema,qt as ExtractedContextSchema,pn as FacetNamespaceRegistry,A as FacetNamespaceRegistryToken,Jn as FallbackRegistryFetcher,zi as FrameworkServicesCoreNamespaces,Lt as LocalExecutionTargetSchema,lt as MakaioSession,it as MakaioSessionService,x as MessageRoutingNamespace,ze as MessageRoutingSubjects,zt as MessageStorageNamespace,Bt as MessageStorageSubjects,M as ModelRegistryNamespace,Yn as ModelRegistryProviderNotFoundError,Gn as ModelRegistrySchema,qn as ModelRegistrySchemas,Kn as ModelRegistryService,Xn as ModelRegistrySubjects,On as ModelRegistryToken,Xt as PreferenceItemSchema,Zt as PreferenceKeySchema,Qt as PreferenceValueSchema,w as PreferencesNamespace,$t as PreferencesSchemas,en as PreferencesSubjects,Qn as ProviderModelOverrideSchema,Ct as ResolveIdRequestSchema,wt as ResolveIdResponseSchema,Tt as ResolveNameRequestSchema,Et as ResolveNameResponseSchema,Ve as SessionBridge,Nn as SessionBridgeToken,c as SessionEventStorageNamespace,o as SessionEventStorageSubjects,Fe as SessionExtensionContextImpl,Ze as SessionOrchestrator,Rn as SessionOrchestratorToken,Me as SessionStorageNamespace,Ne as SessionStorageSubjects,kn as SessionStorageToken,An as SessionToken,Ie as SessionTurnManager,Ir as SpawnRequestSchema,Nr as SpawnResponseSchema,Mr as StatusRequestSchema,Or as StatusResponseSchema,Ur as StopRequestSchema,Wr as StopResponseSchema,dr as SubagentManager,pr as SubagentService,mr as SubagentServiceToken,Xr as SubagentTemplateCompletedEventSchema,Zr as SubagentTemplateCreateSchema,Qr as SubagentTemplateInstanceSchema,$r as SubagentTemplateInstanceStatusSchema,R as SubagentTemplateKernelNamespace,ei as SubagentTemplateKernelSchemas,ti as SubagentTemplateSchema,ni as SubagentTemplateSettingsSchemas,ri as SubagentTemplateSpawnRequestSchema,ii as SubagentTemplateSpawnedEventSchema,li as SubagentTemplateSubjects,ai as SubagentTemplateSummarySchema,oi as SubagentTemplateUpdateSchema,ln as SurfaceBindingRegistry,k as SurfaceBindingRegistryToken,Jt as TechnicalDetailsSchema,Yt as TodoEntrySchema,$n as ToolApprovalService,Pn as ToolApprovalToken,rn as ToolRegistry,jn as ToolRegistryToken,mn as TransitionActionRegistry,cn as TransitionPipelineService,E as TransitionPipelineToken,dn as TransitionRuleRegistry,er as TrayMenuEntrySchema,tr as TrayMenuGroupEntrySchema,nr as TrayMenuGroupSchema,rr as TrayMenuItemClickedSchema,ir as TrayMenuListEntrySchema,ar as TrayMenuMetadataSchema,N as TrayMenuNamespace,or as TrayMenuSchemas,sr as TrayMenuSectionSchema,lr as TrayMenuService,cr as TrayMenuSubjects,En as TrayMenuToken,ke as Turn,Ye as TurnContextEnricher,Vt as TurnStorageNamespace,je as TurnStorageSubjects,yn as WORKFLOW_START_ACTION_TYPE,Hn as WorkflowBlockRegistry,j as WorkflowBlockRegistryToken,l as actionRegistry,xt as activateProviderContext,yt as activateProviderContextStrict,e as agents,Vn as artifactLifecycleHookRegistryPackage,Dn as artifactSchemaRegistryPackage,ye as assembleForkContext,di as buildDeterministicAdapterId,bt as buildProviderContext,ne as buildRecoveryContext,d as buildRecoveryContextWithPipeline,he as buildSessionContext,xe as buildTurnInitiator,Cn as canonicalModelPackage,Bn as capabilityPackage,yi as createArtifactKindContributionProcessor,xi as createArtifactLifecycleHookContributionProcessor,Ni as createFacetNamespaceContributionProcessor,bn as createModelRegistryPackage,Re as createSessionExtensionContext,Pi as createSurfaceBindingContributionProcessor,Ln as createToolContributionProcessor,Ii as createTransitionContributionProcessor,Fi as createWorkflowBlockContributionProcessor,De as ensureAgentCwd,ie as ensureAgentModel,oe as extractTextContent,an as facetNamespaceRegistryPackage,gt as fetchAgentsBySession,qe as fetchMessageCountsBySession,y as fetchPreviewBySession,We as fetchSessionPreviewMaps,ve as findTurnByAgent,zn as frameworkCorePackages,ge as getFullConversation,pe as getOrCreateSession,ct as importCursors,mt as importCursorsDual,Ue as kindToBranchKind,st as mapAgentsBySession,ht as mapRowToSession,_ as mapToSession,Wn as mergeModelMetadata,$e as messageRouting,Qe as messageRoutingDual,i as messages,ue as normalizeSelectionString,Ee as normalizeToBlocks,Je as parseForkTransforms,Ke as pickFallbackRuntimeOptions,p as recoverAgent,le as registerAbandonHandler,fi as registerAdapterRuntimeIdentityHandlers,Te as registerAttachHandler,be as registerBuiltInActions,se as registerCompressHandler,at as registerCompressLineageResolver,pt as registerCoreSessionServiceHandlers,ot as registerDrizzleAgentStorage,rt as registerDrizzleImportCursorStorage,Be as registerDrizzleMessageRoutingStorage,Ge as registerDrizzleMessageStorage,u as registerDrizzleSessionEventStorage,b as registerDrizzleSessionStorage,Oe as registerDrizzleTurnStorage,me as registerForkHandler,nt as registerFtsSearchHandler,Xe as registerGetStatusCountsHandler,v as registerListActionsHandler,Pe as registerMemoryAgentStorage,et as registerMemoryMessageStorage,ae as registerMemorySessionEventStorage,He as registerMemorySessionStorage,ce as registerMemoryTurnStorage,Se as registerMergeHandler,tt as registerParentResolver,Le as registerResumeHandler,ut as registerSpawningToolCallResolver,Ce as resetBuiltInActionsRegistration,ee as resolveAdapterId,de as resolveAdapterNameById,Si as resolveArtifactContext,ui as resolveDeterministicAdapterId,te as resolveExecutionTarget,re as resolveModelCapabilities,fe as resolveTargetAgents,we as routeToAgents,_e as routeToAgentsCore,xn as sessionBridgePackage,s as sessionEvents,a as sessionEventsDual,sn as sessionOrchestratorPackage,on as sessionPackage,_n as sessionStoragePackage,t as sessions,fr as subagentServicePackage,O as surfaceBindingRegistryPackage,nn as toolApprovalPackage,Mn as toolRegistryPackage,hn as transitionPipelinePackage,gn as trayMenuPackage,r as turns,n as turnsDual,f as verifyAndRecoverAgents,vn as workflowBlockRegistryPackage};