@stravica-ai/digital-operator-pa 0.1.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/LICENSE +21 -0
- package/README.md +170 -0
- package/bin/desk +9 -0
- package/bin/distill +2 -0
- package/bin/estate-sync +2 -0
- package/bin/launch +2 -0
- package/bin/memory-sync +2 -0
- package/bin/migrate-inspect +2 -0
- package/bin/pa +2 -0
- package/bin/pa-coordinator-hook +2 -0
- package/bin/pa-init +2 -0
- package/bin/research +2 -0
- package/bin/scheduler +2 -0
- package/bin/secrets +2 -0
- package/bin/slice +2 -0
- package/bin/smoke +9 -0
- package/bin/sync +2 -0
- package/dist/engineering-pa-cli/README.md +205 -0
- package/dist/engineering-pa-cli/bin/estate-sync +2 -0
- package/dist/engineering-pa-cli/bin/launch +2 -0
- package/dist/engineering-pa-cli/bin/pa +2 -0
- package/dist/engineering-pa-cli/bin/pa-coordinator-hook +12 -0
- package/dist/engineering-pa-cli/bin/research +2 -0
- package/dist/engineering-pa-cli/bin/scheduler +2 -0
- package/dist/engineering-pa-cli/bin/secrets +2 -0
- package/dist/engineering-pa-cli/bin/smoke +9 -0
- package/dist/engineering-pa-cli/bin/sync +2 -0
- package/dist/engineering-pa-cli/config/coordinator-allowlist.json +118 -0
- package/dist/engineering-pa-cli/docs/coordinator-hook.md +211 -0
- package/dist/engineering-pa-cli/docs/estate-sync.md +412 -0
- package/dist/engineering-pa-cli/docs/gsc.md +175 -0
- package/dist/engineering-pa-cli/docs/lint-linkedin.md +139 -0
- package/dist/engineering-pa-cli/docs/secrets.md +221 -0
- package/dist/engineering-pa-cli/docs/smoke.md +113 -0
- package/dist/engineering-pa-cli/docs/staging-alias.md +114 -0
- package/dist/engineering-pa-cli/index.mjs +17 -0
- package/dist/engineering-pa-cli/package.json +37 -0
- package/dist/engineering-pa-cli/src/autonomy/cli.mjs +329 -0
- package/dist/engineering-pa-cli/src/autonomy/envelope.mjs +301 -0
- package/dist/engineering-pa-cli/src/coordinator-hook/cli.mjs +140 -0
- package/dist/engineering-pa-cli/src/coordinator-hook/config.mjs +134 -0
- package/dist/engineering-pa-cli/src/coordinator-hook/message.mjs +47 -0
- package/dist/engineering-pa-cli/src/coordinator-hook/policy.mjs +211 -0
- package/dist/engineering-pa-cli/src/coordinator-hook/repo-root.mjs +44 -0
- package/dist/engineering-pa-cli/src/coordinator-hook/self.mjs +30 -0
- package/dist/engineering-pa-cli/src/environment/cli.mjs +287 -0
- package/dist/engineering-pa-cli/src/environment/probes.mjs +302 -0
- package/dist/engineering-pa-cli/src/gsc/auth.mjs +148 -0
- package/dist/engineering-pa-cli/src/gsc/cli.mjs +93 -0
- package/dist/engineering-pa-cli/src/gsc/cloudflare.mjs +318 -0
- package/dist/engineering-pa-cli/src/gsc/commands/add-property.mjs +70 -0
- package/dist/engineering-pa-cli/src/gsc/commands/list-properties.mjs +33 -0
- package/dist/engineering-pa-cli/src/gsc/commands/pull-analytics.mjs +130 -0
- package/dist/engineering-pa-cli/src/gsc/commands/submit-sitemap.mjs +41 -0
- package/dist/engineering-pa-cli/src/gsc/commands/verify-via-cf-dns.mjs +189 -0
- package/dist/engineering-pa-cli/src/knowledge/call-log.mjs +59 -0
- package/dist/engineering-pa-cli/src/knowledge/cli.mjs +242 -0
- package/dist/engineering-pa-cli/src/knowledge/eval.mjs +446 -0
- package/dist/engineering-pa-cli/src/knowledge/formatters.mjs +331 -0
- package/dist/engineering-pa-cli/src/knowledge/graph.mjs +710 -0
- package/dist/engineering-pa-cli/src/launch/README.md +214 -0
- package/dist/engineering-pa-cli/src/launch/cli.mjs +51 -0
- package/dist/engineering-pa-cli/src/launch/commands/launch.mjs +106 -0
- package/dist/engineering-pa-cli/src/launch/identity.mjs +43 -0
- package/dist/engineering-pa-cli/src/launch/planner.mjs +44 -0
- package/dist/engineering-pa-cli/src/launch/repo-root.mjs +53 -0
- package/dist/engineering-pa-cli/src/launch/runner.mjs +147 -0
- package/dist/engineering-pa-cli/src/launch/task-loader.mjs +85 -0
- package/dist/engineering-pa-cli/src/lint/cli.mjs +61 -0
- package/dist/engineering-pa-cli/src/lint/commands/linkedin.mjs +133 -0
- package/dist/engineering-pa-cli/src/lint/detectors.mjs +90 -0
- package/dist/engineering-pa-cli/src/lint/linter.mjs +69 -0
- package/dist/engineering-pa-cli/src/lint/reporter.mjs +32 -0
- package/dist/engineering-pa-cli/src/lint/rules.mjs +132 -0
- package/dist/engineering-pa-cli/src/pa/cli.mjs +369 -0
- package/dist/engineering-pa-cli/src/pa/doc-groups.mjs +164 -0
- package/dist/engineering-pa-cli/src/pa/io.mjs +80 -0
- package/dist/engineering-pa-cli/src/pa/project-cli.mjs +385 -0
- package/dist/engineering-pa-cli/src/pa/projects.mjs +352 -0
- package/dist/engineering-pa-cli/src/pa/repo-root.mjs +64 -0
- package/dist/engineering-pa-cli/src/pa/session.mjs +254 -0
- package/dist/engineering-pa-cli/src/pa/work-cli.mjs +164 -0
- package/dist/engineering-pa-cli/src/pa/work.mjs +196 -0
- package/dist/engineering-pa-cli/src/pa/workstreams.mjs +201 -0
- package/dist/engineering-pa-cli/src/research/README.md +360 -0
- package/dist/engineering-pa-cli/src/research/briefs/extractor.md +103 -0
- package/dist/engineering-pa-cli/src/research/briefs/searcher.md +113 -0
- package/dist/engineering-pa-cli/src/research/briefs/synthesizer.md +124 -0
- package/dist/engineering-pa-cli/src/research/briefs/verifier.md +86 -0
- package/dist/engineering-pa-cli/src/research/cli.mjs +141 -0
- package/dist/engineering-pa-cli/src/research/commands/gates.mjs +176 -0
- package/dist/engineering-pa-cli/src/research/commands/list.mjs +56 -0
- package/dist/engineering-pa-cli/src/research/commands/mark.mjs +97 -0
- package/dist/engineering-pa-cli/src/research/commands/paths.mjs +69 -0
- package/dist/engineering-pa-cli/src/research/commands/prune.mjs +86 -0
- package/dist/engineering-pa-cli/src/research/commands/run.mjs +94 -0
- package/dist/engineering-pa-cli/src/research/commands/show.mjs +43 -0
- package/dist/engineering-pa-cli/src/research/docs/operator-present-flow.md +120 -0
- package/dist/engineering-pa-cli/src/research/format.mjs +59 -0
- package/dist/engineering-pa-cli/src/research/promote.mjs +260 -0
- package/dist/engineering-pa-cli/src/research/schema/finding.schema.json +55 -0
- package/dist/engineering-pa-cli/src/research/schema/gates.schema.json +34 -0
- package/dist/engineering-pa-cli/src/research/schema/manifest.schema.json +59 -0
- package/dist/engineering-pa-cli/src/research/schema/plan.schema.json +41 -0
- package/dist/engineering-pa-cli/src/research/schema/sources.schema.json +31 -0
- package/dist/engineering-pa-cli/src/research/store/findings.mjs +61 -0
- package/dist/engineering-pa-cli/src/research/store/gates.mjs +73 -0
- package/dist/engineering-pa-cli/src/research/store/index.mjs +312 -0
- package/dist/engineering-pa-cli/src/research/store/manifest.mjs +56 -0
- package/dist/engineering-pa-cli/src/research/store/plan.mjs +59 -0
- package/dist/engineering-pa-cli/src/research/store/sources.mjs +44 -0
- package/dist/engineering-pa-cli/src/research/store/validate.mjs +92 -0
- package/dist/engineering-pa-cli/src/research/workflows/research-normal.js +573 -0
- package/dist/engineering-pa-cli/src/scheduler/cli.mjs +197 -0
- package/dist/engineering-pa-cli/src/secrets/cli.mjs +254 -0
- package/dist/engineering-pa-cli/src/secrets/commands/backup-template.mjs +67 -0
- package/dist/engineering-pa-cli/src/secrets/commands/backup.mjs +85 -0
- package/dist/engineering-pa-cli/src/secrets/commands/delete.mjs +58 -0
- package/dist/engineering-pa-cli/src/secrets/commands/find.mjs +36 -0
- package/dist/engineering-pa-cli/src/secrets/commands/get.mjs +49 -0
- package/dist/engineering-pa-cli/src/secrets/commands/init.mjs +69 -0
- package/dist/engineering-pa-cli/src/secrets/commands/list.mjs +37 -0
- package/dist/engineering-pa-cli/src/secrets/commands/rotate.mjs +46 -0
- package/dist/engineering-pa-cli/src/secrets/commands/set.mjs +123 -0
- package/dist/engineering-pa-cli/src/secrets/commands/status.mjs +146 -0
- package/dist/engineering-pa-cli/src/secrets/commands/vaults.mjs +57 -0
- package/dist/engineering-pa-cli/src/secrets/commands/verify.mjs +143 -0
- package/dist/engineering-pa-cli/src/secrets/vault.mjs +766 -0
- package/dist/engineering-pa-cli/src/smoke/checks.mjs +199 -0
- package/dist/engineering-pa-cli/src/smoke/cli.mjs +108 -0
- package/dist/engineering-pa-cli/src/smoke/commands/run.mjs +237 -0
- package/dist/engineering-pa-cli/src/smoke/runner.mjs +191 -0
- package/dist/engineering-pa-cli/src/staging-alias/cli.mjs +91 -0
- package/dist/engineering-pa-cli/src/staging-alias/cloudflare.mjs +380 -0
- package/dist/engineering-pa-cli/src/staging-alias/commands/list.mjs +36 -0
- package/dist/engineering-pa-cli/src/staging-alias/commands/set.mjs +188 -0
- package/dist/engineering-pa-cli/src/staging-alias/commands/status.mjs +113 -0
- package/dist/engineering-pa-cli/src/staging-alias/commands/unset.mjs +95 -0
- package/dist/engineering-pa-cli/src/staging-alias/sites.mjs +105 -0
- package/dist/engineering-pa-cli/src/sync/cli.mjs +151 -0
- package/dist/engineering-pa-cli/src/sync/git.mjs +149 -0
- package/dist/engineering-pa-cli/src/sync/lock.mjs +30 -0
- package/dist/engineering-pa-cli/src/sync/regenerated-artifacts.mjs +114 -0
- package/dist/engineering-pa-cli/src/sync/registry-scope.mjs +260 -0
- package/dist/engineering-pa-cli/src/sync/run.mjs +531 -0
- package/dist/engineering-pa-cli/src/sync/runner.mjs +62 -0
- package/dist/engineering-pa-cli/src/sync/runs-digest.mjs +138 -0
- package/dist/engineering-pa-core/README.md +60 -0
- package/dist/engineering-pa-core/bin/desk +9 -0
- package/dist/engineering-pa-core/bin/distill +2 -0
- package/dist/engineering-pa-core/bin/memory-sync +2 -0
- package/dist/engineering-pa-core/bin/slice +2 -0
- package/dist/engineering-pa-core/docs/autonomy-envelope-tracker.md +111 -0
- package/dist/engineering-pa-core/docs/blueprints/README.md +45 -0
- package/dist/engineering-pa-core/docs/blueprints/docker-services/blueprint.md +168 -0
- package/dist/engineering-pa-core/docs/blueprints/git-identity/blueprint.md +116 -0
- package/dist/engineering-pa-core/docs/blueprints/ideas/custom-workspace-views.md +9 -0
- package/dist/engineering-pa-core/docs/blueprints/ideas/knowledge-domain-patterns.md +15 -0
- package/dist/engineering-pa-core/docs/blueprints/ideas/office-integration.md +11 -0
- package/dist/engineering-pa-core/docs/blueprints/ideas/team-scaling.md +9 -0
- package/dist/engineering-pa-core/docs/blueprints/ideas/work-personal-separation.md +9 -0
- package/dist/engineering-pa-core/docs/blueprints/scheduled-distillation/blueprint.md +129 -0
- package/dist/engineering-pa-core/docs/blueprints/tool-integration/blueprint.md +110 -0
- package/dist/engineering-pa-core/docs/commands/init.md +159 -0
- package/dist/engineering-pa-core/docs/commands/schedule.md +98 -0
- package/dist/engineering-pa-core/docs/commands/upgrade.md +67 -0
- package/dist/engineering-pa-core/docs/entity-location-map.md +93 -0
- package/dist/engineering-pa-core/docs/knowledge-scaffold.md +121 -0
- package/dist/engineering-pa-core/docs/lock.md +155 -0
- package/dist/engineering-pa-core/docs/memory-sync.md +28 -0
- package/dist/engineering-pa-core/docs/pa-operating-model.md +457 -0
- package/dist/engineering-pa-core/docs/scheduling.md +35 -0
- package/dist/engineering-pa-core/docs/standards/README.md +24 -0
- package/dist/engineering-pa-core/docs/standards/briefing-contract.md +161 -0
- package/dist/engineering-pa-core/docs/standards/tooling.md +240 -0
- package/dist/engineering-pa-core/docs/tools/distill.md +230 -0
- package/dist/engineering-pa-core/docs/tools/memory-sync.md +98 -0
- package/dist/engineering-pa-core/docs/tools/scheduler.md +243 -0
- package/dist/engineering-pa-core/docs/tools/slice.md +150 -0
- package/dist/engineering-pa-core/docs/upstream-issue-filing.md +88 -0
- package/dist/engineering-pa-core/docs/working-directory.md +29 -0
- package/dist/engineering-pa-core/docs/workspace-operations.md +46 -0
- package/dist/engineering-pa-core/index.mjs +21 -0
- package/dist/engineering-pa-core/knowledge/README.md +53 -0
- package/dist/engineering-pa-core/knowledge/canonical/.gitkeep +0 -0
- package/dist/engineering-pa-core/knowledge/content-voice/README.md +64 -0
- package/dist/engineering-pa-core/knowledge/content-voice/banned-ai-tells-baseline.md +133 -0
- package/dist/engineering-pa-core/knowledge/content-voice/banned-ai-tells-shape.md +58 -0
- package/dist/engineering-pa-core/knowledge/content-voice/banned-ai-tells-taxonomy.md +33 -0
- package/dist/engineering-pa-core/knowledge/content-voice/content-pipeline-routing.md +58 -0
- package/dist/engineering-pa-core/knowledge/content-voice/new-tell-capture-procedure.md +40 -0
- package/dist/engineering-pa-core/knowledge/content-voice/voice-guide-shape.md +43 -0
- package/dist/engineering-pa-core/knowledge/delegation-dispatch/README.md +34 -0
- package/dist/engineering-pa-core/knowledge/delegation-dispatch/briefing-contract.md +77 -0
- package/dist/engineering-pa-core/knowledge/delegation-dispatch/delegation-modes.md +84 -0
- package/dist/engineering-pa-core/knowledge/delegation-dispatch/dispatch-envelope.md +238 -0
- package/dist/engineering-pa-core/knowledge/delegation-dispatch/task-groups-and-orchestrators.md +62 -0
- package/dist/engineering-pa-core/knowledge/delegation-dispatch/team-improvement-loop.md +48 -0
- package/dist/engineering-pa-core/knowledge/delegation-dispatch/tool-development-policy.md +48 -0
- package/dist/engineering-pa-core/knowledge/engineering-discipline/README.md +33 -0
- package/dist/engineering-pa-core/knowledge/engineering-discipline/blast-radius-and-safety.md +50 -0
- package/dist/engineering-pa-core/knowledge/engineering-discipline/investigate-root-causes.md +48 -0
- package/dist/engineering-pa-core/knowledge/engineering-discipline/role-ladder.md +57 -0
- package/dist/engineering-pa-core/knowledge/engineering-discipline/verify-runtime-behaviour.md +53 -0
- package/dist/engineering-pa-core/knowledge/engineering-discipline/worktree-isolation.md +50 -0
- package/dist/engineering-pa-core/knowledge/knowledge-memory/README.md +33 -0
- package/dist/engineering-pa-core/knowledge/knowledge-memory/claude-md-hygiene.md +47 -0
- package/dist/engineering-pa-core/knowledge/knowledge-memory/journal-and-self-improvement.md +53 -0
- package/dist/engineering-pa-core/knowledge/knowledge-memory/knowledge-retrieval-discipline.md +62 -0
- package/dist/engineering-pa-core/knowledge/knowledge-memory/librarian-synthesis-mandate.md +56 -0
- package/dist/engineering-pa-core/knowledge/knowledge-memory/staging-and-observations.md +58 -0
- package/dist/engineering-pa-core/knowledge/operator-interface/README.md +32 -0
- package/dist/engineering-pa-core/knowledge/operator-interface/communication-style.md +33 -0
- package/dist/engineering-pa-core/knowledge/operator-interface/escalation-and-correction.md +45 -0
- package/dist/engineering-pa-core/knowledge/operator-interface/push-back-discipline.md +42 -0
- package/dist/engineering-pa-core/knowledge/operator-interface/session-boot-and-end.md +56 -0
- package/dist/engineering-pa-core/knowledge/platform-tooling/README.md +37 -0
- package/dist/engineering-pa-core/knowledge/platform-tooling/desk-cli-reference.md +52 -0
- package/dist/engineering-pa-core/knowledge/platform-tooling/environment-awareness.md +91 -0
- package/dist/engineering-pa-core/knowledge/platform-tooling/mcp-servers-catalogue.md +52 -0
- package/dist/engineering-pa-core/knowledge/platform-tooling/pa-cli-reference.md +55 -0
- package/dist/engineering-pa-core/knowledge/platform-tooling/scheduling-and-launchd.md +56 -0
- package/dist/engineering-pa-core/knowledge/platform-tooling/tool-discovery-discipline.md +49 -0
- package/dist/engineering-pa-core/knowledge/platform-tooling/working-directory-vs-project-root.md +43 -0
- package/dist/engineering-pa-core/knowledge/platform-tooling/workspace-server.md +51 -0
- package/dist/engineering-pa-core/knowledge/raw/.gitkeep +0 -0
- package/dist/engineering-pa-core/knowledge/scaffold/domains.json +5 -0
- package/dist/engineering-pa-core/knowledge/schema/.gitkeep +0 -0
- package/dist/engineering-pa-core/knowledge/work-management/README.md +33 -0
- package/dist/engineering-pa-core/knowledge/work-management/desk-cli.md +84 -0
- package/dist/engineering-pa-core/knowledge/work-management/progress-md.md +48 -0
- package/dist/engineering-pa-core/knowledge/work-management/projects.md +64 -0
- package/dist/engineering-pa-core/knowledge/work-management/spawn-log.md +48 -0
- package/dist/engineering-pa-core/knowledge/work-management/work-items.md +67 -0
- package/dist/engineering-pa-core/package.json +26 -0
- package/dist/engineering-pa-core/roles/agent-ops/definition.md +79 -0
- package/dist/engineering-pa-core/roles/dispatch-briefer/definition.md +195 -0
- package/dist/engineering-pa-core/roles/librarian/definition.md +176 -0
- package/dist/engineering-pa-core/roles/pa/definition.md +93 -0
- package/dist/engineering-pa-core/roles/system-admin/definition.md +106 -0
- package/dist/engineering-pa-core/roles/tool-developer/definition.md +116 -0
- package/dist/engineering-pa-core/roles/writer/definition.md +130 -0
- package/dist/engineering-pa-core/schema/autonomy-envelope.schema.json +61 -0
- package/dist/engineering-pa-core/schema/project.json +114 -0
- package/dist/engineering-pa-core/schema/schedule.json +63 -0
- package/dist/engineering-pa-core/schema/work-item.json +92 -0
- package/dist/engineering-pa-core/src/config/pa-package-name.mjs +30 -0
- package/dist/engineering-pa-core/src/desk/cli.mjs +95 -0
- package/dist/engineering-pa-core/src/desk/commands.mjs +398 -0
- package/dist/engineering-pa-core/src/desk/format.mjs +84 -0
- package/dist/engineering-pa-core/src/desk/repo.mjs +172 -0
- package/dist/engineering-pa-core/src/desk/team-scope.mjs +142 -0
- package/dist/engineering-pa-core/src/distill/cli.mjs +112 -0
- package/dist/engineering-pa-core/src/distill/prereqs.mjs +171 -0
- package/dist/engineering-pa-core/src/distill/prompt.mjs +74 -0
- package/dist/engineering-pa-core/src/distill/run.mjs +230 -0
- package/dist/engineering-pa-core/src/distill/runner.mjs +86 -0
- package/dist/engineering-pa-core/src/distill/staging.mjs +59 -0
- package/dist/engineering-pa-core/src/knowledge/retrieval/backlink-indexer.mjs +154 -0
- package/dist/engineering-pa-core/src/knowledge/retrieval/graph-builder.mjs +186 -0
- package/dist/engineering-pa-core/src/knowledge/retrieval/index-builder.mjs +225 -0
- package/dist/engineering-pa-core/src/knowledge/retrieval/query.mjs +263 -0
- package/dist/engineering-pa-core/src/lock/lock.mjs +202 -0
- package/dist/engineering-pa-core/src/memory-sync/cli-support.mjs +12 -0
- package/dist/engineering-pa-core/src/memory-sync/cli.mjs +56 -0
- package/dist/engineering-pa-core/src/memory-sync/commands/pull.mjs +44 -0
- package/dist/engineering-pa-core/src/memory-sync/commands/push.mjs +46 -0
- package/dist/engineering-pa-core/src/memory-sync/mirror.mjs +114 -0
- package/dist/engineering-pa-core/src/memory-sync/repo.mjs +65 -0
- package/dist/engineering-pa-core/src/scheduler/detect.mjs +111 -0
- package/dist/engineering-pa-core/src/scheduler/host.mjs +38 -0
- package/dist/engineering-pa-core/src/scheduler/index.mjs +13 -0
- package/dist/engineering-pa-core/src/scheduler/install.mjs +854 -0
- package/dist/engineering-pa-core/src/scheduler/list.mjs +168 -0
- package/dist/engineering-pa-core/src/scheduler/remove.mjs +176 -0
- package/dist/engineering-pa-core/src/scheduler/verify.mjs +435 -0
- package/dist/engineering-pa-core/src/session-boot/autonomy-injection.mjs +84 -0
- package/dist/engineering-pa-core/src/slice/cli.mjs +139 -0
- package/dist/engineering-pa-core/src/slice/inputs.mjs +174 -0
- package/dist/engineering-pa-core/src/slice/prompt.mjs +94 -0
- package/dist/engineering-pa-core/src/slice/prompts/dave-boot.md +91 -0
- package/dist/engineering-pa-core/src/slice/run.mjs +334 -0
- package/dist/engineering-pa-core-extensions-atlassian/README.md +31 -0
- package/dist/engineering-pa-core-extensions-atlassian/index.mjs +9 -0
- package/dist/engineering-pa-core-extensions-atlassian/package.json +19 -0
- package/dist/engineering-pa-core-extensions-n8n/README.md +29 -0
- package/dist/engineering-pa-core-extensions-n8n/index.mjs +8 -0
- package/dist/engineering-pa-core-extensions-n8n/package.json +19 -0
- package/dist/engineering-pa-librarian/README.md +38 -0
- package/dist/engineering-pa-librarian/index.mjs +12 -0
- package/dist/engineering-pa-librarian/package.json +19 -0
- package/dist/engineering-pa-migrate-inspect/README.md +131 -0
- package/dist/engineering-pa-migrate-inspect/bin/migrate-inspect +2 -0
- package/dist/engineering-pa-migrate-inspect/package.json +21 -0
- package/dist/engineering-pa-migrate-inspect/src/age-key-migrate.mjs +83 -0
- package/dist/engineering-pa-migrate-inspect/src/cli.mjs +97 -0
- package/dist/engineering-pa-migrate-inspect/src/inspector.mjs +237 -0
- package/dist/engineering-pa-migrate-inspect/src/platforms/linux.mjs +87 -0
- package/dist/engineering-pa-migrate-inspect/src/platforms/macos.mjs +105 -0
- package/dist/engineering-pa-migrate-inspect/src/runner.mjs +87 -0
- package/dist/engineering-pa-runbook/README.md +103 -0
- package/dist/engineering-pa-runbook/package.json +18 -0
- package/dist/engineering-pa-runbook/reference/dex-template.runbook.json +66 -0
- package/dist/engineering-pa-runbook/reference/hq-dave.runbook.json +69 -0
- package/dist/engineering-pa-runbook/reference/smarthome01.runbook.json +92 -0
- package/dist/engineering-pa-runbook/schema/inspection.schema.json +113 -0
- package/dist/engineering-pa-runbook/schema/runbook.schema.json +67 -0
- package/dist/engineering-pa-runbook/src/validator.mjs +167 -0
- package/dist/engineering-pa-scaffold/README.md +164 -0
- package/dist/engineering-pa-scaffold/bin/pa-init +2 -0
- package/dist/engineering-pa-scaffold/index.mjs +42 -0
- package/dist/engineering-pa-scaffold/package.json +22 -0
- package/dist/engineering-pa-scaffold/src/cli.mjs +115 -0
- package/dist/engineering-pa-scaffold/src/commands/init.mjs +169 -0
- package/dist/engineering-pa-scaffold/src/generator.mjs +354 -0
- package/dist/engineering-pa-scaffold/src/prompts.mjs +125 -0
- package/dist/engineering-pa-scaffold/src/runner.mjs +142 -0
- package/dist/engineering-pa-scaffold/templates/CLAUDE.md.template +196 -0
- package/dist/engineering-pa-scaffold/templates/operator-README.md.template +44 -0
- package/dist/engineering-pa-types-engineering/README.md +35 -0
- package/dist/engineering-pa-types-engineering/docs/commands/product-build.md +120 -0
- package/dist/engineering-pa-types-engineering/index.mjs +9 -0
- package/dist/engineering-pa-types-engineering/package.json +19 -0
- package/dist/engineering-pa-types-engineering/roles/product-engineer/definition.md +650 -0
- package/dist/engineering-pa-types-engineering/roles/product-engineer/templates/build-spec.md +82 -0
- package/dist/engineering-pa-types-engineering/roles/product-engineer/templates/preflight-checklist.md +158 -0
- package/dist/engineering-pa-types-engineering/roles/product-engineer/templates/worker-brief.md +130 -0
- package/dist/engineering-pa-workspace/README.md +197 -0
- package/dist/engineering-pa-workspace/app/assets/md.js +187 -0
- package/dist/engineering-pa-workspace/app/assets/modal.js +120 -0
- package/dist/engineering-pa-workspace/app/assets/theme.css +132 -0
- package/dist/engineering-pa-workspace/app/assets/theme.js +159 -0
- package/dist/engineering-pa-workspace/app/banner.js +320 -0
- package/dist/engineering-pa-workspace/app/delegations.html +345 -0
- package/dist/engineering-pa-workspace/app/home.html +1060 -0
- package/dist/engineering-pa-workspace/app/index.html +361 -0
- package/dist/engineering-pa-workspace/app/knowledge-map.html +163 -0
- package/dist/engineering-pa-workspace/app/knowledge.html +304 -0
- package/dist/engineering-pa-workspace/app/nav.json +75 -0
- package/dist/engineering-pa-workspace/app/notes.html +199 -0
- package/dist/engineering-pa-workspace/app/onboarding.html +592 -0
- package/dist/engineering-pa-workspace/app/profile.html +243 -0
- package/dist/engineering-pa-workspace/app/project-detail.html +432 -0
- package/dist/engineering-pa-workspace/app/projects.html +297 -0
- package/dist/engineering-pa-workspace/app/repos.html +598 -0
- package/dist/engineering-pa-workspace/app/schedules.html +486 -0
- package/dist/engineering-pa-workspace/app/secrets.html +164 -0
- package/dist/engineering-pa-workspace/app/staging.html +319 -0
- package/dist/engineering-pa-workspace/app/tasks.html +465 -0
- package/dist/engineering-pa-workspace/app/vendor/chart.umd.min.js +21 -0
- package/dist/engineering-pa-workspace/app/viewer.html +116 -0
- package/dist/engineering-pa-workspace/docs/DAEMON.md +104 -0
- package/dist/engineering-pa-workspace/docs/page-blueprint.md +286 -0
- package/dist/engineering-pa-workspace/docs/status-mon.md +168 -0
- package/dist/engineering-pa-workspace/index.mjs +12 -0
- package/dist/engineering-pa-workspace/nav.json.example +8 -0
- package/dist/engineering-pa-workspace/package.json +27 -0
- package/dist/engineering-pa-workspace/src/api.mjs +2086 -0
- package/dist/engineering-pa-workspace/src/install-daemon.mjs +573 -0
- package/dist/engineering-pa-workspace/src/nav.mjs +190 -0
- package/dist/engineering-pa-workspace/src/secrets-api.mjs +175 -0
- package/dist/engineering-pa-workspace/src/server.mjs +516 -0
- package/dist/engineering-pa-workspace/src/status-mon/poll.mjs +220 -0
- package/dist/engineering-pa-workspace/src/status-mon/poller.mjs +113 -0
- package/dist/engineering-pa-workspace/src/status-mon/run.mjs +133 -0
- package/dist/engineering-pa-workspace/src/supervisor.mjs +264 -0
- package/dist/engineering-pa-workspace/src/ws.mjs +633 -0
- package/index.mjs +60 -0
- package/package.json +58 -0
- package/templates/banned-ai-tells.md +102 -0
- package/templates/purpose.md +105 -0
- package/templates/voice-guide.md +98 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# @stravica-ai/engineering-pa-core-extensions-atlassian
|
|
2
|
+
|
|
3
|
+
Identity: `@stravica-ai/engineering-pa-core-extensions-atlassian` — optional Atlassian (Jira/Confluence) core extension.
|
|
4
|
+
|
|
5
|
+
## Status
|
|
6
|
+
|
|
7
|
+
**Skeleton — v0.1.0.** Workspace-internal, `"private": true`, not individually published.
|
|
8
|
+
|
|
9
|
+
Phase 2 promotes the existing operator-side Atlassian extension(s) into core via the extension-promotion mechanism: the upgrade tool detects a local extension matching this namespace, deactivates the local copy, copies operator-specific config across, and enables the core version.
|
|
10
|
+
|
|
11
|
+
For v0.1.0, this is an empty slot so the manifest-toggleable extension model is established from day one.
|
|
12
|
+
|
|
13
|
+
## Layout
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
packages/core-extensions/atlassian/
|
|
17
|
+
index.mjs # placeholder export
|
|
18
|
+
package.json # name, version, scripts
|
|
19
|
+
README.md # this file
|
|
20
|
+
test/index.test.mjs
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Tests
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
pnpm --filter @stravica-ai/engineering-pa-core-extensions-atlassian test
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Standards
|
|
30
|
+
|
|
31
|
+
Follows the [tooling standard](../../../CONTRIBUTING.md#standards): JS only, zero npm deps, `node:test`, camelCase JSON.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// @stravica-ai/engineering-pa-core-extensions-atlassian — optional Atlassian
|
|
2
|
+
// integration (Jira/Confluence tooling + workspace pages).
|
|
3
|
+
//
|
|
4
|
+
// Status: skeleton. Phase 2 promotes the existing operator-side Atlassian
|
|
5
|
+
// extension(s) into core. Until then, this is a placeholder slot so the
|
|
6
|
+
// manifest-toggleable extension model is established from day one.
|
|
7
|
+
|
|
8
|
+
export const name = './';
|
|
9
|
+
export const status = 'skeleton';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@stravica-ai/engineering-pa-core-extensions-atlassian",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Atlassian (Jira/Confluence) core extension — optional, manifest-toggleable.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./index.mjs",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": "./index.mjs"
|
|
9
|
+
},
|
|
10
|
+
"private": true,
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"engines": {
|
|
13
|
+
"node": ">=24"
|
|
14
|
+
},
|
|
15
|
+
"scripts": {
|
|
16
|
+
"test": "node --test --test-isolation=none test/*.test.mjs"
|
|
17
|
+
},
|
|
18
|
+
"//": "test pins --test-isolation=none: default process-isolation mode silently undercounts (drops passed tests from totals) when a test awaits async work while stdout is patched by a capture() helper — see packages/cli/test/secrets. Counts must never lie."
|
|
19
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# @stravica-ai/engineering-pa-core-extensions-n8n
|
|
2
|
+
|
|
3
|
+
Identity: `@stravica-ai/engineering-pa-core-extensions-n8n` — optional n8n core extension.
|
|
4
|
+
|
|
5
|
+
## Status
|
|
6
|
+
|
|
7
|
+
**Skeleton — v0.1.0.** Workspace-internal, `"private": true`, not individually published.
|
|
8
|
+
|
|
9
|
+
Phase 2 promotes the operator-side n8n extension content (the generic, non-operator-specific parts) into core via the extension-promotion mechanism. v0.1.0 holds the placeholder slot.
|
|
10
|
+
|
|
11
|
+
## Layout
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
packages/core-extensions/n8n/
|
|
15
|
+
index.mjs # placeholder export
|
|
16
|
+
package.json # name, version, scripts
|
|
17
|
+
README.md # this file
|
|
18
|
+
test/index.test.mjs
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Tests
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
pnpm --filter @stravica-ai/engineering-pa-core-extensions-n8n test
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Standards
|
|
28
|
+
|
|
29
|
+
Follows the [tooling standard](../../../CONTRIBUTING.md#standards): JS only, zero npm deps, `node:test`, camelCase JSON.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// @stravica-ai/engineering-pa-core-extensions-n8n — optional n8n integration
|
|
2
|
+
// (workflows + workspace pages).
|
|
3
|
+
//
|
|
4
|
+
// Status: skeleton. Phase 2 promotes operator-side n8n extension content
|
|
5
|
+
// into core. v0.1.0 holds the placeholder slot.
|
|
6
|
+
|
|
7
|
+
export const name = './';
|
|
8
|
+
export const status = 'skeleton';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@stravica-ai/engineering-pa-core-extensions-n8n",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "n8n integration core extension — optional, manifest-toggleable.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./index.mjs",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": "./index.mjs"
|
|
9
|
+
},
|
|
10
|
+
"private": true,
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"engines": {
|
|
13
|
+
"node": ">=24"
|
|
14
|
+
},
|
|
15
|
+
"scripts": {
|
|
16
|
+
"test": "node --test --test-isolation=none test/*.test.mjs"
|
|
17
|
+
},
|
|
18
|
+
"//": "test pins --test-isolation=none: default process-isolation mode silently undercounts (drops passed tests from totals) when a test awaits async work while stdout is patched by a capture() helper — see packages/cli/test/secrets. Counts must never lie."
|
|
19
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# @stravica-ai/engineering-pa-librarian
|
|
2
|
+
|
|
3
|
+
Identity: `@stravica-ai/engineering-pa-librarian` — librarian client + deployed distillation service.
|
|
4
|
+
|
|
5
|
+
## Status
|
|
6
|
+
|
|
7
|
+
**Skeleton — v0.1.0.** Workspace-internal, `"private": true`, not individually published.
|
|
8
|
+
|
|
9
|
+
Two distinct surfaces ship here, in different phases:
|
|
10
|
+
|
|
11
|
+
- **Phase 1 Task 4** — role-as-library librarian: in-session distillation for personal/operator knowledge. Ported from Stravica/dave's predecessor implementation.
|
|
12
|
+
- **Phase 3** — deployed librarian service: runs scheduled (cron-style) on a team-deployment host (smarthome01 for HQ, per-team VM elsewhere), pulls each PA's `intake/{paName}/`, distills into the team library's `canonical/`, commits a PR, auto-merges. The sole writer to `canonical/`.
|
|
13
|
+
|
|
14
|
+
Both surfaces obey the [knowledge-system standard](https://github.com/Stravica/dave/blob/main/operator/knowledge/engineering/standards/knowledge-system.md): raw/canonical/schema layer separation, KCS Solve/Evolve routing, Wikipedia-NPOV per-claim conflict blocks, Mem0-style hybrid retrieval, LangMem semantic/episodic/procedural memory typing.
|
|
15
|
+
|
|
16
|
+
## Layout
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
packages/librarian/
|
|
20
|
+
index.mjs # placeholder export; populated in Task 4 / Phase 3
|
|
21
|
+
package.json # name, version, scripts
|
|
22
|
+
README.md # this file
|
|
23
|
+
test/index.test.mjs
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Open operator decisions
|
|
27
|
+
|
|
28
|
+
The knowledge-system standard surfaces eight deferred operator decisions (personal-vs-team routing default, confirmation semantics, cross-PA notification mechanism, schema versioning lifecycle, GraphRAG summaries, personal-vs-team librarian role, talk-page equivalent, multi-tenant write enforcement). None are resolved in this skeleton.
|
|
29
|
+
|
|
30
|
+
## Tests
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
pnpm --filter @stravica-ai/engineering-pa-librarian test
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Standards
|
|
37
|
+
|
|
38
|
+
Follows the [tooling standard](../../CONTRIBUTING.md#standards): JS only, zero npm deps, `node:test`, camelCase JSON.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// @stravica-ai/engineering-pa-librarian — team-library client + librarian service.
|
|
2
|
+
//
|
|
3
|
+
// Status: skeleton. Phase 3 lands the deployed librarian service that distills
|
|
4
|
+
// PA intake into canonical team-library content per the knowledge-system
|
|
5
|
+
// methodology (raw/canonical/schema layer separation, KCS Solve/Evolve
|
|
6
|
+
// routing, Wikipedia-NPOV per-claim conflict blocks).
|
|
7
|
+
//
|
|
8
|
+
// Phase 1 Task 4 ports the role-as-library librarian (in-session distillation
|
|
9
|
+
// for personal/operator knowledge) from Stravica/dave's predecessor.
|
|
10
|
+
|
|
11
|
+
export const name = './';
|
|
12
|
+
export const status = 'skeleton';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@stravica-ai/engineering-pa-librarian",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Librarian — team-library client + deployed distillation service.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./index.mjs",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": "./index.mjs"
|
|
9
|
+
},
|
|
10
|
+
"private": true,
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"engines": {
|
|
13
|
+
"node": ">=24"
|
|
14
|
+
},
|
|
15
|
+
"scripts": {
|
|
16
|
+
"test": "node --test --test-isolation=none test/*.test.mjs"
|
|
17
|
+
},
|
|
18
|
+
"//": "test pins --test-isolation=none: default process-isolation mode silently undercounts (drops passed tests from totals) when a test awaits async work while stdout is patched by a capture() helper — see packages/cli/test/secrets. Counts must never lie."
|
|
19
|
+
}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# @stravica-ai/engineering-pa-migrate-inspect
|
|
2
|
+
|
|
3
|
+
**Status:** v0.1.0 — active
|
|
4
|
+
|
|
5
|
+
Host-inspection CLI for migration planning. Produces a structured `inspection.json` describing migration-relevant host state: layout version, runtimes, scheduled tasks, mounts, Dave environment variables, and operator extensions.
|
|
6
|
+
|
|
7
|
+
## Install / Invoke
|
|
8
|
+
|
|
9
|
+
### As a `pa` verb (recommended)
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
pa migrate-inspect [options]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### As a standalone binary (after pnpm install)
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
migrate-inspect [options]
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Commands
|
|
22
|
+
|
|
23
|
+
| Option | Type | Default | Description |
|
|
24
|
+
|---|---|---|---|
|
|
25
|
+
| `--out <path>` | string | stdout | Write inspection.json to file |
|
|
26
|
+
| `--dave-root <path>` | string | `DAVE_ROOT` or `PA_REPO_ROOT` env | Override Dave root path |
|
|
27
|
+
| `--pretty` | boolean | false | Pretty-print JSON output |
|
|
28
|
+
| `-h, --help` | — | — | Show help |
|
|
29
|
+
|
|
30
|
+
### Examples
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
# Inspect current host, print to stdout
|
|
34
|
+
pa migrate-inspect
|
|
35
|
+
|
|
36
|
+
# Inspect with explicit Dave root, write to file
|
|
37
|
+
pa migrate-inspect --dave-root /home/user/dave --out /tmp/inspect.json
|
|
38
|
+
|
|
39
|
+
# Pretty-print for human review
|
|
40
|
+
pa migrate-inspect --pretty
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Exit codes
|
|
44
|
+
|
|
45
|
+
| Code | Meaning |
|
|
46
|
+
|---|---|
|
|
47
|
+
| 0 | OK |
|
|
48
|
+
| 1 | Usage error |
|
|
49
|
+
| 2 | Operational failure |
|
|
50
|
+
| 3 | Transport/IO failure |
|
|
51
|
+
|
|
52
|
+
## Operational discipline
|
|
53
|
+
|
|
54
|
+
- **Read-only**: this tool never modifies any file except the output file specified by `--out`. It makes no changes to the Dave installation or host configuration.
|
|
55
|
+
- **No writes outside log dir**: the only file written is the one explicitly specified by `--out`.
|
|
56
|
+
- **No external deps**: uses Node stdlib only (`node:child_process`, `node:fs/promises`, `node:os`, `node:util`, `node:path`).
|
|
57
|
+
- **Platform-guarded**: on Linux, `launchdPlists` is always `[]`; `~/Library/LaunchAgents` is never read.
|
|
58
|
+
|
|
59
|
+
## Output shape
|
|
60
|
+
|
|
61
|
+
```json
|
|
62
|
+
{
|
|
63
|
+
"host": {
|
|
64
|
+
"hostname": "string",
|
|
65
|
+
"os": "darwin | linux | ...",
|
|
66
|
+
"osVersion": "string",
|
|
67
|
+
"arch": "arm64 | x64 | ..."
|
|
68
|
+
},
|
|
69
|
+
"runtimes": {
|
|
70
|
+
"nodeVersion": "24.0.0",
|
|
71
|
+
"pnpmVersion": "10.0.0",
|
|
72
|
+
"gitVersion": "2.40.0"
|
|
73
|
+
},
|
|
74
|
+
"scheduled": {
|
|
75
|
+
"crontab": [{ "schedule": "* * * * *", "command": "..." }],
|
|
76
|
+
"launchdPlists": [{ "label": "...", "program": "...", "args": [], "workingDirectory": "...", "runAtLoad": true, "keepAlive": true }]
|
|
77
|
+
},
|
|
78
|
+
"mounts": [{ "source": "//server/share", "target": "/mnt/share", "fsType": "smbfs" }],
|
|
79
|
+
"daveEnv": {
|
|
80
|
+
"daveRoot": "/path/to/dave",
|
|
81
|
+
"daveRelevantEnvVars": { "DAVE_ROOT": "/path/to/dave" },
|
|
82
|
+
"pathSegments": ["/path/to/dave/node_modules/.bin"]
|
|
83
|
+
},
|
|
84
|
+
"paths": {
|
|
85
|
+
"daveRoot": "/path/to/dave",
|
|
86
|
+
"coreToolsPath": "/path/to/dave/core/tools",
|
|
87
|
+
"operatorPath": "/path/to/dave/operator",
|
|
88
|
+
"layoutVersion": "v1 | v2 | unknown"
|
|
89
|
+
},
|
|
90
|
+
"extensions": [{ "name": "my-ext", "path": "/path/to/dave/operator/extensions/tools/my-ext", "hasManifestEntry": true }],
|
|
91
|
+
"inspectedAt": "2026-05-17T12:00:00.000Z"
|
|
92
|
+
}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Project layout
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
packages/cli/migrate-inspect/
|
|
99
|
+
bin/migrate-inspect shebang shim
|
|
100
|
+
package.json
|
|
101
|
+
src/
|
|
102
|
+
cli.mjs arg parsing + exit-code translation
|
|
103
|
+
inspector.mjs orchestrates platform modules
|
|
104
|
+
platforms/
|
|
105
|
+
macos.mjs macOS-specific collectors
|
|
106
|
+
linux.mjs Linux-specific collectors
|
|
107
|
+
runner.mjs CHOKEPOINT: all spawns happen here
|
|
108
|
+
test/
|
|
109
|
+
fixtures/
|
|
110
|
+
fake-dave-v1/ minimal v1 fixture tree
|
|
111
|
+
fake-dave-v2/ minimal v2 fixture tree
|
|
112
|
+
cli.test.mjs
|
|
113
|
+
inspector.test.mjs
|
|
114
|
+
runner.test.mjs
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Tests
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
pnpm --filter @stravica-ai/engineering-pa-migrate-inspect test
|
|
121
|
+
# or
|
|
122
|
+
node --test 'test/**/*.test.mjs'
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## Tooling standard reference
|
|
126
|
+
|
|
127
|
+
- Chokepoint pattern: all subprocess spawning is in `runner.mjs` — never elsewhere.
|
|
128
|
+
- No shell interpolation: `spawnCapture` always receives `cmd` and `args` as separate arguments.
|
|
129
|
+
- No external npm deps: Node stdlib only.
|
|
130
|
+
- `node:test` + `node:assert/strict` for tests.
|
|
131
|
+
- Exit codes follow tooling standard §6.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@stravica-ai/engineering-pa-migrate-inspect",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Host-inspection CLI for migration planning — produces a structured inspection.json describing migration-relevant host state.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./src/cli.mjs",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": "./src/cli.mjs",
|
|
9
|
+
"./src/*": "./src/*"
|
|
10
|
+
},
|
|
11
|
+
"bin": {
|
|
12
|
+
"migrate-inspect": "bin/migrate-inspect"
|
|
13
|
+
},
|
|
14
|
+
"private": true,
|
|
15
|
+
"license": "MIT",
|
|
16
|
+
"engines": { "node": ">=24" },
|
|
17
|
+
"scripts": {
|
|
18
|
+
"test": "node --test --test-isolation=none 'test/**/*.test.mjs'"
|
|
19
|
+
},
|
|
20
|
+
"//": "test pins --test-isolation=none: default process-isolation mode silently undercounts (drops passed tests from totals) when a test awaits async work while stdout is patched by a capture() helper — see packages/cli/test/secrets. Counts must never lie."
|
|
21
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
// age-key-migrate.mjs — perform the v1 -> v2 age-key copy.
|
|
2
|
+
//
|
|
3
|
+
// v1 stored its age private key at ~/.config/dave/age-key.txt; v2 looks
|
|
4
|
+
// at ~/.config/stravica-pa/age-key.txt. Operators who upgraded by
|
|
5
|
+
// reinstalling discovered their vault was unusable because the
|
|
6
|
+
// migrate-to-v2 host work did not move the file (w-2026-05-18-008).
|
|
7
|
+
//
|
|
8
|
+
// This module exposes `migrateAgeKey({ home })` which:
|
|
9
|
+
// - reads the current key file at the v1 path
|
|
10
|
+
// - writes it to the v2 path with mode 0600
|
|
11
|
+
// - LEAVES the v1 file in place so a single-session rollback is possible
|
|
12
|
+
// - never overwrites an existing v2 key (returns 'v2-already-populated')
|
|
13
|
+
// - never fabricates a key (returns 'none-present' if v1 is absent)
|
|
14
|
+
//
|
|
15
|
+
// The READ-only inspector lives in inspector.mjs; this module is the only
|
|
16
|
+
// write-bearing path in migrate-inspect, gated by the cli's --apply-age-key
|
|
17
|
+
// flag.
|
|
18
|
+
|
|
19
|
+
import { copyFile, chmod, mkdir, stat } from 'node:fs/promises';
|
|
20
|
+
import { homedir } from 'node:os';
|
|
21
|
+
import { dirname, join } from 'node:path';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Migrate the v1 age key to the v2 location.
|
|
25
|
+
*
|
|
26
|
+
* @param {object} [opts]
|
|
27
|
+
* @param {string} [opts.home] Override homedir (used by tests).
|
|
28
|
+
* @returns {Promise<{action: 'migrated'|'v2-already-populated'|'none-present',
|
|
29
|
+
* v1Path: string, v2Path: string, message: string}>}
|
|
30
|
+
*/
|
|
31
|
+
export async function migrateAgeKey(opts = {}) {
|
|
32
|
+
const home = opts.home ?? homedir();
|
|
33
|
+
const v1Path = join(home, '.config', 'dave', 'age-key.txt');
|
|
34
|
+
const v2Path = join(home, '.config', 'stravica-pa', 'age-key.txt');
|
|
35
|
+
|
|
36
|
+
const [v1Exists, v2Exists] = await Promise.all([_exists(v1Path), _exists(v2Path)]);
|
|
37
|
+
|
|
38
|
+
// Path 1: neither key exists — silent. Host has no key (e.g. smarthome01).
|
|
39
|
+
if (!v1Exists && !v2Exists) {
|
|
40
|
+
return {
|
|
41
|
+
action: 'none-present',
|
|
42
|
+
v1Path,
|
|
43
|
+
v2Path,
|
|
44
|
+
message: 'No age key found at either location. Host has no key.',
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// Path 2: v2 already populated — leave alone. Operator either already
|
|
49
|
+
// migrated, or generated a v2 key directly. Removing v1 (if present) is
|
|
50
|
+
// a separate cleanup step the operator can take once they're confident
|
|
51
|
+
// the v2 vault is healthy.
|
|
52
|
+
if (v2Exists) {
|
|
53
|
+
return {
|
|
54
|
+
action: 'v2-already-populated',
|
|
55
|
+
v1Path,
|
|
56
|
+
v2Path,
|
|
57
|
+
message: v1Exists
|
|
58
|
+
? `v2 key already present at ${v2Path}. v1 key still at ${v1Path} — remove manually once confirmed healthy.`
|
|
59
|
+
: `v2 key already present at ${v2Path}. No action taken.`,
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Path 3: only v1 exists — copy to v2 with mode 0600. Keep v1 in place
|
|
64
|
+
// as a one-session safety net.
|
|
65
|
+
await mkdir(dirname(v2Path), { recursive: true, mode: 0o700 });
|
|
66
|
+
await copyFile(v1Path, v2Path);
|
|
67
|
+
await chmod(v2Path, 0o600);
|
|
68
|
+
return {
|
|
69
|
+
action: 'migrated',
|
|
70
|
+
v1Path,
|
|
71
|
+
v2Path,
|
|
72
|
+
message: `Migrated age key: ${v1Path} -> ${v2Path} (mode 600). v1 left in place as a one-session safety net.`,
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
async function _exists(p) {
|
|
77
|
+
try {
|
|
78
|
+
await stat(p);
|
|
79
|
+
return true;
|
|
80
|
+
} catch {
|
|
81
|
+
return false;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
// cli.mjs — arg parsing + exit-code translation for migrate-inspect.
|
|
2
|
+
|
|
3
|
+
import { parseArgs } from 'node:util';
|
|
4
|
+
import { writeFile } from 'node:fs/promises';
|
|
5
|
+
import { inspect } from './inspector.mjs';
|
|
6
|
+
import { migrateAgeKey } from './age-key-migrate.mjs';
|
|
7
|
+
import * as runner from './runner.mjs';
|
|
8
|
+
|
|
9
|
+
const USAGE = `pa migrate-inspect — host inspection for migration planning
|
|
10
|
+
|
|
11
|
+
Usage:
|
|
12
|
+
pa migrate-inspect [options]
|
|
13
|
+
|
|
14
|
+
Options:
|
|
15
|
+
--out <path> Write inspection.json to <path> (default: stdout)
|
|
16
|
+
--dave-root <path> Override Dave root path (default: DAVE_ROOT or PA_REPO_ROOT env)
|
|
17
|
+
--pretty Pretty-print JSON output (default: compact)
|
|
18
|
+
--apply-age-key Run the v1 -> v2 age-key migration as part of the inspection
|
|
19
|
+
(copies ~/.config/dave/age-key.txt to
|
|
20
|
+
~/.config/stravica-pa/age-key.txt, mode 600, keeps v1).
|
|
21
|
+
Idempotent: skips if v2 already populated.
|
|
22
|
+
-h, --help Show this help
|
|
23
|
+
|
|
24
|
+
Exit codes:
|
|
25
|
+
0 OK
|
|
26
|
+
1 Usage error
|
|
27
|
+
2 Operational failure
|
|
28
|
+
3 Transport/IO failure
|
|
29
|
+
`;
|
|
30
|
+
|
|
31
|
+
export async function main(argv) {
|
|
32
|
+
let opts;
|
|
33
|
+
try {
|
|
34
|
+
const parsed = parseArgs({
|
|
35
|
+
args: argv,
|
|
36
|
+
options: {
|
|
37
|
+
out: { type: 'string' },
|
|
38
|
+
'dave-root': { type: 'string' },
|
|
39
|
+
pretty: { type: 'boolean', default: false },
|
|
40
|
+
'apply-age-key': { type: 'boolean', default: false },
|
|
41
|
+
help: { type: 'boolean', short: 'h', default: false },
|
|
42
|
+
},
|
|
43
|
+
allowPositionals: false,
|
|
44
|
+
});
|
|
45
|
+
opts = parsed.values;
|
|
46
|
+
} catch (err) {
|
|
47
|
+
process.stderr.write(`[migrate-inspect] Usage error: ${err.message}\n`);
|
|
48
|
+
process.stderr.write(USAGE);
|
|
49
|
+
return 1;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
if (opts.help) {
|
|
53
|
+
process.stdout.write(USAGE);
|
|
54
|
+
return 0;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
let result;
|
|
58
|
+
try {
|
|
59
|
+
result = await inspect({ daveRoot: opts['dave-root'] || null }, runner);
|
|
60
|
+
} catch (err) {
|
|
61
|
+
process.stderr.write(`[migrate-inspect] Operational failure: ${err.message}\n`);
|
|
62
|
+
return 2;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// Optional in-line age-key migration. Reported as `ageKeyMigration` on
|
|
66
|
+
// the inspection output so callers can audit what was done.
|
|
67
|
+
if (opts['apply-age-key']) {
|
|
68
|
+
try {
|
|
69
|
+
const migration = await migrateAgeKey();
|
|
70
|
+
result.ageKeyMigration = migration;
|
|
71
|
+
// Surface the action on stderr too — operators running this
|
|
72
|
+
// interactively want to see the outcome at a glance without
|
|
73
|
+
// having to scroll through inspection.json.
|
|
74
|
+
process.stderr.write(`[migrate-inspect] age-key: ${migration.action} — ${migration.message}\n`);
|
|
75
|
+
} catch (err) {
|
|
76
|
+
process.stderr.write(`[migrate-inspect] age-key migration failed: ${err.message}\n`);
|
|
77
|
+
return 2;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
const json = opts.pretty
|
|
82
|
+
? JSON.stringify(result, null, 2)
|
|
83
|
+
: JSON.stringify(result);
|
|
84
|
+
|
|
85
|
+
if (opts.out) {
|
|
86
|
+
try {
|
|
87
|
+
await writeFile(opts.out, json + '\n', 'utf8');
|
|
88
|
+
} catch (err) {
|
|
89
|
+
process.stderr.write(`[migrate-inspect] IO failure writing ${opts.out}: ${err.message}\n`);
|
|
90
|
+
return 3;
|
|
91
|
+
}
|
|
92
|
+
} else {
|
|
93
|
+
process.stdout.write(json + '\n');
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
return 0;
|
|
97
|
+
}
|