@brainpilot/protocol 0.0.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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../src/http.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEnD,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,gDAAgD;IAChD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAMD,eAAO,MAAM,oBAAoB;;;;;;EAE/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAMlE,eAAO,MAAM,qBAAqB;;;IAGhC,0EAA0E;;IAE1E,kCAAkC;;;;;;;;;;;;EAElC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAMpE,eAAO,MAAM,0BAA0B;IACrC,2EAA2E;;IAE3E,uEAAuE;;;;;;;;EAEvE,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGtC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAMhF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAErC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0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,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAM9E,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IASzB,4CAA4C;;;;;IAE5C,8EAA8E;;;;;;;;;;;;;;;;;CAKnC,CAAC;AAE9C,MAAM,MAAM,gBAAgB,GAAG,MAAM,OAAO,cAAc,CAAC"}
package/dist/http.js ADDED
@@ -0,0 +1,137 @@
1
+ /**
2
+ * Runtime "对外 HTTP 契约" — the HTTP surface every consumer (backend-core
3
+ * proxy, gateway, CLI client) depends on. Source: TS_PI_REFACTOR_DESIGN.md
4
+ * §6 (修正2), §10, §15.4.
5
+ *
6
+ * Each endpoint has zod request/response schemas + inferred types, plus a
7
+ * `RUNTIME_ROUTES` catalog (method + path template) so backend/runtime/client
8
+ * share one definition. Path params use `:id` style.
9
+ *
10
+ * §15.4 endpoint table:
11
+ * GET /health
12
+ * GET /metrics (修正2)
13
+ * GET/POST/DELETE /sessions* (CRUD / list / state)
14
+ * POST /sessions/{id}/messages
15
+ * GET /sse/{sessionId} (AG-UI event stream, byte passthrough)
16
+ * POST /sessions/{id}/interrupt
17
+ * GET /sessions/{id}/agents (§10 polling fallback)
18
+ * POST /sessions/{id}/evict (修正2)
19
+ *
20
+ * NOTE: §15.4 names the stream `GET /sse/{sessionId}`; the task brief lists it
21
+ * as `GET /sessions/:id/events`. We expose BOTH path templates in the catalog
22
+ * (`sessionEvents` = canonical `/sse/:id` per the authoritative §15.4 table;
23
+ * `sessionEventsAlias` = `/sessions/:id/events`) so callers can pick. The
24
+ * event payload schema (AgUiEvent) is identical for both.
25
+ */
26
+ import { z } from "zod";
27
+ import { AgUiEventSchema } from "./events.js";
28
+ import { AgentStatusSchema, SessionSchema, SessionStateSnapshotSchema } from "./domain.js";
29
+ /* ------------------------------------------------------------------ *
30
+ * GET /health
31
+ * ------------------------------------------------------------------ */
32
+ export const HealthResponseSchema = z.object({
33
+ status: z.enum(["ok", "degraded", "error"]).or(z.string()),
34
+ });
35
+ /* ------------------------------------------------------------------ *
36
+ * GET /metrics (修正2 — idle 回收依据)
37
+ * ------------------------------------------------------------------ */
38
+ export const MetricsResponseSchema = z.object({
39
+ activeSessions: z.number(),
40
+ runningAgents: z.number(),
41
+ /** ISO8601 of last activity across all sessions; null if never active. */
42
+ lastActivityAt: z.string().nullable(),
43
+ /** Resident set size in bytes. */
44
+ memRss: z.number(),
45
+ });
46
+ /* ------------------------------------------------------------------ *
47
+ * POST /sessions (create)
48
+ * ------------------------------------------------------------------ */
49
+ export const CreateSessionRequestSchema = z.object({
50
+ /** Optional caller-supplied title; runtime derives a default otherwise. */
51
+ title: z.string().optional(),
52
+ /** Optional caller-supplied id; runtime generates a UUID otherwise. */
53
+ id: z.string().optional(),
54
+ });
55
+ export const CreateSessionResponseSchema = z.object({
56
+ id: z.string(),
57
+ session: SessionSchema.optional(),
58
+ });
59
+ /* ------------------------------------------------------------------ *
60
+ * GET /sessions (list) + GET /sessions/:id + DELETE /sessions/:id
61
+ * ------------------------------------------------------------------ */
62
+ export const ListSessionsResponseSchema = z.object({
63
+ sessions: z.array(SessionSchema),
64
+ });
65
+ export const GetSessionResponseSchema = SessionSchema;
66
+ export const DeleteSessionResponseSchema = z.object({
67
+ id: z.string(),
68
+ deleted: z.boolean(),
69
+ });
70
+ /* ------------------------------------------------------------------ *
71
+ * GET /sessions/:id/state (authoritative snapshot)
72
+ * ------------------------------------------------------------------ */
73
+ export const GetSessionStateResponseSchema = SessionStateSnapshotSchema;
74
+ /* ------------------------------------------------------------------ *
75
+ * POST /sessions/:id/messages (inject user message)
76
+ * ------------------------------------------------------------------ */
77
+ export const SendMessageRequestSchema = z.object({
78
+ content: z.string(),
79
+ /** Target agent; defaults to principal. */
80
+ agent: z.string().optional(),
81
+ });
82
+ export const SendMessageResponseSchema = z.object({
83
+ accepted: z.boolean(),
84
+ /** Run id started/queued for this message, if synchronously known. */
85
+ runId: z.string().optional(),
86
+ });
87
+ /* ------------------------------------------------------------------ *
88
+ * GET /sse/:id (AG-UI event stream — each SSE `data:` is one AgUiEvent)
89
+ * ------------------------------------------------------------------ */
90
+ /** Schema for a single decoded SSE frame payload. Byte-level proxies do not
91
+ * use this; clients that parse events do. */
92
+ export const SseEventFrameSchema = AgUiEventSchema;
93
+ /* ------------------------------------------------------------------ *
94
+ * POST /sessions/:id/interrupt
95
+ * ------------------------------------------------------------------ */
96
+ export const InterruptRequestSchema = z.object({
97
+ /** Optional specific agent to interrupt; omit to interrupt the session. */
98
+ agent: z.string().optional(),
99
+ });
100
+ export const InterruptResponseSchema = z.object({
101
+ interrupted: z.boolean(),
102
+ });
103
+ /* ------------------------------------------------------------------ *
104
+ * GET /sessions/:id/agents (§10 polling fallback)
105
+ * ------------------------------------------------------------------ */
106
+ export const ListAgentsResponseSchema = z.object({
107
+ agents: z.array(AgentStatusSchema),
108
+ });
109
+ /* ------------------------------------------------------------------ *
110
+ * POST /sessions/:id/evict (修正2 — release idle session memory)
111
+ * ------------------------------------------------------------------ */
112
+ export const EvictSessionResponseSchema = z.object({
113
+ evicted: z.boolean(),
114
+ /** Number of agent subprocesses killed. */
115
+ agentsKilled: z.number().optional(),
116
+ });
117
+ /* ------------------------------------------------------------------ *
118
+ * Route catalog — shared method + path templates
119
+ * ------------------------------------------------------------------ */
120
+ export const RUNTIME_ROUTES = {
121
+ health: { method: "GET", path: "/health" },
122
+ metrics: { method: "GET", path: "/metrics" },
123
+ createSession: { method: "POST", path: "/sessions" },
124
+ listSessions: { method: "GET", path: "/sessions" },
125
+ getSession: { method: "GET", path: "/sessions/:id" },
126
+ deleteSession: { method: "DELETE", path: "/sessions/:id" },
127
+ getSessionState: { method: "GET", path: "/sessions/:id/state" },
128
+ sendMessage: { method: "POST", path: "/sessions/:id/messages" },
129
+ /** Canonical AG-UI event stream (§15.4). */
130
+ sessionEvents: { method: "GET", path: "/sse/:id" },
131
+ /** Alias path some callers use; same AgUiEvent payload as `sessionEvents`. */
132
+ sessionEventsAlias: { method: "GET", path: "/sessions/:id/events" },
133
+ interrupt: { method: "POST", path: "/sessions/:id/interrupt" },
134
+ listAgents: { method: "GET", path: "/sessions/:id/agents" },
135
+ evictSession: { method: "POST", path: "/sessions/:id/evict" },
136
+ };
137
+ //# sourceMappingURL=http.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http.js","sourceRoot":"","sources":["../src/http.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAU3F;;wEAEwE;AAExE,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CAC3D,CAAC,CAAC;AAGH;;wEAEwE;AAExE,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE;IAC1B,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;IACzB,0EAA0E;IAC1E,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACrC,kCAAkC;IAClC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;CACnB,CAAC,CAAC;AAGH;;wEAEwE;AAExE,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,2EAA2E;IAC3E,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,uEAAuE;IACvE,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,Q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5C,aAAa,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE;IAClD,8EAA8E;IAC9E,kBAAkB,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,sBAAsB,EAAE;IACnE,SAAS,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,yBAAyB,EAAE;IAC9D,UAAU,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,sBAAsB,EAAE;IAC3D,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,qBAAqB,EAAE;CAClB,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @brainpilot/protocol — single source of truth for the BrainPilot wire
3
+ * contract. Re-exports AG-UI events, domain schemas, and the Runtime HTTP
4
+ * contract. Every other package imports from here.
5
+ */
6
+ export declare const PROTOCOL_VERSION = "1.0.0";
7
+ export * from "./events.js";
8
+ export * from "./domain.js";
9
+ export * from "./http.js";
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,UAAU,CAAC;AAExC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @brainpilot/protocol — single source of truth for the BrainPilot wire
3
+ * contract. Re-exports AG-UI events, domain schemas, and the Runtime HTTP
4
+ * contract. Every other package imports from here.
5
+ */
6
+ export const PROTOCOL_VERSION = "1.0.0";
7
+ export * from "./events.js";
8
+ export * from "./domain.js";
9
+ export * from "./http.js";
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,OAAO,CAAC;AAExC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC"}
package/package.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "@brainpilot/protocol",
3
+ "version": "0.0.1",
4
+ "license": "Apache-2.0",
5
+ "type": "module",
6
+ "description": "BrainPilot AG-UI events + REST/SSE schemas + Runtime HTTP contract (SSOT, zod-validated)",
7
+ "main": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "files": ["dist"],
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "git+https://github.com/NeuroAIHub/BrainPilot.git",
13
+ "directory": "packages/protocol"
14
+ },
15
+ "publishConfig": { "access": "public" },
16
+ "exports": {
17
+ ".": {
18
+ "types": "./dist/index.d.ts",
19
+ "default": "./dist/index.js"
20
+ }
21
+ },
22
+ "scripts": {
23
+ "build": "tsc -b",
24
+ "typecheck": "tsc -b",
25
+ "test": "vitest run"
26
+ },
27
+ "dependencies": {
28
+ "zod": "^3.24.0"
29
+ }
30
+ }