@indexnetwork/protocol 11.1.0-rc.457.1 → 11.2.0-rc.458.1

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/CHANGELOG.md CHANGED
@@ -28,6 +28,12 @@ pin a supported release, use `latest`.
28
28
 
29
29
  ## [Unreleased]
30
30
 
31
+ ### Added
32
+ - Full standalone Hermes capability policy (11.2.0): the `hermes-agent` principal has an explicit six-action MCP/REST policy while the existing `hermes-negotiator` principal remains restricted to its four scheduled negotiation handlers. Both policies default deny and preserve one-shot, generation-fenced negotiation authority.
33
+
34
+ ### Security
35
+ - The Hermes policy never exposes owner credentials, account-security, credential/permission/agent administration, billing, or unclassified tools; connector and owner-native callers receive only nonsecret response projections.
36
+
31
37
  ### Removed
32
38
  - Remove six unsupported shared interface/schema forwarding shims after migrating repository consumers to capability-owned domain and port modules; stable package-root exports remain unchanged.
33
39
  - Remove six unsupported tool-port forwarding shims and the deprecated unused discovery-question mapper; stable package-root exports remain unchanged.
@@ -80,7 +86,7 @@ pin a supported release, use `latest`.
80
86
  are unchanged.
81
87
 
82
88
  ### Security
83
- - The Hermes skill contract is restricted to the four negotiator tools, never treats model prose as authority, never forwards secrets or owner-private context, and relies on Index's validated action/consultation and bounded fallback paths. **This branch targets dev/private testing only. Production distribution remains blocked until the Mac owner credential is migrated to Keychain and the plaintext file/directory is removed, hardened runtime and App Sandbox are restored, the app is signed/notarized, and the credential TTL/revocation checklist is verified.**
89
+ - The Hermes skill contract is restricted to the four negotiator tools, never treats model prose as authority, never forwards secrets or owner-private context, and relies on Index's validated action/consultation and bounded fallback paths. **This branch targets dev/private testing only. Production distribution remains blocked until the Mac owner credential is migrated to Keychain and the plaintext file/directory is removed, Developer ID hardened-runtime signing and notarization are complete, and the credential TTL/revocation checklist is verified.**
84
90
 
85
91
  ### Fixed
86
92
  - Add an independent complete-payload golden digest and stronger audit/report leak
@@ -25,6 +25,12 @@ export type McpToolPermissionMap = ReadonlyMap<string, McpToolPermissionRequirem
25
25
  * Runtime-validates a capability-owned tool-to-permission mapping.
26
26
  */
27
27
  export declare function defineMcpToolPermissionMap(mapping: Readonly<Record<string, McpToolPermissionRequirement>>): McpToolPermissionMap;
28
+ /**
29
+ * Exact full-standalone Hermes MCP surface. Every admitted tool maps to one
30
+ * canonical action; absence is denial, including human-only, deletion,
31
+ * permission-management, agent-administration, and retired aliases.
32
+ */
33
+ export declare const HERMES_AGENT_MCP_TOOL_PERMISSIONS: McpToolPermissionMap;
28
34
  export declare const McpToolAccessRuleSchema: z.ZodEffects<z.ZodObject<{
29
35
  access: z.ZodEnum<["permission", "authenticated", "human_only", "agent_admin", "informational", "delivery_only", "removed"]>;
30
36
  actions: z.ZodOptional<z.ZodArray<z.ZodEnum<["manage:identity", "manage:premises", "manage:intents", "manage:networks", "manage:opportunities", "manage:negotiations"]>, "many">>;
@@ -113,10 +119,10 @@ export declare const McpPolicyAgentSnapshotSchema: z.ZodObject<{
113
119
  }[];
114
120
  }>;
115
121
  export type McpPolicyAgentSnapshot = z.infer<typeof McpPolicyAgentSnapshotSchema>;
116
- export declare const McpPrincipalProfileSchema: z.ZodEnum<["session_human", "onboarding_human", "enrollment_key", "unregistered_key", "registered_global_agent", "registered_network_agent", "delivery_agent", "invalid_agent"]>;
122
+ export declare const McpPrincipalProfileSchema: z.ZodEnum<["session_human", "onboarding_human", "enrollment_key", "unregistered_key", "registered_global_agent", "registered_network_agent", "hermes_agent", "delivery_agent", "invalid_agent"]>;
117
123
  export type McpPrincipalProfile = z.infer<typeof McpPrincipalProfileSchema>;
