@openvtc/trust-tasks 0.23.6 → 0.23.7

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.
Files changed (35) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/_shared/components.d.ts +2 -2
  3. package/dist/_shared/components.d.ts.map +1 -1
  4. package/dist/device/list/0.1/payload.d.ts +4 -4
  5. package/dist/device/list/0.1/payload.d.ts.map +1 -1
  6. package/dist/device/list/0.1/payload.js +4 -2
  7. package/dist/device/list/0.1/payload.js.map +1 -1
  8. package/dist/device/list/0.2/payload.d.ts +4 -4
  9. package/dist/device/list/0.2/payload.d.ts.map +1 -1
  10. package/dist/device/list/0.2/payload.js +4 -2
  11. package/dist/device/list/0.2/payload.js.map +1 -1
  12. package/dist/device/register/0.1/payload.d.ts +4 -4
  13. package/dist/device/register/0.1/payload.d.ts.map +1 -1
  14. package/dist/device/register/0.1/payload.js +4 -2
  15. package/dist/device/register/0.1/payload.js.map +1 -1
  16. package/dist/device/register/0.2/payload.d.ts +4 -4
  17. package/dist/device/register/0.2/payload.d.ts.map +1 -1
  18. package/dist/device/register/0.2/payload.js +4 -2
  19. package/dist/device/register/0.2/payload.js.map +1 -1
  20. package/dist/index.d.ts +1 -0
  21. package/dist/index.d.ts.map +1 -1
  22. package/dist/index.js +1 -0
  23. package/dist/index.js.map +1 -1
  24. package/dist/keys/sign-sshsig/0.1/payload.d.ts +346 -0
  25. package/dist/keys/sign-sshsig/0.1/payload.d.ts.map +1 -0
  26. package/dist/keys/sign-sshsig/0.1/payload.js +196 -0
  27. package/dist/keys/sign-sshsig/0.1/payload.js.map +1 -0
  28. package/package.json +1 -1
  29. package/src/_shared/components.ts +4 -2
  30. package/src/device/list/0.1/payload.ts +4 -2
  31. package/src/device/list/0.2/payload.ts +4 -2
  32. package/src/device/register/0.1/payload.ts +4 -2
  33. package/src/device/register/0.2/payload.ts +4 -2
  34. package/src/index.ts +1 -0
  35. package/src/keys/sign-sshsig/0.1/payload.ts +261 -0
