@procedures/client 0.7.0 → 0.8.1
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/CHANGELOG.md +107 -0
- package/README.md +115 -11
- package/dist/.tsbuildinfo +1 -1
- package/dist/adapters/http/client/transport.d.ts +4 -0
- package/dist/adapters/http/client/transport.d.ts.map +1 -1
- package/dist/adapters/http/client/transport.js +11 -1
- package/dist/adapters/http/client/transport.js.map +1 -1
- package/dist/adapters/http/client/types.d.ts +19 -0
- package/dist/adapters/http/client/types.d.ts.map +1 -1
- package/dist/adapters/http/server/cors.d.ts +64 -0
- package/dist/adapters/http/server/cors.d.ts.map +1 -0
- package/dist/adapters/http/server/cors.js +113 -0
- package/dist/adapters/http/server/cors.js.map +1 -0
- package/dist/adapters/http/server/handler.d.ts +136 -0
- package/dist/adapters/http/server/handler.d.ts.map +1 -0
- package/dist/adapters/http/server/handler.js +495 -0
- package/dist/adapters/http/server/handler.js.map +1 -0
- package/dist/adapters/http/server/strategies.d.ts +14 -5
- package/dist/adapters/http/server/strategies.d.ts.map +1 -1
- package/dist/adapters/http/server/strategies.js.map +1 -1
- package/dist/adapters/http/server/transport.d.ts +36 -46
- package/dist/adapters/http/server/transport.d.ts.map +1 -1
- package/dist/adapters/http/server/transport.js +58 -433
- package/dist/adapters/http/server/transport.js.map +1 -1
- package/dist/adapters/http/server/types.d.ts +13 -0
- package/dist/adapters/http/server/types.d.ts.map +1 -1
- package/dist/adapters/websocket/client/transport.d.ts +7 -3
- package/dist/adapters/websocket/client/transport.d.ts.map +1 -1
- package/dist/adapters/websocket/client/transport.js +9 -3
- package/dist/adapters/websocket/client/transport.js.map +1 -1
- package/dist/adapters/websocket/server/transport.d.ts +56 -1
- package/dist/adapters/websocket/server/transport.d.ts.map +1 -1
- package/dist/adapters/websocket/server/transport.js +174 -17
- package/dist/adapters/websocket/server/transport.js.map +1 -1
- package/dist/adapters/websocket/server/types.d.ts +10 -3
- package/dist/adapters/websocket/server/types.d.ts.map +1 -1
- package/dist/adapters/websocket/server/upgrade-router.d.ts +28 -0
- package/dist/adapters/websocket/server/upgrade-router.d.ts.map +1 -0
- package/dist/adapters/websocket/server/upgrade-router.js +62 -0
- package/dist/adapters/websocket/server/upgrade-router.js.map +1 -0
- package/dist/adapters/websocket/server/upgrade.d.ts +68 -0
- package/dist/adapters/websocket/server/upgrade.d.ts.map +1 -0
- package/dist/adapters/websocket/server/upgrade.js +49 -0
- package/dist/adapters/websocket/server/upgrade.js.map +1 -0
- package/dist/adapters/websocket/shared/rpc.d.ts +2 -0
- package/dist/adapters/websocket/shared/rpc.d.ts.map +1 -1
- package/dist/adapters/websocket/shared/rpc.js +8 -2
- package/dist/adapters/websocket/shared/rpc.js.map +1 -1
- package/dist/browser.d.ts +14 -6
- package/dist/browser.d.ts.map +1 -1
- package/dist/browser.js +12 -3
- package/dist/browser.js.map +1 -1
- package/dist/client/client.d.ts +43 -0
- package/dist/client/client.d.ts.map +1 -1
- package/dist/client/client.js +69 -1
- package/dist/client/client.js.map +1 -1
- package/dist/client/errors/registry.d.ts.map +1 -1
- package/dist/client/errors/registry.js +1 -0
- package/dist/client/errors/registry.js.map +1 -1
- package/dist/client/middleware/retry.d.ts +4 -0
- package/dist/client/middleware/retry.d.ts.map +1 -1
- package/dist/client/middleware/retry.js +86 -78
- package/dist/client/middleware/retry.js.map +1 -1
- package/dist/events/bus.d.ts +32 -14
- package/dist/events/bus.d.ts.map +1 -1
- package/dist/events/bus.js +119 -65
- package/dist/events/bus.js.map +1 -1
- package/dist/events/index.d.ts +3 -2
- package/dist/events/index.d.ts.map +1 -1
- package/dist/events/index.js.map +1 -1
- package/dist/events/publisher.d.ts +14 -0
- package/dist/events/publisher.d.ts.map +1 -1
- package/dist/events/publisher.js +62 -10
- package/dist/events/publisher.js.map +1 -1
- package/dist/events/remote.d.ts +80 -18
- package/dist/events/remote.d.ts.map +1 -1
- package/dist/events/remote.js +448 -58
- package/dist/events/remote.js.map +1 -1
- package/dist/events/rows.d.ts +31 -0
- package/dist/events/rows.d.ts.map +1 -0
- package/dist/events/rows.js +39 -0
- package/dist/events/rows.js.map +1 -0
- package/dist/events/types.d.ts +13 -2
- package/dist/events/types.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/node.d.ts +14 -0
- package/dist/node.d.ts.map +1 -1
- package/dist/node.js +9 -0
- package/dist/node.js.map +1 -1
- package/dist/procedures/caller.d.ts +33 -0
- package/dist/procedures/caller.d.ts.map +1 -0
- package/dist/procedures/caller.js +27 -0
- package/dist/procedures/caller.js.map +1 -0
- package/dist/procedures/capability.d.ts +6 -0
- package/dist/procedures/capability.d.ts.map +1 -1
- package/dist/procedures/capability.js +25 -0
- package/dist/procedures/capability.js.map +1 -1
- package/dist/procedures/collection/changes.d.ts +94 -0
- package/dist/procedures/collection/changes.d.ts.map +1 -0
- package/dist/procedures/collection/changes.js +182 -0
- package/dist/procedures/collection/changes.js.map +1 -0
- package/dist/procedures/collection/index.d.ts +8 -3
- package/dist/procedures/collection/index.d.ts.map +1 -1
- package/dist/procedures/collection/index.js +6 -1
- package/dist/procedures/collection/index.js.map +1 -1
- package/dist/procedures/collection/procedures.d.ts +39 -2
- package/dist/procedures/collection/procedures.d.ts.map +1 -1
- package/dist/procedures/collection/procedures.js +131 -8
- package/dist/procedures/collection/procedures.js.map +1 -1
- package/dist/procedures/collection/query.d.ts +246 -0
- package/dist/procedures/collection/query.d.ts.map +1 -0
- package/dist/procedures/collection/query.js +854 -0
- package/dist/procedures/collection/query.js.map +1 -0
- package/dist/procedures/collection/schemas.d.ts +59 -0
- package/dist/procedures/collection/schemas.d.ts.map +1 -1
- package/dist/procedures/collection/schemas.js +172 -6
- package/dist/procedures/collection/schemas.js.map +1 -1
- package/dist/procedures/collection/storage.d.ts +64 -6
- package/dist/procedures/collection/storage.d.ts.map +1 -1
- package/dist/procedures/collection/storage.js +23 -0
- package/dist/procedures/collection/storage.js.map +1 -1
- package/dist/procedures/elicit.d.ts +190 -0
- package/dist/procedures/elicit.d.ts.map +1 -0
- package/dist/procedures/elicit.js +127 -0
- package/dist/procedures/elicit.js.map +1 -0
- package/dist/procedures/hints.d.ts +43 -0
- package/dist/procedures/hints.d.ts.map +1 -0
- package/dist/procedures/hints.js +74 -0
- package/dist/procedures/hints.js.map +1 -0
- package/dist/procedures/index.d.ts +12 -3
- package/dist/procedures/index.d.ts.map +1 -1
- package/dist/procedures/index.js +7 -1
- package/dist/procedures/index.js.map +1 -1
- package/dist/procedures/invoke.d.ts +20 -0
- package/dist/procedures/invoke.d.ts.map +1 -1
- package/dist/procedures/invoke.js +16 -0
- package/dist/procedures/invoke.js.map +1 -1
- package/dist/procedures/progress.d.ts +24 -0
- package/dist/procedures/progress.d.ts.map +1 -0
- package/dist/procedures/progress.js +11 -0
- package/dist/procedures/progress.js.map +1 -0
- package/dist/procedures/registry.d.ts.map +1 -1
- package/dist/procedures/registry.js +5 -0
- package/dist/procedures/registry.js.map +1 -1
- package/dist/procedures/types.d.ts +92 -0
- package/dist/procedures/types.d.ts.map +1 -1
- package/dist/procedures/types.js.map +1 -1
- package/dist/procedures/untrusted.d.ts +28 -0
- package/dist/procedures/untrusted.d.ts.map +1 -0
- package/dist/procedures/untrusted.js +32 -0
- package/dist/procedures/untrusted.js.map +1 -0
- package/dist/protocol.d.ts +1 -1
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js +1 -0
- package/dist/protocol.js.map +1 -1
- package/dist/server/browser-guard.d.ts +12 -2
- package/dist/server/browser-guard.d.ts.map +1 -1
- package/dist/server/browser-guard.js +43 -6
- package/dist/server/browser-guard.js.map +1 -1
- package/dist/server/host-policy.d.ts +10 -1
- package/dist/server/host-policy.d.ts.map +1 -1
- package/dist/server/host-policy.js +5 -0
- package/dist/server/host-policy.js.map +1 -1
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js.map +1 -1
- package/dist/server/procedure-server.d.ts +75 -9
- package/dist/server/procedure-server.d.ts.map +1 -1
- package/dist/server/procedure-server.js +151 -17
- package/dist/server/procedure-server.js.map +1 -1
- package/dist/server/request-auth.d.ts +51 -4
- package/dist/server/request-auth.d.ts.map +1 -1
- package/dist/server/request-auth.js +116 -5
- package/dist/server/request-auth.js.map +1 -1
- package/dist/server/types.d.ts +73 -5
- package/dist/server/types.d.ts.map +1 -1
- package/dist/server/types.js.map +1 -1
- package/dist/timers.d.ts +5 -0
- package/dist/timers.d.ts.map +1 -1
- package/dist/timers.js +3 -1
- package/dist/timers.js.map +1 -1
- package/package.json +5 -1
- package/src/adapters/http/client/transport.ts +11 -1
- package/src/adapters/http/client/types.ts +22 -0
- package/src/adapters/http/server/cors.ts +144 -0
- package/src/adapters/http/server/handler.ts +624 -0
- package/src/adapters/http/server/strategies.ts +16 -6
- package/src/adapters/http/server/transport.ts +66 -479
- package/src/adapters/http/server/types.ts +15 -0
- package/src/adapters/websocket/client/transport.ts +9 -3
- package/src/adapters/websocket/server/transport.ts +189 -18
- package/src/adapters/websocket/server/types.ts +11 -3
- package/src/adapters/websocket/server/upgrade-router.ts +77 -0
- package/src/adapters/websocket/server/upgrade.ts +88 -0
- package/src/adapters/websocket/shared/rpc.ts +9 -2
- package/src/browser.ts +85 -2
- package/src/client/client.ts +83 -1
- package/src/client/errors/registry.ts +1 -0
- package/src/client/middleware/retry.ts +89 -78
- package/src/events/bus.ts +141 -73
- package/src/events/index.ts +3 -0
- package/src/events/publisher.ts +71 -10
- package/src/events/remote.ts +575 -73
- package/src/events/rows.ts +48 -0
- package/src/events/types.ts +15 -2
- package/src/index.ts +1 -1
- package/src/node.ts +21 -0
- package/src/procedures/caller.ts +45 -0
- package/src/procedures/capability.ts +21 -0
- package/src/procedures/collection/changes.ts +245 -0
- package/src/procedures/collection/index.ts +56 -1
- package/src/procedures/collection/procedures.ts +185 -7
- package/src/procedures/collection/query.ts +1009 -0
- package/src/procedures/collection/schemas.ts +233 -7
- package/src/procedures/collection/storage.ts +84 -6
- package/src/procedures/elicit.ts +320 -0
- package/src/procedures/hints.ts +91 -0
- package/src/procedures/index.ts +82 -2
- package/src/procedures/invoke.ts +31 -0
- package/src/procedures/progress.ts +25 -0
- package/src/procedures/registry.ts +4 -0
- package/src/procedures/types.ts +102 -0
- package/src/procedures/untrusted.ts +50 -0
- package/src/protocol.ts +3 -1
- package/src/server/browser-guard.ts +48 -6
- package/src/server/host-policy.ts +13 -1
- package/src/server/index.ts +3 -0
- package/src/server/procedure-server.ts +185 -20
- package/src/server/request-auth.ts +128 -6
- package/src/server/types.ts +82 -5
- package/src/timers.ts +8 -1
|
@@ -1,2 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The storage of a collection, as the core sees it.
|
|
3
|
+
*
|
|
4
|
+
* The core procedures of a collection (`collections.<name>.<operation>`), the repository of a
|
|
5
|
+
* procedure context and the collections of a `ProcedureServer` use a storage through this
|
|
6
|
+
* interface. It has the shape of `CollectionStorage` of `@procedures/collections`, so
|
|
7
|
+
* each backend of that package (`InMemoryStorage`) and of `@procedures/store`
|
|
8
|
+
* (`ApiStorage`, `HybridStorage`) fits it. The core declares it itself, so it does not depend on
|
|
9
|
+
* the collections package (roadmap 3.3).
|
|
10
|
+
*
|
|
11
|
+
* Each method gives a Promise: a caller cannot tell a local storage from a remote one.
|
|
12
|
+
*
|
|
13
|
+
* The contract (the suite of `@procedures/collections/testing` tests it for each storage):
|
|
14
|
+
* - A storage keeps a copy of each value that a write takes, and each read gives a new copy.
|
|
15
|
+
* - A stored `null` reads back as `null`. A missing id reads back as `undefined`.
|
|
16
|
+
* - `getIds()` gives the ids of `getEntries()`, in the same order.
|
|
17
|
+
* - A delta of `getChangesSince` follows the order of the last change of each id.
|
|
18
|
+
* - After `close()`, each operation rejects with an error whose message says "closed". A second
|
|
19
|
+
* `close()` does nothing.
|
|
20
|
+
* - `query()` gives the result of `queryEntries()` of `@procedures/collections` for the entries.
|
|
21
|
+
* - `observe()` gives one batch for each write that changes the storage, before the write resolves.
|
|
22
|
+
* - `patch()` merges the fields into the item in one step.
|
|
23
|
+
*/
|
|
1
24
|
export {};
|
|
2
25
|
//# sourceMappingURL=storage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.js","sourceRoot":"","sources":["../../../src/procedures/collection/storage.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"storage.js","sourceRoot":"","sources":["../../../src/procedures/collection/storage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG"}
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The questions of a procedure to the person at the caller (CLI-12).
|
|
3
|
+
*
|
|
4
|
+
* A face of a host (MCP, a terminal) can ask the person at the caller for input or for a
|
|
5
|
+
* confirmation during a call. The face puts an `Elicit` function on the request, and the
|
|
6
|
+
* procedure gets it as `ctx.elicit`. A face that cannot ask gives no function. Then the helpers
|
|
7
|
+
* `elicitInput` and `elicitConfirmation` give the action `unavailable` with a reason, so a
|
|
8
|
+
* procedure always gets a clear answer.
|
|
9
|
+
*
|
|
10
|
+
* The operator can answer some questions before the calls (`ElicitationPolicy.operatorConsent`):
|
|
11
|
+
* a consent that the operator gives when the server starts. The person comes first: the operator
|
|
12
|
+
* answers only when the face cannot ask the person. When the face can ask, and the question
|
|
13
|
+
* fails (a timeout, a lost connection), the answer is `unavailable`: the silence of a person is
|
|
14
|
+
* not a consent.
|
|
15
|
+
*/
|
|
16
|
+
import type { Duration } from "../duration.js";
|
|
17
|
+
import type { ProcedureContext } from "./types.js";
|
|
18
|
+
/** The texts of a field that the face shows to the person. */
|
|
19
|
+
export interface ElicitFieldBase {
|
|
20
|
+
/** The short name of the field. */
|
|
21
|
+
readonly title?: string | undefined;
|
|
22
|
+
/** The text that tells what the field is for. */
|
|
23
|
+
readonly description?: string | undefined;
|
|
24
|
+
}
|
|
25
|
+
/** A field of free text. */
|
|
26
|
+
export interface ElicitTextField extends ElicitFieldBase {
|
|
27
|
+
readonly type: "string";
|
|
28
|
+
readonly enum?: undefined;
|
|
29
|
+
readonly minLength?: number | undefined;
|
|
30
|
+
readonly maxLength?: number | undefined;
|
|
31
|
+
readonly format?: "email" | "uri" | "date" | "date-time" | undefined;
|
|
32
|
+
readonly default?: string | undefined;
|
|
33
|
+
}
|
|
34
|
+
/** A field of a number. */
|
|
35
|
+
export interface ElicitNumberField extends ElicitFieldBase {
|
|
36
|
+
readonly type: "number" | "integer";
|
|
37
|
+
readonly minimum?: number | undefined;
|
|
38
|
+
readonly maximum?: number | undefined;
|
|
39
|
+
readonly default?: number | undefined;
|
|
40
|
+
}
|
|
41
|
+
/** A field of yes or no. */
|
|
42
|
+
export interface ElicitBooleanField extends ElicitFieldBase {
|
|
43
|
+
readonly type: "boolean";
|
|
44
|
+
readonly default?: boolean | undefined;
|
|
45
|
+
}
|
|
46
|
+
/** A field of one choice from a list. `enumNames` gives the text of each choice. */
|
|
47
|
+
export interface ElicitChoiceField extends ElicitFieldBase {
|
|
48
|
+
readonly type: "string";
|
|
49
|
+
readonly enum: readonly string[];
|
|
50
|
+
readonly enumNames?: readonly string[] | undefined;
|
|
51
|
+
readonly default?: string | undefined;
|
|
52
|
+
}
|
|
53
|
+
/** A field of some choices from a list. */
|
|
54
|
+
export interface ElicitChoicesField extends ElicitFieldBase {
|
|
55
|
+
readonly type: "array";
|
|
56
|
+
readonly items: {
|
|
57
|
+
readonly type: "string";
|
|
58
|
+
readonly enum: readonly string[];
|
|
59
|
+
};
|
|
60
|
+
readonly minItems?: number | undefined;
|
|
61
|
+
readonly maxItems?: number | undefined;
|
|
62
|
+
readonly default?: readonly string[] | undefined;
|
|
63
|
+
}
|
|
64
|
+
/** A field of a form: the primitive fields of MCP elicitation. A form has no nested fields. */
|
|
65
|
+
export type ElicitField = ElicitTextField | ElicitNumberField | ElicitBooleanField | ElicitChoiceField | ElicitChoicesField;
|
|
66
|
+
/** The value of a field in an answer. */
|
|
67
|
+
export type ElicitValue = string | number | boolean | readonly string[];
|
|
68
|
+
/** A question with a form: the person fills in the fields. */
|
|
69
|
+
export interface ElicitFormRequest {
|
|
70
|
+
readonly mode?: "form" | undefined;
|
|
71
|
+
/** The question, as the face shows it to the person. */
|
|
72
|
+
readonly message: string;
|
|
73
|
+
/** The fields of the answer, by name. */
|
|
74
|
+
readonly fields: Readonly<Record<string, ElicitField>>;
|
|
75
|
+
/** The names of the fields that an accepted answer must have. */
|
|
76
|
+
readonly required?: readonly string[] | undefined;
|
|
77
|
+
/**
|
|
78
|
+
* The key of the consent that the question asks for, for example `"user-provided"`. With a
|
|
79
|
+
* key, the operator can give the consent before the calls (`ElicitationPolicy.operatorConsent`).
|
|
80
|
+
* Without a key, only the person can answer.
|
|
81
|
+
*/
|
|
82
|
+
readonly consent?: string | undefined;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* A question with a URL: the person opens the URL and completes a step outside the face (a
|
|
86
|
+
* sign-in, a payment). The answer tells only if the person agreed to open it.
|
|
87
|
+
*/
|
|
88
|
+
export interface ElicitUrlRequest {
|
|
89
|
+
readonly mode: "url";
|
|
90
|
+
readonly message: string;
|
|
91
|
+
readonly url: string;
|
|
92
|
+
/** The id of the question. The default is a random id. */
|
|
93
|
+
readonly id?: string | undefined;
|
|
94
|
+
}
|
|
95
|
+
/** A question to the person at the caller. */
|
|
96
|
+
export type ElicitRequest = ElicitFormRequest | ElicitUrlRequest;
|
|
97
|
+
/** The kind of a question: a form, or a URL. */
|
|
98
|
+
export type ElicitMode = "form" | "url";
|
|
99
|
+
/**
|
|
100
|
+
* What the answer of a question is:
|
|
101
|
+
* - `accept`: the person, or the operator, gave the answer.
|
|
102
|
+
* - `decline`: the person said no.
|
|
103
|
+
* - `cancel`: the person closed the question without a choice.
|
|
104
|
+
* - `unavailable`: no one can answer. The face cannot ask the person, and no consent of the
|
|
105
|
+
* operator applies. `reason` tells why.
|
|
106
|
+
*/
|
|
107
|
+
export type ElicitAction = "accept" | "decline" | "cancel" | "unavailable";
|
|
108
|
+
/** The answer of a question. */
|
|
109
|
+
export interface ElicitResult {
|
|
110
|
+
readonly action: ElicitAction;
|
|
111
|
+
/** The values of the fields, for `accept`. */
|
|
112
|
+
readonly content?: Readonly<Record<string, ElicitValue>> | undefined;
|
|
113
|
+
/** Who answered: the person, or the operator (a consent of the start). Absent for `unavailable`. */
|
|
114
|
+
readonly by?: "person" | "operator" | undefined;
|
|
115
|
+
/** Why no one answered, for `unavailable`. */
|
|
116
|
+
readonly reason?: string | undefined;
|
|
117
|
+
}
|
|
118
|
+
/** The options of one question. */
|
|
119
|
+
export interface ElicitOptions {
|
|
120
|
+
/** When the signal aborts, the question stops. The default is the signal of the call. */
|
|
121
|
+
readonly signal?: AbortSignal | undefined;
|
|
122
|
+
/** The time that the face waits for the answer. The face has a default (MCP: 5 minutes). */
|
|
123
|
+
readonly timeout?: Duration | undefined;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* The function that asks the person at the caller (`ctx.elicit`). `modes` tells which kinds of
|
|
127
|
+
* question the face can ask the person. An empty list: only the operator answers.
|
|
128
|
+
*/
|
|
129
|
+
export interface Elicit {
|
|
130
|
+
(request: ElicitRequest, options?: ElicitOptions): Promise<ElicitResult>;
|
|
131
|
+
readonly modes: readonly ElicitMode[];
|
|
132
|
+
}
|
|
133
|
+
/** This function makes an `Elicit` function from the modes of a face and its ask function. */
|
|
134
|
+
export declare function createElicit(modes: readonly ElicitMode[], ask: (request: ElicitRequest, options: ElicitOptions) => Promise<ElicitResult>): Elicit;
|
|
135
|
+
/** The rules of a host for the questions of its procedures. */
|
|
136
|
+
export interface ElicitationPolicy {
|
|
137
|
+
/** False: the face does not ask the person, also when it can. The default is true. */
|
|
138
|
+
readonly ask?: boolean | undefined;
|
|
139
|
+
/**
|
|
140
|
+
* The consents that the operator gives when the server starts: `true` for each question with a
|
|
141
|
+
* consent key, or a list of consent keys. The operator answers only when the face cannot ask
|
|
142
|
+
* the person, not when a question of the face fails. The default is no consent. Example:
|
|
143
|
+
* `["user-provided"]` for the flag `--allow-user-provided` of polite-crawler.
|
|
144
|
+
*/
|
|
145
|
+
readonly operatorConsent?: boolean | readonly string[] | undefined;
|
|
146
|
+
/** The time that the face waits for an answer, when the question gives no time. */
|
|
147
|
+
readonly timeout?: Duration | undefined;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* The answer of the operator to a question, or undefined. The operator answers a form question
|
|
151
|
+
* with a consent key that the operator gave. Each field of yes or no gets `true`, and another
|
|
152
|
+
* field gets its default. The operator gives no answer when a necessary field has no default.
|
|
153
|
+
*/
|
|
154
|
+
export declare function operatorAnswer(request: ElicitRequest, consent: boolean | readonly string[] | undefined): ElicitResult | undefined;
|
|
155
|
+
/**
|
|
156
|
+
* This function applies the policy of a host to the `Elicit` function of a face. The result
|
|
157
|
+
* asks the person when the face can. A failed question gives `unavailable` (`cancel` for an
|
|
158
|
+
* abort). When the face cannot ask, the consent of the operator answers, or the answer is
|
|
159
|
+
* `unavailable`. The function gives undefined when no one can answer: no face and no consent.
|
|
160
|
+
*/
|
|
161
|
+
export declare function elicitWithPolicy(face: Elicit | undefined, policy?: ElicitationPolicy): Elicit | undefined;
|
|
162
|
+
/** The reason of an answer when the context has no `elicit` function. */
|
|
163
|
+
export declare const NO_ELICITATION_REASON = "The face of the call cannot ask the person, and the operator gave no consent for this question";
|
|
164
|
+
/**
|
|
165
|
+
* This function asks the person at the caller through `ctx.elicit`. It always gives an answer,
|
|
166
|
+
* and it does not throw. The answer is `unavailable` with a reason when the face cannot ask, or
|
|
167
|
+
* when the question fails. An abort of the call gives `cancel`.
|
|
168
|
+
*/
|
|
169
|
+
export declare function elicitInput(ctx: Pick<ProcedureContext, "elicit" | "signal">, request: ElicitRequest, options?: ElicitOptions): Promise<ElicitResult>;
|
|
170
|
+
/** The options of `elicitConfirmation`. */
|
|
171
|
+
export interface ConfirmationOptions extends ElicitOptions {
|
|
172
|
+
/** The key of the consent, so the operator can give it before the calls. */
|
|
173
|
+
readonly consent?: string | undefined;
|
|
174
|
+
/** The name of the field of yes or no. The default is `"confirm"`. */
|
|
175
|
+
readonly field?: string | undefined;
|
|
176
|
+
/** The text of the field. The default is `"Yes"`. */
|
|
177
|
+
readonly title?: string | undefined;
|
|
178
|
+
/** The text that tells what a yes does. */
|
|
179
|
+
readonly description?: string | undefined;
|
|
180
|
+
}
|
|
181
|
+
/** The answer of a confirmation. `confirmed` is true only for an accepted answer of yes. */
|
|
182
|
+
export interface ConfirmationResult extends ElicitResult {
|
|
183
|
+
readonly confirmed: boolean;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* This function asks the person at the caller a question of yes or no. `confirmed` is true only
|
|
187
|
+
* when the person, or the consent of the operator, says yes.
|
|
188
|
+
*/
|
|
189
|
+
export declare function elicitConfirmation(ctx: Pick<ProcedureContext, "elicit" | "signal">, question: string, options?: ConfirmationOptions): Promise<ConfirmationResult>;
|
|
190
|
+
//# sourceMappingURL=elicit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"elicit.d.ts","sourceRoot":"","sources":["../../src/procedures/elicit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAMnD,8DAA8D;AAC9D,MAAM,WAAW,eAAe;IAC9B,mCAAmC;IACnC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,iDAAiD;IACjD,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3C;AAED,4BAA4B;AAC5B,MAAM,WAAW,eAAgB,SAAQ,eAAe;IACtD,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,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S,EAAE,OAAO,CAAC;CAC7B;AAED;;;GAGG;AACH,wBAAsB,kBAAkB,CACtC,GAAG,EAAE,IAAI,CAAC,gBAAgB,EAAE,QAAQ,GAAG,QAAQ,CAAC,EAChD,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,mBAAwB,GAChC,OAAO,CAAC,kBAAkB,CAAC,CAc7B"}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The questions of a procedure to the person at the caller (CLI-12).
|
|
3
|
+
*
|
|
4
|
+
* A face of a host (MCP, a terminal) can ask the person at the caller for input or for a
|
|
5
|
+
* confirmation during a call. The face puts an `Elicit` function on the request, and the
|
|
6
|
+
* procedure gets it as `ctx.elicit`. A face that cannot ask gives no function. Then the helpers
|
|
7
|
+
* `elicitInput` and `elicitConfirmation` give the action `unavailable` with a reason, so a
|
|
8
|
+
* procedure always gets a clear answer.
|
|
9
|
+
*
|
|
10
|
+
* The operator can answer some questions before the calls (`ElicitationPolicy.operatorConsent`):
|
|
11
|
+
* a consent that the operator gives when the server starts. The person comes first: the operator
|
|
12
|
+
* answers only when the face cannot ask the person. When the face can ask, and the question
|
|
13
|
+
* fails (a timeout, a lost connection), the answer is `unavailable`: the silence of a person is
|
|
14
|
+
* not a consent.
|
|
15
|
+
*/
|
|
16
|
+
/** This function makes an `Elicit` function from the modes of a face and its ask function. */
|
|
17
|
+
export function createElicit(modes, ask) {
|
|
18
|
+
const elicit = (request, options) => ask(request, options ?? {});
|
|
19
|
+
return Object.assign(elicit, { modes: Object.freeze([...modes]) });
|
|
20
|
+
}
|
|
21
|
+
function messageOf(error) {
|
|
22
|
+
return error instanceof Error ? error.message : String(error);
|
|
23
|
+
}
|
|
24
|
+
/** True when an error is the abort of a signal, or the signal aborted. */
|
|
25
|
+
function isAbort(error, signal) {
|
|
26
|
+
return signal?.aborted === true || (error instanceof Error && error.name === "AbortError");
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The answer when a question of the face fails: `cancel` for an abort, else `unavailable`. The
|
|
30
|
+
* operator does not answer here: the person can see the question.
|
|
31
|
+
*/
|
|
32
|
+
function failedAnswer(error, signal) {
|
|
33
|
+
const reason = `The face could not get the answer of the person: ${messageOf(error)}`;
|
|
34
|
+
return { action: isAbort(error, signal) ? "cancel" : "unavailable", reason };
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* The answer of the operator to a question, or undefined. The operator answers a form question
|
|
38
|
+
* with a consent key that the operator gave. Each field of yes or no gets `true`, and another
|
|
39
|
+
* field gets its default. The operator gives no answer when a necessary field has no default.
|
|
40
|
+
*/
|
|
41
|
+
export function operatorAnswer(request, consent) {
|
|
42
|
+
if (consent === undefined || consent === false || request.mode === "url" || request.consent === undefined)
|
|
43
|
+
return undefined;
|
|
44
|
+
if (consent !== true && !consent.includes(request.consent))
|
|
45
|
+
return undefined;
|
|
46
|
+
const content = {};
|
|
47
|
+
for (const [name, field] of Object.entries(request.fields)) {
|
|
48
|
+
if (field.type === "boolean")
|
|
49
|
+
content[name] = true;
|
|
50
|
+
else if (field.default !== undefined)
|
|
51
|
+
content[name] = field.default;
|
|
52
|
+
else if (request.required?.includes(name))
|
|
53
|
+
return undefined;
|
|
54
|
+
}
|
|
55
|
+
return { action: "accept", content, by: "operator" };
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* This function applies the policy of a host to the `Elicit` function of a face. The result
|
|
59
|
+
* asks the person when the face can. A failed question gives `unavailable` (`cancel` for an
|
|
60
|
+
* abort). When the face cannot ask, the consent of the operator answers, or the answer is
|
|
61
|
+
* `unavailable`. The function gives undefined when no one can answer: no face and no consent.
|
|
62
|
+
*/
|
|
63
|
+
export function elicitWithPolicy(face, policy = {}) {
|
|
64
|
+
const asker = policy.ask === false ? undefined : face;
|
|
65
|
+
const consent = policy.operatorConsent;
|
|
66
|
+
const operator = consent === true || (Array.isArray(consent) && consent.length > 0);
|
|
67
|
+
if (!asker && !operator)
|
|
68
|
+
return undefined;
|
|
69
|
+
return createElicit(asker?.modes ?? [], async (request, options) => {
|
|
70
|
+
const timed = options.timeout === undefined && policy.timeout !== undefined ? { ...options, timeout: policy.timeout } : options;
|
|
71
|
+
const mode = request.mode ?? "form";
|
|
72
|
+
let reason;
|
|
73
|
+
if (asker && asker.modes.includes(mode)) {
|
|
74
|
+
// The person can see the question: a timeout or a lost connection is not a consent
|
|
75
|
+
try {
|
|
76
|
+
return await asker(request, timed);
|
|
77
|
+
}
|
|
78
|
+
catch (error) {
|
|
79
|
+
return failedAnswer(error, options.signal);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
else if (asker) {
|
|
83
|
+
reason = `The face cannot ask a question of the mode "${mode}"`;
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
reason = policy.ask === false ? "The host does not ask the person" : "The face of the call cannot ask the person";
|
|
87
|
+
}
|
|
88
|
+
return operatorAnswer(request, consent) ?? { action: "unavailable", reason };
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
// =============================================================================
|
|
92
|
+
// The helpers of a procedure
|
|
93
|
+
// =============================================================================
|
|
94
|
+
/** The reason of an answer when the context has no `elicit` function. */
|
|
95
|
+
export const NO_ELICITATION_REASON = "The face of the call cannot ask the person, and the operator gave no consent for this question";
|
|
96
|
+
/**
|
|
97
|
+
* This function asks the person at the caller through `ctx.elicit`. It always gives an answer,
|
|
98
|
+
* and it does not throw. The answer is `unavailable` with a reason when the face cannot ask, or
|
|
99
|
+
* when the question fails. An abort of the call gives `cancel`.
|
|
100
|
+
*/
|
|
101
|
+
export async function elicitInput(ctx, request, options = {}) {
|
|
102
|
+
if (!ctx.elicit)
|
|
103
|
+
return { action: "unavailable", reason: NO_ELICITATION_REASON };
|
|
104
|
+
const signal = options.signal ?? ctx.signal;
|
|
105
|
+
try {
|
|
106
|
+
return await ctx.elicit(request, signal ? { ...options, signal } : options);
|
|
107
|
+
}
|
|
108
|
+
catch (error) {
|
|
109
|
+
return failedAnswer(error, signal);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* This function asks the person at the caller a question of yes or no. `confirmed` is true only
|
|
114
|
+
* when the person, or the consent of the operator, says yes.
|
|
115
|
+
*/
|
|
116
|
+
export async function elicitConfirmation(ctx, question, options = {}) {
|
|
117
|
+
const { consent, field: fieldOption, title, description, ...elicitOptions } = options;
|
|
118
|
+
const field = fieldOption ?? "confirm";
|
|
119
|
+
const result = await elicitInput(ctx, {
|
|
120
|
+
message: question,
|
|
121
|
+
fields: { [field]: { type: "boolean", title: title ?? "Yes", ...(description !== undefined ? { description } : {}) } },
|
|
122
|
+
required: [field],
|
|
123
|
+
...(consent !== undefined ? { consent } : {}),
|
|
124
|
+
}, elicitOptions);
|
|
125
|
+
return { ...result, confirmed: result.action === "accept" && result.content?.[field] === true };
|
|
126
|
+
}
|
|
127
|
+
//# sourceMappingURL=elicit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"elicit.js","sourceRoot":"","sources":["../../src/procedures/elicit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AA6IH,8FAA8F;AAC9F,MAAM,UAAU,YAAY,CAC1B,KAA4B,EAC5B,GAA8E;IAE9E,MAAM,MAAM,GAAG,CAAC,OAAsB,EAAE,OAAuB,EAAyB,EAAE,CAAC,GAAG,CAAC,OAAO,EAAE,OAAO,IAAI,EAAE,CAAC,CAAC;IACvH,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;AACrE,CAAC;AAqBD,SAAS,SAAS,CAAC,KAAc;IAC/B,OAAO,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAChE,CAAC;AAED,0EAA0E;AAC1E,SAAS,OAAO,CA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AAG,OAAO,CAAC;IACtF,MAAM,KAAK,GAAG,WAAW,IAAI,SAAS,CAAC;IACvC,MAAM,MAAM,GAAG,MAAM,WAAW,CAC9B,GAAG,EACH;QACE,OAAO,EAAE,QAAQ;QACjB,MAAM,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,IAAI,KAAK,EAAE,GAAG,CAAC,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QACtH,QAAQ,EAAE,CAAC,KAAK,CAAC;QACjB,GAAG,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC9C,EACD,aAAa,CACd,CAAC;IACF,OAAO,EAAE,GAAG,MAAM,EAAE,SAAS,EAAE,MAAM,CAAC,MAAM,KAAK,QAAQ,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,KAAK,IAAI,EAAE,CAAC;AAClG,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The tool hints of a procedure with its override (CLI-10).
|
|
3
|
+
*
|
|
4
|
+
* The declared effects give the hints of a tool (`toolHints()`). A procedure can make its tool
|
|
5
|
+
* look more dangerous with `metadata.toolHints`, for example `openWorldHint: true` for a store
|
|
6
|
+
* that other people can read. An override cannot make a tool look safer than its effects:
|
|
7
|
+
* the effects stay the truth, and the host enforces the effects, not the hints.
|
|
8
|
+
*
|
|
9
|
+
* The cautious value of each hint:
|
|
10
|
+
* - `readOnlyHint: false`: the tool can change something.
|
|
11
|
+
* - `destructiveHint: true`: the tool can delete or overwrite data.
|
|
12
|
+
* - `idempotentHint: false`: a second call can change more.
|
|
13
|
+
* - `openWorldHint: true`: the tool can reach systems outside the host.
|
|
14
|
+
*
|
|
15
|
+
* An override cannot give the other value, also when the effects give it. The registry refuses
|
|
16
|
+
* such an override when the procedure registers.
|
|
17
|
+
*/
|
|
18
|
+
import type { AnyProcedure } from "./types.js";
|
|
19
|
+
import { type ToolHints } from "./capability.js";
|
|
20
|
+
/**
|
|
21
|
+
* The override of the hints of a tool. Each hint has only its cautious value, so the type refuses
|
|
22
|
+
* the other value before the registry does.
|
|
23
|
+
*/
|
|
24
|
+
export interface ToolHintOverride {
|
|
25
|
+
readonly readOnlyHint?: false | undefined;
|
|
26
|
+
readonly destructiveHint?: true | undefined;
|
|
27
|
+
readonly idempotentHint?: false | undefined;
|
|
28
|
+
readonly openWorldHint?: true | undefined;
|
|
29
|
+
}
|
|
30
|
+
/** The override of a procedure (`metadata.toolHints`), or undefined. */
|
|
31
|
+
export declare function toolHintOverrideOf(procedure: AnyProcedure): ToolHintOverride | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* The refusal of the override of a procedure, or undefined when the override is correct. An
|
|
34
|
+
* override can give only the cautious value of a hint.
|
|
35
|
+
*/
|
|
36
|
+
export declare function toolHintOverrideRefusal(procedure: AnyProcedure): string | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* The hints of the tool of a procedure: the hints of its effects, with the cautious values of
|
|
39
|
+
* its override. A value of the override that is not cautious has no effect (the registry refuses
|
|
40
|
+
* it at registration).
|
|
41
|
+
*/
|
|
42
|
+
export declare function toolHintsOf(procedure: AnyProcedure): ToolHints;
|
|
43
|
+
//# sourceMappingURL=hints.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hints.d.ts","sourceRoot":"","sources":["../../src/procedures/hints.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAa,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5D;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,YAAY,CAAC,EAAE,KAAK,GAAG,SAAS,CAAC;IAC1C,QAAQ,CAAC,eAAe,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;IAC5C,QAAQ,CAAC,cAAc,CAAC,EAAE,KAAK,GAAG,SAAS,CAAC;IAC5C,QAAQ,CAAC,aAAa,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;CAC3C;AAcD,wEAAwE;AACxE,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,YAAY,GAAG,gBAAgB,GAAG,SAAS,CAGxF;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,YAAY,GAAG,MAAM,GAAG,SAAS,CAoBnF;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,SAAS,EAAE,YAAY,GAAG,SAAS,CAS9D"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The tool hints of a procedure with its override (CLI-10).
|
|
3
|
+
*
|
|
4
|
+
* The declared effects give the hints of a tool (`toolHints()`). A procedure can make its tool
|
|
5
|
+
* look more dangerous with `metadata.toolHints`, for example `openWorldHint: true` for a store
|
|
6
|
+
* that other people can read. An override cannot make a tool look safer than its effects:
|
|
7
|
+
* the effects stay the truth, and the host enforces the effects, not the hints.
|
|
8
|
+
*
|
|
9
|
+
* The cautious value of each hint:
|
|
10
|
+
* - `readOnlyHint: false`: the tool can change something.
|
|
11
|
+
* - `destructiveHint: true`: the tool can delete or overwrite data.
|
|
12
|
+
* - `idempotentHint: false`: a second call can change more.
|
|
13
|
+
* - `openWorldHint: true`: the tool can reach systems outside the host.
|
|
14
|
+
*
|
|
15
|
+
* An override cannot give the other value, also when the effects give it. The registry refuses
|
|
16
|
+
* such an override when the procedure registers.
|
|
17
|
+
*/
|
|
18
|
+
import { toolHints } from "./capability.js";
|
|
19
|
+
/** The cautious value of each hint: the only value that an override can give. */
|
|
20
|
+
const CAUTIOUS = {
|
|
21
|
+
readOnlyHint: false,
|
|
22
|
+
destructiveHint: true,
|
|
23
|
+
idempotentHint: false,
|
|
24
|
+
openWorldHint: true,
|
|
25
|
+
};
|
|
26
|
+
const HINT_NAMES = Object.keys(CAUTIOUS);
|
|
27
|
+
/** The override of a procedure (`metadata.toolHints`), or undefined. */
|
|
28
|
+
export function toolHintOverrideOf(procedure) {
|
|
29
|
+
const value = procedure.metadata?.toolHints;
|
|
30
|
+
return value !== null && typeof value === "object" ? value : undefined;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* The refusal of the override of a procedure, or undefined when the override is correct. An
|
|
34
|
+
* override can give only the cautious value of a hint.
|
|
35
|
+
*/
|
|
36
|
+
export function toolHintOverrideRefusal(procedure) {
|
|
37
|
+
const value = procedure.metadata?.toolHints;
|
|
38
|
+
if (value === undefined)
|
|
39
|
+
return undefined;
|
|
40
|
+
if (value === null || typeof value !== "object" || Array.isArray(value)) {
|
|
41
|
+
return "metadata.toolHints must be an object of hints";
|
|
42
|
+
}
|
|
43
|
+
for (const [name, hint] of Object.entries(value)) {
|
|
44
|
+
if (hint === undefined)
|
|
45
|
+
continue;
|
|
46
|
+
if (!HINT_NAMES.includes(name)) {
|
|
47
|
+
return `metadata.toolHints has an unknown hint "${name}". The hints are ${HINT_NAMES.join(", ")}`;
|
|
48
|
+
}
|
|
49
|
+
const cautious = CAUTIOUS[name];
|
|
50
|
+
if (hint !== cautious) {
|
|
51
|
+
return (`metadata.toolHints.${name} can only be ${String(cautious)}: an override can only make a tool look more ` +
|
|
52
|
+
`dangerous than its effects. The declared effects give the other hints`);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return undefined;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* The hints of the tool of a procedure: the hints of its effects, with the cautious values of
|
|
59
|
+
* its override. A value of the override that is not cautious has no effect (the registry refuses
|
|
60
|
+
* it at registration).
|
|
61
|
+
*/
|
|
62
|
+
export function toolHintsOf(procedure) {
|
|
63
|
+
const derived = toolHints(procedure);
|
|
64
|
+
const override = toolHintOverrideOf(procedure);
|
|
65
|
+
if (!override)
|
|
66
|
+
return derived;
|
|
67
|
+
const hints = { ...derived };
|
|
68
|
+
for (const name of HINT_NAMES) {
|
|
69
|
+
if (override[name] === CAUTIOUS[name])
|
|
70
|
+
hints[name] = CAUTIOUS[name];
|
|
71
|
+
}
|
|
72
|
+
return hints;
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=hints.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hints.js","sourceRoot":"","sources":["../../src/procedures/hints.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EAAE,SAAS,EAAkB,MAAM,iBAAiB,CAAC;AAe5D,iFAAiF;AACjF,MAAM,QAAQ,GAAwC;IACpD,YAAY,EAAE,KAAK;IACnB,eAAe,EAAE,IAAI;IACrB,cAAc,EAAE,KAAK;IACrB,aAAa,EAAE,IAAI;CACpB,CAAC;AAEF,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAe,CAAC;AAEvD,wEAAwE;AACxE,MAAM,UAAU,kBAAkB,CAAC,SAAuB;IACxD,MAAM,KAAK,GAAI,SAAS,CAAC,QAAgD,EAAE,SAAS,CAAC;IACrF,OAAO,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAE,KAA0B,CAAC,CAAC,CAAC,SAAS,CAAC;AAC/F,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,uBAAuB,CAAC,SAAuB;IAC7D,MAAM,KAAK,GAAI,SAAS,CAAC,QAAgD,EAAE,SAAS,CAAC;IACrF,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC1C,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACxE,OAAO,+CAA+C,CAAC;IACzD,CAAC;IACD,KAAK,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAgC,CAAC,EAAE,CAAC;QAC5E,IAAI,IAAI,KAAK,SAAS;YAAE,SAAS;QACjC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAgB,CAAC,EAAE,CAAC;YAC3C,OAAO,2CAA2C,IAAI,oBAAoB,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QACpG,CAAC;QACD,MAAM,QAAQ,GAAG,QAAQ,CAAC,IAAgB,CAAC,CAAC;QAC5C,IAAI,IAAI,KAAK,QAAQ,EAAE,CAAC;YACtB,OAAO,CACL,sBAAsB,IAAI,gBAAgB,MAAM,CAAC,QAAQ,CAAC,+CAA+C;gBACzG,uEAAuE,CACxE,CAAC;QACJ,CAAC;IACH,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,SAAuB;IACjD,MAAM,OAAO,GAAG,SAAS,CAAC,SAAS,CAAC,CAAC;IACrC,MAAM,QAAQ,GAAG,kBAAkB,CAAC,SAAS,CAAC,CAAC;IAC/C,IAAI,CAAC,QAAQ;QAAE,OAAO,OAAO,CAAC;IAC9B,MAAM,KAAK,GAA+C,EAAE,GAAG,OAAO,EAAE,CAAC;IACzE,KAAK,MAAM,IAAI,IAAI,UAAU,EAAE,CAAC;QAC9B,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,QAAQ,CAAC,IAAI,CAAC;YAAE,KAAK,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IACtE,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Type-safe procedure definitions with schema validation,
|
|
5
5
|
* registry for auto-discovery, and server integration.
|
|
6
6
|
*/
|
|
7
|
-
export type { ProcedurePath, ProcedureMetadata, RepositoryProvider, ProcedureContext, ProcedureHandler, Procedure, AnyProcedure, ProcedureResult, ProcedureError, InferProcedureInput, InferProcedureOutput, InferProcedureMetadata, RegistryEventType, RegistryListener, ProcedureModule, RegistrationOptions, ProcedureRegistryLike, Effects, PermittedEffects, Register, ClearanceOf, ResourcesOf, Capability, CapabilityRequest, ClearanceOrder, NestedCallOptions, } from "./types.js";
|
|
7
|
+
export type { ProcedurePath, ProcedureMetadata, RepositoryProvider, ProcedureContext, ProcedureHandler, Procedure, AnyProcedure, ProcedureResult, ProcedureError, InferProcedureInput, InferProcedureOutput, InferProcedureMetadata, RegistryEventType, RegistryListener, ProcedureModule, RegistrationOptions, ProcedureRegistryLike, Effects, FsRootRules, PermittedEffects, Register, ClearanceOf, ResourcesOf, Capability, CapabilityRequest, ClearanceOrder, NestedCallOptions, } from "./types.js";
|
|
8
8
|
export { pathToKey, keyToPath } from "./types.js";
|
|
9
9
|
export { STANDARD_RESOURCES, UNLIMITED_CAPABILITY, ladder, effectsOf, isReadOnly, isDestructive, isOpenWorld, toolHints, narrowCapability, capabilityRefusal, examinesNestedCall, explainInvocation, checkEffects, } from "./capability.js";
|
|
10
10
|
export { PURE_EFFECTS, REGISTRY_READ_EFFECTS, withEffects, INFERRED_EFFECTS_METADATA_KEY, inferredEffectsOf, effectsValue } from "./effects.js";
|
|
@@ -12,15 +12,24 @@ export { MANIFEST_FORMAT, describeProcedure as describeProcedureEntry, describeR
|
|
|
12
12
|
export type { ProcedureEntry, ProcedureManifest, CliDescription, DescribeOptions, DescribeRegistryOptions } from "./manifest.js";
|
|
13
13
|
export { IDEMPOTENCY_KEY_METADATA, MAX_IDEMPOTENCY_KEY_LENGTH, IdempotencyCache, idempotencyKeyOf, idempotentIn, effectsIn, isRepeatable, newIdempotencyKey, } from "./idempotency.js";
|
|
14
14
|
export type { IdempotencyOptions } from "./idempotency.js";
|
|
15
|
+
export { createElicit, elicitWithPolicy, operatorAnswer, elicitInput, elicitConfirmation, NO_ELICITATION_REASON, } from "./elicit.js";
|
|
16
|
+
export type { Elicit, ElicitRequest, ElicitFormRequest, ElicitUrlRequest, ElicitMode, ElicitAction, ElicitResult, ElicitOptions, ElicitField, ElicitFieldBase, ElicitTextField, ElicitNumberField, ElicitBooleanField, ElicitChoiceField, ElicitChoicesField, ElicitValue, ElicitationPolicy, ConfirmationOptions, ConfirmationResult, } from "./elicit.js";
|
|
17
|
+
export type { ProgressUpdate, ReportProgress } from "./progress.js";
|
|
18
|
+
export { toolHintsOf, toolHintOverrideOf, toolHintOverrideRefusal } from "./hints.js";
|
|
19
|
+
export type { ToolHintOverride } from "./hints.js";
|
|
20
|
+
export { untrustedText, untrustedFieldsOf, untrustedTextsOf } from "./untrusted.js";
|
|
21
|
+
export type { UntrustedText, UntrustedSource, UntrustedValue } from "./untrusted.js";
|
|
15
22
|
export type { ToolHints, CapabilityRefusal, CapabilityRefusalReason, InvocationExplanation, EffectsViolation } from "./capability.js";
|
|
16
23
|
export { ProcedureRegistry, RegistryError, PROCEDURE_REGISTRY, assertValidPath } from "./registry.js";
|
|
17
24
|
export { defineProcedure, defineStub, createProcedure, ProcedureBuilder, namespace, validateProcedure, } from "./define.js";
|
|
18
25
|
export type { ProcedureDefinition, ProcedureStub } from "./define.js";
|
|
19
|
-
export { createCollectionProcedures } from "./collection/index.js";
|
|
20
|
-
export type { CollectionStorage, StorageChanges, StorageMetadata } from "./collection/index.js";
|
|
26
|
+
export { createCollectionProcedures, collectionChangeTopic, collectionTopicReads, DEFAULT_FIND_LIMIT, DEFAULT_QUERY_OPERATORS, DEFAULT_QUERY_POLICY, QUERY_OPERATORS, applyPatch, compareStorageValues, compileSelector, isPatchOperations, matchesSelector, mergePatch, patchProblems, queryEntries, queryOptionsProblems, selectorProblems, } from "./collection/index.js";
|
|
27
|
+
export type { CollectionProceduresOptions, CollectionChangeEventsOptions, CollectionChangeEvent, StoragePatchOperations, StorageQueryOperator, StorageQueryPolicy, CollectionStorage, StorageChanges, StorageMetadata, StorageWriteOptions, StorageSetChange, StorageDeleteChange, StorageClearChange, StorageChangeEvent, StorageChangeBatch, StorageObserver, StorageFieldOperators, StoragePatch, StorageQueryOptions, StorageSelector, StorageSort, StorageSortDirection, } from "./collection/index.js";
|
|
21
28
|
export { registerModule, registerProcedures, createAndRegister, } from "./discovery.js";
|
|
22
29
|
export { clientModule, defineModule, moduleClosure, registerModules, createRegistry, registerClientProcedures, } from "./module.js";
|
|
23
30
|
export type { ModuleInput } from "./module.js";
|
|
31
|
+
export { callerOf } from "./caller.js";
|
|
32
|
+
export type { Caller, CallerOptions } from "./caller.js";
|
|
24
33
|
export { PROCEDURE_SYMBOL, PROCEDURE_JSON_KEY, PROCEDURE_WHEN_KEY, PROCEDURE_NAME_KEY, WHEN_IMMEDIATE, WHEN_NEVER, WHEN_PARENT, isProcedureRef, isProcedureRefJson, isAnyProcedureRef, getRefWhen, getRefName, shouldExecuteRef, proc, ProcedureRefBuilder, fromJson, toJson, normalizeRef, hydrateInput, prepareRootCall, observeHydration, isControlFlowPath, isDataDriven, markDataDriven, RUNS_REFS_TAG, RAW_INPUT_TAG, takesRawInput, rawInputRule, MAX_DATA_DEPTH, LITERAL_KEY, isLiteral, isPlainObject, createRefScope, lookupOutputRef, resolveOutputRef, withScope, scopeOf, executeRef, extractTemplate, parseProcedureJson, stringifyProcedureJson, } from "./ref.js";
|
|
25
34
|
export type { ProcedureWhen, ProcedureRef, ProcedureRefJson, AnyProcedureRef, RefExecutor, HydrateOptions, HydrationEvent, StepResultInfo, ContinueDecision, OutputRef, RefScope, } from "./ref.js";
|
|
26
35
|
export { coreProcedures, coreModule, allCoreProcedures, allCoreModules, chainProcedure, parallelProcedure, conditionalProcedure, andProcedure, orProcedure, notProcedure, allProcedure, anyProcedure, noneProcedure, mapProcedure, reduceProcedure, identityProcedure, constantProcedure, throwProcedure, tryCatchProcedure, anySchema, typedAnySchema, zodAdapter, outputSchema, type ZodLikeSchema, } from "./core/index.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"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BAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/procedures/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,YAAY,EACV,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,SAAS,EACT,YAAY,EACZ,eAAe,EACf,cAAc,EACd,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,EACtB,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,mBAAmB,EACnB,qBAAqB,EACrB,OAAO,EACP,WAAW,EACX,gBAAgB,EAChB,QAAQ,EACR,WAAW,EACX,WAAW,EACX,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,iBAAiB,GAClB,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAGlD,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,MAAM,EACN,SAAS,EACT,UAAU,EACV,aAAa,EACb,WAAW,EACX,SAAS,EACT,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,YAAY,GACb,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,WAAW,EAAE,6BAA6B,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAEhJ,OAAO,EAAE,eAAe,EAAE,iBAAiB,IAAI,sBAAsB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC1I,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,cAAc,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAEjI,OAAO,EACL,wBAAwB,EACxB,0BAA0B,EAC1B,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,SAAS,EACT,YAAY,EACZ,iBAAiB,GAClB,MAAM,kBAAkB,C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ED
|
@@ -13,16 +13,22 @@ export { PURE_EFFECTS, REGISTRY_READ_EFFECTS, withEffects, INFERRED_EFFECTS_META
|
|
|
13
13
|
export { MANIFEST_FORMAT, describeProcedure as describeProcedureEntry, describeRegistry, exposedProcedures, hashOf } from "./manifest.js";
|
|
14
14
|
// Idempotency of calls (roadmap R1)
|
|
15
15
|
export { IDEMPOTENCY_KEY_METADATA, MAX_IDEMPOTENCY_KEY_LENGTH, IdempotencyCache, idempotencyKeyOf, idempotentIn, effectsIn, isRepeatable, newIdempotencyKey, } from "./idempotency.js";
|
|
16
|
+
// What the face of a call offers the procedure (CLI-10, CLI-12)
|
|
17
|
+
export { createElicit, elicitWithPolicy, operatorAnswer, elicitInput, elicitConfirmation, NO_ELICITATION_REASON, } from "./elicit.js";
|
|
18
|
+
export { toolHintsOf, toolHintOverrideOf, toolHintOverrideRefusal } from "./hints.js";
|
|
19
|
+
export { untrustedText, untrustedFieldsOf, untrustedTextsOf } from "./untrusted.js";
|
|
16
20
|
// Registry
|
|
17
21
|
export { ProcedureRegistry, RegistryError, PROCEDURE_REGISTRY, assertValidPath } from "./registry.js";
|
|
18
22
|
// Definition helpers
|
|
19
23
|
export { defineProcedure, defineStub, createProcedure, ProcedureBuilder, namespace, validateProcedure, } from "./define.js";
|
|
20
24
|
// Collection procedures
|
|
21
|
-
export { createCollectionProcedures } from "./collection/index.js";
|
|
25
|
+
export { createCollectionProcedures, collectionChangeTopic, collectionTopicReads, DEFAULT_FIND_LIMIT, DEFAULT_QUERY_OPERATORS, DEFAULT_QUERY_POLICY, QUERY_OPERATORS, applyPatch, compareStorageValues, compileSelector, isPatchOperations, matchesSelector, mergePatch, patchProblems, queryEntries, queryOptionsProblems, selectorProblems, } from "./collection/index.js";
|
|
22
26
|
// Manual registration helpers
|
|
23
27
|
export { registerModule, registerProcedures, createAndRegister, } from "./discovery.js";
|
|
24
28
|
// Modules and explicit registries (roadmap 3.1)
|
|
25
29
|
export { clientModule, defineModule, moduleClosure, registerModules, createRegistry, registerClientProcedures, } from "./module.js";
|
|
30
|
+
// One call for a registry of some modules, `invokePath` and `outputValue`
|
|
31
|
+
export { callerOf } from "./caller.js";
|
|
26
32
|
// Procedure reference system (procedure-as-data)
|
|
27
33
|
export {
|
|
28
34
|
// Constants
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/procedures/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/procedures/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAiCH,iBAAiB;AACjB,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAElD,sCAAsC;AACtC,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,MAAM,EACN,SAAS,EACT,UAAU,EACV,aAAa,EACb,WAAW,EACX,SAAS,EACT,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,YAAY,GACb,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,WAAW,EAAE,6BAA6B,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAChJ,kCAAkC;AAClC,OAAO,EAAE,eAAe,EAAE,iBAAiB,IAAI,sBAAsB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE1I,oCAAoC;AACpC,OAAO,EACL,wBAAwB,EACxB,0BAA0B,EAC1B,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,SAAS,EACT,YAAY,EACZ,iBAAiB,GAClB,MAAM,kBAAkB,CAAC;AAE1B,gEAAgE;AAChE,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACd,WAAW,EACX,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,aAAa,CAAC;AAuBrB,OAAO,EAAE,WAAW,E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