@eir-labs/coltrane 0.5.1 → 0.6.2
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/src/bifrost_invoker.js +5 -3
- package/dist/src/bifrost_invoker.js.map +1 -1
- package/dist/src/claude_invoker.d.ts +20 -3
- package/dist/src/claude_invoker.js +30 -5
- package/dist/src/claude_invoker.js.map +1 -1
- package/dist/src/cli.d.ts +1 -1
- package/dist/src/conduct_daemon.d.ts +59 -0
- package/dist/src/conduct_daemon.js +178 -0
- package/dist/src/conduct_daemon.js.map +1 -0
- package/dist/src/genome_schema.d.ts +366 -0
- package/dist/src/genome_schema.js +129 -0
- package/dist/src/genome_schema.js.map +1 -1
- package/dist/src/genome_store.d.ts +29 -0
- package/dist/src/genome_store.js +326 -0
- package/dist/src/genome_store.js.map +1 -0
- package/dist/src/hosted_tools.d.ts +23 -0
- package/dist/src/hosted_tools.js +170 -0
- package/dist/src/hosted_tools.js.map +1 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/src/index.js +3 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/mcp.js +10 -1
- package/dist/src/mcp.js.map +1 -1
- package/dist/src/output_mirror.d.ts +70 -0
- package/dist/src/output_mirror.js +381 -0
- package/dist/src/output_mirror.js.map +1 -0
- package/dist/src/outputs.d.ts +2 -0
- package/dist/src/outputs.js +37 -9
- package/dist/src/outputs.js.map +1 -1
- package/dist/src/play_worker.d.ts +24 -0
- package/dist/src/play_worker.js +49 -0
- package/dist/src/play_worker.js.map +1 -0
- package/dist/src/registry.d.ts +2 -0
- package/dist/src/registry.js +63 -33
- package/dist/src/registry.js.map +1 -1
- package/dist/src/runtime.js +19 -1
- package/dist/src/runtime.js.map +1 -1
- package/dist/src/seal_drill.d.ts +32 -0
- package/dist/src/seal_drill.js +138 -0
- package/dist/src/seal_drill.js.map +1 -0
- package/dist/src/server.d.ts +28 -1
- package/dist/src/server.js +243 -16
- package/dist/src/server.js.map +1 -1
- package/dist/src/skill_subprocess.js +12 -4
- package/dist/src/skill_subprocess.js.map +1 -1
- package/dist/src/supabase_genome.d.ts +28 -0
- package/dist/src/supabase_genome.js +49 -0
- package/dist/src/supabase_genome.js.map +1 -0
- package/dist/src/tool_surface.d.ts +5 -0
- package/dist/src/tool_surface.js +15 -0
- package/dist/src/tool_surface.js.map +1 -0
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/package.json +18 -3
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { LoadedGenome } from "./loader.js";
|
|
2
|
+
export interface SupabaseGenomeConfig {
|
|
3
|
+
url: string;
|
|
4
|
+
key: string;
|
|
5
|
+
token?: string;
|
|
6
|
+
}
|
|
7
|
+
export type SupabaseClientLike = {
|
|
8
|
+
from(table: string): unknown;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Reads COLTRANE_SUPABASE_URL + COLTRANE_SUPABASE_KEY from the given env dict.
|
|
12
|
+
* Returns a SupabaseGenomeConfig only when both are present and non-empty strings.
|
|
13
|
+
* COLTRANE_SUPABASE_TOKEN is optional; when absent the returned object has no `token` key.
|
|
14
|
+
*/
|
|
15
|
+
export declare function supabaseGenomeConfigFromEnv(env?: NodeJS.ProcessEnv): SupabaseGenomeConfig | null;
|
|
16
|
+
/**
|
|
17
|
+
* Load the coltrane genome from a Supabase-hosted store.
|
|
18
|
+
*
|
|
19
|
+
* A0 ships the SEAM only: the client is accepted/used here so the injection point
|
|
20
|
+
* is established; the concrete row→LoadedGenome query mapping is the next chunk.
|
|
21
|
+
*
|
|
22
|
+
* When opts.client is injected (tests always do this) no @supabase/supabase-js import
|
|
23
|
+
* occurs. Without injection the package is lazy-imported and a real client is constructed
|
|
24
|
+
* (cfg.token is forwarded as the Authorization header for future RLS scoping).
|
|
25
|
+
*/
|
|
26
|
+
export declare function loadGenomeFromSupabase(cfg: SupabaseGenomeConfig, opts?: {
|
|
27
|
+
client?: SupabaseClientLike;
|
|
28
|
+
}): Promise<LoadedGenome>;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reads COLTRANE_SUPABASE_URL + COLTRANE_SUPABASE_KEY from the given env dict.
|
|
3
|
+
* Returns a SupabaseGenomeConfig only when both are present and non-empty strings.
|
|
4
|
+
* COLTRANE_SUPABASE_TOKEN is optional; when absent the returned object has no `token` key.
|
|
5
|
+
*/
|
|
6
|
+
export function supabaseGenomeConfigFromEnv(env = process.env) {
|
|
7
|
+
const url = env["COLTRANE_SUPABASE_URL"];
|
|
8
|
+
const key = env["COLTRANE_SUPABASE_KEY"];
|
|
9
|
+
if (!url || !key)
|
|
10
|
+
return null;
|
|
11
|
+
const token = env["COLTRANE_SUPABASE_TOKEN"];
|
|
12
|
+
return token ? { url, key, token } : { url, key };
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Load the coltrane genome from a Supabase-hosted store.
|
|
16
|
+
*
|
|
17
|
+
* A0 ships the SEAM only: the client is accepted/used here so the injection point
|
|
18
|
+
* is established; the concrete row→LoadedGenome query mapping is the next chunk.
|
|
19
|
+
*
|
|
20
|
+
* When opts.client is injected (tests always do this) no @supabase/supabase-js import
|
|
21
|
+
* occurs. Without injection the package is lazy-imported and a real client is constructed
|
|
22
|
+
* (cfg.token is forwarded as the Authorization header for future RLS scoping).
|
|
23
|
+
*/
|
|
24
|
+
export async function loadGenomeFromSupabase(cfg, opts) {
|
|
25
|
+
let client;
|
|
26
|
+
if (opts?.client !== undefined) {
|
|
27
|
+
client = opts.client;
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
const { createClient } = await import("@supabase/supabase-js");
|
|
31
|
+
const authOpts = cfg.token
|
|
32
|
+
? { global: { headers: { Authorization: `Bearer ${cfg.token}` } } }
|
|
33
|
+
: undefined;
|
|
34
|
+
client = createClient(cfg.url, cfg.key, authOpts);
|
|
35
|
+
}
|
|
36
|
+
// A0: DB row→LoadedGenome mapping deferred to the schema chunk.
|
|
37
|
+
// Call client.from to establish the seam and confirm the client is wired.
|
|
38
|
+
void client.from("genomes");
|
|
39
|
+
return {
|
|
40
|
+
core_types: new Map(),
|
|
41
|
+
domain_types: new Map(),
|
|
42
|
+
agents: new Map(),
|
|
43
|
+
standards: new Map(),
|
|
44
|
+
skills: new Map(),
|
|
45
|
+
evals: new Map(),
|
|
46
|
+
load_errors: [],
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=supabase_genome.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"supabase_genome.js","sourceRoot":"","sources":["../../src/supabase_genome.ts"],"names":[],"mappings":"AAcA;;;;GAIG;AACH,MAAM,UAAU,2BAA2B,CACzC,MAAyB,OAAO,CAAC,GAAG;IAEpC,MAAM,GAAG,GAAG,GAAG,CAAC,uBAAuB,CAAC,CAAC;IACzC,MAAM,GAAG,GAAG,GAAG,CAAC,uBAAuB,CAAC,CAAC;IACzC,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG;QAAE,OAAO,IAAI,CAAC;IAC9B,MAAM,KAAK,GAAG,GAAG,CAAC,yBAAyB,CAAC,CAAC;IAC7C,OAAO,KAAK,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AACpD,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAC1C,GAAyB,EACzB,IAAsC;IAEtC,IAAI,MAA0B,CAAC;IAC/B,IAAI,IAAI,EAAE,MAAM,KAAK,SAAS,EAAE,CAAC;QAC/B,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;SAAM,CAAC;QACN,MAAM,EAAE,YAAY,EAAE,GAAG,MAAM,MAAM,CAAC,uBAAuB,CAAC,CAAC;QAC/D,MAAM,QAAQ,GAAG,GAAG,CAAC,KAAK;YACxB,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,EAAE,aAAa,EAAE,UAAU,GAAG,CAAC,KAAK,EAAE,EAAE,EAAE,EAAE;YACnE,CAAC,CAAC,SAAS,CAAC;QACd,MAAM,GAAG,YAAY,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAuB,CAAC;IAC1E,CAAC;IAED,gEAAgE;IAChE,0EAA0E;IAC1E,KAAK,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAE5B,OAAO;QACL,UAAU,EAAE,IAAI,GAAG,EAAE;QACrB,YAAY,EAAE,IAAI,GAAG,EAAE;QACvB,MAAM,EAAE,IAAI,GAAG,EAAE;QACjB,SAAS,EAAE,IAAI,GAAG,EAAE;QACpB,MAAM,EAAE,IAAI,GAAG,EAAE;QACjB,KAAK,EAAE,IAAI,GAAG,EAAE;QAChB,WAAW,EAAE,EAAE;KAChB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { createToolSurface, dispatchTool, type SurfaceTool, type SurfaceToolResult, type ToolSurfaceDeps, type ServerDeps, type ToolResult, } from "./server.js";
|
|
2
|
+
export { MCP_TOOLS, type MCPToolDef } from "./mcp.js";
|
|
3
|
+
export { createRegistry, loadRegistry, type Registry } from "./registry.js";
|
|
4
|
+
export { createOutputStore } from "./outputs.js";
|
|
5
|
+
export { MemoryLedger } from "./ledger.js";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// tool_surface — the package's public seam for the engine's FULL MCP tool surface.
|
|
2
|
+
//
|
|
3
|
+
// Governor ruling: there is no different thing. The hosted Coltrane MCP is the Coltrane
|
|
4
|
+
// MCP — the full tool surface, functioning against the Supabase store. A host imports this
|
|
5
|
+
// subpath (or "./genome_store" for the store port), builds per-request deps from the
|
|
6
|
+
// caller's bearer, and mounts createToolSurface() on whatever transport it serves. The
|
|
7
|
+
// stdio server consumes the same registry internally — one surface, two transports.
|
|
8
|
+
export { createToolSurface, dispatchTool, } from "./server.js";
|
|
9
|
+
export { MCP_TOOLS } from "./mcp.js";
|
|
10
|
+
// Host-side constructors — everything a hosted mount needs to build per-request deps
|
|
11
|
+
// without importing the package's main index (which drags process-local modules).
|
|
12
|
+
export { createRegistry, loadRegistry } from "./registry.js";
|
|
13
|
+
export { createOutputStore } from "./outputs.js";
|
|
14
|
+
export { MemoryLedger } from "./ledger.js";
|
|
15
|
+
//# sourceMappingURL=tool_surface.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool_surface.js","sourceRoot":"","sources":["../../src/tool_surface.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,EAAE;AACF,wFAAwF;AACxF,2FAA2F;AAC3F,qFAAqF;AACrF,uFAAuF;AACvF,oFAAoF;AACpF,OAAO,EACL,iBAAiB,EACjB,YAAY,GAMb,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,SAAS,EAAmB,MAAM,UAAU,CAAC;AAEtD,qFAAqF;AACrF,kFAAkF;AAClF,OAAO,EAAE,cAAc,EAAE,YAAY,EAAiB,MAAM,eAAe,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/src/version.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Engine semver. Keep in lockstep with package.json `version` (enforced by test). */
|
|
2
|
-
export declare const COLTRANE_VERSION = "0.
|
|
2
|
+
export declare const COLTRANE_VERSION = "0.6.2";
|
|
3
3
|
/**
|
|
4
4
|
* The commit this engine checkout is sitting on, or null when it can't be determined.
|
|
5
5
|
*
|
package/dist/src/version.js
CHANGED
|
@@ -17,7 +17,7 @@ import { existsSync, readFileSync, statSync } from "node:fs";
|
|
|
17
17
|
import { dirname, join, resolve } from "node:path";
|
|
18
18
|
import { fileURLToPath } from "node:url";
|
|
19
19
|
/** Engine semver. Keep in lockstep with package.json `version` (enforced by test). */
|
|
20
|
-
export const COLTRANE_VERSION = "0.
|
|
20
|
+
export const COLTRANE_VERSION = "0.6.2";
|
|
21
21
|
/**
|
|
22
22
|
* The commit this engine checkout is sitting on, or null when it can't be determined.
|
|
23
23
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eir-labs/coltrane",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"description": "A methodology engine \u2014 a typed substrate for defining agents, composing multi-phase standards, dispatching gigs, and sealing every output to a content-addressed ledger. Ships as an MCP server.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -36,7 +36,22 @@
|
|
|
36
36
|
"import": "./dist/src/index.js",
|
|
37
37
|
"default": "./dist/src/index.js"
|
|
38
38
|
},
|
|
39
|
-
"./package.json": "./package.json"
|
|
39
|
+
"./package.json": "./package.json",
|
|
40
|
+
"./hosted_tools": {
|
|
41
|
+
"types": "./dist/src/hosted_tools.d.ts",
|
|
42
|
+
"import": "./dist/src/hosted_tools.js",
|
|
43
|
+
"default": "./dist/src/hosted_tools.js"
|
|
44
|
+
},
|
|
45
|
+
"./genome_store": {
|
|
46
|
+
"types": "./dist/src/genome_store.d.ts",
|
|
47
|
+
"import": "./dist/src/genome_store.js",
|
|
48
|
+
"default": "./dist/src/genome_store.js"
|
|
49
|
+
},
|
|
50
|
+
"./tool_surface": {
|
|
51
|
+
"types": "./dist/src/tool_surface.d.ts",
|
|
52
|
+
"import": "./dist/src/tool_surface.js",
|
|
53
|
+
"default": "./dist/src/tool_surface.js"
|
|
54
|
+
}
|
|
40
55
|
},
|
|
41
56
|
"files": [
|
|
42
57
|
"dist/src",
|
|
@@ -81,4 +96,4 @@
|
|
|
81
96
|
"typescript": "^5.6.0",
|
|
82
97
|
"vitest": "^3.0.0"
|
|
83
98
|
}
|
|
84
|
-
}
|
|
99
|
+
}
|