@runtypelabs/sdk 1.19.1 → 1.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +253 -0
- package/dist/index.d.cts +87 -1
- package/dist/index.d.ts +87 -1
- package/dist/index.mjs +251 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -305,6 +305,8 @@ __export(index_exports, {
|
|
|
305
305
|
RuntypeApiError: () => RuntypeApiError,
|
|
306
306
|
RuntypeClient: () => RuntypeClient2,
|
|
307
307
|
RuntypeFlowBuilder: () => RuntypeFlowBuilder,
|
|
308
|
+
STEP_FIELD_REGISTRY: () => STEP_FIELD_REGISTRY,
|
|
309
|
+
STEP_TYPE_TO_METHOD: () => STEP_TYPE_TO_METHOD,
|
|
308
310
|
ToolsEndpoint: () => ToolsEndpoint,
|
|
309
311
|
UsersEndpoint: () => UsersEndpoint,
|
|
310
312
|
applyGeneratedRuntimeToolProposalToDispatchRequest: () => applyGeneratedRuntimeToolProposalToDispatchRequest,
|
|
@@ -8405,6 +8407,255 @@ var ClientEvalBuilder = class extends EvalBuilder {
|
|
|
8405
8407
|
return this.boundClient.eval(config);
|
|
8406
8408
|
}
|
|
8407
8409
|
};
|
|
8410
|
+
|
|
8411
|
+
// src/codegen-metadata.ts
|
|
8412
|
+
var PROMPT_FIELDS = [
|
|
8413
|
+
{ key: "model", format: "json" },
|
|
8414
|
+
{ key: "userPrompt", format: "template" },
|
|
8415
|
+
{ key: "systemPrompt", format: "template" },
|
|
8416
|
+
{ key: "previousMessages", format: "value" },
|
|
8417
|
+
{ key: "outputVariable", format: "json" },
|
|
8418
|
+
{ key: "responseFormat", format: "json", skipDefault: "text" },
|
|
8419
|
+
{ key: "temperature", format: "raw" },
|
|
8420
|
+
{ key: "topP", format: "raw" },
|
|
8421
|
+
{ key: "topK", format: "raw" },
|
|
8422
|
+
{ key: "frequencyPenalty", format: "raw" },
|
|
8423
|
+
{ key: "presencePenalty", format: "raw" },
|
|
8424
|
+
{ key: "seed", format: "raw" },
|
|
8425
|
+
{ key: "maxTokens", format: "raw" },
|
|
8426
|
+
{ key: "reasoning", format: "value" },
|
|
8427
|
+
{ key: "streamOutput", format: "raw", emitWhen: "falsy" },
|
|
8428
|
+
{ key: "tools", format: "value" },
|
|
8429
|
+
{ key: "errorHandling", format: "value", skipDefault: "fail" }
|
|
8430
|
+
];
|
|
8431
|
+
var CRAWL_FIELDS = [
|
|
8432
|
+
{ key: "url", format: "json" },
|
|
8433
|
+
{ key: "limit", format: "raw" },
|
|
8434
|
+
{ key: "depth", format: "raw" },
|
|
8435
|
+
{ key: "source", format: "json" },
|
|
8436
|
+
{ key: "formats", format: "value" },
|
|
8437
|
+
{ key: "render", format: "raw" },
|
|
8438
|
+
{ key: "maxAge", format: "raw" },
|
|
8439
|
+
{ key: "modifiedSince", format: "json" },
|
|
8440
|
+
{ key: "options", format: "value" },
|
|
8441
|
+
{ key: "authenticate", format: "value" },
|
|
8442
|
+
{ key: "cookies", format: "value" },
|
|
8443
|
+
{ key: "setExtraHTTPHeaders", format: "value" },
|
|
8444
|
+
{ key: "gotoOptions", format: "value" },
|
|
8445
|
+
{ key: "waitForSelector", format: "json" },
|
|
8446
|
+
{ key: "rejectResourceTypes", format: "value" },
|
|
8447
|
+
{ key: "rejectRequestPattern", format: "value" },
|
|
8448
|
+
{ key: "userAgent", format: "json" },
|
|
8449
|
+
{ key: "jsonOptions", format: "value" },
|
|
8450
|
+
{ key: "pollIntervalMs", format: "raw" },
|
|
8451
|
+
{ key: "completionTimeoutMs", format: "raw" },
|
|
8452
|
+
{ key: "outputVariable", format: "json" },
|
|
8453
|
+
{ key: "streamOutput", format: "raw" },
|
|
8454
|
+
{ key: "errorHandling", format: "value", skipDefault: "fail" }
|
|
8455
|
+
];
|
|
8456
|
+
var FETCH_URL_FIELDS = [
|
|
8457
|
+
{ key: "url", format: "json", source: "http.url" },
|
|
8458
|
+
{ key: "method", format: "json", source: "http.method", skipDefault: "GET" },
|
|
8459
|
+
{ key: "headers", format: "value", source: "http.headers" },
|
|
8460
|
+
{ key: "body", format: "template", source: "http.body" },
|
|
8461
|
+
{ key: "responseType", format: "json" },
|
|
8462
|
+
{ key: "markdownIfAvailable", format: "raw" },
|
|
8463
|
+
{ key: "fetchMethod", format: "json", skipDefault: "http" },
|
|
8464
|
+
{ key: "firecrawl", format: "value" },
|
|
8465
|
+
{ key: "outputVariable", format: "json" },
|
|
8466
|
+
{ key: "streamOutput", format: "raw" },
|
|
8467
|
+
{ key: "errorHandling", format: "value", skipDefault: "fail" }
|
|
8468
|
+
];
|
|
8469
|
+
var TRANSFORM_DATA_FIELDS = [
|
|
8470
|
+
{ key: "script", format: "template" },
|
|
8471
|
+
{ key: "outputVariable", format: "json" },
|
|
8472
|
+
{ key: "sandboxProvider", format: "json" },
|
|
8473
|
+
{ key: "streamOutput", format: "raw" }
|
|
8474
|
+
];
|
|
8475
|
+
var SET_VARIABLE_FIELDS = [
|
|
8476
|
+
{ key: "variableName", format: "json" },
|
|
8477
|
+
{ key: "value", format: "template" }
|
|
8478
|
+
];
|
|
8479
|
+
var CONDITIONAL_FIELDS = [
|
|
8480
|
+
{ key: "condition", format: "template" },
|
|
8481
|
+
{ key: "trueSteps", format: "value" },
|
|
8482
|
+
{ key: "falseSteps", format: "value" }
|
|
8483
|
+
];
|
|
8484
|
+
var SEARCH_FIELDS = [
|
|
8485
|
+
{ key: "provider", format: "json" },
|
|
8486
|
+
{ key: "query", format: "template" },
|
|
8487
|
+
{ key: "maxResults", format: "raw", skipDefault: 10 },
|
|
8488
|
+
{ key: "returnCitations", format: "raw" },
|
|
8489
|
+
{ key: "outputVariable", format: "json" },
|
|
8490
|
+
{ key: "streamOutput", format: "raw" },
|
|
8491
|
+
{ key: "errorHandling", format: "value", skipDefault: "fail" }
|
|
8492
|
+
];
|
|
8493
|
+
var SEND_EMAIL_FIELDS = [
|
|
8494
|
+
{ key: "to", format: "json" },
|
|
8495
|
+
{ key: "from", format: "json" },
|
|
8496
|
+
{ key: "subject", format: "template" },
|
|
8497
|
+
{ key: "html", format: "template" },
|
|
8498
|
+
{ key: "outputVariable", format: "json" },
|
|
8499
|
+
{ key: "streamOutput", format: "raw" },
|
|
8500
|
+
{ key: "errorHandling", format: "value", skipDefault: "fail" }
|
|
8501
|
+
];
|
|
8502
|
+
var SEND_STREAM_FIELDS = [
|
|
8503
|
+
{ key: "message", format: "template" }
|
|
8504
|
+
];
|
|
8505
|
+
var RETRIEVE_RECORD_FIELDS = [
|
|
8506
|
+
{ key: "recordType", format: "json" },
|
|
8507
|
+
{ key: "recordName", format: "json" },
|
|
8508
|
+
{ key: "recordFilter", format: "value" },
|
|
8509
|
+
{ key: "fieldsToInclude", format: "json" },
|
|
8510
|
+
{ key: "fieldsToExclude", format: "json" },
|
|
8511
|
+
{ key: "outputVariable", format: "json" },
|
|
8512
|
+
{ key: "streamOutput", format: "raw" }
|
|
8513
|
+
];
|
|
8514
|
+
var UPSERT_RECORD_FIELDS = [
|
|
8515
|
+
{ key: "recordType", format: "json" },
|
|
8516
|
+
{ key: "recordName", format: "json" },
|
|
8517
|
+
{ key: "sourceVariable", format: "json" },
|
|
8518
|
+
{ key: "mergeStrategy", format: "json", skipDefault: "merge" },
|
|
8519
|
+
{ key: "outputVariable", format: "json" },
|
|
8520
|
+
{ key: "streamOutput", format: "raw" },
|
|
8521
|
+
{ key: "errorHandling", format: "value", skipDefault: "fail" }
|
|
8522
|
+
];
|
|
8523
|
+
var VECTOR_SEARCH_FIELDS = [
|
|
8524
|
+
{ key: "query", format: "template" },
|
|
8525
|
+
{ key: "recordType", format: "json" },
|
|
8526
|
+
{ key: "embeddingModel", format: "json" },
|
|
8527
|
+
{ key: "limit", format: "raw", skipDefault: 5 },
|
|
8528
|
+
{ key: "threshold", format: "raw", skipDefault: 0.7 },
|
|
8529
|
+
{ key: "outputVariable", format: "json" },
|
|
8530
|
+
{ key: "streamOutput", format: "raw" }
|
|
8531
|
+
];
|
|
8532
|
+
var GENERATE_EMBEDDING_FIELDS = [
|
|
8533
|
+
{ key: "text", format: "template" },
|
|
8534
|
+
{ key: "embeddingModel", format: "json" },
|
|
8535
|
+
{ key: "maxLength", format: "raw" },
|
|
8536
|
+
{ key: "outputVariable", format: "json" },
|
|
8537
|
+
{ key: "streamOutput", format: "raw" }
|
|
8538
|
+
];
|
|
8539
|
+
var WAIT_UNTIL_FIELDS = [
|
|
8540
|
+
{ key: "delayMs", format: "raw" },
|
|
8541
|
+
{ key: "continueOnTimeout", format: "raw", emitWhen: "truthy" },
|
|
8542
|
+
{ key: "poll", format: "value", sourceCheck: "poll.enabled" },
|
|
8543
|
+
{ key: "outputVariable", format: "json" },
|
|
8544
|
+
{ key: "streamOutput", format: "raw" },
|
|
8545
|
+
{ key: "errorHandling", format: "value", skipDefault: "fail" }
|
|
8546
|
+
];
|
|
8547
|
+
var SEND_EVENT_FIELDS = [
|
|
8548
|
+
{ key: "provider", format: "json" },
|
|
8549
|
+
{ key: "eventName", format: "json" },
|
|
8550
|
+
{ key: "properties", format: "value" },
|
|
8551
|
+
{ key: "outputVariable", format: "json" },
|
|
8552
|
+
{ key: "streamOutput", format: "raw" },
|
|
8553
|
+
{ key: "errorHandling", format: "value", skipDefault: "fail" }
|
|
8554
|
+
];
|
|
8555
|
+
var SEND_TEXT_FIELDS = [
|
|
8556
|
+
{ key: "to", format: "json" },
|
|
8557
|
+
{ key: "from", format: "json" },
|
|
8558
|
+
{ key: "message", format: "template" },
|
|
8559
|
+
{ key: "outputVariable", format: "json" },
|
|
8560
|
+
{ key: "streamOutput", format: "raw" },
|
|
8561
|
+
{ key: "errorHandling", format: "value", skipDefault: "fail" }
|
|
8562
|
+
];
|
|
8563
|
+
var FETCH_GITHUB_FIELDS = [
|
|
8564
|
+
{ key: "repository", format: "json" },
|
|
8565
|
+
{ key: "branch", format: "json" },
|
|
8566
|
+
{ key: "path", format: "json" },
|
|
8567
|
+
{ key: "outputVariable", format: "json" },
|
|
8568
|
+
{ key: "streamOutput", format: "raw" }
|
|
8569
|
+
];
|
|
8570
|
+
var TEMPLATE_FIELDS = [
|
|
8571
|
+
{ key: "template", format: "template" },
|
|
8572
|
+
{ key: "outputFormat", format: "json" },
|
|
8573
|
+
{ key: "inputs", format: "value" },
|
|
8574
|
+
{ key: "partials", format: "value" },
|
|
8575
|
+
{ key: "pdfOptions", format: "value" },
|
|
8576
|
+
{ key: "asArtifact", format: "raw" },
|
|
8577
|
+
{ key: "streamOutput", format: "raw" },
|
|
8578
|
+
{ key: "outputVariable", format: "json" },
|
|
8579
|
+
{ key: "errorHandling", format: "value", skipDefault: "fail" }
|
|
8580
|
+
];
|
|
8581
|
+
var STORE_ASSET_FIELDS = [
|
|
8582
|
+
{ key: "url", format: "json" },
|
|
8583
|
+
{ key: "content", format: "template" },
|
|
8584
|
+
{ key: "filename", format: "json" },
|
|
8585
|
+
{ key: "contentType", format: "json" },
|
|
8586
|
+
{ key: "visibility", format: "json" },
|
|
8587
|
+
{ key: "outputVariable", format: "json" },
|
|
8588
|
+
{ key: "errorHandling", format: "value", skipDefault: "fail" }
|
|
8589
|
+
];
|
|
8590
|
+
var GENERATE_PDF_FIELDS = [
|
|
8591
|
+
{ key: "html", format: "template" },
|
|
8592
|
+
{ key: "markdown", format: "template" },
|
|
8593
|
+
{ key: "filename", format: "json" },
|
|
8594
|
+
{ key: "visibility", format: "json" },
|
|
8595
|
+
{ key: "pdfOptions", format: "value" },
|
|
8596
|
+
{ key: "outputVariable", format: "json" },
|
|
8597
|
+
{ key: "errorHandling", format: "value", skipDefault: "fail" }
|
|
8598
|
+
];
|
|
8599
|
+
var COMMON_ONLY_FIELDS = [
|
|
8600
|
+
{ key: "outputVariable", format: "json" },
|
|
8601
|
+
{ key: "errorHandling", format: "value", skipDefault: "fail" }
|
|
8602
|
+
];
|
|
8603
|
+
var STEP_FIELD_REGISTRY = {
|
|
8604
|
+
"prompt": PROMPT_FIELDS,
|
|
8605
|
+
"crawl": CRAWL_FIELDS,
|
|
8606
|
+
"fetch-url": FETCH_URL_FIELDS,
|
|
8607
|
+
"api-call": FETCH_URL_FIELDS,
|
|
8608
|
+
"transform-data": TRANSFORM_DATA_FIELDS,
|
|
8609
|
+
"set-variable": SET_VARIABLE_FIELDS,
|
|
8610
|
+
"conditional": CONDITIONAL_FIELDS,
|
|
8611
|
+
"search": SEARCH_FIELDS,
|
|
8612
|
+
"send-email": SEND_EMAIL_FIELDS,
|
|
8613
|
+
"send-stream": SEND_STREAM_FIELDS,
|
|
8614
|
+
"retrieve-record": RETRIEVE_RECORD_FIELDS,
|
|
8615
|
+
"upsert-record": UPSERT_RECORD_FIELDS,
|
|
8616
|
+
"update-record": UPSERT_RECORD_FIELDS,
|
|
8617
|
+
"vector-search": VECTOR_SEARCH_FIELDS,
|
|
8618
|
+
"generate-embedding": GENERATE_EMBEDDING_FIELDS,
|
|
8619
|
+
"wait-until": WAIT_UNTIL_FIELDS,
|
|
8620
|
+
"send-event": SEND_EVENT_FIELDS,
|
|
8621
|
+
"send-text": SEND_TEXT_FIELDS,
|
|
8622
|
+
"fetch-github": FETCH_GITHUB_FIELDS,
|
|
8623
|
+
"template": TEMPLATE_FIELDS,
|
|
8624
|
+
"store-asset": STORE_ASSET_FIELDS,
|
|
8625
|
+
"generate-pdf": GENERATE_PDF_FIELDS,
|
|
8626
|
+
"tool-call": COMMON_ONLY_FIELDS,
|
|
8627
|
+
"paginate-api": COMMON_ONLY_FIELDS,
|
|
8628
|
+
"store-vector": COMMON_ONLY_FIELDS,
|
|
8629
|
+
"execute-agent": COMMON_ONLY_FIELDS
|
|
8630
|
+
};
|
|
8631
|
+
var STEP_TYPE_TO_METHOD = {
|
|
8632
|
+
"prompt": "prompt",
|
|
8633
|
+
"crawl": "crawl",
|
|
8634
|
+
"fetch-url": "fetchUrl",
|
|
8635
|
+
"api-call": "apiCall",
|
|
8636
|
+
"retrieve-record": "retrieveRecord",
|
|
8637
|
+
"fetch-github": "fetchGitHub",
|
|
8638
|
+
"transform-data": "transformData",
|
|
8639
|
+
"template": "template",
|
|
8640
|
+
"conditional": "conditional",
|
|
8641
|
+
"set-variable": "setVariable",
|
|
8642
|
+
"upsert-record": "upsertRecord",
|
|
8643
|
+
"update-record": "updateRecord",
|
|
8644
|
+
"send-email": "sendEmail",
|
|
8645
|
+
"send-text": "sendText",
|
|
8646
|
+
"send-event": "sendEvent",
|
|
8647
|
+
"send-stream": "sendStream",
|
|
8648
|
+
"search": "search",
|
|
8649
|
+
"generate-embedding": "generateEmbedding",
|
|
8650
|
+
"vector-search": "vectorSearch",
|
|
8651
|
+
"tool-call": "toolCall",
|
|
8652
|
+
"wait-until": "waitUntil",
|
|
8653
|
+
"paginate-api": "paginateApi",
|
|
8654
|
+
"store-vector": "storeVector",
|
|
8655
|
+
"execute-agent": "executeAgent",
|
|
8656
|
+
"store-asset": "storeAsset",
|
|
8657
|
+
"generate-pdf": "generatePdf"
|
|
8658
|
+
};
|
|
8408
8659
|
// Annotate the CommonJS export names for ESM import in node:
|
|
8409
8660
|
0 && (module.exports = {
|
|
8410
8661
|
AgentsEndpoint,
|
|
@@ -8437,6 +8688,8 @@ var ClientEvalBuilder = class extends EvalBuilder {
|
|
|
8437
8688
|
RuntypeApiError,
|
|
8438
8689
|
RuntypeClient,
|
|
8439
8690
|
RuntypeFlowBuilder,
|
|
8691
|
+
STEP_FIELD_REGISTRY,
|
|
8692
|
+
STEP_TYPE_TO_METHOD,
|
|
8440
8693
|
ToolsEndpoint,
|
|
8441
8694
|
UsersEndpoint,
|
|
8442
8695
|
applyGeneratedRuntimeToolProposalToDispatchRequest,
|
package/dist/index.d.cts
CHANGED
|
@@ -1077,10 +1077,36 @@ interface SendStreamStepConfig$1 {
|
|
|
1077
1077
|
/** JavaScript predicate evaluated at runtime. If falsy, the step is skipped. */
|
|
1078
1078
|
when?: string;
|
|
1079
1079
|
}
|
|
1080
|
+
/**
|
|
1081
|
+
* Operator allowlist for chip-style record filters. Mirrors the API's
|
|
1082
|
+
* `record-filter-compiler.ts`. Kept inline here to avoid a hard dependency
|
|
1083
|
+
* on `@runtypelabs/shared` from the published SDK.
|
|
1084
|
+
*/
|
|
1085
|
+
type RecordFilterOperator = 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'between' | 'contains' | 'startsWith' | 'endsWith' | 'in' | 'notIn' | 'isSet' | 'isNotSet' | 'isTrue' | 'isFalse' | 'withinLastDays' | 'olderThanDays';
|
|
1086
|
+
interface RecordFilterCondition {
|
|
1087
|
+
field: string;
|
|
1088
|
+
op: RecordFilterOperator;
|
|
1089
|
+
value?: unknown;
|
|
1090
|
+
}
|
|
1091
|
+
interface RecordFilterGroup {
|
|
1092
|
+
op: 'and' | 'or';
|
|
1093
|
+
conditions: Array<RecordFilterCondition | RecordFilterGroup>;
|
|
1094
|
+
}
|
|
1095
|
+
interface RecordFilter {
|
|
1096
|
+
type: string;
|
|
1097
|
+
where?: RecordFilterCondition | RecordFilterGroup;
|
|
1098
|
+
}
|
|
1080
1099
|
interface RetrieveRecordStepConfig$1 {
|
|
1081
1100
|
name: string;
|
|
1082
1101
|
recordType?: string;
|
|
1083
1102
|
recordName?: string;
|
|
1103
|
+
/**
|
|
1104
|
+
* Optional chip-style filter (metadata + top-level columns: id, name,
|
|
1105
|
+
* createdAt, updatedAt). Coexists with recordType/recordName for
|
|
1106
|
+
* backward compatibility; the API executor prefers recordFilter when
|
|
1107
|
+
* both are set.
|
|
1108
|
+
*/
|
|
1109
|
+
recordFilter?: RecordFilter;
|
|
1084
1110
|
fieldsToInclude?: string[];
|
|
1085
1111
|
fieldsToExclude?: string[];
|
|
1086
1112
|
outputVariable?: string;
|
|
@@ -2007,10 +2033,13 @@ interface SendStreamStepConfig {
|
|
|
2007
2033
|
message: string;
|
|
2008
2034
|
enabled?: boolean;
|
|
2009
2035
|
}
|
|
2036
|
+
|
|
2010
2037
|
interface RetrieveRecordStepConfig {
|
|
2011
2038
|
name: string;
|
|
2012
2039
|
recordType?: string;
|
|
2013
2040
|
recordName?: string;
|
|
2041
|
+
/** Chip-style filter (metadata + top-level columns). See flow-builder.ts. */
|
|
2042
|
+
recordFilter?: RecordFilter;
|
|
2014
2043
|
fieldsToInclude?: string[];
|
|
2015
2044
|
fieldsToExclude?: string[];
|
|
2016
2045
|
outputVariable?: string;
|
|
@@ -5692,6 +5721,63 @@ declare class ClientEvalBuilder extends EvalBuilder {
|
|
|
5692
5721
|
run(): Promise<EvalResult>;
|
|
5693
5722
|
}
|
|
5694
5723
|
|
|
5724
|
+
/**
|
|
5725
|
+
* SDK Code Generation Metadata
|
|
5726
|
+
*
|
|
5727
|
+
* Type-safe field registry for generating SDK code from flow step configs.
|
|
5728
|
+
* Co-located with the step config interfaces so that adding or removing a
|
|
5729
|
+
* field on any config interface produces a compile error here, preventing
|
|
5730
|
+
* silent drift between the SDK and downstream code generators (e.g. the
|
|
5731
|
+
* dashboard's sdk-code-generator.ts).
|
|
5732
|
+
*/
|
|
5733
|
+
|
|
5734
|
+
/** How to serialize a field value into TypeScript source code. */
|
|
5735
|
+
type FieldFormat = 'json' | 'template' | 'raw' | 'value';
|
|
5736
|
+
/** Describes one field in a step config for code emission. */
|
|
5737
|
+
interface StepFieldMeta {
|
|
5738
|
+
/** Field key in the SDK config interface (emitted as the property name). */
|
|
5739
|
+
key: string;
|
|
5740
|
+
/** Serialization format. */
|
|
5741
|
+
format: FieldFormat;
|
|
5742
|
+
/**
|
|
5743
|
+
* Dot-path to read the value from the internal step config when it differs
|
|
5744
|
+
* from `key` (e.g. `'http.url'` for fetch-url).
|
|
5745
|
+
*/
|
|
5746
|
+
source?: string;
|
|
5747
|
+
/** Skip emission when the runtime value strictly equals this. */
|
|
5748
|
+
skipDefault?: unknown;
|
|
5749
|
+
/** Only emit when the value is truthy ('truthy') or falsy ('falsy'). */
|
|
5750
|
+
emitWhen?: 'truthy' | 'falsy';
|
|
5751
|
+
/**
|
|
5752
|
+
* Dot-path to a nested field that must be truthy for this field to emit.
|
|
5753
|
+
* Example: `'poll.enabled'` — emit the `poll` object only when `poll.enabled` is true.
|
|
5754
|
+
*/
|
|
5755
|
+
sourceCheck?: string;
|
|
5756
|
+
}
|
|
5757
|
+
/**
|
|
5758
|
+
* Maps step types to their field metadata arrays. Used by code generators to
|
|
5759
|
+
* iterate fields generically instead of maintaining per-step switch blocks.
|
|
5760
|
+
*
|
|
5761
|
+
* Step types with typed SDK config interfaces get compile-time checked entries.
|
|
5762
|
+
* Step types without interfaces (template, store-asset, generate-pdf) have
|
|
5763
|
+
* untyped field arrays matching the old switch-block behavior.
|
|
5764
|
+
*
|
|
5765
|
+
* Step types without typed interfaces or old switch-cases (tool-call,
|
|
5766
|
+
* paginate-api, store-vector, execute-agent) get a minimal entry with
|
|
5767
|
+
* just outputVariable and errorHandling (the common fields the old code
|
|
5768
|
+
* emitted for all step types).
|
|
5769
|
+
*
|
|
5770
|
+
* `api-call` shares fields with `fetch-url`; `update-record` shares with
|
|
5771
|
+
* `upsert-record`.
|
|
5772
|
+
*/
|
|
5773
|
+
declare const STEP_FIELD_REGISTRY: Record<string, readonly StepFieldMeta[]>;
|
|
5774
|
+
/**
|
|
5775
|
+
* Maps every step type to its FlowBuilder method name. Covers all known step
|
|
5776
|
+
* types including those without typed config interfaces. Code generators use
|
|
5777
|
+
* this instead of maintaining their own mapping.
|
|
5778
|
+
*/
|
|
5779
|
+
declare const STEP_TYPE_TO_METHOD: Record<string, string>;
|
|
5780
|
+
|
|
5695
5781
|
/**
|
|
5696
5782
|
* Default marathon workflow: research → planning → execution.
|
|
5697
5783
|
*
|
|
@@ -5760,4 +5846,4 @@ declare function getLikelySupportingCandidatePaths(bestCandidatePath: string | u
|
|
|
5760
5846
|
declare function getDefaultPlanPath(taskName: string): string;
|
|
5761
5847
|
declare function sanitizeTaskSlug(taskName: string): string;
|
|
5762
5848
|
|
|
5763
|
-
export { type Agent, type AgentApprovalCompleteEvent, type AgentApprovalStartEvent, type AgentCompleteEvent, type AgentErrorEvent, type AgentEvent, type AgentEventType, type AgentExecuteRequest, type AgentExecuteResponse, type AgentIterationCompleteEvent, type AgentIterationStartEvent, type AgentMediaEvent, type AgentMessage, type AgentPausedEvent, type AgentPingEvent, type AgentReflectionEvent, type AgentRuntimeToolDefinition, type AgentStartEvent, type AgentStreamCallbacks, type AgentSubagentConfig, type AgentToolCompleteEvent, type AgentToolDeltaEvent, type AgentToolInputCompleteEvent, type AgentToolInputDeltaEvent, type AgentToolStartEvent, type AgentTurnCompleteEvent, type AgentTurnDeltaEvent, type AgentTurnStartEvent, AgentsEndpoint, AnalyticsEndpoint, type ApiClient, type ApiKey, ApiKeysEndpoint, type ApiResponse, type ApplyGeneratedProposalOptions, type ApplyGeneratedProposalResult, type AttachRuntimeToolsOptions, type BaseAgentEvent, BatchBuilder, type BatchClient, type BatchListParams, type BatchOptions, type BatchRequest, type BatchResult, type BatchScheduleConfig, type BatchStatus, BatchesNamespace, type BuiltInTool, type BulkEditCondition, type BulkEditRequest, type BulkEditResponse, type BulkEditResult, ChatEndpoint, ClientBatchBuilder, type ClientConfig, type ClientConversation, ClientEvalBuilder, ClientFlowBuilder, type ClientToken, type ClientTokenConfig, type ClientTokenEnvironment, type ClientTokenVersionPin, ClientTokensEndpoint, type ClientWidgetTheme, type ConditionalStepConfig$1 as ConditionalStepConfig, type ContextErrorHandling, type ContextFallback, ContextTemplatesEndpoint, type CreateApiKeyRequest, type CreateClientTokenRequest, type CreateClientTokenResponse, type CreateFlowRequest, type CreateModelConfigRequest, type CreatePromptData, type CreatePromptRequest, type CreateProviderKeyRequest, type CreateRecordRequest, type CreateToolRequest, type CustomMCPServer, type CustomMCPServerAuth, type CustomToolConfig, type DeployCfSandboxRequest, type DeployCfSandboxResponse, type DeploySandboxRequest, type DeploySandboxResponse, type DispatchClient, DispatchEndpoint, type DispatchEnvironment, type DispatchOptions$1 as DispatchOptions, type DispatchRequest, type ErrorHandlingMode, EvalBuilder, type EvalClient, EvalEndpoint, type EvalListParams, type EvalOptions, type EvalRecord, type EvalRequest, type EvalResult, type EvalRunConfig, EvalRunner, type EvalStatus, EvalsNamespace, type ExecuteToolRequest, type ExecuteToolResponse, type ExternalToolConfig, type FallbackFailEvent, type FallbackStartEvent, type FallbackSuccessEvent, type FallbacksExhaustedEvent, type FallbacksInitiatedEvent, type FetchGitHubStepConfig$1 as FetchGitHubStepConfig, type FetchUrlStepConfig$1 as FetchUrlStepConfig, type FileContentPart, type Flow, type FlowAttachment, FlowBuilder, type FlowCompleteEvent, type FlowConfig$1 as FlowConfig, type FlowErrorEvent, type FlowFallback, type FlowPausedEvent, FlowResult, type FlowStartEvent, type FlowStep, FlowStepsEndpoint, type FlowSummary, type FlowToolConfig, FlowsEndpoint, FlowsNamespace, type GenerateEmbeddingStepConfig$1 as GenerateEmbeddingStepConfig, type GeneratedRuntimeToolGateDecision, type GeneratedRuntimeToolGateOptions, type ImageContentPart, type JSONSchema, type JsonArray, type JsonObject, type JsonPrimitive, type JsonValue, type ListConversationsResponse, type ListParams, type LocalToolConfig, type LocalToolDefinition, type LocalToolExecutionCompleteEvent, type LocalToolExecutionLoopSnapshotSlice, type LocalToolExecutionStartEvent, type Message$1 as Message, type MessageContent, type Metadata, type ModelConfig, ModelConfigsEndpoint, type ModelFallback, type ModelOverride, type ModelUsageDetail, type ModelUsageQueryParams, type ModelUsageResponse, type ModelUsageSummary, type ModelUsageTimeSeries, type PaginationResponse, type Prompt$1 as Prompt, type PromptErrorHandling, type PromptFallback, type PromptListParams, type PromptRunOptions, PromptRunner, type PromptStepConfig$1 as PromptStepConfig, PromptsEndpoint, PromptsNamespace, type ProviderApiKey, type ReasoningConfig, type ReasoningValue, type RecordConfig$1 as RecordConfig, type RecordListParams, RecordsEndpoint, type RetrieveRecordStepConfig$1 as RetrieveRecordStepConfig, type RetryFallback, type RunTaskContextBudgetBreakdown, type RunTaskContextCompactionEvent, type RunTaskContextCompactionStrategy, type RunTaskContextNoticeEvent, type RunTaskContinuation, type RunTaskOnContextCompaction, type RunTaskOnContextNotice, type RunTaskOnSession, type RunTaskOptions, type RunTaskResult, type RunTaskResumeState, type RunTaskSessionSummary, type RunTaskState, type RunTaskStateSlice, type RunTaskStatus, type RunTaskToolTraceSlice, type RuntimeCustomToolConfig, type RuntimeExternalToolConfig, type RuntimeFlowToolConfig, type RuntimeLocalToolConfig, type RuntimeSubagentToolConfig, type RuntimeTool, type RuntimeToolConfig, Runtype, RuntypeApiError, RuntypeClient, type ConditionalStepConfig as RuntypeConditionalStepConfig, type RuntypeConfig, type FetchGitHubStepConfig as RuntypeFetchGitHubStepConfig, type FetchUrlStepConfig as RuntypeFetchUrlStepConfig, RuntypeFlowBuilder, type FlowConfig as RuntypeFlowConfig, type GenerateEmbeddingStepConfig as RuntypeGenerateEmbeddingStepConfig, type Message as RuntypeMessage, type ModelOverride$1 as RuntypeModelOverride, type Prompt as RuntypePrompt, type PromptStepConfig as RuntypePromptStepConfig, type RuntypeRecord, type RecordConfig as RuntypeRecordConfig, type RetrieveRecordStepConfig as RuntypeRetrieveRecordStepConfig, type SearchStepConfig as RuntypeSearchStepConfig, type SendEmailStepConfig as RuntypeSendEmailStepConfig, type SendEventStepConfig as RuntypeSendEventStepConfig, type SendStreamStepConfig as RuntypeSendStreamStepConfig, type SendTextStepConfig as RuntypeSendTextStepConfig, type SetVariableStepConfig as RuntypeSetVariableStepConfig, type TransformDataStepConfig as RuntypeTransformDataStepConfig, type UpsertFlowConfig as RuntypeUpsertFlowConfig, type UpsertRecordStepConfig as RuntypeUpsertRecordStepConfig, type VectorSearchStepConfig as RuntypeVectorSearchStepConfig, type WaitUntilStepConfig as RuntypeWaitUntilStepConfig, type SearchStepConfig$1 as SearchStepConfig, type SendEmailStepConfig$1 as SendEmailStepConfig, type SendEventStepConfig$1 as SendEventStepConfig, type SendStreamStepConfig$1 as SendStreamStepConfig, type SendTextStepConfig$1 as SendTextStepConfig, type SetVariableStepConfig$1 as SetVariableStepConfig, type StepCompleteEvent, type StepDeltaEvent, type StepFallback, type StepStartEvent, type StepWaitingLocalEvent, type StreamCallbacks, type StreamEvent, type SubagentToolConfig, type TextContentPart, type Tool, type ToolConfig, type ToolExecution, type ToolsConfig, ToolsEndpoint, type TransformDataStepConfig$1 as TransformDataStepConfig, type UpdateClientTokenRequest, type UpdatePromptData, type UpdateProviderKeyRequest, type UpdateToolRequest, type UpsertFlowConfig$1 as UpsertFlowConfig, type UpsertOptions$2 as UpsertOptions, type UpsertRecordStepConfig$1 as UpsertRecordStepConfig, type UserProfile, UsersEndpoint, type VectorSearchStepConfig$1 as VectorSearchStepConfig, type WaitUntilStepConfig$1 as WaitUntilStepConfig, type WorkflowContext, type WorkflowDefinition, type WorkflowPhase, applyGeneratedRuntimeToolProposalToDispatchRequest, attachRuntimeToolsToDispatchRequest, buildGeneratedRuntimeToolGateOutput, createClient, createExternalTool, defaultWorkflow, deployWorkflow, evaluateGeneratedRuntimeToolProposal, gameWorkflow, getDefaultPlanPath, getLikelySupportingCandidatePaths, isDiscoveryToolName, isMarathonArtifactPath, isPreservationSensitiveTask, normalizeCandidatePath, parseFinalBuffer, parseSSEChunk, processStream, sanitizeTaskSlug, streamEvents };
|
|
5849
|
+
export { type Agent, type AgentApprovalCompleteEvent, type AgentApprovalStartEvent, type AgentCompleteEvent, type AgentErrorEvent, type AgentEvent, type AgentEventType, type AgentExecuteRequest, type AgentExecuteResponse, type AgentIterationCompleteEvent, type AgentIterationStartEvent, type AgentMediaEvent, type AgentMessage, type AgentPausedEvent, type AgentPingEvent, type AgentReflectionEvent, type AgentRuntimeToolDefinition, type AgentStartEvent, type AgentStreamCallbacks, type AgentSubagentConfig, type AgentToolCompleteEvent, type AgentToolDeltaEvent, type AgentToolInputCompleteEvent, type AgentToolInputDeltaEvent, type AgentToolStartEvent, type AgentTurnCompleteEvent, type AgentTurnDeltaEvent, type AgentTurnStartEvent, AgentsEndpoint, AnalyticsEndpoint, type ApiClient, type ApiKey, ApiKeysEndpoint, type ApiResponse, type ApplyGeneratedProposalOptions, type ApplyGeneratedProposalResult, type AttachRuntimeToolsOptions, type BaseAgentEvent, BatchBuilder, type BatchClient, type BatchListParams, type BatchOptions, type BatchRequest, type BatchResult, type BatchScheduleConfig, type BatchStatus, BatchesNamespace, type BuiltInTool, type BulkEditCondition, type BulkEditRequest, type BulkEditResponse, type BulkEditResult, ChatEndpoint, ClientBatchBuilder, type ClientConfig, type ClientConversation, ClientEvalBuilder, ClientFlowBuilder, type ClientToken, type ClientTokenConfig, type ClientTokenEnvironment, type ClientTokenVersionPin, ClientTokensEndpoint, type ClientWidgetTheme, type ConditionalStepConfig$1 as ConditionalStepConfig, type ContextErrorHandling, type ContextFallback, ContextTemplatesEndpoint, type CreateApiKeyRequest, type CreateClientTokenRequest, type CreateClientTokenResponse, type CreateFlowRequest, type CreateModelConfigRequest, type CreatePromptData, type CreatePromptRequest, type CreateProviderKeyRequest, type CreateRecordRequest, type CreateToolRequest, type CustomMCPServer, type CustomMCPServerAuth, type CustomToolConfig, type DeployCfSandboxRequest, type DeployCfSandboxResponse, type DeploySandboxRequest, type DeploySandboxResponse, type DispatchClient, DispatchEndpoint, type DispatchEnvironment, type DispatchOptions$1 as DispatchOptions, type DispatchRequest, type ErrorHandlingMode, EvalBuilder, type EvalClient, EvalEndpoint, type EvalListParams, type EvalOptions, type EvalRecord, type EvalRequest, type EvalResult, type EvalRunConfig, EvalRunner, type EvalStatus, EvalsNamespace, type ExecuteToolRequest, type ExecuteToolResponse, type ExternalToolConfig, type FallbackFailEvent, type FallbackStartEvent, type FallbackSuccessEvent, type FallbacksExhaustedEvent, type FallbacksInitiatedEvent, type FetchGitHubStepConfig$1 as FetchGitHubStepConfig, type FetchUrlStepConfig$1 as FetchUrlStepConfig, type FieldFormat, type FileContentPart, type Flow, type FlowAttachment, FlowBuilder, type FlowCompleteEvent, type FlowConfig$1 as FlowConfig, type FlowErrorEvent, type FlowFallback, type FlowPausedEvent, FlowResult, type FlowStartEvent, type FlowStep, FlowStepsEndpoint, type FlowSummary, type FlowToolConfig, FlowsEndpoint, FlowsNamespace, type GenerateEmbeddingStepConfig$1 as GenerateEmbeddingStepConfig, type GeneratedRuntimeToolGateDecision, type GeneratedRuntimeToolGateOptions, type ImageContentPart, type JSONSchema, type JsonArray, type JsonObject, type JsonPrimitive, type JsonValue, type ListConversationsResponse, type ListParams, type LocalToolConfig, type LocalToolDefinition, type LocalToolExecutionCompleteEvent, type LocalToolExecutionLoopSnapshotSlice, type LocalToolExecutionStartEvent, type Message$1 as Message, type MessageContent, type Metadata, type ModelConfig, ModelConfigsEndpoint, type ModelFallback, type ModelOverride, type ModelUsageDetail, type ModelUsageQueryParams, type ModelUsageResponse, type ModelUsageSummary, type ModelUsageTimeSeries, type PaginationResponse, type Prompt$1 as Prompt, type PromptErrorHandling, type PromptFallback, type PromptListParams, type PromptRunOptions, PromptRunner, type PromptStepConfig$1 as PromptStepConfig, PromptsEndpoint, PromptsNamespace, type ProviderApiKey, type ReasoningConfig, type ReasoningValue, type RecordConfig$1 as RecordConfig, type RecordListParams, RecordsEndpoint, type RetrieveRecordStepConfig$1 as RetrieveRecordStepConfig, type RetryFallback, type RunTaskContextBudgetBreakdown, type RunTaskContextCompactionEvent, type RunTaskContextCompactionStrategy, type RunTaskContextNoticeEvent, type RunTaskContinuation, type RunTaskOnContextCompaction, type RunTaskOnContextNotice, type RunTaskOnSession, type RunTaskOptions, type RunTaskResult, type RunTaskResumeState, type RunTaskSessionSummary, type RunTaskState, type RunTaskStateSlice, type RunTaskStatus, type RunTaskToolTraceSlice, type RuntimeCustomToolConfig, type RuntimeExternalToolConfig, type RuntimeFlowToolConfig, type RuntimeLocalToolConfig, type RuntimeSubagentToolConfig, type RuntimeTool, type RuntimeToolConfig, Runtype, RuntypeApiError, RuntypeClient, type ConditionalStepConfig as RuntypeConditionalStepConfig, type RuntypeConfig, type FetchGitHubStepConfig as RuntypeFetchGitHubStepConfig, type FetchUrlStepConfig as RuntypeFetchUrlStepConfig, RuntypeFlowBuilder, type FlowConfig as RuntypeFlowConfig, type GenerateEmbeddingStepConfig as RuntypeGenerateEmbeddingStepConfig, type Message as RuntypeMessage, type ModelOverride$1 as RuntypeModelOverride, type Prompt as RuntypePrompt, type PromptStepConfig as RuntypePromptStepConfig, type RuntypeRecord, type RecordConfig as RuntypeRecordConfig, type RetrieveRecordStepConfig as RuntypeRetrieveRecordStepConfig, type SearchStepConfig as RuntypeSearchStepConfig, type SendEmailStepConfig as RuntypeSendEmailStepConfig, type SendEventStepConfig as RuntypeSendEventStepConfig, type SendStreamStepConfig as RuntypeSendStreamStepConfig, type SendTextStepConfig as RuntypeSendTextStepConfig, type SetVariableStepConfig as RuntypeSetVariableStepConfig, type TransformDataStepConfig as RuntypeTransformDataStepConfig, type UpsertFlowConfig as RuntypeUpsertFlowConfig, type UpsertRecordStepConfig as RuntypeUpsertRecordStepConfig, type VectorSearchStepConfig as RuntypeVectorSearchStepConfig, type WaitUntilStepConfig as RuntypeWaitUntilStepConfig, STEP_FIELD_REGISTRY, STEP_TYPE_TO_METHOD, type SearchStepConfig$1 as SearchStepConfig, type SendEmailStepConfig$1 as SendEmailStepConfig, type SendEventStepConfig$1 as SendEventStepConfig, type SendStreamStepConfig$1 as SendStreamStepConfig, type SendTextStepConfig$1 as SendTextStepConfig, type SetVariableStepConfig$1 as SetVariableStepConfig, type StepCompleteEvent, type StepDeltaEvent, type StepFallback, type StepFieldMeta, type StepStartEvent, type StepWaitingLocalEvent, type StreamCallbacks, type StreamEvent, type SubagentToolConfig, type TextContentPart, type Tool, type ToolConfig, type ToolExecution, type ToolsConfig, ToolsEndpoint, type TransformDataStepConfig$1 as TransformDataStepConfig, type UpdateClientTokenRequest, type UpdatePromptData, type UpdateProviderKeyRequest, type UpdateToolRequest, type UpsertFlowConfig$1 as UpsertFlowConfig, type UpsertOptions$2 as UpsertOptions, type UpsertRecordStepConfig$1 as UpsertRecordStepConfig, type UserProfile, UsersEndpoint, type VectorSearchStepConfig$1 as VectorSearchStepConfig, type WaitUntilStepConfig$1 as WaitUntilStepConfig, type WorkflowContext, type WorkflowDefinition, type WorkflowPhase, applyGeneratedRuntimeToolProposalToDispatchRequest, attachRuntimeToolsToDispatchRequest, buildGeneratedRuntimeToolGateOutput, createClient, createExternalTool, defaultWorkflow, deployWorkflow, evaluateGeneratedRuntimeToolProposal, gameWorkflow, getDefaultPlanPath, getLikelySupportingCandidatePaths, isDiscoveryToolName, isMarathonArtifactPath, isPreservationSensitiveTask, normalizeCandidatePath, parseFinalBuffer, parseSSEChunk, processStream, sanitizeTaskSlug, streamEvents };
|
package/dist/index.d.ts
CHANGED
|
@@ -1077,10 +1077,36 @@ interface SendStreamStepConfig$1 {
|
|
|
1077
1077
|
/** JavaScript predicate evaluated at runtime. If falsy, the step is skipped. */
|
|
1078
1078
|
when?: string;
|
|
1079
1079
|
}
|
|
1080
|
+
/**
|
|
1081
|
+
* Operator allowlist for chip-style record filters. Mirrors the API's
|
|
1082
|
+
* `record-filter-compiler.ts`. Kept inline here to avoid a hard dependency
|
|
1083
|
+
* on `@runtypelabs/shared` from the published SDK.
|
|
1084
|
+
*/
|
|
1085
|
+
type RecordFilterOperator = 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'between' | 'contains' | 'startsWith' | 'endsWith' | 'in' | 'notIn' | 'isSet' | 'isNotSet' | 'isTrue' | 'isFalse' | 'withinLastDays' | 'olderThanDays';
|
|
1086
|
+
interface RecordFilterCondition {
|
|
1087
|
+
field: string;
|
|
1088
|
+
op: RecordFilterOperator;
|
|
1089
|
+
value?: unknown;
|
|
1090
|
+
}
|
|
1091
|
+
interface RecordFilterGroup {
|
|
1092
|
+
op: 'and' | 'or';
|
|
1093
|
+
conditions: Array<RecordFilterCondition | RecordFilterGroup>;
|
|
1094
|
+
}
|
|
1095
|
+
interface RecordFilter {
|
|
1096
|
+
type: string;
|
|
1097
|
+
where?: RecordFilterCondition | RecordFilterGroup;
|
|
1098
|
+
}
|
|
1080
1099
|
interface RetrieveRecordStepConfig$1 {
|
|
1081
1100
|
name: string;
|
|
1082
1101
|
recordType?: string;
|
|
1083
1102
|
recordName?: string;
|
|
1103
|
+
/**
|
|
1104
|
+
* Optional chip-style filter (metadata + top-level columns: id, name,
|
|
1105
|
+
* createdAt, updatedAt). Coexists with recordType/recordName for
|
|
1106
|
+
* backward compatibility; the API executor prefers recordFilter when
|
|
1107
|
+
* both are set.
|
|
1108
|
+
*/
|
|
1109
|
+
recordFilter?: RecordFilter;
|
|
1084
1110
|
fieldsToInclude?: string[];
|
|
1085
1111
|
fieldsToExclude?: string[];
|
|
1086
1112
|
outputVariable?: string;
|
|
@@ -2007,10 +2033,13 @@ interface SendStreamStepConfig {
|
|
|
2007
2033
|
message: string;
|
|
2008
2034
|
enabled?: boolean;
|
|
2009
2035
|
}
|
|
2036
|
+
|
|
2010
2037
|
interface RetrieveRecordStepConfig {
|
|
2011
2038
|
name: string;
|
|
2012
2039
|
recordType?: string;
|
|
2013
2040
|
recordName?: string;
|
|
2041
|
+
/** Chip-style filter (metadata + top-level columns). See flow-builder.ts. */
|
|
2042
|
+
recordFilter?: RecordFilter;
|
|
2014
2043
|
fieldsToInclude?: string[];
|
|
2015
2044
|
fieldsToExclude?: string[];
|
|
2016
2045
|
outputVariable?: string;
|
|
@@ -5692,6 +5721,63 @@ declare class ClientEvalBuilder extends EvalBuilder {
|
|
|
5692
5721
|
run(): Promise<EvalResult>;
|
|
5693
5722
|
}
|
|
5694
5723
|
|
|
5724
|
+
/**
|
|
5725
|
+
* SDK Code Generation Metadata
|
|
5726
|
+
*
|
|
5727
|
+
* Type-safe field registry for generating SDK code from flow step configs.
|
|
5728
|
+
* Co-located with the step config interfaces so that adding or removing a
|
|
5729
|
+
* field on any config interface produces a compile error here, preventing
|
|
5730
|
+
* silent drift between the SDK and downstream code generators (e.g. the
|
|
5731
|
+
* dashboard's sdk-code-generator.ts).
|
|
5732
|
+
*/
|
|
5733
|
+
|
|
5734
|
+
/** How to serialize a field value into TypeScript source code. */
|
|
5735
|
+
type FieldFormat = 'json' | 'template' | 'raw' | 'value';
|
|
5736
|
+
/** Describes one field in a step config for code emission. */
|
|
5737
|
+
interface StepFieldMeta {
|
|
5738
|
+
/** Field key in the SDK config interface (emitted as the property name). */
|
|
5739
|
+
key: string;
|
|
5740
|
+
/** Serialization format. */
|
|
5741
|
+
format: FieldFormat;
|
|
5742
|
+
/**
|
|
5743
|
+
* Dot-path to read the value from the internal step config when it differs
|
|
5744
|
+
* from `key` (e.g. `'http.url'` for fetch-url).
|
|
5745
|
+
*/
|
|
5746
|
+
source?: string;
|
|
5747
|
+
/** Skip emission when the runtime value strictly equals this. */
|
|
5748
|
+
skipDefault?: unknown;
|
|
5749
|
+
/** Only emit when the value is truthy ('truthy') or falsy ('falsy'). */
|
|
5750
|
+
emitWhen?: 'truthy' | 'falsy';
|
|
5751
|
+
/**
|
|
5752
|
+
* Dot-path to a nested field that must be truthy for this field to emit.
|
|
5753
|
+
* Example: `'poll.enabled'` — emit the `poll` object only when `poll.enabled` is true.
|
|
5754
|
+
*/
|
|
5755
|
+
sourceCheck?: string;
|
|
5756
|
+
}
|
|
5757
|
+
/**
|
|
5758
|
+
* Maps step types to their field metadata arrays. Used by code generators to
|
|
5759
|
+
* iterate fields generically instead of maintaining per-step switch blocks.
|
|
5760
|
+
*
|
|
5761
|
+
* Step types with typed SDK config interfaces get compile-time checked entries.
|
|
5762
|
+
* Step types without interfaces (template, store-asset, generate-pdf) have
|
|
5763
|
+
* untyped field arrays matching the old switch-block behavior.
|
|
5764
|
+
*
|
|
5765
|
+
* Step types without typed interfaces or old switch-cases (tool-call,
|
|
5766
|
+
* paginate-api, store-vector, execute-agent) get a minimal entry with
|
|
5767
|
+
* just outputVariable and errorHandling (the common fields the old code
|
|
5768
|
+
* emitted for all step types).
|
|
5769
|
+
*
|
|
5770
|
+
* `api-call` shares fields with `fetch-url`; `update-record` shares with
|
|
5771
|
+
* `upsert-record`.
|
|
5772
|
+
*/
|
|
5773
|
+
declare const STEP_FIELD_REGISTRY: Record<string, readonly StepFieldMeta[]>;
|
|
5774
|
+
/**
|
|
5775
|
+
* Maps every step type to its FlowBuilder method name. Covers all known step
|
|
5776
|
+
* types including those without typed config interfaces. Code generators use
|
|
5777
|
+
* this instead of maintaining their own mapping.
|
|
5778
|
+
*/
|
|
5779
|
+
declare const STEP_TYPE_TO_METHOD: Record<string, string>;
|
|
5780
|
+
|
|
5695
5781
|
/**
|
|
5696
5782
|
* Default marathon workflow: research → planning → execution.
|
|
5697
5783
|
*
|
|
@@ -5760,4 +5846,4 @@ declare function getLikelySupportingCandidatePaths(bestCandidatePath: string | u
|
|
|
5760
5846
|
declare function getDefaultPlanPath(taskName: string): string;
|
|
5761
5847
|
declare function sanitizeTaskSlug(taskName: string): string;
|
|
5762
5848
|
|
|
5763
|
-
export { type Agent, type AgentApprovalCompleteEvent, type AgentApprovalStartEvent, type AgentCompleteEvent, type AgentErrorEvent, type AgentEvent, type AgentEventType, type AgentExecuteRequest, type AgentExecuteResponse, type AgentIterationCompleteEvent, type AgentIterationStartEvent, type AgentMediaEvent, type AgentMessage, type AgentPausedEvent, type AgentPingEvent, type AgentReflectionEvent, type AgentRuntimeToolDefinition, type AgentStartEvent, type AgentStreamCallbacks, type AgentSubagentConfig, type AgentToolCompleteEvent, type AgentToolDeltaEvent, type AgentToolInputCompleteEvent, type AgentToolInputDeltaEvent, type AgentToolStartEvent, type AgentTurnCompleteEvent, type AgentTurnDeltaEvent, type AgentTurnStartEvent, AgentsEndpoint, AnalyticsEndpoint, type ApiClient, type ApiKey, ApiKeysEndpoint, type ApiResponse, type ApplyGeneratedProposalOptions, type ApplyGeneratedProposalResult, type AttachRuntimeToolsOptions, type BaseAgentEvent, BatchBuilder, type BatchClient, type BatchListParams, type BatchOptions, type BatchRequest, type BatchResult, type BatchScheduleConfig, type BatchStatus, BatchesNamespace, type BuiltInTool, type BulkEditCondition, type BulkEditRequest, type BulkEditResponse, type BulkEditResult, ChatEndpoint, ClientBatchBuilder, type ClientConfig, type ClientConversation, ClientEvalBuilder, ClientFlowBuilder, type ClientToken, type ClientTokenConfig, type ClientTokenEnvironment, type ClientTokenVersionPin, ClientTokensEndpoint, type ClientWidgetTheme, type ConditionalStepConfig$1 as ConditionalStepConfig, type ContextErrorHandling, type ContextFallback, ContextTemplatesEndpoint, type CreateApiKeyRequest, type CreateClientTokenRequest, type CreateClientTokenResponse, type CreateFlowRequest, type CreateModelConfigRequest, type CreatePromptData, type CreatePromptRequest, type CreateProviderKeyRequest, type CreateRecordRequest, type CreateToolRequest, type CustomMCPServer, type CustomMCPServerAuth, type CustomToolConfig, type DeployCfSandboxRequest, type DeployCfSandboxResponse, type DeploySandboxRequest, type DeploySandboxResponse, type DispatchClient, DispatchEndpoint, type DispatchEnvironment, type DispatchOptions$1 as DispatchOptions, type DispatchRequest, type ErrorHandlingMode, EvalBuilder, type EvalClient, EvalEndpoint, type EvalListParams, type EvalOptions, type EvalRecord, type EvalRequest, type EvalResult, type EvalRunConfig, EvalRunner, type EvalStatus, EvalsNamespace, type ExecuteToolRequest, type ExecuteToolResponse, type ExternalToolConfig, type FallbackFailEvent, type FallbackStartEvent, type FallbackSuccessEvent, type FallbacksExhaustedEvent, type FallbacksInitiatedEvent, type FetchGitHubStepConfig$1 as FetchGitHubStepConfig, type FetchUrlStepConfig$1 as FetchUrlStepConfig, type FileContentPart, type Flow, type FlowAttachment, FlowBuilder, type FlowCompleteEvent, type FlowConfig$1 as FlowConfig, type FlowErrorEvent, type FlowFallback, type FlowPausedEvent, FlowResult, type FlowStartEvent, type FlowStep, FlowStepsEndpoint, type FlowSummary, type FlowToolConfig, FlowsEndpoint, FlowsNamespace, type GenerateEmbeddingStepConfig$1 as GenerateEmbeddingStepConfig, type GeneratedRuntimeToolGateDecision, type GeneratedRuntimeToolGateOptions, type ImageContentPart, type JSONSchema, type JsonArray, type JsonObject, type JsonPrimitive, type JsonValue, type ListConversationsResponse, type ListParams, type LocalToolConfig, type LocalToolDefinition, type LocalToolExecutionCompleteEvent, type LocalToolExecutionLoopSnapshotSlice, type LocalToolExecutionStartEvent, type Message$1 as Message, type MessageContent, type Metadata, type ModelConfig, ModelConfigsEndpoint, type ModelFallback, type ModelOverride, type ModelUsageDetail, type ModelUsageQueryParams, type ModelUsageResponse, type ModelUsageSummary, type ModelUsageTimeSeries, type PaginationResponse, type Prompt$1 as Prompt, type PromptErrorHandling, type PromptFallback, type PromptListParams, type PromptRunOptions, PromptRunner, type PromptStepConfig$1 as PromptStepConfig, PromptsEndpoint, PromptsNamespace, type ProviderApiKey, type ReasoningConfig, type ReasoningValue, type RecordConfig$1 as RecordConfig, type RecordListParams, RecordsEndpoint, type RetrieveRecordStepConfig$1 as RetrieveRecordStepConfig, type RetryFallback, type RunTaskContextBudgetBreakdown, type RunTaskContextCompactionEvent, type RunTaskContextCompactionStrategy, type RunTaskContextNoticeEvent, type RunTaskContinuation, type RunTaskOnContextCompaction, type RunTaskOnContextNotice, type RunTaskOnSession, type RunTaskOptions, type RunTaskResult, type RunTaskResumeState, type RunTaskSessionSummary, type RunTaskState, type RunTaskStateSlice, type RunTaskStatus, type RunTaskToolTraceSlice, type RuntimeCustomToolConfig, type RuntimeExternalToolConfig, type RuntimeFlowToolConfig, type RuntimeLocalToolConfig, type RuntimeSubagentToolConfig, type RuntimeTool, type RuntimeToolConfig, Runtype, RuntypeApiError, RuntypeClient, type ConditionalStepConfig as RuntypeConditionalStepConfig, type RuntypeConfig, type FetchGitHubStepConfig as RuntypeFetchGitHubStepConfig, type FetchUrlStepConfig as RuntypeFetchUrlStepConfig, RuntypeFlowBuilder, type FlowConfig as RuntypeFlowConfig, type GenerateEmbeddingStepConfig as RuntypeGenerateEmbeddingStepConfig, type Message as RuntypeMessage, type ModelOverride$1 as RuntypeModelOverride, type Prompt as RuntypePrompt, type PromptStepConfig as RuntypePromptStepConfig, type RuntypeRecord, type RecordConfig as RuntypeRecordConfig, type RetrieveRecordStepConfig as RuntypeRetrieveRecordStepConfig, type SearchStepConfig as RuntypeSearchStepConfig, type SendEmailStepConfig as RuntypeSendEmailStepConfig, type SendEventStepConfig as RuntypeSendEventStepConfig, type SendStreamStepConfig as RuntypeSendStreamStepConfig, type SendTextStepConfig as RuntypeSendTextStepConfig, type SetVariableStepConfig as RuntypeSetVariableStepConfig, type TransformDataStepConfig as RuntypeTransformDataStepConfig, type UpsertFlowConfig as RuntypeUpsertFlowConfig, type UpsertRecordStepConfig as RuntypeUpsertRecordStepConfig, type VectorSearchStepConfig as RuntypeVectorSearchStepConfig, type WaitUntilStepConfig as RuntypeWaitUntilStepConfig, type SearchStepConfig$1 as SearchStepConfig, type SendEmailStepConfig$1 as SendEmailStepConfig, type SendEventStepConfig$1 as SendEventStepConfig, type SendStreamStepConfig$1 as SendStreamStepConfig, type SendTextStepConfig$1 as SendTextStepConfig, type SetVariableStepConfig$1 as SetVariableStepConfig, type StepCompleteEvent, type StepDeltaEvent, type StepFallback, type StepStartEvent, type StepWaitingLocalEvent, type StreamCallbacks, type StreamEvent, type SubagentToolConfig, type TextContentPart, type Tool, type ToolConfig, type ToolExecution, type ToolsConfig, ToolsEndpoint, type TransformDataStepConfig$1 as TransformDataStepConfig, type UpdateClientTokenRequest, type UpdatePromptData, type UpdateProviderKeyRequest, type UpdateToolRequest, type UpsertFlowConfig$1 as UpsertFlowConfig, type UpsertOptions$2 as UpsertOptions, type UpsertRecordStepConfig$1 as UpsertRecordStepConfig, type UserProfile, UsersEndpoint, type VectorSearchStepConfig$1 as VectorSearchStepConfig, type WaitUntilStepConfig$1 as WaitUntilStepConfig, type WorkflowContext, type WorkflowDefinition, type WorkflowPhase, applyGeneratedRuntimeToolProposalToDispatchRequest, attachRuntimeToolsToDispatchRequest, buildGeneratedRuntimeToolGateOutput, createClient, createExternalTool, defaultWorkflow, deployWorkflow, evaluateGeneratedRuntimeToolProposal, gameWorkflow, getDefaultPlanPath, getLikelySupportingCandidatePaths, isDiscoveryToolName, isMarathonArtifactPath, isPreservationSensitiveTask, normalizeCandidatePath, parseFinalBuffer, parseSSEChunk, processStream, sanitizeTaskSlug, streamEvents };
|
|
5849
|
+
export { type Agent, type AgentApprovalCompleteEvent, type AgentApprovalStartEvent, type AgentCompleteEvent, type AgentErrorEvent, type AgentEvent, type AgentEventType, type AgentExecuteRequest, type AgentExecuteResponse, type AgentIterationCompleteEvent, type AgentIterationStartEvent, type AgentMediaEvent, type AgentMessage, type AgentPausedEvent, type AgentPingEvent, type AgentReflectionEvent, type AgentRuntimeToolDefinition, type AgentStartEvent, type AgentStreamCallbacks, type AgentSubagentConfig, type AgentToolCompleteEvent, type AgentToolDeltaEvent, type AgentToolInputCompleteEvent, type AgentToolInputDeltaEvent, type AgentToolStartEvent, type AgentTurnCompleteEvent, type AgentTurnDeltaEvent, type AgentTurnStartEvent, AgentsEndpoint, AnalyticsEndpoint, type ApiClient, type ApiKey, ApiKeysEndpoint, type ApiResponse, type ApplyGeneratedProposalOptions, type ApplyGeneratedProposalResult, type AttachRuntimeToolsOptions, type BaseAgentEvent, BatchBuilder, type BatchClient, type BatchListParams, type BatchOptions, type BatchRequest, type BatchResult, type BatchScheduleConfig, type BatchStatus, BatchesNamespace, type BuiltInTool, type BulkEditCondition, type BulkEditRequest, type BulkEditResponse, type BulkEditResult, ChatEndpoint, ClientBatchBuilder, type ClientConfig, type ClientConversation, ClientEvalBuilder, ClientFlowBuilder, type ClientToken, type ClientTokenConfig, type ClientTokenEnvironment, type ClientTokenVersionPin, ClientTokensEndpoint, type ClientWidgetTheme, type ConditionalStepConfig$1 as ConditionalStepConfig, type ContextErrorHandling, type ContextFallback, ContextTemplatesEndpoint, type CreateApiKeyRequest, type CreateClientTokenRequest, type CreateClientTokenResponse, type CreateFlowRequest, type CreateModelConfigRequest, type CreatePromptData, type CreatePromptRequest, type CreateProviderKeyRequest, type CreateRecordRequest, type CreateToolRequest, type CustomMCPServer, type CustomMCPServerAuth, type CustomToolConfig, type DeployCfSandboxRequest, type DeployCfSandboxResponse, type DeploySandboxRequest, type DeploySandboxResponse, type DispatchClient, DispatchEndpoint, type DispatchEnvironment, type DispatchOptions$1 as DispatchOptions, type DispatchRequest, type ErrorHandlingMode, EvalBuilder, type EvalClient, EvalEndpoint, type EvalListParams, type EvalOptions, type EvalRecord, type EvalRequest, type EvalResult, type EvalRunConfig, EvalRunner, type EvalStatus, EvalsNamespace, type ExecuteToolRequest, type ExecuteToolResponse, type ExternalToolConfig, type FallbackFailEvent, type FallbackStartEvent, type FallbackSuccessEvent, type FallbacksExhaustedEvent, type FallbacksInitiatedEvent, type FetchGitHubStepConfig$1 as FetchGitHubStepConfig, type FetchUrlStepConfig$1 as FetchUrlStepConfig, type FieldFormat, type FileContentPart, type Flow, type FlowAttachment, FlowBuilder, type FlowCompleteEvent, type FlowConfig$1 as FlowConfig, type FlowErrorEvent, type FlowFallback, type FlowPausedEvent, FlowResult, type FlowStartEvent, type FlowStep, FlowStepsEndpoint, type FlowSummary, type FlowToolConfig, FlowsEndpoint, FlowsNamespace, type GenerateEmbeddingStepConfig$1 as GenerateEmbeddingStepConfig, type GeneratedRuntimeToolGateDecision, type GeneratedRuntimeToolGateOptions, type ImageContentPart, type JSONSchema, type JsonArray, type JsonObject, type JsonPrimitive, type JsonValue, type ListConversationsResponse, type ListParams, type LocalToolConfig, type LocalToolDefinition, type LocalToolExecutionCompleteEvent, type LocalToolExecutionLoopSnapshotSlice, type LocalToolExecutionStartEvent, type Message$1 as Message, type MessageContent, type Metadata, type ModelConfig, ModelConfigsEndpoint, type ModelFallback, type ModelOverride, type ModelUsageDetail, type ModelUsageQueryParams, type ModelUsageResponse, type ModelUsageSummary, type ModelUsageTimeSeries, type PaginationResponse, type Prompt$1 as Prompt, type PromptErrorHandling, type PromptFallback, type PromptListParams, type PromptRunOptions, PromptRunner, type PromptStepConfig$1 as PromptStepConfig, PromptsEndpoint, PromptsNamespace, type ProviderApiKey, type ReasoningConfig, type ReasoningValue, type RecordConfig$1 as RecordConfig, type RecordListParams, RecordsEndpoint, type RetrieveRecordStepConfig$1 as RetrieveRecordStepConfig, type RetryFallback, type RunTaskContextBudgetBreakdown, type RunTaskContextCompactionEvent, type RunTaskContextCompactionStrategy, type RunTaskContextNoticeEvent, type RunTaskContinuation, type RunTaskOnContextCompaction, type RunTaskOnContextNotice, type RunTaskOnSession, type RunTaskOptions, type RunTaskResult, type RunTaskResumeState, type RunTaskSessionSummary, type RunTaskState, type RunTaskStateSlice, type RunTaskStatus, type RunTaskToolTraceSlice, type RuntimeCustomToolConfig, type RuntimeExternalToolConfig, type RuntimeFlowToolConfig, type RuntimeLocalToolConfig, type RuntimeSubagentToolConfig, type RuntimeTool, type RuntimeToolConfig, Runtype, RuntypeApiError, RuntypeClient, type ConditionalStepConfig as RuntypeConditionalStepConfig, type RuntypeConfig, type FetchGitHubStepConfig as RuntypeFetchGitHubStepConfig, type FetchUrlStepConfig as RuntypeFetchUrlStepConfig, RuntypeFlowBuilder, type FlowConfig as RuntypeFlowConfig, type GenerateEmbeddingStepConfig as RuntypeGenerateEmbeddingStepConfig, type Message as RuntypeMessage, type ModelOverride$1 as RuntypeModelOverride, type Prompt as RuntypePrompt, type PromptStepConfig as RuntypePromptStepConfig, type RuntypeRecord, type RecordConfig as RuntypeRecordConfig, type RetrieveRecordStepConfig as RuntypeRetrieveRecordStepConfig, type SearchStepConfig as RuntypeSearchStepConfig, type SendEmailStepConfig as RuntypeSendEmailStepConfig, type SendEventStepConfig as RuntypeSendEventStepConfig, type SendStreamStepConfig as RuntypeSendStreamStepConfig, type SendTextStepConfig as RuntypeSendTextStepConfig, type SetVariableStepConfig as RuntypeSetVariableStepConfig, type TransformDataStepConfig as RuntypeTransformDataStepConfig, type UpsertFlowConfig as RuntypeUpsertFlowConfig, type UpsertRecordStepConfig as RuntypeUpsertRecordStepConfig, type VectorSearchStepConfig as RuntypeVectorSearchStepConfig, type WaitUntilStepConfig as RuntypeWaitUntilStepConfig, STEP_FIELD_REGISTRY, STEP_TYPE_TO_METHOD, type SearchStepConfig$1 as SearchStepConfig, type SendEmailStepConfig$1 as SendEmailStepConfig, type SendEventStepConfig$1 as SendEventStepConfig, type SendStreamStepConfig$1 as SendStreamStepConfig, type SendTextStepConfig$1 as SendTextStepConfig, type SetVariableStepConfig$1 as SetVariableStepConfig, type StepCompleteEvent, type StepDeltaEvent, type StepFallback, type StepFieldMeta, type StepStartEvent, type StepWaitingLocalEvent, type StreamCallbacks, type StreamEvent, type SubagentToolConfig, type TextContentPart, type Tool, type ToolConfig, type ToolExecution, type ToolsConfig, ToolsEndpoint, type TransformDataStepConfig$1 as TransformDataStepConfig, type UpdateClientTokenRequest, type UpdatePromptData, type UpdateProviderKeyRequest, type UpdateToolRequest, type UpsertFlowConfig$1 as UpsertFlowConfig, type UpsertOptions$2 as UpsertOptions, type UpsertRecordStepConfig$1 as UpsertRecordStepConfig, type UserProfile, UsersEndpoint, type VectorSearchStepConfig$1 as VectorSearchStepConfig, type WaitUntilStepConfig$1 as WaitUntilStepConfig, type WorkflowContext, type WorkflowDefinition, type WorkflowPhase, applyGeneratedRuntimeToolProposalToDispatchRequest, attachRuntimeToolsToDispatchRequest, buildGeneratedRuntimeToolGateOutput, createClient, createExternalTool, defaultWorkflow, deployWorkflow, evaluateGeneratedRuntimeToolProposal, gameWorkflow, getDefaultPlanPath, getLikelySupportingCandidatePaths, isDiscoveryToolName, isMarathonArtifactPath, isPreservationSensitiveTask, normalizeCandidatePath, parseFinalBuffer, parseSSEChunk, processStream, sanitizeTaskSlug, streamEvents };
|
package/dist/index.mjs
CHANGED
|
@@ -8335,6 +8335,255 @@ var ClientEvalBuilder = class extends EvalBuilder {
|
|
|
8335
8335
|
return this.boundClient.eval(config);
|
|
8336
8336
|
}
|
|
8337
8337
|
};
|
|
8338
|
+
|
|
8339
|
+
// src/codegen-metadata.ts
|
|
8340
|
+
var PROMPT_FIELDS = [
|
|
8341
|
+
{ key: "model", format: "json" },
|
|
8342
|
+
{ key: "userPrompt", format: "template" },
|
|
8343
|
+
{ key: "systemPrompt", format: "template" },
|
|
8344
|
+
{ key: "previousMessages", format: "value" },
|
|
8345
|
+
{ key: "outputVariable", format: "json" },
|
|
8346
|
+
{ key: "responseFormat", format: "json", skipDefault: "text" },
|
|
8347
|
+
{ key: "temperature", format: "raw" },
|
|
8348
|
+
{ key: "topP", format: "raw" },
|
|
8349
|
+
{ key: "topK", format: "raw" },
|
|
8350
|
+
{ key: "frequencyPenalty", format: "raw" },
|
|
8351
|
+
{ key: "presencePenalty", format: "raw" },
|
|
8352
|
+
{ key: "seed", format: "raw" },
|
|
8353
|
+
{ key: "maxTokens", format: "raw" },
|
|
8354
|
+
{ key: "reasoning", format: "value" },
|
|
8355
|
+
{ key: "streamOutput", format: "raw", emitWhen: "falsy" },
|
|
8356
|
+
{ key: "tools", format: "value" },
|
|
8357
|
+
{ key: "errorHandling", format: "value", skipDefault: "fail" }
|
|
8358
|
+
];
|
|
8359
|
+
var CRAWL_FIELDS = [
|
|
8360
|
+
{ key: "url", format: "json" },
|
|
8361
|
+
{ key: "limit", format: "raw" },
|
|
8362
|
+
{ key: "depth", format: "raw" },
|
|
8363
|
+
{ key: "source", format: "json" },
|
|
8364
|
+
{ key: "formats", format: "value" },
|
|
8365
|
+
{ key: "render", format: "raw" },
|
|
8366
|
+
{ key: "maxAge", format: "raw" },
|
|
8367
|
+
{ key: "modifiedSince", format: "json" },
|
|
8368
|
+
{ key: "options", format: "value" },
|
|
8369
|
+
{ key: "authenticate", format: "value" },
|
|
8370
|
+
{ key: "cookies", format: "value" },
|
|
8371
|
+
{ key: "setExtraHTTPHeaders", format: "value" },
|
|
8372
|
+
{ key: "gotoOptions", format: "value" },
|
|
8373
|
+
{ key: "waitForSelector", format: "json" },
|
|
8374
|
+
{ key: "rejectResourceTypes", format: "value" },
|
|
8375
|
+
{ key: "rejectRequestPattern", format: "value" },
|
|
8376
|
+
{ key: "userAgent", format: "json" },
|
|
8377
|
+
{ key: "jsonOptions", format: "value" },
|
|
8378
|
+
{ key: "pollIntervalMs", format: "raw" },
|
|
8379
|
+
{ key: "completionTimeoutMs", format: "raw" },
|
|
8380
|
+
{ key: "outputVariable", format: "json" },
|
|
8381
|
+
{ key: "streamOutput", format: "raw" },
|
|
8382
|
+
{ key: "errorHandling", format: "value", skipDefault: "fail" }
|
|
8383
|
+
];
|
|
8384
|
+
var FETCH_URL_FIELDS = [
|
|
8385
|
+
{ key: "url", format: "json", source: "http.url" },
|
|
8386
|
+
{ key: "method", format: "json", source: "http.method", skipDefault: "GET" },
|
|
8387
|
+
{ key: "headers", format: "value", source: "http.headers" },
|
|
8388
|
+
{ key: "body", format: "template", source: "http.body" },
|
|
8389
|
+
{ key: "responseType", format: "json" },
|
|
8390
|
+
{ key: "markdownIfAvailable", format: "raw" },
|
|
8391
|
+
{ key: "fetchMethod", format: "json", skipDefault: "http" },
|
|
8392
|
+
{ key: "firecrawl", format: "value" },
|
|
8393
|
+
{ key: "outputVariable", format: "json" },
|
|
8394
|
+
{ key: "streamOutput", format: "raw" },
|
|
8395
|
+
{ key: "errorHandling", format: "value", skipDefault: "fail" }
|
|
8396
|
+
];
|
|
8397
|
+
var TRANSFORM_DATA_FIELDS = [
|
|
8398
|
+
{ key: "script", format: "template" },
|
|
8399
|
+
{ key: "outputVariable", format: "json" },
|
|
8400
|
+
{ key: "sandboxProvider", format: "json" },
|
|
8401
|
+
{ key: "streamOutput", format: "raw" }
|
|
8402
|
+
];
|
|
8403
|
+
var SET_VARIABLE_FIELDS = [
|
|
8404
|
+
{ key: "variableName", format: "json" },
|
|
8405
|
+
{ key: "value", format: "template" }
|
|
8406
|
+
];
|
|
8407
|
+
var CONDITIONAL_FIELDS = [
|
|
8408
|
+
{ key: "condition", format: "template" },
|
|
8409
|
+
{ key: "trueSteps", format: "value" },
|
|
8410
|
+
{ key: "falseSteps", format: "value" }
|
|
8411
|
+
];
|
|
8412
|
+
var SEARCH_FIELDS = [
|
|
8413
|
+
{ key: "provider", format: "json" },
|
|
8414
|
+
{ key: "query", format: "template" },
|
|
8415
|
+
{ key: "maxResults", format: "raw", skipDefault: 10 },
|
|
8416
|
+
{ key: "returnCitations", format: "raw" },
|
|
8417
|
+
{ key: "outputVariable", format: "json" },
|
|
8418
|
+
{ key: "streamOutput", format: "raw" },
|
|
8419
|
+
{ key: "errorHandling", format: "value", skipDefault: "fail" }
|
|
8420
|
+
];
|
|
8421
|
+
var SEND_EMAIL_FIELDS = [
|
|
8422
|
+
{ key: "to", format: "json" },
|
|
8423
|
+
{ key: "from", format: "json" },
|
|
8424
|
+
{ key: "subject", format: "template" },
|
|
8425
|
+
{ key: "html", format: "template" },
|
|
8426
|
+
{ key: "outputVariable", format: "json" },
|
|
8427
|
+
{ key: "streamOutput", format: "raw" },
|
|
8428
|
+
{ key: "errorHandling", format: "value", skipDefault: "fail" }
|
|
8429
|
+
];
|
|
8430
|
+
var SEND_STREAM_FIELDS = [
|
|
8431
|
+
{ key: "message", format: "template" }
|
|
8432
|
+
];
|
|
8433
|
+
var RETRIEVE_RECORD_FIELDS = [
|
|
8434
|
+
{ key: "recordType", format: "json" },
|
|
8435
|
+
{ key: "recordName", format: "json" },
|
|
8436
|
+
{ key: "recordFilter", format: "value" },
|
|
8437
|
+
{ key: "fieldsToInclude", format: "json" },
|
|
8438
|
+
{ key: "fieldsToExclude", format: "json" },
|
|
8439
|
+
{ key: "outputVariable", format: "json" },
|
|
8440
|
+
{ key: "streamOutput", format: "raw" }
|
|
8441
|
+
];
|
|
8442
|
+
var UPSERT_RECORD_FIELDS = [
|
|
8443
|
+
{ key: "recordType", format: "json" },
|
|
8444
|
+
{ key: "recordName", format: "json" },
|
|
8445
|
+
{ key: "sourceVariable", format: "json" },
|
|
8446
|
+
{ key: "mergeStrategy", format: "json", skipDefault: "merge" },
|
|
8447
|
+
{ key: "outputVariable", format: "json" },
|
|
8448
|
+
{ key: "streamOutput", format: "raw" },
|
|
8449
|
+
{ key: "errorHandling", format: "value", skipDefault: "fail" }
|
|
8450
|
+
];
|
|
8451
|
+
var VECTOR_SEARCH_FIELDS = [
|
|
8452
|
+
{ key: "query", format: "template" },
|
|
8453
|
+
{ key: "recordType", format: "json" },
|
|
8454
|
+
{ key: "embeddingModel", format: "json" },
|
|
8455
|
+
{ key: "limit", format: "raw", skipDefault: 5 },
|
|
8456
|
+
{ key: "threshold", format: "raw", skipDefault: 0.7 },
|
|
8457
|
+
{ key: "outputVariable", format: "json" },
|
|
8458
|
+
{ key: "streamOutput", format: "raw" }
|
|
8459
|
+
];
|
|
8460
|
+
var GENERATE_EMBEDDING_FIELDS = [
|
|
8461
|
+
{ key: "text", format: "template" },
|
|
8462
|
+
{ key: "embeddingModel", format: "json" },
|
|
8463
|
+
{ key: "maxLength", format: "raw" },
|
|
8464
|
+
{ key: "outputVariable", format: "json" },
|
|
8465
|
+
{ key: "streamOutput", format: "raw" }
|
|
8466
|
+
];
|
|
8467
|
+
var WAIT_UNTIL_FIELDS = [
|
|
8468
|
+
{ key: "delayMs", format: "raw" },
|
|
8469
|
+
{ key: "continueOnTimeout", format: "raw", emitWhen: "truthy" },
|
|
8470
|
+
{ key: "poll", format: "value", sourceCheck: "poll.enabled" },
|
|
8471
|
+
{ key: "outputVariable", format: "json" },
|
|
8472
|
+
{ key: "streamOutput", format: "raw" },
|
|
8473
|
+
{ key: "errorHandling", format: "value", skipDefault: "fail" }
|
|
8474
|
+
];
|
|
8475
|
+
var SEND_EVENT_FIELDS = [
|
|
8476
|
+
{ key: "provider", format: "json" },
|
|
8477
|
+
{ key: "eventName", format: "json" },
|
|
8478
|
+
{ key: "properties", format: "value" },
|
|
8479
|
+
{ key: "outputVariable", format: "json" },
|
|
8480
|
+
{ key: "streamOutput", format: "raw" },
|
|
8481
|
+
{ key: "errorHandling", format: "value", skipDefault: "fail" }
|
|
8482
|
+
];
|
|
8483
|
+
var SEND_TEXT_FIELDS = [
|
|
8484
|
+
{ key: "to", format: "json" },
|
|
8485
|
+
{ key: "from", format: "json" },
|
|
8486
|
+
{ key: "message", format: "template" },
|
|
8487
|
+
{ key: "outputVariable", format: "json" },
|
|
8488
|
+
{ key: "streamOutput", format: "raw" },
|
|
8489
|
+
{ key: "errorHandling", format: "value", skipDefault: "fail" }
|
|
8490
|
+
];
|
|
8491
|
+
var FETCH_GITHUB_FIELDS = [
|
|
8492
|
+
{ key: "repository", format: "json" },
|
|
8493
|
+
{ key: "branch", format: "json" },
|
|
8494
|
+
{ key: "path", format: "json" },
|
|
8495
|
+
{ key: "outputVariable", format: "json" },
|
|
8496
|
+
{ key: "streamOutput", format: "raw" }
|
|
8497
|
+
];
|
|
8498
|
+
var TEMPLATE_FIELDS = [
|
|
8499
|
+
{ key: "template", format: "template" },
|
|
8500
|
+
{ key: "outputFormat", format: "json" },
|
|
8501
|
+
{ key: "inputs", format: "value" },
|
|
8502
|
+
{ key: "partials", format: "value" },
|
|
8503
|
+
{ key: "pdfOptions", format: "value" },
|
|
8504
|
+
{ key: "asArtifact", format: "raw" },
|
|
8505
|
+
{ key: "streamOutput", format: "raw" },
|
|
8506
|
+
{ key: "outputVariable", format: "json" },
|
|
8507
|
+
{ key: "errorHandling", format: "value", skipDefault: "fail" }
|
|
8508
|
+
];
|
|
8509
|
+
var STORE_ASSET_FIELDS = [
|
|
8510
|
+
{ key: "url", format: "json" },
|
|
8511
|
+
{ key: "content", format: "template" },
|
|
8512
|
+
{ key: "filename", format: "json" },
|
|
8513
|
+
{ key: "contentType", format: "json" },
|
|
8514
|
+
{ key: "visibility", format: "json" },
|
|
8515
|
+
{ key: "outputVariable", format: "json" },
|
|
8516
|
+
{ key: "errorHandling", format: "value", skipDefault: "fail" }
|
|
8517
|
+
];
|
|
8518
|
+
var GENERATE_PDF_FIELDS = [
|
|
8519
|
+
{ key: "html", format: "template" },
|
|
8520
|
+
{ key: "markdown", format: "template" },
|
|
8521
|
+
{ key: "filename", format: "json" },
|
|
8522
|
+
{ key: "visibility", format: "json" },
|
|
8523
|
+
{ key: "pdfOptions", format: "value" },
|
|
8524
|
+
{ key: "outputVariable", format: "json" },
|
|
8525
|
+
{ key: "errorHandling", format: "value", skipDefault: "fail" }
|
|
8526
|
+
];
|
|
8527
|
+
var COMMON_ONLY_FIELDS = [
|
|
8528
|
+
{ key: "outputVariable", format: "json" },
|
|
8529
|
+
{ key: "errorHandling", format: "value", skipDefault: "fail" }
|
|
8530
|
+
];
|
|
8531
|
+
var STEP_FIELD_REGISTRY = {
|
|
8532
|
+
"prompt": PROMPT_FIELDS,
|
|
8533
|
+
"crawl": CRAWL_FIELDS,
|
|
8534
|
+
"fetch-url": FETCH_URL_FIELDS,
|
|
8535
|
+
"api-call": FETCH_URL_FIELDS,
|
|
8536
|
+
"transform-data": TRANSFORM_DATA_FIELDS,
|
|
8537
|
+
"set-variable": SET_VARIABLE_FIELDS,
|
|
8538
|
+
"conditional": CONDITIONAL_FIELDS,
|
|
8539
|
+
"search": SEARCH_FIELDS,
|
|
8540
|
+
"send-email": SEND_EMAIL_FIELDS,
|
|
8541
|
+
"send-stream": SEND_STREAM_FIELDS,
|
|
8542
|
+
"retrieve-record": RETRIEVE_RECORD_FIELDS,
|
|
8543
|
+
"upsert-record": UPSERT_RECORD_FIELDS,
|
|
8544
|
+
"update-record": UPSERT_RECORD_FIELDS,
|
|
8545
|
+
"vector-search": VECTOR_SEARCH_FIELDS,
|
|
8546
|
+
"generate-embedding": GENERATE_EMBEDDING_FIELDS,
|
|
8547
|
+
"wait-until": WAIT_UNTIL_FIELDS,
|
|
8548
|
+
"send-event": SEND_EVENT_FIELDS,
|
|
8549
|
+
"send-text": SEND_TEXT_FIELDS,
|
|
8550
|
+
"fetch-github": FETCH_GITHUB_FIELDS,
|
|
8551
|
+
"template": TEMPLATE_FIELDS,
|
|
8552
|
+
"store-asset": STORE_ASSET_FIELDS,
|
|
8553
|
+
"generate-pdf": GENERATE_PDF_FIELDS,
|
|
8554
|
+
"tool-call": COMMON_ONLY_FIELDS,
|
|
8555
|
+
"paginate-api": COMMON_ONLY_FIELDS,
|
|
8556
|
+
"store-vector": COMMON_ONLY_FIELDS,
|
|
8557
|
+
"execute-agent": COMMON_ONLY_FIELDS
|
|
8558
|
+
};
|
|
8559
|
+
var STEP_TYPE_TO_METHOD = {
|
|
8560
|
+
"prompt": "prompt",
|
|
8561
|
+
"crawl": "crawl",
|
|
8562
|
+
"fetch-url": "fetchUrl",
|
|
8563
|
+
"api-call": "apiCall",
|
|
8564
|
+
"retrieve-record": "retrieveRecord",
|
|
8565
|
+
"fetch-github": "fetchGitHub",
|
|
8566
|
+
"transform-data": "transformData",
|
|
8567
|
+
"template": "template",
|
|
8568
|
+
"conditional": "conditional",
|
|
8569
|
+
"set-variable": "setVariable",
|
|
8570
|
+
"upsert-record": "upsertRecord",
|
|
8571
|
+
"update-record": "updateRecord",
|
|
8572
|
+
"send-email": "sendEmail",
|
|
8573
|
+
"send-text": "sendText",
|
|
8574
|
+
"send-event": "sendEvent",
|
|
8575
|
+
"send-stream": "sendStream",
|
|
8576
|
+
"search": "search",
|
|
8577
|
+
"generate-embedding": "generateEmbedding",
|
|
8578
|
+
"vector-search": "vectorSearch",
|
|
8579
|
+
"tool-call": "toolCall",
|
|
8580
|
+
"wait-until": "waitUntil",
|
|
8581
|
+
"paginate-api": "paginateApi",
|
|
8582
|
+
"store-vector": "storeVector",
|
|
8583
|
+
"execute-agent": "executeAgent",
|
|
8584
|
+
"store-asset": "storeAsset",
|
|
8585
|
+
"generate-pdf": "generatePdf"
|
|
8586
|
+
};
|
|
8338
8587
|
export {
|
|
8339
8588
|
AgentsEndpoint,
|
|
8340
8589
|
AnalyticsEndpoint,
|
|
@@ -8366,6 +8615,8 @@ export {
|
|
|
8366
8615
|
RuntypeApiError,
|
|
8367
8616
|
RuntypeClient2 as RuntypeClient,
|
|
8368
8617
|
RuntypeFlowBuilder,
|
|
8618
|
+
STEP_FIELD_REGISTRY,
|
|
8619
|
+
STEP_TYPE_TO_METHOD,
|
|
8369
8620
|
ToolsEndpoint,
|
|
8370
8621
|
UsersEndpoint,
|
|
8371
8622
|
applyGeneratedRuntimeToolProposalToDispatchRequest,
|
package/package.json
CHANGED