@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.
package/dist/index.d.ts CHANGED
@@ -44,10 +44,12 @@ type CommitOperationKind = (typeof COMMIT_OPERATION_KINDS)[number];
44
44
  */
45
45
  declare const CLI_INSTALL_REPO_HEADER = "X-WarmHub-Install-Repo";
46
46
  /**
47
+ * HMAC signature header used by component CLI dispatch.
47
48
  * @see https://docs.warmhub.ai/sdk-reference/variables/cli_signature_header/
48
49
  */
49
50
  declare const CLI_SIGNATURE_HEADER = "X-WarmHub-Signature";
50
51
  /**
52
+ * Unix-seconds timestamp header used by component CLI dispatch.
51
53
  * @see https://docs.warmhub.ai/sdk-reference/variables/cli_timestamp_header/
52
54
  */
53
55
  declare const CLI_TIMESTAMP_HEADER = "X-WarmHub-Timestamp";
@@ -63,7 +65,7 @@ type CliHttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
63
65
  *
64
66
  * Shape field types:
65
67
  * - "number", "string", "boolean": primitive types
66
- * - "wref": string (reference to another thing)
68
+ * - "wref": string (reference to a shape or shaped thing)
67
69
  * - Typed field objects: { type: primitive, description?: string }
68
70
  * - Nested objects: { fieldName: type, ... }
69
71
  * - Arrays: [elementType]
@@ -96,6 +98,7 @@ type CliHttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
96
98
  */
97
99
  declare function validateAgainstShape(data: Record<string, unknown>, shapeFields: Record<string, unknown>): ShapeValidatorResult;
98
100
  /**
101
+ * Warning details for input fields that the shape does not declare.
99
102
  * @see https://docs.warmhub.ai/sdk-reference/type-aliases/undeclaredfieldswarning/
100
103
  */