@@ -0,0 +1,196 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/keys/sign-sshsig/0.1/payload.schema.json
4
+ */
5
+ /** Trust Task type URI. */
6
+ export const TYPE_URI = "https://trusttasks.org/spec/keys/sign-sshsig/0.1";
7
+ /** Trust Task response type URI (request type URI + "#response"). */
8
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/keys/sign-sshsig/0.1#response";
9
+ /**
10
+ * This specification's payload schema, as a value.
11
+ *
12
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
13
+ * rather than only as a `.json` file because TypeScript types are erased
14
+ * at runtime: without a schema a consumer has nothing to validate, and
15
+ * every REQUIRED payload member is optional in practice. Cross-file
16
+ * `$ref`s are already inlined, so it needs no resolver.
17
+ */
18
+ export const PAYLOAD_SCHEMA = {
19
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
20
+ "$id": "https://trusttasks.org/spec/keys/sign-sshsig/0.1",
21
+ "title": "Keys — Sign SSHSIG — payload",
22
+ "description": "A request for an SSHSIG signature (the OpenSSH `PROTOCOL.sshsig` format git uses for SSH commit signing) over a message digest, made with a key the custodian holds. The producer supplies the digest and the namespace; the custodian builds the signed-data structure itself. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.",
23
+ "type": "object",
24
+ "additionalProperties": false,
25
+ "required": [
26
+ "keyId",
27
+ "algorithm",
28
+ "namespace",
29
+ "hashAlgorithm",
30
+ "messageHash"
31
+ ],
32
+ "properties": {
33
+ "keyId": {
34
+ "type": "string",
35
+ "minLength": 1,
36
+ "description": "Identifier of the key to sign with. The key MUST be `active`."
37
+ },
38
+ "algorithm": {
39
+ "type": "string",
40
+ "enum": [
41
+ "EdDSA",
42
+ "ES256"
43
+ ],
44
+ "description": "Signature algorithm, as a JOSE identifier: `EdDSA` with an `ed25519` key (SSH key type `ssh-ed25519`), `ES256` with a `p256` key (`ecdsa-sha2-nistp256`). These are the custodian-held key types SSHSIG defines a signature for. MUST be compatible with the named key's `keyType`. Closed: an unrecognised algorithm is refused, never substituted."
45
+ },
46
+ "namespace": {
47
+ "type": "string",
48
+ "pattern": "^[!-~]{1,128}$",
49
+ "description": "The SSHSIG namespace the signature is bound to — `git` for a git commit or tag, `file` for `ssh-keygen -Y sign` over a file. Printable ASCII without spaces. A signature made under one namespace does not verify under another, so the custodian MAY restrict which namespaces a producer may name."
50
+ },
51
+ "hashAlgorithm": {
52
+ "type": "string",
53
+ "enum": [
54
+ "sha256",
55
+ "sha512"
56
+ ],
57
+ "description": "The digest algorithm the producer applied to the message, in the SSHSIG spelling (externally owned, carried verbatim). It is written into the signed data, so the verifier recomputes the digest with the same algorithm."
58
+ },
59
+ "messageHash": {
60
+ "type": "string",
61
+ "pattern": "^[A-Za-z0-9_-]+$",
62
+ "minLength": 43,
63
+ "maxLength": 86,
64
+ "description": "The digest of the message, `H(message)` in `PROTOCOL.sshsig`, base64url-encoded without padding: 32 bytes (43 characters) for `sha256`, 64 bytes (86 characters) for `sha512`. The custodian never sees the message itself."
65
+ },
66
+ "ext": {
67
+ "$ref": "#/$defs/Ext",
68
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
69
+ }
70
+ },
71
+ "$defs": {
72
+ "Response": {
73
+ "$anchor": "response",
74
+ "title": "Keys — Sign SSHSIG — response payload",
75
+ "description": "The success response to a keys/sign-sshsig request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/keys/sign-sshsig/0.1#response. Failures use trust-task-error, not this shape.",
76
+ "type": "object",
77
+ "additionalProperties": false,
78
+ "required": [
79
+ "keyId",
80
+ "algorithm",
81
+ "signature"
82
+ ],
83
+ "properties": {
84
+ "keyId": {
85
+ "type": "string",
86
+ "description": "The key that produced the signature. Echoed so a response separated from its request is still attributable."
87
+ },
88
+ "algorithm": {
89
+ "type": "string",
90
+ "enum": [
91
+ "EdDSA",
92
+ "ES256"
93
+ ],
94
+ "description": "The algorithm the signature was made with — the one the request named."
95
+ },
96
+ "signature": {
97
+ "type": "string",
98
+ "pattern": "^[A-Za-z0-9_-]+$",
99
+ "description": "The raw signature over the SSHSIG signed data, base64url-encoded without padding: 64 bytes for `EdDSA`; for `ES256`, the 64-byte JOSE `r || s` form, which the producer re-encodes as the two SSH `mpint`s when it assembles the SSHSIG blob."
100
+ },
101
+ "ext": {
102
+ "$ref": "#/$defs/Ext"
103
+ }
104
+ }
105
+ },
106
+ "Ext": {
107
+ "title": "Ext",
108
+ "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.",
109
+ "type": "object",
110
+ "minProperties": 1,
111
+ "additionalProperties": true,
112
+ "propertyNames": {
113
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
114
+ }
115
+ }
116
+ }
117
+ };
118
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
119
+ export const RESPONSE_PAYLOAD_SCHEMA = {
120
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
121
+ "$ref": "#/$defs/Response",
122
+ "$defs": {
123
+ "Response": {
124
+ "$anchor": "response",
125
+ "title": "Keys — Sign SSHSIG — response payload",
126
+ "description": "The success response to a keys/sign-sshsig request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/keys/sign-sshsig/0.1#response. Failures use trust-task-error, not this shape.",
127
+ "type": "object",
128
+ "additionalProperties": false,
129
+ "required": [
130
+ "keyId",
131
+ "algorithm",
132
+ "signature"
133
+ ],
134
+ "properties": {
135
+ "keyId": {
136
+ "type": "string",
137
+ "description": "The key that produced the signature. Echoed so a response separated from its request is still attributable."
138
+ },
139
+ "algorithm": {
140
+ "type": "string",
141
+ "enum": [
142
+ "EdDSA",
143
+ "ES256"
144
+ ],
145
+ "description": "The algorithm the signature was made with — the one the request named."
146
+ },
147
+ "signature": {
148
+ "type": "string",
149
+ "pattern": "^[A-Za-z0-9_-]+$",
150
+ "description": "The raw signature over the SSHSIG signed data, base64url-encoded without padding: 64 bytes for `EdDSA`; for `ES256`, the 64-byte JOSE `r || s` form, which the producer re-encodes as the two SSH `mpint`s when it assembles the SSHSIG blob."
151
+ },
152
+ "ext": {
153
+ "$ref": "#/$defs/Ext"
154
+ }
155
+ }
156
+ },
157
+ "Ext": {
158
+ "title": "Ext",
159
+ "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.",
160
+ "type": "object",
161
+ "minProperties": 1,
162
+ "additionalProperties": true,
163
+ "propertyNames": {
164
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
165
+ }
166
+ }
167
+ }
168
+ };
169
+ /**
170
+ * SPEC.md §7.2 policy for the request variant, from this specification's
171
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
172
+ * per-specification and cannot be derived from the document alone, and
173
+ * item 2 needs the schema this carries.
174
+ */
175
+ export const SPEC = {
176
+ typeUri: TYPE_URI,
177
+ isBearer: false,
178
+ isProofRequired: true,
179
+ isRecipientRequired: true,
180
+ isIssuedAtRequired: true,
181
+ payloadSchema: PAYLOAD_SCHEMA,
182
+ };
183
+ /**
184
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
185
+ * tracks the *issuer* party's requirement because a response swaps the
186
+ * parties (§7.3 item 5).
187
+ */
188
+ export const RESPONSE_SPEC = {
189
+ typeUri: RESPONSE_TYPE_URI,
190
+ isBearer: false,
191
+ isProofRequired: false,
192
+ isRecipientRequired: true,
193
+ isIssuedAtRequired: true,
194
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
195
+ };
196
+ //# sourceMappingURL=payload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payload.js","sourceRoot":"","sources":["../../../../src/keys/sign-sshsig/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAwDH,2BAA2B;AAC3B,MAAM,CAA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BACxF;gBACD,WAAW,EAAE;oBACX,MAAM,EAAE,QAAQ;oBAChB,SAAS,EAAE,kBAAkB;oBAC7B,aAAa,EAAE,+OAA+O;iBAC/P;gBACD,KAAK,EAAE;oBACL,MAAM,EAAE,aAAa;iBACtB;aACF;SACF;QACD,KAAK,EAAE;YACL,OAAO,EAAE,KAAK;YACd,aAAa,EAAE,uKAAuK;YACtL,MAAM,EAAE,QAAQ;YAChB,eAAe,EAAE,CAAC;YAClB,sBAAsB,EAAE,IAAI;YAC5B,eAAe,EAAE;gBACf,SAAS,EAAE,mCAAmC;aAC/C;SACF;KACF;CACO,CAAC;AAEX;;;;;GAKG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB,OAAO,EAAE,QAAQ;IACjB,QAAQ,EAAE,KAAK;IACf,eAAe,EAAE,IAAI;IACrB,mBAAmB,EAAE,IAAI;IACzB,kBAAkB,EAAE,IAAI;IACxB,aAAa,EAAE,cAAc;CACrB,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,OAAO,EAAE,iBAAiB;IAC1B,QAAQ,EAAE,KAAK;IACf,eAAe,EAAE,KAAK;IACtB,mBAAmB,EAAE,IAAI;IACzB,kBAAkB,EAAE,IAAI;IACxB,aAAa,EAAE,uBAAuB;CAC9B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openvtc/trust-tasks",
3
- "version": "0.23.6",
3
+ "version": "0.23.7",
4
4
  "description": "Generated TypeScript bindings for the Trust Tasks framework registry.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -108,7 +108,8 @@ export type Capability_DeviceV0_1 =
