@skein-js/core 0.2.0 → 0.3.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/README.md +12 -2
- package/dist/index.d.ts +19 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,10 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
> The shared Agent Protocol **contract** for skein-js — wire types, the `SkeinStore` interface, the queue / bus / auth seams, and the edge error type.
|
|
4
4
|
|
|
5
|
-
Part of **[skein-js](
|
|
5
|
+
Part of **[skein-js](../../README.md)** — a TypeScript [Agent Protocol](https://github.com/langchain-ai/agent-protocol) server for [LangGraph.js](https://github.com/langchain-ai/langgraphjs), and a drop-in replacement for the LangGraph CLI.
|
|
6
6
|
|
|
7
7
|
**Status:** 🚧 Pre-alpha — implemented. The run engine, handler table, and SSE mapping that build on this contract live in [`@skein-js/agent-protocol`](../agent-protocol).
|
|
8
8
|
|
|
9
|
+
## Contents
|
|
10
|
+
|
|
11
|
+
- [What it does](#what-it-does)
|
|
12
|
+
- [Install](#install)
|
|
13
|
+
- [Usage](#usage)
|
|
14
|
+
- [API](#api)
|
|
15
|
+
- [Reuse](#reuse)
|
|
16
|
+
- [Learn more](#learn-more)
|
|
17
|
+
- [License](#license)
|
|
18
|
+
|
|
9
19
|
## What it does
|
|
10
20
|
|
|
11
21
|
Holds the Agent Protocol _contract_ once, against _normalized_ types, so behavior is identical across
|
|
@@ -83,7 +93,7 @@ in [`@skein-js/agent-protocol`](../agent-protocol) — never a reimplemented run
|
|
|
83
93
|
## Learn more
|
|
84
94
|
|
|
85
95
|
- [Agent Protocol surface](../../docs/agent-protocol.md) · [Storage](../../docs/storage.md)
|
|
86
|
-
- [skein-js overview](../../docs/index.md) · [Reuse-first architecture](../../docs/reuse.md)
|
|
96
|
+
- [skein-js overview](../../docs/index.md) · [Reuse-first architecture](../../docs/reuse.md) · [Root README](../../README.md)
|
|
87
97
|
|
|
88
98
|
## License
|
|
89
99
|
|
package/dist/index.d.ts
CHANGED
|
@@ -123,6 +123,24 @@ interface SkeinStore {
|
|
|
123
123
|
runs: RunRepo;
|
|
124
124
|
store: StoreRepo;
|
|
125
125
|
}
|
|
126
|
+
/**
|
|
127
|
+
* A driver-agnostic, JSON-serializable snapshot of every resource row — the unit of bulk
|
|
128
|
+
* transfer for persistence and migration tooling (e.g. `skein dev`'s cross-restart snapshot, and
|
|
129
|
+
* importing an existing LangGraph in-memory dev state). Each entry is an `[id, row]` tuple: the id
|
|
130
|
+
* is the entity's own id, except `items` (keyed by `JSON.stringify([namespace, key])`) and
|
|
131
|
+
* `runKwargs` (keyed by `run_id`, since {@link RunKwargs} has no id of its own).
|
|
132
|
+
*
|
|
133
|
+
* A driver MAY expose `restore(snapshot)` to bulk-load one of these verbatim — ids and timestamps
|
|
134
|
+
* preserved — which is what makes an import lossless. It is intentionally not part of
|
|
135
|
+
* {@link SkeinStore}: only migration tooling needs it, and consumers feature-detect it.
|
|
136
|
+
*/
|
|
137
|
+
interface SkeinStoreSnapshot {
|
|
138
|
+
assistants: [string, Assistant][];
|
|
139
|
+
threads: [string, Thread][];
|
|
140
|
+
runs: [string, Run][];
|
|
141
|
+
runKwargs: [string, RunKwargs][];
|
|
142
|
+
items: [string, Item][];
|
|
143
|
+
}
|
|
126
144
|
|
|
127
145
|
/**
|
|
128
146
|
* A normalized stream frame produced during a run. Adapters map these onto SSE
|
|
@@ -281,4 +299,4 @@ interface AuthEngine {
|
|
|
281
299
|
matchesFilters(metadata: Record<string, unknown> | undefined, filters?: AuthFilters): boolean;
|
|
282
300
|
}
|
|
283
301
|
|
|
284
|
-
export { type AssistantCreate, type AssistantRepo, type AuthAction, type AuthContext, type AuthEngine, type AuthFilterValue, type AuthFilters, type AuthResource, type AuthUser, type MultitaskStrategy, type QueuedRun, type RunConsumer, type RunConsumerOptions, type RunCreate, type RunEventBus, type RunFrame, type RunKwargs, type RunProcessor, type RunQueue, type RunRepo, type RunStatus, SkeinHttpError, type SkeinHttpErrorOptions, type SkeinStore, type StoreRepo, type StoreSearchQuery, TERMINAL_RUN_STATUSES, type ThreadCreate, type ThreadRepo, type ThreadUpdate, isSkeinHttpError, isTerminalRunStatus, serializeWireJson };
|
|
302
|
+
export { type AssistantCreate, type AssistantRepo, type AuthAction, type AuthContext, type AuthEngine, type AuthFilterValue, type AuthFilters, type AuthResource, type AuthUser, type MultitaskStrategy, type QueuedRun, type RunConsumer, type RunConsumerOptions, type RunCreate, type RunEventBus, type RunFrame, type RunKwargs, type RunProcessor, type RunQueue, type RunRepo, type RunStatus, SkeinHttpError, type SkeinHttpErrorOptions, type SkeinStore, type SkeinStoreSnapshot, type StoreRepo, type StoreSearchQuery, TERMINAL_RUN_STATUSES, type ThreadCreate, type ThreadRepo, type ThreadUpdate, isSkeinHttpError, isTerminalRunStatus, serializeWireJson };
|
package/package.json
CHANGED