total-recall-brain 3.44.0 → 3.46.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.mjs +10 -6
- package/docs/ARCHITECTURE.md +10 -7
- package/docs/reference/cli-reference.md +13 -8
- package/frontend/dist/assets/index-BRYE1jmv.css +1 -0
- package/frontend/dist/assets/index-D1goIPjC.js +5598 -0
- package/frontend/dist/index.html +2 -2
- package/frontend/dist/sw.js +5 -4
- package/frontend/src/App.tsx +185 -238
- package/frontend/src/api/auth-inventory.ts +62 -0
- package/frontend/src/api/memory.ts +13 -8
- package/frontend/src/api/plugin-credentials.ts +23 -0
- package/frontend/src/api/plugins.ts +37 -53
- package/frontend/src/api/workspace-drawers.ts +97 -0
- package/frontend/src/components/BrainSelector.tsx +9 -3
- package/frontend/src/components/plugins/PluginPanel.tsx +83 -42
- package/frontend/src/components/plugins/PluginSettings.tsx +10 -20
- package/frontend/src/components/plugins/PluginWorkspace.tsx +367 -0
- package/frontend/src/components/plugins/ScopedPluginCommands.tsx +142 -0
- package/frontend/src/components/plugins/plugin-frame.ts +44 -33
- package/frontend/src/components/plugins/scoped-plugin-operations.ts +28 -0
- package/frontend/src/components/workspace/DrawerChat.tsx +110 -0
- package/frontend/src/components/workspace/DrawerLayout.tsx +196 -0
- package/frontend/src/components/workspace/DrawerMarkup.tsx +49 -0
- package/frontend/src/components/workspace/PluginChunkLibrary.tsx +92 -0
- package/frontend/src/components/workspace/PluginHome.tsx +76 -0
- package/frontend/src/components/workspace/WorkspaceDrawers.tsx +96 -0
- package/frontend/src/components/workspace/WorkspacePage.tsx +95 -0
- package/frontend/src/components/workspace/usePluginDesign.ts +38 -0
- package/frontend/src/index.css +409 -136
- package/frontend/src/pages/HelpPage.tsx +15 -46
- package/frontend/src/pages/MemoryPage.tsx +19 -36
- package/frontend/src/pages/SettingsPage.tsx +1 -1
- package/metadata.plugin.schema.json +53 -227
- package/package.json +1 -1
- package/scaffold/.agent/skills/plugin/SKILL.md +13 -11
- package/scaffold/.agent/skills/plugin/evals/README.md +14 -21
- package/scaffold/.agent/skills/plugin/evals/cases/01-fabricated-seed.mjs +15 -18
- package/scaffold/.agent/skills/plugin/evals/cases/02-reassuring-default.mjs +19 -24
- package/scaffold/.agent/skills/plugin/evals/cases/03-declared-template.mjs +12 -20
- package/scaffold/.agent/skills/plugin/evals/cases/04-home-collects-credential.mjs +35 -0
- package/scaffold/.agent/skills/plugin/evals/cases/05-host-leak-in-scaffold.mjs +8 -28
- package/scaffold/.agent/skills/plugin/evals/cases/06-correct-plugin.mjs +85 -47
- package/scaffold/.agent/skills/plugin/evals/run.mjs +17 -18
- package/scaffold/.agent/skills/plugin/prompts/05-credentials.md +4 -4
- package/scaffold/.agent/skills/plugin/prompts/07-scaffold.md +2 -2
- package/scaffold/.agent/skills/plugin/prompts/08-verify.md +4 -4
- package/scaffold/.agent/skills/plugin/references/anti-patterns.md +2 -2
- package/scaffold/.agent/skills/plugin/references/generative-home.md +38 -0
- package/scaffold/.agent/skills/plugin/references/scaffold.md +5 -5
- package/scaffold/.agent/skills/plugin/references/surfaces.md +13 -4
- package/scaffold/.agent/skills/plugin/scripts/record.mjs +75 -153
- package/scaffold/.agent/skills/plugin/subagents/plugin-reviewer.md +4 -4
- package/scaffold/.agent/skills/total-recall/plugins/auth/DESIGN.md +76 -0
- package/scaffold/.agent/skills/total-recall/plugins/auth/README.md +3 -1
- package/scaffold/.agent/skills/total-recall/plugins/auth/cli.mjs +20 -15
- package/scaffold/.agent/skills/total-recall/plugins/auth/package-lock.json +7 -7
- package/scaffold/.agent/skills/total-recall/plugins/auth/package.json +2 -1
- package/scaffold/.agent/skills/total-recall/plugins/auth/plugin.json +13 -51
- package/scaffold/.agent/skills/total-recall/plugins/auth/src/cli-secret.mjs +20 -1
- package/scaffold/.agent/skills/total-recall/plugins/auth/src/secrets-store.mjs +12 -1
- package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/access-overview.md +17 -0
- package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/agent-login.md +20 -0
- package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/baseline-audit.md +22 -0
- package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/credential-repository-binding.md +17 -0
- package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/credential-store-maintenance.md +17 -0
- package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/dashboard-password.md +18 -0
- package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/dashboard-sessions.md +18 -0
- package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/endpoint-probe.md +23 -0
- package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/google-sign-in.md +21 -0
- package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/mesh-machines.md +16 -0
- package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/passkey-enrollment.md +21 -0
- package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/registered-brains.md +16 -0
- package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/scoped-access-keys.md +17 -0
- package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/secret-inventory.md +25 -0
- package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/signing-key-rotation.md +22 -0
- package/scaffold/.agent/skills/total-recall/plugins/auth/ui/home.js +375 -0
- package/scaffold/.agent/skills/total-recall/plugins/automations/BRICK.md +7 -0
- package/scaffold/.agent/skills/total-recall/plugins/automations/DESIGN.md +53 -0
- package/scaffold/.agent/skills/total-recall/plugins/automations/LICENSE +21 -0
- package/scaffold/.agent/skills/total-recall/plugins/automations/README.md +66 -0
- package/scaffold/.agent/skills/total-recall/plugins/automations/adapters.mjs +247 -0
- package/scaffold/.agent/skills/total-recall/plugins/automations/capability/index.mjs +16 -0
- package/scaffold/.agent/skills/total-recall/plugins/automations/cli.mjs +130 -0
- package/{src/core/plugin-cron.mjs → scaffold/.agent/skills/total-recall/plugins/automations/cron.mjs} +1 -3
- package/scaffold/.agent/skills/total-recall/plugins/automations/inventory.mjs +88 -0
- package/scaffold/.agent/skills/total-recall/plugins/automations/package-lock.json +7661 -0
- package/scaffold/.agent/skills/total-recall/plugins/automations/package.json +36 -0
- package/scaffold/.agent/skills/total-recall/plugins/automations/plugin.json +151 -0
- package/scaffold/.agent/skills/total-recall/plugins/automations/scheduler.mjs +246 -0
- package/scaffold/.agent/skills/total-recall/plugins/automations/ui/automations.js +2 -0
- package/scaffold/.agent/skills/total-recall/plugins/automations/ui/chunks/control-ledger.md +42 -0
- package/scaffold/.agent/skills/total-recall/plugins/automations/ui/chunks/local-inventory-triage.md +17 -0
- package/scaffold/.agent/skills/total-recall/plugins/automations/ui/chunks/pending-control.md +39 -0
- package/scaffold/.agent/skills/total-recall/plugins/automations/ui/chunks/run-evidence.md +41 -0
- package/scaffold/.agent/skills/total-recall/plugins/automations/ui/chunks/schedule-vs-run-evidence.md +17 -0
- package/scaffold/.agent/skills/total-recall/plugins/automations/ui/chunks/source-coverage.md +41 -0
- package/scaffold/.agent/skills/total-recall/plugins/automations/ui/home.js +278 -0
- package/scaffold/.agent/skills/total-recall/plugins/code-quality/DESIGN.md +53 -0
- package/scaffold/.agent/skills/total-recall/plugins/code-quality/cli.mjs +23 -0
- package/scaffold/.agent/skills/total-recall/plugins/code-quality/commands/run-core.mjs +5 -3
- package/scaffold/.agent/skills/total-recall/plugins/code-quality/core/check.mjs +61 -7
- package/scaffold/.agent/skills/total-recall/plugins/code-quality/core/report-data.mjs +40 -14
- package/scaffold/.agent/skills/total-recall/plugins/code-quality/core/report.mjs +15 -40
- package/scaffold/.agent/skills/total-recall/plugins/code-quality/package-lock.json +7 -7
- package/scaffold/.agent/skills/total-recall/plugins/code-quality/package.json +2 -1
- package/scaffold/.agent/skills/total-recall/plugins/code-quality/plugin.json +40 -40
- package/scaffold/.agent/skills/total-recall/plugins/code-quality/ui/chunks/config.md +15 -0
- package/scaffold/.agent/skills/total-recall/plugins/code-quality/ui/chunks/detect.md +15 -0
- package/scaffold/.agent/skills/total-recall/plugins/code-quality/ui/chunks/gate.md +15 -0
- package/scaffold/.agent/skills/total-recall/plugins/code-quality/ui/chunks/init.md +15 -0
- package/scaffold/.agent/skills/total-recall/plugins/code-quality/ui/chunks/report.md +17 -0
- package/scaffold/.agent/skills/total-recall/plugins/code-quality/ui/chunks/run.md +17 -0
- package/scaffold/.agent/skills/total-recall/plugins/code-quality/ui/chunks/snapshot.md +15 -0
- package/scaffold/.agent/skills/total-recall/plugins/code-quality/ui/code-quality-report.mjs +55 -23
- package/scaffold/.agent/skills/total-recall/plugins/code-quality/ui/home.mjs +214 -0
- package/scaffold/.agent/skills/total-recall/plugins/composable-cli/DESIGN.md +146 -0
- package/scaffold/.agent/skills/total-recall/plugins/composable-cli/package-lock.json +7 -7
- package/scaffold/.agent/skills/total-recall/plugins/composable-cli/package.json +2 -1
- package/scaffold/.agent/skills/total-recall/plugins/composable-cli/plugin.json +51 -34
- package/scaffold/.agent/skills/total-recall/plugins/composable-cli/src/command.mjs +1 -1
- package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/chunks/create.md +35 -0
- package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/chunks/history.md +35 -0
- package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/chunks/library.md +49 -0
- package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/chunks/list.md +42 -0
- package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/chunks/promote.md +40 -0
- package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/chunks/read.md +25 -0
- package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/chunks/remove.md +26 -0
- package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/chunks/rollback.md +26 -0
- package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/chunks/show.md +53 -0
- package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/chunks/status.md +40 -0
- package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/chunks/test-path.md +38 -0
- package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/chunks/test.md +46 -0
- package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/chunks/update.md +32 -0
- package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/home.js +533 -0
- package/scaffold/.agent/skills/total-recall/plugins/embeddings/DESIGN.md +110 -0
- package/scaffold/.agent/skills/total-recall/plugins/embeddings/package-lock.json +7 -7
- package/scaffold/.agent/skills/total-recall/plugins/embeddings/package.json +2 -1
- package/scaffold/.agent/skills/total-recall/plugins/embeddings/plugin.json +13 -10
- package/scaffold/.agent/skills/total-recall/plugins/embeddings/ui/chunks/benchmark.md +49 -0
- package/scaffold/.agent/skills/total-recall/plugins/embeddings/ui/chunks/coverage.md +53 -0
- package/scaffold/.agent/skills/total-recall/plugins/embeddings/ui/chunks/models.md +43 -0
- package/scaffold/.agent/skills/total-recall/plugins/embeddings/ui/chunks/pull.md +41 -0
- package/scaffold/.agent/skills/total-recall/plugins/embeddings/ui/chunks/status.md +59 -0
- package/scaffold/.agent/skills/total-recall/plugins/embeddings/ui/home.js +353 -0
- package/scaffold/.agent/skills/total-recall/plugins/git/DESIGN.md +31 -0
- package/scaffold/.agent/skills/total-recall/plugins/git/README.md +136 -0
- package/scaffold/.agent/skills/total-recall/plugins/{git-sentinel → git}/cli.mjs +140 -24
- package/scaffold/.agent/skills/total-recall/plugins/{git-sentinel → git}/package-lock.json +9 -9
- package/scaffold/.agent/skills/total-recall/plugins/{git-sentinel → git}/package.json +4 -2
- package/scaffold/.agent/skills/total-recall/plugins/git/plugin.json +151 -0
- package/scaffold/.agent/skills/total-recall/plugins/git/src/lib/context.mjs +94 -0
- package/scaffold/.agent/skills/total-recall/plugins/git/src/lib/phase3-spec-support.mjs +50 -0
- package/scaffold/.agent/skills/total-recall/plugins/git/src/lib/runtime.mjs +40 -0
- package/scaffold/.agent/skills/total-recall/plugins/git/src/lib/spec-support.mjs +51 -0
- package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/_support.mjs +195 -0
- package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/auth.mjs +201 -0
- package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/bisect.mjs +40 -0
- package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/cli-meta.mjs +159 -0
- package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/commit-memory.mjs +54 -0
- package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/commit.mjs +46 -0
- package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/fleet.mjs +174 -0
- package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/force-push.mjs +58 -0
- package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/group.mjs +119 -0
- package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/handoff.mjs +59 -0
- package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/message.mjs +22 -0
- package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/resolve.mjs +60 -0
- package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/rules.mjs +81 -0
- package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/secret-firewall.mjs +92 -0
- package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/undo.mjs +156 -0
- package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/unmerged.mjs +182 -0
- package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/why.mjs +16 -0
- package/scaffold/.agent/skills/total-recall/plugins/git/ui/chunks/change-comparison.md +27 -0
- package/scaffold/.agent/skills/total-recall/plugins/git/ui/chunks/commit-identity.md +22 -0
- package/scaffold/.agent/skills/total-recall/plugins/git/ui/chunks/create-worktree.md +25 -0
- package/scaffold/.agent/skills/total-recall/plugins/git/ui/chunks/registered-worktrees.md +22 -0
- package/scaffold/.agent/skills/total-recall/plugins/git/ui/chunks/remove-worktree.md +23 -0
- package/scaffold/.agent/skills/total-recall/plugins/git/ui/chunks/repository-ledger.md +25 -0
- package/scaffold/.agent/skills/total-recall/plugins/git/ui/chunks/unmerged-work.md +22 -0
- package/scaffold/.agent/skills/total-recall/plugins/git/ui/chunks/upstream-divergence.md +17 -0
- package/scaffold/.agent/skills/total-recall/plugins/git/ui/chunks/worktree-conflict-triage.md +17 -0
- package/scaffold/.agent/skills/total-recall/plugins/git/ui/chunks/worktree-terminal.md +22 -0
- package/scaffold/.agent/skills/total-recall/plugins/git/ui/home.js +273 -0
- package/scaffold/.agent/skills/total-recall/plugins/mesh/DESIGN.md +35 -0
- package/scaffold/.agent/skills/total-recall/plugins/mesh/README.md +4 -5
- package/scaffold/.agent/skills/total-recall/plugins/mesh/cli.mjs +9 -3
- package/scaffold/.agent/skills/total-recall/plugins/mesh/package-lock.json +7 -7
- package/scaffold/.agent/skills/total-recall/plugins/mesh/package.json +2 -1
- package/scaffold/.agent/skills/total-recall/plugins/mesh/plugin.json +37 -39
- package/scaffold/.agent/skills/total-recall/plugins/mesh/src/cli/mesh.mjs +5 -3
- package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/active-device-dispatch.md +22 -0
- package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/control-probe.md +25 -0
- package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/control-server.md +22 -0
- package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/credential-readiness.md +23 -0
- package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/elected-leader.md +22 -0
- package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/enrollment-key.md +22 -0
- package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/file-receipt.md +25 -0
- package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/fleet-execution.md +23 -0
- package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/fleet-presence.md +23 -0
- package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/interactive-ssh.md +22 -0
- package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/local-enrollment.md +23 -0
- package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/mesh-policy.md +23 -0
- package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/network-atlas.md +25 -0
- package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/node-roster.md +26 -0
- package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/node-selection-proof.md +17 -0
- package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/owner-observations.md +23 -0
- package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/peer-path.md +23 -0
- package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/pinned-leader.md +24 -0
- package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/reachability-evidence-ladder.md +17 -0
- package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/recorded-login.md +23 -0
- package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/remote-execution.md +22 -0
- package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/secret-grants.md +26 -0
- package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/{card.js → home.js} +93 -22
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/DESIGN.md +86 -0
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/README.md +44 -9
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/capability/BRICK.md +1 -1
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/capability/index.mjs +18 -6
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/cli.mjs +128 -24
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/package-lock.json +7 -7
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/package.json +3 -2
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/plugin.json +188 -34
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/skills/meta-harness/SKILL.md +17 -3
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/adoption.mjs +2 -2
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/alerts.mjs +3 -3
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/cascade.mjs +92 -18
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/chat.mjs +80 -0
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/control.mjs +145 -0
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/coordinator.mjs +42 -21
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/dispatch-request.mjs +4 -2
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/dispatch.mjs +33 -9
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/documentation.mjs +55 -11
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/executor.mjs +26 -4
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/gate-adapters/hermes.mjs +29 -1
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/gate-adapters/index.mjs +1 -1
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/included-usage.mjs +1 -1
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/jobs.mjs +84 -0
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/learner.mjs +3 -12
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/maintenance.mjs +17 -0
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/mcp-server.mjs +228 -0
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/process-manager.mjs +25 -2
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/reasoning.mjs +1 -1
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/remote-operation.mjs +5 -1
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/review.mjs +34 -3
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/reviews.mjs +25 -0
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/router.mjs +1 -1
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/session/claude.mjs +319 -0
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/session/codex.mjs +387 -0
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/session/result.mjs +67 -0
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/session/resume.mjs +373 -0
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/session/run.mjs +223 -0
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/session-jobs.mjs +72 -0
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/setup.mjs +6 -3
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/termination.mjs +16 -12
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/threads.mjs +32 -1
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/usage-queue.mjs +1 -1
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/verify-ssss.mjs +3 -3
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/worker.mjs +285 -40
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/worktree.mjs +76 -9
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/chunks/adapter-docs-freshness.md +16 -0
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/chunks/chat-handoff.md +26 -0
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/chunks/fleet-maintenance.md +21 -0
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/chunks/harness-inventory.md +21 -0
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/chunks/included-access.md +18 -0
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/chunks/included-usage-verification.md +15 -0
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/chunks/independent-review.md +17 -0
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/chunks/managed-execution.md +20 -0
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/chunks/official-documentation.md +18 -0
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/chunks/quota-recovery.md +21 -0
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/chunks/review-routing-decision.md +16 -0
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/chunks/route-work.md +18 -0
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/chunks/routing-evidence.md +18 -0
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/chunks/run-ledger.md +18 -0
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/home.js +198 -0
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/DESIGN.md +75 -0
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/README.md +2 -0
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/cli.mjs +64 -32
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/package-lock.json +7 -7
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/package.json +2 -1
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/plugin.json +10 -44
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/src/generate.mjs +5 -4
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/src/graph.mjs +3 -4
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/src/ingest.mjs +23 -18
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/src/mesh-vaults.mjs +8 -3
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/src/refresh-diagnostics.mjs +44 -0
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/src/refresh.mjs +123 -113
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/src/search.mjs +3 -5
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/src/token.mjs +21 -47
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/src/upstream-watcher.mjs +17 -6
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/auto-refresh.md +18 -0
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/bootstrap-pages.md +18 -0
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/generate-wiki.md +21 -0
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/generator-settings.md +18 -0
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/host-probe.md +18 -0
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/ingest-preview.md +18 -0
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/link-hygiene.md +21 -0
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/link-topology.md +19 -0
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/passage-search.md +19 -0
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/propagation-plan.md +18 -0
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/provider-credentials.md +18 -0
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/refresh-report.md +18 -0
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/task-evidence.md +22 -0
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/upstream-record.md +18 -0
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/watch-upstream.md +18 -0
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/wiki-atlas.md +19 -0
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/panel.js +261 -513
- package/scaffold/.agent/skills/total-recall/plugins/security/DESIGN.md +84 -0
- package/scaffold/.agent/skills/total-recall/plugins/security/README.md +4 -2
- package/scaffold/.agent/skills/total-recall/plugins/security/cli.mjs +7 -19
- package/scaffold/.agent/skills/total-recall/plugins/security/package-lock.json +7 -7
- package/scaffold/.agent/skills/total-recall/plugins/security/package.json +2 -3
- package/scaffold/.agent/skills/total-recall/plugins/security/plugin.json +19 -52
- package/scaffold/.agent/skills/total-recall/plugins/security/ui/chunks/device-evidence.md +21 -0
- package/scaffold/.agent/skills/total-recall/plugins/security/ui/chunks/evidence-desk.md +18 -0
- package/scaffold/.agent/skills/total-recall/plugins/security/ui/chunks/guided-device-review.md +17 -0
- package/scaffold/.agent/skills/total-recall/plugins/security/ui/chunks/host-and-network.md +21 -0
- package/scaffold/.agent/skills/total-recall/plugins/security/ui/chunks/https-headers.md +17 -0
- package/scaffold/.agent/skills/total-recall/plugins/security/ui/chunks/mesh-coverage.md +18 -0
- package/scaffold/.agent/skills/total-recall/plugins/security/ui/chunks/private-security-tools.md +16 -0
- package/scaffold/.agent/skills/total-recall/plugins/security/ui/chunks/single-origin-header-check.md +17 -0
- package/scaffold/.agent/skills/total-recall/plugins/security/ui/chunks/source-review.md +21 -0
- package/scaffold/.agent/skills/total-recall/plugins/security/ui/chunks/ssh-permission-plan.md +17 -0
- package/scaffold/.agent/skills/total-recall/plugins/security/ui/home.js +283 -0
- package/scaffold/.agent/skills/total-recall/plugins/ssss/DESIGN.md +93 -0
- package/scaffold/.agent/skills/total-recall/plugins/ssss/package-lock.json +2 -2
- package/scaffold/.agent/skills/total-recall/plugins/ssss/package.json +2 -1
- package/scaffold/.agent/skills/total-recall/plugins/ssss/plugin.json +5 -3
- package/scaffold/.agent/skills/total-recall/plugins/ssss/ui/chunks/conformance.md +26 -0
- package/scaffold/.agent/skills/total-recall/plugins/ssss/ui/chunks/registry.md +37 -0
- package/scaffold/.agent/skills/total-recall/plugins/ssss/ui/chunks/repair.md +42 -0
- package/scaffold/.agent/skills/total-recall/plugins/ssss/ui/chunks/scaffold.md +33 -0
- package/scaffold/.agent/skills/total-recall/plugins/ssss/ui/chunks/status.md +43 -0
- package/scaffold/.agent/skills/total-recall/plugins/ssss/ui/chunks/validate.md +34 -0
- package/scaffold/.agent/skills/total-recall/plugins/ssss/ui/chunks/validation-diagnostics.md +17 -0
- package/scaffold/.agent/skills/total-recall/plugins/ssss/ui/chunks/workspace-registry-preflight.md +17 -0
- package/scaffold/.agent/skills/total-recall/plugins/ssss/ui/home.js +348 -0
- package/scaffold/.agent/skills/total-recall/references/operations.md +3 -1
- package/src/cli/agent.mjs +1 -1
- package/src/cli/api.mjs +3 -3
- package/src/cli/brief.mjs +3 -0
- package/src/cli/command.mjs +41 -2
- package/src/cli/config.mjs +16 -0
- package/src/cli/connect.mjs +2 -7
- package/src/cli/dream.mjs +93 -69
- package/src/cli/harness.mjs +4 -4
- package/src/cli/help.mjs +1 -1
- package/src/cli/init.mjs +0 -25
- package/src/cli/lessons.mjs +51 -0
- package/src/cli/memory-plugin.mjs +1 -1
- package/src/cli/plugin/chunks.mjs +145 -0
- package/src/cli/plugin/copies.mjs +64 -14
- package/src/cli/plugin/create.mjs +30 -59
- package/src/cli/plugin/index.mjs +31 -16
- package/src/cli/plugin/install.mjs +10 -15
- package/src/cli/plugin/remove.mjs +1 -1
- package/src/cli/plugin/search.mjs +2 -2
- package/src/cli/preflight.mjs +19 -6
- package/src/cli/proposals.mjs +1 -1
- package/src/cli/recall.mjs +66 -23
- package/src/cli/remember.mjs +3 -14
- package/src/cli/server.mjs +18 -0
- package/src/cli/setup.mjs +2 -9
- package/src/cli/start.mjs +1 -0
- package/src/cli/startup.mjs +19 -0
- package/src/cli/task.mjs +9 -2
- package/src/cli/update.mjs +6 -2
- package/src/core/access-ledger.mjs +78 -0
- package/src/core/agent-manager.mjs +2 -2
- package/src/core/app-deploy/design-tokens.mjs +14 -9
- package/src/core/app-deploy/ui-elements.mjs +1 -1
- package/src/core/brain-locate.mjs +15 -0
- package/src/core/brain-registry.mjs +5 -0
- package/src/core/brain-updates.mjs +35 -11
- package/src/core/claude-hooks.mjs +3 -1
- package/src/core/cleanup-task.mjs +15 -0
- package/src/core/cli-commands.mjs +2 -0
- package/src/core/cli-maintenance.mjs +4 -1
- package/src/core/cli-semantic-index.mjs +23 -3
- package/src/core/context-compiler.mjs +20 -0
- package/src/core/daemon-control.mjs +5 -1
- package/src/core/daemon-loop.mjs +39 -62
- package/src/core/dashboard-bundle.mjs +261 -0
- package/src/core/default-plugins.mjs +1 -1
- package/src/core/dream.mjs +33 -105
- package/src/core/ensure-dependencies.mjs +152 -0
- package/src/core/fast-recall.mjs +2 -2
- package/src/core/field-evaluation.mjs +23 -0
- package/src/core/gate-mode.mjs +1 -1
- package/src/core/harness-hooks.mjs +14 -2
- package/src/core/lesson-hooks.mjs +74 -0
- package/src/core/lesson-memory.mjs +24 -0
- package/src/core/lesson-sessions.mjs +52 -0
- package/src/core/lessons.mjs +96 -0
- package/src/core/memory-brain.mjs +30 -8
- package/src/core/meta-harness.mjs +2 -2
- package/src/core/optimizer.mjs +66 -165
- package/src/core/plugin-activation.mjs +63 -20
- package/src/core/plugin-contracts/{card.mjs → manifest.mjs} +26 -57
- package/src/core/plugin-contracts/startup-check.mjs +49 -0
- package/src/core/plugin-contracts/ui.mjs +9 -3
- package/src/core/plugin-distribution.mjs +6 -6
- package/src/core/plugin-lifecycle.mjs +58 -0
- package/src/core/plugin-loader.mjs +21 -8
- package/src/core/plugin-runner.mjs +21 -10
- package/src/core/plugin-runtime.mjs +40 -1
- package/src/core/plugin-startup-checks.mjs +44 -0
- package/src/core/plugin-state.mjs +19 -5
- package/src/core/plugin-store.mjs +64 -33
- package/src/core/post-mortem.mjs +52 -36
- package/src/core/preflight-gate.mjs +23 -2
- package/src/core/project-id.mjs +15 -5
- package/src/core/proposal-applier.mjs +31 -2
- package/src/core/repo-sync.mjs +4 -6
- package/src/core/required-plugins.mjs +57 -10
- package/src/core/rule-length.mjs +23 -0
- package/src/core/runtime.mjs +1 -1
- package/src/core/scheduler.mjs +35 -43
- package/src/core/schema.mjs +3 -2
- package/src/core/search.mjs +4 -3
- package/src/core/server-service.mjs +148 -0
- package/src/core/session-watcher.mjs +19 -1
- package/src/core/skill-gap.mjs +16 -0
- package/src/core/ssss-kernel-bridge.mjs +32 -4
- package/src/core/ssss-operation-service.mjs +1 -0
- package/src/core/startup-health.mjs +34 -4
- package/src/core/surface.mjs +65 -54
- package/src/core/task-executors.mjs +54 -106
- package/src/core/testing/plugin-fixture.mjs +22 -21
- package/src/core/throttled-fetch.mjs +25 -18
- package/src/core/ui-chunk-choice.mjs +77 -0
- package/src/core/ui-chunk.registry.json +23 -0
- package/src/core/ui-chunks.mjs +434 -0
- package/src/core/validated-write.mjs +1 -0
- package/src/core/vault-cache.mjs +58 -59
- package/src/core/vector-field.mjs +134 -192
- package/src/core/workspace-compositions.mjs +151 -0
- package/src/core/workspace-drawers.mjs +79 -0
- package/src/server/api.mjs +4 -27
- package/src/server/index.mjs +28 -21
- package/src/server/invoke-core-child.mjs +24 -0
- package/src/server/invoke-core-operations.mjs +102 -0
- package/src/server/memory-events.mjs +31 -0
- package/src/server/plugin-brain-targets.mjs +89 -0
- package/src/server/rest.mjs +2 -0
- package/src/server/route-inventory.mjs +3 -2
- package/src/server/route-manifest.json +47 -55
- package/src/server/routes/_shared.mjs +7 -14
- package/src/server/routes/brains.mjs +29 -62
- package/src/server/routes/context.mjs +0 -41
- package/src/server/routes/dashboard.mjs +26 -0
- package/src/server/routes/invoke.mjs +26 -1
- package/src/server/routes/plugins.mjs +154 -45
- package/src/server/routes/ssss.mjs +0 -169
- package/src/server/routes/system.mjs +0 -15
- package/src/server/routes/tasks.mjs +0 -26
- package/src/server/routes/ui-chunks.mjs +192 -0
- package/src/server/routes/vault.mjs +2 -23
- package/frontend/dist/assets/index-DD4qONvH.js +0 -5607
- package/frontend/dist/assets/index-DtwsDyFM.css +0 -1
- package/frontend/src/components/plugins/card/CardEngine.tsx +0 -108
- package/frontend/src/components/plugins/card/CardScenes.tsx +0 -103
- package/frontend/src/components/plugins/card/ExecutionPicker.tsx +0 -64
- package/frontend/src/components/plugins/card/args.ts +0 -28
- package/frontend/src/components/plugins/card/card.css +0 -32
- package/frontend/src/components/plugins/card/cli-line.ts +0 -13
- package/frontend/src/components/plugins/card/contract.ts +0 -91
- package/frontend/src/components/plugins/card/format.ts +0 -49
- package/frontend/src/components/plugins/card/runner-context.ts +0 -11
- package/frontend/src/components/plugins/card/runner.tsx +0 -43
- package/frontend/src/components/plugins/card/theme.ts +0 -35
- package/frontend/src/components/plugins/card/use-source.ts +0 -22
- package/frontend/src/components/plugins/card/widgets.tsx +0 -94
- package/frontend/src/components/plugins/workspace/WorkspaceHost.tsx +0 -23
- package/frontend/src/pages/PluginsPage.tsx +0 -1719
- package/scaffold/.agent/skills/plugin/evals/cases/04-card-collects-credential.mjs +0 -47
- package/scaffold/.agent/skills/plugin/prompts/06-card.md +0 -46
- package/scaffold/.agent/skills/plugin/references/card.md +0 -90
- package/scaffold/.agent/skills/plugin/subagents/card-designer.md +0 -60
- package/scaffold/.agent/skills/total-recall/plugins/auth/ui/DESIGN.md +0 -67
- package/scaffold/.agent/skills/total-recall/plugins/auth/ui/card.js +0 -1179
- package/scaffold/.agent/skills/total-recall/plugins/code-quality/ui/DESIGN.md +0 -32
- package/scaffold/.agent/skills/total-recall/plugins/code-quality/ui/card.js +0 -588
- package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/card.js +0 -575
- package/scaffold/.agent/skills/total-recall/plugins/embeddings/ui/DESIGN.md +0 -32
- package/scaffold/.agent/skills/total-recall/plugins/embeddings/ui/card.js +0 -482
- package/scaffold/.agent/skills/total-recall/plugins/git-sentinel/README.md +0 -53
- package/scaffold/.agent/skills/total-recall/plugins/git-sentinel/plugin.json +0 -129
- package/scaffold/.agent/skills/total-recall/plugins/git-sentinel/ui/DESIGN.md +0 -100
- package/scaffold/.agent/skills/total-recall/plugins/git-sentinel/ui/card.js +0 -637
- package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/DESIGN.md +0 -217
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/DESIGN.md +0 -32
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/card.js +0 -1276
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/DESIGN.md +0 -45
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/card.js +0 -1401
- package/scaffold/.agent/skills/total-recall/plugins/security/scripts/build-ui.mjs +0 -4
- package/scaffold/.agent/skills/total-recall/plugins/security/ui/DESIGN.md +0 -41
- package/scaffold/.agent/skills/total-recall/plugins/security/ui/card.js +0 -396
- package/scaffold/.agent/skills/total-recall/plugins/security/ui/panel.js +0 -98
- package/scaffold/.agent/skills/total-recall/plugins/ssss/ui/DESIGN.md +0 -15
- package/scaffold/.agent/skills/total-recall/plugins/ssss/ui/card.js +0 -182
- package/src/core/append-log.mjs +0 -131
- package/src/core/plugin-tasks.mjs +0 -173
- package/templates/onboarding-interview.md +0 -82
- /package/scaffold/.agent/skills/total-recall/plugins/{git-sentinel → git}/LICENSE +0 -0
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* A
|
|
2
|
+
* A native Home that displays seeded telemetry.
|
|
3
3
|
*
|
|
4
4
|
* Observed: system-monitor held a literal hostname, uptime, load average and
|
|
5
5
|
* `usedPercent: 99.1` before any command ran, with the comment
|
|
6
6
|
* "// Retain fallback telemetry".
|
|
7
7
|
*/
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
import correct from './06-correct-plugin.mjs';
|
|
9
|
+
|
|
10
|
+
const HOME = `
|
|
11
|
+
export class SeededHome extends HTMLElement {
|
|
10
12
|
constructor() {
|
|
11
13
|
super();
|
|
12
14
|
this.sample = {
|
|
@@ -17,26 +19,21 @@ export class SeededCard extends HTMLElement {
|
|
|
17
19
|
memory: { total: 17179869184, free: 159334400, usedPercent: 99.1 }
|
|
18
20
|
};
|
|
19
21
|
}
|
|
20
|
-
connectedCallback() {
|
|
22
|
+
connectedCallback() {
|
|
23
|
+
const root = this.attachShadow({ mode: 'open' })
|
|
24
|
+
const value = document.createElement('output')
|
|
25
|
+
value.textContent = this.sample.memory.usedPercent + '%'
|
|
26
|
+
root.append(value)
|
|
27
|
+
}
|
|
21
28
|
}
|
|
22
|
-
customElements.define('tr-
|
|
29
|
+
customElements.define('tr-example-home', SeededHome)
|
|
23
30
|
`;
|
|
24
31
|
|
|
25
32
|
export default {
|
|
33
|
+
...correct,
|
|
26
34
|
name: 'fabricated-seed',
|
|
27
|
-
why: '
|
|
28
|
-
files: {
|
|
29
|
-
'plugin.json': JSON.stringify({
|
|
30
|
-
id: 'seeded', name: 'Seeded', version: '1.0.0', description: 'A plugin that fabricates a reading.',
|
|
31
|
-
reuse: { commands: [], owned: 'Displays its own telemetry reading.' },
|
|
32
|
-
cli: { command: 'seeded', handler: './cli.mjs', subcommands: [{ name: 'sample', effect: 'read' }] },
|
|
33
|
-
status: { command: 'sample', refresh_seconds: 30 },
|
|
34
|
-
branding: { color: '#059669' },
|
|
35
|
-
ui: { elements: [{ id: 'card', kind: 'card', tag: 'tr-seeded-card', module: 'ui/card.js' }] },
|
|
36
|
-
}, null, 2),
|
|
37
|
-
'cli.mjs': 'export default async function run() {}\n',
|
|
38
|
-
'ui/card.js': CARD,
|
|
39
|
-
},
|
|
35
|
+
why: 'Operators may act on a reading that no service returned.',
|
|
36
|
+
files: { ...correct.files, 'ui/home.js': HOME },
|
|
40
37
|
expect: {
|
|
41
38
|
fail: ['no seeded values'],
|
|
42
39
|
},
|
|
@@ -1,39 +1,34 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* A
|
|
3
|
-
* reassurance.
|
|
2
|
+
* A native Home that reports success when its command returns no health reading.
|
|
4
3
|
*
|
|
5
4
|
* Observed: a git card read `data.worktree.unstaged`, `data.synced` and
|
|
6
5
|
* `data.upstream.status`, none of which the command returns, and defaulted to
|
|
7
6
|
* "Up to date" — so a repository with three unpushed commits rendered clean.
|
|
8
7
|
*/
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const
|
|
15
|
-
|
|
8
|
+
import correct from './06-correct-plugin.mjs';
|
|
9
|
+
|
|
10
|
+
const HOME = `
|
|
11
|
+
export class ReassuringHome extends HTMLElement {
|
|
12
|
+
connectedCallback() {
|
|
13
|
+
const root = this.attachShadow({ mode: 'open' })
|
|
14
|
+
const output = document.createElement('output')
|
|
15
|
+
const button = document.createElement('button')
|
|
16
|
+
button.textContent = 'Read status'
|
|
17
|
+
button.addEventListener('click', async () => {
|
|
18
|
+
const data = await this.host.run('status', ['--json'])
|
|
19
|
+
output.textContent = data.health || 'Healthy'
|
|
20
|
+
})
|
|
21
|
+
root.append(output, button)
|
|
16
22
|
}
|
|
17
|
-
connectedCallback() { this.attachShadow({ mode: 'open' }); this.read() }
|
|
18
23
|
}
|
|
19
|
-
customElements.define('tr-
|
|
24
|
+
customElements.define('tr-example-home', ReassuringHome)
|
|
20
25
|
`;
|
|
21
26
|
|
|
22
27
|
export default {
|
|
28
|
+
...correct,
|
|
23
29
|
name: 'reassuring-default',
|
|
24
|
-
why: '
|
|
25
|
-
files: {
|
|
26
|
-
'plugin.json': JSON.stringify({
|
|
27
|
-
id: 'reassuring', name: 'Reassuring', version: '1.0.0', description: 'A plugin that reassures without checking.',
|
|
28
|
-
reuse: { commands: [], owned: 'Displays the status returned by its own command.' },
|
|
29
|
-
cli: { command: 'reassuring', handler: './cli.mjs', subcommands: [{ name: 'audit', effect: 'read' }] },
|
|
30
|
-
status: { command: 'audit', refresh_seconds: 30 },
|
|
31
|
-
branding: { color: '#b45309' },
|
|
32
|
-
ui: { elements: [{ id: 'card', kind: 'card', tag: 'tr-reassuring-card', module: 'ui/card.js' }] },
|
|
33
|
-
}, null, 2),
|
|
34
|
-
'cli.mjs': 'export default async function run() {}\n',
|
|
35
|
-
'ui/card.js': CARD,
|
|
36
|
-
},
|
|
30
|
+
why: 'An unverified success can hide a failed read.',
|
|
31
|
+
files: { ...correct.files, 'ui/home.js': HOME },
|
|
37
32
|
expect: {
|
|
38
33
|
fail: ['no reassuring default'],
|
|
39
34
|
},
|
|
@@ -1,33 +1,25 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* A
|
|
2
|
+
* A valid native Home package that still ships legacy presentation artifacts.
|
|
3
3
|
*
|
|
4
4
|
* Observed: core enforced a closed allowlist of seven layouts, and 24 of 34
|
|
5
5
|
* plugins shared a byte-identical card signature.
|
|
6
6
|
*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
customElements.define('tr-templated-card', TemplatedCard)
|
|
12
|
-
`;
|
|
7
|
+
import correct from './06-correct-plugin.mjs';
|
|
8
|
+
|
|
9
|
+
const manifest = JSON.parse(correct.files['plugin.json']);
|
|
10
|
+
manifest.card_layout = { template: 'ledger', regions: [{ widget: 'status' }] };
|
|
13
11
|
|
|
14
12
|
export default {
|
|
13
|
+
...correct,
|
|
15
14
|
name: 'declared-template',
|
|
16
|
-
why: '
|
|
15
|
+
why: 'Keeping the legacy template or asset ships an unsupported presentation alongside native Home.',
|
|
16
|
+
flags: ['--manifest'],
|
|
17
17
|
files: {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
cli: { command: 'templated', handler: './cli.mjs', subcommands: [{ name: 'status', effect: 'read' }] },
|
|
22
|
-
status: { command: 'status', refresh_seconds: 30 },
|
|
23
|
-
branding: { color: '#475569' },
|
|
24
|
-
card_layout: { template: 'ledger', regions: [{ widget: 'status' }, { widget: 'table', source: { command: 'status' } }] },
|
|
25
|
-
ui: { elements: [{ id: 'card', kind: 'card', tag: 'tr-templated-card', module: 'ui/card.js' }] },
|
|
26
|
-
}, null, 2),
|
|
27
|
-
'cli.mjs': 'export default async function run() {}\n',
|
|
28
|
-
'ui/card.js': CARD,
|
|
18
|
+
...correct.files,
|
|
19
|
+
'plugin.json': JSON.stringify(manifest),
|
|
20
|
+
'ui/card.js': "customElements.define('tr-example-card', class extends HTMLElement {})\n",
|
|
29
21
|
},
|
|
30
22
|
expect: {
|
|
31
|
-
fail: ['
|
|
23
|
+
fail: ['contract', 'native presentation only'],
|
|
32
24
|
},
|
|
33
25
|
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A native Home that collects an API key in a password field.
|
|
3
|
+
*
|
|
4
|
+
* Observed: the scaffolder generated exactly this, dispatching the raw value
|
|
5
|
+
* as a `save-token` event — a second credential store and a leak surface.
|
|
6
|
+
*/
|
|
7
|
+
import correct from './06-correct-plugin.mjs';
|
|
8
|
+
|
|
9
|
+
const HOME = `
|
|
10
|
+
export class CollectingHome extends HTMLElement {
|
|
11
|
+
connectedCallback() {
|
|
12
|
+
const root = this.attachShadow({ mode: 'open' })
|
|
13
|
+
const input = document.createElement('input')
|
|
14
|
+
input.type = 'password'
|
|
15
|
+
input.setAttribute('aria-label', 'API key')
|
|
16
|
+
const button = document.createElement('button')
|
|
17
|
+
button.textContent = 'Save'
|
|
18
|
+
button.addEventListener('click', () => {
|
|
19
|
+
this.dispatchEvent(new CustomEvent('save-token', { detail: { token: input.value }, bubbles: true }))
|
|
20
|
+
})
|
|
21
|
+
root.append(input, button)
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
customElements.define('tr-example-home', CollectingHome)
|
|
25
|
+
`;
|
|
26
|
+
|
|
27
|
+
export default {
|
|
28
|
+
...correct,
|
|
29
|
+
name: 'home-collects-credential',
|
|
30
|
+
why: 'An unapproved password input can expose a service key to a plugin event handler.',
|
|
31
|
+
files: { ...correct.files, 'ui/home.js': HOME },
|
|
32
|
+
expect: {
|
|
33
|
+
fail: ['credential interface'],
|
|
34
|
+
},
|
|
35
|
+
};
|
|
@@ -5,51 +5,31 @@
|
|
|
5
5
|
* credential read — failing with `Auth credential read failed` once it was
|
|
6
6
|
* absent — and carried `https://example.com/checkout/success`.
|
|
7
7
|
*/
|
|
8
|
-
|
|
9
|
-
export class LeakyCard extends HTMLElement {
|
|
10
|
-
connectedCallback() { this.attachShadow({ mode: 'open' }) }
|
|
11
|
-
}
|
|
12
|
-
customElements.define('tr-leaky-card', LeakyCard)
|
|
13
|
-
`;
|
|
8
|
+
import correct from './06-correct-plugin.mjs';
|
|
14
9
|
|
|
15
10
|
const CAPABILITY = `
|
|
16
11
|
import { spawnSync } from 'node:child_process'
|
|
17
12
|
|
|
18
13
|
function secret() {
|
|
19
14
|
const binary = process.env.TOTAL_RECALL_BIN || 'total-recall'
|
|
20
|
-
const out = spawnSync(binary, ['auth', 'secret', 'get', '
|
|
15
|
+
const out = spawnSync(binary, ['auth', 'secret', 'get', 'EXAMPLE_API_KEY', '--json'])
|
|
21
16
|
return JSON.parse(out.stdout).value
|
|
22
17
|
}
|
|
23
18
|
|
|
24
|
-
export async function
|
|
25
|
-
const
|
|
26
|
-
const res = await fetch(
|
|
27
|
-
method: 'POST',
|
|
19
|
+
export async function readStatus({ endpoint }) {
|
|
20
|
+
const url = endpoint ? endpoint + '/status' : 'https://example.com/status'
|
|
21
|
+
const res = await fetch(url, {
|
|
28
22
|
headers: { Authorization: 'Bearer ' + secret() },
|
|
29
|
-
body: JSON.stringify({ amount, success_url: successUrl }),
|
|
30
23
|
})
|
|
31
24
|
return res.json()
|
|
32
25
|
}
|
|
33
26
|
`;
|
|
34
27
|
|
|
35
28
|
export default {
|
|
29
|
+
...correct,
|
|
36
30
|
name: 'host-leak-in-scaffold',
|
|
37
|
-
why: '
|
|
38
|
-
files: {
|
|
39
|
-
'plugin.json': JSON.stringify({
|
|
40
|
-
id: 'leaky', name: 'Leaky', version: '1.0.0', description: 'A plugin whose capability depends on the host.',
|
|
41
|
-
reuse: { commands: ['total-recall auth secret'], owned: 'Submits a checkout request to the service.' },
|
|
42
|
-
cli: { command: 'leaky', handler: './cli.mjs', subcommands: [{ name: 'status', effect: 'read' }] },
|
|
43
|
-
capability: { entry: 'capability/index.mjs', exports: ['createCheckout'] },
|
|
44
|
-
secrets: [{ key: 'LEAKY_API_KEY', description: 'Service key', required: true }],
|
|
45
|
-
status: { command: 'status', refresh_seconds: 30 },
|
|
46
|
-
branding: { color: '#b45309' },
|
|
47
|
-
ui: { elements: [{ id: 'card', kind: 'card', tag: 'tr-leaky-card', module: 'ui/card.js' }] },
|
|
48
|
-
}, null, 2),
|
|
49
|
-
'cli.mjs': 'export default async function run() {}\n',
|
|
50
|
-
'ui/card.js': CARD,
|
|
51
|
-
'capability/index.mjs': CAPABILITY,
|
|
52
|
-
},
|
|
31
|
+
why: 'A standalone capability must run without Total Recall and use the caller’s endpoint.',
|
|
32
|
+
files: { ...correct.files, 'capability/index.mjs': CAPABILITY },
|
|
53
33
|
expect: {
|
|
54
34
|
fail: ['no Total Recall dependency', 'no placeholder values'],
|
|
55
35
|
},
|
|
@@ -1,56 +1,69 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* A plugin
|
|
3
|
-
* credentials through auth, values the caller supplies.
|
|
2
|
+
* A plugin with native Home, an SSSS block, and Auth-managed credentials.
|
|
4
3
|
*
|
|
5
4
|
* This is the positive case. It must produce no failures.
|
|
6
5
|
*/
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export class ExampleCard extends HTMLElement {
|
|
11
|
-
constructor() {
|
|
12
|
-
super()
|
|
13
|
-
this.state = 'idle'
|
|
14
|
-
this.reading = null
|
|
15
|
-
this.lastError = null
|
|
16
|
-
this.lastAttempt = null
|
|
17
|
-
this.screen = 'status'
|
|
18
|
-
}
|
|
19
|
-
get screens() { return [{ id: 'status', label: 'Status' }] }
|
|
6
|
+
const HOME = `
|
|
7
|
+
export class ExampleHome extends HTMLElement {
|
|
20
8
|
connectedCallback() {
|
|
21
|
-
if (
|
|
22
|
-
this.
|
|
23
|
-
|
|
9
|
+
if (this.shadowRoot) return
|
|
10
|
+
const root = this.attachShadow({ mode: 'open' })
|
|
11
|
+
root.innerHTML =
|
|
12
|
+
'<style>:host{display:block;color:var(--colors-ink);background:var(--colors-paper);padding:16px}' +
|
|
13
|
+
'button{min-height:44px}</style>' +
|
|
14
|
+
'<h2>Service memory</h2><output aria-label="Memory in use">No reading yet</output>' +
|
|
15
|
+
'<p role="status"></p><button type="button">Read memory use</button>'
|
|
16
|
+
root.querySelector('button').addEventListener('click', () => this.read())
|
|
24
17
|
}
|
|
18
|
+
|
|
25
19
|
async read() {
|
|
26
|
-
|
|
20
|
+
const value = this.shadowRoot.querySelector('output')
|
|
21
|
+
const note = this.shadowRoot.querySelector('[role="status"]')
|
|
22
|
+
const time = new Date().toLocaleTimeString()
|
|
27
23
|
try {
|
|
28
24
|
const payload = await this.host.run('status', ['--json'])
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
this.lastError = err && err.message ? err.message : String(err)
|
|
36
|
-
this.state = 'error'
|
|
37
|
-
} finally {
|
|
38
|
-
this.paint()
|
|
25
|
+
if (payload?.ok !== true || !Number.isFinite(payload.usedPercent)) throw new Error('No readable memory measurement')
|
|
26
|
+
value.textContent = payload.usedPercent + '%'
|
|
27
|
+
note.textContent = 'Read at ' + time
|
|
28
|
+
} catch {
|
|
29
|
+
value.textContent = 'Unavailable'
|
|
30
|
+
note.textContent = 'Could not read memory use at ' + time
|
|
39
31
|
}
|
|
40
32
|
}
|
|
41
|
-
paint() {
|
|
42
|
-
const value = this.shadowRoot.querySelector('#value')
|
|
43
|
-
const note = this.shadowRoot.querySelector('#note')
|
|
44
|
-
if (value) value.textContent = this.reading ? String(this.reading.usedPercent ?? DASH) : DASH
|
|
45
|
-
if (note) note.textContent = this.lastError ? this.lastError + ' at ' + this.lastAttempt.toLocaleTimeString() : ''
|
|
46
|
-
}
|
|
47
|
-
render() {
|
|
48
|
-
this.shadowRoot.innerHTML = '<style>:host{display:block;color:var(--text-primary);border:1px solid var(--border);padding:14px}' +
|
|
49
|
-
'button{min-height:44px}</style>' +
|
|
50
|
-
'<h2>Example</h2><span id="value">' + DASH + '</span><p id="note"></p><button type="button">Read</button>'
|
|
51
|
-
}
|
|
52
33
|
}
|
|
53
|
-
customElements.define('tr-example-
|
|
34
|
+
customElements.define('tr-example-home', ExampleHome)
|
|
35
|
+
`;
|
|
36
|
+
|
|
37
|
+
const DESIGN = `---
|
|
38
|
+
colors:
|
|
39
|
+
ink: "#13241f"
|
|
40
|
+
paper: "#ecf5f0"
|
|
41
|
+
accent: "#047857"
|
|
42
|
+
---
|
|
43
|
+
# Service memory
|
|
44
|
+
|
|
45
|
+
Use a quiet green surface for the memory readout. Keep the last attempt beside the measured value.
|
|
46
|
+
`;
|
|
47
|
+
|
|
48
|
+
const STATUS_BLOCK = `---
|
|
49
|
+
type: ui-chunk:chunk
|
|
50
|
+
plugin: example
|
|
51
|
+
id: memory-use
|
|
52
|
+
title: Service memory use
|
|
53
|
+
description: Reads memory use from the configured service and displays the returned percentage.
|
|
54
|
+
timestamp: '2026-11-08T00:00:00Z'
|
|
55
|
+
intents:
|
|
56
|
+
- inspect service memory use
|
|
57
|
+
surfaces: [page]
|
|
58
|
+
operations: [status]
|
|
59
|
+
data:
|
|
60
|
+
- 'status:/usedPercent'
|
|
61
|
+
panel: home
|
|
62
|
+
---
|
|
63
|
+
<section>
|
|
64
|
+
<h2>Service memory use</h2>
|
|
65
|
+
<p>Read the current percentage from the service in the live panel.</p>
|
|
66
|
+
</section>
|
|
54
67
|
`;
|
|
55
68
|
|
|
56
69
|
const CAPABILITY = `
|
|
@@ -62,6 +75,28 @@ export async function readStatus({ endpoint, apiKey, fetchImpl = fetch }) {
|
|
|
62
75
|
}
|
|
63
76
|
`;
|
|
64
77
|
|
|
78
|
+
const CLI = `
|
|
79
|
+
import { readAuthSecret } from './auth-client.mjs'
|
|
80
|
+
import { readStatus } from './capability/index.mjs'
|
|
81
|
+
|
|
82
|
+
export default async function run([operation]) {
|
|
83
|
+
if (operation !== 'status') {
|
|
84
|
+
process.exitCode = 1
|
|
85
|
+
return console.log(JSON.stringify({ ok: false, error: 'Use the status operation' }))
|
|
86
|
+
}
|
|
87
|
+
try {
|
|
88
|
+
const apiKey = readAuthSecret('EXAMPLE_API_KEY')
|
|
89
|
+
if (!apiKey) throw new Error('Service key unavailable')
|
|
90
|
+
const status = await readStatus({ endpoint: process.env.EXAMPLE_ENDPOINT, apiKey })
|
|
91
|
+
if (!Number.isFinite(status.usedPercent)) throw new Error('Invalid memory reading')
|
|
92
|
+
console.log(JSON.stringify({ ok: true, usedPercent: status.usedPercent }))
|
|
93
|
+
} catch {
|
|
94
|
+
process.exitCode = 1
|
|
95
|
+
console.log(JSON.stringify({ ok: false, error: 'Could not read service memory use' }))
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
`;
|
|
99
|
+
|
|
65
100
|
export default {
|
|
66
101
|
name: 'correct-plugin',
|
|
67
102
|
why: 'the recipe must accept a plugin that follows it, or it is not a recipe',
|
|
@@ -71,23 +106,26 @@ export default {
|
|
|
71
106
|
reuse: { commands: ['total-recall auth secret'], owned: 'Reads the service-specific status endpoint.' },
|
|
72
107
|
cli: { command: 'example', handler: './cli.mjs', subcommands: [
|
|
73
108
|
{ name: 'status', description: 'Read current status', effect: 'read', output: 'json' },
|
|
74
|
-
{ name: 'set-key', description: 'Store the service key', effect: 'write',
|
|
75
|
-
args: [{ name: 'apiKey', label: 'API key', type: 'string', secret: true }] },
|
|
76
109
|
] },
|
|
77
110
|
capability: { entry: 'capability/index.mjs', exports: ['readStatus'] },
|
|
78
111
|
secrets: [{ key: 'EXAMPLE_API_KEY', description: 'Reads the service', required: true }],
|
|
112
|
+
auth: { plugin: 'auth', methods: ['passkey'], session_verification: true },
|
|
79
113
|
status: { command: 'status', refresh_seconds: 30 },
|
|
80
114
|
distribution: { tier: 'official', license: 'open' },
|
|
81
115
|
branding: { name: 'Example', color: '#047857', accent: '#10b981', font: 'inter', density: 'comfortable', radius: 'sm', header: 'plain' },
|
|
82
|
-
ui: { design_tokens: '
|
|
116
|
+
ui: { home: 'home', design_tokens: 'DESIGN.md', elements: [
|
|
117
|
+
{ id: 'home', kind: 'panel', tag: 'tr-example-home', module: 'ui/home.js' },
|
|
118
|
+
] },
|
|
83
119
|
}, null, 2),
|
|
84
|
-
'cli.mjs':
|
|
120
|
+
'cli.mjs': CLI,
|
|
85
121
|
'auth-client.mjs': "/** Auth-only transport: the plugin holds no credential of its own. */\nimport { spawnSync } from 'node:child_process'\nexport function readAuthSecret(key) {\n const out = spawnSync('total-recall', ['auth', 'secret', 'get', key, '--json'], { encoding: 'utf8' })\n const parsed = JSON.parse(out.stdout)\n return parsed.found ? parsed.value : ''\n}\n",
|
|
86
|
-
'
|
|
87
|
-
'ui/
|
|
122
|
+
'DESIGN.md': DESIGN,
|
|
123
|
+
'ui/home.js': HOME,
|
|
124
|
+
'ui/chunks/memory-use.md': STATUS_BLOCK,
|
|
88
125
|
'capability/index.mjs': CAPABILITY,
|
|
89
126
|
},
|
|
90
127
|
expect: {
|
|
91
128
|
fail: [],
|
|
129
|
+
pass: ['Bundled Auth', 'Home element', 'Owner design', 'SSSS block', 'Operation coverage', 'owner commands resolve', 'loads with Total Recall absent'],
|
|
92
130
|
},
|
|
93
131
|
};
|
|
@@ -9,8 +9,7 @@
|
|
|
9
9
|
*
|
|
10
10
|
* node evals/run.mjs [--case <name>] [--json] [--keep]
|
|
11
11
|
*
|
|
12
|
-
* A case
|
|
13
|
-
* an eval that passes because the checker looks at nothing is not evidence.
|
|
12
|
+
* A case requires the exact set of failure check names and any declared passes.
|
|
14
13
|
*/
|
|
15
14
|
import fs from 'node:fs'
|
|
16
15
|
import os from 'node:os'
|
|
@@ -49,9 +48,9 @@ function materialise(spec, dir) {
|
|
|
49
48
|
}
|
|
50
49
|
}
|
|
51
50
|
|
|
52
|
-
function runRecord(dir) {
|
|
51
|
+
function runRecord(dir, flags) {
|
|
53
52
|
try {
|
|
54
|
-
const out = execFileSync(process.execPath, [RECORD, dir, '--json'], { encoding: 'utf8', timeout: 60000 })
|
|
53
|
+
const out = execFileSync(process.execPath, [RECORD, dir, '--json', ...flags], { encoding: 'utf8', timeout: 60000 })
|
|
55
54
|
return { code: 0, report: JSON.parse(out) }
|
|
56
55
|
} catch (err) {
|
|
57
56
|
// record.mjs exits non-zero when it finds failures; the JSON is still valid.
|
|
@@ -67,7 +66,7 @@ for (const spec of cases) {
|
|
|
67
66
|
const dir = fs.mkdtempSync(path.join(os.tmpdir(), `plugin-eval-${spec.name}-`))
|
|
68
67
|
try {
|
|
69
68
|
materialise(spec, dir)
|
|
70
|
-
const { report } = runRecord(dir)
|
|
69
|
+
const { report } = runRecord(dir, spec.flags ?? [])
|
|
71
70
|
|
|
72
71
|
if (!report) {
|
|
73
72
|
results.push({ name: spec.name, ok: false, reason: 'record.mjs produced no JSON' })
|
|
@@ -75,24 +74,24 @@ for (const spec of cases) {
|
|
|
75
74
|
}
|
|
76
75
|
|
|
77
76
|
const failures = report.results.filter((r) => r.level === 'FAIL')
|
|
78
|
-
const
|
|
79
|
-
const
|
|
80
|
-
|
|
81
|
-
const missing = expected.filter((
|
|
82
|
-
const unexpected =
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
77
|
+
const failedChecks = new Set(failures.map((f) => f.check))
|
|
78
|
+
const passedChecks = new Set(report.results.filter((r) => r.level === 'PASS').map((r) => r.check))
|
|
79
|
+
const expected = spec.expect.fail ?? []
|
|
80
|
+
const missing = expected.filter((check) => !failedChecks.has(check))
|
|
81
|
+
const unexpected = failures.filter((f) => !expected.includes(f.check))
|
|
82
|
+
const missingPasses = (spec.expect.pass ?? []).filter((check) => !passedChecks.has(check))
|
|
83
|
+
const reasons = [
|
|
84
|
+
missing.length ? `checker missed: ${missing.join(', ')}` : null,
|
|
85
|
+
unexpected.length ? `unexpected failures: ${unexpected.map((f) => f.check).join(', ')}` : null,
|
|
86
|
+
missingPasses.length ? `missing passes: ${missingPasses.join(', ')}` : null,
|
|
87
|
+
].filter(Boolean)
|
|
87
88
|
results.push({
|
|
88
89
|
name: spec.name,
|
|
89
|
-
ok,
|
|
90
|
+
ok: reasons.length === 0,
|
|
90
91
|
why: spec.why,
|
|
91
92
|
expected,
|
|
92
93
|
found: failures.map((f) => `${f.check} — ${f.detail}`),
|
|
93
|
-
reason:
|
|
94
|
-
: missing.length ? `checker missed: ${missing.join(', ')}`
|
|
95
|
-
: `unexpected failures: ${unexpected.join(' | ')}`,
|
|
94
|
+
reason: reasons.join(' | ') || null,
|
|
96
95
|
})
|
|
97
96
|
} finally {
|
|
98
97
|
if (!keep) fs.rmSync(dir, { recursive: true, force: true })
|
|
@@ -14,7 +14,7 @@ Resolve it only through `total-recall auth secret`. The plugin has no store of i
|
|
|
14
14
|
|
|
15
15
|
**Settings.** Every setting goes in `configuration.fields` with its type and default. Field keys are camelCase and may not contain `password`, `secret`, `apiKey` or `token` — those belong in `secrets`.
|
|
16
16
|
|
|
17
|
-
**The
|
|
17
|
+
**The Home** reports a credential as *present* or *missing*. It never renders a value, and never renders an input that accepts one. To set a key, the Home hands over the command:
|
|
18
18
|
|
|
19
19
|
```
|
|
20
20
|
total-recall auth secret set SERVICE_API_KEY --stdin
|
|
@@ -23,14 +23,14 @@ total-recall auth secret set SERVICE_API_KEY --stdin
|
|
|
23
23
|
## Correct means
|
|
24
24
|
|
|
25
25
|
- Exactly one credential path exists, and it is auth.
|
|
26
|
-
- The
|
|
26
|
+
- The Home has no code path that can receive a key value, so it cannot leak one.
|
|
27
27
|
- A setting a user must change is declared, so it is visible rather than buried in code.
|
|
28
28
|
|
|
29
|
-
## Why the
|
|
29
|
+
## Why the Home must not collect keys
|
|
30
30
|
|
|
31
31
|
The rule is not bureaucracy: one store means one rotation path and one audit trail. A per-plugin key screen violates it even when it writes to the same store, because it makes the plugin the place an operator thinks of when a key must change. It also creates a receive path for the secret inside plugin code, which is a leak surface that would otherwise not exist.
|
|
32
32
|
|
|
33
|
-
Evidence: a scaffolded panel rendered `<input type="password">` and dispatched the raw value to the host;
|
|
33
|
+
Evidence: a scaffolded panel rendered `<input type="password">` and dispatched the raw value to the host; another interface built three such screens.
|
|
34
34
|
|
|
35
35
|
## Check
|
|
36
36
|
|
|
@@ -13,7 +13,7 @@ tr-plugin-<id>/
|
|
|
13
13
|
capability/ ← the scaffold payload: exported functions, no host
|
|
14
14
|
index.mjs
|
|
15
15
|
cli.mjs ← the Total Recall entry: parse argv, resolve credentials, call capability/
|
|
16
|
-
ui/ ← the
|
|
16
|
+
ui/ ← the Home; Total Recall only
|
|
17
17
|
test/
|
|
18
18
|
```
|
|
19
19
|
|
|
@@ -33,7 +33,7 @@ The capability must be:
|
|
|
33
33
|
- **returning data**, not printing text
|
|
34
34
|
- **throwing errors**, not setting `process.exitCode`
|
|
35
35
|
- **free of Total Recall** — no `total-recall`, no `TOTAL_RECALL_BIN`, no auth store
|
|
36
|
-
- **free of UI** —
|
|
36
|
+
- **free of UI** — keep the Home, `DESIGN.md` and logo in the plugin
|
|
37
37
|
|
|
38
38
|
Write `BRICK.md`: what to import, what to pass, where credentials come from, what comes back.
|
|
39
39
|
|
|
@@ -15,10 +15,10 @@ Then work the list, and record the actual outcome of each. Do not tick a box you
|
|
|
15
15
|
- [ ] Each shared dependency uses its existing owner command or a vendored brick. The reuse gate passes and the workflow tests exercise the declared interfaces.
|
|
16
16
|
- [ ] Every operation has typed arguments and an effect.
|
|
17
17
|
- [ ] `--json` works on every subcommand; failures exit non-zero; `--help` works without credentials.
|
|
18
|
-
- [ ] No secret value appears in `argv`, stdout, stderr,
|
|
19
|
-
- [ ] The
|
|
20
|
-
- [ ] Every value
|
|
21
|
-
- [ ]
|
|
18
|
+
- [ ] No secret value appears in `argv`, stdout, stderr, logs or UI state.
|
|
19
|
+
- [ ] The Home and its bespoke design are declared. The owner inventory and the operation and data bindings cover the same workflows.
|
|
20
|
+
- [ ] Every displayed value came from an actual operation. Failures and unknown values are explicit.
|
|
21
|
+
- [ ] Home and its assembled blocks render at 360, 768 and 1280 px with no horizontal overflow.
|
|
22
22
|
- [ ] Every state renders: credential present, missing, provider unreachable, rejected call, empty, stale.
|
|
23
23
|
- [ ] The suite passes — per-subcommand unit tests including failure paths, a manifest test, a secrets test.
|
|
24
24
|
- [ ] No seeded value, placeholder or example default survives anywhere in the plugin.
|
|
@@ -12,7 +12,7 @@ Every entry below was observed in a real plugin in this ecosystem, with the evid
|
|
|
12
12
|
|
|
13
13
|
**Hard-coded claims.** A header rendered `Stripe API (Live Secret)` and `HMAC-SHA256 Verified` with no command behind either. A merchant with no key and no webhook secret saw an identical card.
|
|
14
14
|
|
|
15
|
-
**Fixed text where a command belongs.** `card_face.metrics` held literal strings such as `ONLINE`. The validator
|
|
15
|
+
**Fixed text where a command belongs.** `card_face.metrics` held literal strings such as `ONLINE`. The validator rejects it; the card must never carry it.
|
|
16
16
|
|
|
17
17
|
> **Rule.** A value appears only if a command or the host returned it. If a source fails, show the failure and when it was last attempted.
|
|
18
18
|
|
|
@@ -34,7 +34,7 @@ Related: a missing upstream comparison becoming `unpushedCommits: 0` instead of
|
|
|
34
34
|
- A card built three separate key-entry screens.
|
|
35
35
|
- A plugin's error text told the *application's* users to run a Total Recall command.
|
|
36
36
|
|
|
37
|
-
> **Rule.** One credential path exists in the whole plugin, and it is `total-recall auth secret`. The
|
|
37
|
+
> **Rule.** One credential path exists in the whole plugin, and it is `total-recall auth secret`. The Home reports present or missing, never renders a value, and never collects one.
|
|
38
38
|
|
|
39
39
|
## Templates
|
|
40
40
|
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Generative plugin Home
|
|
2
|
+
|
|
3
|
+
1. Inventory the owner with `total-recall plugin info <id>`, `total-recall plugin library --plugin <id> --json` and its existing provider adapters. Identify the operator's primary workflows, useful readouts, and the exact operation and response field for each. Record expected coverage in the owner's plan.
|
|
4
|
+
2. Write the root `DESIGN.md` around those workflows. Describe the plugin's visual identity, typography, layout, motion, accessibility, and useful unavailable states. Set `ui.design_tokens` to `DESIGN.md` and `ui.home` to the ID of the declared native Home element. That element should accomplish a meaningful workflow and show real state. A command listing alone is a fallback.
|
|
5
|
+
3. Author independent HTML blocks at `ui/chunks/<id>.md`. Use `type: ui-chunk:chunk`, `plugin`, `id`, `title`, `description`, an ISO `timestamp`, `intents`, and `surfaces`. Include `page` for Home. Bind `operations` to exact manifest command names. Bind `data` to exact output fields using `operation:/json/pointer`. Verify each pointer against real JSON output. An optional `panel` references a declared native element that renders live data or actions through the authenticated command bridge. Package the design, the blocks, and any native modules.
|
|
6
|
+
4. Use CSS and accessible HTML for presentation. Declare browser-safe operations and their argument types so a block can accept input and run the real owner command in place. For specialized controls, bind the native panel and keep its effect and permission checks. Mutations require deliberate operator input. Keep user records, secrets, executable HTML, and raw provider output out of Decision requests. Send only the approved intent and eligible block metadata. Validate every returned ID before composing the page. Keep the owner Home useful if Decision abstains or is unavailable.
|
|
7
|
+
5. Run `node <skill>/scripts/record.mjs . --home` and compare the bindings from `total-recall plugin chunks coverage --plugin <id> --json` with the owner inventory. A valid schema and a keyword fallback establish local coverage only. Verify a successful authorized Decision request separately when configured, plus the rendered Home and the main workflow in an isolated preview.
|
|
8
|
+
|
|
9
|
+
For an operation that can return a credential, declare `sensitive_output: true` in its CLI metadata. A block may document the operation. Leave its private response fields out of `data` and route credential work through the owning CLI or Auth controls.
|
|
10
|
+
|
|
11
|
+
Reserve host file arguments with `terminal_only_args`. Use `terminal_only: true` for a wholly terminal operation, including a positional host path or a foreground server. Its safe response fields can stay indexed. Use `sensitive_output` when the result itself carries credentials or private pairing material.
|
|
12
|
+
|
|
13
|
+
## Live design
|
|
14
|
+
|
|
15
|
+
Save design tokens in the YAML frontmatter of `DESIGN.md`. The open Home reads new revisions automatically and applies their CSS while retaining the selected block order. Bind colors, typography, spacing and radii with CSS custom properties. A chunk can opt into a named style using `data-design-component="component-name"`. Shadow DOM panels inherit the published CSS variables and can use `--component-<name>-<property>` in their styles.
|
|
16
|
+
|
|
17
|
+
For a page region that should grow as the owner adds component definitions, put one owner-designed root element inside `<template data-design-components>` in a chunk. The renderer creates a copy for each supported component in the design. Add `data-design-label` to a text element to show the component name. Reserve this for a region where every definition belongs, such as a reusable design library. Keep operations, live data and HTML structure in the owner panel and SSSS blocks.
|
|
18
|
+
|
|
19
|
+
Verify a token edit and a new named component with Home open, then save malformed YAML and confirm the last valid design remains. A design save applies locally. Use Decision explicitly when the context calls for a different selection of blocks.
|
|
20
|
+
|
|
21
|
+
## Agent tool
|
|
22
|
+
|
|
23
|
+
Use `total-recall decision compose --plugin <id> --intent "<short approved task context>" --json` to publish an agent-selected page to the authenticated dashboard. The command returns the path and ordered SSSS block IDs. The open Home picks up the publication automatically. A provider abstention leaves the current page in place. Avoid adding prompts or provider controls to the Home.
|
|
24
|
+
|
|
25
|
+
When the user names a brain, pass `--brain <registered ID>` to compose, workspace search, and block add. Use the same ID throughout. In a multi-brain dashboard, choose one destination for publication. The server verifies the selected brain and the enabled owner before exposing or publishing a block.
|
|
26
|
+
|
|
27
|
+
Declare the bundled Auth plugin for host session verification. Read credential status through Auth and use the installed owning plugin for each other shared capability. A local plugin may use Auth for dashboard access without declaring an external credential.
|
|
28
|
+
|
|
29
|
+
List reused installed operations in `reuse.commands` and state the plugin's own responsibility in `reuse.owned`. Use `requires` for vendored brick IDs. Validate the package against the Total Recall binary that runs the preview. Set `TOTAL_RECALL_BIN` to that binary if your terminal resolves a different installation.
|
|
30
|
+
|
|
31
|
+
## Author and place a block
|
|
32
|
+
|
|
33
|
+
1. Search the selected brain with `total-recall plugin chunks "<intent>" --workspace --surface page --brain <brain> --json`. Use blocks from any enabled plugin that serves the task. An agent can author any missing view or workflow as an SSSS block. Ship broadly useful defaults in the owner repository and publish task-specific views into the selected brain's pool.
|
|
34
|
+
2. For a new pool block, author `<id>.md` with the enabled owner as `plugin`, a unique `id`, verified operation/data bindings where applicable, and `page` in `surfaces`. Use the owner design or the user's approved design. Bind a native panel for real interactive behavior. Run `total-recall plugin chunks add <id.md> --plugin <owner> --brain <brain> --json`. Add validates the SSSS document against its installed owner and returns the stable key. Read it back with `total-recall plugin chunks get <owner>:<id> --workspace --surface page --brain <brain> --json`.
|
|
35
|
+
3. For contextual composition, use `total-recall decision compose --plugin <owner> --intent "<approved context>" --page <id> --title "<title>" --brain <brain> --json`. Jev selects from the published pool. Open the returned path or use Saved pages in the left drawer.
|
|
36
|
+
4. For exact placement, supply the desired ordered keys with `total-recall plugin chunks page <id> <owner>:<block> <other-owner>:<block> --title "<title>" --brain <brain> --json`. For an existing page, read it with `total-recall plugin chunks page <id> --brain <brain> --json` and submit the complete ordered list with `--revision <current-version>` in place of `--title`. Retain the blocks the user wants to keep. A revision conflict means reread the page before retrying. Verify the stored order and render the page.
|
|
37
|
+
|
|
38
|
+
Keep secret values and private records out of block HTML and routing metadata. Use real owner data and actions. If the owner has no operation for the requested behavior, implement and verify the missing capability at the owner before calling the view functional.
|