@morty-build/cli 0.4.30 → 0.4.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/dist/{chunk-GHEGGHSY.js → chunk-2BCJPKKS.js} +7 -69
  2. package/dist/{chunk-GHEGGHSY.js.map → chunk-2BCJPKKS.js.map} +2 -2
  3. package/dist/{chunk-WEB2SWLO.js → chunk-NJGQCQZH.js} +2 -2
  4. package/dist/{chunk-WEB2SWLO.js.map → chunk-NJGQCQZH.js.map} +1 -1
  5. package/dist/{cli-M6DFM6EU.js → cli-QAJ4R3W4.js} +3 -3
  6. package/dist/cli.js +2 -2
  7. package/dist/engine/session/api/session-api.d.ts +0 -2
  8. package/dist/engine/session/api/session-api.d.ts.map +1 -1
  9. package/dist/engine/session/api/session-api.js.map +1 -1
  10. package/dist/engine/session/live/agent-session-restore.d.ts +0 -1
  11. package/dist/engine/session/live/agent-session-restore.d.ts.map +1 -1
  12. package/dist/engine/session/live/agent-session.d.ts +0 -2
  13. package/dist/engine/session/live/agent-session.d.ts.map +1 -1
  14. package/dist/engine/session/live/agent-session.js +4 -15
  15. package/dist/engine/session/live/agent-session.js.map +1 -1
  16. package/dist/engine/session/live/session-restore.d.ts.map +1 -1
  17. package/dist/engine/session/live/session-restore.js +0 -32
  18. package/dist/engine/session/live/session-restore.js.map +1 -1
  19. package/dist/engine/session/manager/session-manager.d.ts.map +1 -1
  20. package/dist/engine/session/manager/session-manager.js +0 -6
  21. package/dist/engine/session/manager/session-manager.js.map +1 -1
  22. package/dist/engine/session/prompt/execute-prompt.d.ts +1 -1
  23. package/dist/engine/session/prompt/execute-prompt.d.ts.map +1 -1
  24. package/dist/engine/session/prompt/execute-prompt.js +1 -4
  25. package/dist/engine/session/prompt/execute-prompt.js.map +1 -1
  26. package/dist/engine.js +2 -2
  27. package/package.json +1 -1
  28. /package/dist/{cli-M6DFM6EU.js.map → cli-QAJ4R3W4.js.map} +0 -0
@@ -3,7 +3,7 @@ import {
3
3
  __export,
4
4
  __using,
5
5
  package_default
6
- } from "./chunk-WEB2SWLO.js";
6
+ } from "./chunk-NJGQCQZH.js";
7
7
 
8
8
  // src/engine/runtime/relay/runtime-revocation.ts
9
9
  var runtimeRevocationCloseCode = 1008;
@@ -21334,10 +21334,6 @@ var SessionPromptDisposition = Object.freeze({
21334
21334
  Append: "append",
21335
21335
  Steer: "steer"
21336
21336
  });
21337
- var SessionHistoryPolicy = Object.freeze({
21338
- Eager: "eager",
21339
- ExecutionOnly: "execution-only"
21340
- });
21341
21337
  var MAX_PROMPT_LENGTH = 1e5;
21342
21338
  var MAX_PROMPT_ATTACHMENT_BYTES = 32 * 1024 * 1024;
