@runtypelabs/sdk 1.20.0 → 1.21.1

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 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,