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
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Embeddings Home — the plugin's native page.
|
|
3
|
+
*
|
|
4
|
+
* Answers, from the plugin's own JSON operations: which provider serves
|
|
5
|
+
* vectors and whether text leaves this machine, how much of the vault has a
|
|
6
|
+
* usable vector, which models the endpoint offers, and how fast the selected
|
|
7
|
+
* model embeds. Reads `status` and `models` on open; benchmark and pull run
|
|
8
|
+
* only when the operator asks. Anything not reported renders as a dash.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
const DASH = '—';
|
|
12
|
+
const BENCHMARK_MAX = 20;
|
|
13
|
+
|
|
14
|
+
function escapeHtml(value) {
|
|
15
|
+
return String(value).replace(/[&<>"']/g, c => ({
|
|
16
|
+
'&': '&', '<': '<', '>': '>', '"': '"', "'": ''',
|
|
17
|
+
}[c]));
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/** A reported value, or a dash when the operation did not report one. */
|
|
21
|
+
function shown(value) {
|
|
22
|
+
return value === null || value === undefined || value === '' ? DASH : escapeHtml(value);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function formatBytes(n) {
|
|
26
|
+
if (!Number.isFinite(n)) return DASH;
|
|
27
|
+
if (n < 1024) return `${n} B`;
|
|
28
|
+
if (n < 1024 ** 2) return `${(n / 1024).toFixed(1)} KB`;
|
|
29
|
+
if (n < 1024 ** 3) return `${(n / 1024 ** 2).toFixed(1)} MB`;
|
|
30
|
+
return `${(n / 1024 ** 3).toFixed(2)} GB`;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** host.run may hand back parsed JSON, raw stdout, or a { stdout } envelope. */
|
|
34
|
+
export function parseResult(res) {
|
|
35
|
+
if (res && typeof res === 'object' && typeof res.stdout === 'string') return parseResult(res.stdout);
|
|
36
|
+
if (res && typeof res === 'object') return res;
|
|
37
|
+
if (typeof res === 'string' && res.trim().startsWith('{')) return JSON.parse(res);
|
|
38
|
+
throw new Error('the operation returned no JSON');
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const LOCALITY = {
|
|
42
|
+
local: { tone: 'ok', label: 'Local', note: 'Text sent for embedding stays on this machine.' },
|
|
43
|
+
remote: { tone: 'warn', label: 'Remote', note: 'The endpoint or the selected model runs on another machine, so vault text leaves this host.' },
|
|
44
|
+
unknown: { tone: 'warn', label: 'Unknown', note: 'No local model qualifies. Total Recall may try a hosted provider, which would send vault text off this machine.' },
|
|
45
|
+
disabled: { tone: 'muted', label: 'Disabled', note: 'Embeddings are turned off for this brain.' },
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export class EmbeddingsHome extends HTMLElement {
|
|
49
|
+
constructor() {
|
|
50
|
+
super();
|
|
51
|
+
this.status = { phase: 'loading' };
|
|
52
|
+
this.models = { phase: 'loading' };
|
|
53
|
+
this.bench = { phase: 'idle' };
|
|
54
|
+
this.pull = { phase: 'idle' };
|
|
55
|
+
this.count = 10;
|
|
56
|
+
this.pullModel = '';
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
connectedCallback() {
|
|
60
|
+
if (!this.shadowRoot) this.attachShadow({ mode: 'open' });
|
|
61
|
+
this.render();
|
|
62
|
+
this.load();
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
async read(op, args) {
|
|
66
|
+
try {
|
|
67
|
+
return { phase: 'ready', data: parseResult(await this.host.run(op, args)) };
|
|
68
|
+
} catch (err) {
|
|
69
|
+
return { phase: 'unavailable', error: err?.message || String(err) };
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
async load() {
|
|
74
|
+
if (!this.host) {
|
|
75
|
+
const error = 'No Total Recall host is connected, so the plugin operations cannot run.';
|
|
76
|
+
this.status = { phase: 'unavailable', error };
|
|
77
|
+
this.models = { phase: 'unavailable', error };
|
|
78
|
+
this.render();
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
this.status = { phase: 'loading' };
|
|
82
|
+
this.models = { phase: 'loading' };
|
|
83
|
+
this.render();
|
|
84
|
+
[this.status, this.models] = await Promise.all([
|
|
85
|
+
this.read('status', ['--json']),
|
|
86
|
+
this.read('models', ['--json']),
|
|
87
|
+
]);
|
|
88
|
+
this.render();
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/** Runs a user-triggered operation; a JSON body with ok:false is a failure. */
|
|
92
|
+
async act(slot, op, args) {
|
|
93
|
+
if (!this.host || this[slot].phase === 'running') return;
|
|
94
|
+
this[slot] = { phase: 'running' };
|
|
95
|
+
this.render();
|
|
96
|
+
const result = await this.read(op, args);
|
|
97
|
+
if (result.phase !== 'ready') this[slot] = { phase: 'failed', error: result.error };
|
|
98
|
+
else if (result.data.ok === false) this[slot] = { phase: 'failed', error: result.data.reason || 'the operation reported a failure', data: result.data };
|
|
99
|
+
else this[slot] = { phase: 'done', data: result.data };
|
|
100
|
+
this.render();
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
runBenchmark() {
|
|
104
|
+
const n = Number(this.count);
|
|
105
|
+
if (!Number.isInteger(n) || n < 1 || n > BENCHMARK_MAX) {
|
|
106
|
+
this.bench = { phase: 'failed', error: `Samples must be a whole number from 1 to ${BENCHMARK_MAX}.` };
|
|
107
|
+
this.render();
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
this.act('bench', 'benchmark', ['--count', String(n), '--json']);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
async runPull() {
|
|
114
|
+
const model = this.pullModel.trim();
|
|
115
|
+
if (!model) {
|
|
116
|
+
this.pull = { phase: 'failed', error: 'Type the exact model name to pull.' };
|
|
117
|
+
this.render();
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
await this.act('pull', 'pull', [model, '--json']);
|
|
121
|
+
if (this.pull.phase === 'done') this.load();
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
renderProvider() {
|
|
125
|
+
const s = this.status;
|
|
126
|
+
if (s.phase === 'loading') return `<p class="notice" data-design-component="notice">Reading provider status${DASH}</p>`;
|
|
127
|
+
if (s.phase !== 'ready') return `<p class="notice bad" data-design-component="notice">Provider status unavailable: ${escapeHtml(s.error)}</p>`;
|
|
128
|
+
const d = s.data;
|
|
129
|
+
const loc = LOCALITY[d.locality] || { tone: 'warn', label: d.locality || 'Unreported', note: '' };
|
|
130
|
+
const attempts = Array.isArray(d.attempts) ? d.attempts : [];
|
|
131
|
+
return `
|
|
132
|
+
<div class="verdict">
|
|
133
|
+
<span class="chip ${loc.tone}" data-design-component="locality-chip">${escapeHtml(loc.label)}</span>
|
|
134
|
+
<span class="note">${escapeHtml(loc.note)}</span>
|
|
135
|
+
</div>
|
|
136
|
+
<dl class="facts">
|
|
137
|
+
<div><dt>Provider</dt><dd>${shown(d.provider)}</dd></div>
|
|
138
|
+
<div><dt>Endpoint</dt><dd class="mono">${shown(d.endpoint)}</dd></div>
|
|
139
|
+
<div><dt>Selected model</dt><dd class="mono">${shown(d.selected_model)}</dd></div>
|
|
140
|
+
<div><dt>Vector width</dt><dd class="mono">${d.embedding_dims ? `${escapeHtml(d.embedding_dims)} dims` : DASH}</dd></div>
|
|
141
|
+
</dl>
|
|
142
|
+
${d.reason ? `<p class="notice" data-design-component="notice">${escapeHtml(d.reason)}</p>` : ''}
|
|
143
|
+
${attempts.length ? `
|
|
144
|
+
<ul class="attempts">
|
|
145
|
+
${attempts.map(a => `
|
|
146
|
+
<li class="mono ${a.reachable ? 'ok' : 'bad'}">${escapeHtml(a.url)} ${DASH} ${a.reachable ? 'reachable' : `unreachable: ${shown(a.reason)}`}</li>`).join('')}
|
|
147
|
+
</ul>` : ''}`;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
renderCredentials() {
|
|
151
|
+
const fallback = this.status.phase === 'ready' ? this.status.data.hosted_fallback : null;
|
|
152
|
+
return `
|
|
153
|
+
<dl class="facts">
|
|
154
|
+
<div><dt>Hosted fallback</dt><dd class="mono">${shown(fallback)}</dd></div>
|
|
155
|
+
<div><dt>Credential owner</dt><dd>Auth</dd></div>
|
|
156
|
+
</dl>
|
|
157
|
+
<p class="notice" data-design-component="notice">Keys for hosted embedding providers are held by the Auth owner. This plugin does not read, list or display them, so their readiness is reported as unknown rather than guessed.</p>`;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
renderCoverage() {
|
|
161
|
+
const s = this.status;
|
|
162
|
+
if (s.phase === 'loading') return `<p class="notice" data-design-component="notice">Counting vectors${DASH}</p>`;
|
|
163
|
+
if (s.phase !== 'ready') return `<p class="notice bad" data-design-component="notice">Coverage unavailable: ${escapeHtml(s.error)}</p>`;
|
|
164
|
+
const b = s.data.brain;
|
|
165
|
+
if (!b) return '<p class="notice" data-design-component="notice">No brain was found in the working directory or home, so there is no vault to measure.</p>';
|
|
166
|
+
if (b.state !== 'ok') {
|
|
167
|
+
return `
|
|
168
|
+
<p class="notice warn" data-design-component="notice">Index state <span class="mono">${shown(b.state)}</span>: ${shown(b.reason)}</p>
|
|
169
|
+
<dl class="facts">
|
|
170
|
+
<div><dt>Brain</dt><dd class="mono">${shown(b.dir)}</dd></div>
|
|
171
|
+
<div><dt>Vault nodes</dt><dd class="mono">${shown(b.vault_nodes)}</dd></div>
|
|
172
|
+
<div><dt>Missing a vector</dt><dd class="mono">${shown(b.missing)}</dd></div>
|
|
173
|
+
</dl>`;
|
|
174
|
+
}
|
|
175
|
+
const counts = [
|
|
176
|
+
['Usable', b.embedded, 'ok'],
|
|
177
|
+
['Stale', b.stale, b.stale ? 'warn' : ''],
|
|
178
|
+
['Wrong width', b.mismatched, b.mismatched ? 'warn' : ''],
|
|
179
|
+
['Missing', b.missing, b.missing ? 'warn' : ''],
|
|
180
|
+
['Orphaned rows', b.orphaned, ''],
|
|
181
|
+
];
|
|
182
|
+
return `
|
|
183
|
+
<div class="coverage">
|
|
184
|
+
<div class="figure" data-design-component="coverage-figure">${b.percent === null || b.percent === undefined ? DASH : `${escapeHtml(b.percent)}%`}</div>
|
|
185
|
+
<div class="figure-caption">${shown(b.embedded)} of ${shown(b.vault_nodes)} vault nodes have a current, correct-width vector</div>
|
|
186
|
+
</div>
|
|
187
|
+
<ul class="counts">
|
|
188
|
+
${counts.map(([label, value, tone]) => `
|
|
189
|
+
<li class="count-row ${tone}" data-design-component="count-row"><span>${label}</span><span class="mono">${shown(value)}</span></li>`).join('')}
|
|
190
|
+
</ul>
|
|
191
|
+
<dl class="facts">
|
|
192
|
+
<div><dt>Indexed by</dt><dd class="mono">${shown(b.model)}</dd></div>
|
|
193
|
+
<div><dt>Index rows</dt><dd class="mono">${shown(b.rows)}</dd></div>
|
|
194
|
+
<div><dt>Index size</dt><dd class="mono">${formatBytes(b.db_bytes)}</dd></div>
|
|
195
|
+
<div><dt>Unparseable files</dt><dd class="mono">${shown(b.parse_errors)}</dd></div>
|
|
196
|
+
<div><dt>Brain</dt><dd class="mono">${shown(b.dir)}</dd></div>
|
|
197
|
+
</dl>
|
|
198
|
+
${b.stale || b.mismatched || b.missing ? '<p class="notice" data-design-component="notice">Rebuild the unusable vectors with <span class="mono">total-recall compile</span>.</p>' : ''}`;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
renderModels() {
|
|
202
|
+
const m = this.models;
|
|
203
|
+
if (m.phase === 'loading') return `<p class="notice" data-design-component="notice">Listing models${DASH}</p>`;
|
|
204
|
+
if (m.phase !== 'ready') return `<p class="notice bad" data-design-component="notice">Model list unavailable: ${escapeHtml(m.error)}</p>`;
|
|
205
|
+
const d = m.data;
|
|
206
|
+
if (d.reachable === false) return '<p class="notice bad" data-design-component="notice">No endpoint answered. The endpoints tried are listed under Provider.</p>';
|
|
207
|
+
const rows = Array.isArray(d.models) ? d.models : [];
|
|
208
|
+
if (!rows.length) return `<p class="notice" data-design-component="notice">${shown(d.url)} reports no models. Pull one below.</p>`;
|
|
209
|
+
return `
|
|
210
|
+
<p class="caption">${shown(d.url)} ${DASH} the vault needs ${shown(d.vault_dims)}-dim vectors</p>
|
|
211
|
+
<ul class="models">
|
|
212
|
+
${rows.map(r => `
|
|
213
|
+
<li class="model-row${r.name === d.selected ? ' selected' : ''}" data-design-component="model-row">
|
|
214
|
+
<span class="mono name">${shown(r.name)}${r.name === d.selected ? ' <span class="tag ok">selected</span>' : ''}</span>
|
|
215
|
+
<span class="tags">
|
|
216
|
+
<span class="tag">${r.dims ? `${escapeHtml(r.dims)} dims` : 'width unknown'}</span>
|
|
217
|
+
<span class="tag ${r.embedding_capable ? 'ok' : ''}">${r.embedding_capable ? 'embeds' : 'no embedding'}</span>
|
|
218
|
+
<span class="tag ${r.compatible ? 'ok' : 'warn'}">${r.compatible ? 'vault-compatible' : 'not usable'}</span>
|
|
219
|
+
${r.upstream ? '<span class="tag warn">upstream</span>' : ''}
|
|
220
|
+
</span>
|
|
221
|
+
</li>`).join('')}
|
|
222
|
+
</ul>`;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
renderBenchmark() {
|
|
226
|
+
const b = this.bench;
|
|
227
|
+
const running = b.phase === 'running';
|
|
228
|
+
const d = b.data || {};
|
|
229
|
+
return `
|
|
230
|
+
<div class="action">
|
|
231
|
+
<label class="field">Samples
|
|
232
|
+
<input id="bench-count" type="number" min="1" max="${BENCHMARK_MAX}" step="1" value="${escapeHtml(this.count)}" ${running ? 'disabled' : ''}>
|
|
233
|
+
</label>
|
|
234
|
+
<button id="bench-run" type="button" class="primary" data-design-component="button-primary" ${running || !this.host ? 'disabled' : ''}>${running ? 'Measuring' : 'Run benchmark'}</button>
|
|
235
|
+
</div>
|
|
236
|
+
<p class="caption">Embeds a neutral sentence with the selected model, never vault text. Runs only against a local model.</p>
|
|
237
|
+
${b.phase === 'failed' ? `<p class="notice bad" data-design-component="notice">Benchmark failed: ${escapeHtml(b.error)}</p>` : ''}
|
|
238
|
+
${b.phase === 'done' ? `
|
|
239
|
+
<dl class="facts">
|
|
240
|
+
<div><dt>Per embedding</dt><dd class="mono">${shown(d.ms_per_embedding)} ms</dd></div>
|
|
241
|
+
<div><dt>Range</dt><dd class="mono">${shown(d.min_ms)}${DASH}${shown(d.max_ms)} ms</dd></div>
|
|
242
|
+
<div><dt>Samples</dt><dd class="mono">${shown(d.samples)} × ${shown(d.dims)} dims</dd></div>
|
|
243
|
+
<div><dt>Full vault</dt><dd class="mono">${d.projected_minutes === null || d.projected_minutes === undefined ? DASH : `about ${escapeHtml(d.projected_minutes)} min for ${shown(d.vault_nodes)} nodes`}</dd></div>
|
|
244
|
+
<div><dt>Measured</dt><dd class="mono">${shown(d.model)} on ${shown(d.url)}</dd></div>
|
|
245
|
+
</dl>` : ''}`;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
renderPull() {
|
|
249
|
+
const p = this.pull;
|
|
250
|
+
const running = p.phase === 'running';
|
|
251
|
+
const d = p.data || {};
|
|
252
|
+
return `
|
|
253
|
+
<div class="action">
|
|
254
|
+
<label class="field grow">Model name
|
|
255
|
+
<input id="pull-model" type="text" spellcheck="false" autocomplete="off" value="${escapeHtml(this.pullModel)}" ${running ? 'disabled' : ''}>
|
|
256
|
+
</label>
|
|
257
|
+
<button id="pull-run" type="button" class="primary" data-design-component="button-primary" ${running || !this.host ? 'disabled' : ''}>${running ? 'Pulling' : 'Pull model'}</button>
|
|
258
|
+
</div>
|
|
259
|
+
<p class="caption">Downloads the named model to the configured loopback endpoint. Cloud and upstream models are refused. A pull can take several minutes.</p>
|
|
260
|
+
${p.phase === 'failed' ? `<p class="notice bad" data-design-component="notice">Pull failed${d.model ? ` for <span class="mono">${escapeHtml(d.model)}</span>` : ''}: ${escapeHtml(p.error)}</p>` : ''}
|
|
261
|
+
${p.phase === 'done' ? `<p class="notice ok" data-design-component="notice"><span class="mono">${shown(d.model)}</span> is ready on <span class="mono">${shown(d.url)}</span>.</p>` : ''}`;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
render() {
|
|
265
|
+
const root = this.shadowRoot;
|
|
266
|
+
if (!root) return;
|
|
267
|
+
const loading = this.status.phase === 'loading' || this.models.phase === 'loading';
|
|
268
|
+
root.innerHTML = `
|
|
269
|
+
<style>
|
|
270
|
+
:host {
|
|
271
|
+
display: block;
|
|
272
|
+
box-sizing: border-box;
|
|
273
|
+
padding: var(--spacing-lg, 16px);
|
|
274
|
+
color: var(--colors-text, #ecfeff);
|
|
275
|
+
background: var(--colors-background, #07171d);
|
|
276
|
+
font-family: var(--typography-body-font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
|
|
277
|
+
font-size: var(--typography-body-font-size, 13px);
|
|
278
|
+
}
|
|
279
|
+
*, *::before, *::after { box-sizing: border-box; }
|
|
280
|
+
@media (prefers-reduced-motion: reduce) {
|
|
281
|
+
*, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
|
|
282
|
+
}
|
|
283
|
+
header { display: flex; align-items: center; justify-content: space-between; gap: var(--spacing-md, 12px); flex-wrap: wrap; margin-bottom: var(--spacing-lg, 16px); }
|
|
284
|
+
h1 { margin: 0; font-size: 18px; }
|
|
285
|
+
h1 + p { margin: 2px 0 0; color: var(--colors-muted, #67e8f9); font-size: var(--typography-label-font-size, 11px); }
|
|
286
|
+
h2 { margin: 0 0 var(--spacing-md, 12px); font-size: var(--typography-label-font-size, 11px); font-weight: var(--typography-label-font-weight, 700); letter-spacing: 0.05em; text-transform: uppercase; color: var(--colors-muted, #67e8f9); }
|
|
287
|
+
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--spacing-md, 12px); }
|
|
288
|
+
section { background: var(--colors-surface, #0e2a35); border: 1px solid var(--colors-line, #164e63); border-radius: var(--rounded-md, 6px); padding: var(--spacing-md, 12px); min-width: 0; }
|
|
289
|
+
.mono { font-family: var(--typography-mono-font-family, 'JetBrains Mono', 'Fira Code', monospace); font-size: var(--typography-mono-font-size, 12px); overflow-wrap: anywhere; }
|
|
290
|
+
.verdict { display: flex; align-items: center; gap: var(--spacing-sm, 8px); flex-wrap: wrap; margin-bottom: var(--spacing-md, 12px); }
|
|
291
|
+
.chip { font-size: var(--typography-label-font-size, 11px); font-weight: 700; text-transform: uppercase; padding: var(--spacing-xs, 4px) var(--spacing-sm, 8px); border-radius: var(--rounded-md, 6px); border: 1px solid currentColor; }
|
|
292
|
+
.note, .caption { color: var(--colors-muted, #67e8f9); font-size: var(--typography-label-font-size, 11px); }
|
|
293
|
+
.caption { margin: 0 0 var(--spacing-sm, 8px); }
|
|
294
|
+
.ok { color: var(--colors-ok, #10b981); }
|
|
295
|
+
.warn { color: var(--colors-warn, #f59e0b); }
|
|
296
|
+
.bad { color: var(--colors-danger, #ef4444); }
|
|
297
|
+
.muted { color: var(--colors-muted, #67e8f9); }
|
|
298
|
+
.facts { display: grid; gap: var(--spacing-xs, 4px); margin: 0; }
|
|
299
|
+
.facts div { display: flex; justify-content: space-between; gap: var(--spacing-md, 12px); }
|
|
300
|
+
dt { color: var(--colors-muted, #67e8f9); }
|
|
301
|
+
dd { margin: 0; text-align: right; }
|
|
302
|
+
.notice { margin: var(--spacing-sm, 8px) 0 0; padding: var(--spacing-sm, 8px); background: var(--colors-background, #07171d); border-radius: var(--rounded-sm, 4px); }
|
|
303
|
+
.attempts, .counts, .models { list-style: none; margin: var(--spacing-sm, 8px) 0 0; padding: 0; display: grid; gap: var(--spacing-xs, 4px); }
|
|
304
|
+
.coverage { display: flex; align-items: baseline; gap: var(--spacing-md, 12px); flex-wrap: wrap; margin-bottom: var(--spacing-sm, 8px); }
|
|
305
|
+
.figure { font-family: var(--typography-figure-font-family, 'JetBrains Mono', monospace); font-size: var(--typography-figure-font-size, 28px); font-weight: var(--typography-figure-font-weight, 800); }
|
|
306
|
+
.figure-caption { color: var(--colors-muted, #67e8f9); }
|
|
307
|
+
.count-row { display: flex; justify-content: space-between; font-family: var(--typography-mono-font-family, 'JetBrains Mono', monospace); font-size: var(--typography-mono-font-size, 12px); }
|
|
308
|
+
.count-row:not(.ok):not(.warn) { color: var(--colors-muted, #67e8f9); }
|
|
309
|
+
.counts { margin-bottom: var(--spacing-md, 12px); }
|
|
310
|
+
.model-row { display: flex; justify-content: space-between; align-items: center; gap: var(--spacing-sm, 8px); flex-wrap: wrap; background: var(--colors-background, #07171d); border: 1px solid var(--colors-line, #164e63); border-radius: var(--rounded-sm, 4px); padding: var(--spacing-sm, 8px); }
|
|
311
|
+
.model-row.selected { border-color: var(--colors-primary, #06b6d4); }
|
|
312
|
+
.tags { display: flex; gap: var(--spacing-xs, 4px); flex-wrap: wrap; }
|
|
313
|
+
.tag { font-size: 10px; padding: 2px 6px; border-radius: var(--rounded-sm, 4px); border: 1px solid var(--colors-line, #164e63); color: var(--colors-muted, #67e8f9); }
|
|
314
|
+
.tag.ok { color: var(--colors-ok, #10b981); }
|
|
315
|
+
.tag.warn { color: var(--colors-warn, #f59e0b); }
|
|
316
|
+
.action { display: flex; align-items: flex-end; gap: var(--spacing-sm, 8px); flex-wrap: wrap; margin-bottom: var(--spacing-sm, 8px); }
|
|
317
|
+
.field { display: grid; gap: var(--spacing-xs, 4px); color: var(--colors-muted, #67e8f9); font-size: var(--typography-label-font-size, 11px); }
|
|
318
|
+
.field.grow { flex: 1 1 180px; }
|
|
319
|
+
input { min-height: 44px; padding: 0 var(--spacing-sm, 8px); color: var(--colors-text, #ecfeff); background: var(--colors-background, #07171d); border: 1px solid var(--colors-line, #164e63); border-radius: var(--rounded-sm, 4px); font-family: var(--typography-mono-font-family, 'JetBrains Mono', monospace); }
|
|
320
|
+
input[type=number] { width: 88px; }
|
|
321
|
+
button.primary { min-height: 44px; padding: 0 var(--spacing-lg, 16px); border: 0; border-radius: var(--rounded-sm, 4px); cursor: pointer; font-weight: 700; color: var(--colors-on-primary, #07171d); background: var(--colors-primary, #06b6d4); transition: background 0.15s ease; }
|
|
322
|
+
button.primary:hover:not(:disabled) { background: var(--colors-primary-hover, #22d3ee); }
|
|
323
|
+
button:disabled { opacity: 0.6; cursor: not-allowed; }
|
|
324
|
+
button.refresh { min-height: 44px; padding: 0 var(--spacing-md, 12px); color: var(--colors-text, #ecfeff); background: transparent; border: 1px solid var(--colors-line, #164e63); border-radius: var(--rounded-sm, 4px); cursor: pointer; }
|
|
325
|
+
button:focus-visible, input:focus-visible { outline: 2px solid var(--colors-primary-hover, #22d3ee); outline-offset: 2px; }
|
|
326
|
+
</style>
|
|
327
|
+
<header>
|
|
328
|
+
<div>
|
|
329
|
+
<h1>Embeddings</h1>
|
|
330
|
+
<p>Vectors behind Total Recall search for this brain</p>
|
|
331
|
+
</div>
|
|
332
|
+
<button id="refresh" type="button" class="refresh" ${loading || !this.host ? 'disabled' : ''}>${loading ? 'Reading' : 'Refresh'}</button>
|
|
333
|
+
</header>
|
|
334
|
+
<div class="grid">
|
|
335
|
+
<section data-design-component="section" aria-labelledby="h-provider"><h2 id="h-provider">Provider</h2>${this.renderProvider()}</section>
|
|
336
|
+
<section data-design-component="section" aria-labelledby="h-coverage"><h2 id="h-coverage">Vault coverage</h2>${this.renderCoverage()}</section>
|
|
337
|
+
<section data-design-component="section" aria-labelledby="h-models"><h2 id="h-models">Models on the endpoint</h2>${this.renderModels()}</section>
|
|
338
|
+
<section data-design-component="section" aria-labelledby="h-credentials"><h2 id="h-credentials">Credentials</h2>${this.renderCredentials()}</section>
|
|
339
|
+
<section data-design-component="section" aria-labelledby="h-benchmark"><h2 id="h-benchmark">Benchmark</h2>${this.renderBenchmark()}</section>
|
|
340
|
+
<section data-design-component="section" aria-labelledby="h-pull"><h2 id="h-pull">Pull a model</h2>${this.renderPull()}</section>
|
|
341
|
+
</div>`;
|
|
342
|
+
|
|
343
|
+
root.getElementById('refresh')?.addEventListener('click', () => this.load());
|
|
344
|
+
root.getElementById('bench-count')?.addEventListener('input', e => { this.count = e.target.value; });
|
|
345
|
+
root.getElementById('bench-run')?.addEventListener('click', () => this.runBenchmark());
|
|
346
|
+
root.getElementById('pull-model')?.addEventListener('input', e => { this.pullModel = e.target.value; });
|
|
347
|
+
root.getElementById('pull-run')?.addEventListener('click', () => this.runPull());
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
if (!customElements.get('tr-embeddings-home')) {
|
|
352
|
+
customElements.define('tr-embeddings-home', EmbeddingsHome);
|
|
353
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Git Copper Ledger
|
|
3
|
+
description: A copper and paper ledger for repository state and linked worktrees.
|
|
4
|
+
colors:
|
|
5
|
+
background: "#fcf7ef"
|
|
6
|
+
surface: "#f5e9d9"
|
|
7
|
+
text: "#32241b"
|
|
8
|
+
border: "#b29176"
|
|
9
|
+
accent: "#85411c"
|
|
10
|
+
muted: "#684b38"
|
|
11
|
+
danger: "#9c2924"
|
|
12
|
+
typography:
|
|
13
|
+
body:
|
|
14
|
+
fontFamily: "system-ui, sans-serif"
|
|
15
|
+
heading:
|
|
16
|
+
fontFamily: "Georgia, serif"
|
|
17
|
+
mono:
|
|
18
|
+
fontFamily: "ui-monospace, monospace"
|
|
19
|
+
spacing:
|
|
20
|
+
md: 16px
|
|
21
|
+
rounded:
|
|
22
|
+
md: 6px
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
# Git Copper Ledger
|
|
26
|
+
|
|
27
|
+
Use a warm paper background, a serif title, and tabular monospace counts. The repository audit reads first. Present conflicts and unpushed commits beside separate staged, unstaged, and untracked counts. Reserve copper for navigation and focus, and use red with a written label for failures.
|
|
28
|
+
|
|
29
|
+
Below the audit, list the registered worktrees like ledger entries. Give each entry its own branch or commit, path, and state. Wrap long paths and stack the form and metrics at narrow widths. Use an inset confirmation with the exact target for worktree changes.
|
|
30
|
+
|
|
31
|
+
Treat a missing measurement as unknown. Label ahead and behind as local upstream comparisons. Announce read and action results in text, preserve a visible keyboard focus outline, and keep controls at least 44 pixels tall.
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
# Git
|
|
2
|
+
|
|
3
|
+
The whole git CLI through Total Recall. Every git command works: anything that is not a plugin
|
|
4
|
+
operation runs git itself, with your arguments, git's hooks, output and exit status. On top of git,
|
|
5
|
+
the plugin signs git in from the auth store, checks commits and pushes, takes a snapshot before
|
|
6
|
+
destructive commands, and records the intent behind each change.
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
total-recall git status
|
|
10
|
+
total-recall git pull --rebase
|
|
11
|
+
total-recall git help rebase # git's own help for a command
|
|
12
|
+
total-recall git --help # the plugin's operations
|
|
13
|
+
total-recall git commit --help # one plugin operation's help (-h is git's usage)
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
The native Home opens with an audit and registered worktrees. It reads diff statistics on request and confirms the exact destination or target before a worktree change. Its [design](DESIGN.md) and SSSS blocks under `ui/chunks/` ship with the plugin.
|
|
17
|
+
|
|
18
|
+
## Install
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npx total-recall plugin install git
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Commit and push
|
|
25
|
+
|
|
26
|
+
- `commit [git commit arguments]` refuses a missing or machine-derived identity, unresolved
|
|
27
|
+
conflicts and a detached HEAD, then runs git's own `commit` with your arguments unchanged.
|
|
28
|
+
- Before `commit` and `push`, guards run:
|
|
29
|
+
- **Secret firewall:** the staged content and outgoing commits are compared with fingerprints of
|
|
30
|
+
every value in the auth store. A match refuses the command and names the key, never the value.
|
|
31
|
+
- **Rules:** workflow files (`.github/workflows`), internal project records in public
|
|
32
|
+
repositories, and machine-derived identities are refused.
|
|
33
|
+
- **Force-push guard:** `--force` becomes `--force-with-lease`. Deleting a remote branch needs
|
|
34
|
+
`--reason <text>`, which is recorded.
|
|
35
|
+
|
|
36
|
+
## Undo
|
|
37
|
+
|
|
38
|
+
Before a destructive command (`reset --hard`, `checkout -- <paths>`, `restore`, `clean`,
|
|
39
|
+
`branch -D`, `stash drop|clear`, `rebase`, `filter-branch`, `update-ref -d`) the plugin records a
|
|
40
|
+
snapshot of refs, the index and files.
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
total-recall git undo --list
|
|
44
|
+
total-recall git undo <event>
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Sign-in
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
total-recall git auth status # live check against the remote; no secret is shown
|
|
51
|
+
total-recall git auth map <host> <KEY>
|
|
52
|
+
total-recall git auth setup # helper entries for this machine
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
git asks the auth store through `credential-helper`; the credential goes only to git.
|
|
56
|
+
|
|
57
|
+
## The git CLI on every node
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
total-recall git cli --json # version, path, install source, upstream, release notes
|
|
61
|
+
total-recall git cli --all-nodes
|
|
62
|
+
total-recall git cli update # update git through its installer
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
The task `cli update --scheduled` runs daily on every node.
|
|
66
|
+
|
|
67
|
+
## Across the mesh
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
total-recall git fleet --all-nodes # dirty, unpushed, behind, diverged, stale stashes, abandoned worktrees, unmerged
|
|
71
|
+
total-recall git where <commit> # machines and checkouts that contain a commit
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Unmerged work
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
total-recall git unmerged [--json] # this repository
|
|
78
|
+
total-recall git unmerged --registered # every registered repository
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Lists local branches with commits the default branch lacks, linked worktrees with uncommitted
|
|
82
|
+
changes, and detached worktrees holding commits that no branch contains (removing such a worktree
|
|
83
|
+
loses them). A commit counts as landed when the default branch, local or origin, reaches it or holds
|
|
84
|
+
an equivalent patch, so rebased and cherry-picked work is not listed; a squash merge is a different
|
|
85
|
+
patch, so delete the branch once it has landed. Stale worktree records and branches kept on purpose
|
|
86
|
+
(`git config --add totalrecall.keepBranch <name>`) are shown but not counted. Registered brains
|
|
87
|
+
that are not git repositories are skipped.
|
|
88
|
+
|
|
89
|
+
The plugin declares this report as its `startup_check`, so `total-recall startup check` and
|
|
90
|
+
`brief` show the outstanding count and where it is whenever a session starts.
|
|
91
|
+
|
|
92
|
+
## Intent
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
total-recall git why <file>:<line> # blame plus the session, tracker item and rules recorded at commit time
|
|
96
|
+
total-recall git message # draft a commit message from the diff, tracker and action log
|
|
97
|
+
total-recall git group [--apply] # split a dirty tree into commits by agent session
|
|
98
|
+
total-recall git resolve [--apply] # propose conflict resolutions from both sides' intent
|
|
99
|
+
total-recall git bisect-agent <good> <bad> # first bad commit, with the quality gate as the test
|
|
100
|
+
total-recall git handoff <branch> [--out <file>] # branch, tracker and memory as one SSSS bundle
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Successful commits are recorded with their session and tracker items. A commit message that names
|
|
104
|
+
a decision is saved to memory.
|
|
105
|
+
|
|
106
|
+
## Repository state
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
total-recall git audit [--json] # branch, worktree, upstream and stash state
|
|
110
|
+
total-recall git identity [--json] # commit identity and the identities history publishes
|
|
111
|
+
total-recall git diff --json [--patch] [--cached] [--base <ref>]
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
An unknown upstream is never reported as zero unpushed commits.
|
|
115
|
+
|
|
116
|
+
## Using this from an agent
|
|
117
|
+
|
|
118
|
+
Send every git command here: `total-recall git <git command and arguments>` runs git itself, with
|
|
119
|
+
the same output and exit status, plus sign-in from the auth store and the guards above. Push your
|
|
120
|
+
finished, tested work yourself; never push unfinished work.
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
total-recall git status --short
|
|
124
|
+
total-recall git add -A
|
|
125
|
+
total-recall git commit -m "<message>"
|
|
126
|
+
total-recall git push
|
|
127
|
+
total-recall git fleet --json
|
|
128
|
+
total-recall git unmerged
|
|
129
|
+
total-recall git undo --list
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Finish what you start: land a branch or worktree once its work is done, then remove it. `unmerged`
|
|
133
|
+
shows what is still outside the default branch.
|
|
134
|
+
|
|
135
|
+
A refused commit or push names the rule or the auth key that matched; fix the cause, never bypass
|
|
136
|
+
the guard. Raw commands this plugin owns: `git <command>`.
|