@warmhub/sdk-ts 0.67.0 → 0.69.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.
@@ -295,61 +295,6 @@ function joinFieldPathWithEscaper(escapeSegment, segments) {
295
295
  (segment) => typeof segment === "number" ? `[${segment}]` : escapeSegment(segment)
296
296
  ).join(".").replace(/\.\[/g, "[");
297
297
  }
298
- var PLATFORM_STATUS_STATUSES = [
299
- {
300
- key: "available",
301
- label: "Available",
302
- description: "Works as expected."
303
- },
304
- {
305
- key: "degraded",
306
- label: "Degraded",
307
- description: "Works with known caveats or partial reliability."
308
- },
309
- {
310
- key: "unavailable",
311
- label: "Unavailable",
312
- description: "Exists in code but is broken or blocked."
313
- },
314
- {
315
- key: "not_yet_built",
316
- label: "Not Yet Built",
317
- description: "This feature-surface combination does not exist yet."
318
- },
319
- {
320
- key: "unknown",
321
- label: "Unknown",
322
- description: "Has not been assessed yet."
323
- }
324
- ];
325
- ({
326
- statuses: [
327
- {
328
- key: {
329
- type: "string",
330
- enum: PLATFORM_STATUS_STATUSES.map((status) => status.key),
331
- description: "Stable status key."
332
- },
333
- label: {
334
- type: "string",
335
- description: "Human-readable label for the status."
336
- },
337
- description: {
338
- type: "string",
339
- description: "Human-readable definition of the status."
340
- }
341
- }
342
- ]});
343
- ({
344
- status: {
345
- enum: PLATFORM_STATUS_STATUSES.map((status) => status.key)},
346
- "issueMiningBaseline?": {
347
- status: {
348
- enum: PLATFORM_STATUS_STATUSES.map((status) => status.key)}}
349
- });
350
- ({
351
- "statusHint?": {
352
- enum: PLATFORM_STATUS_STATUSES.map((status) => status.key)}});
353
298
 
354
299
  // ../rules/src/tokens.ts
355
300
  var COMMIT_TOKEN_SYNTAX_REMOVED_MESSAGE = "$N/#N commit-token syntax is no longer supported. Use explicit names and explicit wrefs. For assertions about newly created things, create the thing with a deterministic name and set about to that wref in the same commit.";
@@ -463,12 +408,17 @@ function builtinShapeGuard(op, operationIndex) {
463
408
  operationIndex,
464
409
  message: `Shape "${op.newName}" is a retired collection shape and cannot be written manually`
465
410
  });
466
- } else if (op.operation !== "retract" && op.kind === "shape" && name && isBuiltinShape(name)) {
467
- errors.push({
468
- code: "RESERVED_NAME",
469
- operationIndex,
470
- message: `Shape "${name}" is a built-in shape and cannot be ${op.operation === "add" ? "created" : "revised"} manually`
471
- });
411
+ } else {
412
+ const isShapeRename = op.operation === "rename" && (op.kind === "shape" || op.name !== void 0 && !splitLocalPath(op.name));
413
+ const builtinShapeName = name && isBuiltinShape(name) ? name : isShapeRename && op.newName && isBuiltinShape(op.newName) ? op.newName : void 0;
414
+ if (builtinShapeName && (isShapeRename || op.operation !== "retract" && op.kind === "shape")) {
415
+ const action = op.operation === "add" ? "created" : op.operation === "rename" ? "renamed" : "revised";
416
+ errors.push({
417
+ code: "RESERVED_NAME",
418
+ operationIndex,
419
+ message: `Shape "${builtinShapeName}" is a built-in shape and cannot be ${action} manually`
420
+ });
421
+ }
472
422
  }
