@sigrun/shared 0.1.2 → 0.2.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.
- package/CHANGELOG.md +6 -0
- package/package.json +1 -1
- package/dist/access.d.ts +0 -55
- package/dist/access.js +0 -72
- package/dist/ambient.d.ts +0 -111
- package/dist/ambient.js +0 -23
- package/dist/blocks/format.d.ts +0 -28
- package/dist/blocks/format.js +0 -199
- package/dist/blocks/icons.d.ts +0 -12
- package/dist/blocks/icons.js +0 -64
- package/dist/blocks/index.d.ts +0 -25
- package/dist/blocks/index.js +0 -21
- package/dist/blocks/instance.d.ts +0 -29
- package/dist/blocks/instance.js +0 -51
- package/dist/blocks/lttb.d.ts +0 -16
- package/dist/blocks/lttb.js +0 -67
- package/dist/blocks/ops.d.ts +0 -44
- package/dist/blocks/ops.js +0 -294
- package/dist/blocks/text.d.ts +0 -43
- package/dist/blocks/text.js +0 -790
- package/dist/blocks/transport.d.ts +0 -77
- package/dist/blocks/transport.js +0 -11
- package/dist/blocks/types.d.ts +0 -541
- package/dist/blocks/types.js +0 -17
- package/dist/commands.d.ts +0 -75
- package/dist/commands.js +0 -25
- package/dist/conversations.d.ts +0 -31
- package/dist/conversations.js +0 -94
- package/dist/interactions.d.ts +0 -91
- package/dist/interactions.js +0 -21
- package/dist/jobs.d.ts +0 -109
- package/dist/jobs.js +0 -19
- package/dist/json.d.ts +0 -20
- package/dist/json.js +0 -13
- package/dist/live.d.ts +0 -71
- package/dist/live.js +0 -82
- package/dist/session-meta.d.ts +0 -119
- package/dist/session-meta.js +0 -13
- package/dist/settings.d.ts +0 -408
- package/dist/settings.js +0 -19
- package/dist/themes.d.ts +0 -50
- package/dist/themes.js +0 -156
- package/dist/turns.d.ts +0 -119
- package/dist/turns.js +0 -197
- package/dist/view-delta.d.ts +0 -54
- package/dist/view-delta.js +0 -135
- package/dist/views.d.ts +0 -822
- package/dist/views.js +0 -38
package/dist/views.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* §5 wire types (Tasks 9a–9d) — THE channel contract.
|
|
3
|
-
*
|
|
4
|
-
* Every HTTP/SSE payload shape both clients (webui, tui) consume is
|
|
5
|
-
* declared or re-exported here, and both import it directly (the tui
|
|
6
|
-
* imports from `@sigrun/shared`, never from server source). It is the
|
|
7
|
-
* intended basis for a generated OpenAPI schema later, so the purity
|
|
8
|
-
* rules are enforced by `test/views-purity.test.ts`:
|
|
9
|
-
*
|
|
10
|
-
* - imports and re-exports are `import type`/`export type` from SIBLING
|
|
11
|
-
* shared modules only, and type-only — they erase at compile time and
|
|
12
|
-
* contribute no runtime (the only runtime exports here are local pure
|
|
13
|
-
* constants);
|
|
14
|
-
* - no external package imports, no server/framework types, no route
|
|
15
|
-
* logic (the server's `src/server/views.ts` owns the RUNTIME
|
|
16
|
-
* serializer and re-exports this module);
|
|
17
|
-
* - no `node:` imports (the webui compiles DOM-only against this file).
|
|
18
|
-
*
|
|
19
|
-
* Spec §5: the server serves pi-durable's NATIVE views, not a bespoke
|
|
20
|
-
* endpoint list — so the conversation wire payload IS the view shape
|
|
21
|
-
* (`{ conversation, entries, docs }`; JSON-safe by construction) PLUS
|
|
22
|
-
* the sigrun-side `steer` field. The upstream view's inner shapes are
|
|
23
|
-
* re-declared STRUCTURALLY below (`ViewConversation`, `ViewEntry`,
|
|
24
|
-
* `ViewMessage`, `WireBlock`): deliberately loose where channels only
|
|
25
|
-
* read a subset, and structurally compatible with the upstream types so
|
|
26
|
-
* the server's serializer (which spreads an upstream
|
|
27
|
-
* `ConversationView`) typechecks against this declaration — the
|
|
28
|
-
* captured-schema fixture (`src/server/schema-fixture.ts`,
|
|
29
|
-
* `view-schema.json`) pins the UPSTREAM shape, and
|
|
30
|
-
* `test/schema-drift.test.ts` trips on upstream drift.
|
|
31
|
-
*
|
|
32
|
-
* `serializeConversationView` (src/server/views.ts) is the single
|
|
33
|
-
* chokepoint every §5 endpoint that returns a conversation goes through
|
|
34
|
-
* — including each SSE watch frame (T9d) — so the fixture continues to
|
|
35
|
-
* describe the wire.
|
|
36
|
-
*/
|
|
37
|
-
/** The `Content-Type` of the JSONL export/import wire (Task 5b/5c). */
|
|
38
|
-
export const JSONL_CONTENT_TYPE = "application/x-ndjson";
|