@ultimat3/query 22.9.0 → 22.10.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ultimat3/query",
3
- "version": "22.9.0",
3
+ "version": "22.10.0",
4
4
  "description": "The query primitive: a policy-checked read, optionally live, with cursor pagination and an incremental matcher",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -36,11 +36,11 @@
36
36
  "test": "bun test"
37
37
  },
38
38
  "dependencies": {
39
- "@ultimat3/cache": "22.9.0",
40
- "@ultimat3/core": "22.9.0",
41
- "@ultimat3/entity": "22.9.0",
42
- "@ultimat3/http": "22.9.0",
43
- "@ultimat3/policy": "22.9.0",
44
- "@ultimat3/schema": "22.9.0"
39
+ "@ultimat3/cache": "22.10.0",
40
+ "@ultimat3/core": "22.10.0",
41
+ "@ultimat3/entity": "22.10.0",
42
+ "@ultimat3/http": "22.10.0",
43
+ "@ultimat3/policy": "22.10.0",
44
+ "@ultimat3/schema": "22.10.0"
45
45
  }
46
46
  }
package/src/errors.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /** Every failure @ultimat3/query can produce, one subclass per stable code. */
2
- import { assertNever, registerErrorCodes, UltimateError } from '@ultimat3/core';
2
+ import { assertNever, deniedCallerFix, registerErrorCodes, UltimateError } from '@ultimat3/core';
3
3
  import type { SurfaceDenial } from '@ultimat3/policy';
4
4
 
5
5
  // No `docs:` on the classes below.
@@ -87,6 +87,7 @@ export class QueryDeniedError extends UltimateError {
87
87
  code,
88
88
  cause: `${query} denied: ${denialReason(denial)}`,
89
89
  fix: `x policy explain ${query} --json # shows which clause decided and why`,
90
+ callerFix: deniedCallerFix(),
90
91
  });
91
92
  this.denial = denial;
92
93
  }
package/src/index.ts CHANGED
@@ -142,6 +142,7 @@ export type {
142
142
  QueryListFilterOp,
143
143
  QueryListParams,
144
144
  QueryMcp,
145
+ QueryMcpAnnotations,
145
146
  QueryOptions,
146
147
  QueryRateLimit,
147
148
  SourceOptions,
package/src/query.ts CHANGED
@@ -62,6 +62,21 @@ export interface QueryMcp {
62
62
  * implements them; `manage_resource` refuses anything outside the whitelist before it runs.
63
63
  */
64
64
  readonly listParams?: QueryListParams;
65
+ /** The tool's display name in an MCP client. See `ActionMcp.title`. */
66
+ readonly title?: string;
67
+ /**
68
+ * MCP tool annotations, overriding the derived `readOnlyHint: true` key by key — `openWorldHint:
69
+ * true` for a read that reaches outside the app. See `ActionMcp.annotations`.
70
+ */
71
+ readonly annotations?: QueryMcpAnnotations;
72
+ }
73
+
74
+ /** Structural twin of `@ultimat3/action`'s `McpAnnotationHints` (siblings cannot import). */
75
+ export interface QueryMcpAnnotations {
76
+ readonly readOnlyHint?: boolean;
77
+ readonly destructiveHint?: boolean;
78
+ readonly idempotentHint?: boolean;
79
+ readonly openWorldHint?: boolean;
65
80
  }
66
81
 
67
82
  /** One comparison a list filter accepts. A filter key is `<field><op>`: `status_eq`. */