skillscript-runtime 0.2.4
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/ARCHITECTURE.md +70 -0
- package/LICENSE +21 -0
- package/README.md +346 -0
- package/dist/audit.d.ts +33 -0
- package/dist/audit.d.ts.map +1 -0
- package/dist/audit.js +76 -0
- package/dist/audit.js.map +1 -0
- package/dist/bootstrap.d.ts +69 -0
- package/dist/bootstrap.d.ts.map +1 -0
- package/dist/bootstrap.js +117 -0
- package/dist/bootstrap.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +805 -0
- package/dist/cli.js.map +1 -0
- package/dist/compile.d.ts +88 -0
- package/dist/compile.d.ts.map +1 -0
- package/dist/compile.js +544 -0
- package/dist/compile.js.map +1 -0
- package/dist/connectors/agent-noop.d.ts +23 -0
- package/dist/connectors/agent-noop.d.ts.map +1 -0
- package/dist/connectors/agent-noop.js +43 -0
- package/dist/connectors/agent-noop.js.map +1 -0
- package/dist/connectors/agent.d.ts +54 -0
- package/dist/connectors/agent.d.ts.map +1 -0
- package/dist/connectors/agent.js +21 -0
- package/dist/connectors/agent.js.map +1 -0
- package/dist/connectors/index.d.ts +13 -0
- package/dist/connectors/index.d.ts.map +1 -0
- package/dist/connectors/index.js +17 -0
- package/dist/connectors/index.js.map +1 -0
- package/dist/connectors/local-model.d.ts +41 -0
- package/dist/connectors/local-model.d.ts.map +1 -0
- package/dist/connectors/local-model.js +106 -0
- package/dist/connectors/local-model.js.map +1 -0
- package/dist/connectors/mcp.d.ts +22 -0
- package/dist/connectors/mcp.d.ts.map +1 -0
- package/dist/connectors/mcp.js +31 -0
- package/dist/connectors/mcp.js.map +1 -0
- package/dist/connectors/memory-store.d.ts +53 -0
- package/dist/connectors/memory-store.d.ts.map +1 -0
- package/dist/connectors/memory-store.js +169 -0
- package/dist/connectors/memory-store.js.map +1 -0
- package/dist/connectors/registry.d.ts +74 -0
- package/dist/connectors/registry.d.ts.map +1 -0
- package/dist/connectors/registry.js +127 -0
- package/dist/connectors/registry.js.map +1 -0
- package/dist/connectors/skill-store.d.ts +38 -0
- package/dist/connectors/skill-store.d.ts.map +1 -0
- package/dist/connectors/skill-store.js +314 -0
- package/dist/connectors/skill-store.js.map +1 -0
- package/dist/connectors/types.d.ts +188 -0
- package/dist/connectors/types.d.ts.map +1 -0
- package/dist/connectors/types.js +35 -0
- package/dist/connectors/types.js.map +1 -0
- package/dist/dashboard/server.d.ts +40 -0
- package/dist/dashboard/server.d.ts.map +1 -0
- package/dist/dashboard/server.js +122 -0
- package/dist/dashboard/server.js.map +1 -0
- package/dist/dashboard/spa/app.js +375 -0
- package/dist/dashboard/spa/index.html +26 -0
- package/dist/dashboard/spa/styles.css +99 -0
- package/dist/errors.d.ts +111 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +187 -0
- package/dist/errors.js.map +1 -0
- package/dist/filters.d.ts +17 -0
- package/dist/filters.d.ts.map +1 -0
- package/dist/filters.js +40 -0
- package/dist/filters.js.map +1 -0
- package/dist/index.d.ts +41 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +33 -0
- package/dist/index.js.map +1 -0
- package/dist/lint.d.ts +97 -0
- package/dist/lint.d.ts.map +1 -0
- package/dist/lint.js +990 -0
- package/dist/lint.js.map +1 -0
- package/dist/mcp-server.d.ts +93 -0
- package/dist/mcp-server.d.ts.map +1 -0
- package/dist/mcp-server.js +505 -0
- package/dist/mcp-server.js.map +1 -0
- package/dist/metrics.d.ts +51 -0
- package/dist/metrics.d.ts.map +1 -0
- package/dist/metrics.js +107 -0
- package/dist/metrics.js.map +1 -0
- package/dist/parser.d.ts +160 -0
- package/dist/parser.d.ts.map +1 -0
- package/dist/parser.js +991 -0
- package/dist/parser.js.map +1 -0
- package/dist/provenance.d.ts +43 -0
- package/dist/provenance.d.ts.map +1 -0
- package/dist/provenance.js +58 -0
- package/dist/provenance.js.map +1 -0
- package/dist/runtime.d.ts +145 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.js +1071 -0
- package/dist/runtime.js.map +1 -0
- package/dist/scheduler.d.ts +121 -0
- package/dist/scheduler.d.ts.map +1 -0
- package/dist/scheduler.js +271 -0
- package/dist/scheduler.js.map +1 -0
- package/dist/skill-manager.d.ts +121 -0
- package/dist/skill-manager.d.ts.map +1 -0
- package/dist/skill-manager.js +251 -0
- package/dist/skill-manager.js.map +1 -0
- package/dist/testing/conformance.d.ts +57 -0
- package/dist/testing/conformance.d.ts.map +1 -0
- package/dist/testing/conformance.js +365 -0
- package/dist/testing/conformance.js.map +1 -0
- package/dist/testing/index.d.ts +3 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +5 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/trace.d.ts +141 -0
- package/dist/trace.d.ts.map +1 -0
- package/dist/trace.js +226 -0
- package/dist/trace.js.map +1 -0
- package/examples/README.md +56 -0
- package/examples/classify-support-ticket.skill.md +30 -0
- package/examples/cut-release-tag.skill.md +40 -0
- package/examples/doc-qa-with-citations.skill.md +12 -0
- package/examples/feedback-sentiment-scan.skill.md +29 -0
- package/examples/hello.skill.md +9 -0
- package/examples/hello.skill.provenance.json +10 -0
- package/examples/morning-brief.skill.md +24 -0
- package/examples/programmatic-trace-demo.mjs +89 -0
- package/examples/service-health-watch.skill.md +18 -0
- package/package.json +100 -0
- package/scaffold/config.toml +35 -0
- package/scaffold/connectors.json +19 -0
- package/scaffold/examples/hello.skill.md +9 -0
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
/** The five connector kinds. */
|
|
2
|
+
export type ConnectorType = "skill_store" | "memory_store" | "local_model" | "mcp_connector" | "agent_connector";
|
|
3
|
+
/**
|
|
4
|
+
* Static capabilities — declared by the connector class, consumed by the
|
|
5
|
+
* linter offline. `features` is a string→boolean map of feature flags;
|
|
6
|
+
* skill `# Requires:` clauses match against the names. See per-contract
|
|
7
|
+
* feature-flag namespaces below.
|
|
8
|
+
*/
|
|
9
|
+
export interface StaticCapabilities {
|
|
10
|
+
connector_type: ConnectorType;
|
|
11
|
+
/** Implementation class name; appears in conformance test output + dashboard. */
|
|
12
|
+
implementation: string;
|
|
13
|
+
/** Contract version this implementation targets (e.g. "1.0.0"). Lets the runtime refuse incompatible impls. */
|
|
14
|
+
contract_version: string;
|
|
15
|
+
features: Record<string, boolean>;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Dynamic manifest — instance state. Runtime caches per `capabilities_version`;
|
|
19
|
+
* connectors bump version on schema/structural changes only.
|
|
20
|
+
*/
|
|
21
|
+
export interface ManifestInfo {
|
|
22
|
+
capabilities_version: string;
|
|
23
|
+
manifest: Record<string, unknown>;
|
|
24
|
+
}
|
|
25
|
+
export type SkillStatus = "Draft" | "Approved" | "Disabled";
|
|
26
|
+
/**
|
|
27
|
+
* The source bytes of a skill plus its identity metadata. Returned by
|
|
28
|
+
* `SkillStore.load()`. `version` is opaque-substrate-declared (equality
|
|
29
|
+
* comparison only); `content_hash` is substrate-independent SHA-256 of
|
|
30
|
+
* canonicalized source. Use `content_hash` for staleness / dependency
|
|
31
|
+
* walking; use `version` for display + substrate-specific pinning.
|
|
32
|
+
*/
|
|
33
|
+
export interface SkillSource {
|
|
34
|
+
name: string;
|
|
35
|
+
version: string;
|
|
36
|
+
content_hash: string;
|
|
37
|
+
source: string;
|
|
38
|
+
metadata: SkillMeta;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Skill metadata — everything you can know about a skill without loading
|
|
42
|
+
* its body. Returned by `query()` / `metadata()`. `created_at` /
|
|
43
|
+
* `updated_at` / `status_changed_at` are Unix seconds.
|
|
44
|
+
*/
|
|
45
|
+
export interface SkillMeta {
|
|
46
|
+
name: string;
|
|
47
|
+
version: string;
|
|
48
|
+
content_hash: string;
|
|
49
|
+
status: SkillStatus;
|
|
50
|
+
description?: string;
|
|
51
|
+
vars?: string[];
|
|
52
|
+
requires?: string[];
|
|
53
|
+
triggers?: Array<{
|
|
54
|
+
source: string;
|
|
55
|
+
name: string;
|
|
56
|
+
agent_id?: string;
|
|
57
|
+
}>;
|
|
58
|
+
outputs?: string[];
|
|
59
|
+
type?: "procedural" | "data";
|
|
60
|
+
created_at: number;
|
|
61
|
+
updated_at: number;
|
|
62
|
+
status_changed_at?: number;
|
|
63
|
+
author?: string;
|
|
64
|
+
metadata_bag?: Record<string, unknown>;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Records a write or status transition. `previous_status` is populated
|
|
68
|
+
* on every `update_status()` call so audit traces can reconstruct the
|
|
69
|
+
* lifecycle without reading the full version list. `changed_at` is
|
|
70
|
+
* Unix seconds.
|
|
71
|
+
*/
|
|
72
|
+
export interface VersionInfo {
|
|
73
|
+
name: string;
|
|
74
|
+
version: string;
|
|
75
|
+
content_hash: string;
|
|
76
|
+
status: SkillStatus;
|
|
77
|
+
previous_status?: SkillStatus;
|
|
78
|
+
changed_at: number;
|
|
79
|
+
changed_by?: string;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Filter shape for `SkillStore.query()`. Extensible — substrates honor what
|
|
83
|
+
* they support and ignore the rest. `name_pattern` is a substrate-specific
|
|
84
|
+
* glob/regex string; substrates declare support via the
|
|
85
|
+
* `supports_tag_filter` / `supports_versioning` feature flags.
|
|
86
|
+
*/
|
|
87
|
+
export interface SkillFilter {
|
|
88
|
+
status?: SkillStatus | SkillStatus[];
|
|
89
|
+
type?: "procedural" | "data";
|
|
90
|
+
tag?: string | string[];
|
|
91
|
+
author?: string;
|
|
92
|
+
since?: number;
|
|
93
|
+
name_pattern?: string;
|
|
94
|
+
limit?: number;
|
|
95
|
+
offset?: number;
|
|
96
|
+
[key: string]: unknown;
|
|
97
|
+
}
|
|
98
|
+
export interface SkillStore {
|
|
99
|
+
/** Throws `SkillNotFoundError` if `name` (+ optional `version`) is missing. */
|
|
100
|
+
load(name: string, version?: string): Promise<SkillSource>;
|
|
101
|
+
/** Returns empty array on no matches; never throws for "not found". */
|
|
102
|
+
query(filter?: SkillFilter): Promise<SkillMeta[]>;
|
|
103
|
+
/** Throws `SkillNotFoundError` if missing. */
|
|
104
|
+
metadata(name: string): Promise<SkillMeta>;
|
|
105
|
+
/** Throws `SkillNotFoundError` if missing. Empty array is valid for new skills. */
|
|
106
|
+
versions(name: string): Promise<VersionInfo[]>;
|
|
107
|
+
/** Creates or updates. Throws `LintFailureError` if tier-1 lint rejects. */
|
|
108
|
+
store(name: string, source: string, metadata?: Partial<SkillMeta>): Promise<VersionInfo>;
|
|
109
|
+
/** Substrate-only delete. Referential integrity is the runtime's concern (T2 Phase 2.1). */
|
|
110
|
+
delete(name: string): Promise<void>;
|
|
111
|
+
/** Returns a `VersionInfo` with `previous_status` populated. */
|
|
112
|
+
update_status(name: string, status: SkillStatus): Promise<VersionInfo>;
|
|
113
|
+
manifest(): Promise<ManifestInfo>;
|
|
114
|
+
}
|
|
115
|
+
export interface SkillStoreClass {
|
|
116
|
+
new (...args: never[]): SkillStore;
|
|
117
|
+
staticCapabilities(): StaticCapabilities;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Portable memory shape. Field-access semantics (4-tier resolution):
|
|
121
|
+
* 1. Core fields — id, summary, detail, score
|
|
122
|
+
* 2. Curated substrate subset — top-level fields whose concept is portable
|
|
123
|
+
* 3. Substrate-specific — accessed via metadata.X
|
|
124
|
+
* 4. Ambient passthrough — literal $(MEMORY.field) for unknowns
|
|
125
|
+
*
|
|
126
|
+
* Connector duplication discipline: a curated-subset field must be at
|
|
127
|
+
* top-level only, never also in metadata. Silent divergence otherwise.
|
|
128
|
+
*/
|
|
129
|
+
export interface PortableMemory {
|
|
130
|
+
id: string;
|
|
131
|
+
summary: string;
|
|
132
|
+
detail?: string;
|
|
133
|
+
score?: number;
|
|
134
|
+
thread_status?: string;
|
|
135
|
+
pinned?: boolean;
|
|
136
|
+
confidence?: number;
|
|
137
|
+
domain_tags?: string[];
|
|
138
|
+
payload_type?: string;
|
|
139
|
+
knowledge_type?: string;
|
|
140
|
+
recipients?: string[];
|
|
141
|
+
expires_at?: number;
|
|
142
|
+
created_at?: number;
|
|
143
|
+
agent_id?: string;
|
|
144
|
+
vault?: string;
|
|
145
|
+
metadata?: Record<string, unknown>;
|
|
146
|
+
}
|
|
147
|
+
export interface QueryFilters {
|
|
148
|
+
query: string;
|
|
149
|
+
limit: number;
|
|
150
|
+
mode: "fts" | "semantic" | "rerank" | string;
|
|
151
|
+
[key: string]: unknown;
|
|
152
|
+
}
|
|
153
|
+
export interface MemoryStore {
|
|
154
|
+
query(filters: QueryFilters): Promise<PortableMemory[]>;
|
|
155
|
+
manifest(): Promise<ManifestInfo>;
|
|
156
|
+
}
|
|
157
|
+
export interface MemoryStoreClass {
|
|
158
|
+
new (...args: never[]): MemoryStore;
|
|
159
|
+
staticCapabilities(): StaticCapabilities;
|
|
160
|
+
}
|
|
161
|
+
export interface LocalModel {
|
|
162
|
+
run(prompt: string, opts: {
|
|
163
|
+
maxTokens?: number;
|
|
164
|
+
model?: string;
|
|
165
|
+
}): Promise<string>;
|
|
166
|
+
manifest(): Promise<ManifestInfo>;
|
|
167
|
+
}
|
|
168
|
+
export interface LocalModelClass {
|
|
169
|
+
new (...args: never[]): LocalModel;
|
|
170
|
+
staticCapabilities(): StaticCapabilities;
|
|
171
|
+
}
|
|
172
|
+
/** Identity overrides threaded through `$` op dispatch. Per-call > registry > intrinsic. */
|
|
173
|
+
export interface McpDispatchCtx {
|
|
174
|
+
agentId?: string;
|
|
175
|
+
isAdmin?: boolean;
|
|
176
|
+
}
|
|
177
|
+
export interface McpConnector {
|
|
178
|
+
call(toolName: string, args: Record<string, unknown>, ctxOverrides?: McpDispatchCtx): Promise<unknown>;
|
|
179
|
+
manifest(): Promise<ManifestInfo>;
|
|
180
|
+
}
|
|
181
|
+
export interface McpConnectorClass {
|
|
182
|
+
new (...args: never[]): McpConnector;
|
|
183
|
+
staticCapabilities(): StaticCapabilities;
|
|
184
|
+
}
|
|
185
|
+
/** Eleven curated substrate fields. Connectors route equivalents here at top level; everything else flows into metadata. */
|
|
186
|
+
export declare const CURATED_MEMORY_FIELDS: readonly ["thread_status", "pinned", "confidence", "domain_tags", "payload_type", "knowledge_type", "recipients", "expires_at", "created_at", "agent_id", "vault"];
|
|
187
|
+
export type CuratedMemoryField = (typeof CURATED_MEMORY_FIELDS)[number];
|
|
188
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/connectors/types.ts"],"names":[],"mappings":"AAoBA,gCAAgC;AAChC,MAAM,MAAM,aAAa,GAAG,aAAa,GAAG,cAAc,GAAG,aAAa,GAAG,eAAe,GAAG,iBAAiB,CAAC;AAEjH;;;;;GAKG;AACH,MAAM,WAAW,kBAAkB;IACjC,cAAc,EAAE,aAAa,CAAC;IAC9B,iFAAiF;IACjF,cAAc,EAAE,MAAM,CAAC;IACvB,+GAA+G;IAC/G,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC;AAED;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC;AAID,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,UAAU,GAAG,UAAU,CAAC;AAE5D;;;;;;GAMG;AACH,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;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AED,MAAM,WAAW,eAAe;IAC9B,KAAK,GAAG,IAAI,EAAE,KAAK,EAAE,GAAG,UAAU,CAAC;IACnC,kBAAkB,IAAI,kBAAkB,CAAC;CAC1C;AAID,4FAA4F;AAC5F,MAAM,WAAW,cAAc;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,CACF,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,YAAY,CAAC,EAAE,cAAc,GAC5B,OAAO,CAAC,OAAO,CAAC,CAAC;IACpB,QAAQ,IAAI,OAAO,CAAC,YAAY,CAAC,CAAC;CACnC;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,GAAG,IAAI,EAAE,KAAK,EAAE,GAAG,YAAY,CAAC;IACrC,kBAAkB,IAAI,kBAAkB,CAAC;CAC1C;AAID,4HAA4H;AAC5H,eAAO,MAAM,qBAAqB,oKAYxB,CAAC;AAEX,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// Connector contracts — the integration boundary between the runtime and
|
|
2
|
+
// external state. Five kinds: SkillStore (where skills live), MemoryStore
|
|
3
|
+
// (queryable knowledge), LocalModel (local LLM inference), McpConnector
|
|
4
|
+
// (MCP tool dispatch), AgentConnector (deliver to / wake a frontier agent;
|
|
5
|
+
// T7.1).
|
|
6
|
+
//
|
|
7
|
+
// Capabilities are split into two surfaces:
|
|
8
|
+
//
|
|
9
|
+
// - `staticCapabilities()` — class-level static method. Pure, synchronous,
|
|
10
|
+
// no instance, no network. The linter calls this offline to validate
|
|
11
|
+
// `# Requires:` clauses against the configured connector set without
|
|
12
|
+
// needing the substrate to be reachable.
|
|
13
|
+
//
|
|
14
|
+
// - `manifest()` — instance method. Returns substrate-specific dynamic
|
|
15
|
+
// state (which models a specific Ollama instance serves, which tools
|
|
16
|
+
// a specific MCP server exposes). Runtime caches the result per
|
|
17
|
+
// `(connector_instance, capabilities_version)`; connectors bump the
|
|
18
|
+
// version when manifest *content* changes (new tool wired, new model
|
|
19
|
+
// loaded), NOT on every dispatch.
|
|
20
|
+
// ─── Curated memory fields ────────────────────────────────────────────────
|
|
21
|
+
/** Eleven curated substrate fields. Connectors route equivalents here at top level; everything else flows into metadata. */
|
|
22
|
+
export const CURATED_MEMORY_FIELDS = [
|
|
23
|
+
"thread_status",
|
|
24
|
+
"pinned",
|
|
25
|
+
"confidence",
|
|
26
|
+
"domain_tags",
|
|
27
|
+
"payload_type",
|
|
28
|
+
"knowledge_type",
|
|
29
|
+
"recipients",
|
|
30
|
+
"expires_at",
|
|
31
|
+
"created_at",
|
|
32
|
+
"agent_id",
|
|
33
|
+
"vault",
|
|
34
|
+
];
|
|
35
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/connectors/types.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,0EAA0E;AAC1E,wEAAwE;AACxE,2EAA2E;AAC3E,SAAS;AACT,EAAE;AACF,4CAA4C;AAC5C,EAAE;AACF,6EAA6E;AAC7E,yEAAyE;AACzE,yEAAyE;AACzE,6CAA6C;AAC7C,EAAE;AACF,yEAAyE;AACzE,yEAAyE;AACzE,oEAAoE;AACpE,wEAAwE;AACxE,yEAAyE;AACzE,sCAAsC;AAqNtC,6EAA6E;AAE7E,4HAA4H;AAC5H,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,eAAe;IACf,QAAQ;IACR,YAAY;IACZ,aAAa;IACb,cAAc;IACd,gBAAgB;IAChB,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,UAAU;IACV,OAAO;CACC,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { IncomingMessage, ServerResponse } from "node:http";
|
|
2
|
+
import type { McpServer } from "../mcp-server.js";
|
|
3
|
+
/**
|
|
4
|
+
* Dashboard HTTP server (T6b Phase 2). Bundles the SPA assets + a
|
|
5
|
+
* /rpc endpoint that forwards JSON-RPC requests to the runtime's
|
|
6
|
+
* McpServer. Single-process colocation with the runtime — no stdio
|
|
7
|
+
* child process needed.
|
|
8
|
+
*
|
|
9
|
+
* SPA: GET / and GET /index.html serve index.html; GET /app.js and
|
|
10
|
+
* /styles.css serve the assets. Anything else 404s.
|
|
11
|
+
*
|
|
12
|
+
* RPC: POST /rpc with JSON-RPC 2.0 body; routes to McpServer.handle();
|
|
13
|
+
* responds with JSON-RPC 2.0 result/error.
|
|
14
|
+
*
|
|
15
|
+
* Binds to 127.0.0.1 by default (per kickoff criterion #12 — localhost-
|
|
16
|
+
* only, no multi-user auth in v1). Operators in shared environments
|
|
17
|
+
* configure a reverse proxy with auth.
|
|
18
|
+
*/
|
|
19
|
+
export interface DashboardServerConfig {
|
|
20
|
+
mcpServer: McpServer;
|
|
21
|
+
port?: number;
|
|
22
|
+
bindAddress?: string;
|
|
23
|
+
/** Absolute path to the directory containing index.html + app.js + styles.css. Auto-detected when omitted. */
|
|
24
|
+
assetsDir?: string;
|
|
25
|
+
}
|
|
26
|
+
export declare class DashboardServer {
|
|
27
|
+
private readonly mcpServer;
|
|
28
|
+
private readonly port;
|
|
29
|
+
private readonly bindAddress;
|
|
30
|
+
private readonly assetsDir;
|
|
31
|
+
private httpServer;
|
|
32
|
+
constructor(config: DashboardServerConfig);
|
|
33
|
+
start(): Promise<void>;
|
|
34
|
+
stop(): Promise<void>;
|
|
35
|
+
/** Exposed for direct testing — doesn't go through the network stack. */
|
|
36
|
+
handle(req: IncomingMessage, res: ServerResponse): Promise<void>;
|
|
37
|
+
private handleRpc;
|
|
38
|
+
private handleStatic;
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/dashboard/server.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAU,MAAM,WAAW,CAAC;AAKzE,OAAO,KAAK,EAAE,SAAS,EAAkB,MAAM,kBAAkB,CAAC;AAElE;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,SAAS,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8GAA8G;IAC9G,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AASD,qBAAa,eAAe;IAC1B,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAY;IACtC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAS;IAC9B,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;IACrC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IACnC,OAAO,CAAC,UAAU,CAAuB;gBAE7B,MAAM,EAAE,qBAAqB;IAOnC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAStB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAO3B,yEAAyE;IACnE,MAAM,CAAC,GAAG,EAAE,eAAe,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;YA2BxD,SAAS;YAmBT,YAAY;CAkB3B"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { createServer } from "node:http";
|
|
2
|
+
import { readFile } from "node:fs/promises";
|
|
3
|
+
import { existsSync } from "node:fs";
|
|
4
|
+
import { extname, join, resolve, dirname } from "node:path";
|
|
5
|
+
import { fileURLToPath } from "node:url";
|
|
6
|
+
const MIME = {
|
|
7
|
+
".html": "text/html; charset=utf-8",
|
|
8
|
+
".js": "application/javascript; charset=utf-8",
|
|
9
|
+
".css": "text/css; charset=utf-8",
|
|
10
|
+
".json": "application/json; charset=utf-8",
|
|
11
|
+
};
|
|
12
|
+
export class DashboardServer {
|
|
13
|
+
mcpServer;
|
|
14
|
+
port;
|
|
15
|
+
bindAddress;
|
|
16
|
+
assetsDir;
|
|
17
|
+
httpServer = null;
|
|
18
|
+
constructor(config) {
|
|
19
|
+
this.mcpServer = config.mcpServer;
|
|
20
|
+
this.port = config.port ?? 7878;
|
|
21
|
+
this.bindAddress = config.bindAddress ?? "127.0.0.1";
|
|
22
|
+
this.assetsDir = config.assetsDir ?? locateAssetsDir();
|
|
23
|
+
}
|
|
24
|
+
async start() {
|
|
25
|
+
this.httpServer = createServer((req, res) => {
|
|
26
|
+
void this.handle(req, res);
|
|
27
|
+
});
|
|
28
|
+
return new Promise((resolve) => {
|
|
29
|
+
this.httpServer.listen(this.port, this.bindAddress, () => resolve());
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
async stop() {
|
|
33
|
+
if (this.httpServer === null)
|
|
34
|
+
return;
|
|
35
|
+
return new Promise((resolve, reject) => {
|
|
36
|
+
this.httpServer.close((err) => (err ? reject(err) : resolve()));
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
/** Exposed for direct testing — doesn't go through the network stack. */
|
|
40
|
+
async handle(req, res) {
|
|
41
|
+
try {
|
|
42
|
+
const url = new URL(req.url ?? "/", `http://${this.bindAddress}:${this.port}`);
|
|
43
|
+
// /rpc is POST-only — any other method on /rpc is 405 (not falling
|
|
44
|
+
// through to the static handler, which would 404 with misleading
|
|
45
|
+
// semantics).
|
|
46
|
+
if (url.pathname === "/rpc") {
|
|
47
|
+
if (req.method !== "POST") {
|
|
48
|
+
res.statusCode = 405;
|
|
49
|
+
res.end("Method Not Allowed");
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
await this.handleRpc(req, res);
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
if (req.method === "GET") {
|
|
56
|
+
await this.handleStatic(url.pathname, res);
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
res.statusCode = 405;
|
|
60
|
+
res.end("Method Not Allowed");
|
|
61
|
+
}
|
|
62
|
+
catch (err) {
|
|
63
|
+
res.statusCode = 500;
|
|
64
|
+
res.end(`Internal server error: ${err.message}`);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
async handleRpc(req, res) {
|
|
68
|
+
const chunks = [];
|
|
69
|
+
for await (const chunk of req)
|
|
70
|
+
chunks.push(chunk);
|
|
71
|
+
const body = Buffer.concat(chunks).toString("utf8");
|
|
72
|
+
let rpcReq;
|
|
73
|
+
try {
|
|
74
|
+
rpcReq = JSON.parse(body);
|
|
75
|
+
}
|
|
76
|
+
catch {
|
|
77
|
+
res.statusCode = 400;
|
|
78
|
+
res.setHeader("content-type", MIME[".json"]);
|
|
79
|
+
res.end(JSON.stringify({ jsonrpc: "2.0", id: null, error: { code: -32700, message: "Parse error" } }));
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
const response = await this.mcpServer.handle(rpcReq);
|
|
83
|
+
res.statusCode = 200;
|
|
84
|
+
res.setHeader("content-type", MIME[".json"]);
|
|
85
|
+
res.end(JSON.stringify(response));
|
|
86
|
+
}
|
|
87
|
+
async handleStatic(pathname, res) {
|
|
88
|
+
const requested = pathname === "/" ? "/index.html" : pathname;
|
|
89
|
+
const file = join(this.assetsDir, requested);
|
|
90
|
+
if (!file.startsWith(this.assetsDir)) {
|
|
91
|
+
res.statusCode = 403;
|
|
92
|
+
res.end("Forbidden");
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
if (!existsSync(file)) {
|
|
96
|
+
res.statusCode = 404;
|
|
97
|
+
res.end("Not Found");
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
const body = await readFile(file);
|
|
101
|
+
res.statusCode = 200;
|
|
102
|
+
res.setHeader("content-type", MIME[extname(file)] ?? "application/octet-stream");
|
|
103
|
+
res.end(body);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
/** Locate the dashboard SPA assets directory (compiled output, runs from dist/). */
|
|
107
|
+
function locateAssetsDir() {
|
|
108
|
+
const here = dirname(fileURLToPath(import.meta.url));
|
|
109
|
+
// Built dist runs from dist/dashboard/server.js; spa/ is sibling.
|
|
110
|
+
// Source dev (vitest) runs from src/dashboard/server.ts; spa/ is sibling.
|
|
111
|
+
const candidates = [
|
|
112
|
+
resolve(here, "spa"),
|
|
113
|
+
resolve(here, "..", "..", "src", "dashboard", "spa"),
|
|
114
|
+
];
|
|
115
|
+
for (const c of candidates) {
|
|
116
|
+
if (existsSync(c))
|
|
117
|
+
return c;
|
|
118
|
+
}
|
|
119
|
+
// Fall back to src/ even if missing — error surfaces at request time.
|
|
120
|
+
return candidates[0];
|
|
121
|
+
}
|
|
122
|
+
//# sourceMappingURL=server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/dashboard/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AA4BzC,MAAM,IAAI,GAA2B;IACnC,OAAO,EAAE,0BAA0B;IACnC,KAAK,EAAE,uCAAuC;IAC9C,MAAM,EAAE,yBAAyB;IACjC,OAAO,EAAE,iCAAiC;CAC3C,CAAC;AAEF,MAAM,OAAO,eAAe;IACT,SAAS,CAAY;IACrB,IAAI,CAAS;IACb,WAAW,CAAS;IACpB,SAAS,CAAS;IAC3B,UAAU,GAAkB,IAAI,CAAC;IAEzC,YAAY,MAA6B;QACvC,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;QAClC,IAA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