@fungi.computer/approvals 0.2.3 → 0.2.5
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 +84 -52
- package/dist/contract.d.ts +20 -0
- package/dist/contract.js +5 -0
- package/dist/index.d.ts +1 -1
- package/dist/ledger.d.ts +11 -45
- package/dist/ledger.js +41 -146
- package/docs/api/README.md +167 -164
- package/package.json +2 -2
package/docs/api/README.md
CHANGED
|
@@ -23,9 +23,9 @@ new ApprovalLedger(options): ApprovalLedger;
|
|
|
23
23
|
|
|
24
24
|
###### Parameters
|
|
25
25
|
|
|
26
|
-
| Parameter | Type
|
|
27
|
-
| --------- |
|
|
28
|
-
| `options` | `Readonly`\<\{ `owner`: `WatchdogSqliteOwner`; `home`: [`ApprovalHome`](#approvalhome); `now`: () => `number`; `persistIntent?`: (`record`) => `undefined`;
|
|
26
|
+
| Parameter | Type |
|
|
27
|
+
| --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
28
|
+
| `options` | `Readonly`\<\{ `owner`: `WatchdogSqliteOwner`; `home`: [`ApprovalHome`](#approvalhome); `now`: () => `number`; `persistIntent?`: (`record`) => `undefined`; \}\> |
|
|
29
29
|
|
|
30
30
|
###### Returns
|
|
31
31
|
|
|
@@ -61,6 +61,10 @@ submit(input, host): Promise<
|
|
|
61
61
|
recordId: string;
|
|
62
62
|
description: {
|
|
63
63
|
title: string;
|
|
64
|
+
app?: {
|
|
65
|
+
displayName: string;
|
|
66
|
+
operationLabel: string;
|
|
67
|
+
};
|
|
64
68
|
inputBytes: number;
|
|
65
69
|
inputSha256: string;
|
|
66
70
|
};
|
|
@@ -81,8 +85,9 @@ inline.
|
|
|
81
85
|
###### Returns
|
|
82
86
|
|
|
83
87
|
`Promise`\< \| \{ `kind`: `"pending_approval"`; `recordId`: `string`;
|
|
84
|
-
`description`: \{ `title`: `string`; `
|
|
85
|
-
`string`; \};
|
|
88
|
+
`description`: \{ `title`: `string`; `app?`: \{ `displayName`: `string`;
|
|
89
|
+
`operationLabel`: `string`; \}; `inputBytes`: `number`; `inputSha256`: `string`;
|
|
90
|
+
\}; \} \| [`ApprovalApplyResult`](#approvalapplyresult)\>
|
|
86
91
|
|
|
87
92
|
##### outcome()
|
|
88
93
|
|
|
@@ -93,6 +98,10 @@ outcome(record):
|
|
|
93
98
|
recordId: string;
|
|
94
99
|
description: {
|
|
95
100
|
title: string;
|
|
101
|
+
app?: {
|
|
102
|
+
displayName: string;
|
|
103
|
+
operationLabel: string;
|
|
104
|
+
};
|
|
96
105
|
inputBytes: number;
|
|
97
106
|
inputSha256: string;
|
|
98
107
|
};
|
|
@@ -104,38 +113,42 @@ A retried request's current outcome, without claiming any work.
|
|
|
104
113
|
|
|
105
114
|
###### Parameters
|
|
106
115
|
|
|
107
|
-
| Parameter
|
|
108
|
-
|
|
|
109
|
-
| `record`
|
|
110
|
-
| `record.recordId`
|
|
111
|
-
| `record.requester`
|
|
112
|
-
| `record.requester.principalId`
|
|
113
|
-
| `record.requester.agentId`
|
|
114
|
-
| `record.requester.sessionId`
|
|
115
|
-
| `record.requester.displayName`
|
|
116
|
-
| `record.module`
|
|
117
|
-
| `record.operation`
|
|
118
|
-
| `record.access`
|
|
119
|
-
| `record.description`
|
|
120
|
-
| `record.description.title`
|
|
121
|
-
| `record.description.
|
|
122
|
-
| `record.description.
|
|
123
|
-
| `record.
|
|
124
|
-
| `record.
|
|
125
|
-
| `record.
|
|
126
|
-
| `record.
|
|
127
|
-
| `record.
|
|
128
|
-
| `record.
|
|
129
|
-
| `record.
|
|
130
|
-
| `record.
|
|
131
|
-
| `record.
|
|
132
|
-
| `record.
|
|
133
|
-
| `record.
|
|
116
|
+
| Parameter | Type | Description |
|
|
117
|
+
| --------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------- |
|
|
118
|
+
| `record` | \{ `recordId`: `string`; `requester`: \{ `principalId`: `string`; `agentId`: `string` \| `null`; `sessionId`: `string` \| `null`; `displayName`: `string`; \}; `module`: `string`; `operation`: `string`; `access`: `"write"` \| `"external"`; `description`: \{ `title`: `string`; `app?`: \{ `displayName`: `string`; `operationLabel`: `string`; \}; `inputBytes`: `number`; `inputSha256`: `string`; \}; `evidence?`: readonly `object`[]; `authorityFence`: `string`; `reversibility`: `"reversible"` \| `"irreversible-external"`; `state`: \| `"pending"` \| `"expired"` \| `"denied"` \| `"requested"` \| `"approved"` \| `"claimed"` \| `"applied"` \| `"outcome_unknown"`; `by`: \| \{ `kind`: `"human"`; `memberId`: `string`; \} \| \{ `kind`: `"policy"`; \} \| `null`; `reason`: \| `"pending"` \| `"expired"` \| `"not-found"` \| `"not-eligible"` \| `"already-answered"` \| `"stale-revision"` \| `"declined"` \| `"fenced"` \| `"not-granted"` \| `"read-only"` \| `"in-flight"` \| `"outcome-unknown"` \| `"identity-conflict"` \| `null`; `denialNote?`: `string`; `requestedAt`: `number`; `expiresAt`: `number`; `updatedAt`: `number`; `revision`: `number`; \} | - |
|
|
119
|
+
| `record.recordId` | `string` | - |
|
|
120
|
+
| `record.requester` | \{ `principalId`: `string`; `agentId`: `string` \| `null`; `sessionId`: `string` \| `null`; `displayName`: `string`; \} | - |
|
|
121
|
+
| `record.requester.principalId` | `string` | - |
|
|
122
|
+
| `record.requester.agentId` | `string` \| `null` | - |
|
|
123
|
+
| `record.requester.sessionId` | `string` \| `null` | - |
|
|
124
|
+
| `record.requester.displayName` | `string` | - |
|
|
125
|
+
| `record.module` | `string` | - |
|
|
126
|
+
| `record.operation` | `string` | - |
|
|
127
|
+
| `record.access` | `"write"` \| `"external"` | - |
|
|
128
|
+
| `record.description` | \{ `title`: `string`; `app?`: \{ `displayName`: `string`; `operationLabel`: `string`; \}; `inputBytes`: `number`; `inputSha256`: `string`; \} | - |
|
|
129
|
+
| `record.description.title` | `string` | - |
|
|
130
|
+
| `record.description.app?` | \{ `displayName`: `string`; `operationLabel`: `string`; \} | Catalog-authored App copy, not identity or authorization. |
|
|
131
|
+
| `record.description.app.displayName` | `string` | - |
|
|
132
|
+
| `record.description.app.operationLabel` | `string` | - |
|
|
133
|
+
| `record.description.inputBytes` | `number` | - |
|
|
134
|
+
| `record.description.inputSha256` | `string` | - |
|
|
135
|
+
| `record.evidence?` | readonly `object`[] | - |
|
|
136
|
+
| `record.authorityFence` | `string` | - |
|
|
137
|
+
| `record.reversibility` | `"reversible"` \| `"irreversible-external"` | - |
|
|
138
|
+
| `record.state` | \| `"pending"` \| `"expired"` \| `"denied"` \| `"requested"` \| `"approved"` \| `"claimed"` \| `"applied"` \| `"outcome_unknown"` | - |
|
|
139
|
+
| `record.by` | \| \{ `kind`: `"human"`; `memberId`: `string`; \} \| \{ `kind`: `"policy"`; \} \| `null` | - |
|
|
140
|
+
| `record.reason` | \| `"pending"` \| `"expired"` \| `"not-found"` \| `"not-eligible"` \| `"already-answered"` \| `"stale-revision"` \| `"declined"` \| `"fenced"` \| `"not-granted"` \| `"read-only"` \| `"in-flight"` \| `"outcome-unknown"` \| `"identity-conflict"` \| `null` | - |
|
|
141
|
+
| `record.denialNote?` | `string` | - |
|
|
142
|
+
| `record.requestedAt` | `number` | - |
|
|
143
|
+
| `record.expiresAt` | `number` | - |
|
|
144
|
+
| `record.updatedAt` | `number` | - |
|
|
145
|
+
| `record.revision` | `number` | - |
|
|
134
146
|
|
|
135
147
|
###### Returns
|
|
136
148
|
|
|
137
149
|
\| \{ `kind`: `"pending_approval"`; `recordId`: `string`; `description`: \{
|
|
138
|
-
`title`: `string`; `
|
|
150
|
+
`title`: `string`; `app?`: \{ `displayName`: `string`; `operationLabel`:
|
|
151
|
+
`string`; \}; `inputBytes`: `number`; `inputSha256`: `string`; \}; \} \|
|
|
139
152
|
[`ApprovalApplyResult`](#approvalapplyresult)
|
|
140
153
|
|
|
141
154
|
##### request()
|
|
@@ -174,6 +187,10 @@ request(input, evidence?): Promise<
|
|
|
174
187
|
access: "write" | "external";
|
|
175
188
|
description: {
|
|
176
189
|
title: string;
|
|
190
|
+
app?: {
|
|
191
|
+
displayName: string;
|
|
192
|
+
operationLabel: string;
|
|
193
|
+
};
|
|
177
194
|
inputBytes: number;
|
|
178
195
|
inputSha256: string;
|
|
179
196
|
};
|
|
@@ -240,10 +257,11 @@ action; created says whether this call staged the record.
|
|
|
240
257
|
`recordId`: `string`; `requester`: \{ `principalId`: `string`; `agentId`:
|
|
241
258
|
`string` \| `null`; `sessionId`: `string` \| `null`; `displayName`: `string`;
|
|
242
259
|
\}; `module`: `string`; `operation`: `string`; `access`: `"write"` \|
|
|
243
|
-
`"external"`; `description`: \{ `title`: `string`; `
|
|
244
|
-
`
|
|
245
|
-
`string`; `
|
|
246
|
-
|
|
260
|
+
`"external"`; `description`: \{ `title`: `string`; `app?`: \{ `displayName`:
|
|
261
|
+
`string`; `operationLabel`: `string`; \}; `inputBytes`: `number`; `inputSha256`:
|
|
262
|
+
`string`; \}; `evidence?`: readonly `object`[]; `authorityFence`: `string`;
|
|
263
|
+
`reversibility`: `"reversible"` \| `"irreversible-external"`; `state`: \|
|
|
264
|
+
`"pending"` \| `"expired"` \| `"denied"` \| `"requested"` \| `"approved"` \|
|
|
247
265
|
`"claimed"` \| `"applied"` \| `"outcome_unknown"`; `by`: \| \{ `kind`:
|
|
248
266
|
`"human"`; `memberId`: `string`; \} \| \{ `kind`: `"policy"`; \} \| `null`;
|
|
249
267
|
`reason`: \| `"pending"` \| `"expired"` \| `"not-found"` \| `"not-eligible"` \|
|
|
@@ -289,6 +307,10 @@ answer(input, actor):
|
|
|
289
307
|
access: "write" | "external";
|
|
290
308
|
description: {
|
|
291
309
|
title: string;
|
|
310
|
+
app?: {
|
|
311
|
+
displayName: string;
|
|
312
|
+
operationLabel: string;
|
|
313
|
+
};
|
|
292
314
|
inputBytes: number;
|
|
293
315
|
inputSha256: string;
|
|
294
316
|
};
|
|
@@ -358,10 +380,11 @@ grants.
|
|
|
358
380
|
\{ `recordId`: `string`; `requester`: \{ `principalId`: `string`; `agentId`:
|
|
359
381
|
`string` \| `null`; `sessionId`: `string` \| `null`; `displayName`: `string`;
|
|
360
382
|
\}; `module`: `string`; `operation`: `string`; `access`: `"write"` \|
|
|
361
|
-
`"external"`; `description`: \{ `title`: `string`; `
|
|
362
|
-
`
|
|
363
|
-
`string`; `
|
|
364
|
-
|
|
383
|
+
`"external"`; `description`: \{ `title`: `string`; `app?`: \{ `displayName`:
|
|
384
|
+
`string`; `operationLabel`: `string`; \}; `inputBytes`: `number`; `inputSha256`:
|
|
385
|
+
`string`; \}; `evidence?`: readonly `object`[]; `authorityFence`: `string`;
|
|
386
|
+
`reversibility`: `"reversible"` \| `"irreversible-external"`; `state`: \|
|
|
387
|
+
`"pending"` \| `"expired"` \| `"denied"` \| `"requested"` \| `"approved"` \|
|
|
365
388
|
`"claimed"` \| `"applied"` \| `"outcome_unknown"`; `by`: \| \{ `kind`:
|
|
366
389
|
`"human"`; `memberId`: `string`; \} \| \{ `kind`: `"policy"`; \} \| `null`;
|
|
367
390
|
`reason`: \| `"pending"` \| `"expired"` \| `"not-found"` \| `"not-eligible"` \|
|
|
@@ -452,6 +475,36 @@ choice.
|
|
|
452
475
|
|
|
453
476
|
`boolean`
|
|
454
477
|
|
|
478
|
+
##### withdraw()
|
|
479
|
+
|
|
480
|
+
```ts
|
|
481
|
+
withdraw(recordId): void;
|
|
482
|
+
```
|
|
483
|
+
|
|
484
|
+
Withdraw an unclaimed call; a claimed effect must retain its outcome record.
|
|
485
|
+
|
|
486
|
+
###### Parameters
|
|
487
|
+
|
|
488
|
+
| Parameter | Type |
|
|
489
|
+
| ---------- | -------- |
|
|
490
|
+
| `recordId` | `string` |
|
|
491
|
+
|
|
492
|
+
###### Returns
|
|
493
|
+
|
|
494
|
+
`void`
|
|
495
|
+
|
|
496
|
+
##### withdrawWaiting()
|
|
497
|
+
|
|
498
|
+
```ts
|
|
499
|
+
withdrawWaiting(): number;
|
|
500
|
+
```
|
|
501
|
+
|
|
502
|
+
Native boot only: a prior owner's waiting calls no longer exist.
|
|
503
|
+
|
|
504
|
+
###### Returns
|
|
505
|
+
|
|
506
|
+
`number`
|
|
507
|
+
|
|
455
508
|
##### expirePending()
|
|
456
509
|
|
|
457
510
|
```ts
|
|
@@ -507,67 +560,14 @@ Host-private display recovery; never exposed by the member-bound capability.
|
|
|
507
560
|
|
|
508
561
|
`Json`
|
|
509
562
|
|
|
510
|
-
##### pendingHandoffs()
|
|
511
|
-
|
|
512
|
-
```ts
|
|
513
|
-
pendingHandoffs(): readonly string[];
|
|
514
|
-
```
|
|
515
|
-
|
|
516
|
-
Bounded, home-local terminal notices for the native owner's work loop.
|
|
517
|
-
|
|
518
|
-
###### Returns
|
|
519
|
-
|
|
520
|
-
readonly `string`[]
|
|
521
|
-
|
|
522
|
-
##### handoff()
|
|
523
|
-
|
|
524
|
-
```ts
|
|
525
|
-
handoff(recordId, send): Promise<ApprovalHandoffResult>;
|
|
526
|
-
```
|
|
527
|
-
|
|
528
|
-
Retry only the ordinary message, with the same recipient-side idempotency key. A
|
|
529
|
-
send rejection leaves the intent pending; it never reopens effect execution. The
|
|
530
|
-
host must return the real Session acceptance, not a success-shaped placeholder.
|
|
531
|
-
|
|
532
|
-
###### Parameters
|
|
533
|
-
|
|
534
|
-
| Parameter | Type |
|
|
535
|
-
| ---------- | --------------------------------------------------------------------- |
|
|
536
|
-
| `recordId` | `string` |
|
|
537
|
-
| `send` | (`notice`) => `Promise`\<`Readonly`\<\{ `commandId`: `string`; \}\>\> |
|
|
538
|
-
|
|
539
|
-
###### Returns
|
|
540
|
-
|
|
541
|
-
`Promise`\<[`ApprovalHandoffResult`](#approvalhandoffresult)\>
|
|
542
|
-
|
|
543
563
|
##### apply()
|
|
544
564
|
|
|
545
565
|
```ts
|
|
546
566
|
apply(recordId, host): Promise<ApprovalApplyResult>;
|
|
547
567
|
```
|
|
548
568
|
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
###### Parameters
|
|
553
|
-
|
|
554
|
-
| Parameter | Type |
|
|
555
|
-
| ---------- | ----------------------------------------- |
|
|
556
|
-
| `recordId` | `string` |
|
|
557
|
-
| `host` | [`ApprovalApplyHost`](#approvalapplyhost) |
|
|
558
|
-
|
|
559
|
-
###### Returns
|
|
560
|
-
|
|
561
|
-
`Promise`\<[`ApprovalApplyResult`](#approvalapplyresult)\>
|
|
562
|
-
|
|
563
|
-
##### applyInline()
|
|
564
|
-
|
|
565
|
-
```ts
|
|
566
|
-
applyInline(recordId, host): Promise<ApprovalApplyResult>;
|
|
567
|
-
```
|
|
568
|
-
|
|
569
|
-
Apply the caller's own just-staged policy approval inside its live tool call;
|
|
570
|
-
that call's result is the outcome, so no later message is owed.
|
|
569
|
+
Claim and apply one approved record exactly once. A waiting call applies its own
|
|
570
|
+
record; the native owner's work loop applies the rest.
|
|
571
571
|
|
|
572
572
|
###### Parameters
|
|
573
573
|
|
|
@@ -609,6 +609,10 @@ get(recordId):
|
|
|
609
609
|
access: "write" | "external";
|
|
610
610
|
description: {
|
|
611
611
|
title: string;
|
|
612
|
+
app?: {
|
|
613
|
+
displayName: string;
|
|
614
|
+
operationLabel: string;
|
|
615
|
+
};
|
|
612
616
|
inputBytes: number;
|
|
613
617
|
inputSha256: string;
|
|
614
618
|
};
|
|
@@ -667,10 +671,11 @@ Read a record from this home only; the maintained decoder owns stored JSON.
|
|
|
667
671
|
\| \{ `recordId`: `string`; `requester`: \{ `principalId`: `string`; `agentId`:
|
|
668
672
|
`string` \| `null`; `sessionId`: `string` \| `null`; `displayName`: `string`;
|
|
669
673
|
\}; `module`: `string`; `operation`: `string`; `access`: `"write"` \|
|
|
670
|
-
`"external"`; `description`: \{ `title`: `string`; `
|
|
671
|
-
`
|
|
672
|
-
`string`; `
|
|
673
|
-
|
|
674
|
+
`"external"`; `description`: \{ `title`: `string`; `app?`: \{ `displayName`:
|
|
675
|
+
`string`; `operationLabel`: `string`; \}; `inputBytes`: `number`; `inputSha256`:
|
|
676
|
+
`string`; \}; `evidence?`: readonly `object`[]; `authorityFence`: `string`;
|
|
677
|
+
`reversibility`: `"reversible"` \| `"irreversible-external"`; `state`: \|
|
|
678
|
+
`"pending"` \| `"expired"` \| `"denied"` \| `"requested"` \| `"approved"` \|
|
|
674
679
|
`"claimed"` \| `"applied"` \| `"outcome_unknown"`; `by`: \| \{ `kind`:
|
|
675
680
|
`"human"`; `memberId`: `string`; \} \| \{ `kind`: `"policy"`; \} \| `null`;
|
|
676
681
|
`reason`: \| `"pending"` \| `"expired"` \| `"not-found"` \| `"not-eligible"` \|
|
|
@@ -790,6 +795,10 @@ type Approvals = Readonly<{
|
|
|
790
795
|
access: "write" | "external";
|
|
791
796
|
description: {
|
|
792
797
|
title: string;
|
|
798
|
+
app?: {
|
|
799
|
+
displayName: string;
|
|
800
|
+
operationLabel: string;
|
|
801
|
+
};
|
|
793
802
|
inputBytes: number;
|
|
794
803
|
inputSha256: string;
|
|
795
804
|
};
|
|
@@ -887,11 +896,13 @@ type ApprovalRequest = Readonly<{
|
|
|
887
896
|
requester: ApprovalRecord["requester"];
|
|
888
897
|
module: string;
|
|
889
898
|
operation: string;
|
|
899
|
+
app?: ApprovalRecord["description"]["app"];
|
|
890
900
|
access: ApprovalRecord["access"];
|
|
891
901
|
reversibility: ApprovalRecord["reversibility"];
|
|
892
902
|
authorityFence: string;
|
|
893
903
|
idempotencyKey: string;
|
|
894
904
|
inputJson: string;
|
|
905
|
+
expiresAt?: number;
|
|
895
906
|
requireHumanApproval?: boolean;
|
|
896
907
|
prefixPolicyApproved?: boolean;
|
|
897
908
|
}>;
|
|
@@ -1037,42 +1048,7 @@ type ApprovalApplyResult =
|
|
|
1037
1048
|
| ApprovalRefusal;
|
|
1038
1049
|
```
|
|
1039
1050
|
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
---
|
|
1043
|
-
|
|
1044
|
-
### ApprovalResultNotice
|
|
1045
|
-
|
|
1046
|
-
```ts
|
|
1047
|
-
type ApprovalResultNotice = Readonly<{
|
|
1048
|
-
deliveryId: string;
|
|
1049
|
-
record: ApprovalRecord;
|
|
1050
|
-
result: ApprovalApplyResult;
|
|
1051
|
-
}>;
|
|
1052
|
-
```
|
|
1053
|
-
|
|
1054
|
-
Deferred result cargo; stored request input is not a field on this port.
|
|
1055
|
-
|
|
1056
|
-
---
|
|
1057
|
-
|
|
1058
|
-
### ApprovalHandoffResult
|
|
1059
|
-
|
|
1060
|
-
```ts
|
|
1061
|
-
type ApprovalHandoffResult =
|
|
1062
|
-
| Readonly<{
|
|
1063
|
-
kind: "delivered";
|
|
1064
|
-
commandId: string;
|
|
1065
|
-
}>
|
|
1066
|
-
| Readonly<{
|
|
1067
|
-
kind: "not-required";
|
|
1068
|
-
}>
|
|
1069
|
-
| Readonly<{
|
|
1070
|
-
kind: "undeliverable";
|
|
1071
|
-
}>
|
|
1072
|
-
| ApprovalRefusal;
|
|
1073
|
-
```
|
|
1074
|
-
|
|
1075
|
-
Ordinary new-message receipt, explicit no-delivery result, or typed refusal.
|
|
1051
|
+
The result of applying one approved record.
|
|
1076
1052
|
|
|
1077
1053
|
## Variables
|
|
1078
1054
|
|
|
@@ -1131,6 +1107,12 @@ Stable requester identity supplied by the host, never by tool arguments.
|
|
|
1131
1107
|
```ts
|
|
1132
1108
|
const ApprovalDescriptionSchema: Struct<{
|
|
1133
1109
|
title: String;
|
|
1110
|
+
app: optionalKey<
|
|
1111
|
+
Struct<{
|
|
1112
|
+
displayName: String;
|
|
1113
|
+
operationLabel: String;
|
|
1114
|
+
}>
|
|
1115
|
+
>;
|
|
1134
1116
|
inputBytes: Int;
|
|
1135
1117
|
inputSha256: String;
|
|
1136
1118
|
}>;
|
|
@@ -1148,6 +1130,12 @@ const PendingApprovalSchema: Struct<{
|
|
|
1148
1130
|
recordId: String;
|
|
1149
1131
|
description: Struct<{
|
|
1150
1132
|
title: String;
|
|
1133
|
+
app: optionalKey<
|
|
1134
|
+
Struct<{
|
|
1135
|
+
displayName: String;
|
|
1136
|
+
operationLabel: String;
|
|
1137
|
+
}>
|
|
1138
|
+
>;
|
|
1151
1139
|
inputBytes: Int;
|
|
1152
1140
|
inputSha256: String;
|
|
1153
1141
|
}>;
|
|
@@ -1279,6 +1267,12 @@ const ApprovalRecordSchema: Struct<{
|
|
|
1279
1267
|
access: Literals<readonly ["write", "external"]>;
|
|
1280
1268
|
description: Struct<{
|
|
1281
1269
|
title: String;
|
|
1270
|
+
app: optionalKey<
|
|
1271
|
+
Struct<{
|
|
1272
|
+
displayName: String;
|
|
1273
|
+
operationLabel: String;
|
|
1274
|
+
}>
|
|
1275
|
+
>;
|
|
1282
1276
|
inputBytes: Int;
|
|
1283
1277
|
inputSha256: String;
|
|
1284
1278
|
}>;
|
|
@@ -1368,6 +1362,12 @@ const ApprovalViewSchema: Struct<{
|
|
|
1368
1362
|
access: Literals<readonly ["write", "external"]>;
|
|
1369
1363
|
description: Struct<{
|
|
1370
1364
|
title: String;
|
|
1365
|
+
app: optionalKey<
|
|
1366
|
+
Struct<{
|
|
1367
|
+
displayName: String;
|
|
1368
|
+
operationLabel: String;
|
|
1369
|
+
}>
|
|
1370
|
+
>;
|
|
1371
1371
|
inputBytes: Int;
|
|
1372
1372
|
inputSha256: String;
|
|
1373
1373
|
}>;
|
|
@@ -1565,34 +1565,37 @@ Host-supplied human identity; the bounded reason remains quoted user text.
|
|
|
1565
1565
|
|
|
1566
1566
|
#### Parameters
|
|
1567
1567
|
|
|
1568
|
-
| Parameter
|
|
1569
|
-
|
|
|
1570
|
-
| `record`
|
|
1571
|
-
| `record.recordId`
|
|
1572
|
-
| `record.requester`
|
|
1573
|
-
| `record.requester.principalId`
|
|
1574
|
-
| `record.requester.agentId`
|
|
1575
|
-
| `record.requester.sessionId`
|
|
1576
|
-
| `record.requester.displayName`
|
|
1577
|
-
| `record.module`
|
|
1578
|
-
| `record.operation`
|
|
1579
|
-
| `record.access`
|
|
1580
|
-
| `record.description`
|
|
1581
|
-
| `record.description.title`
|
|
1582
|
-
| `record.description.
|
|
1583
|
-
| `record.description.
|
|
1584
|
-
| `record.
|
|
1585
|
-
| `record.
|
|
1586
|
-
| `record.
|
|
1587
|
-
| `record.
|
|
1588
|
-
| `record.
|
|
1589
|
-
| `record.
|
|
1590
|
-
| `record.
|
|
1591
|
-
| `record.
|
|
1592
|
-
| `record.
|
|
1593
|
-
| `record.
|
|
1594
|
-
| `record.
|
|
1595
|
-
| `
|
|
1568
|
+
| Parameter | Type | Description |
|
|
1569
|
+
| --------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------- |
|
|
1570
|
+
| `record` | \{ `recordId`: `string`; `requester`: \{ `principalId`: `string`; `agentId`: `string` \| `null`; `sessionId`: `string` \| `null`; `displayName`: `string`; \}; `module`: `string`; `operation`: `string`; `access`: `"write"` \| `"external"`; `description`: \{ `title`: `string`; `app?`: \{ `displayName`: `string`; `operationLabel`: `string`; \}; `inputBytes`: `number`; `inputSha256`: `string`; \}; `evidence?`: readonly `object`[]; `authorityFence`: `string`; `reversibility`: `"reversible"` \| `"irreversible-external"`; `state`: \| `"pending"` \| `"expired"` \| `"denied"` \| `"requested"` \| `"approved"` \| `"claimed"` \| `"applied"` \| `"outcome_unknown"`; `by`: \| \{ `kind`: `"human"`; `memberId`: `string`; \} \| \{ `kind`: `"policy"`; \} \| `null`; `reason`: \| `"pending"` \| `"expired"` \| `"not-found"` \| `"not-eligible"` \| `"already-answered"` \| `"stale-revision"` \| `"declined"` \| `"fenced"` \| `"not-granted"` \| `"read-only"` \| `"in-flight"` \| `"outcome-unknown"` \| `"identity-conflict"` \| `null`; `denialNote?`: `string`; `requestedAt`: `number`; `expiresAt`: `number`; `updatedAt`: `number`; `revision`: `number`; \} | - |
|
|
1571
|
+
| `record.recordId` | `string` | - |
|
|
1572
|
+
| `record.requester` | \{ `principalId`: `string`; `agentId`: `string` \| `null`; `sessionId`: `string` \| `null`; `displayName`: `string`; \} | - |
|
|
1573
|
+
| `record.requester.principalId` | `string` | - |
|
|
1574
|
+
| `record.requester.agentId` | `string` \| `null` | - |
|
|
1575
|
+
| `record.requester.sessionId` | `string` \| `null` | - |
|
|
1576
|
+
| `record.requester.displayName` | `string` | - |
|
|
1577
|
+
| `record.module` | `string` | - |
|
|
1578
|
+
| `record.operation` | `string` | - |
|
|
1579
|
+
| `record.access` | `"write"` \| `"external"` | - |
|
|
1580
|
+
| `record.description` | \{ `title`: `string`; `app?`: \{ `displayName`: `string`; `operationLabel`: `string`; \}; `inputBytes`: `number`; `inputSha256`: `string`; \} | - |
|
|
1581
|
+
| `record.description.title` | `string` | - |
|
|
1582
|
+
| `record.description.app?` | \{ `displayName`: `string`; `operationLabel`: `string`; \} | Catalog-authored App copy, not identity or authorization. |
|
|
1583
|
+
| `record.description.app.displayName` | `string` | - |
|
|
1584
|
+
| `record.description.app.operationLabel` | `string` | - |
|
|
1585
|
+
| `record.description.inputBytes` | `number` | - |
|
|
1586
|
+
| `record.description.inputSha256` | `string` | - |
|
|
1587
|
+
| `record.evidence?` | readonly `object`[] | - |
|
|
1588
|
+
| `record.authorityFence` | `string` | - |
|
|
1589
|
+
| `record.reversibility` | `"reversible"` \| `"irreversible-external"` | - |
|
|
1590
|
+
| `record.state` | \| `"pending"` \| `"expired"` \| `"denied"` \| `"requested"` \| `"approved"` \| `"claimed"` \| `"applied"` \| `"outcome_unknown"` | - |
|
|
1591
|
+
| `record.by` | \| \{ `kind`: `"human"`; `memberId`: `string`; \} \| \{ `kind`: `"policy"`; \} \| `null` | - |
|
|
1592
|
+
| `record.reason` | \| `"pending"` \| `"expired"` \| `"not-found"` \| `"not-eligible"` \| `"already-answered"` \| `"stale-revision"` \| `"declined"` \| `"fenced"` \| `"not-granted"` \| `"read-only"` \| `"in-flight"` \| `"outcome-unknown"` \| `"identity-conflict"` \| `null` | - |
|
|
1593
|
+
| `record.denialNote?` | `string` | - |
|
|
1594
|
+
| `record.requestedAt` | `number` | - |
|
|
1595
|
+
| `record.expiresAt` | `number` | - |
|
|
1596
|
+
| `record.updatedAt` | `number` | - |
|
|
1597
|
+
| `record.revision` | `number` | - |
|
|
1598
|
+
| `person` | `string` | - |
|
|
1596
1599
|
|
|
1597
1600
|
#### Returns
|
|
1598
1601
|
|