108
108
  | "memory-write"
109
109
  | "room-present"
110
110
  | "room-open"
111
- | "key-export";
111
+ | "key-export"
112
+ | "sign-sshsig";
112
113
  /**
113
114
  * Fine-grained capability flag scoped to the device's allowed contexts. See SPEC.md for the full semantics of each. Capability values are additive: a consumer MUST ignore a value it does not recognise rather than reject the binding, and MUST NOT treat an unrecognised value as conferring anything.
114
115
  */
@@ -127,7 +128,8 @@ export type Capability_DeviceV0_2 =
127
128
  | "memoryWrite"
128
129
  | "roomPresent"
129
130
  | "roomOpen"
130
- | "keyExport";
131
+ | "keyExport"
132
+ | "signSshsig";
131
133
  /**
132
134
  * Number of chunks in the bundle, equal to ceil(expectedSizeBytes / chunkSize). Bounded at 4096 so that the manifest itself — one digest per chunk — fits in the single document that carries it under the same message-size reasoning as a chunk.
133
135
  */
@@ -248,7 +248,8 @@ export const PAYLOAD_SCHEMA = {
248
248
  "memory-write",
249
249
  "room-present",
250
250
  "room-open",
251
- "key-export"
251
+ "key-export",
252
+ "sign-sshsig"
252
253
  ],
