sil-openclaw 0.2.3 → 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/CHANGELOG.md +128 -0
- package/README.md +68 -4
- package/dist/index.js +2 -0
- package/dist/lib/poller.js +9 -3
- package/dist/lib/profile-store.js +426 -0
- package/dist/tools/identity.js +201 -23
- package/dist/tools/profile.js +283 -0
- package/openclaw.plugin.json +7 -3
- package/package.json +1 -1
- package/skill/SKILL.md +29 -36
- package/skill/examples/road_cycling_expert_walkthrough.md +106 -0
- package/skill/references/agent_creation_engine.md +65 -0
- package/skill/references/brainstorm_interview.md +68 -0
- package/skill/references/catalog_tools_reference.md +46 -0
- package/skill/references/expert_shopping.md +112 -0
- package/skill/references/manage_experts.md +100 -0
- package/skill/references/refine_expert.md +41 -0
- package/skill/references/search_param_mapping.md +35 -0
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,134 @@ release (`clawhub package publish --changelog`). See [README](./README.md#releas
|
|
|
10
10
|
|
|
11
11
|
## [Unreleased]
|
|
12
12
|
|
|
13
|
+
## [0.3.0] - 2026-06-23
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- **Create a tailored, sil-wired shopping expert — a real OpenClaw agent that
|
|
18
|
+
shops its niche with no further setup.** A new agent-creation engine (the `sil`
|
|
19
|
+
skill drives the host's own `openclaw` CLI — the plugin never writes the host
|
|
20
|
+
config) materializes a dedicated shopping expert: a real `agents.list[]` entry
|
|
21
|
+
with the **sil plugin enabled and the sil skill attached**, the persona injected
|
|
22
|
+
as the agent's `SOUL.md` system framing, and the behaviour artefacts written by
|
|
23
|
+
the new **`sil_profile_materialize`** tool into `$SIL_DATA_DIR/agents/<agentId>/`
|
|
24
|
+
(`persona.md`, an optional `playbook.md` domain sub-skill, and a `profile.json`
|
|
25
|
+
manifest the skill reads at runtime). The engine is validate-first and
|
|
26
|
+
fail-closed: it checks the spec before any write (`invalid_request` — nothing
|
|
27
|
+
written), refuses to clobber an existing agent (`collision` — never overwrites a
|
|
28
|
+
persona or its wiring), and declares `created` only after the host's **own**
|
|
29
|
+
`openclaw config validate` returns `valid: true` (any failed step is
|
|
30
|
+
`persistence_failed` carrying the path + cause, nothing partial left behind).
|
|
31
|
+
Creating an expert is **local and offline** — no registration, no token read,
|
|
32
|
+
no network call; the expert registers the user later, on first shop. Host-CLI
|
|
33
|
+
shapes are pinned to **`alpine/openclaw:2026.6.9`** (the sil-stage host). (#27,
|
|
34
|
+
#30)
|
|
35
|
+
- **The `sil` skill now runs a brainstorm interview before creating a shopping
|
|
36
|
+
expert.** An open, back-and-forth interview converges five sections *with* the
|
|
37
|
+
user — domain framing, persona, elicitation style, answer→`sil_search`-param
|
|
38
|
+
mapping, and recommendation rubric — eliciting BOTH the domain's
|
|
39
|
+
decision-attributes AND the user's own tastes/budget/constraints, then
|
|
40
|
+
assembles a tailored spec the agent-creation engine materializes via
|
|
41
|
+
`sil_profile_materialize`. Nothing is created until the user explicitly
|
|
42
|
+
endorses the assembled draft (abandon-mid-flow leaves nothing written, no
|
|
43
|
+
teardown); a vague domain is narrowed with the user first; a name collision
|
|
44
|
+
offers refine-or-rename and never clobbers. The mapping targets only real
|
|
45
|
+
`sil_search` params (budget → `price_min`/`price_max` in minor units, "prefer
|
|
46
|
+
secondhand" → `condition`, niche → `query`/`category`) and leaves `ship_to`
|
|
47
|
+
empty so sil resolves the registered default server-side.
|
|
48
|
+
- **A created expert shops its niche like a trusted specialist, not a generic
|
|
49
|
+
clerk.** When a session opens inside a created expert, the skill loads its
|
|
50
|
+
`profile.json` → `persona.md` + `playbook.md` and runs a profile-driven
|
|
51
|
+
shop-time loop: elicit **only the missing** load-bearing attributes in the
|
|
52
|
+
playbook's priority order (never a fixed question battery, never re-asking what
|
|
53
|
+
the user already stated), map answers to real `sil_search` params (`ship_to`
|
|
54
|
+
left empty so the server resolves the registered default; a taste with no
|
|
55
|
+
matching param folds into `query`/the rubric, never an invented filter), search,
|
|
56
|
+
then reason over the candidates with the playbook's rubric and the persona's
|
|
57
|
+
hard-rules / hard-no's — presenting results **best-first as `sil_search`
|
|
58
|
+
returned them (never re-ranked)** and always with the domain "why". An
|
|
59
|
+
empty-but-servable result relaxes a constraint and explains the change; a
|
|
60
|
+
genuinely unservable domain gets an honest "no", never padded with junk; a
|
|
61
|
+
non-`ok` status follows the tool's own `recovery`, never the empty-match path.
|
|
62
|
+
Consumes the catalog tools **unchanged** — no new tool; the rubric is applied at
|
|
63
|
+
reasoning time. (#31)
|
|
64
|
+
- **Local expert lifecycle — list, view, and remove the shopping experts you
|
|
65
|
+
create.** Three new tools manage the artefact store the create-engine writes
|
|
66
|
+
(`$SIL_DATA_DIR/agents/<id>/`): `sil_profile_list` enumerates your experts
|
|
67
|
+
most-recently-created first (sourced from each `profile.json` manifest — the
|
|
68
|
+
authoritative "is a sil expert" signal — with one corrupt manifest isolated
|
|
69
|
+
in `unreadable[]`, never aborting the listing); `sil_profile_get` returns one
|
|
70
|
+
expert's full detail (name, persona, optional playbook, manifest path,
|
|
71
|
+
createdAt); and `sil_profile_remove` deletes exactly one validated expert's
|
|
72
|
+
behaviour-artefact directory. All three make no network call and read no
|
|
73
|
+
token — generic profile-less shopping is unchanged. Removal is the **artefact
|
|
74
|
+
half only**: the host-wiring half (`openclaw agents remove`) is host-CLI
|
|
75
|
+
driven and runs **first** (a failed artefact step then leaves only harmless,
|
|
76
|
+
list-surfaced disk cruft — never a broken-but-loading expert), and the skill
|
|
77
|
+
**confirms before removing**. `sil_profile_remove` is fail-closed and scoped:
|
|
78
|
+
a malformed/traversal/`main` id is rejected (`invalid_request`) and deletes
|
|
79
|
+
nothing, an absent id is `not_found` (idempotent — safe to re-run), and a
|
|
80
|
+
genuine filesystem failure is `persistence_failed` with the path + cause —
|
|
81
|
+
never a thrown error across the tool boundary. The list/view/remove flow lives
|
|
82
|
+
in its own progressive-disclosure reference, `references/manage_experts.md`,
|
|
83
|
+
which the router routes the manage intents to.
|
|
84
|
+
- **Refine an existing expert from what it observed in real sessions
|
|
85
|
+
(self-reinforcement).** A targeted-amend loop sharpens a *named* expert without
|
|
86
|
+
re-brainstorming it from scratch: load it with **`sil_profile_get`**, propose
|
|
87
|
+
concrete refinements **grounded in observed evidence** from the just-run
|
|
88
|
+
shopping session (a mapping that surfaced irrelevant items, a constraint the
|
|
89
|
+
user volunteered but the playbook never captured, a candidate they rejected —
|
|
90
|
+
never a generic, ungrounded "improvement"), let the user **confirm a subset**
|
|
91
|
+
(per-proposal accept/reject — never inferred from silence or an off-topic
|
|
92
|
+
answer), and persist **only** the confirmed subset by re-running
|
|
93
|
+
**`sil_profile_materialize`** over that one `agentId`. The re-write is per-file
|
|
94
|
+
atomic and dir-preserving — a failed persist leaves the prior expert intact and
|
|
95
|
+
never serves a half-refined one (a torn manifest reads back as not-found,
|
|
96
|
+
fail-closed). The improvement is **per-user and local** (written only to this
|
|
97
|
+
user's `$SIL_DATA_DIR` — no server endpoint, no shared or cross-user signal, no
|
|
98
|
+
identity round-trip) and **isolated** (touches only the named
|
|
99
|
+
`agents/<agentId>/`; sibling experts and generic profile-less shopping are
|
|
100
|
+
untouched). Adds **no new tool** — it composes the existing `sil_profile_get` +
|
|
101
|
+
`sil_profile_materialize`; when no observed session is available it falls back
|
|
102
|
+
to a guided amend and never fabricates observations. (#32)
|
|
103
|
+
|
|
104
|
+
### Changed
|
|
105
|
+
|
|
106
|
+
- **Restructured the bundled `sil` skill to progressive disclosure
|
|
107
|
+
(skill-creator convention).** `skill/SKILL.md` is now a maximally-lean pure
|
|
108
|
+
router: frontmatter, a one-paragraph role, the three always-on behavioural
|
|
109
|
+
principles, a brief session-start note, and an intent→tool→reference routing
|
|
110
|
+
table — nothing more. The detailed procedures moved into self-contained
|
|
111
|
+
references loaded on demand: `references/catalog_tools_reference.md` (the four
|
|
112
|
+
core tools' per-tool behaviour + the shared status taxonomy),
|
|
113
|
+
`references/brainstorm_interview.md` (the interview),
|
|
114
|
+
`references/agent_creation_engine.md` (the ordered creation engine),
|
|
115
|
+
`references/search_param_mapping.md` (the answer→`sil_search`-param mapping),
|
|
116
|
+
and `references/manage_experts.md` (the list/view/remove flow), with a worked
|
|
117
|
+
end-to-end walkthrough under `examples/road_cycling_expert_walkthrough.md`.
|
|
118
|
+
The endorsement-before-engine gate now lives as the router's two-step trigger
|
|
119
|
+
(interview first; engine only after explicit endorsement). The
|
|
120
|
+
contributor-facing "adding a tool" prose — duplicated from the repo
|
|
121
|
+
`CLAUDE.md` and never needed at runtime — was removed from the skill entirely.
|
|
122
|
+
No detail is duplicated between the router and any reference.
|
|
123
|
+
|
|
124
|
+
## [0.2.4] - 2026-06-18
|
|
125
|
+
|
|
126
|
+
### Fixed
|
|
127
|
+
|
|
128
|
+
- **`sil_register` now steers users into their device's default browser before the
|
|
129
|
+
Auth0 leg, so registration completes first-try from in-app/embedded webviews.** An
|
|
130
|
+
auth link opened in an app's built-in webview dead-ends — Auth0 can't set its
|
|
131
|
+
session cookie in a partitioned webview, so login bounces with `?error=`. The
|
|
132
|
+
`awaiting_browser` return now carries an explicit instruction, in both the
|
|
133
|
+
human-facing `message` and the agent-facing `instructions`, to open the link in the
|
|
134
|
+
**default browser (Safari, Chrome, …), not this app's built-in browser** — before
|
|
135
|
+
the link is ever opened, steering a webview user out ahead of the Auth0 leg. The
|
|
136
|
+
`auth_url` value is byte-for-byte unchanged and the link stays atomically
|
|
137
|
+
angle-bracket-wrapped on its own line (the #24 invariants hold); no new tool and no
|
|
138
|
+
webview detection (the host exposes no surface signal, so the steer ships
|
|
139
|
+
unconditionally). (#25)
|
|
140
|
+
|
|
13
141
|
## [0.2.3] - 2026-06-16
|
|
14
142
|
|
|
15
143
|
### Added
|
package/README.md
CHANGED
|
@@ -58,7 +58,7 @@ The agent loads the bundled skill on first commerce intent and takes it from the
|
|
|
58
58
|
|
|
59
59
|
sil is a [UCP](https://github.com/universal-commerce-protocol/ucp) (Universal Commerce Protocol) commerce service, and `sil-openclaw` wires it into your OpenClaw agent — so it can find products, compare prices and availability, pull up full detail, and surface a checkout link the moment you say *buy*. Powered by [4GPTs](https://4gpts.com).
|
|
60
60
|
|
|
61
|
-
Today the plugin covers **identity and
|
|
61
|
+
Today the plugin covers **identity, catalog, and dedicated shopping experts** — registration, catalog search and product lookup, plus a one-conversation flow that mints a new OpenClaw agent pre-wired to shop a single niche for you. The rest of the UCP journey (cart, checkout, order, fulfillment) lands as those domains ship, and the same plugin grows with them.
|
|
62
62
|
|
|
63
63
|
---
|
|
64
64
|
|
|
@@ -94,6 +94,60 @@ agent done — here's your checkout link, ready to pay:
|
|
|
94
94
|
|
|
95
95
|
---
|
|
96
96
|
|
|
97
|
+
## Turn your OpenClaw into a shopping expert
|
|
98
|
+
|
|
99
|
+
So far your *general* agent did the shopping. Go one step further: mint a **dedicated** OpenClaw agent that shops a single niche like a specialist — its taste, budget, and hard rules baked in once, then reused on every visit.
|
|
100
|
+
|
|
101
|
+
**TL;DR** — say *"make me a shopping expert for road-cycling gear"* and the plugin **interviews you** (the niche, your taste, your budget, the rules it must never break), then creates a real OpenClaw agent wired to sil with that persona and playbook. Open it later and it already knows your niche: it asks only what's still missing, searches sil with your constraints pre-set, and ranks results your way. **Nothing is created until you say "create it"** — and building one is local and offline, no sign-in required.
|
|
102
|
+
|
|
103
|
+
**1 — One conversation builds the expert:**
|
|
104
|
+
|
|
105
|
+
```text
|
|
106
|
+
you make me a shopping expert for road-cycling gear
|
|
107
|
+
|
|
108
|
+
agent Love it — let's shape it together. Components and apparel,
|
|
109
|
+
or complete bikes too?
|
|
110
|
+
|
|
111
|
+
you components and apparel, I've got the frame. ~€1200 budget,
|
|
112
|
+
secondhand is fine, and I'm in France
|
|
113
|
+
|
|
114
|
+
agent Here's the expert I'll build:
|
|
115
|
+
|
|
116
|
+
Road-Cycling Buyer — a concise components advisor
|
|
117
|
+
· always flags groupset compatibility · never carbon bars
|
|
118
|
+
· searches secondhand to ~€1200, French shops first
|
|
119
|
+
· ranks compatibility → value → weight
|
|
120
|
+
|
|
121
|
+
shall I create it?
|
|
122
|
+
|
|
123
|
+
you yes, create it
|
|
124
|
+
|
|
125
|
+
agent done — "Road-Cycling Buyer" is live. Open it anytime;
|
|
126
|
+
it shops your niche with no further setup.
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
**2 — The expert shops like a specialist, not a clerk:**
|
|
130
|
+
|
|
131
|
+
```text
|
|
132
|
+
you (inside Road-Cycling Buyer) I need new wheels
|
|
133
|
+
|
|
134
|
+
agent what groupset are you running? — so I only show compatible builds
|
|
135
|
+
|
|
136
|
+
you Shimano 105
|
|
137
|
+
|
|
138
|
+
agent searched sil — secondhand, France-first, 105-compatible:
|
|
139
|
+
|
|
140
|
+
1. Fulcrum Racing 4 (used) €420 Shimano HG ✓ · 1560 g
|
|
141
|
+
2. DT Swiss P1800 (used) €505 Shimano HG ✓ · 1700 g
|
|
142
|
+
|
|
143
|
+
ranked compatibility → value → weight, the way you set it up.
|
|
144
|
+
want detail or a checkout link on either?
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
> **You teach it once; it stays an expert.** List the experts you've made, look at how one is set up, retire one you're done with — or **refine** one from what it watched you reject, so it gets sharper every session.
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
97
151
|
## Identity & authentication
|
|
98
152
|
|
|
99
153
|
**sil gives your agent an identity — and the capability to use it.** One browser sign-in links your OpenClaw agent to a sil identity it holds on your behalf — your name, your saved addresses. That identity is what lets the agent *transact*: it can search, compare, and surface checkout links with any merchant that speaks [UCP](https://github.com/universal-commerce-protocol/ucp) (the Universal Commerce Protocol), all under your account, without you ever touching a store login.
|
|
@@ -120,13 +174,23 @@ Namespaced `sil_*` so they never collide with other plugins. Your agent calls th
|
|
|
120
174
|
| `sil_search` | Search for purchasable products. A free-text `query` plus optional filters: `category`, `price_min`/`price_max`, `ship_to` (delivery destination — leave empty to ship to your registered address), `condition` (`new` / `secondhand`), `available`, and `local_merchants` (best-effort bias toward shops in the user's own country). Results are **localized** to the shopper — issue the `query` in their own language for the best local results (e.g. search in French for French stores). Returns a ranked list of variants — each with `id`, `title`, `price`, `availability`, `checkout_url`, `source`, plus (where the source provides them) evaluate-before-buy detail: a product/variant `url` to view, a `description`, `media`, the product `options`, and the `seller`'s **shipping & return policy links** — and a pagination `cursor`. Location filters take ISO codes (`US`, `CA`), not place names. |
|
|
121
175
|
| `sil_product_get` | Resolve `ids` you already hold to full products in UCP shape — `description`, `options`, `media`, the `seller`'s shipping & return policy links, and the featured purchasable variant with fresh `price`, `availability`, `url` (the page to view), and `checkout_url` (the link that buys). Re-fetch right before buying; those values are point-in-time, not guarantees. Ids that no longer resolve come back in `not_found`. |
|
|
122
176
|
|
|
177
|
+
**Experts** — create and manage dedicated shopping agents
|
|
178
|
+
|
|
179
|
+
| Tool | What it does |
|
|
180
|
+
|---|---|
|
|
181
|
+
| `sil_profile_materialize` | Persist a created expert's behaviour artefacts — `persona.md`, an optional `playbook.md` domain sub-skill, and a `profile.json` manifest — under `$SIL_DATA_DIR/agents/<id>/`. Driven by the skill's creation engine once you endorse the draft; validate-first and fail-closed, it never clobbers an existing expert. |
|
|
182
|
+
| `sil_profile_list` | List the experts you've created, most-recently-made first. Takes no arguments. |
|
|
183
|
+
| `sil_profile_get` | Show one expert in full — `name`, `persona`, optional `playbook`, manifest path, and `createdAt`. |
|
|
184
|
+
| `sil_profile_remove` | Delete one expert's behaviour artefacts. Scoped and idempotent; the agent confirms with you before removing. |
|
|
185
|
+
|
|
123
186
|
---
|
|
124
187
|
|
|
125
188
|
## Skills
|
|
126
189
|
|
|
127
|
-
The plugin ships one bundled skill — **`sil`** 🛒 — that your agent loads automatically the first time you express a shopping intent. You don't invoke it; it's the playbook that makes the
|
|
190
|
+
The plugin ships one bundled skill — **`sil`** 🛒 — that your agent loads automatically the first time you express a shopping intent. You don't invoke it; it's the playbook that makes the tools work well together:
|
|
128
191
|
|
|
129
|
-
- **Routes intent to the right tool.** *"find me a keyboard"* → `sil_search`, *"look these up"* → `sil_product_get`, *"who am I?"* → `sil_whoami`, *"sign me up"* → `sil_register
|
|
192
|
+
- **Routes intent to the right tool.** *"find me a keyboard"* → `sil_search`, *"look these up"* → `sil_product_get`, *"who am I?"* → `sil_whoami`, *"sign me up"* → `sil_register`, *"make me an expert for X"* → the create flow, *"list / show / remove my experts"* → the `sil_profile_*` tools.
|
|
193
|
+
- **Interviews before it builds.** Asked for a shopping expert, it runs an open interview to shape the niche, persona, and rules *with* you — and creates nothing until you explicitly endorse the assembled draft.
|
|
130
194
|
- **Recovers the right way.** Every tool reports a status; the skill follows that tool's own recovery hint — re-register, fix the query, or retry — instead of guessing a fix that won't work.
|
|
131
195
|
- **Keeps prices honest.** It treats price, availability, and checkout links as point-in-time and re-checks an item right before you buy, so the link you get is the link you pay.
|
|
132
196
|
|
|
@@ -149,7 +213,7 @@ pnpm test # vitest (unit + integration)
|
|
|
149
213
|
pnpm typecheck # tsc --noEmit
|
|
150
214
|
```
|
|
151
215
|
|
|
152
|
-
Releasing is two steps: `pnpm version <patch|minor|major>` (bump → sync manifest → cut changelog → test → tag → push), then `pnpm release` (build → pack → npm `sil-openclaw` + ClawHub `@4gpts/sil` — the same contents, re-packed under each registry's name).
|
|
216
|
+
Releasing is two steps: `pnpm version <patch|minor|major>` (bump → sync manifest → cut changelog → test → tag → push), then `pnpm release` (build → pack → npm `sil-openclaw` + ClawHub `@4gpts/sil` — the same contents, re-packed under each registry's name). Release notes in [`CHANGELOG.md`](https://github.com/Context4GPTs/sil-openclaw/blob/main/CHANGELOG.md). Adding a tool is three steps, enforced by a drift-guard test.
|
|
153
217
|
|
|
154
218
|
---
|
|
155
219
|
|
package/dist/index.js
CHANGED
|
@@ -23,6 +23,7 @@ import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
|
|
|
23
23
|
import { applyPluginConfigOverrides, getWebUrl, getWebUrlSource, getApiUrl, getApiUrlSource, } from "./lib/config.js";
|
|
24
24
|
import { registerCatalogTools } from "./tools/catalog.js";
|
|
25
25
|
import { registerIdentityTools } from "./tools/identity.js";
|
|
26
|
+
import { registerProfileTools } from "./tools/profile.js";
|
|
26
27
|
export default definePluginEntry({
|
|
27
28
|
id: "sil",
|
|
28
29
|
name: "sil",
|
|
@@ -32,6 +33,7 @@ export default definePluginEntry({
|
|
|
32
33
|
applyPluginConfigOverrides(api.pluginConfig);
|
|
33
34
|
registerIdentityTools(api);
|
|
34
35
|
registerCatalogTools(api);
|
|
36
|
+
registerProfileTools(api);
|
|
35
37
|
api.logger.info("sil_plugin_loaded", {
|
|
36
38
|
message: "sil plugin registered.",
|
|
37
39
|
api_url: getWebUrl(),
|
package/dist/lib/poller.js
CHANGED
|
@@ -69,9 +69,15 @@ export function startPoll(opts) {
|
|
|
69
69
|
result = await opts.poll();
|
|
70
70
|
}
|
|
71
71
|
catch {
|
|
72
|
-
// A throw from the injected step is treated as non-terminal
|
|
73
|
-
//
|
|
74
|
-
//
|
|
72
|
+
// A throw from the injected step is treated as non-terminal — the next
|
|
73
|
+
// tick (within budget) retries. This is correct ONLY for the claim call:
|
|
74
|
+
// the sil-client wrapper already maps network errors to a `retryable`
|
|
75
|
+
// result, so a genuine throw here is a rare transient. A TERMINAL failure
|
|
76
|
+
// that must NOT be retried (e.g. the token-persist failure) is never a
|
|
77
|
+
// throw that reaches this catch — `claimStep` classifies it and RETURNS a
|
|
78
|
+
// `{ done: true, outcome: "persist_failed", error }` terminal, so the
|
|
79
|
+
// poller stays generic over `done` and the terminal settles like any
|
|
80
|
+
// other. Do not move classification of a throw into this catch.
|
|
75
81
|
result = { done: false };
|
|
76
82
|
}
|
|
77
83
|
finally {
|