101
104
  type UndeclaredFieldsWarning = {
@@ -104,6 +107,7 @@ type UndeclaredFieldsWarning = {
104
107
  totalUndeclared?: number;
105
108
  };
106
109
  /**
110
+ * Discriminated result returned when input is validated against shape fields.
107
111
  * @see https://docs.warmhub.ai/sdk-reference/type-aliases/shapevalidatorresult/
108
112
  */
109
113
  type ShapeValidatorResult = {
@@ -1489,6 +1493,7 @@ declare function countStreamAppendResultStatuses(results: StreamAppendResult$1['
1489
1493
 
1490
1494
  type CliCallVerificationFailureReason = 'missing-signature' | 'missing-timestamp' | 'invalid-timestamp' | 'missing-install-repo' | 'unsupported-method' | 'invalid-signature' | 'invalid-format' | 'expired' | 'invalid-body' | 'no-scheme-configured' | 'invalid-bearer' | 'invalid-api-key' | 'invalid-basic';
1491
1495
  /**
1496
+ * Error thrown when component CLI request verification fails.
1492
1497
  * @see https://docs.warmhub.ai/sdk-reference/classes/clicallverificationerror/
1493
1498
  */
1494
1499
  declare class CliCallVerificationError extends Error {
@@ -1496,6 +1501,7 @@ declare class CliCallVerificationError extends Error {
1496
1501
  constructor(reason: CliCallVerificationFailureReason, message: string);
1497
1502
  }
1498
1503
  /**
1504
+ * Authenticated component CLI request, parsed into its install and arguments.
1499
1505
  * @see https://docs.warmhub.ai/sdk-reference/interfaces/verifiedclicall/
1500
1506
  */
1501
1507
  interface VerifiedCliCall {
@@ -1552,6 +1558,7 @@ declare function verifyCliCall(request: Request, secrets: CliCallSecrets, opts?:
1552
1558
  type ShapeFields = Record<string, unknown>;
1553
1559
 
1554
1560
  /**
1561
+ * Collection type discriminator accepted by an add operation.
1555
1562
  * @see https://docs.warmhub.ai/sdk-reference/type-aliases/collectionaddtype/
1556
1563
  */
1557
1564
  type CollectionAddType = CollectionTag$1;
@@ -2138,11 +2145,12 @@ type SubscriptionCompatCreateCommon = {
2138
2145
  };
2139
2146
  /**
2140
2147
  * Input shape for `client.subscription.create`, discriminated on `eventType`
2141
- * (GH-4679):
2148
+ * (GH-4679, GH-6553):
2142
2149
  *
2143
2150
  * - default / `commit` — operation-based, repo-scoped (`repoName`); requires a
2144
2151
  * `filterJson` object and a shape binding (`shapeName` or `filterJson.shape`).
2145
- * - `repo.renamed` — repo-scoped metadata event; no shape/filter/source.
2152
+ * - `repo.renamed` / `thing.renamed` / `shape.renamed` — repo-scoped metadata
2153
+ * events; no shape/filter/source.
2146
2154
  * - `org.renamed` — org-scoped metadata event; no `repoName`/shape/filter/source.
2147
2155
  *
2148
2156
  * The metadata variants forbid the commit-only fields at the type level so
@@ -2157,7 +2165,7 @@ type SubscriptionCompatCreateInput = (SubscriptionCompatCreateCommon & {
2157
2165
  shapeName?: string;
2158
2166
  sourceRepoRef?: string;
2159
2167
  }) | (SubscriptionCompatCreateCommon & {
2160
- eventType: 'repo.renamed';
2168
+ eventType: 'repo.renamed' | 'thing.renamed' | 'shape.renamed';
2161
2169
  repoName: string;
2162
2170
  filterJson?: never;
2163
2171
  shapeName?: never;
@@ -2173,7 +2181,7 @@ type SubscriptionCompatCreateInput = (SubscriptionCompatCreateCommon & {
2173
2181
  * Input shape for `client.subscription.update`. `orgName` and `name` identify
2174
2182
  * the subscription; omit `repoName` to update an org-scoped (`org.renamed`)
2175
2183
  * subscription. All other fields are optional and only the ones you provide get
2176
- * patched. Rename subscriptions (`repo.renamed`/`org.renamed`) reject
2184
+ * patched. Metadata subscriptions (any `*.renamed`) reject
2177
2185
  * `shapeName`/`filterJson` — they have only delivery fields to edit.
2178
2186
  *
2179
2187
  * @see https://docs.warmhub.ai/subscriptions/managing/#update-subscription
@@ -2445,6 +2453,7 @@ type GlobalSearchResult = {
2445
2453
  nextCursor?: string;
2446
2454
  };
2447
2455
  /**
2456
+ * Pagination controls for global repo and component search.
2448
2457
  * @see https://docs.warmhub.ai/sdk-reference/type-aliases/globalsearchoptions/
2449
2458
  */
2450
2459
  type GlobalSearchOptions = {
@@ -3053,6 +3062,7 @@ type WherePredicate = (WherePredicateBase & {
3053
3062
  rhs?: never;
3054
3063
  });
3055
3064
  /**
3065
+ * Filters accepted by `client.thing.query` and related list operations.
3056
3066
  * @see https://docs.warmhub.ai/sdk-reference/type-aliases/filteroptions/
3057
3067
  */
3058
3068
  type FilterOptions = {
@@ -3370,6 +3380,7 @@ type RepoAccessResult = AccessResolveResult$1['repos'][number];
3370
3380
  */
3371
3381
  type OrgAccessResult = AccessResolveResult$1['orgs'][number];
3372
3382
  /**
3383
+ * HTTP client for WarmHub repository, organization, and component APIs.
3373
3384
  * @see https://docs.warmhub.ai/sdk-reference/classes/warmhubclient/
3374
3385
  */
3375
3386
  declare class WarmHubClient {
@@ -3492,9 +3503,10 @@ declare class WarmHubClient {
3492
3503
  */
3493
3504
  list: (orgName: string, repoName: string, opts?: ComponentListOptions) => Promise<ComponentList>;
3494
3505
  /**
3495
- * Search public registered components across all orgs (GH-4383).
3496
- * Public-only at launch. Distinct from listing components installed in a
3497
- * repo (`component.list`).
3506
+ * Search registered components visible to the caller across all orgs
3507
+ * (GH-4383): public components plus private components the caller can
3508
+ * read. Distinct from listing components installed in a repo
3509
+ * (`component.list`).
3498
3510
  */
3499
3511
  search: (query: string, opts?: GlobalSearchOptions) => Promise<GlobalSearchResult>;
3500
3512
  /**
@@ -3593,7 +3605,7 @@ declare class WarmHubClient {
3593
3605
  *
3594
3606
  * @param message Optional commit message stored with the submitted operations.
3595
3607
  * @param operations Add, revise, or retract operations to submit in order.
3596
- * @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.
3608
+ * @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`.
3597
3609
  * @param opts.componentRef Attribute writes to an installed component, identified by its `Org/Name` ref, when the caller is allowed to claim it.
3598
3610
  * @param opts.chunkSize Maximum operations per stream append. Values are clamped by the SDK.
3599
3611
  * @param opts.skipExisting Return `noop` for add operations whose target already exists.
@@ -3766,8 +3778,9 @@ declare class WarmHubClient {
3766
3778
  */
3767
3779
  list: (orgName: string, opts?: RepoListOptions) => Promise<RepoList>;
3768
3780
  /**
3769
- * Search public repos across all orgs (GH-4383). Public-only at launch;
3770
- * BM25 over name/description/shape vocabulary/README.
3781
+ * Search repos visible to the caller across all orgs (GH-4383): public
3782
+ * repos plus private repos the caller can read. BM25 over
3783
+ * name/description/shape vocabulary/README.
3771
3784
  */
3772
3785
  search: (query: string, opts?: GlobalSearchOptions) => Promise<GlobalSearchResult>;
3773
3786
  /**
@@ -4302,7 +4315,7 @@ declare class WarmHubClient {
4302
4315
  */
4303
4316
  resolve: (orgName: string | undefined, repoName: string | undefined, wref: string) => Promise<ResolveWrefResult>;
4304
4317
  /**
4305
- * Return assertions about a thing or collection target.
4318
+ * Return assertions about a shape, shaped thing, or collection target.
4306
4319
  *
4307
4320
  * Filter by assertion shape or glob `match` pattern, optionally resolve collection targets, and page through large assertion sets with `limit` and `cursor`.
4308
4321
  *
@@ -4326,7 +4339,7 @@ declare class WarmHubClient {
4326
4339
  */
4327
4340
  about: (orgName: string | undefined, repoName: string | undefined, wref: string, opts?: AboutOptions) => Promise<AboutResult>;
4328
4341
  /**
4329
- * Iterate every assertion about a thing or collection target.
4342
+ * Iterate every assertion about a shape, shaped thing, or collection target.
4330
4343
  *
4331
4344
  * 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.
4332
4345
  *
@@ -4338,7 +4351,7 @@ declare class WarmHubClient {
4338
4351
  */
4339
4352
  aboutIter: (orgName: string | undefined, repoName: string | undefined, wref: string, opts?: AboutOptions) => AsyncIterableIterator<Assertion>;
4340
4353
  /**
4341
- * Materialize every assertion about a thing or collection target.
4354
+ * Materialize every assertion about a shape, shaped thing, or collection target.
4342
4355
  *
4343
4356
  * Use `max` to guard memory usage; throws a `WarmHubError` with kind `VALIDATION_ERROR` once more than `max` assertions have actually been observed across pages.
4344
4357
  *
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
- 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_COUNT, OperationBuilder, PartialStreamSubmissionError, SDK_VERSION, WarmHubClient, WarmHubError, connectionErrorMessage, contentFieldLimitError, countStreamAppendResultStatuses, isConnectionError, isRetryable, isWarmHubError, normalizeWref, resolveFunctionLogMode, sanitizeErrorMessage, sdkVersionIsBelowMinimum, streamAppendResultStatus, submitOperationsViaStream, toWarmHubError, validateAgainstShape, verifyCliCall } from './chunk-2KN2JWJU.js';
1
+ 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_COUNT, OperationBuilder, PartialStreamSubmissionError, SDK_VERSION, WarmHubClient, WarmHubError, connectionErrorMessage, contentFieldLimitError, countStreamAppendResultStatuses, isConnectionError, isRetryable, isWarmHubError, normalizeWref, resolveFunctionLogMode, sanitizeErrorMessage, sdkVersionIsBelowMinimum, streamAppendResultStatus, submitOperationsViaStream, toWarmHubError, validateAgainstShape, verifyCliCall } from './chunk-QI7ELATB.js';
2
2
  //# sourceMappingURL=index.js.map
3
3
  //# sourceMappingURL=index.js.map
package/dist/react.js CHANGED
@@ -1,5 +1,5 @@
1
- import { WarmHubClient } from './chunk-2KN2JWJU.js';
2
- export { DEFAULT_API_URL, SDK_VERSION, WarmHubClient, WarmHubError, toWarmHubError } from './chunk-2KN2JWJU.js';
1
+ import { WarmHubClient } from './chunk-QI7ELATB.js';
2
+ export { DEFAULT_API_URL, SDK_VERSION, WarmHubClient, WarmHubError, toWarmHubError } from './chunk-QI7ELATB.js';
3
3
  import { createContext, useMemo, useState, useEffect, useContext } from 'react';
4
4
  import { jsx } from 'react/jsx-runtime';
5
5
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@warmhub/sdk-ts",
3
- "version": "0.67.0",
3
+ "version": "0.69.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "The TypeScript SDK for WarmHub — create repos, commit and query data, and compound knowledge with your AI agents.",