@makaio/framework 1.0.0-dev-1781260968078 → 1.0.0-dev-1781354548379
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.makaio-build.json +2 -2
- package/dist/adapter-UpcpZDOv.mjs +1 -0
- package/dist/adapters/config/index.d.mts +1 -1
- package/dist/adapters/index.d.mts +11 -3
- package/dist/adapters/index.mjs +1 -1
- package/dist/bus/index.mjs +1 -1
- package/dist/clients/index.d.mts +4 -7
- package/dist/clients/index.mjs +1 -1
- package/dist/contracts/adapter/index.d.mts +2 -2
- package/dist/contracts/adapter/index.mjs +1 -1
- package/dist/contracts/adapter/schemas/session-lineage.d.mts +1 -1
- package/dist/contracts/artifact/index.d.mts +1 -1
- package/dist/contracts/client/index.d.mts +1 -1
- package/dist/contracts/extension/index.d.mts +2 -2
- package/dist/contracts/facet/index.d.mts +1 -1
- package/dist/contracts/index.d.mts +219 -54
- package/dist/contracts/index.mjs +1 -1
- package/dist/contracts/materialization/index.d.mts +3 -3
- package/dist/contracts/session/index.d.mts +3 -3
- package/dist/contracts/session/index.mjs +1 -1
- package/dist/{definition-SiimP25_.d.mts → definition-DqJOg6Lv.d.mts} +1 -1
- package/dist/drizzle/0015_m_mqbh8q5b.sql +1 -0
- package/dist/drizzle/0016_m_mqbmq8h7.sql +1 -0
- package/dist/drizzle/0017_m_mqbnf924.sql +1 -0
- package/dist/drizzle/meta/0015_snapshot.json +2966 -0
- package/dist/drizzle/meta/0016_snapshot.json +2973 -0
- package/dist/drizzle/meta/0017_snapshot.json +2980 -0
- package/dist/drizzle/meta/_journal.json +21 -0
- package/dist/{handler-DSfSAlxx.mjs → handler-DqpiV9eA.mjs} +1 -1
- package/dist/handlers-BAB4fQNH.mjs +41 -0
- package/dist/{index-B2xbnMZe.d.mts → index-BCKRUuI2.d.mts} +1 -1
- package/dist/{index-CARxIllg.d.mts → index-BHAOu6Hs.d.mts} +20 -20
- package/dist/{index-Cb64d5c5.d.mts → index-BHzgDuRE.d.mts} +20 -3
- package/dist/{index-BtztOqaF.d.mts → index-BheaEhyI.d.mts} +6 -6
- package/dist/{index-CZ_TcT6J.d.mts → index-Bibt5jAX.d.mts} +8 -8
- package/dist/{index-D5CI1V5d.d.mts → index-C3zfJg6s.d.mts} +16 -16
- package/dist/{index-DTdqGAfH2.d.mts → index-CH5U3zSA2.d.mts} +1 -1
- package/dist/{index-CgjslA5-.d.mts → index-CTn_Xi-p.d.mts} +4 -4
- package/dist/{index-DDQkhhRo.d.mts → index-DPIdX6kb.d.mts} +363 -123
- package/dist/{index-BQiHs8EF.d.mts → index-Da4ABgRq.d.mts} +12 -12
- package/dist/{index-BvSyOgTY.d.mts → index-DrGLAuZc.d.mts} +98 -29
- package/dist/{index-BKKNWqkP2.d.mts → index-zgm2j9V92.d.mts} +44 -2
- package/dist/kernel/extension/index.d.mts +1 -1
- package/dist/kernel/index.d.mts +2 -2
- package/dist/kernel/observability/index.d.mts +1 -1
- package/dist/mcp-http-server/index.d.mts +132 -19
- package/dist/mcp-http-server/index.mjs +1 -1
- package/dist/{namespace-D1Iw_d1P.d.mts → namespace--s0d86h-.d.mts} +144 -0
- package/dist/{namespace-7tsuJhQ9.d.mts → namespace-Boe6l5n9.d.mts} +78 -42
- package/dist/{namespace-Ba4bxtHQ.d.mts → namespace-BxxBhcV_.d.mts} +9 -9
- package/dist/{namespace-DwE2g8Wm.mjs → namespace-Dfq6MDN9.mjs} +1 -1
- package/dist/{namespace-DDCjoQUj.d.mts → namespace-aJJfBJU5.d.mts} +170 -0
- package/dist/{orchestrator-shared-Dt4WDse7.mjs → orchestrator-shared-BKFXaKPL.mjs} +1 -1
- package/dist/{package-BSnp1zOR.d.mts → package--RZnpN2J.d.mts} +2 -3
- package/dist/package-BzJvtM5O.mjs +1 -0
- package/dist/package-DzN_jdqd.mjs +1 -0
- package/dist/package.json +1 -1
- package/dist/primitive-runtime-CNC_bSac.mjs +1 -0
- package/dist/runtime-node/bus/runtime/namespace.d.mts +8 -8
- package/dist/runtime-node/bus/runtime/schemas.d.mts +11 -4
- package/dist/runtime-node/bus/runtime/schemas.mjs +1 -1
- package/dist/runtime-node/index.d.mts +19 -1
- package/dist/runtime-node/index.mjs +1 -1
- package/dist/{schema-BerZmr2q.mjs → schema-C3TgjrsV.mjs} +1 -1
- package/dist/{schema-BrnYlDwZ.mjs → schema-CzhOc7TV.mjs} +1 -1
- package/dist/{schema-BNrM9LWb.d.mts → schema-DGMLvVoQ.d.mts} +23 -3
- package/dist/schemas-CuKayWhA.mjs +1 -0
- package/dist/{schemas-DAFYpgHk2.d.mts → schemas-kVcJMjjn2.d.mts} +8 -8
- package/dist/{schemas-CkOSG2eJ.d.mts → schemas-t1VR6_b_.d.mts} +3 -3
- package/dist/services/filesystem/namespace.d.mts +6 -6
- package/dist/services/filesystem/schemas.d.mts +3 -3
- package/dist/services/git/namespace.d.mts +2 -2
- package/dist/services/git/schemas.d.mts +2 -2
- package/dist/services/harness/index.d.mts +3 -4
- package/dist/services/harness/index.mjs +1 -1
- package/dist/services/index.d.mts +112 -15
- package/dist/services/index.mjs +1 -1
- package/dist/services/log-import/browser.d.mts +2 -2
- package/dist/services/log-import/index.d.mts +4 -5
- package/dist/services/log-import/index.mjs +1 -1
- package/dist/services/log-import/log-import.d.mts +1 -1
- package/dist/services/log-import/namespace.d.mts +2 -2
- package/dist/services/log-import/schemas.d.mts +1 -1
- package/dist/services/provider-context/index.mjs +1 -1
- package/dist/services/session/handlers/index.mjs +1 -1
- package/dist/services/session/index.d.mts +6 -6
- package/dist/services/session/index.mjs +1 -1
- package/dist/services/session/messages/namespace.mjs +1 -1
- package/dist/services/session/orchestrator-testing/index.mjs +1 -1
- package/dist/services/session/session-events/namespace.d.mts +1 -1
- package/dist/services/session/session-events/namespace.mjs +1 -1
- package/dist/services/session/storage/namespace.d.mts +1 -1
- package/dist/services/session/storage/schema.d.mts +1 -1
- package/dist/services/session/storage/schema.mjs +1 -1
- package/dist/services/session/testing/index.mjs +5 -3
- package/dist/services/session/testing/orchestrator-shared.mjs +1 -1
- package/dist/services/session/turns/namespace.d.mts +1 -1
- package/dist/services/session/turns/namespace.mjs +1 -1
- package/dist/services/settings/index.mjs +1 -1
- package/dist/services/settings/namespace.d.mts +8 -8
- package/dist/services/settings/storage/clients-namespace.mjs +1 -1
- package/dist/services/settings/storage/index.mjs +1 -1
- package/dist/services/settings/storage/providers-namespace.mjs +1 -1
- package/dist/services/subagent/index.d.mts +1 -1
- package/dist/services/subagent/index.mjs +1 -1
- package/dist/services/subagent-template/index.d.mts +1 -1
- package/dist/services/subagent-template/schemas.d.mts +1 -1
- package/dist/services/tool-approval/index.mjs +1 -1
- package/dist/services/tools/index.mjs +1 -1
- package/dist/services/turn/index.d.mts +1 -1
- package/dist/services/turn/namespace.d.mts +1 -1
- package/dist/services/turn/schemas.d.mts +72 -0
- package/dist/services/turn/schemas.mjs +1 -1
- package/dist/{session-C1Cami7U.mjs → session-BwX5_k47.mjs} +1 -1
- package/dist/session-P4nX60Xx.mjs +39 -0
- package/dist/{session-lineage-CXzV_hAP.d.mts → session-lineage-CKg6mErA.d.mts} +1 -1
- package/dist/storage/drizzle/index.d.mts +1 -1
- package/dist/storage/drizzle/index.mjs +1 -1
- package/dist/{tool-approval-service-Cb2F1yT6.mjs → tool-approval-service-DNHV5x0M.mjs} +1 -1
- package/dist/{tools-D5DVHC-R.mjs → tools-CQImrHAp.mjs} +1 -1
- package/dist/{types-DLVitCZP.d.mts → types-BpuLMR2m.d.mts} +626 -443
- package/dist/{types-D5IMwOkJ.d.mts → types-D0fPFh-D.d.mts} +1 -1
- package/dist/{types-BMpIa4fx.d.mts → types-D6jnDjP2.d.mts} +18 -5
- package/dist/ui-components/index.d.mts +36 -37
- package/dist/ui-views/index.d.mts +2 -2
- package/dist/workflow-engine/index.d.mts +58 -25
- package/dist/workflow-engine/index.mjs +1 -1
- package/dist/workflow-engine/package.d.mts +1 -1
- package/dist/workflow-engine/package.mjs +1 -1
- package/dist/workflow-engine/workflow-orchestrator.mjs +1 -1
- package/package.json +10 -1
- package/dist/adapter-Dt2FDMs4.mjs +0 -1
- package/dist/handlers-C8EtpSqK.mjs +0 -41
- package/dist/package-Be2Ez4vv.mjs +0 -1
- package/dist/package-OE9dMQsq.mjs +0 -1
- package/dist/primitive-runtime-Xrc9xh6p.mjs +0 -1
- package/dist/schemas-CSUwpaNm.mjs +0 -1
- package/dist/session-KnewDVxt.mjs +0 -39
- /package/dist/{provider-context-lfG0BpqX.mjs → provider-context-wp4VSJFI.mjs} +0 -0
- /package/dist/{shared-schemas-CKe2uN4-.mjs → shared-schemas-DYL7a-No.mjs} +0 -0
|
@@ -13,14 +13,14 @@ 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-B5ToLwIs.mjs";
|
|
14
14
|
import { n as ExecutionTargetSubjects, t as ExecutionTargetNamespace } from "../namespace-BBVtD1gu.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-BpXX9WZJ.mjs";
|
|
16
|
-
import { $ as fetchMessageCountsBySession, A as registerMemoryTurnStorage, At as RecoveryConfig, B as registerMemorySessionEventStorage, Bt as findTurnByAgent, C as messages, Ct as registerGetStatusCountsHandler, D as SelectTurn, Dt as ContextWindowTrackerConfig, E as InsertTurn, Et as AgentContextState, F as importCursorsDual, Ft as verifyAndRecoverAgents, Gt as TurnContextEnricher, H as SelectSessionEvent, Ht as resolveTargetAgents, I as EventTransform, It as buildRecoveryContext, J as mapAgentsBySession, Jt as SessionOrchestrator, K as SessionPreviewMaps, Kt as AdapterRegistry, L as SessionLogger, Lt as resolveAdapterId, M as EmbeddingIndexManager, Mt as ensureAgentCwd, N as registerDrizzleImportCursorStorage, Nt as ensureAgentModel, O as turns, Ot as SessionContextWindowState, P as importCursors, Pt as recoverAgent, Q as fetchAgentsBySession, R as SessionLoggerOptions, Rt as resolveExecutionTarget, S as SelectMessage, St as actionRegistry, T as registerDrizzleMessageStorage, Tt as ContextWindowTracker, U as sessionEvents, Ut as extractTextContent, V as InsertSessionEvent, Vt as getOrCreateSession, W as sessionEventsDual, Wt as normalizeToBlocks, X as SearchFilters, Xt as MakaioSessionService, Y as mapToSession, Yt as registerCoreSessionServiceHandlers, Z as SearchSessionRow, _ as messageRoutingDual, _t as normalizeSelectionString, a as kindToBranchKind, at as registerMemoryAgentStorage, b as MessageRoutingSubjects, bt as registerBuiltInActions, c as registerSpawningToolCallResolver, ct as AgentStorageNamespace, d as MakaioSession, dt as createSessionExtensionContext, et as fetchPreviewBySession, f as MakaioSessionConfig, ft as SessionBridge, g as messageRouting, gt as CONNECTOR_SWAP_DEFAULT_PIPELINE, h as SelectMessageRouting, ht as pickFallbackRuntimeOptions, i as ContextAssemblyResult, it as registerDrizzleAgentStorage, j as registerDrizzleTurnStorage, jt as buildRecoveryContextWithPipeline, k as turnsDual, kt as buildTurnInitiator, l as registerCompressLineageResolver, lt as AgentStorageSubjects, m as InsertMessageRouting, mt as FallbackRuntimeOptions, n as buildSessionContext, nt as parseForkTransforms, ot as registerDrizzleSessionStorage, p as StartTurnOptions, pt as assembleForkContext, q as fetchSessionPreviewMaps, qt as ISessionOrchestrator, r as BuildContextOptions, rt as registerFtsSearchHandler, st as registerMemorySessionStorage, t as getFullConversation, tt as mapRowToSession, u as registerParentResolver, ut as SessionExtensionContextImpl, v as registerDrizzleMessageRoutingStorage, vt as resolveAdapterNameById, w as registerMemoryMessageStorage, wt as registerResumeHandler, x as InsertMessage, xt as resetBuiltInActionsRegistration, y as MessageRoutingNamespace, yt as registerListActionsHandler, z as registerDrizzleSessionEventStorage, zt as resolveModelCapabilities } from "../index-
|
|
16
|
+
import { $ as fetchMessageCountsBySession, A as registerMemoryTurnStorage, At as RecoveryConfig, B as registerMemorySessionEventStorage, Bt as findTurnByAgent, C as messages, Ct as registerGetStatusCountsHandler, D as SelectTurn, Dt as ContextWindowTrackerConfig, E as InsertTurn, Et as AgentContextState, F as importCursorsDual, Ft as verifyAndRecoverAgents, Gt as TurnContextEnricher, H as SelectSessionEvent, Ht as resolveTargetAgents, I as EventTransform, It as buildRecoveryContext, J as mapAgentsBySession, Jt as SessionOrchestrator, K as SessionPreviewMaps, Kt as AdapterRegistry, L as SessionLogger, Lt as resolveAdapterId, M as EmbeddingIndexManager, Mt as ensureAgentCwd, N as registerDrizzleImportCursorStorage, Nt as ensureAgentModel, O as turns, Ot as SessionContextWindowState, P as importCursors, Pt as recoverAgent, Q as fetchAgentsBySession, R as SessionLoggerOptions, Rt as resolveExecutionTarget, S as SelectMessage, St as actionRegistry, T as registerDrizzleMessageStorage, Tt as ContextWindowTracker, U as sessionEvents, Ut as extractTextContent, V as InsertSessionEvent, Vt as getOrCreateSession, W as sessionEventsDual, Wt as normalizeToBlocks, X as SearchFilters, Xt as MakaioSessionService, Y as mapToSession, Yt as registerCoreSessionServiceHandlers, Z as SearchSessionRow, _ as messageRoutingDual, _t as normalizeSelectionString, a as kindToBranchKind, at as registerMemoryAgentStorage, b as MessageRoutingSubjects, bt as registerBuiltInActions, c as registerSpawningToolCallResolver, ct as AgentStorageNamespace, d as MakaioSession, dt as createSessionExtensionContext, et as fetchPreviewBySession, f as MakaioSessionConfig, ft as SessionBridge, g as messageRouting, gt as CONNECTOR_SWAP_DEFAULT_PIPELINE, h as SelectMessageRouting, ht as pickFallbackRuntimeOptions, i as ContextAssemblyResult, it as registerDrizzleAgentStorage, j as registerDrizzleTurnStorage, jt as buildRecoveryContextWithPipeline, k as turnsDual, kt as buildTurnInitiator, l as registerCompressLineageResolver, lt as AgentStorageSubjects, m as InsertMessageRouting, mt as FallbackRuntimeOptions, n as buildSessionContext, nt as parseForkTransforms, ot as registerDrizzleSessionStorage, p as StartTurnOptions, pt as assembleForkContext, q as fetchSessionPreviewMaps, qt as ISessionOrchestrator, r as BuildContextOptions, rt as registerFtsSearchHandler, st as registerMemorySessionStorage, t as getFullConversation, tt as mapRowToSession, u as registerParentResolver, ut as SessionExtensionContextImpl, v as registerDrizzleMessageRoutingStorage, vt as resolveAdapterNameById, w as registerMemoryMessageStorage, wt as registerResumeHandler, x as InsertMessage, xt as resetBuiltInActionsRegistration, y as MessageRoutingNamespace, yt as registerListActionsHandler, z as registerDrizzleSessionEventStorage, zt as resolveModelCapabilities } from "../index-DrGLAuZc.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-C6BhKRnH.mjs";
|
|
18
18
|
import { n as activateProviderContextStrict, r as buildProviderContext, t as activateProviderContext } from "../index-D0SUjZmU.mjs";
|
|
19
|
-
import { i as SessionStorageSubjects, r as SessionStorageNamespace } from "../namespace-
|
|
20
|
-
import { a as agents, s as sessions } from "../schema-
|
|
21
|
-
import { n as SessionEventStorageSubjects, t as SessionEventStorageNamespace } from "../namespace-
|
|
22
|
-
import { t as TurnStorageNamespace } from "../namespace-
|
|
23
|
-
import { n as TurnStorageSubjects } from "../namespace
|
|
19
|
+
import { i as SessionStorageSubjects, r as SessionStorageNamespace } from "../namespace-Boe6l5n9.mjs";
|
|
20
|
+
import { a as agents, s as sessions } from "../schema-DGMLvVoQ.mjs";
|
|
21
|
+
import { n as SessionEventStorageSubjects, t as SessionEventStorageNamespace } from "../namespace-BxxBhcV_.mjs";
|
|
22
|
+
import { t as TurnStorageNamespace } from "../namespace-aJJfBJU5.mjs";
|
|
23
|
+
import { n as TurnStorageSubjects } from "../namespace--s0d86h-.mjs";
|
|
24
24
|
import { i as MessageStorageSubjects, r as MessageStorageNamespace } from "../namespace-B73Sxj5L.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-BxFA1XcP.mjs";
|
|
26
26
|
import { t as ToolApprovalService } from "../index-Cz9JMjZK.mjs";
|
|
@@ -28,10 +28,10 @@ import { t as TrayMenuService } from "../index-BMpRB6iE.mjs";
|
|
|
28
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-lqvZ6UpK.mjs";
|
|
29
29
|
import { n as TrayMenuSubjects, t as TrayMenuNamespace } from "../namespace-CqUGzG53.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-9IDJUJ4X.mjs";
|
|
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-
|
|
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-zgm2j9V92.mjs";
|
|
32
32
|
import { a as PreferenceValueSchema, i as PreferenceKeySchema, n as PreferenceItemSchema, o as PreferencesSchemas, r as PreferenceKey, t as PreferenceItem } from "../schemas-DZUaRcYl.mjs";
|
|
33
33
|
import { n as PreferencesSubjects, t as PreferencesNamespace } from "../storage-namespace-BXmMUd7a.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-
|
|
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-kVcJMjjn2.mjs";
|
|
35
35
|
import { n as SubagentTemplateSubjects, t as SubagentTemplateKernelNamespace } from "../namespace-B60mn8J-2.mjs";
|
|
36
36
|
import * as _$zod from "zod";
|
|
37
37
|
import { z } from "zod";
|
|
@@ -41,8 +41,8 @@ import { IMakaioBus } from "@makaio/framework/bus";
|
|
|
41
41
|
import * as _$_makaio_contracts0 from "@makaio/framework/contracts";
|
|
42
42
|
import { AgentResolutionContext, ArtifactKindRegistration, ArtifactLifecycleHookRegistration, ArtifactObservation, ArtifactProjectionPolicy, ArtifactRevision, CanonicalModelResolvedSelection, MakaioNodeExtension, ProviderDefinition, RegisteredStepBlock, RegisteredTriggerBlock, RelationTypeRegistration, ResolvableCanonicalModel, TransitionActionFactory, TransitionActionInvocation, TransitionEvaluationContext, TransitionEventType, TransitionRuleDefinition, TransitionRuleDefinitionSchema, WorkflowBlockCollection } from "@makaio/framework/contracts";
|
|
43
43
|
import { BaseService } from "@makaio/framework/service-base";
|
|
44
|
-
import * as _$drizzle_orm_sqlite_core0 from "drizzle-orm/sqlite-core";
|
|
45
44
|
import * as _$_makaio_storage_core0 from "@makaio/framework/storage";
|
|
45
|
+
import * as _$drizzle_orm_sqlite_core0 from "drizzle-orm/sqlite-core";
|
|
46
46
|
import * as _$_makaio_ai_adapters_core0 from "@makaio/framework/adapters";
|
|
47
47
|
import { FacetNamespaceRegistration } from "@makaio/framework/contracts/facet";
|
|
48
48
|
import { SurfaceBindingRegistration } from "@makaio/framework/contracts/materialization";
|
|
@@ -2390,6 +2390,7 @@ declare const FrameworkServicesCoreNamespaces: readonly [_$_makaio_core0.BusName
|
|
|
2390
2390
|
adapterSessionId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2391
2391
|
model: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2392
2392
|
cwd: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2393
|
+
allowedDirectories: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
|
|
2393
2394
|
providerConfigId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2394
2395
|
personaId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2395
2396
|
profileId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
@@ -2426,6 +2427,7 @@ declare const FrameworkServicesCoreNamespaces: readonly [_$_makaio_core0.BusName
|
|
|
2426
2427
|
adapterSessionId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2427
2428
|
model: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2428
2429
|
cwd: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2430
|
+
allowedDirectories: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
|
|
2429
2431
|
providerConfigId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2430
2432
|
personaId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2431
2433
|
profileId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
@@ -2482,6 +2484,7 @@ declare const FrameworkServicesCoreNamespaces: readonly [_$_makaio_core0.BusName
|
|
|
2482
2484
|
adapterSessionId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2483
2485
|
model: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2484
2486
|
cwd: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2487
|
+
allowedDirectories: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
|
|
2485
2488
|
providerConfigId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2486
2489
|
personaId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2487
2490
|
profileId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
@@ -2520,6 +2523,7 @@ declare const FrameworkServicesCoreNamespaces: readonly [_$_makaio_core0.BusName
|
|
|
2520
2523
|
adapterSessionId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2521
2524
|
model: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2522
2525
|
cwd: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2526
|
+
allowedDirectories: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
|
|
2523
2527
|
providerConfigId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2524
2528
|
personaId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2525
2529
|
profileId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
@@ -2571,8 +2575,10 @@ declare const FrameworkServicesCoreNamespaces: readonly [_$_makaio_core0.BusName
|
|
|
2571
2575
|
updateRuntime: {
|
|
2572
2576
|
request: _$zod.ZodObject<{
|
|
2573
2577
|
agentId: _$zod.ZodString;
|
|
2578
|
+
adapterId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2574
2579
|
cwd: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2575
2580
|
model: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2581
|
+
allowedDirectories: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
|
|
2576
2582
|
providerConfigId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2577
2583
|
}, _$zod_v4_core0.$strip>;
|
|
2578
2584
|
response: _$zod.ZodObject<{
|
|
@@ -2718,6 +2724,25 @@ declare const FrameworkServicesCoreNamespaces: readonly [_$_makaio_core0.BusName
|
|
|
2718
2724
|
}, {}, {
|
|
2719
2725
|
length: number | undefined;
|
|
2720
2726
|
}>;
|
|
2727
|
+
allowedDirectories: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
2728
|
+
name: string;
|
|
2729
|
+
tableName: "agents";
|
|
2730
|
+
dataType: "json";
|
|
2731
|
+
columnType: "SQLiteTextJson";
|
|
2732
|
+
data: string[];
|
|
2733
|
+
driverParam: string;
|
|
2734
|
+
notNull: false;
|
|
2735
|
+
hasDefault: false;
|
|
2736
|
+
isPrimaryKey: false;
|
|
2737
|
+
isAutoincrement: false;
|
|
2738
|
+
hasRuntimeDefault: false;
|
|
2739
|
+
enumValues: undefined;
|
|
2740
|
+
baseColumn: never;
|
|
2741
|
+
identity: undefined;
|
|
2742
|
+
generated: undefined;
|
|
2743
|
+
}, {}, {
|
|
2744
|
+
$type: string[];
|
|
2745
|
+
}>;
|
|
2721
2746
|
providerConfigId: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
2722
2747
|
name: "provider_config_id";
|
|
2723
2748
|
tableName: "agents";
|
|
@@ -3782,8 +3807,8 @@ declare const FrameworkServicesCoreNamespaces: readonly [_$_makaio_core0.BusName
|
|
|
3782
3807
|
path: _$zod.ZodString;
|
|
3783
3808
|
kind: _$zod.ZodEnum<{
|
|
3784
3809
|
change: "change";
|
|
3785
|
-
delete: "delete";
|
|
3786
3810
|
create: "create";
|
|
3811
|
+
delete: "delete";
|
|
3787
3812
|
}>;
|
|
3788
3813
|
}, _$zod_v4_core0.$strip>;
|
|
3789
3814
|
batch: _$zod.ZodObject<{
|
|
@@ -3791,8 +3816,8 @@ declare const FrameworkServicesCoreNamespaces: readonly [_$_makaio_core0.BusName
|
|
|
3791
3816
|
path: _$zod.ZodString;
|
|
3792
3817
|
kind: _$zod.ZodEnum<{
|
|
3793
3818
|
change: "change";
|
|
3794
|
-
delete: "delete";
|
|
3795
3819
|
create: "create";
|
|
3820
|
+
delete: "delete";
|
|
3796
3821
|
}>;
|
|
3797
3822
|
}, _$zod_v4_core0.$strip>>;
|
|
3798
3823
|
}, _$zod_v4_core0.$strip>;
|
|
@@ -5756,6 +5781,14 @@ declare const FrameworkServicesCoreNamespaces: readonly [_$_makaio_core0.BusName
|
|
|
5756
5781
|
request: _$zod.ZodObject<{
|
|
5757
5782
|
sessionId: _$zod.ZodString;
|
|
5758
5783
|
turnId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
5784
|
+
initiator: _$zod.ZodOptional<_$zod.ZodObject<{
|
|
5785
|
+
source: _$zod.ZodEnum<{
|
|
5786
|
+
user: "user";
|
|
5787
|
+
system: "system";
|
|
5788
|
+
extension: "extension";
|
|
5789
|
+
}>;
|
|
5790
|
+
sourceId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
5791
|
+
}, _$zod_v4_core0.$strip>>;
|
|
5759
5792
|
}, _$zod_v4_core0.$strip>;
|
|
5760
5793
|
response: _$zod.ZodObject<{
|
|
5761
5794
|
turn: _$zod.ZodObject<{
|
|
@@ -5782,6 +5815,14 @@ declare const FrameworkServicesCoreNamespaces: readonly [_$_makaio_core0.BusName
|
|
|
5782
5815
|
cost: _$zod.ZodOptional<_$zod.ZodNumber>;
|
|
5783
5816
|
}, _$zod_v4_core0.$strip>>>;
|
|
5784
5817
|
}, _$zod_v4_core0.$strip>>;
|
|
5818
|
+
initiator: _$zod.ZodOptional<_$zod.ZodObject<{
|
|
5819
|
+
source: _$zod.ZodEnum<{
|
|
5820
|
+
user: "user";
|
|
5821
|
+
system: "system";
|
|
5822
|
+
extension: "extension";
|
|
5823
|
+
}>;
|
|
5824
|
+
sourceId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
5825
|
+
}, _$zod_v4_core0.$strip>>;
|
|
5785
5826
|
}, _$zod_v4_core0.$strip>;
|
|
5786
5827
|
}, _$zod_v4_core0.$strip>;
|
|
5787
5828
|
};
|
|
@@ -5836,6 +5877,14 @@ declare const FrameworkServicesCoreNamespaces: readonly [_$_makaio_core0.BusName
|
|
|
5836
5877
|
cost: _$zod.ZodOptional<_$zod.ZodNumber>;
|
|
5837
5878
|
}, _$zod_v4_core0.$strip>>>;
|
|
5838
5879
|
}, _$zod_v4_core0.$strip>>;
|
|
5880
|
+
initiator: _$zod.ZodOptional<_$zod.ZodObject<{
|
|
5881
|
+
source: _$zod.ZodEnum<{
|
|
5882
|
+
user: "user";
|
|
5883
|
+
system: "system";
|
|
5884
|
+
extension: "extension";
|
|
5885
|
+
}>;
|
|
5886
|
+
sourceId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
5887
|
+
}, _$zod_v4_core0.$strip>>;
|
|
5839
5888
|
}, _$zod_v4_core0.$strip>;
|
|
5840
5889
|
transitioned: _$zod.ZodBoolean;
|
|
5841
5890
|
}, _$zod_v4_core0.$strip>;
|
|
@@ -5866,6 +5915,14 @@ declare const FrameworkServicesCoreNamespaces: readonly [_$_makaio_core0.BusName
|
|
|
5866
5915
|
cost: _$zod.ZodOptional<_$zod.ZodNumber>;
|
|
5867
5916
|
}, _$zod_v4_core0.$strip>>>;
|
|
5868
5917
|
}, _$zod_v4_core0.$strip>>;
|
|
5918
|
+
initiator: _$zod.ZodOptional<_$zod.ZodObject<{
|
|
5919
|
+
source: _$zod.ZodEnum<{
|
|
5920
|
+
user: "user";
|
|
5921
|
+
system: "system";
|
|
5922
|
+
extension: "extension";
|
|
5923
|
+
}>;
|
|
5924
|
+
sourceId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
5925
|
+
}, _$zod_v4_core0.$strip>>;
|
|
5869
5926
|
}, _$zod_v4_core0.$strip>;
|
|
5870
5927
|
}, _$zod_v4_core0.$strip>;
|
|
5871
5928
|
response: _$zod.ZodObject<{
|
|
@@ -5893,6 +5950,14 @@ declare const FrameworkServicesCoreNamespaces: readonly [_$_makaio_core0.BusName
|
|
|
5893
5950
|
cost: _$zod.ZodOptional<_$zod.ZodNumber>;
|
|
5894
5951
|
}, _$zod_v4_core0.$strip>>>;
|
|
5895
5952
|
}, _$zod_v4_core0.$strip>>;
|
|
5953
|
+
initiator: _$zod.ZodOptional<_$zod.ZodObject<{
|
|
5954
|
+
source: _$zod.ZodEnum<{
|
|
5955
|
+
user: "user";
|
|
5956
|
+
system: "system";
|
|
5957
|
+
extension: "extension";
|
|
5958
|
+
}>;
|
|
5959
|
+
sourceId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
5960
|
+
}, _$zod_v4_core0.$strip>>;
|
|
5896
5961
|
}, _$zod_v4_core0.$strip>;
|
|
5897
5962
|
}, _$zod_v4_core0.$strip>;
|
|
5898
5963
|
};
|
|
@@ -5925,6 +5990,14 @@ declare const FrameworkServicesCoreNamespaces: readonly [_$_makaio_core0.BusName
|
|
|
5925
5990
|
cost: _$zod.ZodOptional<_$zod.ZodNumber>;
|
|
5926
5991
|
}, _$zod_v4_core0.$strip>>>;
|
|
5927
5992
|
}, _$zod_v4_core0.$strip>>;
|
|
5993
|
+
initiator: _$zod.ZodOptional<_$zod.ZodObject<{
|
|
5994
|
+
source: _$zod.ZodEnum<{
|
|
5995
|
+
user: "user";
|
|
5996
|
+
system: "system";
|
|
5997
|
+
extension: "extension";
|
|
5998
|
+
}>;
|
|
5999
|
+
sourceId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
6000
|
+
}, _$zod_v4_core0.$strip>>;
|
|
5928
6001
|
}, _$zod_v4_core0.$strip>>;
|
|
5929
6002
|
}, _$zod_v4_core0.$strip>;
|
|
5930
6003
|
};
|
|
@@ -5963,6 +6036,14 @@ declare const FrameworkServicesCoreNamespaces: readonly [_$_makaio_core0.BusName
|
|
|
5963
6036
|
cost: _$zod.ZodOptional<_$zod.ZodNumber>;
|
|
5964
6037
|
}, _$zod_v4_core0.$strip>>>;
|
|
5965
6038
|
}, _$zod_v4_core0.$strip>>;
|
|
6039
|
+
initiator: _$zod.ZodOptional<_$zod.ZodObject<{
|
|
6040
|
+
source: _$zod.ZodEnum<{
|
|
6041
|
+
user: "user";
|
|
6042
|
+
system: "system";
|
|
6043
|
+
extension: "extension";
|
|
6044
|
+
}>;
|
|
6045
|
+
sourceId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
6046
|
+
}, _$zod_v4_core0.$strip>>;
|
|
5966
6047
|
}, _$zod_v4_core0.$strip>>;
|
|
5967
6048
|
}, _$zod_v4_core0.$strip>;
|
|
5968
6049
|
};
|
|
@@ -5995,6 +6076,14 @@ declare const FrameworkServicesCoreNamespaces: readonly [_$_makaio_core0.BusName
|
|
|
5995
6076
|
cost: _$zod.ZodOptional<_$zod.ZodNumber>;
|
|
5996
6077
|
}, _$zod_v4_core0.$strip>>>;
|
|
5997
6078
|
}, _$zod_v4_core0.$strip>>;
|
|
6079
|
+
initiator: _$zod.ZodOptional<_$zod.ZodObject<{
|
|
6080
|
+
source: _$zod.ZodEnum<{
|
|
6081
|
+
user: "user";
|
|
6082
|
+
system: "system";
|
|
6083
|
+
extension: "extension";
|
|
6084
|
+
}>;
|
|
6085
|
+
sourceId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
6086
|
+
}, _$zod_v4_core0.$strip>>;
|
|
5998
6087
|
}, _$zod_v4_core0.$strip>>;
|
|
5999
6088
|
}, _$zod_v4_core0.$strip>;
|
|
6000
6089
|
};
|
|
@@ -6025,6 +6114,14 @@ declare const FrameworkServicesCoreNamespaces: readonly [_$_makaio_core0.BusName
|
|
|
6025
6114
|
cost: _$zod.ZodOptional<_$zod.ZodNumber>;
|
|
6026
6115
|
}, _$zod_v4_core0.$strip>>>;
|
|
6027
6116
|
}, _$zod_v4_core0.$strip>>;
|
|
6117
|
+
initiator: _$zod.ZodOptional<_$zod.ZodObject<{
|
|
6118
|
+
source: _$zod.ZodEnum<{
|
|
6119
|
+
user: "user";
|
|
6120
|
+
system: "system";
|
|
6121
|
+
extension: "extension";
|
|
6122
|
+
}>;
|
|
6123
|
+
sourceId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
6124
|
+
}, _$zod_v4_core0.$strip>>;
|
|
6028
6125
|
}, _$zod_v4_core0.$strip>>;
|
|
6029
6126
|
}, _$zod_v4_core0.$strip>;
|
|
6030
6127
|
};
|
|
@@ -6136,14 +6233,14 @@ declare const FrameworkServicesCoreNamespaces: readonly [_$_makaio_core0.BusName
|
|
|
6136
6233
|
providerConfigId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
6137
6234
|
model: _$zod.ZodOptional<_$zod.ZodString>;
|
|
6138
6235
|
enabled: _$zod.ZodDefault<_$zod.ZodBoolean>;
|
|
6236
|
+
systemPrompt: _$zod.ZodOptional<_$zod.ZodString>;
|
|
6237
|
+
allowedTools: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
|
|
6238
|
+
disallowedTools: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
|
|
6239
|
+
allowedDirectories: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
|
|
6139
6240
|
contextMode: _$zod.ZodDefault<_$zod.ZodEnum<{
|
|
6140
6241
|
fork: "fork";
|
|
6141
6242
|
fresh: "fresh";
|
|
6142
6243
|
}>>;
|
|
6143
|
-
disallowedTools: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
|
|
6144
|
-
allowedDirectories: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
|
|
6145
|
-
systemPrompt: _$zod.ZodOptional<_$zod.ZodString>;
|
|
6146
|
-
allowedTools: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
|
|
6147
6244
|
}, _$zod_v4_core0.$strip>;
|
|
6148
6245
|
response: _$zod.ZodObject<{
|
|
6149
6246
|
id: _$zod.ZodString;
|
package/dist/services/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{agents as e,sessions as t}from"./session/storage/schema.mjs";import{n,t as r}from"../schema-BrnYlDwZ.mjs";import{t as i}from"../schema-BerZmr2q.mjs";import{i as a,n as o,r as s,t as c}from"../namespace-DwE2g8Wm.mjs";import{SessionStorageNamespace as l,SessionStorageSubjects as u}from"./session/storage/namespace.mjs";import{A as ee,C as d,D as te,E as ne,F as re,M as ie,N as ae,O as oe,P as f,S as se,T as ce,_ as le,a as ue,b as de,c as fe,d as pe,f as me,g as he,h as ge,i as _e,j as ve,k as ye,l as p,m,n as h,o as g,p as _,r as v,s as y,t as b,u as x,v as S,w as C,x as w,y as T}from"../handlers-C8EtpSqK.mjs";import{A as E,B as D,C as O,E as k,F as A,G as j,H as M,I as N,J as P,K as be,L as xe,M as Se,N as Ce,O as we,P as Te,R as Ee,S as De,T as Oe,U as ke,V as Ae,W as je,X as Me,Y as Ne,_ as Pe,a as Fe,b as Ie,c as Le,d as Re,g as ze,h as Be,i as Ve,j as He,k as Ue,l as We,m as Ge,o as Ke,p as qe,q as Je,r as Ye,s as Xe,t as Ze,u as Qe,v as $e,w as et,x as tt,y as nt,z as rt}from"../session-KnewDVxt.mjs";import{TurnStorageNamespace as it,TurnStorageSubjects as at}from"./turn/namespace.mjs";import{TurnStorageNamespace as ot}from"./session/turns/namespace.mjs";import{AdapterRuntimeSchemas as st,ResolveIdRequestSchema as ct,ResolveIdResponseSchema as lt,ResolveNameRequestSchema as ut,ResolveNameResponseSchema as dt}from"./adapter-runtime/schemas.mjs";import{AdapterRuntimeNamespace as F,AdapterRuntimeSubjects as ft}from"./adapter-runtime/namespace.mjs";import{MessageStorageNamespace as pt,MessageStorageSubjects as mt}from"./session/messages/namespace.mjs";import{t as ht}from"../namespace-ENv7H7Na.mjs";import{ProviderStorageNamespace as gt}from"./settings/storage/providers-namespace.mjs";import{ContainerIsolatedExecutionTargetSchema as _t,ContainerLocalExecutionTargetSchema as vt,ExecutionTargetInputSchema as yt,ExecutionTargetListQuerySchema as bt,ExecutionTargetResolveRequestSchema as xt,ExecutionTargetSchema as St,ExecutionTargetSchemas as Ct,ExecutionTargetTypeSchema as wt,LocalExecutionTargetSchema as Tt}from"./execution-target/schemas.mjs";import{ExecutionTargetNamespace as I,ExecutionTargetSubjects as Et}from"./execution-target/namespace.mjs";import{n as Dt,r as Ot,t as kt}from"../provider-context-lfG0BpqX.mjs";import{BugEntrySchema as At,CompressRequestSchema as jt,CompressResponseSchema as Mt,CompressionEventSchema as Nt,CompressionSchemas as Pt,ExtractedContextSchema as Ft,TechnicalDetailsSchema as It,TodoEntrySchema as Lt}from"./compression/schemas.mjs";import{PreferenceItemSchema as Rt,PreferenceKeySchema as zt,PreferenceValueSchema as Bt,PreferencesSchemas as Vt}from"./preferences/schemas.mjs";import{PreferencesNamespace as L,PreferencesSubjects as Ht}from"./preferences/storage-namespace.mjs";import{t as Ut}from"../namespace-D6X67cUk.mjs";import{A as Wt,B as Gt,C as Kt,D as qt,E as Jt,F as Yt,G as Xt,H as Zt,I as Qt,J as $t,K as en,L as tn,M as nn,N as rn,O as an,P as on,R as sn,S as cn,T as ln,U as un,V as R,W as dn,Y as fn,_ as pn,a as z,b as mn,c as hn,d as gn,f as _n,g as B,h as vn,i as V,j as yn,k as bn,l as xn,m as Sn,o as Cn,p as H,q as wn,r as Tn,s as U,u as En,v as W,w as Dn,x as On,y as kn,z as An}from"../tools-D5DVHC-R.mjs";import{t as jn}from"../capability-service-jjrFLM6r.mjs";import{a as Mn,c as Nn,i as Pn,l as Fn,n as In,o as G,r as Ln,s as Rn,t as zn,u as Bn}from"../model-registry-B0AIdj7O.mjs";import{t as Vn}from"../tool-approval-service-Cb2F1yT6.mjs";import{TrayMenuEntrySchema as Hn,TrayMenuGroupEntrySchema as Un,TrayMenuGroupSchema as Wn,TrayMenuItemClickedSchema as Gn,TrayMenuListEntrySchema as Kn,TrayMenuMetadataSchema as qn,TrayMenuSchemas as Jn,TrayMenuSectionSchema as Yn}from"./tray-menu/schemas.mjs";import{TrayMenuNamespace as K,TrayMenuSubjects as Xn}from"./tray-menu/namespace.mjs";import{t as Zn}from"../tray-menu-service-B5YPK_YF.mjs";import{n as Qn}from"../handler-DSfSAlxx.mjs";import{i as $n,n as er,r as tr,t as nr}from"../package-OE9dMQsq.mjs";import{FsNamespace as rr}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 ir,AgentRuntimeSchemas as ar,AgentRuntimeSelectionSchema as or}from"./agent-runtime/schemas.mjs";import{AgentRuntimeNamespace as q,AgentRuntimeSubjects as sr}from"./agent-runtime/namespace.mjs";import{CodebaseChangedEventSchema as cr,CodebaseSchemas as lr}from"./codebase/schemas.mjs";import{CodebaseNamespace as J,CodebaseSubjects as ur}from"./codebase/namespace.mjs";import{CompressionNamespace as Y,CompressionSubjects as dr}from"./compression/namespace.mjs";import{r as fr,t as pr}from"../storage-namespace-BXO3lDVy.mjs";import{DefinitionNamespace as mr}from"./definition/namespace.mjs";import{DialogNamespace as hr}from"./dialog/namespace.mjs";import{_ as gr,c as _r,d as vr,f as yr,g as br,h as xr,i as Sr,l as Cr,m as wr,n as Tr,o as Er,p as Dr,r as X,s as Or,t as kr,u as Ar,v as jr,y as Mr}from"../execution-target-CQGYaaM2.mjs";import{CLIDetectionNamespace as Nr}from"./cli-detection/namespace.mjs";import{LocalNotificationNamespace as Pr}from"./local-notification/namespace.mjs";import{t as Fr}from"../namespace-CUOGcGPG.mjs";import{ExtensionConfigStorageNamespace as Ir}from"./settings/storage/extension-configs/namespace.mjs";import{ClientStorageNamespace as Lr}from"./settings/storage/clients-namespace.mjs";import{SubagentTemplateCompletedEventSchema as Rr,SubagentTemplateCreateSchema as zr,SubagentTemplateInstanceSchema as Br,SubagentTemplateInstanceStatusSchema as Vr,SubagentTemplateKernelSchemas as Hr,SubagentTemplateSchema as Ur,SubagentTemplateSettingsSchemas as Wr,SubagentTemplateSpawnRequestSchema as Gr,SubagentTemplateSpawnedEventSchema as Kr,SubagentTemplateSummarySchema as qr,SubagentTemplateUpdateSchema as Jr}from"./subagent-template/schemas.mjs";import{r as Yr,t as Xr}from"../namespace-BgPoC46Q.mjs";import{SubagentTemplateKernelNamespace as Z,SubagentTemplateSubjects as Zr}from"./subagent-template/namespace.mjs";import{i as Qr,n as $r,r as ei,t as ti}from"../identity-Bmx-8fPa.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{ImportCursorStorageNamespace as ni}from"@makaio/framework/adapters";import{ModelRegistryPublicNamespace as ri}from"@makaio/framework/contracts/model-registry";function ii(e){return{source:`extension`,ownerKey:`extension:${e}`}}function ai(e,t){for(let n of e.values())if(n.registry===t)for(let e of n.registrations)t.registerKind(e,n.owner)}function oi(){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)}ai(e,n.registry)}};return{filter:e=>(e.artifactKinds?.kinds?.length??0)>0,async processActivated(n,r,i){let a=i.getService(z);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=ii(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 si(e,t,n){return{...n,filter:{...n.filter,kind:e,schemaVersion:t}}}function ci(){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(V);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(si(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 Q(e,t){for(let n of e.values())if(n.registry===t)for(let e of n.registrations)t.registerNamespace(e)}function li(){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(U);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 ui(){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(H);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 di(){let e=new Map;return{filter:e=>!!e.workflowBlocks?.blocks,async processActivated(t,n,r){let i=r.getService(W);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 fi(){let e=new Map;return{filter:e=>!!(e.transitionRules?.rules?.length||e.transitionActions?.actions),async processActivated(t,n,r){let i=r.getService(B);if(!i)throw Error(`TransitionContributionProcessor: TransitionPipelineService is not available — ensure '${B.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&&pi(t,a),c&&mi(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 pi(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 mi(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 hi=[F,ht,q,f,Nr,Lr,J,Y,fr,pr,mr,hr,X,I,Ir,rr,Qn,ni,Pr,D,G,ri,L,Fr,gt,Ut,Xr,K,it,Z,Yr];export{ti as AdapterIdentityRegistry,P as AdapterRegistry,F as AdapterRuntimeNamespace,st as AdapterRuntimeSchemas,ft as AdapterRuntimeSubjects,ir as AgentInstanceStatusSchema,q as AgentRuntimeNamespace,ar as AgentRuntimeSchemas,or as AgentRuntimeSelectionSchema,sr as AgentRuntimeSubjects,f as AgentStorageNamespace,re as AgentStorageSubjects,wn as ArtifactLifecycleHookRegistry,V as ArtifactLifecycleHookRegistryToken,$t as ArtifactLifecycleHookRejectedError,fn as ArtifactSchemaRegistry,z as ArtifactSchemaRegistryToken,At as BugEntrySchema,Se as CONNECTOR_SWAP_DEFAULT_PIPELINE,zn as CachedRegistryFetcher,dn as CanonicalModelResolutionError,un as CanonicalModelResolver,Zt as CanonicalModelService,jn as CapabilityService,Cn as CapabilityToken,cr as CodebaseChangedEventSchema,J as CodebaseNamespace,lr as CodebaseSchemas,ur as CodebaseSubjects,jt as CompressRequestSchema,Mt as CompressResponseSchema,Nt as CompressionEventSchema,Y as CompressionNamespace,Pt as CompressionSchemas,dr as CompressionSubjects,Er as ContainerCreatedSchema,Or as ContainerDestroyedSchema,_t as ContainerIsolatedExecutionTargetSchema,_r as ContainerIsolatedSpawnRequestSchema,vt as ContainerLocalExecutionTargetSchema,Cr as ContainerLocalSpawnRequestSchema,Ar as ContainerRuntimeSchema,kr as ContainerSpawnNamespace,Tr as ContainerSpawnSubjects,vr as ContainerStartedSchema,yr as ContainerStateSchema,Dr as ContainerStoppedSchema,Ze as ContextWindowTracker,X as DockerNamespace,Sr as DockerSubjects,Xe as EmbeddingIndexManager,yt as ExecutionTargetInputSchema,bt as ExecutionTargetListQuerySchema,I as ExecutionTargetNamespace,xt as ExecutionTargetResolveRequestSchema,St as ExecutionTargetSchema,Ct as ExecutionTargetSchemas,Et as ExecutionTargetSubjects,wt as ExecutionTargetTypeSchema,Ft as ExtractedContextSchema,en as FacetNamespaceRegistry,U as FacetNamespaceRegistryToken,In as FallbackRegistryFetcher,hi as FrameworkServicesCoreNamespaces,Tt as LocalExecutionTargetSchema,Ke as MakaioSession,Ne as MakaioSessionService,D as MessageRoutingNamespace,Ae as MessageRoutingSubjects,pt as MessageStorageNamespace,mt as MessageStorageSubjects,G as ModelRegistryNamespace,Ln as ModelRegistryProviderNotFoundError,Nn as ModelRegistrySchema,Fn as ModelRegistrySchemas,Pn as ModelRegistryService,Rn as ModelRegistrySubjects,hn as ModelRegistryToken,Rt as PreferenceItemSchema,zt as PreferenceKeySchema,Bt as PreferenceValueSchema,L as PreferencesNamespace,Vt as PreferencesSchemas,Ht as PreferencesSubjects,Bn as ProviderModelOverrideSchema,ct as ResolveIdRequestSchema,lt as ResolveIdResponseSchema,ut as ResolveNameRequestSchema,dt as ResolveNameResponseSchema,E as SessionBridge,xn as SessionBridgeToken,c as SessionEventStorageNamespace,o as SessionEventStorageSubjects,we as SessionExtensionContextImpl,Re as SessionLogger,xe as SessionOrchestrator,En as SessionOrchestratorToken,l as SessionStorageNamespace,u as SessionStorageSubjects,gn as SessionStorageToken,_n as SessionToken,Ee as SessionTurnManager,wr as SpawnRequestSchema,xr as SpawnResponseSchema,br as StatusRequestSchema,gr as StatusResponseSchema,jr as StopRequestSchema,Mr as StopResponseSchema,$n as SubagentManager,tr as SubagentService,nr as SubagentServiceToken,Rr as SubagentTemplateCompletedEventSchema,zr as SubagentTemplateCreateSchema,Br as SubagentTemplateInstanceSchema,Vr as SubagentTemplateInstanceStatusSchema,Z as SubagentTemplateKernelNamespace,Hr as SubagentTemplateKernelSchemas,Ur as SubagentTemplateSchema,Wr as SubagentTemplateSettingsSchemas,Gr as SubagentTemplateSpawnRequestSchema,Kr as SubagentTemplateSpawnedEventSchema,Zr as SubagentTemplateSubjects,qr as SubagentTemplateSummarySchema,Jr as SubagentTemplateUpdateSchema,Xt as SurfaceBindingRegistry,H as SurfaceBindingRegistryToken,It as TechnicalDetailsSchema,Lt as TodoEntrySchema,Vn as ToolApprovalService,Sn as ToolApprovalToken,Gt as ToolRegistry,vn as ToolRegistryToken,tn as TransitionActionRegistry,Yt as TransitionPipelineService,B as TransitionPipelineToken,Qt as TransitionRuleRegistry,Hn as TrayMenuEntrySchema,Un as TrayMenuGroupEntrySchema,Wn as TrayMenuGroupSchema,Gn as TrayMenuItemClickedSchema,Kn as TrayMenuListEntrySchema,qn as TrayMenuMetadataSchema,K as TrayMenuNamespace,Jn as TrayMenuSchemas,Yn as TrayMenuSectionSchema,Zn as TrayMenuService,Xn as TrayMenuSubjects,pn as TrayMenuToken,ve as Turn,N as TurnContextEnricher,ot as TurnStorageNamespace,at as TurnStorageSubjects,sn as WORKFLOW_START_ACTION_TYPE,An as WorkflowBlockRegistry,W as WorkflowBlockRegistryToken,de as actionRegistry,kt as activateProviderContext,Dt as activateProviderContextStrict,e as agents,kn as artifactLifecycleHookRegistryPackage,mn as artifactSchemaRegistryPackage,h as assembleForkContext,$r as buildDeterministicAdapterId,Ot as buildProviderContext,S as buildRecoveryContext,_ as buildRecoveryContextWithPipeline,w as buildSessionContext,ce as buildTurnInitiator,R as canonicalModelPackage,On as capabilityPackage,oi as createArtifactKindContributionProcessor,ci as createArtifactLifecycleHookContributionProcessor,li as createFacetNamespaceContributionProcessor,cn as createModelRegistryPackage,Ue as createSessionExtensionContext,ui as createSurfaceBindingContributionProcessor,Tn as createToolContributionProcessor,fi as createTransitionContributionProcessor,di as createWorkflowBlockContributionProcessor,m as ensureAgentCwd,ge as ensureAgentModel,ye as extractTextContent,Kt as facetNamespaceRegistryPackage,Ge as fetchAgentsBySession,Be as fetchMessageCountsBySession,ze as fetchPreviewBySession,tt as fetchSessionPreviewMaps,ne as findTurnByAgent,Dn as frameworkCorePackages,T as getFullConversation,te as getOrCreateSession,We as importCursors,Qe as importCursorsDual,k as kindToBranchKind,De as mapAgentsBySession,Pe as mapRowToSession,O as mapToSession,Mn as mergeModelMetadata,M as messageRouting,ke as messageRoutingDual,i as messages,pe as normalizeSelectionString,ee as normalizeToBlocks,$e as parseForkTransforms,He as pickFallbackRuntimeOptions,he as recoverAgent,p as registerAbandonHandler,ei as registerAdapterRuntimeIdentityHandlers,fe as registerAttachHandler,g as registerBuiltInActions,ue as registerCompressHandler,Ve as registerCompressLineageResolver,Me as registerCoreSessionServiceHandlers,et as registerDrizzleAgentStorage,Le as registerDrizzleImportCursorStorage,rt as registerDrizzleMessageRoutingStorage,j as registerDrizzleMessageStorage,be as registerDrizzleSessionEventStorage,Ie as registerDrizzleSessionStorage,ae as registerDrizzleTurnStorage,_e as registerForkHandler,qe as registerFtsSearchHandler,Te as registerGetStatusCountsHandler,Ce as registerListActionsHandler,nt as registerMemoryAgentStorage,je as registerMemoryMessageStorage,Je as registerMemorySessionEventStorage,Oe as registerMemorySessionStorage,ie as registerMemoryTurnStorage,v as registerMergeHandler,Fe as registerParentResolver,A as registerResumeHandler,Ye as registerSpawningToolCallResolver,y as resetBuiltInActionsRegistration,se as resolveAdapterId,me as resolveAdapterNameById,Qr as resolveDeterministicAdapterId,d as resolveExecutionTarget,C as resolveModelCapabilities,oe as resolveTargetAgents,b as routeToAgents,x as routeToAgentsCore,ln as sessionBridgePackage,s as sessionEvents,a as sessionEventsDual,Jt as sessionOrchestratorPackage,qt as sessionPackage,an as sessionStoragePackage,t as sessions,er as subagentServicePackage,bn as surfaceBindingRegistryPackage,Wt as toolApprovalPackage,yn as toolRegistryPackage,nn as transitionPipelinePackage,rn as trayMenuPackage,r as turns,n as turnsDual,le as verifyAndRecoverAgents,on as workflowBlockRegistryPackage};
|
|
1
|
+
import{TurnStorageNamespace as e,TurnStorageSubjects as t}from"./turn/namespace.mjs";import{agents as n,sessions as r}from"./session/storage/schema.mjs";import{n as i,t as a}from"../schema-CzhOc7TV.mjs";import{t as o}from"../schema-C3TgjrsV.mjs";import{i as s,n as c,r as l,t as u}from"../namespace-Dfq6MDN9.mjs";import{SessionStorageNamespace as ee,SessionStorageSubjects as d}from"./session/storage/namespace.mjs";import{A as te,C as ne,D as re,E as ie,F as ae,M as oe,N as se,O as ce,P as f,S as le,T as ue,_ as de,a as fe,b as pe,c as me,d as he,f as ge,g as _e,h as ve,i as ye,j as p,k as m,l as h,m as g,n as _,o as v,p as y,r as b,s as x,t as S,u as C,v as w,w as T,x as E,y as D}from"../handlers-BAB4fQNH.mjs";import{A as O,B as k,C as A,E as j,F as M,G as N,H as P,I as be,J as xe,K as Se,L as Ce,M as we,N as Te,O as Ee,P as De,R as Oe,S as ke,T as Ae,U as je,V as Me,W as Ne,X as Pe,Y as Fe,_ as Ie,a as Le,b as Re,c as ze,d as Be,g as Ve,h as He,i as Ue,j as We,k as Ge,l as Ke,m as qe,o as Je,p as Ye,q as Xe,r as Ze,s as Qe,t as $e,u as et,v as tt,w as nt,x as rt,y as it,z as at}from"../session-P4nX60Xx.mjs";import{t as ot}from"../namespace-ENv7H7Na.mjs";import{n as st,r as ct,t as lt}from"../provider-context-wp4VSJFI.mjs";import{AdapterRuntimeSchemas as ut,ResolveIdRequestSchema as dt,ResolveIdResponseSchema as ft,ResolveNameRequestSchema as pt,ResolveNameResponseSchema as mt}from"./adapter-runtime/schemas.mjs";import{AdapterRuntimeNamespace as F,AdapterRuntimeSubjects as ht}from"./adapter-runtime/namespace.mjs";import{ProviderStorageNamespace as gt}from"./settings/storage/providers-namespace.mjs";import{ContainerIsolatedExecutionTargetSchema as _t,ContainerLocalExecutionTargetSchema as vt,ExecutionTargetInputSchema as yt,ExecutionTargetListQuerySchema as bt,ExecutionTargetResolveRequestSchema as xt,ExecutionTargetSchema as St,ExecutionTargetSchemas as Ct,ExecutionTargetTypeSchema as wt,LocalExecutionTargetSchema as Tt}from"./execution-target/schemas.mjs";import{ExecutionTargetNamespace as I,ExecutionTargetSubjects as Et}from"./execution-target/namespace.mjs";import{MessageStorageNamespace as Dt,MessageStorageSubjects as Ot}from"./session/messages/namespace.mjs";import{TurnStorageNamespace as kt}from"./session/turns/namespace.mjs";import{BugEntrySchema as At,CompressRequestSchema as jt,CompressResponseSchema as Mt,CompressionEventSchema as Nt,CompressionSchemas as Pt,ExtractedContextSchema as Ft,TechnicalDetailsSchema as It,TodoEntrySchema as Lt}from"./compression/schemas.mjs";import{PreferenceItemSchema as Rt,PreferenceKeySchema as zt,PreferenceValueSchema as Bt,PreferencesSchemas as Vt}from"./preferences/schemas.mjs";import{PreferencesNamespace as L,PreferencesSubjects as Ht}from"./preferences/storage-namespace.mjs";import{t as Ut}from"../namespace-D6X67cUk.mjs";import{A as Wt,B as Gt,C as Kt,D as qt,E as Jt,F as Yt,G as Xt,H as Zt,I as Qt,J as $t,K as en,L as tn,M as nn,N as rn,O as an,P as on,R as sn,S as cn,T as ln,U as un,V as R,W as dn,Y as fn,_ as pn,a as z,b as mn,c as hn,d as gn,f as _n,g as B,h as vn,i as V,j as yn,k as bn,l as xn,m as Sn,o as Cn,p as H,q as wn,r as Tn,s as U,u as En,v as W,w as Dn,x as On,y as kn,z as An}from"../tools-CQImrHAp.mjs";import{t as jn}from"../capability-service-jjrFLM6r.mjs";import{a as Mn,c as Nn,i as Pn,l as Fn,n as In,o as G,r as Ln,s as Rn,t as zn,u as Bn}from"../model-registry-B0AIdj7O.mjs";import{t as Vn}from"../tool-approval-service-DNHV5x0M.mjs";import{TrayMenuEntrySchema as Hn,TrayMenuGroupEntrySchema as Un,TrayMenuGroupSchema as Wn,TrayMenuItemClickedSchema as Gn,TrayMenuListEntrySchema as Kn,TrayMenuMetadataSchema as qn,TrayMenuSchemas as Jn,TrayMenuSectionSchema as Yn}from"./tray-menu/schemas.mjs";import{TrayMenuNamespace as K,TrayMenuSubjects as Xn}from"./tray-menu/namespace.mjs";import{t as Zn}from"../tray-menu-service-B5YPK_YF.mjs";import{n as Qn}from"../handler-DqpiV9eA.mjs";import{i as $n,n as er,r as tr,t as nr}from"../package-BzJvtM5O.mjs";import{FsNamespace as rr}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 ir,AgentRuntimeSchemas as ar,AgentRuntimeSelectionSchema as or}from"./agent-runtime/schemas.mjs";import{AgentRuntimeNamespace as q,AgentRuntimeSubjects as sr}from"./agent-runtime/namespace.mjs";import{CodebaseChangedEventSchema as cr,CodebaseSchemas as lr}from"./codebase/schemas.mjs";import{CodebaseNamespace as J,CodebaseSubjects as ur}from"./codebase/namespace.mjs";import{CompressionNamespace as Y,CompressionSubjects as dr}from"./compression/namespace.mjs";import{r as fr,t as pr}from"../storage-namespace-BXO3lDVy.mjs";import{DefinitionNamespace as mr}from"./definition/namespace.mjs";import{DialogNamespace as hr}from"./dialog/namespace.mjs";import{_ as gr,c as _r,d as vr,f as yr,g as br,h as xr,i as Sr,l as Cr,m as wr,n as Tr,o as Er,p as Dr,r as X,s as Or,t as kr,u as Ar,v as jr,y as Mr}from"../execution-target-CQGYaaM2.mjs";import{CLIDetectionNamespace as Nr}from"./cli-detection/namespace.mjs";import{LocalNotificationNamespace as Pr}from"./local-notification/namespace.mjs";import{t as Fr}from"../namespace-CUOGcGPG.mjs";import{ExtensionConfigStorageNamespace as Ir}from"./settings/storage/extension-configs/namespace.mjs";import{ClientStorageNamespace as Lr}from"./settings/storage/clients-namespace.mjs";import{SubagentTemplateCompletedEventSchema as Rr,SubagentTemplateCreateSchema as zr,SubagentTemplateInstanceSchema as Br,SubagentTemplateInstanceStatusSchema as Vr,SubagentTemplateKernelSchemas as Hr,SubagentTemplateSchema as Ur,SubagentTemplateSettingsSchemas as Wr,SubagentTemplateSpawnRequestSchema as Gr,SubagentTemplateSpawnedEventSchema as Kr,SubagentTemplateSummarySchema as qr,SubagentTemplateUpdateSchema as Jr}from"./subagent-template/schemas.mjs";import{r as Yr,t as Xr}from"../namespace-BgPoC46Q.mjs";import{SubagentTemplateKernelNamespace as Z,SubagentTemplateSubjects as Zr}from"./subagent-template/namespace.mjs";import{i as Qr,n as $r,r as ei,t as ti}from"../identity-Bmx-8fPa.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{ImportCursorStorageNamespace as ni}from"@makaio/framework/adapters";import{ModelRegistryPublicNamespace as ri}from"@makaio/framework/contracts/model-registry";function ii(e){return{source:`extension`,ownerKey:`extension:${e}`}}function ai(e,t){for(let n of e.values())if(n.registry===t)for(let e of n.registrations)t.registerKind(e,n.owner)}function oi(){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)}ai(e,n.registry)}};return{filter:e=>(e.artifactKinds?.kinds?.length??0)>0,async processActivated(n,r,i){let a=i.getService(z);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=ii(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 si(e,t,n){return{...n,filter:{...n.filter,kind:e,schemaVersion:t}}}function ci(){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(V);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(si(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 Q(e,t){for(let n of e.values())if(n.registry===t)for(let e of n.registrations)t.registerNamespace(e)}function li(){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(U);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 ui(){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(H);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 di(){let e=new Map;return{filter:e=>!!e.workflowBlocks?.blocks,async processActivated(t,n,r){let i=r.getService(W);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 fi(){let e=new Map;return{filter:e=>!!(e.transitionRules?.rules?.length||e.transitionActions?.actions),async processActivated(t,n,r){let i=r.getService(B);if(!i)throw Error(`TransitionContributionProcessor: TransitionPipelineService is not available — ensure '${B.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&&pi(t,a),c&&mi(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 pi(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 mi(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 hi=[F,ot,q,f,Nr,Lr,J,Y,fr,pr,mr,hr,X,I,Ir,rr,Qn,ni,Pr,k,G,ri,L,Fr,gt,Ut,Xr,K,e,Z,Yr];export{ti as AdapterIdentityRegistry,xe as AdapterRegistry,F as AdapterRuntimeNamespace,ut as AdapterRuntimeSchemas,ht as AdapterRuntimeSubjects,ir as AgentInstanceStatusSchema,q as AgentRuntimeNamespace,ar as AgentRuntimeSchemas,or as AgentRuntimeSelectionSchema,sr as AgentRuntimeSubjects,f as AgentStorageNamespace,ae as AgentStorageSubjects,wn as ArtifactLifecycleHookRegistry,V as ArtifactLifecycleHookRegistryToken,$t as ArtifactLifecycleHookRejectedError,fn as ArtifactSchemaRegistry,z as ArtifactSchemaRegistryToken,At as BugEntrySchema,we as CONNECTOR_SWAP_DEFAULT_PIPELINE,zn as CachedRegistryFetcher,dn as CanonicalModelResolutionError,un as CanonicalModelResolver,Zt as CanonicalModelService,jn as CapabilityService,Cn as CapabilityToken,cr as CodebaseChangedEventSchema,J as CodebaseNamespace,lr as CodebaseSchemas,ur as CodebaseSubjects,jt as CompressRequestSchema,Mt as CompressResponseSchema,Nt as CompressionEventSchema,Y as CompressionNamespace,Pt as CompressionSchemas,dr as CompressionSubjects,Er as ContainerCreatedSchema,Or as ContainerDestroyedSchema,_t as ContainerIsolatedExecutionTargetSchema,_r as ContainerIsolatedSpawnRequestSchema,vt as ContainerLocalExecutionTargetSchema,Cr as ContainerLocalSpawnRequestSchema,Ar as ContainerRuntimeSchema,kr as ContainerSpawnNamespace,Tr as ContainerSpawnSubjects,vr as ContainerStartedSchema,yr as ContainerStateSchema,Dr as ContainerStoppedSchema,$e as ContextWindowTracker,X as DockerNamespace,Sr as DockerSubjects,Qe as EmbeddingIndexManager,yt as ExecutionTargetInputSchema,bt as ExecutionTargetListQuerySchema,I as ExecutionTargetNamespace,xt as ExecutionTargetResolveRequestSchema,St as ExecutionTargetSchema,Ct as ExecutionTargetSchemas,Et as ExecutionTargetSubjects,wt as ExecutionTargetTypeSchema,Ft as ExtractedContextSchema,en as FacetNamespaceRegistry,U as FacetNamespaceRegistryToken,In as FallbackRegistryFetcher,hi as FrameworkServicesCoreNamespaces,Tt as LocalExecutionTargetSchema,Je as MakaioSession,Fe as MakaioSessionService,k as MessageRoutingNamespace,Me as MessageRoutingSubjects,Dt as MessageStorageNamespace,Ot as MessageStorageSubjects,G as ModelRegistryNamespace,Ln as ModelRegistryProviderNotFoundError,Nn as ModelRegistrySchema,Fn as ModelRegistrySchemas,Pn as ModelRegistryService,Rn as ModelRegistrySubjects,hn as ModelRegistryToken,Rt as PreferenceItemSchema,zt as PreferenceKeySchema,Bt as PreferenceValueSchema,L as PreferencesNamespace,Vt as PreferencesSchemas,Ht as PreferencesSubjects,Bn as ProviderModelOverrideSchema,dt as ResolveIdRequestSchema,ft as ResolveIdResponseSchema,pt as ResolveNameRequestSchema,mt as ResolveNameResponseSchema,O as SessionBridge,xn as SessionBridgeToken,u as SessionEventStorageNamespace,c as SessionEventStorageSubjects,Ee as SessionExtensionContextImpl,Be as SessionLogger,Ce as SessionOrchestrator,En as SessionOrchestratorToken,ee as SessionStorageNamespace,d as SessionStorageSubjects,gn as SessionStorageToken,_n as SessionToken,Oe as SessionTurnManager,wr as SpawnRequestSchema,xr as SpawnResponseSchema,br as StatusRequestSchema,gr as StatusResponseSchema,jr as StopRequestSchema,Mr as StopResponseSchema,$n as SubagentManager,tr as SubagentService,nr as SubagentServiceToken,Rr as SubagentTemplateCompletedEventSchema,zr as SubagentTemplateCreateSchema,Br as SubagentTemplateInstanceSchema,Vr as SubagentTemplateInstanceStatusSchema,Z as SubagentTemplateKernelNamespace,Hr as SubagentTemplateKernelSchemas,Ur as SubagentTemplateSchema,Wr as SubagentTemplateSettingsSchemas,Gr as SubagentTemplateSpawnRequestSchema,Kr as SubagentTemplateSpawnedEventSchema,Zr as SubagentTemplateSubjects,qr as SubagentTemplateSummarySchema,Jr as SubagentTemplateUpdateSchema,Xt as SurfaceBindingRegistry,H as SurfaceBindingRegistryToken,It as TechnicalDetailsSchema,Lt as TodoEntrySchema,Vn as ToolApprovalService,Sn as ToolApprovalToken,Gt as ToolRegistry,vn as ToolRegistryToken,tn as TransitionActionRegistry,Yt as TransitionPipelineService,B as TransitionPipelineToken,Qt as TransitionRuleRegistry,Hn as TrayMenuEntrySchema,Un as TrayMenuGroupEntrySchema,Wn as TrayMenuGroupSchema,Gn as TrayMenuItemClickedSchema,Kn as TrayMenuListEntrySchema,qn as TrayMenuMetadataSchema,K as TrayMenuNamespace,Jn as TrayMenuSchemas,Yn as TrayMenuSectionSchema,Zn as TrayMenuService,Xn as TrayMenuSubjects,pn as TrayMenuToken,D as Turn,be as TurnContextEnricher,kt as TurnStorageNamespace,t as TurnStorageSubjects,sn as WORKFLOW_START_ACTION_TYPE,An as WorkflowBlockRegistry,W as WorkflowBlockRegistryToken,m as actionRegistry,lt as activateProviderContext,st as activateProviderContextStrict,n as agents,kn as artifactLifecycleHookRegistryPackage,mn as artifactSchemaRegistryPackage,_ as assembleForkContext,$r as buildDeterministicAdapterId,ct as buildProviderContext,re as buildRecoveryContext,le as buildRecoveryContextWithPipeline,te as buildSessionContext,y as buildTurnInitiator,R as canonicalModelPackage,On as capabilityPackage,oi as createArtifactKindContributionProcessor,ci as createArtifactLifecycleHookContributionProcessor,li as createFacetNamespaceContributionProcessor,cn as createModelRegistryPackage,Ge as createSessionExtensionContext,ui as createSurfaceBindingContributionProcessor,Tn as createToolContributionProcessor,fi as createTransitionContributionProcessor,di as createWorkflowBlockContributionProcessor,ne as ensureAgentCwd,T as ensureAgentModel,de as extractTextContent,Kt as facetNamespaceRegistryPackage,qe as fetchAgentsBySession,He as fetchMessageCountsBySession,Ve as fetchPreviewBySession,rt as fetchSessionPreviewMaps,g as findTurnByAgent,Dn as frameworkCorePackages,ce as getFullConversation,ve as getOrCreateSession,Ke as importCursors,et as importCursorsDual,j as kindToBranchKind,ke as mapAgentsBySession,Ie as mapRowToSession,A as mapToSession,Mn as mergeModelMetadata,P as messageRouting,je as messageRoutingDual,o as messages,he as normalizeSelectionString,w as normalizeToBlocks,tt as parseForkTransforms,We as pickFallbackRuntimeOptions,ue as recoverAgent,h as registerAbandonHandler,ei as registerAdapterRuntimeIdentityHandlers,me as registerAttachHandler,v as registerBuiltInActions,fe as registerCompressHandler,Ue as registerCompressLineageResolver,Pe as registerCoreSessionServiceHandlers,nt as registerDrizzleAgentStorage,ze as registerDrizzleImportCursorStorage,at as registerDrizzleMessageRoutingStorage,N as registerDrizzleMessageStorage,Se as registerDrizzleSessionEventStorage,Re as registerDrizzleSessionStorage,E as registerDrizzleTurnStorage,ye as registerForkHandler,Ye as registerFtsSearchHandler,De as registerGetStatusCountsHandler,Te as registerListActionsHandler,it as registerMemoryAgentStorage,Ne as registerMemoryMessageStorage,Xe as registerMemorySessionEventStorage,Ae as registerMemorySessionStorage,pe as registerMemoryTurnStorage,b as registerMergeHandler,Le as registerParentResolver,M as registerResumeHandler,Ze as registerSpawningToolCallResolver,x as resetBuiltInActionsRegistration,p as resolveAdapterId,ge as resolveAdapterNameById,Qr as resolveDeterministicAdapterId,oe as resolveExecutionTarget,se as resolveModelCapabilities,_e as resolveTargetAgents,S as routeToAgents,C as routeToAgentsCore,ln as sessionBridgePackage,l as sessionEvents,s as sessionEventsDual,Jt as sessionOrchestratorPackage,qt as sessionPackage,an as sessionStoragePackage,r as sessions,er as subagentServicePackage,bn as surfaceBindingRegistryPackage,Wt as toolApprovalPackage,yn as toolRegistryPackage,nn as transitionPipelinePackage,rn as trayMenuPackage,a as turns,i as turnsDual,ie as verifyAndRecoverAgents,on as workflowBlockRegistryPackage};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as LogImporterInfo } from "../../index-
|
|
2
|
-
import { a as OrchestratorFactory, i as OrchestratorEntry, r as LogImporterRegistration, t as LogImportRegistryOptions } from "../../types-
|
|
1
|
+
import { t as LogImporterInfo } from "../../index-BCKRUuI2.mjs";
|
|
2
|
+
import { a as OrchestratorFactory, i as OrchestratorEntry, r as LogImporterRegistration, t as LogImportRegistryOptions } from "../../types-D0fPFh-D.mjs";
|
|
3
3
|
export { type LogImportRegistryOptions, type LogImporterInfo, type LogImporterRegistration, type OrchestratorEntry, type OrchestratorFactory };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { i as LogImportSettings, t as LogImporterInfo } from "../../index-
|
|
2
|
-
import { a as OrchestratorFactory, i as OrchestratorEntry, n as LogImportServiceInstance, o as LogImportRegistry, r as LogImporterRegistration, t as LogImportRegistryOptions } from "../../types-
|
|
1
|
+
import { i as LogImportSettings, t as LogImporterInfo } from "../../index-BCKRUuI2.mjs";
|
|
2
|
+
import { a as OrchestratorFactory, i as OrchestratorEntry, n as LogImportServiceInstance, o as LogImportRegistry, r as LogImporterRegistration, t as LogImportRegistryOptions } from "../../types-D0fPFh-D.mjs";
|
|
3
3
|
import { LogImportNamespace, LogImportSubjects } from "./namespace.mjs";
|
|
4
4
|
import { IMakaioBus } from "@makaio/framework/bus";
|
|
5
5
|
import * as _$_makaio_contracts0 from "@makaio/framework/contracts";
|
|
6
|
-
import {
|
|
6
|
+
import { MakaioNodeExtension } from "@makaio/framework/contracts";
|
|
7
7
|
import * as _$drizzle_orm_sqlite_core0 from "drizzle-orm/sqlite-core";
|
|
8
8
|
import { MakaioDatabase } from "@makaio/framework/storage/drizzle";
|
|
9
9
|
import { LogImporter, ProcessLogFileResult } from "@makaio/framework/adapters";
|
|
@@ -261,9 +261,8 @@ declare function rowToSettings(row: SelectLogImportSettings): LogImportSettings;
|
|
|
261
261
|
* `log_import_settings` table.
|
|
262
262
|
* @param bus - MakaioBus instance for message handling
|
|
263
263
|
* @param db - Drizzle database instance
|
|
264
|
-
* @param _ctx - Extension context (unused; reserved for future use)
|
|
265
264
|
* @returns Cleanup function to unregister all handlers
|
|
266
265
|
*/
|
|
267
|
-
declare function registerDrizzleLogImportStorage(bus: IMakaioBus, db: MakaioDatabase
|
|
266
|
+
declare function registerDrizzleLogImportStorage(bus: IMakaioBus, db: MakaioDatabase): () => void;
|
|
268
267
|
//#endregion
|
|
269
268
|
export { ImportPhase, type ImportPhaseValue, LogImportNamespace, LogImportRegistry, type LogImportRegistryOptions, LogImportRegistryToken, type LogImportServiceInstance, LogImportSubjects, type LogImporterInfo, type LogImporterRegistration, type OrchestratorEntry, type OrchestratorFactory, type PersistImportResultContext, type SessionCompactedEventInput, appendSessionCompactedEvent, createLogImportContributionProcessor, logImportRegistryPackage, persistImportResultTree, registerDrizzleLogImportStorage, rowToSettings };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{LogImportNamespace as e,LogImportSubjects as t}from"./namespace.mjs";import{z as n}from"zod";import*as r from"node:fs/promises";import{basename as i,dirname as a,isAbsolute as o,join as s,relative as c,resolve as l,sep as u}from"node:path";import{MakaioBus as d}from"@makaio/framework/bus";import{COMPRESS_SESSION_LINEAGE_KIND as f,CapabilitySubjects as p,FORK_SESSION_LINEAGE_KIND as m,ROOT_SESSION_LINEAGE_KIND as ee,SUBAGENT_SESSION_LINEAGE_KIND as h,extensionToken as g}from"@makaio/framework/contracts";import{defineDialectSchema as _,defineDualTable as te,resolveSchema as v}from"@makaio/framework/storage/drizzle";import{eq as ne}from"drizzle-orm";import{ImportCursorStorageSubjects as re,toImportSegment as ie}from"@makaio/framework/adapters";import{MessageStorageSubjects as ae,SessionEventStorageSubjects as y,SessionStorageSubjects as b,toSessionLineage as x}from"@makaio/framework/services/session";const S=n.discriminatedUnion(`kind`,[n.object({adapterSessionId:n.string(),kind:n.literal(ee),parentAdapterSessionId:n.null().default(null),forkPointMessageId:n.null().default(null),model:n.string().nullable().default(null),cwd:n.string().nullable().default(null),startedAt:n.number().finite().optional()}),n.object({adapterSessionId:n.string(),kind:n.literal(m),parentAdapterSessionId:n.string(),forkPointMessageId:n.string(),model:n.string().nullable().default(null),cwd:n.string().nullable().default(null),startedAt:n.number().finite().optional()}),n.object({adapterSessionId:n.string(),kind:n.literal(h),parentAdapterSessionId:n.string(),forkPointMessageId:n.null().default(null),model:n.string().nullable().default(null),cwd:n.string().nullable().default(null),startedAt:n.number().finite().optional()}),n.object({adapterSessionId:n.string(),kind:n.literal(f),parentAdapterSessionId:n.string(),forkPointMessageId:n.null().default(null),model:n.string().nullable().default(null),cwd:n.string().nullable().default(null),startedAt:n.number().finite().optional()})]);function C(e){return S.parse(e.payload)}function w(e,t,n,r,i,a,o){let s=x(e);return{externalSessionId:e.adapterSessionId,source:t,cwd:n,...r===void 0?{}:{logFilePath:r},...i===void 0?{}:{startedAt:i},...a===void 0?{}:{adapterId:a},...o===void 0?{}:{clientId:o},...s}}function oe(e,t,n){let r={adapterSessionId:e.adapterSessionId,model:t,cwd:n};switch(e.lineage.kind){case`root`:return{...r,kind:`root`,parentAdapterSessionId:null,forkPointMessageId:null};case`fork`:if(e.lineage.parentAdapterSessionId==null)throw Error(`Fork segment ${e.adapterSessionId} missing parentAdapterSessionId`);if(e.lineage.forkPointMessageId==null)throw Error(`Fork segment ${e.adapterSessionId} missing forkPointMessageId`);return{...r,kind:`fork`,parentAdapterSessionId:e.lineage.parentAdapterSessionId,forkPointMessageId:e.lineage.forkPointMessageId};case`subagent`:if(e.lineage.parentAdapterSessionId==null)throw Error(`Subagent segment ${e.adapterSessionId} missing parentAdapterSessionId`);return{...r,kind:`subagent`,parentAdapterSessionId:e.lineage.parentAdapterSessionId,forkPointMessageId:null};case`compress`:if(e.lineage.parentAdapterSessionId==null)throw Error(`Compress segment ${e.adapterSessionId} missing parentAdapterSessionId`);return{...r,kind:`compress`,parentAdapterSessionId:e.lineage.parentAdapterSessionId,forkPointMessageId:null};default:{let t=e.lineage.kind;throw Error(`Unknown lineage kind: ${String(t)}`)}}}async function T(e,t){let{events:n}=await e.request(y.getByIds,{sessionId:t.sessionId,eventIds:[t.eventId]});if(!(n.length>0))try{await e.request(y.append,{event:{sessionId:t.sessionId,eventId:t.eventId,timestamp:t.timestamp,type:`session.compacted`,payload:{trigger:t.trigger,preTokens:t.preTokens,summary:t.summary,compressChildSessionId:t.compressChildSessionId}}})}catch(n){let{events:r}=await e.request(y.getByIds,{sessionId:t.sessionId,eventIds:[t.eventId]});if(r.length>0)return;throw n}}const E=new Map,D=`MAKAIO_GLOBSTAR_DIR`,O=`MAKAIO_GLOBSTAR`,k=`MAKAIO_STAR`;function A(e){return e.replace(/[\\/]+/g,`/`).replace(/^\.\/+/,``)}function se(e,t){let n=A(e),r=A(t),a=r.includes(`/`)?n:i(n);if(r.length>200)return!1;if(!r.includes(`*`))return a===r;let o=0;for(let e of r)if(e===`*`&&(o+=1,o>64))return!1;let s=E.get(r);if(s)return E.delete(r),E.set(r,s),s.test(a);let c=r.replace(/\*\*\//g,D).replace(/\*\*/g,O).replace(/\*/g,k).replace(/[.+^${}()|[\]\\]/g,`\\$&`).replaceAll(D,`(?:.*/)?`).replaceAll(O,`.*`).replaceAll(k,`[^/]*`),l=RegExp(`^${c}$`);if(E.size>=512){let e=E.keys().next();e.done||E.delete(e.value)}return E.set(r,l),l.test(a)}async function j(e,t,n=e){let i=[];try{let a=await r.readdir(e,{withFileTypes:!0});for(let r of a){let a=s(e,r.name);if(r.isDirectory()){let e=await j(a,t,n);i.push(...e)}else if(r.isFile()){if(!se(c(n,a).split(u).join(`/`),t))continue;i.push(a)}}}catch{}return i}function ce(e,t,n){if(e!==void 0){if(o(e))return e;if(t&&o(t))return l(a(t),e);if(n&&o(n))return l(n,e)}}function M(e,t,n=!0,r){let i=[];if(n){let n=e.split(`
|
|
2
|
-
`).filter(e=>e.trim());for(let e of n){let n=t.parseRecord(e,r);n&&i.push(n)}}else{let n=t.parseRecord(e,r);n&&i.push(n)}return i}function N(e,n){return e.on(t.scan,async t=>{let{adapterName:i}=t.payload,a=n(i);if(!a){t.setResult({adapterName:i,sessionsFound:0,newSessions:0});return}let{importer:o,logFilePattern:s,adapterName:c}=a,l=o.getLogDirectory();try{await r.access(l)}catch{t.setResult({adapterName:i,sessionsFound:0,newSessions:0});return}let u=s.endsWith(`.jsonl`),d=await j(l,s),f=0,p=0;for(let t of d)try{let n=M(await r.readFile(t,`utf8`),o,u,t);if(n.length===0)continue;let i=C(o.extractSessionContext(n).sessionEvent);f++;let{created:a}=await e.request(b.importUpsert,w(i,c,i.cwd,t,i.startedAt));a&&p++}catch(e){console.warn(`[LogImportRegistry] Failed to process ${t}:`,e instanceof Error?e.message:e)}t.setResult({adapterName:i,sessionsFound:f,newSessions:p})})}async function P(e,t,n,i,a,o){try{let a=await r.stat(i),s=t.extractSessionContext(n),c={adapterSessionId:o,model:s.model,cwd:s.cwd,sessionEvent:s.sessionEvent,startedEvent:s.startedEvent,state:t.serializeState(s.state)};await e.request(re.set,{filePath:i,bytesRead:a.size,lastModified:a.mtime.toISOString(),sessionContext:c})}catch(e){console.warn(`[importFromFileContent] Failed to persist import cursor`,{adapterName:a,adapterSessionId:o,filePath:i,error:e instanceof Error?e.message:String(e),stack:e instanceof Error?e.stack:void 0})}}async function F(e,t,n,r,i){let a=i.find(e=>e.origin===`compact`),o=a?.contentText??null,s=r.timestamp??a?.timestamp??Date.now();await T(e,{sessionId:t,eventId:`session-compacted:${t}:${n}`,timestamp:s,trigger:r.trigger,preTokens:r.preTokens,summary:o,compressChildSessionId:n})}async function I(e,t,n){for(let r of n)await e.request(ae.upsertByAdapterMessageId,{sessionId:t,turnId:null,adapterMessageId:r.adapterMessageId,role:r.role,contentText:r.contentText,blocks:r.blocks,agentId:r.agentId,adapterSessionId:r.adapterSessionId,timestamp:r.timestamp,...r.origin!==void 0&&{origin:r.origin}})}async function L(e,t,n,r){let i=oe(t,n.model,n.cwd),a=t.messages.length>0?t.messages.reduce((e,t)=>Math.min(e,t.timestamp),1/0):void 0,{sessionId:o}=await e.request(b.importUpsert,w(i,n.adapterName,n.cwd,n.logFilePath,a,n.adapterId));await I(e,o,t.messages),r!==void 0&&t.compaction!==void 0&&await F(e,r,o,t.compaction,t.messages);let s=t.messages.length,c={adapterId:n.adapterId,adapterName:n.adapterName,model:n.model,cwd:n.cwd,logFilePath:null};for(let n of t.children??[]){let t=await L(e,n,c,o);s+=t.messageCount}return await e.request(b.updateImportStatus,{sessionId:o,importStatus:`imported`}),{sessionId:o,messageCount:s}}async function R(e,t,n){let r=C(t.sessionEvent);return L(e,ie(t),{adapterId:n.adapterId,adapterName:n.adapterName,model:r.model,cwd:r.cwd,logFilePath:n.logFilePath})}async function z(e){let{bus:t,importer:n,content:r,isJsonl:i,adapterName:a,adapterId:o,sourceFilePath:s,persistedLogFilePath:c}=e,l=M(r,n,i,s);if(l.length===0)throw Error(`No valid records found`);let u=n.processLogFile(l),d=ce(c,s,C(u.sessionEvent).cwd),{sessionId:f,messageCount:p}=await R(t,u,{adapterId:o,adapterName:a,logFilePath:d});return d!==void 0&&await P(t,n,l,d,a,u.adapterSessionId),{sessionId:f,messageCount:p}}function B(e,n){return e.on(t.uploadFiles,async t=>{let{adapterName:r,files:i}=t.payload,a=n(r);if(!a){t.setResult({adapterName:r,filesProcessed:i.length,sessionsImported:0,errors:i.map(e=>({filename:e.filename,error:`No importer registered for this adapter`}))});return}let{importer:o,logFilePattern:s,adapterName:c,id:l}=a,u=s.endsWith(`.jsonl`),d=0,f=[];for(let t of i)try{await z({bus:e,importer:o,content:Buffer.from(t.contentBase64,`base64`).toString(`utf8`),isJsonl:u,adapterName:c,adapterId:l,sourceFilePath:t.filename}),d++}catch(e){f.push({filename:t.filename,error:e instanceof Error?e.message:String(e)})}t.setResult({adapterName:r,filesProcessed:i.length,sessionsImported:d,errors:f})})}function V(e,n){return e.on(t.importSession,async t=>{let{adapterSessionId:i,adapterName:a}=t.payload,{session:o}=await e.request(b.getByAdapterSessionId,{adapterSessionId:i,source:a});if(!o)throw Error(`Session not found for external ID: ${i}`);if(o.source!==a)throw Error(`Session '${i}' belongs to adapter '${o.source}', not '${a}'`);if(!o.logFilePath)throw Error(`No log file path recorded for session with external ID '${i}'. Re-run a discovery scan to populate the file path.`);let s=n(a);if(!s)throw Error(`No importer registered for adapter '${a}'`);let{importer:c,logFilePattern:l,adapterName:u,id:d}=s,f=l.endsWith(`.jsonl`),{sessionId:p,messageCount:m}=await z({bus:e,importer:c,content:await r.readFile(o.logFilePath,`utf8`),isJsonl:f,adapterName:u,adapterId:d,sourceFilePath:o.logFilePath,persistedLogFilePath:o.logFilePath});t.setResult({sessionId:p,messageCount:m})})}function H(e){return e.hasAdapterContribution?`adapter`:`extension`}function U(e){if(!e||typeof e!=`object`)return!1;let t=e,n=t.registration;return typeof t.id==`string`&&typeof t.displayName==`string`&&typeof t.adapterName==`string`&&!!n&&typeof n==`object`&&typeof n.LogImporterClass==`function`&&typeof n.logFilePattern==`string`&&(n.LogOrchestratorClass===void 0||typeof n.LogOrchestratorClass==`function`)&&(n.LogDiscoveryOrchestratorClass===void 0||typeof n.LogDiscoveryOrchestratorClass==`function`)}function W(e,t,n){return{enabled:n?.enabled??!0,pollIntervalMs:n?.pollIntervalMs,eventsPerSecond:n?.eventsPerSecond,adapterId:e,adapterName:t,checkMakaioManaged:n?.checkMakaioManaged}}function G(e,t,n,r,i){if(!r&&!i)return null;let a=W(e,t,n);return e=>a.enabled?e===`discover`&&i?new i(a):e===`import`&&r?new r(a):null:null}async function le(e,n,r,i){try{let a=await r.requestOptional(t.getMode,{adapterName:n});if(!a.handled)return;let{mode:o}=a.data;if(o===`disabled`)return;await i(e,o)}catch(e){console.warn(`[LogImport] Failed to restore persisted mode for '${n}':`,e)}}async function K(e,t,n){if(!U(e)||n.getImporter(e.id)!==void 0)return;await n.register({id:e.id,adapterName:e.adapterName,displayName:e.displayName,source:H({hasAdapterContribution:!0}),importer:new e.registration.LogImporterClass({adapterId:e.id,adapterName:e.adapterName}),logFilePattern:e.registration.logFilePattern});let r=G(e.id,e.adapterName,e.logImportConfig,e.registration.LogOrchestratorClass,e.registration.LogDiscoveryOrchestratorClass);r&&n.setOrchestratorFactory(e.id,r),await le(e.id,e.adapterName,t,(e,t)=>n.switchMode(e,t))}async function ue(e,t,n){let r=e.on(p.register,async t=>{await K(t.payload.provider,e,n)},{filter:{capabilityId:`log-import`}});for(let r of t?.getProviders(`log-import`)??[])await K(r,e,n);return r}async function q(e,t){let n=e.get(t);if(n)try{n.orchestrator.isRunning()&&await n.orchestrator.stop()}finally{try{await n.orchestrator.dispose()}finally{e.delete(t)}}}async function de(e,t){try{await e.start()}catch(n){try{try{e.isRunning()&&await e.stop()}finally{await e.dispose()}}catch(e){console.warn(`[LogImportRegistry] Failed to clean up orchestrator after start failure for '${t}'.`,e instanceof Error?e.message:String(e))}throw n}}var J=class{bus;capabilityService;registrations=new Map;orchestrators=new Map;cleanupHandlers=[];initialized=!1;constructor(e){this.bus=e?.bus??d,this.capabilityService=e?.capabilityService}async init(){if(this.initialized)return;let e=this.bus.on(t.listImporters,e=>{let t=this.listImporters();e.setResult({importers:t})});this.cleanupHandlers.push(e);let n=N(this.bus,e=>this.getImporterByAdapterName(e));this.cleanupHandlers.push(n);let r=B(this.bus,e=>this.getImporterByAdapterName(e));this.cleanupHandlers.push(r);let i=V(this.bus,e=>this.getImporterByAdapterName(e));this.cleanupHandlers.push(i);let a=await ue(this.bus,this.capabilityService,this);this.cleanupHandlers.push(a),this.initialized=!0}async register(e){if(this.registrations.has(e.id))throw Error(`Log importer '${e.id}' is already registered`);this.registrations.set(e.id,e)}async unregister(e){if(!this.registrations.has(e))throw Error(`Log importer '${e}' is not registered`);await q(this.orchestrators,e),this.registrations.delete(e)}async startImporter(e){if(!this.registrations.get(e))throw Error(`Log importer '${e}' is not registered`);let t=this.orchestrators.get(e);if(!t)throw Error(`No orchestrator available for '${e}'. Orchestrators must be created and provided by the adapter or extension before starting.`);t.orchestrator.isRunning()||(await t.orchestrator.start(),t.isManaged=!0)}async stopImporter(e){let t=this.orchestrators.get(e);t&&(t.orchestrator.isRunning()&&await t.orchestrator.stop(),t.isManaged=!1)}async switchMode(e,t){let n=this.registrations.get(e);if(!n)throw Error(`Log importer '${e}' is not registered`);if(await q(this.orchestrators,e),t===`disabled`||!n.orchestratorFactory)return;let r=n.orchestratorFactory(t);r&&(await de(r,e),this.orchestrators.set(e,{orchestrator:r,isManaged:!0}))}async startDiscovery(e){return this.switchMode(e,`discover`)}setOrchestratorFactory(e,t){let n=this.registrations.get(e);if(!n)throw Error(`Cannot set orchestrator factory for unregistered importer '${e}'`);this.registrations.set(e,{...n,orchestratorFactory:t})}listImporters(){let e=[];for(let[,t]of this.registrations){let n=this.orchestrators.get(t.id)?.orchestrator.isRunning()??!1;e.push({id:t.id,adapterName:t.adapterName,displayName:t.displayName,source:t.source,logFilePattern:t.logFilePattern,isRunning:n,supportsManualImport:t.supportsManualImport??!0})}return e}getImporter(e){let t=this.registrations.get(e);return t?{...t}:void 0}getImporterByAdapterName(e){for(let t of this.registrations.values())if(t.adapterName===e)return{...t}}detectImporter(e){let t,n=0;for(let r of this.registrations.values()){let i=r.importer.canHandle(e);if(i===!1)continue;let a=i===!0?1:i.confidence;a>n&&(n=a,t=r)}return t}async registerOrchestrator(e,t){if(!this.registrations.has(e))throw Error(`Cannot register orchestrator for unregistered importer '${e}'`);await q(this.orchestrators,e),this.orchestrators.set(e,{orchestrator:t,isManaged:!1})}async destroy(){if(!(!this.initialized&&this.orchestrators.size===0&&this.cleanupHandlers.length===0)){for(let[e]of this.orchestrators)await q(this.orchestrators,e);for(let e of this.cleanupHandlers)e();this.cleanupHandlers.length=0,this.initialized=!1}}};const Y=g(`log-import-registry`),fe={name:Y.name,displayName:`Log Import Registry`,version:`0.1.0`,critical:!0,namespaces:[e],create:e=>new J({bus:e.bus})};function pe(e,t,n){return{enabled:n?.enabled??!0,pollIntervalMs:n?.pollIntervalMs,eventsPerSecond:n?.eventsPerSecond,adapterId:e,adapterName:t,checkMakaioManaged:n?.checkMakaioManaged}}function me(e,t,n){if(!n.LogOrchestratorClass&&!n.LogDiscoveryOrchestratorClass)return null;let r=pe(e,t,n.logImportConfig);return e=>r.enabled?e===`discover`&&n.LogDiscoveryOrchestratorClass?new n.LogDiscoveryOrchestratorClass(r):e===`import`&&n.LogOrchestratorClass?new n.LogOrchestratorClass(r):null:null}function X(){let e=new Map;return{filter:e=>!!e.logImport,processActivated:async(t,n,r)=>{let{logImport:i}=n;if(!i)return;let a=r.getService(Y);if(!a)throw Error(`[LogImportContributionProcessor] LogImportRegistry is not available. Ensure '${Y.name}' is listed as a dependency before activating '${t}'.`);let{adapterName:o,displayName:s,config:c}=i,l=c,u=`package:${t}`,d=H({hasAdapterContribution:!!n.adapters?.length}),f=new l.LogImporterClass({adapterId:u,adapterName:o});await a.register({id:u,adapterName:o,displayName:s,source:d,importer:f,logFilePattern:l.logFilePattern??``,supportsManualImport:l.supportsManualImport});try{let e=me(u,o,l);e&&a.setOrchestratorFactory(u,e)}catch(e){try{await a.unregister(u)}catch(e){console.error(`[LogImportContributionProcessor] Rollback of log importer '${u}' failed:`,e)}throw e}console.info(`[LogImportContributionProcessor] Registered log importer '${o}' from package: ${t}`),e.set(u,async()=>{try{await a.unregister(u)}catch(e){console.error(`[LogImportContributionProcessor] Failed to unregister log importer '${u}' during cleanup:`,e)}})},processStopped:async t=>{let n=`package:${t}`,r=e.get(n);r&&(e.delete(n),await r())}}}const he={linked:`linked`,persisted:`persisted`,finalized:`finalized`},Z=te(`log_import_settings`,e=>({adapterName:e.text(`adapter_name`).primaryKey(),mode:e.textEnum(`mode`,{enum:[`disabled`,`discover`,`import`]}).notNull().default(`disabled`),createdAt:e.epochMs(`created_at`).notNull(),updatedAt:e.epochMs(`updated_at`).notNull()})),ge=Z.sqlite,_e=Z.postgres,Q=_({logImportSettings:ge},{logImportSettings:_e});function $(e){return{adapterName:e.adapterName,mode:e.mode,createdAt:e.createdAt,updatedAt:e.updatedAt}}function ve(e){let{bus:n,db:r}=e,{logImportSettings:i}=v(r,Q);return n.on(t.getMode,async e=>{let{adapterName:t}=e.payload,[n]=await r.select().from(i).where(ne(i.adapterName,t)).limit(1);e.setResult({mode:n?.mode??`disabled`})})}function ye(e){let{bus:n,db:r}=e,{logImportSettings:i}=v(r,Q);return n.on(t.setMode,async e=>{let{adapterName:t,mode:n}=e.payload,a=Date.now();await r.insert(i).values({adapterName:t,mode:n,createdAt:a,updatedAt:a}).onConflictDoUpdate({target:i.adapterName,set:{mode:n,updatedAt:a}}),e.setResult({success:!0})})}function be(e){let{bus:n,db:r}=e,{logImportSettings:i}=v(r,Q);return n.on(t.listSettings,async e=>{let t=await r.select().from(i);e.setResult({settings:t.map($)})})}function xe(e,t,n){let r={bus:e,db:t},i=[ve(r),ye(r),be(r)];return()=>i.forEach(e=>e())}export{he as ImportPhase,e as LogImportNamespace,J as LogImportRegistry,Y as LogImportRegistryToken,t as LogImportSubjects,T as appendSessionCompactedEvent,X as createLogImportContributionProcessor,fe as logImportRegistryPackage,R as persistImportResultTree,xe as registerDrizzleLogImportStorage,$ as rowToSettings};
|
|
2
|
+
`).filter(e=>e.trim());for(let e of n){let n=t.parseRecord(e,r);n&&i.push(n)}}else{let n=t.parseRecord(e,r);n&&i.push(n)}return i}function N(e,n){return e.on(t.scan,async t=>{let{adapterName:i}=t.payload,a=n(i);if(!a){t.setResult({adapterName:i,sessionsFound:0,newSessions:0});return}let{importer:o,logFilePattern:s,adapterName:c}=a,l=o.getLogDirectory();try{await r.access(l)}catch{t.setResult({adapterName:i,sessionsFound:0,newSessions:0});return}let u=s.endsWith(`.jsonl`),d=await j(l,s),f=0,p=0;for(let t of d)try{let n=M(await r.readFile(t,`utf8`),o,u,t);if(n.length===0)continue;let i=C(o.extractSessionContext(n).sessionEvent);f++;let{created:a}=await e.request(b.importUpsert,w(i,c,i.cwd,t,i.startedAt));a&&p++}catch(e){console.warn(`[LogImportRegistry] Failed to process ${t}:`,e instanceof Error?e.message:e)}t.setResult({adapterName:i,sessionsFound:f,newSessions:p})})}async function P(e,t,n,i,a,o){try{let a=await r.stat(i),s=t.extractSessionContext(n),c={adapterSessionId:o,model:s.model,cwd:s.cwd,sessionEvent:s.sessionEvent,startedEvent:s.startedEvent,state:t.serializeState(s.state)};await e.request(re.set,{filePath:i,bytesRead:a.size,lastModified:a.mtime.toISOString(),sessionContext:c})}catch(e){console.warn(`[importFromFileContent] Failed to persist import cursor`,{adapterName:a,adapterSessionId:o,filePath:i,error:e instanceof Error?e.message:String(e),stack:e instanceof Error?e.stack:void 0})}}async function F(e,t,n,r,i){let a=i.find(e=>e.origin===`compact`),o=a?.contentText??null,s=r.timestamp??a?.timestamp??Date.now();await T(e,{sessionId:t,eventId:`session-compacted:${t}:${n}`,timestamp:s,trigger:r.trigger,preTokens:r.preTokens,summary:o,compressChildSessionId:n})}async function I(e,t,n){for(let r of n)await e.request(ae.upsertByAdapterMessageId,{sessionId:t,turnId:null,adapterMessageId:r.adapterMessageId,role:r.role,contentText:r.contentText,blocks:r.blocks,agentId:r.agentId,adapterSessionId:r.adapterSessionId,timestamp:r.timestamp,...r.origin!==void 0&&{origin:r.origin}})}async function L(e,t,n,r){let i=oe(t,n.model,n.cwd),a=t.messages.length>0?t.messages.reduce((e,t)=>Math.min(e,t.timestamp),1/0):void 0,{sessionId:o}=await e.request(b.importUpsert,w(i,n.adapterName,n.cwd,n.logFilePath,a,n.adapterId));await I(e,o,t.messages),r!==void 0&&t.compaction!==void 0&&await F(e,r,o,t.compaction,t.messages);let s=t.messages.length,c={adapterId:n.adapterId,adapterName:n.adapterName,model:n.model,cwd:n.cwd,logFilePath:null};for(let n of t.children??[]){let t=await L(e,n,c,o);s+=t.messageCount}return await e.request(b.updateImportStatus,{sessionId:o,importStatus:`imported`}),{sessionId:o,messageCount:s}}async function R(e,t,n){let r=C(t.sessionEvent);return L(e,ie(t),{adapterId:n.adapterId,adapterName:n.adapterName,model:r.model,cwd:r.cwd,logFilePath:n.logFilePath})}async function z(e){let{bus:t,importer:n,content:r,isJsonl:i,adapterName:a,adapterId:o,sourceFilePath:s,persistedLogFilePath:c}=e,l=M(r,n,i,s);if(l.length===0)throw Error(`No valid records found`);let u=n.processLogFile(l),d=ce(c,s,C(u.sessionEvent).cwd),{sessionId:f,messageCount:p}=await R(t,u,{adapterId:o,adapterName:a,logFilePath:d});return d!==void 0&&await P(t,n,l,d,a,u.adapterSessionId),{sessionId:f,messageCount:p}}function B(e,n){return e.on(t.uploadFiles,async t=>{let{adapterName:r,files:i}=t.payload,a=n(r);if(!a){t.setResult({adapterName:r,filesProcessed:i.length,sessionsImported:0,errors:i.map(e=>({filename:e.filename,error:`No importer registered for this adapter`}))});return}let{importer:o,logFilePattern:s,adapterName:c,id:l}=a,u=s.endsWith(`.jsonl`),d=0,f=[];for(let t of i)try{await z({bus:e,importer:o,content:Buffer.from(t.contentBase64,`base64`).toString(`utf8`),isJsonl:u,adapterName:c,adapterId:l,sourceFilePath:t.filename}),d++}catch(e){f.push({filename:t.filename,error:e instanceof Error?e.message:String(e)})}t.setResult({adapterName:r,filesProcessed:i.length,sessionsImported:d,errors:f})})}function V(e,n){return e.on(t.importSession,async t=>{let{adapterSessionId:i,adapterName:a}=t.payload,{session:o}=await e.request(b.getByAdapterSessionId,{adapterSessionId:i,source:a});if(!o)throw Error(`Session not found for external ID: ${i}`);if(o.source!==a)throw Error(`Session '${i}' belongs to adapter '${o.source}', not '${a}'`);if(!o.logFilePath)throw Error(`No log file path recorded for session with external ID '${i}'. Re-run a discovery scan to populate the file path.`);let s=n(a);if(!s)throw Error(`No importer registered for adapter '${a}'`);let{importer:c,logFilePattern:l,adapterName:u,id:d}=s,f=l.endsWith(`.jsonl`),{sessionId:p,messageCount:m}=await z({bus:e,importer:c,content:await r.readFile(o.logFilePath,`utf8`),isJsonl:f,adapterName:u,adapterId:d,sourceFilePath:o.logFilePath,persistedLogFilePath:o.logFilePath});t.setResult({sessionId:p,messageCount:m})})}function H(e){return e.hasAdapterContribution?`adapter`:`extension`}function U(e){if(!e||typeof e!=`object`)return!1;let t=e,n=t.registration;return typeof t.id==`string`&&typeof t.displayName==`string`&&typeof t.adapterName==`string`&&!!n&&typeof n==`object`&&typeof n.LogImporterClass==`function`&&typeof n.logFilePattern==`string`&&(n.LogOrchestratorClass===void 0||typeof n.LogOrchestratorClass==`function`)&&(n.LogDiscoveryOrchestratorClass===void 0||typeof n.LogDiscoveryOrchestratorClass==`function`)}function W(e,t,n){return{enabled:n?.enabled??!0,pollIntervalMs:n?.pollIntervalMs,eventsPerSecond:n?.eventsPerSecond,adapterId:e,adapterName:t,checkMakaioManaged:n?.checkMakaioManaged}}function G(e,t,n,r,i){if(!r&&!i)return null;let a=W(e,t,n);return e=>a.enabled?e===`discover`&&i?new i(a):e===`import`&&r?new r(a):null:null}async function le(e,n,r,i){try{let a=await r.requestOptional(t.getMode,{adapterName:n});if(!a.handled)return;let{mode:o}=a.data;if(o===`disabled`)return;await i(e,o)}catch(e){console.warn(`[LogImport] Failed to restore persisted mode for '${n}':`,e)}}async function K(e,t,n){if(!U(e)||n.getImporter(e.id)!==void 0)return;await n.register({id:e.id,adapterName:e.adapterName,displayName:e.displayName,source:H({hasAdapterContribution:!0}),importer:new e.registration.LogImporterClass({adapterId:e.id,adapterName:e.adapterName}),logFilePattern:e.registration.logFilePattern});let r=G(e.id,e.adapterName,e.logImportConfig,e.registration.LogOrchestratorClass,e.registration.LogDiscoveryOrchestratorClass);r&&n.setOrchestratorFactory(e.id,r),await le(e.id,e.adapterName,t,(e,t)=>n.switchMode(e,t))}async function ue(e,t,n){let r=e.on(p.register,async t=>{await K(t.payload.provider,e,n)},{filter:{capabilityId:`log-import`}});for(let r of t?.getProviders(`log-import`)??[])await K(r,e,n);return r}async function q(e,t){let n=e.get(t);if(n)try{n.orchestrator.isRunning()&&await n.orchestrator.stop()}finally{try{await n.orchestrator.dispose()}finally{e.delete(t)}}}async function de(e,t){try{await e.start()}catch(n){try{try{e.isRunning()&&await e.stop()}finally{await e.dispose()}}catch(e){console.warn(`[LogImportRegistry] Failed to clean up orchestrator after start failure for '${t}'.`,e instanceof Error?e.message:String(e))}throw n}}var J=class{bus;capabilityService;registrations=new Map;orchestrators=new Map;cleanupHandlers=[];initialized=!1;constructor(e){this.bus=e?.bus??d,this.capabilityService=e?.capabilityService}async init(){if(this.initialized)return;let e=this.bus.on(t.listImporters,e=>{let t=this.listImporters();e.setResult({importers:t})});this.cleanupHandlers.push(e);let n=N(this.bus,e=>this.getImporterByAdapterName(e));this.cleanupHandlers.push(n);let r=B(this.bus,e=>this.getImporterByAdapterName(e));this.cleanupHandlers.push(r);let i=V(this.bus,e=>this.getImporterByAdapterName(e));this.cleanupHandlers.push(i);let a=await ue(this.bus,this.capabilityService,this);this.cleanupHandlers.push(a),this.initialized=!0}async register(e){if(this.registrations.has(e.id))throw Error(`Log importer '${e.id}' is already registered`);this.registrations.set(e.id,e)}async unregister(e){if(!this.registrations.has(e))throw Error(`Log importer '${e}' is not registered`);await q(this.orchestrators,e),this.registrations.delete(e)}async startImporter(e){if(!this.registrations.get(e))throw Error(`Log importer '${e}' is not registered`);let t=this.orchestrators.get(e);if(!t)throw Error(`No orchestrator available for '${e}'. Orchestrators must be created and provided by the adapter or extension before starting.`);t.orchestrator.isRunning()||(await t.orchestrator.start(),t.isManaged=!0)}async stopImporter(e){let t=this.orchestrators.get(e);t&&(t.orchestrator.isRunning()&&await t.orchestrator.stop(),t.isManaged=!1)}async switchMode(e,t){let n=this.registrations.get(e);if(!n)throw Error(`Log importer '${e}' is not registered`);if(await q(this.orchestrators,e),t===`disabled`||!n.orchestratorFactory)return;let r=n.orchestratorFactory(t);r&&(await de(r,e),this.orchestrators.set(e,{orchestrator:r,isManaged:!0}))}async startDiscovery(e){return this.switchMode(e,`discover`)}setOrchestratorFactory(e,t){let n=this.registrations.get(e);if(!n)throw Error(`Cannot set orchestrator factory for unregistered importer '${e}'`);this.registrations.set(e,{...n,orchestratorFactory:t})}listImporters(){let e=[];for(let[,t]of this.registrations){let n=this.orchestrators.get(t.id)?.orchestrator.isRunning()??!1;e.push({id:t.id,adapterName:t.adapterName,displayName:t.displayName,source:t.source,logFilePattern:t.logFilePattern,isRunning:n,supportsManualImport:t.supportsManualImport??!0})}return e}getImporter(e){let t=this.registrations.get(e);return t?{...t}:void 0}getImporterByAdapterName(e){for(let t of this.registrations.values())if(t.adapterName===e)return{...t}}detectImporter(e){let t,n=0;for(let r of this.registrations.values()){let i=r.importer.canHandle(e);if(i===!1)continue;let a=i===!0?1:i.confidence;a>n&&(n=a,t=r)}return t}async registerOrchestrator(e,t){if(!this.registrations.has(e))throw Error(`Cannot register orchestrator for unregistered importer '${e}'`);await q(this.orchestrators,e),this.orchestrators.set(e,{orchestrator:t,isManaged:!1})}async destroy(){if(!(!this.initialized&&this.orchestrators.size===0&&this.cleanupHandlers.length===0)){for(let[e]of this.orchestrators)await q(this.orchestrators,e);for(let e of this.cleanupHandlers)e();this.cleanupHandlers.length=0,this.initialized=!1}}};const Y=g(`log-import-registry`),fe={name:Y.name,displayName:`Log Import Registry`,version:`0.1.0`,critical:!0,namespaces:[e],create:e=>new J({bus:e.bus})};function pe(e,t,n){return{enabled:n?.enabled??!0,pollIntervalMs:n?.pollIntervalMs,eventsPerSecond:n?.eventsPerSecond,adapterId:e,adapterName:t,checkMakaioManaged:n?.checkMakaioManaged}}function me(e,t,n){if(!n.LogOrchestratorClass&&!n.LogDiscoveryOrchestratorClass)return null;let r=pe(e,t,n.logImportConfig);return e=>r.enabled?e===`discover`&&n.LogDiscoveryOrchestratorClass?new n.LogDiscoveryOrchestratorClass(r):e===`import`&&n.LogOrchestratorClass?new n.LogOrchestratorClass(r):null:null}function X(){let e=new Map;return{filter:e=>!!e.logImport,processActivated:async(t,n,r)=>{let{logImport:i}=n;if(!i)return;let a=r.getService(Y);if(!a)throw Error(`[LogImportContributionProcessor] LogImportRegistry is not available. Ensure '${Y.name}' is listed as a dependency before activating '${t}'.`);let{adapterName:o,displayName:s,config:c}=i,l=c,u=`package:${t}`,d=H({hasAdapterContribution:!!n.adapters?.length}),f=new l.LogImporterClass({adapterId:u,adapterName:o});await a.register({id:u,adapterName:o,displayName:s,source:d,importer:f,logFilePattern:l.logFilePattern??``,supportsManualImport:l.supportsManualImport});try{let e=me(u,o,l);e&&a.setOrchestratorFactory(u,e)}catch(e){try{await a.unregister(u)}catch(e){console.error(`[LogImportContributionProcessor] Rollback of log importer '${u}' failed:`,e)}throw e}console.info(`[LogImportContributionProcessor] Registered log importer '${o}' from package: ${t}`),e.set(u,async()=>{try{await a.unregister(u)}catch(e){console.error(`[LogImportContributionProcessor] Failed to unregister log importer '${u}' during cleanup:`,e)}})},processStopped:async t=>{let n=`package:${t}`,r=e.get(n);r&&(e.delete(n),await r())}}}const he={linked:`linked`,persisted:`persisted`,finalized:`finalized`},Z=te(`log_import_settings`,e=>({adapterName:e.text(`adapter_name`).primaryKey(),mode:e.textEnum(`mode`,{enum:[`disabled`,`discover`,`import`]}).notNull().default(`disabled`),createdAt:e.epochMs(`created_at`).notNull(),updatedAt:e.epochMs(`updated_at`).notNull()})),ge=Z.sqlite,_e=Z.postgres,Q=_({logImportSettings:ge},{logImportSettings:_e});function $(e){return{adapterName:e.adapterName,mode:e.mode,createdAt:e.createdAt,updatedAt:e.updatedAt}}function ve(e){let{bus:n,db:r}=e,{logImportSettings:i}=v(r,Q);return n.on(t.getMode,async e=>{let{adapterName:t}=e.payload,[n]=await r.select().from(i).where(ne(i.adapterName,t)).limit(1);e.setResult({mode:n?.mode??`disabled`})})}function ye(e){let{bus:n,db:r}=e,{logImportSettings:i}=v(r,Q);return n.on(t.setMode,async e=>{let{adapterName:t,mode:n}=e.payload,a=Date.now();await r.insert(i).values({adapterName:t,mode:n,createdAt:a,updatedAt:a}).onConflictDoUpdate({target:i.adapterName,set:{mode:n,updatedAt:a}}),e.setResult({success:!0})})}function be(e){let{bus:n,db:r}=e,{logImportSettings:i}=v(r,Q);return n.on(t.listSettings,async e=>{let t=await r.select().from(i);e.setResult({settings:t.map($)})})}function xe(e,t){let n={bus:e,db:t},r=[ve(n),ye(n),be(n)];return()=>r.forEach(e=>e())}export{he as ImportPhase,e as LogImportNamespace,J as LogImportRegistry,Y as LogImportRegistryToken,t as LogImportSubjects,T as appendSessionCompactedEvent,X as createLogImportContributionProcessor,fe as logImportRegistryPackage,R as persistImportResultTree,xe as registerDrizzleLogImportStorage,$ as rowToSettings};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as IMPORT_LAST_SCAN_CATEGORY, r as LogImportMode, t as LogImporterInfo } from "../../index-
|
|
1
|
+
import { n as IMPORT_LAST_SCAN_CATEGORY, r as LogImportMode, t as LogImporterInfo } from "../../index-BCKRUuI2.mjs";
|
|
2
2
|
import { LogImportSubjects } from "./namespace.mjs";
|
|
3
3
|
export { IMPORT_LAST_SCAN_CATEGORY, type LogImportMode, LogImportSubjects, type LogImporterInfo };
|
|
@@ -74,8 +74,8 @@ declare const LogImportNamespace: _$_makaio_core0.BusNamespaceDefinition<"log-im
|
|
|
74
74
|
adapterName: _$zod.ZodString;
|
|
75
75
|
displayName: _$zod.ZodString;
|
|
76
76
|
source: _$zod.ZodEnum<{
|
|
77
|
-
extension: "extension";
|
|
78
77
|
adapter: "adapter";
|
|
78
|
+
extension: "extension";
|
|
79
79
|
}>;
|
|
80
80
|
logFilePattern: _$zod.ZodString;
|
|
81
81
|
isRunning: _$zod.ZodBoolean;
|
|
@@ -234,8 +234,8 @@ declare const LogImportSubjects: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fla
|
|
|
234
234
|
adapterName: _$zod.ZodString;
|
|
235
235
|
displayName: _$zod.ZodString;
|
|
236
236
|
source: _$zod.ZodEnum<{
|
|
237
|
-
extension: "extension";
|
|
238
237
|
adapter: "adapter";
|
|
238
|
+
extension: "extension";
|
|
239
239
|
}>;
|
|
240
240
|
logFilePattern: _$zod.ZodString;
|
|
241
241
|
isRunning: _$zod.ZodBoolean;
|
|
@@ -90,8 +90,8 @@ declare const LogImportSchemas: {
|
|
|
90
90
|
adapterName: z.ZodString;
|
|
91
91
|
displayName: z.ZodString;
|
|
92
92
|
source: z.ZodEnum<{
|
|
93
|
-
extension: "extension";
|
|
94
93
|
adapter: "adapter";
|
|
94
|
+
extension: "extension";
|
|
95
95
|
}>;
|
|
96
96
|
logFilePattern: z.ZodString;
|
|
97
97
|
isRunning: z.ZodBoolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,r as t,t as n}from"../../provider-context-
|
|
1
|
+
import{n as e,r as t,t as n}from"../../provider-context-wp4VSJFI.mjs";export{n as activateProviderContext,e as activateProviderContextStrict,t as buildProviderContext};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,c as t,i as n,l as r,r as i,t as a,u as o}from"../../../handlers-
|
|
1
|
+
import{a as e,c as t,i as n,l as r,r as i,t as a,u as o}from"../../../handlers-BAB4fQNH.mjs";export{r as registerAbandonHandler,t as registerAttachHandler,e as registerCompressHandler,n as registerForkHandler,i as registerMergeHandler,a as routeToAgents,o as routeToAgentsCore};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { $ as fetchMessageCountsBySession, A as registerMemoryTurnStorage, At as RecoveryConfig, B as registerMemorySessionEventStorage, Bt as findTurnByAgent, C as messages, Ct as registerGetStatusCountsHandler, D as SelectTurn, Dt as ContextWindowTrackerConfig, E as InsertTurn, Et as AgentContextState, F as importCursorsDual, Ft as verifyAndRecoverAgents, G as getSessionAncestorChain, Gt as TurnContextEnricher, H as SelectSessionEvent, Ht as resolveTargetAgents, I as EventTransform, It as buildRecoveryContext, J as mapAgentsBySession, Jt as SessionOrchestrator, K as SessionPreviewMaps, Kt as AdapterRegistry, L as SessionLogger, Lt as resolveAdapterId, M as EmbeddingIndexManager, Mt as ensureAgentCwd, N as registerDrizzleImportCursorStorage, Nt as ensureAgentModel, O as turns, Ot as SessionContextWindowState, P as importCursors, Pt as recoverAgent, Q as fetchAgentsBySession, R as SessionLoggerOptions, Rt as resolveExecutionTarget, S as SelectMessage, St as actionRegistry, T as registerDrizzleMessageStorage, Tt as ContextWindowTracker, U as sessionEvents, Ut as extractTextContent, V as InsertSessionEvent, Vt as getOrCreateSession, W as sessionEventsDual, Wt as normalizeToBlocks, X as SearchFilters, Xt as MakaioSessionService, Y as mapToSession, Yt as registerCoreSessionServiceHandlers, Z as SearchSessionRow, _ as messageRoutingDual, _t as normalizeSelectionString, a as kindToBranchKind, at as registerMemoryAgentStorage, b as MessageRoutingSubjects, bt as registerBuiltInActions, c as registerSpawningToolCallResolver, ct as AgentStorageNamespace, d as MakaioSession, dt as createSessionExtensionContext, et as fetchPreviewBySession, f as MakaioSessionConfig, ft as SessionBridge, g as messageRouting, gt as CONNECTOR_SWAP_DEFAULT_PIPELINE, h as SelectMessageRouting, ht as pickFallbackRuntimeOptions, i as ContextAssemblyResult, it as registerDrizzleAgentStorage, j as registerDrizzleTurnStorage, jt as buildRecoveryContextWithPipeline, k as turnsDual, kt as buildTurnInitiator, l as registerCompressLineageResolver, lt as AgentStorageSubjects, m as InsertMessageRouting, mt as FallbackRuntimeOptions, n as buildSessionContext, nt as parseForkTransforms, o as toSessionLineage, ot as registerDrizzleSessionStorage, p as StartTurnOptions, pt as assembleForkContext, q as fetchSessionPreviewMaps, qt as ISessionOrchestrator, r as BuildContextOptions, rt as registerFtsSearchHandler, s as registerSessionDiscoveredHandler, st as registerMemorySessionStorage, t as getFullConversation, tt as mapRowToSession, u as registerParentResolver, ut as SessionExtensionContextImpl, v as registerDrizzleMessageRoutingStorage, vt as resolveAdapterNameById, w as registerMemoryMessageStorage, wt as registerResumeHandler, x as InsertMessage, xt as resetBuiltInActionsRegistration, y as MessageRoutingNamespace, yt as registerListActionsHandler, z as registerDrizzleSessionEventStorage, zt as resolveModelCapabilities } from "../../index-
|
|
1
|
+
import { $ as fetchMessageCountsBySession, A as registerMemoryTurnStorage, At as RecoveryConfig, B as registerMemorySessionEventStorage, Bt as findTurnByAgent, C as messages, Ct as registerGetStatusCountsHandler, D as SelectTurn, Dt as ContextWindowTrackerConfig, E as InsertTurn, Et as AgentContextState, F as importCursorsDual, Ft as verifyAndRecoverAgents, G as getSessionAncestorChain, Gt as TurnContextEnricher, H as SelectSessionEvent, Ht as resolveTargetAgents, I as EventTransform, It as buildRecoveryContext, J as mapAgentsBySession, Jt as SessionOrchestrator, K as SessionPreviewMaps, Kt as AdapterRegistry, L as SessionLogger, Lt as resolveAdapterId, M as EmbeddingIndexManager, Mt as ensureAgentCwd, N as registerDrizzleImportCursorStorage, Nt as ensureAgentModel, O as turns, Ot as SessionContextWindowState, P as importCursors, Pt as recoverAgent, Q as fetchAgentsBySession, R as SessionLoggerOptions, Rt as resolveExecutionTarget, S as SelectMessage, St as actionRegistry, T as registerDrizzleMessageStorage, Tt as ContextWindowTracker, U as sessionEvents, Ut as extractTextContent, V as InsertSessionEvent, Vt as getOrCreateSession, W as sessionEventsDual, Wt as normalizeToBlocks, X as SearchFilters, Xt as MakaioSessionService, Y as mapToSession, Yt as registerCoreSessionServiceHandlers, Z as SearchSessionRow, _ as messageRoutingDual, _t as normalizeSelectionString, a as kindToBranchKind, at as registerMemoryAgentStorage, b as MessageRoutingSubjects, bt as registerBuiltInActions, c as registerSpawningToolCallResolver, ct as AgentStorageNamespace, d as MakaioSession, dt as createSessionExtensionContext, et as fetchPreviewBySession, f as MakaioSessionConfig, ft as SessionBridge, g as messageRouting, gt as CONNECTOR_SWAP_DEFAULT_PIPELINE, h as SelectMessageRouting, ht as pickFallbackRuntimeOptions, i as ContextAssemblyResult, it as registerDrizzleAgentStorage, j as registerDrizzleTurnStorage, jt as buildRecoveryContextWithPipeline, k as turnsDual, kt as buildTurnInitiator, l as registerCompressLineageResolver, lt as AgentStorageSubjects, m as InsertMessageRouting, mt as FallbackRuntimeOptions, n as buildSessionContext, nt as parseForkTransforms, o as toSessionLineage, ot as registerDrizzleSessionStorage, p as StartTurnOptions, pt as assembleForkContext, q as fetchSessionPreviewMaps, qt as ISessionOrchestrator, r as BuildContextOptions, rt as registerFtsSearchHandler, s as registerSessionDiscoveredHandler, st as registerMemorySessionStorage, t as getFullConversation, tt as mapRowToSession, u as registerParentResolver, ut as SessionExtensionContextImpl, v as registerDrizzleMessageRoutingStorage, vt as resolveAdapterNameById, w as registerMemoryMessageStorage, wt as registerResumeHandler, x as InsertMessage, xt as resetBuiltInActionsRegistration, y as MessageRoutingNamespace, yt as registerListActionsHandler, z as registerDrizzleSessionEventStorage, zt as resolveModelCapabilities } from "../../index-DrGLAuZc.mjs";
|
|
2
2
|
import { a as registerCompressHandler, c as SessionTurnManager, d as Turn, f as TurnConfig, h as TurnStateChange, i as registerForkHandler, l as TurnCompleteCallback, m as TurnResult, n as routeToAgents, o as registerAttachHandler, p as TurnContext, r as registerMergeHandler, s as registerAbandonHandler, t as routeToAgentsCore, u as TurnCompletionResult } from "../../index-C6BhKRnH.mjs";
|
|
3
3
|
import { r as buildProviderContext } from "../../index-D0SUjZmU.mjs";
|
|
4
|
-
import { i as SessionStorageSubjects, r as SessionStorageNamespace } from "../../namespace-
|
|
5
|
-
import { a as agents, c as sessionsDual, o as agentsDual, s as sessions } from "../../schema-
|
|
6
|
-
import { n as SessionEventStorageSubjects, t as SessionEventStorageNamespace } from "../../namespace-
|
|
7
|
-
import { t as TurnStorageNamespace } from "../../namespace-
|
|
8
|
-
import { n as TurnStorageSubjects } from "../../namespace
|
|
4
|
+
import { i as SessionStorageSubjects, r as SessionStorageNamespace } from "../../namespace-Boe6l5n9.mjs";
|
|
5
|
+
import { a as agents, c as sessionsDual, o as agentsDual, s as sessions } from "../../schema-DGMLvVoQ.mjs";
|
|
6
|
+
import { n as SessionEventStorageSubjects, t as SessionEventStorageNamespace } from "../../namespace-BxxBhcV_.mjs";
|
|
7
|
+
import { t as TurnStorageNamespace } from "../../namespace-aJJfBJU5.mjs";
|
|
8
|
+
import { n as TurnStorageSubjects } from "../../namespace--s0d86h-.mjs";
|
|
9
9
|
import { i as MessageStorageSubjects, r as MessageStorageNamespace } from "../../namespace-B73Sxj5L.mjs";
|
|
10
10
|
export { AdapterRegistry, AgentContextState, AgentStorageNamespace, AgentStorageSubjects, BuildContextOptions, CONNECTOR_SWAP_DEFAULT_PIPELINE, ContextAssemblyResult, ContextWindowTracker, ContextWindowTrackerConfig, EmbeddingIndexManager, EventTransform, FallbackRuntimeOptions, ISessionOrchestrator, InsertMessage, InsertMessageRouting, InsertSessionEvent, InsertTurn, MakaioSession, MakaioSessionConfig, MakaioSessionService, MessageRoutingNamespace, MessageRoutingSubjects, MessageStorageNamespace, MessageStorageSubjects, RecoveryConfig, SearchFilters, SearchSessionRow, SelectMessage, SelectMessageRouting, SelectSessionEvent, SelectTurn, SessionBridge, SessionContextWindowState, SessionEventStorageNamespace, SessionEventStorageSubjects, SessionExtensionContextImpl, SessionLogger, SessionLoggerOptions, SessionOrchestrator, SessionPreviewMaps, SessionStorageNamespace, SessionStorageSubjects, SessionTurnManager, StartTurnOptions, Turn, TurnCompleteCallback, TurnCompletionResult, TurnConfig, TurnContext, TurnContextEnricher, TurnResult, TurnStateChange, TurnStorageNamespace, TurnStorageSubjects, actionRegistry, agents, agentsDual, assembleForkContext, buildProviderContext, buildRecoveryContext, buildRecoveryContextWithPipeline, buildSessionContext, buildTurnInitiator, createSessionExtensionContext, ensureAgentCwd, ensureAgentModel, extractTextContent, fetchAgentsBySession, fetchMessageCountsBySession, fetchPreviewBySession, fetchSessionPreviewMaps, findTurnByAgent, getFullConversation, getOrCreateSession, getSessionAncestorChain, importCursors, importCursorsDual, kindToBranchKind, mapAgentsBySession, mapRowToSession, mapToSession, messageRouting, messageRoutingDual, messages, normalizeSelectionString, normalizeToBlocks, parseForkTransforms, pickFallbackRuntimeOptions, recoverAgent, registerAbandonHandler, registerAttachHandler, registerBuiltInActions, registerCompressHandler, registerCompressLineageResolver, registerCoreSessionServiceHandlers, registerDrizzleAgentStorage, registerDrizzleImportCursorStorage, registerDrizzleMessageRoutingStorage, registerDrizzleMessageStorage, registerDrizzleSessionEventStorage, registerDrizzleSessionStorage, registerDrizzleTurnStorage, registerForkHandler, registerFtsSearchHandler, registerGetStatusCountsHandler, registerListActionsHandler, registerMemoryAgentStorage, registerMemoryMessageStorage, registerMemorySessionEventStorage, registerMemorySessionStorage, registerMemoryTurnStorage, registerMergeHandler, registerParentResolver, registerResumeHandler, registerSessionDiscoveredHandler, registerSpawningToolCallResolver, resetBuiltInActionsRegistration, resolveAdapterId, resolveAdapterNameById, resolveExecutionTarget, resolveModelCapabilities, resolveTargetAgents, routeToAgents, routeToAgentsCore, sessionEvents, sessionEventsDual, sessions, sessionsDual, toSessionLineage, turns, turnsDual, verifyAndRecoverAgents };
|