sil-openclaw 0.3.8 → 0.4.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/CHANGELOG.md +116 -0
- package/dist/lib/bind-channel.js +10 -0
- package/dist/lib/profile-store.js +578 -581
- package/dist/lib/sil-client.js +282 -33
- package/dist/tools/catalog.js +485 -7
- package/dist/tools/profile.js +235 -371
- package/openclaw.plugin.json +6 -4
- package/package.json +1 -1
- package/scripts/create-shopper.mjs +188 -32
- package/sil-shopping/SKILL.md +85 -54
- package/sil-shopping/examples/multi_domain_shopper_walkthrough.md +56 -190
- package/sil-shopping/references/agent_creation_engine.md +113 -63
- package/sil-shopping/references/brainstorm_interview.md +95 -69
- package/sil-shopping/references/catalog_tools_reference.md +27 -29
- package/sil-shopping/references/fill_and_feedback.md +88 -0
- package/sil-shopping/references/method_and_prds.md +110 -0
- package/sil-shopping/references/search_param_mapping.md +72 -47
- package/sil-shopping/references/setup_onboarding.md +68 -0
- package/sil-shopping/references/shop_loop.md +117 -134
- package/sil-shopping/references/manage_domains.md +0 -56
- package/sil-shopping/references/refine_shopper.md +0 -48
|
@@ -1,190 +1,56 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
A
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
##
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
##
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
now does the engine proceed
|
|
58
|
-
([`../references/agent_creation_engine.md`](../references/agent_creation_engine.md)):
|
|
59
|
-
validate-first → singleton check → `openclaw agents add my-shopper --workspace
|
|
60
|
-
~/.openclaw/workspace-my-shopper --non-interactive --json` (confirm the inherited
|
|
61
|
-
profile grants a web tool) → write the persona into `SOUL.md` →
|
|
62
|
-
`sil_profile_materialize { name, userSpec }` **(NO `domain` — writes the shared
|
|
63
|
-
`user_spec.md` + `profile.json` with an empty `domains: {}`)** → wire sil:
|
|
64
|
-
|
|
65
|
-
```
|
|
66
|
-
openclaw config set 'agents.list[<i>].skills' '["sil"]' --strict-json
|
|
67
|
-
openclaw config set plugins.entries.sil.enabled true --strict-json
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
→ then **admit sil at the host allow surfaces** so the `sil_*` tools are un-filtered
|
|
71
|
-
— the shipped helper does the additive, idempotent merge of `plugins.allow` +
|
|
72
|
-
`tools.alsoAllow` (never clobbering another admitted plugin like `klodi`):
|
|
73
|
-
|
|
74
|
-
```
|
|
75
|
-
sil-openclaw-allowlist
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
→ `openclaw config validate --json` returns valid → **`created`** (a non-zero
|
|
79
|
-
helper exit would be `persistence_failed`, not `created` — never a green shopper
|
|
80
|
-
over still-filtered tools). The shopper now exists with an **empty `domains` map** —
|
|
81
|
-
healthy; it will mint each niche on first shop.
|
|
82
|
-
|
|
83
|
-
## Niche A — road cycling (minted on the fly, announced)
|
|
84
|
-
|
|
85
|
-
> **User:** "Find me a first road bike, around €1500."
|
|
86
|
-
|
|
87
|
-
The shop loop ([`../references/shop_loop.md`](../references/shop_loop.md) owns the
|
|
88
|
-
machinery — not repeated here) classifies the niche (**road cycling**), reads
|
|
89
|
-
`profile.json.domains`, finds **no** matching domain, and **mints it on the spot —
|
|
90
|
-
announced**:
|
|
91
|
-
|
|
92
|
-
> **Shopper:** "I haven't shopped cycling for you yet — setting that up now (road
|
|
93
|
-
> cycling, first bike). One sec while I do the homework."
|
|
94
|
-
|
|
95
|
-
It **researches** the niche deeply (the deep `domainSpec` — the full how-to-buy:
|
|
96
|
-
**fit is everything** — frame size from height *and* inseam, stack/reach, saddle
|
|
97
|
-
setback, crank length; geometry; gearing theory; material/wheel trade-offs),
|
|
98
|
-
derives the `intentSpec` dimensions, seeds a partial `playbook`, then persists with
|
|
99
|
-
the **whole-doc** mint:
|
|
100
|
-
|
|
101
|
-
```jsonc
|
|
102
|
-
sil_profile_materialize {
|
|
103
|
-
name: "My Shopper",
|
|
104
|
-
userSpec: "…the current shared spec (re-persisted)…",
|
|
105
|
-
domain: {
|
|
106
|
-
slug: "road-cycling", name: "Road cycling",
|
|
107
|
-
domainSpec: "## First road bike — how to buy well (deep)\nFit is everything: size from height AND inseam; stack/reach set torso angle; saddle setback from KOPS; crank length scales with inseam…\n## Geometry: endurance vs race. ## Gearing: gear-inches, compact vs mid-compact. ## Material/wheels: alloy vs carbon; rim depth vs crosswind.",
|
|
108
|
-
intentSpec: "## Dimensions (schema)\nuse-case; terrain; budget band; fit envelope; timeline; compatibility; performance priorities; aesthetics.",
|
|
109
|
-
playbook: "## Buying taste (seeded partial)\nTo be learned as we shop."
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
Then the loop runs on the active **road-cycling** domain: decompose the intent
|
|
115
|
-
(first bike, ~€1500), map → `sil_search` → compare on the rubric, and recommend
|
|
116
|
-
with a **"why" that cites the layers** — "for a first bike **fit/comfort outrank
|
|
117
|
-
outright speed** (a domain mechanic), a 54 cm endurance frame sits right, and I kept
|
|
118
|
-
it within your value budget; **no leather anywhere** (your standing hard rule)." A
|
|
119
|
-
rationale naming no domain mechanic and reusing no stored fact would **fail the SDS
|
|
120
|
-
bar** even if the bike were fine.
|
|
121
|
-
|
|
122
|
-
The session surfaces a **taste**, captured the **cheap** way — one append, scoped to
|
|
123
|
-
this domain:
|
|
124
|
-
|
|
125
|
-
> **User:** "I don't chase brands — value over name."
|
|
126
|
-
|
|
127
|
-
```
|
|
128
|
-
sil_remember { kind: "taste", text: "Value over brand; ~€1500 band.", domain: "road-cycling" }
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
That taste lands in **`domains/road-cycling/playbook.md`** — this niche only.
|
|
132
|
-
|
|
133
|
-
## Niche B — espresso (a SECOND niche, same session, no switch)
|
|
134
|
-
|
|
135
|
-
Moments later, **same session, no agent switch, no re-onboarding**:
|
|
136
|
-
|
|
137
|
-
> **User:** "Different thing — I want a home espresso machine, decent but not crazy."
|
|
138
|
-
|
|
139
|
-
The loop classifies the niche (**espresso**), reads `profile.json.domains`, finds
|
|
140
|
-
no match, and **mints espresso on the fly — announced** ("new niche for me —
|
|
141
|
-
setting up espresso") with its own deep `domainSpec` (boiler type, PID, pressure
|
|
142
|
-
profiling, portafilter size, grinder pairing), `intentSpec`, and partial `playbook`,
|
|
143
|
-
via a second whole-doc `sil_profile_materialize` with `domain.slug: "espresso"`.
|
|
144
|
-
|
|
145
|
-
**The shared fact carries — without being re-asked:**
|
|
146
|
-
|
|
147
|
-
> **Shopper:** "I'll ship to your Lyon address as usual" — **the ship-to from the
|
|
148
|
-
> shared `user_spec.md`, captured during onboarding, reused in espresso with no
|
|
149
|
-
> re-ask.** The **no-leather hard rule** also still applies (it rejects a
|
|
150
|
-
> leather-wrapped tamper handle outright).
|
|
151
|
-
|
|
152
|
-
**The niche taste does NOT leak:** the *value-over-brand, ~€1500* taste lives in
|
|
153
|
-
`domains/road-cycling/playbook.md` and **does not shape** the espresso picks —
|
|
154
|
-
espresso starts with its own (partial) taste, learned fresh:
|
|
155
|
-
|
|
156
|
-
> **User:** "For coffee I'll happily pay for a known reliable brand."
|
|
157
|
-
|
|
158
|
-
```
|
|
159
|
-
sil_remember { kind: "taste", text: "Pays up for a reliable known brand.", domain: "espresso" }
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
→ lands in **`domains/espresso/playbook.md`** only. Road cycling's "value over
|
|
163
|
-
brand" and espresso's "pay for a known brand" coexist **without contradiction** —
|
|
164
|
-
that is per-domain taste isolation. A **fact** (a new measurement, a hard rule) would
|
|
165
|
-
instead go to the **shared** `user_spec.md` (`kind: "fact"`) and carry to *both*
|
|
166
|
-
niches.
|
|
167
|
-
|
|
168
|
-
## The singleton edge — refuse a second shopper
|
|
169
|
-
|
|
170
|
-
> **User:** "Can you make me a second shopper just for coffee?"
|
|
171
|
-
> **Shopper:** "You already have a shopper — it handles every niche. I've added
|
|
172
|
-
> espresso as a domain on it; I won't create a second shopper. Want me to refine
|
|
173
|
-
> the espresso domain instead?"
|
|
174
|
-
|
|
175
|
-
The engine's **singleton refusal** (`collision`, "a shopper already exists") — one
|
|
176
|
-
shopper, many domains; you never mint a second.
|
|
177
|
-
|
|
178
|
-
## Edge cases this example would have handled
|
|
179
|
-
|
|
180
|
-
- **Reuse before mint** — asking for "another road bike, this time for winter" reuses
|
|
181
|
-
the **existing `road-cycling` domain** (semantic dedup), never mints a near-duplicate
|
|
182
|
-
`cycling` / `bikes` pack.
|
|
183
|
-
- **Forget one domain ≠ decommission the shopper** — "forget espresso" runs
|
|
184
|
-
`sil_profile_remove { domainSlug: "espresso" }` (artefact-only; the shopper,
|
|
185
|
-
the shared user spec, and the road-cycling domain survive). Tearing down the whole
|
|
186
|
-
shopper is the separate host-CLI-first path.
|
|
187
|
-
- **No web tool**: the shopper says so honestly at mint time and composes the domain
|
|
188
|
-
spec from public buying knowledge — never pretends the research happened.
|
|
189
|
-
- **Creation is local + offline** (for identity): no sil registration to create; the
|
|
190
|
-
user registers later, on first shop, via `sil_register`.
|
|
1
|
+
---
|
|
2
|
+
name: multi-domain-shopper-walkthrough
|
|
3
|
+
description: A worked six-beat, multi-domain run — create one shopper (after an explicit endorsement), then shop two unrelated niches in one session, the second minted on the fly and announced, with a shared user_spec fact reused across both. Illustrative, not a spec.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Worked run — one shopper, two niches, six beats
|
|
7
|
+
|
|
8
|
+
A concrete end-to-end walkthrough of the six-beat loop across two unrelated
|
|
9
|
+
niches. It is illustrative — the authoritative rules live in the beat references.
|
|
10
|
+
|
|
11
|
+
## Create the shopper (once, after endorsement)
|
|
12
|
+
|
|
13
|
+
The two-touchpoint interview assembles a draft persona + a shared user-spec seed.
|
|
14
|
+
Only after the user **endorses** the assembled draft does the engine run
|
|
15
|
+
`openclaw agents add` and materialize the shared `user_spec.md`. Nothing is created
|
|
16
|
+
before that endorsement. The result is **one** shopper — a **singleton**.
|
|
17
|
+
|
|
18
|
+
The seeded shared spec already holds one durable fact: `- [hard] ships to Berlin;
|
|
19
|
+
allergic to wool` — a cross-niche fact, kept in `user_spec` because it stays true in
|
|
20
|
+
**every niche**.
|
|
21
|
+
|
|
22
|
+
## Niche A — ski gloves (all six beats)
|
|
23
|
+
|
|
24
|
+
1. **Classify** — the request "warm gloves for the slope" resolves to
|
|
25
|
+
`{ domain: ski, product: gloves, intent: slope }`. `sil_profile_search` finds no
|
|
26
|
+
ski domain yet → a MISS.
|
|
27
|
+
2. **Method** — research ski gear and **mint** the method via `sil_learn create`,
|
|
28
|
+
**announced** ("I read this as *ski gloves for the slope* — correct me if not").
|
|
29
|
+
3. **Fill** — precedence resolves waterproofing and cuff length from the method;
|
|
30
|
+
the wool allergy is **reused** from the **shared** `user_spec` **without
|
|
31
|
+
re-asking**. Only the budget is elicited — one question, tied to why.
|
|
32
|
+
4. **Search-space** — a bounded fan-out of ≤ 4 `sil_search` calls, core first.
|
|
33
|
+
5. **Reflect** — honesty pass, then a **hero + one alternative**, each with a why.
|
|
34
|
+
6. **Feedback** — the buyer reacts "I always run Hestra" → confirm, then persist a
|
|
35
|
+
durable per-domain taste to the method via **`sil_learn`**.
|
|
36
|
+
|
|
37
|
+
## Niche B — an espresso grinder (same session, minted on the fly)
|
|
38
|
+
|
|
39
|
+
In the **same session** the user pivots: "now I need a burr grinder." This is a
|
|
40
|
+
**second niche**, **unrelated** to ski gear. No agent switch — the one shopper
|
|
41
|
+
handles it:
|
|
42
|
+
|
|
43
|
+
1. **Classify** → `{ domain: espresso, product: grinder, intent: general }` (a
|
|
44
|
+
context-free request keys `general`).
|
|
45
|
+
2. **Method** — a MISS again → research + **mint on the fly**, **announced**.
|
|
46
|
+
3. **Fill** — the "ships to Berlin" fact is again **reused across** niches from the
|
|
47
|
+
**shared** `user_spec`, **kept from** the ski session — never re-asked. The
|
|
48
|
+
Hestra taste, being per-domain on the ski method, does **not** leak here.
|
|
49
|
+
|
|
50
|
+
The two niches coexist: shared facts flow to both; per-domain taste stays isolated.
|
|
51
|
+
|
|
52
|
+
## The singleton edge
|
|
53
|
+
|
|
54
|
+
If the user later says "set me up a second shopper," the engine refuses: **a
|
|
55
|
+
shopper already exists**. Steer them to shop a new niche (it mints a domain on the
|
|
56
|
+
spot) or refine the existing one with `sil_learn` — never a second shopper.
|
|
@@ -1,90 +1,140 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
name: agent-creation-engine
|
|
3
|
+
description: The ordered, one-command engine that persists the single sil-wired shopper after the user endorses the assembled draft. Load only after explicit endorsement in the interview.
|
|
4
|
+
---
|
|
2
5
|
|
|
3
|
-
|
|
6
|
+
# Create your sil-wired shopper — the agent-creation engine
|
|
4
7
|
|
|
5
|
-
|
|
8
|
+
**Precondition: run this ONLY after the user has explicitly endorsed the assembled draft
|
|
9
|
+
from [`brainstorm_interview.md`](brainstorm_interview.md).** The interview owns that gate.
|
|
6
10
|
|
|
7
|
-
|
|
11
|
+
This persists **one** valid OpenClaw agent — the user's **shopper**: a real agent under
|
|
12
|
+
the host `agents` config, sil plugin enabled, sil skill attached, its persona in the
|
|
13
|
+
workspace **`SOUL.md`**, plus the **shared user spec** in the sil data dir — so it shops
|
|
14
|
+
with **no further setup**. The shopper is a **singleton**: created once, then it learns
|
|
15
|
+
**domains** lazily on first shop, so a fresh shopper has an **empty `domains` map** —
|
|
16
|
+
healthy. Creation is **local and offline**: no token is read, no `sil_register` /
|
|
17
|
+
`sil_whoami`, no network call. The shopper registers the user later, on first shop.
|
|
8
18
|
|
|
9
19
|
## The one command
|
|
10
20
|
|
|
11
|
-
After the
|
|
21
|
+
After the endorsement, run exactly **one** shipped command — the package bin
|
|
22
|
+
**`sil-openclaw-create-shopper`** — and it runs the whole choreography **atomically** and
|
|
23
|
+
**fail-closed**, then returns one structured JSON result. You do **not** hand-run the
|
|
24
|
+
host-CLI steps; the bin runs them **for you, in order, as one transaction**. Feed it the
|
|
25
|
+
endorsed spec as one JSON object on **`stdin`** (or via **`--spec <path>`**):
|
|
12
26
|
|
|
13
27
|
```
|
|
14
28
|
sil-openclaw-create-shopper <<'JSON'
|
|
15
|
-
{ "agentId": "my-shopper", "name": "My Shopper",
|
|
16
|
-
"
|
|
29
|
+
{ "agentId": "my-shopper", "name": "My Shopper",
|
|
30
|
+
"workspace": "~/.openclaw/workspace-my-shopper",
|
|
31
|
+
"persona": "…the endorsed persona…", "userSpec": "…the seeded shared user spec…",
|
|
32
|
+
"channel": "telegram" }
|
|
17
33
|
JSON
|
|
18
34
|
```
|
|
19
35
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
36
|
+
The bin is **non-interactive**: it executes an **already-assembled, already-endorsed**
|
|
37
|
+
spec — it **never re-runs the interview** and never prompts. The sil **plugin** and sil
|
|
38
|
+
**skill** are always wired — that is what makes it *sil-wired*. It is a standalone
|
|
39
|
+
operator script, **not** the plugin process, so the plugin's "never write host config"
|
|
40
|
+
guarantee holds; the bin legitimately drives `openclaw …` on your behalf.
|
|
23
41
|
|
|
24
|
-
## The
|
|
25
|
-
|
|
26
|
-
The endorsed draft feeds two stores. The **persona** becomes the host workspace **`SOUL.md`** (its identity / voice / standing rules — via the host CLI, **not** a sil artefact). The **shared user spec** becomes the sil data-dir artefact:
|
|
42
|
+
## The spec (input)
|
|
27
43
|
|
|
28
44
|
| Field | Meaning | Goes to | Required? |
|
|
29
45
|
|---|---|---|---|
|
|
30
|
-
| **agentId** | Lower-kebab id
|
|
46
|
+
| **agentId** | Lower-kebab id → `agents.list[].id`. Unique, never `main`. | host | Required |
|
|
31
47
|
| **name** | Human-readable name ("My Shopper"). | sil manifest | Required |
|
|
32
|
-
| **persona** | Who
|
|
33
|
-
| **workspace** | The shopper's workspace directory
|
|
34
|
-
| **userSpec** | The user's **shared, cross-niche** facts + hard constraints
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
48
|
+
| **persona** | Who the shopper is / how it shops — a generalist, voice, standing rules. | host **`SOUL.md`** (no separate persona file) | Required |
|
|
49
|
+
| **workspace** | The shopper's workspace directory. | host | Required |
|
|
50
|
+
| **userSpec** | The user's **shared, cross-niche** facts + hard constraints. Seeded partial by the interview. | sil `user_spec.md` | **Required** |
|
|
51
|
+
| **channel** | The channel the setup conversation is on — bound to the new shopper. | host `openclaw.json` bindings | **Optional (fail-open)** |
|
|
52
|
+
|
|
53
|
+
There is **no per-niche input at create** — no method and no PRD; those are minted lazily
|
|
54
|
+
on first shop via `sil_learn create`. The shopper reaches the web to mint and refresh
|
|
55
|
+
domains, so the agent needs web/fetch tools (inherited from `agents.defaults`); if
|
|
56
|
+
defaults grant none, the bin reports `created` with a `warnings` entry naming the gap
|
|
57
|
+
(bare `sil_search` still works) — surface it.
|
|
58
|
+
|
|
59
|
+
## What the bin does atomically (in this exact order)
|
|
60
|
+
|
|
61
|
+
1. **Validate the spec FIRST** — `agentId` (present, lower-kebab, ≠ `main`), `name`,
|
|
62
|
+
`persona`, `workspace`, and the shared **`userSpec`** (present, non-blank — the only
|
|
63
|
+
sil artefact at create). No per-domain method or PRD to validate. Any failure stops with
|
|
64
|
+
**`invalid_request`** naming the field and **writes nothing**, ahead of every host
|
|
65
|
+
command.
|
|
66
|
+
2. **Singleton check.** Run `openclaw agents list --json` and read the sil store (whether a
|
|
67
|
+
shopper `user_spec.md` already exists) **before** the add. If a sil shopper already
|
|
68
|
+
exists, stop with **`collision`** — **"a shopper already exists"** — and do **not** run
|
|
69
|
+
`openclaw agents add`; steer to shop-a-new-niche (lazy mint) or refine — **never mint a
|
|
70
|
+
second shopper**. An `agentId` clashing with any existing agent is likewise
|
|
71
|
+
`collision`. An inconclusive read fails closed.
|
|
72
|
+
3. **Create the agent shell.** `openclaw agents add <agentId> --workspace <workspace>
|
|
73
|
+
--non-interactive --json` — the real `agents.list[]` entry + workspace bootstrap
|
|
74
|
+
(`SOUL.md`, `AGENTS.md`, …), inheriting model and tool profile from `agents.defaults`.
|
|
75
|
+
4. **Write the persona straight into the workspace `SOUL.md`** (host CLI). The persona is
|
|
76
|
+
the shopper's soul — the host's `SOUL.md`, not a sil artefact. There is **no separate
|
|
77
|
+
persona file** and **no copy** step.
|
|
78
|
+
5. **Materialize the shared user spec — SETUP-ONLY, NO `domain`.** Call
|
|
79
|
+
`sil_profile_materialize { name, userSpec }` (the singleton takes no `agentId`). It is
|
|
80
|
+
**setup-only**: it writes the shared **`user_spec.md`** into `$SIL_DATA_DIR/shopper/`,
|
|
81
|
+
atomically, with the shopper **name in its frontmatter** — there is **no manifest**, and
|
|
82
|
+
it mints **no method or PRD**. Those are minted lazily on first shop via
|
|
83
|
+
`sil_learn create`.
|
|
84
|
+
6. **Wire the sil skill + plugin** (host CLI). Asserted against the pinned host
|
|
85
|
+
**`alpine/openclaw:2026.6.9`**, both value-mode sets with `--strict-json` (the only set
|
|
86
|
+
mode this image accepts):
|
|
59
87
|
```
|
|
60
88
|
openclaw config set 'agents.list[<i>].skills' '["sil"]' --strict-json
|
|
61
89
|
openclaw config set plugins.entries.sil.enabled true --strict-json
|
|
62
90
|
```
|
|
63
|
-
The skill **attach** makes the agent
|
|
64
|
-
|
|
65
|
-
7. **
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
91
|
+
The skill **attach** makes the agent know how to drive the tools; the plugin **enable**
|
|
92
|
+
turns sil on — but does not un-filter the tools by itself (next step).
|
|
93
|
+
7. **Admit sil at the host allow surfaces.** Until sil is admitted at `plugins.allow` +
|
|
94
|
+
**`tools.alsoAllow`**, the host keeps the `sil_*` tools filtered. The value-mode `config
|
|
95
|
+
set` above is overwrite-only, so it cannot additively merge those shared arrays without
|
|
96
|
+
clobbering another admitted plugin (e.g. `klodi`). The bin runs the shipped admission
|
|
97
|
+
helper — the sibling bin `sil-openclaw-allowlist` (the `openclaw:allowlist` script) —
|
|
98
|
+
the additive, idempotent, self-validating three-surface merge. **If the helper exits
|
|
99
|
+
non-zero (a failed admission), the bin reports `persistence_failed` with the path +
|
|
100
|
+
cause and does NOT declare `created`** — never a green `created` over filtered tools.
|
|
101
|
+
8. **Bind the current channel — FAIL-OPEN.** Resolve the channel (`spec.channel`, else the
|
|
102
|
+
host's `OPENCLAW_MCP_MESSAGE_CHANNEL`) and, if one resolves, run `openclaw agents bind
|
|
103
|
+
--agent <agentId> --bind <channel> --json`, then **verify** the route stuck (read-back +
|
|
104
|
+
`openclaw config validate` still passes). If undetermined, owned by another agent (no
|
|
105
|
+
`--force`), or unverifiable, revert any partial route and degrade to a manual-bind hint
|
|
106
|
+
in `warnings` — this step **never fails creation**.
|
|
107
|
+
9. **Validate with the host's own check, THEN declare created.** `openclaw config validate
|
|
108
|
+
--json` returns `{ valid, path, issues? }` — success keys off **`.valid`**, never an
|
|
109
|
+
`ok` field. Only when `valid: true` **and** admission (step 7) succeeded does it report
|
|
110
|
+
**`created`**, carrying `boundChannel` (or `null`). Otherwise it reports
|
|
111
|
+
**`persistence_failed`** with the failing **path** + **cause**.
|
|
112
|
+
10. **On any failure after writes begin, tear down** — restore the pre-run `openclaw.json`
|
|
113
|
+
snapshot (reversing the agent entry + skill + plugin + admission + any channel
|
|
114
|
+
binding), remove the workspace dir (only if it created it) and the singleton shopper
|
|
115
|
+
dir (only if it did not pre-exist). `persistence_failed` truthfully means **nothing
|
|
116
|
+
partial** is left. In the rare case teardown cannot fully revert, the bin reports a
|
|
117
|
+
distinct, louder outcome that **names the residue** — never voiced as "nothing partial".
|
|
118
|
+
|
|
119
|
+
The bin emits **one** `{ status, … }` result and exits 0 **only** on `created`.
|
|
120
|
+
|
|
121
|
+
## Status taxonomy
|
|
74
122
|
|
|
75
123
|
| `status` | Meaning | What to do |
|
|
76
124
|
|---|---|---|
|
|
77
|
-
| `created` | Shopper added, shared user spec materialized,
|
|
78
|
-
| `invalid_request` | Spec failed validation
|
|
79
|
-
| `collision` | A shopper already exists (the singleton), or the `agentId` clashes. **Nothing written.** | Surface
|
|
80
|
-
| `persistence_failed` | A write, the allow-list
|
|
81
|
-
|
|
82
|
-
In the **rare** case teardown itself cannot fully revert (e.g. the agent was added but reverting it fails), the bin reports a **distinct, louder** outcome that **names the residue** — do **not** voice that as `persistence_failed`'s "nothing partial"; tell the user exactly what remains and where.
|
|
125
|
+
| `created` | Shopper added, shared user spec materialized, plugin + skill wired, `openclaw config validate` accepted it. Carries `name` + `agentId` + `workspace` + `boundChannel` (or `null`). | Tell the user it's ready; if `boundChannel` is `null`, relay the manual-bind hint. |
|
|
126
|
+
| `invalid_request` | Spec failed validation. **Nothing attempted.** | Name the field, fix it, run again. |
|
|
127
|
+
| `collision` | A shopper already exists (the singleton), or the `agentId` clashes. **Nothing written.** | Surface "a shopper already exists"; steer to shop-a-new-niche or refine. **Never a second shopper.** |
|
|
128
|
+
| `persistence_failed` | A write, the allow-list helper (non-zero exit), or `openclaw config validate` failed. Teardown ran — **nothing partial** left. | Fix the reported path/cause and re-run (safe). |
|
|
83
129
|
|
|
84
130
|
## Runtime — how the shopper loads its behaviour
|
|
85
131
|
|
|
86
|
-
When you (the sil skill) start a session as the shopper, the host has already injected the
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
132
|
+
When you (the sil skill) start a session as the shopper, the host has already injected the
|
|
133
|
+
persona via **`SOUL.md`**. Load the shared **`user_spec.md`** (cross-niche facts + hard
|
|
134
|
+
constraints, reused across every niche); its frontmatter carries the shopper **name**, and
|
|
135
|
+
`sil_profile_search` scans the domains it has learned — an empty set is healthy, and each
|
|
136
|
+
per-domain method loads **lazily at shop time**. Because the `sil_*` tools were admitted at
|
|
137
|
+
create, the shopper calls **`sil_search`** / **`sil_product_get`** (and `sil_register` /
|
|
138
|
+
`sil_whoami` as needed) with **no further setup**, minting each niche on the fly the first
|
|
139
|
+
time the user shops it, per [`shop_loop.md`](shop_loop.md). To sharpen the shopper or a
|
|
140
|
+
domain, see [`fill_and_feedback.md`](fill_and_feedback.md).
|