473
423
  if (name) {
474
424
  const local = splitLocalPath(name);
@@ -7178,7 +7128,7 @@ function validatePersistedStringFieldLimits(value, typeDef, errors, path) {
7178
7128
  }
7179
7129
  if (Array.isArray(value)) {
7180
7130
  const elementType = arrayElementType(normalized);
7181
- if (normalized !== void 0 && elementType === void 0) return;
7131
+ if (elementType === void 0 && !isDeclaredArrayType(normalized)) return;
7182
7132
  for (let i = 0; i < value.length; i++) {
7183
7133
  validatePersistedStringFieldLimits(
7184
7134
  value[i],
@@ -7215,6 +7165,10 @@ function arrayElementType(typeDef) {
7215
7165
  return typeDef.items;
7216
7166
  return void 0;
7217
7167
  }
7168
+ function isDeclaredArrayType(typeDef) {
7169
+ if (typeDef === "array" || Array.isArray(typeDef)) return true;
7170
+ return isTypeSpecObject(typeDef) && typeDef.type === "array";
7171
+ }
7218
7172
  function nestedObjectFields(typeDef) {
7219
7173
  if (!isPlainObject(typeDef) || isTypeSpecObject(typeDef)) return void 0;
7220
7174
  const fields = /* @__PURE__ */ new Map();
@@ -9278,7 +9232,7 @@ function validateWarmHubClientOptions(options) {
9278
9232
  throw new TypeError(`Unknown WarmHubClient option "${key}"${hint}`);
9279
9233
  }
9280
9234
  }
9281
- var SDK_VERSION = "0.67.0" ;
9235
+ var SDK_VERSION = "0.69.0" ;
9282
9236
  var DEFAULT_API_URL = "https://api.warmhub.ai";
9283
9237
  var UNBATCHED_TRPC_PATHS = /* @__PURE__ */ new Set([
9284
9238
  "repo.shapeInstanceCounts",
@@ -9888,9 +9842,10 @@ var WarmHubClient = class _WarmHubClient {
9888
9842
  }
9889
9843
  },
9890
9844
  /**
9891
- * Search public registered components across all orgs (GH-4383).
9892
- * Public-only at launch. Distinct from listing components installed in a
9893
- * repo (`component.list`).
9845
+ * Search registered components visible to the caller across all orgs
9846
+ * (GH-4383): public components plus private components the caller can
9847
+ * read. Distinct from listing components installed in a repo
9848
+ * (`component.list`).
9894
9849
  */
9895
9850
  search: async (query, opts) => {
9896
9851
  try {
@@ -10115,7 +10070,7 @@ var WarmHubClient = class _WarmHubClient {
10115
10070
  *
10116
10071
  * @param message Optional commit message stored with the submitted operations.
10117
10072
  * @param operations Add, revise, or retract operations to submit in order.
10118
- * @param opts.committer Optional wref identifying the actor on whose behalf the write is made. Must be a full wref string like `"Agent/bot-1"` (a thing that already exists), or a cross-repo wref like `"wh:other-org/other-repo/Agent/bot-1"`. Bare names such as `"eval-runner"` are rejected by the backend with a "Thing wref required" error — there is no implicit shape.
10073
+ * @param opts.committer Optional untyped wref identifying the actor on whose behalf the write is made. It may target an existing shape (`"Agent"`) or shaped thing (`"Agent/bot-1"`), locally or canonically (`"wh:other-org/other-repo/Agent"` or `"wh:other-org/other-repo/Agent/bot-1"`). A one-segment value is a shape wref, not a free-form label, and succeeds only when that shape exists. On success, `OperationSubmitResult.committer` echoes the supplied wref string; version reads expose the resolved target as `committerWref`.
10119
10074
  * @param opts.componentRef Attribute writes to an installed component, identified by its `Org/Name` ref, when the caller is allowed to claim it.
10120
10075
  * @param opts.chunkSize Maximum operations per stream append. Values are clamped by the SDK.
10121
10076
  * @param opts.skipExisting Return `noop` for add operations whose target already exists.
@@ -10491,8 +10446,9 @@ var WarmHubClient = class _WarmHubClient {
10491
10446
  }
10492
10447
  },
10493
10448
  /**
10494
- * Search public repos across all orgs (GH-4383). Public-only at launch;
10495
- * BM25 over name/description/shape vocabulary/README.
10449
+ * Search repos visible to the caller across all orgs (GH-4383): public
10450
+ * repos plus private repos the caller can read. BM25 over
10451
+ * name/description/shape vocabulary/README.
10496
10452
  */
10497
10453
  search: async (query, opts) => {
10498
10454
  try {
@@ -11844,7 +11800,7 @@ var WarmHubClient = class _WarmHubClient {
11844
11800
  }
11845
11801
  },
11846
11802
  /**
11847
- * Return assertions about a thing or collection target.
11803
+ * Return assertions about a shape, shaped thing, or collection target.
11848
11804
  *
11849
11805
  * Filter by assertion shape or glob `match` pattern, optionally resolve collection targets, and page through large assertion sets with `limit` and `cursor`.
11850
11806
  *
@@ -11886,7 +11842,7 @@ var WarmHubClient = class _WarmHubClient {
11886
11842
  }
11887
11843
  },
11888
11844
  /**
11889
- * Iterate every assertion about a thing or collection target.
11845
+ * Iterate every assertion about a shape, shaped thing, or collection target.
11890
11846
  *
11891
11847
  * Prefer this over hand-written cursor loops when scanning all matching assertions. The iterator reads the `assertions` envelope field and advances the cursor automatically; pass `opts.cursor` to resume from a saved cursor and `limit` to control page size.
11892
11848
  *
@@ -11904,7 +11860,7 @@ var WarmHubClient = class _WarmHubClient {
11904
11860
  );
11905
11861
  },
11906
11862
  /**
11907
- * Materialize every assertion about a thing or collection target.
11863
+ * Materialize every assertion about a shape, shaped thing, or collection target.
11908
11864
  *
11909
11865
  * Use `max` to guard memory usage; throws a `WarmHubError` with kind `VALIDATION_ERROR` once more than `max` assertions have actually been observed across pages.
11910
11866
  *
@@ -12811,5 +12767,5 @@ re2js/build/index.js:
12811
12767
  */
12812
12768
 
12813
12769
  export { AllStreamOperationsFailedError, CLI_INSTALL_REPO_HEADER, CLI_SIGNATURE_HEADER, CLI_TIMESTAMP_HEADER, CONTENT_FIELD_LIMIT_ERROR, CliCallVerificationError, DEFAULT_API_URL, DEFAULT_STREAM_CHUNK_SIZE, MAX_CONTENT_FIELD_BYTES, MAX_STREAM_APPEND_OPERATION_COUNT2 as MAX_STREAM_APPEND_OPERATION_COUNT, OperationBuilder, PartialStreamSubmissionError, SDK_VERSION, WarmHubClient, WarmHubError, connectionErrorMessage, contentFieldLimitError, countStreamAppendResultStatuses, isConnectionError, isRetryable, isWarmHubError, normalizeWref, resolveFunctionLogMode, sanitizeErrorMessage, sdkVersionIsBelowMinimum, streamAppendResultStatus, submitOperationsViaStream, toWarmHubError, validateAgainstShape, verifyCliCall };
12814
- //# sourceMappingURL=chunk-2KN2JWJU.js.map
12815
- //# sourceMappingURL=chunk-2KN2JWJU.js.map
12770
+ //# sourceMappingURL=chunk-QI7ELATB.js.map
12771
+ //# sourceMappingURL=chunk-QI7ELATB.js.map