@indexnetwork/protocol 11.0.2-rc.456.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 +10 -0
- package/dist/capabilities/negotiation.facade.d.ts +4 -1
- package/dist/capabilities/negotiation.facade.js +2 -1
- package/dist/capabilities/negotiation.questions.facade.d.ts +1 -1
- package/dist/capabilities/negotiation.questions.facade.js +1 -1
- package/dist/index.d.ts +8 -4
- package/dist/index.js +5 -1
- package/dist/mcp/mcp.authorization-policy.d.ts +10 -4
- package/dist/mcp/mcp.authorization-policy.js +64 -5
- package/dist/negotiation/application/negotiation.agent.d.ts +7 -1
- package/dist/negotiation/application/negotiation.agent.js +6 -4
- package/dist/negotiation/application/negotiation.detail-reader.js +3 -6
- package/dist/negotiation/application/negotiation.graph.d.ts +17 -29
- package/dist/negotiation/application/negotiation.graph.js +35 -49
- package/dist/negotiation/application/negotiation.tools.js +40 -43
- package/dist/negotiation/domain/index.d.ts +5 -0
- package/dist/negotiation/domain/index.js +4 -0
- package/dist/negotiation/domain/negotiation.consultation-policy.d.ts +2 -3
- package/dist/negotiation/domain/negotiation.expected-speaker.d.ts +19 -0
- package/dist/negotiation/domain/negotiation.expected-speaker.js +47 -0
- package/dist/negotiation/domain/negotiation.hermes-contract.d.ts +31 -0
- package/dist/negotiation/domain/negotiation.hermes-contract.js +72 -0
- package/dist/negotiation/domain/negotiation.protocol.d.ts +36 -66
- package/dist/negotiation/domain/negotiation.state.d.ts +10 -19
- package/dist/negotiation/domain/negotiation.turn-cap.d.ts +9 -0
- package/dist/negotiation/domain/negotiation.turn-cap.js +12 -0
- package/dist/negotiation/public/index.d.ts +4 -1
- package/dist/negotiation/public/index.js +3 -1
- package/dist/questions/application/question.input.d.ts +4 -8
- package/dist/questions/application/question.input.js +3 -8
- package/dist/questions/application/question.presets.js +10 -11
- package/dist/shared/agent/model-signal.d.ts +6 -1
- package/dist/shared/agent/model-signal.js +5 -2
- package/dist/shared/interfaces/agent-dispatcher.interface.d.ts +3 -0
- package/dist/shared/interfaces/database.interface.d.ts +1 -1
- package/dist/shared/interfaces/negotiation-events.interface.d.ts +12 -2
- package/dist/shared/schemas/mcp-auth.schema.d.ts +6 -0
- package/dist/shared/schemas/mcp-auth.schema.js +9 -0
- package/dist/shared/schemas/negotiation-state.schema.d.ts +17 -23
- package/dist/shared/schemas/negotiation-state.schema.js +13 -8
- package/package.json +1 -1
|
@@ -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
|
});
|
|
@@ -20,22 +20,21 @@ export type NegotiationAction = (typeof NEGOTIATION_ACTIONS)[number];
|
|
|
20
20
|
export type NegotiationSeat = "initiator" | "counterparty";
|
|
21
21
|
/** Negotiation protocol version stamped on task metadata. */
|
|
22
22
|
export type NegotiationProtocolVersion = "v1" | "v2";
|
|
23
|
+
/** Closed, content-free reasons that select server-owned consultation copy. */
|
|
24
|
+
export declare const NEGOTIATION_CONSULTATION_REASONS: readonly ["unresolved_owner_constraint", "consequential_disclosure_permission", "repeated_non_convergence", "insufficient_commitment_authority"];
|
|
25
|
+
export declare const NegotiationConsultationReasonSchema: z.ZodEnum<["unresolved_owner_constraint", "consequential_disclosure_permission", "repeated_non_convergence", "insufficient_commitment_authority"]>;
|
|
26
|
+
export type NegotiationConsultationReason = z.infer<typeof NegotiationConsultationReasonSchema>;
|
|
23
27
|
/**
|
|
24
|
-
* Payload for
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* the negotiator's own phrasing, refined by the questioner's
|
|
28
|
-
* `negotiation_inflight` preset before delivery.
|
|
28
|
+
* Payload for a v2 `ask_user` action. Agents may choose only a closed reason;
|
|
29
|
+
* disclosure subjects and question wording are always rendered by fixed
|
|
30
|
+
* server templates and can never carry model-authored instructions.
|
|
29
31
|
*/
|
|
30
32
|
export declare const AskUserPayloadSchema: z.ZodObject<{
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
disclosureSubject: string;
|
|
35
|
-
draftQuestion?: string | null | undefined;
|
|
33
|
+
reason: z.ZodEnum<["unresolved_owner_constraint", "consequential_disclosure_permission", "repeated_non_convergence", "insufficient_commitment_authority"]>;
|
|
34
|
+
}, "strict", z.ZodTypeAny, {
|
|
35
|
+
reason: "unresolved_owner_constraint" | "consequential_disclosure_permission" | "repeated_non_convergence" | "insufficient_commitment_authority";
|
|
36
36
|
}, {
|
|
37
|
-
|
|
38
|
-
draftQuestion?: string | null | undefined;
|
|
37
|
+
reason: "unresolved_owner_constraint" | "consequential_disclosure_permission" | "repeated_non_convergence" | "insufficient_commitment_authority";
|
|
39
38
|
}>;
|
|
40
39
|
export type AskUserPayload = z.infer<typeof AskUserPayloadSchema>;
|
|
41
40
|
export declare const NegotiationTurnSchema: z.ZodObject<{
|
|
@@ -68,14 +67,11 @@ export declare const NegotiationTurnSchema: z.ZodObject<{
|
|
|
68
67
|
message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
69
68
|
/** Present when action is `ask_user` (v2, P3.2). */
|
|
70
69
|
askUser: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
disclosureSubject: string;
|
|
75
|
-
draftQuestion?: string | null | undefined;
|
|
70
|
+
reason: z.ZodEnum<["unresolved_owner_constraint", "consequential_disclosure_permission", "repeated_non_convergence", "insufficient_commitment_authority"]>;
|
|
71
|
+
}, "strict", z.ZodTypeAny, {
|
|
72
|
+
reason: "unresolved_owner_constraint" | "consequential_disclosure_permission" | "repeated_non_convergence" | "insufficient_commitment_authority";
|
|
76
73
|
}, {
|
|
77
|
-
|
|
78
|
-
draftQuestion?: string | null | undefined;
|
|
74
|
+
reason: "unresolved_owner_constraint" | "consequential_disclosure_permission" | "repeated_non_convergence" | "insufficient_commitment_authority";
|
|
79
75
|
}>>>;
|
|
80
76
|
}, "strip", z.ZodTypeAny, {
|
|
81
77
|
action: "propose" | "accept" | "reject" | "counter" | "question" | "outreach" | "withdraw" | "decline" | "ask_user";
|
|
@@ -88,8 +84,7 @@ export declare const NegotiationTurnSchema: z.ZodObject<{
|
|
|
88
84
|
};
|
|
89
85
|
message?: string | null | undefined;
|
|
90
86
|
askUser?: {
|
|
91
|
-
|
|
92
|
-
draftQuestion?: string | null | undefined;
|
|
87
|
+
reason: "unresolved_owner_constraint" | "consequential_disclosure_permission" | "repeated_non_convergence" | "insufficient_commitment_authority";
|
|
93
88
|
} | null | undefined;
|
|
94
89
|
}, {
|
|
95
90
|
action: "propose" | "accept" | "reject" | "counter" | "question" | "outreach" | "withdraw" | "decline" | "ask_user";
|
|
@@ -102,8 +97,7 @@ export declare const NegotiationTurnSchema: z.ZodObject<{
|
|
|
102
97
|
};
|
|
103
98
|
message?: string | null | undefined;
|
|
104
99
|
askUser?: {
|
|
105
|
-
|
|
106
|
-
draftQuestion?: string | null | undefined;
|
|
100
|
+
reason: "unresolved_owner_constraint" | "consequential_disclosure_permission" | "repeated_non_convergence" | "insufficient_commitment_authority";
|
|
107
101
|
} | null | undefined;
|
|
108
102
|
}>;
|
|
109
103
|
export type NegotiationTurn = z.infer<typeof NegotiationTurnSchema>;
|
|
@@ -20,17 +20,22 @@ export const NEGOTIATION_ACTIONS = [
|
|
|
20
20
|
"outreach", "withdraw", "decline",
|
|
21
21
|
"ask_user",
|
|
22
22
|
];
|
|
23
|
+
/** Closed, content-free reasons that select server-owned consultation copy. */
|
|
24
|
+
export const NEGOTIATION_CONSULTATION_REASONS = [
|
|
25
|
+
"unresolved_owner_constraint",
|
|
26
|
+
"consequential_disclosure_permission",
|
|
27
|
+
"repeated_non_convergence",
|
|
28
|
+
"insufficient_commitment_authority",
|
|
29
|
+
];
|
|
30
|
+
export const NegotiationConsultationReasonSchema = z.enum(NEGOTIATION_CONSULTATION_REASONS);
|
|
23
31
|
/**
|
|
24
|
-
* Payload for
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* the negotiator's own phrasing, refined by the questioner's
|
|
28
|
-
* `negotiation_inflight` preset before delivery.
|
|
32
|
+
* Payload for a v2 `ask_user` action. Agents may choose only a closed reason;
|
|
33
|
+
* disclosure subjects and question wording are always rendered by fixed
|
|
34
|
+
* server templates and can never carry model-authored instructions.
|
|
29
35
|
*/
|
|
30
36
|
export const AskUserPayloadSchema = z.object({
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
});
|
|
37
|
+
reason: NegotiationConsultationReasonSchema,
|
|
38
|
+
}).strict();
|
|
34
39
|
export const NegotiationTurnSchema = z.object({
|
|
35
40
|
action: z.enum(NEGOTIATION_ACTIONS),
|
|
36
41
|
assessment: z.object({
|