@ultimat3/query 22.3.6 → 22.5.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.3.6",
3
+ "version": "22.5.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.3.6",
40
- "@ultimat3/core": "22.3.6",
41
- "@ultimat3/entity": "22.3.6",
42
- "@ultimat3/http": "22.3.6",
43
- "@ultimat3/policy": "22.3.6",
44
- "@ultimat3/schema": "22.3.6"
39
+ "@ultimat3/cache": "22.5.0",
40
+ "@ultimat3/core": "22.5.0",
41
+ "@ultimat3/entity": "22.5.0",
42
+ "@ultimat3/http": "22.5.0",
43
+ "@ultimat3/policy": "22.5.0",
44
+ "@ultimat3/schema": "22.5.0"
45
45
  }
46
46
  }
package/src/index.ts CHANGED
@@ -135,6 +135,8 @@ export type {
135
135
  QueryDef,
136
136
  QueryDescriptor,
137
137
  QueryFacade,
138
+ QueryListFilterOp,
139
+ QueryListParams,
138
140
  QueryMcp,
139
141
  QueryOptions,
140
142
  QueryRateLimit,
package/src/query.ts CHANGED
@@ -55,6 +55,24 @@ export interface QueryMcp {
55
55
  * Forbidden. See `ActionMcp.visibleTo`, which this mirrors exactly.
56
56
  */
57
57
  readonly visibleTo?: readonly string[];
58
+ /**
59
+ * The list whitelist an MCP meta surface composes over (`@ultimat3/mcp` `McpListParams`):
60
+ * `filters` field → operators, sortable `sort` fields, pickable `fields`, `maxLimit`. Flat keys:
61
+ * the query's own `input` declares `status_eq`, `sort`, `fields`, `cursor`, `limit` and
62
+ * implements them; `manage_resource` refuses anything outside the whitelist before it runs.
63
+ */
64
+ readonly listParams?: QueryListParams;
65
+ }
66
+
67
+ /** One comparison a list filter accepts. A filter key is `<field><op>`: `status_eq`. */
68
+ export type QueryListFilterOp = '_eq' | '_in' | '_gt' | '_lt' | '_cont';
69
+
70
+ /** Structural twin of `@ultimat3/mcp`'s `McpListParams` (tier 3 cannot import tier 4). */
71
+ export interface QueryListParams {
72
+ readonly filters?: Readonly<Record<string, readonly QueryListFilterOp[]>>;
73
+ readonly sort?: readonly string[];
74
+ readonly fields?: readonly string[];
75
+ readonly maxLimit?: number;
58
76
  }
59
77
 
60
78
  /**