@suveren/gateway 0.4.1 → 0.6.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/bin/suveren-gateway.js +86 -5
- package/content/integrations/calendar.json +116 -22
- package/content/integrations/deploy-github.json +164 -0
- package/content/integrations/gmail.json +13 -4
- package/content/integrations/index.json +2 -1
- package/dist/control-plane/index.mjs +84 -7
- package/dist/mcp-server/http.mjs +147 -21
- package/dist/ui/assets/index-DecSrutK.js +105 -0
- package/dist/ui/index.html +1 -1
- package/node_modules/@hap/core/dist/index.d.mts +21 -0
- package/node_modules/@hap/core/dist/index.d.ts +21 -0
- package/node_modules/@hap/core/dist/index.js +17 -0
- package/node_modules/@hap/core/dist/index.mjs +17 -0
- package/node_modules/@hap/core/package.json +1 -1
- package/node_modules/@hap/core/src/gatekeeper.ts +28 -0
- package/node_modules/@hap/core/src/types.ts +21 -0
- package/node_modules/fast-uri/index.js +37 -1
- package/node_modules/fast-uri/package.json +1 -1
- package/node_modules/fast-uri/test/security.test.js +136 -0
- package/node_modules/hono/dist/cjs/helper/proxy/index.js +4 -0
- package/node_modules/hono/dist/cjs/jsx/base.js +1 -9
- package/node_modules/hono/dist/cjs/jsx/hooks/index.js +14 -11
- package/node_modules/hono/dist/cjs/middleware/cors/index.js +1 -1
- package/node_modules/hono/dist/cjs/middleware/language/language.js +10 -6
- package/node_modules/hono/dist/cjs/utils/cookie.js +2 -1
- package/node_modules/hono/dist/helper/proxy/index.js +4 -0
- package/node_modules/hono/dist/jsx/base.js +1 -9
- package/node_modules/hono/dist/jsx/hooks/index.js +14 -11
- package/node_modules/hono/dist/middleware/cors/index.js +1 -1
- package/node_modules/hono/dist/middleware/language/language.js +10 -6
- package/node_modules/hono/dist/utils/cookie.js +2 -1
- package/node_modules/hono/package.json +2 -3
- package/node_modules/ip-address/README.md +142 -128
- package/node_modules/ip-address/dist/common.d.ts +6 -0
- package/node_modules/ip-address/dist/common.js +17 -1
- package/node_modules/ip-address/dist/common.js.map +1 -1
- package/node_modules/ip-address/dist/ipv4.js +3 -12
- package/node_modules/ip-address/dist/ipv4.js.map +1 -1
- package/node_modules/ip-address/dist/ipv6.d.ts +9 -2
- package/node_modules/ip-address/dist/ipv6.js +35 -16
- package/node_modules/ip-address/dist/ipv6.js.map +1 -1
- package/node_modules/ip-address/package.json +5 -3
- package/node_modules/jose/README.md +13 -13
- package/node_modules/jose/dist/types/index.d.ts +6 -5
- package/node_modules/jose/dist/types/jwe/compact/decrypt.d.ts +17 -11
- package/node_modules/jose/dist/types/jwe/compact/encrypt.d.ts +7 -19
- package/node_modules/jose/dist/types/jwe/flattened/decrypt.d.ts +17 -11
- package/node_modules/jose/dist/types/jwe/flattened/encrypt.d.ts +7 -19
- package/node_modules/jose/dist/types/jwe/general/decrypt.d.ts +18 -13
- package/node_modules/jose/dist/types/jwe/general/encrypt.d.ts +20 -21
- package/node_modules/jose/dist/types/jwk/embedded.d.ts +8 -12
- package/node_modules/jose/dist/types/jwk/thumbprint.d.ts +0 -15
- package/node_modules/jose/dist/types/jwks/local.d.ts +12 -21
- package/node_modules/jose/dist/types/jwks/remote.d.ts +34 -165
- package/node_modules/jose/dist/types/jws/compact/sign.d.ts +2 -13
- package/node_modules/jose/dist/types/jws/compact/verify.d.ts +17 -13
- package/node_modules/jose/dist/types/jws/flattened/sign.d.ts +2 -13
- package/node_modules/jose/dist/types/jws/flattened/verify.d.ts +17 -13
- package/node_modules/jose/dist/types/jws/general/sign.d.ts +16 -17
- package/node_modules/jose/dist/types/jws/general/verify.d.ts +18 -15
- package/node_modules/jose/dist/types/jwt/decrypt.d.ts +17 -11
- package/node_modules/jose/dist/types/jwt/encrypt.d.ts +10 -34
- package/node_modules/jose/dist/types/jwt/sign.d.ts +2 -13
- package/node_modules/jose/dist/types/jwt/unsecured.d.ts +4 -13
- package/node_modules/jose/dist/types/jwt/verify.d.ts +14 -13
- package/node_modules/jose/dist/types/key/export.d.ts +0 -14
- package/node_modules/jose/dist/types/key/generate_key_pair.d.ts +7 -14
- package/node_modules/jose/dist/types/key/generate_secret.d.ts +16 -14
- package/node_modules/jose/dist/types/key/import.d.ts +18 -28
- package/node_modules/jose/dist/types/types.d.ts +239 -222
- package/node_modules/jose/dist/types/util/base64url.d.ts +11 -4
- package/node_modules/jose/dist/types/util/decode_jwt.d.ts +1 -9
- package/node_modules/jose/dist/types/util/decode_protected_header.d.ts +0 -8
- package/node_modules/jose/dist/types/util/errors.d.ts +128 -121
- package/node_modules/jose/dist/webapi/jwe/compact/decrypt.js +4 -22
- package/node_modules/jose/dist/webapi/jwe/flattened/decrypt.js +5 -153
- package/node_modules/jose/dist/webapi/jwe/flattened/encrypt.js +16 -111
- package/node_modules/jose/dist/webapi/jwe/general/decrypt.js +15 -3
- package/node_modules/jose/dist/webapi/jwe/general/encrypt.js +65 -81
- package/node_modules/jose/dist/webapi/jwk/embedded.js +5 -3
- package/node_modules/jose/dist/webapi/jwks/local.js +31 -72
- package/node_modules/jose/dist/webapi/jwks/remote.js +19 -28
- package/node_modules/jose/dist/webapi/jws/compact/sign.js +5 -2
- package/node_modules/jose/dist/webapi/jws/compact/verify.js +4 -16
- package/node_modules/jose/dist/webapi/jws/flattened/sign.js +7 -65
- package/node_modules/jose/dist/webapi/jws/flattened/verify.js +3 -89
- package/node_modules/jose/dist/webapi/jws/general/sign.js +19 -15
- package/node_modules/jose/dist/webapi/jws/general/verify.js +29 -9
- package/node_modules/jose/dist/webapi/jwt/decrypt.js +5 -5
- package/node_modules/jose/dist/webapi/jwt/sign.js +2 -3
- package/node_modules/jose/dist/webapi/jwt/unsecured.js +4 -3
- package/node_modules/jose/dist/webapi/jwt/verify.js +6 -6
- package/node_modules/jose/dist/webapi/key/export.js +37 -4
- package/node_modules/jose/dist/webapi/key/generate_key_pair.js +33 -82
- package/node_modules/jose/dist/webapi/key/import.js +8 -8
- package/node_modules/jose/dist/webapi/lib/asn1.js +53 -122
- package/node_modules/jose/dist/webapi/lib/buffer_utils.js +1 -0
- package/node_modules/jose/dist/webapi/lib/content_encryption.js +34 -109
- package/node_modules/jose/dist/webapi/lib/crypto_key.js +18 -126
- package/node_modules/jose/dist/webapi/lib/helpers.js +23 -0
- package/node_modules/jose/dist/webapi/lib/invalid_key_input.js +0 -1
- package/node_modules/jose/dist/webapi/lib/jwe_algorithms.js +116 -0
- package/node_modules/jose/dist/webapi/lib/jwe_decrypt.js +186 -0
- package/node_modules/jose/dist/webapi/lib/jwe_encrypt.js +110 -0
- package/node_modules/jose/dist/webapi/lib/jwk_to_key.js +8 -98
- package/node_modules/jose/dist/webapi/lib/jws_algorithms.js +76 -0
- package/node_modules/jose/dist/webapi/lib/jws_sign.js +74 -0
- package/node_modules/jose/dist/webapi/lib/jws_verify.js +107 -0
- package/node_modules/jose/dist/webapi/lib/jwt_claims_set.js +68 -109
- package/node_modules/jose/dist/webapi/lib/key.js +132 -0
- package/node_modules/jose/dist/webapi/lib/key_algorithm.js +10 -0
- package/node_modules/jose/dist/webapi/lib/key_descriptor.js +7 -0
- package/node_modules/jose/dist/webapi/lib/key_management.js +162 -92
- package/node_modules/jose/dist/webapi/lib/options.js +48 -0
- package/node_modules/jose/dist/webapi/lib/signing.js +14 -56
- package/node_modules/jose/dist/webapi/lib/type_checks.js +13 -18
- package/node_modules/jose/dist/webapi/util/base64url.js +13 -4
- package/node_modules/jose/dist/webapi/util/decode_jwt.js +2 -2
- package/node_modules/jose/dist/webapi/util/decode_protected_header.js +5 -15
- package/node_modules/jose/dist/webapi/util/errors.js +1 -1
- package/node_modules/jose/package.json +2 -4
- package/package.json +2 -2
- package/profiles/deploy/0.6.profile.json +168 -0
- package/profiles/deploy/0.7.profile.json +168 -0
- package/profiles/email/0.4.profile.json +9 -2
- package/profiles/index.json +3 -1
- package/dist/ui/assets/index-Cog54HOo.js +0 -105
- package/node_modules/jose/dist/webapi/lib/aesgcmkw.js +0 -15
- package/node_modules/jose/dist/webapi/lib/aeskw.js +0 -25
- package/node_modules/jose/dist/webapi/lib/check_key_type.js +0 -122
- package/node_modules/jose/dist/webapi/lib/ecdhes.js +0 -52
- package/node_modules/jose/dist/webapi/lib/key_to_jwk.js +0 -34
- package/node_modules/jose/dist/webapi/lib/normalize_key.js +0 -166
- package/node_modules/jose/dist/webapi/lib/pbes2kw.js +0 -42
- package/node_modules/jose/dist/webapi/lib/rsaes.js +0 -24
- package/node_modules/jose/dist/webapi/lib/validate_algorithms.js +0 -10
- package/node_modules/jose/dist/webapi/lib/validate_crit.js +0 -33
|
@@ -1,21 +1,30 @@
|
|
|
1
1
|
import { encoder, decoder } from '../lib/buffer_utils.js';
|
|
2
2
|
import { encodeBase64, decodeBase64 } from '../lib/base64.js';
|
|
3
|
+
const invalid = 'The input to be decoded is not correctly encoded.';
|
|
3
4
|
export function decode(input) {
|
|
4
5
|
if (Uint8Array.fromBase64) {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
try {
|
|
7
|
+
return Uint8Array.fromBase64(typeof input === 'string' ? input : decoder.decode(input), {
|
|
8
|
+
alphabet: 'base64url',
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
catch (cause) {
|
|
12
|
+
throw new TypeError(invalid, { cause });
|
|
13
|
+
}
|
|
8
14
|
}
|
|
9
15
|
let encoded = input;
|
|
10
16
|
if (encoded instanceof Uint8Array) {
|
|
11
17
|
encoded = decoder.decode(encoded);
|
|
12
18
|
}
|
|
19
|
+
if (encoded.includes('+') || encoded.includes('/')) {
|
|
20
|
+
throw new TypeError(invalid);
|
|
21
|
+
}
|
|
13
22
|
encoded = encoded.replace(/-/g, '+').replace(/_/g, '/');
|
|
14
23
|
try {
|
|
15
24
|
return decodeBase64(encoded);
|
|
16
25
|
}
|
|
17
26
|
catch {
|
|
18
|
-
throw new TypeError(
|
|
27
|
+
throw new TypeError(invalid);
|
|
19
28
|
}
|
|
20
29
|
}
|
|
21
30
|
export function encode(input) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { decode as b64u } from './base64url.js';
|
|
2
|
-
import {
|
|
2
|
+
import { strictDecoder } from '../lib/buffer_utils.js';
|
|
3
3
|
import { isObject } from '../lib/type_checks.js';
|
|
4
4
|
import { JWTInvalid } from './errors.js';
|
|
5
5
|
export function decodeJwt(jwt) {
|
|
@@ -21,7 +21,7 @@ export function decodeJwt(jwt) {
|
|
|
21
21
|
}
|
|
22
22
|
let result;
|
|
23
23
|
try {
|
|
24
|
-
result = JSON.parse(
|
|
24
|
+
result = JSON.parse(strictDecoder.decode(decoded));
|
|
25
25
|
}
|
|
26
26
|
catch {
|
|
27
27
|
throw new JWTInvalid('Failed to parse the decoded payload as JSON');
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { decoder } from '../lib/buffer_utils.js';
|
|
3
|
-
import { isObject } from '../lib/type_checks.js';
|
|
1
|
+
import { parseJoseHeader } from '../lib/helpers.js';
|
|
4
2
|
export function decodeProtectedHeader(token) {
|
|
5
3
|
let protectedB64u;
|
|
6
4
|
if (typeof token === 'string') {
|
|
@@ -18,17 +16,9 @@ export function decodeProtectedHeader(token) {
|
|
|
18
16
|
throw new TypeError('Token does not contain a Protected Header');
|
|
19
17
|
}
|
|
20
18
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
const result = JSON.parse(decoder.decode(b64u(protectedB64u)));
|
|
26
|
-
if (!isObject(result)) {
|
|
27
|
-
throw new Error();
|
|
28
|
-
}
|
|
29
|
-
return result;
|
|
30
|
-
}
|
|
31
|
-
catch {
|
|
32
|
-
throw new TypeError('Invalid Token or Protected Header formatting');
|
|
19
|
+
const invalid = 'Invalid Token or Protected Header formatting';
|
|
20
|
+
if (typeof protectedB64u !== 'string' || !protectedB64u) {
|
|
21
|
+
throw new TypeError(invalid);
|
|
33
22
|
}
|
|
23
|
+
return parseJoseHeader(protectedB64u, TypeError, invalid);
|
|
34
24
|
}
|
|
@@ -76,7 +76,7 @@ export class JWKSNoMatchingKey extends JOSEError {
|
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
export class JWKSMultipleMatchingKeys extends JOSEError {
|
|
79
|
-
[Symbol.asyncIterator];
|
|
79
|
+
[Symbol.asyncIterator] = async function* () { };
|
|
80
80
|
static code = 'ERR_JWKS_MULTIPLE_MATCHING_KEYS';
|
|
81
81
|
code = 'ERR_JWKS_MULTIPLE_MATCHING_KEYS';
|
|
82
82
|
constructor(message = 'multiple matching keys found in the JSON Web Key Set', options) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jose",
|
|
3
|
-
"version": "6.2.
|
|
3
|
+
"version": "6.2.7",
|
|
4
4
|
"description": "JWA, JWS, JWE, JWT, JWK, JWKS for Node.js, Browser, Cloudflare Workers, Deno, Bun, and other Web-interoperable runtimes",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"akp",
|
|
@@ -193,8 +193,6 @@
|
|
|
193
193
|
"!dist/**/*.bundle.js",
|
|
194
194
|
"!dist/**/*.umd.js",
|
|
195
195
|
"!dist/**/*.min.js",
|
|
196
|
-
"!dist/types/
|
|
197
|
-
"!dist/types/lib/*",
|
|
198
|
-
"!dist/deno/**/*"
|
|
196
|
+
"!dist/types/lib/**"
|
|
199
197
|
]
|
|
200
198
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@suveren/gateway",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
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.
|
|
27
|
+
"@hap/core": "npm:@humanagencyp/hap-core@^0.8.0",
|
|
28
28
|
"@hpke/core": "^1.9.0",
|
|
29
29
|
"express": "^4.18.0",
|
|
30
30
|
"http-proxy-middleware": "^3.0.0",
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "github.com/humanagencyprotocol/hap-profiles/deploy@0.6",
|
|
3
|
+
"name": "Deploy",
|
|
4
|
+
"version": "0.6",
|
|
5
|
+
"description": "Authority to put software live. Successor to deploy-gate@0.2, HAP's first profile \u2014 renamed because the old id is bound to a structure (flat frame, disclosure_hash) that no longer exists. Deliberately host-agnostic: every deployment system has something to deploy, somewhere to put it, a rate worth capping and a notion of undo. Provider vocabulary (GitHub 'environment', Vercel 'target', Netlify 'context') lives in the connector manifest, never here.",
|
|
6
|
+
"boundsSchema": {
|
|
7
|
+
"keyOrder": [
|
|
8
|
+
"profile",
|
|
9
|
+
"deploy_daily_max",
|
|
10
|
+
"rollback_allowed"
|
|
11
|
+
],
|
|
12
|
+
"fields": {
|
|
13
|
+
"profile": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"required": true
|
|
16
|
+
},
|
|
17
|
+
"deploy_daily_max": {
|
|
18
|
+
"type": "number",
|
|
19
|
+
"required": true,
|
|
20
|
+
"displayName": "Daily deploy limit",
|
|
21
|
+
"description": "Maximum deployments per day. Counted by the Authority Server, so a compromised gateway cannot exceed it.",
|
|
22
|
+
"unit": "count",
|
|
23
|
+
"boundType": {
|
|
24
|
+
"kind": "cumulative_count",
|
|
25
|
+
"window": "daily"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"rollback_allowed": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"required": true,
|
|
31
|
+
"displayName": "Rollback",
|
|
32
|
+
"description": "Whether the agent may revert to a previous release. Rollback is a separate action type from deploy: undoing a release carries different risk from making one.",
|
|
33
|
+
"enum": [
|
|
34
|
+
"yes",
|
|
35
|
+
"no"
|
|
36
|
+
],
|
|
37
|
+
"boundType": {
|
|
38
|
+
"kind": "enum",
|
|
39
|
+
"values": [
|
|
40
|
+
"yes",
|
|
41
|
+
"no"
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"contextSchema": {
|
|
48
|
+
"keyOrder": [
|
|
49
|
+
"allowed_repos",
|
|
50
|
+
"allowed_environments",
|
|
51
|
+
"allowed_workflows",
|
|
52
|
+
"allowed_branches"
|
|
53
|
+
],
|
|
54
|
+
"fields": {
|
|
55
|
+
"allowed_repos": {
|
|
56
|
+
"type": "string",
|
|
57
|
+
"required": true,
|
|
58
|
+
"displayName": "Allowed repositories",
|
|
59
|
+
"description": "Repositories the agent may deploy from, e.g. humanagencyprotocol/hap",
|
|
60
|
+
"constraint": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"enforceable": [
|
|
63
|
+
"subset"
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"allowed_environments": {
|
|
68
|
+
"type": "string",
|
|
69
|
+
"required": true,
|
|
70
|
+
"displayName": "Allowed environments",
|
|
71
|
+
"description": "Deployment targets the agent may reach. Deliberately NOT an enum: hosts disagree \u2014 GitHub uses names you define, Vercel has production and preview, Netlify has deploy-preview and branch-deploy. The connector discovers the real list.",
|
|
72
|
+
"constraint": {
|
|
73
|
+
"type": "string",
|
|
74
|
+
"enforceable": [
|
|
75
|
+
"subset"
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"allowed_workflows": {
|
|
80
|
+
"type": "string",
|
|
81
|
+
"required": true,
|
|
82
|
+
"displayName": "Allowed pipelines",
|
|
83
|
+
"description": "Named pipelines the agent may run, e.g. deploy.yml. Scoping by pipeline rather than by 'deploy' means adding CI later \u2014 a migration, an infrastructure apply \u2014 is an edit to this list, not a new profile. The limit of this approach: the grant knows a pipeline is permitted, not what it does. The name has to carry that meaning to the human signing.",
|
|
84
|
+
"constraint": {
|
|
85
|
+
"type": "string",
|
|
86
|
+
"enforceable": [
|
|
87
|
+
"subset"
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"allowed_branches": {
|
|
92
|
+
"type": "string",
|
|
93
|
+
"required": false,
|
|
94
|
+
"displayName": "Allowed branches",
|
|
95
|
+
"description": "Branches a deployable commit may come from. Optional: a host with no branch concept leaves it empty.",
|
|
96
|
+
"constraint": {
|
|
97
|
+
"type": "string",
|
|
98
|
+
"enforceable": [
|
|
99
|
+
"subset"
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
"executionContextSchema": {
|
|
106
|
+
"fields": {
|
|
107
|
+
"action_type": {
|
|
108
|
+
"source": "static",
|
|
109
|
+
"description": "deploy or rollback \u2014 declared by the manifest, never taken from an agent argument",
|
|
110
|
+
"required": true,
|
|
111
|
+
"constraint": {
|
|
112
|
+
"type": "string",
|
|
113
|
+
"enforceable": [
|
|
114
|
+
"equals"
|
|
115
|
+
]
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"allowed_repos": {
|
|
119
|
+
"source": "declared",
|
|
120
|
+
"description": "Repository this action targets, checked against the authorized set",
|
|
121
|
+
"required": true,
|
|
122
|
+
"constraint": {
|
|
123
|
+
"type": "string",
|
|
124
|
+
"enforceable": [
|
|
125
|
+
"subset"
|
|
126
|
+
]
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"allowed_environments": {
|
|
130
|
+
"source": "declared",
|
|
131
|
+
"description": "Environment this action targets, checked against the authorized set. Recorded in the receipt, so the proof names where the release went.",
|
|
132
|
+
"required": true,
|
|
133
|
+
"constraint": {
|
|
134
|
+
"type": "string",
|
|
135
|
+
"enforceable": [
|
|
136
|
+
"subset"
|
|
137
|
+
]
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"allowed_workflows": {
|
|
141
|
+
"source": "declared",
|
|
142
|
+
"description": "Pipeline this action runs, checked against the authorized set. Recorded in the receipt, so the proof names what ran.",
|
|
143
|
+
"required": true,
|
|
144
|
+
"constraint": {
|
|
145
|
+
"type": "string",
|
|
146
|
+
"enforceable": [
|
|
147
|
+
"subset"
|
|
148
|
+
]
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
"requiredGates": [
|
|
154
|
+
"bounds",
|
|
155
|
+
"intent",
|
|
156
|
+
"commitment",
|
|
157
|
+
"decision_owner"
|
|
158
|
+
],
|
|
159
|
+
"ttl": {
|
|
160
|
+
"default": 2592000,
|
|
161
|
+
"max": 31536000
|
|
162
|
+
},
|
|
163
|
+
"retention_minimum": 7776000,
|
|
164
|
+
"content_binding": {
|
|
165
|
+
"version": "1",
|
|
166
|
+
"kind": "text"
|
|
167
|
+
}
|
|
168
|
+
}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "github.com/humanagencyprotocol/hap-profiles/deploy@0.7",
|
|
3
|
+
"name": "Deploy",
|
|
4
|
+
"version": "0.7",
|
|
5
|
+
"description": "Authority to make an already-built version live. Successor to deploy@0.6, which gated 'build and deploy this commit'; this gates the act of putting something in front of real users, because building is not consequential and going live is. The action is a RELEASE: it activates bytes that already exist, so the human can look at the artifact before approving and no rebuild can diverge from what was approved. Host-agnostic — the artifact identifier is a Vercel deployment id, a container image digest, an Azure slot — named by the connector manifest, never here.",
|
|
6
|
+
"boundsSchema": {
|
|
7
|
+
"keyOrder": [
|
|
8
|
+
"profile",
|
|
9
|
+
"release_daily_max",
|
|
10
|
+
"rollback_allowed"
|
|
11
|
+
],
|
|
12
|
+
"fields": {
|
|
13
|
+
"profile": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"required": true
|
|
16
|
+
},
|
|
17
|
+
"release_daily_max": {
|
|
18
|
+
"type": "number",
|
|
19
|
+
"required": true,
|
|
20
|
+
"displayName": "Times per day something may go live",
|
|
21
|
+
"description": "How often the agent may make a build live for real users. Counted by the Authority Server, so a compromised gateway cannot exceed it. Building a preview is NOT counted: previews harm nobody, and charging them against this limit would exhaust it before anything reached anyone.",
|
|
22
|
+
"unit": "count",
|
|
23
|
+
"boundType": {
|
|
24
|
+
"kind": "cumulative_count",
|
|
25
|
+
"window": "daily"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"rollback_allowed": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"required": true,
|
|
31
|
+
"displayName": "May put a previous version back live",
|
|
32
|
+
"description": "Whether the agent may promote a PREVIOUS artifact back to live. Its own action type: reverting carries different risk from releasing, and the artifact being restored was approved for a moment that has passed.",
|
|
33
|
+
"enum": [
|
|
34
|
+
"yes",
|
|
35
|
+
"no"
|
|
36
|
+
],
|
|
37
|
+
"boundType": {
|
|
38
|
+
"kind": "enum",
|
|
39
|
+
"values": [
|
|
40
|
+
"yes",
|
|
41
|
+
"no"
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"contextSchema": {
|
|
48
|
+
"keyOrder": [
|
|
49
|
+
"allowed_repos",
|
|
50
|
+
"allowed_environments",
|
|
51
|
+
"allowed_workflows",
|
|
52
|
+
"allowed_branches"
|
|
53
|
+
],
|
|
54
|
+
"fields": {
|
|
55
|
+
"allowed_repos": {
|
|
56
|
+
"type": "string",
|
|
57
|
+
"required": true,
|
|
58
|
+
"displayName": "Allowed repositories",
|
|
59
|
+
"description": "Repositories the agent may deploy from, e.g. humanagencyprotocol/hap",
|
|
60
|
+
"constraint": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"enforceable": [
|
|
63
|
+
"subset"
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"allowed_environments": {
|
|
68
|
+
"type": "string",
|
|
69
|
+
"required": true,
|
|
70
|
+
"displayName": "Allowed environments",
|
|
71
|
+
"description": "Deployment targets the agent may reach. Deliberately NOT an enum: hosts disagree — GitHub uses names you define, Vercel has production and preview, Netlify has deploy-preview and branch-deploy. The connector discovers the real list.",
|
|
72
|
+
"constraint": {
|
|
73
|
+
"type": "string",
|
|
74
|
+
"enforceable": [
|
|
75
|
+
"subset"
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"allowed_workflows": {
|
|
80
|
+
"type": "string",
|
|
81
|
+
"required": true,
|
|
82
|
+
"displayName": "Allowed pipelines",
|
|
83
|
+
"description": "Named pipelines the agent may run, e.g. deploy.yml. Scoping by pipeline rather than by 'deploy' means adding CI later — a migration, an infrastructure apply — is an edit to this list, not a new profile. The limit of this approach: the grant knows a pipeline is permitted, not what it does. The name has to carry that meaning to the human signing.",
|
|
84
|
+
"constraint": {
|
|
85
|
+
"type": "string",
|
|
86
|
+
"enforceable": [
|
|
87
|
+
"subset"
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"allowed_branches": {
|
|
92
|
+
"type": "string",
|
|
93
|
+
"required": false,
|
|
94
|
+
"displayName": "Allowed branches",
|
|
95
|
+
"description": "Branches a deployable commit may come from. Optional: a host with no branch concept leaves it empty.",
|
|
96
|
+
"constraint": {
|
|
97
|
+
"type": "string",
|
|
98
|
+
"enforceable": [
|
|
99
|
+
"subset"
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
"executionContextSchema": {
|
|
106
|
+
"fields": {
|
|
107
|
+
"action_type": {
|
|
108
|
+
"source": "static",
|
|
109
|
+
"description": "release or rollback — declared by the manifest, never taken from an agent argument",
|
|
110
|
+
"required": true,
|
|
111
|
+
"constraint": {
|
|
112
|
+
"type": "string",
|
|
113
|
+
"enforceable": [
|
|
114
|
+
"equals"
|
|
115
|
+
]
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"allowed_repos": {
|
|
119
|
+
"source": "declared",
|
|
120
|
+
"description": "Repository this action targets, checked against the authorized set",
|
|
121
|
+
"required": true,
|
|
122
|
+
"constraint": {
|
|
123
|
+
"type": "string",
|
|
124
|
+
"enforceable": [
|
|
125
|
+
"subset"
|
|
126
|
+
]
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"allowed_environments": {
|
|
130
|
+
"source": "declared",
|
|
131
|
+
"description": "Environment this action targets, checked against the authorized set. Recorded in the receipt, so the proof names where the release went.",
|
|
132
|
+
"required": true,
|
|
133
|
+
"constraint": {
|
|
134
|
+
"type": "string",
|
|
135
|
+
"enforceable": [
|
|
136
|
+
"subset"
|
|
137
|
+
]
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"allowed_workflows": {
|
|
141
|
+
"source": "declared",
|
|
142
|
+
"description": "Pipeline this action runs, checked against the authorized set. Recorded in the receipt, so the proof names what ran.",
|
|
143
|
+
"required": true,
|
|
144
|
+
"constraint": {
|
|
145
|
+
"type": "string",
|
|
146
|
+
"enforceable": [
|
|
147
|
+
"subset"
|
|
148
|
+
]
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
"requiredGates": [
|
|
154
|
+
"bounds",
|
|
155
|
+
"intent",
|
|
156
|
+
"commitment",
|
|
157
|
+
"decision_owner"
|
|
158
|
+
],
|
|
159
|
+
"ttl": {
|
|
160
|
+
"default": 2592000,
|
|
161
|
+
"max": 31536000
|
|
162
|
+
},
|
|
163
|
+
"retention_minimum": 7776000,
|
|
164
|
+
"content_binding": {
|
|
165
|
+
"version": "1",
|
|
166
|
+
"kind": "text"
|
|
167
|
+
}
|
|
168
|
+
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"id": "github.com/humanagencyprotocol/hap-profiles/email@0.4",
|
|
3
3
|
"name": "Email",
|
|
4
4
|
"version": "0.4",
|
|
5
|
-
"description": "Email authority
|
|
5
|
+
"description": "Email authority \u2014 governs sending, drafting, and reading email via Gmail",
|
|
6
6
|
"boundsSchema": {
|
|
7
7
|
"keyOrder": [
|
|
8
8
|
"profile",
|
|
@@ -50,8 +50,9 @@
|
|
|
50
50
|
"type": "number",
|
|
51
51
|
"required": false,
|
|
52
52
|
"displayName": "Max email age (days)",
|
|
53
|
-
"description": "Maximum age in days for email search",
|
|
53
|
+
"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.",
|
|
54
54
|
"unit": "days",
|
|
55
|
+
"enforcedBy": "gatekeeper",
|
|
55
56
|
"boundType": {
|
|
56
57
|
"kind": "per_transaction",
|
|
57
58
|
"of": "read_age_days"
|
|
@@ -93,6 +94,9 @@
|
|
|
93
94
|
"type": "string",
|
|
94
95
|
"enforceable": [
|
|
95
96
|
"subset"
|
|
97
|
+
],
|
|
98
|
+
"requiredFor": [
|
|
99
|
+
"send"
|
|
96
100
|
]
|
|
97
101
|
}
|
|
98
102
|
},
|
|
@@ -106,6 +110,9 @@
|
|
|
106
110
|
"type": "string",
|
|
107
111
|
"enforceable": [
|
|
108
112
|
"subset"
|
|
113
|
+
],
|
|
114
|
+
"requiredFor": [
|
|
115
|
+
"send"
|
|
109
116
|
]
|
|
110
117
|
}
|
|
111
118
|
}
|
package/profiles/index.json
CHANGED
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
"github.com/humanagencyprotocol/hap-profiles/customers@0.6": "customers/0.6.profile.json",
|
|
10
10
|
"github.com/humanagencyprotocol/hap-profiles/calendar@0.4": "calendar/0.4.profile.json",
|
|
11
11
|
"github.com/humanagencyprotocol/hap-profiles/publish@0.4": "publish/0.4.profile.json",
|
|
12
|
-
"github.com/humanagencyprotocol/hap-profiles/records@0.4": "records/0.4.profile.json"
|
|
12
|
+
"github.com/humanagencyprotocol/hap-profiles/records@0.4": "records/0.4.profile.json",
|
|
13
|
+
"github.com/humanagencyprotocol/hap-profiles/deploy@0.6": "deploy/0.6.profile.json",
|
|
14
|
+
"github.com/humanagencyprotocol/hap-profiles/deploy@0.7": "deploy/0.7.profile.json"
|
|
13
15
|
}
|
|
14
16
|
}
|