sil-openclaw 0.5.0 → 0.5.1
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 +14 -0
- package/README.md +1 -1
- package/SECURITY.md +61 -11
- package/openclaw.plugin.json +1 -25
- package/package.json +4 -4
- package/scripts/allowlist-openclaw.mjs +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,20 @@ release (`clawhub package publish --changelog`). See [README](./README.md#releas
|
|
|
10
10
|
|
|
11
11
|
## [Unreleased]
|
|
12
12
|
|
|
13
|
+
## [0.5.1] - 2026-09-30
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
- **Host floor raised to OpenClaw `>=2026.9.3`**, the version the plugin is built
|
|
18
|
+
and tested against (`compat.pluginApi`, `compat.minGatewayVersion`,
|
|
19
|
+
`install.minHostVersion`). An older host refuses the plugin; update OpenClaw first.
|
|
20
|
+
- **The security declaration moved from `openclaw.plugin.json#security` to
|
|
21
|
+
`SECURITY.md`.** The manifest has no such field (ClawHub `manifest-unknown-fields`).
|
|
22
|
+
Same claims: network endpoints, filesystem scope, credentials, timers, processes.
|
|
23
|
+
- SDK types now import from the `openclaw/plugin-sdk/plugin-entry` subpath instead
|
|
24
|
+
of the legacy root barrel (ClawHub `legacy-root-sdk-import`). Type-only, no
|
|
25
|
+
runtime change.
|
|
26
|
+
|
|
13
27
|
## [0.5.0] - 2026-09-25
|
|
14
28
|
|
|
15
29
|
### Added
|
package/README.md
CHANGED
|
@@ -203,7 +203,7 @@ pnpm test # vitest (unit + integration)
|
|
|
203
203
|
pnpm typecheck # tsc --noEmit
|
|
204
204
|
```
|
|
205
205
|
|
|
206
|
-
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`
|
|
206
|
+
Releasing is two steps: `pnpm version <patch|minor|major>` (bump → sync manifest → cut changelog → test → tag → push), then `pnpm release` (build → pack → **stage** on npm as `sil-openclaw` → a maintainer approves it with 2FA under npmjs.com's Staged Packages → the same contents to ClawHub as `@4gpts/sil`, only once npm serves them byte-identical). Staged publishing needs no 2FA-bypass token, which npm is retiring from publishing. 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.
|
|
207
207
|
|
|
208
208
|
---
|
|
209
209
|
|
package/SECURITY.md
CHANGED
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
## Reporting a vulnerability
|
|
4
4
|
|
|
5
5
|
Report suspected vulnerabilities in `sil-openclaw` **privately — do not open a
|
|
6
|
-
public issue**. Contact [@4gpts on X](https://x.com/4gpts)
|
|
7
|
-
`openclaw.plugin.json#security.reportVulnerabilitiesTo`). We aim to acknowledge
|
|
6
|
+
public issue**. Contact [@4gpts on X](https://x.com/4gpts). We aim to acknowledge
|
|
8
7
|
within a few business days and will coordinate a fix and disclosure timeline.
|
|
9
8
|
|
|
10
9
|
## Supported versions
|
|
@@ -14,14 +13,65 @@ backport fixes or maintain old release lines — upgrade to the latest version.
|
|
|
14
13
|
|
|
15
14
|
## What this plugin touches
|
|
16
15
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
Compiled JavaScript ships under `./dist`. No native modules, no install scripts,
|
|
17
|
+
no long-lived service, no inbound HTTP route.
|
|
18
|
+
|
|
19
|
+
**`register()` opens nothing.** It registers the tools and one gateway method,
|
|
20
|
+
ensures the data directory, and synchronously reads the tool request schemas
|
|
21
|
+
under `./schema` — tracked files inside the package. No network, timer or handle.
|
|
22
|
+
All network I/O happens inside a tool's `execute()`.
|
|
23
|
+
|
|
24
|
+
### Network endpoints
|
|
25
|
+
|
|
26
|
+
The plugin talks to these hosts and no others:
|
|
27
|
+
|
|
28
|
+
- `https://sil.4gpts.com` — sil-web: registration and token refresh (`sil_web_url`).
|
|
29
|
+
- `https://sil-api.4gpts.com` — sil-api: identity, catalog, brief and profile (`sil_api_url`).
|
|
30
|
+
- `https://clawhub.ai` — one unauthenticated, read-only `GET` by `sil_doctor` of
|
|
31
|
+
the published `@4gpts/sil` version: no token, no PII, bounded timeout, redirects
|
|
32
|
+
refused, silent on any failure.
|
|
33
|
+
|
|
34
|
+
The `shopping_*` tools are read-only, except `shopping_domain_create` (writes one
|
|
35
|
+
registry row) and `shopping_brief_create` / `shopping_brief_edit` /
|
|
36
|
+
`shopping_profile_edit` (write the buyer's own brief and profile under their sil
|
|
37
|
+
account). On a `401`, every sil call refreshes once and retries once. A second
|
|
38
|
+
`401` or a dead refresh token clears `tokens.json`.
|
|
39
|
+
|
|
40
|
+
### Filesystem and credentials
|
|
41
|
+
|
|
42
|
+
Everything lives under `$SIL_DATA_DIR` (default `$XDG_DATA_HOME/sil`, else
|
|
43
|
+
`~/.local/share/sil`), owner-only (files `0600`, dirs `0700`), written atomically
|
|
44
|
+
(tmp → rename → chmod):
|
|
45
|
+
|
|
46
|
+
- `tokens.json` — access and refresh token.
|
|
47
|
+
- `config.json` — user identity.
|
|
48
|
+
|
|
49
|
+
Nothing of the buyer's is kept on disk, and no caller-supplied value ever becomes
|
|
50
|
+
a path segment. The PKCE verifier stays in memory. Tokens and identity PII are
|
|
22
51
|
never logged.
|
|
23
52
|
|
|
24
|
-
|
|
25
|
-
`
|
|
26
|
-
|
|
27
|
-
|
|
53
|
+
`sil_doctor` reads that directory's state and metadata. It decodes only the
|
|
54
|
+
access token's `exp` claim, locally, and never emits token bytes. It only ever
|
|
55
|
+
narrows a too-open mode and creates a missing data directory. To prove the
|
|
56
|
+
directory is writable it writes one empty `.doctor.<hex>.tmp` probe and unlinks
|
|
57
|
+
it. Anything that would change an existing file's bytes is reported, never run.
|
|
58
|
+
Symlinks inside the directory are reported, never chmod'd through.
|
|
59
|
+
|
|
60
|
+
### Timers and processes
|
|
61
|
+
|
|
62
|
+
`sil_register` arms one bounded poll timer. It stops on the first terminal claim
|
|
63
|
+
outcome or at the session deadline. Any other timer is scoped to one call.
|
|
64
|
+
|
|
65
|
+
The plugin process spawns nothing. The shipped `scripts/allowlist-openclaw.mjs`
|
|
66
|
+
is operator-run, never a lifecycle hook. It calls the host's `openclaw config
|
|
67
|
+
validate` CLI and writes the host `openclaw.json` (with a `.bak`) to admit sil's
|
|
68
|
+
tools.
|
|
69
|
+
|
|
70
|
+
### Gateway method
|
|
71
|
+
|
|
72
|
+
`sil.search_results` (scope `operator.read`, authorized by the host before the
|
|
73
|
+
handler runs) lets a paired client read back a `shopping_search` page by the
|
|
74
|
+
`callId` it saw. Pages live in an in-memory buffer: at most 32 of them, each
|
|
75
|
+
dropped 15 minutes after its search, never written to disk. A page is served only
|
|
76
|
+
to the sil account that produced it. An unknown, expired or foreign reference gets
|
|
77
|
+
one identical not-found body. No network call, no agent run.
|
package/openclaw.plugin.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"id": "sil",
|
|
3
3
|
"name": "sil",
|
|
4
4
|
"description": "Turn your OpenClaw into an expert shopping agent.",
|
|
5
|
-
"version": "0.5.
|
|
5
|
+
"version": "0.5.1",
|
|
6
6
|
"skills": ["./sil-shopping"],
|
|
7
7
|
"activation": {
|
|
8
8
|
"onCapabilities": ["tool"],
|
|
@@ -55,29 +55,5 @@
|
|
|
55
55
|
"placeholder": "https://sil-api.4gpts.com",
|
|
56
56
|
"advanced": true
|
|
57
57
|
}
|
|
58
|
-
},
|
|
59
|
-
"security": {
|
|
60
|
-
"shipsRuntimeCode": true,
|
|
61
|
-
"packagingNote": "Compiled JavaScript ships under ./dist. register() stays synchronous and opens nothing that must be closed: it registers the tools, ensures the data directory, and reads the eleven REQUEST artifacts under ./schema so each shopping tool can publish one as its own parameters (eleven synchronous readFileSync calls of tracked files inside the package, no network, no timer, no handle). The eleven RESPONSE artifacts ship beside them and none is read at runtime. ALL network 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. The eleven shopping_* tools read the stored session token and call sil-api's catalog, brief and profile endpoints with it — read-only except shopping_domain_create, which writes one registry row, and shopping_brief_create / shopping_brief_edit / shopping_profile_edit, which write the buyer's own brief and profile under their sil account and nowhere else — with no timer on any of them, 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. NOTHING of the buyer's is kept on disk: every tool that calls sil — sil_register, sil_whoami and the shopping_* tools — touches tokens.json and config.json and nothing else under the data directory: it reads the stored token, rewrites tokens.json when a refresh rotates it, and deletes tokens.json when sil says the session is past refreshing; and no caller-supplied value ever becomes a path segment anywhere. sil_doctor is a report-first diagnostic over that SAME $SIL_DATA_DIR state: it reads the data dir, file modes and tokens.json/config.json metadata, 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 writes under $SIL_DATA_DIR are two safe idempotent fixes — tightening a too-open mode and creating the missing data dir — plus an empty .doctor.<hex>.tmp probe it writes and unlinks to prove the directory is writable the way sil actually writes; 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 data directory. 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 file (clearing a corrupt tokens.json, deleting an orphaned tmp file) 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, 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. Every write is atomic (tmp file → rename over target → chmod), so a reader sees a whole file or none. 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 shopping_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: shopping_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. Tokens and identity PII are never logged; the method logs only whether a page was found and how many products it held.",
|
|
62
|
-
"registersLongLivedService": false,
|
|
63
|
-
"serviceIds": [],
|
|
64
|
-
"runsTimers": true,
|
|
65
|
-
"inboundHttpRoutes": [],
|
|
66
|
-
"networkEndpoints": [
|
|
67
|
-
"https://clawhub.ai",
|
|
68
|
-
"https://sil-api.4gpts.com",
|
|
69
|
-
"https://sil.4gpts.com"
|
|
70
|
-
],
|
|
71
|
-
"filesystemScope": [
|
|
72
|
-
"$SIL_DATA_DIR (default $XDG_DATA_HOME/sil, else ~/.local/share/sil) — tokens.json and config.json, and nothing else: a tool that calls sil reads them, rewrites tokens.json on a refresh and deletes it when the session is past refreshing, and no caller-supplied value ever becomes a path segment. sil_doctor reads whatever else it finds there, only ever tightens its mode, and writes one empty .doctor.<hex>.tmp writability probe it unlinks immediately. All writes are atomic + owner-only (files 0600, dirs 0700)"
|
|
73
|
-
],
|
|
74
|
-
"credentialsOnDisk": [
|
|
75
|
-
"tokens.json (access + refresh token)",
|
|
76
|
-
"config.json (user identity)"
|
|
77
|
-
],
|
|
78
|
-
"noNativeModules": true,
|
|
79
|
-
"noChildProcess": false,
|
|
80
|
-
"noInstallScripts": true,
|
|
81
|
-
"reportVulnerabilitiesTo": "https://x.com/4gpts"
|
|
82
58
|
}
|
|
83
59
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sil-openclaw",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "Turn your OpenClaw into an expert shopping agent.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"./dist/index.js"
|
|
50
50
|
],
|
|
51
51
|
"compat": {
|
|
52
|
-
"pluginApi": ">=2026.
|
|
53
|
-
"minGatewayVersion": ">=2026.
|
|
52
|
+
"pluginApi": ">=2026.9.3",
|
|
53
|
+
"minGatewayVersion": ">=2026.9.3"
|
|
54
54
|
},
|
|
55
55
|
"build": {
|
|
56
56
|
"openclawVersion": "2026.9.3",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"npmSpec": "sil-openclaw",
|
|
74
74
|
"localPath": "./",
|
|
75
75
|
"defaultChoice": "npm",
|
|
76
|
-
"minHostVersion": ">=2026.
|
|
76
|
+
"minHostVersion": ">=2026.9.3"
|
|
77
77
|
}
|
|
78
78
|
},
|
|
79
79
|
"scripts": {
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Install-time helper: trust `sil` in the host OpenClaw config.
|
|
4
4
|
*
|
|
5
|
-
* Operator-invoked (NEVER an npm lifecycle hook —
|
|
6
|
-
*
|
|
5
|
+
* Operator-invoked (NEVER an npm lifecycle hook — SECURITY.md's "no install
|
|
6
|
+
* scripts" is a shipped guarantee that the package
|
|
7
7
|
* runs nothing automatically; an operator explicitly running this is the
|
|
8
8
|
* opposite of an install hook and honours it). This is a standalone script in
|
|
9
9
|
* the same class as `scripts/release.mjs` — it is NOT the plugin process, so
|