@indexnetwork/protocol 66.0.0-rc.657.1 → 66.0.0-rc.661.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.
@@ -3,7 +3,7 @@ import type { UserSocial } from '../../../platform/database.js';
3
3
  * Infers a canonical social label from a URL or handle string.
4
4
  *
5
5
  * @param value - A URL or plain handle string.
6
- * @returns One of `'linkedin' | 'twitter' | 'github' | 'telegram' | 'custom'`.
6
+ * @returns One of `'linkedin' | 'twitter' | 'github' | 'telegram' | 'bluesky' | 'custom'`.
7
7
  */
8
8
  export declare function detectSocialLabel(value: string): string;
9
9
  /** Flat enrichment request shape produced from a UserSocial array. */
@@ -12,6 +12,7 @@ export interface EnrichmentRequest {
12
12
  twitter?: string;
13
13
  github?: string;
14
14
  telegram?: string;
15
+ bluesky?: string;
15
16
  websites?: string[];
16
17
  }
17
18
  /**
@@ -2,10 +2,12 @@
2
2
  * Infers a canonical social label from a URL or handle string.
3
3
  *
4
4
  * @param value - A URL or plain handle string.
5
- * @returns One of `'linkedin' | 'twitter' | 'github' | 'telegram' | 'custom'`.
5
+ * @returns One of `'linkedin' | 'twitter' | 'github' | 'telegram' | 'bluesky' | 'custom'`.
6
6
  */
7
7
  export function detectSocialLabel(value) {
8
8
  const lower = value.toLowerCase();
9
+ if (/^(?:https?:\/\/)?(?:www\.)?bsky\.app\/profile\//.test(lower))
10
+ return 'bluesky';
9
11
  if (lower.includes('linkedin.com'))
10
12
  return 'linkedin';
11
13
  if (lower.includes('x.com') || lower.includes('twitter.com'))
@@ -36,6 +38,9 @@ export function socialsToEnrichmentRequest(socials) {
36
38
  case 'github':
37
39
  result.github = s.value;
38
40
  break;
41
+ case 'bluesky':
42
+ result.bluesky = s.value;
43
+ break;
39
44
  case 'telegram':
40
45
  result.telegram = s.value;
41
46
  break;
@@ -6,6 +6,7 @@ export interface EnrichmentRequest {
6
6
  twitter?: string;
7
7
  github?: string;
8
8
  telegram?: string;
9
+ bluesky?: string;
9
10
  websites?: string[];
10
11
  }
11
12
  /** Structured profile enrichment result. */
@@ -27,6 +28,7 @@ export interface EnrichmentResult {
27
28
  twitter?: string;
28
29
  github?: string;
29
30
  telegram?: string;
31
+ bluesky?: string;
30
32
  websites?: string[];
31
33
  };
32
34
  confidentMatch: boolean;
@@ -3,17 +3,23 @@ export type NegotiationAction = 'propose' | 'counter' | 'accept' | 'decline';
3
3
  export declare const negotiationTurnSchema: z.ZodObject<{
4
4
  action: z.ZodEnum<["propose", "counter", "accept", "decline"]>;
5
5
  message: z.ZodString;
6
+ /** Caller-chosen id for this submission. A retry carrying the same id replays the committed turn instead of being refused. */
7
+ clientTurnId: z.ZodOptional<z.ZodString>;
6
8
  }, "strip", z.ZodTypeAny, {
7
9
  message: string;
8
10
  action: "propose" | "counter" | "accept" | "decline";
11
+ clientTurnId?: string | undefined;
9
12
  }, {
10
13
  message: string;
11
14
  action: "propose" | "counter" | "accept" | "decline";
15
+ clientTurnId?: string | undefined;
12
16
  }>;
13
17
  export type NegotiationOutcome = 'agreed' | 'declined' | 'closed';
14
18
  export interface NegotiationTurn {
15
19
  action: NegotiationAction;
16
20
  message: string;
21
+ /** Caller-chosen id: a retry carrying it replays the committed turn instead of being refused. */
22
+ clientTurnId?: string;
17
23
  }
18
24
  export interface NegotiationState {
19
25
  initiatorUserId: string;
@@ -52,6 +58,8 @@ export type NegotiationDecision = {
52
58
  opportunityStatus: 'negotiating' | 'pending';
53
59
  /** Why this turn ended its round, leaving nobody to move until a seat resumes it. */
54
60
  roundEnded: 'declined' | 'turn_limit' | null;
61
+ /** The turn had already committed under the same clientTurnId; nothing was appended. */
62
+ replayed?: true;
55
63
  };
56
64
  /**
57
65
  * The turns of the round in progress. A round ends at a decline or after
@@ -4,6 +4,8 @@ import { NEGOTIATION_GUIDANCE } from './protocol.prompt.js';
4
4
  export const negotiationTurnSchema = z.object({
5
5
  action: z.enum(['propose', 'counter', 'accept', 'decline']),
6
6
  message: z.string().trim().min(1).max(NEGOTIATION_MESSAGE_LIMIT),
7
+ /** Caller-chosen id for this submission. A retry carrying the same id replays the committed turn instead of being refused. */
8
+ clientTurnId: z.string().uuid().optional(),
7
9
  });
8
10
  /**
9
11
  * The turns of the round in progress. A round ends at a decline or after
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indexnetwork/protocol",
3
- "version": "66.0.0-rc.657.1",
3
+ "version": "66.0.0-rc.661.1",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",