253
254
  "description": "Fine-grained capability flag scoped to the device's allowed contexts. See SPEC.md for the full semantics of each. Capability values are additive: a consumer MUST ignore a value it does not recognise rather than reject the binding, and MUST NOT treat an unrecognised value as conferring anything."
254
255
  },
@@ -587,7 +588,8 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
587
588
  "memory-write",
588
589
  "room-present",
589
590
  "room-open",
590
- "key-export"
591
+ "key-export",
592
+ "sign-sshsig"
591
593
  ],
592
594
  "description": "Fine-grained capability flag scoped to the device's allowed contexts. See SPEC.md for the full semantics of each. Capability values are additive: a consumer MUST ignore a value it does not recognise rather than reject the binding, and MUST NOT treat an unrecognised value as conferring anything."
593
595
  },
@@ -248,7 +248,8 @@ export const PAYLOAD_SCHEMA = {
248
248
  "memoryWrite",
249
249
  "roomPresent",
250
250
  "roomOpen",
251
- "keyExport"
251
+ "keyExport",
252
+ "signSshsig"
252
253
  ],
253
254
  "description": "Fine-grained capability flag scoped to the device's allowed contexts. See SPEC.md for the full semantics of each. Capability values are additive: a consumer MUST ignore a value it does not recognise rather than reject the binding, and MUST NOT treat an unrecognised value as conferring anything."
254
255
  },
@@ -587,7 +588,8 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
587
588
  "memoryWrite",
588
589
  "roomPresent",
589
590
  "roomOpen",
590
- "keyExport"
591
+ "keyExport",
592
+ "signSshsig"
591
593
  ],
