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,182 +0,0 @@
|
|
|
1
|
-
const card = `
|
|
2
|
-
<style>
|
|
3
|
-
:host {
|
|
4
|
-
--face-ink: #1b1814; --face-panel: #27211a; --face-line: #564636; --face-paper: #f7ebd6;
|
|
5
|
-
--face-quiet: #c2b59f; --face-gold: #f4c97a; --face-danger: #ffaaa1; --face-good: #c2e4ad;
|
|
6
|
-
--ink:var(--face-ink); --panel:var(--face-panel); --line:var(--border,var(--face-line));
|
|
7
|
-
--paper:var(--text-primary,var(--face-paper)); --quiet:var(--face-quiet);
|
|
8
|
-
--gold:var(--face-gold); --danger:var(--face-danger); --good:var(--face-good);
|
|
9
|
-
display:block; color:var(--paper); font:14px/1.45 system-ui,sans-serif;
|
|
10
|
-
}
|
|
11
|
-
* { box-sizing:border-box; }
|
|
12
|
-
.workbench { background:var(--ink); border:1px solid var(--line); border-radius:10px; overflow:hidden; }
|
|
13
|
-
.head { display:flex; align-items:center; gap:12px; padding:14px 18px; border-bottom:1px solid var(--line); }
|
|
14
|
-
.mark { width:32px; height:32px; flex:none; color:var(--gold); }
|
|
15
|
-
h2,h3,p { margin:0; }
|
|
16
|
-
h2 { font-size:18px; }
|
|
17
|
-
h3 { font-size:14px; margin-bottom:6px; }
|
|
18
|
-
.subtle, label, dt { color:var(--quiet); }
|
|
19
|
-
.rack { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,160px),1fr)); gap:1px; background:var(--line); }
|
|
20
|
-
.slot { background:var(--panel); min-width:0; padding:13px 16px; border-left:3px solid var(--gold); }
|
|
21
|
-
dl,dd { margin:0; }
|
|
22
|
-
dd { margin-top:5px; font-size:16px; font-weight:650; overflow-wrap:anywhere; }
|
|
23
|
-
small { display:block; color:var(--quiet); margin-top:4px; overflow-wrap:anywhere; }
|
|
24
|
-
.controls, .tasks { display:grid; gap:10px; padding:12px 16px; }
|
|
25
|
-
.controls { display:flex; flex-wrap:wrap; align-items:end; border-bottom:1px solid var(--line); }
|
|
26
|
-
.tasks { grid-template-columns:repeat(auto-fit,minmax(min(100%,245px),1fr)); }
|
|
27
|
-
form { padding:10px; border-top:1px solid var(--line); min-width:0; }
|
|
28
|
-
label { display:grid; gap:4px; margin-bottom:8px; }
|
|
29
|
-
button,input,select {
|
|
30
|
-
border:1px solid var(--line); background:var(--panel); color:var(--paper); min-height:44px;
|
|
31
|
-
border-radius:5px; padding:6px 9px; font:inherit; max-width:100%;
|
|
32
|
-
}
|
|
33
|
-
input[type=text] { width:100%; min-width:0; }
|
|
34
|
-
input[type=checkbox] { min-height:auto; width:17px; height:17px; }
|
|
35
|
-
.choice { display:flex; align-items:center; gap:6px; min-height:44px; }
|
|
36
|
-
.scope { margin:0; }
|
|
37
|
-
button { cursor:pointer; }
|
|
38
|
-
.primary { border-color:var(--gold); color:var(--gold); }
|
|
39
|
-
button:disabled { opacity:.55; cursor:wait; }
|
|
40
|
-
:focus-visible { outline:2px solid var(--gold); outline-offset:2px; }
|
|
41
|
-
[data-tone=pass] { color:var(--good); }
|
|
42
|
-
[data-tone=fail] { color:var(--danger); }
|
|
43
|
-
.evidence { border-top:1px solid var(--line); padding:12px 16px; }
|
|
44
|
-
.evidence p { display:flex; flex-wrap:wrap; justify-content:space-between; gap:8px; }
|
|
45
|
-
pre { margin:6px 0 0; white-space:pre-wrap; overflow-wrap:anywhere; max-height:240px; overflow:auto; }
|
|
46
|
-
.changed { animation:readout .2s ease-out; }
|
|
47
|
-
@keyframes readout { from { transform:translateY(3px); opacity:.75; } to { transform:none; opacity:1; } }
|
|
48
|
-
@media(prefers-reduced-motion:reduce) { .changed { animation:none; } }
|
|
49
|
-
</style>
|
|
50
|
-
<section class="workbench" aria-label="SSSS workbench">
|
|
51
|
-
<header class="head">
|
|
52
|
-
<svg class="mark" viewBox="0 0 40 40" aria-hidden="true">
|
|
53
|
-
<path d="M10 8h17l3 3M10 16h14l6-5M10 24h14l6-5M10 32h17l3-5M10 8v24"
|
|
54
|
-
fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"/>
|
|
55
|
-
</svg>
|
|
56
|
-
<div><h2>SSSS</h2><p class="subtle">Installation and contract checks</p></div>
|
|
57
|
-
</header>
|
|
58
|
-
<dl class="rack">
|
|
59
|
-
<div class="slot"><dt>Engine / spec</dt><dd id="engine">—</dd><small id="engine-detail"></small></div>
|
|
60
|
-
<div class="slot"><dt>Portable skill</dt><dd id="skill">—</dd><small id="skill-detail"></small></div>
|
|
61
|
-
<div class="slot"><dt>Project scaffold</dt><dd id="scaffold">—</dd><small id="scaffold-detail"></small></div>
|
|
62
|
-
</dl>
|
|
63
|
-
<div class="controls">
|
|
64
|
-
<label class="scope">Installation scope <select id="scope">
|
|
65
|
-
<option value="auto">Current brain</option><option value="project">Project</option><option value="global">Shared</option>
|
|
66
|
-
</select></label>
|
|
67
|
-
<button type="button" id="refresh" class="primary">Check installation</button>
|
|
68
|
-
<button type="button" id="repair">Repair managed files</button>
|
|
69
|
-
<button type="button" id="suite">Run engine conformance</button>
|
|
70
|
-
</div>
|
|
71
|
-
<div class="tasks">
|
|
72
|
-
<form id="validate"><h3>Document contract</h3>
|
|
73
|
-
<label>Document path <input type="text" name="file" required></label>
|
|
74
|
-
<label>Extension registry path <input type="text" name="extension"></label>
|
|
75
|
-
<button>Validate document</button>
|
|
76
|
-
</form>
|
|
77
|
-
<form id="registry"><h3>Registry integrity</h3>
|
|
78
|
-
<label>Lock file path <input type="text" name="lock" required></label>
|
|
79
|
-
<label>Extension registry path <input type="text" name="extension"></label>
|
|
80
|
-
<button>Verify registry</button>
|
|
81
|
-
</form>
|
|
82
|
-
<form id="new-project"><h3>New SSSS project</h3>
|
|
83
|
-
<label>New directory <input type="text" name="directory" required></label>
|
|
84
|
-
<label>Extension name <input type="text" name="extension"></label>
|
|
85
|
-
<label class="choice"><input type="checkbox" name="with-total-recall"> Include Total Recall wiring</label>
|
|
86
|
-
<button>Create project</button>
|
|
87
|
-
</form>
|
|
88
|
-
</div>
|
|
89
|
-
<div class="evidence" aria-live="polite">
|
|
90
|
-
<p><strong id="verdict">Awaiting inspection</strong><time id="attempt"></time></p>
|
|
91
|
-
<pre id="result" tabindex="0"></pre>
|
|
92
|
-
</div>
|
|
93
|
-
</section>`;
|
|
94
|
-
|
|
95
|
-
export class SsssCard extends HTMLElement {
|
|
96
|
-
set host(value) {
|
|
97
|
-
this.bridge = value;
|
|
98
|
-
if (this.isConnected && this.shadowRoot && value) this.inspect();
|
|
99
|
-
}
|
|
100
|
-
get host() { return this.bridge; }
|
|
101
|
-
|
|
102
|
-
connectedCallback() {
|
|
103
|
-
if (!this.shadowRoot) {
|
|
104
|
-
this.attachShadow({ mode: 'open' }).innerHTML = card;
|
|
105
|
-
this.find('refresh').onclick = () => this.inspect();
|
|
106
|
-
this.find('scope').onchange = () => this.inspect();
|
|
107
|
-
this.find('repair').onclick = () => this.inspect('repair');
|
|
108
|
-
this.find('suite').onclick = () => this.perform('conformance');
|
|
109
|
-
this.bindForm('validate', 'validate');
|
|
110
|
-
this.bindForm('registry', 'registry');
|
|
111
|
-
this.bindForm('new-project', 'scaffold');
|
|
112
|
-
}
|
|
113
|
-
if (this.host) this.inspect();
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
find(id) { return this.shadowRoot.getElementById(id); }
|
|
117
|
-
|
|
118
|
-
bindForm(id, operation) {
|
|
119
|
-
const form = this.find(id);
|
|
120
|
-
form.onsubmit = event => {
|
|
121
|
-
event.preventDefault();
|
|
122
|
-
const args = [];
|
|
123
|
-
for (const [name, value] of new FormData(form)) {
|
|
124
|
-
if (value === 'on' && name === 'with-total-recall') args.push('--with-total-recall');
|
|
125
|
-
else if (String(value).trim()) args.push('--' + name, String(value).trim());
|
|
126
|
-
}
|
|
127
|
-
this.perform(operation, args);
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
inspect(operation = 'status') {
|
|
132
|
-
return this.perform(operation, ['--scope', this.find('scope').value]);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
paintInstallation(result) {
|
|
136
|
-
this.find('engine').textContent = result?.version ? result.version + ' / ' + result.specVersion : '—';
|
|
137
|
-
this.find('engine-detail').textContent = result?.error || '';
|
|
138
|
-
for (const part of ['skill', 'scaffold']) {
|
|
139
|
-
const item = result?.[part];
|
|
140
|
-
this.find(part).textContent = item ? (item.ok ? item.files + ' files verified' : 'Needs attention') : '—';
|
|
141
|
-
this.find(part).dataset.tone = item ? (item.ok ? 'pass' : 'fail') : '';
|
|
142
|
-
this.find(part + '-detail').textContent = item?.error || item?.path || '';
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
async perform(operation, args = []) {
|
|
147
|
-
if (!this.host || this.busy) return;
|
|
148
|
-
const installation = operation === 'status' || operation === 'repair';
|
|
149
|
-
this.busy = true;
|
|
150
|
-
const controls = [...this.shadowRoot.querySelectorAll('button,select')];
|
|
151
|
-
controls.forEach(control => { control.disabled = true; });
|
|
152
|
-
const verdict = this.find('verdict');
|
|
153
|
-
verdict.textContent = 'Checking…';
|
|
154
|
-
verdict.dataset.tone = '';
|
|
155
|
-
const output = this.find('result');
|
|
156
|
-
output.textContent = '';
|
|
157
|
-
output.classList.remove('changed');
|
|
158
|
-
if (installation) this.paintInstallation(null);
|
|
159
|
-
const attempt = new Date().toISOString();
|
|
160
|
-
this.find('attempt').textContent = attempt;
|
|
161
|
-
this.find('attempt').dateTime = attempt;
|
|
162
|
-
try {
|
|
163
|
-
const reply = await this.host.run(operation, [...args, '--json']);
|
|
164
|
-
const result = typeof reply === 'string' ? JSON.parse(reply) : reply;
|
|
165
|
-
if (typeof result?.ok !== 'boolean') throw new Error('SSSS returned no verdict');
|
|
166
|
-
if (installation) this.paintInstallation(result);
|
|
167
|
-
verdict.textContent = result.ok ? (operation === 'scaffold' ? 'Project created' : 'Verified') : 'Check failed';
|
|
168
|
-
verdict.dataset.tone = result.ok ? 'pass' : 'fail';
|
|
169
|
-
output.textContent = installation ? (result.error || '') : (result.output || JSON.stringify(result, null, 2));
|
|
170
|
-
} catch (error) {
|
|
171
|
-
verdict.textContent = 'Check failed';
|
|
172
|
-
verdict.dataset.tone = 'fail';
|
|
173
|
-
output.textContent = error.message;
|
|
174
|
-
} finally {
|
|
175
|
-
this.busy = false;
|
|
176
|
-
controls.forEach(control => { control.disabled = false; });
|
|
177
|
-
output.classList.add('changed');
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
if (!customElements.get('tr-ssss-card')) customElements.define('tr-ssss-card', SsssCard);
|
package/src/core/append-log.mjs
DELETED
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Append-only JSONL log with last-write-wins semantics and compaction.
|
|
3
|
-
*
|
|
4
|
-
* Write: O(1) — fs.appendFileSync one line
|
|
5
|
-
* Read: O(n) on cold load, cached after first read
|
|
6
|
-
* Compact: Rewrites only latest version of each key
|
|
7
|
-
*
|
|
8
|
-
* File format: One JSON object per line, each with a mandatory `_key` field.
|
|
9
|
-
* Later entries for the same `_key` shadow earlier ones.
|
|
10
|
-
* Tombstones: { "_key": "slug", "_deleted": true }
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
import fs from 'node:fs';
|
|
14
|
-
import path from 'node:path';
|
|
15
|
-
import { atomicWrite } from './vault.mjs';
|
|
16
|
-
import { logger } from './logger.mjs';
|
|
17
|
-
|
|
18
|
-
/** @type {Map<string, AppendLog>} Registry of all active AppendLog instances */
|
|
19
|
-
const activeAppendLogs = new Map();
|
|
20
|
-
|
|
21
|
-
export class AppendLog {
|
|
22
|
-
#filePath;
|
|
23
|
-
#cache; // Map<string, object> — latest value per key
|
|
24
|
-
#dirty; // number of appended lines since last compact
|
|
25
|
-
#compactThreshold;
|
|
26
|
-
|
|
27
|
-
constructor(filePath, { compactThreshold = 500 } = {}) {
|
|
28
|
-
this.#filePath = filePath;
|
|
29
|
-
this.#cache = null;
|
|
30
|
-
this.#dirty = 0;
|
|
31
|
-
this.#compactThreshold = compactThreshold;
|
|
32
|
-
activeAppendLogs.set(filePath, this);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/** Read the full index. Returns Map<key, value>. Cached after first call. */
|
|
36
|
-
entries() {
|
|
37
|
-
if (this.#cache) return this.#cache;
|
|
38
|
-
this.#cache = new Map();
|
|
39
|
-
if (!fs.existsSync(this.#filePath)) return this.#cache;
|
|
40
|
-
const raw = fs.readFileSync(this.#filePath, 'utf8');
|
|
41
|
-
for (const line of raw.split('\n')) {
|
|
42
|
-
if (!line.trim()) continue;
|
|
43
|
-
try {
|
|
44
|
-
const entry = JSON.parse(line);
|
|
45
|
-
if (entry._deleted) this.#cache.delete(entry._key);
|
|
46
|
-
else this.#cache.set(entry._key, entry);
|
|
47
|
-
} catch { /* skip corrupt lines */ }
|
|
48
|
-
}
|
|
49
|
-
return this.#cache;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
/** Get a single entry by key. */
|
|
53
|
-
get(key) {
|
|
54
|
-
return this.entries().get(key) ?? null;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/** Append a single entry. O(1) I/O. */
|
|
58
|
-
append(key, value) {
|
|
59
|
-
const dir = path.dirname(this.#filePath);
|
|
60
|
-
if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true });
|
|
61
|
-
const entry = { _key: key, ...value };
|
|
62
|
-
fs.appendFileSync(this.#filePath, JSON.stringify(entry) + '\n');
|
|
63
|
-
// Update in-memory cache
|
|
64
|
-
this.entries().set(key, entry);
|
|
65
|
-
this.#dirty++;
|
|
66
|
-
if (this.#dirty >= this.#compactThreshold) {
|
|
67
|
-
this.compact();
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/** Write a tombstone for a key. O(1) I/O. */
|
|
72
|
-
remove(key) {
|
|
73
|
-
const dir = path.dirname(this.#filePath);
|
|
74
|
-
if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true });
|
|
75
|
-
fs.appendFileSync(this.#filePath, JSON.stringify({ _key: key, _deleted: true }) + '\n');
|
|
76
|
-
this.entries().delete(key);
|
|
77
|
-
this.#dirty++;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
/** Number of live entries. */
|
|
81
|
-
get size() {
|
|
82
|
-
return this.entries().size;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
/** Convert to plain object (for JSON.stringify compatibility). */
|
|
86
|
-
toObject() {
|
|
87
|
-
const obj = {};
|
|
88
|
-
for (const [key, value] of this.entries()) {
|
|
89
|
-
const { _key, ...rest } = value;
|
|
90
|
-
obj[key] = rest;
|
|
91
|
-
}
|
|
92
|
-
return obj;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
/** Compact: rewrite file with only latest versions. */
|
|
96
|
-
compact() {
|
|
97
|
-
const entries = this.entries();
|
|
98
|
-
const lines = [];
|
|
99
|
-
for (const [, value] of entries) {
|
|
100
|
-
lines.push(JSON.stringify(value));
|
|
101
|
-
}
|
|
102
|
-
atomicWrite(this.#filePath, lines.join('\n') + '\n');
|
|
103
|
-
this.#dirty = 0;
|
|
104
|
-
logger.info('append-log', `Compacted ${this.#filePath}: ${lines.length} entries`);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
/** Invalidate the in-memory cache (force reload on next read). */
|
|
108
|
-
invalidate() {
|
|
109
|
-
this.#cache = null;
|
|
110
|
-
this.#dirty = 0;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* Compact all active AppendLog instances.
|
|
116
|
-
* Returns summary with number of logs compacted and total entries.
|
|
117
|
-
*/
|
|
118
|
-
export function compactAppendLogs() {
|
|
119
|
-
let logsCompacted = 0;
|
|
120
|
-
let totalEntries = 0;
|
|
121
|
-
for (const [filePath, log] of activeAppendLogs) {
|
|
122
|
-
try {
|
|
123
|
-
log.compact();
|
|
124
|
-
logsCompacted++;
|
|
125
|
-
totalEntries += log.size;
|
|
126
|
-
} catch (err) {
|
|
127
|
-
logger.warn('append-log', `Failed to compact ${filePath}: ${err.message}`);
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
return { logs_compacted: logsCompacted, total_entries: totalEntries };
|
|
131
|
-
}
|
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Scheduled plugin tasks.
|
|
3
|
-
*
|
|
4
|
-
* A manifest task `{ intent, schedule: "<5-field cron>", command }` runs the
|
|
5
|
-
* plugin's own CLI subcommand on that schedule, out of process. Tasks are per
|
|
6
|
-
* node by default, regardless of leadership. Tasks with selected-node placement
|
|
7
|
-
* require an explicit matching node in plugin_record.task_nodes[command].
|
|
8
|
-
*
|
|
9
|
-
* The last minute-slot each command ran in is kept in the plugin_record, so a
|
|
10
|
-
* restart neither repeats a slot nor loses one: when the daemon was busy or
|
|
11
|
-
* down, the most recent matching slot since the last run (within a day) runs
|
|
12
|
-
* once. A task never runs just because it was installed — the first run is the
|
|
13
|
-
* first matching slot after the scheduler first sees it.
|
|
14
|
-
*/
|
|
15
|
-
import { discoverPlugins } from './plugin-loader.mjs';
|
|
16
|
-
import { readPluginRecord, patchPluginRecord, ensurePluginRecord } from './plugin-store.mjs';
|
|
17
|
-
import { pluginExecutionEnabled } from './plugin-state.mjs';
|
|
18
|
-
import { runPluginCommand } from './plugin-runner.mjs';
|
|
19
|
-
import { appendVfsEvent } from './ssss-operation-service.mjs';
|
|
20
|
-
import { vaultForPluginsDir } from './plugin-loader.mjs';
|
|
21
|
-
import { logger } from './logger.mjs';
|
|
22
|
-
import { getMeshSelf, meshNodeKey } from './mesh.mjs';
|
|
23
|
-
|
|
24
|
-
const TASK_TIMEOUT_MS = 60_000;
|
|
25
|
-
const MAX_CATCHUP_MINUTES = 24 * 60;
|
|
26
|
-
import { parseCron, cronMatches } from './plugin-cron.mjs';
|
|
27
|
-
export { parseCron, cronMatches } from './plugin-cron.mjs';
|
|
28
|
-
const pad = (n) => String(n).padStart(2, '0');
|
|
29
|
-
|
|
30
|
-
/** A selected-node task stays idle until this node's plugin record selects it. */
|
|
31
|
-
export function taskRunsOnNode(task, record, self) {
|
|
32
|
-
if (task.placement !== 'selected-node') return true;
|
|
33
|
-
const selected = String(record?.task_nodes?.[task.command] || '').trim();
|
|
34
|
-
if (!selected || !self?.hostname) return false;
|
|
35
|
-
return selected === self.ip || meshNodeKey(selected) === meshNodeKey(self.hostname);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
/** Local minute-slot key, e.g. 2026-09-22T14:05. */
|
|
39
|
-
export function minuteSlot(date) {
|
|
40
|
-
return `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())}T${pad(date.getHours())}:${pad(date.getMinutes())}`;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
function slotToDate(slot) {
|
|
44
|
-
const m = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})$/.exec(String(slot || ''));
|
|
45
|
-
return m ? new Date(Number(m[1]), Number(m[2]) - 1, Number(m[3]), Number(m[4]), Number(m[5])) : null;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* The most recent slot matching `cron` in (lastSlot, now], or null.
|
|
50
|
-
* @returns {string|null}
|
|
51
|
-
*/
|
|
52
|
-
export function latestDueSlot(cron, lastSlot, now = new Date()) {
|
|
53
|
-
const floorNow = new Date(now.getFullYear(), now.getMonth(), now.getDate(), now.getHours(), now.getMinutes());
|
|
54
|
-
const last = slotToDate(lastSlot);
|
|
55
|
-
for (let i = 0; i < MAX_CATCHUP_MINUTES; i++) {
|
|
56
|
-
const candidate = new Date(floorNow.getTime() - i * 60_000);
|
|
57
|
-
if (last && candidate <= last) return null;
|
|
58
|
-
if (cronMatches(cron, candidate)) return minuteSlot(candidate);
|
|
59
|
-
}
|
|
60
|
-
return null;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Run every task that is due. Tasks run sequentially so a slow plugin cannot
|
|
65
|
-
* multiply into concurrent processes on a constrained host.
|
|
66
|
-
* @param {{ projectRoot?: string, now?: Date, runner?: Function, selfNode?: object }} [options]
|
|
67
|
-
* @returns {Promise<Array<{ plugin: string, command: string, slot: string, ok: boolean, exitCode: number|null }>>}
|
|
68
|
-
*/
|
|
69
|
-
export async function runDuePluginTasks(options = {}) {
|
|
70
|
-
const { projectRoot = process.cwd(), now = new Date(), runner = runPluginCommand } = options;
|
|
71
|
-
const selfNode = options.selfNode === undefined ? getMeshSelf() : options.selfNode;
|
|
72
|
-
const results = [];
|
|
73
|
-
|
|
74
|
-
for (const plugin of discoverPlugins(projectRoot)) {
|
|
75
|
-
if (!plugin.valid || !Array.isArray(plugin.manifest.tasks) || plugin.manifest.tasks.length === 0) continue;
|
|
76
|
-
|
|
77
|
-
let record = readPluginRecord(plugin);
|
|
78
|
-
if (!record) record = await ensurePluginRecord(plugin);
|
|
79
|
-
// Scheduled work follows the repository's own setting for a shared plugin.
|
|
80
|
-
if (!pluginExecutionEnabled(plugin, { projectRoot })) continue;
|
|
81
|
-
const runs = { ...(record?.task_runs || {}) };
|
|
82
|
-
let changed = false;
|
|
83
|
-
|
|
84
|
-
for (const task of plugin.manifest.tasks) {
|
|
85
|
-
if (!taskRunsOnNode(task, record, selfNode)) continue;
|
|
86
|
-
let cron;
|
|
87
|
-
try {
|
|
88
|
-
cron = parseCron(task.schedule);
|
|
89
|
-
} catch (err) {
|
|
90
|
-
logger.warn('plugin-tasks', `Skipping ${plugin.id}:${task.command} — ${err.message}`);
|
|
91
|
-
continue;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
if (!runs[task.command]) {
|
|
95
|
-
// First sighting: mark the present so the first run is the next real slot.
|
|
96
|
-
runs[task.command] = minuteSlot(now);
|
|
97
|
-
changed = true;
|
|
98
|
-
continue;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
const slot = latestDueSlot(cron, runs[task.command], now);
|
|
102
|
-
if (!slot) continue;
|
|
103
|
-
|
|
104
|
-
const result = await runner(plugin, { subcommand: task.command, cwd: projectRoot, timeoutMs: task.timeout_ms || TASK_TIMEOUT_MS })
|
|
105
|
-
.catch((err) => ({ ok: false, exitCode: null, output: err.message, durationMs: 0, timedOut: false }));
|
|
106
|
-
runs[task.command] = slot;
|
|
107
|
-
changed = true;
|
|
108
|
-
results.push({ plugin: plugin.id, command: task.command, slot, ok: result.ok, exitCode: result.exitCode });
|
|
109
|
-
|
|
110
|
-
try {
|
|
111
|
-
await appendVfsEvent(
|
|
112
|
-
`plugins/${plugin.id}/task-${Date.now()}`,
|
|
113
|
-
{
|
|
114
|
-
kind: 'plugin.task_run',
|
|
115
|
-
plugin_id: plugin.id,
|
|
116
|
-
command: task.command,
|
|
117
|
-
intent: task.intent,
|
|
118
|
-
slot,
|
|
119
|
-
ok: result.ok,
|
|
120
|
-
exit_code: result.exitCode,
|
|
121
|
-
timed_out: !!result.timedOut,
|
|
122
|
-
duration_ms: result.durationMs,
|
|
123
|
-
output_tail: String(result.output || '').slice(-2000)
|
|
124
|
-
},
|
|
125
|
-
{ actorRole: 'system', intent: 'Record plugin task run', vaultRoot: vaultForPluginsDir(plugin.pluginsDir) }
|
|
126
|
-
);
|
|
127
|
-
} catch (err) {
|
|
128
|
-
logger.warn('plugin-tasks', `Could not record task run for ${plugin.id}: ${err.message}`);
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
if (changed) {
|
|
133
|
-
try {
|
|
134
|
-
await patchPluginRecord(plugin, { task_runs: runs });
|
|
135
|
-
} catch (err) {
|
|
136
|
-
logger.warn('plugin-tasks', `Could not update task runs for ${plugin.id}: ${err.message}`);
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
return results;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
let timer = null;
|
|
145
|
-
let running = false;
|
|
146
|
-
|
|
147
|
-
/** Check for due plugin tasks once a minute. Returns a stop function. */
|
|
148
|
-
export function startPluginTaskScheduler(options = {}) {
|
|
149
|
-
if (timer) return () => stopPluginTaskScheduler();
|
|
150
|
-
const tick = async () => {
|
|
151
|
-
if (running) return;
|
|
152
|
-
running = true;
|
|
153
|
-
try {
|
|
154
|
-
const results = await runDuePluginTasks(options);
|
|
155
|
-
for (const r of results) {
|
|
156
|
-
logger.info('plugin-tasks', `${r.plugin}:${r.command} slot ${r.slot} ${r.ok ? 'ok' : `failed (exit ${r.exitCode})`}`);
|
|
157
|
-
}
|
|
158
|
-
} catch (err) {
|
|
159
|
-
logger.warn('plugin-tasks', `Scheduler tick failed: ${err.message}`);
|
|
160
|
-
} finally {
|
|
161
|
-
running = false;
|
|
162
|
-
}
|
|
163
|
-
};
|
|
164
|
-
timer = setInterval(tick, 60_000);
|
|
165
|
-
timer.unref?.();
|
|
166
|
-
tick();
|
|
167
|
-
return () => stopPluginTaskScheduler();
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
export function stopPluginTaskScheduler() {
|
|
171
|
-
if (timer) clearInterval(timer);
|
|
172
|
-
timer = null;
|
|
173
|
-
}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: task
|
|
3
|
-
slug: onboarding-interview
|
|
4
|
-
category: onboarding
|
|
5
|
-
title: "Conduct portable-memory onboarding interview"
|
|
6
|
-
status: pending
|
|
7
|
-
priority: 1
|
|
8
|
-
created: {{CREATED_AT}}
|
|
9
|
-
updated: {{CREATED_AT}}
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
## Objective
|
|
13
|
-
|
|
14
|
-
Conduct a warm, practical onboarding interview so Total Recall can store durable preferences and facts as Markdown memory nodes. This is personal portable memory — not an operating system takeover. Keep the tone helpful and concrete.
|
|
15
|
-
|
|
16
|
-
## Instructions for the Agent
|
|
17
|
-
|
|
18
|
-
When the user starts their next chat session (and they have no `user-profile` yet), conduct this interview BEFORE unrelated work. Do NOT dump all questions at once. Ask one at a time. Acknowledge each answer before the next.
|
|
19
|
-
|
|
20
|
-
Once the user has answered (or skipped any), write their answers into the vault using tools / CLI (`remember` or direct vault writes). Prefer CLI when available:
|
|
21
|
-
|
|
22
|
-
```bash
|
|
23
|
-
npx total-recall remember preference "..." --tags "user,profile,onboarding" --importance 5
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
## Interview Questions (ask one at a time)
|
|
27
|
-
|
|
28
|
-
1. **Who are you?** — "Quick intro: what do you do, and what are you most focused on right now?"
|
|
29
|
-
|
|
30
|
-
2. **What should I remember?** — "What kinds of things matter most for me to keep: decisions, preferences, project facts, people, or something else?"
|
|
31
|
-
|
|
32
|
-
3. **Which tools do you use?** — "Which IDEs or agents should share this memory? (Claude Code, Cursor, Codex, Gemini, Aider, Obsidian, HTTP, etc.) I can guide you with `npx total-recall connect …`."
|
|
33
|
-
|
|
34
|
-
4. **How should I talk?** — "Prefer short answers or detailed ones? Should I push back or mostly support?"
|
|
35
|
-
|
|
36
|
-
5. **Hard rules** — "Any absolute do's or don'ts I must always follow (style, tools, safety)?"
|
|
37
|
-
|
|
38
|
-
6. **Background work** — "Want dream consolidation and optional daemon tasks running in the background, or on-demand only?"
|
|
39
|
-
|
|
40
|
-
7. **Secrets** — "API keys never go in the vault. Use `npx total-recall auth secret set`. Any keys you want to set up next?"
|
|
41
|
-
|
|
42
|
-
8. **Notifications (optional)** — "Want Telegram pings when background tasks finish? If yes, BotFather token + chat ID."
|
|
43
|
-
|
|
44
|
-
## Product context to reinforce (lightly, not as a lecture)
|
|
45
|
-
|
|
46
|
-
- **Write** → `remember` / session ingest
|
|
47
|
-
- **Sleep** → `dream` (consolidate, conflict-check, recompile)
|
|
48
|
-
- **Read** → `recall` + compiled surfaces in any connected IDE
|
|
49
|
-
- **Async** → open task queue / daemon under policy
|
|
50
|
-
- Hosts are equal — track any repo; no product-specific hardcoding
|
|
51
|
-
|
|
52
|
-
## After the Interview
|
|
53
|
-
|
|
54
|
-
Write (or update) these files:
|
|
55
|
-
|
|
56
|
-
**`.agent/config/notifications.yml`** — only if they provided Telegram details:
|
|
57
|
-
```yaml
|
|
58
|
-
telegram_bot_token: "their-token-here"
|
|
59
|
-
telegram_chat_id: "their-chat-id-here"
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
**`.agent/memory-vault/preferences/user-profile.md`** — identity + communication style
|
|
63
|
-
**`.agent/memory-vault/preferences/user-priorities.md`** — goals and what they want from memory
|
|
64
|
-
**`.agent/memory-vault/preferences/user-interests.md`** — topics worth tracking
|
|
65
|
-
|
|
66
|
-
Frontmatter template:
|
|
67
|
-
```yaml
|
|
68
|
-
---
|
|
69
|
-
type: memory
|
|
70
|
-
slug: user-profile
|
|
71
|
-
category: preferences
|
|
72
|
-
title: "User Profile"
|
|
73
|
-
status: active
|
|
74
|
-
confidence: 1.0
|
|
75
|
-
importance: 5
|
|
76
|
-
created: <ISO timestamp>
|
|
77
|
-
updated: <ISO timestamp>
|
|
78
|
-
tags: [user, profile, onboarding]
|
|
79
|
-
---
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
Then mark this task `status: done` and confirm the profile was saved. Point them at the dashboard **Onboarding** page or `init → connect → remember → dream` if they prefer CLI-only.
|
|
File without changes
|