@suveren/gateway 0.6.2 → 0.6.3
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/content/integrations/calendar.json +6 -3
- package/content/integrations/crm.json +6 -3
- package/content/integrations/deploy-github.json +2 -1
- package/content/integrations/gmail.json +16 -6
- package/content/integrations/linkedin.json +75 -16
- package/content/integrations/records.json +76 -14
- package/dist/mcp-server/http.mjs +169 -27
- package/dist/ui/assets/index-DIcuh0I4.css +1 -0
- package/dist/ui/assets/index-Dl5isaOV.js +105 -0
- package/dist/ui/index.html +2 -2
- package/dist/ui/mockups/audit-and-header.html +192 -0
- package/node_modules/@hap/core/dist/index.d.mts +117 -6
- package/node_modules/@hap/core/dist/index.d.ts +117 -6
- package/node_modules/@hap/core/dist/index.js +93 -0
- package/node_modules/@hap/core/dist/index.mjs +88 -0
- package/node_modules/@hap/core/package.json +1 -1
- package/node_modules/@hap/core/src/content-binding.ts +168 -0
- package/node_modules/@hap/core/src/types.ts +62 -5
- package/node_modules/jose/dist/webapi/jwe/general/decrypt.js +8 -0
- package/node_modules/jose/dist/webapi/jwe/general/encrypt.js +1 -1
- package/node_modules/jose/dist/webapi/jwks/local.js +3 -3
- package/node_modules/jose/dist/webapi/jwks/remote.js +1 -1
- package/node_modules/jose/dist/webapi/key/generate_key_pair.js +3 -3
- package/node_modules/jose/dist/webapi/key/generate_secret.js +2 -2
- package/node_modules/jose/dist/webapi/lib/asn1.js +3 -3
- package/node_modules/jose/dist/webapi/lib/jwe_algorithms.js +6 -15
- package/node_modules/jose/dist/webapi/lib/jws_algorithms.js +2 -5
- package/node_modules/jose/dist/webapi/lib/key.js +1 -1
- package/node_modules/jose/dist/webapi/lib/key_algorithm.js +8 -8
- package/node_modules/jose/package.json +1 -1
- package/package.json +2 -2
- package/profiles/email/0.5.profile.json +200 -0
- package/profiles/index.json +1 -0
- package/dist/ui/assets/index-DoZvxHLN.js +0 -105
- package/dist/ui/assets/index-JHaCddDE.css +0 -1
|
@@ -49,7 +49,7 @@ function pbes2() {
|
|
|
49
49
|
ops: ['deriveBits', 'deriveBits'],
|
|
50
50
|
};
|
|
51
51
|
}
|
|
52
|
-
const JWE = table({
|
|
52
|
+
export const JWE = table({
|
|
53
53
|
dir: {
|
|
54
54
|
kty: ['oct'],
|
|
55
55
|
secret: true,
|
|
@@ -96,21 +96,12 @@ const ENC = table({
|
|
|
96
96
|
'A192CBC-HS384': contentEncryption(384, true),
|
|
97
97
|
'A256CBC-HS512': contentEncryption(512, true),
|
|
98
98
|
});
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
const entry = JWE[alg];
|
|
102
|
-
if (!entry) {
|
|
103
|
-
throw new JOSENotSupported(unsupportedAlg);
|
|
104
|
-
}
|
|
105
|
-
return entry;
|
|
99
|
+
function unsupported(parameter, name) {
|
|
100
|
+
throw new JOSENotSupported(`Invalid or unsupported "${parameter}" (JWE ${name}) header value`);
|
|
106
101
|
}
|
|
107
|
-
export function
|
|
108
|
-
return JWE[alg];
|
|
102
|
+
export function jweAlgorithm(alg) {
|
|
103
|
+
return (typeof alg === 'string' ? JWE[alg] : undefined) ?? unsupported('alg', 'Algorithm');
|
|
109
104
|
}
|
|
110
105
|
export function jweEncryption(enc) {
|
|
111
|
-
|
|
112
|
-
if (!entry) {
|
|
113
|
-
throw new JOSENotSupported(`Unsupported JWE Algorithm: ${enc}`);
|
|
114
|
-
}
|
|
115
|
-
return entry;
|
|
106
|
+
return ((typeof enc === 'string' ? ENC[enc] : undefined) ?? unsupported('enc', 'Encryption Algorithm'));
|
|
116
107
|
}
|
|
@@ -45,7 +45,7 @@ function mldsa(bits) {
|
|
|
45
45
|
usages: sig,
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
|
-
const JWS = table({
|
|
48
|
+
export const JWS = table({
|
|
49
49
|
HS256: hmac(256),
|
|
50
50
|
HS384: hmac(384),
|
|
51
51
|
HS512: hmac(512),
|
|
@@ -65,12 +65,9 @@ const JWS = table({
|
|
|
65
65
|
'ML-DSA-87': mldsa(87),
|
|
66
66
|
});
|
|
67
67
|
export function jwsAlgorithm(alg) {
|
|
68
|
-
const entry = JWS[alg];
|
|
68
|
+
const entry = typeof alg === 'string' ? JWS[alg] : undefined;
|
|
69
69
|
if (!entry) {
|
|
70
70
|
throw new JOSENotSupported(`alg ${alg} is not supported either by JOSE or your javascript runtime`);
|
|
71
71
|
}
|
|
72
72
|
return entry;
|
|
73
73
|
}
|
|
74
|
-
export function maybeJWSAlgorithm(alg) {
|
|
75
|
-
return JWS[alg];
|
|
76
|
-
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { JOSENotSupported } from '../util/errors.js';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
return
|
|
2
|
+
import { JWS } from './jws_algorithms.js';
|
|
3
|
+
import { JWE } from './jwe_algorithms.js';
|
|
4
|
+
export const algArgument = '"alg" (Algorithm)';
|
|
5
|
+
export function unsupportedAlg(source = 'JWK "alg" (Algorithm) Parameter') {
|
|
6
|
+
throw new JOSENotSupported(`Invalid or unsupported ${source} value`);
|
|
7
|
+
}
|
|
8
|
+
export function keyAlgorithm(alg, source) {
|
|
9
|
+
return (typeof alg === 'string' ? (JWS[alg] ?? JWE[alg]) : undefined) ?? unsupportedAlg(source);
|
|
10
10
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@suveren/gateway",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.3",
|
|
4
4
|
"description": "Suveren gateway — local agent gateway built in compliance with the Human Agency Protocol (HAP). Runs the UI, control plane, and MCP server in one Node process.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "server.js",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"node": ">=20"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@hap/core": "npm:@humanagencyp/hap-core@^0.8.
|
|
27
|
+
"@hap/core": "npm:@humanagencyp/hap-core@^0.8.1",
|
|
28
28
|
"@hpke/core": "^1.9.0",
|
|
29
29
|
"express": "^4.18.0",
|
|
30
30
|
"http-proxy-middleware": "^3.0.0",
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "github.com/humanagencyprotocol/hap-profiles/email@0.5",
|
|
3
|
+
"name": "Email",
|
|
4
|
+
"version": "0.5",
|
|
5
|
+
"description": "Email authority — governs sending, drafting, and reading email via Gmail",
|
|
6
|
+
"whatsNew": "Binds the recipients to the receipt, not only the message body — an approved message can no longer be delivered to someone else without breaking the proof.",
|
|
7
|
+
"boundsSchema": {
|
|
8
|
+
"keyOrder": [
|
|
9
|
+
"profile",
|
|
10
|
+
"recipient_max",
|
|
11
|
+
"send_daily_max",
|
|
12
|
+
"read_max_age_days",
|
|
13
|
+
"read_daily_max"
|
|
14
|
+
],
|
|
15
|
+
"fields": {
|
|
16
|
+
"profile": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"required": true
|
|
19
|
+
},
|
|
20
|
+
"recipient_max": {
|
|
21
|
+
"type": "number",
|
|
22
|
+
"required": false,
|
|
23
|
+
"displayName": "Recipients per email",
|
|
24
|
+
"description": "Maximum recipients per email",
|
|
25
|
+
"unit": "count",
|
|
26
|
+
"boundType": {
|
|
27
|
+
"kind": "per_transaction",
|
|
28
|
+
"of": "recipient_count"
|
|
29
|
+
},
|
|
30
|
+
"paths": [
|
|
31
|
+
"email-send",
|
|
32
|
+
"email-draft"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
"send_daily_max": {
|
|
36
|
+
"type": "number",
|
|
37
|
+
"required": false,
|
|
38
|
+
"displayName": "Daily send limit",
|
|
39
|
+
"description": "Maximum emails sent or drafted per day",
|
|
40
|
+
"unit": "count",
|
|
41
|
+
"boundType": {
|
|
42
|
+
"kind": "cumulative_count",
|
|
43
|
+
"window": "daily"
|
|
44
|
+
},
|
|
45
|
+
"paths": [
|
|
46
|
+
"email-send",
|
|
47
|
+
"email-draft"
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
"read_max_age_days": {
|
|
51
|
+
"type": "number",
|
|
52
|
+
"required": false,
|
|
53
|
+
"displayName": "Max email age (days)",
|
|
54
|
+
"description": "Maximum age in days for email search. Enforced locally by the Gatekeeper, never by the Authority Server: reads carry no receipt, so no signed check ever reads this value. Set it on the integration instead, where it is live-editable. Kept in the schema as the fallback for grants issued before that setting existed.",
|
|
55
|
+
"unit": "days",
|
|
56
|
+
"enforcedBy": "gatekeeper",
|
|
57
|
+
"boundType": {
|
|
58
|
+
"kind": "per_transaction",
|
|
59
|
+
"of": "read_age_days"
|
|
60
|
+
},
|
|
61
|
+
"paths": [
|
|
62
|
+
"email-read"
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
"read_daily_max": {
|
|
66
|
+
"type": "number",
|
|
67
|
+
"required": false,
|
|
68
|
+
"displayName": "Daily read limit",
|
|
69
|
+
"description": "Not currently enforced: reads carry no receipt, so no component counts them. Hidden from the authorization editor until enforcement exists.",
|
|
70
|
+
"unit": "count",
|
|
71
|
+
"boundType": {
|
|
72
|
+
"kind": "cumulative_count",
|
|
73
|
+
"window": "daily"
|
|
74
|
+
},
|
|
75
|
+
"paths": [
|
|
76
|
+
"email-read"
|
|
77
|
+
],
|
|
78
|
+
"enforced": false
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"contextSchema": {
|
|
83
|
+
"keyOrder": [
|
|
84
|
+
"allowed_recipients",
|
|
85
|
+
"allowed_domains"
|
|
86
|
+
],
|
|
87
|
+
"fields": {
|
|
88
|
+
"allowed_recipients": {
|
|
89
|
+
"type": "string",
|
|
90
|
+
"required": false,
|
|
91
|
+
"displayName": "Allowed recipients",
|
|
92
|
+
"format": "email",
|
|
93
|
+
"description": "Comma-separated list of allowed email addresses",
|
|
94
|
+
"constraint": {
|
|
95
|
+
"type": "string",
|
|
96
|
+
"enforceable": [
|
|
97
|
+
"subset"
|
|
98
|
+
],
|
|
99
|
+
"requiredFor": [
|
|
100
|
+
"send"
|
|
101
|
+
]
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"allowed_domains": {
|
|
105
|
+
"type": "string",
|
|
106
|
+
"required": false,
|
|
107
|
+
"displayName": "Allowed domains",
|
|
108
|
+
"format": "domain",
|
|
109
|
+
"description": "Comma-separated list of allowed recipient domains (e.g. acme.com,partner.org)",
|
|
110
|
+
"constraint": {
|
|
111
|
+
"type": "string",
|
|
112
|
+
"enforceable": [
|
|
113
|
+
"subset"
|
|
114
|
+
],
|
|
115
|
+
"requiredFor": [
|
|
116
|
+
"send"
|
|
117
|
+
]
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
"executionContextSchema": {
|
|
123
|
+
"fields": {
|
|
124
|
+
"recipient_count": {
|
|
125
|
+
"source": "declared",
|
|
126
|
+
"description": "Number of recipients in this email",
|
|
127
|
+
"required": true,
|
|
128
|
+
"constraint": {
|
|
129
|
+
"type": "number",
|
|
130
|
+
"enforceable": [
|
|
131
|
+
"max"
|
|
132
|
+
]
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"allowed_recipients": {
|
|
136
|
+
"source": "declared",
|
|
137
|
+
"description": "Comma-separated recipient addresses from this call (checked against context)",
|
|
138
|
+
"required": false,
|
|
139
|
+
"constraint": {
|
|
140
|
+
"type": "string",
|
|
141
|
+
"enforceable": [
|
|
142
|
+
"subset"
|
|
143
|
+
]
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
"allowed_domains": {
|
|
147
|
+
"source": "declared",
|
|
148
|
+
"description": "Comma-separated unique recipient domains from this call (checked against context)",
|
|
149
|
+
"required": false,
|
|
150
|
+
"constraint": {
|
|
151
|
+
"type": "string",
|
|
152
|
+
"enforceable": [
|
|
153
|
+
"subset"
|
|
154
|
+
]
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
"send_count_daily": {
|
|
158
|
+
"source": "cumulative",
|
|
159
|
+
"cumulativeField": "_count",
|
|
160
|
+
"window": "daily",
|
|
161
|
+
"description": "Running daily send/draft count (resolved from execution log)",
|
|
162
|
+
"required": true,
|
|
163
|
+
"constraint": {
|
|
164
|
+
"type": "number",
|
|
165
|
+
"enforceable": [
|
|
166
|
+
"max"
|
|
167
|
+
]
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
"requiredGates": [
|
|
173
|
+
"bounds",
|
|
174
|
+
"intent",
|
|
175
|
+
"commitment",
|
|
176
|
+
"decision_owner"
|
|
177
|
+
],
|
|
178
|
+
"ttl": {
|
|
179
|
+
"default": 86400,
|
|
180
|
+
"max": 31536000
|
|
181
|
+
},
|
|
182
|
+
"retention_minimum": 7776000,
|
|
183
|
+
"content_binding": {
|
|
184
|
+
"version": "2",
|
|
185
|
+
"kind": "jcs",
|
|
186
|
+
"fields": [
|
|
187
|
+
"to",
|
|
188
|
+
"cc",
|
|
189
|
+
"subject",
|
|
190
|
+
"body"
|
|
191
|
+
],
|
|
192
|
+
"required_fields": [
|
|
193
|
+
"to",
|
|
194
|
+
"body"
|
|
195
|
+
],
|
|
196
|
+
"appliesTo": [
|
|
197
|
+
"send"
|
|
198
|
+
]
|
|
199
|
+
}
|
|
200
|
+
}
|
package/profiles/index.json
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
"github.com/humanagencyprotocol/hap-profiles/charge@0.4": "charge/0.4.profile.json",
|
|
5
5
|
"github.com/humanagencyprotocol/hap-profiles/purchase@0.4": "purchase/0.4.profile.json",
|
|
6
6
|
"github.com/humanagencyprotocol/hap-profiles/email@0.4": "email/0.4.profile.json",
|
|
7
|
+
"github.com/humanagencyprotocol/hap-profiles/email@0.5": "email/0.5.profile.json",
|
|
7
8
|
"github.com/humanagencyprotocol/hap-profiles/customers@0.4": "customers/0.4.profile.json",
|
|
8
9
|
"github.com/humanagencyprotocol/hap-profiles/customers@0.5": "customers/0.5.profile.json",
|
|
9
10
|
"github.com/humanagencyprotocol/hap-profiles/customers@0.6": "customers/0.6.profile.json",
|