borgmcp-shared 0.2.2 → 0.4.0

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.
@@ -18,10 +18,16 @@ export enum ErrorCode {
18
18
  DRONE_EVICTED = 'DRONE_EVICTED',
19
19
  DRONE_FROZEN = 'DRONE_FROZEN',
20
20
  UNSUPPORTED_PROTOCOL_VERSION = 'UNSUPPORTED_PROTOCOL_VERSION',
21
- UNSUPPORTED_CAPABILITY = 'UNSUPPORTED_CAPABILITY',
22
21
  CURSOR_INVALID = 'CURSOR_INVALID',
23
22
  CURSOR_EXPIRED = 'CURSOR_EXPIRED',
24
23
  SESSION_REVOKED = 'SESSION_REVOKED',
24
+ /**
25
+ * The presented session bearer does not match the seat it targets: a fresh or
26
+ * non-matching bearer against an already-bound active seat. Distinct from
27
+ * SESSION_REVOKED (a formerly valid credential that was explicitly revoked or
28
+ * expired). Carried by the server's typed 401 takeover rejection.
29
+ */
30
+ SESSION_REJECTED = 'SESSION_REJECTED',
25
31
  }
26
32
 
27
33
  /** @deprecated Wire failures use the versioned ProtocolErrorEnvelope. */
@@ -31,6 +37,4 @@ export interface ErrorResponse {
31
37
  details?: string;
32
38
  /** Number of seconds a rate-limited caller should wait. */
33
39
  retryAfter?: number;
34
- requiredCapability?: string;
35
- supportedVersions?: readonly string[];
36
40
  }
@@ -1,31 +1,4 @@
1
- /** Current Borg coordination protocol generation. */
2
- export const PROTOCOL_VERSION = '1' as const;
1
+ /** Current Borg coordination protocol generation. Clean-slate v2. */
2
+ export const PROTOCOL_VERSION = '2' as const;
3
3
 
4
- /** Protocol generations accepted by this package release. */
5
- export const SUPPORTED_PROTOCOL_VERSIONS = [PROTOCOL_VERSION] as const;
6
-
7
- export type ProtocolVersion = (typeof SUPPORTED_PROTOCOL_VERSIONS)[number];
8
-
9
- export interface CompatibilityEntry {
10
- packageRange: string;
11
- protocolVersions: readonly ProtocolVersion[];
12
- notes: string;
13
- }
14
-
15
- /**
16
- * Compatibility table for published package releases. Pre-1.0 package
17
- * releases may add contracts, but do not change an existing wire shape without
18
- * a documented migration path.
19
- */
20
- export const COMPATIBILITY_MATRIX: readonly CompatibilityEntry[] = [
21
- {
22
- packageRange: '>=0.2.0 <0.3.0',
23
- protocolVersions: SUPPORTED_PROTOCOL_VERSIONS,
24
- notes: 'Versioned envelope, codecs, and adapter conformance for Borg MCP servers.',
25
- },
26
- ];
27
-
28
- export function isProtocolVersionSupported(value: unknown): value is ProtocolVersion {
29
- return typeof value === 'string' &&
30
- (SUPPORTED_PROTOCOL_VERSIONS as readonly string[]).includes(value);
31
- }
4
+ export type ProtocolVersion = typeof PROTOCOL_VERSION;