@warmhub/sdk-ts 0.67.0 → 0.68.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.
@@ -463,12 +463,17 @@ function builtinShapeGuard(op, operationIndex) {
463
463
  operationIndex,
464
464
  message: `Shape "${op.newName}" is a retired collection shape and cannot be written manually`
465
465
  });
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
- });
466
+ } else {
467
+ const isShapeRename = op.operation === "rename" && (op.kind === "shape" || op.name !== void 0 && !splitLocalPath(op.name));
468
+ const builtinShapeName = name && isBuiltinShape(name) ? name : isShapeRename && op.newName && isBuiltinShape(op.newName) ? op.newName : void 0;
469
+ if (builtinShapeName && (isShapeRename || op.operation !== "retract" && op.kind === "shape")) {
470
+ const action = op.operation === "add" ? "created" : op.operation === "rename" ? "renamed" : "revised";
471
+ errors.push({
472
+ code: "RESERVED_NAME",
473
+ operationIndex,
474
+ message: `Shape "${builtinShapeName}" is a built-in shape and cannot be ${action} manually`
475
+ });
476
+ }
472
477
  }
473
478
  if (name) {
474
479
  const local = splitLocalPath(name);
@@ -9278,7 +9283,7 @@ function validateWarmHubClientOptions(options) {
9278
9283
  throw new TypeError(`Unknown WarmHubClient option "${key}"${hint}`);
9279
9284
  }
9280
9285
  }
9281
- var SDK_VERSION = "0.67.0" ;
9286
+ var SDK_VERSION = "0.68.0" ;
9282
9287
  var DEFAULT_API_URL = "https://api.warmhub.ai";
9283
9288
  var UNBATCHED_TRPC_PATHS = /* @__PURE__ */ new Set([
9284
9289
  "repo.shapeInstanceCounts",
@@ -10115,7 +10120,7 @@ var WarmHubClient = class _WarmHubClient {
10115
10120
  *
10116
10121
  * @param message Optional commit message stored with the submitted operations.
10117
10122
  * @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.
10123
+ * @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
10124
  * @param opts.componentRef Attribute writes to an installed component, identified by its `Org/Name` ref, when the caller is allowed to claim it.
10120
10125
  * @param opts.chunkSize Maximum operations per stream append. Values are clamped by the SDK.
10121
10126
  * @param opts.skipExisting Return `noop` for add operations whose target already exists.
@@ -11844,7 +11849,7 @@ var WarmHubClient = class _WarmHubClient {
11844
11849
  }
11845
11850
  },
11846
11851
  /**
11847
- * Return assertions about a thing or collection target.
11852
+ * Return assertions about a shape, shaped thing, or collection target.
11848
11853
  *
11849
11854
  * Filter by assertion shape or glob `match` pattern, optionally resolve collection targets, and page through large assertion sets with `limit` and `cursor`.
11850
11855
  *
@@ -11886,7 +11891,7 @@ var WarmHubClient = class _WarmHubClient {
11886
11891
  }
11887
11892
  },
11888
11893
  /**
11889
- * Iterate every assertion about a thing or collection target.
11894
+ * Iterate every assertion about a shape, shaped thing, or collection target.
11890
11895
  *
11891
11896
  * 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
11897
  *
@@ -11904,7 +11909,7 @@ var WarmHubClient = class _WarmHubClient {
11904
11909
  );
11905
11910
  },
11906
11911
  /**
11907
- * Materialize every assertion about a thing or collection target.
11912
+ * Materialize every assertion about a shape, shaped thing, or collection target.
11908
11913
  *
11909
11914
  * 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
11915
  *
@@ -12811,5 +12816,5 @@ re2js/build/index.js:
12811
12816
  */
12812
12817
 
12813
12818
  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
12819
+ //# sourceMappingURL=chunk-GNNCLRNC.js.map
12820
+ //# sourceMappingURL=chunk-GNNCLRNC.js.map