@runtypelabs/sdk 11.8.0 → 11.8.2
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/index.cjs +57 -113
- package/dist/index.d.cts +211 -137
- package/dist/index.d.ts +211 -137
- package/dist/index.mjs +57 -113
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
|
|
2
|
+
// src/sandbox-deployments-namespace.ts
|
|
3
3
|
/** Managed deployment authoring; acceptance records intent before the deployment becomes ready. */
|
|
4
4
|
var SandboxDeploymentsNamespace = class {
|
|
5
5
|
constructor(getClient) {
|
|
@@ -23,8 +23,7 @@ var SandboxDeploymentsNamespace = class {
|
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
|
-
|
|
27
|
-
//#region src/unified-stream-adapter.ts
|
|
26
|
+
// src/unified-stream-adapter.ts
|
|
28
27
|
/**
|
|
29
28
|
* @deprecated Unified events are now the only public execution-stream format.
|
|
30
29
|
* Retained so published SDK consumers can compile while removing old opt-in
|
|
@@ -531,8 +530,7 @@ function errorObject(error) {
|
|
|
531
530
|
message: String(error)
|
|
532
531
|
};
|
|
533
532
|
}
|
|
534
|
-
|
|
535
|
-
//#region src/stream-utils.ts
|
|
533
|
+
// src/stream-utils.ts
|
|
536
534
|
/**
|
|
537
535
|
* Parse SSE stream chunks into individual events
|
|
538
536
|
*
|
|
@@ -800,8 +798,7 @@ async function* streamEvents(response, _options = {}) {
|
|
|
800
798
|
reader.releaseLock();
|
|
801
799
|
}
|
|
802
800
|
}
|
|
803
|
-
|
|
804
|
-
//#region src/flow-result.ts
|
|
801
|
+
// src/flow-result.ts
|
|
805
802
|
/**
|
|
806
803
|
* Result wrapper for flow execution
|
|
807
804
|
*
|
|
@@ -952,8 +949,7 @@ var FlowResult = class {
|
|
|
952
949
|
if (this.consumed) throw new Error("Response has already been consumed. The streaming response body can only be read once. Use the cached results from stream(), getResult(), or getAllResults() instead.");
|
|
953
950
|
}
|
|
954
951
|
};
|
|
955
|
-
|
|
956
|
-
//#region src/flow-builder.ts
|
|
952
|
+
// src/flow-builder.ts
|
|
957
953
|
/**
|
|
958
954
|
* Shared implementation for the `validate()` methods on {@link FlowBuilder},
|
|
959
955
|
* `ClientFlowBuilder`, and `RuntypeFlowBuilder`. Guards against validating a
|
|
@@ -1811,8 +1807,7 @@ function createExternalTool(config) {
|
|
|
1811
1807
|
...config.idempotent !== void 0 ? { idempotent: config.idempotent } : {}
|
|
1812
1808
|
};
|
|
1813
1809
|
}
|
|
1814
|
-
|
|
1815
|
-
//#region src/local-tool-pause.ts
|
|
1810
|
+
// src/local-tool-pause.ts
|
|
1816
1811
|
/**
|
|
1817
1812
|
* Fold a unified `await` event, or an SDK stable-callback `flow_await` /
|
|
1818
1813
|
* `step_await`, into the per-tool paused-state map. Compatibility frames may
|
|
@@ -1859,8 +1854,7 @@ function resolveBatchExecutionId(pausedTools) {
|
|
|
1859
1854
|
for (const tool of pausedTools) if (tool.executionId) return tool.executionId;
|
|
1860
1855
|
return "";
|
|
1861
1856
|
}
|
|
1862
|
-
|
|
1863
|
-
//#region src/detached-reconnect.ts
|
|
1857
|
+
// src/detached-reconnect.ts
|
|
1864
1858
|
/**
|
|
1865
1859
|
* Transparent reconnect for a DETACHED agent stream (ADR 0020 point 6;
|
|
1866
1860
|
* blueprint `2026-08-25-durable-by-default-agent-turns.md` §4).
|
|
@@ -2079,8 +2073,7 @@ function withDetachedReconnect(response, reattach, options = {}) {
|
|
|
2079
2073
|
headers: response.headers
|
|
2080
2074
|
});
|
|
2081
2075
|
}
|
|
2082
|
-
|
|
2083
|
-
//#region src/agent-aliases-namespace.ts
|
|
2076
|
+
// src/agent-aliases-namespace.ts
|
|
2084
2077
|
/** The `live` pointer every agent's production traffic follows. Never expires. */
|
|
2085
2078
|
const LIVE_AGENT_ALIAS = "live";
|
|
2086
2079
|
/**
|
|
@@ -2353,8 +2346,7 @@ var AgentDeploymentsNamespace = class {
|
|
|
2353
2346
|
});
|
|
2354
2347
|
}
|
|
2355
2348
|
};
|
|
2356
|
-
|
|
2357
|
-
//#region src/content-hash.ts
|
|
2349
|
+
// src/content-hash.ts
|
|
2358
2350
|
/**
|
|
2359
2351
|
* Canonical content-hash primitives shared by the `*.ensure()` config-as-code
|
|
2360
2352
|
* surfaces (products, tools, skills, surfaces, products-ensure-fpo). Each of
|
|
@@ -2408,8 +2400,7 @@ async function sha256Hex(serialized) {
|
|
|
2408
2400
|
const hashBuffer = await crypto.subtle.digest("SHA-256", encoded);
|
|
2409
2401
|
return Array.from(new Uint8Array(hashBuffer)).map((b) => b.toString(16).padStart(2, "0")).join("");
|
|
2410
2402
|
}
|
|
2411
|
-
|
|
2412
|
-
//#region src/collections-ensure.ts
|
|
2403
|
+
// src/collections-ensure.ts
|
|
2413
2404
|
/** Canonical normalized form of a collection definition (slug excluded — identity). */
|
|
2414
2405
|
function normalizeRecordCollectionDefinition(definition) {
|
|
2415
2406
|
return {
|
|
@@ -2521,8 +2512,7 @@ async function ensureCollection(transport, definition, options = {}) {
|
|
|
2521
2512
|
async function pullCollection(transport, slug) {
|
|
2522
2513
|
return transport.get(`/collections/${encodeURIComponent(slug)}/pull`);
|
|
2523
2514
|
}
|
|
2524
|
-
|
|
2525
|
-
//#region src/generated-tool-gate.ts
|
|
2515
|
+
// src/generated-tool-gate.ts
|
|
2526
2516
|
const TOOL_NAME_PATTERN = /^[A-Za-z][A-Za-z0-9_]{1,63}$/;
|
|
2527
2517
|
const DEFAULT_MAX_CODE_LENGTH = 12e3;
|
|
2528
2518
|
const DEFAULT_MAX_TIMEOUT_MS = 3e4;
|
|
@@ -2791,8 +2781,7 @@ function applyGeneratedRuntimeToolProposalToDispatchRequest(request, proposal, o
|
|
|
2791
2781
|
request: attachRuntimeToolsToDispatchRequest(request, [decision.tool], options.attach)
|
|
2792
2782
|
};
|
|
2793
2783
|
}
|
|
2794
|
-
|
|
2795
|
-
//#region src/types.ts
|
|
2784
|
+
// src/types.ts
|
|
2796
2785
|
/** Narrow a {@link ClientToolEntry} to the name-only catalog-ref arm. */
|
|
2797
2786
|
function isCatalogClientToolRef(entry) {
|
|
2798
2787
|
return entry.catalog === "runtype-mcp";
|
|
@@ -2800,8 +2789,7 @@ function isCatalogClientToolRef(entry) {
|
|
|
2800
2789
|
function isBuiltinToolExecuteResponse(response) {
|
|
2801
2790
|
return "toolName" in response && !("executionId" in response);
|
|
2802
2791
|
}
|
|
2803
|
-
|
|
2804
|
-
//#region src/dispatch-request.ts
|
|
2792
|
+
// src/dispatch-request.ts
|
|
2805
2793
|
function normalizeDispatchMessageContent(content) {
|
|
2806
2794
|
if (Array.isArray(content) && content.some((part) => typeof part === "object" && part !== null && "type" in part && part.type === "asset_ref")) throw new Error("Dispatch messages cannot submit persisted asset_ref content; provide the original image or file content instead");
|
|
2807
2795
|
return content;
|
|
@@ -2849,8 +2837,7 @@ function normalizeDispatchRequest(request) {
|
|
|
2849
2837
|
agent: request.agent
|
|
2850
2838
|
};
|
|
2851
2839
|
}
|
|
2852
|
-
|
|
2853
|
-
//#region src/schedules-ensure.ts
|
|
2840
|
+
// src/schedules-ensure.ts
|
|
2854
2841
|
function nonEmptyObject(value) {
|
|
2855
2842
|
if (!isPlainObject$1(value)) return void 0;
|
|
2856
2843
|
const normalized = normalizeValue$1(value);
|
|
@@ -3082,8 +3069,7 @@ async function pullSchedule(client, name, target) {
|
|
|
3082
3069
|
...target
|
|
3083
3070
|
});
|
|
3084
3071
|
}
|
|
3085
|
-
|
|
3086
|
-
//#region src/offload-markers.ts
|
|
3072
|
+
// src/offload-markers.ts
|
|
3087
3073
|
const LEDGER_ARTIFACT_LINE_PREFIX = "Ledger artifact: ";
|
|
3088
3074
|
const SPILL_MARKER_PATTERN = /\[Output saved to (art_[A-Za-z0-9_-]+) \(([\d,]+) chars?\); read_offloaded_output to view\]/;
|
|
3089
3075
|
/** Number formatting is pinned to en-US so the `[\d,]+` size patterns parse
|
|
@@ -3207,8 +3193,7 @@ function modelIdSupportsProviderNativeCompaction(modelId) {
|
|
|
3207
3193
|
const normalized = modelId?.trim().toLowerCase() ?? "";
|
|
3208
3194
|
return normalized.includes("claude") || normalized.includes("anthropic");
|
|
3209
3195
|
}
|
|
3210
|
-
|
|
3211
|
-
//#region src/workflow-utils.ts
|
|
3196
|
+
// src/workflow-utils.ts
|
|
3212
3197
|
/**
|
|
3213
3198
|
* Utility functions shared between workflow phase handlers and AgentsEndpoint.
|
|
3214
3199
|
*
|
|
@@ -3260,8 +3245,7 @@ function getDefaultExternalReportPath(taskName) {
|
|
|
3260
3245
|
function sanitizeTaskSlug(taskName) {
|
|
3261
3246
|
return taskName.toLowerCase().replace(/[^a-z0-9_-]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 80);
|
|
3262
3247
|
}
|
|
3263
|
-
|
|
3264
|
-
//#region src/workflows/hook-registry.ts
|
|
3248
|
+
// src/workflows/hook-registry.ts
|
|
3265
3249
|
const BUILTIN_NAMESPACE = "builtin";
|
|
3266
3250
|
const HOOK_REF_PATTERN = /^[a-z0-9_-]+:[a-z0-9_-]+$/;
|
|
3267
3251
|
/**
|
|
@@ -3316,8 +3300,7 @@ function unregisterWorkflowHook(name) {
|
|
|
3316
3300
|
if (name.startsWith(`${BUILTIN_NAMESPACE}:`)) return false;
|
|
3317
3301
|
return registry.delete(name);
|
|
3318
3302
|
}
|
|
3319
|
-
|
|
3320
|
-
//#region src/workflows/workflow-config.ts
|
|
3303
|
+
// src/workflows/workflow-config.ts
|
|
3321
3304
|
const DISCOVERY_TOOLS = /* @__PURE__ */ new Set([
|
|
3322
3305
|
"search_repo",
|
|
3323
3306
|
"glob_files",
|
|
@@ -3471,8 +3454,7 @@ function compileWorkflowConfig(config, deps = {}) {
|
|
|
3471
3454
|
...buildCandidateBlock ? { buildCandidateBlock } : {}
|
|
3472
3455
|
};
|
|
3473
3456
|
}
|
|
3474
|
-
|
|
3475
|
-
//#region src/workflows/default-workflow.ts
|
|
3457
|
+
// src/workflows/default-workflow.ts
|
|
3476
3458
|
function isExternalTask(state) {
|
|
3477
3459
|
return state.workflowVariant === "external";
|
|
3478
3460
|
}
|
|
@@ -4277,8 +4259,7 @@ const defaultWorkflowConfig = {
|
|
|
4277
4259
|
};
|
|
4278
4260
|
ensureDefaultWorkflowHooks();
|
|
4279
4261
|
const defaultWorkflow = compileWorkflowConfig(defaultWorkflowConfig);
|
|
4280
|
-
|
|
4281
|
-
//#region src/workflows/deploy-workflow.ts
|
|
4262
|
+
// src/workflows/deploy-workflow.ts
|
|
4282
4263
|
const scaffoldPhase = {
|
|
4283
4264
|
name: "scaffold",
|
|
4284
4265
|
description: "Understand requirements for the app to deploy",
|
|
@@ -4422,8 +4403,7 @@ const deployWorkflow = {
|
|
|
4422
4403
|
return "";
|
|
4423
4404
|
}
|
|
4424
4405
|
};
|
|
4425
|
-
|
|
4426
|
-
//#region src/workflows/game-workflow.ts
|
|
4406
|
+
// src/workflows/game-workflow.ts
|
|
4427
4407
|
const blockedTools = [
|
|
4428
4408
|
"write_file",
|
|
4429
4409
|
"read_file",
|
|
@@ -4648,8 +4628,7 @@ const gameWorkflow = {
|
|
|
4648
4628
|
return "";
|
|
4649
4629
|
}
|
|
4650
4630
|
};
|
|
4651
|
-
|
|
4652
|
-
//#region src/workflows/stall-policy.ts
|
|
4631
|
+
// src/workflows/stall-policy.ts
|
|
4653
4632
|
const DEFAULT_STALL_STOP_AFTER = 3;
|
|
4654
4633
|
function isPositiveInteger(value) {
|
|
4655
4634
|
return typeof value === "number" && Number.isInteger(value) && value >= 1;
|
|
@@ -4688,8 +4667,7 @@ function buildEmptySessionNudge(consecutiveEmptySessions) {
|
|
|
4688
4667
|
"If a previous tool call was blocked, re-read the block message and satisfy its requirement instead of ending the turn."
|
|
4689
4668
|
].join("\n");
|
|
4690
4669
|
}
|
|
4691
|
-
|
|
4692
|
-
//#region src/endpoints.ts
|
|
4670
|
+
// src/endpoints.ts
|
|
4693
4671
|
/**
|
|
4694
4672
|
* Path of the execution-scoped events alias,
|
|
4695
4673
|
* `GET /v1/executions/{executionId}/events`.
|
|
@@ -9033,8 +9011,7 @@ var ToolApprovalGrantsEndpoint = class {
|
|
|
9033
9011
|
return this.client.delete(`/tool-approval-grants/${id}`);
|
|
9034
9012
|
}
|
|
9035
9013
|
};
|
|
9036
|
-
|
|
9037
|
-
//#region src/detached-buffered-follow.ts
|
|
9014
|
+
// src/detached-buffered-follow.ts
|
|
9038
9015
|
/** The release fields a response body carries, dropping any it does not name. */
|
|
9039
9016
|
function releaseFieldsOf(data) {
|
|
9040
9017
|
if (typeof data !== "object" || data === null) return {};
|
|
@@ -9141,8 +9118,7 @@ async function followDetachedResume(client, ack, after, carried = {}) {
|
|
|
9141
9118
|
...releaseFieldsOf(ack)
|
|
9142
9119
|
};
|
|
9143
9120
|
}
|
|
9144
|
-
|
|
9145
|
-
//#region src/evals-ensure.ts
|
|
9121
|
+
// src/evals-ensure.ts
|
|
9146
9122
|
const CHECK_GRADER_KINDS = /* @__PURE__ */ new Set([
|
|
9147
9123
|
"contains",
|
|
9148
9124
|
"not_contains",
|
|
@@ -9685,8 +9661,7 @@ async function pullEval(client, name) {
|
|
|
9685
9661
|
async function runEvalSuite(client, input) {
|
|
9686
9662
|
return client.post("/eval/run", input);
|
|
9687
9663
|
}
|
|
9688
|
-
|
|
9689
|
-
//#region src/flows-ensure.ts
|
|
9664
|
+
// src/flows-ensure.ts
|
|
9690
9665
|
function normalizeConfigForHash(config) {
|
|
9691
9666
|
if (!isPlainObject$1(config)) return {};
|
|
9692
9667
|
const normalized = {};
|
|
@@ -10082,8 +10057,7 @@ async function convergeInlineEvals(client, definition, result, onConflict) {
|
|
|
10082
10057
|
async function pullFlow(client, name) {
|
|
10083
10058
|
return client.get("/flows/pull", { name });
|
|
10084
10059
|
}
|
|
10085
|
-
|
|
10086
|
-
//#region src/flows-namespace.ts
|
|
10060
|
+
// src/flows-namespace.ts
|
|
10087
10061
|
/** The persisted-flow protocol retries only when the API names the hash miss; any other 422 is terminal. */
|
|
10088
10062
|
function isPersistedFlowHashMiss(err) {
|
|
10089
10063
|
if (err == null || typeof err !== "object") return false;
|
|
@@ -10972,8 +10946,7 @@ var RuntypeFlowBuilder = class {
|
|
|
10972
10946
|
});
|
|
10973
10947
|
}
|
|
10974
10948
|
};
|
|
10975
|
-
|
|
10976
|
-
//#region src/batches-namespace.ts
|
|
10949
|
+
// src/batches-namespace.ts
|
|
10977
10950
|
var BatchesNamespace = class {
|
|
10978
10951
|
constructor(getClient) {
|
|
10979
10952
|
this.getClient = getClient;
|
|
@@ -11072,8 +11045,7 @@ var BatchesNamespace = class {
|
|
|
11072
11045
|
return this.getClient().get("/batches", params);
|
|
11073
11046
|
}
|
|
11074
11047
|
};
|
|
11075
|
-
|
|
11076
|
-
//#region src/evals-suites.ts
|
|
11048
|
+
// src/evals-suites.ts
|
|
11077
11049
|
var EvalSuitesNamespace = class {
|
|
11078
11050
|
constructor(getClient) {
|
|
11079
11051
|
this.getClient = getClient;
|
|
@@ -11176,8 +11148,7 @@ var EvalSuitesNamespace = class {
|
|
|
11176
11148
|
return this.getClient().get(`/eval/suites/${suiteId}/coverage`);
|
|
11177
11149
|
}
|
|
11178
11150
|
};
|
|
11179
|
-
|
|
11180
|
-
//#region src/evals-namespace.ts
|
|
11151
|
+
// src/evals-namespace.ts
|
|
11181
11152
|
/**
|
|
11182
11153
|
* EvalRunner - Builder returned by Runtype.evals.run()
|
|
11183
11154
|
*
|
|
@@ -11422,8 +11393,7 @@ var EvalsNamespace = class {
|
|
|
11422
11393
|
return this.getClient().get("/evals", params);
|
|
11423
11394
|
}
|
|
11424
11395
|
};
|
|
11425
|
-
|
|
11426
|
-
//#region src/prompts-namespace.ts
|
|
11396
|
+
// src/prompts-namespace.ts
|
|
11427
11397
|
var PromptsNamespace = class {
|
|
11428
11398
|
constructor(getClient) {
|
|
11429
11399
|
this.getClient = getClient;
|
|
@@ -11500,8 +11470,7 @@ var PromptsNamespace = class {
|
|
|
11500
11470
|
await this.getClient().post(`/prompts/${promptId}/delete`);
|
|
11501
11471
|
}
|
|
11502
11472
|
};
|
|
11503
|
-
|
|
11504
|
-
//#region src/skills-ensure.ts
|
|
11473
|
+
// src/skills-ensure.ts
|
|
11505
11474
|
/** Canonical normalized form of a skill manifest (frontmatter name excluded). */
|
|
11506
11475
|
function normalizeSkillDefinition(definition) {
|
|
11507
11476
|
const manifest = isPlainObject$1(definition.manifest) ? definition.manifest : {};
|
|
@@ -11703,8 +11672,7 @@ function manifestToWire(definition) {
|
|
|
11703
11672
|
async function pullSkill(client, name) {
|
|
11704
11673
|
return client.get("/skills/pull", { name });
|
|
11705
11674
|
}
|
|
11706
|
-
|
|
11707
|
-
//#region src/skills-namespace.ts
|
|
11675
|
+
// src/skills-namespace.ts
|
|
11708
11676
|
/**
|
|
11709
11677
|
* The admin review queue for agent-authored skill proposals. This is the human
|
|
11710
11678
|
* review surface for the deployed-agent data plane — listing, approving, and
|
|
@@ -11923,8 +11891,7 @@ var SkillsNamespace = class {
|
|
|
11923
11891
|
return pullSkill(this.getClient(), name);
|
|
11924
11892
|
}
|
|
11925
11893
|
};
|
|
11926
|
-
|
|
11927
|
-
//#region src/agents-namespace.ts
|
|
11894
|
+
// src/agents-namespace.ts
|
|
11928
11895
|
/**
|
|
11929
11896
|
* The refusal a client-side `release` + `deploy` mix answers with. Byte-identical
|
|
11930
11897
|
* to the server's, so both spellings of the mistake read the same.
|
|
@@ -12277,8 +12244,7 @@ var AgentsNamespace = class {
|
|
|
12277
12244
|
}
|
|
12278
12245
|
}
|
|
12279
12246
|
};
|
|
12280
|
-
|
|
12281
|
-
//#region src/executions-namespace.ts
|
|
12247
|
+
// src/executions-namespace.ts
|
|
12282
12248
|
/** Read-only namespace for durable asynchronous execution handles. */
|
|
12283
12249
|
var ExecutionsNamespace = class {
|
|
12284
12250
|
constructor(getClient) {
|
|
@@ -12288,8 +12254,7 @@ var ExecutionsNamespace = class {
|
|
|
12288
12254
|
return this.getClient().getExecutionStatus(executionId);
|
|
12289
12255
|
}
|
|
12290
12256
|
};
|
|
12291
|
-
|
|
12292
|
-
//#region src/runs-namespace.ts
|
|
12257
|
+
// src/runs-namespace.ts
|
|
12293
12258
|
/**
|
|
12294
12259
|
* Read-only namespace over `/v1/runs`, the one list of agent and flow runs.
|
|
12295
12260
|
* A dashboard editor test is listed with `origin: 'dashboard'` (and its `test`
|
|
@@ -12306,8 +12271,7 @@ var RunsNamespace = class {
|
|
|
12306
12271
|
return (await this.getClient().get(`/runs/${encodeURIComponent(executionId)}`, params)).data;
|
|
12307
12272
|
}
|
|
12308
12273
|
};
|
|
12309
|
-
|
|
12310
|
-
//#region src/tools-ensure.ts
|
|
12274
|
+
// src/tools-ensure.ts
|
|
12311
12275
|
/** Canonical normalized form of a tool definition (name excluded — identity). */
|
|
12312
12276
|
function normalizeToolDefinition(definition) {
|
|
12313
12277
|
const parametersSchema = isPlainObject$1(definition.parametersSchema) ? normalizeValue$1(definition.parametersSchema) : {};
|
|
@@ -12507,8 +12471,7 @@ async function ensureTool(client, definition, options = {}) {
|
|
|
12507
12471
|
async function pullTool(client, name) {
|
|
12508
12472
|
return client.get("/tools/pull", { name });
|
|
12509
12473
|
}
|
|
12510
|
-
|
|
12511
|
-
//#region src/tools-namespace.ts
|
|
12474
|
+
// src/tools-namespace.ts
|
|
12512
12475
|
var ToolsNamespace = class {
|
|
12513
12476
|
constructor(getClient) {
|
|
12514
12477
|
this.getClient = getClient;
|
|
@@ -12546,8 +12509,7 @@ var ToolsNamespace = class {
|
|
|
12546
12509
|
return pullTool(this.getClient(), name);
|
|
12547
12510
|
}
|
|
12548
12511
|
};
|
|
12549
|
-
|
|
12550
|
-
//#region src/question-sets-ensure.ts
|
|
12512
|
+
// src/question-sets-ensure.ts
|
|
12551
12513
|
/** Canonical form of a question set definition, without its slug. */
|
|
12552
12514
|
function normalizeQuestionSetDefinition(definition) {
|
|
12553
12515
|
return normalizeValue$1({
|
|
@@ -12694,8 +12656,7 @@ async function ensureQuestionSet(client, definition, options = {}) {
|
|
|
12694
12656
|
async function pullQuestionSet(client, slug) {
|
|
12695
12657
|
return client.get("/question-sets/pull", { slug });
|
|
12696
12658
|
}
|
|
12697
|
-
|
|
12698
|
-
//#region src/question-sets-namespace.ts
|
|
12659
|
+
// src/question-sets-namespace.ts
|
|
12699
12660
|
/** Question set config-as-code: `ensure` and `pull`. */
|
|
12700
12661
|
var QuestionSetsNamespace = class {
|
|
12701
12662
|
constructor(getClient) {
|
|
@@ -12720,8 +12681,7 @@ var QuestionSetsNamespace = class {
|
|
|
12720
12681
|
return pullQuestionSet(this.getClient(), slug);
|
|
12721
12682
|
}
|
|
12722
12683
|
};
|
|
12723
|
-
|
|
12724
|
-
//#region src/signals-namespace.ts
|
|
12684
|
+
// src/signals-namespace.ts
|
|
12725
12685
|
function pathId(id) {
|
|
12726
12686
|
return encodeURIComponent(id);
|
|
12727
12687
|
}
|
|
@@ -12787,8 +12747,7 @@ var SignalsNamespace = class {
|
|
|
12787
12747
|
return this.getClient().get("/signals/stats", params);
|
|
12788
12748
|
}
|
|
12789
12749
|
};
|
|
12790
|
-
|
|
12791
|
-
//#region src/products-ensure.ts
|
|
12750
|
+
// src/products-ensure.ts
|
|
12792
12751
|
/**
|
|
12793
12752
|
* `spec` with its stack as a save stores it: without the server-set fields (`detected`, `declared`,
|
|
12794
12753
|
* `hiddenAt`), which their own write paths set, and with `hidden` deduplicated.
|
|
@@ -12981,8 +12940,7 @@ async function ensureProduct(client, definition, options = {}) {
|
|
|
12981
12940
|
async function pullProduct(client, name) {
|
|
12982
12941
|
return client.get("/products/pull", { name });
|
|
12983
12942
|
}
|
|
12984
|
-
|
|
12985
|
-
//#region src/products-ensure-fpo.ts
|
|
12943
|
+
// src/products-ensure-fpo.ts
|
|
12986
12944
|
/**
|
|
12987
12945
|
* Canonical normalized form of an FPO: `_meta` and the top-level `product.name`
|
|
12988
12946
|
* are excluded (generation provenance / identity), the whole graph is recursively
|
|
@@ -13111,8 +13069,7 @@ async function ensureFpo(client, fpo, options = {}) {
|
|
|
13111
13069
|
async function pullFpo(client, name) {
|
|
13112
13070
|
return client.get("/products/pull-fpo", { name });
|
|
13113
13071
|
}
|
|
13114
|
-
|
|
13115
|
-
//#region src/products-namespace.ts
|
|
13072
|
+
// src/products-namespace.ts
|
|
13116
13073
|
var ProductsNamespace = class {
|
|
13117
13074
|
constructor(getClient) {
|
|
13118
13075
|
this.getClient = getClient;
|
|
@@ -13203,8 +13160,7 @@ var ProductsNamespace = class {
|
|
|
13203
13160
|
return this.getClient().get(`/products/${encodeURIComponent(productId)}/activity`, options.limit === void 0 ? void 0 : { limit: String(options.limit) });
|
|
13204
13161
|
}
|
|
13205
13162
|
};
|
|
13206
|
-
|
|
13207
|
-
//#region src/surfaces-ensure.ts
|
|
13163
|
+
// src/surfaces-ensure.ts
|
|
13208
13164
|
/**
|
|
13209
13165
|
* Canonical normalized form of a surface definition (name excluded — identity).
|
|
13210
13166
|
* `inbound` / `outbound` are EXCLUDED — they carry sealed secrets that hash
|
|
@@ -13425,8 +13381,7 @@ async function ensureSurface(client, productId, definition, options = {}) {
|
|
|
13425
13381
|
async function pullSurface(client, productId, name) {
|
|
13426
13382
|
return client.get(`/products/${encodeURIComponent(productId)}/surfaces/pull`, { name });
|
|
13427
13383
|
}
|
|
13428
|
-
|
|
13429
|
-
//#region src/surfaces-namespace.ts
|
|
13384
|
+
// src/surfaces-namespace.ts
|
|
13430
13385
|
var SurfacesNamespace = class {
|
|
13431
13386
|
constructor(getClient) {
|
|
13432
13387
|
this.getClient = getClient;
|
|
@@ -13463,8 +13418,7 @@ var SurfacesNamespace = class {
|
|
|
13463
13418
|
return pullSurface(this.getClient(), productId, name);
|
|
13464
13419
|
}
|
|
13465
13420
|
};
|
|
13466
|
-
|
|
13467
|
-
//#region src/client-tokens-namespace.ts
|
|
13421
|
+
// src/client-tokens-namespace.ts
|
|
13468
13422
|
/** The definition cannot converge onto the existing token without deleting it. */
|
|
13469
13423
|
var ClientTokenEnsureError = class extends Error {
|
|
13470
13424
|
constructor(message) {
|
|
@@ -13616,8 +13570,7 @@ var ClientTokensNamespace = class {
|
|
|
13616
13570
|
};
|
|
13617
13571
|
}
|
|
13618
13572
|
};
|
|
13619
|
-
|
|
13620
|
-
//#region src/runtype.ts
|
|
13573
|
+
// src/runtype.ts
|
|
13621
13574
|
let globalConfig = {};
|
|
13622
13575
|
let globalClient = null;
|
|
13623
13576
|
/**
|
|
@@ -14248,8 +14201,7 @@ var Runtype = class {
|
|
|
14248
14201
|
return new ClientTokensNamespace(() => this.getClient());
|
|
14249
14202
|
}
|
|
14250
14203
|
};
|
|
14251
|
-
|
|
14252
|
-
//#region src/a2a-handler.ts
|
|
14204
|
+
// src/a2a-handler.ts
|
|
14253
14205
|
function record(value) {
|
|
14254
14206
|
return value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0;
|
|
14255
14207
|
}
|
|
@@ -14416,8 +14368,7 @@ function createA2AHandler(options) {
|
|
|
14416
14368
|
}
|
|
14417
14369
|
};
|
|
14418
14370
|
}
|
|
14419
|
-
|
|
14420
|
-
//#region src/agent-promotion.ts
|
|
14371
|
+
// src/agent-promotion.ts
|
|
14421
14372
|
const MANIFEST_VERSION = 1;
|
|
14422
14373
|
/** Receipts read per page, and the page ceiling, while hunting the staged receipt. */
|
|
14423
14374
|
const RECEIPT_PAGE_SIZE = 50;
|
|
@@ -14611,8 +14562,7 @@ async function promoteAgent(input) {
|
|
|
14611
14562
|
})
|
|
14612
14563
|
};
|
|
14613
14564
|
}
|
|
14614
|
-
|
|
14615
|
-
//#region src/simulations-namespace.ts
|
|
14565
|
+
// src/simulations-namespace.ts
|
|
14616
14566
|
const segment = encodeURIComponent;
|
|
14617
14567
|
/**
|
|
14618
14568
|
* Simulations tool memory and future designs (`/v1/simulations`): recorded exchanges, tool profiles,
|
|
@@ -14690,8 +14640,7 @@ var SimulationsEndpoint = class {
|
|
|
14690
14640
|
return this.client.get(`/simulations/runs/${segment(runId)}/episodes/${segment(episodeId)}`);
|
|
14691
14641
|
}
|
|
14692
14642
|
};
|
|
14693
|
-
|
|
14694
|
-
//#region src/transform.ts
|
|
14643
|
+
// src/transform.ts
|
|
14695
14644
|
/**
|
|
14696
14645
|
* Transform URL query parameters
|
|
14697
14646
|
*/
|
|
@@ -14703,9 +14652,8 @@ function transformQueryParams(params) {
|
|
|
14703
14652
|
}
|
|
14704
14653
|
return result;
|
|
14705
14654
|
}
|
|
14706
|
-
|
|
14707
|
-
|
|
14708
|
-
const SDK_VERSION = "11.8.0";
|
|
14655
|
+
// src/version.ts
|
|
14656
|
+
const SDK_VERSION = "11.8.2";
|
|
14709
14657
|
/**
|
|
14710
14658
|
* Canonical client identity the API uses for attribution
|
|
14711
14659
|
* (`detectActorSource` in apps/api/src/lib/audit-log.ts keys `'sdk'` off the
|
|
@@ -14721,8 +14669,7 @@ const RUNTYPE_CLIENT_KIND = "sdk";
|
|
|
14721
14669
|
* is the reliable cross-environment signal; this UA carries the version + language.
|
|
14722
14670
|
*/
|
|
14723
14671
|
const SDK_USER_AGENT = `runtype-sdk/${SDK_VERSION} (typescript)`;
|
|
14724
|
-
|
|
14725
|
-
//#region src/client.ts
|
|
14672
|
+
// src/client.ts
|
|
14726
14673
|
function isObjectRecord(value) {
|
|
14727
14674
|
return typeof value === "object" && value !== null;
|
|
14728
14675
|
}
|
|
@@ -15241,8 +15188,7 @@ var RuntypeApiError = class extends Error {
|
|
|
15241
15188
|
function createClient(config) {
|
|
15242
15189
|
return new RuntypeClient(config);
|
|
15243
15190
|
}
|
|
15244
|
-
|
|
15245
|
-
//#region src/batch-builder.ts
|
|
15191
|
+
// src/batch-builder.ts
|
|
15246
15192
|
var BatchBuilder = class {
|
|
15247
15193
|
constructor() {
|
|
15248
15194
|
this.flowId = "";
|
|
@@ -15334,8 +15280,7 @@ var ClientBatchBuilder = class extends BatchBuilder {
|
|
|
15334
15280
|
return this.boundClient.batch(config);
|
|
15335
15281
|
}
|
|
15336
15282
|
};
|
|
15337
|
-
|
|
15338
|
-
//#region src/eval-builder.ts
|
|
15283
|
+
// src/eval-builder.ts
|
|
15339
15284
|
var EvalBuilder = class {
|
|
15340
15285
|
constructor() {
|
|
15341
15286
|
this.evalOptions = {};
|
|
@@ -16967,7 +16912,6 @@ const STEP_TYPE_TO_METHOD = {
|
|
|
16967
16912
|
"memory-summary": "memorySummary",
|
|
16968
16913
|
extract: "extract"
|
|
16969
16914
|
};
|
|
16970
|
-
//#endregion
|
|
16971
16915
|
exports.AgentAliasDependencyError = AgentAliasDependencyError;
|
|
16972
16916
|
exports.AgentAliasNotFoundError = AgentAliasNotFoundError;
|
|
16973
16917
|
exports.AgentAliasRevisionMismatchError = AgentAliasRevisionMismatchError;
|