@makaio/framework 1.0.0-dev-1783940945655 → 1.0.0-dev-1783975608971
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/{account-identity-BYfeWLe-.mjs → account-identity-CP4DC0DL.mjs} +1 -1
- package/dist/{adapter-nl_xz9dz.mjs → adapter-B9vVBwli.mjs} +1 -1
- package/dist/adapter-subsystem/index.d.mts +10 -0
- package/dist/adapter-subsystem/index.mjs +1 -1
- package/dist/adapters/node.mjs +1 -1
- package/dist/authority-state-bootstrap-CEuKScnL.mjs +1 -0
- package/dist/bus/index.d.mts +31 -31
- package/dist/bus/index.mjs +1 -1
- package/dist/{canonical-model-CVRCW9h7.mjs → canonical-model-C31NaBJs.mjs} +1 -1
- package/dist/{client-BkpLM8Fx.mjs → client-CzPCSeyE.mjs} +1 -1
- package/dist/clients/index.d.mts +5 -5
- package/dist/contracts/adapter/index.d.mts +1 -1
- package/dist/contracts/adapter/index.mjs +1 -1
- package/dist/contracts/canonical-model/index.d.mts +1 -1
- package/dist/contracts/canonical-model/index.mjs +1 -1
- package/dist/contracts/client/index.d.mts +1 -1
- package/dist/contracts/client/index.mjs +1 -1
- package/dist/contracts/extension/index.d.mts +2 -2
- package/dist/contracts/extension/index.mjs +1 -1
- package/dist/contracts/facet/index.d.mts +1 -1
- package/dist/contracts/harness/index.d.mts +1 -1
- package/dist/contracts/index.d.mts +221 -153
- package/dist/contracts/index.mjs +1 -1
- package/dist/contracts/materialization/index.d.mts +1 -1
- package/dist/contracts/native-session-supervisor/index.d.mts +2 -2
- package/dist/contracts/native-session-supervisor/index.mjs +1 -1
- package/dist/contracts/session/index.d.mts +3 -3
- package/dist/contracts/session/index.mjs +1 -1
- package/dist/contracts/shared/index.d.mts +1 -1
- package/dist/contracts/variant/index.d.mts +1 -1
- package/dist/contracts/workflow/index.d.mts +3 -3
- package/dist/contracts/workflow/index.mjs +1 -1
- package/dist/{detached-extension-handle-CTaQoolf.mjs → detached-extension-handle-vDK194QV.mjs} +1 -1
- package/dist/drizzle/0026_m_mrgvi7fq.sql +16 -0
- package/dist/drizzle/0027_m_mrgw0uzg.sql +1 -0
- package/dist/drizzle/0028_m_mrgx04i1.sql +1 -0
- package/dist/drizzle/0029_terminal-authority.sql +1 -0
- package/dist/drizzle/meta/_journal.json +28 -0
- package/dist/{extension-D4iKUUMG.mjs → extension-Cgg45Xk1.mjs} +1 -1
- package/dist/git/index.mjs +8 -8
- package/dist/{index-D5IEq4_E.d.mts → index-BH145jWk.d.mts} +9 -7
- package/dist/{index-BcejR1Jc.d.mts → index-BORQLrT7.d.mts} +1 -1
- package/dist/{index-CB2XTzvd.d.mts → index-Bbr5LEUc.d.mts} +1 -1
- package/dist/{index-5s_dN3cg2.d.mts → index-BmsPH78f2.d.mts} +33 -5
- package/dist/{index-BtL7ONuM.d.mts → index-C6LZOiDv.d.mts} +149 -1
- package/dist/{index-DlUPWOh4.d.mts → index-CCX4veeR.d.mts} +2859 -692
- package/dist/{index-DxatNFz7.d.mts → index-CMTNBuo6.d.mts} +16 -16
- package/dist/{index-CVs0Qxks.d.mts → index-CSxfU0tB.d.mts} +4 -4
- package/dist/{index-Cw3cjGAT.d.mts → index-ChSwb11f.d.mts} +7 -7
- package/dist/{index-Lp0T_V1W.d.mts → index-CidZvQ-c.d.mts} +3 -3
- package/dist/{index-p6dWV52m.d.mts → index-Cq6rXKae.d.mts} +379 -379
- package/dist/{index-DNc1yLQs.d.mts → index-DHGW7dFf.d.mts} +8 -8
- package/dist/{index-C9Q1E8Y-.d.mts → index-DMQlLz2W.d.mts} +34 -34
- package/dist/{index-iJP-l15K.d.mts → index-DXBiCH2y.d.mts} +27 -1
- package/dist/{index-CW6-0k3Z.d.mts → index-DlAfs3RD.d.mts} +105 -105
- package/dist/{index-sCOlgPyj.d.mts → index-DpZbaS7y.d.mts} +388 -388
- package/dist/{index-Do7Wgio_2.d.mts → index-MTvmxwiu2.d.mts} +1 -1
- package/dist/{index-BsEvzFey.d.mts → index-kqxUXYe7.d.mts} +6 -6
- 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/{lib-DymjnkAP.mjs → lib-DktBDEoY.mjs} +1 -1
- package/dist/{load-extensions-BtUrq2_t.mjs → load-extensions-nqL5WAKj.mjs} +1 -1
- package/dist/mcp-http-server/index.d.mts +27 -90
- package/dist/mcp-http-server/index.mjs +1 -1
- package/dist/{namespace-CfgtqUWS.d.mts → namespace-BoA6u44C.d.mts} +156 -156
- package/dist/{namespace-D3SQQgxa2.d.mts → namespace-CukqFYHf2.d.mts} +1 -1
- package/dist/{namespace-CQBSXm1U.d.mts → namespace-TLkZRkcU.d.mts} +20 -20
- package/dist/{namespace-CpyL93kW.d.mts → namespace-dgNmx9g3.d.mts} +27 -27
- package/dist/{namespace-CGgOLxiW2.d.mts → namespace-rO-C2Dgu2.d.mts} +2 -2
- package/dist/{native-session-supervisor-CdtVGWA9.mjs → native-session-supervisor-Bgz-Q1WH.mjs} +1 -1
- package/dist/package-BYpWkSuQ.mjs +1 -0
- package/dist/package-CsFFT9iR.mjs +7 -0
- package/dist/{package-CdBiknf3.d.mts → package-DG9GSY8M.d.mts} +52 -1
- package/dist/package.json +1 -1
- package/dist/{profile-D2m94ZYD.mjs → profile-BRi6K6am.mjs} +1 -1
- package/dist/rules/index.mjs +1 -1
- package/dist/runtime-node/extension-validation.mjs +1 -1
- package/dist/runtime-node/index.d.mts +4 -89
- package/dist/runtime-node/index.mjs +24 -24
- package/dist/runtime-node/makaio-config.mjs +1 -1
- package/dist/runtime-node/workflow-worker/index.d.mts +2 -2
- package/dist/runtime-node/workflow-worker/index.mjs +1 -1
- package/dist/runtime-node/workflow-worker/worker-entry.mjs +1 -1
- package/dist/{schema-BnTOFCdU.d.mts → schema-CxN7d_MU.d.mts} +1 -1
- package/dist/{schemas--uwN5dfK2.d.mts → schemas-CIO03KSD2.d.mts} +11 -11
- package/dist/{schemas-n9Ff6_RX.mjs → schemas-DyJHJ8Pm.mjs} +1 -1
- package/dist/{schemas-C17AifUQ.d.mts → schemas-OaBqeEUT.d.mts} +156 -156
- package/dist/schemas-th_nuC5t.mjs +1 -0
- package/dist/semver-D3Y7uMEb.mjs +1 -0
- package/dist/service-base/index.d.mts +4 -3
- package/dist/service-base/index.mjs +1 -1
- package/dist/services/agent-runtime/index.d.mts +2 -2
- package/dist/services/agent-runtime/namespace.d.mts +1 -1
- package/dist/services/agent-runtime/schemas.d.mts +1 -1
- package/dist/services/execution-target/index.d.mts +1 -1
- package/dist/services/filesystem/namespace.d.mts +6 -6
- package/dist/services/filesystem/schemas.d.mts +3 -3
- package/dist/services/harness/index.d.mts +3 -3
- package/dist/services/index.d.mts +100 -100
- package/dist/services/index.mjs +1 -1
- package/dist/services/session/index.d.mts +5 -5
- package/dist/services/session/messages/namespace.d.mts +1 -1
- package/dist/services/session/session-events/namespace.d.mts +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/settings/namespace.d.mts +8 -8
- package/dist/services/settings/storage/extension-configs/namespace.d.mts +3 -3
- package/dist/services/subagent/index.d.mts +2 -2
- package/dist/services/subagent/index.mjs +1 -1
- package/dist/services/subagent-template/index.d.mts +2 -2
- package/dist/services/subagent-template/namespace.d.mts +1 -1
- package/dist/services/subagent-template/schemas.d.mts +1 -1
- package/dist/services/tools/index.mjs +1 -1
- package/dist/{session-lRd8HZNZ.mjs → session-BxWogVkD.mjs} +1 -1
- package/dist/storage/drizzle/index.d.mts +8 -1
- package/dist/storage/drizzle/index.mjs +1 -1
- package/dist/tools/index.d.mts +1 -1
- package/dist/{tools-C8vqn1KY.mjs → tools-PC_L6g2m.mjs} +1 -1
- package/dist/{transition-Bfe8VVc1.d.mts → transition-CwUIm1hJ.d.mts} +8 -0
- package/dist/{types-q95p55BF.d.mts → types-DQsYUZwa.d.mts} +578 -267
- package/dist/ui-components/index.d.mts +4 -4
- package/dist/{version-C1-VD-XL.mjs → version-BbWrAPld.mjs} +1 -1
- package/dist/workflow-DFJYGjq_.mjs +1 -0
- package/dist/workflow-engine/index.d.mts +670 -67
- 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/dist/workflow-worker-BEFjCccX.mjs +1 -0
- package/package.json +10 -9
- package/dist/loop-gate-handlers-0a3dIY8O.mjs +0 -1
- package/dist/package-0gVhAVkO.mjs +0 -7
- package/dist/package-BwvGaKwn.mjs +0 -1
- package/dist/schemas-D6lj9NMg.mjs +0 -1
- package/dist/semver-BccS1s9R.mjs +0 -1
- package/dist/workflow-CvVAZ89A.mjs +0 -1
- package/dist/workflow-worker-CudfEstp.mjs +0 -1
- /package/dist/{await-trigger-D623tvig.mjs → await-trigger-DP-fTQc4.mjs} +0 -0
- /package/dist/{descriptor-to-package-D5SWf6TL.mjs → descriptor-to-package-Rs-OjOQU.mjs} +0 -0
- /package/dist/{esm-oHhRYTEn.mjs → esm-C_WW4-pP.mjs} +0 -0
|
@@ -3,10 +3,10 @@ import { s as AdapterProviderAuth$1 } from "./adapter-binding-DDUyv1JK.mjs";
|
|
|
3
3
|
import { A as VersionRange, O as VersionLiteral$1, r as ClientDefinition$1 } from "./definition-Cbl0k6Fc.mjs";
|
|
4
4
|
import { c as ProviderDefinitionInput$1, r as ProtocolId$1 } from "./definition-BsTlOz99.mjs";
|
|
5
5
|
import { t as RequiredTimeoutConfig } from "./index-Bv9lm0Kf.mjs";
|
|
6
|
-
import {
|
|
7
|
-
import { D as EntityUIConfig$1, I as FormFieldProps } from "./index-
|
|
8
|
-
import { n as ExtensionTransitionRulesContribution, t as ExtensionTransitionActionsContribution, y as WorkflowBlockCollection$1 } from "./transition-
|
|
9
|
-
import { l as FacetNamespaceDefinition } from "./index-
|
|
6
|
+
import { H as SessionMessage$1, b as SESSION_EVENT_TYPES, i as MakaioSessionEvent$1 } from "./types-DQsYUZwa.mjs";
|
|
7
|
+
import { D as EntityUIConfig$1, I as FormFieldProps } from "./index-Bbr5LEUc.mjs";
|
|
8
|
+
import { n as ExtensionTransitionRulesContribution, t as ExtensionTransitionActionsContribution, y as WorkflowBlockCollection$1 } from "./transition-CwUIm1hJ.mjs";
|
|
9
|
+
import { l as FacetNamespaceDefinition } from "./index-DHGW7dFf.mjs";
|
|
10
10
|
import { t as SurfaceBindingDefinition } from "./definition-Bj9Vr16H.mjs";
|
|
11
11
|
import { z } from "zod";
|
|
12
12
|
import { MakaioBusLike, PayloadFilter, RegistrableBusNamespaceDefinition, SubjectSchema } from "@makaio/framework/core";
|
|
@@ -1619,8 +1619,8 @@ declare const ExtensionWarningActionSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
1619
1619
|
* - `'degraded'` — the extension is operating in a degraded fallback mode.
|
|
1620
1620
|
*/
|
|
1621
1621
|
declare const ExtensionWarningSeveritySchema: z.ZodEnum<{
|
|
1622
|
-
degraded: "degraded";
|
|
1623
1622
|
info: "info";
|
|
1623
|
+
degraded: "degraded";
|
|
1624
1624
|
recommended: "recommended";
|
|
1625
1625
|
}>;
|
|
1626
1626
|
/**
|
|
@@ -1631,8 +1631,8 @@ declare const ExtensionWarningSeveritySchema: z.ZodEnum<{
|
|
|
1631
1631
|
*/
|
|
1632
1632
|
declare const ExtensionWarningSchema: z.ZodObject<{
|
|
1633
1633
|
severity: z.ZodEnum<{
|
|
1634
|
-
degraded: "degraded";
|
|
1635
1634
|
info: "info";
|
|
1635
|
+
degraded: "degraded";
|
|
1636
1636
|
recommended: "recommended";
|
|
1637
1637
|
}>;
|
|
1638
1638
|
title: z.ZodString;
|
|
@@ -1678,8 +1678,8 @@ declare const ExtensionWarningEntrySchema: z.ZodObject<{
|
|
|
1678
1678
|
extensionName: z.ZodString;
|
|
1679
1679
|
warnings: z.ZodArray<z.ZodObject<{
|
|
1680
1680
|
severity: z.ZodEnum<{
|
|
1681
|
-
degraded: "degraded";
|
|
1682
1681
|
info: "info";
|
|
1682
|
+
degraded: "degraded";
|
|
1683
1683
|
recommended: "recommended";
|
|
1684
1684
|
}>;
|
|
1685
1685
|
title: z.ZodString;
|
|
@@ -1829,6 +1829,8 @@ interface ExtensionContext$1<TBus extends MakaioBusLike = MakaioBusLike> {
|
|
|
1829
1829
|
* host-agnostic extensions can type themselves against {@link ExtensionContext}.
|
|
1830
1830
|
*/
|
|
1831
1831
|
interface NodeExtensionContext$1<TBus extends MakaioBusLike = MakaioBusLike> extends ExtensionContext$1<TBus> {
|
|
1832
|
+
/** Working directory selected by the Node host for relative filesystem operations. */
|
|
1833
|
+
readonly cwd?: string;
|
|
1832
1834
|
/** Current platform identifier (e.g., `'darwin'`, `'linux'`, `'win32'`). */
|
|
1833
1835
|
readonly platform: NodeJS.Platform;
|
|
1834
1836
|
/** User's home directory path. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as CliContribution } from "./types-CrJ7KEZ0.mjs";
|
|
2
|
-
import { c as ExtensionInfo } from "./index-
|
|
2
|
+
import { c as ExtensionInfo } from "./index-CMTNBuo6.mjs";
|
|
3
3
|
import { r as WindowRegistry } from "./window-registry-WsWu-rcK.mjs";
|
|
4
4
|
import { IMakaioBus } from "@makaio/framework/bus";
|
|
5
5
|
import { ExtensionContributionProcessor, ExtensionService, ExtensionToken, MakaioExtension, NodeExtensionContext, StorageDialect, TrayManifest, VersionLiteral } from "@makaio/framework/contracts";
|
|
@@ -41,9 +41,9 @@ declare const StructuredOutputValidationErrorSchema: z.ZodObject<{
|
|
|
41
41
|
* - `enforced` – A structured-output enforcement handler produced conformant output.
|
|
42
42
|
*/
|
|
43
43
|
declare const StructuredOutputValidationStatusSchema: z.ZodEnum<{
|
|
44
|
-
failed: "failed";
|
|
45
44
|
passed: "passed";
|
|
46
45
|
enforced: "enforced";
|
|
46
|
+
failed: "failed";
|
|
47
47
|
}>;
|
|
48
48
|
/**
|
|
49
49
|
* Full validation result emitted after a turn completes when a
|
|
@@ -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 { CompletionMode, MakaioNodeExtension, PendingRequest, SubagentConfig, SubagentConstraints, SubagentStatus } from "@makaio/framework/contracts";
|
|
4
|
+
import { AwaitSubagentResponse, 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
|
|
@@ -49,9 +49,12 @@ declare class SubagentFailureFinalizationError extends Error {
|
|
|
49
49
|
declare class SubagentService extends BaseService {
|
|
50
50
|
private readonly machineId?;
|
|
51
51
|
private readonly delegationAllowSet;
|
|
52
|
+
private readonly requestHandlerPriority;
|
|
53
|
+
private readonly executionOwnerId;
|
|
52
54
|
/** Manager is now private - tools use RPCs to interact with state */
|
|
53
55
|
private readonly manager;
|
|
54
56
|
private readonly pendingChildSessionClose;
|
|
57
|
+
private readonly spawningExecutions;
|
|
55
58
|
/**
|
|
56
59
|
* Creates a new SubagentService instance.
|
|
57
60
|
* @param bus - The event bus for inter-service communication
|
|
@@ -61,8 +64,10 @@ declare class SubagentService extends BaseService {
|
|
|
61
64
|
* spawn or execute on this node from a remote origin. Authenticated
|
|
62
65
|
* `workflow-execution` peers are allowed by identity; this set is for
|
|
63
66
|
* additional delegated peer kinds.
|
|
67
|
+
* @param requestHandlerPriority - Priority for runtime-owned subagent lifecycle RPCs.
|
|
68
|
+
* @param executionOwnerId - Stable identity used to bind spawned execution to this service instance.
|
|
64
69
|
*/
|
|
65
|
-
constructor(bus?: IMakaioBus, constraints?: SubagentConstraints, machineId?: string | undefined, delegationAllowSet?: SpawnDelegationAllowSet);
|
|
70
|
+
constructor(bus?: IMakaioBus, constraints?: SubagentConstraints, machineId?: string | undefined, delegationAllowSet?: SpawnDelegationAllowSet, requestHandlerPriority?: number, executionOwnerId?: string);
|
|
66
71
|
/**
|
|
67
72
|
* Grant an authenticated peer permission to delegate spawn/execute requests.
|
|
68
73
|
*
|
|
@@ -103,13 +108,22 @@ declare class SubagentService extends BaseService {
|
|
|
103
108
|
* @returns Error message on failure, undefined on success
|
|
104
109
|
*/
|
|
105
110
|
private handleSpawned;
|
|
111
|
+
/**
|
|
112
|
+
* Execute the single claimed spawn event for one subagent.
|
|
113
|
+
* @param payload - Spawned event payload.
|
|
114
|
+
* @param parentSessionId - Parent session that requested the subagent.
|
|
115
|
+
* @param task - Task sent to the child agent.
|
|
116
|
+
* @param spawningToolCallId - Tool call that initiated the spawn, if available.
|
|
117
|
+
* @returns Error message on failure, otherwise undefined.
|
|
118
|
+
*/
|
|
119
|
+
private executeSpawned;
|
|
106
120
|
/**
|
|
107
121
|
* Creates the child session and updates tracked subagent state.
|
|
108
122
|
* @param subagentId - Subagent identifier
|
|
109
123
|
* @param parentSessionId - Parent session identifier
|
|
110
124
|
* @param config - Parsed subagent config
|
|
111
125
|
* @param executionTargetId - Resolved execution target ID
|
|
112
|
-
* @param resolutionParams -
|
|
126
|
+
* @param resolutionParams - Parent-derived execution target and working-directory fields
|
|
113
127
|
* @param spawningToolCallId - Tool call ID that triggered the spawn, if available
|
|
114
128
|
* @returns Created child session ID
|
|
115
129
|
*/
|
|
@@ -120,6 +134,7 @@ declare class SubagentService extends BaseService {
|
|
|
120
134
|
* @param config - Parsed subagent config
|
|
121
135
|
* @param sessionId - Child session ID
|
|
122
136
|
* @param task - Initial task message
|
|
137
|
+
* @param targetWorkingDirectory - Parent-derived adapter working directory, when present.
|
|
123
138
|
* @returns Resolves when adapter start succeeds
|
|
124
139
|
* @throws Error when adapter startup fails
|
|
125
140
|
*/
|
|
@@ -139,7 +154,7 @@ declare class SubagentService extends BaseService {
|
|
|
139
154
|
*
|
|
140
155
|
* Priority:
|
|
141
156
|
* 1. Explicit subagent `executionTargetId`
|
|
142
|
-
* 2. Parent session stamped target +
|
|
157
|
+
* 2. Parent session stamped target + working directory
|
|
143
158
|
* @param parentSessionId - Parent session used as fallback context.
|
|
144
159
|
* @param executionTargetId - Optional explicit target override from subagent config.
|
|
145
160
|
* @returns Resolution parameters for `ExecutionTargetSubjects.resolve`.
|
|
@@ -154,6 +169,7 @@ declare class SubagentService extends BaseService {
|
|
|
154
169
|
* @param parentSessionId - Parent session identifier from the spawn request
|
|
155
170
|
* @param config - Parsed subagent config
|
|
156
171
|
* @param executionTargetId - Resolved execution target to stamp on child session
|
|
172
|
+
* @param targetWorkingDirectory - Parent working directory inherited by the child session
|
|
157
173
|
* @param spawningToolCallId - Tool call ID that triggered the spawn, if available
|
|
158
174
|
* @returns Session.create payload for the child session
|
|
159
175
|
*/
|
|
@@ -254,7 +270,10 @@ declare const SubagentServiceToken: _$_makaio_contracts0.ExtensionToken<Subagent
|
|
|
254
270
|
* The services-core manifest intentionally uses a service-specific export
|
|
255
271
|
* name; `@makaio/extension-subagent` continues to own the tool-extension
|
|
256
272
|
* `subagentPackage` export.
|
|
273
|
+
* @param requestHandlerPriority - Priority for runtime-owned lifecycle RPC handlers.
|
|
274
|
+
* @returns A subagent service package configured with the requested dispatch priority.
|
|
257
275
|
*/
|
|
276
|
+
declare function createSubagentServicePackage(requestHandlerPriority?: number): MakaioNodeExtension<IMakaioBus>;
|
|
258
277
|
declare const subagentServicePackage: MakaioNodeExtension<IMakaioBus>;
|
|
259
278
|
//#endregion
|
|
260
279
|
//#region services/core/src/subagent/utils/ring-buffer.d.ts
|
|
@@ -339,6 +358,8 @@ interface TrackedSubagent {
|
|
|
339
358
|
* - `'turn'` — first completed agent turn was used as the result.
|
|
340
359
|
*/
|
|
341
360
|
completionSource?: CompletionMode;
|
|
361
|
+
/** Tool outcomes observed directly from the child session runtime. */
|
|
362
|
+
toolObservations: NonNullable<AwaitSubagentResponse['toolObservations']>;
|
|
342
363
|
/** Timestamp when the subagent was spawned. */
|
|
343
364
|
startTime: number;
|
|
344
365
|
/** Timestamp when the subagent reached a terminal state. */
|
|
@@ -372,6 +393,7 @@ interface AwaitResult {
|
|
|
372
393
|
* - `'turn'` — first completed agent turn was used as the result.
|
|
373
394
|
*/
|
|
374
395
|
completionSource?: CompletionMode;
|
|
396
|
+
toolObservations?: NonNullable<AwaitSubagentResponse['toolObservations']>;
|
|
375
397
|
}
|
|
376
398
|
//#endregion
|
|
377
399
|
//#region services/core/src/subagent/manager/subagent-manager.d.ts
|
|
@@ -423,6 +445,12 @@ declare class SubagentManager {
|
|
|
423
445
|
* @returns The tracked subagent, or undefined if not found
|
|
424
446
|
*/
|
|
425
447
|
get(subagentId: string): TrackedSubagent | undefined;
|
|
448
|
+
/**
|
|
449
|
+
* Record one authoritative child-session tool outcome for terminal handoff.
|
|
450
|
+
* @param childSessionId - Child session whose runtime emitted the outcome.
|
|
451
|
+
* @param observation - Validated outcome and optional authoritative Artifact identity.
|
|
452
|
+
*/
|
|
453
|
+
recordToolObservation(childSessionId: string, observation: TrackedSubagent['toolObservations'][number]): void;
|
|
426
454
|
/**
|
|
427
455
|
* Return all non-terminal subagents as an array.
|
|
428
456
|
*
|
|
@@ -539,4 +567,4 @@ declare class SubagentManager {
|
|
|
539
567
|
sweepHung(inactivityTimeoutMs: number): number;
|
|
540
568
|
}
|
|
541
569
|
//#endregion
|
|
542
|
-
export { InternalPendingRequest as a, SubagentServiceToken as c,
|
|
570
|
+
export { InternalPendingRequest as a, SubagentServiceToken as c, SubagentFailureFinalizationError as d, SubagentFailureFinalizationErrorCode as f, isPeerAuthorizedToDelegate as h, InputResolver as i, createSubagentServicePackage as l, SpawnDelegationAllowSet as m, TrackOptions as n, SpawnOptions as o, SubagentService as p, AwaitResult as r, TrackedSubagent as s, SubagentManager as t, subagentServicePackage as u };
|
|
@@ -4,15 +4,106 @@ import { BusTransport, IMakaioBus, SubjectTelemetryProjectorRegistry } from "@ma
|
|
|
4
4
|
import { ExtensionConfigProvider, IWorkerNodeProvider, IWorkflowRunner, IWorkflowRunner as IWorkflowRunner$1, LoopGateHandler, NormalizedWorkerNodeCapabilities, StationHandler, StepRunnerBusAuth, StepRunnerPlatformDefaults, TrayManifest, WorkerContributionManifest, WorkerNodeCapabilities, WorkerNodeDispatch, WorkerNodeHandle, WorkerNodeProvisionRequest, WorkerNodeRequirements, WorkflowDefinition, WorkflowRunResult, WorkflowRunResult as WorkflowRunResult$1, WorkflowRunnerRunOptions, WorkflowWorkerConfig, WorkflowWorkerSource, WorkflowZodSchemas } from "@makaio/framework/contracts";
|
|
5
5
|
import { DispatchingAuth, TransportAuth } from "@makaio/framework/node/transports";
|
|
6
6
|
import { StorageEngine } from "@makaio/framework/storage/drizzle";
|
|
7
|
+
import { Toolset } from "@makaio/framework/tools";
|
|
7
8
|
import { ContributionProcessor, ExtensionCoordinator, ExtensionRuntimeSurface, KernelExtensionContext, KernelMakaioExtension, RuntimeCapability, TransportProvider, WindowRegistry } from "@makaio/framework/kernel";
|
|
8
9
|
import { IAdapterConfigRepository } from "@makaio/framework/services/adapter-subsystem";
|
|
9
10
|
import { PostInstallHandler, StrategyDependencies } from "@makaio/framework/clients";
|
|
10
11
|
import { DatabaseClient } from "@makaio/framework/storage/drizzle/client";
|
|
12
|
+
import { IAdapterConfigRepository as IAdapterConfigRepository$1, PlatformDefaults, createAdapterSubsystemPackage } from "@makaio/framework/adapter-subsystem";
|
|
11
13
|
import { PersistedMachineIdentity } from "@makaio/framework/node/machine-identity";
|
|
12
14
|
import { Hono } from "hono";
|
|
13
15
|
import { ConfigProvider } from "@makaio/framework/providers";
|
|
14
16
|
import { Server } from "node:http";
|
|
15
17
|
|
|
18
|
+
//#region runtimes/node/src/compose-adapter-runtime.d.ts
|
|
19
|
+
/**
|
|
20
|
+
* Composition seam for booting a local adapter runtime.
|
|
21
|
+
*
|
|
22
|
+
* Encapsulates the proven host sequence for making `adapter.*` execution
|
|
23
|
+
* subjects locally owned, so every adapter-capable runtime composes it the
|
|
24
|
+
* same way instead of reinventing it. There are two phases because the kernel
|
|
25
|
+
* lifecycle requires it:
|
|
26
|
+
*
|
|
27
|
+
* 1. {@link prepareAdapterRuntime} — call **before** `coordinator.startAll()`:
|
|
28
|
+
* builds the adapter-subsystem package (add it to the coordinator load set)
|
|
29
|
+
* and registers the adapter contribution processor so adapter contributions
|
|
30
|
+
* are awaited during activation.
|
|
31
|
+
* 2. {@link activateAdapterRuntimeIdentity} — call **after** `coordinator.startAll()`:
|
|
32
|
+
* registers the adapter-runtime identity handlers and the adapter-name
|
|
33
|
+
* resolver, which resolve `adapterName` to the deterministic adapter id that
|
|
34
|
+
* live `AIAdapter` instances filter `AdapterSubjects.startAgent` on.
|
|
35
|
+
*
|
|
36
|
+
* The locality invariant this seam upholds: the `currentMachineId` passed to
|
|
37
|
+
* {@link activateAdapterRuntimeIdentity} MUST be the same machine id the
|
|
38
|
+
* coordinator injects as `extensionContextBase.machineId` (and therefore the
|
|
39
|
+
* id `AdapterSubsystemService` and `SubagentService` derive adapter ids from).
|
|
40
|
+
* If they diverge, `AdapterRuntimeSubjects.resolveId` yields an id no local
|
|
41
|
+
* adapter listens on and `startAgent` silently falls through to the transport.
|
|
42
|
+
*/
|
|
43
|
+
/** Input for {@link prepareAdapterRuntime} (the pre-`startAll` phase). */
|
|
44
|
+
interface PrepareAdapterRuntimeInput {
|
|
45
|
+
/** Coordinator that loads the adapter-subsystem package and owns activation. */
|
|
46
|
+
readonly coordinator: ExtensionCoordinator;
|
|
47
|
+
/** Persistence seam for adapter/provider configuration. */
|
|
48
|
+
readonly configRepository: IAdapterConfigRepository$1;
|
|
49
|
+
/** Platform defaults (cwd/env) supplied to adapter instances. */
|
|
50
|
+
readonly platformDefaults: PlatformDefaults;
|
|
51
|
+
/** Trusted non-serializable auth preparer forwarded to every loaded adapter. */
|
|
52
|
+
readonly prepareAuthRuntime?: unknown;
|
|
53
|
+
/** Priority for runtime snapshot handlers relative to connected control-plane peers. */
|
|
54
|
+
readonly runtimeSnapshotHandlerPriority?: number;
|
|
55
|
+
/** Priority for provider/client definition reads backing local runtime snapshots. */
|
|
56
|
+
readonly runtimeDefinitionHandlerPriority?: number;
|
|
57
|
+
}
|
|
58
|
+
/** Result of {@link prepareAdapterRuntime}. */
|
|
59
|
+
interface PreparedAdapterRuntime {
|
|
60
|
+
/**
|
|
61
|
+
* The adapter-subsystem package. The caller MUST add this to the array passed
|
|
62
|
+
* to `coordinator.load(...)`; its `create` reads `ctx.machineId`, so adapter
|
|
63
|
+
* ids derive from the coordinator's machine id.
|
|
64
|
+
*/
|
|
65
|
+
readonly adapterSubsystemPackage: ReturnType<typeof createAdapterSubsystemPackage>;
|
|
66
|
+
}
|
|
67
|
+
/** Input for {@link activateAdapterRuntimeIdentity} (the post-`startAll` phase). */
|
|
68
|
+
interface ActivateAdapterRuntimeIdentityInput {
|
|
69
|
+
/** Bus the identity handlers and name resolver are registered on. */
|
|
70
|
+
readonly bus: IMakaioBus;
|
|
71
|
+
/**
|
|
72
|
+
* The runtime's machine id. MUST equal the coordinator's
|
|
73
|
+
* `extensionContextBase.machineId` (see the locality invariant above).
|
|
74
|
+
*/
|
|
75
|
+
readonly currentMachineId: string;
|
|
76
|
+
/**
|
|
77
|
+
* Optional override for enumerating known adapter names. Defaults to querying
|
|
78
|
+
* `AdapterSubsystemSubjects.listAdapterConfigs` on the bus, matching the host.
|
|
79
|
+
*/
|
|
80
|
+
readonly listKnownAdapterNames?: () => Promise<Iterable<string>>;
|
|
81
|
+
}
|
|
82
|
+
/** Result of {@link activateAdapterRuntimeIdentity}. */
|
|
83
|
+
interface ActivatedAdapterRuntimeIdentity {
|
|
84
|
+
/** Tear down the identity handlers and the adapter-name resolver. */
|
|
85
|
+
readonly cleanup: () => void;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Build the adapter-subsystem package and register its contribution processor.
|
|
89
|
+
*
|
|
90
|
+
* Call before `coordinator.startAll()`. Registering the contribution processor
|
|
91
|
+
* only stores it for use during activation, so it is order-independent relative
|
|
92
|
+
* to `coordinator.load(...)` as long as it happens before `startAll()`.
|
|
93
|
+
* @param input - Coordinator, config repository, and platform defaults.
|
|
94
|
+
* @returns The adapter-subsystem package to add to the coordinator load set.
|
|
95
|
+
*/
|
|
96
|
+
declare function prepareAdapterRuntime(input: PrepareAdapterRuntimeInput): PreparedAdapterRuntime;
|
|
97
|
+
/**
|
|
98
|
+
* Register the adapter-runtime identity handlers and adapter-name resolver.
|
|
99
|
+
*
|
|
100
|
+
* Call after `coordinator.startAll()` so that `CapabilityService` and the
|
|
101
|
+
* adapter subsystem have registered their handlers.
|
|
102
|
+
* @param input - Bus, the runtime machine id, and an optional name enumerator.
|
|
103
|
+
* @returns A cleanup that tears both registrations down.
|
|
104
|
+
*/
|
|
105
|
+
declare function activateAdapterRuntimeIdentity(input: ActivateAdapterRuntimeIdentityInput): ActivatedAdapterRuntimeIdentity;
|
|
106
|
+
//#endregion
|
|
16
107
|
//#region runtimes/node/src/hono-route-graph.d.ts
|
|
17
108
|
/**
|
|
18
109
|
* Options for {@link createHonoRouteGraph}.
|
|
@@ -1262,6 +1353,63 @@ declare class InProcessWorkflowRunner implements IWorkflowRunner {
|
|
|
1262
1353
|
run(config: WorkflowWorkerConfig, signal: AbortSignal, _manifest?: WorkerContributionManifest): Promise<WorkflowRunResult>;
|
|
1263
1354
|
}
|
|
1264
1355
|
//#endregion
|
|
1356
|
+
//#region runtimes/node/src/workflow-worker/isolated-workflow-runtime.d.ts
|
|
1357
|
+
/** Connect an isolated runtime bus to its authenticated authority. */
|
|
1358
|
+
type WorkflowRuntimeAuthorityConnector = (bus: IMakaioBus) => Promise<void>;
|
|
1359
|
+
/** Discover runtime contributions after the authority connection is authenticated. */
|
|
1360
|
+
type WorkflowRuntimeContributionLoader = (bus: IMakaioBus) => Promise<readonly KernelMakaioExtension[]>;
|
|
1361
|
+
/** Node host context supplied by the runtime composition root. */
|
|
1362
|
+
interface IsolatedWorkflowRuntimeContext {
|
|
1363
|
+
/** Working directory exposed to adapters and contributed packages. */
|
|
1364
|
+
readonly cwd: string;
|
|
1365
|
+
/** Current platform identifier. */
|
|
1366
|
+
readonly platform: NodeJS.Platform;
|
|
1367
|
+
/** User's home directory path. */
|
|
1368
|
+
readonly homedir: string;
|
|
1369
|
+
/** Resolved `.makaio` home directory. */
|
|
1370
|
+
readonly makaioHome: string;
|
|
1371
|
+
/** Current OS username. */
|
|
1372
|
+
readonly username: string;
|
|
1373
|
+
/** Stable runtime machine identity. */
|
|
1374
|
+
readonly machineId: string;
|
|
1375
|
+
}
|
|
1376
|
+
/** Inputs for composing an authority-backed isolated workflow runtime. */
|
|
1377
|
+
interface CreateIsolatedWorkflowRuntimeOptions {
|
|
1378
|
+
/** Connect the new bus to an already authenticated authority transport. */
|
|
1379
|
+
readonly connectAuthority: WorkflowRuntimeAuthorityConnector;
|
|
1380
|
+
/** Load authority-dependent contribution packages after authentication. */
|
|
1381
|
+
readonly loadContributedPackages?: WorkflowRuntimeContributionLoader;
|
|
1382
|
+
/** Exact extension packages contributed to this runtime. */
|
|
1383
|
+
readonly contributedPackages: readonly KernelMakaioExtension[];
|
|
1384
|
+
/** Adapter configuration persistence supplied by the authority host. */
|
|
1385
|
+
readonly configRepository: PrepareAdapterRuntimeInput['configRepository'];
|
|
1386
|
+
/** Trusted non-serializable adapter authentication preparer. */
|
|
1387
|
+
readonly prepareAuthRuntime?: PrepareAdapterRuntimeInput['prepareAuthRuntime'];
|
|
1388
|
+
/** Explicit Node host context for adapters and contributed packages. */
|
|
1389
|
+
readonly context: IsolatedWorkflowRuntimeContext;
|
|
1390
|
+
/** Toolsets explicitly authorized for this runtime. */
|
|
1391
|
+
readonly toolsets: readonly Toolset[];
|
|
1392
|
+
}
|
|
1393
|
+
/** Active isolated workflow runtime and its owned lifecycle. */
|
|
1394
|
+
interface IsolatedWorkflowRuntime {
|
|
1395
|
+
readonly bus: IMakaioBus;
|
|
1396
|
+
readonly coordinator: ExtensionCoordinator;
|
|
1397
|
+
readonly machineId: string;
|
|
1398
|
+
/** Release all runtime-owned resources in reverse startup order. */
|
|
1399
|
+
readonly shutdown: () => Promise<void>;
|
|
1400
|
+
}
|
|
1401
|
+
/**
|
|
1402
|
+
* Compose an isolated, authority-backed runtime for workflow agent steps.
|
|
1403
|
+
*
|
|
1404
|
+
* The runtime deliberately owns no database and installs no local storage
|
|
1405
|
+
* handlers. Session lifecycle and usage requests therefore cross the supplied
|
|
1406
|
+
* authenticated authority connection. Product bootstrap, package discovery,
|
|
1407
|
+
* relay policy, and worker-pool concerns remain with the caller.
|
|
1408
|
+
* @param options - Authority connection, packages, adapter preparation, host context, and tools.
|
|
1409
|
+
* @returns A started runtime with an idempotent shutdown handle.
|
|
1410
|
+
*/
|
|
1411
|
+
declare function createIsolatedWorkflowRuntime(options: CreateIsolatedWorkflowRuntimeOptions): Promise<IsolatedWorkflowRuntime>;
|
|
1412
|
+
//#endregion
|
|
1265
1413
|
//#region runtimes/node/src/workflow-worker/workflow-loader.d.ts
|
|
1266
1414
|
/**
|
|
1267
1415
|
* Resolve a {@link RuntimeLoadedWorkflow} from the parsed worker config.
|
|
@@ -1324,4 +1472,4 @@ declare function loadWorkflowModules(source: Exclude<WorkflowWorkerSource, {
|
|
|
1324
1472
|
*/
|
|
1325
1473
|
declare function loadWorkflowModule(source: WorkflowWorkerSource): Promise<RuntimeLoadedWorkflow>;
|
|
1326
1474
|
//#endregion
|
|
1327
|
-
export {
|
|
1475
|
+
export { HonoRouteGraph as $, TransportReadyInfo as A, HostCapabilityDeclaration as B, ThinWorkflowPiscinaRunnerOptions as C, CoreBootOptions as D, BootMakaioRuntimeOptions as E, resolveWorkflowWorkerEntry as F, FrameworkModuleResolver as G, selectFrameworkCorePackages as H, DatabaseBootOptions as I, resolveFrameworkSpecifier as J, NodeFrameworkModuleResolver as K, InitializeNodeDatabaseOptions as L, WorkflowRunnerBootOptions as M, WorkflowWorkerEntryMode as N, MakaioRuntime as O, WorkflowWorkerEntryResolverOptions as P, HttpRouteContribution as Q, InitializeNodeDatabaseResult as R, RuntimeLoadedWorkflow as S, BootCoordinatorSetupContext as T, ShutdownStep as U, normalizeNodeHostCapabilities as V, BridgeBrowserOptions as W, createHttpRouteGraphBuilder as X, HttpRouteGraphBuilder as Y, HttpContributionPhase as Z, NodeWorkflowRunnerPackageOptions as _, IsolatedWorkflowRuntime as a, PreparedAdapterRuntime as at, ThinWorkflowPiscinaRunner as b, WorkflowRuntimeContributionLoader as c, InProcessWorkflowRunnerOptions as d, HonoRouteGraphOptions as et, PiscinaThinWorkflowProvider as f, CreateNodeWorkflowRunnerPackageOptionsParams as g, WorkerNodeRunnerOptions as h, CreateIsolatedWorkflowRuntimeOptions as i, PrepareAdapterRuntimeInput as it, UpstreamTelemetryBootOptions as j, ServerTransportProvider as k, createIsolatedWorkflowRuntime as l, WorkerNodeRunner as m, loadWorkflowModules as n, ActivateAdapterRuntimeIdentityInput as nt, IsolatedWorkflowRuntimeContext as o, activateAdapterRuntimeIdentity as ot, PiscinaThinWorkflowProviderOptions as p, NoopFrameworkModuleResolver as q, loadWorkflowFromConfig as r, ActivatedAdapterRuntimeIdentity as rt, WorkflowRuntimeAuthorityConnector as s, prepareAdapterRuntime as st, loadWorkflowModule as t, createHonoRouteGraph as tt, InProcessWorkflowRunner as u, createNodeWorkflowRunner as v, WorkflowRunResult$1 as w, IWorkflowRunner$1 as x, createNodeWorkflowRunnerPackageOptions as y, initializeNodeDatabase as z };
|