@runtypelabs/sdk 5.10.0 → 6.1.3

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.mjs CHANGED
@@ -1151,6 +1151,7 @@ var FlowBuilder = class {
1151
1151
  markdownIfAvailable: config.markdownIfAvailable,
1152
1152
  fetchMethod: config.fetchMethod === "http" ? "standard" : config.fetchMethod,
1153
1153
  firecrawl: config.firecrawl,
1154
+ massive: config.massive,
1154
1155
  outputVariable: config.outputVariable,
1155
1156
  errorHandling: config.errorHandling,
1156
1157
  defaultValue: config.defaultValue,
@@ -1286,7 +1287,10 @@ var FlowBuilder = class {
1286
1287
  "send-stream",
1287
1288
  config.name,
1288
1289
  {
1289
- message: config.message
1290
+ message: config.message,
1291
+ outputVariable: config.outputVariable,
1292
+ errorHandling: config.errorHandling,
1293
+ defaultValue: config.defaultValue
1290
1294
  },
1291
1295
  config.enabled,
1292
1296
  config.when
@@ -1311,7 +1315,6 @@ var FlowBuilder = class {
1311
1315
  fieldsToExclude: config.fieldsToExclude,
1312
1316
  availableFields: config.availableFields,
1313
1317
  outputVariable: config.outputVariable,
1314
- fields: config.fields,
1315
1318
  includeMetadata: config.includeMetadata,
1316
1319
  streamOutput: config.streamOutput
1317
1320
  },
@@ -1404,7 +1407,6 @@ var FlowBuilder = class {
1404
1407
  vectorStore: config.vectorStore,
1405
1408
  weaviateConfig: config.weaviateConfig,
1406
1409
  vectorizeConfig: config.vectorizeConfig,
1407
- pineconeConfig: config.pineconeConfig,
1408
1410
  limit: config.limit,
1409
1411
  threshold: config.threshold,
1410
1412
  metadataFilters: config.metadataFilters,
@@ -1433,7 +1435,6 @@ var FlowBuilder = class {
1433
1435
  recordType: config.recordType,
1434
1436
  recordName: config.recordName,
1435
1437
  textField: config.textField,
1436
- storeInRecord: config.storeInRecord,
1437
1438
  embeddingModel: config.embeddingModel,
1438
1439
  maxLength: config.maxLength,
1439
1440
  inputMode: config.inputMode,
@@ -1441,7 +1442,6 @@ var FlowBuilder = class {
1441
1442
  itemAlias: config.itemAlias,
1442
1443
  textTemplate: config.textTemplate,
1443
1444
  batchSize: config.batchSize,
1444
- vectorStore: config.vectorStore,
1445
1445
  outputVariable: config.outputVariable,
1446
1446
  streamOutput: config.streamOutput
1447
1447
  },
@@ -1490,51 +1490,6 @@ var FlowBuilder = class {
1490
1490
  );
1491
1491
  return this;
1492
1492
  }
1493
- /**
1494
- * Add a send text step
1495
- */
1496
- sendText(config) {
1497
- this.addStep(
1498
- "send-text",
1499
- config.name,
1500
- {
1501
- to: config.to,
1502
- from: config.from,
1503
- message: config.message,
1504
- outputVariable: config.outputVariable,
1505
- errorHandling: config.errorHandling,
1506
- streamOutput: config.streamOutput
1507
- },
1508
- config.enabled,
1509
- config.when
1510
- );
1511
- return this;
1512
- }
1513
- /**
1514
- * Add a fetch GitHub step
1515
- */
1516
- fetchGitHub(config) {
1517
- this.addStep(
1518
- "fetch-github",
1519
- config.name,
1520
- {
1521
- repository: config.repository,
1522
- branch: config.branch,
1523
- path: config.path,
1524
- token: config.token,
1525
- outputVariable: config.outputVariable,
1526
- contentType: config.contentType,
1527
- includePatterns: config.includePatterns,
1528
- excludePatterns: config.excludePatterns,
1529
- compress: config.compress,
1530
- style: config.style,
1531
- streamOutput: config.streamOutput
1532
- },
1533
- config.enabled,
1534
- config.when
1535
- );
1536
- return this;
1537
- }
1538
1493
  /** Add an api-call step. */
1539
1494
  apiCall(config) {
1540
1495
  return this.addRawStep("api-call", config);
@@ -2178,7 +2133,9 @@ var DEFINE_EVAL_TOP_LEVEL_KEYS = /* @__PURE__ */ new Set([
2178
2133
  "target",
2179
2134
  "graders",
2180
2135
  "cases",
2181
- "virtual"
2136
+ "virtual",
2137
+ "recordedToolMode",
2138
+ "recordedToolUnmatchedPolicy"
2182
2139
  ]);
2183
2140
  var DEFINE_EVAL_CASE_KEYS = /* @__PURE__ */ new Set(["name", "input", "expected", "expect"]);
2184
2141
  function normalizeTarget(target) {
@@ -2247,9 +2204,15 @@ function defineEval(input) {
2247
2204
  const unknownKeys = Object.keys(input).filter((k) => !DEFINE_EVAL_TOP_LEVEL_KEYS.has(k));
2248
2205
  if (unknownKeys.length > 0) {
2249
2206
  throw new Error(
2250
- `defineEval: unknown field(s): ${unknownKeys.join(", ")}. Allowed fields are target, graders, cases, virtual.`
2207
+ `defineEval: unknown field(s): ${unknownKeys.join(", ")}. Allowed fields are target, graders, cases, virtual, recordedToolMode, recordedToolUnmatchedPolicy.`
2251
2208
  );
2252
2209
  }
2210
+ if (input.recordedToolMode !== void 0 && input.recordedToolMode !== "next_step" && input.recordedToolMode !== "continue") {
2211
+ throw new Error('defineEval "recordedToolMode" must be "next_step" or "continue"');
2212
+ }
2213
+ if (input.recordedToolUnmatchedPolicy !== void 0 && input.recordedToolUnmatchedPolicy !== "fail" && input.recordedToolUnmatchedPolicy !== "stub") {
2214
+ throw new Error('defineEval "recordedToolUnmatchedPolicy" must be "fail" or "stub"');
2215
+ }
2253
2216
  const target = normalizeTarget(input.target);
2254
2217
  if (input.name !== void 0 && (typeof input.name !== "string" || input.name.length === 0)) {
2255
2218
  throw new Error('defineEval "name" must be a non-empty string when provided');
@@ -2298,7 +2261,14 @@ function defineEval(input) {
2298
2261
  expect
2299
2262
  };
2300
2263
  });
2301
- return { name, target, cases, virtual: input.virtual === true };
2264
+ return {
2265
+ name,
2266
+ target,
2267
+ cases,
2268
+ virtual: input.virtual === true,
2269
+ ...input.recordedToolMode !== void 0 ? { recordedToolMode: input.recordedToolMode } : {},
2270
+ ...input.recordedToolUnmatchedPolicy !== void 0 ? { recordedToolUnmatchedPolicy: input.recordedToolUnmatchedPolicy } : {}
2271
+ };
2302
2272
  }
2303
2273
  function normalizeForHash(value) {
2304
2274
  if (Array.isArray(value)) return value.map(normalizeForHash);
@@ -2314,9 +2284,13 @@ function normalizeForHash(value) {
2314
2284
  return value;
2315
2285
  }
2316
2286
  async function computeEvalContentHash(definition) {
2287
+ const recordedToolMode = definition.recordedToolMode ?? "next_step";
2288
+ const recordedToolUnmatchedPolicy = definition.recordedToolUnmatchedPolicy ?? "fail";
2317
2289
  const canonical = {
2318
2290
  target: normalizeForHash(definition.target),
2319
2291
  virtual: definition.virtual,
2292
+ ...recordedToolMode !== "next_step" ? { recordedToolMode } : {},
2293
+ ...recordedToolUnmatchedPolicy !== "fail" ? { recordedToolUnmatchedPolicy } : {},
2320
2294
  cases: [...definition.cases].sort((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0).map((c) => ({
2321
2295
  name: c.name,
2322
2296
  input: normalizeForHash(c.input),
@@ -2971,6 +2945,7 @@ var RuntypeFlowBuilder = class {
2971
2945
  markdownIfAvailable: config.markdownIfAvailable,
2972
2946
  fetchMethod: config.fetchMethod === "http" ? "standard" : config.fetchMethod,
2973
2947
  firecrawl: config.firecrawl,
2948
+ massive: config.massive,
2974
2949
  outputVariable: config.outputVariable,
2975
2950
  errorHandling: config.errorHandling,
2976
2951
  defaultValue: config.defaultValue,
@@ -3131,7 +3106,6 @@ var RuntypeFlowBuilder = class {
3131
3106
  fieldsToExclude: config.fieldsToExclude,
3132
3107
  availableFields: config.availableFields,
3133
3108
  outputVariable: config.outputVariable,
3134
- fields: config.fields,
3135
3109
  includeMetadata: config.includeMetadata,
3136
3110
  streamOutput: config.streamOutput
3137
3111
  },
@@ -3224,7 +3198,6 @@ var RuntypeFlowBuilder = class {
3224
3198
  vectorStore: config.vectorStore,
3225
3199
  weaviateConfig: config.weaviateConfig,
3226
3200
  vectorizeConfig: config.vectorizeConfig,
3227
- pineconeConfig: config.pineconeConfig,
3228
3201
  limit: config.limit,
3229
3202
  threshold: config.threshold,
3230
3203
  metadataFilters: config.metadataFilters,
@@ -3253,7 +3226,6 @@ var RuntypeFlowBuilder = class {
3253
3226
  recordType: config.recordType,
3254
3227
  recordName: config.recordName,
3255
3228
  textField: config.textField,
3256
- storeInRecord: config.storeInRecord,
3257
3229
  embeddingModel: config.embeddingModel,
3258
3230
  maxLength: config.maxLength,
3259
3231
  inputMode: config.inputMode,
@@ -3261,7 +3233,6 @@ var RuntypeFlowBuilder = class {
3261
3233
  itemAlias: config.itemAlias,
3262
3234
  textTemplate: config.textTemplate,
3263
3235
  batchSize: config.batchSize,
3264
- vectorStore: config.vectorStore,
3265
3236
  outputVariable: config.outputVariable,
3266
3237
  streamOutput: config.streamOutput
3267
3238
  },
@@ -3310,51 +3281,6 @@ var RuntypeFlowBuilder = class {
3310
3281
  );
3311
3282
  return this;
3312
3283
  }
3313
- /**
3314
- * Add a send text step
3315
- */
3316
- sendText(config) {
3317
- this.addStep(
3318
- "send-text",
3319
- config.name,
3320
- {
3321
- to: config.to,
3322
- from: config.from,
3323
- message: config.message,
3324
- outputVariable: config.outputVariable,
3325
- errorHandling: config.errorHandling,
3326
- streamOutput: config.streamOutput
3327
- },
3328
- config.enabled,
3329
- config.when
3330
- );
3331
- return this;
3332
- }
3333
- /**
3334
- * Add a fetch GitHub step
3335
- */
3336
- fetchGitHub(config) {
3337
- this.addStep(
3338
- "fetch-github",
3339
- config.name,
3340
- {
3341
- repository: config.repository,
3342
- branch: config.branch,
3343
- path: config.path,
3344
- token: config.token,
3345
- outputVariable: config.outputVariable,
3346
- contentType: config.contentType,
3347
- includePatterns: config.includePatterns,
3348
- excludePatterns: config.excludePatterns,
3349
- compress: config.compress,
3350
- style: config.style,
3351
- streamOutput: config.streamOutput
3352
- },
3353
- config.enabled,
3354
- config.when
3355
- );
3356
- return this;
3357
- }
3358
3284
  /** Add an api-call step. */
3359
3285
  apiCall(config) {
3360
3286
  return this.addRawStep("api-call", config);
@@ -3913,6 +3839,18 @@ var EvalSuitesNamespace = class {
3913
3839
  input
3914
3840
  );
3915
3841
  }
3842
+ /**
3843
+ * Dry-run of {@link addCaseFromExecution}: reconstruct an agent execution
3844
+ * exactly as capture would and return its recorded actions plus the fork
3845
+ * index each maps to (and whether the case would be fully replayable), so a
3846
+ * caller can build a fork picker without re-deriving the seed math. Reads
3847
+ * only — nothing is written.
3848
+ */
3849
+ async getCapturePreview(executionId) {
3850
+ return this.getClient().get(
3851
+ `/eval/executions/${executionId}/capture-preview`
3852
+ );
3853
+ }
3916
3854
  /** Edit, enable, or disable a test case. */
3917
3855
  async updateCase(suiteId, caseId, input) {
3918
3856
  return this.getClient().patch(
@@ -3926,6 +3864,55 @@ var EvalSuitesNamespace = class {
3926
3864
  `/eval/suites/${suiteId}/cases/${caseId}`
3927
3865
  );
3928
3866
  }
3867
+ /**
3868
+ * List a suite's machine-proposed cases (the review queue). Every
3869
+ * generation source lands here; nothing enters the suite without an accept.
3870
+ */
3871
+ async listProposals(suiteId, params) {
3872
+ return this.getClient().get(
3873
+ `/eval/suites/${suiteId}/proposals`,
3874
+ params
3875
+ );
3876
+ }
3877
+ /**
3878
+ * Accept a proposal — materializes it as an eval case and backlinks it.
3879
+ * Pass `options.case` to save an edited body instead (recorded as
3880
+ * `edited_accepted`; the machine original stays on the proposal for audit).
3881
+ */
3882
+ async acceptProposal(suiteId, proposalId, options) {
3883
+ return this.getClient().post(
3884
+ `/eval/suites/${suiteId}/proposals/${proposalId}/accept`,
3885
+ options ?? {}
3886
+ );
3887
+ }
3888
+ /** Reject a proposal. The row survives as audit. */
3889
+ async rejectProposal(suiteId, proposalId) {
3890
+ return this.getClient().post(
3891
+ `/eval/suites/${suiteId}/proposals/${proposalId}/reject`,
3892
+ {}
3893
+ );
3894
+ }
3895
+ /**
3896
+ * Generate test-case proposals from the target's definition, fanned out
3897
+ * over an explicit diversity matrix (category × persona) and filtered for
3898
+ * gradeability. Results land as PROPOSALS for review — never directly in
3899
+ * the suite. Reserves one daily-eval quota slot per call.
3900
+ */
3901
+ async generateCases(suiteId, input) {
3902
+ return this.getClient().post(
3903
+ `/eval/suites/${suiteId}/generate-cases`,
3904
+ input ?? {}
3905
+ );
3906
+ }
3907
+ /**
3908
+ * The coverage meter: which of the target's tools and instruction clauses
3909
+ * the suite's cases and graders already exercise. The instruction inventory
3910
+ * is cached server-side and refreshed when the definition changes; a cache
3911
+ * miss spends a metered model call, so this requires eval-write scope.
3912
+ */
3913
+ async getCoverage(suiteId) {
3914
+ return this.getClient().get(`/eval/suites/${suiteId}/coverage`);
3915
+ }
3929
3916
  };
3930
3917
 
3931
3918
  // src/evals-namespace.ts
@@ -4157,6 +4144,28 @@ var EvalsNamespace = class {
4157
4144
  const client = this.getClient();
4158
4145
  return client.get(`/eval/runs/${runId}/scores`);
4159
4146
  }
4147
+ /**
4148
+ * Record a lightweight human review of one AI-grader verdict ("the grader
4149
+ * got this right / wrong"), using the `scoreId` on a persisted outcome from
4150
+ * `getRunScores`. Reviews accumulate into the suite's judge-trust display
4151
+ * ("agrees with you N of M times"). Pass `null` to clear an earlier review.
4152
+ *
4153
+ * @example
4154
+ * ```typescript
4155
+ * const scores = await Runtype.evals.getRunScores(runId)
4156
+ * const outcome = scores.cases[0]?.outcomes.find((o) => o.kind === 'ai')
4157
+ * if (outcome?.scoreId) {
4158
+ * await Runtype.evals.reviewScore(outcome.scoreId, 'disagree')
4159
+ * }
4160
+ * ```
4161
+ */
4162
+ async reviewScore(scoreId, verdict) {
4163
+ const client = this.getClient();
4164
+ return client.post(
4165
+ `/eval/scores/${scoreId}/review`,
4166
+ { verdict }
4167
+ );
4168
+ }
4160
4169
  /**
4161
4170
  * Get evaluation status by ID
4162
4171
  *
@@ -5324,7 +5333,9 @@ function normalizeFpoDefinition(fpo) {
5324
5333
  surfaces: normalizeValue(fpo.surfaces ?? []),
5325
5334
  ...fpo.records !== void 0 && fpo.records !== null ? { records: normalizeValue(fpo.records) } : {},
5326
5335
  ...fpo.schedules !== void 0 && fpo.schedules !== null ? { schedules: normalizeValue(fpo.schedules) } : {},
5327
- ...fpo.secrets !== void 0 && fpo.secrets !== null ? { secrets: normalizeValue(fpo.secrets) } : {}
5336
+ ...fpo.secrets !== void 0 && fpo.secrets !== null ? { secrets: normalizeValue(fpo.secrets) } : {},
5337
+ ...fpo.evals !== void 0 && fpo.evals !== null ? { evals: normalizeValue(fpo.evals) } : {},
5338
+ ...fpo.skills !== void 0 && fpo.skills !== null ? { skills: normalizeValue(fpo.skills) } : {}
5328
5339
  };
5329
5340
  }
5330
5341
  async function computeFpoContentHash(fpo) {
@@ -6156,7 +6167,7 @@ var Runtype = class {
6156
6167
 
6157
6168
  // src/version.ts
6158
6169
  var FALLBACK_VERSION = "0.0.0";
6159
- var SDK_VERSION = "5.10.0".length > 0 ? "5.10.0" : FALLBACK_VERSION;
6170
+ var SDK_VERSION = "6.1.3".length > 0 ? "6.1.3" : FALLBACK_VERSION;
6160
6171
  var RUNTYPE_CLIENT_KIND = "sdk";
6161
6172
  var SDK_USER_AGENT = `runtype-sdk/${SDK_VERSION} (typescript)`;
6162
6173
 
@@ -8400,6 +8411,69 @@ var RecordsEndpoint = class {
8400
8411
  });
8401
8412
  }
8402
8413
  };
8414
+ var CollectionsEndpoint = class {
8415
+ constructor(client) {
8416
+ this.client = client;
8417
+ }
8418
+ /**
8419
+ * List collections with cursor pagination. `includeCount: true` adds
8420
+ * per-collection record counts.
8421
+ */
8422
+ async list(params) {
8423
+ return this.client.get("/collections", params);
8424
+ }
8425
+ /**
8426
+ * Get a collection by slug. `includeHistory: true` embeds the append-only
8427
+ * schema version history.
8428
+ */
8429
+ async get(slug, params) {
8430
+ return this.client.get(`/collections/${slug}`, params);
8431
+ }
8432
+ /**
8433
+ * Register a record type as a collection. `validationMode` defaults to
8434
+ * `off`, so creating a collection changes no existing behavior.
8435
+ */
8436
+ async create(data) {
8437
+ return this.client.post("/collections", data);
8438
+ }
8439
+ /**
8440
+ * Update display fields, validation mode, or the schema. Breaking schema
8441
+ * changes are rejected while the resulting mode is `enforce`; transitioning
8442
+ * to `enforce` returns an `enforceCheck` dry-run summary.
8443
+ */
8444
+ async update(slug, data) {
8445
+ return this.client.patch(`/collections/${slug}`, data);
8446
+ }
8447
+ /**
8448
+ * Delete the collection REGISTRATION only — records of the type are not
8449
+ * touched and revert to schemaless behavior.
8450
+ */
8451
+ async delete(slug) {
8452
+ return this.client.delete(`/collections/${slug}`);
8453
+ }
8454
+ /**
8455
+ * Sample the type's most recently updated records and return a PROPOSED
8456
+ * schema with per-field confidence and sample values. Saves nothing —
8457
+ * review the proposal, then `update()` the collection.
8458
+ */
8459
+ async inferSchema(slug, params) {
8460
+ return this.client.post(
8461
+ `/collections/${slug}/infer-schema`,
8462
+ params ?? {}
8463
+ );
8464
+ }
8465
+ /**
8466
+ * Dry-run existing records against a schema without writing anything — the
8467
+ * "N of M records would fail" preview before enabling `enforce`. Uses the
8468
+ * provided schema when given, otherwise the collection's saved schema.
8469
+ */
8470
+ async validateExisting(slug, data) {
8471
+ return this.client.post(
8472
+ `/collections/${slug}/validate-existing`,
8473
+ data ?? {}
8474
+ );
8475
+ }
8476
+ };
8403
8477
  var ApiKeysEndpoint = class {
8404
8478
  constructor(client) {
8405
8479
  this.client = client;
@@ -9019,13 +9093,21 @@ var ClientTokensEndpoint = class {
9019
9093
  constructor(client) {
9020
9094
  this.client = client;
9021
9095
  }
9022
- /**
9023
- * List all client tokens for the authenticated user
9024
- */
9025
- async list() {
9026
- const response = await this.client.get(
9027
- "/client-tokens"
9028
- );
9096
+ async list(params) {
9097
+ const response = await this.client.get("/client-tokens", params);
9098
+ if (params?.limit !== void 0) {
9099
+ return {
9100
+ clientTokens: response.clientTokens,
9101
+ // The API always includes pagination when limit is supplied; the
9102
+ // fallback mirrors the server's own envelope math so the paged
9103
+ // overload stays total against older API deployments.
9104
+ pagination: response.pagination ?? {
9105
+ limit: params.limit,
9106
+ offset: params.offset ?? 0,
9107
+ hasMore: response.clientTokens.length === params.limit
9108
+ }
9109
+ };
9110
+ }
9029
9111
  return response.clientTokens;
9030
9112
  }
9031
9113
  /**
@@ -12445,6 +12527,22 @@ var IntegrationsEndpoint = class {
12445
12527
  async installSlack(data) {
12446
12528
  return this.client.post("/integrations/slack/install", data);
12447
12529
  }
12530
+ /**
12531
+ * Start the Slack "Add to Slack" OAuth handshake. Returns the Slack authorize
12532
+ * URL to open in a popup; the bot token is captured server-side by the
12533
+ * callback (never returned to the browser).
12534
+ */
12535
+ async startSlackOAuth(data) {
12536
+ return this.client.post("/oauth/slack/start", data);
12537
+ }
12538
+ /**
12539
+ * Generate the Slack app manifest and one-click create-app deep link for a
12540
+ * surface. The manifest carries absolute API URLs derived server-side, so it
12541
+ * is always valid for Slack (relative proxy paths never leak in).
12542
+ */
12543
+ async generateSlackManifest(data) {
12544
+ return this.client.post("/integrations/slack/manifest", data);
12545
+ }
12448
12546
  };
12449
12547
  var BillingEndpoint = class {
12450
12548
  constructor(client) {
@@ -12463,7 +12561,15 @@ var BillingEndpoint = class {
12463
12561
  return this.client.get("/billing/credits");
12464
12562
  }
12465
12563
  /**
12466
- * Get spend analytics. The window is controlled by `days` (1–365, defaults to 30).
12564
+ * Get the caller's exact current UTC-month platform spend from the local
12565
+ * meter used for spend-cap enforcement. Returns 503 when that meter is unavailable.
12566
+ */
12567
+ async getCurrentSpend() {
12568
+ return this.client.get("/billing/current-spend");
12569
+ }
12570
+ /**
12571
+ * Get spend analytics. The window is controlled by either `period` or `days`
12572
+ * (1–365, defaults to 30).
12467
12573
  */
12468
12574
  async getSpendAnalytics(params) {
12469
12575
  return this.client.get("/billing/spend-analytics", params);
@@ -12492,52 +12598,6 @@ var ToolApprovalGrantsEndpoint = class {
12492
12598
  return this.client.delete(`/tool-approval-grants/${id}`);
12493
12599
  }
12494
12600
  };
12495
- var AppsEndpoint = class {
12496
- constructor(client) {
12497
- this.client = client;
12498
- }
12499
- /** List apps for the authenticated owner, newest first. */
12500
- async list() {
12501
- return this.client.get("/apps");
12502
- }
12503
- /** Get an app by id, including its URL and active version pointer. */
12504
- async get(id) {
12505
- return this.client.get(`/apps/${id}`);
12506
- }
12507
- /** Create an app. A client token scoped to the app origin is auto-provisioned. */
12508
- async create(data) {
12509
- return this.client.post("/apps", data);
12510
- }
12511
- /** Update name, description, visibility, or status (suspended serves 410). */
12512
- async update(id, data) {
12513
- return this.client.patch(`/apps/${id}`, data);
12514
- }
12515
- /** Delete an app, its versions, and its hosting. Irreversible. */
12516
- async delete(id) {
12517
- return this.client.delete(`/apps/${id}`);
12518
- }
12519
- /** List an app's versions, newest first. */
12520
- async listVersions(id) {
12521
- return this.client.get(`/apps/${id}/versions`);
12522
- }
12523
- /** Upload a zipped bundle (raw application/zip body) as a new version. */
12524
- async uploadVersion(id, zipBytes) {
12525
- return this.client.postBinary(`/apps/${id}/versions`, zipBytes, "application/zip");
12526
- }
12527
- /**
12528
- * Upload a bundle from in-memory file maps (the API zips server-side).
12529
- * Text files in `files`, binary files base64-encoded in `filesBase64`.
12530
- */
12531
- async uploadVersionFiles(id, data) {
12532
- return this.client.post(`/apps/${id}/versions`, data);
12533
- }
12534
- /** Activate an uploaded version (deploy or rollback). */
12535
- async activate(id, versionId) {
12536
- return this.client.post(`/apps/${id}/activate`, {
12537
- versionId
12538
- });
12539
- }
12540
- };
12541
12601
 
12542
12602
  // src/client.ts
12543
12603
  function isObjectRecord(value) {
@@ -12574,6 +12634,7 @@ var RuntypeClient2 = class {
12574
12634
  this.flows = new FlowsEndpoint(this);
12575
12635
  this.prompts = new PromptsEndpoint(this);
12576
12636
  this.records = new RecordsEndpoint(this);
12637
+ this.collections = new CollectionsEndpoint(this);
12577
12638
  this.apiKeys = new ApiKeysEndpoint(this);
12578
12639
  this.modelConfigs = new ModelConfigsEndpoint(this);
12579
12640
  this.providerKeys = new ProviderKeysEndpoint(this);
@@ -12588,7 +12649,6 @@ var RuntypeClient2 = class {
12588
12649
  this.clientTokens = new ClientTokensEndpoint(this);
12589
12650
  this.agents = new AgentsEndpoint(this);
12590
12651
  this.secrets = new SecretsEndpoint(this);
12591
- this.apps = new AppsEndpoint(this);
12592
12652
  this.schedules = new SchedulesEndpoint(this);
12593
12653
  this.surfaces = new SurfacesEndpoint(this);
12594
12654
  this.conversations = new ConversationsEndpoint(this);
@@ -13411,6 +13471,7 @@ var FETCH_URL_FIELDS = [
13411
13471
  { key: "markdownIfAvailable", format: "raw" },
13412
13472
  { key: "fetchMethod", format: "json", skipDefault: "standard" },
13413
13473
  { key: "firecrawl", format: "value" },
13474
+ { key: "massive", format: "value" },
13414
13475
  { key: "outputVariable", format: "json" },
13415
13476
  { key: "streamOutput", format: "raw" },
13416
13477
  { key: "errorHandling", format: "value", skipDefault: "fail" },
@@ -13474,7 +13535,10 @@ var SEND_EMAIL_FIELDS = [
13474
13535
  { key: "defaultValue", format: "value" }
13475
13536
  ];
13476
13537
  var SEND_STREAM_FIELDS = [
13477
- { key: "message", format: "template" }
13538
+ { key: "message", format: "template" },
13539
+ { key: "outputVariable", format: "json" },
13540
+ { key: "errorHandling", format: "value", skipDefault: "fail" },
13541
+ { key: "defaultValue", format: "value" }
13478
13542
  ];
13479
13543
  var RETRIEVE_RECORD_FIELDS = [
13480
13544
  { key: "retrievalMode", format: "json" },
@@ -13486,7 +13550,6 @@ var RETRIEVE_RECORD_FIELDS = [
13486
13550
  { key: "fieldsToExclude", format: "json" },
13487
13551
  { key: "availableFields", format: "value" },
13488
13552
  { key: "outputVariable", format: "json" },
13489
- { key: "fields", format: "value" },
13490
13553
  { key: "includeMetadata", format: "raw" },
13491
13554
  { key: "streamOutput", format: "raw" }
13492
13555
  ];
@@ -13531,7 +13594,6 @@ var VECTOR_SEARCH_FIELDS = [
13531
13594
  { key: "vectorStore", format: "json" },
13532
13595
  { key: "weaviateConfig", format: "value" },
13533
13596
  { key: "vectorizeConfig", format: "value" },
13534
- { key: "pineconeConfig", format: "value" },
13535
13597
  { key: "limit", format: "raw", skipDefault: 5 },
13536
13598
  { key: "threshold", format: "raw", skipDefault: 0.7 },
13537
13599
  { key: "metadataFilters", format: "value" },
@@ -13548,7 +13610,6 @@ var GENERATE_EMBEDDING_FIELDS = [
13548
13610
  { key: "recordType", format: "json" },
13549
13611
  { key: "recordName", format: "json" },
13550
13612
  { key: "textField", format: "json" },
13551
- { key: "storeInRecord", format: "raw" },
13552
13613
  { key: "embeddingModel", format: "json" },
13553
13614
  { key: "maxLength", format: "raw" },
13554
13615
  { key: "inputMode", format: "json" },
@@ -13556,7 +13617,6 @@ var GENERATE_EMBEDDING_FIELDS = [
13556
13617
  { key: "itemAlias", format: "json" },
13557
13618
  { key: "textTemplate", format: "template" },
13558
13619
  { key: "batchSize", format: "raw" },
13559
- { key: "vectorStore", format: "value" },
13560
13620
  { key: "outputVariable", format: "json" },
13561
13621
  { key: "streamOutput", format: "raw" }
13562
13622
  ];
@@ -13576,31 +13636,9 @@ var SEND_EVENT_FIELDS = [
13576
13636
  { key: "streamOutput", format: "raw" },
13577
13637
  { key: "errorHandling", format: "value", skipDefault: "fail" }
13578
13638
  ];
13579
- var SEND_TEXT_FIELDS = [
13580
- { key: "to", format: "json" },
13581
- { key: "from", format: "json" },
13582
- { key: "message", format: "template" },
13583
- { key: "outputVariable", format: "json" },
13584
- { key: "streamOutput", format: "raw" },
13585
- { key: "errorHandling", format: "value", skipDefault: "fail" }
13586
- ];
13587
- var FETCH_GITHUB_FIELDS = [
13588
- { key: "repository", format: "json" },
13589
- { key: "branch", format: "json" },
13590
- { key: "path", format: "json" },
13591
- { key: "token", format: "json" },
13592
- { key: "outputVariable", format: "json" },
13593
- { key: "contentType", format: "json" },
13594
- { key: "includePatterns", format: "value" },
13595
- { key: "excludePatterns", format: "value" },
13596
- { key: "compress", format: "raw" },
13597
- { key: "style", format: "json" },
13598
- { key: "streamOutput", format: "raw" }
13599
- ];
13600
13639
  var API_CALL_FIELDS = [
13601
13640
  { key: "http", format: "value" },
13602
13641
  { key: "auth", format: "value" },
13603
- { key: "requestTemplate", format: "template" },
13604
13642
  { key: "responseMapping", format: "value" },
13605
13643
  { key: "outputVariable", format: "json" },
13606
13644
  { key: "streamOutput", format: "raw" },
@@ -13611,7 +13649,6 @@ var EXECUTE_AGENT_FIELDS = [
13611
13649
  { key: "agentId", format: "json" },
13612
13650
  { key: "message", format: "template" },
13613
13651
  { key: "outputVariable", format: "json" },
13614
- { key: "variables", format: "value" },
13615
13652
  { key: "maxTurns", format: "raw" },
13616
13653
  { key: "timeout", format: "raw" },
13617
13654
  { key: "errorHandling", format: "value", skipDefault: "fail" },
@@ -13658,7 +13695,6 @@ var UPDATE_RECORD_FIELDS = [
13658
13695
  { key: "recordName", format: "json" },
13659
13696
  { key: "recordFilter", format: "value" },
13660
13697
  { key: "updates", format: "value" },
13661
- { key: "updatesTemplate", format: "template" },
13662
13698
  { key: "mergeStrategy", format: "json" },
13663
13699
  { key: "outputVariable", format: "json" },
13664
13700
  { key: "streamOutput", format: "raw" },
@@ -13695,7 +13731,6 @@ var PAGINATE_API_FIELDS = [
13695
13731
  { key: "startPage", format: "raw" },
13696
13732
  { key: "entitiesPath", format: "json" },
13697
13733
  { key: "entityPath", format: "json" },
13698
- { key: "entityIdPath", format: "json" },
13699
13734
  { key: "maxEntities", format: "raw" },
13700
13735
  { key: "requestDelayMs", format: "raw" },
13701
13736
  { key: "retryOnRateLimit", format: "raw" },
@@ -13715,13 +13750,10 @@ var STORE_VECTOR_FIELDS = [
13715
13750
  { key: "destination", format: "json" },
13716
13751
  { key: "weaviateConfig", format: "value" },
13717
13752
  { key: "vectorizeConfig", format: "value" },
13718
- { key: "pineconeConfig", format: "value" },
13719
13753
  { key: "weaviateConfigId", format: "json" },
13720
13754
  { key: "weaviateClassName", format: "json" },
13721
13755
  { key: "vectorizeConfigId", format: "json" },
13722
13756
  { key: "vectorizeNamespace", format: "json" },
13723
- { key: "pineconeConfigId", format: "json" },
13724
- { key: "pineconeNamespace", format: "json" },
13725
13757
  { key: "idTemplate", format: "template" },
13726
13758
  { key: "metadata", format: "value" },
13727
13759
  { key: "outputVariable", format: "json" },
@@ -13773,8 +13805,6 @@ var STEP_FIELD_REGISTRY = {
13773
13805
  "generate-embedding": GENERATE_EMBEDDING_FIELDS,
13774
13806
  "wait-until": WAIT_UNTIL_FIELDS,
13775
13807
  "send-event": SEND_EVENT_FIELDS,
13776
- "send-text": SEND_TEXT_FIELDS,
13777
- "fetch-github": FETCH_GITHUB_FIELDS,
13778
13808
  template: TEMPLATE_FIELDS,
13779
13809
  "store-asset": STORE_ASSET_FIELDS,
13780
13810
  "generate-pdf": GENERATE_PDF_FIELDS,
@@ -13794,7 +13824,6 @@ var STEP_TYPE_TO_METHOD = {
13794
13824
  "retrieve-record": "retrieveRecord",
13795
13825
  "get-record": "getRecord",
13796
13826
  "list-records": "listRecords",
13797
- "fetch-github": "fetchGitHub",
13798
13827
  "transform-data": "transformData",
13799
13828
  template: "template",
13800
13829
  conditional: "conditional",
@@ -13802,7 +13831,6 @@ var STEP_TYPE_TO_METHOD = {
13802
13831
  "upsert-record": "upsertRecord",
13803
13832
  "update-record": "updateRecord",
13804
13833
  "send-email": "sendEmail",
13805
- "send-text": "sendText",
13806
13834
  "send-event": "sendEvent",
13807
13835
  "send-stream": "sendStream",
13808
13836
  search: "search",
@@ -13827,7 +13855,6 @@ export {
13827
13855
  AgentsNamespace,
13828
13856
  AnalyticsEndpoint,
13829
13857
  ApiKeysEndpoint,
13830
- AppsEndpoint,
13831
13858
  BatchBuilder,
13832
13859
  BatchesNamespace,
13833
13860
  BillingEndpoint,
@@ -13836,6 +13863,7 @@ export {
13836
13863
  ClientEvalBuilder,
13837
13864
  ClientFlowBuilder,
13838
13865
  ClientTokensEndpoint,
13866
+ CollectionsEndpoint,
13839
13867
  ContextTemplatesEndpoint,
13840
13868
  ConversationsEndpoint,
13841
13869
  DEFAULT_RECOVERY_AFTER_EMPTY_SESSIONS,