skillscript-runtime 0.2.6 → 0.2.8
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 +7 -7
- package/dist/bootstrap.d.ts +17 -0
- package/dist/bootstrap.d.ts.map +1 -1
- package/dist/bootstrap.js +109 -3
- package/dist/bootstrap.js.map +1 -1
- package/dist/cli.js +30 -7
- package/dist/cli.js.map +1 -1
- package/dist/composition.d.ts +43 -0
- package/dist/composition.d.ts.map +1 -0
- package/dist/composition.js +110 -0
- package/dist/composition.js.map +1 -0
- package/dist/dashboard/server.d.ts +8 -0
- package/dist/dashboard/server.d.ts.map +1 -1
- package/dist/dashboard/server.js +7 -0
- package/dist/dashboard/server.js.map +1 -1
- package/dist/help-content.d.ts +3 -0
- package/dist/help-content.d.ts.map +1 -0
- package/dist/help-content.js +469 -0
- package/dist/help-content.js.map +1 -0
- package/dist/mcp-server.d.ts +8 -0
- package/dist/mcp-server.d.ts.map +1 -1
- package/dist/mcp-server.js +129 -2
- package/dist/mcp-server.js.map +1 -1
- package/dist/runtime.d.ts +12 -0
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +16 -0
- package/dist/runtime.js.map +1 -1
- package/dist/scheduler.d.ts +29 -1
- package/dist/scheduler.d.ts.map +1 -1
- package/dist/scheduler.js +53 -6
- package/dist/scheduler.js.map +1 -1
- package/examples/hello.skill.provenance.json +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"composition.js","sourceRoot":"","sources":["../src/composition.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,+DAA+D;AAC/D,EAAE;AACF,sEAAsE;AACtE,uCAAuC;AACvC,qEAAqE;AACrE,qEAAqE;AACrE,kEAAkE;AAClE,mEAAmE;AACnE,sEAAsE;AACtE,uEAAuE;AACvE,8CAA8C;AAC9C,EAAE;AACF,uEAAuE;AACvE,8DAA8D;AAC9D,mEAAmE;AACnE,iEAAiE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,CAAC,YAAY,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACxF,IAAI,cAAc,KAAK,EAAE,EAAE,CAAC;QAC1B,MAAM,IAAI,KAAK,CAAC,uEAAuE,UAAU,KAAK,CAAC,CAAC;IAC1G,CAAC;IACD,MAAM,WAAW,GAA2B,EAAE,CAAC;IAC/C,KAAK,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;QAC1C,IAAI,CAAC,KAAK,YAAY;YAAE,SAAS;QACjC,WAAW,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;IAC7B,CAAC;IACD,OAAO,kBAAkB,CAAC,cAAc,EAAE,WAAW,EAAE;QACrD,GAAG;QACH,KAAK,EAAE,CAAC,UAAU,UAAU,EAAE,CAAC;KAChC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -22,12 +22,20 @@ export interface DashboardServerConfig {
|
|
|
22
22
|
bindAddress?: string;
|
|
23
23
|
/** Absolute path to the directory containing index.html + app.js + styles.css. Auto-detected when omitted. */
|
|
24
24
|
assetsDir?: string;
|
|
25
|
+
/**
|
|
26
|
+
* When false, GET routes for the browser SPA (`/`, `/index.html`,
|
|
27
|
+
* `/app.js`, `/styles.css`) return 404 — only `POST /rpc` is served.
|
|
28
|
+
* v0.2.7 addition supporting `skillfile serve` (headless deployments).
|
|
29
|
+
* Default true preserves existing `skillfile dashboard` behavior.
|
|
30
|
+
*/
|
|
31
|
+
mountSpa?: boolean;
|
|
25
32
|
}
|
|
26
33
|
export declare class DashboardServer {
|
|
27
34
|
private readonly mcpServer;
|
|
28
35
|
private readonly port;
|
|
29
36
|
private readonly bindAddress;
|
|
30
37
|
private readonly assetsDir;
|
|
38
|
+
private readonly mountSpa;
|
|
31
39
|
private httpServer;
|
|
32
40
|
constructor(config: DashboardServerConfig);
|
|
33
41
|
start(): Promise<void>;
|
|
@@ -1 +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;
|
|
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;IACnB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,OAAO,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,QAAQ,CAAC,QAAQ,CAAU;IACnC,OAAO,CAAC,UAAU,CAAuB;gBAE7B,MAAM,EAAE,qBAAqB;IAQnC,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;YAgCxD,SAAS;YAmBT,YAAY;CAkB3B"}
|
package/dist/dashboard/server.js
CHANGED
|
@@ -14,12 +14,14 @@ export class DashboardServer {
|
|
|
14
14
|
port;
|
|
15
15
|
bindAddress;
|
|
16
16
|
assetsDir;
|
|
17
|
+
mountSpa;
|
|
17
18
|
httpServer = null;
|
|
18
19
|
constructor(config) {
|
|
19
20
|
this.mcpServer = config.mcpServer;
|
|
20
21
|
this.port = config.port ?? 7878;
|
|
21
22
|
this.bindAddress = config.bindAddress ?? "127.0.0.1";
|
|
22
23
|
this.assetsDir = config.assetsDir ?? locateAssetsDir();
|
|
24
|
+
this.mountSpa = config.mountSpa ?? true;
|
|
23
25
|
}
|
|
24
26
|
async start() {
|
|
25
27
|
this.httpServer = createServer((req, res) => {
|
|
@@ -53,6 +55,11 @@ export class DashboardServer {
|
|
|
53
55
|
return;
|
|
54
56
|
}
|
|
55
57
|
if (req.method === "GET") {
|
|
58
|
+
if (!this.mountSpa) {
|
|
59
|
+
res.statusCode = 404;
|
|
60
|
+
res.end("Not Found (SPA disabled — running in `serve` mode)");
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
56
63
|
await this.handleStatic(url.pathname, res);
|
|
57
64
|
return;
|
|
58
65
|
}
|
|
@@ -1 +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;
|
|
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;AAmCzC,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;IAClB,QAAQ,CAAU;IAC3B,UAAU,GAAkB,IAAI,CAAC;IAEzC,YAAY,MAA6B;QACvC,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;QAClC,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,IAAI,IAAI,CAAC;QAChC,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,WAAW,IAAI,WAAW,CAAC;QACrD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static help content for the `help` MCP tool (v0.2.8). Cold-agent
|
|
2
|
+
// language discovery — answers the minimum-viable questions a new
|
|
3
|
+
// author needs to write a working skill, without needing to load the
|
|
4
|
+
// full language reference.
|
|
5
|
+
//
|
|
6
|
+
// Content layout:
|
|
7
|
+
// quickstart — ~500-token introduction; 6 questions + 1 worked example
|
|
8
|
+
// ops — op symbol legend with one-line shapes per op
|
|
9
|
+
// frontmatter — header keys + values
|
|
10
|
+
// examples — three canonical worked skills (minimal / threshold / branching)
|
|
11
|
+
// connectors — short explainer; delegates dynamic data to runtime_capabilities
|
|
12
|
+
// lint-codes — list of lint rules organized by tier
|
|
13
|
+
//
|
|
14
|
+
// Token estimates per topic are approximate; help() output is intended
|
|
15
|
+
// for an agent's working context, not for human reading.
|
|
16
|
+
const QUICKSTART = `# Skillscript — quickstart
|
|
17
|
+
|
|
18
|
+
Skillscript is a declarative language for authoring agent workflows. A
|
|
19
|
+
skill is a small program with named targets composed of typed ops. The
|
|
20
|
+
runtime walks dependencies backward from the goal target (declared via
|
|
21
|
+
\`default:\`) and dispatches each op in topological order.
|
|
22
|
+
|
|
23
|
+
## 1. Shape of a skill file
|
|
24
|
+
|
|
25
|
+
\`\`\`
|
|
26
|
+
# Skill: my-skill ← required: skill name
|
|
27
|
+
# Description: What this skill does ← optional but recommended
|
|
28
|
+
# Status: Approved ← required: Draft | Approved | Disabled
|
|
29
|
+
# Vars: NAME=default-value, OTHER ← optional: declared variables
|
|
30
|
+
# Triggers: cron: 0 9 * * * ← optional: autonomous-dispatch sources
|
|
31
|
+
|
|
32
|
+
target_a: ← a named block of ops
|
|
33
|
+
@ curl -s https://example.com -> RAW
|
|
34
|
+
~ prompt="Summarize: $(RAW)" -> SUMMARY
|
|
35
|
+
|
|
36
|
+
target_b: target_a ← Make-style: target_b depends on target_a
|
|
37
|
+
! $(SUMMARY)
|
|
38
|
+
|
|
39
|
+
default: target_b ← goal target the runtime walks toward
|
|
40
|
+
\`\`\`
|
|
41
|
+
|
|
42
|
+
## 2. Op symbol legend
|
|
43
|
+
|
|
44
|
+
| Op | Meaning |
|
|
45
|
+
|---|---|
|
|
46
|
+
| \`$ tool args -> VAR\` | MCP tool invocation; binds result to VAR |
|
|
47
|
+
| \`~ prompt="..." -> VAR\` | LocalModel call; binds output |
|
|
48
|
+
| \`> mode=... query=... limit=N -> VAR\` | Memory retrieval |
|
|
49
|
+
| \`@ command args -> VAR\` | Shell exec (structural sandbox; \`@ unsafe\` for full bash) |
|
|
50
|
+
| \`! text\` | Emit text to the user / output channel |
|
|
51
|
+
| \`?? prompt -> VAR\` | Ask user (interactive mode only) |
|
|
52
|
+
| \`$set NAME=value\` | Explicit variable binding |
|
|
53
|
+
| \`& skill-name args -> VAR\` | Inline a data-skill |
|
|
54
|
+
|
|
55
|
+
## 3. Result binding
|
|
56
|
+
|
|
57
|
+
Most ops accept \`-> VAR\` to bind their output. Reference later via \`$(VAR)\`.
|
|
58
|
+
Optional \`(fallback: "default")\` after \`-> VAR\` binds the fallback on dispatch
|
|
59
|
+
error instead of propagating.
|
|
60
|
+
|
|
61
|
+
## 4. Branching
|
|
62
|
+
|
|
63
|
+
\`\`\`
|
|
64
|
+
if $(VERDICT) == "urgent":
|
|
65
|
+
! sound the alarm
|
|
66
|
+
elif $(COUNT) > "10":
|
|
67
|
+
! threshold breached: $(COUNT) items
|
|
68
|
+
else:
|
|
69
|
+
! all clear
|
|
70
|
+
\`\`\`
|
|
71
|
+
|
|
72
|
+
Numeric comparison (\`<\` / \`>\` / \`<=\` / \`>=\`) coerces both sides via Number();
|
|
73
|
+
non-numeric operands raise TypeMismatchError.
|
|
74
|
+
|
|
75
|
+
## 5. Iteration
|
|
76
|
+
|
|
77
|
+
\`\`\`
|
|
78
|
+
foreach M in $(MEMORIES):
|
|
79
|
+
! Processing $(M.id): $(M.summary)
|
|
80
|
+
\`\`\`
|
|
81
|
+
|
|
82
|
+
## 6. How to see what's broken
|
|
83
|
+
|
|
84
|
+
- \`lint_skill({source})\` — diagnostics across tier-1 (errors), tier-2 (warnings), tier-3 (advisories)
|
|
85
|
+
- \`compile_skill({source, inputs?})\` — render the compiled artifact + surface compile errors
|
|
86
|
+
- \`runtime_capabilities()\` — discover wired connectors, models, shell-exec mode
|
|
87
|
+
|
|
88
|
+
## Worked end-to-end example
|
|
89
|
+
|
|
90
|
+
\`\`\`
|
|
91
|
+
# Skill: morning-temperature-alert
|
|
92
|
+
# Description: Cron-fired check; alerts when overnight temp drops below threshold
|
|
93
|
+
# Status: Approved
|
|
94
|
+
# Vars: LOCATION=Asheville,NC, THRESHOLD=40
|
|
95
|
+
# Triggers: cron: 0 7 * * *
|
|
96
|
+
|
|
97
|
+
fetch:
|
|
98
|
+
@ curl -s "wttr.in/$(LOCATION|url)?format=j1" -> RAW (fallback: "")
|
|
99
|
+
|
|
100
|
+
evaluate: fetch
|
|
101
|
+
~ prompt="Extract overnight low temperature in F from this JSON. Reply with only the number: $(RAW)" model=qwen -> TEMP
|
|
102
|
+
|
|
103
|
+
alert: evaluate
|
|
104
|
+
if $(TEMP|trim) < $(THRESHOLD):
|
|
105
|
+
! Cold morning: overnight low $(TEMP|trim)°F (threshold $(THRESHOLD)°F)
|
|
106
|
+
else:
|
|
107
|
+
! Temp ok: $(TEMP|trim)°F
|
|
108
|
+
|
|
109
|
+
default: alert
|
|
110
|
+
\`\`\`
|
|
111
|
+
|
|
112
|
+
Use \`help({topic: "ops"})\`, \`help({topic: "frontmatter"})\`, \`help({topic: "examples"})\`,
|
|
113
|
+
\`help({topic: "connectors"})\`, or \`help({topic: "lint-codes"})\` for deeper sections.
|
|
114
|
+
`;
|
|
115
|
+
const OPS = `# Op symbols — full reference
|
|
116
|
+
|
|
117
|
+
## Dispatch ops (bind a result)
|
|
118
|
+
|
|
119
|
+
### \`$\` — MCP tool invocation
|
|
120
|
+
|
|
121
|
+
\`\`\`
|
|
122
|
+
$ tool_name arg1=value1 arg2=value2 -> VAR [(fallback: "default")]
|
|
123
|
+
$ connector.tool_name args -> VAR
|
|
124
|
+
\`\`\`
|
|
125
|
+
|
|
126
|
+
Calls an MCP tool. Without an explicit connector prefix, routes to the
|
|
127
|
+
\`primary\` MCP connector. Fallback binds when dispatch errors.
|
|
128
|
+
|
|
129
|
+
**Built-in (v0.2.8):** \`$ execute_skill skill_name=child -> RESULT\` invokes
|
|
130
|
+
another stored skill end-to-end without requiring an MCP connector — pass
|
|
131
|
+
input vars as additional kwargs.
|
|
132
|
+
|
|
133
|
+
### \`~\` — LocalModel call
|
|
134
|
+
|
|
135
|
+
\`\`\`
|
|
136
|
+
~ prompt="..." model=qwen maxTokens=400 -> VAR [(fallback: "...")]
|
|
137
|
+
\`\`\`
|
|
138
|
+
|
|
139
|
+
LLM call against a configured LocalModel. \`model\` selects the named model;
|
|
140
|
+
default is \`default\`. Multi-line prompts via \`"..."\` are supported (parser
|
|
141
|
+
folds quoted-string continuations).
|
|
142
|
+
|
|
143
|
+
### \`>\` — Memory retrieval
|
|
144
|
+
|
|
145
|
+
\`\`\`
|
|
146
|
+
> mode=fts query="..." limit=20 -> VAR [(fallback: "...")]
|
|
147
|
+
\`\`\`
|
|
148
|
+
|
|
149
|
+
Queries the configured MemoryStore. \`mode\` is substrate-specific
|
|
150
|
+
(\`fts\` / \`semantic\` / \`rerank\` are common). \`limit\` is required.
|
|
151
|
+
|
|
152
|
+
### \`@\` — Shell exec
|
|
153
|
+
|
|
154
|
+
\`\`\`
|
|
155
|
+
@ command arg1 arg2 -> VAR [(fallback: "...")]
|
|
156
|
+
@ unsafe full-shell-command -> VAR
|
|
157
|
+
\`\`\`
|
|
158
|
+
|
|
159
|
+
Default mode: structural spawn — one binary, no shell metacharacters,
|
|
160
|
+
no pipes/redirects. \`@ unsafe\` opts into full bash; lint-flags tier-2.
|
|
161
|
+
|
|
162
|
+
## Emission + control ops
|
|
163
|
+
|
|
164
|
+
### \`!\` — Emit text
|
|
165
|
+
|
|
166
|
+
\`\`\`
|
|
167
|
+
! Hello, $(NAME)!
|
|
168
|
+
\`\`\`
|
|
169
|
+
|
|
170
|
+
One-line literal emission. Variables substitute. No result binding.
|
|
171
|
+
|
|
172
|
+
### \`??\` — Ask user
|
|
173
|
+
|
|
174
|
+
\`\`\`
|
|
175
|
+
?? Are you sure? -> CONFIRM
|
|
176
|
+
\`\`\`
|
|
177
|
+
|
|
178
|
+
Interactive only. Autonomous-mode dispatch fails with a clean error.
|
|
179
|
+
|
|
180
|
+
### \`$set\` — Explicit binding
|
|
181
|
+
|
|
182
|
+
\`\`\`
|
|
183
|
+
$set NAME=value
|
|
184
|
+
$set NAME=$(OTHER_VAR|trim)
|
|
185
|
+
\`\`\`
|
|
186
|
+
|
|
187
|
+
### \`&\` — Inline data-skill
|
|
188
|
+
|
|
189
|
+
\`\`\`
|
|
190
|
+
& source-skill-name arg=value -> VAR
|
|
191
|
+
\`\`\`
|
|
192
|
+
|
|
193
|
+
References a \`# Type: data\` skill; the compiler inlines its emitted text
|
|
194
|
+
at compile time so the compiled artifact is a single resolved document.
|
|
195
|
+
|
|
196
|
+
## Pipe filters
|
|
197
|
+
|
|
198
|
+
Apply on \`$(VAR|filter)\` references; chain left-to-right.
|
|
199
|
+
|
|
200
|
+
| Filter | Effect |
|
|
201
|
+
|---|---|
|
|
202
|
+
| \`url\` | encodeURIComponent |
|
|
203
|
+
| \`shell\` | POSIX single-quote escape |
|
|
204
|
+
| \`json\` | JSON.stringify |
|
|
205
|
+
| \`trim\` | Whitespace trim |
|
|
206
|
+
| \`length\` | Array element count or string char count (v0.2.5) |
|
|
207
|
+
|
|
208
|
+
## Conditional grammar
|
|
209
|
+
|
|
210
|
+
\`\`\`
|
|
211
|
+
if $(VAR): ← truthy check
|
|
212
|
+
if $(VAR) == "literal": ← equality vs literal
|
|
213
|
+
if $(VAR) == $(OTHER): ← equality vs ref
|
|
214
|
+
if $(VAR) != "literal": ← inequality
|
|
215
|
+
if $(N) < "10": ← numeric comparison (v0.2.5)
|
|
216
|
+
if $(N) >= $(THRESHOLD): ← numeric vs ref
|
|
217
|
+
if $(M.id) in $(SEEN): ← set membership
|
|
218
|
+
if $(M.id) not in $(SEEN):
|
|
219
|
+
\`\`\`
|
|
220
|
+
|
|
221
|
+
Branches via \`if:\` / \`elif COND:\` / \`else:\`. The \`else:\` after a target
|
|
222
|
+
body is a separate error-handler block (distinguished by indentation scope).
|
|
223
|
+
`;
|
|
224
|
+
const FRONTMATTER = `# Frontmatter headers — full reference
|
|
225
|
+
|
|
226
|
+
Skill files open with \`# Key: value\` headers. Order isn't significant.
|
|
227
|
+
|
|
228
|
+
## Required
|
|
229
|
+
|
|
230
|
+
- \`# Skill: <name>\` — identity. Reserved keywords (\`default\`, \`needs\`, etc.) rejected.
|
|
231
|
+
- \`# Status: Draft | Approved | Disabled\` — lifecycle state. Only Approved skills fire via triggers.
|
|
232
|
+
|
|
233
|
+
## Common
|
|
234
|
+
|
|
235
|
+
- \`# Description: <prose>\` — human-readable explanation; surfaces in dashboards.
|
|
236
|
+
- \`# Type: procedural | data\` — \`procedural\` (default) for runtime-fired skills; \`data\` for compile-time-inlined fragments referenced by \`&\` ops.
|
|
237
|
+
- \`# Vars: NAME=default, OTHER\` — declared variables. \`NAME=default\` provides a default; bare \`NAME\` is required at invocation.
|
|
238
|
+
- \`# Triggers: cron: 0 9 * * *, session: start\` — autonomous-dispatch sources. Comma-separated entries split by source-keyword boundary; cron expressions with commas (\`30,45 9 * * 1-5\`) parse correctly.
|
|
239
|
+
- \`# Output: text | slack: chan | prompt-context: agent | template: agent | file: path | card: id | none\` — output routing.
|
|
240
|
+
- \`# OnError: <fallback-skill-name>\` — error-handler skill invoked when an op fails and no target-level \`else:\` catches.
|
|
241
|
+
|
|
242
|
+
## Augmenting / Template only
|
|
243
|
+
|
|
244
|
+
- \`# Delivery-context: <prose>\` — routed to the receiving agent alongside the augment payload. v0.2.6.
|
|
245
|
+
- \`# Templates: <skill_name>, <skill_name>\` — comma-separated Template-skill names the receiving agent may fetch as follow-on actions. v0.2.6.
|
|
246
|
+
|
|
247
|
+
(Both fire \`unused-augmenting-header\` lint warning if set on a Headless skill — one with no \`prompt-context:\` or \`template:\` output declaration.)
|
|
248
|
+
|
|
249
|
+
## Capabilities + retrieval
|
|
250
|
+
|
|
251
|
+
- \`# Requires: <namespace>:<key> -> VAR (fallback: "value")\` — declares external input requirements. \`user-var:\` or \`system-var:\` namespaces. Cascades resolve at compile.
|
|
252
|
+
- \`# Requires: connector_type.feature_flag\` — capability-style requires (e.g., \`local_model.streaming\`); validated against \`runtime_capabilities\`.
|
|
253
|
+
|
|
254
|
+
## Performance
|
|
255
|
+
|
|
256
|
+
- \`# Timeout: <seconds>\` — skill-wide timeout. Falls back to per-op or runtime defaults.
|
|
257
|
+
|
|
258
|
+
## Trigger declaration forms
|
|
259
|
+
|
|
260
|
+
\`\`\`
|
|
261
|
+
# Triggers: cron: 30,45 9 * * 1-5
|
|
262
|
+
# Triggers: session: start, session: end
|
|
263
|
+
# Triggers: cron: 0 7 * * *, agent-event: drift-detected
|
|
264
|
+
\`\`\`
|
|
265
|
+
|
|
266
|
+
Trigger sources today: \`cron\` (poll-based), \`session\` (\`start\` / \`end\` phases). Parse-only in v0.2: \`event\`, \`agent-event\`, \`file-watch\`, \`sensor\` (firing lands in v1.0).
|
|
267
|
+
`;
|
|
268
|
+
const EXAMPLES = `# Three canonical worked skills
|
|
269
|
+
|
|
270
|
+
## 1. Minimal (single target, no dependencies)
|
|
271
|
+
|
|
272
|
+
\`\`\`
|
|
273
|
+
# Skill: hello
|
|
274
|
+
# Description: The canonical first-run example.
|
|
275
|
+
# Status: Approved
|
|
276
|
+
# Vars: WHO=world
|
|
277
|
+
|
|
278
|
+
greet:
|
|
279
|
+
! Hello, $(WHO)!
|
|
280
|
+
! Welcome to Skillscript.
|
|
281
|
+
|
|
282
|
+
default: greet
|
|
283
|
+
\`\`\`
|
|
284
|
+
|
|
285
|
+
Demonstrates: required headers, variable defaults, \`!\` emission with substitution.
|
|
286
|
+
|
|
287
|
+
## 2. Cron-fired numeric threshold + count
|
|
288
|
+
|
|
289
|
+
\`\`\`
|
|
290
|
+
# Skill: queue-length-monitor
|
|
291
|
+
# Description: Count pending items in a queue and alert when the count exceeds threshold
|
|
292
|
+
# Status: Approved
|
|
293
|
+
# Vars: QUEUE_PATH=/var/queue/pending.json, THRESHOLD=10
|
|
294
|
+
# Triggers: cron: */5 * * * *
|
|
295
|
+
|
|
296
|
+
fetch:
|
|
297
|
+
@ cat $(QUEUE_PATH) -> ITEMS (fallback: "[]")
|
|
298
|
+
|
|
299
|
+
evaluate:
|
|
300
|
+
needs: fetch
|
|
301
|
+
if $(ITEMS|length) > $(THRESHOLD):
|
|
302
|
+
! Queue backlog: $(ITEMS|length) items pending (threshold $(THRESHOLD)). Action required.
|
|
303
|
+
else:
|
|
304
|
+
! Queue healthy: $(ITEMS|length) items pending (under $(THRESHOLD)).
|
|
305
|
+
|
|
306
|
+
default: evaluate
|
|
307
|
+
\`\`\`
|
|
308
|
+
|
|
309
|
+
Demonstrates: \`# Triggers:\` cron, shell \`@\` op with fallback, \`needs:\` body-line dep, numeric comparison, \`|length\` filter, \`if\` / \`else\`.
|
|
310
|
+
|
|
311
|
+
## 3. LocalModel branching with agent delivery
|
|
312
|
+
|
|
313
|
+
\`\`\`
|
|
314
|
+
# Skill: classify-support-ticket
|
|
315
|
+
# Description: Classify an incoming ticket by urgency and route to oncall when severe
|
|
316
|
+
# Status: Approved
|
|
317
|
+
# Vars: TICKET_BODY
|
|
318
|
+
# Delivery-context: Urgent ticket triage — please assess + assign owner.
|
|
319
|
+
# Templates: ticket-assignment-procedure
|
|
320
|
+
# Output: prompt-context: oncall
|
|
321
|
+
|
|
322
|
+
classify:
|
|
323
|
+
~ prompt="Classify this support ticket as one of: 'critical', 'normal', 'low'. Reply with only the label. Ticket: $(TICKET_BODY)" model=qwen -> VERDICT
|
|
324
|
+
|
|
325
|
+
route: classify
|
|
326
|
+
if $(VERDICT|trim) == "critical":
|
|
327
|
+
! CRITICAL ticket needs immediate attention:
|
|
328
|
+
! $(TICKET_BODY)
|
|
329
|
+
elif $(VERDICT|trim) == "normal":
|
|
330
|
+
! Normal-priority ticket queued.
|
|
331
|
+
else:
|
|
332
|
+
! Low-priority ticket logged.
|
|
333
|
+
|
|
334
|
+
default: route
|
|
335
|
+
\`\`\`
|
|
336
|
+
|
|
337
|
+
Demonstrates: \`~\` LocalModel op, named model selection, \`|trim\` filter on LLM output, ref-vs-literal comparison, agent delivery via \`prompt-context:\`, augmenting headers (\`# Delivery-context:\` + \`# Templates:\`).
|
|
338
|
+
`;
|
|
339
|
+
const CONNECTORS_PROLOGUE = `# Connectors
|
|
340
|
+
|
|
341
|
+
The runtime resolves \`$\` / \`~\` / \`>\` / \`# Output:\` dispatches through a
|
|
342
|
+
typed registry of five contracts:
|
|
343
|
+
|
|
344
|
+
| Contract | Purpose | Op |
|
|
345
|
+
|---|---|---|
|
|
346
|
+
| SkillStore | Skill source persistence + status lifecycle | (implicit) |
|
|
347
|
+
| MemoryStore | Knowledge retrieval | \`>\` |
|
|
348
|
+
| LocalModel | LLM inference | \`~\` |
|
|
349
|
+
| McpConnector | MCP tool dispatch | \`$\` |
|
|
350
|
+
| AgentConnector | Deliver augment/template payloads | \`# Output: prompt-context:\` / \`template:\` |
|
|
351
|
+
|
|
352
|
+
Skills don't import packages — they invoke connectors. The set wired into
|
|
353
|
+
this runtime, plus their feature flags, is discoverable via:
|
|
354
|
+
|
|
355
|
+
\`runtime_capabilities()\`
|
|
356
|
+
|
|
357
|
+
Call that tool for the live picture of which connectors are registered,
|
|
358
|
+
which feature flags they advertise, and which named instances exist
|
|
359
|
+
(e.g., \`default\` / \`qwen\` LocalModels).
|
|
360
|
+
|
|
361
|
+
For shell execution (\`@\` op), \`runtime_capabilities\` also reports
|
|
362
|
+
\`shellExecution.mode\` (\`"structural-spawn"\`) and
|
|
363
|
+
\`shellExecution.unsafe_enabled\` (whether \`@ unsafe\` is permitted in
|
|
364
|
+
this deployment).
|
|
365
|
+
`;
|
|
366
|
+
const LINT_CODES = `# Lint rule index
|
|
367
|
+
|
|
368
|
+
Three tiers per ERD §3:
|
|
369
|
+
|
|
370
|
+
- **Tier-1 (error)** — blocks compile. Must fix before the skill enters the SkillStore.
|
|
371
|
+
- **Tier-2 (warning)** — non-blocking but flagged. Common smell; review.
|
|
372
|
+
- **Tier-3 (info)** — advisory. Often style or organizational hints.
|
|
373
|
+
|
|
374
|
+
## Tier-1 (error)
|
|
375
|
+
|
|
376
|
+
- \`parse-error\` — frontmatter or grammar fault surfaced by parse()
|
|
377
|
+
- \`no-targets\` — skill defines no targets
|
|
378
|
+
- \`no-entry-target\` — no \`default:\` declaration
|
|
379
|
+
- \`orphan-target\` — target unreachable from entry via dep graph
|
|
380
|
+
- \`unknown-capability\` — \`# Requires: connector.feature\` references a flag no registered connector advertises
|
|
381
|
+
- \`undeclared-var\` — \`$(VAR)\` reference not in \`# Vars:\` / \`# Requires:\` / output-bound / foreach iterator / tier-1 ambient (NOW/USER/SESSION_CONTEXT/TRIGGER_TYPE/TRIGGER_PAYLOAD/ERROR_CONTEXT)
|
|
382
|
+
- \`unknown-filter\` — \`|filter\` references an unregistered filter name
|
|
383
|
+
- \`malformed-op-grammar\` — op body doesn't match its grammar
|
|
384
|
+
- \`invalid-conditional-syntax\` — \`if\` condition doesn't match supported forms
|
|
385
|
+
- \`single-equals\` — \`if $(VAR) = "..."\` instead of \`==\` (specific diagnostic)
|
|
386
|
+
- \`indentation\` — tabs in indentation; mixed tabs/spaces
|
|
387
|
+
- \`reserved-keyword\` — variable/target/skill name collides with a reserved word
|
|
388
|
+
- \`unknown-skill-reference\` — \`&\` op references a skill not in the store
|
|
389
|
+
- \`disabled-skill-reference\` — \`&\` op references a Disabled skill
|
|
390
|
+
- \`credential-in-args\` — op arg looks like a secret literal
|
|
391
|
+
- \`status-disabled\` — skill marked \`# Status: Disabled\`
|
|
392
|
+
- \`circular-dependency\` — dep cycle between targets
|
|
393
|
+
- \`missing-dependency\` — \`needs:\` references a target not declared
|
|
394
|
+
- \`missing-skillstore-for-data-ref\` — \`&\` op fires without a SkillStore wired
|
|
395
|
+
|
|
396
|
+
## Tier-2 (warning)
|
|
397
|
+
|
|
398
|
+
- \`deprecated-question\` — bare \`?\` op (deprecated v1; compile-error in v1.x)
|
|
399
|
+
- \`unsafe-shell-ambiguous-subst\` — \`$(NAME)\` inside \`@ unsafe\` body that isn't a declared variable; collides with bash command-sub syntax
|
|
400
|
+
- \`unsafe-shell-op\` — \`@ unsafe\` op present; requires human review every time
|
|
401
|
+
- \`unconfirmed-mutation\` — \`$\` op invokes a tool whose name suggests mutation (write/update/delete) without a preceding \`??\` confirmation
|
|
402
|
+
- \`model-contention\` — async + sync ops on the same model serialize on a single runtime worker
|
|
403
|
+
- \`draft-with-trigger\` — \`# Status: Draft\` skill has \`# Triggers:\` declared; triggers won't fire until Approved
|
|
404
|
+
- \`reference-to-disabled-skill\` — \`&\` op references a Disabled skill (also tier-1 in some contexts)
|
|
405
|
+
- \`unused-augmenting-header\` — \`# Delivery-context:\` or \`# Templates:\` set on a skill with no agent-bound output (v0.2.6)
|
|
406
|
+
|
|
407
|
+
## Tier-3 (info)
|
|
408
|
+
|
|
409
|
+
- \`no-default-target\` — no \`default:\` declaration (relevant for data skills only; procedural skills hit tier-1)
|
|
410
|
+
- \`duplicate-skill-name\` — name collides with an existing stored skill
|
|
411
|
+
- \`plugin-collision\` — placeholder for v1.x plugin-loader name conflicts
|
|
412
|
+
|
|
413
|
+
\`compile_skill({source})\` runs the full lint preflight and reports
|
|
414
|
+
findings in the \`errors\` + \`warnings\` arrays. \`lint_skill({source})\`
|
|
415
|
+
returns the same diagnostics without compiling.
|
|
416
|
+
`;
|
|
417
|
+
export function helpResponse(topic, runtimeVersion, registry) {
|
|
418
|
+
if (topic === null) {
|
|
419
|
+
return {
|
|
420
|
+
topic: null,
|
|
421
|
+
version: runtimeVersion,
|
|
422
|
+
content: QUICKSTART,
|
|
423
|
+
available_topics: ["ops", "frontmatter", "examples", "connectors", "lint-codes"],
|
|
424
|
+
};
|
|
425
|
+
}
|
|
426
|
+
let content;
|
|
427
|
+
switch (topic) {
|
|
428
|
+
case "ops":
|
|
429
|
+
content = OPS;
|
|
430
|
+
break;
|
|
431
|
+
case "frontmatter":
|
|
432
|
+
content = FRONTMATTER;
|
|
433
|
+
break;
|
|
434
|
+
case "examples":
|
|
435
|
+
content = EXAMPLES;
|
|
436
|
+
break;
|
|
437
|
+
case "connectors":
|
|
438
|
+
content = renderConnectorsTopic(registry);
|
|
439
|
+
break;
|
|
440
|
+
case "lint-codes":
|
|
441
|
+
content = LINT_CODES;
|
|
442
|
+
break;
|
|
443
|
+
default:
|
|
444
|
+
content = `# Unknown topic '${topic}'\n\nValid topics: ops, frontmatter, examples, connectors, lint-codes`;
|
|
445
|
+
}
|
|
446
|
+
return { topic, version: runtimeVersion, content };
|
|
447
|
+
}
|
|
448
|
+
function renderConnectorsTopic(registry) {
|
|
449
|
+
if (registry === undefined)
|
|
450
|
+
return CONNECTORS_PROLOGUE;
|
|
451
|
+
const summary = [
|
|
452
|
+
`\n## Wired in this runtime`,
|
|
453
|
+
``,
|
|
454
|
+
`*Call \`runtime_capabilities()\` for the full discovery payload.*`,
|
|
455
|
+
``,
|
|
456
|
+
];
|
|
457
|
+
const ss = registry.listSkillStores();
|
|
458
|
+
const ms = registry.listMemoryStores();
|
|
459
|
+
const lm = registry.listLocalModels();
|
|
460
|
+
const mc = registry.listMcpConnectors();
|
|
461
|
+
const ac = registry.listAgentConnectors();
|
|
462
|
+
summary.push(`- SkillStores: ${ss.length === 0 ? "(none)" : ss.map((e) => `${e.name} (${e.ctor.name})`).join(", ")}`);
|
|
463
|
+
summary.push(`- MemoryStores: ${ms.length === 0 ? "(none)" : ms.map((e) => `${e.name} (${e.ctor.name})`).join(", ")}`);
|
|
464
|
+
summary.push(`- LocalModels: ${lm.length === 0 ? "(none)" : lm.map((e) => e.name).join(", ")}`);
|
|
465
|
+
summary.push(`- McpConnectors: ${mc.length === 0 ? "(none)" : mc.map((e) => `${e.name} (${e.ctor.name})`).join(", ")}`);
|
|
466
|
+
summary.push(`- AgentConnectors: ${ac.length === 0 ? "(none — defaults to NoOp)" : ac.map((e) => `${e.name} (${e.ctor.name})`).join(", ")}`);
|
|
467
|
+
return CONNECTORS_PROLOGUE + summary.join("\n");
|
|
468
|
+
}
|
|
469
|
+
//# sourceMappingURL=help-content.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"help-content.js","sourceRoot":"","sources":["../src/help-content.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,kEAAkE;AAClE,qEAAqE;AACrE,2BAA2B;AAC3B,EAAE;AACF,kBAAkB;AAClB,0EAA0E;AAC1E,+DAA+D;AAC/D,uCAAuC;AACvC,kFAAkF;AAClF,kFAAkF;AAClF,uDAAuD;AACvD,EAAE;AACF,uEAAuE;AACvE,yDAAyD;AAIzD,MAAM,UAAU,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkGlB,CAAC;AAEF,MAAM,GAAG,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4GX,CAAC;AAEF,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2CnB,CAAC;AAEF,MAAM,QAAQ,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsEhB,CAAC;AAEF,MAAM,mBAAmB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;CA0B3B,CAAC;AAEF,MAAM,UAAU,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAk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,CAAC,CAAC,CAAC,2BAA2B,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC7I,OAAO,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAClD,CAAC"}
|
package/dist/mcp-server.d.ts
CHANGED
|
@@ -27,6 +27,8 @@ import type { Registry } from "./connectors/registry.js";
|
|
|
27
27
|
* lint_skill({source?|name}) → diagnostics across tiers (v0.2.3)
|
|
28
28
|
* compile_skill({source?|name, inputs?})→ rendered artifact + errors (v0.2.3)
|
|
29
29
|
* skill_write({name, source, overwrite?})→ commit to SkillStore (write, v0.2.3)
|
|
30
|
+
* execute_skill({skill_name, inputs?, mechanical?})→ run + return result (write, v0.2.8)
|
|
31
|
+
* help({topic?}) → cold-agent language discovery (read, v0.2.8)
|
|
30
32
|
*/
|
|
31
33
|
export interface JsonRpcRequest {
|
|
32
34
|
jsonrpc: "2.0";
|
|
@@ -63,6 +65,10 @@ export interface McpServerDeps {
|
|
|
63
65
|
registry?: Registry;
|
|
64
66
|
/** Surfaced via `runtime_capabilities` so cold agents know whether `@ unsafe` is permitted. */
|
|
65
67
|
enableUnsafeShell?: boolean;
|
|
68
|
+
/** Runtime mode label — `"serve"` (headless) or `"dashboard"` (SPA mounted). v0.2.7. */
|
|
69
|
+
runtimeMode?: "serve" | "dashboard";
|
|
70
|
+
/** Path to the persistent imperative-trigger registry, when configured. v0.2.7. */
|
|
71
|
+
triggersFilePath?: string;
|
|
66
72
|
serverVersion?: string;
|
|
67
73
|
}
|
|
68
74
|
export declare class McpServer {
|
|
@@ -80,6 +86,8 @@ export declare class McpServer {
|
|
|
80
86
|
*/
|
|
81
87
|
runStdio(): void;
|
|
82
88
|
private registerBuiltinTools;
|
|
89
|
+
private executeSkill;
|
|
90
|
+
private help;
|
|
83
91
|
private lintSkill;
|
|
84
92
|
private compileSkill;
|
|
85
93
|
private skillWrite;
|
package/dist/mcp-server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-server.d.ts","sourceRoot":"","sources":["../src/mcp-server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAmC,MAAM,uBAAuB,CAAC;AACzF,OAAO,KAAK,EAAE,SAAS,EAAgD,MAAM,gBAAgB,CAAC;AAC9F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"mcp-server.d.ts","sourceRoot":"","sources":["../src/mcp-server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAmC,MAAM,uBAAuB,CAAC;AACzF,OAAO,KAAK,EAAE,SAAS,EAAgD,MAAM,gBAAgB,CAAC;AAC9F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAYzD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAIH,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,KAAK,CAAC;IACf,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,KAAK,CAAC;IACf,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAC3B,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,KAAK,CAAC;IACf,EAAE,EAAE,MAAM,GA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