sphica 0.6.37 → 0.6.38
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/.claude-plugin/plugin.json +16 -2
- package/.codex-plugin/plugin.json +1 -1
- package/README.md +4 -3
- package/THIRD_PARTY_NOTICES.md +2 -2
- package/dist/deliver.js +4 -2
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://anthropic.com/claude-code/plugin.schema.json",
|
|
3
3
|
"name": "sphica",
|
|
4
|
-
"version": "0.6.
|
|
4
|
+
"version": "0.6.38",
|
|
5
5
|
"description": "Records Claude Code and Codex sessions on your machine and keeps past implementation and decisions, with their sources, for your agent to find.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "iroha924",
|
|
@@ -16,5 +16,19 @@
|
|
|
16
16
|
"decisions",
|
|
17
17
|
"sqlite"
|
|
18
18
|
],
|
|
19
|
-
"mcpServers": "./mcp/claude.json"
|
|
19
|
+
"mcpServers": "./mcp/claude.json",
|
|
20
|
+
"userConfig": {
|
|
21
|
+
"review_commands": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"title": "Review commands",
|
|
24
|
+
"description": "Your own review commands whose names do not contain \"review\", comma-separated. Each gets the decisions your local change touches. When empty, SPHICA_REVIEW_COMMANDS is used",
|
|
25
|
+
"default": ""
|
|
26
|
+
},
|
|
27
|
+
"auto_trace": {
|
|
28
|
+
"type": "boolean",
|
|
29
|
+
"title": "Automatic trace",
|
|
30
|
+
"description": "At the start of a new session, ask the agent to trace earlier sessions that wait to be traced. SPHICA_AUTO_TRACE=off keeps it off either way",
|
|
31
|
+
"default": true
|
|
32
|
+
}
|
|
33
|
+
}
|
|
20
34
|
}
|
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ The database is a single SQLite file on your machine.
|
|
|
20
20
|
|
|
21
21
|
- **Automatic recording.** Sphica keeps your prompts, the agent's final reply for each turn, and the paths of the files a turn changed (by the edit tools, or seen in `git status` at the turn's end).
|
|
22
22
|
- **Records with their sources.** `/sphica:trace` turns a session into records: decisions with the options rejected and why, constraints, implementations, findings, dead ends, and open questions. Every record quotes the exact words it came from. A decision counts as adopted in two ways: you said so (your decision), or the agent decided it itself in that session and its reply says so (an AI's decision). An AI's decision is shown as one, never replaces yours, and is never used for public interfaces, security and permissions, releases, or forgetting.
|
|
23
|
-
- **Traced without asking (Claude Code).** When you start a new session and sessions from the last 14 days wait to be traced, the agent is asked to trace up to two of them, oldest first, after your request is done. Run `/sphica:trace` yourself to keep something right away, and `/sphica:trace pending` for older sessions. To turn the automatic trace off, set `"SPHICA_AUTO_TRACE": "off"` under `env` in Claude Code's `settings.json`; recording and your own `/sphica:trace` keep working.
|
|
23
|
+
- **Traced without asking (Claude Code).** When you start a new session and sessions from the last 14 days wait to be traced, the agent is asked to trace up to two of them, oldest first, after your request is done. Run `/sphica:trace` yourself to keep something right away, and `/sphica:trace pending` for older sessions. To turn the automatic trace off, set the plugin's `auto_trace` option to false in `/config` (Claude Code 2.1.269 or later), or set `"SPHICA_AUTO_TRACE": "off"` under `env` in Claude Code's `settings.json`; recording and your own `/sphica:trace` keep working. Either one off keeps it off, so to turn it back on, clear both.
|
|
24
24
|
- **Pull requests too.** `/sphica:harvest <number>` keeps a GitHub pull request (body, comments, reviews, review comments, commits, and up to five issues the body says it closes) and records what it decided. A reviewer's suggestion stays a proposal unless the owner or a maintainer adopted it; a merge alone adopts nothing.
|
|
25
25
|
- **Evidence found later.** `/sphica:glean` adds evidence and corrections to existing records. It asks you for the source (an issue URL, the file and line, meeting notes) before saving; a claim without one is kept only as unsourced and never used as fact.
|
|
26
26
|
- **Forget what should not have been kept.** `/sphica:forget` removes the messages, pull request items, or file excerpts you pick, with their search entries and the bytes left in the database file, after you confirm in a dialog (if another session is reading the database, it asks you to run it again to finish clearing the bytes). Records that cited them are judged again and leave active when nothing else supports them; a record's own text stays as it was.
|
|
@@ -111,8 +111,9 @@ Without being asked, Sphica adds a few past records to what the agent sees, each
|
|
|
111
111
|
- At session start: the current work and project-wide constraints, and in Claude Code, when earlier sessions wait to be traced, a request to trace them after your request is done.
|
|
112
112
|
- On a prompt that names a recorded code symbol, file path, or option.
|
|
113
113
|
- Before the agent reads or edits a file a decision applies to, and before a shell command that names such a file (naming it is not proof the command reads it). A read shows each record once per session.
|
|
114
|
-
- Before a review (Claude Code only). When you run your own review command (any name containing `review`, or a name listed in the
|
|
115
|
-
environment variable
|
|
114
|
+
- Before a review (Claude Code only). When you run your own review command (any name containing `review`, or a name listed, comma-separated, in the plugin's
|
|
115
|
+
`review_commands` option in `/config` (Claude Code 2.1.269 or later) or the `SPHICA_REVIEW_COMMANDS` environment variable), it gets the decisions your local
|
|
116
|
+
change touches. When `review_commands` names any command, `SPHICA_REVIEW_COMMANDS` is not read. `/sphica:review` checks them itself.
|
|
116
117
|
|
|
117
118
|
In Codex the same happens at session start, on a prompt, before an `apply_patch` edit, and before a shell command that names such a file (Codex reads files through shell commands, so this covers reads).
|
|
118
119
|
There is no review hook in Codex: run `$sphica:review`.
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -83,7 +83,7 @@ This file is generated by `node scripts/third-party-notices.mjs`. Do not edit it
|
|
|
83
83
|
| path-key | 3.1.1 | MIT |
|
|
84
84
|
| path-to-regexp | 8.4.2 | MIT |
|
|
85
85
|
| pkce-challenge | 5.0.1 | MIT |
|
|
86
|
-
| proxy-addr | 2.0.
|
|
86
|
+
| proxy-addr | 2.0.8 | MIT |
|
|
87
87
|
| qs | 6.16.0 | BSD-3-Clause |
|
|
88
88
|
| range-parser | 1.3.0 | MIT |
|
|
89
89
|
| raw-body | 3.0.2 | MIT |
|
|
@@ -2511,7 +2511,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
2511
2511
|
SOFTWARE.
|
|
2512
2512
|
```
|
|
2513
2513
|
|
|
2514
|
-
## proxy-addr 2.0.
|
|
2514
|
+
## proxy-addr 2.0.8
|
|
2515
2515
|
|
|
2516
2516
|
SPDX: MIT
|
|
2517
2517
|
Source: jshttp/proxy-addr
|
package/dist/deliver.js
CHANGED
|
@@ -12949,7 +12949,9 @@ function reviewCall(input) {
|
|
|
12949
12949
|
const lower = name.toLowerCase();
|
|
12950
12950
|
if (lower === "sphica:review")
|
|
12951
12951
|
return null;
|
|
12952
|
-
const
|
|
12952
|
+
const names = (list) => (list ?? "").split(",").map((n) => n.trim().toLowerCase()).filter((n) => NAME.test(n));
|
|
12953
|
+
const option = names(process.env.CLAUDE_PLUGIN_OPTION_REVIEW_COMMANDS);
|
|
12954
|
+
const named = option.length > 0 ? option : names(process.env.SPHICA_REVIEW_COMMANDS);
|
|
12953
12955
|
if (!named.includes(lower) && !lower.includes("review"))
|
|
12954
12956
|
return null;
|
|
12955
12957
|
return { name, args: typeof args === "string" ? args.slice(0, 1000) : "" };
|
|
@@ -13531,7 +13533,7 @@ async function deliver(input, host = "claude-code", file = dbFile()) {
|
|
|
13531
13533
|
key: place.key,
|
|
13532
13534
|
host,
|
|
13533
13535
|
subagent: name === "SubagentStart",
|
|
13534
|
-
auto: host === "claude-code" && name === "SessionStart" && input.source === "startup" && process.env.CLAUDE_CODE_ENTRYPOINT === "cli" && !
|
|
13536
|
+
auto: host === "claude-code" && name === "SessionStart" && input.source === "startup" && process.env.CLAUDE_CODE_ENTRYPOINT === "cli" && ![process.env.CLAUDE_PLUGIN_OPTION_AUTO_TRACE, process.env.SPHICA_AUTO_TRACE].some((v) => AUTO_TRACE_OFF.has((v ?? "").trim().toLowerCase())) ? session : null,
|
|
13535
13537
|
owner: name !== "SubagentStart" && isOwnerTurn(input, undefined, undefined, host === "codex" ? process.env.CODEX_THREAD_ID : undefined)
|
|
13536
13538
|
}),
|
|
13537
13539
|
reason: name === "SubagentStart" ? "subagent" : input.source && START_SOURCES.has(input.source) ? input.source : null
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sphica",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.38",
|
|
4
4
|
"description": "Records Claude Code and Codex sessions on your machine and keeps past implementation and decisions, with their sources, for your agent to find.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|