skillscript-runtime 0.2.10 → 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 +54 -10
- package/dist/cli.js +13 -9
- package/dist/cli.js.map +1 -1
- package/dist/compile.d.ts +7 -0
- package/dist/compile.d.ts.map +1 -1
- package/dist/compile.js +13 -2
- package/dist/compile.js.map +1 -1
- package/dist/help-content.d.ts.map +1 -1
- package/dist/help-content.js +181 -4
- package/dist/help-content.js.map +1 -1
- package/dist/lint.d.ts +10 -0
- package/dist/lint.d.ts.map +1 -1
- package/dist/lint.js +359 -22
- package/dist/lint.js.map +1 -1
- package/dist/mcp-server.d.ts.map +1 -1
- package/dist/mcp-server.js +9 -2
- package/dist/mcp-server.js.map +1 -1
- package/dist/parser.d.ts +1 -1
- package/dist/parser.d.ts.map +1 -1
- package/dist/parser.js +76 -4
- package/dist/parser.js.map +1 -1
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +47 -2
- package/dist/runtime.js.map +1 -1
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +30 -0
- package/dist/version.js.map +1 -0
- package/examples/hello.skill.provenance.json +1 -1
- package/package.json +1 -1
package/dist/help-content.js
CHANGED
|
@@ -50,6 +50,7 @@ default: target_b ← goal target the runtime walks toward
|
|
|
50
50
|
| \`! text\` | Emit text to the user / output channel |
|
|
51
51
|
| \`?? prompt -> VAR\` | Ask user (interactive mode only) |
|
|
52
52
|
| \`$set NAME=value\` | Explicit variable binding |
|
|
53
|
+
| \`$append VAR <value>\` | Accumulate a value into a list-typed VAR (v0.3.0) |
|
|
53
54
|
| \`& skill-name args -> VAR\` | Inline a data-skill |
|
|
54
55
|
|
|
55
56
|
## 3. Result binding
|
|
@@ -184,6 +185,25 @@ $set NAME=value
|
|
|
184
185
|
$set NAME=$(OTHER_VAR|trim)
|
|
185
186
|
\`\`\`
|
|
186
187
|
|
|
188
|
+
### \`$append\` — Accumulator (v0.3.0)
|
|
189
|
+
|
|
190
|
+
\`\`\`
|
|
191
|
+
$append VAR <value>
|
|
192
|
+
\`\`\`
|
|
193
|
+
|
|
194
|
+
Single-value append to a list-typed VAR. The target must be initialized in an enclosing scope before the append fires:
|
|
195
|
+
|
|
196
|
+
\`\`\`
|
|
197
|
+
walk:
|
|
198
|
+
$set FOUND = []
|
|
199
|
+
foreach M in $(MESSAGES):
|
|
200
|
+
if $(M.id) not in $(FOUND):
|
|
201
|
+
$append FOUND $(M.id)
|
|
202
|
+
! NEW: $(M.id)
|
|
203
|
+
\`\`\`
|
|
204
|
+
|
|
205
|
+
The append mutates the outer-scope binding (unlike \`$set\`, which is loop-local inside \`foreach\`). Lint catches: missing init (\`uninitialized-append\`), init inside the same foreach as the append (\`foreach-local-accumulator-target\` — would silently lose data each iteration), init pointing at a non-list value (\`append-to-non-list\`). List-only in v0.3.0 — string concat and map-shaped accumulation deferred.
|
|
206
|
+
|
|
187
207
|
### \`&\` — Inline data-skill
|
|
188
208
|
|
|
189
209
|
\`\`\`
|
|
@@ -264,6 +284,44 @@ Skill files open with \`# Key: value\` headers. Order isn't significant.
|
|
|
264
284
|
\`\`\`
|
|
265
285
|
|
|
266
286
|
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).
|
|
287
|
+
|
|
288
|
+
## Ambient variables (auto-populated by the runtime)
|
|
289
|
+
|
|
290
|
+
The runtime injects these refs — don't declare them in \`# Vars:\` / \`# Requires:\`.
|
|
291
|
+
|
|
292
|
+
| Ref | Source | Notes |
|
|
293
|
+
|---|---|---|
|
|
294
|
+
| \`$(NOW)\` | runtime clock | ISO-8601 timestamp at op-dispatch time |
|
|
295
|
+
| \`$(USER)\` | invocation context | Identity passed via \`agentId\` / CLI user |
|
|
296
|
+
| \`$(SESSION_CONTEXT)\` | runtime session | Free-form session snapshot for cross-skill carry |
|
|
297
|
+
| \`$(TRIGGER_TYPE)\` | scheduler | \`cron\` / \`session\` / \`manual\` / \`agent-event\` |
|
|
298
|
+
| \`$(TRIGGER_PAYLOAD)\` | scheduler | JSON-serializable payload attached to the firing trigger |
|
|
299
|
+
| \`$(ERROR_CONTEXT)\` | runtime error handler | Inside \`else:\` and \`# OnError:\` only; \`.kind\` / \`.message\` / \`.target\` accessible |
|
|
300
|
+
|
|
301
|
+
\`EVENT.*\` auto-populates on cron-fired skills (v0.2.7 scheduler):
|
|
302
|
+
|
|
303
|
+
| Ref | Value |
|
|
304
|
+
|---|---|
|
|
305
|
+
| \`$(EVENT.fired_at)\` | epoch milliseconds |
|
|
306
|
+
| \`$(EVENT.fired_at_unix)\` | epoch seconds |
|
|
307
|
+
| \`$(EVENT.fired_at_plus_1h_unix)\` | \`fired_at_unix + 3600\` |
|
|
308
|
+
| \`$(EVENT.fired_at_plus_1d_unix)\` | \`fired_at_unix + 86_400\` |
|
|
309
|
+
| \`$(EVENT.fired_at_plus_7d_unix)\` | \`fired_at_unix + 604_800\` |
|
|
310
|
+
|
|
311
|
+
(v0.2.12 Bug 24 — \`EVENT.*\` was undocumented before this release.)
|
|
312
|
+
|
|
313
|
+
## Variable reference forms
|
|
314
|
+
|
|
315
|
+
\`\`\`
|
|
316
|
+
$(VAR) bare ref (any declared/output-bound/ambient name)
|
|
317
|
+
$(VAR.field) dotted field access on JSON-bound vars + ambient family
|
|
318
|
+
$(LIST.0) indexed access (v0.2.12 Bug 25 — was undocumented)
|
|
319
|
+
$(LIST.0.id) mixed indexed + field-access (chains arbitrarily deep)
|
|
320
|
+
$(VAR|filter) filter pipe (see \`help({topic: "ops"})\` for filter list)
|
|
321
|
+
$(VAR.field|filter) field-access then filter
|
|
322
|
+
\`\`\`
|
|
323
|
+
|
|
324
|
+
Unresolved refs: tier-1 \`undeclared-var\` at compile, \`UnresolvedVariableError\` at runtime.
|
|
267
325
|
`;
|
|
268
326
|
const EXAMPLES = `# Three canonical worked skills
|
|
269
327
|
|
|
@@ -335,6 +393,116 @@ default: route
|
|
|
335
393
|
\`\`\`
|
|
336
394
|
|
|
337
395
|
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:\`).
|
|
396
|
+
|
|
397
|
+
## 4. Composition — orchestrator invoking child skills
|
|
398
|
+
|
|
399
|
+
\`\`\`
|
|
400
|
+
# Skill: morning-brief-orchestrator
|
|
401
|
+
# Description: Fan out to three child skills, gather their outputs into one brief.
|
|
402
|
+
# Status: Approved
|
|
403
|
+
# Vars: USER_NAME=Scott
|
|
404
|
+
|
|
405
|
+
gather:
|
|
406
|
+
$ execute_skill skill_name=calendar-today USER=$(USER_NAME) -> CAL (fallback: "(no calendar data)")
|
|
407
|
+
$ execute_skill skill_name=mailbox-triage USER=$(USER_NAME) -> MAIL (fallback: "(mailbox empty)")
|
|
408
|
+
$ execute_skill skill_name=weather-summary -> WX (fallback: "(weather unavailable)")
|
|
409
|
+
|
|
410
|
+
render: gather
|
|
411
|
+
! Good morning, $(USER_NAME). Today:
|
|
412
|
+
! • Calendar: $(CAL)
|
|
413
|
+
! • Mailbox: $(MAIL)
|
|
414
|
+
! • Weather: $(WX)
|
|
415
|
+
|
|
416
|
+
default: render
|
|
417
|
+
\`\`\`
|
|
418
|
+
|
|
419
|
+
Demonstrates: in-skill \`$ execute_skill\` composition (each child runs through the runtime under a depth-counted chain), per-call \`(fallback: ...)\` for resilience, kwarg forwarding (\`USER=$(USER_NAME)\`), \`->\` binding child output for downstream reference.
|
|
420
|
+
|
|
421
|
+
## 5. Dedup-by-id with the accumulator (v0.3.0)
|
|
422
|
+
|
|
423
|
+
\`\`\`
|
|
424
|
+
# Skill: dedup-walk
|
|
425
|
+
# Description: Walk a result list, skip items whose id was already seen.
|
|
426
|
+
# Status: Approved
|
|
427
|
+
|
|
428
|
+
walk:
|
|
429
|
+
> mode=topical query="$(TOPIC)" limit=50 -> CANDIDATES
|
|
430
|
+
$set SEEN = []
|
|
431
|
+
foreach C in $(CANDIDATES):
|
|
432
|
+
if $(C.id) not in $(SEEN):
|
|
433
|
+
$append SEEN $(C.id)
|
|
434
|
+
! NEW: $(C.id) — $(C.summary)
|
|
435
|
+
else:
|
|
436
|
+
! dup: $(C.id)
|
|
437
|
+
! Total novel items: $(SEEN|length)
|
|
438
|
+
|
|
439
|
+
default: walk
|
|
440
|
+
\`\`\`
|
|
441
|
+
|
|
442
|
+
Demonstrates: \`$append\` accumulator pattern, \`$set SEEN = []\` init at the target body (before the foreach) so mutations persist across iterations, \`not in\` membership check against the accumulating list, \`|length\` filter on the final collected list. Pre-v0.3.0 this pattern was structurally unimplementable — \`$set\` inside foreach is loop-local, so the SEEN list reset every iteration.
|
|
443
|
+
`;
|
|
444
|
+
const COMPOSITION = `# Composition
|
|
445
|
+
|
|
446
|
+
Skillscript has three composition primitives — all let one skill draw on another's output, with different semantics around when, where, and how the child runs.
|
|
447
|
+
|
|
448
|
+
## 1. \`& <skill-name>\` — data-skill inline (compile-time)
|
|
449
|
+
|
|
450
|
+
Inlines an *Approved data skill* into the host skill's compiled artifact at the call site. The data skill's body becomes part of the rendered prompt. Use for *static* knowledge or templated content (style guides, voice rules, runbooks).
|
|
451
|
+
|
|
452
|
+
\`\`\`
|
|
453
|
+
brief:
|
|
454
|
+
~ prompt="$(VOICE_RULES) Now write a one-line status:" model=qwen -> RESULT
|
|
455
|
+
& voice-rules
|
|
456
|
+
\`\`\`
|
|
457
|
+
|
|
458
|
+
- Resolved at \`compile()\` time — the data skill's \`content_hash\` is recorded in the host's provenance block.
|
|
459
|
+
- Provenance lets \`skillfile audit\` detect stale recompiles when a referenced data skill changes.
|
|
460
|
+
- The data skill must be marked \`# Skill-kind: data\` (or live in a path the SkillStore recognizes as data); otherwise it's treated as procedural and won't inline.
|
|
461
|
+
|
|
462
|
+
## 2. \`& invoke <skill-name>\` — runtime call (per-fire)
|
|
463
|
+
|
|
464
|
+
Calls a procedural skill at runtime. Each call goes through the runtime under a depth-counted chain (default limit 5) — same recursion guard as Style 3 below.
|
|
465
|
+
|
|
466
|
+
\`\`\`
|
|
467
|
+
escalate:
|
|
468
|
+
& invoke notify-oncall
|
|
469
|
+
\`\`\`
|
|
470
|
+
|
|
471
|
+
- Child skill's outputs flow into the parent's variable scope.
|
|
472
|
+
- Failures propagate as \`OpError\`s.
|
|
473
|
+
|
|
474
|
+
## 3. \`$ execute_skill skill_name="<child>" ...kwargs -> VAR\` — in-skill execute (per-fire)
|
|
475
|
+
|
|
476
|
+
The most general form: the host \`$\`-dispatches the literal tool name \`execute_skill\` (intercepted by the runtime, not sent to any MCP server). Same depth-counted chain as Style 2, plus full kwarg forwarding and \`-> VAR\` binding for downstream use.
|
|
477
|
+
|
|
478
|
+
\`\`\`
|
|
479
|
+
gather:
|
|
480
|
+
$ execute_skill skill_name="calendar-today" USER=$(USER_NAME) -> CAL (fallback: "(no calendar data)")
|
|
481
|
+
$ execute_skill skill_name="mailbox-triage" inputs={"USER": "$(USER_NAME)"} -> MAIL
|
|
482
|
+
\`\`\`
|
|
483
|
+
|
|
484
|
+
Two kwarg styles, both supported (v0.2.9 fix):
|
|
485
|
+
- **Bare kwargs** — \`USER=$(USER_NAME)\` natural skill grammar
|
|
486
|
+
- **\`inputs={...}\` JSON** — MCP-call parity, useful when forwarding many fields verbatim
|
|
487
|
+
|
|
488
|
+
The bound \`-> VAR\` carries the child's final emit through to the host's scope.
|
|
489
|
+
|
|
490
|
+
## Limits & lint signals
|
|
491
|
+
|
|
492
|
+
- **Recursion**: depth-5 chain by default (\`ExecuteSkillRecursionError\` if exceeded). Both \`& invoke\` and \`$ execute_skill\` share the counter.
|
|
493
|
+
- **Lint** (\`unknown-skill-reference\`, tier-1): \`& <name>\`, \`& invoke <name>\`, and \`$ execute_skill skill_name=<name>\` all validate the child skill exists in the SkillStore at compile time (v0.2.11 Bug 7 closed the \`$ execute_skill\` gap).
|
|
494
|
+
- **Lint** (\`disabled-skill-reference\`, tier-1): any composition primitive pointing at a \`# Status: Disabled\` skill blocks compile.
|
|
495
|
+
|
|
496
|
+
## When to use which
|
|
497
|
+
|
|
498
|
+
| Use case | Primitive |
|
|
499
|
+
|---|---|
|
|
500
|
+
| Static knowledge in a prompt | \`& <data-skill>\` |
|
|
501
|
+
| Fire-and-forget child call | \`& invoke <skill>\` |
|
|
502
|
+
| Child output bound into parent scope | \`$ execute_skill ... -> VAR\` |
|
|
503
|
+
| Parallel orchestrators (v0.3.0 candidate — not yet shipped) | parked |
|
|
504
|
+
|
|
505
|
+
See \`help({topic: "examples"})\` example 4 for a worked orchestrator skill.
|
|
338
506
|
`;
|
|
339
507
|
const CONNECTORS_PROLOGUE = `# Connectors
|
|
340
508
|
|
|
@@ -385,19 +553,25 @@ Three tiers per ERD §3:
|
|
|
385
553
|
- \`single-equals\` — \`if $(VAR) = "..."\` instead of \`==\` (specific diagnostic)
|
|
386
554
|
- \`indentation\` — tabs in indentation; mixed tabs/spaces
|
|
387
555
|
- \`reserved-keyword\` — variable/target/skill name collides with a reserved word
|
|
388
|
-
- \`unknown-skill-reference\` — \`&\`
|
|
389
|
-
- \`
|
|
556
|
+
- \`unknown-skill-reference\` — \`&\` or \`$ execute_skill\` references a skill not in the store (v0.2.11 Bug 7 extended to cover \`$ execute_skill\`)
|
|
557
|
+
- \`unknown-template-reference\` — \`# Templates: <name>\` references a skill not in the store (v0.2.12 Bug 17)
|
|
558
|
+
- \`disabled-skill-reference\` — \`&\` or \`$ execute_skill\` references a Disabled skill
|
|
390
559
|
- \`credential-in-args\` — op arg looks like a secret literal
|
|
391
560
|
- \`status-disabled\` — skill marked \`# Status: Disabled\`
|
|
392
561
|
- \`circular-dependency\` — dep cycle between targets
|
|
393
562
|
- \`missing-dependency\` — \`needs:\` references a target not declared
|
|
394
563
|
- \`missing-skillstore-for-data-ref\` — \`&\` op fires without a SkillStore wired
|
|
564
|
+
- \`unsafe-shell-disabled\` — \`@ unsafe\` declared but \`enableUnsafeShell: false\` (v0.2.11 Bug 5; fires only when caller passes the flag explicitly false)
|
|
565
|
+
- \`uninitialized-append\` — \`$append VAR ...\` where VAR has no \`$set\` or \`# Vars:\` init in any enclosing scope (v0.3.0)
|
|
566
|
+
- \`foreach-local-accumulator-target\` — \`$append VAR ...\` where the matching \`$set VAR = []\` is in the same scope as the append (typically same foreach body — would silently lose data each iter) (v0.3.0)
|
|
567
|
+
- \`append-to-non-list\` — \`$append VAR ...\` where VAR's static init is a non-list value (v0.3.0; list-only)
|
|
395
568
|
|
|
396
569
|
## Tier-2 (warning)
|
|
397
570
|
|
|
398
571
|
- \`deprecated-question\` — bare \`?\` op (deprecated v1; compile-error in v1.x)
|
|
399
572
|
- \`unsafe-shell-ambiguous-subst\` — \`$(NAME)\` inside \`@ unsafe\` body that isn't a declared variable; collides with bash command-sub syntax
|
|
400
573
|
- \`unsafe-shell-op\` — \`@ unsafe\` op present; requires human review every time
|
|
574
|
+
- \`unknown-retrieval-arg\` — \`>\` op carries kwargs outside mode/query/limit/connector/fallback (v0.2.12 Bug 26)
|
|
401
575
|
- \`unconfirmed-mutation\` — \`$\` op invokes a tool whose name suggests mutation (write/update/delete) without a preceding \`??\` confirmation
|
|
402
576
|
- \`model-contention\` — async + sync ops on the same model serialize on a single runtime worker
|
|
403
577
|
- \`draft-with-trigger\` — \`# Status: Draft\` skill has \`# Triggers:\` declared; triggers won't fire until Approved
|
|
@@ -420,7 +594,7 @@ export function helpResponse(topic, runtimeVersion, registry) {
|
|
|
420
594
|
topic: null,
|
|
421
595
|
version: runtimeVersion,
|
|
422
596
|
content: QUICKSTART,
|
|
423
|
-
available_topics: ["ops", "frontmatter", "examples", "connectors", "lint-codes"],
|
|
597
|
+
available_topics: ["ops", "frontmatter", "examples", "composition", "connectors", "lint-codes"],
|
|
424
598
|
};
|
|
425
599
|
}
|
|
426
600
|
let content;
|
|
@@ -434,6 +608,9 @@ export function helpResponse(topic, runtimeVersion, registry) {
|
|
|
434
608
|
case "examples":
|
|
435
609
|
content = EXAMPLES;
|
|
436
610
|
break;
|
|
611
|
+
case "composition":
|
|
612
|
+
content = COMPOSITION;
|
|
613
|
+
break;
|
|
437
614
|
case "connectors":
|
|
438
615
|
content = renderConnectorsTopic(registry);
|
|
439
616
|
break;
|
|
@@ -441,7 +618,7 @@ export function helpResponse(topic, runtimeVersion, registry) {
|
|
|
441
618
|
content = LINT_CODES;
|
|
442
619
|
break;
|
|
443
620
|
default:
|
|
444
|
-
content = `# Unknown topic '${topic}'\n\nValid topics: ops, frontmatter, examples, connectors, lint-codes`;
|
|
621
|
+
content = `# Unknown topic '${topic}'\n\nValid topics: ops, frontmatter, examples, composition, connectors, lint-codes`;
|
|
445
622
|
}
|
|
446
623
|
return { topic, version: runtimeVersion, content };
|
|
447
624
|
}
|
package/dist/help-content.js.map
CHANGED
|
@@ -1 +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
|
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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
package/dist/lint.d.ts
CHANGED
|
@@ -69,6 +69,15 @@ export interface LintOptions {
|
|
|
69
69
|
* preflight). Default `"api"`.
|
|
70
70
|
*/
|
|
71
71
|
callSite?: "cli" | "api" | "compile-preflight";
|
|
72
|
+
/**
|
|
73
|
+
* Runtime `enableUnsafeShell` flag, if known to the caller. When
|
|
74
|
+
* explicitly `false`, the `unsafe-shell-disabled` rule (v0.2.11 Bug 5)
|
|
75
|
+
* fires tier-1 on any `@ unsafe` op — the skill would refuse at
|
|
76
|
+
* runtime, and compile should surface that up-front. When `undefined`
|
|
77
|
+
* (caller doesn't know), only the standard tier-2 `unsafe-shell-op`
|
|
78
|
+
* warning fires.
|
|
79
|
+
*/
|
|
80
|
+
enableUnsafeShell?: boolean;
|
|
72
81
|
}
|
|
73
82
|
interface LintContext {
|
|
74
83
|
parsed: ParsedSkill;
|
|
@@ -78,6 +87,7 @@ interface LintContext {
|
|
|
78
87
|
skillStore: SkillStore | undefined;
|
|
79
88
|
hasSkillStore: boolean;
|
|
80
89
|
callSite: "cli" | "api" | "compile-preflight";
|
|
90
|
+
enableUnsafeShell: boolean | undefined;
|
|
81
91
|
}
|
|
82
92
|
export interface LintRule {
|
|
83
93
|
id: string;
|
package/dist/lint.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lint.d.ts","sourceRoot":"","sources":["../src/lint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,KAAK,WAAW,EAAgB,MAAM,aAAa,CAAC;AAEpE,OAAO,KAAK,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAC5E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AAExD,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IAC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