total-recall-brain 3.40.7 → 3.41.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/bin/total-recall-memory.mjs +0 -0
- package/bin/total-recall.mjs +9 -40
- package/docs/reference/cli-reference.md +65 -1
- package/frontend/dist/assets/{index-AGUes-VG.css → index-BG9NkVUy.css} +1 -1
- package/frontend/dist/assets/{index-Bt5iVPZj.js → index-BtuiZqwP.js} +20 -7
- package/frontend/dist/index.html +2 -2
- package/frontend/src/components/plugins/PluginPanel.tsx +31 -5
- package/frontend/src/components/plugins/card/CardEngine.tsx +15 -23
- package/frontend/src/components/plugins/card/CardScenes.tsx +52 -23
- package/frontend/src/components/plugins/card/card.css +2 -5
- package/frontend/src/components/plugins/card/contract.ts +13 -19
- package/frontend/src/components/plugins/card/format.ts +8 -1
- package/frontend/src/components/plugins/card/widgets.tsx +4 -35
- package/frontend/src/components/plugins/plugin-frame.ts +30 -3
- package/frontend/src/pages/PluginsPage.tsx +3 -2
- package/package.json +1 -1
- package/scaffold/.agent/skills/plugin/SKILL.md +110 -0
- package/scaffold/.agent/skills/plugin/evals/README.md +53 -0
- package/scaffold/.agent/skills/plugin/evals/cases/01-fabricated-seed.mjs +42 -0
- package/scaffold/.agent/skills/plugin/evals/cases/02-reassuring-default.mjs +39 -0
- package/scaffold/.agent/skills/plugin/evals/cases/03-declared-template.mjs +32 -0
- package/scaffold/.agent/skills/plugin/evals/cases/04-card-collects-credential.mjs +46 -0
- package/scaffold/.agent/skills/plugin/evals/cases/05-host-leak-in-scaffold.mjs +55 -0
- package/scaffold/.agent/skills/plugin/evals/cases/06-correct-plugin.mjs +92 -0
- package/scaffold/.agent/skills/plugin/evals/run.mjs +118 -0
- package/scaffold/.agent/skills/plugin/prompts/01-function.md +29 -0
- package/scaffold/.agent/skills/plugin/prompts/02-surfaces.md +43 -0
- package/scaffold/.agent/skills/plugin/prompts/03-scaffold.md +31 -0
- package/scaffold/.agent/skills/plugin/prompts/04-cli.md +49 -0
- package/scaffold/.agent/skills/plugin/prompts/05-credentials.md +41 -0
- package/scaffold/.agent/skills/plugin/prompts/06-card.md +46 -0
- package/scaffold/.agent/skills/plugin/prompts/07-scaffold.md +52 -0
- package/scaffold/.agent/skills/plugin/prompts/08-verify.md +43 -0
- package/scaffold/.agent/skills/plugin/references/anti-patterns.md +123 -0
- package/scaffold/.agent/skills/plugin/references/card.md +90 -0
- package/scaffold/.agent/skills/plugin/references/scaffold.md +120 -0
- package/scaffold/.agent/skills/plugin/references/surfaces.md +206 -0
- package/scaffold/.agent/skills/plugin/scripts/record.mjs +360 -0
- package/scaffold/.agent/skills/plugin/subagents/card-designer.md +60 -0
- package/scaffold/.agent/skills/plugin/subagents/plugin-reviewer.md +55 -0
- package/scaffold/.agent/skills/plugin/subagents/scaffold-extractor.md +71 -0
- package/scaffold/.agent/skills/total-recall/plugins/auth/package-lock.json +71 -1441
- package/scaffold/.agent/skills/total-recall/plugins/auth/package.json +7 -5
- package/scaffold/.agent/skills/total-recall/plugins/auth/plugin.json +3 -44
- package/scaffold/.agent/skills/total-recall/plugins/auth/scripts/agent-login-pty.py +185 -0
- package/scaffold/.agent/skills/total-recall/plugins/auth/src/cli-secret.mjs +20 -1
- package/scaffold/.agent/skills/total-recall/plugins/auth/src/host-secrets-store.mjs +15 -0
- package/scaffold/.agent/skills/total-recall/plugins/auth/src/secrets-env-export.mjs +6 -4
- package/scaffold/.agent/skills/total-recall/plugins/auth/src/secrets-remote-deploy.mjs +1 -0
- package/scaffold/.agent/skills/total-recall/plugins/cli-agents/plugin.json +0 -24
- package/scaffold/.agent/skills/total-recall/plugins/code-quality/package-lock.json +4 -4
- package/scaffold/.agent/skills/total-recall/plugins/code-quality/plugin.json +0 -21
- package/scaffold/.agent/skills/total-recall/plugins/composable-cli/package-lock.json +4 -4
- package/scaffold/.agent/skills/total-recall/plugins/composable-cli/plugin.json +0 -32
- package/scaffold/.agent/skills/total-recall/plugins/embeddings/package-lock.json +4 -4
- package/scaffold/.agent/skills/total-recall/plugins/embeddings/plugin.json +11 -0
- package/scaffold/.agent/skills/total-recall/plugins/git-sentinel/README.md +5 -2
- package/scaffold/.agent/skills/total-recall/plugins/git-sentinel/package-lock.json +4 -4
- package/scaffold/.agent/skills/total-recall/plugins/git-sentinel/plugin.json +1 -28
- package/scaffold/.agent/skills/total-recall/plugins/git-sentinel/ui/DESIGN.md +95 -13
- package/scaffold/.agent/skills/total-recall/plugins/git-sentinel/ui/card.js +553 -340
- package/scaffold/.agent/skills/total-recall/plugins/mesh/plugin.json +0 -36
- package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/card.js +383 -400
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/package-lock.json +4 -4
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/package.json +0 -1
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/plugin.json +0 -28
- package/scaffold/.agent/skills/total-recall/plugins/security/package-lock.json +4 -4
- package/scaffold/.agent/skills/total-recall/plugins/security/plugin.json +0 -32
- package/scaffold/.agent/skills/total-recall/references/auth.md +3 -1
- package/scaffold/.agent/skills/total-recall/references/memory.md +4 -0
- package/scaffold/.agent/skills/total-recall/references/openwiki.md +2 -0
- package/scaffold/.agent/skills/total-recall/references/operations.md +12 -0
- package/src/cli/brain.mjs +4 -2
- package/src/cli/context-stats.mjs +104 -0
- package/src/cli/context.mjs +8 -0
- package/src/cli/daemon.mjs +10 -1
- package/src/cli/export.mjs +3 -2
- package/src/cli/ingest-okf.mjs +12 -15
- package/src/cli/init.mjs +0 -85
- package/src/cli/lint.mjs +3 -2
- package/src/cli/plugin/copies.mjs +68 -0
- package/src/cli/plugin/create.mjs +22 -24
- package/src/cli/plugin/index.mjs +49 -3
- package/src/cli/plugin/search.mjs +19 -2
- package/src/cli/rebuild.mjs +2 -0
- package/src/cli/remember.mjs +23 -0
- package/src/cli/status.mjs +10 -3
- package/src/cli/update.mjs +3 -2
- package/src/core/action-predictor.mjs +161 -0
- package/src/core/app-deploy/runtime-cli/node.mjs.tmpl +20 -3
- package/src/core/app-deploy/source.mjs +16 -9
- package/src/core/automatic-brain-updates.mjs +6 -3
- package/src/core/brain-registry.mjs +19 -2
- package/src/core/brain-state.mjs +23 -0
- package/src/core/cli-commands.mjs +1 -0
- package/src/core/cli-maintenance.mjs +1 -1
- package/src/core/cli-semantic-index.mjs +1 -1
- package/src/core/command-surface.mjs +3 -3
- package/src/core/composed-command-resolution.mjs +21 -0
- package/src/core/config.mjs +84 -0
- package/src/core/confined-memory.mjs +93 -0
- package/src/core/context-telemetry.mjs +214 -0
- package/src/core/daemon-control.mjs +14 -43
- package/src/core/fast-recall.mjs +1 -1
- package/src/core/memory-brain.mjs +2 -0
- package/src/core/plugin-activation.mjs +38 -6
- package/src/core/plugin-bundle.mjs +54 -0
- package/src/core/plugin-catalog.mjs +1 -1
- package/src/core/plugin-context.mjs +1 -1
- package/src/core/plugin-contracts/card.mjs +69 -37
- package/src/core/plugin-loader.mjs +5 -6
- package/src/core/plugin-runner.mjs +13 -6
- package/src/core/plugin-runtime.mjs +5 -4
- package/src/core/plugin-setup.mjs +5 -3
- package/src/core/plugin-state-store.mjs +12 -1
- package/src/core/plugin-state.mjs +46 -5
- package/src/core/plugin-store.mjs +78 -3
- package/src/core/plugin-tasks.mjs +3 -1
- package/src/core/plugin-updates.mjs +117 -0
- package/src/core/plugin-vendor.mjs +10 -4
- package/src/core/project-brain.mjs +14 -41
- package/src/core/project-id.mjs +4 -1
- package/src/core/required-plugins.mjs +151 -13
- package/src/core/skills-registry.mjs +27 -3
- package/src/core/ssss-kernel-bridge.mjs +3 -1
- package/src/core/startup-health.mjs +66 -16
- package/src/core/surface.mjs +51 -44
- package/src/core/testing/plugin-fixture.mjs +69 -0
- package/src/core/vault-files.mjs +13 -0
- package/src/core/vault.mjs +4 -30
- package/src/server/index.mjs +13 -1
- package/src/server/invoke-decision-child.mjs +49 -0
- package/src/server/invoke-execution.mjs +87 -0
- package/src/server/invoke-policy.mjs +64 -0
- package/src/server/invoke-read-child.mjs +26 -0
- package/src/server/invoke-targets.mjs +49 -0
- package/src/server/invoke-write-child.mjs +19 -0
- package/src/server/routes/invoke.mjs +314 -0
- package/src/server/routes/plugins.mjs +1 -1
- package/scaffold/.agent/skills/plugins/SKILL.md +0 -57
- package/scaffold/.agent/skills/plugins/references/card-design.md +0 -55
- package/scaffold/.agent/skills/plugins/references/distribution.md +0 -23
- package/scaffold/.agent/skills/plugins/references/manifest-contract.md +0 -90
- package/scaffold/.agent/skills/plugins/references/optimized/index.md +0 -9
- package/scaffold/.agent/skills/plugins/references/optimized/manifest.json +0 -35
- package/scaffold/.agent/skills/plugins/references/optimized/original.md +0 -58
- package/scaffold/.agent/skills/plugins/references/optimized/section-01.md +0 -5
- package/scaffold/.agent/skills/plugins/references/optimized/section-02.md +0 -25
- package/scaffold/.agent/skills/plugins/references/optimized/section-03.md +0 -12
- package/scaffold/.agent/skills/plugins/references/optimized/section-04.md +0 -7
- package/scaffold/.agent/skills/plugins/references/optimized/section-05.md +0 -5
- package/scaffold/.agent/skills/total-recall/openwiki/README.md +0 -10
- package/scaffold/.agent/skills/total-recall/openwiki/architecture.md +0 -5
- package/scaffold/.agent/skills/total-recall/openwiki/ide.md +0 -10
- package/scaffold/.agent/skills/total-recall/openwiki/memory.md +0 -11
- package/scaffold/.agent/skills/total-recall/openwiki/secrets.md +0 -7
- package/scaffold/.agent/skills/total-recall/openwiki/skills.md +0 -7
- package/scaffold/openwiki/README.md +0 -10
- package/scaffold/openwiki/architecture.md +0 -5
- package/scaffold/openwiki/ide.md +0 -10
- package/scaffold/openwiki/memory.md +0 -11
- package/scaffold/openwiki/secrets.md +0 -7
- package/scaffold/openwiki/skills.md +0 -7
- package/src/core/okf-adapter.mjs +0 -559
- package/templates/openwiki/README.md +0 -10
- package/templates/openwiki/architecture.md +0 -5
- package/templates/openwiki/ide.md +0 -10
- package/templates/openwiki/memory.md +0 -11
- package/templates/openwiki/secrets.md +0 -7
- package/templates/openwiki/skills.md +0 -7
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: plugin-reviewer
|
|
3
|
+
inputs: a plugin repository path
|
|
4
|
+
returns: violations with evidence, or "clean"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Subagent — plugin reviewer
|
|
8
|
+
|
|
9
|
+
Adversarial review of a plugin claimed finished. Your job is to **find what is wrong**, not to confirm.
|
|
10
|
+
|
|
11
|
+
Do not fix anything. Report only. A report with no violations must say why it is confident.
|
|
12
|
+
|
|
13
|
+
## What to attack
|
|
14
|
+
|
|
15
|
+
Work from the [anti-patterns](../references/anti-patterns.md) catalogue. It is the record of every failure actually found in this ecosystem, so it is the highest-yield place to look.
|
|
16
|
+
|
|
17
|
+
**Fabrication.** Seeded readings, invented API results, hard-coded status claims, fixed text where a command belongs. Grep the card and the CLI for literals that could be a fabricated value: a hostname, a percentage, a latency, a status word, a session id.
|
|
18
|
+
|
|
19
|
+
**Reassuring defaults.** A default that reports success, health or cleanliness the plugin has not verified. This is the most damaging pattern found: a card read three fields the command never returns and defaulted to `"Up to date"`, so a repository with three unpushed commits rendered as clean. For every value on the card, trace it to the command field it came from — and prove the field exists in the command's real output.
|
|
20
|
+
|
|
21
|
+
**Credential violations.** A second store; a secret in `argv`; a secret in a log or stdout; an input that accepts a key; error text telling the user to install another product.
|
|
22
|
+
|
|
23
|
+
**Templates.** A `card_layout`; a region or widget list; a face that would suit a different plugin; screens derived from the command list rather than the plugin's tasks.
|
|
24
|
+
|
|
25
|
+
**Host leaks in a scaffold.** Any `total-recall` reference, `TOTAL_RECALL_BIN`, or auth-store read reachable from `capability/`. Any `ui/` file in the scaffold payload.
|
|
26
|
+
|
|
27
|
+
**Values that break elsewhere.** `example.com`, an author's default amount or name, an example currency.
|
|
28
|
+
|
|
29
|
+
**Presentation.** Render the face on the real dark tokens at 360, 768 and 1280 px. Look for: a severity colour beside a figure that contradicts it; colour-only severity; overflow; a selection style colliding with a severity border; dead CSS; a value rendered twice.
|
|
30
|
+
|
|
31
|
+
**Stale docs.** A README describing a bug that is fixed, or a capability that does not exist.
|
|
32
|
+
|
|
33
|
+
## Method
|
|
34
|
+
|
|
35
|
+
1. Run `node ../scripts/record.mjs <path> --json` and read every failure.
|
|
36
|
+
2. `total-recall plugin info <id>` — read the errors and warnings.
|
|
37
|
+
3. For each value the card shows, find the command field behind it. If you cannot, that is a violation.
|
|
38
|
+
4. Read the CLI for `--help` without credentials, `--json` on every subcommand, non-zero exit on failure.
|
|
39
|
+
5. Render the face and look at it. Do not review a face you have not seen.
|
|
40
|
+
6. Read the tests. A test that injects a fake credential path proves logic, not the contract.
|
|
41
|
+
|
|
42
|
+
## Report format
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
VERDICT: violations found | clean
|
|
46
|
+
|
|
47
|
+
[severity] category — file:line
|
|
48
|
+
what is wrong
|
|
49
|
+
evidence: the exact command output, grep result or rendered observation
|
|
50
|
+
why it matters: which invariant it breaks
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Severity is `critical` (fabrication, credential leak, host leak, data loss), `high` (template, misleading default, dead documentation), `medium` (presentation, accessibility), `low` (copy).
|
|
54
|
+
|
|
55
|
+
If you report `clean`, state which checks you ran and what you could not check. "Looks fine" is not a review.
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: scaffold-extractor
|
|
3
|
+
inputs: a plugin repository path
|
|
4
|
+
returns: capability module design and the builder entry point, or "not separable, because…"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Subagent — scaffold extractor
|
|
8
|
+
|
|
9
|
+
Extract a plugin's capability so a builder can put it into their own application.
|
|
10
|
+
|
|
11
|
+
Read [scaffold](../references/scaffold.md) first. It is the specification.
|
|
12
|
+
|
|
13
|
+
**A scaffold is not a copy of the plugin.** The plugin is the reference implementation; the scaffold is the capability, importable, with no Total Recall in it.
|
|
14
|
+
|
|
15
|
+
## First decide: is it separable?
|
|
16
|
+
|
|
17
|
+
Return **"not separable, because…"** when the capability genuinely cannot live outside Total Recall:
|
|
18
|
+
|
|
19
|
+
- it reads or writes the vault through SSSS contracts that only the host provides
|
|
20
|
+
- it *is* host behaviour — a runtime router, a context generator, a scheduler task
|
|
21
|
+
- it wraps Total Recall's own facilities rather than a domain
|
|
22
|
+
|
|
23
|
+
Do not force an extraction that would produce a hollow module. Say so plainly. Most plugins wrapping an external service are separable; most plugins extending the host are not.
|
|
24
|
+
|
|
25
|
+
## Then extract
|
|
26
|
+
|
|
27
|
+
Separate the repository into one source with two artifacts:
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
capability/ the payload: exported functions, no host
|
|
31
|
+
cli.mjs the adapter: parse argv, resolve credentials, call the capability, format
|
|
32
|
+
ui/ the face; Total Recall only
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Move the domain logic out of the CLI handlers: request construction, signature verification, payload building, response mapping.
|
|
36
|
+
|
|
37
|
+
The capability must be:
|
|
38
|
+
|
|
39
|
+
- **explicitly parameterised** — no `argv`, no `process.env`, no module-level singleton, no ambient credential
|
|
40
|
+
- **free of environment defaults** — a missing URL is the caller's error, never a silent `example.com`. Strip the author's defaults: `2000`, `"General Admission Ticket"`, `"usd"`
|
|
41
|
+
- **transport-injected** — accept a `fetchImpl` so the app uses its own client and tests run offline
|
|
42
|
+
- **returning data**, not printing text
|
|
43
|
+
- **throwing errors**, not setting `process.exitCode`
|
|
44
|
+
- **free of Total Recall** — no `total-recall`, no `TOTAL_RECALL_BIN`, no auth store, no `ui/`
|
|
45
|
+
|
|
46
|
+
Write `BRICK.md`: what to import, what to pass, where credentials come from, what comes back. Concrete code, not a description of a CLI.
|
|
47
|
+
|
|
48
|
+
## Prove it
|
|
49
|
+
|
|
50
|
+
The tests must demonstrate standalone operation, not assume it:
|
|
51
|
+
|
|
52
|
+
1. Load the capability in a process with `TOTAL_RECALL_BIN` unset and no auth store.
|
|
53
|
+
2. Call every exported function with caller-supplied arguments and an injected transport.
|
|
54
|
+
3. Assert no child process was spawned and no `total-recall` string is reachable from the payload.
|
|
55
|
+
4. Vendor into a clean application and run the suite there.
|
|
56
|
+
|
|
57
|
+
Evidence for why this matters: a vendored brick failed with `Auth credential read failed` once the Total Recall binary was absent, and 19 of 34 plugins export only `run`, so a builder must extract the logic by hand.
|
|
58
|
+
|
|
59
|
+
## Return
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
separable: yes | no — <reason>
|
|
63
|
+
capability/: <files and the exported functions>
|
|
64
|
+
cli.mjs: <how much logic moved out>
|
|
65
|
+
removed: <placeholders, author defaults, host calls, ui files>
|
|
66
|
+
BRICK.md: <the file>
|
|
67
|
+
standalone test: <the command and its real result>
|
|
68
|
+
unverified: <what you could not check>
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Never claim standalone operation without running it with Total Recall absent.
|