21343
21339
  function decodeSessionCancelBeforeStartCommand(encoded) {
@@ -21401,7 +21397,6 @@ function decodeSessionPromptCommand(encoded) {
21401
21397
  commandId: readIdentifier(value, "commandId"),
21402
21398
  directoryId: readDirectoryIdentifier(value, "directoryId"),
21403
21399
  attachments,
21404
- historyPolicy: readHistoryPolicy(value),
21405
21400
  kind: SESSION_PROMPT_KIND,
21406
21401
  prompt,
21407
21402
  ...hasSessionConfigurations ? { sessionConfigurations } : {},
@@ -21409,13 +21404,6 @@ function decodeSessionPromptCommand(encoded) {
21409
21404
  ...placement
21410
21405
  };
21411
21406
  }
21412
- function readHistoryPolicy(value) {
21413
- const field = value["historyPolicy"];
21414
- if (field === SessionHistoryPolicy.Eager || field === SessionHistoryPolicy.ExecutionOnly) {
21415
- return field;
21416
- }
21417
- throw new ProtocolMessageError("Invalid value field: historyPolicy");
21418
- }
21419
21407
  function decodeSessionCancelCommand(encoded) {
21420
21408
  const value = parseJson(encoded);
21421
21409
  assertKind(value, SESSION_CANCEL_KIND);
@@ -90302,19 +90290,6 @@ var configurationRevision = (options) => {
90302
90290
  };
90303
90291
 
90304
90292
  // src/engine/session/live/session-restore.ts
90305
- function hasMethodNotFoundCode(cause) {
90306
- const visited = /* @__PURE__ */ new Set();
90307
- let current = cause;
90308
- while ((current instanceof Error || typeof current === "object" && current !== null) && !visited.has(current)) {
90309
- visited.add(current);
90310
- const code = Reflect.get(current, "code");
90311
- if (code === -32601 || code === "METHOD_NOT_FOUND" || code === "method_not_found") {
90312
- return true;
90313
- }
90314
- current = current instanceof Error ? current.cause : void 0;
90315
- }
90316
- return false;
90317
- }
90318
90293
  async function restoreSession(session, signal, recovery, origin) {
90319
90294
  if (origin !== void 0) {
90320
90295
  session.setSessionTitle(origin.title);
@@ -90370,9 +90345,6 @@ async function restoreSession(session, signal, recovery, origin) {
90370
90345
  }
90371
90346
  session.setPrompted(true);
90372
90347
  session.setRestored(true);
90373
- if (recovery.kind === "execution-only") {
90374
- session.startExecutionOnlyCapture();
90375
- }
90376
90348
  opened = forked;
90377
90349
  } else if (conversation !== void 0 && sameConversation(conversation)) {
90378
90350
  session.selectNativeSession(conversation.nativeSessionId);
@@ -90391,21 +90363,6 @@ async function restoreSession(session, signal, recovery, origin) {
90391
90363
  "session-load",
90392
90364
  async () => await session.openSessionWithReplay(signal)
90393
90365
  );
90394
- } else if (recovery.kind === "execution-only") {
90395
- try {
90396
- opened = await session.metrics.measure("session-resume", async () => await session.openSession(signal));
90397
- } catch (cause) {
90398
- signal.throwIfAborted();
90399
- if (cause instanceof AcpExecutionError && !hasMethodNotFoundCode(cause)) {
90400
- throw cause;
90401
- }
90402
- throw new AcpExecutionError(
90403
- "This Agent cannot continue a persisted session without replaying native history",
90404
- { cause },
90405
- "execution_only_unsupported"
90406
- );
90407
- }
90408
- session.startExecutionOnlyCapture();
90409
90366
  } else if (session.capabilities.resumeSession) {
90410
90367
  opened = await session.metrics.measure("session-resume", async () => await session.openSession(signal));
90411
90368
  } else if (session.capabilities.loadSession) {
@@ -90434,9 +90391,6 @@ async function restoreSession(session, signal, recovery, origin) {
90434
90391
  const created = await session.metrics.measure("session-new", async () => await session.createSession(signal));
90435
90392
  session.selectNativeSession(created.nativeSessionId);
90436
90393
  session.setNativeHistoryOwnership({ kind: "fresh-session" });
90437
- if (recovery.kind === "execution-only") {
90438
- session.startExecutionOnlyCapture();
90439
- }
90440
90394
  opened = created;
90441
90395
  }
90442
90396
  session.applySessionOpened(opened);
@@ -90738,16 +90692,6 @@ var AgentSession = class _AgentSession {
90738
90692
  }
90739
90693
  await this.#completedHistory(signal);
90740
90694
  };
90741
- /** Starts live event capture without asking the native Agent to replay its persisted history. */
90742
- startExecutionOnlyCapture = () => {
90743
- if (this.#sessionLoad.kind !== "not-requested") {
90744
- return;
90745
- }
90746
- this.#sessionLoad = {
90747
- history: new HistoryReplayCapture(this.#store.events, this.#mortySessionId),
90748
- kind: "execution-only"
90749
- };
90750
- };
90751
90695
  loadHistoryEvents = async (eventLimit, cursor, signal) => {
90752
90696
  if (!this.#capabilities.loadSession) {
90753
90697
  throw new AcpExecutionError(
@@ -90989,7 +90933,7 @@ var AgentSession = class _AgentSession {
90989
90933
  }
90990
90934
  };
90991
90935
  }
90992
- if (this.#capabilities.loadSession && this.#sessionLoad.kind !== "execution-only") {
90936
+ if (this.#capabilities.loadSession) {
90993
90937
  await this.#completedHistory(signal);
90994
90938
  }
90995
90939
  };
@@ -91167,14 +91111,14 @@ var AgentSession = class _AgentSession {
91167
91111
  await this.#interactions.respondElicitation(options);
91168
91112
  };
91169
91113
  recordControlEvent = async (event) => {
91170
- if (this.#sessionLoad.kind !== "loaded" && this.#sessionLoad.kind !== "execution-only") {
91114
+ if (this.#sessionLoad.kind !== "loaded") {
91171
91115
  return false;
91172
91116
  }
91173
91117
  await this.recordLifecycleEvent(event);
91174
91118
  return true;
91175
91119
  };
91176
91120
  recordLifecycleEvent = async (event) => {
91177
- if (event.type !== "lifecycle-metadata" || this.#sessionLoad.kind !== "loaded" && this.#sessionLoad.kind !== "execution-only") {
91121
+ if (event.type !== "lifecycle-metadata" || this.#sessionLoad.kind !== "loaded") {
91178
91122
  return;
91179
91123
  }
91180
91124
  const liveEvent2 = this.#sessionLoad.history.recordLifecycle(event);
@@ -91200,7 +91144,7 @@ var AgentSession = class _AgentSession {
91200
91144
  }
91201
91145
  if (this.#sessionLoad.kind === "capturing") {
91202
91146
  this.#sessionLoad.history.replay(event.payload);
91203
- } else if (this.#sessionLoad.kind === "loaded" || this.#sessionLoad.kind === "execution-only") {
91147
+ } else if (this.#sessionLoad.kind === "loaded") {
91204
91148
  await this.#sessionLoad.history.record(event.payload, async (liveEvent2) => {
91205
91149
  await this.#getObserver().onSessionEvent?.(liveEvent2);
91206
91150
  });
@@ -91851,9 +91795,6 @@ var SessionManager2 = class {
91851
91795
  }
91852
91796
  if (existing.usesEnvironment(options2.agent.environment)) {
91853
91797
  const runtime = await this.#currentSessionProcess(existing, options2, recovery);
91854
- if (recovery.kind === "execution-only") {
91855
- runtime.startExecutionOnlyCapture();
91856
- }
91857
91798
  this.#executionProcesses.touch(options2.sessionId, runtime);
91858
91799
  return runtime.prepared();
91859
91800
  }
@@ -92180,9 +92121,6 @@ var SessionManager2 = class {
92180
92121
  options2,
92181
92122
  options2.recovery ?? { kind: "interactive-only" }
92182
92123
  );
92183
- if (options2.recovery?.kind === "execution-only") {
92184
- runtime.startExecutionOnlyCapture();
92185
- }
92186
92124
  this.#executionProcesses.touch(options2.sessionId, runtime);
92187
92125
  return runtime;
92188
92126
  }
@@ -96454,7 +96392,7 @@ async function executePrompt({
96454
96392
  const appliedSettings = command2.sessionConfigurations === void 0 ? void 0 : agentForSessionConfiguration(agent2, command2.sessionConfigurations);
96455
96393
  const executionAgent = appliedSettings?.agent ?? agent2;
96456
96394
  const sessionConfigurations = appliedSettings?.sessionConfigurations;
96457
- const recovery = command2.historyPolicy === SessionHistoryPolicy.ExecutionOnly ? { kind: "execution-only" } : { kind: "interactive-only" };
96395
+ const recovery = { kind: "interactive-only" };
96458
96396
  const preparation = {
96459
96397
  adapter,
96460
96398
  ...externalizeSessionUpdate === void 0 ? {} : { externalizeSessionUpdate },
@@ -98405,4 +98343,4 @@ export {
98405
98343
  * MIT Licensed
98406
98344
  *)
98407
98345
  */
98408
- //# sourceMappingURL=chunk-GHEGGHSY.js.map
98346
+ //# sourceMappingURL=chunk-2BCJPKKS.js.map