@agentproto/runtime 5.8.0 → 5.9.0
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/catalog-models.mjs +38 -2
- package/dist/catalog-models.mjs.map +1 -1
- package/dist/config-schema.mjs +13 -0
- package/dist/config-schema.mjs.map +1 -1
- package/dist/config.mjs +13 -0
- package/dist/config.mjs.map +1 -1
- package/dist/index.d.ts +761 -60
- package/dist/index.mjs +1225 -217
- package/dist/index.mjs.map +1 -1
- package/dist/resume-strategies.d.ts +22 -1
- package/dist/resume-strategies.mjs +2 -1
- package/dist/resume-strategies.mjs.map +1 -1
- package/dist/session-presence.mjs +13 -0
- package/dist/session-presence.mjs.map +1 -1
- package/dist/{sessions-SrISpFsH.d.ts → sessions-Cse9PhLG.d.ts} +102 -6
- package/dist/user-presets.d.ts +1 -1
- package/package.json +9 -9
|
@@ -182,6 +182,27 @@ declare function decideRestartStrategy(prev: RestartCandidate, opts?: DecideRest
|
|
|
182
182
|
* this module's own header comment on why that matters).
|
|
183
183
|
*/
|
|
184
184
|
declare const RESUME_ID_REJECTED_RE: RegExp;
|
|
185
|
+
/**
|
|
186
|
+
* Matches the OTHER way a resume attempt dies: the freshly-spawned adapter
|
|
187
|
+
* took its transport down while the resume RPC was still in flight, so the
|
|
188
|
+
* ACP SDK rejected the pending `session/load` with its connection-close
|
|
189
|
+
* error instead of a protocol-level answer.
|
|
190
|
+
*
|
|
191
|
+
* This is what a `session_restart` of a transport-dead session looked like
|
|
192
|
+
* in the field (2026-09-25, `sess_950d1251`): the restart spawned a new
|
|
193
|
+
* wrapper, the wrapper died mid-`loadSession`, and the operator got a bare
|
|
194
|
+
* "ACP connection closed" — no fallback, because the message says nothing
|
|
195
|
+
* about the id being rejected, which is all {@link RESUME_ID_REJECTED_RE}
|
|
196
|
+
* looks for.
|
|
197
|
+
*
|
|
198
|
+
* Treated as a fallback trigger for the same reason a rejected id is: the
|
|
199
|
+
* stored conversation could not be rehydrated, and a fresh spawn (plus the
|
|
200
|
+
* daemon-transcript digest) is strictly better than handing the operator an
|
|
201
|
+
* error and no session. It costs exactly one retry — if the adapter is
|
|
202
|
+
* broken in general rather than on this id, the retry fails too and the real
|
|
203
|
+
* error propagates.
|
|
204
|
+
*/
|
|
205
|
+
declare const RESUME_CONNECTION_LOST_RE: RegExp;
|
|
185
206
|
/**
|
|
186
207
|
* Generic filesystem-fallback: for each known adapter strategy that
|
|
187
208
|
* defines an `fsProbe`, run it against this session's cwd. If a
|
|
@@ -255,4 +276,4 @@ declare function describeResumePath(prev: RestartCandidate, opts?: DecideRestart
|
|
|
255
276
|
*/
|
|
256
277
|
declare function tokenizeCommand(s: string): string[];
|
|
257
278
|
|
|
258
|
-
export { type DecideRestartStrategyOptions, type FsProbeCandidate, type NativeTranscriptProbe, RESUME_ID_REJECTED_RE, RESUME_STRATEGIES, type RestartCandidate, type RestartStrategy, type ResumeMetadataKey, type ResumeStrategy, augmentWithFsResume, decideRestartStrategy, describeResumePath, hasResumeStrategy, probeNativeTranscript, tokenizeCommand };
|
|
279
|
+
export { type DecideRestartStrategyOptions, type FsProbeCandidate, type NativeTranscriptProbe, RESUME_CONNECTION_LOST_RE, RESUME_ID_REJECTED_RE, RESUME_STRATEGIES, type RestartCandidate, type RestartStrategy, type ResumeMetadataKey, type ResumeStrategy, augmentWithFsResume, decideRestartStrategy, describeResumePath, hasResumeStrategy, probeNativeTranscript, tokenizeCommand };
|
|
@@ -1774,6 +1774,7 @@ function decideRestartStrategy(prev, opts = {}) {
|
|
|
1774
1774
|
};
|
|
1775
1775
|
}
|
|
1776
1776
|
var RESUME_ID_REJECTED_RE = /not found|does not support|not supported|unsupported/i;
|
|
1777
|
+
var RESUME_CONNECTION_LOST_RE = /connection closed|connection lost|epipe/i;
|
|
1777
1778
|
async function augmentWithFsResume(prev) {
|
|
1778
1779
|
const slug = prev.adapterSlug;
|
|
1779
1780
|
if (!slug) return prev;
|
|
@@ -1867,6 +1868,6 @@ function tokenizeCommand(s) {
|
|
|
1867
1868
|
return out;
|
|
1868
1869
|
}
|
|
1869
1870
|
|
|
1870
|
-
export { RESUME_ID_REJECTED_RE, RESUME_STRATEGIES, augmentWithFsResume, decideRestartStrategy, describeResumePath, hasResumeStrategy, probeNativeTranscript, tokenizeCommand };
|
|
1871
|
+
export { RESUME_CONNECTION_LOST_RE, RESUME_ID_REJECTED_RE, RESUME_STRATEGIES, augmentWithFsResume, decideRestartStrategy, describeResumePath, hasResumeStrategy, probeNativeTranscript, tokenizeCommand };
|
|
1871
1872
|
//# sourceMappingURL=resume-strategies.mjs.map
|
|
1872
1873
|
//# sourceMappingURL=resume-strategies.mjs.map
|