@skein-js/express 0.4.0 → 0.5.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/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { ProtocolRuntime, Logger, ProtocolDeps, ProtocolHandlers, ProtocolRequest, ProtocolResponse } from '@skein-js/agent-protocol';
2
- import { ModuleImporter } from '@skein-js/config';
2
+ import { ModuleImporter, GraphSchemas } from '@skein-js/config';
3
3
  import { CorsOptions } from 'cors';
4
4
  import { Router, Express, Request, Response } from 'express';
5
5
  import { Server } from 'node:http';
@@ -130,7 +130,7 @@ interface InMemoryRuntimeConfig {
130
130
  cors?: CorsOptions;
131
131
  }
132
132
  /** Load `langgraph.json`, wiring fresh in-memory drivers and reading its `http.cors` for the adapter. */
133
- declare function loadInMemoryRuntime(configPath: string, importModule?: ModuleImporter): Promise<InMemoryRuntimeConfig>;
133
+ declare function loadInMemoryRuntime(configPath: string, importModule?: ModuleImporter, staticSchemas?: Record<string, GraphSchemas>): Promise<InMemoryRuntimeConfig>;
134
134
  interface ReloadableInMemoryRuntime extends InMemoryRuntimeConfig {
135
135
  /**
136
136
  * Re-read the config and swap in freshly imported graphs, keeping the same drivers. Because the
@@ -150,7 +150,7 @@ interface ReloadableInMemoryRuntime extends InMemoryRuntimeConfig {
150
150
  * dev` pairs this with vite's watcher (clear vite's cache, then `reloadGraphs()` — no server
151
151
  * restart, no lost state) and with on-disk JSON persistence across restarts.
152
152
  */
153
- declare function loadReloadableInMemoryRuntime(configPath: string, importModule?: ModuleImporter): Promise<ReloadableInMemoryRuntime>;
153
+ declare function loadReloadableInMemoryRuntime(configPath: string, importModule?: ModuleImporter, staticSchemas?: Record<string, GraphSchemas>): Promise<ReloadableInMemoryRuntime>;
154
154
 
155
155
  /**
156
156
  * Read a LangGraph `.langgraph_api/` directory and reconstruct skein's `DevStateSnapshot`.
package/dist/index.js CHANGED
@@ -5,7 +5,10 @@ import {
5
5
 
6
6
  // src/in-memory-runtime.ts
7
7
  import { MemorySaver } from "@langchain/langgraph";
8
- import { loadAuthEngine, loadConfig } from "@skein-js/config";
8
+ import {
9
+ loadAuthEngine,
10
+ loadConfig
11
+ } from "@skein-js/config";
9
12
  import { MemoryRunEventBus, MemoryRunQueue, MemorySkeinStore } from "@skein-js/storage-memory";
10
13
 
11
14
  // src/cors-config.ts
@@ -107,8 +110,12 @@ function buildInMemoryDeps(graphs) {
107
110
  checkpointer: new MemorySaver()
108
111
  };
109
112
  }
110
- async function loadInMemoryRuntime(configPath, importModule) {
111
- const { graphs, config, configDir } = await loadConfig({ configPath, importModule });
113
+ async function loadInMemoryRuntime(configPath, importModule, staticSchemas) {
114
+ const { graphs, config, configDir } = await loadConfig({
115
+ configPath,
116
+ importModule,
117
+ staticSchemas
118
+ });
112
119
  const deps = buildInMemoryDeps(toGraphResolver(graphs));
113
120
  deps.auth = await loadAuthEngine(config.auth, { configDir, importModule });
114
121
  return {
@@ -116,8 +123,8 @@ async function loadInMemoryRuntime(configPath, importModule) {
116
123
  cors: corsFromHttpConfig(config.http)
117
124
  };
118
125
  }
119
- async function loadReloadableInMemoryRuntime(configPath, importModule) {
120
- const first = await loadConfig({ configPath, importModule });
126
+ async function loadReloadableInMemoryRuntime(configPath, importModule, staticSchemas) {
127
+ const first = await loadConfig({ configPath, importModule, staticSchemas });
121
128
  let current = first.graphs;
122
129
  const graphs = {
123
130
  ids: first.graphs.ids,
@@ -138,7 +145,7 @@ async function loadReloadableInMemoryRuntime(configPath, importModule) {
138
145
  deps,
139
146
  cors: corsFromHttpConfig(first.config.http),
140
147
  reloadGraphs: async () => {
141
- current = (await loadConfig({ configPath, importModule })).graphs;
148
+ current = (await loadConfig({ configPath, importModule, staticSchemas })).graphs;
142
149
  },
143
150
  snapshotState: () => ({
144
151
  version: 1,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skein-js/express",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "Express adapter for skein-js — mount the Agent Protocol on an Express Router.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Maina Wycliffe <wmmaina7@gmail.com>",
@@ -43,10 +43,10 @@
43
43
  "cors": "^2.8.5",
44
44
  "superjson": "^2.2.6",
45
45
  "zod": "^3.25.76",
46
- "@skein-js/agent-protocol": "0.4.0",
47
- "@skein-js/config": "0.4.0",
48
- "@skein-js/storage-memory": "0.4.0",
49
- "@skein-js/core": "0.4.0"
46
+ "@skein-js/core": "0.5.0",
47
+ "@skein-js/config": "0.5.0",
48
+ "@skein-js/agent-protocol": "0.5.0",
49
+ "@skein-js/storage-memory": "0.5.0"
50
50
  },
51
51
  "peerDependencies": {
52
52
  "@langchain/langgraph": "^1.4.0",