592
594
  "description": "Fine-grained capability flag scoped to the device's allowed contexts. See SPEC.md for the full semantics of each. Capability values are additive: a consumer MUST ignore a value it does not recognise rather than reject the binding, and MUST NOT treat an unrecognised value as conferring anything."
593
595
  },
@@ -216,7 +216,8 @@ export const PAYLOAD_SCHEMA = {
216
216
  "memory-write",
217
217
  "room-present",
218
218
  "room-open",
219
- "key-export"
219
+ "key-export",
220
+ "sign-sshsig"
220
221
  ],
221
222
  "description": "Fine-grained capability flag scoped to the device's allowed contexts. See SPEC.md for the full semantics of each. Capability values are additive: a consumer MUST ignore a value it does not recognise rather than reject the binding, and MUST NOT treat an unrecognised value as conferring anything."
222
223
  },
@@ -545,7 +546,8 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
545
546
  "memory-write",
546
547
  "room-present",
547
548
  "room-open",
548
- "key-export"
549
+ "key-export",
550
+ "sign-sshsig"
549
551
  ],
550
552
  "description": "Fine-grained capability flag scoped to the device's allowed contexts. See SPEC.md for the full semantics of each. Capability values are additive: a consumer MUST ignore a value it does not recognise rather than reject the binding, and MUST NOT treat an unrecognised value as conferring anything."
551
553
  },
@@ -216,7 +216,8 @@ export const PAYLOAD_SCHEMA = {
216
216
  "memoryWrite",
217
217
  "roomPresent",
218
218
  "roomOpen",
219
- "keyExport"
219
+ "keyExport",
220
+ "signSshsig"
220
221
  ],
221
222
  "description": "Fine-grained capability flag scoped to the device's allowed contexts. See SPEC.md for the full semantics of each. Capability values are additive: a consumer MUST ignore a value it does not recognise rather than reject the binding, and MUST NOT treat an unrecognised value as conferring anything."
222
223
  },
@@ -545,7 +546,8 @@ export const RESPONSE_PAYLOAD_SCHEMA = {
545
546
  "memoryWrite",
546
547
  "roomPresent",
547
548
  "roomOpen",
548
- "keyExport"
549
+ "keyExport",
550
+ "signSshsig"
549
551
  ],
550
552
  "description": "Fine-grained capability flag scoped to the device's allowed contexts. See SPEC.md for the full semantics of each. Capability values are additive: a consumer MUST ignore a value it does not recognise rather than reject the binding, and MUST NOT treat an unrecognised value as conferring anything."
551
553
  },
package/src/index.ts CHANGED
@@ -279,6 +279,7 @@ export * as KeysRename_v0_1 from "./keys/rename/0.1/payload.js";
279
279
  export * as KeysRevoke_v0_1 from "./keys/revoke/0.1/payload.js";
280
280
  export * as KeysSetExportability_v0_1 from "./keys/set-exportability/0.1/payload.js";
281
281
  export * as KeysShow_v0_1 from "./keys/show/0.1/payload.js";
282
+ export * as KeysSignSshsig_v0_1 from "./keys/sign-sshsig/0.1/payload.js";
282
283
  export * as KeysSign_v0_1 from "./keys/sign/0.1/payload.js";
283
284
  export * as MediatorOpsShared_v0_1 from "./messaging/_shared/0.1/mediator-ops.js";
284
285
  export * as MessagingShared_v0_1 from "./messaging/_shared/0.1/messaging.js";
