@stackfactor/agent-utils 1.13.4 → 1.33.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/README.md +688 -23
- package/dist/cjs/agentProto.d.ts +13 -3
- package/dist/cjs/agentProto.d.ts.map +1 -1
- package/dist/cjs/agentProto.js +25 -4
- package/dist/cjs/backoff.d.ts +17 -0
- package/dist/cjs/backoff.d.ts.map +1 -0
- package/dist/cjs/backoff.js +26 -0
- package/dist/cjs/cancellation.d.ts +22 -0
- package/dist/cjs/cancellation.d.ts.map +1 -0
- package/dist/cjs/cancellation.js +36 -0
- package/dist/cjs/cli.d.ts +3 -0
- package/dist/cjs/cli.d.ts.map +1 -0
- package/dist/cjs/cli.js +85 -0
- package/dist/cjs/client.d.ts +11 -0
- package/dist/cjs/client.d.ts.map +1 -1
- package/dist/cjs/client.js +27 -0
- package/dist/cjs/const.d.ts +23 -0
- package/dist/cjs/const.d.ts.map +1 -1
- package/dist/cjs/const.js +23 -0
- package/dist/cjs/daemon.d.ts +94 -0
- package/dist/cjs/daemon.d.ts.map +1 -0
- package/dist/cjs/daemon.js +507 -0
- package/dist/cjs/daemonConfig.d.ts +45 -0
- package/dist/cjs/daemonConfig.d.ts.map +1 -0
- package/dist/cjs/daemonConfig.js +148 -0
- package/dist/cjs/daemonEnv.d.ts +10 -0
- package/dist/cjs/daemonEnv.d.ts.map +1 -0
- package/dist/cjs/daemonEnv.js +12 -0
- package/dist/cjs/durable/clientTool.d.ts +39 -0
- package/dist/cjs/durable/clientTool.d.ts.map +1 -0
- package/dist/cjs/durable/clientTool.js +90 -0
- package/dist/cjs/durable/index.d.ts +9 -0
- package/dist/cjs/durable/index.d.ts.map +1 -0
- package/dist/cjs/durable/index.js +16 -0
- package/dist/cjs/durable/journal.d.ts +218 -0
- package/dist/cjs/durable/journal.d.ts.map +1 -0
- package/dist/cjs/durable/journal.js +392 -0
- package/dist/cjs/durable/pause.d.ts +84 -0
- package/dist/cjs/durable/pause.d.ts.map +1 -0
- package/dist/cjs/durable/pause.js +241 -0
- package/dist/cjs/durable/resume.d.ts +27 -0
- package/dist/cjs/durable/resume.d.ts.map +1 -0
- package/dist/cjs/durable/resume.js +80 -0
- package/dist/cjs/durable/snapshotSaver.d.ts +38 -0
- package/dist/cjs/durable/snapshotSaver.d.ts.map +1 -0
- package/dist/cjs/durable/snapshotSaver.js +81 -0
- package/dist/cjs/durable/step.d.ts +28 -0
- package/dist/cjs/durable/step.d.ts.map +1 -0
- package/dist/cjs/durable/step.js +43 -0
- package/dist/cjs/index.d.ts +30 -7
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +28 -1
- package/dist/cjs/infrastructure.d.ts +50 -0
- package/dist/cjs/infrastructure.d.ts.map +1 -0
- package/dist/cjs/infrastructure.js +163 -0
- package/dist/cjs/langChain.d.ts +15 -3
- package/dist/cjs/langChain.d.ts.map +1 -1
- package/dist/cjs/langChain.js +986 -180
- package/dist/cjs/learningActivityMedia.d.ts +196 -0
- package/dist/cjs/learningActivityMedia.d.ts.map +1 -0
- package/dist/cjs/learningActivityMedia.js +861 -0
- package/dist/cjs/learningContentPlan.d.ts +117 -0
- package/dist/cjs/learningContentPlan.d.ts.map +1 -0
- package/dist/cjs/learningContentPlan.js +327 -0
- package/dist/cjs/learningContentThread.d.ts +213 -0
- package/dist/cjs/learningContentThread.d.ts.map +1 -0
- package/dist/cjs/learningContentThread.js +448 -0
- package/dist/cjs/logger.d.ts +1 -0
- package/dist/cjs/logger.d.ts.map +1 -1
- package/dist/cjs/logger.js +17 -3
- package/dist/cjs/modelRates.d.ts +40 -0
- package/dist/cjs/modelRates.d.ts.map +1 -0
- package/dist/cjs/modelRates.js +76 -0
- package/dist/cjs/referenceContext.d.ts +4 -145
- package/dist/cjs/referenceContext.d.ts.map +1 -1
- package/dist/cjs/referenceContext.js +16 -251
- package/dist/cjs/retry.d.ts +64 -0
- package/dist/cjs/retry.d.ts.map +1 -0
- package/dist/cjs/retry.js +138 -0
- package/dist/cjs/runtimeContext.d.ts +8 -1
- package/dist/cjs/runtimeContext.d.ts.map +1 -1
- package/dist/cjs/runtimeContext.js +3 -1
- package/dist/cjs/serve.d.ts +3 -2
- package/dist/cjs/serve.d.ts.map +1 -1
- package/dist/cjs/serve.js +32 -2
- package/dist/cjs/sourceStore.d.ts +378 -0
- package/dist/cjs/sourceStore.d.ts.map +1 -0
- package/dist/cjs/sourceStore.js +872 -0
- package/dist/cjs/stackfactorKnowledge.d.ts +91 -7
- package/dist/cjs/stackfactorKnowledge.d.ts.map +1 -1
- package/dist/cjs/stackfactorKnowledge.js +108 -44
- package/dist/cjs/tavily.d.ts +108 -4
- package/dist/cjs/tavily.d.ts.map +1 -1
- package/dist/cjs/tavily.js +242 -21
- package/dist/cjs/usage.d.ts.map +1 -1
- package/dist/cjs/usage.js +9 -15
- package/dist/cjs/version.d.ts +3 -0
- package/dist/cjs/version.d.ts.map +1 -0
- package/dist/cjs/version.js +5 -0
- package/dist/cjs/workflow/bookkeeping.d.ts +78 -0
- package/dist/cjs/workflow/bookkeeping.d.ts.map +1 -0
- package/dist/cjs/workflow/bookkeeping.js +75 -0
- package/dist/cjs/workflow/index.d.ts +13 -0
- package/dist/cjs/workflow/index.d.ts.map +1 -0
- package/dist/cjs/workflow/index.js +51 -0
- package/dist/cjs/workflow/limits.d.ts +52 -0
- package/dist/cjs/workflow/limits.d.ts.map +1 -0
- package/dist/cjs/workflow/limits.js +62 -0
- package/dist/cjs/workflow/platformTransport.d.ts +39 -0
- package/dist/cjs/workflow/platformTransport.d.ts.map +1 -0
- package/dist/cjs/workflow/platformTransport.js +115 -0
- package/dist/cjs/workflow/retrying.d.ts +44 -0
- package/dist/cjs/workflow/retrying.d.ts.map +1 -0
- package/dist/cjs/workflow/retrying.js +82 -0
- package/dist/cjs/workflow/run.d.ts +195 -0
- package/dist/cjs/workflow/run.d.ts.map +1 -0
- package/dist/cjs/workflow/run.js +858 -0
- package/dist/cjs/workflow/testing/index.d.ts +3 -0
- package/dist/cjs/workflow/testing/index.d.ts.map +1 -0
- package/dist/cjs/workflow/testing/index.js +6 -0
- package/dist/cjs/workflow/testing/memoryTransport.d.ts +203 -0
- package/dist/cjs/workflow/testing/memoryTransport.d.ts.map +1 -0
- package/dist/cjs/workflow/testing/memoryTransport.js +1171 -0
- package/dist/cjs/workflow/transport.d.ts +219 -0
- package/dist/cjs/workflow/transport.d.ts.map +1 -0
- package/dist/cjs/workflow/transport.js +19 -0
- package/dist/esm/agentProto.d.ts +13 -3
- package/dist/esm/agentProto.d.ts.map +1 -1
- package/dist/esm/agentProto.js +23 -3
- package/dist/esm/backoff.d.ts +17 -0
- package/dist/esm/backoff.d.ts.map +1 -0
- package/dist/esm/backoff.js +22 -0
- package/dist/esm/cancellation.d.ts +22 -0
- package/dist/esm/cancellation.d.ts.map +1 -0
- package/dist/esm/cancellation.js +27 -0
- package/dist/esm/cli.d.ts +3 -0
- package/dist/esm/cli.d.ts.map +1 -0
- package/dist/esm/cli.js +80 -0
- package/dist/esm/client.d.ts +11 -0
- package/dist/esm/client.d.ts.map +1 -1
- package/dist/esm/client.js +25 -1
- package/dist/esm/const.d.ts +23 -0
- package/dist/esm/const.d.ts.map +1 -1
- package/dist/esm/const.js +23 -0
- package/dist/esm/daemon.d.ts +94 -0
- package/dist/esm/daemon.d.ts.map +1 -0
- package/dist/esm/daemon.js +499 -0
- package/dist/esm/daemonConfig.d.ts +45 -0
- package/dist/esm/daemonConfig.d.ts.map +1 -0
- package/dist/esm/daemonConfig.js +142 -0
- package/dist/esm/daemonEnv.d.ts +10 -0
- package/dist/esm/daemonEnv.d.ts.map +1 -0
- package/dist/esm/daemonEnv.js +9 -0
- package/dist/esm/durable/clientTool.d.ts +39 -0
- package/dist/esm/durable/clientTool.d.ts.map +1 -0
- package/dist/esm/durable/clientTool.js +82 -0
- package/dist/esm/durable/index.d.ts +9 -0
- package/dist/esm/durable/index.d.ts.map +1 -0
- package/dist/esm/durable/index.js +8 -0
- package/dist/esm/durable/journal.d.ts +218 -0
- package/dist/esm/durable/journal.d.ts.map +1 -0
- package/dist/esm/durable/journal.js +374 -0
- package/dist/esm/durable/pause.d.ts +84 -0
- package/dist/esm/durable/pause.d.ts.map +1 -0
- package/dist/esm/durable/pause.js +226 -0
- package/dist/esm/durable/resume.d.ts +27 -0
- package/dist/esm/durable/resume.d.ts.map +1 -0
- package/dist/esm/durable/resume.js +72 -0
- package/dist/esm/durable/snapshotSaver.d.ts +38 -0
- package/dist/esm/durable/snapshotSaver.d.ts.map +1 -0
- package/dist/esm/durable/snapshotSaver.js +77 -0
- package/dist/esm/durable/step.d.ts +28 -0
- package/dist/esm/durable/step.d.ts.map +1 -0
- package/dist/esm/durable/step.js +36 -0
- package/dist/esm/index.d.ts +30 -7
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +20 -4
- package/dist/esm/infrastructure.d.ts +50 -0
- package/dist/esm/infrastructure.d.ts.map +1 -0
- package/dist/esm/infrastructure.js +156 -0
- package/dist/esm/langChain.d.ts +15 -3
- package/dist/esm/langChain.d.ts.map +1 -1
- package/dist/esm/langChain.js +984 -179
- package/dist/esm/learningActivityMedia.d.ts +196 -0
- package/dist/esm/learningActivityMedia.d.ts.map +1 -0
- package/dist/esm/learningActivityMedia.js +807 -0
- package/dist/esm/learningContentPlan.d.ts +117 -0
- package/dist/esm/learningContentPlan.d.ts.map +1 -0
- package/dist/esm/learningContentPlan.js +320 -0
- package/dist/esm/learningContentThread.d.ts +213 -0
- package/dist/esm/learningContentThread.d.ts.map +1 -0
- package/dist/esm/learningContentThread.js +403 -0
- package/dist/esm/logger.d.ts +1 -0
- package/dist/esm/logger.d.ts.map +1 -1
- package/dist/esm/logger.js +17 -3
- package/dist/esm/modelRates.d.ts +40 -0
- package/dist/esm/modelRates.d.ts.map +1 -0
- package/dist/esm/modelRates.js +68 -0
- package/dist/esm/referenceContext.d.ts +4 -145
- package/dist/esm/referenceContext.d.ts.map +1 -1
- package/dist/esm/referenceContext.js +16 -243
- package/dist/esm/retry.d.ts +64 -0
- package/dist/esm/retry.d.ts.map +1 -0
- package/dist/esm/retry.js +127 -0
- package/dist/esm/runtimeContext.d.ts +8 -1
- package/dist/esm/runtimeContext.d.ts.map +1 -1
- package/dist/esm/runtimeContext.js +3 -1
- package/dist/esm/serve.d.ts +3 -2
- package/dist/esm/serve.d.ts.map +1 -1
- package/dist/esm/serve.js +33 -3
- package/dist/esm/sourceStore.d.ts +378 -0
- package/dist/esm/sourceStore.d.ts.map +1 -0
- package/dist/esm/sourceStore.js +855 -0
- package/dist/esm/stackfactorKnowledge.d.ts +91 -7
- package/dist/esm/stackfactorKnowledge.d.ts.map +1 -1
- package/dist/esm/stackfactorKnowledge.js +101 -41
- package/dist/esm/tavily.d.ts +108 -4
- package/dist/esm/tavily.d.ts.map +1 -1
- package/dist/esm/tavily.js +237 -20
- package/dist/esm/usage.d.ts.map +1 -1
- package/dist/esm/usage.js +9 -15
- package/dist/esm/version.d.ts +3 -0
- package/dist/esm/version.d.ts.map +1 -0
- package/dist/esm/version.js +2 -0
- package/dist/esm/workflow/bookkeeping.d.ts +78 -0
- package/dist/esm/workflow/bookkeeping.d.ts.map +1 -0
- package/dist/esm/workflow/bookkeeping.js +67 -0
- package/dist/esm/workflow/index.d.ts +13 -0
- package/dist/esm/workflow/index.d.ts.map +1 -0
- package/dist/esm/workflow/index.js +10 -0
- package/dist/esm/workflow/limits.d.ts +52 -0
- package/dist/esm/workflow/limits.d.ts.map +1 -0
- package/dist/esm/workflow/limits.js +59 -0
- package/dist/esm/workflow/platformTransport.d.ts +39 -0
- package/dist/esm/workflow/platformTransport.d.ts.map +1 -0
- package/dist/esm/workflow/platformTransport.js +110 -0
- package/dist/esm/workflow/retrying.d.ts +44 -0
- package/dist/esm/workflow/retrying.d.ts.map +1 -0
- package/dist/esm/workflow/retrying.js +73 -0
- package/dist/esm/workflow/run.d.ts +195 -0
- package/dist/esm/workflow/run.d.ts.map +1 -0
- package/dist/esm/workflow/run.js +850 -0
- package/dist/esm/workflow/testing/index.d.ts +3 -0
- package/dist/esm/workflow/testing/index.d.ts.map +1 -0
- package/dist/esm/workflow/testing/index.js +2 -0
- package/dist/esm/workflow/testing/memoryTransport.d.ts +203 -0
- package/dist/esm/workflow/testing/memoryTransport.d.ts.map +1 -0
- package/dist/esm/workflow/testing/memoryTransport.js +1167 -0
- package/dist/esm/workflow/transport.d.ts +219 -0
- package/dist/esm/workflow/transport.d.ts.map +1 -0
- package/dist/esm/workflow/transport.js +16 -0
- package/package.json +8 -7
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import type { integration } from "@stackfactor/client-api";
|
|
2
|
+
export type Workflow = integration.Workflow;
|
|
3
|
+
export type WaitDecl = integration.WaitDecl;
|
|
4
|
+
export type WaitKind = integration.WaitKind;
|
|
5
|
+
export type WaitReason = integration.WaitReason;
|
|
6
|
+
export type Input = integration.Input;
|
|
7
|
+
export type RunQuestion = integration.RunQuestion;
|
|
8
|
+
export type RunAnswer = integration.RunAnswer;
|
|
9
|
+
/**
|
|
10
|
+
* A synchronous agent call's request (interactive tool calls, I1): what the
|
|
11
|
+
* caller asked for, in its own content type. The platform hands an INTERACTIVE
|
|
12
|
+
* run's own inbox entry back this way (its `id` the entry's), with its data
|
|
13
|
+
* capped as an event's is; the runner hands a run's own request to its turn
|
|
14
|
+
* whole, from the run message, with the run's id. client-api's `Input` has
|
|
15
|
+
* the same member with a payload that is never null; this one is for a run
|
|
16
|
+
* message that carried none.
|
|
17
|
+
*/
|
|
18
|
+
export interface InteractiveInput {
|
|
19
|
+
type: "interactive";
|
|
20
|
+
id: string;
|
|
21
|
+
/** `dataTruncated` when the platform kept it as an inbox entry over INBOX_EVENT_DATA_MAX_BYTES. */
|
|
22
|
+
payload: {
|
|
23
|
+
contentType: string;
|
|
24
|
+
data: unknown;
|
|
25
|
+
dataTruncated?: boolean;
|
|
26
|
+
} | null;
|
|
27
|
+
}
|
|
28
|
+
/** An input as the lease and the inbox hand it: an event, a resume, or an interactive request. */
|
|
29
|
+
export type PlatformInput = Input | InteractiveInput;
|
|
30
|
+
/**
|
|
31
|
+
* An open wait, as the lease answer and `GET /workflow` list it (core's
|
|
32
|
+
* `openWaitView`): what identifies it, never its answers.
|
|
33
|
+
*/
|
|
34
|
+
export interface OpenWait {
|
|
35
|
+
waitId: string;
|
|
36
|
+
kind: WaitKind;
|
|
37
|
+
tag: string | null;
|
|
38
|
+
deadline?: string | null;
|
|
39
|
+
declaredAt?: string | null;
|
|
40
|
+
title?: string;
|
|
41
|
+
addressees?: string[];
|
|
42
|
+
runId?: string;
|
|
43
|
+
event?: {
|
|
44
|
+
eventType: string;
|
|
45
|
+
elementType: number;
|
|
46
|
+
elementId: string;
|
|
47
|
+
};
|
|
48
|
+
signal?: {
|
|
49
|
+
name: string;
|
|
50
|
+
correlation: string;
|
|
51
|
+
};
|
|
52
|
+
at?: string;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* What a call answers, normalized: the route's 200 body, or the answered
|
|
56
|
+
* 404/409 of design §6.2 under a flag of its own (`missing`, `gone`,
|
|
57
|
+
* `versionMismatch`, …), so a caller reads answers and never status codes.
|
|
58
|
+
* Everything else rejects: the platform's "409 not holder" as an error with
|
|
59
|
+
* `response.status` 409, a transport failure without a `response`.
|
|
60
|
+
*
|
|
61
|
+
* Shapes with optional fields rather than discriminated unions: this package
|
|
62
|
+
* compiles with `strictNullChecks: false`, under which a union is not
|
|
63
|
+
* narrowed by a boolean flag (see serve.ts `AgentModuleLoad`).
|
|
64
|
+
*/
|
|
65
|
+
export interface LeaseAnswer {
|
|
66
|
+
taken: boolean;
|
|
67
|
+
workflowId?: string;
|
|
68
|
+
state?: unknown;
|
|
69
|
+
/** Decimal string. */
|
|
70
|
+
version?: string;
|
|
71
|
+
/** The run's own input, `taken` by it; null for a queued-input run or one already queued. */
|
|
72
|
+
input?: PlatformInput | null;
|
|
73
|
+
openWaits?: OpenWait[];
|
|
74
|
+
/** ISO time the lease ends (runner spec §6, change 1). */
|
|
75
|
+
until?: string;
|
|
76
|
+
/**
|
|
77
|
+
* The workflow was created by a synchronous agent call (I3; core e2f1ae12):
|
|
78
|
+
* its every round's outcome is the caller's answer. Absent from an older
|
|
79
|
+
* platform's answer.
|
|
80
|
+
*/
|
|
81
|
+
interactive?: boolean;
|
|
82
|
+
/** Held by another run: the input is queued for the holder, the run not bound. */
|
|
83
|
+
deferred?: boolean;
|
|
84
|
+
/** The run's own input was already run. */
|
|
85
|
+
handled?: boolean;
|
|
86
|
+
/** No workflow, and none created (or, for a bound run, deleted under it). */
|
|
87
|
+
missing?: boolean;
|
|
88
|
+
ended?: boolean;
|
|
89
|
+
halted?: boolean;
|
|
90
|
+
}
|
|
91
|
+
export interface TakeAnswer {
|
|
92
|
+
/** One entry, the oldest queued (or the one this run has taken and not finished); null when none. */
|
|
93
|
+
entry?: PlatformInput | null;
|
|
94
|
+
version?: string;
|
|
95
|
+
/** The next turn would exceed the turn budget or rate (W12). */
|
|
96
|
+
halted?: boolean;
|
|
97
|
+
/** An administrator deleted the workflow. */
|
|
98
|
+
gone?: boolean;
|
|
99
|
+
}
|
|
100
|
+
/** A save's and a release's answer: the new waits' ids in declaration order, the waits `cancel` settled. */
|
|
101
|
+
export interface WriteAnswer {
|
|
102
|
+
version?: string;
|
|
103
|
+
waits?: {
|
|
104
|
+
waitId: string;
|
|
105
|
+
}[];
|
|
106
|
+
cancelled?: string[];
|
|
107
|
+
versionMismatch?: boolean;
|
|
108
|
+
gone?: boolean;
|
|
109
|
+
}
|
|
110
|
+
export interface SaveAnswer extends WriteAnswer {
|
|
111
|
+
saved?: boolean;
|
|
112
|
+
}
|
|
113
|
+
export interface ReleaseAnswer extends WriteAnswer {
|
|
114
|
+
released?: boolean;
|
|
115
|
+
/** Entries are queued on a live workflow: take them first. */
|
|
116
|
+
inbox?: boolean;
|
|
117
|
+
}
|
|
118
|
+
export interface EndAnswer {
|
|
119
|
+
ended?: boolean;
|
|
120
|
+
inbox?: boolean;
|
|
121
|
+
/** Entries are queued on a halted workflow: release instead (W4). */
|
|
122
|
+
halted?: boolean;
|
|
123
|
+
versionMismatch?: boolean;
|
|
124
|
+
gone?: boolean;
|
|
125
|
+
}
|
|
126
|
+
export interface LetGoAnswer {
|
|
127
|
+
letGo?: boolean;
|
|
128
|
+
requeued?: number;
|
|
129
|
+
gone?: boolean;
|
|
130
|
+
}
|
|
131
|
+
export interface ReopenAnswer {
|
|
132
|
+
reopened: boolean;
|
|
133
|
+
missing?: boolean;
|
|
134
|
+
halted?: boolean;
|
|
135
|
+
}
|
|
136
|
+
export interface DeleteAnswer {
|
|
137
|
+
deleted?: boolean;
|
|
138
|
+
/** Another run holds it: this run's input is queued for the holder. */
|
|
139
|
+
held?: boolean;
|
|
140
|
+
gone?: boolean;
|
|
141
|
+
}
|
|
142
|
+
export interface CancelAnswer {
|
|
143
|
+
cancelled?: boolean;
|
|
144
|
+
gone?: boolean;
|
|
145
|
+
}
|
|
146
|
+
export interface CheckpointSaveAnswer {
|
|
147
|
+
saved?: boolean;
|
|
148
|
+
bytes?: number;
|
|
149
|
+
sha256?: string;
|
|
150
|
+
step?: number;
|
|
151
|
+
gone?: boolean;
|
|
152
|
+
}
|
|
153
|
+
export interface Checkpoint {
|
|
154
|
+
bytes?: Buffer | ArrayBuffer | Uint8Array;
|
|
155
|
+
sha256?: string;
|
|
156
|
+
step?: number;
|
|
157
|
+
gone?: boolean;
|
|
158
|
+
}
|
|
159
|
+
export interface LeaseBody {
|
|
160
|
+
key?: string;
|
|
161
|
+
create?: boolean;
|
|
162
|
+
reopen?: boolean;
|
|
163
|
+
code?: string;
|
|
164
|
+
}
|
|
165
|
+
export interface SaveBody {
|
|
166
|
+
state: unknown;
|
|
167
|
+
version: string;
|
|
168
|
+
done?: string;
|
|
169
|
+
waits?: WaitDecl[];
|
|
170
|
+
cancel?: string[];
|
|
171
|
+
contacts?: string[];
|
|
172
|
+
}
|
|
173
|
+
export interface ReleaseBody {
|
|
174
|
+
state: unknown;
|
|
175
|
+
version: string;
|
|
176
|
+
waits?: WaitDecl[];
|
|
177
|
+
cancel?: string[];
|
|
178
|
+
contacts?: string[];
|
|
179
|
+
code?: string;
|
|
180
|
+
}
|
|
181
|
+
export interface EndBody {
|
|
182
|
+
state?: unknown;
|
|
183
|
+
version: string;
|
|
184
|
+
}
|
|
185
|
+
export interface SignalBody {
|
|
186
|
+
name: string;
|
|
187
|
+
correlation: string;
|
|
188
|
+
input: unknown;
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* One method per agent route of design §6.2 (runner spec §7). The run is the
|
|
192
|
+
* one the transport was made for (its token names it), so no call says which.
|
|
193
|
+
* Implemented by `platformTransport(token)` (client-api), wrapped by
|
|
194
|
+
* `retrying(transport)`, and offline by `workflow.testing.memoryTransport()`.
|
|
195
|
+
*/
|
|
196
|
+
export interface WorkflowTransport {
|
|
197
|
+
/** The bound workflow, or for an unbound run its element's workflow under `key`; null when none. */
|
|
198
|
+
get(key?: string): Promise<Workflow | null>;
|
|
199
|
+
lease(body: LeaseBody): Promise<LeaseAnswer>;
|
|
200
|
+
take(): Promise<TakeAnswer>;
|
|
201
|
+
save(body: SaveBody): Promise<SaveAnswer>;
|
|
202
|
+
release(body: ReleaseBody): Promise<ReleaseAnswer>;
|
|
203
|
+
end(body: EndBody): Promise<EndAnswer>;
|
|
204
|
+
letGo(): Promise<LetGoAnswer>;
|
|
205
|
+
reopen(): Promise<ReopenAnswer>;
|
|
206
|
+
delete(): Promise<DeleteAnswer>;
|
|
207
|
+
cancelWait(waitId: string): Promise<CancelAnswer>;
|
|
208
|
+
signal(body: SignalBody): Promise<{
|
|
209
|
+
resolved: number;
|
|
210
|
+
}>;
|
|
211
|
+
saveCheckpoint(bytes: Buffer | Uint8Array): Promise<CheckpointSaveAnswer>;
|
|
212
|
+
/** The conversation checkpoint, null when there is none. */
|
|
213
|
+
getCheckpoint(): Promise<Checkpoint | null>;
|
|
214
|
+
}
|
|
215
|
+
/** The names of the transport's calls, as `retrying` logs them and `dropNextAnswer` takes them. */
|
|
216
|
+
export type WorkflowOperation = keyof WorkflowTransport;
|
|
217
|
+
/** Every call of {@link WorkflowTransport}, in the order of design §6.2. */
|
|
218
|
+
export declare const WORKFLOW_OPERATIONS: readonly WorkflowOperation[];
|
|
219
|
+
//# sourceMappingURL=transport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../../../src/workflow/transport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAK3D,MAAM,MAAM,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC;AAC5C,MAAM,MAAM,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC;AAC5C,MAAM,MAAM,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC;AAC5C,MAAM,MAAM,UAAU,GAAG,WAAW,CAAC,UAAU,CAAC;AAChD,MAAM,MAAM,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC;AACtC,MAAM,MAAM,WAAW,GAAG,WAAW,CAAC,WAAW,CAAC;AAClD,MAAM,MAAM,SAAS,GAAG,WAAW,CAAC,SAAS,CAAC;AAE9C;;;;;;;;GAQG;AACH,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,aAAa,CAAC;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,mGAAmG;IACnG,OAAO,EAAE;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,OAAO,CAAC;QAAC,aAAa,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI,CAAC;CACjF;AAED,kGAAkG;AAClG,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,gBAAgB,CAAC;AAErD;;;GAGG;AACH,MAAM,WAAW,QAAQ;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,QAAQ,CAAC;IACf,GAAG,EAAE,MAAM,GAAG,IAA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AC;AAExD,4EAA4E;AAC5E,eAAO,MAAM,mBAAmB,EAAE,SAAS,iBAAiB,EAcnC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WORKFLOW_OPERATIONS = void 0;
|
|
4
|
+
/** Every call of {@link WorkflowTransport}, in the order of design §6.2. */
|
|
5
|
+
exports.WORKFLOW_OPERATIONS = Object.freeze([
|
|
6
|
+
"get",
|
|
7
|
+
"lease",
|
|
8
|
+
"take",
|
|
9
|
+
"save",
|
|
10
|
+
"release",
|
|
11
|
+
"end",
|
|
12
|
+
"letGo",
|
|
13
|
+
"reopen",
|
|
14
|
+
"delete",
|
|
15
|
+
"cancelWait",
|
|
16
|
+
"signal",
|
|
17
|
+
"saveCheckpoint",
|
|
18
|
+
"getCheckpoint",
|
|
19
|
+
]);
|
package/dist/esm/agentProto.d.ts
CHANGED
|
@@ -3,10 +3,20 @@ import * as grpc from "@grpc/grpc-js";
|
|
|
3
3
|
* gRPC contract shared by the entire agent fleet — the `serve()` server AND the
|
|
4
4
|
* relay client. `data`/`config`/`request` are carried as JSON strings so
|
|
5
5
|
* arbitrary payloads need no proto schema churn. `Execute` is server-streaming:
|
|
6
|
-
*
|
|
7
|
-
* by
|
|
6
|
+
* any number of `Progress` frames (driven by the agent's `onProgress`) and
|
|
7
|
+
* `Partial` frames (driven by its `onPartialResult`), followed by exactly one
|
|
8
|
+
* `Result` or `Error`.
|
|
8
9
|
*/
|
|
9
|
-
export declare const PROTO = "\nsyntax = \"proto3\";\npackage stackfactor.agent.v1;\n\nservice Agent {\n rpc Execute(ExecuteRequest) returns (stream Update);\n // Liveness/health probe served by serve() itself \u2014 no agent code required.\n // deep=true also exercises the StackFactor auth callback (BACKEND_URL).\n rpc HealthCheck(HealthCheckRequest) returns (HealthCheckResponse);\n}\n\nmessage ExecuteRequest {\n string content_type = 1;\n string data_json = 2;\n string config_json = 3;\n string request_json = 4;\n int32 event = 5;\n // Optional repo-relative module to run INSTEAD of the agent's main (e.g.\n // \"src/webhooks/inbound-sms.js\"). Empty -> main, which is every pre-webhook\n // caller, so this stays wire-compatible with agents built before it existed.\n // Set by the webhook receiver from the integration's webHooks[].code. Follows\n // the same untrusted-path rules as HealthCheck's check_code.\n string code = 6;\n}\n\nmessage HealthCheckRequest {\n // Optional JSON carrying { authToken } for the deep backend-callback check.\n string request_json = 1;\n bool deep = 2;\n // Deep check only: repo-relative path to the agent's self-check module to run\n // (e.g. \"src/check.js\"). Empty \u2192 fall back to the conventional \"src/check.js\".\n string check_code = 3;\n // Deep check only: JSON of the resolved agent config (constantsAndVars/\n // secrets) made available to the self-check as ctx.config. May be empty.\n string config_json = 4;\n}\n\n// One result row from the agent's self-check module. The agent owns only its\n// own checks; reachability/ingress/version-drift rows are synthesised backend-\n// side. severity is optional: \"warn\" marks a failing check as non-blocking;\n// empty or \"error\" is blocking.\nmessage CheckResult {\n string name = 1;\n bool ok = 2;\n string detail = 3;\n string severity = 4;\n}\n\nmessage HealthCheckResponse {\n bool ok = 1;\n bool backend_reachable = 2;\n string version = 3;\n string message = 4;\n repeated CheckResult checks = 5;\n}\n\nmessage Update {\n oneof payload {\n Progress progress = 1;\n Result result = 2;\n ErrorInfo error = 3;\n }\n}\n\nmessage Progress { int32 progress = 1; string message = 2; }\nmessage Result { string result_json = 1; }\nmessage ErrorInfo { int32 code = 1; string message = 2; }\n";
|
|
10
|
+
export declare const PROTO = "\nsyntax = \"proto3\";\npackage stackfactor.agent.v1;\n\nservice Agent {\n rpc Execute(ExecuteRequest) returns (stream Update);\n // Liveness/health probe served by serve() itself \u2014 no agent code required.\n // deep=true also exercises the StackFactor auth callback (BACKEND_URL).\n rpc HealthCheck(HealthCheckRequest) returns (HealthCheckResponse);\n}\n\nmessage ExecuteRequest {\n string content_type = 1;\n string data_json = 2;\n string config_json = 3;\n string request_json = 4;\n int32 event = 5;\n // Optional repo-relative module to run INSTEAD of the agent's main (e.g.\n // \"src/webhooks/inbound-sms.js\"). Empty -> main, which is every pre-webhook\n // caller, so this stays wire-compatible with agents built before it existed.\n // Set by the webhook receiver from the integration's webHooks[].code. Follows\n // the same untrusted-path rules as HealthCheck's check_code.\n string code = 6;\n}\n\nmessage HealthCheckRequest {\n // Optional JSON carrying { authToken } for the deep backend-callback check.\n string request_json = 1;\n bool deep = 2;\n // Deep check only: repo-relative path to the agent's self-check module to run\n // (e.g. \"src/check.js\"). Empty \u2192 fall back to the conventional \"src/check.js\".\n string check_code = 3;\n // Deep check only: JSON of the resolved agent config (constantsAndVars/\n // secrets) made available to the self-check as ctx.config. May be empty.\n string config_json = 4;\n}\n\n// One result row from the agent's self-check module. The agent owns only its\n// own checks; reachability/ingress/version-drift rows are synthesised backend-\n// side. severity is optional: \"warn\" marks a failing check as non-blocking;\n// empty or \"error\" is blocking.\nmessage CheckResult {\n string name = 1;\n bool ok = 2;\n string detail = 3;\n string severity = 4;\n}\n\nmessage HealthCheckResponse {\n bool ok = 1;\n bool backend_reachable = 2;\n string version = 3;\n string message = 4;\n repeated CheckResult checks = 5;\n}\n\nmessage Update {\n oneof payload {\n Progress progress = 1;\n Result result = 2;\n ErrorInfo error = 3;\n Partial partial = 4;\n }\n}\n\nmessage Progress { int32 progress = 1; string message = 2; string icon = 3; }\nmessage Partial { string item_json = 1; }\nmessage Result { string result_json = 1; }\nmessage ErrorInfo { int32 code = 1; string message = 2; }\n";
|
|
11
|
+
/**
|
|
12
|
+
* The `icon` of a `Progress` frame: the lucide icon name an agent sent with a
|
|
13
|
+
* progress update, for the progress dialog to show next to the message. The
|
|
14
|
+
* name is written by the agent's author, who may be a third party, so anything
|
|
15
|
+
* that is not shaped like an icon name is dropped at both ends of the stream.
|
|
16
|
+
* @param icon - What the agent passed as `icon`, if anything
|
|
17
|
+
* @returns The name, or "" when there is none or it is not an icon name
|
|
18
|
+
*/
|
|
19
|
+
export declare const progressIcon: (icon: unknown) => string;
|
|
10
20
|
/**
|
|
11
21
|
* Loads the Agent proto package. proto-loader reads from a file, so the embedded
|
|
12
22
|
* schema is written to a temp path — keeps the package self-contained across the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agentProto.d.ts","sourceRoot":"","sources":["../../src/agentProto.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,eAAe,CAAC;AAMtC
|
|
1
|
+
{"version":3,"file":"agentProto.d.ts","sourceRoot":"","sources":["../../src/agentProto.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,eAAe,CAAC;AAMtC;;;;;;;GAOG;AACH,eAAO,MAAM,KAAK,o9EAqEjB,CAAC;AAOF;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,GAAI,MAAM,OAAO,KAAG,MAKrC,CAAC;AAET;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,QAAO,GAWnC,CAAC;AAEF,oEAAoE;AACpE,eAAO,MAAM,gBAAgB,QAAO,IAAI,CAAC,iBACc,CAAC"}
|
package/dist/esm/agentProto.js
CHANGED
|
@@ -7,8 +7,9 @@ import { tmpdir } from "node:os";
|
|
|
7
7
|
* gRPC contract shared by the entire agent fleet — the `serve()` server AND the
|
|
8
8
|
* relay client. `data`/`config`/`request` are carried as JSON strings so
|
|
9
9
|
* arbitrary payloads need no proto schema churn. `Execute` is server-streaming:
|
|
10
|
-
*
|
|
11
|
-
* by
|
|
10
|
+
* any number of `Progress` frames (driven by the agent's `onProgress`) and
|
|
11
|
+
* `Partial` frames (driven by its `onPartialResult`), followed by exactly one
|
|
12
|
+
* `Result` or `Error`.
|
|
12
13
|
*/
|
|
13
14
|
export const PROTO = `
|
|
14
15
|
syntax = "proto3";
|
|
@@ -71,13 +72,32 @@ message Update {
|
|
|
71
72
|
Progress progress = 1;
|
|
72
73
|
Result result = 2;
|
|
73
74
|
ErrorInfo error = 3;
|
|
75
|
+
Partial partial = 4;
|
|
74
76
|
}
|
|
75
77
|
}
|
|
76
78
|
|
|
77
|
-
message Progress { int32 progress = 1; string message = 2; }
|
|
79
|
+
message Progress { int32 progress = 1; string message = 2; string icon = 3; }
|
|
80
|
+
message Partial { string item_json = 1; }
|
|
78
81
|
message Result { string result_json = 1; }
|
|
79
82
|
message ErrorInfo { int32 code = 1; string message = 2; }
|
|
80
83
|
`;
|
|
84
|
+
// A lucide icon name: lowercase words and digits joined by hyphens ("globe",
|
|
85
|
+
// "file-search", "columns-2").
|
|
86
|
+
const ICON_NAME = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
|
|
87
|
+
const MAX_ICON_NAME_LENGTH = 64;
|
|
88
|
+
/**
|
|
89
|
+
* The `icon` of a `Progress` frame: the lucide icon name an agent sent with a
|
|
90
|
+
* progress update, for the progress dialog to show next to the message. The
|
|
91
|
+
* name is written by the agent's author, who may be a third party, so anything
|
|
92
|
+
* that is not shaped like an icon name is dropped at both ends of the stream.
|
|
93
|
+
* @param icon - What the agent passed as `icon`, if anything
|
|
94
|
+
* @returns The name, or "" when there is none or it is not an icon name
|
|
95
|
+
*/
|
|
96
|
+
export const progressIcon = (icon) => typeof icon === "string" &&
|
|
97
|
+
icon.length <= MAX_ICON_NAME_LENGTH &&
|
|
98
|
+
ICON_NAME.test(icon)
|
|
99
|
+
? icon
|
|
100
|
+
: "";
|
|
81
101
|
/**
|
|
82
102
|
* Loads the Agent proto package. proto-loader reads from a file, so the embedded
|
|
83
103
|
* schema is written to a temp path — keeps the package self-contained across the
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface Backoff {
|
|
2
|
+
/** The next delay in milliseconds; each call doubles the step. */
|
|
3
|
+
next(): number;
|
|
4
|
+
/** Start again from the minimum (call after a success). */
|
|
5
|
+
reset(): void;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* A retry delay that doubles from `minMs` up to `maxMs`, with plus or minus
|
|
9
|
+
* 20 % jitter, never below `minMs`. The step is capped at `maxMs`; jitter is applied after,
|
|
10
|
+
* so capped delays still spread around the cap.
|
|
11
|
+
*/
|
|
12
|
+
export declare const backoff: ({ minMs, maxMs, }: {
|
|
13
|
+
minMs: number;
|
|
14
|
+
maxMs: number;
|
|
15
|
+
}) => Backoff;
|
|
16
|
+
export default backoff;
|
|
17
|
+
//# sourceMappingURL=backoff.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"backoff.d.ts","sourceRoot":"","sources":["../../src/backoff.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,OAAO;IACtB,kEAAkE;IAClE,IAAI,IAAI,MAAM,CAAC;IACf,2DAA2D;IAC3D,KAAK,IAAI,IAAI,CAAC;CACf;AAKD;;;;GAIG;AACH,eAAO,MAAM,OAAO,GAAI,mBAGrB;IACD,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf,KAAG,OAaH,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** Jitter as a fraction of the step: the delay lands within plus or minus 20 %. */
|
|
2
|
+
const JITTER = 0.2;
|
|
3
|
+
/**
|
|
4
|
+
* A retry delay that doubles from `minMs` up to `maxMs`, with plus or minus
|
|
5
|
+
* 20 % jitter, never below `minMs`. The step is capped at `maxMs`; jitter is applied after,
|
|
6
|
+
* so capped delays still spread around the cap.
|
|
7
|
+
*/
|
|
8
|
+
export const backoff = ({ minMs, maxMs, }) => {
|
|
9
|
+
let step = minMs;
|
|
10
|
+
return {
|
|
11
|
+
next() {
|
|
12
|
+
const jittered = step * (1 + (Math.random() * 2 - 1) * JITTER);
|
|
13
|
+
const delay = Math.max(minMs, Math.round(jittered));
|
|
14
|
+
step = Math.min(maxMs, step * 2);
|
|
15
|
+
return delay;
|
|
16
|
+
},
|
|
17
|
+
reset() {
|
|
18
|
+
step = minMs;
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export default backoff;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** What a run stopped by its caller fails with, in every place it stops. */
|
|
2
|
+
export declare const REQUEST_CANCELLED_MESSAGE = "Request cancelled by caller";
|
|
3
|
+
/**
|
|
4
|
+
* Whether the active request was cancelled: its caller cancelled the call,
|
|
5
|
+
* or the call's stream broke (serve.ts aborts the request's signal on both).
|
|
6
|
+
* Always false outside a request.
|
|
7
|
+
*/
|
|
8
|
+
export declare const isRequestCancelled: () => boolean;
|
|
9
|
+
/** The error a cancelled request stops with: a 400 carrying {@link REQUEST_CANCELLED_MESSAGE}. */
|
|
10
|
+
export declare const requestCancelledError: () => any;
|
|
11
|
+
/**
|
|
12
|
+
* Stops a cancelled request before it starts more work. A run whose caller
|
|
13
|
+
* is gone has nobody to answer: every model call and every Tavily call it
|
|
14
|
+
* still makes is paid for and thrown away, and a failure it then reports
|
|
15
|
+
* names the wrong cause. Production, 2026-11-13: the backend pod holding a
|
|
16
|
+
* skill generation was removed 10 minutes in; the agent ran 3.5 minutes
|
|
17
|
+
* more, its link checks failed at once on the aborted signal, were retried
|
|
18
|
+
* twice, and the run ended with "The cited links could not be checked".
|
|
19
|
+
* @throws The {@link requestCancelledError} when the request was cancelled
|
|
20
|
+
*/
|
|
21
|
+
export declare const throwIfRequestCancelled: () => void;
|
|
22
|
+
//# sourceMappingURL=cancellation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cancellation.d.ts","sourceRoot":"","sources":["../../src/cancellation.ts"],"names":[],"mappings":"AAIA,4EAA4E;AAC5E,eAAO,MAAM,yBAAyB,gCAAgC,CAAC;AAEvE;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,QAAO,OAA6C,CAAC;AAEpF,kGAAkG;AAClG,eAAO,MAAM,qBAAqB,QAAO,GACgD,CAAC;AAE1F;;;;;;;;;GASG;AACH,eAAO,MAAM,uBAAuB,QAAO,IAE1C,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import constants from "./const.js";
|
|
2
|
+
import errorHandlingHelper from "./errorHandling.js";
|
|
3
|
+
import { getAbortSignal } from "./runtimeContext.js";
|
|
4
|
+
/** What a run stopped by its caller fails with, in every place it stops. */
|
|
5
|
+
export const REQUEST_CANCELLED_MESSAGE = "Request cancelled by caller";
|
|
6
|
+
/**
|
|
7
|
+
* Whether the active request was cancelled: its caller cancelled the call,
|
|
8
|
+
* or the call's stream broke (serve.ts aborts the request's signal on both).
|
|
9
|
+
* Always false outside a request.
|
|
10
|
+
*/
|
|
11
|
+
export const isRequestCancelled = () => getAbortSignal()?.aborted === true;
|
|
12
|
+
/** The error a cancelled request stops with: a 400 carrying {@link REQUEST_CANCELLED_MESSAGE}. */
|
|
13
|
+
export const requestCancelledError = () => errorHandlingHelper.create(constants.HTTP_CODES.BAD_REQUEST, REQUEST_CANCELLED_MESSAGE);
|
|
14
|
+
/**
|
|
15
|
+
* Stops a cancelled request before it starts more work. A run whose caller
|
|
16
|
+
* is gone has nobody to answer: every model call and every Tavily call it
|
|
17
|
+
* still makes is paid for and thrown away, and a failure it then reports
|
|
18
|
+
* names the wrong cause. Production, 2026-11-13: the backend pod holding a
|
|
19
|
+
* skill generation was removed 10 minutes in; the agent ran 3.5 minutes
|
|
20
|
+
* more, its link checks failed at once on the aborted signal, were retried
|
|
21
|
+
* twice, and the run ended with "The cited links could not be checked".
|
|
22
|
+
* @throws The {@link requestCancelledError} when the request was cancelled
|
|
23
|
+
*/
|
|
24
|
+
export const throwIfRequestCancelled = () => {
|
|
25
|
+
if (isRequestCancelled())
|
|
26
|
+
throw requestCancelledError();
|
|
27
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":""}
|
package/dist/esm/cli.js
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* `agent-utils`: the command line of @stackfactor/agent-utils.
|
|
4
|
+
* `agent-utils daemon [flags]` runs the pool daemon (see the README).
|
|
5
|
+
*/
|
|
6
|
+
// First, before anything that loads client-api: see daemonEnv.ts.
|
|
7
|
+
import { startEnv } from "./daemonEnv.js";
|
|
8
|
+
import { readDaemonConfig, DaemonConfigError } from "./daemonConfig.js";
|
|
9
|
+
import daemon from "./daemon.js";
|
|
10
|
+
import constants from "./const.js";
|
|
11
|
+
const EXIT_USAGE = 64;
|
|
12
|
+
const { DAEMON } = constants;
|
|
13
|
+
const USAGE = `Usage: agent-utils <command> [flags]
|
|
14
|
+
|
|
15
|
+
Commands:
|
|
16
|
+
daemon Run a pool daemon: register with the platform and report in.
|
|
17
|
+
|
|
18
|
+
Flags for daemon:
|
|
19
|
+
--backend <url> AGENT_POOL_BACKEND_URL (required, no default): the
|
|
20
|
+
StackFactor backend that issued the pool token
|
|
21
|
+
--installation-name <name> AGENT_POOL_INSTALLATION: 1-63 of a-z, 0-9 and -
|
|
22
|
+
--pool <token> AGENT_POOL_TOKEN: the pool token; prefer the variable,
|
|
23
|
+
a command-line argument is visible to other users
|
|
24
|
+
|
|
25
|
+
Environment (daemon):
|
|
26
|
+
AGENT_POOL_TOKEN required
|
|
27
|
+
AGENT_POOL_BACKEND_URL required
|
|
28
|
+
AGENT_POOL_CLOUD, AGENT_POOL_REGION, AGENT_POOL_ACCOUNT, AGENT_POOL_CLUSTER
|
|
29
|
+
override infrastructure detection;
|
|
30
|
+
AGENT_POOL_CLOUD=other sends no metadata probes
|
|
31
|
+
AGENT_POOL_REPORT_INFRASTRUCTURE=false
|
|
32
|
+
send the installation name only
|
|
33
|
+
A .env file is not read for any of these: only the flags and the environment.
|
|
34
|
+
|
|
35
|
+
Exit codes: 0 stopped by SIGTERM/SIGINT (a second signal stops waiting for the
|
|
36
|
+
deregister), 1 unexpected failure, 64 usage, 75 restart on a new version,
|
|
37
|
+
78 configuration or token refused.
|
|
38
|
+
`;
|
|
39
|
+
const main = async (argv, env) => {
|
|
40
|
+
const [command, ...rest] = argv;
|
|
41
|
+
if (command === "--help" || command === "-h" || command === "help") {
|
|
42
|
+
process.stdout.write(USAGE);
|
|
43
|
+
return 0;
|
|
44
|
+
}
|
|
45
|
+
if (command === "daemon") {
|
|
46
|
+
if (rest.includes("--help") || rest.includes("-h")) {
|
|
47
|
+
process.stdout.write(USAGE);
|
|
48
|
+
return 0;
|
|
49
|
+
}
|
|
50
|
+
let config;
|
|
51
|
+
try {
|
|
52
|
+
config = readDaemonConfig(rest, env);
|
|
53
|
+
}
|
|
54
|
+
catch (error) {
|
|
55
|
+
if (error instanceof DaemonConfigError) {
|
|
56
|
+
process.stderr.write(`${error.message}\n`);
|
|
57
|
+
return DAEMON.EXIT_CONFIG;
|
|
58
|
+
}
|
|
59
|
+
throw error;
|
|
60
|
+
}
|
|
61
|
+
for (const warning of config.warnings)
|
|
62
|
+
process.stderr.write(`Warning: ${warning}\n`);
|
|
63
|
+
// Held until the process exits: a signal that arrives after the daemon has
|
|
64
|
+
// let go of its own handlers must not kill the process before its exit code.
|
|
65
|
+
const held = () => undefined;
|
|
66
|
+
process.on("SIGTERM", held);
|
|
67
|
+
process.on("SIGINT", held);
|
|
68
|
+
return daemon.start({ config });
|
|
69
|
+
}
|
|
70
|
+
const shown = command !== undefined && /^[a-z][a-z-]*$/.test(command)
|
|
71
|
+
? `Unknown command ${command}.`
|
|
72
|
+
: command === undefined ? "No command." : "Unknown command.";
|
|
73
|
+
process.stderr.write(`${shown}\n\n${USAGE}`);
|
|
74
|
+
return EXIT_USAGE;
|
|
75
|
+
};
|
|
76
|
+
// process.exit, not exitCode: an abandoned in-flight call must not outlive the grace period.
|
|
77
|
+
main(process.argv.slice(2), startEnv).then((code) => process.exit(code), (error) => {
|
|
78
|
+
process.stderr.write(`${error instanceof Error ? error.name : "Error"}: the daemon failed unexpectedly.\n`);
|
|
79
|
+
process.exit(1);
|
|
80
|
+
});
|
package/dist/esm/client.d.ts
CHANGED
|
@@ -29,7 +29,18 @@ export interface CallAgentOptions {
|
|
|
29
29
|
onProgress?: (update: {
|
|
30
30
|
progress: number;
|
|
31
31
|
message: string;
|
|
32
|
+
/** The lucide icon the agent named for this step; absent when it named none. */
|
|
33
|
+
icon?: string;
|
|
32
34
|
}) => void;
|
|
35
|
+
/**
|
|
36
|
+
* Called with the parsed item of each streamed `Partial` frame, in the order
|
|
37
|
+
* the agent sent them. A partial result is a piece of the answer delivered
|
|
38
|
+
* early; the final result must still repeat every item, so a caller that
|
|
39
|
+
* leaves this out loses nothing. A frame whose item is not valid JSON is
|
|
40
|
+
* logged and skipped, and a throw from this callback is logged: neither
|
|
41
|
+
* ends the call.
|
|
42
|
+
*/
|
|
43
|
+
onPartial?: (item: unknown) => void;
|
|
33
44
|
/** Abort the RPC (e.g. the frontend socket dropped) → stops the agent's LLM. */
|
|
34
45
|
signal?: AbortSignal;
|
|
35
46
|
/** Call deadline; defaults to 900s to match Cloud Run's max request timeout. */
|
package/dist/esm/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,MAAM,WAAW,mBAAmB;IAClC,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,+EAA+E;IAC/E,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE;QACpB,QAAQ,EAAE,MAAM,CAAC;QACjB,OAAO,EAAE,MAAM,CAAC;QAChB,gFAAgF;QAChF,IAAI,CAAC,EAAE,MAAM,CA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,WAAW,CA8ClB,CAAC"}
|
package/dist/esm/client.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as grpc from "@grpc/grpc-js";
|
|
2
|
-
import { loadAgentPackage } from "./agentProto.js";
|
|
2
|
+
import { loadAgentPackage, progressIcon } from "./agentProto.js";
|
|
3
|
+
import logger from "./logger.js";
|
|
3
4
|
import { MESSAGE_SIZE_OPTIONS } from "./messageLimits.js";
|
|
4
5
|
const DEFAULT_DEADLINE_MS = 900_000;
|
|
5
6
|
/**
|
|
@@ -82,11 +83,34 @@ export const callAgent = (agentUrl, request, options = {}) => new Promise((resol
|
|
|
82
83
|
}
|
|
83
84
|
stream.on("data", (update) => {
|
|
84
85
|
if (update.progress) {
|
|
86
|
+
// An agent built before the frame had `icon`, or one that named none,
|
|
87
|
+
// sends "": the update then carries no `icon`, as it always has.
|
|
88
|
+
const icon = progressIcon(update.progress.icon);
|
|
85
89
|
options.onProgress?.({
|
|
86
90
|
progress: update.progress.progress ?? 0,
|
|
87
91
|
message: update.progress.message ?? "",
|
|
92
|
+
...(icon ? { icon } : {}),
|
|
88
93
|
});
|
|
89
94
|
}
|
|
95
|
+
else if (update.partial) {
|
|
96
|
+
// One bad item must not cost the caller the rest of the stream or the
|
|
97
|
+
// result, so a parse failure skips the frame and a callback throw is
|
|
98
|
+
// contained.
|
|
99
|
+
let item;
|
|
100
|
+
try {
|
|
101
|
+
item = JSON.parse(update.partial.item_json);
|
|
102
|
+
}
|
|
103
|
+
catch (error) {
|
|
104
|
+
logger.log(null, logger.levels.warn, `callAgent: skipped a partial frame that is not JSON: ${error instanceof Error ? error.message : String(error)}`);
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
try {
|
|
108
|
+
options.onPartial?.(item);
|
|
109
|
+
}
|
|
110
|
+
catch (error) {
|
|
111
|
+
logger.log(null, logger.levels.error, `callAgent: onPartial threw: ${error instanceof Error ? error.message : String(error)}`);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
90
114
|
else if (update.result) {
|
|
91
115
|
const result = safeParse(update.result.result_json, null);
|
|
92
116
|
settle(() => resolve(result));
|
package/dist/esm/const.d.ts
CHANGED
|
@@ -13,6 +13,29 @@ declare const _default: {
|
|
|
13
13
|
UNSUPPORTED_MODEL: string;
|
|
14
14
|
QUOTA_EXHAUSTED: string;
|
|
15
15
|
};
|
|
16
|
+
/** The pool daemon (`npx @stackfactor/agent-utils daemon`). */
|
|
17
|
+
DAEMON: {
|
|
18
|
+
/** First retry delay after a failure. */
|
|
19
|
+
readonly BACKOFF_MIN_MS: 1000;
|
|
20
|
+
/** Retry delay cap: three failures fit inside the 90 s liveness window. */
|
|
21
|
+
readonly BACKOFF_MAX_MS: 15000;
|
|
22
|
+
/** How long to wait before asking again when the pool is disabled. */
|
|
23
|
+
readonly DISABLED_RETRY_MS: 60000;
|
|
24
|
+
/** A claim may take its poll time plus this long before the client gives up. */
|
|
25
|
+
readonly CLAIM_TIMEOUT_EXTRA_MS: 10000;
|
|
26
|
+
/** Bound on each cloud metadata probe. */
|
|
27
|
+
readonly DETECT_TIMEOUT_MS: 1000;
|
|
28
|
+
/** A shutdown is not held up by an unreachable platform. */
|
|
29
|
+
readonly DEREGISTER_TIMEOUT_MS: 5000;
|
|
30
|
+
/** Exit code asking the supervisor to restart on a new version. */
|
|
31
|
+
readonly EXIT_UPGRADE: 75;
|
|
32
|
+
/** sysexits EX_CONFIG: the token or configuration is wrong; restarting will not help. */
|
|
33
|
+
readonly EXIT_CONFIG: 78;
|
|
34
|
+
/** The runner this slice registers. */
|
|
35
|
+
readonly RUNNER: "subprocess";
|
|
36
|
+
/** Tasks the daemon takes at once (none until the worker exists). */
|
|
37
|
+
readonly CAPACITY: 0;
|
|
38
|
+
};
|
|
16
39
|
};
|
|
17
40
|
export default _default;
|
|
18
41
|
//# sourceMappingURL=const.d.ts.map
|
package/dist/esm/const.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"const.d.ts","sourceRoot":"","sources":["../../src/const.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"const.d.ts","sourceRoot":"","sources":["../../src/const.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;IAiBE,+DAA+D;;QAE7D,yCAAyC;;QAEzC,2EAA2E;;QAE3E,sEAAsE;;QAEtE,gFAAgF;;QAEhF,0CAA0C;;QAE1C,4DAA4D;;QAE5D,mEAAmE;;QAEnE,yFAAyF;;QAEzF,uCAAuC;;QAEvC,qEAAqE;;;;AArCzE,wBAwCE"}
|