@openvtc/trust-tasks 0.20.7 → 0.21.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/CHANGELOG.md +320 -0
- package/dist/_shared/components.d.ts +299 -2
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/auth/passkey/enroll/invite/0.2/payload.d.ts +456 -0
- package/dist/auth/passkey/enroll/invite/0.2/payload.d.ts.map +1 -0
- package/dist/auth/passkey/enroll/invite/0.2/payload.js +248 -0
- package/dist/auth/passkey/enroll/invite/0.2/payload.js.map +1 -0
- package/dist/auth/passkey/enroll/redeem/finish/0.1/payload.d.ts +728 -0
- package/dist/auth/passkey/enroll/redeem/finish/0.1/payload.d.ts.map +1 -0
- package/dist/auth/passkey/enroll/redeem/finish/0.1/payload.js +430 -0
- package/dist/auth/passkey/enroll/redeem/finish/0.1/payload.js.map +1 -0
- package/dist/auth/passkey/enroll/redeem/start/0.1/payload.d.ts +1043 -0
- package/dist/auth/passkey/enroll/redeem/start/0.1/payload.d.ts.map +1 -0
- package/dist/auth/passkey/enroll/redeem/start/0.1/payload.js +628 -0
- package/dist/auth/passkey/enroll/redeem/start/0.1/payload.js.map +1 -0
- package/dist/auth/passkey/revoke/finish/0.2/payload.d.ts +533 -0
- package/dist/auth/passkey/revoke/finish/0.2/payload.d.ts.map +1 -0
- package/dist/auth/passkey/revoke/finish/0.2/payload.js +315 -0
- package/dist/auth/passkey/revoke/finish/0.2/payload.js.map +1 -0
- package/dist/auth/passkey/revoke/start/0.2/payload.d.ts +511 -0
- package/dist/auth/passkey/revoke/start/0.2/payload.d.ts.map +1 -0
- package/dist/auth/passkey/revoke/start/0.2/payload.js +297 -0
- package/dist/auth/passkey/revoke/start/0.2/payload.js.map +1 -0
- package/dist/auth/step-up/approve-request/0.3/payload.d.ts +613 -0
- package/dist/auth/step-up/approve-request/0.3/payload.d.ts.map +1 -0
- package/dist/auth/step-up/approve-request/0.3/payload.js +345 -0
- package/dist/auth/step-up/approve-request/0.3/payload.js.map +1 -0
- package/dist/auth/step-up/approve-response/0.4/payload.d.ts +887 -0
- package/dist/auth/step-up/approve-response/0.4/payload.d.ts.map +1 -0
- package/dist/auth/step-up/approve-response/0.4/payload.js +504 -0
- package/dist/auth/step-up/approve-response/0.4/payload.js.map +1 -0
- package/dist/auth/step-up/approve-response/0.5/payload.d.ts +887 -0
- package/dist/auth/step-up/approve-response/0.5/payload.d.ts.map +1 -0
- package/dist/auth/step-up/approve-response/0.5/payload.js +504 -0
- package/dist/auth/step-up/approve-response/0.5/payload.js.map +1 -0
- package/dist/backup/abort/0.1/payload.d.ts +262 -0
- package/dist/backup/abort/0.1/payload.d.ts.map +1 -0
- package/dist/backup/abort/0.1/payload.js +146 -0
- package/dist/backup/abort/0.1/payload.js.map +1 -0
- package/dist/backup/complete-export/0.1/payload.d.ts +262 -0
- package/dist/backup/complete-export/0.1/payload.d.ts.map +1 -0
- package/dist/backup/complete-export/0.1/payload.js +146 -0
- package/dist/backup/complete-export/0.1/payload.js.map +1 -0
- package/dist/backup/finalize-import/0.1/payload.d.ts +395 -0
- package/dist/backup/finalize-import/0.1/payload.d.ts.map +1 -0
- package/dist/backup/finalize-import/0.1/payload.js +209 -0
- package/dist/backup/finalize-import/0.1/payload.js.map +1 -0
- package/dist/backup/get-chunk/0.1/payload.d.ts +461 -0
- package/dist/backup/get-chunk/0.1/payload.d.ts.map +1 -0
- package/dist/backup/get-chunk/0.1/payload.js +250 -0
- package/dist/backup/get-chunk/0.1/payload.js.map +1 -0
- package/dist/backup/initiate-export/0.1/payload.d.ts +896 -0
- package/dist/backup/initiate-export/0.1/payload.d.ts.map +1 -0
- package/dist/backup/initiate-export/0.1/payload.js +507 -0
- package/dist/backup/initiate-export/0.1/payload.js.map +1 -0
- package/dist/backup/initiate-import/0.1/payload.d.ts +888 -0
- package/dist/backup/initiate-import/0.1/payload.d.ts.map +1 -0
- package/dist/backup/initiate-import/0.1/payload.js +504 -0
- package/dist/backup/initiate-import/0.1/payload.js.map +1 -0
- package/dist/backup/put-chunk/0.1/payload.d.ts +495 -0
- package/dist/backup/put-chunk/0.1/payload.d.ts.map +1 -0
- package/dist/backup/put-chunk/0.1/payload.js +265 -0
- package/dist/backup/put-chunk/0.1/payload.js.map +1 -0
- package/dist/device/list/0.1/payload.d.ts +4 -4
- package/dist/device/list/0.1/payload.d.ts.map +1 -1
- package/dist/device/list/0.1/payload.js +4 -2
- package/dist/device/list/0.1/payload.js.map +1 -1
- package/dist/device/list/0.2/payload.d.ts +4 -4
- package/dist/device/list/0.2/payload.d.ts.map +1 -1
- package/dist/device/list/0.2/payload.js +4 -2
- package/dist/device/list/0.2/payload.js.map +1 -1
- package/dist/device/register/0.1/payload.d.ts +4 -4
- package/dist/device/register/0.1/payload.d.ts.map +1 -1
- package/dist/device/register/0.1/payload.js +4 -2
- package/dist/device/register/0.1/payload.js.map +1 -1
- package/dist/device/register/0.2/payload.d.ts +4 -4
- package/dist/device/register/0.2/payload.d.ts.map +1 -1
- package/dist/device/register/0.2/payload.js +4 -2
- package/dist/device/register/0.2/payload.js.map +1 -1
- package/dist/git-ns/_shared/0.4/git-ns.d.ts +16 -0
- package/dist/git-ns/_shared/0.4/git-ns.d.ts.map +1 -0
- package/dist/git-ns/_shared/0.4/git-ns.js +6 -0
- package/dist/git-ns/_shared/0.4/git-ns.js.map +1 -0
- package/dist/git-ns/account/link-status/0.1/payload.d.ts +2 -2
- package/dist/git-ns/account/link-status/0.1/payload.js +2 -2
- package/dist/git-ns/account/link-status/0.1/payload.js.map +1 -1
- package/dist/git-ns/account/unlink/0.1/payload.d.ts +411 -0
- package/dist/git-ns/account/unlink/0.1/payload.d.ts.map +1 -0
- package/dist/git-ns/account/unlink/0.1/payload.js +228 -0
- package/dist/git-ns/account/unlink/0.1/payload.js.map +1 -0
- package/dist/git-ns/bridge/event/0.3/payload.d.ts +1682 -0
- package/dist/git-ns/bridge/event/0.3/payload.d.ts.map +1 -0
- package/dist/git-ns/bridge/event/0.3/payload.js +971 -0
- package/dist/git-ns/bridge/event/0.3/payload.js.map +1 -0
- package/dist/git-ns/bridge/job/0.4/payload.d.ts +1068 -0
- package/dist/git-ns/bridge/job/0.4/payload.d.ts.map +1 -0
- package/dist/git-ns/bridge/job/0.4/payload.js +573 -0
- package/dist/git-ns/bridge/job/0.4/payload.js.map +1 -0
- package/dist/git-ns/drift/resolve/0.3/payload.d.ts +1072 -0
- package/dist/git-ns/drift/resolve/0.3/payload.d.ts.map +1 -0
- package/dist/git-ns/drift/resolve/0.3/payload.js +634 -0
- package/dist/git-ns/drift/resolve/0.3/payload.js.map +1 -0
- package/dist/git-ns/namespace/reseat/0.3/payload.d.ts +515 -0
- package/dist/git-ns/namespace/reseat/0.3/payload.d.ts.map +1 -0
- package/dist/git-ns/namespace/reseat/0.3/payload.js +296 -0
- package/dist/git-ns/namespace/reseat/0.3/payload.js.map +1 -0
- package/dist/git-ns/repo/create/0.3/payload.d.ts +1101 -0
- package/dist/git-ns/repo/create/0.3/payload.d.ts.map +1 -0
- package/dist/git-ns/repo/create/0.3/payload.js +646 -0
- package/dist/git-ns/repo/create/0.3/payload.js.map +1 -0
- package/dist/git-ns/right/break-glass/0.1/payload.d.ts +685 -0
- package/dist/git-ns/right/break-glass/0.1/payload.d.ts.map +1 -0
- package/dist/git-ns/right/break-glass/0.1/payload.js +397 -0
- package/dist/git-ns/right/break-glass/0.1/payload.js.map +1 -0
- package/dist/git-ns/right/break-glass-notice/0.1/payload.d.ts +384 -0
- package/dist/git-ns/right/break-glass-notice/0.1/payload.d.ts.map +1 -0
- package/dist/git-ns/right/break-glass-notice/0.1/payload.js +216 -0
- package/dist/git-ns/right/break-glass-notice/0.1/payload.js.map +1 -0
- package/dist/git-ns/right/grant/0.3/payload.d.ts +678 -0
- package/dist/git-ns/right/grant/0.3/payload.d.ts.map +1 -0
- package/dist/git-ns/right/grant/0.3/payload.js +383 -0
- package/dist/git-ns/right/grant/0.3/payload.js.map +1 -0
- package/dist/git-ns/right/ratify/0.1/payload.d.ts +702 -0
- package/dist/git-ns/right/ratify/0.1/payload.d.ts.map +1 -0
- package/dist/git-ns/right/ratify/0.1/payload.js +404 -0
- package/dist/git-ns/right/ratify/0.1/payload.js.map +1 -0
- package/dist/git-ns/right/revoke/0.3/payload.d.ts +664 -0
- package/dist/git-ns/right/revoke/0.3/payload.d.ts.map +1 -0
- package/dist/git-ns/right/revoke/0.3/payload.js +378 -0
- package/dist/git-ns/right/revoke/0.3/payload.js.map +1 -0
- package/dist/git-ns/roles/reproject/0.1/payload.d.ts +325 -0
- package/dist/git-ns/roles/reproject/0.1/payload.d.ts.map +1 -0
- package/dist/git-ns/roles/reproject/0.1/payload.js +176 -0
- package/dist/git-ns/roles/reproject/0.1/payload.js.map +1 -0
- package/dist/git-ns/view/0.1/payload.d.ts +2 -2
- package/dist/git-ns/view/0.1/payload.js +2 -2
- package/dist/git-ns/view/0.1/payload.js.map +1 -1
- package/dist/git-ns/view/0.2/payload.d.ts +2 -2
- package/dist/git-ns/view/0.2/payload.js +2 -2
- package/dist/git-ns/view/0.2/payload.js.map +1 -1
- package/dist/git-ns/view/0.3/payload.d.ts +2 -2
- package/dist/git-ns/view/0.3/payload.js +2 -2
- package/dist/git-ns/view/0.3/payload.js.map +1 -1
- package/dist/git-ns/view/0.4/payload.d.ts +1696 -0
- package/dist/git-ns/view/0.4/payload.d.ts.map +1 -0
- package/dist/git-ns/view/0.4/payload.js +1012 -0
- package/dist/git-ns/view/0.4/payload.js.map +1 -0
- package/dist/index.d.ts +39 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +39 -0
- package/dist/index.js.map +1 -1
- package/dist/messaging/message/status/0.1/payload.d.ts +372 -0
- package/dist/messaging/message/status/0.1/payload.d.ts.map +1 -0
- package/dist/messaging/message/status/0.1/payload.js +214 -0
- package/dist/messaging/message/status/0.1/payload.js.map +1 -0
- package/dist/vta/_shared/0.3/did-key-roles.d.ts +16 -0
- package/dist/vta/_shared/0.3/did-key-roles.d.ts.map +1 -0
- package/dist/vta/_shared/0.3/did-key-roles.js +6 -0
- package/dist/vta/_shared/0.3/did-key-roles.js.map +1 -0
- package/dist/vta/attestation/mnemonic-export/1.0/payload.d.ts +326 -0
- package/dist/vta/attestation/mnemonic-export/1.0/payload.d.ts.map +1 -0
- package/dist/vta/attestation/mnemonic-export/1.0/payload.js +175 -0
- package/dist/vta/attestation/mnemonic-export/1.0/payload.js.map +1 -0
- package/dist/vta/webvh/dids/keys/add/1.0/payload.d.ts +1914 -0
- package/dist/vta/webvh/dids/keys/add/1.0/payload.d.ts.map +1 -0
- package/dist/vta/webvh/dids/keys/add/1.0/payload.js +1128 -0
- package/dist/vta/webvh/dids/keys/add/1.0/payload.js.map +1 -0
- package/dist/vta/webvh/dids/keys/list/1.0/payload.d.ts +1603 -0
- package/dist/vta/webvh/dids/keys/list/1.0/payload.d.ts.map +1 -0
- package/dist/vta/webvh/dids/keys/list/1.0/payload.js +942 -0
- package/dist/vta/webvh/dids/keys/list/1.0/payload.js.map +1 -0
- package/dist/vta/webvh/dids/keys/retire/1.0/payload.d.ts +1914 -0
- package/dist/vta/webvh/dids/keys/retire/1.0/payload.d.ts.map +1 -0
- package/dist/vta/webvh/dids/keys/retire/1.0/payload.js +1123 -0
- package/dist/vta/webvh/dids/keys/retire/1.0/payload.js.map +1 -0
- package/dist/vta/webvh/dids/keys/revoke/1.0/payload.d.ts +2021 -0
- package/dist/vta/webvh/dids/keys/revoke/1.0/payload.d.ts.map +1 -0
- package/dist/vta/webvh/dids/keys/revoke/1.0/payload.js +1168 -0
- package/dist/vta/webvh/dids/keys/revoke/1.0/payload.js.map +1 -0
- package/dist/vta/webvh/dids/rotate-keys/2.0/payload.d.ts +1992 -0
- package/dist/vta/webvh/dids/rotate-keys/2.0/payload.d.ts.map +1 -0
- package/dist/vta/webvh/dids/rotate-keys/2.0/payload.js +1151 -0
- package/dist/vta/webvh/dids/rotate-keys/2.0/payload.js.map +1 -0
- package/dist/vta/webvh/dids/update/2.0/payload.d.ts +1062 -0
- package/dist/vta/webvh/dids/update/2.0/payload.d.ts.map +1 -0
- package/dist/vta/webvh/dids/update/2.0/payload.js +616 -0
- package/dist/vta/webvh/dids/update/2.0/payload.js.map +1 -0
- package/dist/vtc/credentials/reissue/0.1/payload.d.ts +502 -0
- package/dist/vtc/credentials/reissue/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/credentials/reissue/0.1/payload.js +282 -0
- package/dist/vtc/credentials/reissue/0.1/payload.js.map +1 -0
- package/dist/vtc/members/personhood/challenge/0.1/payload.d.ts +2 -2
- package/dist/vtc/members/personhood/challenge/0.1/payload.js +2 -2
- package/dist/vtc/members/personhood/challenge/0.1/payload.js.map +1 -1
- package/dist/vtc/vetting/vetters/profile/0.1/payload.d.ts +2 -2
- package/dist/vtc/vetting/vetters/profile/0.1/payload.js +2 -2
- package/dist/vtc/vetting/vetters/profile/0.1/payload.js.map +1 -1
- package/dist/vtc/vetting/vetters/resend/0.1/payload.d.ts +2 -2
- package/dist/vtc/vetting/vetters/resend/0.1/payload.js +2 -2
- package/dist/vtc/vetting/vetters/resend/0.1/payload.js.map +1 -1
- package/package.json +1 -1
- package/src/_shared/components.ts +313 -2
- package/src/auth/passkey/enroll/invite/0.2/payload.ts +325 -0
- package/src/auth/passkey/enroll/redeem/finish/0.1/payload.ts +499 -0
- package/src/auth/passkey/enroll/redeem/start/0.1/payload.ts +700 -0
- package/src/auth/passkey/revoke/finish/0.2/payload.ts +379 -0
- package/src/auth/passkey/revoke/start/0.2/payload.ts +349 -0
- package/src/auth/step-up/approve-request/0.3/payload.ts +421 -0
- package/src/auth/step-up/approve-response/0.4/payload.ts +593 -0
- package/src/auth/step-up/approve-response/0.5/payload.ts +593 -0
- package/src/backup/abort/0.1/payload.ts +191 -0
- package/src/backup/complete-export/0.1/payload.ts +191 -0
- package/src/backup/finalize-import/0.1/payload.ts +279 -0
- package/src/backup/get-chunk/0.1/payload.ts +308 -0
- package/src/backup/initiate-export/0.1/payload.ts +564 -0
- package/src/backup/initiate-import/0.1/payload.ts +561 -0
- package/src/backup/put-chunk/0.1/payload.ts +331 -0
- package/src/device/list/0.1/payload.ts +4 -2
- package/src/device/list/0.2/payload.ts +4 -2
- package/src/device/register/0.1/payload.ts +4 -2
- package/src/device/register/0.2/payload.ts +4 -2
- package/src/git-ns/_shared/0.4/git-ns.ts +17 -0
- package/src/git-ns/account/link-status/0.1/payload.ts +2 -2
- package/src/git-ns/account/unlink/0.1/payload.ts +274 -0
- package/src/git-ns/bridge/event/0.3/payload.ts +1132 -0
- package/src/git-ns/bridge/job/0.4/payload.ts +691 -0
- package/src/git-ns/drift/resolve/0.3/payload.ts +707 -0
- package/src/git-ns/namespace/reseat/0.3/payload.ts +342 -0
- package/src/git-ns/repo/create/0.3/payload.ts +706 -0
- package/src/git-ns/right/break-glass/0.1/payload.ts +443 -0
- package/src/git-ns/right/break-glass-notice/0.1/payload.ts +258 -0
- package/src/git-ns/right/grant/0.3/payload.ts +434 -0
- package/src/git-ns/right/ratify/0.1/payload.ts +455 -0
- package/src/git-ns/right/revoke/0.3/payload.ts +425 -0
- package/src/git-ns/roles/reproject/0.1/payload.ts +220 -0
- package/src/git-ns/view/0.1/payload.ts +2 -2
- package/src/git-ns/view/0.2/payload.ts +2 -2
- package/src/git-ns/view/0.3/payload.ts +2 -2
- package/src/git-ns/view/0.4/payload.ts +1075 -0
- package/src/index.ts +39 -0
- package/src/messaging/message/status/0.1/payload.ts +270 -0
- package/src/vta/_shared/0.3/did-key-roles.ts +17 -0
- package/src/vta/attestation/mnemonic-export/1.0/payload.ts +232 -0
- package/src/vta/webvh/dids/keys/add/1.0/payload.ts +1217 -0
- package/src/vta/webvh/dids/keys/list/1.0/payload.ts +1004 -0
- package/src/vta/webvh/dids/keys/retire/1.0/payload.ts +1212 -0
- package/src/vta/webvh/dids/keys/revoke/1.0/payload.ts +1276 -0
- package/src/vta/webvh/dids/rotate-keys/2.0/payload.ts +1262 -0
- package/src/vta/webvh/dids/update/2.0/payload.ts +713 -0
- package/src/vtc/credentials/reissue/0.1/payload.ts +357 -0
- package/src/vtc/members/personhood/challenge/0.1/payload.ts +2 -2
- package/src/vtc/vetting/vetters/profile/0.1/payload.ts +2 -2
- package/src/vtc/vetting/vetters/resend/0.1/payload.ts +2 -2
|
@@ -0,0 +1,434 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/git-ns/right/grant/0.3/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { BreakGlass, Did_GitNsV0_3 as Did, Ext, Resource, Right, RightRecord_GitNsV0_4 as RightRecord } from "../../../../_shared/components.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Grants one git right on one forge-qualified resource to a DID. The VTC checks the grant against the actor's own rights — scope containment, no escalation, members-only namespace rights — and against community policy, records it, and publishes it to the Trust Registry.
|
|
11
|
+
*/
|
|
12
|
+
export interface GitNamespacesGrantRightPayload {
|
|
13
|
+
/**
|
|
14
|
+
* Who receives the right.
|
|
15
|
+
*/
|
|
16
|
+
subject: Did;
|
|
17
|
+
right: Right;
|
|
18
|
+
/**
|
|
19
|
+
* Where the right applies: a namespace resource for `git.ns.admin` and `git.repo.create`, a repository resource for `git.repo.own` and `git.repo.maintain`, either for `git.commit.sign`.
|
|
20
|
+
*/
|
|
21
|
+
resource: Resource;
|
|
22
|
+
/**
|
|
23
|
+
* When the right lapses. Absent: it lasts until revoked.
|
|
24
|
+
*/
|
|
25
|
+
expiresAt?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Why, in the granter's words. Recorded with the right and disclosed only to the resource's owners and namespace admins.
|
|
28
|
+
*/
|
|
29
|
+
reason?: string;
|
|
30
|
+
ext?: Ext;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* The recorded right.
|
|
34
|
+
*/
|
|
35
|
+
export interface GitNamespacesGrantRightResponsePayload {
|
|
36
|
+
/**
|
|
37
|
+
* The recorded right — newly recorded, or the live record that already existed.
|
|
38
|
+
*/
|
|
39
|
+
right: RightRecord;
|
|
40
|
+
ext?: Ext;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
44
|
+
export type { BreakGlass, Did, Ext, Resource, Right, RightRecord };
|
|
45
|
+
|
|
46
|
+
/** Trust Task type URI. */
|
|
47
|
+
export const TYPE_URI = "https://trusttasks.org/spec/git-ns/right/grant/0.3" as const;
|
|
48
|
+
|
|
49
|
+
/** Stable alias for this specification's request payload shape. */
|
|
50
|
+
export type Payload = GitNamespacesGrantRightPayload;
|
|
51
|
+
|
|
52
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
53
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/git-ns/right/grant/0.3#response" as const;
|
|
54
|
+
|
|
55
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
56
|
+
export type Response = GitNamespacesGrantRightResponsePayload;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* This specification's payload schema, as a value.
|
|
60
|
+
*
|
|
61
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
62
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
63
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
64
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
65
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
66
|
+
*/
|
|
67
|
+
export const PAYLOAD_SCHEMA = {
|
|
68
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
69
|
+
"$id": "https://trusttasks.org/spec/git-ns/right/grant/0.3",
|
|
70
|
+
"title": "Git Namespaces — Grant Right — payload",
|
|
71
|
+
"description": "Grants one git right on one forge-qualified resource to a DID. The VTC checks the grant against the actor's own rights — scope containment, no escalation, members-only namespace rights — and against community policy, records it, and publishes it to the Trust Registry.",
|
|
72
|
+
"type": "object",
|
|
73
|
+
"additionalProperties": false,
|
|
74
|
+
"required": [
|
|
75
|
+
"subject",
|
|
76
|
+
"right",
|
|
77
|
+
"resource"
|
|
78
|
+
],
|
|
79
|
+
"properties": {
|
|
80
|
+
"subject": {
|
|
81
|
+
"$ref": "#/$defs/Did",
|
|
82
|
+
"description": "Who receives the right."
|
|
83
|
+
},
|
|
84
|
+
"right": {
|
|
85
|
+
"$ref": "#/$defs/Right"
|
|
86
|
+
},
|
|
87
|
+
"resource": {
|
|
88
|
+
"$ref": "#/$defs/Resource",
|
|
89
|
+
"description": "Where the right applies: a namespace resource for `git.ns.admin` and `git.repo.create`, a repository resource for `git.repo.own` and `git.repo.maintain`, either for `git.commit.sign`."
|
|
90
|
+
},
|
|
91
|
+
"expiresAt": {
|
|
92
|
+
"type": "string",
|
|
93
|
+
"format": "date-time",
|
|
94
|
+
"description": "When the right lapses. Absent: it lasts until revoked."
|
|
95
|
+
},
|
|
96
|
+
"reason": {
|
|
97
|
+
"type": "string",
|
|
98
|
+
"maxLength": 1024,
|
|
99
|
+
"description": "Why, in the granter's words. Recorded with the right and disclosed only to the resource's owners and namespace admins."
|
|
100
|
+
},
|
|
101
|
+
"ext": {
|
|
102
|
+
"$ref": "#/$defs/Ext"
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
"$defs": {
|
|
106
|
+
"Response": {
|
|
107
|
+
"$anchor": "response",
|
|
108
|
+
"title": "Git Namespaces — Grant Right — response payload",
|
|
109
|
+
"description": "The recorded right.",
|
|
110
|
+
"type": "object",
|
|
111
|
+
"additionalProperties": false,
|
|
112
|
+
"required": [
|
|
113
|
+
"right"
|
|
114
|
+
],
|
|
115
|
+
"properties": {
|
|
116
|
+
"right": {
|
|
117
|
+
"$ref": "#/$defs/RightRecord",
|
|
118
|
+
"description": "The recorded right — newly recorded, or the live record that already existed."
|
|
119
|
+
},
|
|
120
|
+
"ext": {
|
|
121
|
+
"$ref": "#/$defs/Ext"
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"Ext": {
|
|
126
|
+
"title": "Ext",
|
|
127
|
+
"description": "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.",
|
|
128
|
+
"type": "object",
|
|
129
|
+
"minProperties": 1,
|
|
130
|
+
"additionalProperties": true,
|
|
131
|
+
"propertyNames": {
|
|
132
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"RightRecord": {
|
|
136
|
+
"title": "RightRecord",
|
|
137
|
+
"description": "One recorded right. Implied rights (§4.2 of the rights model: `own` implies `maintain` implies `commit.sign` on the same resource; `ns.admin` implies `repo.create` and `own` across its namespace) are not records and never appear as RightRecords. A record carrying `breakGlass` was given by its subject to themselves through git-ns/right/break-glass; it is a real right, published like any other, and is shown with that flag on every surface that shows the record.",
|
|
138
|
+
"type": "object",
|
|
139
|
+
"additionalProperties": false,
|
|
140
|
+
"required": [
|
|
141
|
+
"subject",
|
|
142
|
+
"right",
|
|
143
|
+
"resource",
|
|
144
|
+
"grantedBy",
|
|
145
|
+
"grantedAt"
|
|
146
|
+
],
|
|
147
|
+
"properties": {
|
|
148
|
+
"subject": {
|
|
149
|
+
"$ref": "#/$defs/Did",
|
|
150
|
+
"description": "Who holds the right. For `git.commit.sign` this is the DID whose commit signatures the CI check accepts."
|
|
151
|
+
},
|
|
152
|
+
"right": {
|
|
153
|
+
"$ref": "#/$defs/Right"
|
|
154
|
+
},
|
|
155
|
+
"resource": {
|
|
156
|
+
"$ref": "#/$defs/Resource"
|
|
157
|
+
},
|
|
158
|
+
"grantedBy": {
|
|
159
|
+
"$ref": "#/$defs/Did",
|
|
160
|
+
"description": "The actor whose task caused the right: the granter, the creator of a repository (for its first `own`), the adopting admin, the transferring owner, or the binding admin (for the first `git.ns.admin`). The VTC's own DID for a right it derives from its configuration."
|
|
161
|
+
},
|
|
162
|
+
"grantedAt": {
|
|
163
|
+
"type": "string",
|
|
164
|
+
"format": "date-time"
|
|
165
|
+
},
|
|
166
|
+
"expiresAt": {
|
|
167
|
+
"type": "string",
|
|
168
|
+
"format": "date-time",
|
|
169
|
+
"description": "When the right lapses. Absent: no expiry."
|
|
170
|
+
},
|
|
171
|
+
"reason": {
|
|
172
|
+
"type": "string",
|
|
173
|
+
"maxLength": 1024,
|
|
174
|
+
"description": "The granter's free-text reason. Disclosed only to holders of `git.repo.own` on the resource and of `git.ns.admin` over it."
|
|
175
|
+
},
|
|
176
|
+
"breakGlass": {
|
|
177
|
+
"$ref": "#/$defs/BreakGlass",
|
|
178
|
+
"description": "Present exactly when the subject gave themselves this right through git-ns/right/break-glass. Absent for every other record."
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
"BreakGlass": {
|
|
183
|
+
"title": "BreakGlass",
|
|
184
|
+
"description": "How a self-granted right came to be, and whether another administrator has since ratified it. A record whose `breakGlass` has no `ratifiedBy` is **unratified**: it is live and published like any other right, it does not count toward the last-owner or last-admin invariants, and any community administrator or namespace admin of its namespace may revoke it. Ratification (git-ns/right/ratify) sets `ratifiedBy` and `ratifiedAt`; from then on the record is an ordinary grant, and `breakGlass` stays as its history. Never published to the Trust Registry.",
|
|
185
|
+
"type": "object",
|
|
186
|
+
"additionalProperties": false,
|
|
187
|
+
"required": [
|
|
188
|
+
"by",
|
|
189
|
+
"at",
|
|
190
|
+
"justification"
|
|
191
|
+
],
|
|
192
|
+
"properties": {
|
|
193
|
+
"by": {
|
|
194
|
+
"$ref": "#/$defs/Did",
|
|
195
|
+
"description": "Who broke the glass: always the record's `subject`, restated so the flag reads on its own."
|
|
196
|
+
},
|
|
197
|
+
"at": {
|
|
198
|
+
"type": "string",
|
|
199
|
+
"format": "date-time",
|
|
200
|
+
"description": "When the VTC recorded the break-glass."
|
|
201
|
+
},
|
|
202
|
+
"justification": {
|
|
203
|
+
"type": "string",
|
|
204
|
+
"minLength": 1,
|
|
205
|
+
"maxLength": 2048,
|
|
206
|
+
"pattern": "\\S",
|
|
207
|
+
"description": "The actor's statement of why nobody else could grant this right. Shown to every community administrator, every namespace admin of the namespace and every owner of the resource; kept in the audit record; never published."
|
|
208
|
+
},
|
|
209
|
+
"effectiveAt": {
|
|
210
|
+
"type": "string",
|
|
211
|
+
"format": "date-time",
|
|
212
|
+
"description": "When the right takes effect, where the community's policy imposed a delay. Absent: it took effect at `at`. Until this instant the record confers nothing and is not published, and any administrator who may revoke it may do so."
|
|
213
|
+
},
|
|
214
|
+
"ratifiedBy": {
|
|
215
|
+
"$ref": "#/$defs/Did",
|
|
216
|
+
"description": "The administrator who ratified the record — never its subject. Absent while unratified."
|
|
217
|
+
},
|
|
218
|
+
"ratifiedAt": {
|
|
219
|
+
"type": "string",
|
|
220
|
+
"format": "date-time",
|
|
221
|
+
"description": "When it was ratified. Present exactly when `ratifiedBy` is."
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
"Did": {
|
|
226
|
+
"title": "Did",
|
|
227
|
+
"description": "A bare DID in the W3C DID Core syntax (§3.1): `did:`, a method name of lowercase letters and digits, `:`, and a method-specific id of colon-separated segments drawn from `A-Z a-z 0-9 . - _` and percent-encoded octets, the last segment non-empty. A DID URL is not a DID: no path, query or fragment (`/`, `?`, `#`), so a verification-method id such as `did:key:z6Mk…#z6Mk…` is refused. Compared by exact string equality — no case folding or percent-decoding. A consumer MUST still treat the value as data: the pattern keeps shell metacharacters, whitespace and quotes out of the wire form, but it does not make a DID safe to splice into a command or markup.",
|
|
228
|
+
"type": "string",
|
|
229
|
+
"maxLength": 2048,
|
|
230
|
+
"pattern": "^did:[a-z0-9]+:(?:(?:[A-Za-z0-9._-]|%[0-9A-Fa-f]{2})*:)*(?:[A-Za-z0-9._-]|%[0-9A-Fa-f]{2})+$"
|
|
231
|
+
},
|
|
232
|
+
"Resource": {
|
|
233
|
+
"title": "Resource",
|
|
234
|
+
"description": "A forge-qualified resource: `<forge-host>/<owner>` for a namespace, or `<forge-host>/<owner>/<repo>` for one repository, all lowercase — `github.com/acme`, `github.com/acme/widgets`, `codeberg.org/acme`. The forge is never implied: `acme/widgets` alone is not a resource. Containment is by whole segment: `github.com/acme` contains `github.com/acme/widgets` and does not contain `github.com/acme-labs/x` or `codeberg.org/acme/widgets`.",
|
|
235
|
+
"type": "string",
|
|
236
|
+
"maxLength": 455,
|
|
237
|
+
"pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)+(?:/[a-z0-9_-][a-z0-9._-]{0,99}){1,2}$"
|
|
238
|
+
},
|
|
239
|
+
"Right": {
|
|
240
|
+
"title": "Right",
|
|
241
|
+
"description": "One of the five git rights. Each string is also the TRQP `action` the VTC publishes the right under in its Trust Registry, so it is carried verbatim. `git.ns.admin` and `git.repo.create` apply to a namespace resource; `git.repo.own` and `git.repo.maintain` to a repository resource; `git.commit.sign` to either.",
|
|
242
|
+
"type": "string",
|
|
243
|
+
"enum": [
|
|
244
|
+
"git.ns.admin",
|
|
245
|
+
"git.repo.create",
|
|
246
|
+
"git.repo.own",
|
|
247
|
+
"git.repo.maintain",
|
|
248
|
+
"git.commit.sign"
|
|
249
|
+
]
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
} as const;
|
|
253
|
+
|
|
254
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
255
|
+
export const RESPONSE_PAYLOAD_SCHEMA = {
|
|
256
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
257
|
+
"$ref": "#/$defs/Response",
|
|
258
|
+
"$defs": {
|
|
259
|
+
"Response": {
|
|
260
|
+
"$anchor": "response",
|
|
261
|
+
"title": "Git Namespaces — Grant Right — response payload",
|
|
262
|
+
"description": "The recorded right.",
|
|
263
|
+
"type": "object",
|
|
264
|
+
"additionalProperties": false,
|
|
265
|
+
"required": [
|
|
266
|
+
"right"
|
|
267
|
+
],
|
|
268
|
+
"properties": {
|
|
269
|
+
"right": {
|
|
270
|
+
"$ref": "#/$defs/RightRecord",
|
|
271
|
+
"description": "The recorded right — newly recorded, or the live record that already existed."
|
|
272
|
+
},
|
|
273
|
+
"ext": {
|
|
274
|
+
"$ref": "#/$defs/Ext"
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
"Ext": {
|
|
279
|
+
"title": "Ext",
|
|
280
|
+
"description": "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.",
|
|
281
|
+
"type": "object",
|
|
282
|
+
"minProperties": 1,
|
|
283
|
+
"additionalProperties": true,
|
|
284
|
+
"propertyNames": {
|
|
285
|
+
"pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
"RightRecord": {
|
|
289
|
+
"title": "RightRecord",
|
|
290
|
+
"description": "One recorded right. Implied rights (§4.2 of the rights model: `own` implies `maintain` implies `commit.sign` on the same resource; `ns.admin` implies `repo.create` and `own` across its namespace) are not records and never appear as RightRecords. A record carrying `breakGlass` was given by its subject to themselves through git-ns/right/break-glass; it is a real right, published like any other, and is shown with that flag on every surface that shows the record.",
|
|
291
|
+
"type": "object",
|
|
292
|
+
"additionalProperties": false,
|
|
293
|
+
"required": [
|
|
294
|
+
"subject",
|
|
295
|
+
"right",
|
|
296
|
+
"resource",
|
|
297
|
+
"grantedBy",
|
|
298
|
+
"grantedAt"
|
|
299
|
+
],
|
|
300
|
+
"properties": {
|
|
301
|
+
"subject": {
|
|
302
|
+
"$ref": "#/$defs/Did",
|
|
303
|
+
"description": "Who holds the right. For `git.commit.sign` this is the DID whose commit signatures the CI check accepts."
|
|
304
|
+
},
|
|
305
|
+
"right": {
|
|
306
|
+
"$ref": "#/$defs/Right"
|
|
307
|
+
},
|
|
308
|
+
"resource": {
|
|
309
|
+
"$ref": "#/$defs/Resource"
|
|
310
|
+
},
|
|
311
|
+
"grantedBy": {
|
|
312
|
+
"$ref": "#/$defs/Did",
|
|
313
|
+
"description": "The actor whose task caused the right: the granter, the creator of a repository (for its first `own`), the adopting admin, the transferring owner, or the binding admin (for the first `git.ns.admin`). The VTC's own DID for a right it derives from its configuration."
|
|
314
|
+
},
|
|
315
|
+
"grantedAt": {
|
|
316
|
+
"type": "string",
|
|
317
|
+
"format": "date-time"
|
|
318
|
+
},
|
|
319
|
+
"expiresAt": {
|
|
320
|
+
"type": "string",
|
|
321
|
+
"format": "date-time",
|
|
322
|
+
"description": "When the right lapses. Absent: no expiry."
|
|
323
|
+
},
|
|
324
|
+
"reason": {
|
|
325
|
+
"type": "string",
|
|
326
|
+
"maxLength": 1024,
|
|
327
|
+
"description": "The granter's free-text reason. Disclosed only to holders of `git.repo.own` on the resource and of `git.ns.admin` over it."
|
|
328
|
+
},
|
|
329
|
+
"breakGlass": {
|
|
330
|
+
"$ref": "#/$defs/BreakGlass",
|
|
331
|
+
"description": "Present exactly when the subject gave themselves this right through git-ns/right/break-glass. Absent for every other record."
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
},
|
|
335
|
+
"BreakGlass": {
|
|
336
|
+
"title": "BreakGlass",
|
|
337
|
+
"description": "How a self-granted right came to be, and whether another administrator has since ratified it. A record whose `breakGlass` has no `ratifiedBy` is **unratified**: it is live and published like any other right, it does not count toward the last-owner or last-admin invariants, and any community administrator or namespace admin of its namespace may revoke it. Ratification (git-ns/right/ratify) sets `ratifiedBy` and `ratifiedAt`; from then on the record is an ordinary grant, and `breakGlass` stays as its history. Never published to the Trust Registry.",
|
|
338
|
+
"type": "object",
|
|
339
|
+
"additionalProperties": false,
|
|
340
|
+
"required": [
|
|
341
|
+
"by",
|
|
342
|
+
"at",
|
|
343
|
+
"justification"
|
|
344
|
+
],
|
|
345
|
+
"properties": {
|
|
346
|
+
"by": {
|
|
347
|
+
"$ref": "#/$defs/Did",
|
|
348
|
+
"description": "Who broke the glass: always the record's `subject`, restated so the flag reads on its own."
|
|
349
|
+
},
|
|
350
|
+
"at": {
|
|
351
|
+
"type": "string",
|
|
352
|
+
"format": "date-time",
|
|
353
|
+
"description": "When the VTC recorded the break-glass."
|
|
354
|
+
},
|
|
355
|
+
"justification": {
|
|
356
|
+
"type": "string",
|
|
357
|
+
"minLength": 1,
|
|
358
|
+
"maxLength": 2048,
|
|
359
|
+
"pattern": "\\S",
|
|
360
|
+
"description": "The actor's statement of why nobody else could grant this right. Shown to every community administrator, every namespace admin of the namespace and every owner of the resource; kept in the audit record; never published."
|
|
361
|
+
},
|
|
362
|
+
"effectiveAt": {
|
|
363
|
+
"type": "string",
|
|
364
|
+
"format": "date-time",
|
|
365
|
+
"description": "When the right takes effect, where the community's policy imposed a delay. Absent: it took effect at `at`. Until this instant the record confers nothing and is not published, and any administrator who may revoke it may do so."
|
|
366
|
+
},
|
|
367
|
+
"ratifiedBy": {
|
|
368
|
+
"$ref": "#/$defs/Did",
|
|
369
|
+
"description": "The administrator who ratified the record — never its subject. Absent while unratified."
|
|
370
|
+
},
|
|
371
|
+
"ratifiedAt": {
|
|
372
|
+
"type": "string",
|
|
373
|
+
"format": "date-time",
|
|
374
|
+
"description": "When it was ratified. Present exactly when `ratifiedBy` is."
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
},
|
|
378
|
+
"Did": {
|
|
379
|
+
"title": "Did",
|
|
380
|
+
"description": "A bare DID in the W3C DID Core syntax (§3.1): `did:`, a method name of lowercase letters and digits, `:`, and a method-specific id of colon-separated segments drawn from `A-Z a-z 0-9 . - _` and percent-encoded octets, the last segment non-empty. A DID URL is not a DID: no path, query or fragment (`/`, `?`, `#`), so a verification-method id such as `did:key:z6Mk…#z6Mk…` is refused. Compared by exact string equality — no case folding or percent-decoding. A consumer MUST still treat the value as data: the pattern keeps shell metacharacters, whitespace and quotes out of the wire form, but it does not make a DID safe to splice into a command or markup.",
|
|
381
|
+
"type": "string",
|
|
382
|
+
"maxLength": 2048,
|
|
383
|
+
"pattern": "^did:[a-z0-9]+:(?:(?:[A-Za-z0-9._-]|%[0-9A-Fa-f]{2})*:)*(?:[A-Za-z0-9._-]|%[0-9A-Fa-f]{2})+$"
|
|
384
|
+
},
|
|
385
|
+
"Resource": {
|
|
386
|
+
"title": "Resource",
|
|
387
|
+
"description": "A forge-qualified resource: `<forge-host>/<owner>` for a namespace, or `<forge-host>/<owner>/<repo>` for one repository, all lowercase — `github.com/acme`, `github.com/acme/widgets`, `codeberg.org/acme`. The forge is never implied: `acme/widgets` alone is not a resource. Containment is by whole segment: `github.com/acme` contains `github.com/acme/widgets` and does not contain `github.com/acme-labs/x` or `codeberg.org/acme/widgets`.",
|
|
388
|
+
"type": "string",
|
|
389
|
+
"maxLength": 455,
|
|
390
|
+
"pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)+(?:/[a-z0-9_-][a-z0-9._-]{0,99}){1,2}$"
|
|
391
|
+
},
|
|
392
|
+
"Right": {
|
|
393
|
+
"title": "Right",
|
|
394
|
+
"description": "One of the five git rights. Each string is also the TRQP `action` the VTC publishes the right under in its Trust Registry, so it is carried verbatim. `git.ns.admin` and `git.repo.create` apply to a namespace resource; `git.repo.own` and `git.repo.maintain` to a repository resource; `git.commit.sign` to either.",
|
|
395
|
+
"type": "string",
|
|
396
|
+
"enum": [
|
|
397
|
+
"git.ns.admin",
|
|
398
|
+
"git.repo.create",
|
|
399
|
+
"git.repo.own",
|
|
400
|
+
"git.repo.maintain",
|
|
401
|
+
"git.commit.sign"
|
|
402
|
+
]
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
} as const;
|
|
406
|
+
|
|
407
|
+
/**
|
|
408
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
409
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
410
|
+
* per-specification and cannot be derived from the document alone, and
|
|
411
|
+
* item 2 needs the schema this carries.
|
|
412
|
+
*/
|
|
413
|
+
export const SPEC = {
|
|
414
|
+
typeUri: TYPE_URI,
|
|
415
|
+
isBearer: false,
|
|
416
|
+
isProofRequired: true,
|
|
417
|
+
isRecipientRequired: true,
|
|
418
|
+
isIssuedAtRequired: true,
|
|
419
|
+
payloadSchema: PAYLOAD_SCHEMA,
|
|
420
|
+
} as const;
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
424
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
425
|
+
* parties (§7.3 item 5).
|
|
426
|
+
*/
|
|
427
|
+
export const RESPONSE_SPEC = {
|
|
428
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
429
|
+
isBearer: false,
|
|
430
|
+
isProofRequired: true,
|
|
431
|
+
isRecipientRequired: true,
|
|
432
|
+
isIssuedAtRequired: true,
|
|
433
|
+
payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
|
|
434
|
+
} as const;
|