agents-inc 0.149.1 → 0.150.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/CHANGELOG.md +2277 -0
- package/LICENSE +21 -0
- package/README.md +136 -19
- package/assets/demo.gif +0 -0
- package/assets/demo.tape +266 -0
- package/assets/logo.svg +75 -0
- package/dist/chunk-2RSNKBXC.js +84 -0
- package/dist/chunk-2RSNKBXC.js.map +1 -0
- package/dist/chunk-3LIU2ZEF.js +1355 -0
- package/dist/chunk-3LIU2ZEF.js.map +1 -0
- package/dist/chunk-4GL2F5AB.js +222 -0
- package/dist/chunk-4GL2F5AB.js.map +1 -0
- package/dist/chunk-4LPJZNT7.js +382 -0
- package/dist/chunk-4LPJZNT7.js.map +1 -0
- package/dist/chunk-5K5RBRTD.js +62 -0
- package/dist/chunk-5K5RBRTD.js.map +1 -0
- package/dist/chunk-6I6RZHYP.js +789 -0
- package/dist/chunk-6I6RZHYP.js.map +1 -0
- package/dist/chunk-7URSGJLE.js +430 -0
- package/dist/chunk-7URSGJLE.js.map +1 -0
- package/dist/chunk-C55DN7GE.js +35 -0
- package/dist/chunk-C55DN7GE.js.map +1 -0
- package/dist/chunk-CDMHSHBN.js +68 -0
- package/dist/chunk-CDMHSHBN.js.map +1 -0
- package/dist/chunk-CFQT72MJ.js +92 -0
- package/dist/chunk-CFQT72MJ.js.map +1 -0
- package/dist/chunk-DAG2ULNF.js +125 -0
- package/dist/chunk-DAG2ULNF.js.map +1 -0
- package/dist/chunk-DDG4F3FE.js +181 -0
- package/dist/chunk-DDG4F3FE.js.map +1 -0
- package/dist/chunk-DIBCRIMR.js +36 -0
- package/dist/chunk-DIBCRIMR.js.map +1 -0
- package/dist/chunk-DJAZE4PD.js +10929 -0
- package/dist/chunk-DJAZE4PD.js.map +1 -0
- package/dist/chunk-DUVWGO6E.js +54 -0
- package/dist/chunk-DUVWGO6E.js.map +1 -0
- package/dist/chunk-E4FT2KFV.js +174 -0
- package/dist/chunk-E4FT2KFV.js.map +1 -0
- package/dist/chunk-EKWAUOQB.js +96 -0
- package/dist/chunk-EKWAUOQB.js.map +1 -0
- package/dist/chunk-EN2GCPW7.js +300 -0
- package/dist/chunk-EN2GCPW7.js.map +1 -0
- package/dist/chunk-ES3NJZON.js +31 -0
- package/dist/chunk-ES3NJZON.js.map +1 -0
- package/dist/chunk-F3756A5B.js +20 -0
- package/dist/chunk-F3756A5B.js.map +1 -0
- package/dist/chunk-FWT3CBLL.js +51 -0
- package/dist/chunk-FWT3CBLL.js.map +1 -0
- package/dist/chunk-FYPUUYSG.js +31 -0
- package/dist/chunk-FYPUUYSG.js.map +1 -0
- package/dist/chunk-GRPSDKIS.js +112 -0
- package/dist/chunk-GRPSDKIS.js.map +1 -0
- package/dist/chunk-GYG5SE2D.js +81 -0
- package/dist/chunk-GYG5SE2D.js.map +1 -0
- package/dist/chunk-HIPGKIT3.js +287 -0
- package/dist/chunk-HIPGKIT3.js.map +1 -0
- package/dist/chunk-I3XKEGHM.js +16383 -0
- package/dist/chunk-I3XKEGHM.js.map +1 -0
- package/dist/chunk-IHO75PMZ.js +40 -0
- package/dist/chunk-IHO75PMZ.js.map +1 -0
- package/dist/chunk-IOJR5TOY.js +47 -0
- package/dist/chunk-IOJR5TOY.js.map +1 -0
- package/dist/chunk-K3OU6TGX.js +77 -0
- package/dist/chunk-K3OU6TGX.js.map +1 -0
- package/dist/chunk-KH7MOIM5.js +6010 -0
- package/dist/chunk-KH7MOIM5.js.map +1 -0
- package/dist/chunk-KIR7VYQD.js +63 -0
- package/dist/chunk-KIR7VYQD.js.map +1 -0
- package/dist/chunk-KOPEM3Q7.js +27 -0
- package/dist/chunk-KOPEM3Q7.js.map +1 -0
- package/dist/chunk-KSZ6PCY4.js +43 -0
- package/dist/chunk-KSZ6PCY4.js.map +1 -0
- package/dist/chunk-LRYNF3J7.js +111 -0
- package/dist/chunk-LRYNF3J7.js.map +1 -0
- package/dist/chunk-LYYXX2W5.js +87 -0
- package/dist/chunk-LYYXX2W5.js.map +1 -0
- package/dist/chunk-MC5DUZ3V.js +1135 -0
- package/dist/chunk-MC5DUZ3V.js.map +1 -0
- package/dist/chunk-N4IZ6GBO.js +300 -0
- package/dist/chunk-N4IZ6GBO.js.map +1 -0
- package/dist/chunk-NIKUMXE7.js +24 -0
- package/dist/chunk-NIKUMXE7.js.map +1 -0
- package/dist/chunk-NUIZ6ZUO.js +42 -0
- package/dist/chunk-NUIZ6ZUO.js.map +1 -0
- package/dist/chunk-O5ASLZ2K.js +270 -0
- package/dist/chunk-O5ASLZ2K.js.map +1 -0
- package/dist/chunk-OA5SUEQD.js +181 -0
- package/dist/chunk-OA5SUEQD.js.map +1 -0
- package/dist/chunk-OZZGXBCN.js +15 -0
- package/dist/chunk-OZZGXBCN.js.map +1 -0
- package/dist/chunk-P3PN5SVI.js +27 -0
- package/dist/chunk-P3PN5SVI.js.map +1 -0
- package/dist/chunk-P56WJ5FA.js +50 -0
- package/dist/chunk-P56WJ5FA.js.map +1 -0
- package/dist/chunk-PG4G4IIK.js +24 -0
- package/dist/chunk-PG4G4IIK.js.map +1 -0
- package/dist/chunk-QQLRX4KI.js +41 -0
- package/dist/chunk-QQLRX4KI.js.map +1 -0
- package/dist/chunk-RBHYLCUB.js +31 -0
- package/dist/chunk-RBHYLCUB.js.map +1 -0
- package/dist/chunk-RJN7W2C7.js +349 -0
- package/dist/chunk-RJN7W2C7.js.map +1 -0
- package/dist/chunk-RP7R73JO.js +179 -0
- package/dist/chunk-RP7R73JO.js.map +1 -0
- package/dist/chunk-SYUOXSPU.js +510 -0
- package/dist/chunk-SYUOXSPU.js.map +1 -0
- package/dist/chunk-THKIOI32.js +939 -0
- package/dist/chunk-THKIOI32.js.map +1 -0
- package/dist/chunk-UZRISDBZ.js +28 -0
- package/dist/chunk-UZRISDBZ.js.map +1 -0
- package/dist/chunk-V7QOSGQA.js +298 -0
- package/dist/chunk-V7QOSGQA.js.map +1 -0
- package/dist/chunk-VEP23B5W.js +27 -0
- package/dist/chunk-VEP23B5W.js.map +1 -0
- package/dist/chunk-VG2TVBFN.js +52 -0
- package/dist/chunk-VG2TVBFN.js.map +1 -0
- package/dist/chunk-VIFZ6NFH.js +27 -0
- package/dist/chunk-VIFZ6NFH.js.map +1 -0
- package/dist/chunk-XA57SX4T.js +115 -0
- package/dist/chunk-XA57SX4T.js.map +1 -0
- package/dist/chunk-YKKIJHZB.js +339 -0
- package/dist/chunk-YKKIJHZB.js.map +1 -0
- package/dist/chunk-YU2VGX5R.js +4205 -0
- package/dist/chunk-YU2VGX5R.js.map +1 -0
- package/dist/chunk-ZDLTLNU2.js +258 -0
- package/dist/chunk-ZDLTLNU2.js.map +1 -0
- package/dist/chunk-ZHTXPFDK.js +128 -0
- package/dist/chunk-ZHTXPFDK.js.map +1 -0
- package/dist/chunk-ZKJAJWK6.js +253 -0
- package/dist/chunk-ZKJAJWK6.js.map +1 -0
- package/dist/commands/build/marketplace.js +250 -0
- package/dist/commands/build/marketplace.js.map +1 -0
- package/dist/commands/build/plugins.js +176 -0
- package/dist/commands/build/plugins.js.map +1 -0
- package/dist/commands/compile.js +331 -0
- package/dist/commands/compile.js.map +1 -0
- package/dist/commands/doctor.js +475 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/edit.js +765 -0
- package/dist/commands/edit.js.map +1 -0
- package/dist/commands/eject.js +393 -0
- package/dist/commands/eject.js.map +1 -0
- package/dist/commands/import/skill.js +349 -0
- package/dist/commands/import/skill.js.map +1 -0
- package/dist/commands/init.js +66 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/list.js +115 -0
- package/dist/commands/list.js.map +1 -0
- package/dist/commands/new/agent.js +304 -0
- package/dist/commands/new/agent.js.map +1 -0
- package/dist/commands/new/marketplace.js +315 -0
- package/dist/commands/new/marketplace.js.map +1 -0
- package/dist/commands/new/skill.js +28 -0
- package/dist/commands/new/skill.js.map +1 -0
- package/dist/commands/search.js +176 -0
- package/dist/commands/search.js.map +1 -0
- package/dist/commands/uninstall.js +570 -0
- package/dist/commands/uninstall.js.map +1 -0
- package/dist/commands/update.js +368 -0
- package/dist/commands/update.js.map +1 -0
- package/dist/commands/validate.js +581 -0
- package/dist/commands/validate.js.map +1 -0
- package/dist/components/common/confirm.js +9 -0
- package/dist/components/common/confirm.js.map +1 -0
- package/dist/components/common/confirm.test.js +203 -0
- package/dist/components/common/confirm.test.js.map +1 -0
- package/dist/components/common/prompt-confirm.js +11 -0
- package/dist/components/common/prompt-confirm.js.map +1 -0
- package/dist/components/common/select-list.js +11 -0
- package/dist/components/common/select-list.js.map +1 -0
- package/dist/components/common/spinner.js +9 -0
- package/dist/components/common/spinner.js.map +1 -0
- package/dist/components/wizard/category-grid.js +16 -0
- package/dist/components/wizard/category-grid.js.map +1 -0
- package/dist/components/wizard/category-grid.test.js +1253 -0
- package/dist/components/wizard/category-grid.test.js.map +1 -0
- package/dist/components/wizard/checkbox-grid.js +14 -0
- package/dist/components/wizard/checkbox-grid.js.map +1 -0
- package/dist/components/wizard/checkbox-grid.test.js +264 -0
- package/dist/components/wizard/checkbox-grid.test.js.map +1 -0
- package/dist/components/wizard/domain-selection.js +22 -0
- package/dist/components/wizard/domain-selection.js.map +1 -0
- package/dist/components/wizard/run-wizard-session.js +47 -0
- package/dist/components/wizard/run-wizard-session.js.map +1 -0
- package/dist/components/wizard/scroll-affordance.js +10 -0
- package/dist/components/wizard/scroll-affordance.js.map +1 -0
- package/dist/components/wizard/search-modal.js +14 -0
- package/dist/components/wizard/search-modal.js.map +1 -0
- package/dist/components/wizard/search-modal.test.js +212 -0
- package/dist/components/wizard/search-modal.test.js.map +1 -0
- package/dist/components/wizard/selection-card.js +10 -0
- package/dist/components/wizard/selection-card.js.map +1 -0
- package/dist/components/wizard/skill-agent-summary.js +16 -0
- package/dist/components/wizard/skill-agent-summary.js.map +1 -0
- package/dist/components/wizard/source-grid.js +23 -0
- package/dist/components/wizard/source-grid.js.map +1 -0
- package/dist/components/wizard/source-grid.test.js +1094 -0
- package/dist/components/wizard/source-grid.test.js.map +1 -0
- package/dist/components/wizard/stack-selection.js +20 -0
- package/dist/components/wizard/stack-selection.js.map +1 -0
- package/dist/components/wizard/step-agents.js +22 -0
- package/dist/components/wizard/step-agents.js.map +1 -0
- package/dist/components/wizard/step-agents.test.js +204 -0
- package/dist/components/wizard/step-agents.test.js.map +1 -0
- package/dist/components/wizard/step-build.js +22 -0
- package/dist/components/wizard/step-build.js.map +1 -0
- package/dist/components/wizard/step-build.test.js +552 -0
- package/dist/components/wizard/step-build.test.js.map +1 -0
- package/dist/components/wizard/step-confirm.js +21 -0
- package/dist/components/wizard/step-confirm.js.map +1 -0
- package/dist/components/wizard/step-confirm.test.js +744 -0
- package/dist/components/wizard/step-confirm.test.js.map +1 -0
- package/dist/components/wizard/step-settings.js +19 -0
- package/dist/components/wizard/step-settings.js.map +1 -0
- package/dist/components/wizard/step-settings.test.js +244 -0
- package/dist/components/wizard/step-settings.test.js.map +1 -0
- package/dist/components/wizard/step-sources.js +28 -0
- package/dist/components/wizard/step-sources.js.map +1 -0
- package/dist/components/wizard/step-sources.test.js +155 -0
- package/dist/components/wizard/step-sources.test.js.map +1 -0
- package/dist/components/wizard/step-stack.js +21 -0
- package/dist/components/wizard/step-stack.js.map +1 -0
- package/dist/components/wizard/step-stack.test.js +262 -0
- package/dist/components/wizard/step-stack.test.js.map +1 -0
- package/dist/components/wizard/summary-panel.js +20 -0
- package/dist/components/wizard/summary-panel.js.map +1 -0
- package/dist/components/wizard/summary-panel.test.js +317 -0
- package/dist/components/wizard/summary-panel.test.js.map +1 -0
- package/dist/components/wizard/toast.js +10 -0
- package/dist/components/wizard/toast.js.map +1 -0
- package/dist/components/wizard/wizard-layout.js +26 -0
- package/dist/components/wizard/wizard-layout.js.map +1 -0
- package/dist/components/wizard/wizard-layout.test.js +200 -0
- package/dist/components/wizard/wizard-layout.test.js.map +1 -0
- package/dist/components/wizard/wizard-tabs.js +20 -0
- package/dist/components/wizard/wizard-tabs.js.map +1 -0
- package/dist/components/wizard/wizard-tabs.test.js +290 -0
- package/dist/components/wizard/wizard-tabs.test.js.map +1 -0
- package/dist/components/wizard/wizard.js +48 -0
- package/dist/components/wizard/wizard.js.map +1 -0
- package/dist/config-exports.js +20 -0
- package/dist/config-exports.js.map +1 -0
- package/dist/copy-local-skills-CA7P73RZ.js +15 -0
- package/dist/copy-local-skills-CA7P73RZ.js.map +1 -0
- package/dist/dist-VNJNNJK7.js +550 -0
- package/dist/dist-VNJNNJK7.js.map +1 -0
- package/dist/hooks/init.js +90 -0
- package/dist/hooks/init.js.map +1 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/load-agent-defs-6MAY5ABI.js +16 -0
- package/dist/load-agent-defs-6MAY5ABI.js.map +1 -0
- package/dist/loader-E2ERJYVA.js +23 -0
- package/dist/loader-E2ERJYVA.js.map +1 -0
- package/dist/magic-string.es-5TV73NJD.js +1316 -0
- package/dist/magic-string.es-5TV73NJD.js.map +1 -0
- package/dist/recompile-project-agents-VYQJ6UZB.js +20 -0
- package/dist/recompile-project-agents-VYQJ6UZB.js.map +1 -0
- package/dist/source-loader-VVHMQEX5.js +20 -0
- package/dist/source-loader-VVHMQEX5.js.map +1 -0
- package/dist/source-manager-TPDXV5FO.js +18 -0
- package/dist/source-manager-TPDXV5FO.js.map +1 -0
- package/dist/src/agents/_templates/agent.liquid +161 -0
- package/dist/src/agents/_templates/methodologies/anti-over-engineering.liquid +121 -0
- package/dist/src/agents/_templates/methodologies/context-management.liquid +162 -0
- package/dist/src/agents/_templates/methodologies/improvement-protocol.liquid +150 -0
- package/dist/src/agents/_templates/methodologies/investigation-requirements.liquid +49 -0
- package/dist/src/agents/_templates/methodologies/success-criteria.liquid +111 -0
- package/dist/src/agents/_templates/methodologies/write-verification.liquid +43 -0
- package/dist/src/agents/developer/ai-developer/critical-reminders.md +54 -0
- package/dist/src/agents/developer/ai-developer/critical-requirements.md +59 -0
- package/dist/src/agents/developer/ai-developer/identity.md +51 -0
- package/dist/src/agents/developer/ai-developer/metadata.yaml +12 -0
- package/dist/src/agents/developer/ai-developer/output.md +366 -0
- package/dist/src/agents/developer/ai-developer/playbook.md +335 -0
- package/dist/src/agents/developer/api-developer/critical-reminders.md +46 -0
- package/dist/src/agents/developer/api-developer/critical-requirements.md +44 -0
- package/dist/src/agents/developer/api-developer/identity.md +49 -0
- package/dist/src/agents/developer/api-developer/metadata.yaml +12 -0
- package/dist/src/agents/developer/api-developer/output.md +432 -0
- package/dist/src/agents/developer/api-developer/playbook.md +352 -0
- package/dist/src/agents/developer/cli-developer/critical-reminders.md +51 -0
- package/dist/src/agents/developer/cli-developer/critical-requirements.md +51 -0
- package/dist/src/agents/developer/cli-developer/identity.md +51 -0
- package/dist/src/agents/developer/cli-developer/metadata.yaml +12 -0
- package/dist/src/agents/developer/cli-developer/output.md +285 -0
- package/dist/src/agents/developer/cli-developer/playbook.md +386 -0
- package/dist/src/agents/developer/web-architecture/critical-reminders.md +48 -0
- package/dist/src/agents/developer/web-architecture/critical-requirements.md +65 -0
- package/dist/src/agents/developer/web-architecture/identity.md +64 -0
- package/dist/src/agents/developer/web-architecture/metadata.yaml +12 -0
- package/dist/src/agents/developer/web-architecture/output.md +449 -0
- package/dist/src/agents/developer/web-architecture/playbook.md +481 -0
- package/dist/src/agents/developer/web-developer/critical-reminders.md +40 -0
- package/dist/src/agents/developer/web-developer/critical-requirements.md +39 -0
- package/dist/src/agents/developer/web-developer/identity.md +32 -0
- package/dist/src/agents/developer/web-developer/metadata.yaml +12 -0
- package/dist/src/agents/developer/web-developer/output.md +323 -0
- package/dist/src/agents/developer/web-developer/playbook.md +349 -0
- package/dist/src/agents/meta/agent-summoner/critical-reminders.md +45 -0
- package/dist/src/agents/meta/agent-summoner/critical-requirements.md +52 -0
- package/dist/src/agents/meta/agent-summoner/identity.md +34 -0
- package/dist/src/agents/meta/agent-summoner/metadata.yaml +12 -0
- package/dist/src/agents/meta/agent-summoner/output.md +296 -0
- package/dist/src/agents/meta/agent-summoner/playbook.md +1469 -0
- package/dist/src/agents/meta/codex-keeper/critical-reminders.md +39 -0
- package/dist/src/agents/meta/codex-keeper/critical-requirements.md +29 -0
- package/dist/src/agents/meta/codex-keeper/identity.md +45 -0
- package/dist/src/agents/meta/codex-keeper/metadata.yaml +12 -0
- package/dist/src/agents/meta/codex-keeper/output.md +384 -0
- package/dist/src/agents/meta/codex-keeper/playbook.md +1183 -0
- package/dist/src/agents/meta/convention-keeper/critical-reminders.md +32 -0
- package/dist/src/agents/meta/convention-keeper/critical-requirements.md +32 -0
- package/dist/src/agents/meta/convention-keeper/identity.md +33 -0
- package/dist/src/agents/meta/convention-keeper/metadata.yaml +12 -0
- package/dist/src/agents/meta/convention-keeper/output.md +206 -0
- package/dist/src/agents/meta/convention-keeper/playbook.md +180 -0
- package/dist/src/agents/meta/skill-summoner/critical-reminders.md +112 -0
- package/dist/src/agents/meta/skill-summoner/critical-requirements.md +62 -0
- package/dist/src/agents/meta/skill-summoner/identity.md +31 -0
- package/dist/src/agents/meta/skill-summoner/metadata.yaml +13 -0
- package/dist/src/agents/meta/skill-summoner/output.md +390 -0
- package/dist/src/agents/meta/skill-summoner/playbook.md +1457 -0
- package/dist/src/agents/pattern/pattern-scout/critical-reminders.md +71 -0
- package/dist/src/agents/pattern/pattern-scout/critical-requirements.md +31 -0
- package/dist/src/agents/pattern/pattern-scout/identity.md +25 -0
- package/dist/src/agents/pattern/pattern-scout/metadata.yaml +10 -0
- package/dist/src/agents/pattern/pattern-scout/output.md +290 -0
- package/dist/src/agents/pattern/pattern-scout/playbook.md +1806 -0
- package/dist/src/agents/pattern/web-pattern-critique/critical-reminders.md +30 -0
- package/dist/src/agents/pattern/web-pattern-critique/critical-requirements.md +28 -0
- package/dist/src/agents/pattern/web-pattern-critique/identity.md +41 -0
- package/dist/src/agents/pattern/web-pattern-critique/metadata.yaml +12 -0
- package/dist/src/agents/pattern/web-pattern-critique/output.md +314 -0
- package/dist/src/agents/pattern/web-pattern-critique/playbook.md +572 -0
- package/dist/src/agents/planning/api-pm/critical-reminders.md +48 -0
- package/dist/src/agents/planning/api-pm/critical-requirements.md +41 -0
- package/dist/src/agents/planning/api-pm/identity.md +39 -0
- package/dist/src/agents/planning/api-pm/metadata.yaml +12 -0
- package/dist/src/agents/planning/api-pm/output.md +475 -0
- package/dist/src/agents/planning/api-pm/playbook.md +129 -0
- package/dist/src/agents/planning/web-pm/critical-reminders.md +36 -0
- package/dist/src/agents/planning/web-pm/critical-requirements.md +32 -0
- package/dist/src/agents/planning/web-pm/identity.md +26 -0
- package/dist/src/agents/planning/web-pm/metadata.yaml +12 -0
- package/dist/src/agents/planning/web-pm/output.md +314 -0
- package/dist/src/agents/planning/web-pm/playbook.md +318 -0
- package/dist/src/agents/researcher/api-researcher/critical-reminders.md +27 -0
- package/dist/src/agents/researcher/api-researcher/critical-requirements.md +28 -0
- package/dist/src/agents/researcher/api-researcher/identity.md +71 -0
- package/dist/src/agents/researcher/api-researcher/metadata.yaml +10 -0
- package/dist/src/agents/researcher/api-researcher/output.md +254 -0
- package/dist/src/agents/researcher/api-researcher/playbook.md +201 -0
- package/dist/src/agents/researcher/web-researcher/critical-reminders.md +39 -0
- package/dist/src/agents/researcher/web-researcher/critical-requirements.md +26 -0
- package/dist/src/agents/researcher/web-researcher/identity.md +69 -0
- package/dist/src/agents/researcher/web-researcher/metadata.yaml +10 -0
- package/dist/src/agents/researcher/web-researcher/output.md +241 -0
- package/dist/src/agents/researcher/web-researcher/playbook.md +217 -0
- package/dist/src/agents/reviewer/ai-reviewer/critical-reminders.md +40 -0
- package/dist/src/agents/reviewer/ai-reviewer/critical-requirements.md +37 -0
- package/dist/src/agents/reviewer/ai-reviewer/identity.md +51 -0
- package/dist/src/agents/reviewer/ai-reviewer/metadata.yaml +10 -0
- package/dist/src/agents/reviewer/ai-reviewer/output.md +395 -0
- package/dist/src/agents/reviewer/ai-reviewer/playbook.md +90 -0
- package/dist/src/agents/reviewer/api-reviewer/critical-reminders.md +31 -0
- package/dist/src/agents/reviewer/api-reviewer/critical-requirements.md +27 -0
- package/dist/src/agents/reviewer/api-reviewer/identity.md +51 -0
- package/dist/src/agents/reviewer/api-reviewer/metadata.yaml +12 -0
- package/dist/src/agents/reviewer/api-reviewer/output.md +343 -0
- package/dist/src/agents/reviewer/api-reviewer/playbook.md +288 -0
- package/dist/src/agents/reviewer/cli-reviewer/critical-reminders.md +33 -0
- package/dist/src/agents/reviewer/cli-reviewer/critical-requirements.md +30 -0
- package/dist/src/agents/reviewer/cli-reviewer/identity.md +44 -0
- package/dist/src/agents/reviewer/cli-reviewer/metadata.yaml +12 -0
- package/dist/src/agents/reviewer/cli-reviewer/output.md +414 -0
- package/dist/src/agents/reviewer/cli-reviewer/playbook.md +218 -0
- package/dist/src/agents/reviewer/infra-reviewer/critical-reminders.md +38 -0
- package/dist/src/agents/reviewer/infra-reviewer/critical-requirements.md +38 -0
- package/dist/src/agents/reviewer/infra-reviewer/identity.md +53 -0
- package/dist/src/agents/reviewer/infra-reviewer/metadata.yaml +10 -0
- package/dist/src/agents/reviewer/infra-reviewer/output.md +364 -0
- package/dist/src/agents/reviewer/infra-reviewer/playbook.md +161 -0
- package/dist/src/agents/reviewer/web-reviewer/critical-reminders.md +31 -0
- package/dist/src/agents/reviewer/web-reviewer/critical-requirements.md +26 -0
- package/dist/src/agents/reviewer/web-reviewer/identity.md +40 -0
- package/dist/src/agents/reviewer/web-reviewer/metadata.yaml +12 -0
- package/dist/src/agents/reviewer/web-reviewer/output.md +333 -0
- package/dist/src/agents/reviewer/web-reviewer/playbook.md +156 -0
- package/dist/src/agents/tester/api-tester/critical-reminders.md +41 -0
- package/dist/src/agents/tester/api-tester/critical-requirements.md +41 -0
- package/dist/src/agents/tester/api-tester/identity.md +47 -0
- package/dist/src/agents/tester/api-tester/metadata.yaml +12 -0
- package/dist/src/agents/tester/api-tester/output.md +284 -0
- package/dist/src/agents/tester/api-tester/playbook.md +275 -0
- package/dist/src/agents/tester/cli-tester/critical-reminders.md +36 -0
- package/dist/src/agents/tester/cli-tester/critical-requirements.md +36 -0
- package/dist/src/agents/tester/cli-tester/identity.md +43 -0
- package/dist/src/agents/tester/cli-tester/metadata.yaml +12 -0
- package/dist/src/agents/tester/cli-tester/output.md +313 -0
- package/dist/src/agents/tester/cli-tester/playbook.md +221 -0
- package/dist/src/agents/tester/web-tester/critical-reminders.md +31 -0
- package/dist/src/agents/tester/web-tester/critical-requirements.md +28 -0
- package/dist/src/agents/tester/web-tester/identity.md +41 -0
- package/dist/src/agents/tester/web-tester/metadata.yaml +12 -0
- package/dist/src/agents/tester/web-tester/output.md +321 -0
- package/dist/src/agents/tester/web-tester/playbook.md +428 -0
- package/dist/stores/d227-same-scope-tombstone-duplicate.test.js +118 -0
- package/dist/stores/d227-same-scope-tombstone-duplicate.test.js.map +1 -0
- package/dist/stores/wizard-store.js +21 -0
- package/dist/stores/wizard-store.js.map +1 -0
- package/dist/stores/wizard-store.test.js +3053 -0
- package/dist/stores/wizard-store.test.js.map +1 -0
- package/package.json +131 -13
- package/src/agents/_templates/agent.liquid +161 -0
- package/src/agents/_templates/methodologies/anti-over-engineering.liquid +121 -0
- package/src/agents/_templates/methodologies/context-management.liquid +162 -0
- package/src/agents/_templates/methodologies/improvement-protocol.liquid +150 -0
- package/src/agents/_templates/methodologies/investigation-requirements.liquid +49 -0
- package/src/agents/_templates/methodologies/success-criteria.liquid +111 -0
- package/src/agents/_templates/methodologies/write-verification.liquid +43 -0
- package/src/agents/developer/ai-developer/critical-reminders.md +54 -0
- package/src/agents/developer/ai-developer/critical-requirements.md +59 -0
- package/src/agents/developer/ai-developer/identity.md +51 -0
- package/src/agents/developer/ai-developer/metadata.yaml +12 -0
- package/src/agents/developer/ai-developer/output.md +366 -0
- package/src/agents/developer/ai-developer/playbook.md +335 -0
- package/src/agents/developer/api-developer/critical-reminders.md +46 -0
- package/src/agents/developer/api-developer/critical-requirements.md +44 -0
- package/src/agents/developer/api-developer/identity.md +49 -0
- package/src/agents/developer/api-developer/metadata.yaml +12 -0
- package/src/agents/developer/api-developer/output.md +432 -0
- package/src/agents/developer/api-developer/playbook.md +352 -0
- package/src/agents/developer/cli-developer/critical-reminders.md +51 -0
- package/src/agents/developer/cli-developer/critical-requirements.md +51 -0
- package/src/agents/developer/cli-developer/identity.md +51 -0
- package/src/agents/developer/cli-developer/metadata.yaml +12 -0
- package/src/agents/developer/cli-developer/output.md +285 -0
- package/src/agents/developer/cli-developer/playbook.md +386 -0
- package/src/agents/developer/web-architecture/critical-reminders.md +48 -0
- package/src/agents/developer/web-architecture/critical-requirements.md +65 -0
- package/src/agents/developer/web-architecture/identity.md +64 -0
- package/src/agents/developer/web-architecture/metadata.yaml +12 -0
- package/src/agents/developer/web-architecture/output.md +449 -0
- package/src/agents/developer/web-architecture/playbook.md +481 -0
- package/src/agents/developer/web-developer/critical-reminders.md +40 -0
- package/src/agents/developer/web-developer/critical-requirements.md +39 -0
- package/src/agents/developer/web-developer/identity.md +32 -0
- package/src/agents/developer/web-developer/metadata.yaml +12 -0
- package/src/agents/developer/web-developer/output.md +323 -0
- package/src/agents/developer/web-developer/playbook.md +349 -0
- package/src/agents/meta/agent-summoner/critical-reminders.md +45 -0
- package/src/agents/meta/agent-summoner/critical-requirements.md +52 -0
- package/src/agents/meta/agent-summoner/identity.md +34 -0
- package/src/agents/meta/agent-summoner/metadata.yaml +12 -0
- package/src/agents/meta/agent-summoner/output.md +296 -0
- package/src/agents/meta/agent-summoner/playbook.md +1469 -0
- package/src/agents/meta/codex-keeper/critical-reminders.md +39 -0
- package/src/agents/meta/codex-keeper/critical-requirements.md +29 -0
- package/src/agents/meta/codex-keeper/identity.md +45 -0
- package/src/agents/meta/codex-keeper/metadata.yaml +12 -0
- package/src/agents/meta/codex-keeper/output.md +384 -0
- package/src/agents/meta/codex-keeper/playbook.md +1183 -0
- package/src/agents/meta/convention-keeper/critical-reminders.md +32 -0
- package/src/agents/meta/convention-keeper/critical-requirements.md +32 -0
- package/src/agents/meta/convention-keeper/identity.md +33 -0
- package/src/agents/meta/convention-keeper/metadata.yaml +12 -0
- package/src/agents/meta/convention-keeper/output.md +206 -0
- package/src/agents/meta/convention-keeper/playbook.md +180 -0
- package/src/agents/meta/skill-summoner/critical-reminders.md +112 -0
- package/src/agents/meta/skill-summoner/critical-requirements.md +62 -0
- package/src/agents/meta/skill-summoner/identity.md +31 -0
- package/src/agents/meta/skill-summoner/metadata.yaml +13 -0
- package/src/agents/meta/skill-summoner/output.md +390 -0
- package/src/agents/meta/skill-summoner/playbook.md +1457 -0
- package/src/agents/pattern/pattern-scout/critical-reminders.md +71 -0
- package/src/agents/pattern/pattern-scout/critical-requirements.md +31 -0
- package/src/agents/pattern/pattern-scout/identity.md +25 -0
- package/src/agents/pattern/pattern-scout/metadata.yaml +10 -0
- package/src/agents/pattern/pattern-scout/output.md +290 -0
- package/src/agents/pattern/pattern-scout/playbook.md +1806 -0
- package/src/agents/pattern/web-pattern-critique/critical-reminders.md +30 -0
- package/src/agents/pattern/web-pattern-critique/critical-requirements.md +28 -0
- package/src/agents/pattern/web-pattern-critique/identity.md +41 -0
- package/src/agents/pattern/web-pattern-critique/metadata.yaml +12 -0
- package/src/agents/pattern/web-pattern-critique/output.md +314 -0
- package/src/agents/pattern/web-pattern-critique/playbook.md +572 -0
- package/src/agents/planning/api-pm/critical-reminders.md +48 -0
- package/src/agents/planning/api-pm/critical-requirements.md +41 -0
- package/src/agents/planning/api-pm/identity.md +39 -0
- package/src/agents/planning/api-pm/metadata.yaml +12 -0
- package/src/agents/planning/api-pm/output.md +475 -0
- package/src/agents/planning/api-pm/playbook.md +129 -0
- package/src/agents/planning/web-pm/critical-reminders.md +36 -0
- package/src/agents/planning/web-pm/critical-requirements.md +32 -0
- package/src/agents/planning/web-pm/identity.md +26 -0
- package/src/agents/planning/web-pm/metadata.yaml +12 -0
- package/src/agents/planning/web-pm/output.md +314 -0
- package/src/agents/planning/web-pm/playbook.md +318 -0
- package/src/agents/researcher/api-researcher/critical-reminders.md +27 -0
- package/src/agents/researcher/api-researcher/critical-requirements.md +28 -0
- package/src/agents/researcher/api-researcher/identity.md +71 -0
- package/src/agents/researcher/api-researcher/metadata.yaml +10 -0
- package/src/agents/researcher/api-researcher/output.md +254 -0
- package/src/agents/researcher/api-researcher/playbook.md +201 -0
- package/src/agents/researcher/web-researcher/critical-reminders.md +39 -0
- package/src/agents/researcher/web-researcher/critical-requirements.md +26 -0
- package/src/agents/researcher/web-researcher/identity.md +69 -0
- package/src/agents/researcher/web-researcher/metadata.yaml +10 -0
- package/src/agents/researcher/web-researcher/output.md +241 -0
- package/src/agents/researcher/web-researcher/playbook.md +217 -0
- package/src/agents/reviewer/ai-reviewer/critical-reminders.md +40 -0
- package/src/agents/reviewer/ai-reviewer/critical-requirements.md +37 -0
- package/src/agents/reviewer/ai-reviewer/identity.md +51 -0
- package/src/agents/reviewer/ai-reviewer/metadata.yaml +10 -0
- package/src/agents/reviewer/ai-reviewer/output.md +395 -0
- package/src/agents/reviewer/ai-reviewer/playbook.md +90 -0
- package/src/agents/reviewer/api-reviewer/critical-reminders.md +31 -0
- package/src/agents/reviewer/api-reviewer/critical-requirements.md +27 -0
- package/src/agents/reviewer/api-reviewer/identity.md +51 -0
- package/src/agents/reviewer/api-reviewer/metadata.yaml +12 -0
- package/src/agents/reviewer/api-reviewer/output.md +343 -0
- package/src/agents/reviewer/api-reviewer/playbook.md +288 -0
- package/src/agents/reviewer/cli-reviewer/critical-reminders.md +33 -0
- package/src/agents/reviewer/cli-reviewer/critical-requirements.md +30 -0
- package/src/agents/reviewer/cli-reviewer/identity.md +44 -0
- package/src/agents/reviewer/cli-reviewer/metadata.yaml +12 -0
- package/src/agents/reviewer/cli-reviewer/output.md +414 -0
- package/src/agents/reviewer/cli-reviewer/playbook.md +218 -0
- package/src/agents/reviewer/infra-reviewer/critical-reminders.md +38 -0
- package/src/agents/reviewer/infra-reviewer/critical-requirements.md +38 -0
- package/src/agents/reviewer/infra-reviewer/identity.md +53 -0
- package/src/agents/reviewer/infra-reviewer/metadata.yaml +10 -0
- package/src/agents/reviewer/infra-reviewer/output.md +364 -0
- package/src/agents/reviewer/infra-reviewer/playbook.md +161 -0
- package/src/agents/reviewer/web-reviewer/critical-reminders.md +31 -0
- package/src/agents/reviewer/web-reviewer/critical-requirements.md +26 -0
- package/src/agents/reviewer/web-reviewer/identity.md +40 -0
- package/src/agents/reviewer/web-reviewer/metadata.yaml +12 -0
- package/src/agents/reviewer/web-reviewer/output.md +333 -0
- package/src/agents/reviewer/web-reviewer/playbook.md +156 -0
- package/src/agents/tester/api-tester/critical-reminders.md +41 -0
- package/src/agents/tester/api-tester/critical-requirements.md +41 -0
- package/src/agents/tester/api-tester/identity.md +47 -0
- package/src/agents/tester/api-tester/metadata.yaml +12 -0
- package/src/agents/tester/api-tester/output.md +284 -0
- package/src/agents/tester/api-tester/playbook.md +275 -0
- package/src/agents/tester/cli-tester/critical-reminders.md +36 -0
- package/src/agents/tester/cli-tester/critical-requirements.md +36 -0
- package/src/agents/tester/cli-tester/identity.md +43 -0
- package/src/agents/tester/cli-tester/metadata.yaml +12 -0
- package/src/agents/tester/cli-tester/output.md +313 -0
- package/src/agents/tester/cli-tester/playbook.md +221 -0
- package/src/agents/tester/web-tester/critical-reminders.md +31 -0
- package/src/agents/tester/web-tester/critical-requirements.md +28 -0
- package/src/agents/tester/web-tester/identity.md +41 -0
- package/src/agents/tester/web-tester/metadata.yaml +12 -0
- package/src/agents/tester/web-tester/output.md +321 -0
- package/src/agents/tester/web-tester/playbook.md +428 -0
- package/src/schemas/agent-frontmatter.schema.json +88 -0
- package/src/schemas/agent.schema.json +103 -0
- package/src/schemas/custom-metadata.schema.json +74 -0
- package/src/schemas/hooks.schema.json +47 -0
- package/src/schemas/marketplace.schema.json +119 -0
- package/src/schemas/metadata.schema.json +387 -0
- package/src/schemas/plugin.schema.json +127 -0
- package/src/schemas/project-config.schema.json +189 -0
- package/src/schemas/project-source-config.schema.json +96 -0
- package/src/schemas/skill-frontmatter.schema.json +42 -0
- package/src/schemas/stack.schema.json +191 -0
- package/src/schemas/stacks.schema.json +107 -0
- package/bin/run.js +0 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../node_modules/@jridgewell/sourcemap-codec/src/vlq.ts","../../../node_modules/@jridgewell/sourcemap-codec/src/strings.ts","../../../node_modules/@jridgewell/sourcemap-codec/src/scopes.ts","../../../node_modules/@jridgewell/sourcemap-codec/src/sourcemap-codec.ts","../../../node_modules/magic-string/src/BitSet.js","../../../node_modules/magic-string/src/Chunk.js","../../../node_modules/magic-string/src/SourceMap.js","../../../node_modules/magic-string/src/utils/guessIndent.js","../../../node_modules/magic-string/src/utils/getRelativePath.js","../../../node_modules/magic-string/src/utils/isObject.js","../../../node_modules/magic-string/src/utils/getLocator.js","../../../node_modules/magic-string/src/utils/Mappings.js","../../../node_modules/magic-string/src/MagicString.js","../../../node_modules/magic-string/src/Bundle.js"],"sourcesContent":["import type { StringReader, StringWriter } from './strings';\n\nexport const comma = ','.charCodeAt(0);\nexport const semicolon = ';'.charCodeAt(0);\n\nconst chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\nconst intToChar = new Uint8Array(64); // 64 possible chars.\nconst charToInt = new Uint8Array(128); // z is 122 in ASCII\n\nfor (let i = 0; i < chars.length; i++) {\n const c = chars.charCodeAt(i);\n intToChar[i] = c;\n charToInt[c] = i;\n}\n\nexport function decodeInteger(reader: StringReader, relative: number): number {\n let value = 0;\n let shift = 0;\n let integer = 0;\n\n do {\n const c = reader.next();\n integer = charToInt[c];\n value |= (integer & 31) << shift;\n shift += 5;\n } while (integer & 32);\n\n const shouldNegate = value & 1;\n value >>>= 1;\n\n if (shouldNegate) {\n value = -0x80000000 | -value;\n }\n\n return relative + value;\n}\n\nexport function encodeInteger(builder: StringWriter, num: number, relative: number): number {\n let delta = num - relative;\n\n delta = delta < 0 ? (-delta << 1) | 1 : delta << 1;\n do {\n let clamped = delta & 0b011111;\n delta >>>= 5;\n if (delta > 0) clamped |= 0b100000;\n builder.write(intToChar[clamped]);\n } while (delta > 0);\n\n return num;\n}\n\nexport function hasMoreVlq(reader: StringReader, max: number) {\n if (reader.pos >= max) return false;\n return reader.peek() !== comma;\n}\n","const bufLength = 1024 * 16;\n\n// Provide a fallback for older environments.\nconst td =\n typeof TextDecoder !== 'undefined'\n ? /* #__PURE__ */ new TextDecoder()\n : typeof Buffer !== 'undefined'\n ? {\n decode(buf: Uint8Array): string {\n const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);\n return out.toString();\n },\n }\n : {\n decode(buf: Uint8Array): string {\n let out = '';\n for (let i = 0; i < buf.length; i++) {\n out += String.fromCharCode(buf[i]);\n }\n return out;\n },\n };\n\nexport class StringWriter {\n pos = 0;\n private out = '';\n private buffer = new Uint8Array(bufLength);\n\n write(v: number): void {\n const { buffer } = this;\n buffer[this.pos++] = v;\n if (this.pos === bufLength) {\n this.out += td.decode(buffer);\n this.pos = 0;\n }\n }\n\n flush(): string {\n const { buffer, out, pos } = this;\n return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out;\n }\n}\n\nexport class StringReader {\n pos = 0;\n declare private buffer: string;\n\n constructor(buffer: string) {\n this.buffer = buffer;\n }\n\n next(): number {\n return this.buffer.charCodeAt(this.pos++);\n }\n\n peek(): number {\n return this.buffer.charCodeAt(this.pos);\n }\n\n indexOf(char: string): number {\n const { buffer, pos } = this;\n const idx = buffer.indexOf(char, pos);\n return idx === -1 ? buffer.length : idx;\n }\n}\n","import { StringReader, StringWriter } from './strings';\nimport { comma, decodeInteger, encodeInteger, hasMoreVlq, semicolon } from './vlq';\n\nconst EMPTY: any[] = [];\n\ntype Line = number;\ntype Column = number;\ntype Kind = number;\ntype Name = number;\ntype Var = number;\ntype SourcesIndex = number;\ntype ScopesIndex = number;\n\ntype Mix<A, B, O> = (A & O) | (B & O);\n\nexport type OriginalScope = Mix<\n [Line, Column, Line, Column, Kind],\n [Line, Column, Line, Column, Kind, Name],\n { vars: Var[] }\n>;\n\nexport type GeneratedRange = Mix<\n [Line, Column, Line, Column],\n [Line, Column, Line, Column, SourcesIndex, ScopesIndex],\n {\n callsite: CallSite | null;\n bindings: Binding[];\n isScope: boolean;\n }\n>;\nexport type CallSite = [SourcesIndex, Line, Column];\ntype Binding = BindingExpressionRange[];\nexport type BindingExpressionRange = [Name] | [Name, Line, Column];\n\nexport function decodeOriginalScopes(input: string): OriginalScope[] {\n const { length } = input;\n const reader = new StringReader(input);\n const scopes: OriginalScope[] = [];\n const stack: OriginalScope[] = [];\n let line = 0;\n\n for (; reader.pos < length; reader.pos++) {\n line = decodeInteger(reader, line);\n const column = decodeInteger(reader, 0);\n\n if (!hasMoreVlq(reader, length)) {\n const last = stack.pop()!;\n last[2] = line;\n last[3] = column;\n continue;\n }\n\n const kind = decodeInteger(reader, 0);\n const fields = decodeInteger(reader, 0);\n const hasName = fields & 0b0001;\n\n const scope: OriginalScope = (\n hasName ? [line, column, 0, 0, kind, decodeInteger(reader, 0)] : [line, column, 0, 0, kind]\n ) as OriginalScope;\n\n let vars: Var[] = EMPTY;\n if (hasMoreVlq(reader, length)) {\n vars = [];\n do {\n const varsIndex = decodeInteger(reader, 0);\n vars.push(varsIndex);\n } while (hasMoreVlq(reader, length));\n }\n scope.vars = vars;\n\n scopes.push(scope);\n stack.push(scope);\n }\n\n return scopes;\n}\n\nexport function encodeOriginalScopes(scopes: OriginalScope[]): string {\n const writer = new StringWriter();\n\n for (let i = 0; i < scopes.length; ) {\n i = _encodeOriginalScopes(scopes, i, writer, [0]);\n }\n\n return writer.flush();\n}\n\nfunction _encodeOriginalScopes(\n scopes: OriginalScope[],\n index: number,\n writer: StringWriter,\n state: [\n number, // GenColumn\n ],\n): number {\n const scope = scopes[index];\n const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, 4: kind, vars } = scope;\n\n if (index > 0) writer.write(comma);\n\n state[0] = encodeInteger(writer, startLine, state[0]);\n encodeInteger(writer, startColumn, 0);\n encodeInteger(writer, kind, 0);\n\n const fields = scope.length === 6 ? 0b0001 : 0;\n encodeInteger(writer, fields, 0);\n if (scope.length === 6) encodeInteger(writer, scope[5], 0);\n\n for (const v of vars) {\n encodeInteger(writer, v, 0);\n }\n\n for (index++; index < scopes.length; ) {\n const next = scopes[index];\n const { 0: l, 1: c } = next;\n if (l > endLine || (l === endLine && c >= endColumn)) {\n break;\n }\n index = _encodeOriginalScopes(scopes, index, writer, state);\n }\n\n writer.write(comma);\n state[0] = encodeInteger(writer, endLine, state[0]);\n encodeInteger(writer, endColumn, 0);\n\n return index;\n}\n\nexport function decodeGeneratedRanges(input: string): GeneratedRange[] {\n const { length } = input;\n const reader = new StringReader(input);\n const ranges: GeneratedRange[] = [];\n const stack: GeneratedRange[] = [];\n\n let genLine = 0;\n let definitionSourcesIndex = 0;\n let definitionScopeIndex = 0;\n let callsiteSourcesIndex = 0;\n let callsiteLine = 0;\n let callsiteColumn = 0;\n let bindingLine = 0;\n let bindingColumn = 0;\n\n do {\n const semi = reader.indexOf(';');\n let genColumn = 0;\n\n for (; reader.pos < semi; reader.pos++) {\n genColumn = decodeInteger(reader, genColumn);\n\n if (!hasMoreVlq(reader, semi)) {\n const last = stack.pop()!;\n last[2] = genLine;\n last[3] = genColumn;\n continue;\n }\n\n const fields = decodeInteger(reader, 0);\n const hasDefinition = fields & 0b0001;\n const hasCallsite = fields & 0b0010;\n const hasScope = fields & 0b0100;\n\n let callsite: CallSite | null = null;\n let bindings: Binding[] = EMPTY;\n let range: GeneratedRange;\n if (hasDefinition) {\n const defSourcesIndex = decodeInteger(reader, definitionSourcesIndex);\n definitionScopeIndex = decodeInteger(\n reader,\n definitionSourcesIndex === defSourcesIndex ? definitionScopeIndex : 0,\n );\n\n definitionSourcesIndex = defSourcesIndex;\n range = [genLine, genColumn, 0, 0, defSourcesIndex, definitionScopeIndex] as GeneratedRange;\n } else {\n range = [genLine, genColumn, 0, 0] as GeneratedRange;\n }\n\n range.isScope = !!hasScope;\n\n if (hasCallsite) {\n const prevCsi = callsiteSourcesIndex;\n const prevLine = callsiteLine;\n callsiteSourcesIndex = decodeInteger(reader, callsiteSourcesIndex);\n const sameSource = prevCsi === callsiteSourcesIndex;\n callsiteLine = decodeInteger(reader, sameSource ? callsiteLine : 0);\n callsiteColumn = decodeInteger(\n reader,\n sameSource && prevLine === callsiteLine ? callsiteColumn : 0,\n );\n\n callsite = [callsiteSourcesIndex, callsiteLine, callsiteColumn];\n }\n range.callsite = callsite;\n\n if (hasMoreVlq(reader, semi)) {\n bindings = [];\n do {\n bindingLine = genLine;\n bindingColumn = genColumn;\n const expressionsCount = decodeInteger(reader, 0);\n let expressionRanges: BindingExpressionRange[];\n if (expressionsCount < -1) {\n expressionRanges = [[decodeInteger(reader, 0)]];\n for (let i = -1; i > expressionsCount; i--) {\n const prevBl = bindingLine;\n bindingLine = decodeInteger(reader, bindingLine);\n bindingColumn = decodeInteger(reader, bindingLine === prevBl ? bindingColumn : 0);\n const expression = decodeInteger(reader, 0);\n expressionRanges.push([expression, bindingLine, bindingColumn]);\n }\n } else {\n expressionRanges = [[expressionsCount]];\n }\n bindings.push(expressionRanges);\n } while (hasMoreVlq(reader, semi));\n }\n range.bindings = bindings;\n\n ranges.push(range);\n stack.push(range);\n }\n\n genLine++;\n reader.pos = semi + 1;\n } while (reader.pos < length);\n\n return ranges;\n}\n\nexport function encodeGeneratedRanges(ranges: GeneratedRange[]): string {\n if (ranges.length === 0) return '';\n\n const writer = new StringWriter();\n\n for (let i = 0; i < ranges.length; ) {\n i = _encodeGeneratedRanges(ranges, i, writer, [0, 0, 0, 0, 0, 0, 0]);\n }\n\n return writer.flush();\n}\n\nfunction _encodeGeneratedRanges(\n ranges: GeneratedRange[],\n index: number,\n writer: StringWriter,\n state: [\n number, // GenLine\n number, // GenColumn\n number, // DefSourcesIndex\n number, // DefScopesIndex\n number, // CallSourcesIndex\n number, // CallLine\n number, // CallColumn\n ],\n): number {\n const range = ranges[index];\n const {\n 0: startLine,\n 1: startColumn,\n 2: endLine,\n 3: endColumn,\n isScope,\n callsite,\n bindings,\n } = range;\n\n if (state[0] < startLine) {\n catchupLine(writer, state[0], startLine);\n state[0] = startLine;\n state[1] = 0;\n } else if (index > 0) {\n writer.write(comma);\n }\n\n state[1] = encodeInteger(writer, range[1], state[1]);\n\n const fields =\n (range.length === 6 ? 0b0001 : 0) | (callsite ? 0b0010 : 0) | (isScope ? 0b0100 : 0);\n encodeInteger(writer, fields, 0);\n\n if (range.length === 6) {\n const { 4: sourcesIndex, 5: scopesIndex } = range;\n if (sourcesIndex !== state[2]) {\n state[3] = 0;\n }\n state[2] = encodeInteger(writer, sourcesIndex, state[2]);\n state[3] = encodeInteger(writer, scopesIndex, state[3]);\n }\n\n if (callsite) {\n const { 0: sourcesIndex, 1: callLine, 2: callColumn } = range.callsite!;\n if (sourcesIndex !== state[4]) {\n state[5] = 0;\n state[6] = 0;\n } else if (callLine !== state[5]) {\n state[6] = 0;\n }\n state[4] = encodeInteger(writer, sourcesIndex, state[4]);\n state[5] = encodeInteger(writer, callLine, state[5]);\n state[6] = encodeInteger(writer, callColumn, state[6]);\n }\n\n if (bindings) {\n for (const binding of bindings) {\n if (binding.length > 1) encodeInteger(writer, -binding.length, 0);\n const expression = binding[0][0];\n encodeInteger(writer, expression, 0);\n let bindingStartLine = startLine;\n let bindingStartColumn = startColumn;\n for (let i = 1; i < binding.length; i++) {\n const expRange = binding[i];\n bindingStartLine = encodeInteger(writer, expRange[1]!, bindingStartLine);\n bindingStartColumn = encodeInteger(writer, expRange[2]!, bindingStartColumn);\n encodeInteger(writer, expRange[0]!, 0);\n }\n }\n }\n\n for (index++; index < ranges.length; ) {\n const next = ranges[index];\n const { 0: l, 1: c } = next;\n if (l > endLine || (l === endLine && c >= endColumn)) {\n break;\n }\n index = _encodeGeneratedRanges(ranges, index, writer, state);\n }\n\n if (state[0] < endLine) {\n catchupLine(writer, state[0], endLine);\n state[0] = endLine;\n state[1] = 0;\n } else {\n writer.write(comma);\n }\n state[1] = encodeInteger(writer, endColumn, state[1]);\n\n return index;\n}\n\nfunction catchupLine(writer: StringWriter, lastLine: number, line: number) {\n do {\n writer.write(semicolon);\n } while (++lastLine < line);\n}\n","import { comma, decodeInteger, encodeInteger, hasMoreVlq, semicolon } from './vlq';\nimport { StringWriter, StringReader } from './strings';\n\nexport {\n decodeOriginalScopes,\n encodeOriginalScopes,\n decodeGeneratedRanges,\n encodeGeneratedRanges,\n} from './scopes';\nexport type { OriginalScope, GeneratedRange, CallSite, BindingExpressionRange } from './scopes';\n\nexport type SourceMapSegment =\n | [number]\n | [number, number, number, number]\n | [number, number, number, number, number];\nexport type SourceMapLine = SourceMapSegment[];\nexport type SourceMapMappings = SourceMapLine[];\n\nexport function decode(mappings: string): SourceMapMappings {\n const { length } = mappings;\n const reader = new StringReader(mappings);\n const decoded: SourceMapMappings = [];\n let genColumn = 0;\n let sourcesIndex = 0;\n let sourceLine = 0;\n let sourceColumn = 0;\n let namesIndex = 0;\n\n do {\n const semi = reader.indexOf(';');\n const line: SourceMapLine = [];\n let sorted = true;\n let lastCol = 0;\n genColumn = 0;\n\n while (reader.pos < semi) {\n let seg: SourceMapSegment;\n\n genColumn = decodeInteger(reader, genColumn);\n if (genColumn < lastCol) sorted = false;\n lastCol = genColumn;\n\n if (hasMoreVlq(reader, semi)) {\n sourcesIndex = decodeInteger(reader, sourcesIndex);\n sourceLine = decodeInteger(reader, sourceLine);\n sourceColumn = decodeInteger(reader, sourceColumn);\n\n if (hasMoreVlq(reader, semi)) {\n namesIndex = decodeInteger(reader, namesIndex);\n seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex];\n } else {\n seg = [genColumn, sourcesIndex, sourceLine, sourceColumn];\n }\n } else {\n seg = [genColumn];\n }\n\n line.push(seg);\n reader.pos++;\n }\n\n if (!sorted) sort(line);\n decoded.push(line);\n reader.pos = semi + 1;\n } while (reader.pos <= length);\n\n return decoded;\n}\n\nfunction sort(line: SourceMapSegment[]) {\n line.sort(sortComparator);\n}\n\nfunction sortComparator(a: SourceMapSegment, b: SourceMapSegment): number {\n return a[0] - b[0];\n}\n\nexport function encode(decoded: SourceMapMappings): string;\nexport function encode(decoded: Readonly<SourceMapMappings>): string;\nexport function encode(decoded: Readonly<SourceMapMappings>): string {\n const writer = new StringWriter();\n let sourcesIndex = 0;\n let sourceLine = 0;\n let sourceColumn = 0;\n let namesIndex = 0;\n\n for (let i = 0; i < decoded.length; i++) {\n const line = decoded[i];\n if (i > 0) writer.write(semicolon);\n if (line.length === 0) continue;\n\n let genColumn = 0;\n\n for (let j = 0; j < line.length; j++) {\n const segment = line[j];\n if (j > 0) writer.write(comma);\n\n genColumn = encodeInteger(writer, segment[0], genColumn);\n\n if (segment.length === 1) continue;\n sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex);\n sourceLine = encodeInteger(writer, segment[2], sourceLine);\n sourceColumn = encodeInteger(writer, segment[3], sourceColumn);\n\n if (segment.length === 4) continue;\n namesIndex = encodeInteger(writer, segment[4], namesIndex);\n }\n }\n\n return writer.flush();\n}\n","export default class BitSet {\n\tconstructor(arg) {\n\t\tthis.bits = arg instanceof BitSet ? arg.bits.slice() : [];\n\t}\n\n\tadd(n) {\n\t\tthis.bits[n >> 5] |= 1 << (n & 31);\n\t}\n\n\thas(n) {\n\t\treturn !!(this.bits[n >> 5] & (1 << (n & 31)));\n\t}\n}\n","export default class Chunk {\n\tconstructor(start, end, content) {\n\t\tthis.start = start;\n\t\tthis.end = end;\n\t\tthis.original = content;\n\n\t\tthis.intro = '';\n\t\tthis.outro = '';\n\n\t\tthis.content = content;\n\t\tthis.storeName = false;\n\t\tthis.edited = false;\n\n\t\tif (DEBUG) {\n\t\t\t// we make these non-enumerable, for sanity while debugging\n\t\t\tObject.defineProperties(this, {\n\t\t\t\tprevious: { writable: true, value: null },\n\t\t\t\tnext: { writable: true, value: null },\n\t\t\t});\n\t\t} else {\n\t\t\tthis.previous = null;\n\t\t\tthis.next = null;\n\t\t}\n\t}\n\n\tappendLeft(content) {\n\t\tthis.outro += content;\n\t}\n\n\tappendRight(content) {\n\t\tthis.intro = this.intro + content;\n\t}\n\n\tclone() {\n\t\tconst chunk = new Chunk(this.start, this.end, this.original);\n\n\t\tchunk.intro = this.intro;\n\t\tchunk.outro = this.outro;\n\t\tchunk.content = this.content;\n\t\tchunk.storeName = this.storeName;\n\t\tchunk.edited = this.edited;\n\n\t\treturn chunk;\n\t}\n\n\tcontains(index) {\n\t\treturn this.start < index && index < this.end;\n\t}\n\n\teachNext(fn) {\n\t\tlet chunk = this;\n\t\twhile (chunk) {\n\t\t\tfn(chunk);\n\t\t\tchunk = chunk.next;\n\t\t}\n\t}\n\n\teachPrevious(fn) {\n\t\tlet chunk = this;\n\t\twhile (chunk) {\n\t\t\tfn(chunk);\n\t\t\tchunk = chunk.previous;\n\t\t}\n\t}\n\n\tedit(content, storeName, contentOnly) {\n\t\tthis.content = content;\n\t\tif (!contentOnly) {\n\t\t\tthis.intro = '';\n\t\t\tthis.outro = '';\n\t\t}\n\t\tthis.storeName = storeName;\n\n\t\tthis.edited = true;\n\n\t\treturn this;\n\t}\n\n\tprependLeft(content) {\n\t\tthis.outro = content + this.outro;\n\t}\n\n\tprependRight(content) {\n\t\tthis.intro = content + this.intro;\n\t}\n\n\treset() {\n\t\tthis.intro = '';\n\t\tthis.outro = '';\n\t\tif (this.edited) {\n\t\t\tthis.content = this.original;\n\t\t\tthis.storeName = false;\n\t\t\tthis.edited = false;\n\t\t}\n\t}\n\n\tsplit(index) {\n\t\tconst sliceIndex = index - this.start;\n\n\t\tconst originalBefore = this.original.slice(0, sliceIndex);\n\t\tconst originalAfter = this.original.slice(sliceIndex);\n\n\t\tthis.original = originalBefore;\n\n\t\tconst newChunk = new Chunk(index, this.end, originalAfter);\n\t\tnewChunk.outro = this.outro;\n\t\tthis.outro = '';\n\n\t\tthis.end = index;\n\n\t\tif (this.edited) {\n\t\t\t// after split we should save the edit content record into the correct chunk\n\t\t\t// to make sure sourcemap correct\n\t\t\t// For example:\n\t\t\t// ' test'.trim()\n\t\t\t// split -> ' ' + 'test'\n\t\t\t// ✔️ edit -> '' + 'test'\n\t\t\t// ✖️ edit -> 'test' + ''\n\t\t\t// TODO is this block necessary?...\n\t\t\tnewChunk.edit('', false);\n\t\t\tthis.content = '';\n\t\t} else {\n\t\t\tthis.content = originalBefore;\n\t\t}\n\n\t\tnewChunk.next = this.next;\n\t\tif (newChunk.next) newChunk.next.previous = newChunk;\n\t\tnewChunk.previous = this;\n\t\tthis.next = newChunk;\n\n\t\treturn newChunk;\n\t}\n\n\ttoString() {\n\t\treturn this.intro + this.content + this.outro;\n\t}\n\n\ttrimEnd(rx) {\n\t\tthis.outro = this.outro.replace(rx, '');\n\t\tif (this.outro.length) return true;\n\n\t\tconst trimmed = this.content.replace(rx, '');\n\n\t\tif (trimmed.length) {\n\t\t\tif (trimmed !== this.content) {\n\t\t\t\tthis.split(this.start + trimmed.length).edit('', undefined, true);\n\t\t\t\tif (this.edited) {\n\t\t\t\t\t// save the change, if it has been edited\n\t\t\t\t\tthis.edit(trimmed, this.storeName, true);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} else {\n\t\t\tthis.edit('', undefined, true);\n\n\t\t\tthis.intro = this.intro.replace(rx, '');\n\t\t\tif (this.intro.length) return true;\n\t\t}\n\t}\n\n\ttrimStart(rx) {\n\t\tthis.intro = this.intro.replace(rx, '');\n\t\tif (this.intro.length) return true;\n\n\t\tconst trimmed = this.content.replace(rx, '');\n\n\t\tif (trimmed.length) {\n\t\t\tif (trimmed !== this.content) {\n\t\t\t\tconst newChunk = this.split(this.end - trimmed.length);\n\t\t\t\tif (this.edited) {\n\t\t\t\t\t// save the change, if it has been edited\n\t\t\t\t\tnewChunk.edit(trimmed, this.storeName, true);\n\t\t\t\t}\n\t\t\t\tthis.edit('', undefined, true);\n\t\t\t}\n\t\t\treturn true;\n\t\t} else {\n\t\t\tthis.edit('', undefined, true);\n\n\t\t\tthis.outro = this.outro.replace(rx, '');\n\t\t\tif (this.outro.length) return true;\n\t\t}\n\t}\n}\n","import { encode } from '@jridgewell/sourcemap-codec';\n\nfunction getBtoa() {\n\tif (typeof globalThis !== 'undefined' && typeof globalThis.btoa === 'function') {\n\t\treturn (str) => globalThis.btoa(unescape(encodeURIComponent(str)));\n\t} else if (typeof Buffer === 'function') {\n\t\treturn (str) => Buffer.from(str, 'utf-8').toString('base64');\n\t} else {\n\t\treturn () => {\n\t\t\tthrow new Error('Unsupported environment: `window.btoa` or `Buffer` should be supported.');\n\t\t};\n\t}\n}\n\nconst btoa = /*#__PURE__*/ getBtoa();\n\nexport default class SourceMap {\n\tconstructor(properties) {\n\t\tthis.version = 3;\n\t\tthis.file = properties.file;\n\t\tthis.sources = properties.sources;\n\t\tthis.sourcesContent = properties.sourcesContent;\n\t\tthis.names = properties.names;\n\t\tthis.mappings = encode(properties.mappings);\n\t\tif (typeof properties.x_google_ignoreList !== 'undefined') {\n\t\t\tthis.x_google_ignoreList = properties.x_google_ignoreList;\n\t\t}\n\t\tif (typeof properties.debugId !== 'undefined') {\n\t\t\tthis.debugId = properties.debugId;\n\t\t}\n\t}\n\n\ttoString() {\n\t\treturn JSON.stringify(this);\n\t}\n\n\ttoUrl() {\n\t\treturn 'data:application/json;charset=utf-8;base64,' + btoa(this.toString());\n\t}\n}\n","export default function guessIndent(code) {\n\tconst lines = code.split('\\n');\n\n\tconst tabbed = lines.filter((line) => /^\\t+/.test(line));\n\tconst spaced = lines.filter((line) => /^ {2,}/.test(line));\n\n\tif (tabbed.length === 0 && spaced.length === 0) {\n\t\treturn null;\n\t}\n\n\t// More lines tabbed than spaced? Assume tabs, and\n\t// default to tabs in the case of a tie (or nothing\n\t// to go on)\n\tif (tabbed.length >= spaced.length) {\n\t\treturn '\\t';\n\t}\n\n\t// Otherwise, we need to guess the multiple\n\tconst min = spaced.reduce((previous, current) => {\n\t\tconst numSpaces = /^ +/.exec(current)[0].length;\n\t\treturn Math.min(numSpaces, previous);\n\t}, Infinity);\n\n\treturn new Array(min + 1).join(' ');\n}\n","export default function getRelativePath(from, to) {\n\tconst fromParts = from.split(/[/\\\\]/);\n\tconst toParts = to.split(/[/\\\\]/);\n\n\tfromParts.pop(); // get dirname\n\n\twhile (fromParts[0] === toParts[0]) {\n\t\tfromParts.shift();\n\t\ttoParts.shift();\n\t}\n\n\tif (fromParts.length) {\n\t\tlet i = fromParts.length;\n\t\twhile (i--) fromParts[i] = '..';\n\t}\n\n\treturn fromParts.concat(toParts).join('/');\n}\n","const toString = Object.prototype.toString;\n\nexport default function isObject(thing) {\n\treturn toString.call(thing) === '[object Object]';\n}\n","export default function getLocator(source) {\n\tconst originalLines = source.split('\\n');\n\tconst lineOffsets = [];\n\n\tfor (let i = 0, pos = 0; i < originalLines.length; i++) {\n\t\tlineOffsets.push(pos);\n\t\tpos += originalLines[i].length + 1;\n\t}\n\n\treturn function locate(index) {\n\t\tlet i = 0;\n\t\tlet j = lineOffsets.length;\n\t\twhile (i < j) {\n\t\t\tconst m = (i + j) >> 1;\n\t\t\tif (index < lineOffsets[m]) {\n\t\t\t\tj = m;\n\t\t\t} else {\n\t\t\t\ti = m + 1;\n\t\t\t}\n\t\t}\n\t\tconst line = i - 1;\n\t\tconst column = index - lineOffsets[line];\n\t\treturn { line, column };\n\t};\n}\n","const wordRegex = /\\w/;\n\nexport default class Mappings {\n\tconstructor(hires) {\n\t\tthis.hires = hires;\n\t\tthis.generatedCodeLine = 0;\n\t\tthis.generatedCodeColumn = 0;\n\t\tthis.raw = [];\n\t\tthis.rawSegments = this.raw[this.generatedCodeLine] = [];\n\t\tthis.pending = null;\n\t}\n\n\taddEdit(sourceIndex, content, loc, nameIndex) {\n\t\tif (content.length) {\n\t\t\tconst contentLengthMinusOne = content.length - 1;\n\t\t\tlet contentLineEnd = content.indexOf('\\n', 0);\n\t\t\tlet previousContentLineEnd = -1;\n\t\t\t// Loop through each line in the content and add a segment, but stop if the last line is empty,\n\t\t\t// else code afterwards would fill one line too many\n\t\t\twhile (contentLineEnd >= 0 && contentLengthMinusOne > contentLineEnd) {\n\t\t\t\tconst segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];\n\t\t\t\tif (nameIndex >= 0) {\n\t\t\t\t\tsegment.push(nameIndex);\n\t\t\t\t}\n\t\t\t\tthis.rawSegments.push(segment);\n\n\t\t\t\tthis.generatedCodeLine += 1;\n\t\t\t\tthis.raw[this.generatedCodeLine] = this.rawSegments = [];\n\t\t\t\tthis.generatedCodeColumn = 0;\n\n\t\t\t\tpreviousContentLineEnd = contentLineEnd;\n\t\t\t\tcontentLineEnd = content.indexOf('\\n', contentLineEnd + 1);\n\t\t\t}\n\n\t\t\tconst segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];\n\t\t\tif (nameIndex >= 0) {\n\t\t\t\tsegment.push(nameIndex);\n\t\t\t}\n\t\t\tthis.rawSegments.push(segment);\n\n\t\t\tthis.advance(content.slice(previousContentLineEnd + 1));\n\t\t} else if (this.pending) {\n\t\t\tthis.rawSegments.push(this.pending);\n\t\t\tthis.advance(content);\n\t\t}\n\n\t\tthis.pending = null;\n\t}\n\n\taddUneditedChunk(sourceIndex, chunk, original, loc, sourcemapLocations) {\n\t\tlet originalCharIndex = chunk.start;\n\t\tlet first = true;\n\t\t// when iterating each char, check if it's in a word boundary\n\t\tlet charInHiresBoundary = false;\n\n\t\twhile (originalCharIndex < chunk.end) {\n\t\t\tif (original[originalCharIndex] === '\\n') {\n\t\t\t\tloc.line += 1;\n\t\t\t\tloc.column = 0;\n\t\t\t\tthis.generatedCodeLine += 1;\n\t\t\t\tthis.raw[this.generatedCodeLine] = this.rawSegments = [];\n\t\t\t\tthis.generatedCodeColumn = 0;\n\t\t\t\tfirst = true;\n\t\t\t\tcharInHiresBoundary = false;\n\t\t\t} else {\n\t\t\t\tif (this.hires || first || sourcemapLocations.has(originalCharIndex)) {\n\t\t\t\t\tconst segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];\n\n\t\t\t\t\tif (this.hires === 'boundary') {\n\t\t\t\t\t\t// in hires \"boundary\", group segments per word boundary than per char\n\t\t\t\t\t\tif (wordRegex.test(original[originalCharIndex])) {\n\t\t\t\t\t\t\t// for first char in the boundary found, start the boundary by pushing a segment\n\t\t\t\t\t\t\tif (!charInHiresBoundary) {\n\t\t\t\t\t\t\t\tthis.rawSegments.push(segment);\n\t\t\t\t\t\t\t\tcharInHiresBoundary = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// for non-word char, end the boundary by pushing a segment\n\t\t\t\t\t\t\tthis.rawSegments.push(segment);\n\t\t\t\t\t\t\tcharInHiresBoundary = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.rawSegments.push(segment);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tloc.column += 1;\n\t\t\t\tthis.generatedCodeColumn += 1;\n\t\t\t\tfirst = false;\n\t\t\t}\n\n\t\t\toriginalCharIndex += 1;\n\t\t}\n\n\t\tthis.pending = null;\n\t}\n\n\tadvance(str) {\n\t\tif (!str) return;\n\n\t\tconst lines = str.split('\\n');\n\n\t\tif (lines.length > 1) {\n\t\t\tfor (let i = 0; i < lines.length - 1; i++) {\n\t\t\t\tthis.generatedCodeLine++;\n\t\t\t\tthis.raw[this.generatedCodeLine] = this.rawSegments = [];\n\t\t\t}\n\t\t\tthis.generatedCodeColumn = 0;\n\t\t}\n\n\t\tthis.generatedCodeColumn += lines[lines.length - 1].length;\n\t}\n}\n","import BitSet from './BitSet.js';\nimport Chunk from './Chunk.js';\nimport SourceMap from './SourceMap.js';\nimport guessIndent from './utils/guessIndent.js';\nimport getRelativePath from './utils/getRelativePath.js';\nimport isObject from './utils/isObject.js';\nimport getLocator from './utils/getLocator.js';\nimport Mappings from './utils/Mappings.js';\nimport Stats from './utils/Stats.js';\n\nconst n = '\\n';\n\nconst warned = {\n\tinsertLeft: false,\n\tinsertRight: false,\n\tstoreName: false,\n};\n\nexport default class MagicString {\n\tconstructor(string, options = {}) {\n\t\tconst chunk = new Chunk(0, string.length, string);\n\n\t\tObject.defineProperties(this, {\n\t\t\toriginal: { writable: true, value: string },\n\t\t\toutro: { writable: true, value: '' },\n\t\t\tintro: { writable: true, value: '' },\n\t\t\tfirstChunk: { writable: true, value: chunk },\n\t\t\tlastChunk: { writable: true, value: chunk },\n\t\t\tlastSearchedChunk: { writable: true, value: chunk },\n\t\t\tbyStart: { writable: true, value: {} },\n\t\t\tbyEnd: { writable: true, value: {} },\n\t\t\tfilename: { writable: true, value: options.filename },\n\t\t\tindentExclusionRanges: { writable: true, value: options.indentExclusionRanges },\n\t\t\tsourcemapLocations: { writable: true, value: new BitSet() },\n\t\t\tstoredNames: { writable: true, value: {} },\n\t\t\tindentStr: { writable: true, value: undefined },\n\t\t\tignoreList: { writable: true, value: options.ignoreList },\n\t\t\toffset: { writable: true, value: options.offset || 0 },\n\t\t});\n\n\t\tif (DEBUG) {\n\t\t\tObject.defineProperty(this, 'stats', { value: new Stats() });\n\t\t}\n\n\t\tthis.byStart[0] = chunk;\n\t\tthis.byEnd[string.length] = chunk;\n\t}\n\n\taddSourcemapLocation(char) {\n\t\tthis.sourcemapLocations.add(char);\n\t}\n\n\tappend(content) {\n\t\tif (typeof content !== 'string') throw new TypeError('outro content must be a string');\n\n\t\tthis.outro += content;\n\t\treturn this;\n\t}\n\n\tappendLeft(index, content) {\n\t\tindex = index + this.offset;\n\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('appendLeft');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byEnd[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.appendLeft(content);\n\t\t} else {\n\t\t\tthis.intro += content;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('appendLeft');\n\t\treturn this;\n\t}\n\n\tappendRight(index, content) {\n\t\tindex = index + this.offset;\n\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('appendRight');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byStart[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.appendRight(content);\n\t\t} else {\n\t\t\tthis.outro += content;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('appendRight');\n\t\treturn this;\n\t}\n\n\tclone() {\n\t\tconst cloned = new MagicString(this.original, { filename: this.filename, offset: this.offset });\n\n\t\tlet originalChunk = this.firstChunk;\n\t\tlet clonedChunk = (cloned.firstChunk = cloned.lastSearchedChunk = originalChunk.clone());\n\n\t\twhile (originalChunk) {\n\t\t\tcloned.byStart[clonedChunk.start] = clonedChunk;\n\t\t\tcloned.byEnd[clonedChunk.end] = clonedChunk;\n\n\t\t\tconst nextOriginalChunk = originalChunk.next;\n\t\t\tconst nextClonedChunk = nextOriginalChunk && nextOriginalChunk.clone();\n\n\t\t\tif (nextClonedChunk) {\n\t\t\t\tclonedChunk.next = nextClonedChunk;\n\t\t\t\tnextClonedChunk.previous = clonedChunk;\n\n\t\t\t\tclonedChunk = nextClonedChunk;\n\t\t\t}\n\n\t\t\toriginalChunk = nextOriginalChunk;\n\t\t}\n\n\t\tcloned.lastChunk = clonedChunk;\n\n\t\tif (this.indentExclusionRanges) {\n\t\t\tcloned.indentExclusionRanges = this.indentExclusionRanges.slice();\n\t\t}\n\n\t\tcloned.sourcemapLocations = new BitSet(this.sourcemapLocations);\n\n\t\tcloned.intro = this.intro;\n\t\tcloned.outro = this.outro;\n\n\t\treturn cloned;\n\t}\n\n\tgenerateDecodedMap(options) {\n\t\toptions = options || {};\n\n\t\tconst sourceIndex = 0;\n\t\tconst names = Object.keys(this.storedNames);\n\t\tconst mappings = new Mappings(options.hires);\n\n\t\tconst locate = getLocator(this.original);\n\n\t\tif (this.intro) {\n\t\t\tmappings.advance(this.intro);\n\t\t}\n\n\t\tthis.firstChunk.eachNext((chunk) => {\n\t\t\tconst loc = locate(chunk.start);\n\n\t\t\tif (chunk.intro.length) mappings.advance(chunk.intro);\n\n\t\t\tif (chunk.edited) {\n\t\t\t\tmappings.addEdit(\n\t\t\t\t\tsourceIndex,\n\t\t\t\t\tchunk.content,\n\t\t\t\t\tloc,\n\t\t\t\t\tchunk.storeName ? names.indexOf(chunk.original) : -1,\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tmappings.addUneditedChunk(sourceIndex, chunk, this.original, loc, this.sourcemapLocations);\n\t\t\t}\n\n\t\t\tif (chunk.outro.length) mappings.advance(chunk.outro);\n\t\t});\n\n\t\tif (this.outro) {\n\t\t\tmappings.advance(this.outro);\n\t\t}\n\n\t\treturn {\n\t\t\tfile: options.file ? options.file.split(/[/\\\\]/).pop() : undefined,\n\t\t\tsources: [\n\t\t\t\toptions.source ? getRelativePath(options.file || '', options.source) : options.file || '',\n\t\t\t],\n\t\t\tsourcesContent: options.includeContent ? [this.original] : undefined,\n\t\t\tnames,\n\t\t\tmappings: mappings.raw,\n\t\t\tx_google_ignoreList: this.ignoreList ? [sourceIndex] : undefined,\n\t\t};\n\t}\n\n\tgenerateMap(options) {\n\t\treturn new SourceMap(this.generateDecodedMap(options));\n\t}\n\n\t_ensureindentStr() {\n\t\tif (this.indentStr === undefined) {\n\t\t\tthis.indentStr = guessIndent(this.original);\n\t\t}\n\t}\n\n\t_getRawIndentString() {\n\t\tthis._ensureindentStr();\n\t\treturn this.indentStr;\n\t}\n\n\tgetIndentString() {\n\t\tthis._ensureindentStr();\n\t\treturn this.indentStr === null ? '\\t' : this.indentStr;\n\t}\n\n\tindent(indentStr, options) {\n\t\tconst pattern = /^[^\\r\\n]/gm;\n\n\t\tif (isObject(indentStr)) {\n\t\t\toptions = indentStr;\n\t\t\tindentStr = undefined;\n\t\t}\n\n\t\tif (indentStr === undefined) {\n\t\t\tthis._ensureindentStr();\n\t\t\tindentStr = this.indentStr || '\\t';\n\t\t}\n\n\t\tif (indentStr === '') return this; // noop\n\n\t\toptions = options || {};\n\n\t\t// Process exclusion ranges\n\t\tconst isExcluded = {};\n\n\t\tif (options.exclude) {\n\t\t\tconst exclusions =\n\t\t\t\ttypeof options.exclude[0] === 'number' ? [options.exclude] : options.exclude;\n\t\t\texclusions.forEach((exclusion) => {\n\t\t\t\tfor (let i = exclusion[0]; i < exclusion[1]; i += 1) {\n\t\t\t\t\tisExcluded[i] = true;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tlet shouldIndentNextCharacter = options.indentStart !== false;\n\t\tconst replacer = (match) => {\n\t\t\tif (shouldIndentNextCharacter) return `${indentStr}${match}`;\n\t\t\tshouldIndentNextCharacter = true;\n\t\t\treturn match;\n\t\t};\n\n\t\tthis.intro = this.intro.replace(pattern, replacer);\n\n\t\tlet charIndex = 0;\n\t\tlet chunk = this.firstChunk;\n\n\t\twhile (chunk) {\n\t\t\tconst end = chunk.end;\n\n\t\t\tif (chunk.edited) {\n\t\t\t\tif (!isExcluded[charIndex]) {\n\t\t\t\t\tchunk.content = chunk.content.replace(pattern, replacer);\n\n\t\t\t\t\tif (chunk.content.length) {\n\t\t\t\t\t\tshouldIndentNextCharacter = chunk.content[chunk.content.length - 1] === '\\n';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcharIndex = chunk.start;\n\n\t\t\t\twhile (charIndex < end) {\n\t\t\t\t\tif (!isExcluded[charIndex]) {\n\t\t\t\t\t\tconst char = this.original[charIndex];\n\n\t\t\t\t\t\tif (char === '\\n') {\n\t\t\t\t\t\t\tshouldIndentNextCharacter = true;\n\t\t\t\t\t\t} else if (char !== '\\r' && shouldIndentNextCharacter) {\n\t\t\t\t\t\t\tshouldIndentNextCharacter = false;\n\n\t\t\t\t\t\t\tif (charIndex === chunk.start) {\n\t\t\t\t\t\t\t\tchunk.prependRight(indentStr);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis._splitChunk(chunk, charIndex);\n\t\t\t\t\t\t\t\tchunk = chunk.next;\n\t\t\t\t\t\t\t\tchunk.prependRight(indentStr);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tcharIndex += 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcharIndex = chunk.end;\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\tthis.outro = this.outro.replace(pattern, replacer);\n\n\t\treturn this;\n\t}\n\n\tinsert() {\n\t\tthrow new Error(\n\t\t\t'magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)',\n\t\t);\n\t}\n\n\tinsertLeft(index, content) {\n\t\tif (!warned.insertLeft) {\n\t\t\tconsole.warn(\n\t\t\t\t'magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead',\n\t\t\t);\n\t\t\twarned.insertLeft = true;\n\t\t}\n\n\t\treturn this.appendLeft(index, content);\n\t}\n\n\tinsertRight(index, content) {\n\t\tif (!warned.insertRight) {\n\t\t\tconsole.warn(\n\t\t\t\t'magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead',\n\t\t\t);\n\t\t\twarned.insertRight = true;\n\t\t}\n\n\t\treturn this.prependRight(index, content);\n\t}\n\n\tmove(start, end, index) {\n\t\tstart = start + this.offset;\n\t\tend = end + this.offset;\n\t\tindex = index + this.offset;\n\n\t\tif (index >= start && index <= end) throw new Error('Cannot move a selection inside itself');\n\n\t\tif (DEBUG) this.stats.time('move');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\t\tthis._split(index);\n\n\t\tconst first = this.byStart[start];\n\t\tconst last = this.byEnd[end];\n\n\t\tconst oldLeft = first.previous;\n\t\tconst oldRight = last.next;\n\n\t\tconst newRight = this.byStart[index];\n\t\tif (!newRight && last === this.lastChunk) return this;\n\t\tconst newLeft = newRight ? newRight.previous : this.lastChunk;\n\n\t\tif (oldLeft) oldLeft.next = oldRight;\n\t\tif (oldRight) oldRight.previous = oldLeft;\n\n\t\tif (newLeft) newLeft.next = first;\n\t\tif (newRight) newRight.previous = last;\n\n\t\tif (!first.previous) this.firstChunk = last.next;\n\t\tif (!last.next) {\n\t\t\tthis.lastChunk = first.previous;\n\t\t\tthis.lastChunk.next = null;\n\t\t}\n\n\t\tfirst.previous = newLeft;\n\t\tlast.next = newRight || null;\n\n\t\tif (!newLeft) this.firstChunk = first;\n\t\tif (!newRight) this.lastChunk = last;\n\n\t\tif (DEBUG) this.stats.timeEnd('move');\n\t\treturn this;\n\t}\n\n\toverwrite(start, end, content, options) {\n\t\toptions = options || {};\n\t\treturn this.update(start, end, content, { ...options, overwrite: !options.contentOnly });\n\t}\n\n\tupdate(start, end, content, options) {\n\t\tstart = start + this.offset;\n\t\tend = end + this.offset;\n\n\t\tif (typeof content !== 'string') throw new TypeError('replacement content must be a string');\n\n\t\tif (this.original.length !== 0) {\n\t\t\twhile (start < 0) start += this.original.length;\n\t\t\twhile (end < 0) end += this.original.length;\n\t\t}\n\n\t\tif (end > this.original.length) throw new Error('end is out of bounds');\n\t\tif (start === end)\n\t\t\tthrow new Error(\n\t\t\t\t'Cannot overwrite a zero-length range – use appendLeft or prependRight instead',\n\t\t\t);\n\n\t\tif (DEBUG) this.stats.time('overwrite');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\n\t\tif (options === true) {\n\t\t\tif (!warned.storeName) {\n\t\t\t\tconsole.warn(\n\t\t\t\t\t'The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string',\n\t\t\t\t);\n\t\t\t\twarned.storeName = true;\n\t\t\t}\n\n\t\t\toptions = { storeName: true };\n\t\t}\n\t\tconst storeName = options !== undefined ? options.storeName : false;\n\t\tconst overwrite = options !== undefined ? options.overwrite : false;\n\n\t\tif (storeName) {\n\t\t\tconst original = this.original.slice(start, end);\n\t\t\tObject.defineProperty(this.storedNames, original, {\n\t\t\t\twritable: true,\n\t\t\t\tvalue: true,\n\t\t\t\tenumerable: true,\n\t\t\t});\n\t\t}\n\n\t\tconst first = this.byStart[start];\n\t\tconst last = this.byEnd[end];\n\n\t\tif (first) {\n\t\t\tlet chunk = first;\n\t\t\twhile (chunk !== last) {\n\t\t\t\tif (chunk.next !== this.byStart[chunk.end]) {\n\t\t\t\t\tthrow new Error('Cannot overwrite across a split point');\n\t\t\t\t}\n\t\t\t\tchunk = chunk.next;\n\t\t\t\tchunk.edit('', false);\n\t\t\t}\n\n\t\t\tfirst.edit(content, storeName, !overwrite);\n\t\t} else {\n\t\t\t// must be inserting at the end\n\t\t\tconst newChunk = new Chunk(start, end, '').edit(content, storeName);\n\n\t\t\t// TODO last chunk in the array may not be the last chunk, if it's moved...\n\t\t\tlast.next = newChunk;\n\t\t\tnewChunk.previous = last;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('overwrite');\n\t\treturn this;\n\t}\n\n\tprepend(content) {\n\t\tif (typeof content !== 'string') throw new TypeError('outro content must be a string');\n\n\t\tthis.intro = content + this.intro;\n\t\treturn this;\n\t}\n\n\tprependLeft(index, content) {\n\t\tindex = index + this.offset;\n\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('insertRight');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byEnd[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.prependLeft(content);\n\t\t} else {\n\t\t\tthis.intro = content + this.intro;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('insertRight');\n\t\treturn this;\n\t}\n\n\tprependRight(index, content) {\n\t\tindex = index + this.offset;\n\n\t\tif (typeof content !== 'string') throw new TypeError('inserted content must be a string');\n\n\t\tif (DEBUG) this.stats.time('insertRight');\n\n\t\tthis._split(index);\n\n\t\tconst chunk = this.byStart[index];\n\n\t\tif (chunk) {\n\t\t\tchunk.prependRight(content);\n\t\t} else {\n\t\t\tthis.outro = content + this.outro;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('insertRight');\n\t\treturn this;\n\t}\n\n\tremove(start, end) {\n\t\tstart = start + this.offset;\n\t\tend = end + this.offset;\n\n\t\tif (this.original.length !== 0) {\n\t\t\twhile (start < 0) start += this.original.length;\n\t\t\twhile (end < 0) end += this.original.length;\n\t\t}\n\n\t\tif (start === end) return this;\n\n\t\tif (start < 0 || end > this.original.length) throw new Error('Character is out of bounds');\n\t\tif (start > end) throw new Error('end must be greater than start');\n\n\t\tif (DEBUG) this.stats.time('remove');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\n\t\tlet chunk = this.byStart[start];\n\n\t\twhile (chunk) {\n\t\t\tchunk.intro = '';\n\t\t\tchunk.outro = '';\n\t\t\tchunk.edit('');\n\n\t\t\tchunk = end > chunk.end ? this.byStart[chunk.end] : null;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('remove');\n\t\treturn this;\n\t}\n\n\treset(start, end) {\n\t\tstart = start + this.offset;\n\t\tend = end + this.offset;\n\n\t\tif (this.original.length !== 0) {\n\t\t\twhile (start < 0) start += this.original.length;\n\t\t\twhile (end < 0) end += this.original.length;\n\t\t}\n\n\t\tif (start === end) return this;\n\n\t\tif (start < 0 || end > this.original.length) throw new Error('Character is out of bounds');\n\t\tif (start > end) throw new Error('end must be greater than start');\n\n\t\tif (DEBUG) this.stats.time('reset');\n\n\t\tthis._split(start);\n\t\tthis._split(end);\n\n\t\tlet chunk = this.byStart[start];\n\n\t\twhile (chunk) {\n\t\t\tchunk.reset();\n\n\t\t\tchunk = end > chunk.end ? this.byStart[chunk.end] : null;\n\t\t}\n\n\t\tif (DEBUG) this.stats.timeEnd('reset');\n\t\treturn this;\n\t}\n\n\tlastChar() {\n\t\tif (this.outro.length) return this.outro[this.outro.length - 1];\n\t\tlet chunk = this.lastChunk;\n\t\tdo {\n\t\t\tif (chunk.outro.length) return chunk.outro[chunk.outro.length - 1];\n\t\t\tif (chunk.content.length) return chunk.content[chunk.content.length - 1];\n\t\t\tif (chunk.intro.length) return chunk.intro[chunk.intro.length - 1];\n\t\t} while ((chunk = chunk.previous));\n\t\tif (this.intro.length) return this.intro[this.intro.length - 1];\n\t\treturn '';\n\t}\n\n\tlastLine() {\n\t\tlet lineIndex = this.outro.lastIndexOf(n);\n\t\tif (lineIndex !== -1) return this.outro.substr(lineIndex + 1);\n\t\tlet lineStr = this.outro;\n\t\tlet chunk = this.lastChunk;\n\t\tdo {\n\t\t\tif (chunk.outro.length > 0) {\n\t\t\t\tlineIndex = chunk.outro.lastIndexOf(n);\n\t\t\t\tif (lineIndex !== -1) return chunk.outro.substr(lineIndex + 1) + lineStr;\n\t\t\t\tlineStr = chunk.outro + lineStr;\n\t\t\t}\n\n\t\t\tif (chunk.content.length > 0) {\n\t\t\t\tlineIndex = chunk.content.lastIndexOf(n);\n\t\t\t\tif (lineIndex !== -1) return chunk.content.substr(lineIndex + 1) + lineStr;\n\t\t\t\tlineStr = chunk.content + lineStr;\n\t\t\t}\n\n\t\t\tif (chunk.intro.length > 0) {\n\t\t\t\tlineIndex = chunk.intro.lastIndexOf(n);\n\t\t\t\tif (lineIndex !== -1) return chunk.intro.substr(lineIndex + 1) + lineStr;\n\t\t\t\tlineStr = chunk.intro + lineStr;\n\t\t\t}\n\t\t} while ((chunk = chunk.previous));\n\t\tlineIndex = this.intro.lastIndexOf(n);\n\t\tif (lineIndex !== -1) return this.intro.substr(lineIndex + 1) + lineStr;\n\t\treturn this.intro + lineStr;\n\t}\n\n\tslice(start = 0, end = this.original.length - this.offset) {\n\t\tstart = start + this.offset;\n\t\tend = end + this.offset;\n\n\t\tif (this.original.length !== 0) {\n\t\t\twhile (start < 0) start += this.original.length;\n\t\t\twhile (end < 0) end += this.original.length;\n\t\t}\n\n\t\tlet result = '';\n\n\t\t// find start chunk\n\t\tlet chunk = this.firstChunk;\n\t\twhile (chunk && (chunk.start > start || chunk.end <= start)) {\n\t\t\t// found end chunk before start\n\t\t\tif (chunk.start < end && chunk.end >= end) {\n\t\t\t\treturn result;\n\t\t\t}\n\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\tif (chunk && chunk.edited && chunk.start !== start)\n\t\t\tthrow new Error(`Cannot use replaced character ${start} as slice start anchor.`);\n\n\t\tconst startChunk = chunk;\n\t\twhile (chunk) {\n\t\t\tif (chunk.intro && (startChunk !== chunk || chunk.start === start)) {\n\t\t\t\tresult += chunk.intro;\n\t\t\t}\n\n\t\t\tconst containsEnd = chunk.start < end && chunk.end >= end;\n\t\t\tif (containsEnd && chunk.edited && chunk.end !== end)\n\t\t\t\tthrow new Error(`Cannot use replaced character ${end} as slice end anchor.`);\n\n\t\t\tconst sliceStart = startChunk === chunk ? start - chunk.start : 0;\n\t\t\tconst sliceEnd = containsEnd ? chunk.content.length + end - chunk.end : chunk.content.length;\n\n\t\t\tresult += chunk.content.slice(sliceStart, sliceEnd);\n\n\t\t\tif (chunk.outro && (!containsEnd || chunk.end === end)) {\n\t\t\t\tresult += chunk.outro;\n\t\t\t}\n\n\t\t\tif (containsEnd) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t// TODO deprecate this? not really very useful\n\tsnip(start, end) {\n\t\tconst clone = this.clone();\n\t\tclone.remove(0, start);\n\t\tclone.remove(end, clone.original.length);\n\n\t\treturn clone;\n\t}\n\n\t_split(index) {\n\t\tif (this.byStart[index] || this.byEnd[index]) return;\n\n\t\tif (DEBUG) this.stats.time('_split');\n\n\t\tlet chunk = this.lastSearchedChunk;\n\t\tlet previousChunk = chunk;\n\t\tconst searchForward = index > chunk.end;\n\n\t\twhile (chunk) {\n\t\t\tif (chunk.contains(index)) return this._splitChunk(chunk, index);\n\n\t\t\tchunk = searchForward ? this.byStart[chunk.end] : this.byEnd[chunk.start];\n\n\t\t\t// Prevent infinite loop (e.g. via empty chunks, where start === end)\n\t\t\tif (chunk === previousChunk) return;\n\n\t\t\tpreviousChunk = chunk;\n\t\t}\n\t}\n\n\t_splitChunk(chunk, index) {\n\t\tif (chunk.edited && chunk.content.length) {\n\t\t\t// zero-length edited chunks are a special case (overlapping replacements)\n\t\t\tconst loc = getLocator(this.original)(index);\n\t\t\tthrow new Error(\n\t\t\t\t`Cannot split a chunk that has already been edited (${loc.line}:${loc.column} – \"${chunk.original}\")`,\n\t\t\t);\n\t\t}\n\n\t\tconst newChunk = chunk.split(index);\n\n\t\tthis.byEnd[index] = chunk;\n\t\tthis.byStart[index] = newChunk;\n\t\tthis.byEnd[newChunk.end] = newChunk;\n\n\t\tif (chunk === this.lastChunk) this.lastChunk = newChunk;\n\n\t\tthis.lastSearchedChunk = chunk;\n\t\tif (DEBUG) this.stats.timeEnd('_split');\n\t\treturn true;\n\t}\n\n\ttoString() {\n\t\tlet str = this.intro;\n\n\t\tlet chunk = this.firstChunk;\n\t\twhile (chunk) {\n\t\t\tstr += chunk.toString();\n\t\t\tchunk = chunk.next;\n\t\t}\n\n\t\treturn str + this.outro;\n\t}\n\n\tisEmpty() {\n\t\tlet chunk = this.firstChunk;\n\t\tdo {\n\t\t\tif (\n\t\t\t\t(chunk.intro.length && chunk.intro.trim()) ||\n\t\t\t\t(chunk.content.length && chunk.content.trim()) ||\n\t\t\t\t(chunk.outro.length && chunk.outro.trim())\n\t\t\t)\n\t\t\t\treturn false;\n\t\t} while ((chunk = chunk.next));\n\t\treturn true;\n\t}\n\n\tlength() {\n\t\tlet chunk = this.firstChunk;\n\t\tlet length = 0;\n\t\tdo {\n\t\t\tlength += chunk.intro.length + chunk.content.length + chunk.outro.length;\n\t\t} while ((chunk = chunk.next));\n\t\treturn length;\n\t}\n\n\ttrimLines() {\n\t\treturn this.trim('[\\\\r\\\\n]');\n\t}\n\n\ttrim(charType) {\n\t\treturn this.trimStart(charType).trimEnd(charType);\n\t}\n\n\ttrimEndAborted(charType) {\n\t\tconst rx = new RegExp((charType || '\\\\s') + '+$');\n\n\t\tthis.outro = this.outro.replace(rx, '');\n\t\tif (this.outro.length) return true;\n\n\t\tlet chunk = this.lastChunk;\n\n\t\tdo {\n\t\t\tconst end = chunk.end;\n\t\t\tconst aborted = chunk.trimEnd(rx);\n\n\t\t\t// if chunk was trimmed, we have a new lastChunk\n\t\t\tif (chunk.end !== end) {\n\t\t\t\tif (this.lastChunk === chunk) {\n\t\t\t\t\tthis.lastChunk = chunk.next;\n\t\t\t\t}\n\n\t\t\t\tthis.byEnd[chunk.end] = chunk;\n\t\t\t\tthis.byStart[chunk.next.start] = chunk.next;\n\t\t\t\tthis.byEnd[chunk.next.end] = chunk.next;\n\t\t\t}\n\n\t\t\tif (aborted) return true;\n\t\t\tchunk = chunk.previous;\n\t\t} while (chunk);\n\n\t\treturn false;\n\t}\n\n\ttrimEnd(charType) {\n\t\tthis.trimEndAborted(charType);\n\t\treturn this;\n\t}\n\ttrimStartAborted(charType) {\n\t\tconst rx = new RegExp('^' + (charType || '\\\\s') + '+');\n\n\t\tthis.intro = this.intro.replace(rx, '');\n\t\tif (this.intro.length) return true;\n\n\t\tlet chunk = this.firstChunk;\n\n\t\tdo {\n\t\t\tconst end = chunk.end;\n\t\t\tconst aborted = chunk.trimStart(rx);\n\n\t\t\tif (chunk.end !== end) {\n\t\t\t\t// special case...\n\t\t\t\tif (chunk === this.lastChunk) this.lastChunk = chunk.next;\n\n\t\t\t\tthis.byEnd[chunk.end] = chunk;\n\t\t\t\tthis.byStart[chunk.next.start] = chunk.next;\n\t\t\t\tthis.byEnd[chunk.next.end] = chunk.next;\n\t\t\t}\n\n\t\t\tif (aborted) return true;\n\t\t\tchunk = chunk.next;\n\t\t} while (chunk);\n\n\t\treturn false;\n\t}\n\n\ttrimStart(charType) {\n\t\tthis.trimStartAborted(charType);\n\t\treturn this;\n\t}\n\n\thasChanged() {\n\t\treturn this.original !== this.toString();\n\t}\n\n\t_replaceRegexp(searchValue, replacement) {\n\t\tfunction getReplacement(match, str) {\n\t\t\tif (typeof replacement === 'string') {\n\t\t\t\treturn replacement.replace(/\\$(\\$|&|\\d+)/g, (_, i) => {\n\t\t\t\t\t// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#specifying_a_string_as_a_parameter\n\t\t\t\t\tif (i === '$') return '$';\n\t\t\t\t\tif (i === '&') return match[0];\n\t\t\t\t\tconst num = +i;\n\t\t\t\t\tif (num < match.length) return match[+i];\n\t\t\t\t\treturn `$${i}`;\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treturn replacement(...match, match.index, str, match.groups);\n\t\t\t}\n\t\t}\n\t\tfunction matchAll(re, str) {\n\t\t\tlet match;\n\t\t\tconst matches = [];\n\t\t\twhile ((match = re.exec(str))) {\n\t\t\t\tmatches.push(match);\n\t\t\t}\n\t\t\treturn matches;\n\t\t}\n\t\tif (searchValue.global) {\n\t\t\tconst matches = matchAll(searchValue, this.original);\n\t\t\tmatches.forEach((match) => {\n\t\t\t\tif (match.index != null) {\n\t\t\t\t\tconst replacement = getReplacement(match, this.original);\n\t\t\t\t\tif (replacement !== match[0]) {\n\t\t\t\t\t\tthis.overwrite(match.index, match.index + match[0].length, replacement);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tconst match = this.original.match(searchValue);\n\t\t\tif (match && match.index != null) {\n\t\t\t\tconst replacement = getReplacement(match, this.original);\n\t\t\t\tif (replacement !== match[0]) {\n\t\t\t\t\tthis.overwrite(match.index, match.index + match[0].length, replacement);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t}\n\n\t_replaceString(string, replacement) {\n\t\tconst { original } = this;\n\t\tconst index = original.indexOf(string);\n\n\t\tif (index !== -1) {\n\t\t\tif (typeof replacement === 'function') {\n\t\t\t\treplacement = replacement(string, index, original);\n\t\t\t}\n\t\t\tif (string !== replacement) {\n\t\t\t\tthis.overwrite(index, index + string.length, replacement);\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t}\n\n\treplace(searchValue, replacement) {\n\t\tif (typeof searchValue === 'string') {\n\t\t\treturn this._replaceString(searchValue, replacement);\n\t\t}\n\n\t\treturn this._replaceRegexp(searchValue, replacement);\n\t}\n\n\t_replaceAllString(string, replacement) {\n\t\tconst { original } = this;\n\t\tconst stringLength = string.length;\n\t\tfor (\n\t\t\tlet index = original.indexOf(string);\n\t\t\tindex !== -1;\n\t\t\tindex = original.indexOf(string, index + stringLength)\n\t\t) {\n\t\t\tconst previous = original.slice(index, index + stringLength);\n\t\t\tlet _replacement = replacement;\n\t\t\tif (typeof replacement === 'function') {\n\t\t\t\t_replacement = replacement(previous, index, original);\n\t\t\t}\n\t\t\tif (previous !== _replacement) this.overwrite(index, index + stringLength, _replacement);\n\t\t}\n\n\t\treturn this;\n\t}\n\n\treplaceAll(searchValue, replacement) {\n\t\tif (typeof searchValue === 'string') {\n\t\t\treturn this._replaceAllString(searchValue, replacement);\n\t\t}\n\n\t\tif (!searchValue.global) {\n\t\t\tthrow new TypeError(\n\t\t\t\t'MagicString.prototype.replaceAll called with a non-global RegExp argument',\n\t\t\t);\n\t\t}\n\n\t\treturn this._replaceRegexp(searchValue, replacement);\n\t}\n}\n","import MagicString from './MagicString.js';\nimport SourceMap from './SourceMap.js';\nimport getRelativePath from './utils/getRelativePath.js';\nimport isObject from './utils/isObject.js';\nimport getLocator from './utils/getLocator.js';\nimport Mappings from './utils/Mappings.js';\n\nconst hasOwnProp = Object.prototype.hasOwnProperty;\n\nexport default class Bundle {\n\tconstructor(options = {}) {\n\t\tthis.intro = options.intro || '';\n\t\tthis.separator = options.separator !== undefined ? options.separator : '\\n';\n\t\tthis.sources = [];\n\t\tthis.uniqueSources = [];\n\t\tthis.uniqueSourceIndexByFilename = {};\n\t}\n\n\taddSource(source) {\n\t\tif (source instanceof MagicString) {\n\t\t\treturn this.addSource({\n\t\t\t\tcontent: source,\n\t\t\t\tfilename: source.filename,\n\t\t\t\tseparator: this.separator,\n\t\t\t});\n\t\t}\n\n\t\tif (!isObject(source) || !source.content) {\n\t\t\tthrow new Error(\n\t\t\t\t'bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`',\n\t\t\t);\n\t\t}\n\n\t\t['filename', 'ignoreList', 'indentExclusionRanges', 'separator'].forEach((option) => {\n\t\t\tif (!hasOwnProp.call(source, option)) source[option] = source.content[option];\n\t\t});\n\n\t\tif (source.separator === undefined) {\n\t\t\t// TODO there's a bunch of this sort of thing, needs cleaning up\n\t\t\tsource.separator = this.separator;\n\t\t}\n\n\t\tif (source.filename) {\n\t\t\tif (!hasOwnProp.call(this.uniqueSourceIndexByFilename, source.filename)) {\n\t\t\t\tthis.uniqueSourceIndexByFilename[source.filename] = this.uniqueSources.length;\n\t\t\t\tthis.uniqueSources.push({ filename: source.filename, content: source.content.original });\n\t\t\t} else {\n\t\t\t\tconst uniqueSource = this.uniqueSources[this.uniqueSourceIndexByFilename[source.filename]];\n\t\t\t\tif (source.content.original !== uniqueSource.content) {\n\t\t\t\t\tthrow new Error(`Illegal source: same filename (${source.filename}), different contents`);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.sources.push(source);\n\t\treturn this;\n\t}\n\n\tappend(str, options) {\n\t\tthis.addSource({\n\t\t\tcontent: new MagicString(str),\n\t\t\tseparator: (options && options.separator) || '',\n\t\t});\n\n\t\treturn this;\n\t}\n\n\tclone() {\n\t\tconst bundle = new Bundle({\n\t\t\tintro: this.intro,\n\t\t\tseparator: this.separator,\n\t\t});\n\n\t\tthis.sources.forEach((source) => {\n\t\t\tbundle.addSource({\n\t\t\t\tfilename: source.filename,\n\t\t\t\tcontent: source.content.clone(),\n\t\t\t\tseparator: source.separator,\n\t\t\t});\n\t\t});\n\n\t\treturn bundle;\n\t}\n\n\tgenerateDecodedMap(options = {}) {\n\t\tconst names = [];\n\t\tlet x_google_ignoreList = undefined;\n\t\tthis.sources.forEach((source) => {\n\t\t\tObject.keys(source.content.storedNames).forEach((name) => {\n\t\t\t\tif (!~names.indexOf(name)) names.push(name);\n\t\t\t});\n\t\t});\n\n\t\tconst mappings = new Mappings(options.hires);\n\n\t\tif (this.intro) {\n\t\t\tmappings.advance(this.intro);\n\t\t}\n\n\t\tthis.sources.forEach((source, i) => {\n\t\t\tif (i > 0) {\n\t\t\t\tmappings.advance(this.separator);\n\t\t\t}\n\n\t\t\tconst sourceIndex = source.filename ? this.uniqueSourceIndexByFilename[source.filename] : -1;\n\t\t\tconst magicString = source.content;\n\t\t\tconst locate = getLocator(magicString.original);\n\n\t\t\tif (magicString.intro) {\n\t\t\t\tmappings.advance(magicString.intro);\n\t\t\t}\n\n\t\t\tmagicString.firstChunk.eachNext((chunk) => {\n\t\t\t\tconst loc = locate(chunk.start);\n\n\t\t\t\tif (chunk.intro.length) mappings.advance(chunk.intro);\n\n\t\t\t\tif (source.filename) {\n\t\t\t\t\tif (chunk.edited) {\n\t\t\t\t\t\tmappings.addEdit(\n\t\t\t\t\t\t\tsourceIndex,\n\t\t\t\t\t\t\tchunk.content,\n\t\t\t\t\t\t\tloc,\n\t\t\t\t\t\t\tchunk.storeName ? names.indexOf(chunk.original) : -1,\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmappings.addUneditedChunk(\n\t\t\t\t\t\t\tsourceIndex,\n\t\t\t\t\t\t\tchunk,\n\t\t\t\t\t\t\tmagicString.original,\n\t\t\t\t\t\t\tloc,\n\t\t\t\t\t\t\tmagicString.sourcemapLocations,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tmappings.advance(chunk.content);\n\t\t\t\t}\n\n\t\t\t\tif (chunk.outro.length) mappings.advance(chunk.outro);\n\t\t\t});\n\n\t\t\tif (magicString.outro) {\n\t\t\t\tmappings.advance(magicString.outro);\n\t\t\t}\n\n\t\t\tif (source.ignoreList && sourceIndex !== -1) {\n\t\t\t\tif (x_google_ignoreList === undefined) {\n\t\t\t\t\tx_google_ignoreList = [];\n\t\t\t\t}\n\t\t\t\tx_google_ignoreList.push(sourceIndex);\n\t\t\t}\n\t\t});\n\n\t\treturn {\n\t\t\tfile: options.file ? options.file.split(/[/\\\\]/).pop() : undefined,\n\t\t\tsources: this.uniqueSources.map((source) => {\n\t\t\t\treturn options.file ? getRelativePath(options.file, source.filename) : source.filename;\n\t\t\t}),\n\t\t\tsourcesContent: this.uniqueSources.map((source) => {\n\t\t\t\treturn options.includeContent ? source.content : null;\n\t\t\t}),\n\t\t\tnames,\n\t\t\tmappings: mappings.raw,\n\t\t\tx_google_ignoreList,\n\t\t};\n\t}\n\n\tgenerateMap(options) {\n\t\treturn new SourceMap(this.generateDecodedMap(options));\n\t}\n\n\tgetIndentString() {\n\t\tconst indentStringCounts = {};\n\n\t\tthis.sources.forEach((source) => {\n\t\t\tconst indentStr = source.content._getRawIndentString();\n\n\t\t\tif (indentStr === null) return;\n\n\t\t\tif (!indentStringCounts[indentStr]) indentStringCounts[indentStr] = 0;\n\t\t\tindentStringCounts[indentStr] += 1;\n\t\t});\n\n\t\treturn (\n\t\t\tObject.keys(indentStringCounts).sort((a, b) => {\n\t\t\t\treturn indentStringCounts[a] - indentStringCounts[b];\n\t\t\t})[0] || '\\t'\n\t\t);\n\t}\n\n\tindent(indentStr) {\n\t\tif (!arguments.length) {\n\t\t\tindentStr = this.getIndentString();\n\t\t}\n\n\t\tif (indentStr === '') return this; // noop\n\n\t\tlet trailingNewline = !this.intro || this.intro.slice(-1) === '\\n';\n\n\t\tthis.sources.forEach((source, i) => {\n\t\t\tconst separator = source.separator !== undefined ? source.separator : this.separator;\n\t\t\tconst indentStart = trailingNewline || (i > 0 && /\\r?\\n$/.test(separator));\n\n\t\t\tsource.content.indent(indentStr, {\n\t\t\t\texclude: source.indentExclusionRanges,\n\t\t\t\tindentStart, //: trailingNewline || /\\r?\\n$/.test( separator ) //true///\\r?\\n/.test( separator )\n\t\t\t});\n\n\t\t\ttrailingNewline = source.content.lastChar() === '\\n';\n\t\t});\n\n\t\tif (this.intro) {\n\t\t\tthis.intro =\n\t\t\t\tindentStr +\n\t\t\t\tthis.intro.replace(/^[^\\n]/gm, (match, index) => {\n\t\t\t\t\treturn index > 0 ? indentStr + match : match;\n\t\t\t\t});\n\t\t}\n\n\t\treturn this;\n\t}\n\n\tprepend(str) {\n\t\tthis.intro = str + this.intro;\n\t\treturn this;\n\t}\n\n\ttoString() {\n\t\tconst body = this.sources\n\t\t\t.map((source, i) => {\n\t\t\t\tconst separator = source.separator !== undefined ? source.separator : this.separator;\n\t\t\t\tconst str = (i > 0 ? separator : '') + source.content.toString();\n\n\t\t\t\treturn str;\n\t\t\t})\n\t\t\t.join('');\n\n\t\treturn this.intro + body;\n\t}\n\n\tisEmpty() {\n\t\tif (this.intro.length && this.intro.trim()) return false;\n\t\tif (this.sources.some((source) => !source.content.isEmpty())) return false;\n\t\treturn true;\n\t}\n\n\tlength() {\n\t\treturn this.sources.reduce(\n\t\t\t(length, source) => length + source.content.length(),\n\t\t\tthis.intro.length,\n\t\t);\n\t}\n\n\ttrimLines() {\n\t\treturn this.trim('[\\\\r\\\\n]');\n\t}\n\n\ttrim(charType) {\n\t\treturn this.trimStart(charType).trimEnd(charType);\n\t}\n\n\ttrimStart(charType) {\n\t\tconst rx = new RegExp('^' + (charType || '\\\\s') + '+');\n\t\tthis.intro = this.intro.replace(rx, '');\n\n\t\tif (!this.intro) {\n\t\t\tlet source;\n\t\t\tlet i = 0;\n\n\t\t\tdo {\n\t\t\t\tsource = this.sources[i++];\n\t\t\t\tif (!source) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} while (!source.content.trimStartAborted(charType));\n\t\t}\n\n\t\treturn this;\n\t}\n\n\ttrimEnd(charType) {\n\t\tconst rx = new RegExp((charType || '\\\\s') + '+$');\n\n\t\tlet source;\n\t\tlet i = this.sources.length - 1;\n\n\t\tdo {\n\t\t\tsource = this.sources[i--];\n\t\t\tif (!source) {\n\t\t\t\tthis.intro = this.intro.replace(rx, '');\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (!source.content.trimEndAborted(charType));\n\n\t\treturn this;\n\t}\n}\n"],"mappings":";;;;;;;;;;AAEO,IAAM,QAAQ,IAAI,WAAW,CAAC;AAC9B,IAAM,YAAY,IAAI,WAAW,CAA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|
6
|
+
import "./chunk-CDMHSHBN.js";
|
|
7
|
+
import "./chunk-VIFZ6NFH.js";
|
|
8
|
+
import "./chunk-YKKIJHZB.js";
|
|
9
|
+
import "./chunk-KH7MOIM5.js";
|
|
10
|
+
import "./chunk-3LIU2ZEF.js";
|
|
11
|
+
import "./chunk-DJAZE4PD.js";
|
|
12
|
+
import "./chunk-VEP23B5W.js";
|
|
13
|
+
import "./chunk-O5ASLZ2K.js";
|
|
14
|
+
import "./chunk-YU2VGX5R.js";
|
|
15
|
+
import "./chunk-P56WJ5FA.js";
|
|
16
|
+
export {
|
|
17
|
+
recompilePropagatedProjectAgents,
|
|
18
|
+
recompileRegisteredProjectAgents
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=recompile-project-agents-VYQJ6UZB.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
convertStackToResolvedStack,
|
|
4
|
+
extractSourceName,
|
|
5
|
+
loadSkillsMatrixFromSource,
|
|
6
|
+
mergeLocalSkillsIntoMatrix
|
|
7
|
+
} from "./chunk-KH7MOIM5.js";
|
|
8
|
+
import "./chunk-3LIU2ZEF.js";
|
|
9
|
+
import "./chunk-DJAZE4PD.js";
|
|
10
|
+
import "./chunk-VEP23B5W.js";
|
|
11
|
+
import "./chunk-O5ASLZ2K.js";
|
|
12
|
+
import "./chunk-YU2VGX5R.js";
|
|
13
|
+
import "./chunk-P56WJ5FA.js";
|
|
14
|
+
export {
|
|
15
|
+
convertStackToResolvedStack,
|
|
16
|
+
extractSourceName,
|
|
17
|
+
loadSkillsMatrixFromSource,
|
|
18
|
+
mergeLocalSkillsIntoMatrix
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=source-loader-VVHMQEX5.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
addSource,
|
|
4
|
+
getSourceSummary,
|
|
5
|
+
removeSource
|
|
6
|
+
} from "./chunk-KH7MOIM5.js";
|
|
7
|
+
import "./chunk-3LIU2ZEF.js";
|
|
8
|
+
import "./chunk-DJAZE4PD.js";
|
|
9
|
+
import "./chunk-VEP23B5W.js";
|
|
10
|
+
import "./chunk-O5ASLZ2K.js";
|
|
11
|
+
import "./chunk-YU2VGX5R.js";
|
|
12
|
+
import "./chunk-P56WJ5FA.js";
|
|
13
|
+
export {
|
|
14
|
+
addSource,
|
|
15
|
+
getSourceSummary,
|
|
16
|
+
removeSource
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=source-manager-TPDXV5FO.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: {{ agent.name }}
|
|
3
|
+
description: {{ agent.description }}
|
|
4
|
+
tools: {{ agent.tools | join: ", " }}
|
|
5
|
+
{% if agent.disallowed_tools.size > 0 %}disallowedTools: {{ agent.disallowed_tools | join: ", " }}
|
|
6
|
+
{% endif %}model: {{ agent.model | default: "inherit" }}
|
|
7
|
+
{% if agent.effort %}effort: {{ agent.effort }}
|
|
8
|
+
{% endif %}permissionMode: {{ agent.permission_mode | default: "default" }}
|
|
9
|
+
{% if preloadedSkillIds.size > 0 %}skills:
|
|
10
|
+
{% for skillId in preloadedSkillIds %} - {{ skillId }}
|
|
11
|
+
{% endfor %}{% endif %}---
|
|
12
|
+
|
|
13
|
+
# {{ agent.title }}
|
|
14
|
+
|
|
15
|
+
<role>
|
|
16
|
+
{{ identity }}
|
|
17
|
+
</role>
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
<core_principles>
|
|
22
|
+
**1. Investigation First**
|
|
23
|
+
Never speculate. Read the actual code before making claims. Base all work strictly on what you find in the files.
|
|
24
|
+
|
|
25
|
+
**2. Follow Existing Patterns**
|
|
26
|
+
Use what's already there. Match the style, structure, and conventions of similar code. Don't introduce new patterns.
|
|
27
|
+
|
|
28
|
+
**3. Minimal Necessary Changes**
|
|
29
|
+
Make surgical edits. Change only what's required to meet the specification. Leave everything else untouched.
|
|
30
|
+
|
|
31
|
+
**4. Anti-Over-Engineering**
|
|
32
|
+
Simple solutions. Use existing utilities. Avoid abstractions. If it's not explicitly required, don't add it.
|
|
33
|
+
|
|
34
|
+
**5. Verify Everything**
|
|
35
|
+
Test your work. Run the tests. Check the success criteria. Provide evidence that requirements are met.
|
|
36
|
+
|
|
37
|
+
**DISPLAY ALL 5 CORE PRINCIPLES AT THE START OF EVERY RESPONSE TO MAINTAIN INSTRUCTION CONTINUITY.**
|
|
38
|
+
</core_principles>
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
<methodologies>
|
|
43
|
+
|
|
44
|
+
{% render "methodologies/investigation-requirements" %}
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
{% render "methodologies/anti-over-engineering" %}
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
{% render "methodologies/write-verification" %}
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
{% render "methodologies/success-criteria" %}
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
{% render "methodologies/context-management" %}
|
|
61
|
+
|
|
62
|
+
</methodologies>
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
{% if criticalRequirementsTop != "" %}
|
|
67
|
+
<critical_requirements>
|
|
68
|
+
{{ criticalRequirementsTop }}
|
|
69
|
+
</critical_requirements>
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
{% endif %}
|
|
74
|
+
{% if dynamicSkills.size > 0 %}
|
|
75
|
+
<skill_activation_protocol>
|
|
76
|
+
## Skill Activation Protocol
|
|
77
|
+
|
|
78
|
+
**BEFORE implementing ANY task, you MUST follow this three-step protocol for dynamic skills.**
|
|
79
|
+
|
|
80
|
+
### Step 1 - EVALUATE
|
|
81
|
+
|
|
82
|
+
For EACH skill listed below, you MUST explicitly state in your response:
|
|
83
|
+
|
|
84
|
+
| Skill | Relevant? | Reason |
|
|
85
|
+
|-------|-----------|--------|
|
|
86
|
+
| [skill-id] | YES / NO | One sentence explaining why |
|
|
87
|
+
|
|
88
|
+
Do this for EVERY skill. No exceptions. Skipping evaluation = skipping knowledge.
|
|
89
|
+
|
|
90
|
+
### Step 2 - ACTIVATE
|
|
91
|
+
|
|
92
|
+
For EVERY skill you marked **YES**, you MUST invoke the Skill tool **IMMEDIATELY**.
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
skill: "[skill-id]"
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
**Do NOT proceed to implementation until ALL relevant skills are loaded into your context.**
|
|
99
|
+
|
|
100
|
+
### Step 3 - IMPLEMENT
|
|
101
|
+
|
|
102
|
+
**ONLY after** Step 1 (evaluation) and Step 2 (activation) are complete, begin your implementation.
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
**CRITICAL WARNING:**
|
|
107
|
+
|
|
108
|
+
Your evaluation in Step 1 is **COMPLETELY WORTHLESS** unless you actually **ACTIVATE** the skills in Step 2.
|
|
109
|
+
|
|
110
|
+
- Saying "YES, this skill is relevant" without invoking `skill: "[skill-id]"` means that knowledge is **NOT AVAILABLE TO YOU**
|
|
111
|
+
- The skill content **DOES NOT EXIST** in your context until you explicitly load it
|
|
112
|
+
- You are **LYING TO YOURSELF** if you claim a skill is relevant but don't load it
|
|
113
|
+
- Proceeding to implementation without loading relevant skills means you will **MISS PATTERNS, VIOLATE CONVENTIONS, AND PRODUCE INFERIOR CODE**
|
|
114
|
+
|
|
115
|
+
**The Skill tool exists for a reason. USE IT.**
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## Available Skills (Require Loading)
|
|
120
|
+
|
|
121
|
+
{% for skill in dynamicSkills %}
|
|
122
|
+
### {{ skill.id }}
|
|
123
|
+
- Description: {{ skill.description }}
|
|
124
|
+
- Invoke: `skill: "{{ skill.pluginRef | default: skill.id }}"`
|
|
125
|
+
- Use when: {{ skill.usage }}
|
|
126
|
+
|
|
127
|
+
{% endfor %}
|
|
128
|
+
</skill_activation_protocol>
|
|
129
|
+
{% else %}
|
|
130
|
+
<skills_note>
|
|
131
|
+
All skills for this agent are preloaded via frontmatter. No additional skill activation required.
|
|
132
|
+
</skills_note>
|
|
133
|
+
{% endif %}
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
{{ playbook }}
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## Standards and Conventions
|
|
142
|
+
|
|
143
|
+
All code must follow established patterns and conventions:
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
{{ output }}
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
{% if criticalReminders != "" %}
|
|
152
|
+
<critical_reminders>
|
|
153
|
+
{{ criticalReminders }}
|
|
154
|
+
</critical_reminders>
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
{% endif %}
|
|
159
|
+
**DISPLAY ALL 5 CORE PRINCIPLES AT THE START OF EVERY RESPONSE TO MAINTAIN INSTRUCTION CONTINUITY.**
|
|
160
|
+
|
|
161
|
+
**ALWAYS RE-READ FILES AFTER EDITING TO VERIFY CHANGES WERE WRITTEN. NEVER REPORT SUCCESS WITHOUT VERIFICATION.**
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
<anti_over_engineering>
|
|
2
|
+
|
|
3
|
+
**Your job is surgical implementation, not architectural innovation.**
|
|
4
|
+
|
|
5
|
+
Analyze thoroughly and examine similar areas of the codebase to ensure your proposed approach fits seamlessly with the established patterns and architecture. Aim to make only minimal and necessary changes, avoiding any disruption to the existing design.
|
|
6
|
+
|
|
7
|
+
### What to NEVER Do (Unless Explicitly Requested)
|
|
8
|
+
|
|
9
|
+
**Don't create new abstractions:**
|
|
10
|
+
|
|
11
|
+
- No new base classes, factories, or helper utilities
|
|
12
|
+
- No "for future flexibility" code
|
|
13
|
+
- Use what exists - don't build new infrastructure
|
|
14
|
+
- Never create new utility functions when existing ones work
|
|
15
|
+
|
|
16
|
+
**Don't add unrequested features:**
|
|
17
|
+
|
|
18
|
+
- Stick to the exact requirements
|
|
19
|
+
- "While I'm here" syndrome is forbidden
|
|
20
|
+
- Every line must be justified by the spec
|
|
21
|
+
|
|
22
|
+
**Don't refactor existing code:**
|
|
23
|
+
|
|
24
|
+
- Leave working code alone
|
|
25
|
+
- Only touch what the spec says to change
|
|
26
|
+
- Refactoring is a separate task, not your job
|
|
27
|
+
|
|
28
|
+
**Don't optimize prematurely:**
|
|
29
|
+
|
|
30
|
+
- Don't add caching unless asked
|
|
31
|
+
- Don't rewrite algorithms unless broken
|
|
32
|
+
- Existing performance is acceptable
|
|
33
|
+
|
|
34
|
+
**Don't introduce new patterns:**
|
|
35
|
+
|
|
36
|
+
- Follow what's already there
|
|
37
|
+
- Consistency > "better" ways
|
|
38
|
+
- If the codebase uses pattern X, use pattern X
|
|
39
|
+
|
|
40
|
+
**Don't create complex state management:**
|
|
41
|
+
|
|
42
|
+
- For simple features, use simple solutions
|
|
43
|
+
- Match the complexity level of similar features
|
|
44
|
+
|
|
45
|
+
### What TO Do
|
|
46
|
+
|
|
47
|
+
**Use existing utilities:**
|
|
48
|
+
|
|
49
|
+
- Search the codebase for existing solutions
|
|
50
|
+
- Check utility functions in `/lib` or `/utils`
|
|
51
|
+
- Check helper functions in similar components
|
|
52
|
+
- Check shared services and modules
|
|
53
|
+
- Reuse components, functions, types
|
|
54
|
+
- Ask before creating anything new
|
|
55
|
+
|
|
56
|
+
**Make minimal changes:**
|
|
57
|
+
|
|
58
|
+
- Change only what's broken or missing
|
|
59
|
+
- Ask yourself: What's the smallest change that solves this?
|
|
60
|
+
- Am I modifying more files than necessary?
|
|
61
|
+
- Could I use an existing pattern instead?
|
|
62
|
+
- Preserve existing structure and style
|
|
63
|
+
- Leave the rest untouched
|
|
64
|
+
|
|
65
|
+
**Use as few lines of code as possible:**
|
|
66
|
+
|
|
67
|
+
- While maintaining clarity and following existing patterns
|
|
68
|
+
|
|
69
|
+
**Follow established conventions:**
|
|
70
|
+
|
|
71
|
+
- Match naming, formatting, organization
|
|
72
|
+
- Use the same libraries and approaches
|
|
73
|
+
- When in doubt, copy nearby code
|
|
74
|
+
|
|
75
|
+
**Follow patterns in referenced example files exactly:**
|
|
76
|
+
|
|
77
|
+
- When spec says "follow auth.py", match its structure precisely
|
|
78
|
+
|
|
79
|
+
**Question complexity:**
|
|
80
|
+
|
|
81
|
+
- If your solution feels complex, it probably is
|
|
82
|
+
- Simpler is almost always better
|
|
83
|
+
- Ask for clarification if unclear
|
|
84
|
+
|
|
85
|
+
**Focus on solving the stated problem only:**
|
|
86
|
+
|
|
87
|
+
- **(Do not change anything not explicitly mentioned in the specification)**
|
|
88
|
+
- This prevents 70%+ of unwanted refactoring
|
|
89
|
+
|
|
90
|
+
</anti_over_engineering>
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
<decision_framework>
|
|
95
|
+
|
|
96
|
+
## Decision Framework
|
|
97
|
+
|
|
98
|
+
Before writing code, ask yourself:
|
|
99
|
+
|
|
100
|
+
```xml
|
|
101
|
+
<complexity_check>
|
|
102
|
+
1. Does an existing utility do this? -> Use it
|
|
103
|
+
2. Is this explicitly in the spec? -> If no, don't add it
|
|
104
|
+
3. Does this change existing working code? -> Minimize it
|
|
105
|
+
4. Am I introducing a new pattern? -> Stop, use existing patterns
|
|
106
|
+
5. Could this be simpler? -> Make it simpler
|
|
107
|
+
</complexity_check>
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### When in Doubt
|
|
111
|
+
|
|
112
|
+
**Ask yourself:** "Am I solving the problem or improving the codebase?"
|
|
113
|
+
|
|
114
|
+
- Solving the problem = good
|
|
115
|
+
- Improving the codebase = only if explicitly asked
|
|
116
|
+
|
|
117
|
+
**Remember: Every line of code is a liability.** Less code = less to maintain = better.
|
|
118
|
+
|
|
119
|
+
**Remember: Code that doesn't exist can't break.**
|
|
120
|
+
|
|
121
|
+
</decision_framework>
|