@suveren/gateway 0.6.4 → 0.6.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -79,10 +79,10 @@
79
79
  "staticExecution": {
80
80
  "action_type": "release"
81
81
  },
82
- "contentField": "deployment_url",
82
+ "contentField": "commit",
83
83
  "actionLabel": "Deployment released",
84
84
  "argNormalization": {
85
- "deployment_url": "url"
85
+ "commit": "sha"
86
86
  }
87
87
  }
88
88
  }
@@ -1288,8 +1288,13 @@ function normalizeUrl(value) {
1288
1288
  const port2 = url.port && !defaultPort ? `:${url.port}` : "";
1289
1289
  return `${scheme}://${host}${port2}`;
1290
1290
  }
1291
+ function normalizeSha(value) {
1292
+ const trimmed = value.trim();
1293
+ return /^[0-9a-fA-F]{7,64}$/.test(trimmed) ? trimmed.toLowerCase() : value;
1294
+ }
1291
1295
  var NORMALIZERS = {
1292
- url: normalizeUrl
1296
+ url: normalizeUrl,
1297
+ sha: normalizeSha
1293
1298
  };
1294
1299
  function normalizeIncomingArgs(tool, args) {
1295
1300
  const declared = tool?.gating?.argNormalization;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@suveren/gateway",
3
- "version": "0.6.4",
3
+ "version": "0.6.5",
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",
@@ -0,0 +1,170 @@
1
+ {
2
+ "id": "github.com/humanagencyprotocol/hap-profiles/deploy@0.8",
3
+ "name": "Deploy",
4
+ "version": "0.8",
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
+ "receipt_lookup": true,
169
+ "whatsNew": "Binds the source commit the build came from, not only the artifact address. A released page can show its commit but never its own deployment URL, so this is what lets a reader tie the page they are on to the approval that put it there."
170
+ }
@@ -12,6 +12,7 @@
12
12
  "github.com/humanagencyprotocol/hap-profiles/publish@0.4": "publish/0.4.profile.json",
13
13
  "github.com/humanagencyprotocol/hap-profiles/records@0.4": "records/0.4.profile.json",
14
14
  "github.com/humanagencyprotocol/hap-profiles/deploy@0.6": "deploy/0.6.profile.json",
15
- "github.com/humanagencyprotocol/hap-profiles/deploy@0.7": "deploy/0.7.profile.json"
15
+ "github.com/humanagencyprotocol/hap-profiles/deploy@0.7": "deploy/0.7.profile.json",
16
+ "github.com/humanagencyprotocol/hap-profiles/deploy@0.8": "deploy/0.8.profile.json"
16
17
  }
17
18
  }