opensocrates 1.1.0 → 1.1.3

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/README.md CHANGED
@@ -1,3 +1,7 @@
1
+ <p align="center">
2
+ <img src="https://raw.githubusercontent.com/ParkerHwang/OpenSocrates/main/docs/assets/opensocrates-banner.jpg" alt="OpenSocrates" width="820">
3
+ </p>
4
+
1
5
  # OpenSocrates
2
6
 
3
7
  **English** | [한국어](README.ko.md)
@@ -13,19 +17,31 @@ uses a fresh host-native selector to choose relevant systems, and adds their
13
17
  complete theory and examples to the active task. Straightforward factual and
14
18
  mechanical work can pass through unchanged.
15
19
 
16
- Version `1.1.0` includes 48 reasoning systems and release packages for Claude
17
- and Codex on Apple-silicon macOS (`darwin-arm64`). It uses your existing host
18
- login and does not require an API key or an OpenSocrates backend.
20
+ Version `1.1.3` includes 48 reasoning systems, one user-facing Claude entry, a
21
+ Claude grounding gate that verifies selected procedures were read, coordinated
22
+ Claude/Codex lifecycle management, and opt-in automatic updates on
23
+ Apple-silicon macOS (`darwin-arm64`). It uses your existing host login and does
24
+ not require an API key or an OpenSocrates backend.
25
+
26
+ The native plugin archives intentionally ship only `bin/launch.sh`. That
27
+ launcher accepts `darwin-arm64` only; macOS Intel, Linux, and Windows launchers
28
+ and runtimes are not shipped or supported in this release.
29
+
30
+ > **Latest release: [OpenSocrates 1.1.3](https://github.com/ParkerHwang/OpenSocrates/releases/tag/v1.1.3).**
31
+ > It adds authenticated live-host validation, installer and cleanup hardening,
32
+ > strict package support boundaries, and an uploadable Claude Chat skills ZIP.
33
+ > Upgrade both managed hosts together with
34
+ > `npx --yes opensocrates@1.1.3 update --host all`.
19
35
 
20
36
  ## Host support
21
37
 
22
- | Host surface | Automatic selection | Reasoning skills | Validation status |
38
+ | Host surface | Automatic selection | User-facing entry | Validation status |
23
39
  | --- | --- | --- | --- |
24
- | Codex CLI and Desktop | Yes | Yes | Release-validated on `darwin-arm64` |
25
- | Claude Code CLI | Yes, through `UserPromptSubmit` | Yes | Locally validated on `darwin-arm64` |
26
- | Claude Code desktop app | Implemented, where Claude Code plugins run | Yes | Implemented; no live probe receipt |
27
- | Claude Cowork | Implemented, when the local plugin runtime is available | Yes | Experimental; no live probe receipt |
28
- | Claude web and Desktop Chat | No hooks | Yes, through plugin skills | Skills-only; upload path unvalidated |
40
+ | Codex CLI and Desktop | Yes | OpenSocrates plugin | Release-validated on `darwin-arm64` |
41
+ | Claude Code CLI | Yes, through `UserPromptSubmit` | `/opensocrates` | Locally validated on `darwin-arm64` |
42
+ | Claude Code desktop app | Yes, where Claude Code plugins run | `/opensocrates` | [Authenticated hook lifecycle locally validated](docs/claude-desktop-live-probe.md) |
43
+ | Claude Cowork | No automatic hooks in the tested install | `/opensocrates` standalone skill | [Skill locally validated; native plugin blocked by archive limits](docs/claude-cowork-live-probe.md) |
44
+ | Claude web and Desktop Chat | No hooks | `/opensocrates` | [Live upload and invocation validated](docs/claude-chat-upload-probe.md) |
29
45
 
30
46
  The status column uses four distinct levels. Do not read them as
31
47
  interchangeable:
@@ -43,11 +59,13 @@ skills, but automatic per-prompt selection is available only on Claude Code
43
59
  and Cowork surfaces that execute the plugin runtime. OpenSocrates fails open
44
60
  if a hook or selector is unavailable.
45
61
 
46
- Cowork carries one further unverified assumption. OpenSocrates registers its
47
- marketplace with `claude plugin marketplace add --scope user`, which writes
48
- Claude Code user settings. Anthropic documents that plugin hooks run in Cowork,
49
- but does not document that a marketplace registered through the Claude Code CLI
50
- is visible to Cowork. Until a receipt exists, treat Cowork as experimental.
62
+ Cowork does not import the Claude Code CLI user-marketplace registration as a
63
+ native Cowork plugin in the current live UI. A separately uploaded
64
+ `/opensocrates` skill is locally validated, but the published v1.1.2 Claude
65
+ plugin archive exceeds Cowork's documented compressed limit and observed
66
+ uncompressed limit. The repository also lacks a Cowork marketplace manifest.
67
+ Until a Cowork-native plugin can be installed and its hooks re-probed, treat
68
+ Cowork as a standalone-skill-only surface.
51
69
 
52
70
  ## Install
53
71
 
@@ -61,47 +79,90 @@ small, dependency-free installer. It downloads the matching package from
61
79
  GitHub Releases and verifies the release checksum and every file checksum
62
80
  before registering an owner-marked managed marketplace.
63
81
 
64
- ### Claude Code and Cowork
82
+ ### Install every ready host
65
83
 
66
84
  ```bash
67
- npx --yes opensocrates@1.1.0 install --host claude
85
+ npx --yes opensocrates@1.1.3 install --host all
68
86
  ```
69
87
 
70
- Lifecycle commands:
88
+ The all-host path detects supported, authenticated host CLIs, completes every
89
+ preflight before changing either host, verifies and stages both packages, and
90
+ then activates one release transactionally. If one activation fails, every
91
+ host already changed in that transaction is restored to its previous managed
92
+ registration.
93
+
94
+ Use the same host value for the complete lifecycle:
71
95
 
72
96
  ```bash
73
- npx --yes opensocrates@1.1.0 status --host claude
74
- npx --yes opensocrates@1.1.0 update --host claude
75
- npx --yes opensocrates@1.1.0 remove --host claude
97
+ npx --yes opensocrates@1.1.3 status --host all
98
+ npx --yes opensocrates@1.1.3 update --host all
99
+ npx --yes opensocrates@1.1.3 remove --host all
76
100
  ```
77
101
 
78
- ### Codex
102
+ A private `~/.opensocrates/desired-state.json` manifest records the selected
103
+ channel, installed hosts, and desired active version. `status --host all`
104
+ reports the desired and available versions, last check, last successful
105
+ automatic update, and per-host drift.
106
+
107
+ ### Install one host explicitly
79
108
 
80
109
  Codex remains the default host for backward compatibility:
81
110
 
82
111
  ```bash
83
- npx --yes opensocrates@1.1.0 install
84
- # Equivalent: npx --yes opensocrates@1.1.0 install --host codex
112
+ npx --yes opensocrates@1.1.3 install
113
+ # Equivalent: npx --yes opensocrates@1.1.3 install --host codex
114
+ npx --yes opensocrates@1.1.3 install --host claude
85
115
  ```
86
116
 
87
- Lifecycle commands:
117
+ Existing `--host codex` and `--host claude` lifecycle commands remain
118
+ supported. A host-specific update can intentionally create drift; a later
119
+ `update --host all` or successful automatic reconciliation brings every host
120
+ recorded in desired state back to one version.
121
+
122
+ For Claude, status distinguishes an enabled installation from an
123
+ installed-but-disabled plugin. A disabled desired installation is reported as
124
+ drift. Running `install` or `update` intentionally installs the verified
125
+ package enabled again; if activation fails, rollback restores the previous
126
+ enabled or disabled state. The installer accepts only the observed direct JSON
127
+ arrays and explicit `marketplaces`/`plugins` wrappers from Claude's list
128
+ commands. The privacy-safe 2.1.226 fixture is under
129
+ `installer/fixtures/claude-cli/`.
130
+
131
+ ### Opt-in automatic updates
88
132
 
89
133
  ```bash
90
- npx --yes opensocrates@1.1.0 status --host codex
91
- npx --yes opensocrates@1.1.0 update --host codex
92
- npx --yes opensocrates@1.1.0 remove --host codex
134
+ npx --yes opensocrates@1.1.3 auto-update enable --host all
135
+ npx --yes opensocrates@1.1.3 auto-update status
136
+ npx --yes opensocrates@1.1.3 auto-update disable
93
137
  ```
94
138
 
95
- To use both hosts, run both install commands. Their managed marketplaces live
96
- under their respective Claude and Codex configuration homes.
139
+ Automatic updates are disabled until explicitly enabled. The macOS LaunchAgent
140
+ starts a bounded hourly poll; desired state applies the configured interval
141
+ (24 hours by default) with jitter and a single-instance lock. The job invokes
142
+ the selected npm channel, verifies release and package checksums, stages every
143
+ managed host, and reconciles them as one transaction. Major-version upgrades
144
+ are blocked by default; use `--allow-major` only when that policy is intended.
145
+
146
+ Passing one host to `auto-update enable` narrows only the automatic-update
147
+ scope. It never removes another installed host from desired state;
148
+ `status --host all` continues to track every installation, and a later
149
+ `update --host all` still reconciles the complete installed set.
150
+
151
+ The updater keeps a private receipt with version, time, per-host result, and an
152
+ error category only. It never records prompts, transcripts, credentials, or
153
+ workspace paths. `auto-update disable` unloads and removes the LaunchAgent;
154
+ `remove --host all` does the same before removing the managed hosts.
97
155
 
98
156
  ### Claude web and Desktop Chat skills
99
157
 
100
158
  These surfaces support plugin skills but not hooks. Download
101
- `opensocrates-1.1.0-claude-chat-skills.zip` from the release and upload it from
102
- Claude's plugin customization UI. The 48 method skills and three shared skills
103
- remain available in a small, runtime-free package, while automatic selection
104
- is absent because Chat does not execute plugin hooks. See Anthropic's
159
+ `opensocrates-1.1.3-claude-chat-skills.zip` from the release and upload it from
160
+ Claude's **Customize → Skills → Upload skill** UI. The ZIP contains one
161
+ top-level `opensocrates/` folder with `SKILL.md` directly inside, as required by
162
+ the skill uploader. The package exposes exactly one
163
+ `/opensocrates` skill; its 48 method procedures, rigor, evidence, and trace
164
+ controls are internal supporting references. Automatic selection is absent
165
+ because Chat does not execute plugin hooks. See Anthropic's
105
166
  [plugin surface guide](https://support.claude.com/en/articles/13837440-use-plugins-in-claude).
106
167
 
107
168
  ### Install from a tagged GitHub source
@@ -109,21 +170,22 @@ is absent because Chat does not execute plugin hooks. See Anthropic's
109
170
  The same host option works without the npm registry:
110
171
 
111
172
  ```bash
112
- npx --yes github:ParkerHwang/OpenSocrates#v1.1.0 install --host claude
113
- npx --yes github:ParkerHwang/OpenSocrates#v1.1.0 install --host codex
173
+ npx --yes github:ParkerHwang/OpenSocrates#v1.1.3 install --host all
174
+ npx --yes github:ParkerHwang/OpenSocrates#v1.1.3 install --host claude
175
+ npx --yes github:ParkerHwang/OpenSocrates#v1.1.3 install --host codex
114
176
  ```
115
177
 
116
178
  ### Manual release verification
117
179
 
118
180
  Download `opensocrates.mjs`, the host package, and its `.sha256` file from the
119
- [v1.1.0 release](https://github.com/ParkerHwang/OpenSocrates/releases/tag/v1.1.0).
181
+ [v1.1.3 release](https://github.com/ParkerHwang/OpenSocrates/releases/tag/v1.1.3).
120
182
  For Claude, for example:
121
183
 
122
184
  ```bash
123
- shasum -a 256 -c opensocrates-1.1.0-claude-plugin.zip.sha256
185
+ shasum -a 256 -c opensocrates-1.1.3-claude-plugin.zip.sha256
124
186
  node opensocrates.mjs install --host claude \
125
- --asset opensocrates-1.1.0-claude-plugin.zip \
126
- --checksum opensocrates-1.1.0-claude-plugin.zip.sha256
187
+ --asset opensocrates-1.1.3-claude-plugin.zip \
188
+ --checksum opensocrates-1.1.3-claude-plugin.zip.sha256
127
189
  ```
128
190
 
129
191
  Replace `claude` with `codex` for the Codex package.
@@ -138,9 +200,13 @@ what is installed, remove it explicitly:
138
200
  ```bash
139
201
  claude plugin uninstall opensocrates@OpenSocrates --scope user
140
202
  claude plugin marketplace remove OpenSocrates --scope user
141
- npx --yes opensocrates@1.1.0 install --host claude
203
+ npx --yes opensocrates@1.1.3 install --host claude
142
204
  ```
143
205
 
206
+ Updating a managed v1.1.0 Claude installation replaces the complete package
207
+ tree. Its old 48 top-level method skills, `rigor`, `trace`, and duplicate
208
+ commands are therefore removed rather than left visible as stale entries.
209
+
144
210
  ## Use
145
211
 
146
212
  Use Claude or Codex normally. Before a submitted prompt, OpenSocrates may
@@ -151,14 +217,43 @@ reasoning process. When it intervenes, it:
151
217
  1. starts a fresh, non-persistent selector in the current host;
152
218
  2. chooses from the authored 48-system catalog;
153
219
  3. writes the complete selected content to an owner-only temporary Markdown
154
- file; and
155
- 4. adds a small hidden context message telling the active task to read it.
220
+ file;
221
+ 4. adds a bounded hidden context message with each method ID, content revision,
222
+ and, when they fit, its exact `Do not use when` and `Stop conditions`; and
223
+ 5. requires the active task to read the complete file before applying the
224
+ method and to end a grounded response with an exact audit line such as
225
+ `OpenSocrates grounding: triangulation@1`.
226
+
227
+ On Claude hook surfaces, a Read-only `PostToolUse` hook records an authenticated
228
+ receipt only when the exact current-turn file is read from its first line
229
+ through a terminal marker. At `Stop`, a missing receipt or audit line requests
230
+ one bounded repair pass; `stop_hook_active` prevents a continuation loop. A
231
+ partial, truncated, failed, or wrong-file read is not accepted. Claude Chat
232
+ does not run these hooks, so its grounding contract remains skills-only.
233
+
234
+ The receipt records that a successful `Read` callback for that exact file
235
+ returned content reaching the terminal marker. It is not a proof that every byte
236
+ was delivered, and the gate fails open. See [SECURITY.md](SECURITY.md) for the
237
+ boundary this does and does not defend.
156
238
 
157
239
  There is no fixed selection-count limit. The selector has a 30-second internal
158
240
  deadline, does not retry, and fails open. A timeout, host error, invalid output,
159
241
  non-intervention decision, unsafe context, or unavailable hook produces no
160
242
  injection and does not block the user's task.
161
243
 
244
+ On Claude, explicitly invoke the same controller when desired:
245
+
246
+ ```text
247
+ /opensocrates <request>
248
+ /opensocrates auto <request>
249
+ /opensocrates trace
250
+ /opensocrates status
251
+ ```
252
+
253
+ Only `/opensocrates` appears in Claude's skill and command UI. The controller
254
+ selects and loads internal method references; users do not need to browse the
255
+ 48-system implementation catalog.
256
+
162
257
  The Claude selector uses one `claude --safe-mode -p` process with no session
163
258
  persistence. Safe mode disables user, project, and plugin customizations:
164
259
  `CLAUDE.md`, skills, plugins, hooks, MCP servers, custom commands, and agents.
@@ -195,9 +290,20 @@ telemetry, store an API key, or execute the user's requested task.
195
290
  Temporary instruction files contain authored OpenSocrates content only. Raw
196
291
  prompts, transcripts, workspace files, tool data, credentials, and selector
197
292
  reasoning are not written to OpenSocrates records, logs, metrics, diagnostics,
198
- or instruction files. Turn files are removed on `Stop`, remaining session
199
- files on `SessionEnd`, and crash leftovers older than 24 hours on
200
- `SessionStart`.
293
+ or instruction files. The complete Read response is inspected only in memory
294
+ for its terminal marker and is not retained. The owner-only grounding receipt
295
+ stores only an artifact digest, content revision, selected method IDs, and
296
+ keyed authentication/tool-use tags—never a prompt, tool output, workspace path,
297
+ or artifact path. Turn files and receipts are removed on `Stop`. If `Stop` never
298
+ arrives, the next `UserPromptSubmit` in the same session removes every prior
299
+ `prompt_id` tree before selecting for the new turn while preserving the new
300
+ active tree. `SessionEnd` removes anything still left in the session, and the
301
+ next `SessionStart` removes crash leftovers older than 24 hours.
302
+
303
+ When enabled, the updater stores only desired lifecycle state and the concise
304
+ receipt described above, under owner-only permissions. It does not inspect or
305
+ terminate running Claude or Codex sessions; a running task keeps its loaded
306
+ plugin, and a new task naturally loads the reconciled version.
201
307
 
202
308
  See [SECURITY.md](SECURITY.md) for vulnerability reporting and the measured
203
309
  support boundary.
@@ -208,6 +314,26 @@ The source repository intentionally excludes native binaries and intermediate
208
314
  build output. Install [uv](https://docs.astral.sh/uv/), Python 3.12, and Node.js
209
315
  20 or later, then run:
210
316
 
317
+ Before merging a release candidate, follow the
318
+ [clean Apple-silicon Mac acceptance procedure](docs/clean-machine-acceptance.md)
319
+ to exercise the real authenticated Claude Code and Codex homes and return a
320
+ privacy-safe evidence bundle.
321
+
322
+ The selector's authenticated Claude subprocess contract has a separate
323
+ [opt-in check](docs/real-claude-selector.md). The authenticated v1.1.2 receipt
324
+ passes the real subprocess isolation and structured-output contract; the live
325
+ call is never rerun by the ordinary offline suite.
326
+
327
+ Repeated `--max-turns 1` structured-output behavior has a separate
328
+ [aggregate reliability matrix](docs/claude-structured-output-reliability.md).
329
+ The authenticated Claude Code 2.1.226 `host-default` row passed 20/20 attempts;
330
+ no unobserved named model is claimed supported.
331
+
332
+ Packaged Claude PostToolUse receipt and Stop cleanup latency has a reproducible
333
+ [Apple-silicon timing receipt](docs/claude-hook-timing.md). The observed v1.1.2
334
+ p95 results retain more than half of the 3-second hook budget, so the timeout is
335
+ unchanged.
336
+
211
337
  ```bash
212
338
  make bootstrap
213
339
  make format-check
package/SECURITY.md CHANGED
@@ -41,6 +41,11 @@ OpenSocrates 1.x:
41
41
  - does not require or store an Anthropic or OpenAI API key;
42
42
  - does not host an OpenSocrates backend or add telemetry;
43
43
  - verifies downloadable packages with SHA-256 release and package manifests;
44
+ - keeps cross-host activation transactional and restores prior managed
45
+ registrations when a coordinated activation fails;
46
+ - leaves scheduled updates disabled until explicitly enabled and stores only
47
+ owner-readable desired state, a single-instance lock, and content-free update
48
+ receipts;
44
49
  - fails open when the selector cannot safely complete.
45
50
 
46
51
  The Claude selector runs a bounded, non-persistent `claude --safe-mode -p`
@@ -74,7 +79,45 @@ authored catalog content assembled by OpenSocrates is ever injected. Operators
74
79
  who cannot accept managed-hook visibility of the selector prompt should not
75
80
  enable OpenSocrates selection on those machines.
76
81
 
82
+ On Claude surfaces that deliver the packaged hooks, the grounding gate observes
83
+ only successful `Read` callbacks for the current turn's exact instruction file.
84
+ It transiently checks that the response reached an authored terminal marker and
85
+ does not retain the response. The owner-only authenticated receipt stores only
86
+ the artifact digest, content revision, selected method IDs, and keyed
87
+ authentication/tool-use tags; prompts, transcripts, raw tool output,
88
+ credentials, workspace paths, and artifact paths are excluded. `Stop` removes
89
+ the receipt with the turn artifact. If `Stop` is absent, the next
90
+ `UserPromptSubmit` in that session removes prior prompt trees without touching
91
+ the new active tree. `SessionEnd` remains the session backstop, and the
92
+ 24-hour `SessionStart` sweep covers crash leftovers when neither event arrives.
93
+
94
+ The gate's scope is deliberate and worth stating plainly. It establishes that a
95
+ successful `Read` callback naming the exact current-turn artifact returned
96
+ content reaching the authored terminal marker. It does not cryptographically
97
+ prove that every artifact byte was returned: a synthetic payload carrying only
98
+ the marker would satisfy the marker test. That is not reachable by the model,
99
+ which does not author `tool_response`, and the marker is the artifact's last
100
+ line, so a truncated read loses it. Anything able to forge that callback already
101
+ controls the hook's standard input and is outside the boundary this gate
102
+ defends. The gate raises the cost of an ungrounded answer; it is not a proof of
103
+ delivery, and it fails open by design.
104
+
105
+ The optional macOS LaunchAgent invokes the selected published npm channel and
106
+ then uses the same verified installer path as a manual update. It does not read
107
+ or terminate active Claude or Codex sessions. Its receipt contains only the
108
+ checked version, timestamp, per-host result, and an error category; prompts,
109
+ transcripts, workspace paths, credentials, and raw error output are excluded.
110
+ Automatic major-version upgrades are disabled unless the user explicitly
111
+ changes that policy.
112
+
113
+ Installer rollback mutates only its owner-marked managed marketplace root. If
114
+ the failed root cannot be removed and the previous backup therefore cannot be
115
+ renamed into place, the installer preserves that backup and prints quoted,
116
+ executable recovery commands naming only those two managed paths.
117
+
77
118
  Signing, notarization, clean-machine installation, platforms other than
78
119
  `darwin-arm64`, Claude Chat automatic hooks, and live delivery on every host
79
- surface are not claimed as validated. See the release limitations file for the
80
- complete measured boundary.
120
+ surface are not claimed as validated. Native plugin archives ship only
121
+ `bin/launch.sh`; it rejects macOS Intel, Linux, Windows, and every other target,
122
+ and no PowerShell launcher is included. See the release limitations file for
123
+ the complete measured boundary.
package/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.0
1
+ 1.1.3