@deliverd/sdk 0.38.0 → 0.39.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/README.md +18 -0
- package/dist/adapters/index.d.ts +2 -0
- package/dist/adapters/index.d.ts.map +1 -1
- package/dist/adapters/index.js +1 -0
- package/dist/adapters/muse-spark.d.ts +6 -0
- package/dist/adapters/muse-spark.d.ts.map +1 -1
- package/dist/adapters/muse-spark.js +7 -2
- package/dist/adapters/perplexity.d.ts +99 -0
- package/dist/adapters/perplexity.d.ts.map +1 -0
- package/dist/adapters/perplexity.js +150 -0
- package/dist/data-screen.d.ts +66 -0
- package/dist/data-screen.d.ts.map +1 -1
- package/dist/data-screen.js +138 -1
- package/dist/released.d.ts +1 -1
- package/dist/released.d.ts.map +1 -1
- package/dist/released.js +3105 -0
- package/package.json +1 -1
- package/src/adapters/index.ts +16 -0
- package/src/adapters/muse-spark.ts +9 -3
- package/src/adapters/perplexity.ts +236 -0
- package/src/data-screen.ts +138 -1
- package/src/released.ts +3107 -0
package/README.md
CHANGED
|
@@ -903,6 +903,24 @@ reason. For a wait longer than a process should stay up, let the run pause with
|
|
|
903
903
|
a `state` accessor, then `resolveOpenRouterApprovals(result, { deliverd })`
|
|
904
904
|
returns the `approveToolCalls` and `rejectToolCalls` to resume it with.
|
|
905
905
|
|
|
906
|
+
**Perplexity Agent API** — set `require_approval` on the MCP servers and connectors that can change something, and let Deliverd answer the run:
|
|
907
|
+
|
|
908
|
+
```ts
|
|
909
|
+
import { runPerplexityWithDeliverd } from "@deliverd/sdk/adapters";
|
|
910
|
+
|
|
911
|
+
const response = await runPerplexityWithDeliverd(perplexity, {
|
|
912
|
+
model: "openai/gpt-5.6-sol",
|
|
913
|
+
input: "Close the stale issues in our tracker",
|
|
914
|
+
tools: [{ type: "connector", id: "connector_linear", server_label: "linear", require_approval: "always" }],
|
|
915
|
+
}, { deliverd, approvers: ["platform-team"], run: runTool });
|
|
916
|
+
```
|
|
917
|
+
|
|
918
|
+
Each `mcp_approval_request` waits for a person and is answered with an
|
|
919
|
+
`mcp_approval_response` (a no carries their reason); with `run`, each of your
|
|
920
|
+
own `function_call`s runs only on a yes. Perplexity runs MCP calls without
|
|
921
|
+
asking unless `require_approval` is set. `replay: true` resends the
|
|
922
|
+
conversation for zero data retention accounts.
|
|
923
|
+
|
|
906
924
|
**Muse Spark** (Meta Model API) — the loop runs the calls, so hand them over with the function that runs them:
|
|
907
925
|
|
|
908
926
|
```ts
|
package/dist/adapters/index.d.ts
CHANGED
|
@@ -24,6 +24,8 @@ export { changeOpenRouterGuardrail, openRouterGuardrailForData, openRouterModels
|
|
|
24
24
|
export type { OpenRouterAdmin, OpenRouterChangeOptions, OpenRouterChangeResult, OpenRouterGuardrailSettings, OpenRouterModelUse, OpenRouterPolicyReading, RegisterClient, } from "./openrouter.js";
|
|
25
25
|
export { runMuseFunctionCalls, runMuseToolCalls } from "./muse-spark.js";
|
|
26
26
|
export type { MuseFunctionCall, MuseFunctionCallOutput, MuseToolApprovalOptions, MuseToolCall, MuseToolMessage, MuseToolRunner, } from "./muse-spark.js";
|
|
27
|
+
export { answerPerplexityApprovals, runPerplexityFunctionCalls, runPerplexityWithDeliverd, } from "./perplexity.js";
|
|
28
|
+
export type { PerplexityApprovalOptions, PerplexityApprovalRequest, PerplexityApprovalResponse, PerplexityApprovals, PerplexityClient, PerplexityFunctionCall, PerplexityFunctionCallOutput, PerplexityResponse, PerplexityRunOptions, } from "./perplexity.js";
|
|
27
29
|
export { deliverdAllow, deliverdWebMcpAllow, describeStep, uiSdkApprovalRoute, UI_SDK_DEFAULT_TIMEOUT } from "./ui-sdk.js";
|
|
28
30
|
export type { DeliverdAllowOptions, UiSdkApprovalAnswer, UiSdkApprovalRouteOptions, UiSdkAskContext, UiSdkStep } from "./ui-sdk.js";
|
|
29
31
|
export { defaultDescription, DEFAULT_TOOL_EXPIRY } from "./shared.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3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iBAAiB,CAAC;AACzB,YAAY,EACV,yBAAyB,EACzB,yBAAyB,EACzB,0BAA0B,EAC1B,mBAAmB,EACnB,gBAAgB,EAChB,sBAAsB,EACtB,4BAA4B,EAC5B,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,YAAY,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAC3H,YAAY,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACpI,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACtE,YAAY,EAAE,QAAQ,EAAE,eAAe,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/adapters/index.js
CHANGED
|
@@ -15,5 +15,6 @@ export { generateWithDeliverdApprovals, pendingMastraApproval, resolveMastraAppr
|
|
|
15
15
|
export { deliverdPermissionRequest, resolveOpenRouterApprovals } from "./openrouter.js";
|
|
16
16
|
export { changeOpenRouterGuardrail, openRouterGuardrailForData, openRouterModelsInUse, raiseOpenRouterKeyLimit, registerOpenRouterModels, } from "./openrouter.js";
|
|
17
17
|
export { runMuseFunctionCalls, runMuseToolCalls } from "./muse-spark.js";
|
|
18
|
+
export { answerPerplexityApprovals, runPerplexityFunctionCalls, runPerplexityWithDeliverd, } from "./perplexity.js";
|
|
18
19
|
export { deliverdAllow, deliverdWebMcpAllow, describeStep, uiSdkApprovalRoute, UI_SDK_DEFAULT_TIMEOUT } from "./ui-sdk.js";
|
|
19
20
|
export { defaultDescription, DEFAULT_TOOL_EXPIRY } from "./shared.js";
|
|
@@ -76,4 +76,10 @@ export declare function runMuseFunctionCalls(output: readonly {
|
|
|
76
76
|
export declare function runMuseToolCalls(message: {
|
|
77
77
|
tool_calls?: readonly MuseToolCall[] | null;
|
|
78
78
|
}, run: MuseToolRunner, options: MuseToolApprovalOptions): Promise<MuseToolMessage[]>;
|
|
79
|
+
/**
|
|
80
|
+
* Ask about one call when `when` selects it, and run it only on a yes. Shared
|
|
81
|
+
* with the other Responses-API-shaped adapters (Perplexity's Agent API), each
|
|
82
|
+
* keying its requests with its own prefix. Not exported from the adapters entry.
|
|
83
|
+
*/
|
|
84
|
+
export declare function approveAndRun(toolName: string, rawArguments: string, callId: string, run: MuseToolRunner, options: MuseToolApprovalOptions, prefix?: string): Promise<string>;
|
|
79
85
|
//# sourceMappingURL=muse-spark.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"muse-spark.d.ts","sourceRoot":"","sources":["../../src/adapters/muse-spark.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAErE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,MAAM,WAAW,uBAAwB,SAAQ,mBAAmB;IAClE;;;;OAIG;IACH,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,MAAM,EAAE,CAAC;CAC3E;AAED,6HAA6H;AAC7H,MAAM,MAAM,cAAc,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AAE9F,8DAA8D;AAC9D,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,eAAe,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,kEAAkE;AAClE,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,sBAAsB,CAAC;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,0E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G,EAAE,cAAc,EACnB,OAAO,EAAE,uBAAuB,EAChC,MAAM,SAAgB,GACrB,OAAO,CAAC,MAAM,CAAC,CAejB"}
|
|
@@ -26,7 +26,12 @@ export async function runMuseToolCalls(message, run, options) {
|
|
|
26
26
|
}
|
|
27
27
|
return results;
|
|
28
28
|
}
|
|
29
|
-
|
|
29
|
+
/**
|
|
30
|
+
* Ask about one call when `when` selects it, and run it only on a yes. Shared
|
|
31
|
+
* with the other Responses-API-shaped adapters (Perplexity's Agent API), each
|
|
32
|
+
* keying its requests with its own prefix. Not exported from the adapters entry.
|
|
33
|
+
*/
|
|
34
|
+
export async function approveAndRun(toolName, rawArguments, callId, run, options, prefix = "muse-spark:") {
|
|
30
35
|
const input = parseArguments(rawArguments);
|
|
31
36
|
if (!options.when || (await options.when(toolName, input))) {
|
|
32
37
|
const editable = typeof input === "object" && input !== null && !Array.isArray(input)
|
|
@@ -34,7 +39,7 @@ async function approveAndRun(toolName, rawArguments, callId, run, options) {
|
|
|
34
39
|
: undefined;
|
|
35
40
|
// The call id makes the ask idempotent: a loop that is retried, or a
|
|
36
41
|
// process restarted mid-wait, finds the request it already made.
|
|
37
|
-
const outcome = await askAboutCall(toolName, input,
|
|
42
|
+
const outcome = await askAboutCall(toolName, input, `${prefix}${callId}`, options, undefined, editable);
|
|
38
43
|
if (!outcome.allowed)
|
|
39
44
|
return outcome.reason;
|
|
40
45
|
// What was approved runs, which is the proposal unless a person corrected it.
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { type MuseToolApprovalOptions, type MuseToolRunner } from "./muse-spark.js";
|
|
2
|
+
/** An MCP or connector call waiting for an answer. It has not run. */
|
|
3
|
+
export interface PerplexityApprovalRequest {
|
|
4
|
+
type: "mcp_approval_request";
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
/** JSON-encoded on the wire. */
|
|
8
|
+
arguments?: string;
|
|
9
|
+
server_label?: string;
|
|
10
|
+
/** Set when the call came from a connector set up in the API Console. */
|
|
11
|
+
connector_id?: string | null;
|
|
12
|
+
}
|
|
13
|
+
/** The answer to one `mcp_approval_request`, sent as an `input` item of the next request. */
|
|
14
|
+
export interface PerplexityApprovalResponse {
|
|
15
|
+
type: "mcp_approval_response";
|
|
16
|
+
approval_request_id: string;
|
|
17
|
+
approve: boolean;
|
|
18
|
+
/** Read by the model when a call was declined. */
|
|
19
|
+
reason?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface PerplexityApprovalOptions extends MuseToolApprovalOptions {
|
|
22
|
+
/** Put the person's reason on a declined answer, where the model reads it. Default true. */
|
|
23
|
+
sendReason?: boolean;
|
|
24
|
+
}
|
|
25
|
+
export interface PerplexityApprovals {
|
|
26
|
+
/** One answer per request, in the order they were asked: the next request's `input`. */
|
|
27
|
+
responses: PerplexityApprovalResponse[];
|
|
28
|
+
/** Why each declined call was declined, by request id, for your logs. */
|
|
29
|
+
reasons: Record<string, string>;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Ask about every `mcp_approval_request` in a response's `output`, and build
|
|
33
|
+
* the answers. A call `when` does not select is approved without asking.
|
|
34
|
+
* Other items are ignored.
|
|
35
|
+
*/
|
|
36
|
+
export declare function answerPerplexityApprovals(output: readonly {
|
|
37
|
+
type?: string;
|
|
38
|
+
}[] | null | undefined, options: PerplexityApprovalOptions): Promise<PerplexityApprovals>;
|
|
39
|
+
/** A function call the model asked for in an Agent API response. */
|
|
40
|
+
export interface PerplexityFunctionCall {
|
|
41
|
+
type: "function_call";
|
|
42
|
+
call_id: string;
|
|
43
|
+
name: string;
|
|
44
|
+
arguments: string;
|
|
45
|
+
}
|
|
46
|
+
/** The result of one function call, sent as an `input` item of the next request. */
|
|
47
|
+
export interface PerplexityFunctionCallOutput {
|
|
48
|
+
type: "function_call_output";
|
|
49
|
+
call_id: string;
|
|
50
|
+
output: string;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Ask about, and run, every `function_call` in a response's `output`. Only
|
|
54
|
+
* approved calls run; a declined one's output tells the model a person said
|
|
55
|
+
* no, and why. Every call gets an output, because the run cannot continue
|
|
56
|
+
* without one.
|
|
57
|
+
*/
|
|
58
|
+
export declare function runPerplexityFunctionCalls(output: readonly {
|
|
59
|
+
type?: string;
|
|
60
|
+
}[] | null | undefined, run: MuseToolRunner, options: PerplexityApprovalOptions): Promise<PerplexityFunctionCallOutput[]>;
|
|
61
|
+
/** Perplexity's client, or the OpenAI SDK pointed at `https://api.perplexity.ai/v1`. */
|
|
62
|
+
export interface PerplexityClient {
|
|
63
|
+
responses: {
|
|
64
|
+
create(params: Record<string, unknown>): Promise<PerplexityResponse> | PromiseLike<PerplexityResponse>;
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
/** The parts of an Agent API response this reads. */
|
|
68
|
+
export interface PerplexityResponse {
|
|
69
|
+
id: string;
|
|
70
|
+
status?: string;
|
|
71
|
+
output?: {
|
|
72
|
+
type?: string;
|
|
73
|
+
}[] | null;
|
|
74
|
+
}
|
|
75
|
+
export interface PerplexityRunOptions extends PerplexityApprovalOptions {
|
|
76
|
+
/** Makes your own function calls. Without it, a response asking for one is returned to you as it is. */
|
|
77
|
+
run?: MuseToolRunner;
|
|
78
|
+
/**
|
|
79
|
+
* Resend the conversation in `input` instead of chaining with
|
|
80
|
+
* `previous_response_id`. For accounts under zero data retention, which
|
|
81
|
+
* cannot use `previous_response_id`; each response's output, and the
|
|
82
|
+
* answers, are sent back unchanged.
|
|
83
|
+
*/
|
|
84
|
+
replay?: boolean;
|
|
85
|
+
/** Stop after this many rounds of answers. Default 10. */
|
|
86
|
+
maxRounds?: number;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Create a response, and keep answering its approval requests and running its
|
|
90
|
+
* function calls until it asks for nothing more.
|
|
91
|
+
*
|
|
92
|
+
* Each follow-up carries everything in `params` (`model`, `tools`,
|
|
93
|
+
* `instructions`) except `input`, which becomes the answers and outputs, with
|
|
94
|
+
* the last response's id as `previous_response_id`; or, with `replay`, the
|
|
95
|
+
* whole conversation so far. The `tools` array goes unchanged, as Perplexity
|
|
96
|
+
* requires. Non-streaming, foreground responses only.
|
|
97
|
+
*/
|
|
98
|
+
export declare function runPerplexityWithDeliverd(client: PerplexityClient, params: Record<string, unknown>, options: PerplexityRunOptions): Promise<PerplexityResponse>;
|
|
99
|
+
//# sourceMappingURL=perplexity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"perplexity.d.ts","sourceRoot":"","sources":["../../src/adapters/perplexity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,uBAAuB,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AA0CnG,sEAAsE;AACtE,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,sBAAsB,CAAC;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,gCAAgC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yEAAyE;IACzE,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B;AAED,6FAA6F;AAC7F,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,uBAAuB,CAAC;IAC9B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,kDAAkD;IAClD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,yBAA0B,SAAQ,uBAAuB;IACxE,4FAA4F;IAC5F,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,mBAAmB;IAClC,wFAAwF;IACxF,SAAS,EAAE,0BAA0B,EAAE,CAAC;IACxC,yEAAyE;IACzE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC;AAED;;;;GAIG;AACH,wBAAsB,yBAAyB,CAC7C,MAAM,EAAE,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O,CAAC;IACjB,0DAA0D;IAC1D,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;GASG;AACH,wBAAsB,yBAAyB,CAC7C,MAAM,EAAE,gBAAgB,EACxB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,kBAAkB,CAAC,CAwB7B"}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { approveAndRun } from "./muse-spark.js";
|
|
2
|
+
import { askAboutCall } from "./shared.js";
|
|
3
|
+
/**
|
|
4
|
+
* Perplexity's Agent API: a person decides the tool calls a run asks to make.
|
|
5
|
+
*
|
|
6
|
+
* The Agent API (`POST https://api.perplexity.ai/v1/agent`, also served at
|
|
7
|
+
* `/v1/responses` for the OpenAI SDK) runs the agent loop itself: search,
|
|
8
|
+
* fetch, any model through one key, remote MCP servers and the connectors a
|
|
9
|
+
* Project administrator set up. It stops for a person in two places, and this
|
|
10
|
+
* answers both:
|
|
11
|
+
*
|
|
12
|
+
* - **MCP servers and connectors with `require_approval`.** The call does not
|
|
13
|
+
* run; the response's `output` carries an `mcp_approval_request` instead,
|
|
14
|
+
* and the next request answers it with an `mcp_approval_response`. Perplexity
|
|
15
|
+
* runs MCP and connector calls without asking unless `require_approval` is
|
|
16
|
+
* set, unlike OpenAI's default, so set it on every server that can change
|
|
17
|
+
* something.
|
|
18
|
+
* - **Your own functions.** A `function_call` in `output` is a call your code
|
|
19
|
+
* makes, so your code is where a person comes in: only approved calls run,
|
|
20
|
+
* and a declined one answers the model with the person's reason.
|
|
21
|
+
*
|
|
22
|
+
* ```ts
|
|
23
|
+
* import Perplexity from "@perplexity-ai/perplexity_ai";
|
|
24
|
+
* import { Deliverd } from "@deliverd/sdk";
|
|
25
|
+
* import { runPerplexityWithDeliverd } from "@deliverd/sdk/adapters";
|
|
26
|
+
*
|
|
27
|
+
* const response = await runPerplexityWithDeliverd(new Perplexity(), {
|
|
28
|
+
* model: "openai/gpt-5.6-sol",
|
|
29
|
+
* input: "Close the stale issues in our tracker",
|
|
30
|
+
* tools: [{ type: "connector", id: "connector_linear", server_label: "linear", require_approval: "always" }],
|
|
31
|
+
* }, { deliverd: new Deliverd(), approvers: ["platform-team"] });
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* Every call is keyed by its id (`perplexity:<id>`), so a retried round, or a
|
|
35
|
+
* process restarted mid-wait, finds the request it already made. Shapes are
|
|
36
|
+
* from Perplexity's Agent API reference (MCP tool, connectors, custom
|
|
37
|
+
* functions); nothing from `@perplexity-ai/perplexity_ai` is imported.
|
|
38
|
+
*/
|
|
39
|
+
const PREFIX = "perplexity:";
|
|
40
|
+
/**
|
|
41
|
+
* Ask about every `mcp_approval_request` in a response's `output`, and build
|
|
42
|
+
* the answers. A call `when` does not select is approved without asking.
|
|
43
|
+
* Other items are ignored.
|
|
44
|
+
*/
|
|
45
|
+
export async function answerPerplexityApprovals(output, options) {
|
|
46
|
+
const result = { responses: [], reasons: {} };
|
|
47
|
+
for (const request of approvalRequests(output)) {
|
|
48
|
+
const input = parseArguments(request.arguments);
|
|
49
|
+
let approve = true;
|
|
50
|
+
let reason;
|
|
51
|
+
if (!options.when || (await options.when(request.name, input))) {
|
|
52
|
+
const outcome = await askAboutCall(request.name, input, `${PREFIX}${request.id}`, {
|
|
53
|
+
...options,
|
|
54
|
+
metadata: {
|
|
55
|
+
...options.metadata,
|
|
56
|
+
...(request.server_label ? { server: request.server_label } : {}),
|
|
57
|
+
...(request.connector_id ? { connector: request.connector_id } : {}),
|
|
58
|
+
},
|
|
59
|
+
});
|
|
60
|
+
approve = outcome.allowed;
|
|
61
|
+
if (!outcome.allowed)
|
|
62
|
+
reason = outcome.reason;
|
|
63
|
+
}
|
|
64
|
+
const answer = { type: "mcp_approval_response", approval_request_id: request.id, approve };
|
|
65
|
+
if (reason) {
|
|
66
|
+
result.reasons[request.id] = reason;
|
|
67
|
+
if (options.sendReason !== false)
|
|
68
|
+
answer.reason = reason;
|
|
69
|
+
}
|
|
70
|
+
result.responses.push(answer);
|
|
71
|
+
}
|
|
72
|
+
return result;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Ask about, and run, every `function_call` in a response's `output`. Only
|
|
76
|
+
* approved calls run; a declined one's output tells the model a person said
|
|
77
|
+
* no, and why. Every call gets an output, because the run cannot continue
|
|
78
|
+
* without one.
|
|
79
|
+
*/
|
|
80
|
+
export async function runPerplexityFunctionCalls(output, run, options) {
|
|
81
|
+
const results = [];
|
|
82
|
+
for (const item of output ?? []) {
|
|
83
|
+
if (item.type !== "function_call")
|
|
84
|
+
continue;
|
|
85
|
+
const call = item;
|
|
86
|
+
results.push({
|
|
87
|
+
type: "function_call_output",
|
|
88
|
+
call_id: call.call_id,
|
|
89
|
+
output: await approveAndRun(call.name, call.arguments, call.call_id, run, options, PREFIX),
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
return results;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Create a response, and keep answering its approval requests and running its
|
|
96
|
+
* function calls until it asks for nothing more.
|
|
97
|
+
*
|
|
98
|
+
* Each follow-up carries everything in `params` (`model`, `tools`,
|
|
99
|
+
* `instructions`) except `input`, which becomes the answers and outputs, with
|
|
100
|
+
* the last response's id as `previous_response_id`; or, with `replay`, the
|
|
101
|
+
* whole conversation so far. The `tools` array goes unchanged, as Perplexity
|
|
102
|
+
* requires. Non-streaming, foreground responses only.
|
|
103
|
+
*/
|
|
104
|
+
export async function runPerplexityWithDeliverd(client, params, options) {
|
|
105
|
+
const { input: firstInput, previous_response_id: _chain, ...carried } = params;
|
|
106
|
+
void _chain;
|
|
107
|
+
let response = await client.responses.create(params);
|
|
108
|
+
let history = toItems(firstInput);
|
|
109
|
+
const maxRounds = options.maxRounds ?? 10;
|
|
110
|
+
for (let round = 0;; round++) {
|
|
111
|
+
const output = response.output ?? [];
|
|
112
|
+
const asking = approvalRequests(output).length > 0;
|
|
113
|
+
const calling = !!options.run && output.some((item) => item.type === "function_call");
|
|
114
|
+
if (!asking && !calling)
|
|
115
|
+
return response;
|
|
116
|
+
if (round >= maxRounds) {
|
|
117
|
+
throw new Error(`The run was still asking for decisions after ${maxRounds} rounds. Raise maxRounds if that is expected.`);
|
|
118
|
+
}
|
|
119
|
+
const { responses } = await answerPerplexityApprovals(output, options);
|
|
120
|
+
const results = options.run ? await runPerplexityFunctionCalls(output, options.run, options) : [];
|
|
121
|
+
const answers = [...responses, ...results];
|
|
122
|
+
if (options.replay) {
|
|
123
|
+
history = [...history, ...output, ...answers];
|
|
124
|
+
response = await client.responses.create({ ...carried, input: history });
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
response = await client.responses.create({ ...carried, input: answers, previous_response_id: response.id });
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
function approvalRequests(output) {
|
|
132
|
+
return (output ?? []).filter((item) => item.type === "mcp_approval_request" && !!item.id);
|
|
133
|
+
}
|
|
134
|
+
function toItems(input) {
|
|
135
|
+
if (input === undefined || input === null)
|
|
136
|
+
return [];
|
|
137
|
+
if (typeof input === "string")
|
|
138
|
+
return [{ type: "message", role: "user", content: input }];
|
|
139
|
+
return Array.isArray(input) ? [...input] : [input];
|
|
140
|
+
}
|
|
141
|
+
function parseArguments(raw) {
|
|
142
|
+
if (!raw)
|
|
143
|
+
return {};
|
|
144
|
+
try {
|
|
145
|
+
return JSON.parse(raw);
|
|
146
|
+
}
|
|
147
|
+
catch {
|
|
148
|
+
return raw;
|
|
149
|
+
}
|
|
150
|
+
}
|
package/dist/data-screen.d.ts
CHANGED
|
@@ -75,6 +75,72 @@ export declare const DATA_KINDS: {
|
|
|
75
75
|
readonly placeholder: "SSN";
|
|
76
76
|
readonly redactable: true;
|
|
77
77
|
};
|
|
78
|
+
readonly us_itin: {
|
|
79
|
+
readonly label: "US ITIN";
|
|
80
|
+
readonly category: "personal";
|
|
81
|
+
readonly placeholder: "ITIN";
|
|
82
|
+
readonly redactable: true;
|
|
83
|
+
};
|
|
84
|
+
readonly ca_sin: {
|
|
85
|
+
readonly label: "Canadian Social Insurance number";
|
|
86
|
+
readonly category: "personal";
|
|
87
|
+
readonly placeholder: "SIN";
|
|
88
|
+
readonly redactable: true;
|
|
89
|
+
};
|
|
90
|
+
readonly fr_nir: {
|
|
91
|
+
readonly label: "French social security number";
|
|
92
|
+
readonly category: "personal";
|
|
93
|
+
readonly placeholder: "NIR";
|
|
94
|
+
readonly redactable: true;
|
|
95
|
+
};
|
|
96
|
+
readonly es_dni: {
|
|
97
|
+
readonly label: "Spanish DNI or NIE";
|
|
98
|
+
readonly category: "personal";
|
|
99
|
+
readonly placeholder: "DNI";
|
|
100
|
+
readonly redactable: true;
|
|
101
|
+
};
|
|
102
|
+
readonly it_fiscal_code: {
|
|
103
|
+
readonly label: "Italian fiscal code";
|
|
104
|
+
readonly category: "personal";
|
|
105
|
+
readonly placeholder: "CF";
|
|
106
|
+
readonly redactable: true;
|
|
107
|
+
};
|
|
108
|
+
readonly nl_bsn: {
|
|
109
|
+
readonly label: "Dutch BSN";
|
|
110
|
+
readonly category: "personal";
|
|
111
|
+
readonly placeholder: "BSN";
|
|
112
|
+
readonly redactable: true;
|
|
113
|
+
};
|
|
114
|
+
readonly pl_pesel: {
|
|
115
|
+
readonly label: "Polish PESEL number";
|
|
116
|
+
readonly category: "personal";
|
|
117
|
+
readonly placeholder: "PESEL";
|
|
118
|
+
readonly redactable: true;
|
|
119
|
+
};
|
|
120
|
+
readonly de_tax_id: {
|
|
121
|
+
readonly label: "German tax ID";
|
|
122
|
+
readonly category: "personal";
|
|
123
|
+
readonly placeholder: "STEUERID";
|
|
124
|
+
readonly redactable: true;
|
|
125
|
+
};
|
|
126
|
+
readonly passport: {
|
|
127
|
+
readonly label: "Passport number";
|
|
128
|
+
readonly category: "personal";
|
|
129
|
+
readonly placeholder: "PASSPORT";
|
|
130
|
+
readonly redactable: true;
|
|
131
|
+
};
|
|
132
|
+
readonly vat_number: {
|
|
133
|
+
readonly label: "VAT number";
|
|
134
|
+
readonly category: "financial";
|
|
135
|
+
readonly placeholder: "VAT";
|
|
136
|
+
readonly redactable: true;
|
|
137
|
+
};
|
|
138
|
+
readonly bank_account: {
|
|
139
|
+
readonly label: "Bank account number";
|
|
140
|
+
readonly category: "financial";
|
|
141
|
+
readonly placeholder: "ACCOUNT";
|
|
142
|
+
readonly redactable: true;
|
|
143
|
+
};
|
|
78
144
|
readonly ip_address: {
|
|
79
145
|
readonly label: "IP address";
|
|
80
146
|
readonly category: "personal";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-screen.d.ts","sourceRoot":"","sources":["../src/data-screen.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,qEAAqE;AACrE,eAAO,MAAM,sBAAsB,+DAAgE,CAAC;AACpG,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE3E,eAAO,MAAM,iBAAiB,yEAA0E,CAAC;AACzG,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEhE,eAAO,MAAM,eAAe,6CAA8C,CAAC;AAC3E,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7D,qEAAqE;AACrE,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC;AAerD,eAAO,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"data-screen.d.ts","sourceRoot":"","sources":["../src/data-screen.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,qEAAqE;AACrE,eAAO,MAAM,sBAAsB,+DAAgE,CAAC;AACpG,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,sBAAsB,CAAC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S = {
|
|
|
35
35
|
uk_national_insurance: { label: "UK National Insurance number", category: "personal", placeholder: "NINO", redactable: true },
|
|
36
36
|
ie_pps: { label: "Irish PPS number", category: "personal", placeholder: "PPS", redactable: true },
|
|
37
37
|
us_ssn: { label: "US Social Security number", category: "personal", placeholder: "SSN", redactable: true },
|
|
38
|
+
us_itin: { label: "US ITIN", category: "personal", placeholder: "ITIN", redactable: true },
|
|
39
|
+
ca_sin: { label: "Canadian Social Insurance number", category: "personal", placeholder: "SIN", redactable: true },
|
|
40
|
+
fr_nir: { label: "French social security number", category: "personal", placeholder: "NIR", redactable: true },
|
|
41
|
+
es_dni: { label: "Spanish DNI or NIE", category: "personal", placeholder: "DNI", redactable: true },
|
|
42
|
+
it_fiscal_code: { label: "Italian fiscal code", category: "personal", placeholder: "CF", redactable: true },
|
|
43
|
+
nl_bsn: { label: "Dutch BSN", category: "personal", placeholder: "BSN", redactable: true },
|
|
44
|
+
pl_pesel: { label: "Polish PESEL number", category: "personal", placeholder: "PESEL", redactable: true },
|
|
45
|
+
de_tax_id: { label: "German tax ID", category: "personal", placeholder: "STEUERID", redactable: true },
|
|
46
|
+
passport: { label: "Passport number", category: "personal", placeholder: "PASSPORT", redactable: true },
|
|
47
|
+
vat_number: { label: "VAT number", category: "financial", placeholder: "VAT", redactable: true },
|
|
48
|
+
bank_account: { label: "Bank account number", category: "financial", placeholder: "ACCOUNT", redactable: true },
|
|
38
49
|
ip_address: { label: "IP address", category: "personal", placeholder: "IP", redactable: true },
|
|
39
50
|
date_of_birth: { label: "Date of birth", category: "personal", placeholder: "DOB", redactable: true },
|
|
40
51
|
/** Never found by a pattern here: only by a model detector the caller plugs in (`spans`). */
|
|
@@ -114,6 +125,99 @@ function ipv6Valid(raw) {
|
|
|
114
125
|
const groups = raw.split(":").filter(Boolean).length;
|
|
115
126
|
return compressed === 0 ? groups === 8 : compressed === 1 && groups >= 3 && groups <= 7;
|
|
116
127
|
}
|
|
128
|
+
/** An ITIN: 9XX-XX-XXXX with a middle group the IRS issues (50-65, 70-88, 90-92, 94-99). */
|
|
129
|
+
function itinValid(raw) {
|
|
130
|
+
const g = Number(raw.slice(4, 6));
|
|
131
|
+
return (g >= 50 && g <= 65) || (g >= 70 && g <= 88) || (g >= 90 && g <= 92) || (g >= 94 && g <= 99);
|
|
132
|
+
}
|
|
133
|
+
/** A Canadian SIN: nine digits, Luhn-checked; none is issued starting with 0 or 8. */
|
|
134
|
+
function sinValid(raw) {
|
|
135
|
+
const d = digitsOf(raw);
|
|
136
|
+
return d.length === 9 && d[0] !== "0" && d[0] !== "8" && luhn(d);
|
|
137
|
+
}
|
|
138
|
+
/** An ABA routing number: weights 3, 7, 1 repeating, a multiple of 10. */
|
|
139
|
+
function abaValid(raw) {
|
|
140
|
+
const d = digitsOf(raw);
|
|
141
|
+
if (d.length !== 9 || /^0+$/.test(d))
|
|
142
|
+
return false;
|
|
143
|
+
let sum = 0;
|
|
144
|
+
for (let i = 0; i < 9; i++)
|
|
145
|
+
sum += (d.charCodeAt(i) - 48) * [3, 7, 1][i % 3];
|
|
146
|
+
return sum % 10 === 0;
|
|
147
|
+
}
|
|
148
|
+
/** A French NIR: thirteen digits (2A and 2B for Corsica) and a key, 97 minus the number mod 97. */
|
|
149
|
+
function nirValid(raw) {
|
|
150
|
+
const s = raw.replace(/ /g, "").toUpperCase();
|
|
151
|
+
if (s.length !== 15)
|
|
152
|
+
return false;
|
|
153
|
+
const body = s.slice(0, 13).replace("2A", "19").replace("2B", "18");
|
|
154
|
+
if (!/^\d{13}$/.test(body))
|
|
155
|
+
return false;
|
|
156
|
+
let mod = 0;
|
|
157
|
+
for (const ch of body)
|
|
158
|
+
mod = (mod * 10 + (ch.charCodeAt(0) - 48)) % 97;
|
|
159
|
+
return 97 - mod === Number(s.slice(13));
|
|
160
|
+
}
|
|
161
|
+
/** A Spanish DNI (eight digits) or NIE (X, Y or Z and seven), and its check letter. */
|
|
162
|
+
function dniValid(raw) {
|
|
163
|
+
const s = raw.replace("-", "").toUpperCase();
|
|
164
|
+
const n = Number(s.slice(0, -1).replace(/^X/, "0").replace(/^Y/, "1").replace(/^Z/, "2"));
|
|
165
|
+
return "TRWAGMYFPDXBNJZSQVHLCKE"[n % 23] === s.at(-1);
|
|
166
|
+
}
|
|
167
|
+
const CF_ODD = [1, 0, 5, 7, 9, 13, 15, 17, 19, 21, 2, 4, 18, 20, 11, 3, 6, 8, 12, 14, 16, 10, 22, 25, 24, 23];
|
|
168
|
+
/** An Italian codice fiscale and its check letter. */
|
|
169
|
+
function fiscalCodeValid(raw) {
|
|
170
|
+
const s = raw.toUpperCase();
|
|
171
|
+
let sum = 0;
|
|
172
|
+
for (let i = 0; i < 15; i++) {
|
|
173
|
+
const c = s.charCodeAt(i);
|
|
174
|
+
const v = c >= 65 ? c - 65 : c - 48;
|
|
175
|
+
sum += i % 2 === 0 ? CF_ODD[v] : v;
|
|
176
|
+
}
|
|
177
|
+
return String.fromCharCode(65 + (sum % 26)) === s[15];
|
|
178
|
+
}
|
|
179
|
+
/** A Dutch BSN: the eleven test, weights 9 to 2 and -1 on the last digit. */
|
|
180
|
+
function bsnValid(raw) {
|
|
181
|
+
const d = digitsOf(raw);
|
|
182
|
+
if (d.length !== 9 || /^0+$/.test(d))
|
|
183
|
+
return false;
|
|
184
|
+
let sum = 0;
|
|
185
|
+
for (let i = 0; i < 8; i++)
|
|
186
|
+
sum += (d.charCodeAt(i) - 48) * (9 - i);
|
|
187
|
+
return (sum - (d.charCodeAt(8) - 48)) % 11 === 0;
|
|
188
|
+
}
|
|
189
|
+
/** A Polish PESEL: weights 1, 3, 7, 9 repeating, and a check digit. */
|
|
190
|
+
function peselValid(raw) {
|
|
191
|
+
if (!/^\d{11}$/.test(raw))
|
|
192
|
+
return false;
|
|
193
|
+
let sum = 0;
|
|
194
|
+
for (let i = 0; i < 10; i++)
|
|
195
|
+
sum += (raw.charCodeAt(i) - 48) * [1, 3, 7, 9][i % 4];
|
|
196
|
+
return (10 - (sum % 10)) % 10 === raw.charCodeAt(10) - 48;
|
|
197
|
+
}
|
|
198
|
+
/** A German Steuer-ID: eleven digits, not starting with 0, ISO 7064 MOD 11,10. */
|
|
199
|
+
function steuerIdValid(raw) {
|
|
200
|
+
const d = digitsOf(raw);
|
|
201
|
+
if (d.length !== 11 || d[0] === "0")
|
|
202
|
+
return false;
|
|
203
|
+
let product = 10;
|
|
204
|
+
for (let i = 0; i < 10; i++) {
|
|
205
|
+
let sum = (d.charCodeAt(i) - 48 + product) % 10;
|
|
206
|
+
if (sum === 0)
|
|
207
|
+
sum = 10;
|
|
208
|
+
product = (2 * sum) % 11;
|
|
209
|
+
}
|
|
210
|
+
const check = 11 - product;
|
|
211
|
+
return (check === 10 ? 0 : check) === d.charCodeAt(10) - 48;
|
|
212
|
+
}
|
|
213
|
+
/** A passport number after the word: some digits in it, so "passport holder" is not one. */
|
|
214
|
+
function passportValid(raw) {
|
|
215
|
+
return digitsOf(raw).length >= 4;
|
|
216
|
+
}
|
|
217
|
+
/** A VAT number after the word: written in capitals, as issued, with digits in it. */
|
|
218
|
+
function vatValid(raw) {
|
|
219
|
+
return raw === raw.toUpperCase() && digitsOf(raw).length >= 6;
|
|
220
|
+
}
|
|
117
221
|
/** A value in a .env line that is a placeholder, not a credential. */
|
|
118
222
|
function envSecretValid(value) {
|
|
119
223
|
return !/^[<{%(]/.test(value) && !/your|example|placeholder|changeme|xxxx/i.test(value);
|
|
@@ -169,6 +273,33 @@ const DETECTORS = [
|
|
|
169
273
|
pattern: /\b(?!BG|GB|NK|KN|TN|NT|ZZ)[A-CEGHJ-PR-TW-Z][A-CEGHJ-NPR-TW-Z] ?\d{2} ?\d{2} ?\d{2} ?[A-D]\b/g,
|
|
170
274
|
},
|
|
171
275
|
{ kind: "ie_pps", pattern: /\b\d{7}[A-W][A-IW]?\b/g, valid: ppsValid },
|
|
276
|
+
{ kind: "us_itin", pattern: /\b9\d{2}-\d{2}-\d{4}\b/g, valid: itinValid },
|
|
277
|
+
// Written in groups of three, or as nine digits after the words.
|
|
278
|
+
{ kind: "ca_sin", pattern: /\b\d{3}[ -]\d{3}[ -]\d{3}\b/g, valid: sinValid },
|
|
279
|
+
{ kind: "ca_sin", pattern: /\b(?:SIN|social insurance (?:number|no\.?))[ \t:#]*(\d{9})\b/gi, valid: sinValid, group: 1 },
|
|
280
|
+
{ kind: "fr_nir", pattern: /\b[12] ?\d{2} ?\d{2} ?(?:\d{2}|2[AB]) ?\d{3} ?\d{3} ?\d{2}\b/g, valid: nirValid },
|
|
281
|
+
{ kind: "es_dni", pattern: /\b(?:\d{8}|[XYZ]\d{7})-?[A-Z]\b/g, valid: dniValid },
|
|
282
|
+
{ kind: "it_fiscal_code", pattern: /\b[A-Z]{6}\d{2}[A-EHLMPRST]\d{2}[A-Z]\d{3}[A-Z]\b/g, valid: fiscalCodeValid },
|
|
283
|
+
// Nine or eleven bare digits are too often something else: these need the word before them.
|
|
284
|
+
{ kind: "nl_bsn", pattern: /\b(?:BSN|burgerservicenummer)(?:-?nummer)?[ \t:#.]*(\d{9}|\d{4}\.\d{2}\.\d{3}|\d{3}[ .]\d{3}[ .]\d{3})\b/gi, valid: bsnValid, group: 1 },
|
|
285
|
+
{ kind: "pl_pesel", pattern: /\bPESEL[ \t:#.]*(\d{11})\b/gi, valid: peselValid, group: 1 },
|
|
286
|
+
{
|
|
287
|
+
kind: "de_tax_id",
|
|
288
|
+
pattern: /\b(?:steuer-?id(?:entifikationsnummer)?|steuerliche identifikationsnummer|idnr\.?|tax id)[ \t:#.]*(\d{2} ?\d{3} ?\d{3} ?\d{3})\b/gi,
|
|
289
|
+
valid: steuerIdValid,
|
|
290
|
+
group: 1,
|
|
291
|
+
},
|
|
292
|
+
{ kind: "passport", pattern: /\bpassport(?: (?:no\.?|number|#))?[ \t:#]*([A-Z0-9]{6,9})\b/gi, valid: passportValid, group: 1 },
|
|
293
|
+
{
|
|
294
|
+
kind: "vat_number",
|
|
295
|
+
pattern: /\b(?:VAT|BTW|TVA|IVA|USt-?IdNr\.?)(?: (?:no\.?|number|reg(?:istration)?(?: no\.?| number)?|id))?[ \t:#.]*((?:AT|BE|BG|CY|CZ|DE|DK|EE|EL|ES|FI|FR|GB|HR|HU|IE|IT|LT|LU|LV|MT|NL|PL|PT|RO|SE|SI|SK|XI) ?[0-9A-Z]{8,12})\b/gi,
|
|
296
|
+
valid: vatValid,
|
|
297
|
+
group: 1,
|
|
298
|
+
},
|
|
299
|
+
// Bank details after the words: a US routing number, a UK sort code, an account number.
|
|
300
|
+
{ kind: "bank_account", pattern: /\b(?:routing|ABA|RTN)(?: (?:no\.?|number|#))?[ \t:#]*(\d{9})\b/gi, valid: abaValid, group: 1 },
|
|
301
|
+
{ kind: "bank_account", pattern: /\bsort code[ \t:#]*(\d{2}[- ]?\d{2}[- ]?\d{2})\b/gi, group: 1 },
|
|
302
|
+
{ kind: "bank_account", pattern: /\b(?:account|acct|a\/c)(?: (?:no\.?|number|#))?[ \t:#]*(\d{8,17})\b/gi, group: 1 },
|
|
172
303
|
{ kind: "email", pattern: /\b[A-Za-z0-9._%+-]+@[A-Za-z0-9-]+(?:\.[A-Za-z0-9-]+)*\.[A-Za-z]{2,}\b/g },
|
|
173
304
|
{
|
|
174
305
|
kind: "date_of_birth",
|
|
@@ -195,7 +326,7 @@ const DETECTORS = [
|
|
|
195
326
|
{ kind: "special_category", pattern: SPECIAL_PATTERN },
|
|
196
327
|
];
|
|
197
328
|
/** Earlier wins an overlap: a card number is not also a phone number. */
|
|
198
|
-
const PRIORITY = Object.fromEntries(["secret", "iban", "payment_card", "us_ssn", "uk_national_insurance", "ie_pps", "email", "date_of_birth", "phone", "ip_address", "term", "person_name", "special_category"].map((k, i) => [k, i]));
|
|
329
|
+
const PRIORITY = Object.fromEntries(["secret", "iban", "payment_card", "us_ssn", "uk_national_insurance", "ie_pps", "us_itin", "ca_sin", "fr_nir", "es_dni", "it_fiscal_code", "nl_bsn", "pl_pesel", "de_tax_id", "passport", "vat_number", "bank_account", "email", "date_of_birth", "phone", "ip_address", "term", "person_name", "special_category"].map((k, i) => [k, i]));
|
|
199
330
|
const escapeRegExp = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
200
331
|
/** Terms past this are ignored, so a pasted list cannot make every screen slow. */
|
|
201
332
|
export const MAX_SCREEN_TERMS = 500;
|
|
@@ -327,6 +458,8 @@ export function readScreenPolicy(raw) {
|
|
|
327
458
|
},
|
|
328
459
|
};
|
|
329
460
|
}
|
|
461
|
+
/** Labels that start with a proper name, so they keep their capitals in a sentence. */
|
|
462
|
+
const KEEP_CASE = new Set(["ca_sin", "fr_nir", "it_fiscal_code", "nl_bsn", "pl_pesel", "de_tax_id"]);
|
|
330
463
|
const plural = (n, label) => `${n} ${label.toLowerCase()}${n === 1 ? "" : "s"}`;
|
|
331
464
|
/** "2 email addresses and 1 IBAN", for a reason or an approval's title. */
|
|
332
465
|
export function describeCounts(counts) {
|
|
@@ -349,6 +482,10 @@ export function describeCounts(counts) {
|
|
|
349
482
|
return `${n} date${n === 1 ? "" : "s"} of birth`;
|
|
350
483
|
if (k === "ie_pps")
|
|
351
484
|
return `${n} Irish PPS number${n === 1 ? "" : "s"}`;
|
|
485
|
+
if (k === "es_dni")
|
|
486
|
+
return `${n} Spanish ${n === 1 ? "DNI or NIE" : "DNIs or NIEs"}`;
|
|
487
|
+
if (KEEP_CASE.has(k))
|
|
488
|
+
return `${n} ${label}${n === 1 ? "" : "s"}`;
|
|
352
489
|
return /^[A-Z]{2,}/.test(label) ? `${n} ${label}${n === 1 ? "" : "s"}` : plural(n, label);
|
|
353
490
|
});
|
|
354
491
|
if (parts.length <= 1)
|
package/dist/released.d.ts
CHANGED
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
* **Add the version here when you publish it, not before.** An entry is a
|
|
44
44
|
* claim that `npm install @deliverd/sdk@x` works today.
|
|
45
45
|
*/
|
|
46
|
-
export declare const PUBLISHED_TO_NPM: readonly ["0.1.0", "0.2.0", "0.3.0", "0.4.0", "0.5.0", "0.6.0", "0.6.1", "0.6.2", "0.7.0", "0.7.1", "0.8.0", "0.8.1", "0.8.2", "0.9.0", "0.10.0", "0.11.0", "0.11.1", "0.12.0", "0.13.0", "0.14.0", "0.15.0", "0.16.0", "0.17.0", "0.18.0", "0.19.0", "0.20.0", "0.21.0", "0.22.0", "0.23.0", "0.24.0", "0.24.1", "0.25.0", "0.25.1", "0.26.0", "0.27.0", "0.28.0", "0.29.0", "0.30.0", "0.31.0", "0.32.0", "0.33.0", "0.34.0", "0.35.0", "0.36.0", "0.37.0"];
|
|
46
|
+
export declare const PUBLISHED_TO_NPM: readonly ["0.1.0", "0.2.0", "0.3.0", "0.4.0", "0.5.0", "0.6.0", "0.6.1", "0.6.2", "0.7.0", "0.7.1", "0.8.0", "0.8.1", "0.8.2", "0.9.0", "0.10.0", "0.11.0", "0.11.1", "0.12.0", "0.13.0", "0.14.0", "0.15.0", "0.16.0", "0.17.0", "0.18.0", "0.19.0", "0.20.0", "0.21.0", "0.22.0", "0.23.0", "0.24.0", "0.24.1", "0.25.0", "0.25.1", "0.26.0", "0.27.0", "0.28.0", "0.29.0", "0.30.0", "0.31.0", "0.32.0", "0.33.0", "0.34.0", "0.35.0", "0.36.0", "0.37.0", "0.38.0", "0.39.0"];
|
|
47
47
|
/**
|
|
48
48
|
* A fingerprint of what each *published* version recorded.
|
|
49
49
|
*
|
package/dist/released.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"released.d.ts","sourceRoot":"","sources":["../src/released.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"released.d.ts","sourceRoot":"","sources":["../src/released.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,gBAAgB,mdAgDnB,CAAC;AAEX;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA6HzC,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CA49vCtD,CAAC"}
|