@hue-run/sdk 0.1.4 → 0.2.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/ENVIRONMENTS.md +182 -0
- package/EVALUATIONS.md +12 -0
- package/README.md +204 -21
- package/dist/ai-sdk.d.ts +9 -1
- package/dist/ai-sdk.js +37 -2
- package/dist/client.d.ts +130 -5
- package/dist/client.js +518 -110
- package/dist/config.d.ts +11 -2
- package/dist/config.js +50 -4
- package/dist/environment/client.d.ts +73 -0
- package/dist/environment/client.js +209 -0
- package/dist/environment/tools.d.ts +30 -0
- package/dist/environment/tools.js +24 -0
- package/dist/environment/types.d.ts +429 -0
- package/dist/environment/types.js +1 -0
- package/dist/environment.d.ts +5 -0
- package/dist/environment.js +2 -0
- package/dist/evals/attempt.d.ts +454 -0
- package/dist/evals/attempt.js +687 -0
- package/dist/evals/client.d.ts +99 -5
- package/dist/evals/client.js +136 -7
- package/dist/evals/environment-evidence.d.ts +6 -0
- package/dist/evals/environment-evidence.js +123 -0
- package/dist/evals/environment-json.d.ts +3 -0
- package/dist/evals/environment-json.js +76 -0
- package/dist/evals/json.d.ts +9 -1
- package/dist/evals/json.js +14 -6
- package/dist/evals/runner.d.ts +61 -2
- package/dist/evals/runner.js +71 -9
- package/dist/evals/scorer-publication.d.ts +2 -0
- package/dist/evals/scorer-publication.js +84 -0
- package/dist/evals/scorers.d.ts +11 -0
- package/dist/evals/scorers.js +56 -5
- package/dist/evals/simulation.d.ts +184 -0
- package/dist/evals/simulation.js +603 -0
- package/dist/evals/types.d.ts +304 -0
- package/dist/evals.d.ts +5 -1
- package/dist/evals.js +3 -1
- package/dist/experimental-telemetry.d.ts +8 -0
- package/dist/experimental-telemetry.js +13 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.js +3 -1
- package/dist/managed.d.ts +51 -1
- package/dist/managed.js +11 -1
- package/dist/privacy.d.ts +2 -0
- package/dist/privacy.js +54 -21
- package/dist/receipt.d.ts +12 -1
- package/dist/receipt.js +10 -1
- package/dist/safety.d.ts +7 -0
- package/dist/safety.js +179 -0
- package/dist/snapshot.d.ts +12 -0
- package/dist/snapshot.js +200 -0
- package/dist/transport.d.ts +46 -8
- package/dist/transport.js +266 -48
- package/dist/types.d.ts +167 -8
- package/dist/version.d.ts +2 -0
- package/dist/version.js +3 -0
- package/package.json +51 -15
|
@@ -0,0 +1,429 @@
|
|
|
1
|
+
import type { JsonValue } from "../types.js";
|
|
2
|
+
export type { JsonValue } from "../types.js";
|
|
3
|
+
/** Human-readable identity used when creating an environment. */
|
|
4
|
+
export interface EnvironmentIdentity {
|
|
5
|
+
/** Display name. */
|
|
6
|
+
name: string;
|
|
7
|
+
/** Project-unique URL-safe slug. */
|
|
8
|
+
slug: string;
|
|
9
|
+
/** Optional description of the simulated world. */
|
|
10
|
+
description?: string;
|
|
11
|
+
}
|
|
12
|
+
/** Environment registry entry without version bodies. */
|
|
13
|
+
export interface EnvironmentSummary extends Required<EnvironmentIdentity> {
|
|
14
|
+
/** Environment identity. */
|
|
15
|
+
id: string;
|
|
16
|
+
/** Archive timestamp, or `null` while active. */
|
|
17
|
+
archivedAt: string | null;
|
|
18
|
+
}
|
|
19
|
+
/** Immutable environment-version identity. */
|
|
20
|
+
export interface EnvironmentVersionSummary {
|
|
21
|
+
/** Environment-version identity. */
|
|
22
|
+
id: string;
|
|
23
|
+
/** Monotonic version number within the environment. */
|
|
24
|
+
version: number;
|
|
25
|
+
/** Canonical digest of the stored, defaulted definition. */
|
|
26
|
+
contentDigest: string;
|
|
27
|
+
/** Creation timestamp. */
|
|
28
|
+
createdAt: string;
|
|
29
|
+
}
|
|
30
|
+
/** Environment registry entry with all immutable versions. */
|
|
31
|
+
export interface Environment extends EnvironmentSummary {
|
|
32
|
+
/** Versions available for explicit pinning. */
|
|
33
|
+
versions: EnvironmentVersionSummary[];
|
|
34
|
+
}
|
|
35
|
+
/** One page of environment registry entries. */
|
|
36
|
+
export interface EnvironmentPage {
|
|
37
|
+
/** Entries on this page. */
|
|
38
|
+
items: EnvironmentSummary[];
|
|
39
|
+
/** Cursor for the next page, or `null` at the end. */
|
|
40
|
+
nextCursor: string | null;
|
|
41
|
+
}
|
|
42
|
+
/** Cursor pagination for environment registry methods. */
|
|
43
|
+
export interface EnvironmentPageOptions {
|
|
44
|
+
/** Cursor returned by the previous page. */
|
|
45
|
+
after?: string;
|
|
46
|
+
/** Page size, 1–100. */
|
|
47
|
+
limit?: number;
|
|
48
|
+
}
|
|
49
|
+
/** Versioned deterministic semantic implemented by Hue's environment kernel. */
|
|
50
|
+
export type SemanticEntry = "hue.collection.get@1" | "hue.collection.list@1" | "hue.collection.search@1" | "hue.collection.create@1" | "hue.collection.update@1" | "hue.gmail.search_messages@1" | "hue.gmail.get_message@1" | "hue.gmail.get_thread@1" | "hue.gmail.create_draft@1" | "hue.gmail.update_draft@1" | "hue.slack.search@1" | "hue.slack.read_channel@1" | "hue.slack.read_thread@1" | "hue.slack.draft@1" | "hue.slack.destination@1";
|
|
51
|
+
/** One parameter in an authored environment action. */
|
|
52
|
+
export interface EnvironmentActionParameter {
|
|
53
|
+
/** Agent-visible parameter name. */
|
|
54
|
+
name: string;
|
|
55
|
+
/** Supported flat parameter type. */
|
|
56
|
+
type: "string" | "number" | "boolean" | "string[]";
|
|
57
|
+
/** Whether the argument is required; defaults to `true`. */
|
|
58
|
+
required?: boolean;
|
|
59
|
+
/** Agent-visible parameter description. */
|
|
60
|
+
description?: string;
|
|
61
|
+
/** Allowed string values, when constrained. */
|
|
62
|
+
enum?: string[];
|
|
63
|
+
}
|
|
64
|
+
/** Configuration interpreted by a versioned environment semantic. */
|
|
65
|
+
export interface EnvironmentSemanticConfig {
|
|
66
|
+
/** Primary state collection. */
|
|
67
|
+
collection: string;
|
|
68
|
+
/** Draft collection used by provider-shaped mail semantics. */
|
|
69
|
+
draftsCollection?: string;
|
|
70
|
+
/** Synthetic Slack actor identity. */
|
|
71
|
+
slackActorId?: string;
|
|
72
|
+
/** Synthetic Slack workspace identity. */
|
|
73
|
+
slackWorkspaceId?: string;
|
|
74
|
+
/** Synthetic mailbox address. */
|
|
75
|
+
mailboxAddress?: string;
|
|
76
|
+
/** Parameter that supplies an entity identity. */
|
|
77
|
+
idParam?: string;
|
|
78
|
+
/** Parameter that supplies a search query. */
|
|
79
|
+
queryParam?: string;
|
|
80
|
+
/** Entity fields projected into observations. */
|
|
81
|
+
fields?: string[];
|
|
82
|
+
/** Field-to-parameter equality filter. */
|
|
83
|
+
filter?: {
|
|
84
|
+
/** Stored entity field. */
|
|
85
|
+
field: string;
|
|
86
|
+
/** Action parameter compared with the field. */
|
|
87
|
+
param: string;
|
|
88
|
+
};
|
|
89
|
+
/** Maximum records returned by a read semantic. */
|
|
90
|
+
limit?: number;
|
|
91
|
+
/** Literal fields written by a mutation semantic. */
|
|
92
|
+
set?: Record<string, JsonValue>;
|
|
93
|
+
/** Parameter names copied into written fields. */
|
|
94
|
+
setFromParams?: string[];
|
|
95
|
+
/** Prefix for deterministically generated entity identities. */
|
|
96
|
+
idPrefix?: string;
|
|
97
|
+
/** Preconditions evaluated before a mutation. */
|
|
98
|
+
guards?: Array<{
|
|
99
|
+
/** Stored field to inspect. */
|
|
100
|
+
field: string;
|
|
101
|
+
/** Required field value. */
|
|
102
|
+
equals: string | number | boolean | null;
|
|
103
|
+
/** Stable observation error when the guard fails. */
|
|
104
|
+
error: string;
|
|
105
|
+
}>;
|
|
106
|
+
/** Stable observation error for a missing entity. */
|
|
107
|
+
notFoundError?: string;
|
|
108
|
+
}
|
|
109
|
+
/** Agent-visible action mapped to one deterministic kernel semantic. */
|
|
110
|
+
export interface EnvironmentActionDeclaration {
|
|
111
|
+
/** Unique action name. */
|
|
112
|
+
name: string;
|
|
113
|
+
/** Agent-visible action description. */
|
|
114
|
+
description?: string;
|
|
115
|
+
/** Flat action parameters. */
|
|
116
|
+
params?: EnvironmentActionParameter[];
|
|
117
|
+
/** Versioned semantic and its configuration. */
|
|
118
|
+
semantics: {
|
|
119
|
+
/** Kernel semantic implementation. */
|
|
120
|
+
entry: SemanticEntry;
|
|
121
|
+
/** Semantic configuration. */
|
|
122
|
+
config: EnvironmentSemanticConfig;
|
|
123
|
+
};
|
|
124
|
+
/** Observation projection; identity is the only V1 projection. */
|
|
125
|
+
observation?: {
|
|
126
|
+
/** Return the semantic's observation unchanged. */
|
|
127
|
+
projection: "identity";
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
/** Complete V1 authored-world document stored as an immutable version. */
|
|
131
|
+
export interface EnvironmentDefinition {
|
|
132
|
+
/** Definition schema discriminator. */
|
|
133
|
+
schemaVersion: 1;
|
|
134
|
+
/** Optional human-readable world description. */
|
|
135
|
+
description?: string;
|
|
136
|
+
/** Deterministic virtual-clock configuration. */
|
|
137
|
+
determinism?: {
|
|
138
|
+
/** Virtual-clock settings. */
|
|
139
|
+
clock?: {
|
|
140
|
+
/** Initial virtual nanoseconds as a decimal string. */
|
|
141
|
+
startNs?: string;
|
|
142
|
+
/** Nanoseconds advanced after each recorded step. */
|
|
143
|
+
stepAdvanceNs?: string;
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
/** Initial normalized collection/entity state. */
|
|
147
|
+
state: {
|
|
148
|
+
/** Collections keyed by collection, entity and field names. */
|
|
149
|
+
collections: Record<string, Record<string, Record<string, JsonValue>>>;
|
|
150
|
+
};
|
|
151
|
+
/** Closed catalog exposed by this world. */
|
|
152
|
+
actions: EnvironmentActionDeclaration[];
|
|
153
|
+
/** How this definition was produced. */
|
|
154
|
+
provenance?: {
|
|
155
|
+
/** Authored directly by a developer. */
|
|
156
|
+
kind: "handwritten";
|
|
157
|
+
} | {
|
|
158
|
+
/** Generated from synthetic source material. */
|
|
159
|
+
kind: "synthetic";
|
|
160
|
+
/** Optional generation note. */
|
|
161
|
+
note?: string;
|
|
162
|
+
} | {
|
|
163
|
+
/** Derived from one immutable trace revision. */
|
|
164
|
+
kind: "derived_from_trace";
|
|
165
|
+
/** Source trace identity. */
|
|
166
|
+
traceId: string;
|
|
167
|
+
/** Source trace revision. */
|
|
168
|
+
revision: number;
|
|
169
|
+
};
|
|
170
|
+
/** Caller-owned immutable metadata. */
|
|
171
|
+
metadata?: Record<string, JsonValue>;
|
|
172
|
+
}
|
|
173
|
+
/** Full immutable environment version and its generated action catalog. */
|
|
174
|
+
export interface EnvironmentVersion extends EnvironmentVersionSummary {
|
|
175
|
+
/** Owning environment identity. */
|
|
176
|
+
environmentId: string;
|
|
177
|
+
/** Stored, defaulted authored definition. */
|
|
178
|
+
definition: EnvironmentDefinition;
|
|
179
|
+
/** Generated agent-visible actions. */
|
|
180
|
+
actions: ActionDefinition[];
|
|
181
|
+
}
|
|
182
|
+
/** JSON Schema subset generated for one action's input. */
|
|
183
|
+
export interface ActionSchema {
|
|
184
|
+
/** Actions always accept an object. */
|
|
185
|
+
type: "object";
|
|
186
|
+
/** Parameter schemas keyed by parameter name. */
|
|
187
|
+
properties: Record<string, {
|
|
188
|
+
/** Scalar JSON Schema type. */
|
|
189
|
+
type: "string" | "number" | "boolean";
|
|
190
|
+
/** Agent-visible parameter description. */
|
|
191
|
+
description?: string;
|
|
192
|
+
/** Allowed string values, when constrained. */
|
|
193
|
+
enum?: string[];
|
|
194
|
+
} | {
|
|
195
|
+
/** Array JSON Schema type. */
|
|
196
|
+
type: "array";
|
|
197
|
+
/** Bounded string item schema. */
|
|
198
|
+
items: {
|
|
199
|
+
/** Array items are strings. */
|
|
200
|
+
type: "string";
|
|
201
|
+
/** Maximum item length. */
|
|
202
|
+
maxLength: number;
|
|
203
|
+
};
|
|
204
|
+
/** Maximum array length. */
|
|
205
|
+
maxItems: number;
|
|
206
|
+
/** Agent-visible parameter description. */
|
|
207
|
+
description?: string;
|
|
208
|
+
}>;
|
|
209
|
+
/** Required parameter names. */
|
|
210
|
+
required: string[];
|
|
211
|
+
/** Unknown action arguments are rejected. */
|
|
212
|
+
additionalProperties: false;
|
|
213
|
+
}
|
|
214
|
+
/** One generated framework-neutral action. */
|
|
215
|
+
export interface ActionDefinition {
|
|
216
|
+
/** Unique action name. */
|
|
217
|
+
name: string;
|
|
218
|
+
/** Agent-visible description. */
|
|
219
|
+
description?: string;
|
|
220
|
+
/** Generated input contract. */
|
|
221
|
+
inputSchema: ActionSchema;
|
|
222
|
+
}
|
|
223
|
+
/** Recorded answer returned by the simulated world. */
|
|
224
|
+
export interface Observation {
|
|
225
|
+
/** Whether the world accepted or refused the action. */
|
|
226
|
+
status: "ok" | "error";
|
|
227
|
+
/** Additional bounded observation fields. */
|
|
228
|
+
[key: string]: JsonValue;
|
|
229
|
+
}
|
|
230
|
+
/** One normalized world-state effect caused by an action. */
|
|
231
|
+
export interface Effect {
|
|
232
|
+
/** Mutation category. */
|
|
233
|
+
kind: "created" | "updated" | "deleted";
|
|
234
|
+
/** Affected collection. */
|
|
235
|
+
collection: string;
|
|
236
|
+
/** Affected entity identity. */
|
|
237
|
+
entityId: string;
|
|
238
|
+
/** Changed field names. */
|
|
239
|
+
fields: string[];
|
|
240
|
+
}
|
|
241
|
+
/** Newly created isolated world and its action catalog. */
|
|
242
|
+
export interface EnvironmentRun {
|
|
243
|
+
/** Environment-run identity. */
|
|
244
|
+
id: string;
|
|
245
|
+
/** Immutable environment version used by the run. */
|
|
246
|
+
environmentVersionId: string;
|
|
247
|
+
/** Current virtual nanoseconds as a decimal string. */
|
|
248
|
+
clockNs: string;
|
|
249
|
+
/** Digest of current world state. */
|
|
250
|
+
stateDigest: string;
|
|
251
|
+
/** Maximum recorded actions. */
|
|
252
|
+
maxSteps: number;
|
|
253
|
+
/** Lease expiry timestamp. */
|
|
254
|
+
expiresAt: string;
|
|
255
|
+
/** Closed generated action catalog. */
|
|
256
|
+
actions: ActionDefinition[];
|
|
257
|
+
}
|
|
258
|
+
/** Result of invoking one environment action. */
|
|
259
|
+
export interface ActionResult {
|
|
260
|
+
/** Environment-run identity. */
|
|
261
|
+
runId: string;
|
|
262
|
+
/** Zero-based journal ordinal. */
|
|
263
|
+
stepOrdinal: number;
|
|
264
|
+
/** World observation returned to the agent. */
|
|
265
|
+
observation: Observation;
|
|
266
|
+
/** Normalized state effects. */
|
|
267
|
+
effects: Effect[];
|
|
268
|
+
/** Digest after the action. */
|
|
269
|
+
stateDigest: string;
|
|
270
|
+
/** Virtual nanoseconds after the action. */
|
|
271
|
+
clockNs: string;
|
|
272
|
+
/** Whether Hue replayed a previously recorded invocation. */
|
|
273
|
+
replayed: boolean;
|
|
274
|
+
/** Remaining step budget. */
|
|
275
|
+
stepsRemaining: number;
|
|
276
|
+
}
|
|
277
|
+
/** Durable first-fault report for known missing provider behavior. */
|
|
278
|
+
export interface CoverageGapInput {
|
|
279
|
+
/** Stable idempotency key for retrying a lost acknowledgement. */
|
|
280
|
+
idempotencyKey: string;
|
|
281
|
+
/** Provider boundary that received the valid request. */
|
|
282
|
+
provider: string;
|
|
283
|
+
/** Provider operation that is not modeled. */
|
|
284
|
+
operation: string;
|
|
285
|
+
/** Stable coverage-gap code. */
|
|
286
|
+
code: string;
|
|
287
|
+
/** First-fault arguments are bounded to 16,000 JSON bytes. */
|
|
288
|
+
args: Record<string, JsonValue>;
|
|
289
|
+
/** Nonsecret explanation of the unsupported behavior. */
|
|
290
|
+
description: string;
|
|
291
|
+
}
|
|
292
|
+
/** Stored coverage gap with reporting provenance. */
|
|
293
|
+
export interface CoverageGap extends Omit<CoverageGapInput, "idempotencyKey"> {
|
|
294
|
+
/** Server timestamp of the first report. */
|
|
295
|
+
reportedAt: string;
|
|
296
|
+
/** Authenticated actor that reported the gap. */
|
|
297
|
+
reportedBy: {
|
|
298
|
+
/** Actor credential class. */
|
|
299
|
+
kind: "project_key" | "user";
|
|
300
|
+
/** Actor identity. */
|
|
301
|
+
id: string;
|
|
302
|
+
};
|
|
303
|
+
}
|
|
304
|
+
/** Missing fields from older servers mean not_assessed, never verified parity. */
|
|
305
|
+
export interface EnvironmentCoverage {
|
|
306
|
+
/** Whether a known simulator gap invalidates agent evaluation. */
|
|
307
|
+
validity?: "not_assessed" | "environment_incomplete";
|
|
308
|
+
/** First durable gap, or `null` when no gap was reported. */
|
|
309
|
+
coverageGap?: CoverageGap | null;
|
|
310
|
+
}
|
|
311
|
+
/** Confirmation that a coverage gap was durably recorded. */
|
|
312
|
+
export interface CoverageGapResult {
|
|
313
|
+
/** Affected environment-run identity. */
|
|
314
|
+
runId: string;
|
|
315
|
+
/** Incomplete is the only successful reporting result. */
|
|
316
|
+
validity: "environment_incomplete";
|
|
317
|
+
/** Preserved first coverage gap. */
|
|
318
|
+
coverageGap: CoverageGap;
|
|
319
|
+
}
|
|
320
|
+
/** Authoritative current or sealed state of an environment run. */
|
|
321
|
+
export interface RunState extends EnvironmentCoverage {
|
|
322
|
+
/** Environment-run identity. */
|
|
323
|
+
id: string;
|
|
324
|
+
/** Immutable environment version used by the run. */
|
|
325
|
+
environmentVersionId: string;
|
|
326
|
+
/** Linked target execution, or `null` for a standalone run. */
|
|
327
|
+
executionId: string | null;
|
|
328
|
+
/** Deterministic run seed. */
|
|
329
|
+
seed: string;
|
|
330
|
+
/** Run lifecycle state. */
|
|
331
|
+
status: "open" | "completed" | "abandoned" | "expired";
|
|
332
|
+
/** Number of recorded steps. */
|
|
333
|
+
stepCount: number;
|
|
334
|
+
/** Maximum recorded actions. */
|
|
335
|
+
maxSteps: number;
|
|
336
|
+
/** Current virtual nanoseconds as a decimal string. */
|
|
337
|
+
clockNs: string;
|
|
338
|
+
/** Lease expiry timestamp. */
|
|
339
|
+
expiresAt: string;
|
|
340
|
+
/** Creation timestamp. */
|
|
341
|
+
createdAt: string;
|
|
342
|
+
/** Seal timestamp, or `null` while open. */
|
|
343
|
+
sealedAt: string | null;
|
|
344
|
+
/** Digest of current or final state. */
|
|
345
|
+
stateDigest: string;
|
|
346
|
+
/** Final state, available after sealing. */
|
|
347
|
+
finalState?: JsonValue;
|
|
348
|
+
}
|
|
349
|
+
/** One immutable journal entry. */
|
|
350
|
+
export interface Step {
|
|
351
|
+
/** Step identity. */
|
|
352
|
+
id: string;
|
|
353
|
+
/** Zero-based journal ordinal. */
|
|
354
|
+
ordinal: number;
|
|
355
|
+
/** Caller invocation identity used for replay protection. */
|
|
356
|
+
invocationId: string;
|
|
357
|
+
/** Invoked action name. */
|
|
358
|
+
action: string;
|
|
359
|
+
/** Validated action arguments. */
|
|
360
|
+
args: Record<string, JsonValue>;
|
|
361
|
+
/** World observation returned to the agent. */
|
|
362
|
+
observation: Observation;
|
|
363
|
+
/** Normalized state effects. */
|
|
364
|
+
effects: Effect[];
|
|
365
|
+
/** Whether state changed. */
|
|
366
|
+
mutated: boolean;
|
|
367
|
+
/** Virtual nanoseconds after the action. */
|
|
368
|
+
clockNs: string;
|
|
369
|
+
/** State digest after the action. */
|
|
370
|
+
stateDigest: string;
|
|
371
|
+
}
|
|
372
|
+
/** One ordinal page of environment journal steps. */
|
|
373
|
+
export interface StepPage {
|
|
374
|
+
/** Steps on this page. */
|
|
375
|
+
items: Step[];
|
|
376
|
+
/** Next step ordinal, or `null` at the end. */
|
|
377
|
+
nextCursor: number | null;
|
|
378
|
+
}
|
|
379
|
+
/** Confirmation that an environment run was sealed. */
|
|
380
|
+
export interface SealedRun {
|
|
381
|
+
/** Environment-run identity. */
|
|
382
|
+
id: string;
|
|
383
|
+
/** Requested terminal state. */
|
|
384
|
+
status: "completed" | "abandoned";
|
|
385
|
+
/** Final number of journal steps. */
|
|
386
|
+
stepCount: number;
|
|
387
|
+
/** Final state digest. */
|
|
388
|
+
stateDigest: string;
|
|
389
|
+
/** Seal timestamp. */
|
|
390
|
+
sealedAt: string;
|
|
391
|
+
}
|
|
392
|
+
/** Options for creating one fresh isolated world. */
|
|
393
|
+
export interface CreateRunInput {
|
|
394
|
+
/** Stable idempotency key for recovering creation acknowledgement. */
|
|
395
|
+
idempotencyKey: string;
|
|
396
|
+
/** Immutable environment version to instantiate. */
|
|
397
|
+
environmentVersionId: string;
|
|
398
|
+
/** Target execution linked to this world. */
|
|
399
|
+
executionId?: string;
|
|
400
|
+
/** Optional deterministic seed. */
|
|
401
|
+
seed?: string;
|
|
402
|
+
/** Optional action ceiling, 1–500. */
|
|
403
|
+
maxSteps?: number;
|
|
404
|
+
/** Optional lease in seconds. */
|
|
405
|
+
ttlSeconds?: number;
|
|
406
|
+
}
|
|
407
|
+
/** Request to invoke one action. */
|
|
408
|
+
export interface ActionInput {
|
|
409
|
+
/** Stable logical invocation identity. */
|
|
410
|
+
invocationId: string;
|
|
411
|
+
/** Action name from the run's catalog. */
|
|
412
|
+
action: string;
|
|
413
|
+
/** Action arguments; omitted means an empty object. */
|
|
414
|
+
args?: Record<string, JsonValue>;
|
|
415
|
+
}
|
|
416
|
+
/** Request to seal an environment run. */
|
|
417
|
+
export interface FinishRunInput {
|
|
418
|
+
/** Stable idempotency key for recovering seal acknowledgement. */
|
|
419
|
+
idempotencyKey: string;
|
|
420
|
+
/** Completed for accepted outcomes; abandoned for failures/cancellation. */
|
|
421
|
+
status: "completed" | "abandoned";
|
|
422
|
+
}
|
|
423
|
+
/** Ordinal pagination for an environment journal. */
|
|
424
|
+
export interface StepPageOptions {
|
|
425
|
+
/** Last seen ordinal; `-1` starts at the first step. */
|
|
426
|
+
after?: number;
|
|
427
|
+
/** Page size, 1–100. */
|
|
428
|
+
limit?: number;
|
|
429
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { createEnvironmentClient, EnvironmentClient, HueEnvironmentError, } from "./environment/client.js";
|
|
2
|
+
export type { EnvironmentClientOptions } from "./environment/client.js";
|
|
3
|
+
export { bindEnvironmentTools } from "./environment/tools.js";
|
|
4
|
+
export type { BindEnvironmentToolsOptions, EnvironmentTool } from "./environment/tools.js";
|
|
5
|
+
export type * from "./environment/types.js";
|