@sentry/junior 0.144.0 → 0.145.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/{agent-hooks-GCUTGKY3.js → agent-hooks-L7D2BDVV.js} +10 -10
- package/dist/api/conversations/detail.d.ts +1 -0
- package/dist/api/schema/conversation.d.ts +2 -0
- package/dist/api/schema.js +1 -1
- package/dist/api.js +40 -22
- package/dist/app.js +335 -409
- package/dist/{catalog-runtime-DWVYKDC6.js → catalog-runtime-QLAC4Q3W.js} +5 -5
- package/dist/chat/agent/request.d.ts +1 -1
- package/dist/chat/agent/resume.d.ts +6 -15
- package/dist/chat/agent/tools.d.ts +1 -1
- package/dist/chat/agent-dispatch/types.d.ts +1 -1
- package/dist/chat/app/conversation-work.d.ts +24 -0
- package/dist/chat/conversations/projection.d.ts +11 -3
- package/dist/chat/conversations/store.d.ts +1 -1
- package/dist/chat/runtime/agent-run-outcome.d.ts +1 -1
- package/dist/chat/runtime/reply-executor.d.ts +5 -5
- package/dist/chat/runtime/slack-resume.d.ts +12 -4
- package/dist/chat/state/locks.d.ts +28 -0
- package/dist/chat/task-execution/checkpoint.d.ts +86 -0
- package/dist/chat/task-execution/paused-turn.d.ts +29 -0
- package/dist/chat/task-execution/queue-signing.d.ts +1 -0
- package/dist/chat/task-execution/queue.d.ts +7 -1
- package/dist/chat/task-execution/slack-work.d.ts +1 -1
- package/dist/chat/task-execution/state.d.ts +4 -4
- package/dist/chat/task-execution/store.d.ts +2 -2
- package/dist/chat/task-execution/turn-cursor-keys.d.ts +6 -0
- package/dist/chat/{state/turn-session.d.ts → task-execution/turn-cursor.d.ts} +52 -42
- package/dist/chat/task-execution/turn-wake.d.ts +29 -0
- package/dist/chat/tools/types.d.ts +1 -1
- package/dist/{chunk-HNO2E5WB.js → chunk-27TEJTZO.js} +1 -1
- package/dist/{chunk-RIFJUJSI.js → chunk-2LWPFSB4.js} +1 -1
- package/dist/{chunk-SBZP2J5Q.js → chunk-2UH3JI64.js} +10 -9
- package/dist/{chunk-QUZJDAQQ.js → chunk-2XET6PKP.js} +93 -89
- package/dist/{chunk-SUK7NC5A.js → chunk-5PNPQYTO.js} +2 -2
- package/dist/{chunk-SSDTQDYQ.js → chunk-64SBYW2O.js} +132 -127
- package/dist/{chunk-DVO5VKYQ.js → chunk-B46ZMVOV.js} +5 -5
- package/dist/{chunk-A67GZN73.js → chunk-CD2XFGYQ.js} +1 -1
- package/dist/{chunk-WTX2RFJG.js → chunk-DS3J6WGY.js} +1 -1
- package/dist/{chunk-PKH6762I.js → chunk-DXEQAIUV.js} +1 -1
- package/dist/{chunk-WSOLZJJS.js → chunk-EIX2LQ6L.js} +3 -3
- package/dist/{chunk-KQBXT5B7.js → chunk-FUBRJA5F.js} +6 -6
- package/dist/{chunk-I44JB7HQ.js → chunk-GDV5LXRA.js} +1 -1
- package/dist/{chunk-7KAW7UF4.js → chunk-GUWLDMGF.js} +4 -4
- package/dist/{chunk-PELZ2ZSY.js → chunk-HISR3DTV.js} +33 -61
- package/dist/{chunk-HD6BHR25.js → chunk-HLOUZC5C.js} +32 -34
- package/dist/{chunk-BBCWYXHB.js → chunk-I47UGQPJ.js} +7 -7
- package/dist/{chunk-IUFM5JWV.js → chunk-JAL3CH4G.js} +3 -0
- package/dist/{chunk-E7HCWOHG.js → chunk-JLMVCNXL.js} +2 -1
- package/dist/{chunk-STFCL3K4.js → chunk-JTGS3ZZE.js} +1 -1
- package/dist/{chunk-GKA74DRA.js → chunk-LVVSIMBB.js} +1 -1
- package/dist/{chunk-SHEEZSLY.js → chunk-PJ4NMVQB.js} +2 -2
- package/dist/{chunk-W7JFV5SB.js → chunk-QJBDABQA.js} +14 -17
- package/dist/{chunk-UDQMY6RS.js → chunk-QUG4JSZK.js} +43 -1
- package/dist/{chunk-4X5KM7Z6.js → chunk-RUSS62EN.js} +14 -14
- package/dist/{chunk-ZF3N3JD6.js → chunk-SIN3MXH6.js} +1 -1
- package/dist/{chunk-QE3TICD4.js → chunk-TZRXYWRE.js} +2 -2
- package/dist/{chunk-CNTWB2SM.js → chunk-VTDMB7XX.js} +1 -1
- package/dist/{chunk-LDWNYCZ6.js → chunk-WF5HVH3M.js} +1 -1
- package/dist/{chunk-KCBZSJRU.js → chunk-WR76IVA5.js} +5 -2
- package/dist/{chunk-3GU4PWA3.js → chunk-XFKIRN3Q.js} +29 -29
- package/dist/{chunk-ZZCTGAIT.js → chunk-YD54Q45G.js} +4 -4
- package/dist/{chunk-BEGGFVFR.js → chunk-ZIAMN2UW.js} +407 -523
- package/dist/{chunk-44RJWAND.js → chunk-ZIMRGFYL.js} +6 -6
- package/dist/{chunk-54JMYQYS.js → chunk-ZYAJMESY.js} +2 -2
- package/dist/cli/chat.js +32 -32
- package/dist/cli/check.js +6 -6
- package/dist/cli/plugins.js +13 -13
- package/dist/cli/snapshot-create.js +9 -9
- package/dist/cli/upgrade.js +7 -7
- package/dist/{db-EFLHTBU6.js → db-62PW6LM3.js} +7 -7
- package/dist/instrumentation.js +4 -4
- package/dist/nitro.js +4 -4
- package/dist/{oauth-callback-server-RO3IQKWM.js → oauth-callback-server-6NZNHJAM.js} +25 -25
- package/dist/{runner-LOWW7JKA.js → runner-GCRPG3GQ.js} +19 -18
- package/dist/{skills-ZLMUG7AE.js → skills-2S3MDFIQ.js} +6 -6
- package/dist/spawn-7WK37BTD.js +39 -0
- package/dist/{validation-MAKEZNTS.js → validation-HAOLCJ5A.js} +6 -6
- package/dist/version.js +1 -1
- package/dist/{work-5OAGC3I4.js → work-R4XYKMUW.js} +17 -16
- package/dist/worker-U2UCVR7M.js +24 -0
- package/package.json +4 -4
- package/dist/chat/agent/session.d.ts +0 -19
- package/dist/chat/runtime/agent-continue-runner.d.ts +0 -37
- package/dist/chat/services/agent-continue.d.ts +0 -29
- package/dist/chat/services/turn-session-record.d.ts +0 -164
- package/dist/chat/state/turn-session-keys.d.ts +0 -6
- package/dist/spawn-R3LUV6RF.js +0 -38
- package/dist/worker-KTGGRTTP.js +0 -24
|
@@ -5,36 +5,37 @@ import {
|
|
|
5
5
|
enqueueAgentInvocation,
|
|
6
6
|
resolveAgentInvocationId,
|
|
7
7
|
routeAgentInvocationWork
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-HISR3DTV.js";
|
|
9
|
+
import "./chunk-HLOUZC5C.js";
|
|
10
10
|
import "./chunk-Q6QZTTLS.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-JAL3CH4G.js";
|
|
12
|
+
import "./chunk-B46ZMVOV.js";
|
|
12
13
|
import "./chunk-DIB4GX3G.js";
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-FUBRJA5F.js";
|
|
15
|
+
import "./chunk-ZIAMN2UW.js";
|
|
15
16
|
import "./chunk-3Y47VMHV.js";
|
|
16
17
|
import "./chunk-HUO3UTAQ.js";
|
|
17
18
|
import "./chunk-HLXXQI5Q.js";
|
|
18
19
|
import "./chunk-PDO5BLNM.js";
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-TZRXYWRE.js";
|
|
21
|
+
import "./chunk-2UH3JI64.js";
|
|
22
|
+
import "./chunk-27TEJTZO.js";
|
|
22
23
|
import "./chunk-EM225ITJ.js";
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-QUG4JSZK.js";
|
|
25
|
+
import "./chunk-XFKIRN3Q.js";
|
|
25
26
|
import "./chunk-VFUK3X5B.js";
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
27
|
+
import "./chunk-JTGS3ZZE.js";
|
|
28
|
+
import "./chunk-SIN3MXH6.js";
|
|
29
|
+
import "./chunk-CD2XFGYQ.js";
|
|
29
30
|
import "./chunk-RUIXF3YQ.js";
|
|
30
31
|
import "./chunk-HZF5P5UN.js";
|
|
31
32
|
import "./chunk-F3B2YJ76.js";
|
|
32
|
-
import "./chunk-
|
|
33
|
+
import "./chunk-2LWPFSB4.js";
|
|
33
34
|
import "./chunk-6GWA276C.js";
|
|
34
35
|
import "./chunk-OOUNJNMR.js";
|
|
35
36
|
import "./chunk-H4HBKISO.js";
|
|
36
|
-
import "./chunk-
|
|
37
|
-
import "./chunk-
|
|
37
|
+
import "./chunk-DS3J6WGY.js";
|
|
38
|
+
import "./chunk-GDV5LXRA.js";
|
|
38
39
|
import "./chunk-MLKGABMK.js";
|
|
39
40
|
export {
|
|
40
41
|
buildAgentInvocationInboundMessage,
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CONVERSATION_WORK_DEFER_DELAY_MS,
|
|
3
|
+
processConversationWork
|
|
4
|
+
} from "./chunk-RUSS62EN.js";
|
|
5
|
+
import "./chunk-HLOUZC5C.js";
|
|
6
|
+
import "./chunk-JAL3CH4G.js";
|
|
7
|
+
import "./chunk-3Y47VMHV.js";
|
|
8
|
+
import "./chunk-2UH3JI64.js";
|
|
9
|
+
import "./chunk-27TEJTZO.js";
|
|
10
|
+
import "./chunk-QUG4JSZK.js";
|
|
11
|
+
import "./chunk-XFKIRN3Q.js";
|
|
12
|
+
import "./chunk-VFUK3X5B.js";
|
|
13
|
+
import "./chunk-JTGS3ZZE.js";
|
|
14
|
+
import "./chunk-HZF5P5UN.js";
|
|
15
|
+
import "./chunk-F3B2YJ76.js";
|
|
16
|
+
import "./chunk-2LWPFSB4.js";
|
|
17
|
+
import "./chunk-6GWA276C.js";
|
|
18
|
+
import "./chunk-DS3J6WGY.js";
|
|
19
|
+
import "./chunk-GDV5LXRA.js";
|
|
20
|
+
import "./chunk-MLKGABMK.js";
|
|
21
|
+
export {
|
|
22
|
+
CONVERSATION_WORK_DEFER_DELAY_MS,
|
|
23
|
+
processConversationWork
|
|
24
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/junior",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.145.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"pg": "^8.16.3",
|
|
81
81
|
"yaml": "^2.9.0",
|
|
82
82
|
"zod": "^4.4.3",
|
|
83
|
-
"@sentry/junior-plugin-api": "0.
|
|
83
|
+
"@sentry/junior-plugin-api": "0.145.0"
|
|
84
84
|
},
|
|
85
85
|
"devDependencies": {
|
|
86
86
|
"@emnapi/core": "^1.10.0",
|
|
@@ -97,9 +97,9 @@
|
|
|
97
97
|
"typescript": "^6.0.3",
|
|
98
98
|
"vercel": "^54.4.0",
|
|
99
99
|
"vitest": "^4.1.7",
|
|
100
|
-
"@sentry/junior-
|
|
100
|
+
"@sentry/junior-memory": "0.145.0",
|
|
101
101
|
"@sentry/junior-testing": "0.0.0",
|
|
102
|
-
"@sentry/junior-
|
|
102
|
+
"@sentry/junior-github": "0.145.0"
|
|
103
103
|
},
|
|
104
104
|
"scripts": {
|
|
105
105
|
"build": "tsup && tsc -p tsconfig.build.json --emitDeclarationOnly",
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Run session restore.
|
|
3
|
-
*
|
|
4
|
-
* Loads the persisted turn session projection for one run slice before the
|
|
5
|
-
* tool and prompt phases need it.
|
|
6
|
-
*/
|
|
7
|
-
import { loadTurnSessionRecord } from "@/chat/services/turn-session-record";
|
|
8
|
-
type LoadedSessionRecordState = Awaited<ReturnType<typeof loadTurnSessionRecord>>;
|
|
9
|
-
/** Restore the persisted session projection for one run slice. */
|
|
10
|
-
export declare function restoreSessionRecord(args: {
|
|
11
|
-
conversationId: string;
|
|
12
|
-
turnId: string;
|
|
13
|
-
}): Promise<{
|
|
14
|
-
existingSessionRecord: LoadedSessionRecordState["existingSessionRecord"];
|
|
15
|
-
currentSliceId: number;
|
|
16
|
-
resumedFromSessionRecord: boolean;
|
|
17
|
-
sessionRecordState: LoadedSessionRecordState;
|
|
18
|
-
}>;
|
|
19
|
-
export {};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { resumeSlackTurn } from "@/chat/runtime/slack-resume";
|
|
2
|
-
import { type AgentContinueRequest } from "@/chat/services/agent-continue";
|
|
3
|
-
import type { AgentRunner } from "@/chat/runtime/agent-runner";
|
|
4
|
-
import type { AgentRunRouting } from "@/chat/agent/request";
|
|
5
|
-
/** Runtime ports for agent continuation scheduling. */
|
|
6
|
-
export interface AgentContinueRunnerOptions {
|
|
7
|
-
agentRunner: AgentRunner;
|
|
8
|
-
/** Exact persisted input ids accepted for a non-interactive continuation. */
|
|
9
|
-
inputMessageIds?: readonly string[];
|
|
10
|
-
routingContext?: Pick<AgentRunRouting, "actor" | "credentialContext" | "destinationVisibility" | "dispatch" | "surface">;
|
|
11
|
-
resumeTurn?: typeof resumeSlackTurn;
|
|
12
|
-
scheduleAgentContinue?: (request: AgentContinueRequest) => Promise<void>;
|
|
13
|
-
scheduleSessionCompletedPluginTasks?: (params: {
|
|
14
|
-
conversationId: string;
|
|
15
|
-
sessionId: string;
|
|
16
|
-
}) => Promise<void>;
|
|
17
|
-
}
|
|
18
|
-
/** Per-worker controls for one continued run. */
|
|
19
|
-
export interface AgentContinueRunOptions {
|
|
20
|
-
shouldYield?: () => boolean;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Continue one paused Slack agent run from durable conversation state.
|
|
24
|
-
*
|
|
25
|
-
* Returns false when the session became stale before generation began.
|
|
26
|
-
*/
|
|
27
|
-
export declare function continueSlackAgentRun(payload: AgentContinueRequest, options: AgentContinueRunnerOptions, runOptions?: AgentContinueRunOptions): Promise<boolean>;
|
|
28
|
-
/** Resume the first valid paused Slack session for an idle conversation. */
|
|
29
|
-
export declare function resumeAwaitingSlackContinuation(conversationId: string, options: AgentContinueRunnerOptions, runOptions?: AgentContinueRunOptions): Promise<boolean>;
|
|
30
|
-
/**
|
|
31
|
-
* Retry agent continuation when the normal Slack thread lock is briefly busy.
|
|
32
|
-
*
|
|
33
|
-
* Returns false when the session became stale before generation began. A busy
|
|
34
|
-
* lock that is rescheduled still returns true because runnable work remains
|
|
35
|
-
* durable.
|
|
36
|
-
*/
|
|
37
|
-
export declare function continueSlackAgentRunWithLockRetry(payload: AgentContinueRequest, options: AgentContinueRunnerOptions, runOptions?: AgentContinueRunOptions): Promise<boolean>;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Durable agent continuation scheduling.
|
|
3
|
-
*
|
|
4
|
-
* This module owns the queue handoff used when an agent run pauses at a safe
|
|
5
|
-
* Pi continuation boundary and needs another execution slice.
|
|
6
|
-
*/
|
|
7
|
-
import type { StateAdapter } from "chat";
|
|
8
|
-
import type { Destination } from "@sentry/junior-plugin-api";
|
|
9
|
-
import type { ConversationStore } from "@/chat/conversations/store";
|
|
10
|
-
import type { ConversationWorkQueue } from "@/chat/task-execution/queue";
|
|
11
|
-
export interface AgentContinueRequest {
|
|
12
|
-
conversationId: string;
|
|
13
|
-
destination: Destination;
|
|
14
|
-
expectedVersion: number;
|
|
15
|
-
sessionId: string;
|
|
16
|
-
}
|
|
17
|
-
export interface ScheduleAgentContinueOptions {
|
|
18
|
-
nowMs?: number;
|
|
19
|
-
queue?: ConversationWorkQueue;
|
|
20
|
-
state?: StateAdapter;
|
|
21
|
-
}
|
|
22
|
-
/** Build the queue request for an awaiting automatic agent continuation. */
|
|
23
|
-
export declare function getAwaitingAgentContinueRequest(args: {
|
|
24
|
-
conversationId: string;
|
|
25
|
-
conversationStore?: ConversationStore;
|
|
26
|
-
sessionId: string;
|
|
27
|
-
}): Promise<AgentContinueRequest | undefined>;
|
|
28
|
-
/** Schedule durable conversation work to continue a paused agent run. */
|
|
29
|
-
export declare function scheduleAgentContinue(request: AgentContinueRequest, options?: ScheduleAgentContinueOptions): Promise<void>;
|
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
import { type AgentDispatchOutcome, type AgentTurnSessionRecord, type AgentTurnSurface } from "@/chat/state/turn-session";
|
|
2
|
-
import type { ConversationPrivacy } from "@/chat/conversation-privacy";
|
|
3
|
-
import type { Destination, Actor, Source } from "@sentry/junior-plugin-api";
|
|
4
|
-
import type { PiMessage } from "@/chat/pi/messages";
|
|
5
|
-
import type { ConversationMessageProvenance } from "@/chat/conversations/provenance";
|
|
6
|
-
import { type AgentTurnUsage } from "@/chat/usage";
|
|
7
|
-
import type { PluginTurnContext } from "@/chat/plugins/prompt";
|
|
8
|
-
export interface TurnSessionContext {
|
|
9
|
-
conversationId: string;
|
|
10
|
-
sessionId: string;
|
|
11
|
-
}
|
|
12
|
-
export interface TurnSessionState {
|
|
13
|
-
resumedFromSessionRecord: boolean;
|
|
14
|
-
currentSliceId: number;
|
|
15
|
-
existingSessionRecord?: AgentTurnSessionRecord;
|
|
16
|
-
}
|
|
17
|
-
/** Load turn session record state for a conversation/session pair. */
|
|
18
|
-
export declare function loadTurnSessionRecord(ctx: TurnSessionContext): Promise<TurnSessionState>;
|
|
19
|
-
/** Persist the latest safe in-progress boundary without scheduling continuation. */
|
|
20
|
-
export declare function persistRunningSessionRecord(args: {
|
|
21
|
-
channelName?: string;
|
|
22
|
-
conversationId: string;
|
|
23
|
-
destination?: Destination;
|
|
24
|
-
destinationVisibility?: ConversationPrivacy;
|
|
25
|
-
dispatchId?: string;
|
|
26
|
-
source?: Source;
|
|
27
|
-
sessionId: string;
|
|
28
|
-
sliceId: number;
|
|
29
|
-
messages: PiMessage[];
|
|
30
|
-
/** Provenance for trailing newly committed messages, such as steering. */
|
|
31
|
-
trailingMessageProvenance?: ConversationMessageProvenance[];
|
|
32
|
-
loadedSkillNames?: string[];
|
|
33
|
-
modelId: string;
|
|
34
|
-
actor?: Actor;
|
|
35
|
-
reasoningLevel?: string;
|
|
36
|
-
surface?: AgentTurnSurface;
|
|
37
|
-
turnContexts?: PluginTurnContext[];
|
|
38
|
-
turnStartMessageIndex?: number;
|
|
39
|
-
}): Promise<boolean>;
|
|
40
|
-
/**
|
|
41
|
-
* Commit a run after assistant output handling has settled.
|
|
42
|
-
*
|
|
43
|
-
* Generation completing is not durable completion: call this only after the
|
|
44
|
-
* destination accepted each visible message or intentional silence was
|
|
45
|
-
* resolved. The write is retried because output may already be user-visible;
|
|
46
|
-
* any remaining failure surfaces to the post-output boundary for one
|
|
47
|
-
* authoritative error.
|
|
48
|
-
*/
|
|
49
|
-
export declare function persistCompletedSessionRecord(args: {
|
|
50
|
-
channelName?: string;
|
|
51
|
-
conversationId: string;
|
|
52
|
-
currentDurationMs?: number;
|
|
53
|
-
currentUsage?: AgentTurnUsage;
|
|
54
|
-
destination?: Destination;
|
|
55
|
-
dispatchId?: string;
|
|
56
|
-
dispatchOutcome?: AgentDispatchOutcome;
|
|
57
|
-
errorMessage?: string;
|
|
58
|
-
/** Confirmed visibility; omit when unavailable to preserve canonical metadata. */
|
|
59
|
-
destinationVisibility?: ConversationPrivacy;
|
|
60
|
-
/** Provider-owned identifier returned after visible delivery is accepted. */
|
|
61
|
-
resultMessageId?: string;
|
|
62
|
-
source?: Source;
|
|
63
|
-
sessionId: string;
|
|
64
|
-
/** Defaults to the latest stored slice when the deliverer does not know it. */
|
|
65
|
-
sliceId?: number;
|
|
66
|
-
allMessages: PiMessage[];
|
|
67
|
-
loadedSkillNames?: string[];
|
|
68
|
-
modelId: string;
|
|
69
|
-
actor?: Actor;
|
|
70
|
-
reasoningLevel?: string;
|
|
71
|
-
surface?: AgentTurnSurface;
|
|
72
|
-
turnStartMessageIndex?: number;
|
|
73
|
-
}): Promise<void>;
|
|
74
|
-
/** Complete a delivered single-slice run with an explicit session boundary. */
|
|
75
|
-
export declare function completeDeliveredTurn(args: {
|
|
76
|
-
channelName?: string;
|
|
77
|
-
conversationId: string;
|
|
78
|
-
destination: Destination;
|
|
79
|
-
destinationVisibility?: ConversationPrivacy;
|
|
80
|
-
dispatchId?: string;
|
|
81
|
-
dispatchOutcome?: AgentDispatchOutcome;
|
|
82
|
-
errorMessage?: string;
|
|
83
|
-
durationMs?: number;
|
|
84
|
-
loadedSkillNames?: string[];
|
|
85
|
-
messages: PiMessage[];
|
|
86
|
-
modelId: string;
|
|
87
|
-
actor?: Actor;
|
|
88
|
-
reasoningLevel?: string;
|
|
89
|
-
resultMessageId?: string;
|
|
90
|
-
sessionId: string;
|
|
91
|
-
sliceId: number;
|
|
92
|
-
source: Source;
|
|
93
|
-
surface: AgentTurnSurface;
|
|
94
|
-
turnStartMessageIndex?: number;
|
|
95
|
-
usage?: AgentTurnUsage;
|
|
96
|
-
}): Promise<void>;
|
|
97
|
-
/**
|
|
98
|
-
* Persist an auth-pause session record. Returns the durable record only when
|
|
99
|
-
* the caller can safely hand the user to an authorization resume flow.
|
|
100
|
-
*/
|
|
101
|
-
export declare function persistAuthPauseSessionRecord(args: {
|
|
102
|
-
channelName?: string;
|
|
103
|
-
conversationId: string;
|
|
104
|
-
sessionId: string;
|
|
105
|
-
currentSliceId: number;
|
|
106
|
-
currentDurationMs?: number;
|
|
107
|
-
currentUsage?: AgentTurnUsage;
|
|
108
|
-
destination?: Destination;
|
|
109
|
-
destinationVisibility?: ConversationPrivacy;
|
|
110
|
-
dispatchId?: string;
|
|
111
|
-
source?: Source;
|
|
112
|
-
messages: PiMessage[];
|
|
113
|
-
loadedSkillNames?: string[];
|
|
114
|
-
modelId: string;
|
|
115
|
-
errorMessage: string;
|
|
116
|
-
actor?: Actor;
|
|
117
|
-
reasoningLevel?: string;
|
|
118
|
-
surface?: AgentTurnSurface;
|
|
119
|
-
}): Promise<AgentTurnSessionRecord | undefined>;
|
|
120
|
-
interface ContinuationRecordInput {
|
|
121
|
-
channelName?: string;
|
|
122
|
-
conversationId: string;
|
|
123
|
-
sessionId: string;
|
|
124
|
-
currentSliceId: number;
|
|
125
|
-
currentDurationMs?: number;
|
|
126
|
-
currentUsage?: AgentTurnUsage;
|
|
127
|
-
destination?: Destination;
|
|
128
|
-
destinationVisibility?: ConversationPrivacy;
|
|
129
|
-
dispatchId?: string;
|
|
130
|
-
source?: Source;
|
|
131
|
-
messages: PiMessage[];
|
|
132
|
-
loadedSkillNames?: string[];
|
|
133
|
-
modelId: string;
|
|
134
|
-
errorMessage: string;
|
|
135
|
-
actor?: Actor;
|
|
136
|
-
reasoningLevel?: string;
|
|
137
|
-
surface?: AgentTurnSurface;
|
|
138
|
-
}
|
|
139
|
-
/** Persist a timeout or delivery retry under the turn's shared slice limit. */
|
|
140
|
-
export declare function persistContinuationSessionRecord(args: ContinuationRecordInput & {
|
|
141
|
-
resumeReason: "retry" | "timeout";
|
|
142
|
-
}): Promise<AgentTurnSessionRecord | undefined>;
|
|
143
|
-
/**
|
|
144
|
-
* Persist a cooperative-yield boundary without advancing timeout slice counts.
|
|
145
|
-
*/
|
|
146
|
-
export declare function persistYieldSessionRecord(args: {
|
|
147
|
-
channelName?: string;
|
|
148
|
-
conversationId: string;
|
|
149
|
-
sessionId: string;
|
|
150
|
-
currentSliceId: number;
|
|
151
|
-
currentDurationMs?: number;
|
|
152
|
-
currentUsage?: AgentTurnUsage;
|
|
153
|
-
destination?: Destination;
|
|
154
|
-
dispatchId?: string;
|
|
155
|
-
source?: Source;
|
|
156
|
-
messages: PiMessage[];
|
|
157
|
-
loadedSkillNames?: string[];
|
|
158
|
-
modelId: string;
|
|
159
|
-
errorMessage: string;
|
|
160
|
-
actor?: Actor;
|
|
161
|
-
reasoningLevel?: string;
|
|
162
|
-
surface?: AgentTurnSurface;
|
|
163
|
-
}): Promise<AgentTurnSessionRecord | undefined>;
|
|
164
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/** Storage prefix for resumable turn-session state. */
|
|
2
|
-
export declare const AGENT_TURN_SESSION_PREFIX = "junior:agent_turn_session";
|
|
3
|
-
/** Return the durable key for one resumable turn-session record. */
|
|
4
|
-
export declare function agentTurnSessionKey(conversationId: string, sessionId: string): string;
|
|
5
|
-
/** Return the recovery index key for turn sessions in one conversation. */
|
|
6
|
-
export declare function agentTurnSessionConversationIndexKey(conversationId: string): string;
|
package/dist/spawn-R3LUV6RF.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
bindSpawnAgent
|
|
3
|
-
} from "./chunk-GKA74DRA.js";
|
|
4
|
-
import "./chunk-PELZ2ZSY.js";
|
|
5
|
-
import "./chunk-HD6BHR25.js";
|
|
6
|
-
import "./chunk-Q6QZTTLS.js";
|
|
7
|
-
import "./chunk-DVO5VKYQ.js";
|
|
8
|
-
import "./chunk-DIB4GX3G.js";
|
|
9
|
-
import "./chunk-R776HKPK.js";
|
|
10
|
-
import "./chunk-KQBXT5B7.js";
|
|
11
|
-
import "./chunk-BEGGFVFR.js";
|
|
12
|
-
import "./chunk-3Y47VMHV.js";
|
|
13
|
-
import "./chunk-HUO3UTAQ.js";
|
|
14
|
-
import "./chunk-HLXXQI5Q.js";
|
|
15
|
-
import "./chunk-PDO5BLNM.js";
|
|
16
|
-
import "./chunk-QE3TICD4.js";
|
|
17
|
-
import "./chunk-SBZP2J5Q.js";
|
|
18
|
-
import "./chunk-HNO2E5WB.js";
|
|
19
|
-
import "./chunk-EM225ITJ.js";
|
|
20
|
-
import "./chunk-UDQMY6RS.js";
|
|
21
|
-
import "./chunk-3GU4PWA3.js";
|
|
22
|
-
import "./chunk-VFUK3X5B.js";
|
|
23
|
-
import "./chunk-STFCL3K4.js";
|
|
24
|
-
import "./chunk-ZF3N3JD6.js";
|
|
25
|
-
import "./chunk-A67GZN73.js";
|
|
26
|
-
import "./chunk-RUIXF3YQ.js";
|
|
27
|
-
import "./chunk-HZF5P5UN.js";
|
|
28
|
-
import "./chunk-F3B2YJ76.js";
|
|
29
|
-
import "./chunk-RIFJUJSI.js";
|
|
30
|
-
import "./chunk-6GWA276C.js";
|
|
31
|
-
import "./chunk-OOUNJNMR.js";
|
|
32
|
-
import "./chunk-H4HBKISO.js";
|
|
33
|
-
import "./chunk-WTX2RFJG.js";
|
|
34
|
-
import "./chunk-I44JB7HQ.js";
|
|
35
|
-
import "./chunk-MLKGABMK.js";
|
|
36
|
-
export {
|
|
37
|
-
bindSpawnAgent
|
|
38
|
-
};
|
package/dist/worker-KTGGRTTP.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
CONVERSATION_WORK_DEFER_DELAY_MS,
|
|
3
|
-
processConversationWork
|
|
4
|
-
} from "./chunk-4X5KM7Z6.js";
|
|
5
|
-
import "./chunk-HD6BHR25.js";
|
|
6
|
-
import "./chunk-IUFM5JWV.js";
|
|
7
|
-
import "./chunk-3Y47VMHV.js";
|
|
8
|
-
import "./chunk-SBZP2J5Q.js";
|
|
9
|
-
import "./chunk-HNO2E5WB.js";
|
|
10
|
-
import "./chunk-UDQMY6RS.js";
|
|
11
|
-
import "./chunk-3GU4PWA3.js";
|
|
12
|
-
import "./chunk-VFUK3X5B.js";
|
|
13
|
-
import "./chunk-STFCL3K4.js";
|
|
14
|
-
import "./chunk-HZF5P5UN.js";
|
|
15
|
-
import "./chunk-F3B2YJ76.js";
|
|
16
|
-
import "./chunk-RIFJUJSI.js";
|
|
17
|
-
import "./chunk-6GWA276C.js";
|
|
18
|
-
import "./chunk-WTX2RFJG.js";
|
|
19
|
-
import "./chunk-I44JB7HQ.js";
|
|
20
|
-
import "./chunk-MLKGABMK.js";
|
|
21
|
-
export {
|
|
22
|
-
CONVERSATION_WORK_DEFER_DELAY_MS,
|
|
23
|
-
processConversationWork
|
|
24
|
-
};
|