@imolko/ultra-agent 0.1.0-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +93 -0
- package/bin/cli.js +2 -0
- package/dist-node/bin.d.ts +2 -0
- package/dist-node/bin.d.ts.map +1 -0
- package/dist-node/bin.js +5 -0
- package/dist-node/bin.js.map +1 -0
- package/dist-node/cli.d.ts +41 -0
- package/dist-node/cli.d.ts.map +1 -0
- package/dist-node/cli.js +170 -0
- package/dist-node/cli.js.map +1 -0
- package/dist-node/index.d.ts +14 -0
- package/dist-node/index.d.ts.map +1 -0
- package/dist-node/index.js +40 -0
- package/dist-node/index.js.map +1 -0
- package/dist-node/init-lint.d.ts +43 -0
- package/dist-node/init-lint.d.ts.map +1 -0
- package/dist-node/init-lint.js +84 -0
- package/dist-node/init-lint.js.map +1 -0
- package/dist-node/manifest.d.ts +33 -0
- package/dist-node/manifest.d.ts.map +1 -0
- package/dist-node/manifest.js +59 -0
- package/dist-node/manifest.js.map +1 -0
- package/dist-node/materializer.d.ts +52 -0
- package/dist-node/materializer.d.ts.map +1 -0
- package/dist-node/materializer.js +194 -0
- package/dist-node/materializer.js.map +1 -0
- package/dist-node/package-root.d.ts +5 -0
- package/dist-node/package-root.d.ts.map +1 -0
- package/dist-node/package-root.js +17 -0
- package/dist-node/package-root.js.map +1 -0
- package/dist-node/payload.d.ts +22 -0
- package/dist-node/payload.d.ts.map +1 -0
- package/dist-node/payload.js +49 -0
- package/dist-node/payload.js.map +1 -0
- package/dist-node/pointer-hub.d.ts +22 -0
- package/dist-node/pointer-hub.d.ts.map +1 -0
- package/dist-node/pointer-hub.js +50 -0
- package/dist-node/pointer-hub.js.map +1 -0
- package/dist-node/publication.cli.d.ts +9 -0
- package/dist-node/publication.cli.d.ts.map +1 -0
- package/dist-node/publication.cli.js +17 -0
- package/dist-node/publication.cli.js.map +1 -0
- package/dist-node/publication.d.ts +23 -0
- package/dist-node/publication.d.ts.map +1 -0
- package/dist-node/publication.js +47 -0
- package/dist-node/publication.js.map +1 -0
- package/dist-node/reconcile.cli.d.ts +11 -0
- package/dist-node/reconcile.cli.d.ts.map +1 -0
- package/dist-node/reconcile.cli.js +39 -0
- package/dist-node/reconcile.cli.js.map +1 -0
- package/dist-node/reconcile.d.ts +30 -0
- package/dist-node/reconcile.d.ts.map +1 -0
- package/dist-node/reconcile.js +51 -0
- package/dist-node/reconcile.js.map +1 -0
- package/dist-node/ship/prompts/fix.md +22 -0
- package/dist-node/ship/prompts/implement.md +34 -0
- package/dist-node/ship/prompts/review.md +28 -0
- package/dist-node/ship/ship.agent.d.ts +22 -0
- package/dist-node/ship/ship.agent.d.ts.map +1 -0
- package/dist-node/ship/ship.agent.js +142 -0
- package/dist-node/ship/ship.agent.js.map +1 -0
- package/dist-node/ship/ship.args.d.ts +15 -0
- package/dist-node/ship/ship.args.d.ts.map +1 -0
- package/dist-node/ship/ship.args.js +93 -0
- package/dist-node/ship/ship.args.js.map +1 -0
- package/dist-node/ship/ship.context.d.ts +12 -0
- package/dist-node/ship/ship.context.d.ts.map +1 -0
- package/dist-node/ship/ship.context.js +3 -0
- package/dist-node/ship/ship.context.js.map +1 -0
- package/dist-node/ship/ship.d.ts +4 -0
- package/dist-node/ship/ship.d.ts.map +1 -0
- package/dist-node/ship/ship.js +221 -0
- package/dist-node/ship/ship.js.map +1 -0
- package/dist-node/ship/ship.mr.d.ts +9 -0
- package/dist-node/ship/ship.mr.d.ts.map +1 -0
- package/dist-node/ship/ship.mr.js +171 -0
- package/dist-node/ship/ship.mr.js.map +1 -0
- package/dist-node/ship/ship.output.d.ts +9 -0
- package/dist-node/ship/ship.output.d.ts.map +1 -0
- package/dist-node/ship/ship.output.js +21 -0
- package/dist-node/ship/ship.output.js.map +1 -0
- package/dist-node/ship/ship.tracker.d.ts +37 -0
- package/dist-node/ship/ship.tracker.d.ts.map +1 -0
- package/dist-node/ship/ship.tracker.js +220 -0
- package/dist-node/ship/ship.tracker.js.map +1 -0
- package/dist-node/version.cli.d.ts +9 -0
- package/dist-node/version.cli.d.ts.map +1 -0
- package/dist-node/version.cli.js +30 -0
- package/dist-node/version.cli.js.map +1 -0
- package/dist-node/version.d.ts +24 -0
- package/dist-node/version.d.ts.map +1 -0
- package/dist-node/version.js +76 -0
- package/dist-node/version.js.map +1 -0
- package/docs/adr/ADR-0000-proceso-y-formato-de-adrs.md +115 -0
- package/docs/adr/foundational/A-001-clean-architecture-4-capas.md +88 -0
- package/docs/adr/foundational/A-002-cqrs-semantico.md +58 -0
- package/docs/adr/foundational/A-003-tdd.md +97 -0
- package/docs/adr/foundational/A-005-either-return-custom-methods.md +80 -0
- package/docs/adr/foundational/A-006-feature-completion-criteria.md +47 -0
- package/docs/adr/foundational/A-007-data-contract-fail-fast.md +109 -0
- package/docs/adr/foundational/A-008-bounded-context-decomposition.md +130 -0
- package/docs/adr/foundational/A-009-use-case-taxonomy.md +99 -0
- package/docs/adr/foundational/A-010-propiedad-emision-eventos-dominio.md +95 -0
- package/docs/adr/foundational/A-011-characterization-first-refactoring.md +90 -0
- package/docs/adr/foundational/A-012-helm-mecanismo-primario-despliegue.md +67 -0
- package/docs/adr/foundational/A-013-contrato-settings-unica-fuente-configuracion.md +74 -0
- package/docs/adr/foundational/A-014-generacion-artefactos-despliegue-desde-contrato-settings.md +75 -0
- package/docs/adr/foundational/A-015-cloudevents-estandar-eventos.md +85 -0
- package/docs/adr/foundational/A-016-cicd-gitlab-pipeline-raiz-pipelines-modulares.md +92 -0
- package/docs/adr/foundational/A-017-taxonomia-repositorios-librerias-sistemas.md +93 -0
- package/docs/adr/foundational/A-018-practicas-build-imagenes-docker.md +85 -0
- package/docs/adr/foundational/A-019-convenciones-autoria-helm-charts.md +97 -0
- package/docs/adr/foundational/A-020-entorno-desarrollo-estandarizado-devcontainer.md +58 -0
- package/docs/adr/foundational/A-022-formato-reporte-tests-ctrf.md +55 -0
- package/docs/adr/foundational/A-023-composicion-bloques-prompt-agentes.md +65 -0
- package/docs/adr/foundational/A-024-features-slices-verticales-portables.md +41 -0
- package/docs/adr/foundational/A-025-anatomia-mecanica-feature-puertos-adaptadores-drivers.md +104 -0
- package/docs/adr/foundational/A-026-infraestructura-compartida.md +44 -0
- package/docs/adr/foundational/A-027-patron-wiring-entry-point.md +67 -0
- package/docs/adr/foundational/A-029-verbos-intencion-metodos-lado-negocio.md +54 -0
- package/docs/adr/foundational/A-030-global-development-tooling.md +52 -0
- package/docs/adr/foundational/A-031-ubiquitous-language.md +64 -0
- package/docs/adr/foundational/A-032-domain-artifact-documentation-format.md +128 -0
- package/docs/adr/foundational/A-033-estandar-mensajes-commit.md +127 -0
- package/docs/adr/foundational/A-034-canonical-skill-set.md +64 -0
- package/docs/adr/foundational/A-035-captura-ideas-reanclaje-candies.md +51 -0
- package/docs/adr/foundational/A-036-adopcion-wayfinder-ortogonalidad-labels.md +37 -0
- package/docs/adr/foundational/A-037-formalizacion-taxonomia-labels.md +98 -0
- package/docs/adr/foundational/A-038-issues-referencian-skills-nombre.md +54 -0
- package/docs/adr/foundational/A-039-pipeline-ship-issues-hijos-spec.md +64 -0
- package/docs/adr/foundational/A-040-punteros-configuracion-repo-skills.md +44 -0
- package/docs/adr/foundational/A-041-estrategia-de-ramas.md +45 -0
- package/docs/adr/foundational/A-042-formato-documentos-issue-tracker.md +78 -0
- package/docs/adr/foundational/A-043-vocabulario-etiquetas-adrs.md +42 -0
- package/docs/adr/foundational/A-044-composicion-funcional-procesos-operaciones.md +44 -0
- package/docs/adr/foundational/A-045-guardrails-aplicables-no-directrices.md +48 -0
- package/docs/adr/foundational/A-046-metricas-de-forma-y-legibilidad-del-codigo.md +50 -0
- package/docs/adr/foundational/A-047-dependencias-explicitas-sin-globales-ambientales.md +40 -0
- package/docs/adr/foundational/A-048-cobertura-minima-codigo.md +39 -0
- package/docs/adr/foundational/A-049-materializacion-bucle-guardrails-extension-nativa-pi.md +49 -0
- package/docs/adr/foundational/A-050-el-caso-de-uso-pide-al-dominio-no-lee-su-representacion.md +50 -0
- package/docs/adr/foundational/A-051-orden-imports-por-distancia.md +47 -0
- package/docs/adr/foundational/A-052-distribucion-metodologia-paquete-versionado.md +42 -0
- package/docs/adr/foundational/A-053-errores-compartidos-entre-features-dos-hogares-por-capa.md +43 -0
- package/docs/adr/foundational/A-054-contrato-costura-driver-port-raw-data-canal-error.md +65 -0
- package/docs/adr/foundational/index.md +98 -0
- package/docs/adr/index.md +19 -0
- package/docs/adr/python/P-001-dependencias-por-feature-fastapi-depends.md +63 -0
- package/docs/adr/python/P-002-inyeccion-token-por-request-sin-persistirlo.md +35 -0
- package/docs/adr/python/P-003-sqlalchemy-async-connection-pooling.md +59 -0
- package/docs/adr/python/P-004-serializer-json-custom-modelos-pydantic.md +47 -0
- package/docs/adr/python/P-005-patrones-pitfalls-nicegui.md +148 -0
- package/docs/adr/python/P-006-convenciones-pytest.md +96 -0
- package/docs/adr/python/P-007-ci-python-alineacion-poetry-version-unica.md +55 -0
- package/docs/adr/python/P-008-empaquetado-infraestructura-compartida-por-tecnologia.md +38 -0
- package/docs/adr/python/index.md +14 -0
- package/docs/adr/typescript/T-001-ddd-artifact-validation-zod-primitives.md +136 -0
- package/docs/adr/typescript/T-002-test-documentation-jsdoc.md +133 -0
- package/docs/adr/typescript/T-003-readme-formatting-domain-artifacts.md +51 -0
- package/docs/adr/typescript/T-005-input-optionality-use-case-not-entity.md +130 -0
- package/docs/adr/typescript/T-006-small-enums-inlined-zod-regex.md +77 -0
- package/docs/adr/typescript/T-007-controller-input-zod-schema.md +79 -0
- package/docs/adr/typescript/T-008-expressive-use-case-pipe.md +207 -0
- package/docs/adr/typescript/T-009-mdx-brace-escaping.md +80 -0
- package/docs/adr/typescript/T-010-stack-tooling-typescript-dominio.md +53 -0
- package/docs/adr/typescript/T-011-ultra-reporter-herramienta-canonica-documentacion.md +52 -0
- package/docs/adr/typescript/T-012-npm-workspaces-estructura-monorepo-clean-architecture.md +54 -0
- package/docs/adr/typescript/T-013-definicion-eventos-versionados-ultra-ddd.md +45 -0
- package/docs/adr/typescript/T-014-publicacion-distribucion-librerias-npm-semver.md +53 -0
- package/docs/adr/typescript/T-015-method-placement-definition.md +35 -0
- package/docs/adr/typescript/T-016-contrato-settings-zod.md +34 -0
- package/docs/adr/typescript/T-017-characterization-tests-golden-files.md +39 -0
- package/docs/adr/typescript/T-018-procedencia-campos-frontmatter.md +55 -0
- package/docs/adr/typescript/T-019-ultra-generator-herramienta-canonica-generacion.md +35 -0
- package/docs/adr/typescript/T-020-ultra-settings-herramienta-canonica-exportacion-despliegue.md +36 -0
- package/docs/adr/typescript/T-021-pipe-flujo-datos-operadores-semantica-contexto-inmutable.md +105 -0
- package/docs/adr/typescript/T-022-construction-is-execution-single-boundary.md +112 -0
- package/docs/adr/typescript/T-023-registry-cli-declara-dependencias-reales.md +84 -0
- package/docs/adr/typescript/T-024-paquete-ultra-agent-manifiesto-pi-peers-cli.md +39 -0
- package/docs/adr/typescript/T-025-publicacion-npm-trusted-publishing-procedencia.md +59 -0
- package/docs/adr/typescript/index.md +30 -0
- package/eslint/index.mjs +721 -0
- package/package.json +94 -0
- package/pi/extensions/handoff/README.md +92 -0
- package/pi/extensions/handoff/handoff-prompt.txt +9 -0
- package/pi/extensions/handoff/index.ts +296 -0
- package/pi/extensions/handoff/package.json +12 -0
- package/pi/extensions/qa-guardrail/README.md +108 -0
- package/pi/extensions/qa-guardrail/adapters/cli.ts +100 -0
- package/pi/extensions/qa-guardrail/adapters/eslint.ts +90 -0
- package/pi/extensions/qa-guardrail/adapters/registry.ts +45 -0
- package/pi/extensions/qa-guardrail/baseline.ts +74 -0
- package/pi/extensions/qa-guardrail/cerco.ts +134 -0
- package/pi/extensions/qa-guardrail/check.ts +185 -0
- package/pi/extensions/qa-guardrail/config.ts +189 -0
- package/pi/extensions/qa-guardrail/delta.ts +52 -0
- package/pi/extensions/qa-guardrail/feedback.ts +26 -0
- package/pi/extensions/qa-guardrail/index.ts +311 -0
- package/pi/extensions/qa-guardrail/nstop.ts +82 -0
- package/pi/extensions/qa-guardrail/package.json +12 -0
- package/pi/extensions/qa-guardrail/selection.ts +98 -0
- package/pi/extensions/qa-guardrail/types.ts +64 -0
- package/scripts/copy-assets.sh +10 -0
- package/scripts/reconcile-tags.sh +94 -0
- package/scripts/release-beta.sh +64 -0
- package/scripts/release-build.sh +53 -0
- package/scripts/release.sh +51 -0
- package/scripts/verify-adr-consistency.py +217 -0
- package/skills/code-review/SKILL.md +66 -0
- package/skills/codebase-design/SKILL.md +46 -0
- package/skills/configure-repo/SKILL.md +33 -0
- package/skills/diagnose-bug/SKILL.md +63 -0
- package/skills/domain-modeling/SKILL.md +56 -0
- package/skills/grill-me/SKILL.md +34 -0
- package/skills/i-have-an-idea/SKILL.md +166 -0
- package/skills/implement/SKILL.md +22 -0
- package/skills/research/SKILL.md +17 -0
- package/skills/ship/SKILL.md +26 -0
- package/skills/spike/SKILL.md +27 -0
- package/skills/tdd/SKILL.md +68 -0
- package/skills/tdd/references/deep-modules.md +53 -0
- package/skills/tdd/references/interface-design.md +74 -0
- package/skills/tdd/references/mocking.md +80 -0
- package/skills/tdd/references/refactoring.md +49 -0
- package/skills/tdd/references/tests.md +184 -0
- package/skills/to-specs/SKILL.md +141 -0
- package/skills/to-tasks/SKILL.md +143 -0
- package/skills/triage/SKILL.md +73 -0
- package/skills/ultra-generator/SKILL.md +263 -0
- package/skills/ultra-generator/references/aggregate-root.md +149 -0
- package/skills/ultra-generator/references/domain-event.md +174 -0
- package/skills/ultra-generator/references/entity.md +133 -0
- package/skills/ultra-generator/references/service.md +92 -0
- package/skills/ultra-generator/references/value-object.md +135 -0
- package/skills/wayfinder/SKILL.md +201 -0
- package/skills/workflow/SKILL.md +31 -0
- package/skills/writing-for-agents/SKILL-MECHANICS.md +32 -0
- package/skills/writing-for-agents/SKILL.md +86 -0
- package/skills/writing-for-agents/references/adrs.md +19 -0
package/README.md
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# ultra-ai-coding
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Getting started
|
|
6
|
+
|
|
7
|
+
To make it easy for you to get started with GitLab, here's a list of recommended next steps.
|
|
8
|
+
|
|
9
|
+
Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
|
|
10
|
+
|
|
11
|
+
## Add your files
|
|
12
|
+
|
|
13
|
+
* [Create](https://docs.gitlab.com/user/project/repository/web_editor/#create-a-file) or [upload](https://docs.gitlab.com/user/project/repository/web_editor/#upload-a-file) files
|
|
14
|
+
* [Add files using the command line](https://docs.gitlab.com/topics/git/add_files/#add-files-to-a-git-repository) or push an existing Git repository with the following command:
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
cd existing_repo
|
|
18
|
+
git remote add origin https://gitlab.com/imolko/ultra-stack/ultra-agent.git
|
|
19
|
+
git branch -M main
|
|
20
|
+
git push -uf origin main
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Integrate with your tools
|
|
24
|
+
|
|
25
|
+
* [Set up project integrations](https://gitlab.com/imolko/ultra-stack/ultra-agent/-/settings/integrations)
|
|
26
|
+
|
|
27
|
+
## Collaborate with your team
|
|
28
|
+
|
|
29
|
+
* [Invite team members and collaborators](https://docs.gitlab.com/user/project/members/)
|
|
30
|
+
* [Create a new merge request](https://docs.gitlab.com/user/project/merge_requests/creating_merge_requests/)
|
|
31
|
+
* [Automatically close issues from merge requests](https://docs.gitlab.com/user/project/issues/managing_issues/#closing-issues-automatically)
|
|
32
|
+
* [Enable merge request approvals](https://docs.gitlab.com/user/project/merge_requests/approvals/)
|
|
33
|
+
* [Set auto-merge](https://docs.gitlab.com/user/project/merge_requests/auto_merge/)
|
|
34
|
+
|
|
35
|
+
## Test and Deploy
|
|
36
|
+
|
|
37
|
+
Use the built-in continuous integration in GitLab.
|
|
38
|
+
|
|
39
|
+
* [Get started with GitLab CI/CD](https://docs.gitlab.com/ci/quick_start/)
|
|
40
|
+
* [Analyze your code for known vulnerabilities with Static Application Security Testing (SAST)](https://docs.gitlab.com/user/application_security/sast/)
|
|
41
|
+
* [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/topics/autodevops/requirements/)
|
|
42
|
+
* [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/user/clusters/agent/)
|
|
43
|
+
* [Set up protected environments](https://docs.gitlab.com/ci/environments/protected_environments/)
|
|
44
|
+
|
|
45
|
+
***
|
|
46
|
+
|
|
47
|
+
# Editing this README
|
|
48
|
+
|
|
49
|
+
When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thanks to [makeareadme.com](https://www.makeareadme.com/) for this template.
|
|
50
|
+
|
|
51
|
+
## Suggestions for a good README
|
|
52
|
+
|
|
53
|
+
Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
|
|
54
|
+
|
|
55
|
+
## Name
|
|
56
|
+
Choose a self-explaining name for your project.
|
|
57
|
+
|
|
58
|
+
## Description
|
|
59
|
+
Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
|
|
60
|
+
|
|
61
|
+
## Badges
|
|
62
|
+
On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
|
|
63
|
+
|
|
64
|
+
## Visuals
|
|
65
|
+
Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
|
|
66
|
+
|
|
67
|
+
## Installation
|
|
68
|
+
Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
|
|
69
|
+
|
|
70
|
+
## Usage
|
|
71
|
+
Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
|
|
72
|
+
|
|
73
|
+
## Support
|
|
74
|
+
Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
|
|
75
|
+
|
|
76
|
+
## Roadmap
|
|
77
|
+
If you have ideas for releases in the future, it is a good idea to list them in the README.
|
|
78
|
+
|
|
79
|
+
## Contributing
|
|
80
|
+
State if you are open to contributions and what your requirements are for accepting them.
|
|
81
|
+
|
|
82
|
+
For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
|
|
83
|
+
|
|
84
|
+
You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
|
|
85
|
+
|
|
86
|
+
## Authors and acknowledgment
|
|
87
|
+
Show your appreciation to those who have contributed to the project.
|
|
88
|
+
|
|
89
|
+
## License
|
|
90
|
+
For open source projects, say how it is licensed.
|
|
91
|
+
|
|
92
|
+
## Project status
|
|
93
|
+
If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
|
package/bin/cli.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bin.d.ts","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":""}
|
package/dist-node/bin.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bin.js","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";;AAAA,+BAA6B;AAE7B,IAAA,UAAI,GAAE,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Capa fina del CLI (A-052 §4): compone las funciones del materializador, el
|
|
3
|
+
* pointer hub y el orquestador `ship`. No decide nada — solo parsea, orquesta y
|
|
4
|
+
* reporta.
|
|
5
|
+
*/
|
|
6
|
+
export type Command = {
|
|
7
|
+
kind: "install";
|
|
8
|
+
dest: string;
|
|
9
|
+
} | {
|
|
10
|
+
kind: "update";
|
|
11
|
+
dest: string;
|
|
12
|
+
reset: boolean;
|
|
13
|
+
} | {
|
|
14
|
+
kind: "status";
|
|
15
|
+
dest: string;
|
|
16
|
+
} | {
|
|
17
|
+
kind: "init-lint";
|
|
18
|
+
dest: string;
|
|
19
|
+
} | {
|
|
20
|
+
kind: "ship";
|
|
21
|
+
argv: string[];
|
|
22
|
+
} | {
|
|
23
|
+
kind: "help";
|
|
24
|
+
} | {
|
|
25
|
+
kind: "version";
|
|
26
|
+
} | {
|
|
27
|
+
kind: "unknown";
|
|
28
|
+
name: string;
|
|
29
|
+
};
|
|
30
|
+
export interface CliOptions {
|
|
31
|
+
cwd?: string;
|
|
32
|
+
packageRootDir?: string;
|
|
33
|
+
}
|
|
34
|
+
/** Parsea los argumentos del CLI en un comando normalizado (puro, testable). */
|
|
35
|
+
export declare function parseCommand(argv: string[], cwd: string): Command;
|
|
36
|
+
export declare function usageText(): string;
|
|
37
|
+
/** Ejecuta el comando y devuelve el código de salida. */
|
|
38
|
+
export declare function run(argv: string[], options?: CliOptions): Promise<number>;
|
|
39
|
+
/** Punto de entrada binario. */
|
|
40
|
+
export declare function main(): Promise<void>;
|
|
41
|
+
//# sourceMappingURL=cli.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH,MAAM,MAAM,OAAO,GACf;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACjC;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,GAChD;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAChC;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACnC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAA;CAAE,GAChC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAChB;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,GACnB;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAEtC,MAAM,WAAW,UAAU;IACzB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAQD,gFAAgF;AAChF,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CA0BjE;AAED,wBAAgB,SAAS,IAAI,MAAM,CAqBlC;AAUD,yDAAyD;AACzD,wBAAsB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,OAAO,GAAE,UAAe,GAAG,OAAO,CAAC,MAAM,CAAC,CAiFnF;AAED,gCAAgC;AAChC,wBAAsB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAM1C"}
|
package/dist-node/cli.js
ADDED
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Capa fina del CLI (A-052 §4): compone las funciones del materializador, el
|
|
4
|
+
* pointer hub y el orquestador `ship`. No decide nada — solo parsea, orquesta y
|
|
5
|
+
* reporta.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.parseCommand = parseCommand;
|
|
9
|
+
exports.usageText = usageText;
|
|
10
|
+
exports.run = run;
|
|
11
|
+
exports.main = main;
|
|
12
|
+
const package_root_1 = require("./package-root");
|
|
13
|
+
const materializer_1 = require("./materializer");
|
|
14
|
+
const init_lint_1 = require("./init-lint");
|
|
15
|
+
const ship_1 = require("./ship/ship");
|
|
16
|
+
function extractDest(args, cwd) {
|
|
17
|
+
const idx = args.indexOf("--dest");
|
|
18
|
+
if (idx !== -1 && args[idx + 1])
|
|
19
|
+
return args[idx + 1];
|
|
20
|
+
return cwd;
|
|
21
|
+
}
|
|
22
|
+
/** Parsea los argumentos del CLI en un comando normalizado (puro, testable). */
|
|
23
|
+
function parseCommand(argv, cwd) {
|
|
24
|
+
if (argv.length === 0)
|
|
25
|
+
return { kind: "help" };
|
|
26
|
+
const [first, ...rest] = argv;
|
|
27
|
+
switch (first) {
|
|
28
|
+
case "install":
|
|
29
|
+
return { kind: "install", dest: extractDest(rest, cwd) };
|
|
30
|
+
case "update":
|
|
31
|
+
return { kind: "update", dest: extractDest(rest, cwd), reset: rest.includes("--reset") };
|
|
32
|
+
case "status":
|
|
33
|
+
return { kind: "status", dest: extractDest(rest, cwd) };
|
|
34
|
+
case "init-lint":
|
|
35
|
+
return { kind: "init-lint", dest: extractDest(rest, cwd) };
|
|
36
|
+
case "ship":
|
|
37
|
+
return { kind: "ship", argv: rest };
|
|
38
|
+
case "help":
|
|
39
|
+
case "--help":
|
|
40
|
+
case "-h":
|
|
41
|
+
return { kind: "help" };
|
|
42
|
+
case "version":
|
|
43
|
+
case "--version":
|
|
44
|
+
case "-v":
|
|
45
|
+
return { kind: "version" };
|
|
46
|
+
default:
|
|
47
|
+
return { kind: "unknown", name: first };
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
function usageText() {
|
|
51
|
+
return `ultra-agent — distribuye la metodología ultra (A-052)
|
|
52
|
+
|
|
53
|
+
Uso:
|
|
54
|
+
ultra-agent install [--dest <dir>] Materializa el espejo A/T/P + gate, el
|
|
55
|
+
pointer hub y el manifiesto de versión.
|
|
56
|
+
ultra-agent update [--dest <dir>] [--reset]
|
|
57
|
+
Reconcilia el espejo; falla ante deriva.
|
|
58
|
+
--reset respalda y restaura.
|
|
59
|
+
ultra-agent status [--dest <dir>] Reporta versión instalada y deriva.
|
|
60
|
+
ultra-agent init-lint [--dest <dir>] Escribe el andamiaje de lint del
|
|
61
|
+
consumidor (eslint.config.mjs +
|
|
62
|
+
.pi/qa-guardrail.json) sin sobrescribir
|
|
63
|
+
lo existente. No se reconcilia en update.
|
|
64
|
+
ultra-agent ship <flags> Dispara el pipeline ship (A-039).
|
|
65
|
+
|
|
66
|
+
--help, -h Muestra esta ayuda.
|
|
67
|
+
--version, -v Muestra la versión del paquete.
|
|
68
|
+
--dest <dir> Directorio destino (default: cwd del consumidor).
|
|
69
|
+
|
|
70
|
+
Para el subcomando ship, consulta: ultra-agent ship --help`;
|
|
71
|
+
}
|
|
72
|
+
function writeLine(text) {
|
|
73
|
+
process.stdout.write(`${text}\n`);
|
|
74
|
+
}
|
|
75
|
+
function writeError(text) {
|
|
76
|
+
process.stderr.write(`${text}\n`);
|
|
77
|
+
}
|
|
78
|
+
/** Ejecuta el comando y devuelve el código de salida. */
|
|
79
|
+
async function run(argv, options = {}) {
|
|
80
|
+
const cwd = options.cwd ?? process.cwd();
|
|
81
|
+
const root = options.packageRootDir ?? (0, package_root_1.packageRoot)();
|
|
82
|
+
const command = parseCommand(argv, cwd);
|
|
83
|
+
switch (command.kind) {
|
|
84
|
+
case "help":
|
|
85
|
+
writeLine(usageText());
|
|
86
|
+
return 0;
|
|
87
|
+
case "version":
|
|
88
|
+
writeLine((0, package_root_1.readPackageVersion)());
|
|
89
|
+
return 0;
|
|
90
|
+
case "unknown":
|
|
91
|
+
writeError(`Comando desconocido: ${command.name}`);
|
|
92
|
+
writeLine(usageText());
|
|
93
|
+
return 1;
|
|
94
|
+
case "install": {
|
|
95
|
+
const payload = (0, materializer_1.collectPayload)(root, (0, package_root_1.readPackageVersion)());
|
|
96
|
+
const result = (0, materializer_1.install)(command.dest, payload);
|
|
97
|
+
writeLine(`✅ @imolko/ultra-agent ${payload.version} instalado.`);
|
|
98
|
+
writeLine(` Espejo: ${result.mirrored.length} archivos.`);
|
|
99
|
+
writeLine(` Pointer hub: ${result.pointerHub === "written" ? "escrito" : "conservado"} en docs/agents/repo-config.md.`);
|
|
100
|
+
writeLine(` Ancla de skills: ${result.agentSkills} en AGENTS.md/CLAUDE.md.`);
|
|
101
|
+
return 0;
|
|
102
|
+
}
|
|
103
|
+
case "update": {
|
|
104
|
+
const payload = (0, materializer_1.collectPayload)(root, (0, package_root_1.readPackageVersion)());
|
|
105
|
+
try {
|
|
106
|
+
const result = (0, materializer_1.update)(command.dest, payload, { reset: command.reset });
|
|
107
|
+
if (result.drift.length > 0) {
|
|
108
|
+
writeLine(`♻️ Deriva restaurada (${result.drift.length} archivos) — backup en docs/agents/backup/.`);
|
|
109
|
+
}
|
|
110
|
+
writeLine(`✅ Actualizado a ${payload.version}.`);
|
|
111
|
+
if (result.added.length > 0)
|
|
112
|
+
writeLine(` Añadidos: ${result.added.join(", ")}`);
|
|
113
|
+
if (result.removed.length > 0)
|
|
114
|
+
writeLine(` Retirados: ${result.removed.join(", ")}`);
|
|
115
|
+
return 0;
|
|
116
|
+
}
|
|
117
|
+
catch (error) {
|
|
118
|
+
if (error instanceof materializer_1.DriftError) {
|
|
119
|
+
writeError(`❌ ${error.message}`);
|
|
120
|
+
writeError(" Resuélvelo con: ultra-agent update --reset");
|
|
121
|
+
return 1;
|
|
122
|
+
}
|
|
123
|
+
throw error;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
case "status": {
|
|
127
|
+
const payload = (0, materializer_1.collectPayload)(root, (0, package_root_1.readPackageVersion)());
|
|
128
|
+
const report = (0, materializer_1.status)(command.dest, payload);
|
|
129
|
+
if (!report.installed) {
|
|
130
|
+
writeLine(`No instalado. Ejecuta: ultra-agent install`);
|
|
131
|
+
return 1;
|
|
132
|
+
}
|
|
133
|
+
writeLine(`@imolko/ultra-agent ${report.version} instalado.`);
|
|
134
|
+
if (report.drift.length > 0) {
|
|
135
|
+
writeLine(`⚠️ Deriva detectada en:`);
|
|
136
|
+
for (const file of report.drift)
|
|
137
|
+
writeLine(` - ${file}`);
|
|
138
|
+
}
|
|
139
|
+
else {
|
|
140
|
+
writeLine("Sin deriva.");
|
|
141
|
+
}
|
|
142
|
+
if (report.added.length > 0)
|
|
143
|
+
writeLine(`Pendientes de añadir: ${report.added.join(", ")}`);
|
|
144
|
+
if (report.removed.length > 0)
|
|
145
|
+
writeLine(`Retirados del paquete: ${report.removed.join(", ")}`);
|
|
146
|
+
return 0;
|
|
147
|
+
}
|
|
148
|
+
case "init-lint": {
|
|
149
|
+
const result = (0, init_lint_1.initLint)(command.dest);
|
|
150
|
+
for (const file of result.written)
|
|
151
|
+
writeLine(`✅ Escrito ${file}`);
|
|
152
|
+
for (const file of result.kept)
|
|
153
|
+
writeLine(`↷ Conservado ${file} (ya existía)`);
|
|
154
|
+
writeLine("Edita el prefijo interno en eslint.config.mjs antes de lintear.");
|
|
155
|
+
return 0;
|
|
156
|
+
}
|
|
157
|
+
case "ship":
|
|
158
|
+
await (0, ship_1.runShip)(command.argv);
|
|
159
|
+
return 0;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
/** Punto de entrada binario. */
|
|
163
|
+
async function main() {
|
|
164
|
+
const code = await run(process.argv.slice(2)).catch((error) => {
|
|
165
|
+
writeError(`Fatal error: ${error}`);
|
|
166
|
+
return 1;
|
|
167
|
+
});
|
|
168
|
+
process.exitCode = code;
|
|
169
|
+
}
|
|
170
|
+
//# sourceMappingURL=cli.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AA6BH,oCA0BC;AAED,8BAqBC;A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las piezas componibles que consume el CLI (y cualquier integración):
|
|
5
|
+
* el materializador (install/update/status), la selección de payload, el
|
|
6
|
+
* manifiesto, el pointer hub y la derivación de versión.
|
|
7
|
+
*/
|
|
8
|
+
export { collectPayload, install, update, status, DriftError, type Payload, type PayloadFile, type InstallResult, type UpdateResult, type StatusReport, MANIFEST_RELATIVE_PATH, POINTER_HUB_RELATIVE_PATH, BACKUP_RELATIVE_PATH } from "./materializer";
|
|
9
|
+
export { selectPayloadFiles, isCanonicalAdr, GATE_RELATIVE_PATH } from "./payload";
|
|
10
|
+
export { computeHashes, diffHashes, serializeManifest, parseManifest, type Manifest, type DiffResult } from "./manifest";
|
|
11
|
+
export { renderPointerHub, renderAgentSkillsBlock, DEFAULT_POINTERS, type RepoPointers } from "./pointer-hub";
|
|
12
|
+
export { classifyCommit, classifyCommits, bumpVersion, type BumpLevel } from "./version";
|
|
13
|
+
export { packageRoot, readPackageVersion } from "./package-root";
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,aAAa,EAAE,KAAK,YAAY,EAAE,KAAK,YAAY,EAAE,sBAAsB,EAAE,yBAAyB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACxP,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AACnF,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,iBAAiB,EAAE,aAAa,EAAE,KAAK,QAAQ,EAAE,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AACzH,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAC9G,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,WAAW,EAAE,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AACzF,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* API pública del paquete `@imolko/ultra-agent`.
|
|
4
|
+
*
|
|
5
|
+
* Expone las piezas componibles que consume el CLI (y cualquier integración):
|
|
6
|
+
* el materializador (install/update/status), la selección de payload, el
|
|
7
|
+
* manifiesto, el pointer hub y la derivación de versión.
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.readPackageVersion = exports.packageRoot = exports.bumpVersion = exports.classifyCommits = exports.classifyCommit = exports.DEFAULT_POINTERS = exports.renderAgentSkillsBlock = exports.renderPointerHub = exports.parseManifest = exports.serializeManifest = exports.diffHashes = exports.computeHashes = exports.GATE_RELATIVE_PATH = exports.isCanonicalAdr = exports.selectPayloadFiles = exports.BACKUP_RELATIVE_PATH = exports.POINTER_HUB_RELATIVE_PATH = exports.MANIFEST_RELATIVE_PATH = exports.DriftError = exports.status = exports.update = exports.install = exports.collectPayload = void 0;
|
|
11
|
+
var materializer_1 = require("./materializer");
|
|
12
|
+
Object.defineProperty(exports, "collectPayload", { enumerable: true, get: function () { return materializer_1.collectPayload; } });
|
|
13
|
+
Object.defineProperty(exports, "install", { enumerable: true, get: function () { return materializer_1.install; } });
|
|
14
|
+
Object.defineProperty(exports, "update", { enumerable: true, get: function () { return materializer_1.update; } });
|
|
15
|
+
Object.defineProperty(exports, "status", { enumerable: true, get: function () { return materializer_1.status; } });
|
|
16
|
+
Object.defineProperty(exports, "DriftError", { enumerable: true, get: function () { return materializer_1.DriftError; } });
|
|
17
|
+
Object.defineProperty(exports, "MANIFEST_RELATIVE_PATH", { enumerable: true, get: function () { return materializer_1.MANIFEST_RELATIVE_PATH; } });
|
|
18
|
+
Object.defineProperty(exports, "POINTER_HUB_RELATIVE_PATH", { enumerable: true, get: function () { return materializer_1.POINTER_HUB_RELATIVE_PATH; } });
|
|
19
|
+
Object.defineProperty(exports, "BACKUP_RELATIVE_PATH", { enumerable: true, get: function () { return materializer_1.BACKUP_RELATIVE_PATH; } });
|
|
20
|
+
var payload_1 = require("./payload");
|
|
21
|
+
Object.defineProperty(exports, "selectPayloadFiles", { enumerable: true, get: function () { return payload_1.selectPayloadFiles; } });
|
|
22
|
+
Object.defineProperty(exports, "isCanonicalAdr", { enumerable: true, get: function () { return payload_1.isCanonicalAdr; } });
|
|
23
|
+
Object.defineProperty(exports, "GATE_RELATIVE_PATH", { enumerable: true, get: function () { return payload_1.GATE_RELATIVE_PATH; } });
|
|
24
|
+
var manifest_1 = require("./manifest");
|
|
25
|
+
Object.defineProperty(exports, "computeHashes", { enumerable: true, get: function () { return manifest_1.computeHashes; } });
|
|
26
|
+
Object.defineProperty(exports, "diffHashes", { enumerable: true, get: function () { return manifest_1.diffHashes; } });
|
|
27
|
+
Object.defineProperty(exports, "serializeManifest", { enumerable: true, get: function () { return manifest_1.serializeManifest; } });
|
|
28
|
+
Object.defineProperty(exports, "parseManifest", { enumerable: true, get: function () { return manifest_1.parseManifest; } });
|
|
29
|
+
var pointer_hub_1 = require("./pointer-hub");
|
|
30
|
+
Object.defineProperty(exports, "renderPointerHub", { enumerable: true, get: function () { return pointer_hub_1.renderPointerHub; } });
|
|
31
|
+
Object.defineProperty(exports, "renderAgentSkillsBlock", { enumerable: true, get: function () { return pointer_hub_1.renderAgentSkillsBlock; } });
|
|
32
|
+
Object.defineProperty(exports, "DEFAULT_POINTERS", { enumerable: true, get: function () { return pointer_hub_1.DEFAULT_POINTERS; } });
|
|
33
|
+
var version_1 = require("./version");
|
|
34
|
+
Object.defineProperty(exports, "classifyCommit", { enumerable: true, get: function () { return version_1.classifyCommit; } });
|
|
35
|
+
Object.defineProperty(exports, "classifyCommits", { enumerable: true, get: function () { return version_1.classifyCommits; } });
|
|
36
|
+
Object.defineProperty(exports, "bumpVersion", { enumerable: true, get: function () { return version_1.bumpVersion; } });
|
|
37
|
+
var package_root_1 = require("./package-root");
|
|
38
|
+
Object.defineProperty(exports, "packageRoot", { enumerable: true, get: function () { return package_root_1.packageRoot; } });
|
|
39
|
+
Object.defineProperty(exports, "readPackageVersion", { enumerable: true, get: function () { return package_root_1.readPackageVersion; } });
|
|
40
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,+CAAwP;AAA/O,8GAAA,cAAc,OAAA;AAAE,uGAAA,OAAO,OAAA;AAAE,sGAAA,MAAM,OAAA;AAAE,sGAAA,MAAM,OAAA;AAAE,0GAAA,UAAU,OAAA;AAA4F,sHAAA,sBAAsB,OAAA;AAAE,yHAAA,yBAAyB,OAAA;AAAE,oHAAA,oBAAoB,OAAA;AAC/N,qCAAmF;AAA1E,6GAAA,kBAAkB,OAAA;AAAE,yGAAA,cAAc,OAAA;AAAE,6GAAA,kBAAkB,OAAA;AAC/D,uCAAyH;AAAhH,yGAAA,aAAa,OAAA;AAAE,sGAAA,UAAU,OAAA;AAAE,6GAAA,iBAAiB,OAAA;AAAE,yGAAA,aAAa,OAAA;AACpE,6CAA8G;AAArG,+GAAA,gBAAgB,OAAA;AAAE,qHAAA,sBAAsB,OAAA;AAAE,+GAAA,gBAAgB,OAAA;AACnE,qCAAyF;AAAhF,yGAAA,cAAc,OAAA;AAAE,0GAAA,eAAe,OAAA;AAAE,sGAAA,WAAW,OAAA;AACrD,+CAAiE;AAAxD,2GAAA,WAAW,OAAA;AAAE,kHAAA,kBAAkB,OAAA"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Andamiaje de lint del consumidor (`init-lint`, A-052 §4 / T-024 §4).
|
|
3
|
+
*
|
|
4
|
+
* Escribe en el espacio de extensión del consumidor —no en el espejo canónico—
|
|
5
|
+
* un `eslint.config.mjs` mínimo que importa el preset `@imolko/ultra-agent/eslint`
|
|
6
|
+
* y, si falta, un `.pi/qa-guardrail.json` de solo selección. El prefijo del
|
|
7
|
+
* paquete interno queda como parámetro a editar por el consumidor; las reglas de
|
|
8
|
+
* su tier de proyecto se componen encima del preset.
|
|
9
|
+
*
|
|
10
|
+
* El andamiaje es idempotente: nunca sobrescribe un archivo existente. Al no
|
|
11
|
+
* formar parte del payload espejado, `update` tampoco lo reconcilia.
|
|
12
|
+
*/
|
|
13
|
+
/** Definición de reglas del consumidor (protegida por el cerco de A-049). */
|
|
14
|
+
export declare const ESLINT_CONFIG_RELATIVE_PATH = "eslint.config.mjs";
|
|
15
|
+
/** Selección del guardrail, solo selección (A-049). */
|
|
16
|
+
export declare const QA_GUARDRAIL_RELATIVE_PATH = ".pi/qa-guardrail.json";
|
|
17
|
+
/** Prefijo interno de ejemplo; el consumidor lo reemplaza por el suyo. */
|
|
18
|
+
export declare const INTERNAL_PLACEHOLDER = "@acme/*";
|
|
19
|
+
export interface InitLintResult {
|
|
20
|
+
/** Archivos escritos por no existir. */
|
|
21
|
+
written: string[];
|
|
22
|
+
/** Archivos conservados por existir ya. */
|
|
23
|
+
kept: string[];
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Renderiza el `eslint.config.mjs` mínimo: importa el preset, lo invoca con el
|
|
27
|
+
* prefijo interno de ejemplo y deja el array listo para componer reglas de
|
|
28
|
+
* proyecto encima. No ejecuta ni lintea — el único ejecutor es `qa-guardrail`.
|
|
29
|
+
*/
|
|
30
|
+
export declare function renderEslintConfig(): string;
|
|
31
|
+
/**
|
|
32
|
+
* Renderiza el `.pi/qa-guardrail.json` de solo selección: declara qué adaptador
|
|
33
|
+
* whitelisted cubre qué archivos. Sin `bin`, `args` ni `formatter` (cerco de
|
|
34
|
+
* A-049); el default replica el ejemplo canónico del adaptador `eslint`.
|
|
35
|
+
*/
|
|
36
|
+
export declare function renderQaGuardrailConfig(): string;
|
|
37
|
+
/**
|
|
38
|
+
* Escribe el andamiaje en `dest` sin sobrescribir nada. Crea los directorios
|
|
39
|
+
* intermedios que falten (p. ej. `.pi/`). Devuelve qué se escribió y qué se
|
|
40
|
+
* conservó, para que el CLI lo reporte.
|
|
41
|
+
*/
|
|
42
|
+
export declare function initLint(dest: string): InitLintResult;
|
|
43
|
+
//# sourceMappingURL=init-lint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init-lint.d.ts","sourceRoot":"","sources":["../src/init-lint.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAKH,6EAA6E;AAC7E,eAAO,MAAM,2BAA2B,sBAAsB,CAAC;AAE/D,uDAAuD;AACvD,eAAO,MAAM,0BAA0B,0BAA0B,CAAC;AAElE,0EAA0E;AAC1E,eAAO,MAAM,oBAAoB,YAAY,CAAC;AAE9C,MAAM,WAAW,cAAc;IAC7B,wCAAwC;IACxC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,2CAA2C;IAC3C,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAS3C;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,CAgBhD;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,CAqBrD"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Andamiaje de lint del consumidor (`init-lint`, A-052 §4 / T-024 §4).
|
|
4
|
+
*
|
|
5
|
+
* Escribe en el espacio de extensión del consumidor —no en el espejo canónico—
|
|
6
|
+
* un `eslint.config.mjs` mínimo que importa el preset `@imolko/ultra-agent/eslint`
|
|
7
|
+
* y, si falta, un `.pi/qa-guardrail.json` de solo selección. El prefijo del
|
|
8
|
+
* paquete interno queda como parámetro a editar por el consumidor; las reglas de
|
|
9
|
+
* su tier de proyecto se componen encima del preset.
|
|
10
|
+
*
|
|
11
|
+
* El andamiaje es idempotente: nunca sobrescribe un archivo existente. Al no
|
|
12
|
+
* formar parte del payload espejado, `update` tampoco lo reconcilia.
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.INTERNAL_PLACEHOLDER = exports.QA_GUARDRAIL_RELATIVE_PATH = exports.ESLINT_CONFIG_RELATIVE_PATH = void 0;
|
|
16
|
+
exports.renderEslintConfig = renderEslintConfig;
|
|
17
|
+
exports.renderQaGuardrailConfig = renderQaGuardrailConfig;
|
|
18
|
+
exports.initLint = initLint;
|
|
19
|
+
const node_fs_1 = require("node:fs");
|
|
20
|
+
const node_path_1 = require("node:path");
|
|
21
|
+
/** Definición de reglas del consumidor (protegida por el cerco de A-049). */
|
|
22
|
+
exports.ESLINT_CONFIG_RELATIVE_PATH = "eslint.config.mjs";
|
|
23
|
+
/** Selección del guardrail, solo selección (A-049). */
|
|
24
|
+
exports.QA_GUARDRAIL_RELATIVE_PATH = ".pi/qa-guardrail.json";
|
|
25
|
+
/** Prefijo interno de ejemplo; el consumidor lo reemplaza por el suyo. */
|
|
26
|
+
exports.INTERNAL_PLACEHOLDER = "@acme/*";
|
|
27
|
+
/**
|
|
28
|
+
* Renderiza el `eslint.config.mjs` mínimo: importa el preset, lo invoca con el
|
|
29
|
+
* prefijo interno de ejemplo y deja el array listo para componer reglas de
|
|
30
|
+
* proyecto encima. No ejecuta ni lintea — el único ejecutor es `qa-guardrail`.
|
|
31
|
+
*/
|
|
32
|
+
function renderEslintConfig() {
|
|
33
|
+
return `// eslint.config.mjs — andamiaje de @imolko/ultra-agent (init-lint).
|
|
34
|
+
// Edita el prefijo del paquete interno y compón tus reglas de proyecto debajo.
|
|
35
|
+
import ultra from "@imolko/ultra-agent/eslint";
|
|
36
|
+
|
|
37
|
+
export default [
|
|
38
|
+
...ultra({ internal: "${exports.INTERNAL_PLACEHOLDER}" }),
|
|
39
|
+
];
|
|
40
|
+
`;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Renderiza el `.pi/qa-guardrail.json` de solo selección: declara qué adaptador
|
|
44
|
+
* whitelisted cubre qué archivos. Sin `bin`, `args` ni `formatter` (cerco de
|
|
45
|
+
* A-049); el default replica el ejemplo canónico del adaptador `eslint`.
|
|
46
|
+
*/
|
|
47
|
+
function renderQaGuardrailConfig() {
|
|
48
|
+
return `${JSON.stringify({
|
|
49
|
+
tools: [
|
|
50
|
+
{
|
|
51
|
+
id: "eslint",
|
|
52
|
+
include: ["**/*.{ts,tsx,js,mjs,cjs}"],
|
|
53
|
+
exclude: [],
|
|
54
|
+
rootMarkers: ["package.json"],
|
|
55
|
+
enabled: true,
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
}, null, 2)}\n`;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Escribe el andamiaje en `dest` sin sobrescribir nada. Crea los directorios
|
|
62
|
+
* intermedios que falten (p. ej. `.pi/`). Devuelve qué se escribió y qué se
|
|
63
|
+
* conservó, para que el CLI lo reporte.
|
|
64
|
+
*/
|
|
65
|
+
function initLint(dest) {
|
|
66
|
+
const written = [];
|
|
67
|
+
const kept = [];
|
|
68
|
+
const files = [
|
|
69
|
+
[exports.ESLINT_CONFIG_RELATIVE_PATH, renderEslintConfig()],
|
|
70
|
+
[exports.QA_GUARDRAIL_RELATIVE_PATH, renderQaGuardrailConfig()],
|
|
71
|
+
];
|
|
72
|
+
for (const [relativePath, content] of files) {
|
|
73
|
+
const abs = (0, node_path_1.join)(dest, relativePath);
|
|
74
|
+
if ((0, node_fs_1.existsSync)(abs)) {
|
|
75
|
+
kept.push(relativePath);
|
|
76
|
+
continue;
|
|
77
|
+
}
|
|
78
|
+
(0, node_fs_1.mkdirSync)((0, node_path_1.dirname)(abs), { recursive: true });
|
|
79
|
+
(0, node_fs_1.writeFileSync)(abs, content);
|
|
80
|
+
written.push(relativePath);
|
|
81
|
+
}
|
|
82
|
+
return { written, kept };
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=init-lint.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init-lint.js","sourceRoot":"","sources":["../src/init-lint.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;AA0BH,gDASC;AAOD,0DAgBC;AAOD,4BAqBC;AApFD,qCAA+D;AAC/D,yCAA0C;AAE1C,6EAA6E;AAChE,QAAA,2BAA2B,GAAG,mBAAmB,CAAC;AAE/D,uDAAuD;AAC1C,QAAA,0BAA0B,GAAG,uBAAuB,CAAC;AAElE,0EAA0E;AAC7D,QAAA,oBAAoB,GAAG,SAAS,CAAC;AAS9C;;;;GAIG;AACH,SAAgB,kBAAkB;IAChC,OAAO;;;;;0BAKiB,4BAAoB;;CAE7C,CAAC;AACF,CAAC;AAED;;;;GAIG;AACH,SAAgB,uBAAuB;IACrC,OAAO,GAAG,IAAI,CAAC,SAAS,CACtB;QACE,KAAK,EAAE;YACL;gBACE,EAAE,EAAE,QAAQ;gBACZ,OAAO,EAAE,CAAC,0BAA0B,CAAC;gBACrC,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,CAAC,cAAc,CAAC;gBAC7B,OAAO,EAAE,IAAI;aACd;SACF;KACF,EACD,IAAI,EACJ,CAAC,CACF,IAAI,CAAC;AACR,CAAC;AAED;;;;GAIG;AACH,SAAgB,QAAQ,CAAC,IAAY;IACnC,MAAM,OAAO,GAAa,EAAE,CAAC;IAC7B,MAAM,IAAI,GAAa,EAAE,CAAC;IAE1B,MAAM,KAAK,GAA4B;QACrC,CAAC,mCAA2B,EAAE,kBAAkB,EAAE,CAAC;QACnD,CAAC,kCAA0B,EAAE,uBAAuB,EAAE,CAAC;KACxD,CAAC;IAEF,KAAK,MAAM,CAAC,YAAY,EAAE,OAAO,CAAC,IAAI,KAAK,EAAE,CAAC;QAC5C,MAAM,GAAG,GAAG,IAAA,gBAAI,EAAC,IAAI,EAAE,YAAY,CAAC,CAAC;QACrC,IAAI,IAAA,oBAAU,EAAC,GAAG,CAAC,EAAE,CAAC;YACpB,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;YACxB,SAAS;QACX,CAAC;QACD,IAAA,mBAAS,EAAC,IAAA,mBAAO,EAAC,GAAG,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAC7C,IAAA,uBAAa,EAAC,GAAG,EAAE,OAAO,CAAC,CAAC;QAC5B,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAC7B,CAAC;IAED,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAC3B,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Manifiesto de versión y deriva (A-052 §5): registra qué archivos se espejaron y
|
|
3
|
+
* su hash, para que `update` detecte ediciones del consumidor (deriva) y `--reset`
|
|
4
|
+
* las restaure. Funciones puras: el sistema de archivos lo toca el materializador.
|
|
5
|
+
*/
|
|
6
|
+
/** Ruta relativa del manifiesto dentro del consumidor (docs/agents/, A-052). */
|
|
7
|
+
export declare const MANIFEST_RELATIVE_PATH = "docs/agents/manifest.json";
|
|
8
|
+
export interface Manifest {
|
|
9
|
+
package: string;
|
|
10
|
+
version: string;
|
|
11
|
+
installedAt: string;
|
|
12
|
+
files: Record<string, string>;
|
|
13
|
+
}
|
|
14
|
+
export interface DiffResult {
|
|
15
|
+
added: string[];
|
|
16
|
+
removed: string[];
|
|
17
|
+
modified: string[];
|
|
18
|
+
clean: boolean;
|
|
19
|
+
}
|
|
20
|
+
/** sha256 (hex) del contenido de cada archivo. */
|
|
21
|
+
export declare function computeHashes(files: Array<{
|
|
22
|
+
relativePath: string;
|
|
23
|
+
content: string;
|
|
24
|
+
}>): Record<string, string>;
|
|
25
|
+
/**
|
|
26
|
+
* Compara el estado `current` contra el `installed`: qué archivos se añadieron,
|
|
27
|
+
* se eliminaron y se modificaron. `clean` es true solo cuando no hay ninguna
|
|
28
|
+
* diferencia.
|
|
29
|
+
*/
|
|
30
|
+
export declare function diffHashes(current: Record<string, string>, installed: Record<string, string>): DiffResult;
|
|
31
|
+
export declare function serializeManifest(manifest: Manifest): string;
|
|
32
|
+
export declare function parseManifest(text: string): Manifest;
|
|
33
|
+
//# sourceMappingURL=manifest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../src/manifest.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,gFAAgF;AAChF,eAAO,MAAM,sBAAsB,8BAA8B,CAAC;AAElE,MAAM,WAAW,QAAQ;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC/B;AAED,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,KAAK,EAAE,OAAO,CAAC;CAChB;AAED,kDAAkD;AAClD,wBAAgB,aAAa,CAAC,KAAK,EAAE,KAAK,CAAC;IAAE,YAAY,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAM7G;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CACxB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC/B,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAChC,UAAU,CAuBZ;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,CAE5D;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ,CAEpD"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Manifiesto de versión y deriva (A-052 §5): registra qué archivos se espejaron y
|
|
4
|
+
* su hash, para que `update` detecte ediciones del consumidor (deriva) y `--reset`
|
|
5
|
+
* las restaure. Funciones puras: el sistema de archivos lo toca el materializador.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.MANIFEST_RELATIVE_PATH = void 0;
|
|
9
|
+
exports.computeHashes = computeHashes;
|
|
10
|
+
exports.diffHashes = diffHashes;
|
|
11
|
+
exports.serializeManifest = serializeManifest;
|
|
12
|
+
exports.parseManifest = parseManifest;
|
|
13
|
+
const node_crypto_1 = require("node:crypto");
|
|
14
|
+
/** Ruta relativa del manifiesto dentro del consumidor (docs/agents/, A-052). */
|
|
15
|
+
exports.MANIFEST_RELATIVE_PATH = "docs/agents/manifest.json";
|
|
16
|
+
/** sha256 (hex) del contenido de cada archivo. */
|
|
17
|
+
function computeHashes(files) {
|
|
18
|
+
const hashes = {};
|
|
19
|
+
for (const file of files) {
|
|
20
|
+
hashes[file.relativePath] = (0, node_crypto_1.createHash)("sha256").update(file.content).digest("hex");
|
|
21
|
+
}
|
|
22
|
+
return hashes;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Compara el estado `current` contra el `installed`: qué archivos se añadieron,
|
|
26
|
+
* se eliminaron y se modificaron. `clean` es true solo cuando no hay ninguna
|
|
27
|
+
* diferencia.
|
|
28
|
+
*/
|
|
29
|
+
function diffHashes(current, installed) {
|
|
30
|
+
const added = [];
|
|
31
|
+
const removed = [];
|
|
32
|
+
const modified = [];
|
|
33
|
+
for (const path of Object.keys(current)) {
|
|
34
|
+
if (!(path in installed))
|
|
35
|
+
added.push(path);
|
|
36
|
+
else if (installed[path] !== current[path])
|
|
37
|
+
modified.push(path);
|
|
38
|
+
}
|
|
39
|
+
for (const path of Object.keys(installed)) {
|
|
40
|
+
if (!(path in current))
|
|
41
|
+
removed.push(path);
|
|
42
|
+
}
|
|
43
|
+
added.sort();
|
|
44
|
+
removed.sort();
|
|
45
|
+
modified.sort();
|
|
46
|
+
return {
|
|
47
|
+
added,
|
|
48
|
+
removed,
|
|
49
|
+
modified,
|
|
50
|
+
clean: added.length === 0 && removed.length === 0 && modified.length === 0,
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
function serializeManifest(manifest) {
|
|
54
|
+
return JSON.stringify(manifest, null, 2);
|
|
55
|
+
}
|
|
56
|
+
function parseManifest(text) {
|
|
57
|
+
return JSON.parse(text);
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=manifest.js.map
|