sil-openclaw 0.4.4 → 0.4.6

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 CHANGED
@@ -10,6 +10,46 @@ release (`clawhub package publish --changelog`). See [README](./README.md#releas
10
10
 
11
11
  ## [Unreleased]
12
12
 
13
+ ## [0.4.6] - 2026-07-24
14
+
15
+ ### Fixed
16
+
17
+ - **`sil.search_results` now exists on a stock gateway.** `activation` gains
18
+ `onStartup: true` (alongside the existing `onCapabilities: ["tool"]`, the
19
+ posture bundled extensions already ship). 0.4.5 registered the method into the
20
+ gateway's request-local *tool-discovery* registry, which the host deliberately
21
+ never installs as active — so dispatch, which resolves from the active
22
+ registry, answered `unknown method` for every paired client, and Studio
23
+ rendered the degraded notice instead of product cards. Loading at gateway
24
+ startup puts the registration in the registry dispatch actually reads, and the
25
+ agent tool path then prefers that same registry — one module instance, so the
26
+ page `sil_search` stores is the page the method hands back.
27
+
28
+ ## [0.4.5] - 2026-07-23
29
+
30
+ ### Added
31
+
32
+ - **`sil.search_results` — pull a `sil_search` page over the paired gateway WS.**
33
+ A plugin-owned gateway method (scope `operator.read`, enforced by the host
34
+ before the handler runs) that answers `{ callId }` with the exact page that
35
+ call produced. The `callId` is the host's own — the same string a client
36
+ already reads off the tool frames — so the two sides join with no translation
37
+ table. It never reaches the model, starts no run, and re-queries nothing.
38
+ Unknown, expired, and foreign references all get one identical `not_found`
39
+ body; the cause is an operator-log marker only.
40
+ - **A bounded in-memory buffer behind it** (32 pages, 15-minute retention, lazy
41
+ eviction on write, no timer, never on disk) that `sil_search` writes its `ok`
42
+ page into as a pure side effect.
43
+
44
+ ### Changed
45
+
46
+ - **`sil_search`'s result is untouched** — no new key, no reference, no flag.
47
+ Every channel gets byte-identically what it got before.
48
+ - **Host floor raised to `>=2026.7.1`** (`compat.pluginApi`,
49
+ `compat.minGatewayVersion`, `install.minHostVersion`): the version
50
+ `registerGatewayMethod` is proven on. An older host is refused outright rather
51
+ than limped along on a compat shim.
52
+
13
53
  ## [0.4.4] - 2026-07-17
14
54
 
15
55
  ### Security
@@ -0,0 +1,95 @@
1
+ /**
2
+ * `sil.search_results` — the plugin-owned gateway method a paired client calls
3
+ * to pull a `sil_search` page by the `callId` it already saw on the tool
4
+ * identity frames.
5
+ *
6
+ * NOT a tool, which is why it lives outside `src/tools/`: it never reaches the
7
+ * model, starts no run, and has no agent-facing surface. It is also not
8
+ * manifest-declarable — the host's `contracts` vocabulary is a closed set with
9
+ * no gateway-method key, so REGISTRATION IS THE DECLARATION.
10
+ *
11
+ * Two layers of authorization, each owned where it belongs. The HOST enforces
12
+ * role + `operator.read` before this handler runs (from the `{scope}` opt), so
13
+ * the plugin implements no scope logic and offers no bypass. The PLUGIN
14
+ * enforces the one thing the host cannot know: that the page belongs to the sil
15
+ * ACCOUNT that produced it, not to the machine or the socket. That is the only
16
+ * gate that matters here — the key is the host's `callId`, visible to anyone who
17
+ * can see the frames, so knowing one is never evidence of entitlement.
18
+ *
19
+ * Every outcome rides `respond(true, <structured body>)`; `ok:false` is used for
20
+ * nothing. A client reads a method-level ERROR as a transport fault worth
21
+ * retrying, and an unknown, expired, or foreign reference is not retryable —
22
+ * retrying it forever would leave the shopper's item spinning. So the failure is
23
+ * a successful response carrying a structured non-`ok` body, exactly as every
24
+ * sil tool already carries `status:"not_registered"` inside a successful result.
25
+ *
26
+ * The four failure causes are ONE body on the wire. A caller must not be able to
27
+ * tell "never existed" from "expired" from "not yours" — the distinction is a
28
+ * log marker, and nothing on the wire has a field, shape, or timing tell.
29
+ */
30
+ import { hasTokens, readConfig } from "../lib/credentials.js";
31
+ import { getSearchResult, searchResultMiss } from "../lib/search-results-store.js";
32
+ export const SEARCH_RESULTS_METHOD = "sil.search_results";
33
+ /** The ONE failure body: unknown ≡ expired ≡ wrong-principal ≡ no live session.
34
+ * A client must be able to tell this apart from a genuine empty match (which is
35
+ * `{status:"ok", products:[]}`), or it renders a silent empty grid for what is
36
+ * actually a delivery failure. */
37
+ const NOT_FOUND = {
38
+ status: "not_found",
39
+ error: "result_unavailable",
40
+ message: "No search results are available for this call. They may never have been"
41
+ + " stored, or the retention window has elapsed — run the search again.",
42
+ };
43
+ const INVALID_REQUEST = {
44
+ status: "invalid_request",
45
+ error: "invalid_call_id",
46
+ message: "sil.search_results requires a non-empty string `callId`.",
47
+ };
48
+ export function registerSearchResultsMethod(api) {
49
+ api.registerGatewayMethod(SEARCH_RESULTS_METHOD, ({ params, respond }) => {
50
+ // A throw out of here is an opaque gateway error the client reads as a
51
+ // retryable transport fault, so it would leave a shopper's item spinning
52
+ // forever on a permanent condition. Fail closed to the uniform body.
53
+ try {
54
+ resolve(api, params, respond);
55
+ }
56
+ catch (err) {
57
+ api.logger.error("sil_search_results_failed", {
58
+ cause: err instanceof Error ? err.message : String(err),
59
+ });
60
+ respond(true, NOT_FOUND);
61
+ }
62
+ }, { scope: "operator.read" });
63
+ }
64
+ function resolve(api, params, respond) {
65
+ const callId = params["callId"];
66
+ if (typeof callId !== "string" || callId.length === 0) {
67
+ api.logger.info("sil_search_results_invalid", { reason: "invalid_call_id" });
68
+ respond(true, INVALID_REQUEST);
69
+ return;
70
+ }
71
+ // The principal is the sil account holding a LIVE session. `clearTokens()`
72
+ // unlinks tokens.json and leaves config.json intact, so the token check is
73
+ // what makes a logged-out plugin resolve nothing — a page belongs to the
74
+ // identity that produced it, never to the machine.
75
+ const principal = hasTokens() ? readConfig()?.user?.id : undefined;
76
+ if (principal === undefined) {
77
+ api.logger.info("sil_search_results_miss", { found: false, reason: "no_principal" });
78
+ respond(true, NOT_FOUND);
79
+ return;
80
+ }
81
+ const page = getSearchResult(callId, principal);
82
+ if (page === null) {
83
+ api.logger.info("sil_search_results_miss", {
84
+ found: false,
85
+ reason: searchResultMiss(callId, principal),
86
+ });
87
+ respond(true, NOT_FOUND);
88
+ return;
89
+ }
90
+ api.logger.info("sil_search_results_hit", { found: true, count: page.products.length });
91
+ // Handed over BY REFERENCE, aliasing the array the agent envelope already
92
+ // serialized. Deliberate: both paths JSON-serialize immediately and neither
93
+ // mutates, so a defensive clone would copy ~50 KB per resolve for nothing.
94
+ respond(true, page);
95
+ }
package/dist/index.js CHANGED
@@ -24,6 +24,7 @@
24
24
  import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
25
25
  import { applyPluginConfigOverrides, getWebUrl, getWebUrlSource, getApiUrl, getApiUrlSource, } from "./lib/config.js";
26
26
  import { ensureDataDir, getDataDir } from "./lib/credentials.js";
27
+ import { registerSearchResultsMethod } from "./gateway/search-results.js";
27
28
  import { detectWiringDrift, readSilWiringFacts } from "./lib/host-wiring.js";
28
29
  import { registerCatalogTools } from "./tools/catalog.js";
29
30
  import { registerDoctorTools } from "./tools/doctor.js";
@@ -68,6 +69,13 @@ export default definePluginEntry({
68
69
  registerCatalogTools(api);
69
70
  registerProfileTools(api);
70
71
  registerDoctorTools(api);
72
+ // The pull surface a paired client resolves a search page from. Registering
73
+ // a closure opens nothing — no socket, no timer — so the invariant above
74
+ // holds; the store behind it is touched only inside the handler and inside
75
+ // sil_search's execute(). NOT a tool and NOT a `registerXTools` group: it
76
+ // never reaches the model, and the manifest's `contracts` vocabulary has no
77
+ // gateway-method key, so this call IS the declaration.
78
+ registerSearchResultsMethod(api);
71
79
  // Host-wiring drift, at the ONE surface that survives it.
72
80
  //
73
81
  // `tools.alsoAllow` is GLOBAL, so the state where sil's tools are filtered
@@ -0,0 +1,116 @@
1
+ /**
2
+ * The search-results delivery buffer.
3
+ *
4
+ * `sil_search` returns its full page to the agent exactly as it always has —
5
+ * this store is a pure SIDE EFFECT on the `ok` path, invisible to every
6
+ * channel. It exists because the host's projection of a tool result is not a
7
+ * dependable transport for structured data: under codex `data.result` is absent
8
+ * from every frame, and the transcript that would otherwise carry it is both
9
+ * provider-capped and rewritten under context pressure as a run grows. A client
10
+ * that wants to render an intermediate search therefore needs its own way to
11
+ * fetch it — `sil.search_results` (see `../gateway/search-results.ts`) reads
12
+ * this map and answers over the paired `deviceToken` WS.
13
+ *
14
+ * The key is the HOST's `callId`, verbatim — never prefixed, hashed, or
15
+ * re-minted. `execute()` receives it BEFORE any I/O, so a page can never be
16
+ * orphaned by a failing search. A client joins on
17
+ * `data.toolCallId ?? data.itemId`, in that order: the id is the same string on
18
+ * every frame, but the FIELD NAME differs per family (`session.tool` carries
19
+ * only `toolCallId`, the `agent`/`stream:"item"` frames only `itemId`) and on
20
+ * the non-codex path `itemId` is `tool:`-prefixed — see
21
+ * `docs/decisions/search-results-pull-surface.md`. Because that id is visible to
22
+ * anyone who can see the frames, knowledge of a `callId` is NOT evidence of
23
+ * entitlement: the principal check below is the only gate that matters.
24
+ *
25
+ * In-memory, by choice. Process death is the strongest retention ceiling
26
+ * available and costs nothing; an on-disk buffer would put prices, seller
27
+ * identity, and `checkout_url` at rest, widen the plugin's declared filesystem
28
+ * scope, and — with no timers allowed — leave the last pages there forever once
29
+ * the user stops searching.
30
+ *
31
+ * TIMER-FREE, and that is load-bearing: `register()` must stay synchronous and
32
+ * open nothing, so eviction is lazy on write. Reads are pure — they never
33
+ * evict, never reorder, and never consume, because a client remount or reload
34
+ * re-resolves the same page and a one-shot read would blank the shopper's
35
+ * screen on the first refresh.
36
+ */
37
+ /**
38
+ * Fifteen minutes. A search result is point-in-time — price, availability, and
39
+ * `checkout_url` are exactly the fields a shopper must re-fetch before buying —
40
+ * so this is long enough for the settle edge, a client reload, a reconnect, and
41
+ * a short step-away, and short enough that nothing renders as stale truth. It
42
+ * is a delivery buffer, not scrollback and not history.
43
+ */
44
+ export const RETENTION_MS = 15 * 60_000;
45
+ /**
46
+ * Sized against a whole RUN, not a single request: a real run issues 5–10 tool
47
+ * calls and a client must be able to render EVERY intermediate search in it,
48
+ * not just the last — so a "latest result" slot (or anything near the ≤4-call
49
+ * fan-out one shopper request makes) would evict an early search before the run
50
+ * ends. 32 leaves several runs' worth of headroom at a worst case of roughly
51
+ * 32 × ~51 KB ≈ 1.6 MB, which is nothing against the gateway's own 25 MB frame
52
+ * ceiling. Retention is a CEILING, not a guarantee: past it the product answer
53
+ * is always the same — run a fresh search.
54
+ */
55
+ export const MAX_ENTRIES = 32;
56
+ const entries = new Map();
57
+ /** Store one `ok` page under the host's `callId`, bound to the sil account that
58
+ * produced it. An empty principal is refused: a page has an owner or it is
59
+ * unreachable, and an ownerless entry would only burn capacity. */
60
+ export function putSearchResult(callId, page, principal) {
61
+ if (principal.length === 0)
62
+ return;
63
+ evict();
64
+ entries.set(callId, { principal, page, expiresAtMs: Date.now() + RETENTION_MS });
65
+ }
66
+ /** The stored page, or `null` for every miss — unknown, expired, and foreign are
67
+ * ONE outcome to the caller. Pure: no eviction, no reordering, no consumption,
68
+ * so a client remount re-resolves the same page and a foreign probe cannot deny
69
+ * the owner theirs. */
70
+ export function getSearchResult(callId, principal) {
71
+ return lookup(callId, principal).page;
72
+ }
73
+ /** The miss cause, for the OPERATOR LOG only (criterion C3) — never the wire.
74
+ * A separate query rather than a richer return, because the wire path must not
75
+ * be able to reach the cause by accident: reading it is a deliberate call. */
76
+ export function searchResultMiss(callId, principal) {
77
+ return lookup(callId, principal).miss;
78
+ }
79
+ /** Reset for tests. Production never calls this — the process IS the lifetime. */
80
+ export function __resetSearchResultsStore() {
81
+ entries.clear();
82
+ }
83
+ function lookup(callId, principal) {
84
+ const entry = entries.get(callId);
85
+ if (entry === undefined)
86
+ return { page: null, miss: "unknown" };
87
+ if (entry.expiresAtMs <= Date.now())
88
+ return { page: null, miss: "expired" };
89
+ // An empty principal is the anonymous bucket, and there is no legitimate
90
+ // anonymous owner — it must not match, not even an entry stored under one.
91
+ if (principal.length === 0 || entry.principal !== principal) {
92
+ return { page: null, miss: "principal_mismatch" };
93
+ }
94
+ return { page: entry.page, miss: null };
95
+ }
96
+ /** Lazy eviction, run on every write: drop what has expired, then trim to
97
+ * capacity oldest-first. `Map` preserves insertion order and reads never touch
98
+ * it, so "oldest" is insertion order — deliberately not LRU-on-read, which
99
+ * would make a read mutate the store. */
100
+ function evict() {
101
+ const now = Date.now();
102
+ for (const [callId, entry] of entries) {
103
+ if (entry.expiresAtMs <= now)
104
+ entries.delete(callId);
105
+ }
106
+ // `>=` because this runs BEFORE the `set`, so the store never exceeds the
107
+ // ceiling. Re-writing an existing `callId` can trim one entry it did not need
108
+ // to; a `callId` is unique per tool call, so that branch is unreachable in
109
+ // practice and guarding it would cost more than it saves.
110
+ while (entries.size >= MAX_ENTRIES) {
111
+ const oldest = entries.keys().next();
112
+ if (oldest.done === true)
113
+ return;
114
+ entries.delete(oldest.value);
115
+ }
116
+ }
@@ -58,8 +58,9 @@
58
58
  */
59
59
  import { Type } from "typebox";
60
60
  import { getApiUrl } from "../lib/config.js";
61
- import { clearTokens, readTokens } from "../lib/credentials.js";
61
+ import { clearTokens, readConfig, readTokens } from "../lib/credentials.js";
62
62
  import { wiringAdvisories } from "../lib/host-wiring.js";
63
+ import { putSearchResult } from "../lib/search-results-store.js";
63
64
  import { lookupCatalog, refreshAndRetryOnce, searchCatalog, specsCatalog, } from "../lib/sil-client.js";
64
65
  import { jsonResult } from "../lib/tool-result.js";
65
66
  /**
@@ -311,7 +312,7 @@ function registerSearch(api) {
311
312
  + " both. Omit when there are no structured requirements.",
312
313
  })),
313
314
  }),
314
- async execute(_callId, params) {
315
+ async execute(callId, params) {
315
316
  // 1 — not registered: terminal, zero network calls.
316
317
  const stored = readTokens();
317
318
  if (stored === null) {
@@ -352,6 +353,20 @@ function registerSearch(api) {
352
353
  // logs-only, no token material, NOT a payload field (the agent never sees it).
353
354
  if (recovered.refreshed)
354
355
  api.logger.info("sil_search_refreshed", {});
356
+ // Buffer the page for a paired client to pull by this exact `callId`
357
+ // (`sil.search_results`). A PURE SIDE EFFECT: the envelope returned
358
+ // below is byte-identical to what every channel got before this
359
+ // existed — no reference, no flag, no listener check. Only `ok` is
360
+ // stored; the other outcomes steer the agent's recovery and carry no
361
+ // product data to deliver. `advisories` stay OFF the stored page —
362
+ // they are operator/agent copy, not products.
363
+ if (recovered.outcome.kind === "ok") {
364
+ const { kind: _kind, ...page } = recovered.outcome;
365
+ const principal = readConfig()?.user?.id;
366
+ if (principal !== undefined) {
367
+ putSearchResult(callId, { status: "ok", ...page }, principal);
368
+ }
369
+ }
355
370
  return mapSearchOutcome(api, recovered.outcome);
356
371
  case "must_reregister":
357
372
  // A dead refresh token (invalid_grant) is cleared so the agent's
@@ -2,10 +2,11 @@
2
2
  "id": "sil",
3
3
  "name": "sil",
4
4
  "description": "Turn your OpenClaw into an expert shopping agent.",
5
- "version": "0.4.4",
5
+ "version": "0.4.6",
6
6
  "skills": ["./sil-shopping"],
7
7
  "activation": {
8
- "onCapabilities": ["tool"]
8
+ "onCapabilities": ["tool"],
9
+ "onStartup": true
9
10
  },
10
11
  "contracts": {
11
12
  "tools": [
@@ -54,7 +55,7 @@
54
55
  },
55
56
  "security": {
56
57
  "shipsRuntimeCode": true,
57
- "packagingNote": "Compiled JavaScript ships under ./dist. register() stays synchronous and opens nothing — it only registers tools. ALL I/O happens inside a tool's execute(): sil_register calls sil-web over the network, writes tokens.json + config.json to the plugin data directory (owner-only, 0600), and arms a bounded background poll timer that stops on the first terminal claim outcome or after the session deadline. sil_whoami reads the stored session token and calls sil-api for the user's identity, refreshing transparently via sil-web on a 401 (at most one refresh + one retry per call, no timer); a confirmed-dead session clears tokens.json. sil_search and sil_product_get read the stored session token and call sil-api's catalog endpoints (search / lookup) with it — read-only on catalog data, no timer, but with the SAME bounded 401 recovery as sil_whoami: on a 401 they refresh ONCE via sil-web (rotating tokens.json) and retry the read ONCE; a second 401 or a dead (invalid_grant) refresh token clears tokens.json and is reported as a terminal re-register hint. A non-401 error writes no token. The five profile verbs make NO network call and read no token; they write the one sil shopper's SINGLETON behaviour artefacts under a fixed $SIL_DATA_DIR/shopper/ (owner-only, files 0600, dirs 0700) as frontmatter-as-truth markdown — there is NO profile.json manifest; each file's own frontmatter IS the source of truth, discovered by a filesystem scan. sil_profile_materialize is SETUP-ONLY: it writes shopper/user_spec.md (the shared person spec; its frontmatter carries the shopper name), minting no domain. sil_learn is the single target+change verb over shopper/domains/<slug>/{method.md, prds/<product>-<intent>.md, assets/}: create mints a whole method or PRD, fail-closed if one already exists; write replaces an existing doc's whole body with a caller-authored reconciled version, fail-closed if the target is absent — there is no in-place section edit, so every change rewrites the whole document; attach-asset persists image bytes (size-capped, image MIME allowlist) into the domain's assets/ owner-only and links them by RELATIVE path, never inline bytes. sil_profile_search scans artefact FRONTMATTER and returns coordinates only (no bodies) — a domain/PRD with malformed frontmatter is skipped and surfaced as unreadable, never silently dropped or half-read. sil_profile_get reads ONE whole body (method or PRD); sil_profile_remove deletes a whole validated domain subtree, or one PRD file, fail-closed on a malformed/traversal/\"main\" or missing slug (never the whole shopper). sil_doctor is a report-first diagnostic over the SAME $SIL_DATA_DIR state: it reads the data dir, file modes, tokens.json/config.json metadata, and artefact frontmatter, and returns a machine-readable findings array. It reads no token contents out and rotates no token: token health is metadata only (present / mode / parses / expired), where expiry is decoded from the access token's own JWT exp claim strictly LOCALLY (decode-only, no signature verification, no network, no claim other than exp extracted, never a token byte emitted or logged). Its only writes are two safe idempotent fixes under $SIL_DATA_DIR — tightening a too-open mode and creating the missing data dir; a tighten only ever NARROWS (it detects bits set outside the expected mask and chmods to mode & expected, which can only clear bits, never grant them). Enumerated entries under the data dir are lstat'd, and a symlink found among them is REPORTED, never chmod'd-through — that is what keeps a tighten inside the store. The data directory ROOT itself is stat'd rather than lstat'd, because chmod follows a symlink regardless (Linux exposes no lchmod), so lstat there would prevent nothing and merely re-report the same fix forever; a symlinked $SIL_DATA_DIR is an operator-declared indirection, so the tighten lands on the directory the plugin already stores everything in. anything that would mutate the bytes of an existing artefact (clearing a corrupt tokens.json, deleting an orphaned tmp file, repairing an artefact) is REPORTED as needs_confirmation and never run. It makes exactly ONE outbound request, and it is the only reason https://clawhub.ai is declared: an unauthenticated read-only GET of the published version of @4gpts/sil, bounded by an explicit timeout + abort, carrying no token, no PII, no store contents, and no Authorization header, pinned to that one host (redirects are refused). It fails soft to silence — an unreachable, slow, non-200, or unparseable response yields no finding at all and never fails the run. sil_doctor never acts on the version it reports: it installs nothing, spawns no process, writes no host config, and prompts nobody. The only caller-supplied path segments are the domain slug and the PRD key, both validated (lower-kebab, not \"main\") before any join; the shopper segment is a compile-time constant. Every write is atomic (tmp file → rename over target → chmod), so a reader sees a whole file or none. The persona is the shopper's host workspace SOUL.md, written by the host CLI (not this plugin, not a sil artefact), and the shopper's host-config wiring is driven separately by the host CLI. The PKCE verifier is held only in memory and is never written to disk. Artefact bodies, tokens, and identity PII are never logged.",
58
+ "packagingNote": "Compiled JavaScript ships under ./dist. register() stays synchronous and opens nothing — it only registers tools. ALL I/O happens inside a tool's execute(): sil_register calls sil-web over the network, writes tokens.json + config.json to the plugin data directory (owner-only, 0600), and arms a bounded background poll timer that stops on the first terminal claim outcome or after the session deadline. sil_whoami reads the stored session token and calls sil-api for the user's identity, refreshing transparently via sil-web on a 401 (at most one refresh + one retry per call, no timer); a confirmed-dead session clears tokens.json. sil_search and sil_product_get read the stored session token and call sil-api's catalog endpoints (search / lookup) with it — read-only on catalog data, no timer, but with the SAME bounded 401 recovery as sil_whoami: on a 401 they refresh ONCE via sil-web (rotating tokens.json) and retry the read ONCE; a second 401 or a dead (invalid_grant) refresh token clears tokens.json and is reported as a terminal re-register hint. A non-401 error writes no token. The five profile verbs make NO network call and read no token; they write the one sil shopper's SINGLETON behaviour artefacts under a fixed $SIL_DATA_DIR/shopper/ (owner-only, files 0600, dirs 0700) as frontmatter-as-truth markdown — there is NO profile.json manifest; each file's own frontmatter IS the source of truth, discovered by a filesystem scan. sil_profile_materialize is SETUP-ONLY: it writes shopper/user_spec.md (the shared person spec; its frontmatter carries the shopper name), minting no domain. sil_learn is the single target+change verb over shopper/domains/<slug>/{method.md, prds/<product>-<intent>.md, assets/}: create mints a whole method or PRD, fail-closed if one already exists; write replaces an existing doc's whole body with a caller-authored reconciled version, fail-closed if the target is absent — there is no in-place section edit, so every change rewrites the whole document; attach-asset persists image bytes (size-capped, image MIME allowlist) into the domain's assets/ owner-only and links them by RELATIVE path, never inline bytes. sil_profile_search scans artefact FRONTMATTER and returns coordinates only (no bodies) — a domain/PRD with malformed frontmatter is skipped and surfaced as unreadable, never silently dropped or half-read. sil_profile_get reads ONE whole body (method or PRD); sil_profile_remove deletes a whole validated domain subtree, or one PRD file, fail-closed on a malformed/traversal/\"main\" or missing slug (never the whole shopper). sil_doctor is a report-first diagnostic over the SAME $SIL_DATA_DIR state: it reads the data dir, file modes, tokens.json/config.json metadata, and artefact frontmatter, and returns a machine-readable findings array. It reads no token contents out and rotates no token: token health is metadata only (present / mode / parses / expired), where expiry is decoded from the access token's own JWT exp claim strictly LOCALLY (decode-only, no signature verification, no network, no claim other than exp extracted, never a token byte emitted or logged). Its only writes are two safe idempotent fixes under $SIL_DATA_DIR — tightening a too-open mode and creating the missing data dir; a tighten only ever NARROWS (it detects bits set outside the expected mask and chmods to mode & expected, which can only clear bits, never grant them). Enumerated entries under the data dir are lstat'd, and a symlink found among them is REPORTED, never chmod'd-through — that is what keeps a tighten inside the store. The data directory ROOT itself is stat'd rather than lstat'd, because chmod follows a symlink regardless (Linux exposes no lchmod), so lstat there would prevent nothing and merely re-report the same fix forever; a symlinked $SIL_DATA_DIR is an operator-declared indirection, so the tighten lands on the directory the plugin already stores everything in. anything that would mutate the bytes of an existing artefact (clearing a corrupt tokens.json, deleting an orphaned tmp file, repairing an artefact) is REPORTED as needs_confirmation and never run. It makes exactly ONE outbound request, and it is the only reason https://clawhub.ai is declared: an unauthenticated read-only GET of the published version of @4gpts/sil, bounded by an explicit timeout + abort, carrying no token, no PII, no store contents, and no Authorization header, pinned to that one host (redirects are refused). It fails soft to silence — an unreachable, slow, non-200, or unparseable response yields no finding at all and never fails the run. sil_doctor never acts on the version it reports: it installs nothing, spawns no process, writes no host config, and prompts nobody. The only caller-supplied path segments are the domain slug and the PRD key, both validated (lower-kebab, not \"main\") before any join; the shopper segment is a compile-time constant. Every write is atomic (tmp file → rename over target → chmod), so a reader sees a whole file or none. The persona is the shopper's host workspace SOUL.md, written by the host CLI (not this plugin, not a sil artefact), and the shopper's host-config wiring is driven separately by the host CLI. The PKCE verifier is held only in memory and is never written to disk. The plugin registers ONE gateway RPC method, sil.search_results (scope operator.read, which the host authorizes before the handler runs): a paired client calls it over the already-authenticated deviceToken WS to read back a sil_search page whose callId it already saw on the tool frames. It opens no socket, no port, and no route — registering it hands the host a closure, and the host owns the transport. The pages it serves live in a bounded IN-MEMORY buffer that is never written to disk: sil_search stores its own successful result there under the callId the host passed it (at most 32 pages, dropped 15 minutes after the search, evicted lazily on the next write with no timer, and gone entirely when the process exits). The method makes no network call, starts no agent run, and returns a page only to the sil account that produced it — every unknown, expired, or foreign reference gets one identical not-found body. Artefact bodies, tokens, and identity PII are never logged; the method logs only whether a page was found and how many products it held.",
58
59
  "registersLongLivedService": false,
59
60
  "serviceIds": [],
60
61
  "runsTimers": true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sil-openclaw",
3
- "version": "0.4.4",
3
+ "version": "0.4.6",
4
4
  "description": "Turn your OpenClaw into an expert shopping agent.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -50,12 +50,12 @@
50
50
  "./dist/index.js"
51
51
  ],
52
52
  "compat": {
53
- "pluginApi": ">=2026.4.1",
54
- "minGatewayVersion": ">=2026.4.15"
53
+ "pluginApi": ">=2026.7.1",
54
+ "minGatewayVersion": ">=2026.7.1"
55
55
  },
56
56
  "build": {
57
- "openclawVersion": "2026.4.15",
58
- "pluginSdkVersion": "2026.4.15"
57
+ "openclawVersion": "2026.7.1",
58
+ "pluginSdkVersion": "2026.7.1"
59
59
  },
60
60
  "hostTargets": [
61
61
  "darwin-arm64",
@@ -74,7 +74,7 @@
74
74
  "npmSpec": "sil-openclaw",
75
75
  "localPath": "./",
76
76
  "defaultChoice": "npm",
77
- "minHostVersion": ">=2026.4.15"
77
+ "minHostVersion": ">=2026.7.1"
78
78
  }
79
79
  },
80
80
  "scripts": {