@intentic/sandbox-contract 1.322.0 → 1.324.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/dist/contracts/agent.contract.d.ts +109 -6
- package/dist/contracts/agent.contract.d.ts.map +1 -1
- package/dist/contracts/agent.contract.js +13 -3
- package/dist/contracts/agent.contract.js.map +1 -1
- package/dist/contracts/agents.contract.d.ts +124 -0
- package/dist/contracts/agents.contract.d.ts.map +1 -1
- package/dist/contracts/approvals.contract.d.ts +31 -0
- package/dist/contracts/approvals.contract.d.ts.map +1 -1
- package/dist/contracts/approvals.contract.js +2 -2
- package/dist/contracts/approvals.contract.js.map +1 -1
- package/dist/contracts/capabilities.contract.d.ts +2 -0
- package/dist/contracts/capabilities.contract.d.ts.map +1 -1
- package/dist/contracts/loops.contract.d.ts +2 -0
- package/dist/contracts/loops.contract.d.ts.map +1 -1
- package/dist/contracts/needs.contract.d.ts +4 -0
- package/dist/contracts/needs.contract.d.ts.map +1 -1
- package/dist/contracts/privacy.contract.d.ts +187 -0
- package/dist/contracts/privacy.contract.d.ts.map +1 -0
- package/dist/contracts/privacy.contract.js +76 -0
- package/dist/contracts/privacy.contract.js.map +1 -0
- package/dist/contracts/runner.contract.d.ts +167 -122
- package/dist/contracts/runner.contract.d.ts.map +1 -1
- package/dist/contracts/sessions.contract.d.ts +11 -0
- package/dist/contracts/sessions.contract.d.ts.map +1 -1
- package/dist/contracts/settings.contract.d.ts +74 -0
- package/dist/contracts/settings.contract.d.ts.map +1 -1
- package/dist/contracts/system.contract.d.ts +90 -32
- package/dist/contracts/system.contract.d.ts.map +1 -1
- package/dist/contracts/system.contract.js +11 -1
- package/dist/contracts/system.contract.js.map +1 -1
- package/dist/contracts/usage.contract.d.ts +1 -0
- package/dist/contracts/usage.contract.d.ts.map +1 -1
- package/dist/contracts/workflows.contract.d.ts +3 -0
- package/dist/contracts/workflows.contract.d.ts.map +1 -1
- package/dist/events/agent-events.d.ts +53 -1
- package/dist/events/agent-events.d.ts.map +1 -1
- package/dist/events/agent-events.js +6 -0
- package/dist/events/agent-events.js.map +1 -1
- package/dist/events/agent-ui.d.ts +33 -0
- package/dist/events/agent-ui.d.ts.map +1 -0
- package/dist/events/agent-ui.js +24 -0
- package/dist/events/agent-ui.js.map +1 -0
- package/dist/events/requests.d.ts +3 -0
- package/dist/events/requests.d.ts.map +1 -1
- package/dist/events/requests.js +4 -0
- package/dist/events/requests.js.map +1 -1
- package/dist/events/resume.d.ts +1 -0
- package/dist/events/resume.d.ts.map +1 -1
- package/dist/events/resume.js +7 -1
- package/dist/events/resume.js.map +1 -1
- package/dist/events/sandbox-notice.d.ts +2 -0
- package/dist/events/sandbox-notice.d.ts.map +1 -1
- package/dist/events/sandbox-notice.js +1 -1
- package/dist/events/sandbox-notice.js.map +1 -1
- package/dist/events/system-events.d.ts +15 -0
- package/dist/events/system-events.d.ts.map +1 -1
- package/dist/events/system-events.js +1 -0
- package/dist/events/system-events.js.map +1 -1
- package/dist/events/transcript.d.ts +70 -0
- package/dist/events/transcript.d.ts.map +1 -1
- package/dist/events/transcript.js +44 -14
- package/dist/events/transcript.js.map +1 -1
- package/dist/front/generated/browser-wire.d.ts +4 -0
- package/dist/front/generated/browser-wire.d.ts.map +1 -1
- package/dist/index.d.ts +640 -38
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/models/agent-runtimes.d.ts +1 -0
- package/dist/models/agent-runtimes.d.ts.map +1 -1
- package/dist/models/agent-runtimes.js +6 -0
- package/dist/models/agent-runtimes.js.map +1 -1
- package/dist/policy/request-status.d.ts.map +1 -1
- package/dist/policy/request-status.js +16 -7
- package/dist/policy/request-status.js.map +1 -1
- package/dist/policy/turned-away.d.ts.map +1 -1
- package/dist/policy/turned-away.js +1 -0
- package/dist/policy/turned-away.js.map +1 -1
- package/dist/protocol/raw-routes.d.ts +12 -0
- package/dist/protocol/raw-routes.d.ts.map +1 -1
- package/dist/protocol/raw-routes.js +3 -0
- package/dist/protocol/raw-routes.js.map +1 -1
- package/dist/schemas/agent.d.ts +97 -0
- package/dist/schemas/agent.d.ts.map +1 -1
- package/dist/schemas/agent.js +20 -2
- package/dist/schemas/agent.js.map +1 -1
- package/dist/schemas/agents.d.ts +18 -0
- package/dist/schemas/agents.d.ts.map +1 -1
- package/dist/schemas/agents.js +9 -2
- package/dist/schemas/agents.js.map +1 -1
- package/dist/schemas/approvals.d.ts +102 -0
- package/dist/schemas/approvals.d.ts.map +1 -1
- package/dist/schemas/approvals.js +45 -4
- package/dist/schemas/approvals.js.map +1 -1
- package/dist/schemas/automations.d.ts +6 -0
- package/dist/schemas/automations.d.ts.map +1 -1
- package/dist/schemas/capabilities.d.ts +2 -0
- package/dist/schemas/capabilities.d.ts.map +1 -1
- package/dist/schemas/capabilities.js +10 -1
- package/dist/schemas/capabilities.js.map +1 -1
- package/dist/schemas/git/git.d.ts.map +1 -1
- package/dist/schemas/git/git.js.map +1 -1
- package/dist/schemas/logs.d.ts +1 -0
- package/dist/schemas/logs.d.ts.map +1 -1
- package/dist/schemas/logs.js +4 -0
- package/dist/schemas/logs.js.map +1 -1
- package/dist/schemas/loops.d.ts +3 -0
- package/dist/schemas/loops.d.ts.map +1 -1
- package/dist/schemas/loops.js +1 -1
- package/dist/schemas/loops.js.map +1 -1
- package/dist/schemas/needs.d.ts +6 -0
- package/dist/schemas/needs.d.ts.map +1 -1
- package/dist/schemas/needs.js +13 -3
- package/dist/schemas/needs.js.map +1 -1
- package/dist/schemas/platform-link.d.ts +50 -0
- package/dist/schemas/platform-link.d.ts.map +1 -0
- package/dist/schemas/platform-link.js +19 -0
- package/dist/schemas/platform-link.js.map +1 -0
- package/dist/schemas/privacy.d.ts +277 -0
- package/dist/schemas/privacy.d.ts.map +1 -0
- package/dist/schemas/privacy.js +127 -0
- package/dist/schemas/privacy.js.map +1 -0
- package/dist/schemas/providers/plan-limits.d.ts +8 -0
- package/dist/schemas/providers/plan-limits.d.ts.map +1 -1
- package/dist/schemas/providers/plan-limits.js +25 -4
- package/dist/schemas/providers/plan-limits.js.map +1 -1
- package/dist/schemas/providers/usage.d.ts +4 -0
- package/dist/schemas/providers/usage.d.ts.map +1 -1
- package/dist/schemas/providers/usage.js +5 -2
- package/dist/schemas/providers/usage.js.map +1 -1
- package/dist/schemas/push.d.ts +1 -0
- package/dist/schemas/push.d.ts.map +1 -1
- package/dist/schemas/push.js +4 -0
- package/dist/schemas/push.js.map +1 -1
- package/dist/schemas/settings.d.ts +80 -0
- package/dist/schemas/settings.d.ts.map +1 -1
- package/dist/schemas/settings.js +14 -3
- package/dist/schemas/settings.js.map +1 -1
- package/dist/schemas/system.d.ts +17 -0
- package/dist/schemas/system.d.ts.map +1 -1
- package/dist/schemas/system.js +2 -1
- package/dist/schemas/system.js.map +1 -1
- package/dist/schemas/updates.d.ts +30 -0
- package/dist/schemas/updates.d.ts.map +1 -1
- package/dist/schemas/updates.js +37 -0
- package/dist/schemas/updates.js.map +1 -1
- package/dist/schemas/workflows.d.ts +5 -0
- package/dist/schemas/workflows.d.ts.map +1 -1
- package/dist/state/definition.d.ts +10 -0
- package/dist/state/definition.d.ts.map +1 -1
- package/dist/state/history-state.d.ts.map +1 -1
- package/dist/state/history-state.js +1 -0
- package/dist/state/history-state.js.map +1 -1
- package/dist/state/runtime-state.d.ts +3 -0
- package/dist/state/runtime-state.d.ts.map +1 -1
- package/dist/state/runtime-state.js +1 -0
- package/dist/state/runtime-state.js.map +1 -1
- package/dist/state/workspace-state.d.ts +17 -1
- package/dist/state/workspace-state.d.ts.map +1 -1
- package/dist/state/workspace-state.js +20 -1
- package/dist/state/workspace-state.js.map +1 -1
- package/dist/text/transcript-fold.d.ts.map +1 -1
- package/dist/text/transcript-fold.js +9 -0
- package/dist/text/transcript-fold.js.map +1 -1
- package/package.json +5 -5
- package/src/contracts/agent.contract.ts +16 -3
- package/src/contracts/approvals.contract.ts +2 -2
- package/src/contracts/privacy.contract.ts +95 -0
- package/src/contracts/system.contract.ts +14 -1
- package/src/events/agent-events.ts +11 -0
- package/src/events/agent-ui.ts +40 -0
- package/src/events/requests.ts +6 -0
- package/src/events/resume.test.ts +13 -0
- package/src/events/resume.ts +11 -2
- package/src/events/sandbox-notice.ts +1 -1
- package/src/events/system-events.ts +2 -0
- package/src/events/transcript.ts +84 -20
- package/src/front/generated/browser-wire.json +27 -0
- package/src/front/generated/browser-wire.ts +1 -1
- package/src/index.ts +6 -0
- package/src/models/agent-catalog.test.ts +1 -0
- package/src/models/agent-runtimes.ts +17 -0
- package/src/models/capability-ledger.test.ts +3 -0
- package/src/policy/request-status.ts +19 -9
- package/src/policy/turned-away.ts +2 -0
- package/src/protocol/raw-routes.ts +9 -0
- package/src/schemas/agent.ts +36 -4
- package/src/schemas/agents.ts +17 -4
- package/src/schemas/approvals.ts +59 -4
- package/src/schemas/automations.ts +4 -4
- package/src/schemas/capabilities.ts +15 -2
- package/src/schemas/ci.ts +1 -1
- package/src/schemas/git/git.ts +1 -0
- package/src/schemas/logs.ts +6 -0
- package/src/schemas/loops.ts +2 -1
- package/src/schemas/needs.ts +18 -3
- package/src/schemas/platform-link.ts +42 -0
- package/src/schemas/privacy.ts +204 -0
- package/src/schemas/providers/plan-limits.ts +38 -5
- package/src/schemas/providers/usage.ts +13 -2
- package/src/schemas/push.ts +7 -0
- package/src/schemas/settings-history.ts +3 -3
- package/src/schemas/settings.test.ts +5 -5
- package/src/schemas/settings.ts +47 -19
- package/src/schemas/system.ts +6 -1
- package/src/schemas/updates.ts +71 -0
- package/src/state/history-state.ts +3 -0
- package/src/state/runtime-state.ts +4 -0
- package/src/state/workspace-state.test.ts +8 -2
- package/src/state/workspace-state.ts +32 -2
- package/src/text/transcript-fold.test.ts +15 -0
- package/src/text/transcript-fold.ts +10 -0
|
@@ -74,6 +74,7 @@ export declare const capabilitiesContract: {
|
|
|
74
74
|
ref: import("zod").ZodOptional<import("zod").ZodString>;
|
|
75
75
|
path: import("zod").ZodOptional<import("zod").ZodString>;
|
|
76
76
|
token: import("zod").ZodOptional<import("zod").ZodString>;
|
|
77
|
+
commit: import("zod").ZodOptional<import("zod").ZodString>;
|
|
77
78
|
}, import("zod/v4/core").$strip>;
|
|
78
79
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
79
80
|
id: import("zod").ZodString;
|
|
@@ -413,6 +414,7 @@ export declare const capabilitiesContract: {
|
|
|
413
414
|
ref: import("zod").ZodOptional<import("zod").ZodString>;
|
|
414
415
|
path: import("zod").ZodOptional<import("zod").ZodString>;
|
|
415
416
|
token: import("zod").ZodOptional<import("zod").ZodString>;
|
|
417
|
+
commit: import("zod").ZodOptional<import("zod").ZodString>;
|
|
416
418
|
}, import("zod/v4/core").$strip>;
|
|
417
419
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
418
420
|
id: import("zod").ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities.contract.d.ts","sourceRoot":"","sources":["../../src/contracts/capabilities.contract.ts"],"names":[],"mappings":"AA0BA,eAAO,MAAM,oBAAoB;IAC7B,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IASJ,GAAG
|
|
1
|
+
{"version":3,"file":"capabilities.contract.d.ts","sourceRoot":"","sources":["../../src/contracts/capabilities.contract.ts"],"names":[],"mappings":"AA0BA,eAAO,MAAM,oBAAoB;IAC7B,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IASJ,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAWH,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAaL,MAAM;;;;IAWN,MAAM;;;;;IAUN,MAAM;;;;;;IAWN,SAAS;;;;;;IAST,MAAM;;;;;;;;;;;;;IAUN,UAAU;;;;;;;IAYV,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAUX,IAAI;;;;;;;;;;;;;;;IAUJ,OAAO;;;;;IAWP,KAAK;;;;;IAWL,GAAG;;;;;;CAYN,CAAC"}
|
|
@@ -59,6 +59,7 @@ export declare const loopsContract: {
|
|
|
59
59
|
running: "running";
|
|
60
60
|
stalled: "stalled";
|
|
61
61
|
stopped: "stopped";
|
|
62
|
+
unpriced: "unpriced";
|
|
62
63
|
}>;
|
|
63
64
|
startedAt: import("zod").ZodNumber;
|
|
64
65
|
endedAt: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
@@ -189,6 +190,7 @@ export declare const loopsContract: {
|
|
|
189
190
|
running: "running";
|
|
190
191
|
stalled: "stalled";
|
|
191
192
|
stopped: "stopped";
|
|
193
|
+
unpriced: "unpriced";
|
|
192
194
|
}>;
|
|
193
195
|
startedAt: import("zod").ZodNumber;
|
|
194
196
|
endedAt: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loops.contract.d.ts","sourceRoot":"","sources":["../../src/contracts/loops.contract.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,aAAa;IAEtB,IAAI
|
|
1
|
+
{"version":3,"file":"loops.contract.d.ts","sourceRoot":"","sources":["../../src/contracts/loops.contract.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,aAAa;IAEtB,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAUJ,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAWL,IAAI;;;;;IAYJ,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAUP,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAWV,YAAY;;;;;CAUf,CAAC"}
|
|
@@ -508,6 +508,8 @@ export declare const needsContract: {
|
|
|
508
508
|
web: "web";
|
|
509
509
|
}>>;
|
|
510
510
|
installs: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
511
|
+
secrets: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodString>>;
|
|
512
|
+
everything: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
511
513
|
by: import("zod").ZodOptional<import("zod").ZodString>;
|
|
512
514
|
updatedAt: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
513
515
|
releases: import("zod").ZodArray<import("zod").ZodObject<{
|
|
@@ -521,9 +523,11 @@ export declare const needsContract: {
|
|
|
521
523
|
conversationId: import("zod").ZodString;
|
|
522
524
|
kind: import("zod").ZodEnum<{
|
|
523
525
|
capability: "capability";
|
|
526
|
+
everything: "everything";
|
|
524
527
|
folder: "folder";
|
|
525
528
|
install: "install";
|
|
526
529
|
release: "release";
|
|
530
|
+
secret: "secret";
|
|
527
531
|
shelf: "shelf";
|
|
528
532
|
}>;
|
|
529
533
|
what: import("zod").ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"needs.contract.d.ts","sourceRoot":"","sources":["../../src/contracts/needs.contract.ts"],"names":[],"mappings":"AAsBA,eAAO,MAAM,aAAa;IACtB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAYH,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAQJ,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IASR,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IASJ,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAUN,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAYb,MAAM
|
|
1
|
+
{"version":3,"file":"needs.contract.d.ts","sourceRoot":"","sources":["../../src/contracts/needs.contract.ts"],"names":[],"mappings":"AAsBA,eAAO,MAAM,aAAa;IACtB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAYH,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAQJ,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IASR,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IASJ,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAUN,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAYb,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;IASN,WAAW;;;;;;;;;;;;;;;CAUd,CAAC"}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const privacyContract: {
|
|
3
|
+
status: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, z.ZodObject<{
|
|
4
|
+
policy: z.ZodObject<{
|
|
5
|
+
mode: z.ZodDefault<z.ZodEnum<{
|
|
6
|
+
off: "off";
|
|
7
|
+
on: "on";
|
|
8
|
+
watch: "watch";
|
|
9
|
+
}>>;
|
|
10
|
+
trusted: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
11
|
+
classes: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
12
|
+
address: "address";
|
|
13
|
+
"bank-account": "bank-account";
|
|
14
|
+
email: "email";
|
|
15
|
+
"identity-document": "identity-document";
|
|
16
|
+
"national-id": "national-id";
|
|
17
|
+
"payment-card": "payment-card";
|
|
18
|
+
"person-name": "person-name";
|
|
19
|
+
phone: "phone";
|
|
20
|
+
"tax-id": "tax-id";
|
|
21
|
+
}>>>;
|
|
22
|
+
images: z.ZodDefault<z.ZodEnum<{
|
|
23
|
+
allow: "allow";
|
|
24
|
+
mask: "mask";
|
|
25
|
+
}>>;
|
|
26
|
+
names: z.ZodDefault<z.ZodEnum<{
|
|
27
|
+
dictionary: "dictionary";
|
|
28
|
+
model: "model";
|
|
29
|
+
}>>;
|
|
30
|
+
allow: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
31
|
+
conversations: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
32
|
+
conversationId: z.ZodString;
|
|
33
|
+
provider: z.ZodString;
|
|
34
|
+
}, z.core.$strip>>>;
|
|
35
|
+
}, z.core.$strip>;
|
|
36
|
+
known: z.ZodNumber;
|
|
37
|
+
tokens: z.ZodNumber;
|
|
38
|
+
readers: z.ZodObject<{
|
|
39
|
+
ocr: z.ZodBoolean;
|
|
40
|
+
model: z.ZodBoolean;
|
|
41
|
+
}, z.core.$strip>;
|
|
42
|
+
providers: z.ZodArray<z.ZodObject<{
|
|
43
|
+
id: z.ZodString;
|
|
44
|
+
label: z.ZodString;
|
|
45
|
+
shieldable: z.ZodBoolean;
|
|
46
|
+
local: z.ZodBoolean;
|
|
47
|
+
}, z.core.$strip>>;
|
|
48
|
+
}, z.core.$strip>, Record<never, never>, import("../protocol/route-meta.js").RouteMeta & Record<never, never>>;
|
|
49
|
+
setPolicy: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
50
|
+
mode: z.ZodDefault<z.ZodEnum<{
|
|
51
|
+
off: "off";
|
|
52
|
+
on: "on";
|
|
53
|
+
watch: "watch";
|
|
54
|
+
}>>;
|
|
55
|
+
trusted: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
56
|
+
classes: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
57
|
+
address: "address";
|
|
58
|
+
"bank-account": "bank-account";
|
|
59
|
+
email: "email";
|
|
60
|
+
"identity-document": "identity-document";
|
|
61
|
+
"national-id": "national-id";
|
|
62
|
+
"payment-card": "payment-card";
|
|
63
|
+
"person-name": "person-name";
|
|
64
|
+
phone: "phone";
|
|
65
|
+
"tax-id": "tax-id";
|
|
66
|
+
}>>>;
|
|
67
|
+
images: z.ZodDefault<z.ZodEnum<{
|
|
68
|
+
allow: "allow";
|
|
69
|
+
mask: "mask";
|
|
70
|
+
}>>;
|
|
71
|
+
names: z.ZodDefault<z.ZodEnum<{
|
|
72
|
+
dictionary: "dictionary";
|
|
73
|
+
model: "model";
|
|
74
|
+
}>>;
|
|
75
|
+
allow: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
76
|
+
conversations: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
77
|
+
conversationId: z.ZodString;
|
|
78
|
+
provider: z.ZodString;
|
|
79
|
+
}, z.core.$strip>>>;
|
|
80
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
81
|
+
ok: z.ZodLiteral<true>;
|
|
82
|
+
}, z.core.$strip>, Record<never, never>, import("../protocol/route-meta.js").RouteMeta & Record<never, never>>;
|
|
83
|
+
log: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, z.ZodArray<z.ZodObject<{
|
|
84
|
+
at: z.ZodString;
|
|
85
|
+
conversationId: z.ZodOptional<z.ZodString>;
|
|
86
|
+
provider: z.ZodString;
|
|
87
|
+
trusted: z.ZodBoolean;
|
|
88
|
+
action: z.ZodEnum<{
|
|
89
|
+
masked: "masked";
|
|
90
|
+
passed: "passed";
|
|
91
|
+
refused: "refused";
|
|
92
|
+
watched: "watched";
|
|
93
|
+
}>;
|
|
94
|
+
counts: z.ZodRecord<z.ZodEnum<{
|
|
95
|
+
address: "address";
|
|
96
|
+
"bank-account": "bank-account";
|
|
97
|
+
email: "email";
|
|
98
|
+
"identity-document": "identity-document";
|
|
99
|
+
"national-id": "national-id";
|
|
100
|
+
"payment-card": "payment-card";
|
|
101
|
+
"person-name": "person-name";
|
|
102
|
+
phone: "phone";
|
|
103
|
+
"tax-id": "tax-id";
|
|
104
|
+
}> & z.core.$partial, z.ZodNumber>;
|
|
105
|
+
images: z.ZodNumber;
|
|
106
|
+
documents: z.ZodNumber;
|
|
107
|
+
protocol: z.ZodString;
|
|
108
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
109
|
+
}, z.core.$strip>>, Record<never, never>, import("../protocol/route-meta.js").RouteMeta & Record<never, never>>;
|
|
110
|
+
dictionary: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
111
|
+
query: z.ZodOptional<z.ZodString>;
|
|
112
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
113
|
+
lists: z.ZodArray<z.ZodObject<{
|
|
114
|
+
id: z.ZodString;
|
|
115
|
+
kind: z.ZodEnum<{
|
|
116
|
+
ambiguous: "ambiguous";
|
|
117
|
+
"first-name": "first-name";
|
|
118
|
+
never: "never";
|
|
119
|
+
surname: "surname";
|
|
120
|
+
title: "title";
|
|
121
|
+
}>;
|
|
122
|
+
languages: z.ZodArray<z.ZodEnum<{
|
|
123
|
+
en: "en";
|
|
124
|
+
pl: "pl";
|
|
125
|
+
}>>;
|
|
126
|
+
count: z.ZodNumber;
|
|
127
|
+
matching: z.ZodEnum<{
|
|
128
|
+
"as-written": "as-written";
|
|
129
|
+
inflected: "inflected";
|
|
130
|
+
}>;
|
|
131
|
+
source: z.ZodString;
|
|
132
|
+
url: z.ZodOptional<z.ZodString>;
|
|
133
|
+
license: z.ZodOptional<z.ZodString>;
|
|
134
|
+
}, z.core.$strip>>;
|
|
135
|
+
totals: z.ZodObject<{
|
|
136
|
+
firstNames: z.ZodNumber;
|
|
137
|
+
surnames: z.ZodNumber;
|
|
138
|
+
}, z.core.$strip>;
|
|
139
|
+
matches: z.ZodArray<z.ZodObject<{
|
|
140
|
+
word: z.ZodString;
|
|
141
|
+
lists: z.ZodArray<z.ZodString>;
|
|
142
|
+
}, z.core.$strip>>;
|
|
143
|
+
lookup: z.ZodOptional<z.ZodObject<{
|
|
144
|
+
text: z.ZodString;
|
|
145
|
+
found: z.ZodBoolean;
|
|
146
|
+
words: z.ZodArray<z.ZodObject<{
|
|
147
|
+
word: z.ZodString;
|
|
148
|
+
firstName: z.ZodBoolean;
|
|
149
|
+
surname: z.ZodBoolean;
|
|
150
|
+
surnameForm: z.ZodBoolean;
|
|
151
|
+
ambiguous: z.ZodBoolean;
|
|
152
|
+
never: z.ZodBoolean;
|
|
153
|
+
}, z.core.$strip>>;
|
|
154
|
+
}, z.core.$strip>>;
|
|
155
|
+
}, z.core.$strip>, Record<never, never>, import("../protocol/route-meta.js").RouteMeta & Record<never, never>>;
|
|
156
|
+
sources: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, z.ZodArray<z.ZodObject<{
|
|
157
|
+
source: z.ZodString;
|
|
158
|
+
count: z.ZodNumber;
|
|
159
|
+
at: z.ZodString;
|
|
160
|
+
}, z.core.$strip>>, Record<never, never>, import("../protocol/route-meta.js").RouteMeta & Record<never, never>>;
|
|
161
|
+
learn: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
162
|
+
source: z.ZodString;
|
|
163
|
+
values: z.ZodArray<z.ZodObject<{
|
|
164
|
+
value: z.ZodString;
|
|
165
|
+
class: z.ZodEnum<{
|
|
166
|
+
address: "address";
|
|
167
|
+
"bank-account": "bank-account";
|
|
168
|
+
email: "email";
|
|
169
|
+
"identity-document": "identity-document";
|
|
170
|
+
"national-id": "national-id";
|
|
171
|
+
"payment-card": "payment-card";
|
|
172
|
+
"person-name": "person-name";
|
|
173
|
+
phone: "phone";
|
|
174
|
+
"tax-id": "tax-id";
|
|
175
|
+
}>;
|
|
176
|
+
}, z.core.$strip>>;
|
|
177
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
178
|
+
added: z.ZodNumber;
|
|
179
|
+
known: z.ZodNumber;
|
|
180
|
+
}, z.core.$strip>, Record<never, never>, import("../protocol/route-meta.js").RouteMeta & Record<never, never>>;
|
|
181
|
+
forget: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
182
|
+
source: z.ZodString;
|
|
183
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
184
|
+
forgotten: z.ZodNumber;
|
|
185
|
+
}, z.core.$strip>, Record<never, never>, import("../protocol/route-meta.js").RouteMeta & Record<never, never>>;
|
|
186
|
+
};
|
|
187
|
+
//# sourceMappingURL=privacy.contract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"privacy.contract.d.ts","sourceRoot":"","sources":["../../src/contracts/privacy.contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAgBxB,eAAO,MAAM,eAAe;IACxB,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAUN,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAWT,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;IASH,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAWV,OAAO;;;;;IASP,KAAK;;;;;;;;;;;;;;;;;;;;IAgBL,MAAM;;;;;CAWT,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { procedure } from "../protocol/route-meta.js";
|
|
3
|
+
import { PRIVACY_KNOWN_BATCH_MAX, PrivacyDictionarySchema, PrivacyKnownSourceSchema, PrivacyKnownValueSchema, PrivacyLedgerEntrySchema, PrivacyShieldPolicySchema, PrivacyShieldStatusSchema, } from "../schemas/privacy.js";
|
|
4
|
+
import { OkSchema } from "../schemas/shared.js";
|
|
5
|
+
export const privacyContract = {
|
|
6
|
+
status: procedure
|
|
7
|
+
.route({
|
|
8
|
+
method: "GET",
|
|
9
|
+
path: "/privacy/shield",
|
|
10
|
+
summary: "The privacy shield and what it covers",
|
|
11
|
+
description: "Whether personal data is kept from untrusted model providers, which providers are trusted, which local readers are installed, and how many values it has learned.",
|
|
12
|
+
})
|
|
13
|
+
.meta({ agent: true })
|
|
14
|
+
.output(PrivacyShieldStatusSchema),
|
|
15
|
+
setPolicy: procedure
|
|
16
|
+
.route({
|
|
17
|
+
method: "POST",
|
|
18
|
+
path: "/privacy/shield",
|
|
19
|
+
summary: "Change the privacy shield",
|
|
20
|
+
description: "Replaces the policy whole. Turning the shield on puts every turn that starts from then on, whose runtime can be shielded, behind the gateway, and refuses the turns that cannot be shielded on an untrusted provider; a turn already running keeps the route it started with. A change to what is masked or trusted holds from the next model request.",
|
|
21
|
+
})
|
|
22
|
+
.meta({ floor: "owner", control: "never", panel: false })
|
|
23
|
+
.input(PrivacyShieldPolicySchema)
|
|
24
|
+
.output(OkSchema),
|
|
25
|
+
log: procedure
|
|
26
|
+
.route({
|
|
27
|
+
method: "GET",
|
|
28
|
+
path: "/privacy/log",
|
|
29
|
+
summary: "What the privacy shield did lately",
|
|
30
|
+
description: "Each model request the gateway handled: which provider, whether it was trusted, and how many of each kind of personal data it found. Never the values.",
|
|
31
|
+
})
|
|
32
|
+
.output(z.array(PrivacyLedgerEntrySchema)),
|
|
33
|
+
dictionary: procedure
|
|
34
|
+
.route({
|
|
35
|
+
method: "GET",
|
|
36
|
+
path: "/privacy/dictionary",
|
|
37
|
+
summary: "The name lists the shield finds names by",
|
|
38
|
+
description: "Every list the dictionary holds (first names, surnames, words that are names only beside other evidence, titles), how many words each has and where they come from. With a query, what the dictionary makes of it as a name, and for one word the listed words starting with it.",
|
|
39
|
+
})
|
|
40
|
+
.meta({ agent: true })
|
|
41
|
+
.input(z.object({ query: z.string().max(100).optional().describe("A word, the start of one, or a full name.") }))
|
|
42
|
+
.output(PrivacyDictionarySchema),
|
|
43
|
+
sources: procedure
|
|
44
|
+
.route({
|
|
45
|
+
method: "GET",
|
|
46
|
+
path: "/privacy/known",
|
|
47
|
+
summary: "The datasets taught to the shield",
|
|
48
|
+
description: "Each source values were taught from, and how many. The values themselves are never sent back.",
|
|
49
|
+
})
|
|
50
|
+
.meta({ agent: true })
|
|
51
|
+
.output(z.array(PrivacyKnownSourceSchema)),
|
|
52
|
+
learn: procedure
|
|
53
|
+
.route({
|
|
54
|
+
method: "POST",
|
|
55
|
+
path: "/privacy/known",
|
|
56
|
+
summary: "Teach the shield a dataset's values",
|
|
57
|
+
description: "Each value is masked wherever it appears from now on, in every form it is written, whether or not the detectors would have found it. Teaching only ever masks more, so the agent may do it.",
|
|
58
|
+
})
|
|
59
|
+
.meta({ agent: true })
|
|
60
|
+
.input(z.object({
|
|
61
|
+
source: z.string().min(1).max(200).describe("Where the values came from: a file and its column, a table."),
|
|
62
|
+
values: z.array(PrivacyKnownValueSchema).max(PRIVACY_KNOWN_BATCH_MAX),
|
|
63
|
+
}))
|
|
64
|
+
.output(z.object({ added: z.number().int(), known: z.number().int() })),
|
|
65
|
+
forget: procedure
|
|
66
|
+
.route({
|
|
67
|
+
method: "POST",
|
|
68
|
+
path: "/privacy/known/forget",
|
|
69
|
+
summary: "Forget a taught dataset",
|
|
70
|
+
description: "Stops matching the values taught from one source. Tokens already given to them still resolve, so earlier conversations keep reading right.",
|
|
71
|
+
})
|
|
72
|
+
.meta({ floor: "owner", control: "never", panel: false })
|
|
73
|
+
.input(z.object({ source: z.string().min(1).max(200) }))
|
|
74
|
+
.output(z.object({ forgotten: z.number().int() })),
|
|
75
|
+
};
|
|
76
|
+
//# sourceMappingURL=privacy.contract.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"privacy.contract.js","sourceRoot":"","sources":["../../src/contracts/privacy.contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MA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