@codyswann/lisa 8.7.1 → 8.9.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/README.md +21 -0
- package/all/copy-overwrite/scripts/lib/completion-authorization.mjs +54 -0
- package/all/copy-overwrite/scripts/lib/completion-proof-adapters.mjs +59 -0
- package/all/copy-overwrite/scripts/lib/completion-proof-markdown.mjs +1 -1
- package/all/copy-overwrite/scripts/lib/npm-update-helper-inventory.mjs +1 -0
- package/all/copy-overwrite/scripts/lib/release-switch.d.mts +91 -0
- package/all/copy-overwrite/scripts/lib/release-switch.mjs +1049 -0
- package/all/copy-overwrite/scripts/lisa-enforcement-fallback.sh +3 -3
- package/all/copy-overwrite/scripts/lisa-enforcement-freshness.mjs +1 -0
- package/all/copy-overwrite/scripts/lisa-gates.mjs +90 -5
- package/all/copy-overwrite/scripts/lisa-hooks/task-readiness-guard.sh +54 -0
- package/all/copy-overwrite/scripts/lisa-release-switch.mjs +203 -0
- package/all/copy-overwrite/scripts/npm-updater-helper-graph.json +18 -5
- package/dist/cli/doctor-release-setting.d.ts +8 -0
- package/dist/cli/doctor-release-setting.d.ts.map +1 -0
- package/dist/cli/doctor-release-setting.js +71 -0
- package/dist/cli/doctor-release-setting.js.map +1 -0
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +2 -0
- package/dist/cli/doctor.js.map +1 -1
- package/dist/controls/before-enforce-observe.d.ts +1 -1
- package/dist/controls/before-enforce-observe.d.ts.map +1 -1
- package/dist/controls/before-enforce-observe.js +3 -7
- package/dist/controls/before-enforce-observe.js.map +1 -1
- package/dist/controls/before-enforce-workspace.d.ts.map +1 -1
- package/dist/controls/before-enforce-workspace.js +16 -1
- package/dist/controls/before-enforce-workspace.js.map +1 -1
- package/dist/controls/commands/proof-check.d.ts +1 -1
- package/dist/controls/commands/proof-check.d.ts.map +1 -1
- package/dist/controls/commands/proof-check.js +11 -11
- package/dist/controls/commands/seed.d.ts.map +1 -1
- package/dist/controls/commands/seed.js +14 -30
- package/dist/controls/commands/seed.js.map +1 -1
- package/dist/controls/proof-check-plan.d.ts +5 -6
- package/dist/controls/proof-check-plan.d.ts.map +1 -1
- package/dist/controls/proof-check-plan.js +11 -10
- package/dist/controls/proof-check-plan.js.map +1 -1
- package/dist/controls/proof-check-report.d.ts.map +1 -1
- package/dist/controls/proof-check-report.js +2 -4
- package/dist/controls/proof-check-report.js.map +1 -1
- package/dist/controls/proof-copy-source.d.ts +24 -0
- package/dist/controls/proof-copy-source.d.ts.map +1 -0
- package/dist/controls/proof-copy-source.js +60 -0
- package/dist/controls/proof-copy-source.js.map +1 -0
- package/dist/controls/proof-copy-wording.d.ts +10 -1
- package/dist/controls/proof-copy-wording.d.ts.map +1 -1
- package/dist/controls/proof-copy-wording.js +23 -2
- package/dist/controls/proof-copy-wording.js.map +1 -1
- package/dist/controls/proof-copy-workspace.d.ts +4 -3
- package/dist/controls/proof-copy-workspace.d.ts.map +1 -1
- package/dist/controls/proof-copy-workspace.js +39 -23
- package/dist/controls/proof-copy-workspace.js.map +1 -1
- package/dist/controls/proof-copy.d.ts +1 -9
- package/dist/controls/proof-copy.d.ts.map +1 -1
- package/dist/controls/proof-copy.js +3 -45
- package/dist/controls/proof-copy.js.map +1 -1
- package/dist/controls/proof-half-run.d.ts +1 -1
- package/dist/controls/proof-half-run.d.ts.map +1 -1
- package/dist/controls/proof-half-run.js +6 -9
- package/dist/controls/proof-half-run.js.map +1 -1
- package/dist/controls/proof-plan.d.ts +17 -2
- package/dist/controls/proof-plan.d.ts.map +1 -1
- package/dist/controls/proof-plan.js +47 -3
- package/dist/controls/proof-plan.js.map +1 -1
- package/dist/controls/proof-push-fixture.d.ts +16 -0
- package/dist/controls/proof-push-fixture.d.ts.map +1 -0
- package/dist/controls/proof-push-fixture.js +137 -0
- package/dist/controls/proof-push-fixture.js.map +1 -0
- package/dist/controls/proof-types.d.ts +4 -0
- package/dist/controls/proof-types.d.ts.map +1 -1
- package/dist/controls/register-entries.d.ts.map +1 -1
- package/dist/controls/register-entries.js +23 -2
- package/dist/controls/register-entries.js.map +1 -1
- package/dist/controls/register-types.d.ts +4 -0
- package/dist/controls/register-types.d.ts.map +1 -1
- package/dist/controls/register-types.js.map +1 -1
- package/dist/controls/shipped-parts.d.ts +8 -6
- package/dist/controls/shipped-parts.d.ts.map +1 -1
- package/dist/controls/shipped-parts.js +19 -1
- package/dist/controls/shipped-parts.js.map +1 -1
- package/dist/controls/shipped-task-proofs.d.ts +24 -0
- package/dist/controls/shipped-task-proofs.d.ts.map +1 -0
- package/dist/controls/shipped-task-proofs.js +191 -0
- package/dist/controls/shipped-task-proofs.js.map +1 -0
- package/dist/core/lisa-owned-hash-ledger.json +148 -4
- package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
- package/dist/core/upstream-evidence-manifest.json +391 -66
- package/dist/migrations/ensure-seeded-gates.d.ts.map +1 -1
- package/dist/migrations/ensure-seeded-gates.js +4 -1
- package/dist/migrations/ensure-seeded-gates.js.map +1 -1
- package/dist/opencode/hooks-installer.d.ts.map +1 -1
- package/dist/opencode/hooks-installer.js +2 -0
- package/dist/opencode/hooks-installer.js.map +1 -1
- package/dist/opencode/plugin-catalog.d.ts.map +1 -1
- package/dist/opencode/plugin-catalog.js +5 -0
- package/dist/opencode/plugin-catalog.js.map +1 -1
- package/dist/opencode/plugin-templates/lisa-task-readiness.ts +47 -0
- package/dist/opencode/plugin-templates/task-readiness-guard.mjs +99 -0
- package/dist/opencode/plugin-templates/task-readiness-guard.sh +54 -0
- package/package.json +5 -4
- package/plugins/lisa/.claude-plugin/plugin.json +49 -2
- package/plugins/lisa/.codex-plugin/hooks.json +48 -1
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-atlassian-access/SKILL.md +13 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-configure/SKILL.md +19 -7
- package/plugins/lisa/.codex-plugin/skills/lisa-doctor/SKILL.md +10 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-drive-pr-to-merge/SKILL.md +9 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-git-submit-pr/SKILL.md +1 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-github-build-intake/SKILL.md +2 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-github-claim/SKILL.md +2 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-github-read-issue/SKILL.md +29 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-github-read-issue/read-contract.mjs +70 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-github-validate-issue/SKILL.md +27 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-github-write-issue/SKILL.md +23 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-implement/SKILL.md +15 -2
- package/plugins/lisa/.codex-plugin/skills/lisa-jira-build-intake/SKILL.md +2 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-jira-claim/SKILL.md +2 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-jira-read-ticket/SKILL.md +9 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-jira-validate-ticket/SKILL.md +27 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-jira-write-ticket/SKILL.md +23 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-linear-access/SKILL.md +102 -103
- package/plugins/lisa/.codex-plugin/skills/lisa-linear-access/scripts/linear-graphql.sh +428 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-linear-build-intake/SKILL.md +2 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-linear-claim/SKILL.md +3 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-linear-read-issue/SKILL.md +13 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-linear-validate-issue/SKILL.md +26 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-linear-write-issue/SKILL.md +27 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-notion-access/SKILL.md +37 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-notion-access/scripts/readiness-probe.mjs +83 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/SKILL.md +8 -26
- package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/aws-bootstrap.mjs +89 -117
- package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/config-files.mjs +42 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/config-layers.mjs +139 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/materialize-secrets.mjs +138 -125
- package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/preflight-secrets.mjs +98 -10
- package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/providers.mjs +24 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/routing-floor.mjs +21 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/surfaces.mjs +111 -36
- package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/task-access.mjs +205 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/task-action.mjs +218 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/task-atlassian-native.mjs +181 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/task-context-data.mjs +75 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/task-context-write.mjs +158 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/task-github.mjs +92 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/task-intake-read.mjs +171 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/task-intake.mjs +155 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/task-native-context.mjs +71 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/task-native-contract.mjs +156 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/task-native-flow.mjs +253 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/task-native-lifecycle.mjs +106 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/task-native-state.mjs +171 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/task-readiness.mjs +347 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/task-requirements.mjs +279 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/task-tracker-intake.mjs +463 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/validate-config.mjs +2 -21
- package/plugins/lisa/.codex-plugin/skills/lisa-setup-linear/SKILL.md +2 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-setup-remote-aws/SKILL.md +8 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-task-decomposition/SKILL.md +1 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-track/SKILL.md +13 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-tracker-claim/SKILL.md +2 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-verify/SKILL.md +4 -1
- package/plugins/lisa/hooks/inject-resolved-config.mjs +235 -3
- package/plugins/lisa/hooks/secrets-preflight.agy.sh +19 -0
- package/plugins/lisa/hooks/secrets-preflight.sh +42 -0
- package/plugins/lisa/hooks/task-readiness-guard.mjs +96 -0
- package/plugins/lisa/hooks/task-readiness-guard.sh +54 -0
- package/plugins/lisa/rules/eager/coding-philosophy.md +7 -6
- package/plugins/lisa/rules/reference/coding-philosophy.md +48 -0
- package/plugins/lisa/rules/reference/config-resolution.md +4 -1
- package/plugins/lisa/rules/reference/intent-routing.md +2 -2
- package/plugins/lisa/rules/reference/tool-access-gate.md +160 -0
- package/plugins/lisa/rules/reference/tracked-work.md +2 -0
- package/plugins/lisa/rules/reference/work-item-definition-of-ready.md +31 -0
- package/plugins/lisa/scripts/install-remote-agent-aws.mjs +3 -2
- package/plugins/lisa/scripts/remote-agent-aws-setup.sh +123 -10
- package/plugins/lisa/skills/lisa-atlassian-access/SKILL.md +13 -0
- package/plugins/lisa/skills/lisa-configure/SKILL.md +19 -7
- package/plugins/lisa/skills/lisa-doctor/SKILL.md +10 -0
- package/plugins/lisa/skills/lisa-drive-pr-to-merge/SKILL.md +9 -0
- package/plugins/lisa/skills/lisa-git-submit-pr/SKILL.md +1 -0
- package/plugins/lisa/skills/lisa-github-build-intake/SKILL.md +2 -0
- package/plugins/lisa/skills/lisa-github-claim/SKILL.md +2 -0
- package/plugins/lisa/skills/lisa-github-read-issue/SKILL.md +29 -0
- package/plugins/lisa/skills/lisa-github-read-issue/read-contract.mjs +70 -0
- package/plugins/lisa/skills/lisa-github-validate-issue/SKILL.md +27 -1
- package/plugins/lisa/skills/lisa-github-write-issue/SKILL.md +23 -0
- package/plugins/lisa/skills/lisa-implement/SKILL.md +15 -2
- package/plugins/lisa/skills/lisa-jira-build-intake/SKILL.md +2 -0
- package/plugins/lisa/skills/lisa-jira-claim/SKILL.md +2 -0
- package/plugins/lisa/skills/lisa-jira-read-ticket/SKILL.md +9 -0
- package/plugins/lisa/skills/lisa-jira-validate-ticket/SKILL.md +27 -1
- package/plugins/lisa/skills/lisa-jira-write-ticket/SKILL.md +23 -0
- package/plugins/lisa/skills/lisa-linear-access/SKILL.md +102 -103
- package/plugins/lisa/skills/lisa-linear-access/scripts/linear-graphql.sh +428 -0
- package/plugins/lisa/skills/lisa-linear-build-intake/SKILL.md +2 -0
- package/plugins/lisa/skills/lisa-linear-claim/SKILL.md +3 -1
- package/plugins/lisa/skills/lisa-linear-read-issue/SKILL.md +13 -0
- package/plugins/lisa/skills/lisa-linear-validate-issue/SKILL.md +26 -0
- package/plugins/lisa/skills/lisa-linear-write-issue/SKILL.md +27 -0
- package/plugins/lisa/skills/lisa-notion-access/SKILL.md +37 -0
- package/plugins/lisa/skills/lisa-notion-access/scripts/readiness-probe.mjs +83 -0
- package/plugins/lisa/skills/lisa-secrets-access/SKILL.md +8 -26
- package/plugins/lisa/skills/lisa-secrets-access/scripts/aws-bootstrap.mjs +89 -117
- package/plugins/lisa/skills/lisa-secrets-access/scripts/config-files.mjs +42 -0
- package/plugins/lisa/skills/lisa-secrets-access/scripts/config-layers.mjs +139 -0
- package/plugins/lisa/skills/lisa-secrets-access/scripts/materialize-secrets.mjs +138 -125
- package/plugins/lisa/skills/lisa-secrets-access/scripts/preflight-secrets.mjs +98 -10
- package/plugins/lisa/skills/lisa-secrets-access/scripts/providers.mjs +24 -1
- package/plugins/lisa/skills/lisa-secrets-access/scripts/routing-floor.mjs +21 -0
- package/plugins/lisa/skills/lisa-secrets-access/scripts/surfaces.mjs +111 -36
- package/plugins/lisa/skills/lisa-secrets-access/scripts/task-access.mjs +205 -0
- package/plugins/lisa/skills/lisa-secrets-access/scripts/task-action.mjs +218 -0
- package/plugins/lisa/skills/lisa-secrets-access/scripts/task-atlassian-native.mjs +181 -0
- package/plugins/lisa/skills/lisa-secrets-access/scripts/task-context-data.mjs +75 -0
- package/plugins/lisa/skills/lisa-secrets-access/scripts/task-context-write.mjs +158 -0
- package/plugins/lisa/skills/lisa-secrets-access/scripts/task-github.mjs +92 -0
- package/plugins/lisa/skills/lisa-secrets-access/scripts/task-intake-read.mjs +171 -0
- package/plugins/lisa/skills/lisa-secrets-access/scripts/task-intake.mjs +155 -0
- package/plugins/lisa/skills/lisa-secrets-access/scripts/task-native-context.mjs +71 -0
- package/plugins/lisa/skills/lisa-secrets-access/scripts/task-native-contract.mjs +156 -0
- package/plugins/lisa/skills/lisa-secrets-access/scripts/task-native-flow.mjs +253 -0
- package/plugins/lisa/skills/lisa-secrets-access/scripts/task-native-lifecycle.mjs +106 -0
- package/plugins/lisa/skills/lisa-secrets-access/scripts/task-native-state.mjs +171 -0
- package/plugins/lisa/skills/lisa-secrets-access/scripts/task-readiness.mjs +347 -0
- package/plugins/lisa/skills/lisa-secrets-access/scripts/task-requirements.mjs +279 -0
- package/plugins/lisa/skills/lisa-secrets-access/scripts/task-tracker-intake.mjs +463 -0
- package/plugins/lisa/skills/lisa-secrets-access/scripts/validate-config.mjs +2 -21
- package/plugins/lisa/skills/lisa-setup-linear/SKILL.md +2 -0
- package/plugins/lisa/skills/lisa-setup-remote-aws/SKILL.md +8 -0
- package/plugins/lisa/skills/lisa-task-decomposition/SKILL.md +1 -0
- package/plugins/lisa/skills/lisa-track/SKILL.md +13 -1
- package/plugins/lisa/skills/lisa-tracker-claim/SKILL.md +2 -0
- package/plugins/lisa/skills/lisa-verify/SKILL.md +4 -1
- package/plugins/lisa-agy/hooks/secrets-preflight.agy.sh +19 -0
- package/plugins/lisa-agy/hooks/secrets-preflight.sh +114 -0
- package/plugins/lisa-agy/hooks.json +13 -0
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-agy/scripts/install-remote-agent-aws.mjs +3 -2
- package/plugins/lisa-agy/scripts/remote-agent-aws-setup.sh +123 -10
- package/plugins/lisa-agy/skills/lisa-atlassian-access/SKILL.md +13 -0
- package/plugins/lisa-agy/skills/lisa-configure/SKILL.md +19 -7
- package/plugins/lisa-agy/skills/lisa-doctor/SKILL.md +10 -0
- package/plugins/lisa-agy/skills/lisa-drive-pr-to-merge/SKILL.md +9 -0
- package/plugins/lisa-agy/skills/lisa-git-submit-pr/SKILL.md +1 -0
- package/plugins/lisa-agy/skills/lisa-github-build-intake/SKILL.md +2 -0
- package/plugins/lisa-agy/skills/lisa-github-claim/SKILL.md +2 -0
- package/plugins/lisa-agy/skills/lisa-github-read-issue/SKILL.md +29 -0
- package/plugins/lisa-agy/skills/lisa-github-read-issue/read-contract.mjs +70 -0
- package/plugins/lisa-agy/skills/lisa-github-validate-issue/SKILL.md +27 -1
- package/plugins/lisa-agy/skills/lisa-github-write-issue/SKILL.md +23 -0
- package/plugins/lisa-agy/skills/lisa-implement/SKILL.md +15 -2
- package/plugins/lisa-agy/skills/lisa-jira-build-intake/SKILL.md +2 -0
- package/plugins/lisa-agy/skills/lisa-jira-claim/SKILL.md +2 -0
- package/plugins/lisa-agy/skills/lisa-jira-read-ticket/SKILL.md +9 -0
- package/plugins/lisa-agy/skills/lisa-jira-validate-ticket/SKILL.md +27 -1
- package/plugins/lisa-agy/skills/lisa-jira-write-ticket/SKILL.md +23 -0
- package/plugins/lisa-agy/skills/lisa-linear-access/SKILL.md +102 -103
- package/plugins/lisa-agy/skills/lisa-linear-access/scripts/linear-graphql.sh +428 -0
- package/plugins/lisa-agy/skills/lisa-linear-build-intake/SKILL.md +2 -0
- package/plugins/lisa-agy/skills/lisa-linear-claim/SKILL.md +3 -1
- package/plugins/lisa-agy/skills/lisa-linear-read-issue/SKILL.md +13 -0
- package/plugins/lisa-agy/skills/lisa-linear-validate-issue/SKILL.md +26 -0
- package/plugins/lisa-agy/skills/lisa-linear-write-issue/SKILL.md +27 -0
- package/plugins/lisa-agy/skills/lisa-notion-access/SKILL.md +37 -0
- package/plugins/lisa-agy/skills/lisa-notion-access/scripts/readiness-probe.mjs +83 -0
- package/plugins/lisa-agy/skills/lisa-secrets-access/SKILL.md +8 -26
- package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/aws-bootstrap.mjs +89 -117
- package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/config-files.mjs +42 -0
- package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/config-layers.mjs +139 -0
- package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/materialize-secrets.mjs +138 -125
- package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/preflight-secrets.mjs +98 -10
- package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/providers.mjs +24 -1
- package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/routing-floor.mjs +21 -0
- package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/surfaces.mjs +111 -36
- package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/task-access.mjs +205 -0
- package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/task-action.mjs +218 -0
- package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/task-atlassian-native.mjs +181 -0
- package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/task-context-data.mjs +75 -0
- package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/task-context-write.mjs +158 -0
- package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/task-github.mjs +92 -0
- package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/task-intake-read.mjs +171 -0
- package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/task-intake.mjs +155 -0
- package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/task-native-context.mjs +71 -0
- package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/task-native-contract.mjs +156 -0
- package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/task-native-flow.mjs +253 -0
- package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/task-native-lifecycle.mjs +106 -0
- package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/task-native-state.mjs +171 -0
- package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/task-readiness.mjs +347 -0
- package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/task-requirements.mjs +279 -0
- package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/task-tracker-intake.mjs +463 -0
- package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/validate-config.mjs +2 -21
- package/plugins/lisa-agy/skills/lisa-setup-linear/SKILL.md +2 -0
- package/plugins/lisa-agy/skills/lisa-setup-remote-aws/SKILL.md +8 -0
- package/plugins/lisa-agy/skills/lisa-task-decomposition/SKILL.md +1 -0
- package/plugins/lisa-agy/skills/lisa-track/SKILL.md +13 -1
- package/plugins/lisa-agy/skills/lisa-tracker-claim/SKILL.md +2 -0
- package/plugins/lisa-agy/skills/lisa-verify/SKILL.md +4 -1
- 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 +49 -2
- package/plugins/lisa-copilot/hooks/inject-resolved-config.mjs +235 -3
- package/plugins/lisa-copilot/hooks/secrets-preflight.sh +42 -0
- package/plugins/lisa-copilot/hooks/task-readiness-guard.mjs +96 -0
- package/plugins/lisa-copilot/hooks/task-readiness-guard.sh +54 -0
- package/plugins/lisa-copilot/rules/eager/coding-philosophy.md +7 -6
- package/plugins/lisa-copilot/rules/reference/coding-philosophy.md +48 -0
- package/plugins/lisa-copilot/rules/reference/config-resolution.md +4 -1
- package/plugins/lisa-copilot/rules/reference/intent-routing.md +2 -2
- package/plugins/lisa-copilot/rules/reference/tool-access-gate.md +160 -0
- package/plugins/lisa-copilot/rules/reference/tracked-work.md +2 -0
- package/plugins/lisa-copilot/rules/reference/work-item-definition-of-ready.md +31 -0
- package/plugins/lisa-copilot/scripts/install-remote-agent-aws.mjs +3 -2
- package/plugins/lisa-copilot/scripts/remote-agent-aws-setup.sh +123 -10
- package/plugins/lisa-copilot/skills/lisa-atlassian-access/SKILL.md +13 -0
- package/plugins/lisa-copilot/skills/lisa-configure/SKILL.md +19 -7
- package/plugins/lisa-copilot/skills/lisa-doctor/SKILL.md +10 -0
- package/plugins/lisa-copilot/skills/lisa-drive-pr-to-merge/SKILL.md +9 -0
- package/plugins/lisa-copilot/skills/lisa-git-submit-pr/SKILL.md +1 -0
- package/plugins/lisa-copilot/skills/lisa-github-build-intake/SKILL.md +2 -0
- package/plugins/lisa-copilot/skills/lisa-github-claim/SKILL.md +2 -0
- package/plugins/lisa-copilot/skills/lisa-github-read-issue/SKILL.md +29 -0
- package/plugins/lisa-copilot/skills/lisa-github-read-issue/read-contract.mjs +70 -0
- package/plugins/lisa-copilot/skills/lisa-github-validate-issue/SKILL.md +27 -1
- package/plugins/lisa-copilot/skills/lisa-github-write-issue/SKILL.md +23 -0
- package/plugins/lisa-copilot/skills/lisa-implement/SKILL.md +15 -2
- package/plugins/lisa-copilot/skills/lisa-jira-build-intake/SKILL.md +2 -0
- package/plugins/lisa-copilot/skills/lisa-jira-claim/SKILL.md +2 -0
- package/plugins/lisa-copilot/skills/lisa-jira-read-ticket/SKILL.md +9 -0
- package/plugins/lisa-copilot/skills/lisa-jira-validate-ticket/SKILL.md +27 -1
- package/plugins/lisa-copilot/skills/lisa-jira-write-ticket/SKILL.md +23 -0
- package/plugins/lisa-copilot/skills/lisa-linear-access/SKILL.md +102 -103
- package/plugins/lisa-copilot/skills/lisa-linear-access/scripts/linear-graphql.sh +428 -0
- package/plugins/lisa-copilot/skills/lisa-linear-build-intake/SKILL.md +2 -0
- package/plugins/lisa-copilot/skills/lisa-linear-claim/SKILL.md +3 -1
- package/plugins/lisa-copilot/skills/lisa-linear-read-issue/SKILL.md +13 -0
- package/plugins/lisa-copilot/skills/lisa-linear-validate-issue/SKILL.md +26 -0
- package/plugins/lisa-copilot/skills/lisa-linear-write-issue/SKILL.md +27 -0
- package/plugins/lisa-copilot/skills/lisa-notion-access/SKILL.md +37 -0
- package/plugins/lisa-copilot/skills/lisa-notion-access/scripts/readiness-probe.mjs +83 -0
- package/plugins/lisa-copilot/skills/lisa-secrets-access/SKILL.md +8 -26
- package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/aws-bootstrap.mjs +89 -117
- package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/config-files.mjs +42 -0
- package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/config-layers.mjs +139 -0
- package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/materialize-secrets.mjs +138 -125
- package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/preflight-secrets.mjs +98 -10
- package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/providers.mjs +24 -1
- package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/routing-floor.mjs +21 -0
- package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/surfaces.mjs +111 -36
- package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/task-access.mjs +205 -0
- package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/task-action.mjs +218 -0
- package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/task-atlassian-native.mjs +181 -0
- package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/task-context-data.mjs +75 -0
- package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/task-context-write.mjs +158 -0
- package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/task-github.mjs +92 -0
- package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/task-intake-read.mjs +171 -0
- package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/task-intake.mjs +155 -0
- package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/task-native-context.mjs +71 -0
- package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/task-native-contract.mjs +156 -0
- package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/task-native-flow.mjs +253 -0
- package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/task-native-lifecycle.mjs +106 -0
- package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/task-native-state.mjs +171 -0
- package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/task-readiness.mjs +347 -0
- package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/task-requirements.mjs +279 -0
- package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/task-tracker-intake.mjs +463 -0
- package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/validate-config.mjs +2 -21
- package/plugins/lisa-copilot/skills/lisa-setup-linear/SKILL.md +2 -0
- package/plugins/lisa-copilot/skills/lisa-setup-remote-aws/SKILL.md +8 -0
- package/plugins/lisa-copilot/skills/lisa-task-decomposition/SKILL.md +1 -0
- package/plugins/lisa-copilot/skills/lisa-track/SKILL.md +13 -1
- package/plugins/lisa-copilot/skills/lisa-tracker-claim/SKILL.md +2 -0
- package/plugins/lisa-copilot/skills/lisa-verify/SKILL.md +4 -1
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/hooks/hooks.json +18 -1
- package/plugins/lisa-cursor/hooks/inject-resolved-config.mjs +235 -3
- package/plugins/lisa-cursor/hooks/secrets-preflight.sh +42 -0
- package/plugins/lisa-cursor/hooks/task-readiness-guard.mjs +96 -0
- package/plugins/lisa-cursor/hooks/task-readiness-guard.sh +54 -0
- package/plugins/lisa-cursor/rules/coding-philosophy-reference.mdc +48 -0
- package/plugins/lisa-cursor/rules/coding-philosophy.mdc +7 -6
- package/plugins/lisa-cursor/rules/config-resolution-reference.mdc +4 -1
- package/plugins/lisa-cursor/rules/intent-routing-reference.mdc +2 -2
- package/plugins/lisa-cursor/rules/tool-access-gate-reference.mdc +160 -0
- package/plugins/lisa-cursor/rules/tracked-work-reference.mdc +2 -0
- package/plugins/lisa-cursor/rules/work-item-definition-of-ready-reference.mdc +31 -0
- package/plugins/lisa-cursor/scripts/install-remote-agent-aws.mjs +3 -2
- package/plugins/lisa-cursor/scripts/remote-agent-aws-setup.sh +123 -10
- package/plugins/lisa-cursor/skills/lisa-atlassian-access/SKILL.md +13 -0
- package/plugins/lisa-cursor/skills/lisa-configure/SKILL.md +19 -7
- package/plugins/lisa-cursor/skills/lisa-doctor/SKILL.md +10 -0
- package/plugins/lisa-cursor/skills/lisa-drive-pr-to-merge/SKILL.md +9 -0
- package/plugins/lisa-cursor/skills/lisa-git-submit-pr/SKILL.md +1 -0
- package/plugins/lisa-cursor/skills/lisa-github-build-intake/SKILL.md +2 -0
- package/plugins/lisa-cursor/skills/lisa-github-claim/SKILL.md +2 -0
- package/plugins/lisa-cursor/skills/lisa-github-read-issue/SKILL.md +29 -0
- package/plugins/lisa-cursor/skills/lisa-github-read-issue/read-contract.mjs +70 -0
- package/plugins/lisa-cursor/skills/lisa-github-validate-issue/SKILL.md +27 -1
- package/plugins/lisa-cursor/skills/lisa-github-write-issue/SKILL.md +23 -0
- package/plugins/lisa-cursor/skills/lisa-implement/SKILL.md +15 -2
- package/plugins/lisa-cursor/skills/lisa-jira-build-intake/SKILL.md +2 -0
- package/plugins/lisa-cursor/skills/lisa-jira-claim/SKILL.md +2 -0
- package/plugins/lisa-cursor/skills/lisa-jira-read-ticket/SKILL.md +9 -0
- package/plugins/lisa-cursor/skills/lisa-jira-validate-ticket/SKILL.md +27 -1
- package/plugins/lisa-cursor/skills/lisa-jira-write-ticket/SKILL.md +23 -0
- package/plugins/lisa-cursor/skills/lisa-linear-access/SKILL.md +102 -103
- package/plugins/lisa-cursor/skills/lisa-linear-access/scripts/linear-graphql.sh +428 -0
- package/plugins/lisa-cursor/skills/lisa-linear-build-intake/SKILL.md +2 -0
- package/plugins/lisa-cursor/skills/lisa-linear-claim/SKILL.md +3 -1
- package/plugins/lisa-cursor/skills/lisa-linear-read-issue/SKILL.md +13 -0
- package/plugins/lisa-cursor/skills/lisa-linear-validate-issue/SKILL.md +26 -0
- package/plugins/lisa-cursor/skills/lisa-linear-write-issue/SKILL.md +27 -0
- package/plugins/lisa-cursor/skills/lisa-notion-access/SKILL.md +37 -0
- package/plugins/lisa-cursor/skills/lisa-notion-access/scripts/readiness-probe.mjs +83 -0
- package/plugins/lisa-cursor/skills/lisa-secrets-access/SKILL.md +8 -26
- package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/aws-bootstrap.mjs +89 -117
- package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/config-files.mjs +42 -0
- package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/config-layers.mjs +139 -0
- package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/materialize-secrets.mjs +138 -125
- package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/preflight-secrets.mjs +98 -10
- package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/providers.mjs +24 -1
- package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/routing-floor.mjs +21 -0
- package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/surfaces.mjs +111 -36
- package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/task-access.mjs +205 -0
- package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/task-action.mjs +218 -0
- package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/task-atlassian-native.mjs +181 -0
- package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/task-context-data.mjs +75 -0
- package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/task-context-write.mjs +158 -0
- package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/task-github.mjs +92 -0
- package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/task-intake-read.mjs +171 -0
- package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/task-intake.mjs +155 -0
- package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/task-native-context.mjs +71 -0
- package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/task-native-contract.mjs +156 -0
- package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/task-native-flow.mjs +253 -0
- package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/task-native-lifecycle.mjs +106 -0
- package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/task-native-state.mjs +171 -0
- package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/task-readiness.mjs +347 -0
- package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/task-requirements.mjs +279 -0
- package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/task-tracker-intake.mjs +463 -0
- package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/validate-config.mjs +2 -21
- package/plugins/lisa-cursor/skills/lisa-setup-linear/SKILL.md +2 -0
- package/plugins/lisa-cursor/skills/lisa-setup-remote-aws/SKILL.md +8 -0
- package/plugins/lisa-cursor/skills/lisa-task-decomposition/SKILL.md +1 -0
- package/plugins/lisa-cursor/skills/lisa-track/SKILL.md +13 -1
- package/plugins/lisa-cursor/skills/lisa-tracker-claim/SKILL.md +2 -0
- package/plugins/lisa-cursor/skills/lisa-verify/SKILL.md +4 -1
- 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/inject-resolved-config.mjs +235 -3
- package/plugins/lisa-devin/hooks/secrets-preflight.sh +42 -0
- package/plugins/lisa-devin/hooks/task-readiness-guard.mjs +96 -0
- package/plugins/lisa-devin/hooks/task-readiness-guard.sh +54 -0
- package/plugins/lisa-devin/hooks.json +43 -1
- package/plugins/lisa-devin/rules/eager/coding-philosophy.md +7 -6
- package/plugins/lisa-devin/rules/reference/coding-philosophy.md +48 -0
- package/plugins/lisa-devin/rules/reference/config-resolution.md +4 -1
- package/plugins/lisa-devin/rules/reference/intent-routing.md +2 -2
- package/plugins/lisa-devin/rules/reference/tool-access-gate.md +160 -0
- package/plugins/lisa-devin/rules/reference/tracked-work.md +2 -0
- package/plugins/lisa-devin/rules/reference/work-item-definition-of-ready.md +31 -0
- package/plugins/lisa-devin/scripts/install-remote-agent-aws.mjs +3 -2
- package/plugins/lisa-devin/scripts/remote-agent-aws-setup.sh +123 -10
- package/plugins/lisa-devin/skills/lisa-atlassian-access/SKILL.md +13 -0
- package/plugins/lisa-devin/skills/lisa-configure/SKILL.md +19 -7
- package/plugins/lisa-devin/skills/lisa-doctor/SKILL.md +10 -0
- package/plugins/lisa-devin/skills/lisa-drive-pr-to-merge/SKILL.md +9 -0
- package/plugins/lisa-devin/skills/lisa-git-submit-pr/SKILL.md +1 -0
- package/plugins/lisa-devin/skills/lisa-github-build-intake/SKILL.md +2 -0
- package/plugins/lisa-devin/skills/lisa-github-claim/SKILL.md +2 -0
- package/plugins/lisa-devin/skills/lisa-github-read-issue/SKILL.md +29 -0
- package/plugins/lisa-devin/skills/lisa-github-read-issue/read-contract.mjs +70 -0
- package/plugins/lisa-devin/skills/lisa-github-validate-issue/SKILL.md +27 -1
- package/plugins/lisa-devin/skills/lisa-github-write-issue/SKILL.md +23 -0
- package/plugins/lisa-devin/skills/lisa-implement/SKILL.md +15 -2
- package/plugins/lisa-devin/skills/lisa-jira-build-intake/SKILL.md +2 -0
- package/plugins/lisa-devin/skills/lisa-jira-claim/SKILL.md +2 -0
- package/plugins/lisa-devin/skills/lisa-jira-read-ticket/SKILL.md +9 -0
- package/plugins/lisa-devin/skills/lisa-jira-validate-ticket/SKILL.md +27 -1
- package/plugins/lisa-devin/skills/lisa-jira-write-ticket/SKILL.md +23 -0
- package/plugins/lisa-devin/skills/lisa-linear-access/SKILL.md +102 -103
- package/plugins/lisa-devin/skills/lisa-linear-access/scripts/linear-graphql.sh +428 -0
- package/plugins/lisa-devin/skills/lisa-linear-build-intake/SKILL.md +2 -0
- package/plugins/lisa-devin/skills/lisa-linear-claim/SKILL.md +3 -1
- package/plugins/lisa-devin/skills/lisa-linear-read-issue/SKILL.md +13 -0
- package/plugins/lisa-devin/skills/lisa-linear-validate-issue/SKILL.md +26 -0
- package/plugins/lisa-devin/skills/lisa-linear-write-issue/SKILL.md +27 -0
- package/plugins/lisa-devin/skills/lisa-notion-access/SKILL.md +37 -0
- package/plugins/lisa-devin/skills/lisa-notion-access/scripts/readiness-probe.mjs +83 -0
- package/plugins/lisa-devin/skills/lisa-secrets-access/SKILL.md +8 -26
- package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/aws-bootstrap.mjs +89 -117
- package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/config-files.mjs +42 -0
- package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/config-layers.mjs +139 -0
- package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/materialize-secrets.mjs +138 -125
- package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/preflight-secrets.mjs +98 -10
- package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/providers.mjs +24 -1
- package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/routing-floor.mjs +21 -0
- package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/surfaces.mjs +111 -36
- package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/task-access.mjs +205 -0
- package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/task-action.mjs +218 -0
- package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/task-atlassian-native.mjs +181 -0
- package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/task-context-data.mjs +75 -0
- package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/task-context-write.mjs +158 -0
- package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/task-github.mjs +92 -0
- package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/task-intake-read.mjs +171 -0
- package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/task-intake.mjs +155 -0
- package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/task-native-context.mjs +71 -0
- package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/task-native-contract.mjs +156 -0
- package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/task-native-flow.mjs +253 -0
- package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/task-native-lifecycle.mjs +106 -0
- package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/task-native-state.mjs +171 -0
- package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/task-readiness.mjs +347 -0
- package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/task-requirements.mjs +279 -0
- package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/task-tracker-intake.mjs +463 -0
- package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/validate-config.mjs +2 -21
- package/plugins/lisa-devin/skills/lisa-setup-linear/SKILL.md +2 -0
- package/plugins/lisa-devin/skills/lisa-setup-remote-aws/SKILL.md +8 -0
- package/plugins/lisa-devin/skills/lisa-task-decomposition/SKILL.md +1 -0
- package/plugins/lisa-devin/skills/lisa-track/SKILL.md +13 -1
- package/plugins/lisa-devin/skills/lisa-tracker-claim/SKILL.md +2 -0
- package/plugins/lisa-devin/skills/lisa-verify/SKILL.md +4 -1
- 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-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/materialized-artifacts.json +2 -0
- package/plugins/src/base/.claude-plugin/plugin.json +25 -1
- package/plugins/src/base/hooks/inject-resolved-config.mjs +235 -3
- package/plugins/src/base/hooks/secrets-preflight.agy.sh +19 -0
- package/plugins/src/base/hooks/secrets-preflight.sh +42 -0
- package/plugins/src/base/hooks/task-readiness-guard.mjs +96 -0
- package/plugins/src/base/hooks/task-readiness-guard.sh +51 -0
- package/plugins/src/base/rules/eager/coding-philosophy.md +7 -6
- package/plugins/src/base/rules/reference/coding-philosophy.md +48 -0
- package/plugins/src/base/rules/reference/config-resolution.md +4 -1
- package/plugins/src/base/rules/reference/intent-routing.md +2 -2
- package/plugins/src/base/rules/reference/tool-access-gate.md +160 -0
- package/plugins/src/base/rules/reference/tracked-work.md +2 -0
- package/plugins/src/base/rules/reference/work-item-definition-of-ready.md +31 -0
- package/plugins/src/base/scripts/install-remote-agent-aws.mjs +3 -2
- package/plugins/src/base/scripts/remote-agent-aws-setup.sh +123 -10
- package/plugins/src/base/skills/lisa-atlassian-access/SKILL.md +13 -0
- package/plugins/src/base/skills/lisa-configure/SKILL.md +19 -7
- package/plugins/src/base/skills/lisa-doctor/SKILL.md +10 -0
- package/plugins/src/base/skills/lisa-drive-pr-to-merge/SKILL.md +9 -0
- package/plugins/src/base/skills/lisa-git-submit-pr/SKILL.md +1 -0
- package/plugins/src/base/skills/lisa-github-build-intake/SKILL.md +2 -0
- package/plugins/src/base/skills/lisa-github-claim/SKILL.md +2 -0
- package/plugins/src/base/skills/lisa-github-read-issue/SKILL.md +29 -0
- package/plugins/src/base/skills/lisa-github-read-issue/read-contract.mjs +70 -0
- package/plugins/src/base/skills/lisa-github-validate-issue/SKILL.md +27 -1
- package/plugins/src/base/skills/lisa-github-write-issue/SKILL.md +23 -0
- package/plugins/src/base/skills/lisa-implement/SKILL.md +15 -2
- package/plugins/src/base/skills/lisa-jira-build-intake/SKILL.md +2 -0
- package/plugins/src/base/skills/lisa-jira-claim/SKILL.md +2 -0
- package/plugins/src/base/skills/lisa-jira-read-ticket/SKILL.md +9 -0
- package/plugins/src/base/skills/lisa-jira-validate-ticket/SKILL.md +27 -1
- package/plugins/src/base/skills/lisa-jira-write-ticket/SKILL.md +23 -0
- package/plugins/src/base/skills/lisa-linear-access/SKILL.md +102 -103
- package/plugins/src/base/skills/lisa-linear-access/scripts/linear-graphql.sh +428 -0
- package/plugins/src/base/skills/lisa-linear-build-intake/SKILL.md +2 -0
- package/plugins/src/base/skills/lisa-linear-claim/SKILL.md +3 -1
- package/plugins/src/base/skills/lisa-linear-read-issue/SKILL.md +13 -0
- package/plugins/src/base/skills/lisa-linear-validate-issue/SKILL.md +26 -0
- package/plugins/src/base/skills/lisa-linear-write-issue/SKILL.md +27 -0
- package/plugins/src/base/skills/lisa-notion-access/SKILL.md +37 -0
- package/plugins/src/base/skills/lisa-notion-access/scripts/readiness-probe.mjs +83 -0
- package/plugins/src/base/skills/lisa-secrets-access/SKILL.md +8 -26
- package/plugins/src/base/skills/lisa-secrets-access/scripts/aws-bootstrap.mjs +89 -117
- package/plugins/src/base/skills/lisa-secrets-access/scripts/config-files.mjs +42 -0
- package/plugins/src/base/skills/lisa-secrets-access/scripts/config-layers.mjs +139 -0
- package/plugins/src/base/skills/lisa-secrets-access/scripts/materialize-secrets.mjs +138 -125
- package/plugins/src/base/skills/lisa-secrets-access/scripts/preflight-secrets.mjs +98 -10
- package/plugins/src/base/skills/lisa-secrets-access/scripts/providers.mjs +24 -1
- package/plugins/src/base/skills/lisa-secrets-access/scripts/routing-floor.mjs +21 -0
- package/plugins/src/base/skills/lisa-secrets-access/scripts/surfaces.mjs +111 -36
- package/plugins/src/base/skills/lisa-secrets-access/scripts/task-access.mjs +205 -0
- package/plugins/src/base/skills/lisa-secrets-access/scripts/task-action.mjs +218 -0
- package/plugins/src/base/skills/lisa-secrets-access/scripts/task-atlassian-native.mjs +181 -0
- package/plugins/src/base/skills/lisa-secrets-access/scripts/task-context-data.mjs +75 -0
- package/plugins/src/base/skills/lisa-secrets-access/scripts/task-context-write.mjs +158 -0
- package/plugins/src/base/skills/lisa-secrets-access/scripts/task-github.mjs +92 -0
- package/plugins/src/base/skills/lisa-secrets-access/scripts/task-intake-read.mjs +171 -0
- package/plugins/src/base/skills/lisa-secrets-access/scripts/task-intake.mjs +155 -0
- package/plugins/src/base/skills/lisa-secrets-access/scripts/task-native-context.mjs +71 -0
- package/plugins/src/base/skills/lisa-secrets-access/scripts/task-native-contract.mjs +156 -0
- package/plugins/src/base/skills/lisa-secrets-access/scripts/task-native-flow.mjs +253 -0
- package/plugins/src/base/skills/lisa-secrets-access/scripts/task-native-lifecycle.mjs +106 -0
- package/plugins/src/base/skills/lisa-secrets-access/scripts/task-native-state.mjs +171 -0
- package/plugins/src/base/skills/lisa-secrets-access/scripts/task-readiness.mjs +347 -0
- package/plugins/src/base/skills/lisa-secrets-access/scripts/task-requirements.mjs +279 -0
- package/plugins/src/base/skills/lisa-secrets-access/scripts/task-tracker-intake.mjs +463 -0
- package/plugins/src/base/skills/lisa-secrets-access/scripts/validate-config.mjs +2 -21
- package/plugins/src/base/skills/lisa-setup-linear/SKILL.md +2 -0
- package/plugins/src/base/skills/lisa-setup-remote-aws/SKILL.md +8 -0
- package/plugins/src/base/skills/lisa-task-decomposition/SKILL.md +1 -0
- package/plugins/src/base/skills/lisa-track/SKILL.md +13 -1
- package/plugins/src/base/skills/lisa-tracker-claim/SKILL.md +2 -0
- package/plugins/src/base/skills/lisa-verify/SKILL.md +4 -1
- package/scripts/build-plugins.sh +1 -1
- package/scripts/copy-opencode-plugin-templates.mjs +2 -0
- package/scripts/generate-agy-plugin-artifacts.mjs +8 -0
- package/scripts/lib/per-agent-hook-filter.mjs +1 -1
- package/scripts/lisa-enforcement-fallback.sh +3 -3
- package/scripts/lisa-enforcement-freshness.mjs +1 -0
- package/scripts/lisa-release-switch.mjs +9 -0
- package/scripts/two-channel-couplings.json +2 -2
- package/typescript/copy-overwrite/.prettierignore +2 -0
- package/typescript/create-only/.lisa/controls/proofs/lisa-typescript-code-style-slow.clean.patch +25 -0
- package/typescript/create-only/.lisa/controls/proofs/lisa-typescript-code-style-slow.violation.patch +28 -0
- package/typescript/create-only/.lisa/controls/proofs/lisa-typescript-code-style.clean.patch +13 -0
- package/typescript/create-only/.lisa/controls/proofs/lisa-typescript-code-style.violation.patch +13 -0
- package/typescript/create-only/.lisa/controls/proofs/lisa-typescript-coverage-adequacy.clean.patch +6 -0
- package/typescript/create-only/.lisa/controls/proofs/lisa-typescript-coverage-adequacy.violation.patch +7 -0
- package/typescript/create-only/.lisa/controls/proofs/lisa-typescript-dead-code.clean.patch +7 -0
- package/typescript/create-only/.lisa/controls/proofs/lisa-typescript-dead-code.violation.patch +7 -0
- package/typescript/create-only/.lisa/controls/proofs/lisa-typescript-dependency-vulnerability.clean.patch +6 -0
- package/typescript/create-only/.lisa/controls/proofs/lisa-typescript-dependency-vulnerability.violation.patch +6 -0
- package/typescript/create-only/.lisa/controls/proofs/lisa-typescript-format-conformance.clean.patch +8 -0
- package/typescript/create-only/.lisa/controls/proofs/lisa-typescript-format-conformance.violation.patch +7 -0
- package/typescript/create-only/.lisa/controls/proofs/lisa-typescript-structural-rules.clean.patch +14 -0
- package/typescript/create-only/.lisa/controls/proofs/lisa-typescript-structural-rules.violation.patch +14 -0
- package/typescript/create-only/.lisa/controls/proofs/lisa-typescript-test-correctness.clean.patch +10 -0
- package/typescript/create-only/.lisa/controls/proofs/lisa-typescript-test-correctness.violation.patch +10 -0
- package/typescript/create-only/.lisa/controls/proofs/lisa-typescript-test-integration.clean.patch +10 -0
- package/typescript/create-only/.lisa/controls/proofs/lisa-typescript-test-integration.violation.patch +10 -0
- package/typescript/create-only/.lisa/controls/proofs/lisa-typescript-traceability.clean.patch +6 -0
- package/typescript/create-only/.lisa/controls/proofs/lisa-typescript-traceability.violation.patch +6 -0
- package/typescript/create-only/.lisa/controls/proofs/lisa-typescript-type-correctness.clean.patch +10 -0
- package/typescript/create-only/.lisa/controls/proofs/lisa-typescript-type-correctness.violation.patch +10 -0
- package/typescript/package-lisa/package.lisa.json +2 -3
|
@@ -76,115 +76,107 @@ leads. If neither tier works, fail with:
|
|
|
76
76
|
Error: no Linear access substrate available. Authenticate the Linear MCP or set LINEAR_API_KEY.
|
|
77
77
|
```
|
|
78
78
|
|
|
79
|
-
## GraphQL Adapter
|
|
79
|
+
## GraphQL Adapter — run the script by path, never an inline command
|
|
80
|
+
|
|
81
|
+
The tier-1 transport is an executable that ships beside this file:
|
|
82
|
+
`scripts/linear-graphql.sh`. It:
|
|
83
|
+
|
|
84
|
+
- resolves `LINEAR_API_KEY` itself through `lisa-secrets-access`, with the
|
|
85
|
+
shared ladder: `LINEAR_API_KEY`, then the per-workspace
|
|
86
|
+
`LINEAR_API_KEY_<slug>`, then the trusted `resolve-secret.mjs` rungs
|
|
87
|
+
(`$CLAUDE_PLUGIN_ROOT`, `$PLUGIN_ROOT`, the installed package). When the host
|
|
88
|
+
exported no plugin root it offers the plugin copy the script itself ships in
|
|
89
|
+
as the `PLUGIN_ROOT` rung. Checkout-local resolvers are never executed;
|
|
90
|
+
- identity-matches the key (`viewer { organization { urlKey } }`, plus the
|
|
91
|
+
configured team when `linear.teamKey` is set) against `.lisa.config.json`
|
|
92
|
+
**before** sending the request, and sends nothing else when that fails;
|
|
93
|
+
- reads the query, and optionally the variables, from files or stdin;
|
|
94
|
+
- prints the Linear response body on stdout and diagnostics on stderr. It never
|
|
95
|
+
prints the key: the key is not echoed or traced (not even under `bash -x`),
|
|
96
|
+
and it is not in any process's argv, because curl reads the `Authorization`
|
|
97
|
+
header from a file descriptor.
|
|
98
|
+
|
|
99
|
+
**Never paste key capture and curl into one inline command**, for example
|
|
100
|
+
`K=$(node …/resolve-secret.mjs get LINEAR_API_KEY); curl … -H "Authorization: $K"`.
|
|
101
|
+
Claude Code asks for approval on a command that captures a secret and sends it to
|
|
102
|
+
an external host, even under `--dangerously-skip-permissions`. A background
|
|
103
|
+
worker has no one to answer that prompt, so it stalls until a human attaches.
|
|
104
|
+
The same code run from a file by absolute path does not prompt, which is why the
|
|
105
|
+
adapter is a file. Do not print the key to check it either: run `--whoami`.
|
|
106
|
+
|
|
107
|
+
### Locate the script once
|
|
108
|
+
|
|
109
|
+
The script is `scripts/linear-graphql.sh` inside this skill's own directory (the
|
|
110
|
+
folder that holds this `SKILL.md`; Claude Code prints it as the skill's base
|
|
111
|
+
directory when the skill loads). When you do not know that directory, resolve it
|
|
112
|
+
once:
|
|
80
113
|
|
|
81
|
-
|
|
114
|
+
```bash
|
|
115
|
+
LA="${CLAUDE_PLUGIN_ROOT:+$CLAUDE_PLUGIN_ROOT/skills/lisa-linear-access/scripts}"
|
|
116
|
+
[ -n "$LA" ] && [ -f "$LA/linear-graphql.sh" ] || LA="$(claude plugin list --json 2>/dev/null | node -e 'let s="";process.stdin.on("data",d=>{s+=d}).on("end",()=>{let l=[];try{l=JSON.parse(s)}catch{}const c=l.filter(p=>String(p.id).startsWith("lisa@"));const p=c.find(p=>p.projectPath===process.cwd())||c.find(p=>p.scope==="user");process.stdout.write(p?p.installPath:"")})')/skills/lisa-linear-access/scripts"
|
|
117
|
+
[ -f "$LA/linear-graphql.sh" ] || LA="$PWD/node_modules/@codyswann/lisa/plugins/lisa/skills/lisa-linear-access/scripts"
|
|
118
|
+
[ -f "$LA/linear-graphql.sh" ] || { echo "lisa-linear-access scripts not found" >&2; exit 1; }
|
|
119
|
+
echo "$LA"
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Then write the printed absolute path **literally** in every later command. Shell
|
|
123
|
+
variables do not survive between Bash calls, and Lisa's shell guards read the
|
|
124
|
+
file a command executes, so they refuse `bash "$LA/linear-graphql.sh"` as an
|
|
125
|
+
execution they cannot classify.
|
|
126
|
+
|
|
127
|
+
### Call it
|
|
128
|
+
|
|
129
|
+
Write the GraphQL document to a file first (with the file-writing tool, not an
|
|
130
|
+
inline `echo`), then run:
|
|
82
131
|
|
|
83
132
|
```bash
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
# is also what left `/lisa:setup:linear` reading an OS keychain directly with
|
|
88
|
-
# nowhere to migrate to. Mirrors `atlassian-access` and `notion-access`.
|
|
89
|
-
read_linear_key() { # $1=workspace slug; defaults to $WORKSPACE read from config
|
|
90
|
-
[ -n "${LINEAR_API_KEY:-}" ] && { echo "$LINEAR_API_KEY"; return; }
|
|
91
|
-
|
|
92
|
-
# Per-workspace rung, matching `atlassian-access` and `notion-access` — and
|
|
93
|
-
# matching what `setup-linear` has always told the reader to export. This
|
|
94
|
-
# copy lacked it, so a key set the documented way validated during setup (the
|
|
95
|
-
# setup skill reads it) and was then ignored by every real Linear call, which
|
|
96
|
-
# silently fell through to whatever other credential it found. Nothing
|
|
97
|
-
# errored; the operation just ran as a different identity. The rung is also
|
|
98
|
-
# load-bearing headlessly: `analyze-claude-remote` reports Linear's env as
|
|
99
|
-
# `LINEAR_API_KEY` "or per-account `LINEAR_API_KEY_<ws-slug>`", and
|
|
100
|
-
# `generate-claude-remote-build-script` emits that suffixed name into cloud
|
|
101
|
-
# routine env templates — so a routine provisioned from those skills had no
|
|
102
|
-
# reachable key at all.
|
|
103
|
-
#
|
|
104
|
-
# An unset variable changes nothing: an empty workspace skips the rung
|
|
105
|
-
# entirely and the ladder below runs exactly as it did before.
|
|
106
|
-
local ws="${1:-${WORKSPACE:-}}"
|
|
107
|
-
if [ -n "$ws" ]; then
|
|
108
|
-
local slug; slug=$(echo "$ws" | tr '[:upper:]-' '[:lower:]_')
|
|
109
|
-
# Constrain the slug before it reaches `${!varname}`. Indirect expansion
|
|
110
|
-
# evaluates an array subscript, so a workspace carrying `[$(...)]` would
|
|
111
|
-
# RUN that command here — and `tr` above only folds case and dashes, it
|
|
112
|
-
# strips nothing. The slug's source is `.lisa.config.json`, which is
|
|
113
|
-
# repository-controlled input: exactly what this ladder already refuses to
|
|
114
|
-
# trust when it picks resolvers. A real workspace slug is lowercase
|
|
115
|
-
# alphanumerics and underscores, so anything else is not a slug we should
|
|
116
|
-
# be expanding — skip the rung and fall through rather than guessing.
|
|
117
|
-
case "$slug" in
|
|
118
|
-
""|*[!a-z0-9_]*) ;;
|
|
119
|
-
*)
|
|
120
|
-
local varname="LINEAR_API_KEY_${slug}"
|
|
121
|
-
[ -n "${!varname:-}" ] && { echo "${!varname}"; return; }
|
|
122
|
-
;;
|
|
123
|
-
esac
|
|
124
|
-
fi
|
|
125
|
-
|
|
126
|
-
# The ladder is ordered across trusted machine-managed substrates and ends at
|
|
127
|
-
# the installed package. Checkout-local paths are deliberately absent: a
|
|
128
|
-
# familiar generated destination is still repository-controlled executable
|
|
129
|
-
# code. The plugin rungs are the floor: `resolve-secret.mjs`
|
|
130
|
-
# ships beside this skill, so a rung pointing at it is reachable from
|
|
131
|
-
# anywhere the plugin itself is installed. Without one, a repo that vendors
|
|
132
|
-
# none of the leading paths has no route to the key at all — which is what
|
|
133
|
-
# every consumer of this skill in a `.opencode`-layout repository actually
|
|
134
|
-
# hit, and why agents started improvising their own key lookups.
|
|
135
|
-
# Execute only machine-managed plugin/package resolvers. Checkout-local
|
|
136
|
-
# candidates are repository-controlled code, not trusted merely by path.
|
|
137
|
-
local candidates=()
|
|
138
|
-
if [ -n "${CLAUDE_PLUGIN_ROOT:-}" ]; then
|
|
139
|
-
candidates+=("$CLAUDE_PLUGIN_ROOT/skills/lisa-secrets-access/scripts/resolve-secret.mjs")
|
|
140
|
-
fi
|
|
141
|
-
if [ -n "${PLUGIN_ROOT:-}" ]; then
|
|
142
|
-
candidates+=("$PLUGIN_ROOT/skills/lisa-secrets-access/scripts/resolve-secret.mjs")
|
|
143
|
-
fi
|
|
144
|
-
# Last rung deliberately needs no environment variable: an agent that was
|
|
145
|
-
# never handed a plugin root still has the installed package to fall back on.
|
|
146
|
-
candidates+=(node_modules/@codyswann/lisa/plugins/lisa/skills/lisa-secrets-access/scripts/resolve-secret.mjs)
|
|
147
|
-
|
|
148
|
-
local resolver
|
|
149
|
-
local tried=()
|
|
150
|
-
for resolver in "${candidates[@]}"; do
|
|
151
|
-
tried+=("$resolver")
|
|
152
|
-
if [ -f "$resolver" ]; then
|
|
153
|
-
local via_lisa
|
|
154
|
-
via_lisa=$(node "$resolver" get LINEAR_API_KEY 2>/dev/null) \
|
|
155
|
-
&& [ -n "$via_lisa" ] && { echo "$via_lisa"; return; }
|
|
156
|
-
# Empty/error means this substrate had no answer; try the next trusted one.
|
|
157
|
-
fi
|
|
158
|
-
done
|
|
133
|
+
bash /abs/path/to/lisa-linear-access/scripts/linear-graphql.sh \
|
|
134
|
+
--query-file /abs/path/to/query.graphql --variables '{"id":"ENG-123"}'
|
|
135
|
+
```
|
|
159
136
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
137
|
+
| Form | Meaning |
|
|
138
|
+
|---|---|
|
|
139
|
+
| `--query-file FILE` | The GraphQL document. `-` reads it from stdin. |
|
|
140
|
+
| `--variables JSON` | Variables as one JSON object (default `{}`). |
|
|
141
|
+
| `--variables-file FILE` | Variables from a file. `-` reads them from stdin (only one of query and variables can use stdin). |
|
|
142
|
+
| `QUERY_FILE [JSON \| @FILE]` | Positional shorthand for the two above. |
|
|
143
|
+
| `--workspace SLUG` / `--team-key KEY` | Override `linear.workspace` / `linear.teamKey`. Default: the nearest `.lisa.config.local.json`, then `.lisa.config.json`, at or above the current directory. |
|
|
144
|
+
| `--whoami` | Print the key's identity (viewer, organization, whether the team is visible) and exit. It is the identity check, and the safe way to confirm a key works. |
|
|
145
|
+
|
|
146
|
+
Exit codes: `0` success; `1` the request failed, or Linear returned GraphQL
|
|
147
|
+
`errors` (the body is still printed on stdout); `2` invalid arguments; `3` no
|
|
148
|
+
`LINEAR_API_KEY` could be resolved (stderr names every resolver path tried);
|
|
149
|
+
`4` identity-match refused (a different organization, a team the key cannot
|
|
150
|
+
see, or no workspace configured). Map exit `3` to the MCP fallback below; never
|
|
151
|
+
map exit `4` to it silently, because a present-but-wrong key fails the gate
|
|
152
|
+
loudly.
|
|
153
|
+
|
|
154
|
+
### Several calls in one step
|
|
155
|
+
|
|
156
|
+
Paged reads and the guarded state write below call shell helpers
|
|
157
|
+
(`linear_list_comment_pages`, `linear_list_workflow_states`) that use
|
|
158
|
+
`linear_graphql`. Put them in a script **file** that sources the adapter on its
|
|
159
|
+
first line, and run that file by its absolute path. Sourcing defines
|
|
160
|
+
`read_linear_key`, `linear_graphql`, `linear_require_identity`, and
|
|
161
|
+
`linear_identity_check` and runs nothing. Call `linear_require_identity` once
|
|
162
|
+
before the first request. It identity-matches `$WORKSPACE`/`$TEAM_KEY`, or the
|
|
163
|
+
project config, and returns `4` on a mismatch. Without it, every
|
|
164
|
+
`linear_graphql` probes identity again. Never paste these functions into an
|
|
165
|
+
inline command.
|
|
168
166
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
echo "project's secrets provider." >&2
|
|
177
|
-
return 1
|
|
178
|
-
}
|
|
179
|
-
jq -n --arg query "$query" --argjson variables "$variables" \
|
|
180
|
-
'{query:$query, variables:$variables}' |
|
|
181
|
-
curl -sS -X POST "https://api.linear.app/graphql" \
|
|
182
|
-
-H "Content-Type: application/json" \
|
|
183
|
-
-H "Authorization: $key" \
|
|
184
|
-
--data-binary @-
|
|
185
|
-
}
|
|
167
|
+
```bash
|
|
168
|
+
#!/usr/bin/env bash
|
|
169
|
+
# /abs/path/to/scratch/list-comments.sh
|
|
170
|
+
. /abs/path/to/lisa-linear-access/scripts/linear-graphql.sh
|
|
171
|
+
linear_require_identity || exit $?
|
|
172
|
+
# ... define linear_list_comment_pages (below), then:
|
|
173
|
+
linear_list_comment_pages issue "$1"
|
|
186
174
|
```
|
|
187
175
|
|
|
176
|
+
Keep the `.` line first. Lisa's shell guards follow a sourced file, and they can
|
|
177
|
+
read its definitions as unconditional only when nothing that changes control
|
|
178
|
+
flow runs before it.
|
|
179
|
+
|
|
188
180
|
Map operation names to Linear GraphQL queries/mutations in this access skill.
|
|
189
181
|
Consumers pass business-shaped arguments only; they do not embed GraphQL.
|
|
190
182
|
|
|
@@ -196,6 +188,9 @@ role it is applying (for example, `ready`, `claimed`, `blocked`, `review`, `done
|
|
|
196
188
|
`done`. This layer then resolves that role against config and the team's own
|
|
197
189
|
catalog, and sends the ID **it** resolved.
|
|
198
190
|
|
|
191
|
+
Run this from a script file that sources `scripts/linear-graphql.sh` (see
|
|
192
|
+
[Several calls in one step](#several-calls-in-one-step)), never inline.
|
|
193
|
+
|
|
199
194
|
```bash
|
|
200
195
|
# The team's own catalog, read through this layer's `list-workflow-states`
|
|
201
196
|
# operation for the IDENTITY-MATCHED team, and written to a file so the
|
|
@@ -379,7 +374,8 @@ query($id:String!,$after:String){
|
|
|
379
374
|
|
|
380
375
|
The Issue form uses `issue(id:$id)` with the same `first:100,after:$after`
|
|
381
376
|
arguments and node shape. For **both** anchors, use this access-layer adapter with
|
|
382
|
-
`linear_graphql`
|
|
377
|
+
`linear_graphql` from the sourced adapter script, run from a script file as
|
|
378
|
+
[Several calls in one step](#several-calls-in-one-step) describes; it accumulates every page and prints no partial history.
|
|
383
379
|
A read succeeds only after `hasNextPage` is false. Errors, malformed pages, and
|
|
384
380
|
missing or repeated continuation cursors fail the whole read.
|
|
385
381
|
Preserve `botActor` with each comment: its non-null presence identifies automation,
|
|
@@ -514,6 +510,9 @@ query($id:String!){
|
|
|
514
510
|
includes a present-but-wrong `LINEAR_API_KEY`, which fails the gate loudly
|
|
515
511
|
instead of silently deferring to an authenticated MCP.
|
|
516
512
|
- Missing token plus missing MCP is a hard failure naming `LINEAR_API_KEY`.
|
|
513
|
+
- The token tier runs only through `scripts/linear-graphql.sh`, invoked by
|
|
514
|
+
absolute path or sourced from a script file. No caller captures the key into
|
|
515
|
+
a variable in an inline command, and nothing prints it.
|
|
517
516
|
- Mutations send only the fields being changed, matching existing Linear skill
|
|
518
517
|
guidance that `save_*` style updates should not clobber unrelated fields.
|
|
519
518
|
- A comment anchors to exactly one target. `save-comment` and `list-comments`
|
|
@@ -0,0 +1,428 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# linear-graphql.sh — the executable GraphQL adapter behind lisa-linear-access.
|
|
3
|
+
#
|
|
4
|
+
# Usage:
|
|
5
|
+
# bash /abs/path/linear-graphql.sh --query-file <FILE|-> [--variables '<json>' | --variables-file <FILE|->]
|
|
6
|
+
# bash /abs/path/linear-graphql.sh <QUERY_FILE> ['<json>' | @<VARIABLES_FILE>]
|
|
7
|
+
# bash /abs/path/linear-graphql.sh --whoami
|
|
8
|
+
#
|
|
9
|
+
# Options:
|
|
10
|
+
# --query-file FILE GraphQL document to send. `-` reads it from stdin.
|
|
11
|
+
# --variables JSON Variables as one JSON object (default `{}`).
|
|
12
|
+
# --variables-file FILE Variables from a file. `-` reads them from stdin.
|
|
13
|
+
# --workspace SLUG Linear workspace to identity-match against. Default:
|
|
14
|
+
# `linear.workspace` from the nearest .lisa.config.local.json
|
|
15
|
+
# / .lisa.config.json at or above the current directory.
|
|
16
|
+
# --team-key KEY Team the key must see. Default: `linear.teamKey` from
|
|
17
|
+
# the same config. Omitted when neither is set.
|
|
18
|
+
# --whoami Print the key's identity (viewer and organization) and
|
|
19
|
+
# exit. Checks the identity against the workspace only
|
|
20
|
+
# when one is configured or passed.
|
|
21
|
+
# -h, --help Print this help.
|
|
22
|
+
#
|
|
23
|
+
# Stdout is the Linear response body, unchanged. Diagnostics go to stderr.
|
|
24
|
+
#
|
|
25
|
+
# Exit codes:
|
|
26
|
+
# 0 success
|
|
27
|
+
# 1 the request failed, the response was not JSON, or it carried GraphQL errors
|
|
28
|
+
# (the body is still printed so the caller can read the errors)
|
|
29
|
+
# 2 invalid arguments
|
|
30
|
+
# 3 no LINEAR_API_KEY could be resolved
|
|
31
|
+
# 4 identity-match refused: the key belongs to a different organization or
|
|
32
|
+
# cannot see the configured team, or no workspace is configured to match
|
|
33
|
+
#
|
|
34
|
+
# Why this file exists:
|
|
35
|
+
# The adapter used to live only as a snippet in SKILL.md, so agents pasted it
|
|
36
|
+
# into one inline shell command: capture the key with `$(...)`, then send it
|
|
37
|
+
# to an external host with curl. Claude Code asks for approval on that shape
|
|
38
|
+
# even under --dangerously-skip-permissions, and a background worker has no
|
|
39
|
+
# one to answer, so it stalls until a human attaches. Running the same code
|
|
40
|
+
# from a file invoked by absolute path does not prompt. The key is resolved
|
|
41
|
+
# inside this process and never appears in the caller's command line.
|
|
42
|
+
#
|
|
43
|
+
# Never prints the key. It is not echoed, not traced, not placed in any
|
|
44
|
+
# process's argv (curl reads the Authorization header from a file descriptor),
|
|
45
|
+
# and not included in any diagnostic.
|
|
46
|
+
#
|
|
47
|
+
# Sourcing this file (`source linear-graphql.sh`) defines read_linear_key,
|
|
48
|
+
# linear_graphql and linear_identity_check without running anything, for a
|
|
49
|
+
# script FILE that needs several calls (paged reads, guarded state writes).
|
|
50
|
+
# Run that script file by path too; never paste the functions into an inline
|
|
51
|
+
# command.
|
|
52
|
+
|
|
53
|
+
# The key resolver. The ladder is the one every Lisa credential ladder shares,
|
|
54
|
+
# and tests/unit/strategies hold this copy rung-for-rung identical to the
|
|
55
|
+
# legacy one in lisa-setup-linear.
|
|
56
|
+
read_linear_key() { # $1=workspace slug; defaults to $WORKSPACE read from config
|
|
57
|
+
# Never trace a credential. Callers normally run this in `$(...)`, so the
|
|
58
|
+
# change stays inside that subshell.
|
|
59
|
+
{ set +x; } 2>/dev/null
|
|
60
|
+
[ -n "${LINEAR_API_KEY:-}" ] && { echo "$LINEAR_API_KEY"; return; }
|
|
61
|
+
|
|
62
|
+
# Per-workspace rung, matching `atlassian-access` and `notion-access`, and
|
|
63
|
+
# matching what `setup-linear` tells the reader to export. Remote-routine
|
|
64
|
+
# env templates emit the same suffixed name, so it must resolve here.
|
|
65
|
+
#
|
|
66
|
+
# An unset variable changes nothing: an empty workspace skips the rung
|
|
67
|
+
# entirely and the ladder below runs exactly as it did before.
|
|
68
|
+
local ws="${1:-${WORKSPACE:-}}"
|
|
69
|
+
if [ -n "$ws" ]; then
|
|
70
|
+
local slug; slug=$(echo "$ws" | tr '[:upper:]-' '[:lower:]_')
|
|
71
|
+
# Constrain the slug before it reaches `${!varname}`. Indirect expansion
|
|
72
|
+
# evaluates an array subscript, so a workspace carrying `[$(...)]` would
|
|
73
|
+
# RUN that command here. The slug comes from `.lisa.config.json`, which is
|
|
74
|
+
# repository-controlled input, so anything that is not lowercase
|
|
75
|
+
# alphanumerics and underscores is skipped rather than expanded.
|
|
76
|
+
case "$slug" in
|
|
77
|
+
""|*[!a-z0-9_]*) ;;
|
|
78
|
+
*)
|
|
79
|
+
local varname="LINEAR_API_KEY_${slug}"
|
|
80
|
+
[ -n "${!varname:-}" ] && { echo "${!varname}"; return; }
|
|
81
|
+
;;
|
|
82
|
+
esac
|
|
83
|
+
fi
|
|
84
|
+
|
|
85
|
+
# Execute only machine-managed plugin/package resolvers. Checkout-local
|
|
86
|
+
# candidates are repository-controlled code, not trusted merely by path.
|
|
87
|
+
local candidates=()
|
|
88
|
+
if [ -n "${CLAUDE_PLUGIN_ROOT:-}" ]; then
|
|
89
|
+
candidates+=("$CLAUDE_PLUGIN_ROOT/skills/lisa-secrets-access/scripts/resolve-secret.mjs")
|
|
90
|
+
fi
|
|
91
|
+
if [ -n "${PLUGIN_ROOT:-}" ]; then
|
|
92
|
+
candidates+=("$PLUGIN_ROOT/skills/lisa-secrets-access/scripts/resolve-secret.mjs")
|
|
93
|
+
fi
|
|
94
|
+
# Last rung deliberately needs no environment variable: an agent that was
|
|
95
|
+
# never handed a plugin root still has the installed package to fall back on.
|
|
96
|
+
candidates+=(node_modules/@codyswann/lisa/plugins/lisa/skills/lisa-secrets-access/scripts/resolve-secret.mjs)
|
|
97
|
+
|
|
98
|
+
local resolver
|
|
99
|
+
local tried=()
|
|
100
|
+
for resolver in "${candidates[@]}"; do
|
|
101
|
+
tried+=("$resolver")
|
|
102
|
+
if [ -f "$resolver" ]; then
|
|
103
|
+
local via_lisa
|
|
104
|
+
via_lisa=$(node "$resolver" get LINEAR_API_KEY 2>/dev/null) \
|
|
105
|
+
&& [ -n "$via_lisa" ] && { echo "$via_lisa"; return; }
|
|
106
|
+
# Empty/error means this substrate had no answer; try the next trusted one.
|
|
107
|
+
fi
|
|
108
|
+
done
|
|
109
|
+
|
|
110
|
+
# Name every path. Paths only — never any resolved value.
|
|
111
|
+
echo "Error: could not resolve LINEAR_API_KEY through lisa-secrets-access." >&2
|
|
112
|
+
echo "Tried, in order (relative paths are from $PWD):" >&2
|
|
113
|
+
printf ' %s\n' "${tried[@]}" >&2
|
|
114
|
+
return 1
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
# Send one GraphQL request with an already-resolved key. Internal: callers use
|
|
118
|
+
# linear_graphql, or run this file.
|
|
119
|
+
_linear_post() { # $1=key $2=query $3=variables JSON
|
|
120
|
+
{ set +x; } 2>/dev/null
|
|
121
|
+
# The header goes through a process-substitution file descriptor, written by
|
|
122
|
+
# the `printf` builtin, so the key is never in curl's argv (`ps` shows argv
|
|
123
|
+
# to every user on the machine). Bounded timeouts: an unattended worker has
|
|
124
|
+
# nobody to notice a hung connection, and a hang is the stall this file
|
|
125
|
+
# exists to prevent. A timeout is a failed request (exit 1 from the CLI).
|
|
126
|
+
local response http_status
|
|
127
|
+
response=$(jq -cn --arg query "$2" --argjson variables "$3" \
|
|
128
|
+
'{query:$query, variables:$variables}' |
|
|
129
|
+
curl -q -sS --connect-timeout 10 --max-time 60 -X POST "https://api.linear.app/graphql" \
|
|
130
|
+
-H "Content-Type: application/json" \
|
|
131
|
+
-H @<(printf 'Authorization: %s\n' "$1") \
|
|
132
|
+
--write-out '\n%{http_code}' --data-binary @-) || return 1
|
|
133
|
+
# Curl appends the transport result after the body, even when the HTTP
|
|
134
|
+
# exchange succeeds but its status means the request failed.
|
|
135
|
+
http_status="${response##*$'\n'}"
|
|
136
|
+
response="${response%$'\n'*}"
|
|
137
|
+
if [[ "$response" == *"$1"* ]]; then
|
|
138
|
+
echo "Error: Linear returned request authentication in its response. Output discarded." >&2
|
|
139
|
+
return 1
|
|
140
|
+
fi
|
|
141
|
+
printf '%s\n' "$response"
|
|
142
|
+
case "$http_status" in
|
|
143
|
+
2[0-9][0-9]) return 0 ;;
|
|
144
|
+
[1-5][0-9][0-9]) echo "Error: Linear returned HTTP ${http_status}." >&2 ;;
|
|
145
|
+
*) echo "Error: Linear did not return a valid HTTP status." >&2 ;;
|
|
146
|
+
esac
|
|
147
|
+
return 1
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
# Both public request paths print the reply and agree on what counts as success.
|
|
151
|
+
_linear_request() { # $1=key $2=query $3=variables JSON
|
|
152
|
+
local response
|
|
153
|
+
response=$(_linear_post "$@") || {
|
|
154
|
+
if [ -n "$response" ]; then printf '%s\n' "$response"; fi
|
|
155
|
+
echo "Error: the Linear request failed." >&2
|
|
156
|
+
return 1
|
|
157
|
+
}
|
|
158
|
+
printf '%s\n' "$response"
|
|
159
|
+
printf '%s' "$response" | jq -es '
|
|
160
|
+
length == 1 and
|
|
161
|
+
(.[0] | type == "object" and (.data | type == "object") and (.errors == null or .errors == []))
|
|
162
|
+
' >/dev/null 2>&1 || {
|
|
163
|
+
echo "Error: Linear returned errors or no GraphQL data. See stdout for the response." >&2
|
|
164
|
+
return 1
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
# The plugin copy this file ships in also holds the resolver. Offer it as the
|
|
169
|
+
# PLUGIN_ROOT rung when the host exported none: Claude Code does not export
|
|
170
|
+
# CLAUDE_PLUGIN_ROOT to Bash, and a multi-repo root often has no node_modules.
|
|
171
|
+
# This adds no trust, because whoever runs this file already runs the code
|
|
172
|
+
# beside it. It is applied as a function-local value, so neither the caller's
|
|
173
|
+
# shell nor any process started here sees a changed PLUGIN_ROOT.
|
|
174
|
+
#
|
|
175
|
+
# Computed in a function, not at the top level: this file runs no statement
|
|
176
|
+
# before its last line, so Lisa's shell guards can read every definition here
|
|
177
|
+
# as unconditional when a caller's script sources it.
|
|
178
|
+
_linear_self_root() {
|
|
179
|
+
local here root
|
|
180
|
+
here="${BASH_SOURCE[0]}"
|
|
181
|
+
root=$(cd "$(dirname "$here")/../../.." 2>/dev/null && pwd) || return 0
|
|
182
|
+
if [ -f "$root/skills/lisa-secrets-access/scripts/resolve-secret.mjs" ]; then
|
|
183
|
+
printf '%s' "$root"
|
|
184
|
+
fi
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
_linear_key() { # $1=workspace slug -> the key on stdout, for capture only
|
|
188
|
+
{ set +x; } 2>/dev/null
|
|
189
|
+
local PLUGIN_ROOT="${PLUGIN_ROOT:-$(_linear_self_root)}"
|
|
190
|
+
read_linear_key "$1" || {
|
|
191
|
+
echo "Error: no Linear API key. Set LINEAR_API_KEY (or the per-workspace" >&2
|
|
192
|
+
echo "LINEAR_API_KEY_<slug>), or store it as LINEAR_API_KEY in this" >&2
|
|
193
|
+
echo "project's secrets provider." >&2
|
|
194
|
+
return 3
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
# Keep only a fingerprint of the verified key and scope in the calling shell.
|
|
199
|
+
# When neither hash tool is installed the caller proves identity on each read.
|
|
200
|
+
_linear_identity_fingerprint() {
|
|
201
|
+
if command -v sha256sum >/dev/null 2>&1; then
|
|
202
|
+
printf '%s\0' "$@" | sha256sum
|
|
203
|
+
elif command -v shasum >/dev/null 2>&1; then
|
|
204
|
+
printf '%s\0' "$@" | shasum -a 256
|
|
205
|
+
else
|
|
206
|
+
return 1
|
|
207
|
+
fi
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
# With no query this refreshes identity for subsequent calls in the same shell.
|
|
211
|
+
# Resolve the credential once so the identity probe and request always agree.
|
|
212
|
+
_linear_sourced_request() {
|
|
213
|
+
local ws="${WORKSPACE:-}" team="${TEAM_KEY:-}" key fingerprint
|
|
214
|
+
[ "$#" -ne 0 ] || unset _LINEAR_IDENTITY_OK
|
|
215
|
+
[ -n "$ws" ] || ws=$(_linear_config_value '.linear.workspace')
|
|
216
|
+
[ -n "$team" ] || team=$(_linear_config_value '.linear.teamKey')
|
|
217
|
+
if [ -z "$ws" ]; then
|
|
218
|
+
echo "Error: identity-match refused. No Linear workspace is configured (linear.workspace in .lisa.config.json), so there is nothing to match the key against. Set WORKSPACE. Nothing was sent." >&2
|
|
219
|
+
return 4
|
|
220
|
+
fi
|
|
221
|
+
key=$(_linear_key "$ws") || return 3
|
|
222
|
+
fingerprint=$(_linear_identity_fingerprint "$ws" "$team" "$key") || fingerprint=""
|
|
223
|
+
if [ -z "$fingerprint" ] || [ "${_LINEAR_IDENTITY_OK:-}" != "$fingerprint" ]; then
|
|
224
|
+
unset _LINEAR_IDENTITY_OK
|
|
225
|
+
linear_identity_check "$key" "$ws" "$team" || return $?
|
|
226
|
+
_LINEAR_IDENTITY_OK="$fingerprint"
|
|
227
|
+
fi
|
|
228
|
+
[ "$#" -gt 0 ] || return 0
|
|
229
|
+
_linear_request "$key" "$1" "$2"
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
# Sourced use: prove the current credential, workspace, and team up front.
|
|
233
|
+
linear_require_identity() {
|
|
234
|
+
{ set +x; } 2>/dev/null
|
|
235
|
+
_linear_sourced_request
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
# Sourced use: one request. An identity proven in the parent shell can be reused
|
|
239
|
+
# by command substitutions while the credential, workspace, and team agree.
|
|
240
|
+
linear_graphql() { # $1=query [$2=variables JSON, default {}]
|
|
241
|
+
{ set +x; } 2>/dev/null
|
|
242
|
+
local query="$1"
|
|
243
|
+
# Not `${2:-{}}`: that expansion ends at the first `}`, so it appends a stray
|
|
244
|
+
# `}` to every variables object a caller passes, and jq rejects the result.
|
|
245
|
+
local variables="${2:-}"
|
|
246
|
+
[ -n "$variables" ] || variables='{}'
|
|
247
|
+
_linear_sourced_request "$query" "$variables"
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
# The identity probe. Prints `{viewer, organization, teamVisible}` as JSON.
|
|
251
|
+
_linear_identity() { # $1=key [$2=team key]
|
|
252
|
+
local probe query variables='{}' status=0
|
|
253
|
+
query='query{viewer{id name organization{urlKey name}}}'
|
|
254
|
+
if [ -n "${2:-}" ]; then
|
|
255
|
+
# GraphQL expands $team, using the separately encoded variables object.
|
|
256
|
+
query="query(\$team:String!){viewer{id name organization{urlKey name}} teams(filter:{key:{eq:\$team}}){nodes{key}}}"
|
|
257
|
+
variables=$(jq -cn --arg team "$2" '{team:$team}') || return 1
|
|
258
|
+
fi
|
|
259
|
+
probe=$(_linear_post "$1" "$query" "$variables") || status=$?
|
|
260
|
+
if [ "$status" -eq 0 ] && printf '%s' "$probe" | jq -cse --arg team "${2:-}" '
|
|
261
|
+
(if length == 1 then .[0] else error("identity probe failed") end) |
|
|
262
|
+
if (.errors != null and .errors != []) or (.data.viewer.organization.urlKey | type) != "string"
|
|
263
|
+
then error("identity probe failed")
|
|
264
|
+
else {
|
|
265
|
+
viewer: {id: .data.viewer.id, name: .data.viewer.name},
|
|
266
|
+
organization: .data.viewer.organization,
|
|
267
|
+
teamVisible: (if $team == "" then null
|
|
268
|
+
else ([.data.teams.nodes[]?.key] | index($team) != null) end)
|
|
269
|
+
} end' 2>/dev/null; then
|
|
270
|
+
return 0
|
|
271
|
+
fi
|
|
272
|
+
if [ -n "$probe" ]; then printf '%s\n' "$probe" >&2; fi
|
|
273
|
+
echo "Error: the Linear identity probe failed; nothing else was sent." >&2
|
|
274
|
+
return 1
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
# Identity-match, per credential-substrate-precedence: a key for a different
|
|
278
|
+
# organization, or one that cannot see the configured team, is refused.
|
|
279
|
+
linear_identity_check() { # $1=key $2=workspace [$3=team key]
|
|
280
|
+
local identity
|
|
281
|
+
identity=$(_linear_identity "$1" "${3:-}") || return 1
|
|
282
|
+
_linear_identity_match "$identity" "$2" "${3:-}"
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
# Judge an identity the probe already returned. Separate so `--whoami` can
|
|
286
|
+
# print the identity and judge it from one request.
|
|
287
|
+
_linear_identity_match() { # $1=identity JSON $2=workspace [$3=team key]
|
|
288
|
+
local identity="$1" org
|
|
289
|
+
org=$(printf '%s' "$identity" | jq -r '.organization.urlKey')
|
|
290
|
+
if [ "$(printf '%s' "$org" | tr '[:upper:]' '[:lower:]')" != \
|
|
291
|
+
"$(printf '%s' "$2" | tr '[:upper:]' '[:lower:]')" ]; then
|
|
292
|
+
echo "Error: identity-match refused. LINEAR_API_KEY belongs to Linear organization '$org', not the configured workspace '$2'. Nothing was sent." >&2
|
|
293
|
+
return 4
|
|
294
|
+
fi
|
|
295
|
+
if [ -n "${3:-}" ] && [ "$(printf '%s' "$identity" | jq -r '.teamVisible')" != true ]; then
|
|
296
|
+
echo "Error: identity-match refused. LINEAR_API_KEY cannot see the configured team '$3' in '$2'. Nothing was sent." >&2
|
|
297
|
+
return 4
|
|
298
|
+
fi
|
|
299
|
+
return 0
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
# Read one key from the nearest project config, local override first.
|
|
303
|
+
_linear_config_value() { # $1=jq path
|
|
304
|
+
local dir="$PWD" value
|
|
305
|
+
while :; do
|
|
306
|
+
if [ -f "$dir/.lisa.config.json" ] || [ -f "$dir/.lisa.config.local.json" ]; then
|
|
307
|
+
value=$(jq -r "$1 // empty" "$dir/.lisa.config.local.json" 2>/dev/null)
|
|
308
|
+
[ -z "$value" ] && value=$(jq -r "$1 // empty" "$dir/.lisa.config.json" 2>/dev/null)
|
|
309
|
+
printf '%s' "$value"
|
|
310
|
+
return 0
|
|
311
|
+
fi
|
|
312
|
+
[ "$dir" = "/" ] && return 0
|
|
313
|
+
dir=$(dirname "$dir")
|
|
314
|
+
done
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
_linear_usage() {
|
|
318
|
+
sed -n '2,/^# Why this file exists:/p' "${BASH_SOURCE[0]}" | sed '$d' | sed 's/^# \{0,1\}//'
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
_linear_read_input() { # $1=FILE or - ; prints the contents
|
|
322
|
+
if [ "$1" = "-" ]; then
|
|
323
|
+
cat
|
|
324
|
+
elif [ -f "$1" ]; then
|
|
325
|
+
cat "$1"
|
|
326
|
+
else
|
|
327
|
+
echo "Error: no such file: $1" >&2
|
|
328
|
+
return 2
|
|
329
|
+
fi
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
_linear_main() {
|
|
333
|
+
{ set +x; } 2>/dev/null
|
|
334
|
+
set -uo pipefail
|
|
335
|
+
|
|
336
|
+
local query_file="" variables="" variables_file="" whoami=""
|
|
337
|
+
local ws="${WORKSPACE:-}" team="" team_set=""
|
|
338
|
+
local positional=()
|
|
339
|
+
while [ $# -gt 0 ]; do
|
|
340
|
+
case "$1" in
|
|
341
|
+
--query-file) query_file="${2:-}"; shift 2 || { echo "Error: --query-file needs a value" >&2; return 2; } ;;
|
|
342
|
+
--variables) variables="${2:-}"; shift 2 || { echo "Error: --variables needs a value" >&2; return 2; } ;;
|
|
343
|
+
--variables-file) variables_file="${2:-}"; shift 2 || { echo "Error: --variables-file needs a value" >&2; return 2; } ;;
|
|
344
|
+
--workspace) ws="${2:-}"; shift 2 || { echo "Error: --workspace needs a value" >&2; return 2; } ;;
|
|
345
|
+
--team-key) team="${2:-}"; team_set=1; shift 2 || { echo "Error: --team-key needs a value" >&2; return 2; } ;;
|
|
346
|
+
--whoami) whoami=1; shift ;;
|
|
347
|
+
-h|--help) _linear_usage; return 0 ;;
|
|
348
|
+
--) shift; while [ $# -gt 0 ]; do positional+=("$1"); shift; done ;;
|
|
349
|
+
-*) [ "$1" = "-" ] && { positional+=("$1"); shift; continue; }
|
|
350
|
+
echo "Error: unknown option $1 (see --help)" >&2; return 2 ;;
|
|
351
|
+
*) positional+=("$1"); shift ;;
|
|
352
|
+
esac
|
|
353
|
+
done
|
|
354
|
+
|
|
355
|
+
# Positional form: QUERY_FILE [VARIABLES_JSON | @VARIABLES_FILE].
|
|
356
|
+
if [ ${#positional[@]} -gt 2 ]; then
|
|
357
|
+
echo "Error: too many arguments (see --help)" >&2; return 2
|
|
358
|
+
fi
|
|
359
|
+
if [ ${#positional[@]} -ge 1 ]; then
|
|
360
|
+
[ -n "$query_file" ] && { echo "Error: pass the query once" >&2; return 2; }
|
|
361
|
+
query_file="${positional[0]}"
|
|
362
|
+
fi
|
|
363
|
+
if [ ${#positional[@]} -eq 2 ]; then
|
|
364
|
+
[ -n "$variables$variables_file" ] && { echo "Error: pass the variables once" >&2; return 2; }
|
|
365
|
+
case "${positional[1]}" in
|
|
366
|
+
@*) variables_file="${positional[1]#@}" ;;
|
|
367
|
+
*) variables="${positional[1]}" ;;
|
|
368
|
+
esac
|
|
369
|
+
fi
|
|
370
|
+
if [ -n "$variables" ] && [ -n "$variables_file" ]; then
|
|
371
|
+
echo "Error: pass --variables or --variables-file, not both" >&2; return 2
|
|
372
|
+
fi
|
|
373
|
+
if [ "$query_file" = "-" ] && [ "$variables_file" = "-" ]; then
|
|
374
|
+
echo "Error: only one of the query and the variables can come from stdin" >&2; return 2
|
|
375
|
+
fi
|
|
376
|
+
if [ -z "$whoami" ] && [ -z "$query_file" ]; then
|
|
377
|
+
echo "Error: no query. Pass --query-file <FILE|-> (see --help)" >&2; return 2
|
|
378
|
+
fi
|
|
379
|
+
|
|
380
|
+
command -v jq >/dev/null 2>&1 || { echo "Error: jq is required" >&2; return 2; }
|
|
381
|
+
command -v curl >/dev/null 2>&1 || { echo "Error: curl is required" >&2; return 2; }
|
|
382
|
+
|
|
383
|
+
local query="" vars="{}"
|
|
384
|
+
if [ -n "$query_file" ]; then
|
|
385
|
+
query=$(_linear_read_input "$query_file") || return 2
|
|
386
|
+
[ -n "$query" ] || { echo "Error: the query is empty" >&2; return 2; }
|
|
387
|
+
fi
|
|
388
|
+
if [ -n "$variables_file" ]; then
|
|
389
|
+
vars=$(_linear_read_input "$variables_file") || return 2
|
|
390
|
+
elif [ -n "$variables" ]; then
|
|
391
|
+
vars="$variables"
|
|
392
|
+
fi
|
|
393
|
+
printf '%s' "$vars" | jq -e 'type == "object"' >/dev/null 2>&1 || {
|
|
394
|
+
echo "Error: the variables must be one JSON object" >&2; return 2
|
|
395
|
+
}
|
|
396
|
+
vars=$(printf '%s' "$vars" | jq -c .)
|
|
397
|
+
|
|
398
|
+
[ -n "$ws" ] || ws=$(_linear_config_value '.linear.workspace')
|
|
399
|
+
[ -n "$team_set" ] || team=$(_linear_config_value '.linear.teamKey')
|
|
400
|
+
|
|
401
|
+
if [ -z "$ws" ] && [ -z "$whoami" ]; then
|
|
402
|
+
echo "Error: identity-match refused. No Linear workspace is configured (linear.workspace in .lisa.config.json), so there is nothing to match the key against. Pass --workspace <slug>. Nothing was sent." >&2
|
|
403
|
+
return 4
|
|
404
|
+
fi
|
|
405
|
+
|
|
406
|
+
local key
|
|
407
|
+
key=$(_linear_key "$ws") || return 3
|
|
408
|
+
|
|
409
|
+
if [ -n "$whoami" ]; then
|
|
410
|
+
local identity
|
|
411
|
+
identity=$(_linear_identity "$key" "$team") || return 1
|
|
412
|
+
printf '%s\n' "$identity"
|
|
413
|
+
[ -z "$ws" ] && return 0
|
|
414
|
+
_linear_identity_match "$identity" "$ws" "$team"
|
|
415
|
+
return $?
|
|
416
|
+
fi
|
|
417
|
+
|
|
418
|
+
local rc
|
|
419
|
+
linear_identity_check "$key" "$ws" "$team"; rc=$?
|
|
420
|
+
[ $rc -eq 0 ] || return $rc
|
|
421
|
+
|
|
422
|
+
_linear_request "$key" "$query" "$vars"
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
if [ "${BASH_SOURCE[0]}" = "$0" ]; then
|
|
426
|
+
_linear_main "$@"
|
|
427
|
+
exit $?
|
|
428
|
+
fi
|