@moxt-ai/mobius 0.0.429 → 0.0.430
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/{chunk-JRH5V326.js → chunk-6DTIQNQZ.js} +98 -14
- package/dist/{chunk-JRH5V326.js.map → chunk-6DTIQNQZ.js.map} +2 -2
- package/dist/{chunk-NRP5QMEO.js → chunk-BMTH2ZGL.js} +2 -2
- package/dist/{chunk-NRP5QMEO.js.map → chunk-BMTH2ZGL.js.map} +1 -1
- package/dist/{cli-B4BKARN2.js → cli-BSEEN4KA.js} +3 -3
- package/dist/cli.js +2 -2
- package/dist/engine/acp/adapter/codex/adapter.d.ts +0 -5
- package/dist/engine/acp/adapter/codex/adapter.d.ts.map +1 -1
- package/dist/engine/acp/adapter/codex/adapter.js +20 -0
- package/dist/engine/acp/adapter/codex/adapter.js.map +1 -1
- package/dist/engine/acp/adapter/codex/agent-connection.d.ts.map +1 -1
- package/dist/engine/acp/adapter/codex/agent-connection.js +1 -0
- package/dist/engine/acp/adapter/codex/agent-connection.js.map +1 -1
- package/dist/engine/acp/adapter/execution-connections.d.ts +3 -1
- package/dist/engine/acp/adapter/execution-connections.d.ts.map +1 -1
- package/dist/engine/acp/adapter/execution-connections.js +3 -0
- package/dist/engine/acp/adapter/execution-connections.js.map +1 -1
- package/dist/engine/acp/adapter/session-events.d.ts +3 -1
- package/dist/engine/acp/adapter/session-events.d.ts.map +1 -1
- package/dist/engine/acp/adapter/session-events.js +5 -0
- package/dist/engine/acp/adapter/session-events.js.map +1 -1
- package/dist/engine/acp/agent/in-process-endpoint.d.ts +7 -1
- package/dist/engine/acp/agent/in-process-endpoint.d.ts.map +1 -1
- package/dist/engine/acp/connection/agent-connection.d.ts +2 -1
- package/dist/engine/acp/connection/agent-connection.d.ts.map +1 -1
- package/dist/engine/acp/harness/codex/agent.d.ts.map +1 -1
- package/dist/engine/acp/harness/codex/agent.js +12 -3
- package/dist/engine/acp/harness/codex/agent.js.map +1 -1
- package/dist/engine/acp/harness/codex/borrowed-agent.d.ts +7 -2
- package/dist/engine/acp/harness/codex/borrowed-agent.d.ts.map +1 -1
- package/dist/engine/acp/harness/codex/borrowed-agent.js +33 -5
- package/dist/engine/acp/harness/codex/borrowed-agent.js.map +1 -1
- package/dist/engine/acp/harness/codex/owned-agent.d.ts +1 -0
- package/dist/engine/acp/harness/codex/owned-agent.d.ts.map +1 -1
- package/dist/engine/acp/harness/codex/owned-agent.js +1 -0
- package/dist/engine/acp/harness/codex/owned-agent.js.map +1 -1
- package/dist/engine/acp/harness/codex/session-agent.d.ts +2 -0
- package/dist/engine/acp/harness/codex/session-agent.d.ts.map +1 -1
- package/dist/engine/session/live/agent-session.d.ts.map +1 -1
- package/dist/engine/session/live/agent-session.js +22 -1
- package/dist/engine/session/live/agent-session.js.map +1 -1
- package/dist/engine.js +2 -2
- package/package.json +2 -2
- /package/dist/{cli-B4BKARN2.js.map → cli-BSEEN4KA.js.map} +0 -0
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
__export,
|
|
4
4
|
__using,
|
|
5
5
|
package_default
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-BMTH2ZGL.js";
|
|
7
7
|
|
|
8
8
|
// src/engine/runtime/relay/runtime-revocation.ts
|
|
9
9
|
var runtimeRevocationCloseCode = 1008;
|
|
@@ -20772,6 +20772,12 @@ var lifecycleMetadataSchema = external_exports.discriminatedUnion("kind", [
|
|
|
20772
20772
|
targetCommandId: identifierStringSchema.optional()
|
|
20773
20773
|
}).readonly(),
|
|
20774
20774
|
external_exports.object({ ...lifecycleBase, attemptId: identifierStringSchema, epoch: identifierStringSchema, kind: external_exports.literal("prompt.started") }).readonly(),
|
|
20775
|
+
// The Runtime did not run this prompt itself: it handed it to the native session's owner, another client of the
|
|
20776
|
+
// Agent such as the Codex app, which runs queued input on its own terms. `queued`: the owner holds the prompt and
|
|
20777
|
+
// may keep holding it; Codex pauses its queue after an interrupted turn until its user continues. `started`: the
|
|
20778
|
+
// owner began running it, so only the owner can stop it and cancelling it here leaves it running. Runtimes before
|
|
20779
|
+
// this event never delegate.
|
|
20780
|
+
external_exports.object({ ...lifecycleBase, kind: external_exports.literal("prompt.delegated"), stage: external_exports.enum(["queued", "started"]) }).readonly(),
|
|
20775
20781
|
promptCompletedSchema,
|
|
20776
20782
|
external_exports.object({
|
|
20777
20783
|
...lifecycleBase,
|
|
@@ -20789,6 +20795,7 @@ var isPromptTerminal = (payload) => {
|
|
|
20789
20795
|
return true;
|
|
20790
20796
|
case "prompt.requested":
|
|
20791
20797
|
case "prompt.started":
|
|
20798
|
+
case "prompt.delegated":
|
|
20792
20799
|
case "session.queue.changed":
|
|
20793
20800
|
case "session.permission.requested":
|
|
20794
20801
|
case "session.permission.resolved":
|
|
@@ -72783,19 +72790,26 @@ function waitForNextPoll(timer, signal) {
|
|
|
72783
72790
|
}
|
|
72784
72791
|
var CodexBorrowedAcpAgent = class {
|
|
72785
72792
|
steeringSupported = false;
|
|
72793
|
+
runsTurns = false;
|
|
72786
72794
|
#client;
|
|
72787
72795
|
#threadId;
|
|
72788
72796
|
#emit;
|
|
72797
|
+
#onDelegation;
|
|
72789
72798
|
#closed = new AbortController();
|
|
72790
72799
|
#seen = /* @__PURE__ */ new Map();
|
|
72791
72800
|
#pending = null;
|
|
72792
72801
|
#watch = null;
|
|
72793
72802
|
#lifecycle = { kind: "following" };
|
|
72794
|
-
constructor(client2, threadId, emit) {
|
|
72803
|
+
constructor(client2, threadId, emit, onDelegation) {
|
|
72795
72804
|
this.#client = client2;
|
|
72796
72805
|
this.#threadId = threadId;
|
|
72797
72806
|
this.#emit = emit;
|
|
72807
|
+
this.#onDelegation = onDelegation;
|
|
72798
72808
|
}
|
|
72809
|
+
#reportDelegation = async (pending, stage) => {
|
|
72810
|
+
pending.delegation = pending.delegation.then(async () => await this.#onDelegation(stage));
|
|
72811
|
+
await pending.delegation;
|
|
72812
|
+
};
|
|
72799
72813
|
initialize = async (signal) => {
|
|
72800
72814
|
queuePageSchema.parse(
|
|
72801
72815
|
await this.#client.request(
|
|
@@ -72884,7 +72898,11 @@ var CodexBorrowedAcpAgent = class {
|
|
|
72884
72898
|
const clientId = typeof raw === "object" && raw !== null ? Reflect.get(raw, "clientId") : void 0;
|
|
72885
72899
|
matches ||= clientId === this.#pending?.clientId;
|
|
72886
72900
|
if (this.#pending !== null && clientId === this.#pending.clientId) {
|
|
72901
|
+
const started = this.#pending.input.kind === "awaiting";
|
|
72887
72902
|
this.#pending.input = { kind: "identified", messageId: item.id };
|
|
72903
|
+
if (started) {
|
|
72904
|
+
await this.#reportDelegation(this.#pending, "started");
|
|
72905
|
+
}
|
|
72888
72906
|
}
|
|
72889
72907
|
const text2 = item.content.flatMap(
|
|
72890
72908
|
(block) => typeof block === "object" && block !== null && Reflect.get(block, "type") === "text" && typeof Reflect.get(block, "text") === "string" ? [String(Reflect.get(block, "text"))] : []
|
|
@@ -72959,7 +72977,8 @@ var CodexBorrowedAcpAgent = class {
|
|
|
72959
72977
|
clientId: randomUUID7(),
|
|
72960
72978
|
completion: Promise.withResolvers(),
|
|
72961
72979
|
settled: Promise.withResolvers(),
|
|
72962
|
-
input: { kind: "awaiting" }
|
|
72980
|
+
input: { kind: "awaiting" },
|
|
72981
|
+
delegation: Promise.resolve()
|
|
72963
72982
|
};
|
|
72964
72983
|
this.#pending = pending;
|
|
72965
72984
|
void pending.completion.promise.catch(() => {
|
|
@@ -72986,6 +73005,7 @@ var CodexBorrowedAcpAgent = class {
|
|
|
72986
73005
|
"invalid_native_session_response"
|
|
72987
73006
|
);
|
|
72988
73007
|
}
|
|
73008
|
+
await this.#reportDelegation(pending, "queued");
|
|
72989
73009
|
const result = await pending.completion.promise;
|
|
72990
73010
|
outcome = result.stopReason === "cancelled" ? "cancelled" : "completed";
|
|
72991
73011
|
return pending.input.kind === "identified" ? await promptResultWithMessageId2(Promise.resolve(result), pending.input.messageId) : result;
|
|
@@ -73007,6 +73027,7 @@ var CodexBorrowedAcpAgent = class {
|
|
|
73007
73027
|
pending.settled.resolve();
|
|
73008
73028
|
}
|
|
73009
73029
|
};
|
|
73030
|
+
/** Withdraws this client's submission while the owner has not taken it; false once the owner has. */
|
|
73010
73031
|
#removeQueuedInput = async (clientId) => {
|
|
73011
73032
|
const signal = AbortSignal.timeout(REQUEST_TIMEOUT);
|
|
73012
73033
|
let cursor = null;
|
|
@@ -73026,7 +73047,7 @@ var CodexBorrowedAcpAgent = class {
|
|
|
73026
73047
|
{ threadId: this.#threadId, queuedSubmissionId: queued.id },
|
|
73027
73048
|
signal
|
|
73028
73049
|
);
|
|
73029
|
-
return;
|
|
73050
|
+
return true;
|
|
73030
73051
|
}
|
|
73031
73052
|
}
|
|
73032
73053
|
cursor = page.nextCursor ?? null;
|
|
@@ -73037,6 +73058,7 @@ var CodexBorrowedAcpAgent = class {
|
|
|
73037
73058
|
cursors.add(cursor);
|
|
73038
73059
|
}
|
|
73039
73060
|
} while (cursor !== null);
|
|
73061
|
+
return false;
|
|
73040
73062
|
};
|
|
73041
73063
|
nativeTurnId = () => null;
|
|
73042
73064
|
steer = async (_params, signal) => {
|
|
@@ -73063,9 +73085,16 @@ var CodexBorrowedAcpAgent = class {
|
|
|
73063
73085
|
"native_session_unsupported"
|
|
73064
73086
|
);
|
|
73065
73087
|
};
|
|
73088
|
+
/**
|
|
73089
|
+
* Withdraws the prompt while it waits in the owner's queue. Once the owner runs it, only the owner can stop it,
|
|
73090
|
+
* so the prompt keeps running and following reports how the owner ends it.
|
|
73091
|
+
*/
|
|
73066
73092
|
cancel = async () => {
|
|
73067
73093
|
const pending = this.#pending;
|
|
73068
|
-
if (pending
|
|
73094
|
+
if (pending === null || pending.input.kind === "identified") {
|
|
73095
|
+
return;
|
|
73096
|
+
}
|
|
73097
|
+
if (await this.#removeQueuedInput(pending.clientId)) {
|
|
73069
73098
|
pending.completion.resolve({ stopReason: "cancelled" });
|
|
73070
73099
|
await pending.settled.promise;
|
|
73071
73100
|
}
|
|
@@ -73073,7 +73102,11 @@ var CodexBorrowedAcpAgent = class {
|
|
|
73073
73102
|
close = async () => {
|
|
73074
73103
|
this.#lifecycle = { kind: "closed" };
|
|
73075
73104
|
this.#closed.abort();
|
|
73076
|
-
|
|
73105
|
+
const pending = this.#pending;
|
|
73106
|
+
if (pending !== null) {
|
|
73107
|
+
pending.completion.resolve({ stopReason: "cancelled" });
|
|
73108
|
+
await pending.settled.promise;
|
|
73109
|
+
}
|
|
73077
73110
|
await this.#watch;
|
|
73078
73111
|
};
|
|
73079
73112
|
};
|
|
@@ -73412,6 +73445,7 @@ function userInputSchema(questions) {
|
|
|
73412
73445
|
}
|
|
73413
73446
|
var CodexOwnedAcpAgent = class {
|
|
73414
73447
|
steeringSupported = true;
|
|
73448
|
+
runsTurns = true;
|
|
73415
73449
|
#context;
|
|
73416
73450
|
#appServer;
|
|
73417
73451
|
#settings;
|
|
@@ -74622,11 +74656,13 @@ var CodexAcpAgent = class {
|
|
|
74622
74656
|
#settings;
|
|
74623
74657
|
#onSessionUpdate;
|
|
74624
74658
|
#onBackgroundActivity;
|
|
74659
|
+
#onPromptDelegation;
|
|
74625
74660
|
#nativeSessionId = "";
|
|
74626
74661
|
#sessionAgent;
|
|
74627
74662
|
constructor(options) {
|
|
74628
74663
|
this.#onSessionUpdate = options.onSessionUpdate;
|
|
74629
74664
|
this.#onBackgroundActivity = options.onBackgroundActivity;
|
|
74665
|
+
this.#onPromptDelegation = options.onPromptDelegation;
|
|
74630
74666
|
this.#appServer = new CodexAppServerClient({
|
|
74631
74667
|
command: options.command,
|
|
74632
74668
|
cwd: options.cwd,
|
|
@@ -74699,7 +74735,7 @@ var CodexAcpAgent = class {
|
|
|
74699
74735
|
await this.#replaySavedHistory(context.signal);
|
|
74700
74736
|
this.#advertiseCompactCommand();
|
|
74701
74737
|
return {
|
|
74702
|
-
_meta:
|
|
74738
|
+
_meta: this.#sessionMeta(),
|
|
74703
74739
|
configOptions: this.#settings.configOptions()
|
|
74704
74740
|
};
|
|
74705
74741
|
}).onRequest(methods.agent.session.fork, async (context) => {
|
|
@@ -74725,7 +74761,7 @@ var CodexAcpAgent = class {
|
|
|
74725
74761
|
await this.#resume(context.params.sessionId, context.params.cwd, context.signal);
|
|
74726
74762
|
this.#advertiseCompactCommand();
|
|
74727
74763
|
return {
|
|
74728
|
-
_meta:
|
|
74764
|
+
_meta: this.#sessionMeta(),
|
|
74729
74765
|
configOptions: this.#settings.configOptions()
|
|
74730
74766
|
};
|
|
74731
74767
|
}).onRequest(methods.agent.session.prompt, async (context) => {
|
|
@@ -74837,7 +74873,9 @@ var CodexAcpAgent = class {
|
|
|
74837
74873
|
AbortSignal.any([signal, AbortSignal.timeout(APPROVAL_TIMEOUT_MILLISECONDS3)])
|
|
74838
74874
|
)
|
|
74839
74875
|
);
|
|
74840
|
-
const queued = new CodexBorrowedAcpAgent(this.#appServer, threadId, this.#emit)
|
|
74876
|
+
const queued = new CodexBorrowedAcpAgent(this.#appServer, threadId, this.#emit, async (stage) => {
|
|
74877
|
+
await this.#onPromptDelegation?.(stage);
|
|
74878
|
+
});
|
|
74841
74879
|
await queued.initialize(signal);
|
|
74842
74880
|
this.#nativeSessionId = threadId;
|
|
74843
74881
|
this.#settings.selectRestoredThread({
|
|
@@ -74853,6 +74891,11 @@ var CodexAcpAgent = class {
|
|
|
74853
74891
|
this.#settings.selectRestoredThread(resumed);
|
|
74854
74892
|
await this.#settings.probeCollaborationMode(this.#nativeSessionId, signal);
|
|
74855
74893
|
};
|
|
74894
|
+
/** What the session response tells Mobius about the session behavior selected while opening it. */
|
|
74895
|
+
#sessionMeta = () => ({
|
|
74896
|
+
steering: { supported: this.#sessionAgent.steeringSupported },
|
|
74897
|
+
codex: { runsTurns: this.#sessionAgent.runsTurns }
|
|
74898
|
+
});
|
|
74856
74899
|
// ACP load requires chronological replay. Resume only restores execution;
|
|
74857
74900
|
// native pages supply history without a single full-transcript response.
|
|
74858
74901
|
#replaySavedHistory = async (signal) => {
|
|
@@ -74897,7 +74940,8 @@ var CodexAgentConnection = class extends EndpointAgentConnection {
|
|
|
74897
74940
|
cwd: options.cwd,
|
|
74898
74941
|
environment: options.environment,
|
|
74899
74942
|
onSessionUpdate: options.client.onUpdate,
|
|
74900
|
-
onBackgroundActivity: (activity) => options.onBackgroundActivity?.(activity)
|
|
74943
|
+
onBackgroundActivity: (activity) => options.onBackgroundActivity?.(activity),
|
|
74944
|
+
onPromptDelegation: async (stage) => await options.onPromptDelegation?.(stage)
|
|
74901
74945
|
});
|
|
74902
74946
|
super(endpoint, options.client);
|
|
74903
74947
|
}
|
|
@@ -80343,6 +80387,11 @@ var AdapterSessionConnection = class {
|
|
|
80343
80387
|
}
|
|
80344
80388
|
this.#backgroundActivity = activity;
|
|
80345
80389
|
this.#onBackgroundActivity(activity);
|
|
80390
|
+
},
|
|
80391
|
+
onPromptDelegation: async (stage) => {
|
|
80392
|
+
if (!this.#lifetime.signal.aborted) {
|
|
80393
|
+
await options.onPromptDelegation?.(stage);
|
|
80394
|
+
}
|
|
80346
80395
|
}
|
|
80347
80396
|
});
|
|
80348
80397
|
}
|
|
@@ -80522,6 +80571,7 @@ var AcpExecutionConnections = class {
|
|
|
80522
80571
|
...params.scope.externalizeUpdate === void 0 ? {} : { externalizeUpdate: params.scope.externalizeUpdate },
|
|
80523
80572
|
onEvent: (event) => params.onSessionEvent(connection.events.sessionId(), event),
|
|
80524
80573
|
...params.onBackgroundActivity === void 0 ? {} : { onBackgroundActivity: params.onBackgroundActivity },
|
|
80574
|
+
...params.onPromptDelegation === void 0 ? {} : { onPromptDelegation: params.onPromptDelegation },
|
|
80525
80575
|
interactions: params.interactions
|
|
80526
80576
|
},
|
|
80527
80577
|
this.#externalizer,
|
|
@@ -80594,6 +80644,8 @@ var AcpExecutionConnections = class {
|
|
|
80594
80644
|
}
|
|
80595
80645
|
return session;
|
|
80596
80646
|
};
|
|
80647
|
+
/** The open writer's connection for this native session, if any. */
|
|
80648
|
+
connection = (target) => this.#find(target)?.connection;
|
|
80597
80649
|
cancel = async ({ signal, ...target }) => {
|
|
80598
80650
|
const bounded = AbortSignal.any([signal, AbortSignal.timeout(3e4)]);
|
|
80599
80651
|
bounded.throwIfAborted();
|
|
@@ -87247,11 +87299,15 @@ function fitCodexToolEvent(event) {
|
|
|
87247
87299
|
}
|
|
87248
87300
|
|
|
87249
87301
|
// src/engine/acp/adapter/codex/adapter.ts
|
|
87302
|
+
var sessionTurnOwnershipSchema = external_exports.object({
|
|
87303
|
+
_meta: external_exports.object({ codex: external_exports.object({ runsTurns: external_exports.boolean() }).optional() }).optional()
|
|
87304
|
+
});
|
|
87250
87305
|
var CodexAdapter = class {
|
|
87251
87306
|
#agent;
|
|
87252
87307
|
#queryProcesses;
|
|
87253
87308
|
#connector;
|
|
87254
87309
|
#executionConnections;
|
|
87310
|
+
#queueingConnections = /* @__PURE__ */ new WeakSet();
|
|
87255
87311
|
#dependencies;
|
|
87256
87312
|
#contentExternalizer;
|
|
87257
87313
|
#previewCache = null;
|
|
@@ -87329,6 +87385,7 @@ var CodexAdapter = class {
|
|
|
87329
87385
|
"ACP agent exited while resuming a session",
|
|
87330
87386
|
signal
|
|
87331
87387
|
);
|
|
87388
|
+
this.#recordTurnOwnership(connection, response);
|
|
87332
87389
|
return normalizeOpenedSession(execution, nativeSessionId, response, signal);
|
|
87333
87390
|
});
|
|
87334
87391
|
openSessionWithReplay = (params) => this.#executionConnections.withConnection(this.#executionParams(params), async (execution, signal) => {
|
|
@@ -87345,12 +87402,23 @@ var CodexAdapter = class {
|
|
|
87345
87402
|
signal
|
|
87346
87403
|
);
|
|
87347
87404
|
await connection.race(connection.events.drained(), "ACP agent exited while loading a session", signal);
|
|
87405
|
+
this.#recordTurnOwnership(connection, response);
|
|
87348
87406
|
return normalizeOpenedSession(execution, nativeSessionId, response, signal);
|
|
87349
87407
|
});
|
|
87350
87408
|
cancel = async (params) => {
|
|
87409
|
+
const connection = this.#executionConnections.connection(params);
|
|
87410
|
+
if (connection !== void 0 && this.#queueingConnections.has(connection)) {
|
|
87411
|
+
return await this.#executionConnections.cancel(params);
|
|
87412
|
+
}
|
|
87351
87413
|
await this.#executionConnections.closeSession(params);
|
|
87352
87414
|
return "closed";
|
|
87353
87415
|
};
|
|
87416
|
+
/** A connection keeps the turn ownership its harness chose while opening the thread. */
|
|
87417
|
+
#recordTurnOwnership = (connection, response) => {
|
|
87418
|
+
if (sessionTurnOwnershipSchema.parse(response)._meta?.codex?.runsTurns === false) {
|
|
87419
|
+
this.#queueingConnections.add(connection);
|
|
87420
|
+
}
|
|
87421
|
+
};
|
|
87354
87422
|
closeSession = (...args) => this.#executionConnections.closeSession(...args);
|
|
87355
87423
|
releaseSession = (params) => this.#executionConnections.releaseSession(params);
|
|
87356
87424
|
// Codex admits one active writer per thread; another client borrows the thread instead.
|
|
@@ -89997,6 +90065,8 @@ var AgentSession = class _AgentSession {
|
|
|
89997
90065
|
}
|
|
89998
90066
|
hasBackgroundActivity = () => this.#backgroundActivity !== "none";
|
|
89999
90067
|
#backgroundActivity = "none";
|
|
90068
|
+
/** The command whose prompt the Agent is running, which only the Agent can report as delegated. */
|
|
90069
|
+
#delegableCommandId = null;
|
|
90000
90070
|
#modelEffort = null;
|
|
90001
90071
|
#scope;
|
|
90002
90072
|
#subscriber;
|
|
@@ -90076,6 +90146,15 @@ var AgentSession = class _AgentSession {
|
|
|
90076
90146
|
void this.#recordNativeHistoryRevision();
|
|
90077
90147
|
}
|
|
90078
90148
|
},
|
|
90149
|
+
onPromptDelegation: async (stage) => {
|
|
90150
|
+
const commandId = this.#delegableCommandId;
|
|
90151
|
+
if (commandId !== null) {
|
|
90152
|
+
await this.recordLifecycleEvent({
|
|
90153
|
+
payload: { commandId, kind: "prompt.delegated", stage },
|
|
90154
|
+
type: "lifecycle-metadata"
|
|
90155
|
+
});
|
|
90156
|
+
}
|
|
90157
|
+
},
|
|
90079
90158
|
interactions: {
|
|
90080
90159
|
onPermission: this.#interactions.onPermission,
|
|
90081
90160
|
onElicitation: this.#interactions.onElicitation,
|
|
@@ -90527,10 +90606,15 @@ var AgentSession = class _AgentSession {
|
|
|
90527
90606
|
type: "lifecycle-metadata"
|
|
90528
90607
|
});
|
|
90529
90608
|
}
|
|
90609
|
+
this.#delegableCommandId = lifecycle === void 0 ? null : options.commandId;
|
|
90530
90610
|
try {
|
|
90531
|
-
const result = await this.#writeNativeHistory(
|
|
90532
|
-
|
|
90533
|
-
|
|
90611
|
+
const result = await this.#writeNativeHistory(async () => {
|
|
90612
|
+
try {
|
|
90613
|
+
return await this.#adapter.prompt({ ...this.#target(), content: options, signal: options.signal });
|
|
90614
|
+
} finally {
|
|
90615
|
+
this.#delegableCommandId = null;
|
|
90616
|
+
}
|
|
90617
|
+
});
|
|
90534
90618
|
this.writeStoredSession((/* @__PURE__ */ new Date()).toISOString());
|
|
90535
90619
|
if (lifecycle !== void 0) {
|
|
90536
90620
|
const messageId = result._meta?.messageId;
|
|
@@ -97749,4 +97833,4 @@ export {
|
|
|
97749
97833
|
* MIT Licensed
|
|
97750
97834
|
*)
|
|
97751
97835
|
*/
|
|
97752
|
-
//# sourceMappingURL=chunk-
|
|
97836
|
+
//# sourceMappingURL=chunk-6DTIQNQZ.js.map
|