@@ -0,0 +1,261 @@
1
+ /**
2
+ * Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
3
+ * Source: specs/keys/sign-sshsig/0.1/payload.schema.json
4
+ */
5
+
6
+ import type { Ext } from "../../../_shared/components.js";
7
+
8
+
9
+ /**
10
+ * A request for an SSHSIG signature (the OpenSSH `PROTOCOL.sshsig` format git uses for SSH commit signing) over a message digest, made with a key the custodian holds. The producer supplies the digest and the namespace; the custodian builds the signed-data structure itself. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.
11
+ */
12
+ export interface KeysSignSSHSIGPayload {
13
+ /**
14
+ * Identifier of the key to sign with. The key MUST be `active`.
15
+ */
16
+ keyId: string;
17
+ /**
18
+ * Signature algorithm, as a JOSE identifier: `EdDSA` with an `ed25519` key (SSH key type `ssh-ed25519`), `ES256` with a `p256` key (`ecdsa-sha2-nistp256`). These are the custodian-held key types SSHSIG defines a signature for. MUST be compatible with the named key's `keyType`. Closed: an unrecognised algorithm is refused, never substituted.
19
+ */
20
+ algorithm: "EdDSA" | "ES256";
21
+ /**
22
+ * The SSHSIG namespace the signature is bound to — `git` for a git commit or tag, `file` for `ssh-keygen -Y sign` over a file. Printable ASCII without spaces. A signature made under one namespace does not verify under another, so the custodian MAY restrict which namespaces a producer may name.
23
+ */
24
+ namespace: string;
25
+ /**
26
+ * The digest algorithm the producer applied to the message, in the SSHSIG spelling (externally owned, carried verbatim). It is written into the signed data, so the verifier recomputes the digest with the same algorithm.
27
+ */
28
+ hashAlgorithm: "sha256" | "sha512";
29
+ /**
30
+ * The digest of the message, `H(message)` in `PROTOCOL.sshsig`, base64url-encoded without padding: 32 bytes (43 characters) for `sha256`, 64 bytes (86 characters) for `sha512`. The custodian never sees the message itself.
31
+ */
32
+ messageHash: string;
33
+ /**
34
+ * Ecosystem-defined extension members per SPEC.md §4.5.1.
35
+ */
36
+ ext?: Ext;
37
+ }
38
+ /**
39
+ * The success response to a keys/sign-sshsig request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/keys/sign-sshsig/0.1#response. Failures use trust-task-error, not this shape.
40
+ */
41
+ export interface KeysSignSSHSIGResponsePayload {
42
+ /**
43
+ * The key that produced the signature. Echoed so a response separated from its request is still attributable.
44
+ */
45
+ keyId: string;
46
+ /**
47
+ * The algorithm the signature was made with — the one the request named.
48
+ */
49
+ algorithm: "EdDSA" | "ES256";
50
+ /**
51
+ * The raw signature over the SSHSIG signed data, base64url-encoded without padding: 64 bytes for `EdDSA`; for `ES256`, the 64-byte JOSE `r || s` form, which the producer re-encodes as the two SSH `mpint`s when it assembles the SSHSIG blob.
52
+ */
53
+ signature: string;
54
+ ext?: Ext;
55
+ }
56
+
57
+ /** Shared definitions this specification references, re-exported under the names it used to declare them with. */
58
+ export type { Ext };
59
+
60
+ /** Trust Task type URI. */
61
+ export const TYPE_URI = "https://trusttasks.org/spec/keys/sign-sshsig/0.1" as const;
62
+
63
+ /** Stable alias for this specification's request payload shape. */
64
+ export type Payload = KeysSignSSHSIGPayload;
65
+
66
+ /** Trust Task response type URI (request type URI + "#response"). */
67
+ export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/keys/sign-sshsig/0.1#response" as const;
68
+
69
+ /** Stable alias for this specification's success-response payload shape. */
70
+ export type Response = KeysSignSSHSIGResponsePayload;
71
+
72
+ /**
73
+ * This specification's payload schema, as a value.
74
+ *
75
+ * SPEC.md §7.2 item 2 is performed against this. It is shipped as data
76
+ * rather than only as a `.json` file because TypeScript types are erased
77
+ * at runtime: without a schema a consumer has nothing to validate, and
78
+ * every REQUIRED payload member is optional in practice. Cross-file
79
+ * `$ref`s are already inlined, so it needs no resolver.
80
+ */
81
+ export const PAYLOAD_SCHEMA = {
82
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
83
+ "$id": "https://trusttasks.org/spec/keys/sign-sshsig/0.1",
84
+ "title": "Keys — Sign SSHSIG — payload",
85
+ "description": "A request for an SSHSIG signature (the OpenSSH `PROTOCOL.sshsig` format git uses for SSH commit signing) over a message digest, made with a key the custodian holds. The producer supplies the digest and the namespace; the custodian builds the signed-data structure itself. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.",
86
+ "type": "object",
87
+ "additionalProperties": false,
88
+ "required": [
89
+ "keyId",
90
+ "algorithm",
91
+ "namespace",
92
+ "hashAlgorithm",
93
+ "messageHash"
94
+ ],
95
+ "properties": {
96
+ "keyId": {
97
+ "type": "string",
98
+ "minLength": 1,
99
+ "description": "Identifier of the key to sign with. The key MUST be `active`."
100
+ },
101
+ "algorithm": {
102
+ "type": "string",
103
+ "enum": [
104
+ "EdDSA",
105
+ "ES256"
106
+ ],
107
+ "description": "Signature algorithm, as a JOSE identifier: `EdDSA` with an `ed25519` key (SSH key type `ssh-ed25519`), `ES256` with a `p256` key (`ecdsa-sha2-nistp256`). These are the custodian-held key types SSHSIG defines a signature for. MUST be compatible with the named key's `keyType`. Closed: an unrecognised algorithm is refused, never substituted."
108
+ },
109
+ "namespace": {
110
+ "type": "string",
111
+ "pattern": "^[!-~]{1,128}$",
112
+ "description": "The SSHSIG namespace the signature is bound to — `git` for a git commit or tag, `file` for `ssh-keygen -Y sign` over a file. Printable ASCII without spaces. A signature made under one namespace does not verify under another, so the custodian MAY restrict which namespaces a producer may name."
113
+ },
114
+ "hashAlgorithm": {
115
+ "type": "string",
116
+ "enum": [
117
+ "sha256",
118
+ "sha512"
119
+ ],
120
+ "description": "The digest algorithm the producer applied to the message, in the SSHSIG spelling (externally owned, carried verbatim). It is written into the signed data, so the verifier recomputes the digest with the same algorithm."
121
+ },
122
+ "messageHash": {
123
+ "type": "string",
124
+ "pattern": "^[A-Za-z0-9_-]+$",
125
+ "minLength": 43,
126
+ "maxLength": 86,
127
+ "description": "The digest of the message, `H(message)` in `PROTOCOL.sshsig`, base64url-encoded without padding: 32 bytes (43 characters) for `sha256`, 64 bytes (86 characters) for `sha512`. The custodian never sees the message itself."
128
+ },
129
+ "ext": {
130
+ "$ref": "#/$defs/Ext",
131
+ "description": "Ecosystem-defined extension members per SPEC.md §4.5.1."
132
+ }
133
+ },
134
+ "$defs": {
135
+ "Response": {
136
+ "$anchor": "response",
137
+ "title": "Keys — Sign SSHSIG — response payload",
138
+ "description": "The success response to a keys/sign-sshsig request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/keys/sign-sshsig/0.1#response. Failures use trust-task-error, not this shape.",
139
+ "type": "object",
140
+ "additionalProperties": false,
141
+ "required": [
142
+ "keyId",
143
+ "algorithm",
144
+ "signature"
145
+ ],
146
+ "properties": {
147
+ "keyId": {
148
+ "type": "string",
149
+ "description": "The key that produced the signature. Echoed so a response separated from its request is still attributable."
150
+ },
151
+ "algorithm": {
152
+ "type": "string",
153
+ "enum": [
154
+ "EdDSA",
155
+ "ES256"
156
+ ],
157
+ "description": "The algorithm the signature was made with — the one the request named."
158
+ },
159
+ "signature": {
160
+ "type": "string",
161
+ "pattern": "^[A-Za-z0-9_-]+$",
162
+ "description": "The raw signature over the SSHSIG signed data, base64url-encoded without padding: 64 bytes for `EdDSA`; for `ES256`, the 64-byte JOSE `r || s` form, which the producer re-encodes as the two SSH `mpint`s when it assembles the SSHSIG blob."
163
+ },
164
+ "ext": {
165
+ "$ref": "#/$defs/Ext"
166
+ }
167
+ }
168
+ },
169
+ "Ext": {
170
+ "title": "Ext",
171
+ "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.",
172
+ "type": "object",
173
+ "minProperties": 1,
174
+ "additionalProperties": true,
175
+ "propertyNames": {
176
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
177
+ }
178
+ }
179
+ }
180
+ } as const;
181
+
182
+ /** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
183
+ export const RESPONSE_PAYLOAD_SCHEMA = {
184
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
185
+ "$ref": "#/$defs/Response",
186
+ "$defs": {
187
+ "Response": {
188
+ "$anchor": "response",
189
+ "title": "Keys — Sign SSHSIG — response payload",
190
+ "description": "The success response to a keys/sign-sshsig request. Carried in a Trust Task document whose type is https://trusttasks.org/spec/keys/sign-sshsig/0.1#response. Failures use trust-task-error, not this shape.",
191
+ "type": "object",
192
+ "additionalProperties": false,
193
+ "required": [
194
+ "keyId",
195
+ "algorithm",
196
+ "signature"
197
+ ],
198
+ "properties": {
199
+ "keyId": {
200
+ "type": "string",
201
+ "description": "The key that produced the signature. Echoed so a response separated from its request is still attributable."
202
+ },
203
+ "algorithm": {
204
+ "type": "string",
205
+ "enum": [
206
+ "EdDSA",
207
+ "ES256"
208
+ ],
209
+ "description": "The algorithm the signature was made with — the one the request named."
210
+ },
211
+ "signature": {
212
+ "type": "string",
213
+ "pattern": "^[A-Za-z0-9_-]+$",
214
+ "description": "The raw signature over the SSHSIG signed data, base64url-encoded without padding: 64 bytes for `EdDSA`; for `ES256`, the 64-byte JOSE `r || s` form, which the producer re-encodes as the two SSH `mpint`s when it assembles the SSHSIG blob."
215
+ },
216
+ "ext": {
217
+ "$ref": "#/$defs/Ext"
218
+ }
219
+ }
220
+ },
221
+ "Ext": {
222
+ "title": "Ext",
223
+ "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.",
224
+ "type": "object",
225
+ "minProperties": 1,
226
+ "additionalProperties": true,
227
+ "propertyNames": {
228
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$"
229
+ }
230
+ }
231
+ }
232
+ } as const;
233
+
234
+ /**
235
+ * SPEC.md §7.2 policy for the request variant, from this specification's
236
+ * front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
237
+ * per-specification and cannot be derived from the document alone, and
238
+ * item 2 needs the schema this carries.
239
+ */
240
+ export const SPEC = {
241
+ typeUri: TYPE_URI,
242
+ isBearer: false,
243
+ isProofRequired: true,
244
+ isRecipientRequired: true,
245
+ isIssuedAtRequired: true,
246
+ payloadSchema: PAYLOAD_SCHEMA,
247
+ } as const;
248
+
249
+ /**
250
+ * SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
251
+ * tracks the *issuer* party's requirement because a response swaps the
252
+ * parties (§7.3 item 5).
253
+ */
254
+ export const RESPONSE_SPEC = {
255
+ typeUri: RESPONSE_TYPE_URI,
256
+ isBearer: false,
257
+ isProofRequired: false,
258
+ isRecipientRequired: true,
259
+ isIssuedAtRequired: true,
260
+ payloadSchema: RESPONSE_PAYLOAD_SCHEMA,
261
+ } as const;