sil-openclaw 0.4.6 → 0.5.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 +171 -0
- package/README.md +33 -45
- package/dist/gateway/search-results.js +11 -7
- package/dist/index.js +24 -24
- package/dist/lib/allowlist-script.js +13 -0
- package/dist/lib/artifacts.js +30 -0
- package/dist/lib/credentials.js +2 -3
- package/dist/lib/host-wiring.js +44 -15
- package/dist/lib/pkce.js +3 -3
- package/dist/lib/search-results-log.js +23 -0
- package/dist/lib/search-results-store.js +4 -4
- package/dist/lib/shopping-call.js +143 -0
- package/dist/lib/sil-client.js +185 -1046
- package/dist/lib/tool-result.js +10 -3
- package/dist/tools/catalog.js +311 -1197
- package/dist/tools/doctor.js +25 -63
- package/dist/tools/identity.js +110 -245
- package/openclaw.plugin.json +14 -11
- package/package.json +7 -6
- package/schema/PROVENANCE.md +15 -0
- package/schema/shopping-brief-create-request.schema.json +98 -0
- package/schema/shopping-brief-create-response.schema.json +24 -0
- package/schema/shopping-brief-edit-request.schema.json +125 -0
- package/schema/shopping-brief-edit-response.schema.json +24 -0
- package/schema/shopping-brief-read-request.schema.json +15 -0
- package/schema/shopping-brief-read-response.schema.json +235 -0
- package/schema/shopping-domain-create-request.schema.json +160 -0
- package/schema/shopping-domain-create-response.schema.json +60 -0
- package/schema/shopping-domain-get-request.schema.json +18 -0
- package/schema/shopping-domain-get-response.schema.json +307 -0
- package/schema/shopping-domain-search-request.schema.json +18 -0
- package/schema/shopping-domain-search-response.schema.json +92 -0
- package/schema/shopping-offers-request.schema.json +31 -0
- package/schema/shopping-offers-response.schema.json +172 -0
- package/schema/shopping-product-get-request.schema.json +24 -0
- package/schema/shopping-product-get-response.schema.json +121 -0
- package/schema/shopping-profile-edit-request.schema.json +97 -0
- package/schema/shopping-profile-edit-response.schema.json +17 -0
- package/schema/shopping-search-request.schema.json +106 -0
- package/schema/shopping-search-response.schema.json +182 -0
- package/schema/shopping-seller-get-request.schema.json +24 -0
- package/schema/shopping-seller-get-response.schema.json +342 -0
- package/scripts/allowlist-openclaw.mjs +4 -5
- package/sil-shopping/SKILL.md +196 -97
- package/sil-shopping/references/mint.md +190 -0
- package/dist/lib/bind-channel.js +0 -10
- package/dist/lib/creation-entrypoint.js +0 -111
- package/dist/lib/derive-agent-id.js +0 -36
- package/dist/lib/profile-store.js +0 -568
- package/dist/tools/profile.js +0 -300
- package/scripts/create-shopper.mjs +0 -677
- package/sil-shopping/examples/multi_domain_shopper_walkthrough.md +0 -65
- package/sil-shopping/references/agent_creation_engine.md +0 -223
- package/sil-shopping/references/fill_and_feedback.md +0 -102
- package/sil-shopping/references/method_and_prds.md +0 -143
- package/sil-shopping/references/setup_onboarding.md +0 -64
- package/sil-shopping/references/shop_loop.md +0 -118
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: shop-loop
|
|
3
|
-
description: The six-beat Spec-Driven Shopping loop — the state machine the shopper runs on every niche. Owns Beat 1 (classify), Beat 4 (search-space) and Beat 5 (reflect); routes Beats 2, 3 and 6 to the references that own them. Load when shopping as the shopper.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# The six-beat Spec-Driven Shopping loop
|
|
7
|
-
|
|
8
|
-
As the shopper you run one loop on every request — a **six-beat** state machine.
|
|
9
|
-
Most of it is reasoning over what you already know; you ask the buyer only about
|
|
10
|
-
the genuine residue. The beats, **in order**:
|
|
11
|
-
|
|
12
|
-
1. **Classify** — resolve `{domain, product, intent}`, reuse a learned domain/PRD
|
|
13
|
-
before minting (owned here).
|
|
14
|
-
2. **Method load / mint / refresh** — recover or research the domain's method +
|
|
15
|
-
its intent-keyed PRDs — [`method_and_prds.md`](method_and_prds.md).
|
|
16
|
-
3. **Fill** — resolve the PRD by precedence, eliciting only the residue —
|
|
17
|
-
[`fill_and_feedback.md`](fill_and_feedback.md).
|
|
18
|
-
4. **Search-space** — project the filled PRD into a bounded fan-out (owned here).
|
|
19
|
-
5. **Reflect** — judge best-available against the PRD + method (owned here).
|
|
20
|
-
6. **Feedback** — capture what the reaction surfaced —
|
|
21
|
-
[`fill_and_feedback.md`](fill_and_feedback.md).
|
|
22
|
-
|
|
23
|
-
This file owns Beats 1, 4 and 5.
|
|
24
|
-
|
|
25
|
-
## Beat 1 — Classify: `{domain, product, intent}`, reuse before mint
|
|
26
|
-
|
|
27
|
-
Resolve the request through **three coordinates, top-down**:
|
|
28
|
-
|
|
29
|
-
- **domain** — the **broad product category** that owns the reusable buying guide.
|
|
30
|
-
Pick the **widest** slug whose method generalises across use-contexts: `earbuds`,
|
|
31
|
-
not `wireless-gym-earbuds`; `ski`, not `ski-touring`.
|
|
32
|
-
- **product** — the product type within the domain (`earbuds`, `boots`).
|
|
33
|
-
- **intent** — the **use-context** that reshapes the requirements (`gym`, `slope`).
|
|
34
|
-
|
|
35
|
-
**Never fold the use-context into the domain.** "Earbuds for the gym" is
|
|
36
|
-
`domain: earbuds, product: earbuds, intent: gym` — the gym-ness is the **intent**, so
|
|
37
|
-
next week's "earbuds for the office" reuses the same method and only mints a new PRD. A
|
|
38
|
-
`wireless-gym-earbuds` domain forks a near-duplicate buying guide per use and kills that
|
|
39
|
-
reuse. **Intent is always present**: a **context-free** request keys the `general`
|
|
40
|
-
intent (`ski/boots-general`), so every job carries all three coordinates and stays
|
|
41
|
-
uniformly queryable.
|
|
42
|
-
|
|
43
|
-
**Reuse-before-mint.** Query existing coordinates with **`sil_profile_search`**
|
|
44
|
-
(the frontmatter-as-truth discovery tool — never a filesystem guess) and
|
|
45
|
-
**semantic-match** the request: **prefer existing** when a learned domain/PRD
|
|
46
|
-
covers the job, mint only when nothing does. The one guard against over-merging is
|
|
47
|
-
the requirements-divergence test — two requests share a PRD only if they resolve
|
|
48
|
-
to the same requirements.
|
|
49
|
-
|
|
50
|
-
**Never over-ask just to key.** A silent request keys `general` and moves on —
|
|
51
|
-
keying forces no extra question. When intent is genuinely requirement-defining but
|
|
52
|
-
the request is silent, that surfaces as the first Beat-3 question, not a keying
|
|
53
|
-
interrogation.
|
|
54
|
-
|
|
55
|
-
**Announce a mint.** A new-domain or new-PRD mint is **announced** — state the
|
|
56
|
-
inferred `domain / product / intent` so the buyer can **correct** it, **never
|
|
57
|
-
silent**. A reuse passes through unannounced.
|
|
58
|
-
|
|
59
|
-
## Beat 4 — Search-space: a bounded, priority-ordered fan-out (not a re-rank)
|
|
60
|
-
|
|
61
|
-
The PRD's **`## Search specs`** block is the resolved predicate set — Beat 4 **projects
|
|
62
|
-
it, never re-derives it**. Send those `{ns, key, op, value, unit?, hard?}` predicates
|
|
63
|
-
**verbatim** as `sil_search`'s `filters.specs`; the only per-call work is choosing the
|
|
64
|
-
fan-out and lifting any attribute a **dedicated param** serves better.
|
|
65
|
-
|
|
66
|
-
Project the filled PRD onto **`sil_search`** as a **bounded ≤ 4 priority-ordered**
|
|
67
|
-
fan-out — not one search, not unbounded (the bound is a production budget: each call is
|
|
68
|
-
a round-trip + tokens):
|
|
69
|
-
|
|
70
|
-
- **Call 1 is the tightest projection** — the full `## Search specs` set. **Calls 2–4
|
|
71
|
-
are deliberate widenings**: relax the least load-bearing **soft** predicate, an
|
|
72
|
-
adjacent phrasing that lifts recall, or an explicit either/or branch. **Never relax a
|
|
73
|
-
`hard` predicate.** Core first, widenings after — the **priority order**.
|
|
74
|
-
- **Merge = dedup + concatenate in issue order — NOT a re-rank.** Concatenate the
|
|
75
|
-
per-call backend-ranked lists in issue order and **drop** any product already
|
|
76
|
-
**seen** earlier. Because issue order *is* priority order, this **never re-ranks** —
|
|
77
|
-
the engine owns order *within* a call, the fan-out *across* calls.
|
|
78
|
-
- **Prefer a dedicated param over a predicate** for the SAME attribute — a `price_max`
|
|
79
|
-
param OR a price spec, never both; likewise `category`, `condition`, `available`,
|
|
80
|
-
`local_merchants`. A purely descriptive residue (a colour, a phrasing) folds into the
|
|
81
|
-
free-text `query`, which **you author** — the plugin is **pure transport** and never
|
|
82
|
-
folds a predicate into `query`. Leave **`ship_to`** empty (the server resolves the
|
|
83
|
-
registered default); **never invent** a param or predicate that isn't real. Then read
|
|
84
|
-
the per-predicate **`specs_status`** the response returns (each `{ns, key, applied}`) —
|
|
85
|
-
it feeds Beat 5's honesty pass, which rejects at pick any `hard` predicate the backend
|
|
86
|
-
left `applied:false`.
|
|
87
|
-
|
|
88
|
-
## Beat 5 — Reflect: honesty pass first, judgment not threshold, propose-and-wait
|
|
89
|
-
|
|
90
|
-
Take Beat 4's merged issue-order list and its per-call `specs_status`. Run
|
|
91
|
-
**honesty pass → judge → branch**, and **never re-rank**: the engine owns order,
|
|
92
|
-
you own the verdict.
|
|
93
|
-
|
|
94
|
-
**1 — Honesty pass, first.** Before judging fitness, walk the survivors and
|
|
95
|
-
**reject-at-pick** any candidate that violates a *hard* constraint the backend
|
|
96
|
-
could not enforce — exactly the predicates the response marked **`applied:false`**,
|
|
97
|
-
plus the `user_spec` `[hard]` markers. A violator leaves contention, never becomes
|
|
98
|
-
the pick; if rejection empties the set, take the empty path.
|
|
99
|
-
|
|
100
|
-
**2 — Judge, then branch.** Weigh the best surviving candidate against the PRD +
|
|
101
|
-
method. Satisfies-or-falls-short is a **judgment**, **not a threshold** and not a
|
|
102
|
-
mechanical any-unmet-requirement rule — read the whole set.
|
|
103
|
-
|
|
104
|
-
- **Satisfies → a hero + 1–2 justified alternatives.** Lead with **one**
|
|
105
|
-
recommendation carrying the SDS-bar *why* (a met requirement, a researched method
|
|
106
|
-
mechanic, a stored preference reused without re-asking), then **one or two**
|
|
107
|
-
considered **alternatives**, each with a one-line reason. Best-first **as
|
|
108
|
-
returned** — **never re-rank**, never a bare list.
|
|
109
|
-
- **Shortfall or empty → propose a specific relaxation and wait.** Name the gap,
|
|
110
|
-
show the closest survivors, **propose** the specific change that would widen it,
|
|
111
|
-
then **wait** for the buyer's nod. **No silent re-search**, no silent auto-widen;
|
|
112
|
-
the buyer can redirect instead.
|
|
113
|
-
|
|
114
|
-
A **non-`ok`** status is not an empty match — do not relax params; follow that
|
|
115
|
-
tool's own **`recovery`** exactly.
|
|
116
|
-
|
|
117
|
-
**Then Beat 6.** The buyer's reaction is what Beat 6 captures —
|
|
118
|
-
[`fill_and_feedback.md`](fill_and_feedback.md).
|