118
124
  export declare const McpCapabilitySubjectSchema: z.ZodObject<{
119
- profile: z.ZodEnum<["session_human", "onboarding_human", "enrollment_key", "unregistered_key", "registered_global_agent", "registered_network_agent", "delivery_agent", "invalid_agent"]>;
125
+ profile: z.ZodEnum<["session_human", "onboarding_human", "enrollment_key", "unregistered_key", "registered_global_agent", "registered_network_agent", "hermes_agent", "delivery_agent", "invalid_agent"]>;
120
126
  userId: z.ZodString;
121
127
  agentId: z.ZodOptional<z.ZodString>;
122
128
  agentType: z.ZodOptional<z.ZodEnum<["personal", "external", "system"]>>;
@@ -125,7 +131,7 @@ export declare const McpCapabilitySubjectSchema: z.ZodObject<{
125
131
  permissions: z.ZodArray<z.ZodEnum<["manage:identity", "manage:premises", "manage:intents", "manage:networks", "manage:opportunities", "manage:negotiations"]>, "many">;
126
132
  }, "strict", z.ZodTypeAny, {
127
133
  userId: string;
128
- profile: "session_human" | "onboarding_human" | "enrollment_key" | "unregistered_key" | "registered_global_agent" | "registered_network_agent" | "delivery_agent" | "invalid_agent";
134
+ profile: "session_human" | "onboarding_human" | "enrollment_key" | "unregistered_key" | "registered_global_agent" | "registered_network_agent" | "hermes_agent" | "delivery_agent" | "invalid_agent";
129
135
  permissions: ("manage:negotiations" | "manage:intents" | "manage:opportunities" | "manage:identity" | "manage:premises" | "manage:networks")[];
130
136
  networkScopeId: string | null;
131
137
  isOnboarding: boolean;
@@ -133,7 +139,7 @@ export declare const McpCapabilitySubjectSchema: z.ZodObject<{
133
139
  agentType?: "system" | "personal" | "external" | undefined;
134
140
  }, {
135
141
  userId: string;
136
- profile: "session_human" | "onboarding_human" | "enrollment_key" | "unregistered_key" | "registered_global_agent" | "registered_network_agent" | "delivery_agent" | "invalid_agent";
142
+ profile: "session_human" | "onboarding_human" | "enrollment_key" | "unregistered_key" | "registered_global_agent" | "registered_network_agent" | "hermes_agent" | "delivery_agent" | "invalid_agent";
137
143
  permissions: ("manage:negotiations" | "manage:intents" | "manage:opportunities" | "manage:identity" | "manage:premises" | "manage:networks")[];
138
144
  networkScopeId: string | null;
139
145
  isOnboarding: boolean;
@@ -26,6 +26,44 @@ export function defineMcpToolPermissionMap(mapping) {
26
26
  const parsed = McpToolPermissionMapSchema.parse(mapping);
27
27
  return new Map(Object.entries(parsed));
28
28
  }
29
+ /**
30
+ * Exact full-standalone Hermes MCP surface. Every admitted tool maps to one
31
+ * canonical action; absence is denial, including human-only, deletion,
32
+ * permission-management, agent-administration, and retired aliases.
33
+ */
34
+ export const HERMES_AGENT_MCP_TOOL_PERMISSIONS = defineMcpToolPermissionMap({
35
+ read_user_contexts: { action: 'manage:identity', reach: 'principal' },
36
+ preview_user_context: { action: 'manage:identity', reach: 'principal' },
37
+ confirm_user_context: { action: 'manage:identity', reach: 'principal' },
38
+ create_user_context: { action: 'manage:identity', reach: 'principal' },
39
+ update_user_context: { action: 'manage:identity', reach: 'principal' },
40
+ get_enrichment_run: { action: 'manage:identity', reach: 'principal' },
41
+ cancel_enrichment_run: { action: 'manage:identity', reach: 'principal' },
42
+ read_intents: { action: 'manage:intents', reach: 'network' },
43
+ search_intents: { action: 'manage:intents', reach: 'network' },
44
+ create_intent: { action: 'manage:intents', reach: 'network' },
45
+ update_intent: { action: 'manage:intents', reach: 'network' },
46
+ read_intent_indexes: { action: 'manage:intents', reach: 'network' },
47
+ create_intent_index: { action: 'manage:intents', reach: 'network' },
48
+ list_negotiations: { action: 'manage:negotiations', reach: 'network' },
49
+ get_negotiation: { action: 'manage:negotiations', reach: 'network' },
50
+ respond_to_negotiation: { action: 'manage:negotiations', reach: 'network' },
51
+ read_networks: { action: 'manage:networks', reach: 'network' },
52
+ read_network_memberships: { action: 'manage:networks', reach: 'network' },
53
+ create_network: { action: 'manage:networks', reach: 'network' },
54
+ update_network: { action: 'manage:networks', reach: 'network' },
55
+ create_network_membership: { action: 'manage:networks', reach: 'network' },
56
+ list_opportunities: { action: 'manage:opportunities', reach: 'network' },
57
+ update_opportunity: { action: 'manage:opportunities', reach: 'network' },
58
+ confirm_opportunity_delivery: { action: 'manage:opportunities', reach: 'network' },
59
+ read_premises: { action: 'manage:premises', reach: 'principal' },
60
+ create_premise: { action: 'manage:premises', reach: 'principal' },
61
+ update_premise: { action: 'manage:premises', reach: 'principal' },
62
+ retract_premise: { action: 'manage:premises', reach: 'principal' },
63
+ read_pending_questions: { action: 'manage:identity', reach: 'principal' },
64
+ read_activity_summary: { action: 'manage:identity', reach: 'principal' },
65
+ read_docs: { action: 'manage:identity', reach: 'principal' },
66
+ });
29
67
  export const McpToolAccessRuleSchema = z.object({
30
68
  access: z.enum([
31
69
  'permission',
@@ -216,6 +254,7 @@ export const McpPrincipalProfileSchema = z.enum([
216
254
  'unregistered_key',
217
255
  'registered_global_agent',
218
256
  'registered_network_agent',
257
+ 'hermes_agent',
219
258
  'delivery_agent',
220
259
  'invalid_agent',
221
260
  ]);
@@ -331,11 +370,13 @@ export function resolveMcpCapabilitySubject(input) {
331
370
  });
332
371
  }
333
372
  const agent = parsedAgent.data;
334
- const profile = identity.isDeliveryAgent === true
335
- ? 'delivery_agent'
336
- : identity.networkScopeId
337
- ? 'registered_network_agent'
338
- : 'registered_global_agent';
373
+ const profile = identity.isHermesAgent === true
374
+ ? 'hermes_agent'
375
+ : identity.isDeliveryAgent === true
376
+ ? 'delivery_agent'
377
+ : identity.networkScopeId
378
+ ? 'registered_network_agent'
379
+ : 'registered_global_agent';
339
380
  return McpCapabilitySubjectSchema.parse({
340
381
  profile,
341
382
  userId: identity.userId,
@@ -437,6 +478,24 @@ export class McpCapabilityPolicy {
437
478
  if (subject.isOnboarding && !ONBOARDING_ALLOWED.has(toolName)) {
438
479
  return { allowed: false, reason: 'onboarding_required', reach: rule.reach };
439
480
  }
481
+ if (subject.profile === 'hermes_agent') {
482
+ const requirement = HERMES_AGENT_MCP_TOOL_PERMISSIONS.get(toolName);
483
+ if (!requirement)
484
+ return { allowed: false, reason: 'tool_unclassified' };
485
+ return subject.permissions.includes(requirement.action)
486
+ ? {
487
+ allowed: true,
488
+ reason: 'permission_granted',
489
+ reach: requirement.reach,
490
+ requiredPermissions: [requirement.action],
491
+ }
492
+ : {
493
+ allowed: false,
494
+ reason: 'permission_missing',
495
+ reach: requirement.reach,
496
+ requiredPermissions: [requirement.action],
497
+ };
498
+ }
440
499
  if (rule.access === 'delivery_only') {
441
500
  return subject.profile === 'delivery_agent'
442
501
  ? { allowed: true, reason: 'delivery', reach: rule.reach }
@@ -48,6 +48,8 @@ export declare const McpResolvedIdentitySchema: z.ZodEffects<z.ZodObject<{
48
48
  isSessionAuth: z.ZodOptional<z.ZodBoolean>;
49
49
  enrollmentCapable: z.ZodOptional<z.ZodBoolean>;
50
50
  isDeliveryAgent: z.ZodOptional<z.ZodBoolean>;
51
+ /** Host-authenticated marker for the dedicated full standalone Hermes audience. */
52
+ isHermesAgent: z.ZodOptional<z.ZodBoolean>;
51
53
  networkScopeId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
52
54
  }, "strict", z.ZodTypeAny, {
53
55
  userId: string;
@@ -56,6 +58,7 @@ export declare const McpResolvedIdentitySchema: z.ZodEffects<z.ZodObject<{
56
58
  enrollmentCapable?: boolean | undefined;
57
59
  isDeliveryAgent?: boolean | undefined;
58
60
  isSessionAuth?: boolean | undefined;
61
+ isHermesAgent?: boolean | undefined;
59
62
  }, {
60
63
  userId: string;
61
64
  agentId?: string | undefined;
@@ -63,6 +66,7 @@ export declare const McpResolvedIdentitySchema: z.ZodEffects<z.ZodObject<{
63
66
  enrollmentCapable?: boolean | undefined;
64
67
  isDeliveryAgent?: boolean | undefined;
65
68
  isSessionAuth?: boolean | undefined;
69
+ isHermesAgent?: boolean | undefined;
66
70
  }>, {
67
71
  userId: string;
68
72
  agentId?: string | undefined;
@@ -70,6 +74,7 @@ export declare const McpResolvedIdentitySchema: z.ZodEffects<z.ZodObject<{
70
74
  enrollmentCapable?: boolean | undefined;
71
75
  isDeliveryAgent?: boolean | undefined;
72
76
  isSessionAuth?: boolean | undefined;
77
+ isHermesAgent?: boolean | undefined;
73
78
  }, {
74
79
  userId: string;
75
80
  agentId?: string | undefined;
@@ -77,5 +82,6 @@ export declare const McpResolvedIdentitySchema: z.ZodEffects<z.ZodObject<{
77
82
  enrollmentCapable?: boolean | undefined;
78
83
  isDeliveryAgent?: boolean | undefined;
79
84
  isSessionAuth?: boolean | undefined;
85
+ isHermesAgent?: boolean | undefined;
80
86
  }>;
81
87
  export type McpResolvedIdentity = z.infer<typeof McpResolvedIdentitySchema>;
@@ -28,6 +28,8 @@ export const McpResolvedIdentitySchema = z.object({
28
28
  isSessionAuth: z.boolean().optional(),
29
29
  enrollmentCapable: z.boolean().optional(),
30
30
  isDeliveryAgent: z.boolean().optional(),
31
+ /** Host-authenticated marker for the dedicated full standalone Hermes audience. */
32
+ isHermesAgent: z.boolean().optional(),
31
33
  networkScopeId: z.string().min(1).nullable().optional(),
32
34
  }).strict().superRefine((identity, ctx) => {
33
35
  if (identity.isSessionAuth === true && identity.agentId) {
@@ -44,4 +46,11 @@ export const McpResolvedIdentitySchema = z.object({
44
46
  message: 'Delivery-agent designation requires an agent ID.',
45
47
  });
46
48
  }
49
+ if (identity.isHermesAgent === true && !identity.agentId) {
50
+ ctx.addIssue({
51
+ code: z.ZodIssueCode.custom,
52
+ path: ['isHermesAgent'],
53
+ message: 'Hermes-agent designation requires an agent ID.',
54
+ });
55
+ }
47
56
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indexnetwork/protocol",
3
- "version": "11.1.0-rc.457.1",
3
+ "version": "11.2.0-rc.458.1",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",