@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
|
@@ -19,9 +19,9 @@ import { ExtensionWarningEntry, ExtensionWarningEntrySchema } from "@makaio/fram
|
|
|
19
19
|
*/
|
|
20
20
|
declare const ComponentStateSchema: z.ZodEnum<{
|
|
21
21
|
failed: "failed";
|
|
22
|
+
discovered: "discovered";
|
|
22
23
|
active: "active";
|
|
23
24
|
stopped: "stopped";
|
|
24
|
-
discovered: "discovered";
|
|
25
25
|
skipped: "skipped";
|
|
26
26
|
initializing: "initializing";
|
|
27
27
|
}>;
|
|
@@ -48,9 +48,9 @@ declare const ComponentInfoSchema: z.ZodObject<{
|
|
|
48
48
|
displayName: z.ZodString;
|
|
49
49
|
state: z.ZodEnum<{
|
|
50
50
|
failed: "failed";
|
|
51
|
+
discovered: "discovered";
|
|
51
52
|
active: "active";
|
|
52
53
|
stopped: "stopped";
|
|
53
|
-
discovered: "discovered";
|
|
54
54
|
skipped: "skipped";
|
|
55
55
|
initializing: "initializing";
|
|
56
56
|
}>;
|
|
@@ -69,9 +69,9 @@ declare const ServiceInfoSchema: z.ZodObject<{
|
|
|
69
69
|
displayName: z.ZodString;
|
|
70
70
|
state: z.ZodEnum<{
|
|
71
71
|
failed: "failed";
|
|
72
|
+
discovered: "discovered";
|
|
72
73
|
active: "active";
|
|
73
74
|
stopped: "stopped";
|
|
74
|
-
discovered: "discovered";
|
|
75
75
|
skipped: "skipped";
|
|
76
76
|
initializing: "initializing";
|
|
77
77
|
}>;
|
|
@@ -91,9 +91,9 @@ declare const ExtensionInfoSchema: z.ZodObject<{
|
|
|
91
91
|
displayName: z.ZodString;
|
|
92
92
|
state: z.ZodEnum<{
|
|
93
93
|
failed: "failed";
|
|
94
|
+
discovered: "discovered";
|
|
94
95
|
active: "active";
|
|
95
96
|
stopped: "stopped";
|
|
96
|
-
discovered: "discovered";
|
|
97
97
|
skipped: "skipped";
|
|
98
98
|
initializing: "initializing";
|
|
99
99
|
}>;
|
|
@@ -139,17 +139,17 @@ declare const ExtensionNamespace: _$_makaio_core0.BusNamespaceDefinition<"kernel
|
|
|
139
139
|
displayName: z.ZodString;
|
|
140
140
|
from: z.ZodEnum<{
|
|
141
141
|
failed: "failed";
|
|
142
|
+
discovered: "discovered";
|
|
142
143
|
active: "active";
|
|
143
144
|
stopped: "stopped";
|
|
144
|
-
discovered: "discovered";
|
|
145
145
|
skipped: "skipped";
|
|
146
146
|
initializing: "initializing";
|
|
147
147
|
}>;
|
|
148
148
|
to: z.ZodEnum<{
|
|
149
149
|
failed: "failed";
|
|
150
|
+
discovered: "discovered";
|
|
150
151
|
active: "active";
|
|
151
152
|
stopped: "stopped";
|
|
152
|
-
discovered: "discovered";
|
|
153
153
|
skipped: "skipped";
|
|
154
154
|
initializing: "initializing";
|
|
155
155
|
}>;
|
|
@@ -182,9 +182,9 @@ declare const ExtensionNamespace: _$_makaio_core0.BusNamespaceDefinition<"kernel
|
|
|
182
182
|
displayName: z.ZodString;
|
|
183
183
|
state: z.ZodEnum<{
|
|
184
184
|
failed: "failed";
|
|
185
|
+
discovered: "discovered";
|
|
185
186
|
active: "active";
|
|
186
187
|
stopped: "stopped";
|
|
187
|
-
discovered: "discovered";
|
|
188
188
|
skipped: "skipped";
|
|
189
189
|
initializing: "initializing";
|
|
190
190
|
}>;
|
|
@@ -220,9 +220,9 @@ declare const ExtensionNamespace: _$_makaio_core0.BusNamespaceDefinition<"kernel
|
|
|
220
220
|
displayName: z.ZodString;
|
|
221
221
|
state: z.ZodEnum<{
|
|
222
222
|
failed: "failed";
|
|
223
|
+
discovered: "discovered";
|
|
223
224
|
active: "active";
|
|
224
225
|
stopped: "stopped";
|
|
225
|
-
discovered: "discovered";
|
|
226
226
|
skipped: "skipped";
|
|
227
227
|
initializing: "initializing";
|
|
228
228
|
}>;
|
|
@@ -593,17 +593,17 @@ declare const ExtensionSubjects: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fla
|
|
|
593
593
|
displayName: z.ZodString;
|
|
594
594
|
from: z.ZodEnum<{
|
|
595
595
|
failed: "failed";
|
|
596
|
+
discovered: "discovered";
|
|
596
597
|
active: "active";
|
|
597
598
|
stopped: "stopped";
|
|
598
|
-
discovered: "discovered";
|
|
599
599
|
skipped: "skipped";
|
|
600
600
|
initializing: "initializing";
|
|
601
601
|
}>;
|
|
602
602
|
to: z.ZodEnum<{
|
|
603
603
|
failed: "failed";
|
|
604
|
+
discovered: "discovered";
|
|
604
605
|
active: "active";
|
|
605
606
|
stopped: "stopped";
|
|
606
|
-
discovered: "discovered";
|
|
607
607
|
skipped: "skipped";
|
|
608
608
|
initializing: "initializing";
|
|
609
609
|
}>;
|
|
@@ -636,9 +636,9 @@ declare const ExtensionSubjects: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fla
|
|
|
636
636
|
displayName: z.ZodString;
|
|
637
637
|
state: z.ZodEnum<{
|
|
638
638
|
failed: "failed";
|
|
639
|
+
discovered: "discovered";
|
|
639
640
|
active: "active";
|
|
640
641
|
stopped: "stopped";
|
|
641
|
-
discovered: "discovered";
|
|
642
642
|
skipped: "skipped";
|
|
643
643
|
initializing: "initializing";
|
|
644
644
|
}>;
|
|
@@ -674,9 +674,9 @@ declare const ExtensionSubjects: _$_makaio_core0.BusSubjects<_$_makaio_core0.Fla
|
|
|
674
674
|
displayName: z.ZodString;
|
|
675
675
|
state: z.ZodEnum<{
|
|
676
676
|
failed: "failed";
|
|
677
|
+
discovered: "discovered";
|
|
677
678
|
active: "active";
|
|
678
679
|
stopped: "stopped";
|
|
679
|
-
discovered: "discovered";
|
|
680
680
|
skipped: "skipped";
|
|
681
681
|
initializing: "initializing";
|
|
682
682
|
}>;
|
|
@@ -5,14 +5,14 @@ import { z } from "zod";
|
|
|
5
5
|
import * as _$_makaio_core0 from "@makaio/framework/core";
|
|
6
6
|
import { ExtractSubjectPayload, SubjectDefinition } from "@makaio/framework/core";
|
|
7
7
|
import { IMakaioBus } from "@makaio/framework/bus";
|
|
8
|
-
import { AIReasoningLevel, AdapterRuntimeOptions, BranchKind, ContextWindowState,
|
|
8
|
+
import { AIReasoningLevel, AdapterRuntimeOptions, BranchKind, ContextWindowState, ForkOptions, ForkTransforms, IMakaioSession, MakaioSessionAgent, MakaioSessionEvent, Message, MessageBlock, MessageInput, ReasoningLevelMap, SessionContext, SessionExtensionContext, SessionLineage, SessionLineageKind, SessionMessage, SessionMessageBlock, TurnInitiator } from "@makaio/framework/contracts";
|
|
9
9
|
import { BaseService } from "@makaio/framework/service-base";
|
|
10
|
+
import * as _$_makaio_storage_core0 from "@makaio/framework/storage";
|
|
10
11
|
import * as _$drizzle_orm_sqlite_core0 from "drizzle-orm/sqlite-core";
|
|
11
12
|
import * as _$drizzle_orm_pg_core0 from "drizzle-orm/pg-core";
|
|
12
13
|
import * as _$_makaio_storage_drizzle0 from "@makaio/framework/storage/drizzle";
|
|
13
14
|
import { MakaioDatabase } from "@makaio/framework/storage/drizzle";
|
|
14
15
|
import * as _$drizzle_orm0 from "drizzle-orm";
|
|
15
|
-
import * as _$_makaio_storage_core0 from "@makaio/framework/storage";
|
|
16
16
|
|
|
17
17
|
//#region services/core/src/session/session-service.d.ts
|
|
18
18
|
/**
|
|
@@ -20,7 +20,8 @@ import * as _$_makaio_storage_core0 from "@makaio/framework/storage";
|
|
|
20
20
|
*
|
|
21
21
|
* Registers the minimal, load-bearing session handlers that the framework SDK
|
|
22
22
|
* requires: `session.create`, `session.get`, `session.list`, `session.close`,
|
|
23
|
-
* `session.
|
|
23
|
+
* `session.turn.await`, `session.restartAgents`, `session.agent.added`, and
|
|
24
|
+
* `session.agent.removed`.
|
|
24
25
|
*
|
|
25
26
|
* Host-specific handlers (search, update, resume, archive, purge, analytics,
|
|
26
27
|
* context window, branching) are registered by the host session service which
|
|
@@ -66,7 +67,7 @@ declare class MakaioSessionService extends BaseService {
|
|
|
66
67
|
/**
|
|
67
68
|
* Initialize the service.
|
|
68
69
|
*
|
|
69
|
-
* Registers the
|
|
70
|
+
* Registers the framework-core session bus handlers, then performs
|
|
70
71
|
* startup reconciliation to close any turns that were left `active` by a
|
|
71
72
|
* prior process crash. Each orphaned turn is closed with status `'error'`
|
|
72
73
|
* and a `'process-restart'` error message, and a `turn.completed` event is
|
|
@@ -105,8 +106,9 @@ interface CoreSessionServiceHandlerDeps {
|
|
|
105
106
|
}
|
|
106
107
|
/**
|
|
107
108
|
* Registers the framework-core session service handlers:
|
|
108
|
-
* `session.create`, `session.get`, `session.list`, `session.
|
|
109
|
-
* `session.
|
|
109
|
+
* `session.create`, `session.get`, `session.list`, `session.turn.await`,
|
|
110
|
+
* `session.close`, `session.restartAgents`, `session.update`,
|
|
111
|
+
* `session.archive`, `session.purge`, `session.registerExternal`,
|
|
110
112
|
* `session.agent.added`, and `session.agent.removed`.
|
|
111
113
|
*
|
|
112
114
|
* These handlers cover the minimal, load-bearing session contract for the
|
|
@@ -146,8 +148,8 @@ interface ISessionOrchestrator {
|
|
|
146
148
|
* 1. Get or create session (via `getOrCreateSession`)
|
|
147
149
|
* 2. Start agent if session has no agents — resolves the canonical
|
|
148
150
|
* `adapterName` from direct selections, uses `adapterId` directly when
|
|
149
|
-
* provided, otherwise resolves it via `AdapterRegistry`,
|
|
150
|
-
* `AdapterSubjects.startAgent`
|
|
151
|
+
* provided, otherwise resolves it via `AdapterRegistry`, resolves
|
|
152
|
+
* provider credentials when selected, then calls `AdapterSubjects.startAgent`
|
|
151
153
|
* 3. Resolve target agents (via `resolveTargetAgents`)
|
|
152
154
|
* 4. Verify agent liveness and build recovery context for dead agents
|
|
153
155
|
* (requestOptional `AdapterSubjects.getAgent` + `buildRecoveryContext`)
|
|
@@ -188,7 +190,7 @@ declare class SessionOrchestrator implements ISessionOrchestrator {
|
|
|
188
190
|
* Core flow:
|
|
189
191
|
* 1. Get or create session
|
|
190
192
|
* 2. Start agent if session has no agents (canonicalize direct selections,
|
|
191
|
-
* resolve adapterId,
|
|
193
|
+
* resolve adapterId, resolve provider credentials, startAgent)
|
|
192
194
|
* 3. Resolve target agents
|
|
193
195
|
* 4. Verify agent liveness and build recovery context for dead agents
|
|
194
196
|
* 5. Get or create turn (via SessionTurnManager)
|
|
@@ -924,6 +926,7 @@ declare const AgentStorageNamespace: _$_makaio_storage_core0.StorageNamespaceDef
|
|
|
924
926
|
adapterSessionId: z.ZodOptional<z.ZodString>;
|
|
925
927
|
model: z.ZodOptional<z.ZodString>;
|
|
926
928
|
cwd: z.ZodOptional<z.ZodString>;
|
|
929
|
+
allowedDirectories: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
927
930
|
providerConfigId: z.ZodOptional<z.ZodString>;
|
|
928
931
|
personaId: z.ZodOptional<z.ZodString>;
|
|
929
932
|
profileId: z.ZodOptional<z.ZodString>;
|
|
@@ -966,6 +969,7 @@ declare const AgentStorageNamespace: _$_makaio_storage_core0.StorageNamespaceDef
|
|
|
966
969
|
adapterSessionId: z.ZodOptional<z.ZodString>;
|
|
967
970
|
model: z.ZodOptional<z.ZodString>;
|
|
968
971
|
cwd: z.ZodOptional<z.ZodString>;
|
|
972
|
+
allowedDirectories: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
969
973
|
providerConfigId: z.ZodOptional<z.ZodString>;
|
|
970
974
|
personaId: z.ZodOptional<z.ZodString>;
|
|
971
975
|
profileId: z.ZodOptional<z.ZodString>;
|
|
@@ -1034,6 +1038,7 @@ declare const AgentStorageNamespace: _$_makaio_storage_core0.StorageNamespaceDef
|
|
|
1034
1038
|
adapterSessionId: z.ZodOptional<z.ZodString>;
|
|
1035
1039
|
model: z.ZodOptional<z.ZodString>;
|
|
1036
1040
|
cwd: z.ZodOptional<z.ZodString>;
|
|
1041
|
+
allowedDirectories: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1037
1042
|
providerConfigId: z.ZodOptional<z.ZodString>;
|
|
1038
1043
|
personaId: z.ZodOptional<z.ZodString>;
|
|
1039
1044
|
profileId: z.ZodOptional<z.ZodString>;
|
|
@@ -1078,6 +1083,7 @@ declare const AgentStorageNamespace: _$_makaio_storage_core0.StorageNamespaceDef
|
|
|
1078
1083
|
adapterSessionId: z.ZodOptional<z.ZodString>;
|
|
1079
1084
|
model: z.ZodOptional<z.ZodString>;
|
|
1080
1085
|
cwd: z.ZodOptional<z.ZodString>;
|
|
1086
|
+
allowedDirectories: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1081
1087
|
providerConfigId: z.ZodOptional<z.ZodString>;
|
|
1082
1088
|
personaId: z.ZodOptional<z.ZodString>;
|
|
1083
1089
|
profileId: z.ZodOptional<z.ZodString>;
|
|
@@ -1147,8 +1153,10 @@ declare const AgentStorageNamespace: _$_makaio_storage_core0.StorageNamespaceDef
|
|
|
1147
1153
|
updateRuntime: {
|
|
1148
1154
|
request: z.ZodObject<{
|
|
1149
1155
|
agentId: z.ZodString;
|
|
1156
|
+
adapterId: z.ZodOptional<z.ZodString>;
|
|
1150
1157
|
cwd: z.ZodOptional<z.ZodString>;
|
|
1151
1158
|
model: z.ZodOptional<z.ZodString>;
|
|
1159
|
+
allowedDirectories: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1152
1160
|
providerConfigId: z.ZodOptional<z.ZodString>;
|
|
1153
1161
|
}, z.core.$strip>;
|
|
1154
1162
|
response: z.ZodObject<{
|
|
@@ -1294,6 +1302,25 @@ declare const AgentStorageNamespace: _$_makaio_storage_core0.StorageNamespaceDef
|
|
|
1294
1302
|
}, {}, {
|
|
1295
1303
|
length: number | undefined;
|
|
1296
1304
|
}>;
|
|
1305
|
+
allowedDirectories: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
1306
|
+
name: string;
|
|
1307
|
+
tableName: "agents";
|
|
1308
|
+
dataType: "json";
|
|
1309
|
+
columnType: "SQLiteTextJson";
|
|
1310
|
+
data: string[];
|
|
1311
|
+
driverParam: string;
|
|
1312
|
+
notNull: false;
|
|
1313
|
+
hasDefault: false;
|
|
1314
|
+
isPrimaryKey: false;
|
|
1315
|
+
isAutoincrement: false;
|
|
1316
|
+
hasRuntimeDefault: false;
|
|
1317
|
+
enumValues: undefined;
|
|
1318
|
+
baseColumn: never;
|
|
1319
|
+
identity: undefined;
|
|
1320
|
+
generated: undefined;
|
|
1321
|
+
}, {}, {
|
|
1322
|
+
$type: string[];
|
|
1323
|
+
}>;
|
|
1297
1324
|
providerConfigId: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
1298
1325
|
name: "provider_config_id";
|
|
1299
1326
|
tableName: "agents";
|
|
@@ -1508,6 +1535,7 @@ declare const AgentStorageSubjects: _$_makaio_core0.BusSubjects<_$_makaio_core0.
|
|
|
1508
1535
|
adapterSessionId: z.ZodOptional<z.ZodString>;
|
|
1509
1536
|
model: z.ZodOptional<z.ZodString>;
|
|
1510
1537
|
cwd: z.ZodOptional<z.ZodString>;
|
|
1538
|
+
allowedDirectories: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1511
1539
|
providerConfigId: z.ZodOptional<z.ZodString>;
|
|
1512
1540
|
personaId: z.ZodOptional<z.ZodString>;
|
|
1513
1541
|
profileId: z.ZodOptional<z.ZodString>;
|
|
@@ -1550,6 +1578,7 @@ declare const AgentStorageSubjects: _$_makaio_core0.BusSubjects<_$_makaio_core0.
|
|
|
1550
1578
|
adapterSessionId: z.ZodOptional<z.ZodString>;
|
|
1551
1579
|
model: z.ZodOptional<z.ZodString>;
|
|
1552
1580
|
cwd: z.ZodOptional<z.ZodString>;
|
|
1581
|
+
allowedDirectories: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1553
1582
|
providerConfigId: z.ZodOptional<z.ZodString>;
|
|
1554
1583
|
personaId: z.ZodOptional<z.ZodString>;
|
|
1555
1584
|
profileId: z.ZodOptional<z.ZodString>;
|
|
@@ -1618,6 +1647,7 @@ declare const AgentStorageSubjects: _$_makaio_core0.BusSubjects<_$_makaio_core0.
|
|
|
1618
1647
|
adapterSessionId: z.ZodOptional<z.ZodString>;
|
|
1619
1648
|
model: z.ZodOptional<z.ZodString>;
|
|
1620
1649
|
cwd: z.ZodOptional<z.ZodString>;
|
|
1650
|
+
allowedDirectories: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1621
1651
|
providerConfigId: z.ZodOptional<z.ZodString>;
|
|
1622
1652
|
personaId: z.ZodOptional<z.ZodString>;
|
|
1623
1653
|
profileId: z.ZodOptional<z.ZodString>;
|
|
@@ -1662,6 +1692,7 @@ declare const AgentStorageSubjects: _$_makaio_core0.BusSubjects<_$_makaio_core0.
|
|
|
1662
1692
|
adapterSessionId: z.ZodOptional<z.ZodString>;
|
|
1663
1693
|
model: z.ZodOptional<z.ZodString>;
|
|
1664
1694
|
cwd: z.ZodOptional<z.ZodString>;
|
|
1695
|
+
allowedDirectories: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1665
1696
|
providerConfigId: z.ZodOptional<z.ZodString>;
|
|
1666
1697
|
personaId: z.ZodOptional<z.ZodString>;
|
|
1667
1698
|
profileId: z.ZodOptional<z.ZodString>;
|
|
@@ -1731,8 +1762,10 @@ declare const AgentStorageSubjects: _$_makaio_core0.BusSubjects<_$_makaio_core0.
|
|
|
1731
1762
|
updateRuntime: {
|
|
1732
1763
|
request: z.ZodObject<{
|
|
1733
1764
|
agentId: z.ZodString;
|
|
1765
|
+
adapterId: z.ZodOptional<z.ZodString>;
|
|
1734
1766
|
cwd: z.ZodOptional<z.ZodString>;
|
|
1735
1767
|
model: z.ZodOptional<z.ZodString>;
|
|
1768
|
+
allowedDirectories: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1736
1769
|
providerConfigId: z.ZodOptional<z.ZodString>;
|
|
1737
1770
|
}, z.core.$strip>;
|
|
1738
1771
|
response: z.ZodObject<{
|
|
@@ -1776,7 +1809,6 @@ declare function registerMemorySessionStorage(bus: IMakaioBus): () => void;
|
|
|
1776
1809
|
* via SQLite's busy_timeout + WAL mode.
|
|
1777
1810
|
* @param bus - The bus instance to register handlers on
|
|
1778
1811
|
* @param db - The Drizzle database instance
|
|
1779
|
-
* @param _ctx - Extension context (unused; reserved for future use)
|
|
1780
1812
|
* @returns Cleanup function to unsubscribe all handlers
|
|
1781
1813
|
* @example
|
|
1782
1814
|
* ```typescript
|
|
@@ -1786,13 +1818,13 @@ declare function registerMemorySessionStorage(bus: IMakaioBus): () => void;
|
|
|
1786
1818
|
*
|
|
1787
1819
|
* const client = createClient({ url: 'file:./makaio.db' });
|
|
1788
1820
|
* const db = drizzle(client);
|
|
1789
|
-
* const cleanup = registerDrizzleSessionStorage(bus, db
|
|
1821
|
+
* const cleanup = registerDrizzleSessionStorage(bus, db);
|
|
1790
1822
|
*
|
|
1791
1823
|
* // Later, when shutting down:
|
|
1792
1824
|
* cleanup();
|
|
1793
1825
|
* ```
|
|
1794
1826
|
*/
|
|
1795
|
-
declare function registerDrizzleSessionStorage(bus: IMakaioBus, db: MakaioDatabase
|
|
1827
|
+
declare function registerDrizzleSessionStorage(bus: IMakaioBus, db: MakaioDatabase): () => void;
|
|
1796
1828
|
//#endregion
|
|
1797
1829
|
//#region services/core/src/session/storage/agent-memory-handler.d.ts
|
|
1798
1830
|
/**
|
|
@@ -1869,7 +1901,7 @@ declare const sessionStorageSchema: _$_makaio_storage_drizzle0.DialectSchema<{
|
|
|
1869
1901
|
tableName: "sessions";
|
|
1870
1902
|
dataType: "string";
|
|
1871
1903
|
columnType: "SQLiteText";
|
|
1872
|
-
data: "closed" | "
|
|
1904
|
+
data: "closed" | "discovered" | "active" | "archived";
|
|
1873
1905
|
driverParam: string;
|
|
1874
1906
|
notNull: true;
|
|
1875
1907
|
hasDefault: false;
|
|
@@ -1983,7 +2015,7 @@ declare const sessionStorageSchema: _$_makaio_storage_drizzle0.DialectSchema<{
|
|
|
1983
2015
|
tableName: "sessions";
|
|
1984
2016
|
dataType: "string";
|
|
1985
2017
|
columnType: "SQLiteText";
|
|
1986
|
-
data: "
|
|
2018
|
+
data: "fork" | "subagent" | "compress" | "branch" | "rewrite" | "coordinator" | "aside";
|
|
1987
2019
|
driverParam: string;
|
|
1988
2020
|
notNull: false;
|
|
1989
2021
|
hasDefault: false;
|
|
@@ -2528,6 +2560,25 @@ declare const sessionStorageSchema: _$_makaio_storage_drizzle0.DialectSchema<{
|
|
|
2528
2560
|
}, {}, {
|
|
2529
2561
|
length: number | undefined;
|
|
2530
2562
|
}>;
|
|
2563
|
+
allowedDirectories: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
2564
|
+
name: string;
|
|
2565
|
+
tableName: "agents";
|
|
2566
|
+
dataType: "json";
|
|
2567
|
+
columnType: "SQLiteTextJson";
|
|
2568
|
+
data: string[];
|
|
2569
|
+
driverParam: string;
|
|
2570
|
+
notNull: false;
|
|
2571
|
+
hasDefault: false;
|
|
2572
|
+
isPrimaryKey: false;
|
|
2573
|
+
isAutoincrement: false;
|
|
2574
|
+
hasRuntimeDefault: false;
|
|
2575
|
+
enumValues: undefined;
|
|
2576
|
+
baseColumn: never;
|
|
2577
|
+
identity: undefined;
|
|
2578
|
+
generated: undefined;
|
|
2579
|
+
}, {}, {
|
|
2580
|
+
$type: string[];
|
|
2581
|
+
}>;
|
|
2531
2582
|
providerConfigId: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
2532
2583
|
name: "provider_config_id";
|
|
2533
2584
|
tableName: "agents";
|
|
@@ -2727,7 +2778,6 @@ declare const sessionStorageSchema: _$_makaio_storage_drizzle0.DialectSchema<{
|
|
|
2727
2778
|
* Provides durable storage suitable for production deployments.
|
|
2728
2779
|
* @param bus - The bus instance to register handlers on
|
|
2729
2780
|
* @param db - The MakaioDatabase instance
|
|
2730
|
-
* @param _ctx - Extension context (unused; reserved for future use)
|
|
2731
2781
|
* @returns Cleanup function to unsubscribe all handlers
|
|
2732
2782
|
* @example
|
|
2733
2783
|
* ```typescript
|
|
@@ -2737,13 +2787,13 @@ declare const sessionStorageSchema: _$_makaio_storage_drizzle0.DialectSchema<{
|
|
|
2737
2787
|
*
|
|
2738
2788
|
* const client = createClient({ url: 'file:./makaio.db' });
|
|
2739
2789
|
* const db = drizzle(client);
|
|
2740
|
-
* const cleanup = registerDrizzleAgentStorage(bus, db
|
|
2790
|
+
* const cleanup = registerDrizzleAgentStorage(bus, db);
|
|
2741
2791
|
*
|
|
2742
2792
|
* // Later, when shutting down:
|
|
2743
2793
|
* cleanup();
|
|
2744
2794
|
* ```
|
|
2745
2795
|
*/
|
|
2746
|
-
declare function registerDrizzleAgentStorage(bus: IMakaioBus, db: MakaioDatabase
|
|
2796
|
+
declare function registerDrizzleAgentStorage(bus: IMakaioBus, db: MakaioDatabase): () => void;
|
|
2747
2797
|
//#endregion
|
|
2748
2798
|
//#region services/core/src/session/storage/fts-search-handler.d.ts
|
|
2749
2799
|
/**
|
|
@@ -3279,7 +3329,6 @@ declare function registerMemorySessionEventStorage(bus: IMakaioBus): () => void;
|
|
|
3279
3329
|
* extraction for future FTS/embedding support.
|
|
3280
3330
|
* @param bus - The bus instance to register handlers on
|
|
3281
3331
|
* @param db - The Drizzle database instance
|
|
3282
|
-
* @param _ctx - Extension context (unused; reserved for future use)
|
|
3283
3332
|
* @returns Cleanup function to unsubscribe all handlers
|
|
3284
3333
|
* @example
|
|
3285
3334
|
* ```typescript
|
|
@@ -3289,13 +3338,13 @@ declare function registerMemorySessionEventStorage(bus: IMakaioBus): () => void;
|
|
|
3289
3338
|
*
|
|
3290
3339
|
* const client = createClient({ url: 'file:./makaio.db' });
|
|
3291
3340
|
* const db = drizzle(client);
|
|
3292
|
-
* const cleanup = registerDrizzleSessionEventStorage(bus, db
|
|
3341
|
+
* const cleanup = registerDrizzleSessionEventStorage(bus, db);
|
|
3293
3342
|
*
|
|
3294
3343
|
* // Later, when shutting down:
|
|
3295
3344
|
* cleanup();
|
|
3296
3345
|
* ```
|
|
3297
3346
|
*/
|
|
3298
|
-
declare function registerDrizzleSessionEventStorage(bus: IMakaioBus, db: MakaioDatabase
|
|
3347
|
+
declare function registerDrizzleSessionEventStorage(bus: IMakaioBus, db: MakaioDatabase): () => void;
|
|
3299
3348
|
//#endregion
|
|
3300
3349
|
//#region services/core/src/session/session-logger.d.ts
|
|
3301
3350
|
/**
|
|
@@ -3518,19 +3567,18 @@ declare const importCursors: _$drizzle_orm_sqlite_core0.SQLiteTableWithColumns<{
|
|
|
3518
3567
|
* On restart, import continues from the last processed byte offset.
|
|
3519
3568
|
* @param bus - The bus instance to register handlers on
|
|
3520
3569
|
* @param db - Drizzle database instance
|
|
3521
|
-
* @param _ctx - Extension context (unused; reserved for future use)
|
|
3522
3570
|
* @returns Cleanup function to unsubscribe all handlers
|
|
3523
3571
|
* @example
|
|
3524
3572
|
* ```typescript
|
|
3525
3573
|
* import { registerDrizzleImportCursorStorage } from '@makaio/framework/services/session';
|
|
3526
3574
|
*
|
|
3527
|
-
* const cleanup = registerDrizzleImportCursorStorage(bus, db
|
|
3575
|
+
* const cleanup = registerDrizzleImportCursorStorage(bus, db);
|
|
3528
3576
|
*
|
|
3529
3577
|
* // Later, when shutting down:
|
|
3530
3578
|
* cleanup();
|
|
3531
3579
|
* ```
|
|
3532
3580
|
*/
|
|
3533
|
-
declare function registerDrizzleImportCursorStorage(bus: IMakaioBus, db: MakaioDatabase
|
|
3581
|
+
declare function registerDrizzleImportCursorStorage(bus: IMakaioBus, db: MakaioDatabase): () => void;
|
|
3534
3582
|
//#endregion
|
|
3535
3583
|
//#region services/core/src/session/embeddings/index-manager.d.ts
|
|
3536
3584
|
/**
|
|
@@ -3689,10 +3737,9 @@ declare class EmbeddingIndexManager {
|
|
|
3689
3737
|
* via SQLite's busy_timeout + WAL mode.
|
|
3690
3738
|
* @param bus - The bus instance to register handlers on
|
|
3691
3739
|
* @param db - The Drizzle database instance
|
|
3692
|
-
* @param _ctx - Extension context (unused; reserved for future use)
|
|
3693
3740
|
* @returns Cleanup function to unsubscribe all handlers
|
|
3694
3741
|
*/
|
|
3695
|
-
declare function registerDrizzleTurnStorage(bus: IMakaioBus, db: MakaioDatabase
|
|
3742
|
+
declare function registerDrizzleTurnStorage(bus: IMakaioBus, db: MakaioDatabase): () => void;
|
|
3696
3743
|
//#endregion
|
|
3697
3744
|
//#region services/core/src/session/turns/memory-handler.d.ts
|
|
3698
3745
|
/**
|
|
@@ -3760,6 +3807,11 @@ declare const turnsDual: _$_makaio_storage_drizzle0.DualTable<"turns", {
|
|
|
3760
3807
|
* @see TurnUsageSchema in libs/contracts for structure definition
|
|
3761
3808
|
*/
|
|
3762
3809
|
usage: _$_makaio_storage_drizzle0.DualBuilder<_$drizzle_orm_sqlite_core0.SQLiteTextBuilderInitial<"usage", [string, ...string[]], number | undefined>, _$drizzle_orm_pg_core0.PgTextBuilderInitial<"usage", [string, ...string[]]>>;
|
|
3810
|
+
/**
|
|
3811
|
+
* Turn origin metadata for loop prevention and audit.
|
|
3812
|
+
* Stored as hand-stringified JSON because turn.create uses a raw SQL CTE.
|
|
3813
|
+
*/
|
|
3814
|
+
initiator: _$_makaio_storage_drizzle0.DualBuilder<_$drizzle_orm_sqlite_core0.SQLiteTextBuilderInitial<"initiator", [string, ...string[]], number | undefined>, _$drizzle_orm_pg_core0.PgTextBuilderInitial<"initiator", [string, ...string[]]>>;
|
|
3763
3815
|
}>;
|
|
3764
3816
|
/** SQLite face of the `turns` table (canonical schema). */
|
|
3765
3817
|
declare const turns: _$drizzle_orm_sqlite_core0.SQLiteTableWithColumns<{
|
|
@@ -3912,6 +3964,25 @@ declare const turns: _$drizzle_orm_sqlite_core0.SQLiteTableWithColumns<{
|
|
|
3912
3964
|
}, {}, {
|
|
3913
3965
|
length: number | undefined;
|
|
3914
3966
|
}>;
|
|
3967
|
+
initiator: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
3968
|
+
name: "initiator";
|
|
3969
|
+
tableName: "turns";
|
|
3970
|
+
dataType: "string";
|
|
3971
|
+
columnType: "SQLiteText";
|
|
3972
|
+
data: string;
|
|
3973
|
+
driverParam: string;
|
|
3974
|
+
notNull: false;
|
|
3975
|
+
hasDefault: false;
|
|
3976
|
+
isPrimaryKey: false;
|
|
3977
|
+
isAutoincrement: false;
|
|
3978
|
+
hasRuntimeDefault: false;
|
|
3979
|
+
enumValues: [string, ...string[]];
|
|
3980
|
+
baseColumn: never;
|
|
3981
|
+
identity: undefined;
|
|
3982
|
+
generated: undefined;
|
|
3983
|
+
}, {}, {
|
|
3984
|
+
length: number | undefined;
|
|
3985
|
+
}>;
|
|
3915
3986
|
};
|
|
3916
3987
|
dialect: "sqlite";
|
|
3917
3988
|
}>;
|
|
@@ -3931,10 +4002,9 @@ type SelectTurn = typeof turns.$inferSelect;
|
|
|
3931
4002
|
* Manages message persistence via Drizzle ORM.
|
|
3932
4003
|
* @param bus - The bus instance to register handlers on
|
|
3933
4004
|
* @param db - The Drizzle database instance
|
|
3934
|
-
* @param _ctx - Extension context (unused; reserved for future use)
|
|
3935
4005
|
* @returns Cleanup function to unsubscribe all handlers
|
|
3936
4006
|
*/
|
|
3937
|
-
declare function registerDrizzleMessageStorage(bus: IMakaioBus, db: MakaioDatabase
|
|
4007
|
+
declare function registerDrizzleMessageStorage(bus: IMakaioBus, db: MakaioDatabase): () => void;
|
|
3938
4008
|
//#endregion
|
|
3939
4009
|
//#region services/core/src/session/messages/memory-handler.d.ts
|
|
3940
4010
|
/**
|
|
@@ -4482,10 +4552,9 @@ declare const MessageRoutingSubjects: _$_makaio_core0.BusSubjects<_$_makaio_core
|
|
|
4482
4552
|
* Manages message delivery tracking via Drizzle ORM.
|
|
4483
4553
|
* @param bus - The bus instance to register handlers on
|
|
4484
4554
|
* @param db - The Drizzle database instance
|
|
4485
|
-
* @param _ctx - Extension context (unused; reserved for future use)
|
|
4486
4555
|
* @returns Cleanup function to unsubscribe all handlers
|
|
4487
4556
|
*/
|
|
4488
|
-
declare function registerDrizzleMessageRoutingStorage(bus: IMakaioBus, db: MakaioDatabase
|
|
4557
|
+
declare function registerDrizzleMessageRoutingStorage(bus: IMakaioBus, db: MakaioDatabase): () => void;
|
|
4489
4558
|
//#endregion
|
|
4490
4559
|
//#region services/core/src/session/message-routing/schema.d.ts
|
|
4491
4560
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TransportPeerContext } from "@makaio/framework/core";
|
|
2
2
|
import { IMakaioBus } from "@makaio/framework/bus";
|
|
3
3
|
import * as _$_makaio_contracts0 from "@makaio/framework/contracts";
|
|
4
|
-
import { MakaioNodeExtension, PendingRequest, SubagentConfig, SubagentConstraints, SubagentStatus } from "@makaio/framework/contracts";
|
|
4
|
+
import { CompletionMode, MakaioNodeExtension, PendingRequest, SubagentConfig, SubagentConstraints, SubagentStatus } from "@makaio/framework/contracts";
|
|
5
5
|
import { BaseService } from "@makaio/framework/service-base";
|
|
6
6
|
|
|
7
7
|
//#region services/core/src/subagent/spawn-delegation.d.ts
|
|
@@ -186,6 +186,33 @@ declare class SubagentService extends BaseService {
|
|
|
186
186
|
* @param sessionId - The session ID reported by the adapter as closed
|
|
187
187
|
*/
|
|
188
188
|
private handleAdapterSessionClosed;
|
|
189
|
+
/**
|
|
190
|
+
* Handle `agent.complete` events for turn-mode subagents.
|
|
191
|
+
*
|
|
192
|
+
* Scans non-terminal subagents for one whose `childSessionId` matches the
|
|
193
|
+
* event's `sessionId`. If found and the subagent was spawned with
|
|
194
|
+
* `completion: 'turn'`, terminalizes it based on the turn outcome:
|
|
195
|
+
*
|
|
196
|
+
* - `'completed'` or absent (legacy emitters) → marks completed; result is
|
|
197
|
+
* `payload.message`.
|
|
198
|
+
* - `'error'` → marks failed with `payload.error`.
|
|
199
|
+
* - `'superseded'`, `'merged'`, `'cancelled'`, `'rejected'` → ignored; these
|
|
200
|
+
* are not the subagent's final result.
|
|
201
|
+
*
|
|
202
|
+
* Guards applied before transitioning:
|
|
203
|
+
* - Skips when `sessionId` is absent (malformed event from legacy emitter).
|
|
204
|
+
* - Skips when the subagent is currently in `waiting_input` — the completed
|
|
205
|
+
* turn is the question, not the result.
|
|
206
|
+
* - Skips when `manager.markCompleted` / `manager.markFailed` would throw
|
|
207
|
+
* (subagent already terminal — first-terminal-wins).
|
|
208
|
+
*
|
|
209
|
+
* Both terminal branches emit `subagent.completed` (with `success` set
|
|
210
|
+
* accordingly), the same announcement `completeTask` makes. That event is
|
|
211
|
+
* what drives child-session cleanup (`handleCompleted`) — terminalizing
|
|
212
|
+
* only the manager state would leak the child session and its adapter.
|
|
213
|
+
* @param payload - Payload from the `agent.complete` bus event
|
|
214
|
+
*/
|
|
215
|
+
private handleAgentComplete;
|
|
189
216
|
/**
|
|
190
217
|
* Return true when a handler may proceed.
|
|
191
218
|
*
|
|
@@ -288,6 +315,13 @@ interface TrackedSubagent {
|
|
|
288
315
|
summary?: string;
|
|
289
316
|
/** Error message if failed. */
|
|
290
317
|
error?: string;
|
|
318
|
+
/**
|
|
319
|
+
* Which mechanism terminalized this subagent.
|
|
320
|
+
* Present only when status is `'completed'`.
|
|
321
|
+
* - `'tool'` — child called `completeTask`.
|
|
322
|
+
* - `'turn'` — first completed agent turn was used as the result.
|
|
323
|
+
*/
|
|
324
|
+
completionSource?: CompletionMode;
|
|
291
325
|
/** Timestamp when the subagent was spawned. */
|
|
292
326
|
startTime: number;
|
|
293
327
|
/** Timestamp when the subagent reached a terminal state. */
|
|
@@ -314,6 +348,13 @@ interface AwaitResult {
|
|
|
314
348
|
pendingRequest?: PendingRequest;
|
|
315
349
|
/** Error message if failed. */
|
|
316
350
|
error?: string;
|
|
351
|
+
/**
|
|
352
|
+
* Which mechanism terminalized the subagent.
|
|
353
|
+
* Present when status is `'completed'`.
|
|
354
|
+
* - `'tool'` — child called `completeTask`.
|
|
355
|
+
* - `'turn'` — first completed agent turn was used as the result.
|
|
356
|
+
*/
|
|
357
|
+
completionSource?: CompletionMode;
|
|
317
358
|
}
|
|
318
359
|
//#endregion
|
|
319
360
|
//#region services/core/src/subagent/manager/subagent-manager.d.ts
|
|
@@ -422,9 +463,10 @@ declare class SubagentManager {
|
|
|
422
463
|
* @param subagentId - ID of the subagent
|
|
423
464
|
* @param result - Result string
|
|
424
465
|
* @param summary - Optional summary of the result
|
|
466
|
+
* @param completionSource - Which mechanism produced the completion (`'tool'` or `'turn'`)
|
|
425
467
|
* @throws SubagentError if subagent not found or already in terminal state
|
|
426
468
|
*/
|
|
427
|
-
markCompleted(subagentId: string, result: string, summary?: string): void;
|
|
469
|
+
markCompleted(subagentId: string, result: string, summary?: string, completionSource?: CompletionMode): void;
|
|
428
470
|
/**
|
|
429
471
|
* Mark subagent as failed.
|
|
430
472
|
* Does nothing if subagent not found or already in a terminal state.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as ExtensionCoordinatorOptions, c as KernelMakaioExtension, i as ContributionProcessor, l as RuntimeCapability, n as filterEligibleExtensions, o as ExtensionRuntimeSurface, r as ExtensionCoordinator, s as KernelExtensionContext, t as coalesceExtensionOverrides, u as RuntimeEnvironment } from "../../index-
|
|
1
|
+
import { a as ExtensionCoordinatorOptions, c as KernelMakaioExtension, i as ContributionProcessor, l as RuntimeCapability, n as filterEligibleExtensions, o as ExtensionRuntimeSurface, r as ExtensionCoordinator, s as KernelExtensionContext, t as coalesceExtensionOverrides, u as RuntimeEnvironment } from "../../index-CH5U3zSA2.mjs";
|
|
2
2
|
export { ContributionProcessor, ExtensionCoordinator, ExtensionCoordinatorOptions, ExtensionRuntimeSurface, KernelExtensionContext, KernelMakaioExtension, RuntimeCapability, RuntimeEnvironment, coalesceExtensionOverrides, filterEligibleExtensions };
|
package/dist/kernel/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as ExtensionInfo, f as ServiceInfo, i as ComponentInfo, l as ExtensionInfoSchema, n as ExtensionSubjects, o as ComponentState, p as ServiceInfoSchema, s as ComponentStateSchema, t as ExtensionNamespace } from "../index-
|
|
2
|
-
import { c as KernelMakaioExtension, i as ContributionProcessor, l as RuntimeCapability, n as filterEligibleExtensions, o as ExtensionRuntimeSurface, r as ExtensionCoordinator, s as KernelExtensionContext, t as coalesceExtensionOverrides, u as RuntimeEnvironment } from "../index-
|
|
1
|
+
import { c as ExtensionInfo, f as ServiceInfo, i as ComponentInfo, l as ExtensionInfoSchema, n as ExtensionSubjects, o as ComponentState, p as ServiceInfoSchema, s as ComponentStateSchema, t as ExtensionNamespace } from "../index-Da4ABgRq.mjs";
|
|
2
|
+
import { c as KernelMakaioExtension, i as ContributionProcessor, l as RuntimeCapability, n as filterEligibleExtensions, o as ExtensionRuntimeSurface, r as ExtensionCoordinator, s as KernelExtensionContext, t as coalesceExtensionOverrides, u as RuntimeEnvironment } from "../index-CH5U3zSA2.mjs";
|
|
3
3
|
import { i as WindowStyle, n as WindowRegistration, r as WindowRegistry, t as STYLE_DEFAULTS } from "../window-registry-CfEi_Ji4.mjs";
|
|
4
4
|
import { a as KernelSchemas, i as setWorkflowTriggerTypeRegistry, n as KernelSubjects, r as getWorkflowTriggerTypeRegistry, t as KernelNamespace } from "../index-DOfq0qqv.mjs";
|
|
5
5
|
import { a as MachineIdentity, c as StorageProvider, i as IdentityProvider, n as NoTransportProvider, o as TransportProvider, r as MemoryStorageProvider, s as StorageCleanup, t as EphemeralIdentityProvider } from "../index-BbCjtc3h.mjs";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as ComponentInfoSchema, c as ExtensionInfo, d as ExtensionWarningEntrySchema, f as ServiceInfo, i as ComponentInfo, l as ExtensionInfoSchema, n as ExtensionSubjects, o as ComponentState, p as ServiceInfoSchema, r as ComponentIdentitySchema, s as ComponentStateSchema, t as ExtensionNamespace, u as ExtensionWarningEntry } from "../../index-
|
|
1
|
+
import { a as ComponentInfoSchema, c as ExtensionInfo, d as ExtensionWarningEntrySchema, f as ServiceInfo, i as ComponentInfo, l as ExtensionInfoSchema, n as ExtensionSubjects, o as ComponentState, p as ServiceInfoSchema, r as ComponentIdentitySchema, s as ComponentStateSchema, t as ExtensionNamespace, u as ExtensionWarningEntry } from "../../index-Da4ABgRq.mjs";
|
|
2
2
|
export { ComponentIdentitySchema, ComponentInfo, ComponentInfoSchema, ComponentState, ComponentStateSchema, ExtensionInfo, ExtensionInfoSchema, ExtensionNamespace, ExtensionSubjects, ExtensionWarningEntry, ExtensionWarningEntrySchema, ServiceInfo, ServiceInfoSchema };
|