@suveren/gateway 0.3.15 → 0.3.17

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.
@@ -24,13 +24,13 @@
24
24
  "oauth": {
25
25
  "authUrl": "https://www.linkedin.com/oauth/v2/authorization",
26
26
  "tokenUrl": "https://www.linkedin.com/oauth/v2/accessToken",
27
- "scopes": ["w_member_social"],
27
+ "scopes": ["openid", "profile", "w_member_social"],
28
28
  "credentialKeys": { "clientId": "clientId", "clientSecret": "clientSecret" },
29
29
  "tokenStorage": "accessToken",
30
30
  "extraParams": {},
31
31
  "healthCheck": {
32
- "url": "https://api.linkedin.com/v2/me",
33
- "accountFields": ["localizedFirstName", "localizedLastName"]
32
+ "url": "https://api.linkedin.com/v2/userinfo",
33
+ "accountFields": ["name"]
34
34
  }
35
35
  },
36
36
  "toolGating": {
@@ -939,7 +939,7 @@ var OPERATOR_NAME = process.env.SUVEREN_OPERATOR_NAME ?? "Suveren";
939
939
  var HAP_URL = "https://www.humanagencyprotocol.org/";
940
940
  var FOOTER_PROFILES = /* @__PURE__ */ new Set(["email", "calendar", "publish"]);
941
941
  var CONTENT_FIELD_CANDIDATES = ["body", "text", "description", "content"];
942
- var FOOTER_RE = /\n*(?:—|--) (?:Sent|Published) by an AI agent[\s\S]*$/;
942
+ var FOOTER_RE = /\n*(?:—|--) (?:Sent|Published) by (?:an AI agent|[^\n]+?'s AI agent)[\s\S]*$/;
943
943
  function shouldAttachFooter() {
944
944
  return true;
945
945
  }
@@ -950,7 +950,7 @@ function verbForProfile(profile) {
950
950
  return profile === "publish" ? "Published" : "Sent";
951
951
  }
952
952
  function hapLine() {
953
- return `-- ${OPERATOR_NAME} is an implementation of the Human Agency Protocol (HAP), an open protocol to delegate execution to AI agents under human authority. ${HAP_URL}`;
953
+ return `-- ${OPERATOR_NAME} implements HAP, the open Human Agency Protocol: ${HAP_URL}`;
954
954
  }
955
955
  function footerText(receiptId, verb, subject) {
956
956
  const identity = deriveIdentityLine(subject, { operatorName: OPERATOR_NAME }).replace(/^Sent\b/, verb);
@@ -652,8 +652,13 @@ declare function validateSubject(subject: Subject): SubjectValidation;
652
652
  * The name appears only at `high` with a disclosed name; otherwise no name.
653
653
  *
654
654
  * - low / no disclosure → "Sent by an AI agent via «operator»"
655
- * - high / as_vouched → "Sent by an AI agent of «name», verified by «operator»"
656
- * - high / eudi → "Sent by an AI agent of «name», identity verified (EUDI)"
655
+ * - high / as_vouched → "Sent by «name»'s AI agent, verified by «operator»"
656
+ * - high / eudi → "Sent by «name»'s AI agent, identity verified (EUDI)"
657
+ *
658
+ * Footer wording v1.1 (July 2026): the named forms read "«name»'s AI agent"
659
+ * (more natural than the v1 "an AI agent of «name»"). The v1 wording is frozen
660
+ * for already-sent content; verifiers strip BOTH forms (see the gateway's
661
+ * FOOTER_RE and the AS ContentVerifier).
657
662
  *
658
663
  * Punctuation is ASCII (comma, not em-dash) so the line survives header and
659
664
  * plain-text encoding intact across email, calendar, and publishing channels.
@@ -652,8 +652,13 @@ declare function validateSubject(subject: Subject): SubjectValidation;
652
652
  * The name appears only at `high` with a disclosed name; otherwise no name.
653
653
  *
654
654
  * - low / no disclosure → "Sent by an AI agent via «operator»"
655
- * - high / as_vouched → "Sent by an AI agent of «name», verified by «operator»"
656
- * - high / eudi → "Sent by an AI agent of «name», identity verified (EUDI)"
655
+ * - high / as_vouched → "Sent by «name»'s AI agent, verified by «operator»"
656
+ * - high / eudi → "Sent by «name»'s AI agent, identity verified (EUDI)"
657
+ *
658
+ * Footer wording v1.1 (July 2026): the named forms read "«name»'s AI agent"
659
+ * (more natural than the v1 "an AI agent of «name»"). The v1 wording is frozen
660
+ * for already-sent content; verifiers strip BOTH forms (see the gateway's
661
+ * FOOTER_RE and the AS ContentVerifier).
657
662
  *
658
663
  * Punctuation is ASCII (comma, not em-dash) so the line survives header and
659
664
  * plain-text encoding intact across email, calendar, and publishing channels.
@@ -170,9 +170,9 @@ function deriveIdentityLine(subject, { operatorName }) {
170
170
  return `Sent by an AI agent via ${operatorName}`;
171
171
  }
172
172
  if (subject.method === "eudi") {
173
- return `Sent by an AI agent of ${name}, identity verified (EUDI)`;
173
+ return `Sent by ${name}'s AI agent, identity verified (EUDI)`;
174
174
  }
175
- return `Sent by an AI agent of ${name}, verified by ${operatorName}`;
175
+ return `Sent by ${name}'s AI agent, verified by ${operatorName}`;
176
176
  }
177
177
 
178
178
  // src/frame.ts
@@ -99,9 +99,9 @@ function deriveIdentityLine(subject, { operatorName }) {
99
99
  return `Sent by an AI agent via ${operatorName}`;
100
100
  }
101
101
  if (subject.method === "eudi") {
102
- return `Sent by an AI agent of ${name}, identity verified (EUDI)`;
102
+ return `Sent by ${name}'s AI agent, identity verified (EUDI)`;
103
103
  }
104
- return `Sent by an AI agent of ${name}, verified by ${operatorName}`;
104
+ return `Sent by ${name}'s AI agent, verified by ${operatorName}`;
105
105
  }
106
106
 
107
107
  // src/frame.ts
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@humanagencyp/hap-core",
3
- "version": "0.6.1",
3
+ "version": "0.6.2",
4
4
  "description": "Core types, cryptographic primitives, and verification logic for the Human Agency Protocol",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -56,8 +56,13 @@ export function validateSubject(subject: Subject): SubjectValidation {
56
56
  * The name appears only at `high` with a disclosed name; otherwise no name.
57
57
  *
58
58
  * - low / no disclosure → "Sent by an AI agent via «operator»"
59
- * - high / as_vouched → "Sent by an AI agent of «name», verified by «operator»"
60
- * - high / eudi → "Sent by an AI agent of «name», identity verified (EUDI)"
59
+ * - high / as_vouched → "Sent by «name»'s AI agent, verified by «operator»"
60
+ * - high / eudi → "Sent by «name»'s AI agent, identity verified (EUDI)"
61
+ *
62
+ * Footer wording v1.1 (July 2026): the named forms read "«name»'s AI agent"
63
+ * (more natural than the v1 "an AI agent of «name»"). The v1 wording is frozen
64
+ * for already-sent content; verifiers strip BOTH forms (see the gateway's
65
+ * FOOTER_RE and the AS ContentVerifier).
61
66
  *
62
67
  * Punctuation is ASCII (comma, not em-dash) so the line survives header and
63
68
  * plain-text encoding intact across email, calendar, and publishing channels.
@@ -76,7 +81,7 @@ export function deriveIdentityLine(
76
81
  return `Sent by an AI agent via ${operatorName}`;
77
82
  }
78
83
  if (subject!.method === 'eudi') {
79
- return `Sent by an AI agent of ${name}, identity verified (EUDI)`;
84
+ return `Sent by ${name}'s AI agent, identity verified (EUDI)`;
80
85
  }
81
- return `Sent by an AI agent of ${name}, verified by ${operatorName}`;
86
+ return `Sent by ${name}'s AI agent, verified by ${operatorName}`;
82
87
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@suveren/gateway",
3
- "version": "0.3.15",
3
+ "version": "0.3.17",
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",
@@ -23,7 +23,7 @@
23
23
  "node": ">=20"
24
24
  },
25
25
  "dependencies": {
26
- "@hap/core": "npm:@humanagencyp/hap-core@^0.6.1",
26
+ "@hap/core": "npm:@humanagencyp/hap-core@^0.6.2",
27
27
  "@hpke/core": "^1.9.0",
28
28
  "express": "^4.18.0",
29
29
  "http-proxy-middleware": "^3.0.0",