@codyswann/lisa 4.85.0 → 4.86.1
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/all/copy-overwrite/scripts/lib/completion-proof-content.mjs +63 -22
- package/all/copy-overwrite/scripts/lib/npm-update-hosted-hook.mjs +6 -1
- package/all/copy-overwrite/scripts/lisa-hooks/parity-safety-net.sh +19 -3
- package/all/copy-overwrite/scripts/npm-updater-helper-graph.json +2 -2
- package/dist/cli/doctor-session-manager-pending.d.ts +17 -0
- package/dist/cli/doctor-session-manager-pending.d.ts.map +1 -0
- package/dist/cli/doctor-session-manager-pending.js +130 -0
- package/dist/cli/doctor-session-manager-pending.js.map +1 -0
- package/dist/cli/doctor-session-manager-token.d.ts +69 -0
- package/dist/cli/doctor-session-manager-token.d.ts.map +1 -0
- package/dist/cli/doctor-session-manager-token.js +264 -0
- package/dist/cli/doctor-session-manager-token.js.map +1 -0
- package/dist/cli/doctor-session-manager.d.ts +3 -1
- package/dist/cli/doctor-session-manager.d.ts.map +1 -1
- package/dist/cli/doctor-session-manager.js +168 -146
- package/dist/cli/doctor-session-manager.js.map +1 -1
- package/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
- package/dist/core/lisa-owned-hash-ledger.js +16 -0
- package/dist/core/lisa-owned-hash-ledger.js.map +1 -1
- package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
- package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
- package/dist/core/upstream-evidence-manifest.js +168 -26
- package/dist/core/upstream-evidence-manifest.js.map +1 -1
- package/dist/opencode/plugin-templates/parity-safety-net.sh +19 -3
- package/package.json +4 -4
- package/plugins/lisa/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-parity-sentry-sdk-setup/SKILL.md +24 -17
- package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/SKILL.md +5 -3
- package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/providers.mjs +121 -3
- package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/validate-config.mjs +86 -31
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/SKILL.md +197 -54
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/references/runbook-template.md +23 -10
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-cycle.mjs +21 -3
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-human.mjs +199 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-manager-token.mjs +99 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-manager.mjs +52 -52
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-queue.mjs +51 -139
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-runtime.mjs +5 -3
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-setup.mjs +94 -14
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-status.mjs +73 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-usage.mjs +105 -15
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/config.mjs +39 -11
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/human-answer.mjs +162 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/human-needed.mjs +198 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/json-input.mjs +34 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/launch-shell.mjs +115 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/launch.mjs +69 -60
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/ledger-questions.mjs +252 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/ledger.mjs +22 -56
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/queue-github.mjs +117 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/session-manager.mjs +17 -5
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/token-migrate.mjs +180 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/token-provider.mjs +150 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/token-read.mjs +166 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/token-store.mjs +248 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/token.mjs +39 -120
- package/plugins/lisa/.codex-plugin/skills/lisa-setup-session-manager/SKILL.md +82 -19
- package/plugins/lisa/commands/session-manager.md +1 -1
- package/plugins/lisa/commands/setup/session-manager.md +1 -1
- package/plugins/lisa/hooks/parity-safety-net.sh +19 -3
- package/plugins/lisa/rules/reference/config-resolution.md +39 -7
- package/plugins/lisa/skills/lisa-parity-sentry-sdk-setup/SKILL.md +24 -17
- package/plugins/lisa/skills/lisa-secrets-access/SKILL.md +5 -3
- package/plugins/lisa/skills/lisa-secrets-access/scripts/providers.mjs +121 -3
- package/plugins/lisa/skills/lisa-secrets-access/scripts/validate-config.mjs +86 -31
- package/plugins/lisa/skills/lisa-session-manager/SKILL.md +197 -54
- package/plugins/lisa/skills/lisa-session-manager/references/runbook-template.md +23 -10
- package/plugins/lisa/skills/lisa-session-manager/scripts/cli-cycle.mjs +21 -3
- package/plugins/lisa/skills/lisa-session-manager/scripts/cli-human.mjs +199 -0
- package/plugins/lisa/skills/lisa-session-manager/scripts/cli-manager-token.mjs +99 -0
- package/plugins/lisa/skills/lisa-session-manager/scripts/cli-manager.mjs +52 -52
- package/plugins/lisa/skills/lisa-session-manager/scripts/cli-queue.mjs +51 -139
- package/plugins/lisa/skills/lisa-session-manager/scripts/cli-runtime.mjs +5 -3
- package/plugins/lisa/skills/lisa-session-manager/scripts/cli-setup.mjs +94 -14
- package/plugins/lisa/skills/lisa-session-manager/scripts/cli-status.mjs +73 -0
- package/plugins/lisa/skills/lisa-session-manager/scripts/cli-usage.mjs +105 -15
- package/plugins/lisa/skills/lisa-session-manager/scripts/config.mjs +39 -11
- package/plugins/lisa/skills/lisa-session-manager/scripts/human-answer.mjs +162 -0
- package/plugins/lisa/skills/lisa-session-manager/scripts/human-needed.mjs +198 -0
- package/plugins/lisa/skills/lisa-session-manager/scripts/json-input.mjs +34 -0
- package/plugins/lisa/skills/lisa-session-manager/scripts/launch-shell.mjs +115 -0
- package/plugins/lisa/skills/lisa-session-manager/scripts/launch.mjs +69 -60
- package/plugins/lisa/skills/lisa-session-manager/scripts/ledger-questions.mjs +252 -0
- package/plugins/lisa/skills/lisa-session-manager/scripts/ledger.mjs +22 -56
- package/plugins/lisa/skills/lisa-session-manager/scripts/queue-github.mjs +117 -0
- package/plugins/lisa/skills/lisa-session-manager/scripts/session-manager.mjs +17 -5
- package/plugins/lisa/skills/lisa-session-manager/scripts/token-migrate.mjs +180 -0
- package/plugins/lisa/skills/lisa-session-manager/scripts/token-provider.mjs +150 -0
- package/plugins/lisa/skills/lisa-session-manager/scripts/token-read.mjs +166 -0
- package/plugins/lisa/skills/lisa-session-manager/scripts/token-store.mjs +248 -0
- package/plugins/lisa/skills/lisa-session-manager/scripts/token.mjs +39 -120
- package/plugins/lisa/skills/lisa-setup-session-manager/SKILL.md +82 -19
- package/plugins/lisa-agy/commands/lisa/session-manager.md +1 -1
- package/plugins/lisa-agy/commands/lisa/setup/session-manager.md +1 -1
- package/plugins/lisa-agy/hooks/parity-safety-net.sh +19 -3
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-agy/skills/lisa-parity-sentry-sdk-setup/SKILL.md +24 -17
- package/plugins/lisa-agy/skills/lisa-secrets-access/SKILL.md +5 -3
- package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/providers.mjs +121 -3
- package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/validate-config.mjs +86 -31
- package/plugins/lisa-agy/skills/lisa-session-manager/SKILL.md +197 -54
- package/plugins/lisa-agy/skills/lisa-session-manager/references/runbook-template.md +23 -10
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-cycle.mjs +21 -3
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-human.mjs +199 -0
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-manager-token.mjs +99 -0
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-manager.mjs +52 -52
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-queue.mjs +51 -139
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-runtime.mjs +5 -3
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-setup.mjs +94 -14
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-status.mjs +73 -0
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-usage.mjs +105 -15
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/config.mjs +39 -11
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/human-answer.mjs +162 -0
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/human-needed.mjs +198 -0
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/json-input.mjs +34 -0
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/launch-shell.mjs +115 -0
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/launch.mjs +69 -60
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/ledger-questions.mjs +252 -0
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/ledger.mjs +22 -56
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/queue-github.mjs +117 -0
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/session-manager.mjs +17 -5
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/token-migrate.mjs +180 -0
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/token-provider.mjs +150 -0
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/token-read.mjs +166 -0
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/token-store.mjs +248 -0
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/token.mjs +39 -120
- package/plugins/lisa-agy/skills/lisa-setup-session-manager/SKILL.md +82 -19
- package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-agy/plugin.json +1 -1
- package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/commands/lisa/session-manager.md +1 -1
- package/plugins/lisa-copilot/commands/lisa/setup/session-manager.md +1 -1
- package/plugins/lisa-copilot/hooks/parity-safety-net.sh +19 -3
- package/plugins/lisa-copilot/rules/reference/config-resolution.md +39 -7
- package/plugins/lisa-copilot/skills/lisa-parity-sentry-sdk-setup/SKILL.md +24 -17
- package/plugins/lisa-copilot/skills/lisa-secrets-access/SKILL.md +5 -3
- package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/providers.mjs +121 -3
- package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/validate-config.mjs +86 -31
- package/plugins/lisa-copilot/skills/lisa-session-manager/SKILL.md +197 -54
- package/plugins/lisa-copilot/skills/lisa-session-manager/references/runbook-template.md +23 -10
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-cycle.mjs +21 -3
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-human.mjs +199 -0
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-manager-token.mjs +99 -0
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-manager.mjs +52 -52
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-queue.mjs +51 -139
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-runtime.mjs +5 -3
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-setup.mjs +94 -14
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-status.mjs +73 -0
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-usage.mjs +105 -15
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/config.mjs +39 -11
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/human-answer.mjs +162 -0
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/human-needed.mjs +198 -0
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/json-input.mjs +34 -0
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/launch-shell.mjs +115 -0
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/launch.mjs +69 -60
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/ledger-questions.mjs +252 -0
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/ledger.mjs +22 -56
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/queue-github.mjs +117 -0
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/session-manager.mjs +17 -5
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/token-migrate.mjs +180 -0
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/token-provider.mjs +150 -0
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/token-read.mjs +166 -0
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/token-store.mjs +248 -0
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/token.mjs +39 -120
- package/plugins/lisa-copilot/skills/lisa-setup-session-manager/SKILL.md +82 -19
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/commands/lisa/session-manager.md +1 -1
- package/plugins/lisa-cursor/commands/lisa/setup/session-manager.md +1 -1
- package/plugins/lisa-cursor/hooks/parity-safety-net.sh +19 -3
- package/plugins/lisa-cursor/rules/config-resolution-reference.mdc +39 -7
- package/plugins/lisa-cursor/skills/lisa-parity-sentry-sdk-setup/SKILL.md +24 -17
- package/plugins/lisa-cursor/skills/lisa-secrets-access/SKILL.md +5 -3
- package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/providers.mjs +121 -3
- package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/validate-config.mjs +86 -31
- package/plugins/lisa-cursor/skills/lisa-session-manager/SKILL.md +197 -54
- package/plugins/lisa-cursor/skills/lisa-session-manager/references/runbook-template.md +23 -10
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-cycle.mjs +21 -3
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-human.mjs +199 -0
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-manager-token.mjs +99 -0
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-manager.mjs +52 -52
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-queue.mjs +51 -139
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-runtime.mjs +5 -3
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-setup.mjs +94 -14
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-status.mjs +73 -0
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-usage.mjs +105 -15
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/config.mjs +39 -11
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/human-answer.mjs +162 -0
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/human-needed.mjs +198 -0
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/json-input.mjs +34 -0
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/launch-shell.mjs +115 -0
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/launch.mjs +69 -60
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/ledger-questions.mjs +252 -0
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/ledger.mjs +22 -56
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/queue-github.mjs +117 -0
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/session-manager.mjs +17 -5
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/token-migrate.mjs +180 -0
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/token-provider.mjs +150 -0
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/token-read.mjs +166 -0
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/token-store.mjs +248 -0
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/token.mjs +39 -120
- package/plugins/lisa-cursor/skills/lisa-setup-session-manager/SKILL.md +82 -19
- package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/hooks/parity-safety-net.sh +19 -3
- package/plugins/lisa-devin/rules/reference/config-resolution.md +39 -7
- package/plugins/lisa-devin/skills/lisa-parity-sentry-sdk-setup/SKILL.md +24 -17
- package/plugins/lisa-devin/skills/lisa-secrets-access/SKILL.md +5 -3
- package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/providers.mjs +121 -3
- package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/validate-config.mjs +86 -31
- package/plugins/lisa-devin/skills/lisa-session-manager/SKILL.md +197 -54
- package/plugins/lisa-devin/skills/lisa-session-manager/references/runbook-template.md +23 -10
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-cycle.mjs +21 -3
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-human.mjs +199 -0
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-manager-token.mjs +99 -0
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-manager.mjs +52 -52
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-queue.mjs +51 -139
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-runtime.mjs +5 -3
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-setup.mjs +94 -14
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-status.mjs +73 -0
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-usage.mjs +105 -15
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/config.mjs +39 -11
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/human-answer.mjs +162 -0
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/human-needed.mjs +198 -0
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/json-input.mjs +34 -0
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/launch-shell.mjs +115 -0
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/launch.mjs +69 -60
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/ledger-questions.mjs +252 -0
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/ledger.mjs +22 -56
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/queue-github.mjs +117 -0
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/session-manager.mjs +17 -5
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/token-migrate.mjs +180 -0
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/token-provider.mjs +150 -0
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/token-read.mjs +166 -0
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/token-store.mjs +248 -0
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/token.mjs +39 -120
- package/plugins/lisa-devin/skills/lisa-setup-session-manager/SKILL.md +82 -19
- package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-agy/plugin.json +1 -1
- package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-agy/plugin.json +1 -1
- package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-agy/plugin.json +1 -1
- package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-agy/plugin.json +1 -1
- package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-agy/plugin.json +1 -1
- package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-agy/plugin.json +1 -1
- package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-agy/plugin.json +1 -1
- package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/src/base/commands/session-manager.md +1 -1
- package/plugins/src/base/commands/setup/session-manager.md +1 -1
- package/plugins/src/base/hooks/parity-safety-net.sh +19 -3
- package/plugins/src/base/rules/reference/config-resolution.md +39 -7
- package/plugins/src/base/skills/lisa-parity-sentry-sdk-setup/SKILL.md +24 -17
- package/plugins/src/base/skills/lisa-secrets-access/SKILL.md +5 -3
- package/plugins/src/base/skills/lisa-secrets-access/scripts/providers.mjs +121 -3
- package/plugins/src/base/skills/lisa-secrets-access/scripts/validate-config.mjs +86 -31
- package/plugins/src/base/skills/lisa-session-manager/SKILL.md +197 -54
- package/plugins/src/base/skills/lisa-session-manager/references/runbook-template.md +23 -10
- package/plugins/src/base/skills/lisa-session-manager/scripts/cli-cycle.mjs +21 -3
- package/plugins/src/base/skills/lisa-session-manager/scripts/cli-human.mjs +199 -0
- package/plugins/src/base/skills/lisa-session-manager/scripts/cli-manager-token.mjs +99 -0
- package/plugins/src/base/skills/lisa-session-manager/scripts/cli-manager.mjs +52 -52
- package/plugins/src/base/skills/lisa-session-manager/scripts/cli-queue.mjs +51 -139
- package/plugins/src/base/skills/lisa-session-manager/scripts/cli-runtime.mjs +5 -3
- package/plugins/src/base/skills/lisa-session-manager/scripts/cli-setup.mjs +94 -14
- package/plugins/src/base/skills/lisa-session-manager/scripts/cli-status.mjs +73 -0
- package/plugins/src/base/skills/lisa-session-manager/scripts/cli-usage.mjs +105 -15
- package/plugins/src/base/skills/lisa-session-manager/scripts/config.mjs +39 -11
- package/plugins/src/base/skills/lisa-session-manager/scripts/human-answer.mjs +162 -0
- package/plugins/src/base/skills/lisa-session-manager/scripts/human-needed.mjs +198 -0
- package/plugins/src/base/skills/lisa-session-manager/scripts/json-input.mjs +34 -0
- package/plugins/src/base/skills/lisa-session-manager/scripts/launch-shell.mjs +115 -0
- package/plugins/src/base/skills/lisa-session-manager/scripts/launch.mjs +69 -60
- package/plugins/src/base/skills/lisa-session-manager/scripts/ledger-questions.mjs +252 -0
- package/plugins/src/base/skills/lisa-session-manager/scripts/ledger.mjs +22 -56
- package/plugins/src/base/skills/lisa-session-manager/scripts/queue-github.mjs +117 -0
- package/plugins/src/base/skills/lisa-session-manager/scripts/session-manager.mjs +17 -5
- package/plugins/src/base/skills/lisa-session-manager/scripts/token-migrate.mjs +180 -0
- package/plugins/src/base/skills/lisa-session-manager/scripts/token-provider.mjs +150 -0
- package/plugins/src/base/skills/lisa-session-manager/scripts/token-read.mjs +166 -0
- package/plugins/src/base/skills/lisa-session-manager/scripts/token-store.mjs +248 -0
- package/plugins/src/base/skills/lisa-session-manager/scripts/token.mjs +39 -120
- package/plugins/src/base/skills/lisa-setup-session-manager/SKILL.md +82 -19
|
@@ -362,45 +362,86 @@ export function validateObligations(record, scope, claims) {
|
|
|
362
362
|
);
|
|
363
363
|
}
|
|
364
364
|
|
|
365
|
-
/**
|
|
365
|
+
/**
|
|
366
|
+
* Whether one usage entry is the canonical Verify entry for this work item.
|
|
367
|
+
* @param {any} entry Parsed usage entry, if any.
|
|
368
|
+
* @param {string} ref Work-item reference.
|
|
369
|
+
* @param {any} context Provider context.
|
|
370
|
+
* @returns {boolean} True when the flow and artifact identity both match.
|
|
371
|
+
*/
|
|
372
|
+
function isVerifyEntryFor(entry, ref, context) {
|
|
373
|
+
const identity = String(entry?.artifactRef ?? "").replace(/^github:/, "");
|
|
374
|
+
const linear =
|
|
375
|
+
context.provider === "linear" &&
|
|
376
|
+
identity === `linear:${context.scope.split("/")[0]}/${ref}`;
|
|
377
|
+
return (
|
|
378
|
+
["lisa-verify", "verify"].includes(entry?.flow) &&
|
|
379
|
+
(linear ||
|
|
380
|
+
identity === ref ||
|
|
381
|
+
identity === `https://github.com/${ref.replace("#", "/issues/")}`)
|
|
382
|
+
);
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
/**
|
|
386
|
+
* Use the same canonical parser/integrity implementation as the TS writer.
|
|
387
|
+
*
|
|
388
|
+
* Every comment on the work item is read, from any author. A `## Lisa Usage`
|
|
389
|
+
* section that is malformed or fails its integrity check therefore cannot be
|
|
390
|
+
* allowed to fail the whole authorization: one stray or hand-edited comment
|
|
391
|
+
* would otherwise turn a completed item into `invalid-proof`
|
|
392
|
+
* (CodySwannGT/lisa#4564). Such a section contributes no entries and is
|
|
393
|
+
* skipped, and an expected id is satisfied when ANY intact section carries the
|
|
394
|
+
* matching Verify entry, so a later conflicting copy cannot shadow it. Nothing
|
|
395
|
+
* is accepted that was not accepted before: every expected id still needs an
|
|
396
|
+
* intact, well-formed section holding the Verify entry for this exact item.
|
|
397
|
+
*/
|
|
366
398
|
export function validateVerifyUsage(documents, ref, expectedIds, context) {
|
|
367
399
|
requireProof(
|
|
368
400
|
Array.isArray(expectedIds) && expectedIds.length > 0,
|
|
369
401
|
"Canonical Verify usage is missing."
|
|
370
402
|
);
|
|
371
403
|
const found = new Map();
|
|
372
|
-
|
|
373
|
-
|
|
404
|
+
let skipped = 0;
|
|
405
|
+
for (const [index, document] of documents.entries()) {
|
|
406
|
+
let usage;
|
|
407
|
+
try {
|
|
408
|
+
usage = section(document, "Lisa Usage");
|
|
409
|
+
} catch (error) {
|
|
410
|
+
// documents[0] is the work-item body; a duplicate heading there stays
|
|
411
|
+
// fatal. In a comment it is one more stray section to skip.
|
|
412
|
+
if (index === 0) throw error;
|
|
413
|
+
skipped += 1;
|
|
414
|
+
continue;
|
|
415
|
+
}
|
|
374
416
|
if (!usage) continue;
|
|
375
417
|
const canonical = `## Lisa Usage\n${usage}\n`;
|
|
376
418
|
let parsed;
|
|
377
419
|
try {
|
|
378
420
|
parsed = parseLisaUsageSection(canonical);
|
|
379
421
|
} catch {
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
"The current canonical Verify usage section is malformed."
|
|
383
|
-
);
|
|
422
|
+
skipped += 1;
|
|
423
|
+
continue;
|
|
384
424
|
}
|
|
385
425
|
if (!parsed.range) continue;
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
for (const entry of parsed.entries)
|
|
426
|
+
if (!verifyLisaUsageSectionIntegrity(canonical).ok) {
|
|
427
|
+
skipped += 1;
|
|
428
|
+
continue;
|
|
429
|
+
}
|
|
430
|
+
for (const entry of parsed.entries) {
|
|
431
|
+
if (!found.has(entry.entryId)) found.set(entry.entryId, []);
|
|
432
|
+
found.get(entry.entryId).push(entry);
|
|
433
|
+
}
|
|
391
434
|
}
|
|
435
|
+
const note =
|
|
436
|
+
skipped > 0
|
|
437
|
+
? ` ${skipped} malformed or integrity-failing usage section(s) were ignored.`
|
|
438
|
+
: "";
|
|
392
439
|
for (const id of expectedIds) {
|
|
393
|
-
const entry = found.get(id);
|
|
394
|
-
const identity = String(entry?.artifactRef ?? "").replace(/^github:/, "");
|
|
395
|
-
const linear =
|
|
396
|
-
context.provider === "linear" &&
|
|
397
|
-
identity === `linear:${context.scope.split("/")[0]}/${ref}`;
|
|
398
440
|
requireProof(
|
|
399
|
-
[
|
|
400
|
-
(
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
`Canonical Verify usage entry ${id} is absent or belongs to another work item.`
|
|
441
|
+
(found.get(id) ?? []).some(entry =>
|
|
442
|
+
isVerifyEntryFor(entry, ref, context)
|
|
443
|
+
),
|
|
444
|
+
`Canonical Verify usage entry ${id} is absent or belongs to another work item.${note}`
|
|
404
445
|
);
|
|
405
446
|
// acceptedAt/lifecycleSources attest the later native terminal event. They
|
|
406
447
|
// are deliberately not prerequisites of the transition they describe.
|
|
@@ -19,8 +19,13 @@ const ENTRY = fileURLToPath(import.meta.url);
|
|
|
19
19
|
const PRELOAD = fileURLToPath(
|
|
20
20
|
new URL("./npm-update-hook-preload.mjs", import.meta.url)
|
|
21
21
|
);
|
|
22
|
+
// Byte-for-byte the `-e` payload of `rails-prepush` in
|
|
23
|
+
// rails/copy-overwrite/lefthook.yml. `hookEntry` matches it exactly, so any
|
|
24
|
+
// edit to that lefthook command must be mirrored here; the regression test
|
|
25
|
+
// `npm-update-hosted-hook-rails-inline.test.ts` reads the lefthook file and
|
|
26
|
+
// fails when the two drift (CodySwannGT/lisa#4564).
|
|
22
27
|
const RAILS_INLINE =
|
|
23
|
-
'try { const { main } = await import("./scripts/lisa-rails-prepush.mjs");
|
|
28
|
+
'try { const { main } = await import("./scripts/lisa-rails-prepush.mjs"); const rc = await main(process.argv.slice(1)); if (rc !== 0) console.error(`Rails pre-push refused (exit ${rc}). Retry the same git push command and inspect rails-prepush output for scanner and work-item details.`); process.exitCode = rc; } catch { console.error("Managed Rails push tooling is unavailable or damaged. Run full Lisa apply and retry; raw bootstrap errors are withheld."); process.exitCode = 1; }';
|
|
24
29
|
|
|
25
30
|
/** Context carries no token; the broker independently retains its immutable read subject in parent memory. */
|
|
26
31
|
export function hostedHookContext(file) {
|
|
@@ -3475,12 +3475,28 @@ if [ -f "$rules_file" ]; then
|
|
|
3475
3475
|
# here — before the remaining rules ran, and with an exit status that is
|
|
3476
3476
|
# not a refusal. The `||` puts the pipeline in a condition context, where
|
|
3477
3477
|
# a non-zero status is expected rather than fatal.
|
|
3478
|
-
#
|
|
3479
|
-
#
|
|
3478
|
+
# A here-string, never a pipe. With `printf | grep` under pipefail, a grep
|
|
3479
|
+
# that stops at its first match (`-q`, and GNU grep whose stdout is
|
|
3480
|
+
# /dev/null, which it treats as `-q`) closes the pipe while printf is still
|
|
3481
|
+
# writing; printf takes SIGPIPE and the pipeline reports 141 instead of
|
|
3482
|
+
# grep's 0. 141 lands in the `*)` arm below and a rule that MATCHED was
|
|
3483
|
+
# reported as an invalid regex and not enforced (CodySwannGT/lisa#4564).
|
|
3484
|
+
# A here-string has no writer process, so the status is grep's alone.
|
|
3485
|
+
#
|
|
3486
|
+
# The here-string is staged by the shell (a pipe, or a temp file for a
|
|
3487
|
+
# large body or on Bash 3.2), and that staging can fail: no temp space,
|
|
3488
|
+
# a file-size limit. A failed redirection on a bare `grep … <<<` returns
|
|
3489
|
+
# 1, the same status as "no match", so the rule would silently pass. The
|
|
3490
|
+
# brace group separates the two: grep's own status is captured INSIDE it,
|
|
3491
|
+
# so the group itself only fails when the redirection could not be set up.
|
|
3480
3492
|
rule_status=0
|
|
3481
|
-
|
|
3493
|
+
{ grep -qEi -- "$rule" || rule_status=$?; } <<<"$custom_command_str" \
|
|
3494
|
+
|| rule_status=unstaged
|
|
3482
3495
|
case "$rule_status" in
|
|
3483
3496
|
0) block "matched a project custom safety rule (${rules_file##*/}): $rule" ;;
|
|
3497
|
+
# Fail closed: the rule could not be evaluated at all, which is not the
|
|
3498
|
+
# same thing as the rule not matching.
|
|
3499
|
+
unstaged) block "could not stage the command to check project custom safety rule (${rules_file##*/}): $rule" ;;
|
|
3484
3500
|
1) ;; # no match
|
|
3485
3501
|
# grep exits 2 on a malformed ERE. Treated as no-match before, so a typo
|
|
3486
3502
|
# in a project's rules file silently disabled that rule — a guard the
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"children": []
|
|
104
104
|
},
|
|
105
105
|
"lib/completion-proof-content.mjs": {
|
|
106
|
-
"sha256": "
|
|
106
|
+
"sha256": "679702f6e3cce3919e01c79fe5016d3215f15b067bcab2fb9eeffb0350e7c64f",
|
|
107
107
|
"staticImports": [
|
|
108
108
|
"lib/completion-proof-shape.mjs",
|
|
109
109
|
"lib/usage-ledger-integrity.mjs",
|
|
@@ -733,7 +733,7 @@
|
|
|
733
733
|
"children": []
|
|
734
734
|
},
|
|
735
735
|
"lib/npm-update-hosted-hook.mjs": {
|
|
736
|
-
"sha256": "
|
|
736
|
+
"sha256": "801b41f0f3f455c08b4e86a64f076190a5f245492959a154d70b897dd0d60a31",
|
|
737
737
|
"staticImports": [
|
|
738
738
|
"lib/npm-update-contract.mjs",
|
|
739
739
|
"lib/npm-update-invariants.mjs",
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type Finding } from "./doctor-session-manager-trust.js";
|
|
2
|
+
/** What the pending-human scan adds to the check. */
|
|
3
|
+
export interface PendingHumanReport {
|
|
4
|
+
/** One line listing the waiting items, or undefined when there are none. */
|
|
5
|
+
readonly note: string | undefined;
|
|
6
|
+
readonly findings: readonly Finding[];
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* List the items pending a human and warn about unmarked ones.
|
|
10
|
+
* @param targetPath - Project root
|
|
11
|
+
* @param block - Merged `sessionManager` block
|
|
12
|
+
* @param read - Text reader
|
|
13
|
+
* @param now - Clock
|
|
14
|
+
* @returns The note and findings
|
|
15
|
+
*/
|
|
16
|
+
export declare function pendingHumanReport(targetPath: string, block: Record<string, unknown>, read: (file: string) => Promise<string>, now: () => Date): Promise<PendingHumanReport>;
|
|
17
|
+
//# sourceMappingURL=doctor-session-manager-pending.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doctor-session-manager-pending.d.ts","sourceRoot":"","sources":["../../src/cli/doctor-session-manager-pending.ts"],"names":[],"mappings":"AAiBA,OAAO,EACL,KAAK,OAAO,EAGb,MAAM,mCAAmC,CAAC;AAgB3C,qDAAqD;AACrD,MAAM,WAAW,kBAAkB;IACjC,4EAA4E;IAC5E,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,QAAQ,CAAC,QAAQ,EAAE,SAAS,OAAO,EAAE,CAAC;CACvC;AA0ED;;;;;;;GAOG;AACH,wBAAsB,kBAAkB,CACtC,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,EACvC,GAAG,EAAE,MAAM,IAAI,GACd,OAAO,CAAC,kBAAkB,CAAC,CAgC7B"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Items waiting on a human, for the session-manager doctor check
|
|
3
|
+
* (CodySwannGT/lisa#4555, part 3).
|
|
4
|
+
*
|
|
5
|
+
* The manager marks an item that needs a person and keeps dispatching others.
|
|
6
|
+
* Doctor lists what is waiting so an operator sees it without the tracker, and
|
|
7
|
+
* warns about one failure only it can see from outside: a question recorded in
|
|
8
|
+
* the ledger more than one cycle `interval` ago whose tracker mark was never
|
|
9
|
+
* read back (`markedAt: null`). The manager records the question before it
|
|
10
|
+
* writes the mark, so this is a cycle that crashed or was stopped mid-way and
|
|
11
|
+
* has not finished the job since, and nobody on the tracker knows the item is
|
|
12
|
+
* waiting.
|
|
13
|
+
*
|
|
14
|
+
* Only the ref, kind and age are printed, never the question text: it came
|
|
15
|
+
* from a worker or a ticket and could carry anything.
|
|
16
|
+
*/
|
|
17
|
+
import * as path from "node:path";
|
|
18
|
+
import { isRecord, readJson, } from "./doctor-session-manager-trust.js";
|
|
19
|
+
/** The cycle interval when `sessionManager.interval` is absent. */
|
|
20
|
+
const DEFAULT_INTERVAL_MS = 5 * 60_000;
|
|
21
|
+
const MINUTE_MS = 60_000;
|
|
22
|
+
const HOUR_MS = 60 * MINUTE_MS;
|
|
23
|
+
const DAY_MS = 24 * HOUR_MS;
|
|
24
|
+
const UNIT_MS = {
|
|
25
|
+
s: 1000,
|
|
26
|
+
m: MINUTE_MS,
|
|
27
|
+
h: HOUR_MS,
|
|
28
|
+
d: DAY_MS,
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Parse a cycle interval such as `5m`; anything else is the default.
|
|
32
|
+
* @param value - `sessionManager.interval`
|
|
33
|
+
* @returns Interval in milliseconds
|
|
34
|
+
*/
|
|
35
|
+
function intervalMs(value) {
|
|
36
|
+
const match = typeof value === "string" ? /^(\d+)([smhd])$/.exec(value) : null;
|
|
37
|
+
if (!match)
|
|
38
|
+
return DEFAULT_INTERVAL_MS;
|
|
39
|
+
return Number(match[1]) * (UNIT_MS[match[2] ?? "m"] ?? MINUTE_MS);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* A short age such as `3h` or `20m`.
|
|
43
|
+
* @param ms - Age in milliseconds
|
|
44
|
+
* @returns Age text
|
|
45
|
+
*/
|
|
46
|
+
function age(ms) {
|
|
47
|
+
if (ms >= DAY_MS)
|
|
48
|
+
return `${Math.floor(ms / DAY_MS)}d`;
|
|
49
|
+
if (ms >= HOUR_MS)
|
|
50
|
+
return `${Math.floor(ms / HOUR_MS)}h`;
|
|
51
|
+
return `${Math.max(0, Math.floor(ms / MINUTE_MS))}m`;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* The waiting items in a parsed ledger, oldest first.
|
|
55
|
+
* @param ledger - Parsed ledger.json
|
|
56
|
+
* @param now - Current time in ms
|
|
57
|
+
* @returns Waiting items
|
|
58
|
+
*/
|
|
59
|
+
function waitingItems(ledger, now) {
|
|
60
|
+
const items = isRecord(ledger.items) ? ledger.items : {};
|
|
61
|
+
const rows = Object.entries(items).flatMap(([ref, item]) => {
|
|
62
|
+
const question = isRecord(item) ? item.pendingQuestion : undefined;
|
|
63
|
+
if (!isRecord(question))
|
|
64
|
+
return [];
|
|
65
|
+
const asked = Date.parse(String(question.askedAt ?? ""));
|
|
66
|
+
return [
|
|
67
|
+
{
|
|
68
|
+
ref,
|
|
69
|
+
kind: typeof question.kind === "string" ? question.kind : "worker-question",
|
|
70
|
+
ageMs: Number.isNaN(asked) ? 0 : now - asked,
|
|
71
|
+
marked: typeof question.markedAt === "string",
|
|
72
|
+
},
|
|
73
|
+
];
|
|
74
|
+
});
|
|
75
|
+
return [...rows].sort((a, b) => b.ageMs - a.ageMs);
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Why the ledger could not be loaded: unparseable JSON, or a read that
|
|
79
|
+
* failed (permissions, a directory in its place), told apart so the
|
|
80
|
+
* operator fixes the right thing. Only the error code is shown.
|
|
81
|
+
* @param error - What reading or parsing threw
|
|
82
|
+
* @returns Phrase completing "<file> …"
|
|
83
|
+
*/
|
|
84
|
+
function ledgerProblem(error) {
|
|
85
|
+
if (error instanceof SyntaxError)
|
|
86
|
+
return "is not valid JSON";
|
|
87
|
+
const code = isRecord(error) && typeof error.code === "string" ? error.code : undefined;
|
|
88
|
+
return code === undefined
|
|
89
|
+
? "could not be read"
|
|
90
|
+
: `could not be read (${code})`;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* List the items pending a human and warn about unmarked ones.
|
|
94
|
+
* @param targetPath - Project root
|
|
95
|
+
* @param block - Merged `sessionManager` block
|
|
96
|
+
* @param read - Text reader
|
|
97
|
+
* @param now - Clock
|
|
98
|
+
* @returns The note and findings
|
|
99
|
+
*/
|
|
100
|
+
export async function pendingHumanReport(targetPath, block, read, now) {
|
|
101
|
+
const file = path.join(targetPath, ".lisa", "session-manager", "ledger.json");
|
|
102
|
+
const loaded = await readJson(read, file).then(value => ({ ledger: value, problem: undefined }), (error) => ({ ledger: undefined, problem: ledgerProblem(error) }));
|
|
103
|
+
if (loaded.problem !== undefined) {
|
|
104
|
+
return {
|
|
105
|
+
note: undefined,
|
|
106
|
+
findings: [
|
|
107
|
+
{
|
|
108
|
+
status: "warn",
|
|
109
|
+
text: `${file} ${loaded.problem}, so doctor cannot list the items waiting on a human; the manager also refuses it until it is repaired`,
|
|
110
|
+
},
|
|
111
|
+
],
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
const ledger = loaded.ledger;
|
|
115
|
+
const waiting = ledger === undefined ? [] : waitingItems(ledger, now().getTime());
|
|
116
|
+
if (waiting.length === 0)
|
|
117
|
+
return { note: undefined, findings: [] };
|
|
118
|
+
const limit = intervalMs(block.interval);
|
|
119
|
+
const unmarked = waiting.filter(item => !item.marked && item.ageMs > limit);
|
|
120
|
+
return {
|
|
121
|
+
note: `${waiting.length} pending a human: ${waiting
|
|
122
|
+
.map(item => `${item.ref} (${item.kind}, ${age(item.ageMs)})`)
|
|
123
|
+
.join(", ")}`,
|
|
124
|
+
findings: unmarked.map(item => ({
|
|
125
|
+
status: "warn",
|
|
126
|
+
text: `${item.ref} has waited ${age(item.ageMs)} for a human but was never marked human-needed on the tracker, so nobody there knows; check the manager is running (session-manager.mjs status) and let its next cycle mark it`,
|
|
127
|
+
})),
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
//# sourceMappingURL=doctor-session-manager-pending.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doctor-session-manager-pending.js","sourceRoot":"","sources":["../../src/cli/doctor-session-manager-pending.ts"],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OAAO,EAAE,CAAC,CAAC;IACpE,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC;IACnE,MAAM,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IACzC,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC;IAC5E,OAAO;QACL,IAAI,EAAE,GAAG,OAAO,CAAC,MAAM,qBAAqB,OAAO;aAChD,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,GAAG,KAAK,IAAI,CAAC,IAAI,KAAK,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC;aAC7D,IAAI,CAAC,IAAI,CAAC,EAAE;QACf,QAAQ,EAAE,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YAC9B,MAAM,EAAE,MAAe;YACvB,IAAI,EAAE,GAAG,IAAI,CAAC,GAAG,eAAe,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,gLAAgL;SAChO,CAAC,CAAC;KACJ,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { type Finding } from "./doctor-session-manager-trust.js";
|
|
2
|
+
/** Resolved inputs the Telegram findings read. */
|
|
3
|
+
export interface TelegramContext {
|
|
4
|
+
readonly claudeDir: string;
|
|
5
|
+
readonly sharedDir: string;
|
|
6
|
+
readonly env: NodeJS.ProcessEnv;
|
|
7
|
+
readonly read: (file: string) => Promise<string>;
|
|
8
|
+
readonly statFile: (file: string) => Promise<{
|
|
9
|
+
readonly mode: number;
|
|
10
|
+
}>;
|
|
11
|
+
/** The configured secrets provider, or undefined when none (or `env`). */
|
|
12
|
+
readonly secretsProvider: string | undefined;
|
|
13
|
+
/** The provider secret name for this manager. */
|
|
14
|
+
readonly secretName: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The provider secret name for a manager: `TELEGRAM_BOT_TOKEN_<NAME>` with
|
|
18
|
+
* the name upper-snaked. Must agree with the session-manager CLI's
|
|
19
|
+
* `telegramSecretName` (token-store.mjs); a test pins the two together.
|
|
20
|
+
* @param managerName - `sessionManager.name`
|
|
21
|
+
* @returns Secret name
|
|
22
|
+
*/
|
|
23
|
+
export declare function telegramSecretNameFor(managerName: unknown): string;
|
|
24
|
+
/**
|
|
25
|
+
* The secrets provider the session-manager CLI will use for this project, or
|
|
26
|
+
* undefined when it uses none (`env`, or no provider at all). Decided exactly
|
|
27
|
+
* the way the CLI's `loadTokenSecrets` does through `lisa-secrets-access`'s
|
|
28
|
+
* `readConfig`: only the committed `.lisa.config.json` counts (the local
|
|
29
|
+
* override is never read for `secrets`), its `secrets.provider` defaulting
|
|
30
|
+
* to `env`; with no committed file at all, the environment fallback
|
|
31
|
+
* (`LISA_TENANT` or `LISA_SECRETS_NAMESPACE` names a tenant, and
|
|
32
|
+
* `LISA_PROVIDER` / `LISA_SECRETS_PROVIDER` its provider, default
|
|
33
|
+
* `bitwarden`). A test pins this to the CLI. Known gap: with no config file
|
|
34
|
+
* at the root the CLI also looks under `LISA_PROJECT_DIR` /
|
|
35
|
+
* `CLAUDE_PROJECT_DIR`; doctor only looks at the project it was pointed at.
|
|
36
|
+
* @param targetPath - Project root
|
|
37
|
+
* @param read - Text reader
|
|
38
|
+
* @param env - Doctor's environment
|
|
39
|
+
* @returns Provider name, or undefined for none
|
|
40
|
+
*/
|
|
41
|
+
export declare function secretsProviderAt(targetPath: string, read: (file: string) => Promise<string>, env: NodeJS.ProcessEnv): Promise<string | undefined>;
|
|
42
|
+
/**
|
|
43
|
+
* Resolve the configured state dir to an absolute path, expanding `~`.
|
|
44
|
+
* @param raw - Configured `notify.stateDir`
|
|
45
|
+
* @param home - Home directory
|
|
46
|
+
* @param projectRoot - Base for a relative path
|
|
47
|
+
* @returns Absolute path, or undefined when unset
|
|
48
|
+
*/
|
|
49
|
+
export declare function resolveStateDir(raw: unknown, home: string, projectRoot: string): string | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* The plaintext-token findings that hold with no notification channel too
|
|
52
|
+
* (the spec's "doctor flags any plaintext token file it finds"): an exported
|
|
53
|
+
* `TELEGRAM_BOT_TOKEN*` variable, by name only, and a token file in the
|
|
54
|
+
* shared Telegram state dir, by existence only (never read). The Telegram
|
|
55
|
+
* requirements themselves (state dir, plugin scope, `TELEGRAM_STATE_DIR`)
|
|
56
|
+
* are skipped, since no bot is configured.
|
|
57
|
+
* @param ctx - The shared dir, environment and mode reader
|
|
58
|
+
* @returns Findings
|
|
59
|
+
*/
|
|
60
|
+
export declare function plaintextTokenFindings(ctx: Pick<TelegramContext, "sharedDir" | "env" | "statFile">): Promise<readonly Finding[]>;
|
|
61
|
+
/**
|
|
62
|
+
* Every Telegram finding: the state dir and its token file, the user-scope
|
|
63
|
+
* plugin and shared default dir, and exported Telegram variables.
|
|
64
|
+
* @param ctx - Resolved inputs
|
|
65
|
+
* @param stateDir - Absolute state dir, or undefined when unset
|
|
66
|
+
* @returns Findings
|
|
67
|
+
*/
|
|
68
|
+
export declare function telegramFindings(ctx: TelegramContext, stateDir: string | undefined): Promise<readonly Finding[]>;
|
|
69
|
+
//# sourceMappingURL=doctor-session-manager-token.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doctor-session-manager-token.d.ts","sourceRoot":"","sources":["../../src/cli/doctor-session-manager-token.ts"],"names":[],"mappings":"AA0BA,OAAO,EACL,KAAK,OAAO,EAIb,MAAM,mCAAmC,CAAC;AAY3C,kDAAkD;AAClD,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,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