@oxagen/cli 0.4.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +68 -5
- package/dist/agent/__tests__/code-graph.test.d.ts +2 -0
- package/dist/agent/__tests__/code-graph.test.d.ts.map +1 -0
- package/dist/agent/__tests__/code-graph.test.js +83 -0
- package/dist/agent/__tests__/code-graph.test.js.map +1 -0
- package/dist/agent/__tests__/evaluator.test.d.ts +2 -0
- package/dist/agent/__tests__/evaluator.test.d.ts.map +1 -0
- package/dist/agent/__tests__/evaluator.test.js +96 -0
- package/dist/agent/__tests__/evaluator.test.js.map +1 -0
- package/dist/agent/__tests__/fleet-memory.test.d.ts +2 -0
- package/dist/agent/__tests__/fleet-memory.test.d.ts.map +1 -0
- package/dist/agent/__tests__/fleet-memory.test.js +107 -0
- package/dist/agent/__tests__/fleet-memory.test.js.map +1 -0
- package/dist/agent/__tests__/fleet-store.test.d.ts +2 -0
- package/dist/agent/__tests__/fleet-store.test.d.ts.map +1 -0
- package/dist/agent/__tests__/fleet-store.test.js +93 -0
- package/dist/agent/__tests__/fleet-store.test.js.map +1 -0
- package/dist/agent/__tests__/git-isolation.test.d.ts +2 -0
- package/dist/agent/__tests__/git-isolation.test.d.ts.map +1 -0
- package/dist/agent/__tests__/git-isolation.test.js +119 -0
- package/dist/agent/__tests__/git-isolation.test.js.map +1 -0
- package/dist/agent/__tests__/judge.test.d.ts +2 -0
- package/dist/agent/__tests__/judge.test.d.ts.map +1 -0
- package/dist/agent/__tests__/judge.test.js +135 -0
- package/dist/agent/__tests__/judge.test.js.map +1 -0
- package/dist/agent/__tests__/loop-errors.test.d.ts +2 -0
- package/dist/agent/__tests__/loop-errors.test.d.ts.map +1 -0
- package/dist/agent/__tests__/loop-errors.test.js +44 -0
- package/dist/agent/__tests__/loop-errors.test.js.map +1 -0
- package/dist/agent/__tests__/model-router.test.d.ts +2 -0
- package/dist/agent/__tests__/model-router.test.d.ts.map +1 -0
- package/dist/agent/__tests__/model-router.test.js +122 -0
- package/dist/agent/__tests__/model-router.test.js.map +1 -0
- package/dist/agent/__tests__/orchestrator-isolation.test.d.ts +2 -0
- package/dist/agent/__tests__/orchestrator-isolation.test.d.ts.map +1 -0
- package/dist/agent/__tests__/orchestrator-isolation.test.js +134 -0
- package/dist/agent/__tests__/orchestrator-isolation.test.js.map +1 -0
- package/dist/agent/__tests__/orchestrator.test.d.ts +2 -0
- package/dist/agent/__tests__/orchestrator.test.d.ts.map +1 -0
- package/dist/agent/__tests__/orchestrator.test.js +201 -0
- package/dist/agent/__tests__/orchestrator.test.js.map +1 -0
- package/dist/agent/__tests__/pipeline.test.d.ts +2 -0
- package/dist/agent/__tests__/pipeline.test.d.ts.map +1 -0
- package/dist/agent/__tests__/pipeline.test.js +226 -0
- package/dist/agent/__tests__/pipeline.test.js.map +1 -0
- package/dist/agent/__tests__/planner.test.d.ts +2 -0
- package/dist/agent/__tests__/planner.test.d.ts.map +1 -0
- package/dist/agent/__tests__/planner.test.js +98 -0
- package/dist/agent/__tests__/planner.test.js.map +1 -0
- package/dist/agent/__tests__/prompt-enhancer.test.d.ts +2 -0
- package/dist/agent/__tests__/prompt-enhancer.test.d.ts.map +1 -0
- package/dist/agent/__tests__/prompt-enhancer.test.js +107 -0
- package/dist/agent/__tests__/prompt-enhancer.test.js.map +1 -0
- package/dist/agent/__tests__/trace-format.test.d.ts +2 -0
- package/dist/agent/__tests__/trace-format.test.d.ts.map +1 -0
- package/dist/agent/__tests__/trace-format.test.js +104 -0
- package/dist/agent/__tests__/trace-format.test.js.map +1 -0
- package/dist/agent/__tests__/trace-store.test.d.ts +2 -0
- package/dist/agent/__tests__/trace-store.test.d.ts.map +1 -0
- package/dist/agent/__tests__/trace-store.test.js +113 -0
- package/dist/agent/__tests__/trace-store.test.js.map +1 -0
- package/dist/agent/code-graph.d.ts +18 -0
- package/dist/agent/code-graph.d.ts.map +1 -0
- package/dist/agent/code-graph.js +119 -0
- package/dist/agent/code-graph.js.map +1 -0
- package/dist/agent/env.d.ts +11 -0
- package/dist/agent/env.d.ts.map +1 -0
- package/dist/agent/env.js +82 -0
- package/dist/agent/env.js.map +1 -0
- package/dist/agent/evaluator.d.ts +13 -0
- package/dist/agent/evaluator.d.ts.map +1 -0
- package/dist/agent/evaluator.js +146 -0
- package/dist/agent/evaluator.js.map +1 -0
- package/dist/agent/fleet/git-isolation.d.ts +142 -0
- package/dist/agent/fleet/git-isolation.d.ts.map +1 -0
- package/dist/agent/fleet/git-isolation.js +290 -0
- package/dist/agent/fleet/git-isolation.js.map +1 -0
- package/dist/agent/fleet/memory.d.ts +21 -0
- package/dist/agent/fleet/memory.d.ts.map +1 -0
- package/dist/agent/fleet/memory.js +129 -0
- package/dist/agent/fleet/memory.js.map +1 -0
- package/dist/agent/fleet/orchestrator.d.ts +103 -0
- package/dist/agent/fleet/orchestrator.d.ts.map +1 -0
- package/dist/agent/fleet/orchestrator.js +355 -0
- package/dist/agent/fleet/orchestrator.js.map +1 -0
- package/dist/agent/fleet/store.d.ts +13 -0
- package/dist/agent/fleet/store.d.ts.map +1 -0
- package/dist/agent/fleet/store.js +79 -0
- package/dist/agent/fleet/store.js.map +1 -0
- package/dist/agent/fleet/types.d.ts +105 -0
- package/dist/agent/fleet/types.d.ts.map +1 -0
- package/dist/agent/fleet/types.js +17 -0
- package/dist/agent/fleet/types.js.map +1 -0
- package/dist/agent/judge.d.ts +38 -0
- package/dist/agent/judge.d.ts.map +1 -0
- package/dist/agent/judge.js +170 -0
- package/dist/agent/judge.js.map +1 -0
- package/dist/agent/loop.d.ts +61 -0
- package/dist/agent/loop.d.ts.map +1 -0
- package/dist/agent/loop.js +134 -0
- package/dist/agent/loop.js.map +1 -0
- package/dist/agent/memory.d.ts +14 -0
- package/dist/agent/memory.d.ts.map +1 -0
- package/dist/agent/memory.js +118 -0
- package/dist/agent/memory.js.map +1 -0
- package/dist/agent/model-router.d.ts +79 -0
- package/dist/agent/model-router.d.ts.map +1 -0
- package/dist/agent/model-router.js +141 -0
- package/dist/agent/model-router.js.map +1 -0
- package/dist/agent/model.d.ts +9 -0
- package/dist/agent/model.d.ts.map +1 -0
- package/dist/agent/model.js +24 -0
- package/dist/agent/model.js.map +1 -0
- package/dist/agent/pipeline.d.ts +82 -0
- package/dist/agent/pipeline.d.ts.map +1 -0
- package/dist/agent/pipeline.js +320 -0
- package/dist/agent/pipeline.js.map +1 -0
- package/dist/agent/planner.d.ts +16 -0
- package/dist/agent/planner.d.ts.map +1 -0
- package/dist/agent/planner.js +126 -0
- package/dist/agent/planner.js.map +1 -0
- package/dist/agent/project-context.d.ts +13 -0
- package/dist/agent/project-context.d.ts.map +1 -0
- package/dist/agent/project-context.js +66 -0
- package/dist/agent/project-context.js.map +1 -0
- package/dist/agent/prompt-enhancer.d.ts +37 -0
- package/dist/agent/prompt-enhancer.d.ts.map +1 -0
- package/dist/agent/prompt-enhancer.js +115 -0
- package/dist/agent/prompt-enhancer.js.map +1 -0
- package/dist/agent/system-prompt.d.ts +9 -0
- package/dist/agent/system-prompt.d.ts.map +1 -0
- package/dist/agent/system-prompt.js +38 -0
- package/dist/agent/system-prompt.js.map +1 -0
- package/dist/agent/tools.d.ts +19 -0
- package/dist/agent/tools.d.ts.map +1 -0
- package/dist/agent/tools.js +323 -0
- package/dist/agent/tools.js.map +1 -0
- package/dist/agent/trace-format.d.ts +6 -0
- package/dist/agent/trace-format.d.ts.map +1 -0
- package/dist/agent/trace-format.js +74 -0
- package/dist/agent/trace-format.js.map +1 -0
- package/dist/agent/trace-store.d.ts +19 -0
- package/dist/agent/trace-store.d.ts.map +1 -0
- package/dist/agent/trace-store.js +82 -0
- package/dist/agent/trace-store.js.map +1 -0
- package/dist/agent/trace.d.ts +121 -0
- package/dist/agent/trace.d.ts.map +1 -0
- package/dist/agent/trace.js +2 -0
- package/dist/agent/trace.js.map +1 -0
- package/dist/commands/__tests__/replay.test.d.ts +2 -0
- package/dist/commands/__tests__/replay.test.d.ts.map +1 -0
- package/dist/commands/__tests__/replay.test.js +76 -0
- package/dist/commands/__tests__/replay.test.js.map +1 -0
- package/dist/commands/agent.mcp.consent.list.d.ts +3 -0
- package/dist/commands/agent.mcp.consent.list.d.ts.map +1 -0
- package/dist/commands/agent.mcp.consent.list.js +30 -0
- package/dist/commands/agent.mcp.consent.list.js.map +1 -0
- package/dist/commands/agent.mcp.consent.resolve.d.ts +3 -0
- package/dist/commands/agent.mcp.consent.resolve.d.ts.map +1 -0
- package/dist/commands/agent.mcp.consent.resolve.js +34 -0
- package/dist/commands/agent.mcp.consent.resolve.js.map +1 -0
- package/dist/commands/agent.mcp.delete.d.ts +3 -0
- package/dist/commands/agent.mcp.delete.d.ts.map +1 -0
- package/dist/commands/agent.mcp.delete.js +27 -0
- package/dist/commands/agent.mcp.delete.js.map +1 -0
- package/dist/commands/agent.mcp.set_enabled.d.ts +3 -0
- package/dist/commands/agent.mcp.set_enabled.d.ts.map +1 -0
- package/dist/commands/agent.mcp.set_enabled.js +33 -0
- package/dist/commands/agent.mcp.set_enabled.js.map +1 -0
- package/dist/commands/agent.skill.load.d.ts +3 -0
- package/dist/commands/agent.skill.load.d.ts.map +1 -0
- package/dist/commands/agent.skill.load.js +57 -0
- package/dist/commands/agent.skill.load.js.map +1 -0
- package/dist/commands/audit.log.query.d.ts +3 -0
- package/dist/commands/audit.log.query.d.ts.map +1 -0
- package/dist/commands/audit.log.query.js +42 -0
- package/dist/commands/audit.log.query.js.map +1 -0
- package/dist/commands/automation.create.d.ts.map +1 -1
- package/dist/commands/automation.create.js +43 -4
- package/dist/commands/automation.create.js.map +1 -1
- package/dist/commands/automation.disable.d.ts +3 -0
- package/dist/commands/automation.disable.d.ts.map +1 -0
- package/dist/commands/automation.disable.js +24 -0
- package/dist/commands/automation.disable.js.map +1 -0
- package/dist/commands/automation.enable.d.ts +3 -0
- package/dist/commands/automation.enable.d.ts.map +1 -0
- package/dist/commands/automation.enable.js +24 -0
- package/dist/commands/automation.enable.js.map +1 -0
- package/dist/commands/automation.update.d.ts +3 -0
- package/dist/commands/automation.update.d.ts.map +1 -0
- package/dist/commands/automation.update.js +42 -0
- package/dist/commands/automation.update.js.map +1 -0
- package/dist/commands/code.d.ts +14 -0
- package/dist/commands/code.d.ts.map +1 -0
- package/dist/commands/code.js +100 -0
- package/dist/commands/code.js.map +1 -0
- package/dist/commands/config.d.ts +2 -0
- package/dist/commands/config.d.ts.map +1 -0
- package/dist/commands/config.js +66 -0
- package/dist/commands/config.js.map +1 -0
- package/dist/commands/conversation.files.list.d.ts +3 -0
- package/dist/commands/conversation.files.list.d.ts.map +1 -0
- package/dist/commands/conversation.files.list.js +39 -0
- package/dist/commands/conversation.files.list.js.map +1 -0
- package/dist/commands/env.d.ts +19 -0
- package/dist/commands/env.d.ts.map +1 -0
- package/dist/commands/env.js +64 -0
- package/dist/commands/env.js.map +1 -0
- package/dist/commands/graph.search.d.ts +10 -0
- package/dist/commands/graph.search.d.ts.map +1 -0
- package/dist/commands/graph.search.js +25 -0
- package/dist/commands/graph.search.js.map +1 -0
- package/dist/commands/markdown.generate.d.ts +3 -0
- package/dist/commands/markdown.generate.d.ts.map +1 -0
- package/dist/commands/markdown.generate.js +37 -0
- package/dist/commands/markdown.generate.js.map +1 -0
- package/dist/commands/mcp.add.d.ts +13 -0
- package/dist/commands/mcp.add.d.ts.map +1 -0
- package/dist/commands/mcp.add.js +110 -0
- package/dist/commands/mcp.add.js.map +1 -0
- package/dist/commands/mcp.auth.d.ts +10 -0
- package/dist/commands/mcp.auth.d.ts.map +1 -0
- package/dist/commands/mcp.auth.js +132 -0
- package/dist/commands/mcp.auth.js.map +1 -0
- package/dist/commands/mcp.check.d.ts +10 -0
- package/dist/commands/mcp.check.d.ts.map +1 -0
- package/dist/commands/mcp.check.js +114 -0
- package/dist/commands/mcp.check.js.map +1 -0
- package/dist/commands/mcp.list.d.ts +9 -0
- package/dist/commands/mcp.list.d.ts.map +1 -0
- package/dist/commands/mcp.list.js +93 -0
- package/dist/commands/mcp.list.js.map +1 -0
- package/dist/commands/mcp.permit.d.ts +12 -0
- package/dist/commands/mcp.permit.d.ts.map +1 -0
- package/dist/commands/mcp.permit.js +117 -0
- package/dist/commands/mcp.permit.js.map +1 -0
- package/dist/commands/mcp.remove.d.ts +9 -0
- package/dist/commands/mcp.remove.d.ts.map +1 -0
- package/dist/commands/mcp.remove.js +65 -0
- package/dist/commands/mcp.remove.js.map +1 -0
- package/dist/commands/mermaid.generate.d.ts +3 -0
- package/dist/commands/mermaid.generate.d.ts.map +1 -0
- package/dist/commands/mermaid.generate.js +33 -0
- package/dist/commands/mermaid.generate.js.map +1 -0
- package/dist/commands/ontology.neighbors.d.ts +3 -0
- package/dist/commands/ontology.neighbors.d.ts.map +1 -0
- package/dist/commands/ontology.neighbors.js +34 -0
- package/dist/commands/ontology.neighbors.js.map +1 -0
- package/dist/commands/ontology.query.d.ts +3 -0
- package/dist/commands/ontology.query.d.ts.map +1 -0
- package/dist/commands/ontology.query.js +36 -0
- package/dist/commands/ontology.query.js.map +1 -0
- package/dist/commands/plugin.org.install_bulk.js +1 -1
- package/dist/commands/plugin.org.install_bulk.js.map +1 -1
- package/dist/commands/privacy.erase.d.ts.map +1 -1
- package/dist/commands/privacy.erase.js +2 -1
- package/dist/commands/privacy.erase.js.map +1 -1
- package/dist/commands/privacy.erase.test.d.ts +2 -0
- package/dist/commands/privacy.erase.test.d.ts.map +1 -0
- package/dist/commands/privacy.erase.test.js +132 -0
- package/dist/commands/privacy.erase.test.js.map +1 -0
- package/dist/commands/replay.d.ts +5 -0
- package/dist/commands/replay.d.ts.map +1 -0
- package/dist/commands/replay.js +28 -0
- package/dist/commands/replay.js.map +1 -0
- package/dist/commands/schema/schema.config.d.ts +3 -0
- package/dist/commands/schema/schema.config.d.ts.map +1 -0
- package/dist/commands/schema/schema.config.js +34 -0
- package/dist/commands/schema/schema.config.js.map +1 -0
- package/dist/commands/schema/schema.disable.d.ts +3 -0
- package/dist/commands/schema/schema.disable.d.ts.map +1 -0
- package/dist/commands/schema/schema.disable.js +22 -0
- package/dist/commands/schema/schema.disable.js.map +1 -0
- package/dist/commands/schema/schema.enable.d.ts +3 -0
- package/dist/commands/schema/schema.enable.d.ts.map +1 -0
- package/dist/commands/schema/schema.enable.js +22 -0
- package/dist/commands/schema/schema.enable.js.map +1 -0
- package/dist/commands/schema/schema.export.d.ts +3 -0
- package/dist/commands/schema/schema.export.d.ts.map +1 -0
- package/dist/commands/schema/schema.export.js +31 -0
- package/dist/commands/schema/schema.export.js.map +1 -0
- package/dist/commands/schema/schema.get.d.ts +3 -0
- package/dist/commands/schema/schema.get.d.ts.map +1 -0
- package/dist/commands/schema/schema.get.js +23 -0
- package/dist/commands/schema/schema.get.js.map +1 -0
- package/dist/commands/schema/schema.label.d.ts +5 -0
- package/dist/commands/schema/schema.label.d.ts.map +1 -0
- package/dist/commands/schema/schema.label.js +60 -0
- package/dist/commands/schema/schema.label.js.map +1 -0
- package/dist/commands/schema/schema.list.d.ts +3 -0
- package/dist/commands/schema/schema.list.d.ts.map +1 -0
- package/dist/commands/schema/schema.list.js +30 -0
- package/dist/commands/schema/schema.list.js.map +1 -0
- package/dist/commands/schema/schema.prop.d.ts +5 -0
- package/dist/commands/schema/schema.prop.d.ts.map +1 -0
- package/dist/commands/schema/schema.prop.js +72 -0
- package/dist/commands/schema/schema.prop.js.map +1 -0
- package/dist/commands/schema/schema.reconcile.d.ts +10 -0
- package/dist/commands/schema/schema.reconcile.d.ts.map +1 -0
- package/dist/commands/schema/schema.reconcile.js +65 -0
- package/dist/commands/schema/schema.reconcile.js.map +1 -0
- package/dist/commands/schema/schema.rel.d.ts +5 -0
- package/dist/commands/schema/schema.rel.d.ts.map +1 -0
- package/dist/commands/schema/schema.rel.js +65 -0
- package/dist/commands/schema/schema.rel.js.map +1 -0
- package/dist/commands/schema/schema.version.d.ts +7 -0
- package/dist/commands/schema/schema.version.d.ts.map +1 -0
- package/dist/commands/schema/schema.version.js +96 -0
- package/dist/commands/schema/schema.version.js.map +1 -0
- package/dist/commands/secret.d.ts +23 -0
- package/dist/commands/secret.d.ts.map +1 -0
- package/dist/commands/secret.js +90 -0
- package/dist/commands/secret.js.map +1 -0
- package/dist/commands/skill.create.d.ts +3 -0
- package/dist/commands/skill.create.d.ts.map +1 -0
- package/dist/commands/skill.create.js +52 -0
- package/dist/commands/skill.create.js.map +1 -0
- package/dist/commands/skill.edit.d.ts +3 -0
- package/dist/commands/skill.edit.d.ts.map +1 -0
- package/dist/commands/skill.edit.js +28 -0
- package/dist/commands/skill.edit.js.map +1 -0
- package/dist/commands/skill.enable.d.ts +3 -0
- package/dist/commands/skill.enable.d.ts.map +1 -0
- package/dist/commands/skill.enable.js +31 -0
- package/dist/commands/skill.enable.js.map +1 -0
- package/dist/commands/skill.export.d.ts +3 -0
- package/dist/commands/skill.export.d.ts.map +1 -0
- package/dist/commands/skill.export.js +25 -0
- package/dist/commands/skill.export.js.map +1 -0
- package/dist/commands/skill.metrics.read.d.ts +3 -0
- package/dist/commands/skill.metrics.read.d.ts.map +1 -0
- package/dist/commands/skill.metrics.read.js +56 -0
- package/dist/commands/skill.metrics.read.js.map +1 -0
- package/dist/commands/skill.version.activate.d.ts +3 -0
- package/dist/commands/skill.version.activate.d.ts.map +1 -0
- package/dist/commands/skill.version.activate.js +24 -0
- package/dist/commands/skill.version.activate.js.map +1 -0
- package/dist/commands/skill.version.get.d.ts +3 -0
- package/dist/commands/skill.version.get.d.ts.map +1 -0
- package/dist/commands/skill.version.get.js +43 -0
- package/dist/commands/skill.version.get.js.map +1 -0
- package/dist/commands/skill.version.list.d.ts +3 -0
- package/dist/commands/skill.version.list.d.ts.map +1 -0
- package/dist/commands/skill.version.list.js +38 -0
- package/dist/commands/skill.version.list.js.map +1 -0
- package/dist/commands/skill.version.upload.d.ts +3 -0
- package/dist/commands/skill.version.upload.d.ts.map +1 -0
- package/dist/commands/skill.version.upload.js +28 -0
- package/dist/commands/skill.version.upload.js.map +1 -0
- package/dist/commands/skill.workspace.install.d.ts +3 -0
- package/dist/commands/skill.workspace.install.d.ts.map +1 -0
- package/dist/commands/skill.workspace.install.js +52 -0
- package/dist/commands/skill.workspace.install.js.map +1 -0
- package/dist/commands.test.js +1391 -337
- package/dist/commands.test.js.map +1 -1
- package/dist/components/DevStatus.d.ts.map +1 -1
- package/dist/components/DevStatus.js +3 -2
- package/dist/components/DevStatus.js.map +1 -1
- package/dist/daemon/client.d.ts +30 -0
- package/dist/daemon/client.d.ts.map +1 -0
- package/dist/daemon/client.js +97 -0
- package/dist/daemon/client.js.map +1 -0
- package/dist/daemon/code-graph/builder.d.ts +6 -0
- package/dist/daemon/code-graph/builder.d.ts.map +1 -0
- package/dist/daemon/code-graph/builder.js +215 -0
- package/dist/daemon/code-graph/builder.js.map +1 -0
- package/dist/daemon/code-graph/query.d.ts +29 -0
- package/dist/daemon/code-graph/query.d.ts.map +1 -0
- package/dist/daemon/code-graph/query.js +98 -0
- package/dist/daemon/code-graph/query.js.map +1 -0
- package/dist/daemon/code-graph/types.d.ts +37 -0
- package/dist/daemon/code-graph/types.d.ts.map +1 -0
- package/dist/daemon/code-graph/types.js +5 -0
- package/dist/daemon/code-graph/types.js.map +1 -0
- package/dist/daemon/code-graph/watcher.d.ts +37 -0
- package/dist/daemon/code-graph/watcher.d.ts.map +1 -0
- package/dist/daemon/code-graph/watcher.js +79 -0
- package/dist/daemon/code-graph/watcher.js.map +1 -0
- package/dist/daemon/lifecycle.d.ts +6 -0
- package/dist/daemon/lifecycle.d.ts.map +1 -0
- package/dist/daemon/lifecycle.js +132 -0
- package/dist/daemon/lifecycle.js.map +1 -0
- package/dist/daemon/protocol.d.ts +113 -0
- package/dist/daemon/protocol.d.ts.map +1 -0
- package/dist/daemon/protocol.js +16 -0
- package/dist/daemon/protocol.js.map +1 -0
- package/dist/daemon/server.d.ts +26 -0
- package/dist/daemon/server.d.ts.map +1 -0
- package/dist/daemon/server.js +168 -0
- package/dist/daemon/server.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +262 -310
- package/dist/index.js.map +1 -1
- package/dist/lib/api.d.ts +5 -0
- package/dist/lib/api.d.ts.map +1 -0
- package/dist/lib/api.js +52 -0
- package/dist/lib/api.js.map +1 -0
- package/dist/lib/config.d.ts +3 -0
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +16 -3
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/config.test.js +21 -3
- package/dist/lib/config.test.js.map +1 -1
- package/dist/lib/differential-context.d.ts +46 -0
- package/dist/lib/differential-context.d.ts.map +1 -0
- package/dist/lib/differential-context.js +89 -0
- package/dist/lib/differential-context.js.map +1 -0
- package/dist/lib/resolve.d.ts +3 -0
- package/dist/lib/resolve.d.ts.map +1 -0
- package/dist/lib/resolve.js +29 -0
- package/dist/lib/resolve.js.map +1 -0
- package/dist/lib/structured-tool-io.d.ts +31 -0
- package/dist/lib/structured-tool-io.d.ts.map +1 -0
- package/dist/lib/structured-tool-io.js +56 -0
- package/dist/lib/structured-tool-io.js.map +1 -0
- package/dist/repl/__tests__/_queue_demo.test.d.ts +2 -0
- package/dist/repl/__tests__/_queue_demo.test.d.ts.map +1 -0
- package/dist/repl/__tests__/_queue_demo.test.js +40 -0
- package/dist/repl/__tests__/_queue_demo.test.js.map +1 -0
- package/dist/repl/__tests__/components.test.d.ts +2 -0
- package/dist/repl/__tests__/components.test.d.ts.map +1 -0
- package/dist/repl/__tests__/components.test.js +38 -0
- package/dist/repl/__tests__/components.test.js.map +1 -0
- package/dist/repl/__tests__/interactive.queue.test.d.ts +2 -0
- package/dist/repl/__tests__/interactive.queue.test.d.ts.map +1 -0
- package/dist/repl/__tests__/interactive.queue.test.js +124 -0
- package/dist/repl/__tests__/interactive.queue.test.js.map +1 -0
- package/dist/repl/components.d.ts +59 -0
- package/dist/repl/components.d.ts.map +1 -0
- package/dist/repl/components.js +152 -0
- package/dist/repl/components.js.map +1 -0
- package/dist/repl/interactive.d.ts +12 -0
- package/dist/repl/interactive.d.ts.map +1 -0
- package/dist/repl/interactive.js +326 -0
- package/dist/repl/interactive.js.map +1 -0
- package/dist/repl/one-shot.d.ts +9 -0
- package/dist/repl/one-shot.d.ts.map +1 -0
- package/dist/repl/one-shot.js +83 -0
- package/dist/repl/one-shot.js.map +1 -0
- package/dist/tui/__tests__/app.test.d.ts +2 -0
- package/dist/tui/__tests__/app.test.d.ts.map +1 -0
- package/dist/tui/__tests__/app.test.js +136 -0
- package/dist/tui/__tests__/app.test.js.map +1 -0
- package/dist/tui/__tests__/banner.test.d.ts +2 -0
- package/dist/tui/__tests__/banner.test.d.ts.map +1 -0
- package/dist/tui/__tests__/banner.test.js +15 -0
- package/dist/tui/__tests__/banner.test.js.map +1 -0
- package/dist/tui/__tests__/command-form.test.d.ts +2 -0
- package/dist/tui/__tests__/command-form.test.d.ts.map +1 -0
- package/dist/tui/__tests__/command-form.test.js +96 -0
- package/dist/tui/__tests__/command-form.test.js.map +1 -0
- package/dist/tui/__tests__/command-tree.test.d.ts +2 -0
- package/dist/tui/__tests__/command-tree.test.d.ts.map +1 -0
- package/dist/tui/__tests__/command-tree.test.js +55 -0
- package/dist/tui/__tests__/command-tree.test.js.map +1 -0
- package/dist/tui/__tests__/runner.test.d.ts +2 -0
- package/dist/tui/__tests__/runner.test.d.ts.map +1 -0
- package/dist/tui/__tests__/runner.test.js +38 -0
- package/dist/tui/__tests__/runner.test.js.map +1 -0
- package/dist/tui/__tests__/theme.test.d.ts +2 -0
- package/dist/tui/__tests__/theme.test.d.ts.map +1 -0
- package/dist/tui/__tests__/theme.test.js +11 -0
- package/dist/tui/__tests__/theme.test.js.map +1 -0
- package/dist/tui/agent-view/activity-feed.d.ts +3 -0
- package/dist/tui/agent-view/activity-feed.d.ts.map +1 -0
- package/dist/tui/agent-view/activity-feed.js +34 -0
- package/dist/tui/agent-view/activity-feed.js.map +1 -0
- package/dist/tui/agent-view/budget-bar.d.ts +3 -0
- package/dist/tui/agent-view/budget-bar.d.ts.map +1 -0
- package/dist/tui/agent-view/budget-bar.js +53 -0
- package/dist/tui/agent-view/budget-bar.js.map +1 -0
- package/dist/tui/agent-view/compile-panel.d.ts +3 -0
- package/dist/tui/agent-view/compile-panel.d.ts.map +1 -0
- package/dist/tui/agent-view/compile-panel.js +34 -0
- package/dist/tui/agent-view/compile-panel.js.map +1 -0
- package/dist/tui/agent-view/index.d.ts +4 -0
- package/dist/tui/agent-view/index.d.ts.map +1 -0
- package/dist/tui/agent-view/index.js +31 -0
- package/dist/tui/agent-view/index.js.map +1 -0
- package/dist/tui/agent-view/memory-panel.d.ts +3 -0
- package/dist/tui/agent-view/memory-panel.d.ts.map +1 -0
- package/dist/tui/agent-view/memory-panel.js +80 -0
- package/dist/tui/agent-view/memory-panel.js.map +1 -0
- package/dist/tui/agent-view/session-panel.d.ts +3 -0
- package/dist/tui/agent-view/session-panel.d.ts.map +1 -0
- package/dist/tui/agent-view/session-panel.js +44 -0
- package/dist/tui/agent-view/session-panel.js.map +1 -0
- package/dist/tui/agent-view/status-bar.d.ts +7 -0
- package/dist/tui/agent-view/status-bar.d.ts.map +1 -0
- package/dist/tui/agent-view/status-bar.js +22 -0
- package/dist/tui/agent-view/status-bar.js.map +1 -0
- package/dist/tui/app.d.ts +9 -0
- package/dist/tui/app.d.ts.map +1 -0
- package/dist/tui/app.js +115 -0
- package/dist/tui/app.js.map +1 -0
- package/dist/tui/banner.d.ts +5 -0
- package/dist/tui/banner.d.ts.map +1 -0
- package/dist/tui/banner.js +17 -0
- package/dist/tui/banner.js.map +1 -0
- package/dist/tui/command-form.d.ts +9 -0
- package/dist/tui/command-form.d.ts.map +1 -0
- package/dist/tui/command-form.js +76 -0
- package/dist/tui/command-form.js.map +1 -0
- package/dist/tui/command-tree.d.ts +30 -0
- package/dist/tui/command-tree.d.ts.map +1 -0
- package/dist/tui/command-tree.js +43 -0
- package/dist/tui/command-tree.js.map +1 -0
- package/dist/tui/fleet-view/agent-row.d.ts +10 -0
- package/dist/tui/fleet-view/agent-row.d.ts.map +1 -0
- package/dist/tui/fleet-view/agent-row.js +80 -0
- package/dist/tui/fleet-view/agent-row.js.map +1 -0
- package/dist/tui/fleet-view/dispatch-input.d.ts +5 -0
- package/dist/tui/fleet-view/dispatch-input.d.ts.map +1 -0
- package/dist/tui/fleet-view/dispatch-input.js +36 -0
- package/dist/tui/fleet-view/dispatch-input.js.map +1 -0
- package/dist/tui/fleet-view/fleet-app.d.ts +11 -0
- package/dist/tui/fleet-view/fleet-app.d.ts.map +1 -0
- package/dist/tui/fleet-view/fleet-app.js +95 -0
- package/dist/tui/fleet-view/fleet-app.js.map +1 -0
- package/dist/tui/fleet-view/fleet-summary.d.ts +6 -0
- package/dist/tui/fleet-view/fleet-summary.d.ts.map +1 -0
- package/dist/tui/fleet-view/fleet-summary.js +19 -0
- package/dist/tui/fleet-view/fleet-summary.js.map +1 -0
- package/dist/tui/fleet-view/index.d.ts +16 -0
- package/dist/tui/fleet-view/index.d.ts.map +1 -0
- package/dist/tui/fleet-view/index.js +61 -0
- package/dist/tui/fleet-view/index.js.map +1 -0
- package/dist/tui/runner.d.ts +7 -0
- package/dist/tui/runner.d.ts.map +1 -0
- package/dist/tui/runner.js +36 -0
- package/dist/tui/runner.js.map +1 -0
- package/dist/tui/theme.d.ts +8 -0
- package/dist/tui/theme.d.ts.map +1 -0
- package/dist/tui/theme.js +10 -0
- package/dist/tui/theme.js.map +1 -0
- package/package.json +12 -7
- package/README.html +0 -379
package/README.md
CHANGED
|
@@ -23,6 +23,18 @@ pnpm -C apps/cli build
|
|
|
23
23
|
node apps/cli/dist/index.js --version
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
+
## Interactive mode
|
|
27
|
+
|
|
28
|
+
Run `oxagen` with no arguments in a terminal to open the interactive TUI: an
|
|
29
|
+
ASCII banner and a keyboard-navigable menu of every command group and command.
|
|
30
|
+
|
|
31
|
+
- `↑/↓` move · `↵` select · `Esc` back · `q` quit · type to filter
|
|
32
|
+
- Selecting a command opens a form for its arguments and flags, then runs it.
|
|
33
|
+
- Secret inputs (passwords, tokens) are masked.
|
|
34
|
+
|
|
35
|
+
Disable it (always print help instead) with `OXAGEN_NO_TUI=1`. Non-interactive
|
|
36
|
+
usage — `oxagen <command> …`, pipes, and CI — is unaffected.
|
|
37
|
+
|
|
26
38
|
## Authentication
|
|
27
39
|
|
|
28
40
|
```bash
|
|
@@ -97,16 +109,18 @@ oxagen agent mcp list
|
|
|
97
109
|
The Oxagen platform itself is an MCP server. Connect Claude Code, Claude Desktop, or Cursor to it using an API key.
|
|
98
110
|
|
|
99
111
|
**Claude Code**
|
|
112
|
+
|
|
100
113
|
```bash
|
|
101
114
|
oxagen api-key create # copy the key that's printed
|
|
102
115
|
|
|
103
116
|
claude mcp add oxagen \
|
|
104
117
|
--transport http \
|
|
105
|
-
--url https://
|
|
118
|
+
--url https://mcp.oxagen.sh/mcp \
|
|
106
119
|
--header "Authorization: Bearer $OXAGEN_API_KEY"
|
|
107
120
|
```
|
|
108
121
|
|
|
109
122
|
**Claude Desktop** — add to `claude_desktop_config.json`:
|
|
123
|
+
|
|
110
124
|
```json
|
|
111
125
|
{
|
|
112
126
|
"mcpServers": {
|
|
@@ -120,6 +134,7 @@ claude mcp add oxagen \
|
|
|
120
134
|
```
|
|
121
135
|
|
|
122
136
|
You can also retrieve connection instructions directly:
|
|
137
|
+
|
|
123
138
|
```bash
|
|
124
139
|
oxagen system install instructions
|
|
125
140
|
```
|
|
@@ -260,7 +275,6 @@ oxagen document create / list / read
|
|
|
260
275
|
oxagen archive create
|
|
261
276
|
oxagen asset upload
|
|
262
277
|
oxagen form create / fill / submit
|
|
263
|
-
oxagen brandkit apply
|
|
264
278
|
|
|
265
279
|
oxagen org create / list
|
|
266
280
|
oxagen org member add / remove / role change / invite accept / invite decline
|
|
@@ -326,12 +340,14 @@ oxagen auth login --email you@example.com --password yourpassword
|
|
|
326
340
|
## Troubleshooting
|
|
327
341
|
|
|
328
342
|
**`command not found: oxagen`** — ensure global install succeeded:
|
|
343
|
+
|
|
329
344
|
```bash
|
|
330
345
|
npm list -g @oxagen/cli
|
|
331
346
|
npm install -g @oxagen/cli
|
|
332
347
|
```
|
|
333
348
|
|
|
334
349
|
**Auth failures** — clear and re-authenticate:
|
|
350
|
+
|
|
335
351
|
```bash
|
|
336
352
|
oxagen auth logout && oxagen auth login
|
|
337
353
|
```
|
|
@@ -340,9 +356,51 @@ oxagen auth logout && oxagen auth login
|
|
|
340
356
|
|
|
341
357
|
## Development
|
|
342
358
|
|
|
359
|
+
### Install the `oxagen` binary onto your PATH (live, auto-rebuilding)
|
|
360
|
+
|
|
361
|
+
Run this once from the **repo root** and leave it running:
|
|
362
|
+
|
|
363
|
+
```bash
|
|
364
|
+
pnpm cli:dev
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
This builds the package, installs an `oxagen` binary onto your PATH, then watches
|
|
368
|
+
`apps/cli/src/**` and rebuilds on every save. After it prints `watching for
|
|
369
|
+
changes…`, open a second terminal and use `oxagen` like a published binary — every
|
|
370
|
+
source edit is live on the next invocation, with no reinstall step:
|
|
371
|
+
|
|
343
372
|
```bash
|
|
344
|
-
|
|
345
|
-
|
|
373
|
+
oxagen --version
|
|
374
|
+
oxagen --help
|
|
375
|
+
oxagen auth whoami
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
**How it works.** The installed binary is a symlink from a PATH directory
|
|
379
|
+
(`~/.local/bin/oxagen` when that's on your PATH) into the package's build output
|
|
380
|
+
(`apps/cli/dist/index.js`). `tsc --watch` rewrites `dist/` in place on every change,
|
|
381
|
+
and because a symlink always resolves to its target's current contents, the on-PATH
|
|
382
|
+
`oxagen` is always the freshly-built code — the "reinstall" is automatic.
|
|
383
|
+
|
|
384
|
+
Want a one-shot install without the watcher (build once, link, exit)?
|
|
385
|
+
|
|
386
|
+
```bash
|
|
387
|
+
pnpm cli:install
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
If `cli:dev` warns that the chosen directory isn't on your PATH, add it to your shell
|
|
391
|
+
profile (the script prints the exact line), e.g.:
|
|
392
|
+
|
|
393
|
+
```bash
|
|
394
|
+
export PATH="$HOME/.local/bin:$PATH"
|
|
395
|
+
```
|
|
396
|
+
|
|
397
|
+
To uninstall the dev binary, remove the symlink: `rm "$(command -v oxagen)"`.
|
|
398
|
+
|
|
399
|
+
### Other workflows
|
|
400
|
+
|
|
401
|
+
```bash
|
|
402
|
+
pnpm -C apps/cli dev -- auth whoami # run a single command from source with tsx
|
|
403
|
+
pnpm -C apps/cli build # compile to dist/ once
|
|
346
404
|
pnpm -C apps/cli test:unit # run unit tests
|
|
347
405
|
pnpm -C apps/cli lint # lint (zero warnings enforced)
|
|
348
406
|
pnpm -C apps/cli typecheck # type-check
|
|
@@ -350,11 +408,16 @@ pnpm -C apps/cli typecheck # type-check
|
|
|
350
408
|
|
|
351
409
|
Releases are managed monorepo-wide via `pnpm release:patch|minor|major`, which bumps all packages to the same version and syncs to Vercel.
|
|
352
410
|
|
|
411
|
+
### Known gaps
|
|
412
|
+
|
|
413
|
+
See [`GAPS.md`](./GAPS.md) for the tracked completeness, capability-parity, and `--help`
|
|
414
|
+
documentation gaps and their prioritized fix plan.
|
|
415
|
+
|
|
353
416
|
---
|
|
354
417
|
|
|
355
418
|
## Support
|
|
356
419
|
|
|
357
|
-
- Docs: https://
|
|
420
|
+
- Docs: https://docs.oxagen.sh
|
|
358
421
|
- Issues: https://github.com/oxagen/oxagen-monorepo/issues
|
|
359
422
|
- Email: support@oxagen.ai
|
|
360
423
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-graph.test.d.ts","sourceRoot":"","sources":["../../../src/agent/__tests__/code-graph.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Code-graph retrieval — proves the agent can answer structural questions about
|
|
3
|
+
* a real on-disk project: symbol search, file-symbol listing, and (the part
|
|
4
|
+
* that was previously broken) import/dependent resolution for impact analysis.
|
|
5
|
+
*/
|
|
6
|
+
import { describe, it, expect, beforeAll, afterAll } from "vitest";
|
|
7
|
+
import { promises as fs } from "node:fs";
|
|
8
|
+
import { tmpdir } from "node:os";
|
|
9
|
+
import { join } from "node:path";
|
|
10
|
+
import { queryCodeGraph, codeGraphStats, clearCodeGraphCache, } from "../code-graph.js";
|
|
11
|
+
let root = "";
|
|
12
|
+
beforeAll(async () => {
|
|
13
|
+
root = await fs.mkdtemp(join(tmpdir(), "oxagen-cg-"));
|
|
14
|
+
await fs.writeFile(join(root, "alpha.ts"), [
|
|
15
|
+
"export function computeAlpha() {",
|
|
16
|
+
" return 1;",
|
|
17
|
+
"}",
|
|
18
|
+
"export interface AlphaShape {",
|
|
19
|
+
" x: number;",
|
|
20
|
+
"}",
|
|
21
|
+
].join("\n"));
|
|
22
|
+
await fs.writeFile(join(root, "beta.ts"), [
|
|
23
|
+
'import { computeAlpha } from "./alpha.js";',
|
|
24
|
+
"export class BetaEngine {}",
|
|
25
|
+
"export function runBeta() {",
|
|
26
|
+
" return computeAlpha();",
|
|
27
|
+
"}",
|
|
28
|
+
].join("\n"));
|
|
29
|
+
await fs.mkdir(join(root, "sub"), { recursive: true });
|
|
30
|
+
await fs.writeFile(join(root, "sub", "gamma.ts"), [
|
|
31
|
+
'import { BetaEngine } from "../beta.js";',
|
|
32
|
+
'export type GammaKind = "a" | "b";',
|
|
33
|
+
].join("\n"));
|
|
34
|
+
});
|
|
35
|
+
afterAll(async () => {
|
|
36
|
+
clearCodeGraphCache();
|
|
37
|
+
if (root)
|
|
38
|
+
await fs.rm(root, { recursive: true, force: true });
|
|
39
|
+
});
|
|
40
|
+
describe("code-graph retrieval", () => {
|
|
41
|
+
it("search finds where a symbol is defined", async () => {
|
|
42
|
+
const out = await queryCodeGraph(root, "search", "computeAlpha");
|
|
43
|
+
expect(out).toContain("computeAlpha");
|
|
44
|
+
expect(out).toContain("alpha.ts");
|
|
45
|
+
expect(out).toContain("function");
|
|
46
|
+
});
|
|
47
|
+
it("search matches classes and is case-insensitive", async () => {
|
|
48
|
+
const out = await queryCodeGraph(root, "search", "betaengine");
|
|
49
|
+
expect(out).toContain("BetaEngine");
|
|
50
|
+
expect(out).toContain("class");
|
|
51
|
+
});
|
|
52
|
+
it("file_symbols lists the symbols a file defines", async () => {
|
|
53
|
+
const out = await queryCodeGraph(root, "file_symbols", "beta.ts");
|
|
54
|
+
expect(out).toContain("BetaEngine");
|
|
55
|
+
expect(out).toContain("runBeta");
|
|
56
|
+
});
|
|
57
|
+
it("dependents resolves who imports a file (impact analysis)", async () => {
|
|
58
|
+
// beta.ts imports alpha.ts → alpha's dependents include beta.ts
|
|
59
|
+
const alphaDeps = await queryCodeGraph(root, "dependents", "alpha.ts");
|
|
60
|
+
expect(alphaDeps).toContain("beta.ts");
|
|
61
|
+
// sub/gamma.ts imports ../beta.js → beta's dependents include sub/gamma.ts
|
|
62
|
+
const betaDeps = await queryCodeGraph(root, "dependents", "beta.ts");
|
|
63
|
+
expect(betaDeps).toContain("sub/gamma.ts");
|
|
64
|
+
});
|
|
65
|
+
it("imports resolves a file's local imports", async () => {
|
|
66
|
+
const betaImports = await queryCodeGraph(root, "imports", "beta.ts");
|
|
67
|
+
expect(betaImports).toContain("alpha.ts");
|
|
68
|
+
const gammaImports = await queryCodeGraph(root, "imports", "sub/gamma.ts");
|
|
69
|
+
expect(gammaImports).toContain("beta.ts");
|
|
70
|
+
});
|
|
71
|
+
it("reports a clear miss for unknown symbols and files", async () => {
|
|
72
|
+
expect(await queryCodeGraph(root, "search", "doesNotExist")).toContain("No symbols matching");
|
|
73
|
+
expect(await queryCodeGraph(root, "dependents", "nope.ts")).toContain("No file matching");
|
|
74
|
+
});
|
|
75
|
+
it("stats reflect the indexed fixture", async () => {
|
|
76
|
+
const stats = await codeGraphStats(root);
|
|
77
|
+
expect(stats.files).toBe(3);
|
|
78
|
+
// computeAlpha, AlphaShape, BetaEngine, runBeta, GammaKind
|
|
79
|
+
expect(stats.symbols).toBeGreaterThanOrEqual(5);
|
|
80
|
+
expect(stats.edges).toBeGreaterThan(0);
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
//# sourceMappingURL=code-graph.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-graph.test.js","sourceRoot":"","sources":["../../../src/agent/__tests__/code-graph.test.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AACnE,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EACL,cAAc,EACd,cAAc,EACd,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;AAE1B,IAAI,IAAI,GAAG,EAAE,CAAC;AAEd,SAAS,CAAC,KAAK,IAAI,EAAE;IACnB,IAAI,GAAG,MAAM,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,YAAY,CAAC,CAAC,CAAC;IACtD,MAAM,EAAE,CAAC,SAAS,CAChB,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC,EACtB;QACE,kCAAkC;QAClC,aAAa;QACb,GAAG;QACH,+BAA+B;QAC/B,cAAc;QACd,GAAG;KACJ,CAAC,IAAI,CAAC,IAAI,CAAC,CACb,CAAC;IACF,MAAM,EAAE,CAAC,SAAS,CAChB,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,EACrB;QACE,4CAA4C;QAC5C,4BAA4B;QAC5B,6BAA6B;QAC7B,0BAA0B;QAC1B,GAAG;KACJ,CAAC,IAAI,CAAC,IAAI,CAAC,CACb,CAAC;IACF,MAAM,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC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BAAkB,CACnB,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,mCAAmC,EAAE,KAAK,IAAI,EAAE;QACjD,MAAM,KAAK,GAAG,MAAM,cAAc,CAAC,IAAI,CAAC,CAAC;QACzC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAC5B,2DAA2D;QAC3D,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC;QAChD,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evaluator.test.d.ts","sourceRoot":"","sources":["../../../src/agent/__tests__/evaluator.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Prompt evaluator — proves the cheap front-of-pipeline call returns the model's
|
|
3
|
+
* structured read, clamps out-of-range scores, never drops intent to an empty
|
|
4
|
+
* rewrite, and degrades to a deterministic heuristic when the model call fails.
|
|
5
|
+
* The model call is mocked, so no gateway is touched.
|
|
6
|
+
*/
|
|
7
|
+
import { describe, it, expect, beforeEach, vi } from "vitest";
|
|
8
|
+
vi.mock("ai", () => ({ generateObject: vi.fn() }));
|
|
9
|
+
vi.mock("../../lib/config.js", () => ({ readConfig: () => ({}) }));
|
|
10
|
+
import { generateObject } from "ai";
|
|
11
|
+
import { evaluatePrompt } from "../evaluator.js";
|
|
12
|
+
const mockGen = generateObject;
|
|
13
|
+
beforeEach(() => {
|
|
14
|
+
delete process.env["OXAGEN_LLM_EVALUATOR"];
|
|
15
|
+
delete process.env["OXAGEN_LLM_FAST"];
|
|
16
|
+
});
|
|
17
|
+
describe("evaluatePrompt", () => {
|
|
18
|
+
it("returns the model's structured evaluation on the fast tier", async () => {
|
|
19
|
+
mockGen.mockResolvedValueOnce({
|
|
20
|
+
object: {
|
|
21
|
+
completeness: 80,
|
|
22
|
+
complexity: 40,
|
|
23
|
+
recommendedTier: "balanced",
|
|
24
|
+
missing: ["which file"],
|
|
25
|
+
contextQueries: ["loginUser"],
|
|
26
|
+
refinedPrompt: "fix loginUser null check",
|
|
27
|
+
removed: ["please"],
|
|
28
|
+
reasoning: "clear ask",
|
|
29
|
+
},
|
|
30
|
+
usage: { inputTokens: 10, outputTokens: 5 },
|
|
31
|
+
});
|
|
32
|
+
const ev = await evaluatePrompt({ prompt: "please fix loginUser" });
|
|
33
|
+
expect(ev.fallback).toBe(false);
|
|
34
|
+
expect(ev.completeness).toBe(80);
|
|
35
|
+
expect(ev.recommendedTier).toBe("balanced");
|
|
36
|
+
expect(ev.contextQueries).toEqual(["loginUser"]);
|
|
37
|
+
expect(ev.refinedPrompt).toBe("fix loginUser null check");
|
|
38
|
+
expect(ev.model).toContain("haiku");
|
|
39
|
+
expect(ev.usage.inputTokens).toBe(10);
|
|
40
|
+
});
|
|
41
|
+
it("clamps scores into 0–100 and rounds them", async () => {
|
|
42
|
+
mockGen.mockResolvedValueOnce({
|
|
43
|
+
object: {
|
|
44
|
+
completeness: 150,
|
|
45
|
+
complexity: -20,
|
|
46
|
+
recommendedTier: "fast",
|
|
47
|
+
missing: [],
|
|
48
|
+
contextQueries: [],
|
|
49
|
+
refinedPrompt: "x",
|
|
50
|
+
removed: [],
|
|
51
|
+
reasoning: "r",
|
|
52
|
+
},
|
|
53
|
+
usage: {},
|
|
54
|
+
});
|
|
55
|
+
const ev = await evaluatePrompt({ prompt: "do x" });
|
|
56
|
+
expect(ev.completeness).toBe(100);
|
|
57
|
+
expect(ev.complexity).toBe(0);
|
|
58
|
+
});
|
|
59
|
+
it("keeps the original prompt when the model returns an empty rewrite", async () => {
|
|
60
|
+
mockGen.mockResolvedValueOnce({
|
|
61
|
+
object: {
|
|
62
|
+
completeness: 50,
|
|
63
|
+
complexity: 50,
|
|
64
|
+
recommendedTier: "fast",
|
|
65
|
+
missing: [],
|
|
66
|
+
contextQueries: [],
|
|
67
|
+
refinedPrompt: " ",
|
|
68
|
+
removed: [],
|
|
69
|
+
reasoning: "r",
|
|
70
|
+
},
|
|
71
|
+
usage: {},
|
|
72
|
+
});
|
|
73
|
+
const ev = await evaluatePrompt({ prompt: "keep me intact" });
|
|
74
|
+
expect(ev.refinedPrompt).toBe("keep me intact");
|
|
75
|
+
});
|
|
76
|
+
it("falls back to a heuristic when the model call throws", async () => {
|
|
77
|
+
mockGen.mockRejectedValueOnce(new Error("gateway down"));
|
|
78
|
+
const ev = await evaluatePrompt({ prompt: "implement the stripe billing refund flow" });
|
|
79
|
+
expect(ev.fallback).toBe(true);
|
|
80
|
+
// A high-stakes billing prompt routes to precise → complexity 85.
|
|
81
|
+
expect(ev.recommendedTier).toBe("precise");
|
|
82
|
+
expect(ev.complexity).toBe(85);
|
|
83
|
+
expect(ev.refinedPrompt).toBe("implement the stripe billing refund flow");
|
|
84
|
+
expect(ev.usage.costUsd).toBe(0);
|
|
85
|
+
});
|
|
86
|
+
it("heuristic completeness tracks prompt length", async () => {
|
|
87
|
+
mockGen.mockRejectedValue(new Error("down"));
|
|
88
|
+
const short = await evaluatePrompt({ prompt: "fix it" });
|
|
89
|
+
expect(short.completeness).toBe(45);
|
|
90
|
+
const long = await evaluatePrompt({
|
|
91
|
+
prompt: "a".repeat(200) + " refactor and debug the module thoroughly",
|
|
92
|
+
});
|
|
93
|
+
expect(long.completeness).toBe(80);
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
//# sourceMappingURL=evaluator.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evaluator.test.js","sourceRoot":"","sources":["../../../src/agent/__tests__/evaluator.test.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,EAA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CAAC,MAAM,CAAC,CAAC,CAAC;QAC7C,MAAM,KAAK,GAAG,MAAM,cAAc,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC;QACzD,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACpC,MAAM,IAAI,GAAG,MAAM,cAAc,CAAC;YAChC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,2CAA2C;SACtE,CAAC,CAAC;QACH,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fleet-memory.test.d.ts","sourceRoot":"","sources":["../../../src/agent/__tests__/fleet-memory.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fleet memory — proves lessons are durably recorded as JSON Lines and that
|
|
3
|
+
* lexical recall ranks by term overlap, file overlap, and weight. Each test runs
|
|
4
|
+
* against an isolated $HOME so it never touches the developer's real store.
|
|
5
|
+
*/
|
|
6
|
+
import { describe, it, expect, beforeEach, afterEach } from "vitest";
|
|
7
|
+
import { mkdtempSync, rmSync, writeFileSync, mkdirSync } from "node:fs";
|
|
8
|
+
import { tmpdir, homedir } from "node:os";
|
|
9
|
+
import { join } from "node:path";
|
|
10
|
+
import { openFleetMemory, formatLessons } from "../fleet/memory.js";
|
|
11
|
+
let home = "";
|
|
12
|
+
let prevHome = "";
|
|
13
|
+
const cwd = "/work/myproj";
|
|
14
|
+
beforeEach(() => {
|
|
15
|
+
prevHome = process.env["HOME"] ?? "";
|
|
16
|
+
home = mkdtempSync(join(tmpdir(), "oxagen-mem-home-"));
|
|
17
|
+
process.env["HOME"] = home;
|
|
18
|
+
});
|
|
19
|
+
afterEach(() => {
|
|
20
|
+
process.env["HOME"] = prevHome;
|
|
21
|
+
if (home)
|
|
22
|
+
rmSync(home, { recursive: true, force: true });
|
|
23
|
+
});
|
|
24
|
+
describe("record + all", () => {
|
|
25
|
+
it("persists records and reads them back newest-first", () => {
|
|
26
|
+
const mem = openFleetMemory(cwd);
|
|
27
|
+
mem.record({ kind: "routine-change", weight: "low", lesson: "first lesson", files: [], outcome: "success" });
|
|
28
|
+
mem.record({ kind: "gotcha", weight: "high", lesson: "second lesson", files: ["a.ts"], outcome: "failure" });
|
|
29
|
+
const all = mem.all();
|
|
30
|
+
expect(all).toHaveLength(2);
|
|
31
|
+
expect(all.map((r) => r.lesson)).toContain("first lesson");
|
|
32
|
+
expect(all.map((r) => r.lesson)).toContain("second lesson");
|
|
33
|
+
// ids and timestamps are assigned by the store.
|
|
34
|
+
expect(all.every((r) => r.id.startsWith("mem_") && r.createdAt > 0)).toBe(true);
|
|
35
|
+
});
|
|
36
|
+
it("persists across separate openFleetMemory instances (reads the file)", () => {
|
|
37
|
+
openFleetMemory(cwd).record({
|
|
38
|
+
kind: "constraint",
|
|
39
|
+
weight: "critical",
|
|
40
|
+
lesson: "keep the cache warm",
|
|
41
|
+
files: [],
|
|
42
|
+
outcome: "success",
|
|
43
|
+
});
|
|
44
|
+
const reopened = openFleetMemory(cwd);
|
|
45
|
+
expect(reopened.all().some((r) => r.lesson === "keep the cache warm")).toBe(true);
|
|
46
|
+
});
|
|
47
|
+
it("HOME isolation actually points the store under the temp home", () => {
|
|
48
|
+
expect(homedir()).toBe(home);
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
describe("recall", () => {
|
|
52
|
+
it("ranks by term overlap and ignores irrelevant lessons", () => {
|
|
53
|
+
const mem = openFleetMemory(cwd);
|
|
54
|
+
mem.record({ kind: "bug-root-cause", weight: "low", lesson: "the parser drops the final token", files: ["parser.ts"], outcome: "success" });
|
|
55
|
+
mem.record({ kind: "routine-change", weight: "low", lesson: "stylesheet needs a vendor prefix", files: ["style.css"], outcome: "success" });
|
|
56
|
+
const hits = mem.recall("why does the parser lose a token");
|
|
57
|
+
expect(hits.length).toBeGreaterThanOrEqual(1);
|
|
58
|
+
expect(hits[0]?.lesson).toContain("parser");
|
|
59
|
+
expect(hits.some((h) => h.files.includes("style.css"))).toBe(false);
|
|
60
|
+
});
|
|
61
|
+
it("weights file overlap above term overlap", () => {
|
|
62
|
+
const mem = openFleetMemory(cwd);
|
|
63
|
+
mem.record({ kind: "gotcha", weight: "low", lesson: "unrelated words entirely", files: ["target.ts"], outcome: "success" });
|
|
64
|
+
mem.record({ kind: "gotcha", weight: "low", lesson: "the target logic is fragile", files: ["other.ts"], outcome: "success" });
|
|
65
|
+
// Query term "target" hits the second lesson's text, but the file filter
|
|
66
|
+
// matches the first lesson's file — and file overlap is weighted higher.
|
|
67
|
+
const hits = mem.recall("target", { files: ["target.ts"] });
|
|
68
|
+
expect(hits[0]?.files).toEqual(["target.ts"]);
|
|
69
|
+
});
|
|
70
|
+
it("returns nothing when there is no overlap", () => {
|
|
71
|
+
const mem = openFleetMemory(cwd);
|
|
72
|
+
mem.record({ kind: "gotcha", weight: "low", lesson: "alpha beta gamma", files: [], outcome: "success" });
|
|
73
|
+
expect(mem.recall("zzz qqq xxx")).toHaveLength(0);
|
|
74
|
+
});
|
|
75
|
+
it("tolerates a corrupt line already on disk", () => {
|
|
76
|
+
const dir = join(home, ".config", "oxagen", "memories");
|
|
77
|
+
mkdirSync(dir, { recursive: true });
|
|
78
|
+
const good = {
|
|
79
|
+
id: "mem_x",
|
|
80
|
+
createdAt: 1,
|
|
81
|
+
kind: "gotcha",
|
|
82
|
+
weight: "high",
|
|
83
|
+
lesson: "real lesson about widgets",
|
|
84
|
+
files: [],
|
|
85
|
+
outcome: "success",
|
|
86
|
+
};
|
|
87
|
+
writeFileSync(join(dir, "myproj.jsonl"), `not json\n${JSON.stringify(good)}\n`, "utf8");
|
|
88
|
+
const mem = openFleetMemory(cwd);
|
|
89
|
+
expect(mem.recall("widgets")[0]?.lesson).toBe("real lesson about widgets");
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
describe("formatLessons", () => {
|
|
93
|
+
it("marks weight and lists files", () => {
|
|
94
|
+
const records = [
|
|
95
|
+
{ id: "1", createdAt: 1, kind: "constraint", weight: "critical", lesson: "A", files: ["x.ts"], outcome: "success" },
|
|
96
|
+
{ id: "2", createdAt: 2, kind: "gotcha", weight: "high", lesson: "B", files: [], outcome: "success" },
|
|
97
|
+
{ id: "3", createdAt: 3, kind: "routine-change", weight: "low", lesson: "C", files: [], outcome: "success" },
|
|
98
|
+
];
|
|
99
|
+
const out = formatLessons(records);
|
|
100
|
+
expect(out).toContain("‼");
|
|
101
|
+
expect(out).toContain("!");
|
|
102
|
+
expect(out).toContain("·");
|
|
103
|
+
expect(out).toContain("[x.ts]");
|
|
104
|
+
expect(formatLessons([])).toBe("");
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
//# sourceMappingURL=fleet-memory.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fleet-memory.test.js","sourceRoot":"","sources":["../../../src/agent/__tests__/fleet-memory.test.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACxE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGpE,IAAI,IAAI,GAAG,EAAE,CAAC;AACd,IAAI,QAAQ,GAAG,EAAE,CAAC;AAClB,MAAM,GAAG,GAAG,cAAc,CAAC;AAE3B,UAAU,CAA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CAAC;QAChC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fleet-store.test.d.ts","sourceRoot":"","sources":["../../../src/agent/__tests__/fleet-store.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Plan store — proves plans and their tasks round-trip to disk, that re-saving a
|
|
3
|
+
* plan replaces rather than duplicates it, and that history is bounded. Isolated
|
|
4
|
+
* to a temp $HOME.
|
|
5
|
+
*/
|
|
6
|
+
import { describe, it, expect, beforeEach, afterEach } from "vitest";
|
|
7
|
+
import { mkdtempSync, rmSync } from "node:fs";
|
|
8
|
+
import { tmpdir } from "node:os";
|
|
9
|
+
import { join } from "node:path";
|
|
10
|
+
import { openPlanStore } from "../fleet/store.js";
|
|
11
|
+
import { emptyUsage } from "../fleet/types.js";
|
|
12
|
+
let home = "";
|
|
13
|
+
let prevHome = "";
|
|
14
|
+
const cwd = "/work/myproj";
|
|
15
|
+
function task(id, over = {}) {
|
|
16
|
+
return {
|
|
17
|
+
id,
|
|
18
|
+
title: id,
|
|
19
|
+
description: id,
|
|
20
|
+
status: "queued",
|
|
21
|
+
dependsOn: [],
|
|
22
|
+
files: [],
|
|
23
|
+
tier: "balanced",
|
|
24
|
+
model: "anthropic/claude-sonnet-4.6",
|
|
25
|
+
createdAt: 1,
|
|
26
|
+
usage: emptyUsage(),
|
|
27
|
+
...over,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
function plan(id, tasks) {
|
|
31
|
+
return { id, goal: `goal ${id}`, createdAt: 1, tasks, status: "draft" };
|
|
32
|
+
}
|
|
33
|
+
beforeEach(() => {
|
|
34
|
+
prevHome = process.env["HOME"] ?? "";
|
|
35
|
+
home = mkdtempSync(join(tmpdir(), "oxagen-store-home-"));
|
|
36
|
+
process.env["HOME"] = home;
|
|
37
|
+
});
|
|
38
|
+
afterEach(() => {
|
|
39
|
+
process.env["HOME"] = prevHome;
|
|
40
|
+
if (home)
|
|
41
|
+
rmSync(home, { recursive: true, force: true });
|
|
42
|
+
});
|
|
43
|
+
describe("openPlanStore", () => {
|
|
44
|
+
it("returns empty results before anything is saved", () => {
|
|
45
|
+
const store = openPlanStore(cwd);
|
|
46
|
+
expect(store.list()).toEqual([]);
|
|
47
|
+
expect(store.get("nope")).toBeUndefined();
|
|
48
|
+
});
|
|
49
|
+
it("saves and reads a plan back", () => {
|
|
50
|
+
const store = openPlanStore(cwd);
|
|
51
|
+
const p = plan("p1", [task("a"), task("b")]);
|
|
52
|
+
store.save(p);
|
|
53
|
+
expect(store.get("p1")?.goal).toBe("goal p1");
|
|
54
|
+
expect(store.list()).toHaveLength(1);
|
|
55
|
+
});
|
|
56
|
+
it("replaces a plan on re-save instead of duplicating", () => {
|
|
57
|
+
const store = openPlanStore(cwd);
|
|
58
|
+
store.save(plan("p1", [task("a")]));
|
|
59
|
+
store.save(plan("p1", [task("a"), task("b")]));
|
|
60
|
+
expect(store.list()).toHaveLength(1);
|
|
61
|
+
expect(store.get("p1")?.tasks).toHaveLength(2);
|
|
62
|
+
});
|
|
63
|
+
it("updates a single task in place", () => {
|
|
64
|
+
const store = openPlanStore(cwd);
|
|
65
|
+
store.save(plan("p1", [task("a"), task("b")]));
|
|
66
|
+
store.updateTask("p1", task("a", { status: "done", summary: "did it" }));
|
|
67
|
+
const got = store.get("p1");
|
|
68
|
+
expect(got?.tasks.find((t) => t.id === "a")?.status).toBe("done");
|
|
69
|
+
expect(got?.tasks.find((t) => t.id === "b")?.status).toBe("queued");
|
|
70
|
+
});
|
|
71
|
+
it("sets a plan's lifecycle status", () => {
|
|
72
|
+
const store = openPlanStore(cwd);
|
|
73
|
+
store.save(plan("p1", [task("a")]));
|
|
74
|
+
store.setStatus("p1", "completed");
|
|
75
|
+
expect(store.get("p1")?.status).toBe("completed");
|
|
76
|
+
});
|
|
77
|
+
it("no-ops on updateTask/setStatus for an unknown plan", () => {
|
|
78
|
+
const store = openPlanStore(cwd);
|
|
79
|
+
expect(() => store.updateTask("ghost", task("a"))).not.toThrow();
|
|
80
|
+
expect(() => store.setStatus("ghost", "failed")).not.toThrow();
|
|
81
|
+
});
|
|
82
|
+
it("bounds stored history to the 50 most recent plans", () => {
|
|
83
|
+
const store = openPlanStore(cwd);
|
|
84
|
+
for (let i = 0; i < 55; i++)
|
|
85
|
+
store.save(plan(`p${i}`, [task("a")]));
|
|
86
|
+
const list = store.list();
|
|
87
|
+
expect(list).toHaveLength(50);
|
|
88
|
+
// Newest first: p54 present, the earliest plans evicted.
|
|
89
|
+
expect(list[0]?.id).toBe("p54");
|
|
90
|
+
expect(list.some((p) => p.id === "p0")).toBe(false);
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
//# sourceMappingURL=fleet-store.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fleet-store.test.js","sourceRoot":"","sources":["../../../src/agent/__tests__/fleet-store.test.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAwB,MAAM,mBAAmB,CAAC;AAErE,IAAI,IAAI,GAAG,EAAE,CAAC;AACd,IAAI,QAAQ,GAAG,EAAE,CAAC;AAClB,MAAM,GAAG,GAAG,cAAc,CAAC;AAE3B,SAAS,IAAI,CAAC,EAAU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