orizu 0.5.19 → 0.5.21
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 +23 -0
- package/dist/archive-artifacts-cli.d.ts +50 -0
- package/dist/archive-artifacts-cli.d.ts.map +1 -0
- package/dist/artifact-archive.d.ts +48 -0
- package/dist/artifact-archive.d.ts.map +1 -0
- package/dist/artifact-pull.d.ts +22 -0
- package/dist/artifact-pull.d.ts.map +1 -0
- package/dist/banner.d.ts +3 -0
- package/dist/banner.d.ts.map +1 -0
- package/dist/connectors-cli.d.ts +31 -0
- package/dist/connectors-cli.d.ts.map +1 -0
- package/dist/credentials.d.ts +46 -0
- package/dist/credentials.d.ts.map +1 -0
- package/dist/csv.d.ts +49 -0
- package/dist/csv.d.ts.map +1 -0
- package/dist/dataset-download.d.ts +6 -0
- package/dist/dataset-download.d.ts.map +1 -0
- package/dist/dataset-edit-rows.d.ts +10 -0
- package/dist/dataset-edit-rows.d.ts.map +1 -0
- package/dist/dataset-upload-snapshot.d.ts +13 -0
- package/dist/dataset-upload-snapshot.d.ts.map +1 -0
- package/dist/daytona-slice-rehearsal.d.ts +89 -0
- package/dist/daytona-slice-rehearsal.d.ts.map +1 -0
- package/dist/daytona-slice.d.ts +106 -0
- package/dist/daytona-slice.d.ts.map +1 -0
- package/dist/deploy-key-merge-core.d.ts +121 -0
- package/dist/deploy-key-merge-core.d.ts.map +1 -0
- package/dist/diff-comments-cli.d.ts +12 -0
- package/dist/diff-comments-cli.d.ts.map +1 -0
- package/dist/diff-comments-cli.js +21 -2
- package/dist/egress-allowlist-cli.d.ts +23 -0
- package/dist/egress-allowlist-cli.d.ts.map +1 -0
- package/dist/egress-policy.d.ts +108 -0
- package/dist/egress-policy.d.ts.map +1 -0
- package/dist/error-response.d.ts +9 -0
- package/dist/error-response.d.ts.map +1 -0
- package/dist/file-parser.d.ts +5 -0
- package/dist/file-parser.d.ts.map +1 -0
- package/dist/gepa-engine-dispatch.d.ts +9 -0
- package/dist/gepa-engine-dispatch.d.ts.map +1 -0
- package/dist/gepa-engine-dispatch.js +307 -0
- package/dist/gepa-python-command.d.ts +6 -0
- package/dist/gepa-python-command.d.ts.map +1 -0
- package/dist/gepa-python-command.js +26 -0
- package/dist/gepa-python-paths.d.ts +6 -0
- package/dist/gepa-python-paths.d.ts.map +1 -0
- package/dist/gepa-python-paths.js +42 -0
- package/dist/git-credential.d.ts +69 -0
- package/dist/git-credential.d.ts.map +1 -0
- package/dist/git-recovery-environment.d.ts +31 -0
- package/dist/git-recovery-environment.d.ts.map +1 -0
- package/dist/github-setup.d.ts +122 -0
- package/dist/github-setup.d.ts.map +1 -0
- package/dist/global-flags.d.ts +12 -0
- package/dist/global-flags.d.ts.map +1 -0
- package/dist/help.d.ts +46 -0
- package/dist/help.d.ts.map +1 -0
- package/dist/help.js +93 -25
- package/dist/hosted-boot.d.ts +273 -0
- package/dist/hosted-boot.d.ts.map +1 -0
- package/dist/hosted-bootstrap-rehearsal.d.ts +86 -0
- package/dist/hosted-bootstrap-rehearsal.d.ts.map +1 -0
- package/dist/hosted-bootstrap.d.ts +188 -0
- package/dist/hosted-bootstrap.d.ts.map +1 -0
- package/dist/hosted-broker-server.d.ts +50 -0
- package/dist/hosted-broker-server.d.ts.map +1 -0
- package/dist/hosted-git-http-server.d.ts +36 -0
- package/dist/hosted-git-http-server.d.ts.map +1 -0
- package/dist/hosted-harness-claude.d.ts +195 -0
- package/dist/hosted-harness-claude.d.ts.map +1 -0
- package/dist/hosted-harness-opencode.d.ts +227 -0
- package/dist/hosted-harness-opencode.d.ts.map +1 -0
- package/dist/hosted-harness.d.ts +118 -0
- package/dist/hosted-harness.d.ts.map +1 -0
- package/dist/hosted-harvest.d.ts +68 -0
- package/dist/hosted-harvest.d.ts.map +1 -0
- package/dist/hosted-headless.d.ts +72 -0
- package/dist/hosted-headless.d.ts.map +1 -0
- package/dist/hosted-loop-lifecycle.d.ts +206 -0
- package/dist/hosted-loop-lifecycle.d.ts.map +1 -0
- package/dist/hosted-loop.d.ts +170 -0
- package/dist/hosted-loop.d.ts.map +1 -0
- package/dist/hosted-run-event-sink.d.ts +222 -0
- package/dist/hosted-run-event-sink.d.ts.map +1 -0
- package/dist/hosted-runtime-assets.d.ts +186 -0
- package/dist/hosted-runtime-assets.d.ts.map +1 -0
- package/dist/hosted-session-cli.d.ts +258 -0
- package/dist/hosted-session-cli.d.ts.map +1 -0
- package/dist/hosted-skill-staging.d.ts +73 -0
- package/dist/hosted-skill-staging.d.ts.map +1 -0
- package/dist/http.d.ts +8 -0
- package/dist/http.d.ts.map +1 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +119 -129
- package/dist/instruction-set-gepa-launch.d.ts +3 -0
- package/dist/instruction-set-gepa-launch.d.ts.map +1 -0
- package/dist/instruction-set-gepa-launch.js +15 -0
- package/dist/instruction-set-loader.d.ts +6 -0
- package/dist/instruction-set-loader.d.ts.map +1 -0
- package/dist/instruction-set-loader.js +59 -0
- package/dist/instruction-set-manifest.d.ts +14 -0
- package/dist/instruction-set-manifest.d.ts.map +1 -0
- package/dist/instruction-set-manifest.js +162 -0
- package/dist/instruction-sets-cli.d.ts +40 -0
- package/dist/instruction-sets-cli.d.ts.map +1 -0
- package/dist/instruction-sets-cli.js +361 -0
- package/dist/json-response.d.ts +4 -0
- package/dist/json-response.d.ts.map +1 -0
- package/dist/jsonl-stream.d.ts +8 -0
- package/dist/jsonl-stream.d.ts.map +1 -0
- package/dist/kill-switch-cli.d.ts +30 -0
- package/dist/kill-switch-cli.d.ts.map +1 -0
- package/dist/loopback-serve.d.ts +25 -0
- package/dist/loopback-serve.d.ts.map +1 -0
- package/dist/manifests-cli.d.ts +22 -0
- package/dist/manifests-cli.d.ts.map +1 -0
- package/dist/markdown-report-input.d.ts +7 -0
- package/dist/markdown-report-input.d.ts.map +1 -0
- package/dist/markdown-report-input.js +15 -1
- package/dist/merge-job.d.ts +155 -0
- package/dist/merge-job.d.ts.map +1 -0
- package/dist/model-configs-cli.d.ts +19 -0
- package/dist/model-configs-cli.d.ts.map +1 -0
- package/dist/model-configs-cli.js +104 -0
- package/dist/optimization-export-cli.d.ts +19 -0
- package/dist/optimization-export-cli.d.ts.map +1 -0
- package/dist/optimizations-list-cli.d.ts +20 -0
- package/dist/optimizations-list-cli.d.ts.map +1 -0
- package/dist/optimizations-promote-cli.d.ts +8 -0
- package/dist/optimizations-promote-cli.d.ts.map +1 -0
- package/dist/optimizations-promote-cli.js +34 -0
- package/dist/option-validation.d.ts +15 -0
- package/dist/option-validation.d.ts.map +1 -0
- package/dist/preview-runtime.d.ts +63 -0
- package/dist/preview-runtime.d.ts.map +1 -0
- package/dist/prompt-draft-push.d.ts +60 -0
- package/dist/prompt-draft-push.d.ts.map +1 -0
- package/dist/prompt-label-cli.d.ts +11 -0
- package/dist/prompt-label-cli.d.ts.map +1 -0
- package/dist/prompt-label-cli.js +29 -0
- package/dist/prompt-length-wire.d.ts +28 -0
- package/dist/prompt-length-wire.d.ts.map +1 -0
- package/dist/prompt-length-wire.js +2 -2
- package/dist/prompt-report-cli.d.ts +10 -0
- package/dist/prompt-report-cli.d.ts.map +1 -0
- package/dist/prompt-report-cli.js +2 -2
- package/dist/prompt-summary-table.d.ts +15 -0
- package/dist/prompt-summary-table.d.ts.map +1 -0
- package/dist/prompt-summary-table.js +6 -0
- package/dist/registration-tag-warning.d.ts +32 -0
- package/dist/registration-tag-warning.d.ts.map +1 -0
- package/dist/report-comments-cli.d.ts +16 -0
- package/dist/report-comments-cli.d.ts.map +1 -0
- package/dist/report-markdown-blankness.d.ts +2 -0
- package/dist/report-markdown-blankness.d.ts.map +1 -0
- package/dist/report-markdown-blankness.js +6 -0
- package/dist/report-replacement-warning.d.ts +17 -0
- package/dist/report-replacement-warning.d.ts.map +1 -0
- package/dist/report-replacement-warning.js +31 -0
- package/dist/repository-backup-core.d.ts +225 -0
- package/dist/repository-backup-core.d.ts.map +1 -0
- package/dist/repository-recovery-manifest.d.ts +83 -0
- package/dist/repository-recovery-manifest.d.ts.map +1 -0
- package/dist/run-event-digest.d.ts +74 -0
- package/dist/run-event-digest.d.ts.map +1 -0
- package/dist/runner-dir-verify.d.ts +66 -0
- package/dist/runner-dir-verify.d.ts.map +1 -0
- package/dist/runner-instruction-set-contract.d.ts +24 -0
- package/dist/runner-instruction-set-contract.d.ts.map +1 -0
- package/dist/runner-instruction-set-contract.js +50 -0
- package/dist/sandbox-hygiene.d.ts +45 -0
- package/dist/sandbox-hygiene.d.ts.map +1 -0
- package/dist/sandbox-provider.d.ts +193 -0
- package/dist/sandbox-provider.d.ts.map +1 -0
- package/dist/scorer-draft-push.d.ts +50 -0
- package/dist/scorer-draft-push.d.ts.map +1 -0
- package/dist/scorers-cli.d.ts +20 -0
- package/dist/scorers-cli.d.ts.map +1 -0
- package/dist/scorers-cli.js +22 -0
- package/dist/scorers-verify-parity-bridge.d.ts +16 -0
- package/dist/scorers-verify-parity-bridge.d.ts.map +1 -0
- package/dist/scorers-verify-parity-bridge.js +90 -0
- package/dist/scorers-verify-parity.d.ts +81 -0
- package/dist/scorers-verify-parity.d.ts.map +1 -0
- package/dist/scorers-verify-parity.js +502 -0
- package/dist/scores-accept-cli.d.ts +21 -0
- package/dist/scores-accept-cli.d.ts.map +1 -0
- package/dist/secret-redaction.d.ts +47 -0
- package/dist/secret-redaction.d.ts.map +1 -0
- package/dist/session-timeline.d.ts +54 -0
- package/dist/session-timeline.d.ts.map +1 -0
- package/dist/setup-prompt.d.ts +5 -0
- package/dist/setup-prompt.d.ts.map +1 -0
- package/dist/skill-installer.d.ts +68 -0
- package/dist/skill-installer.d.ts.map +1 -0
- package/dist/skilled-proposer-launch.d.ts +7 -0
- package/dist/skilled-proposer-launch.d.ts.map +1 -0
- package/dist/skilled-proposer-launch.js +60 -0
- package/dist/smoke.d.ts +102 -0
- package/dist/smoke.d.ts.map +1 -0
- package/dist/start-intent.d.ts +12 -0
- package/dist/start-intent.d.ts.map +1 -0
- package/dist/task-assignment-manifest.d.ts +15 -0
- package/dist/task-assignment-manifest.d.ts.map +1 -0
- package/dist/task-create-error.d.ts +18 -0
- package/dist/task-create-error.d.ts.map +1 -0
- package/dist/team-connectors-cli.d.ts +29 -0
- package/dist/team-connectors-cli.d.ts.map +1 -0
- package/dist/types.d.ts +39 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/vercel-sandbox-provider.d.ts +156 -0
- package/dist/vercel-sandbox-provider.d.ts.map +1 -0
- package/dist/workbench-cli.d.ts +233 -0
- package/dist/workbench-cli.d.ts.map +1 -0
- package/dist/workspace-sync.d.ts +207 -0
- package/dist/workspace-sync.d.ts.map +1 -0
- package/dist/workspace.d.ts +92 -0
- package/dist/workspace.d.ts.map +1 -0
- package/dist/zip-draft-push.d.ts +55 -0
- package/dist/zip-draft-push.d.ts.map +1 -0
- package/package.json +15 -2
- package/requirements/README.md +138 -0
- package/requirements/skilled-proposer.in +66 -0
- package/requirements/skilled-proposer.lock +265 -0
- package/scripts/build-cli-dist.mjs +30 -0
- package/scripts/ensure-skilled-proposer-venv.mjs +5 -0
- package/scripts/orizu-source-checkout.d.mts +1 -0
- package/scripts/orizu-source-checkout.mjs +10 -0
- package/scripts/refresh-skilled-proposer-lock.mjs +256 -0
- package/scripts/vendor-gepa-python.mjs +187 -4
- package/src/diff-comments-cli.ts +41 -3
- package/src/gepa-engine-dispatch.ts +340 -0
- package/src/gepa-python-command.ts +31 -0
- package/src/gepa-python-paths.ts +56 -0
- package/src/help.ts +95 -25
- package/src/index.ts +131 -166
- package/src/instruction-set-gepa-launch.ts +28 -0
- package/src/instruction-set-loader.ts +37 -0
- package/src/instruction-set-manifest.ts +120 -0
- package/src/instruction-sets-cli.ts +306 -0
- package/src/markdown-report-input.ts +19 -1
- package/src/model-configs-cli.ts +119 -0
- package/src/optimizations-promote-cli.ts +41 -0
- package/src/prompt-label-cli.ts +55 -0
- package/src/prompt-length-wire.ts +1 -1
- package/src/prompt-report-cli.ts +2 -2
- package/src/prompt-summary-table.ts +12 -0
- package/src/report-markdown-blankness.ts +6 -0
- package/src/report-replacement-warning.ts +35 -0
- package/src/runner-instruction-set-contract.ts +64 -0
- package/src/scorers-cli.ts +40 -0
- package/src/scorers-verify-parity-bridge.ts +90 -0
- package/src/scorers-verify-parity.ts +564 -0
- package/src/skilled-proposer-launch.ts +89 -0
- package/src/skilled-proposer-venv-manager.mjs +757 -0
- package/tsconfig.json +2 -0
- package/vendor/gepa-python/LICENSE +7 -0
- package/vendor/gepa-python/manifest.json +107 -0
- package/vendor/gepa-python/src/gepa/__init__.py +22 -0
- package/vendor/gepa-python/src/gepa/adapters/__init__.py +0 -0
- package/vendor/gepa-python/src/gepa/adapters/anymaths_adapter/__init__.py +1 -0
- package/vendor/gepa-python/src/gepa/adapters/anymaths_adapter/anymaths_adapter.py +174 -0
- package/vendor/gepa-python/src/gepa/adapters/confidence_adapter/__init__.py +26 -0
- package/vendor/gepa-python/src/gepa/adapters/confidence_adapter/confidence_adapter.py +618 -0
- package/vendor/gepa-python/src/gepa/adapters/confidence_adapter/scoring.py +206 -0
- package/vendor/gepa-python/src/gepa/adapters/default_adapter/__init__.py +0 -0
- package/vendor/gepa-python/src/gepa/adapters/default_adapter/default_adapter.py +206 -0
- package/vendor/gepa-python/src/gepa/adapters/dspy_adapter/__init__.py +0 -0
- package/vendor/gepa-python/src/gepa/adapters/dspy_adapter/dspy_adapter.py +525 -0
- package/vendor/gepa-python/src/gepa/adapters/dspy_adapter/instruction_proposal.py +500 -0
- package/vendor/gepa-python/src/gepa/adapters/dspy_full_program_adapter/__init__.py +6 -0
- package/vendor/gepa-python/src/gepa/adapters/dspy_full_program_adapter/dspy_program_proposal_signature.py +137 -0
- package/vendor/gepa-python/src/gepa/adapters/dspy_full_program_adapter/full_program_adapter.py +269 -0
- package/vendor/gepa-python/src/gepa/adapters/generic_rag_adapter/__init__.py +56 -0
- package/vendor/gepa-python/src/gepa/adapters/generic_rag_adapter/evaluation_metrics.py +226 -0
- package/vendor/gepa-python/src/gepa/adapters/generic_rag_adapter/generic_rag_adapter.py +496 -0
- package/vendor/gepa-python/src/gepa/adapters/generic_rag_adapter/rag_pipeline.py +238 -0
- package/vendor/gepa-python/src/gepa/adapters/generic_rag_adapter/vector_store_interface.py +212 -0
- package/vendor/gepa-python/src/gepa/adapters/generic_rag_adapter/vector_stores/__init__.py +2 -0
- package/vendor/gepa-python/src/gepa/adapters/generic_rag_adapter/vector_stores/chroma_store.py +196 -0
- package/vendor/gepa-python/src/gepa/adapters/generic_rag_adapter/vector_stores/lancedb_store.py +422 -0
- package/vendor/gepa-python/src/gepa/adapters/generic_rag_adapter/vector_stores/milvus_store.py +409 -0
- package/vendor/gepa-python/src/gepa/adapters/generic_rag_adapter/vector_stores/qdrant_store.py +368 -0
- package/vendor/gepa-python/src/gepa/adapters/generic_rag_adapter/vector_stores/weaviate_store.py +418 -0
- package/vendor/gepa-python/src/gepa/adapters/langchain_adapter/__init__.py +11 -0
- package/vendor/gepa-python/src/gepa/adapters/langchain_adapter/langchain_adapter.py +261 -0
- package/vendor/gepa-python/src/gepa/adapters/mcp_adapter/__init__.py +37 -0
- package/vendor/gepa-python/src/gepa/adapters/mcp_adapter/mcp_adapter.py +693 -0
- package/vendor/gepa-python/src/gepa/adapters/mcp_adapter/mcp_client.py +364 -0
- package/vendor/gepa-python/src/gepa/adapters/optimize_anything_adapter/optimize_anything_adapter.py +879 -0
- package/vendor/gepa-python/src/gepa/adapters/terminal_bench_adapter/__init__.py +0 -0
- package/vendor/gepa-python/src/gepa/adapters/terminal_bench_adapter/terminal_bench_adapter.py +217 -0
- package/vendor/gepa-python/src/gepa/api.py +468 -0
- package/vendor/gepa-python/src/gepa/core/__init__.py +0 -0
- package/vendor/gepa-python/src/gepa/core/adapter.py +227 -0
- package/vendor/gepa-python/src/gepa/core/callbacks.py +551 -0
- package/vendor/gepa-python/src/gepa/core/data_loader.py +74 -0
- package/vendor/gepa-python/src/gepa/core/engine.py +1025 -0
- package/vendor/gepa-python/src/gepa/core/result.py +271 -0
- package/vendor/gepa-python/src/gepa/core/state.py +706 -0
- package/vendor/gepa-python/src/gepa/examples/__init__.py +0 -0
- package/vendor/gepa-python/src/gepa/examples/aime.py +24 -0
- package/vendor/gepa-python/src/gepa/examples/anymaths-bench/eval_default.py +111 -0
- package/vendor/gepa-python/src/gepa/examples/anymaths-bench/train_anymaths.py +177 -0
- package/vendor/gepa-python/src/gepa/examples/mcp_adapter/__init__.py +4 -0
- package/vendor/gepa-python/src/gepa/examples/mcp_adapter/mcp_optimization_example.py +456 -0
- package/vendor/gepa-python/src/gepa/examples/rag_adapter/__init__.py +9 -0
- package/vendor/gepa-python/src/gepa/examples/rag_adapter/rag_optimization.py +824 -0
- package/vendor/gepa-python/src/gepa/examples/terminal-bench/train_terminus.py +161 -0
- package/vendor/gepa-python/src/gepa/gepa_utils.py +117 -0
- package/vendor/gepa-python/src/gepa/gskill/__init__.py +1 -0
- package/vendor/gepa-python/src/gepa/gskill/gskill/__init__.py +0 -0
- package/vendor/gepa-python/src/gepa/gskill/gskill/cost_tracker.py +194 -0
- package/vendor/gepa-python/src/gepa/gskill/gskill/evaluate/__init__.py +0 -0
- package/vendor/gepa-python/src/gepa/gskill/gskill/evaluate/claude_code.py +1117 -0
- package/vendor/gepa-python/src/gepa/gskill/gskill/evaluate/claude_code_skills.py +613 -0
- package/vendor/gepa-python/src/gepa/gskill/gskill/evaluate/mini_swe_agent.py +440 -0
- package/vendor/gepa-python/src/gepa/gskill/gskill/experiment_logger.py +367 -0
- package/vendor/gepa-python/src/gepa/gskill/gskill/swe_fitness_fn.py +209 -0
- package/vendor/gepa-python/src/gepa/gskill/gskill/swe_harness.py +352 -0
- package/vendor/gepa-python/src/gepa/gskill/gskill/train_optimize_anything.py +830 -0
- package/vendor/gepa-python/src/gepa/image.py +104 -0
- package/vendor/gepa-python/src/gepa/lm.py +261 -0
- package/vendor/gepa-python/src/gepa/logging/__init__.py +0 -0
- package/vendor/gepa-python/src/gepa/logging/experiment_tracker.py +457 -0
- package/vendor/gepa-python/src/gepa/logging/logger.py +75 -0
- package/vendor/gepa-python/src/gepa/logging/utils.py +130 -0
- package/vendor/gepa-python/src/gepa/optimize_anything.py +1701 -0
- package/vendor/gepa-python/src/gepa/proposer/__init__.py +0 -0
- package/vendor/gepa-python/src/gepa/proposer/base.py +53 -0
- package/vendor/gepa-python/src/gepa/proposer/merge.py +403 -0
- package/vendor/gepa-python/src/gepa/proposer/reflective_mutation/__init__.py +0 -0
- package/vendor/gepa-python/src/gepa/proposer/reflective_mutation/base.py +64 -0
- package/vendor/gepa-python/src/gepa/proposer/reflective_mutation/reflection_lm.py +178 -0
- package/vendor/gepa-python/src/gepa/proposer/reflective_mutation/reflective_mutation.py +641 -0
- package/vendor/gepa-python/src/gepa/py.typed +0 -0
- package/vendor/gepa-python/src/gepa/strategies/__init__.py +0 -0
- package/vendor/gepa-python/src/gepa/strategies/acceptance.py +66 -0
- package/vendor/gepa-python/src/gepa/strategies/batch_sampler.py +103 -0
- package/vendor/gepa-python/src/gepa/strategies/candidate_selector.py +82 -0
- package/vendor/gepa-python/src/gepa/strategies/component_selector.py +36 -0
- package/vendor/gepa-python/src/gepa/strategies/eval_policy.py +64 -0
- package/vendor/gepa-python/src/gepa/strategies/instruction_proposal.py +153 -0
- package/vendor/gepa-python/src/gepa/strategies/proposal_sampling.py +128 -0
- package/vendor/gepa-python/src/gepa/strategies/proposal_selection.py +84 -0
- package/vendor/gepa-python/src/gepa/utils/__init__.py +63 -0
- package/vendor/gepa-python/src/gepa/utils/code_execution.py +626 -0
- package/vendor/gepa-python/src/gepa/utils/stdio_capture.py +145 -0
- package/vendor/gepa-python/src/gepa/utils/stop_condition.py +230 -0
- package/vendor/gepa-python/src/gepa/visualization.py +359 -0
- package/vendor/orizu-gepa/pyproject.toml +18 -0
- package/vendor/orizu-gepa/src/orizu_gepa_connector/__init__.py +9 -0
- package/vendor/orizu-gepa/src/orizu_gepa_connector/__main__.py +5 -0
- package/vendor/orizu-gepa/src/orizu_gepa_connector/adapter.py +138 -0
- package/vendor/orizu-gepa/src/orizu_gepa_connector/callbacks.py +666 -0
- package/vendor/orizu-gepa/src/orizu_gepa_connector/cli.py +7 -0
- package/vendor/orizu-gepa/src/orizu_gepa_connector/engine.py +269 -0
- package/vendor/orizu-gepa/src/orizu_gepa_connector/instruction_set_loader.py +52 -0
- package/vendor/orizu-gepa/src/orizu_gepa_connector/preflight.py +64 -0
- package/vendor/orizu-gepa/src/orizu_gepa_connector/reflection.py +186 -0
- package/vendor/orizu-gepa/src/orizu_gepa_connector/runtime.py +721 -0
- package/vendor/orizu-gepa/src/orizu_gepa_connector/skilled_proposer_bridge.py +381 -0
- package/vendor/orizu-gepa/src/orizu_gepa_connector/stop_conditions.py +55 -0
- package/vendor/orizu-gepa/src/orizu_gepa_connector/translator.py +203 -0
- package/vendor/orizu-gepa-python/pyproject.toml +1 -1
- package/vendor/orizu-gepa-python/src/orizu_gepa/cli.py +1 -0
- package/vendor/orizu-gepa-python/src/orizu_gepa/client.py +52 -7
- package/vendor/orizu-gepa-python/src/orizu_gepa/local_log.py +52 -0
- package/vendor/orizu-gepa-python/src/orizu_gepa/optimizer.py +10 -5
- package/vendor/orizu-gepa-python/src/orizu_gepa/reflection.py +323 -68
- package/vendor/orizu-gepa-python/src/orizu_gepa/runner.py +207 -13
- package/vendor/skills/orizu-cli/SKILL.md +3 -1
- package/vendor/skills/orizu-cli/references/cli-reference.md +85 -1
- package/vendor/skills/orizu-cli/references/migrate-existing-gepa-setup.md +303 -0
- package/vendor/skills/orizu-cli/references/optimization-reports.md +1 -1
- package/vendor/skills/orizu-cli/references/optimization-with-gepa.md +26 -1
- package/vendor/skills/orizu-cli/references/prompt-control-plane.md +113 -10
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
export declare const SKILL_NAME = "orizu-cli";
|
|
2
|
+
export declare const AGENTS_START_MARKER = "<!-- orizu-cli:start -->";
|
|
3
|
+
export declare const AGENTS_END_MARKER = "<!-- orizu-cli:end -->";
|
|
4
|
+
export declare const SKILL_INSTALL_TARGETS: readonly ["codex-user", "agent-user", "agents-project", "codex-project", "claude-user", "claude-project", "opencode-user", "opencode-project", "agents-md"];
|
|
5
|
+
export type SkillInstallTarget = typeof SKILL_INSTALL_TARGETS[number];
|
|
6
|
+
export declare const SKILL_META_FILENAME = ".orizu-skill-meta.json";
|
|
7
|
+
export declare const SKILL_INSTALL_AGENTS: readonly ["claude", "codex", "opencode"];
|
|
8
|
+
export type SkillInstallAgent = typeof SKILL_INSTALL_AGENTS[number];
|
|
9
|
+
export type SkillInstallScope = 'global' | 'local';
|
|
10
|
+
export type SkillInstallMode = 'auto' | 'link' | 'copy';
|
|
11
|
+
export interface SkillInstallOptions {
|
|
12
|
+
cwd?: string;
|
|
13
|
+
homeDir?: string;
|
|
14
|
+
overwrite?: boolean;
|
|
15
|
+
dryRun?: boolean;
|
|
16
|
+
mode?: SkillInstallMode;
|
|
17
|
+
cliVersion?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface SkillInstallResult {
|
|
20
|
+
target: SkillInstallTarget;
|
|
21
|
+
path: string;
|
|
22
|
+
action: 'created' | 'updated' | 'would-create' | 'would-update';
|
|
23
|
+
mode: 'link' | 'copy' | 'section';
|
|
24
|
+
}
|
|
25
|
+
export interface SkillInstallMeta {
|
|
26
|
+
name: string;
|
|
27
|
+
skillHash: string;
|
|
28
|
+
cliVersion: string | null;
|
|
29
|
+
source: SkillSourceType;
|
|
30
|
+
sourceRoot: string;
|
|
31
|
+
mode: 'copy';
|
|
32
|
+
installedAt: string;
|
|
33
|
+
}
|
|
34
|
+
export declare function isSafeRelativeSkillPath(rel: string): boolean;
|
|
35
|
+
export declare function formatMissingSkillSourceError(paths: string[]): string;
|
|
36
|
+
export type SkillSourceType = 'override' | 'packaged' | 'repo-fallback';
|
|
37
|
+
export interface SkillSourceInfo {
|
|
38
|
+
name: string;
|
|
39
|
+
root: string;
|
|
40
|
+
skillMd: string;
|
|
41
|
+
source: SkillSourceType;
|
|
42
|
+
}
|
|
43
|
+
export declare function resolveSkillSource(): SkillSourceInfo;
|
|
44
|
+
export declare function resolveSkillSourceDir(): string;
|
|
45
|
+
export declare function computeSkillContentHash(root: string): string;
|
|
46
|
+
export declare function getSkillInstallPath(target: SkillInstallTarget, options?: SkillInstallOptions): string;
|
|
47
|
+
export declare function getTargetForAgent(agent: SkillInstallAgent, scope: SkillInstallScope): SkillInstallTarget;
|
|
48
|
+
export declare function isSkillInstallAgent(value: string): value is SkillInstallAgent;
|
|
49
|
+
export declare function isProjectLevelTarget(target: SkillInstallTarget): boolean;
|
|
50
|
+
export declare function isStableSkillSourcePath(root: string): boolean;
|
|
51
|
+
export declare function resolveEffectiveInstallMode(target: SkillInstallTarget, sourceRoot: string, mode?: SkillInstallMode): 'link' | 'copy' | 'section';
|
|
52
|
+
export declare function targetNeedsOverwrite(target: SkillInstallTarget, options?: SkillInstallOptions): boolean;
|
|
53
|
+
export declare function readSkillMeta(targetDir: string): SkillInstallMeta | null;
|
|
54
|
+
export declare function installSkillTarget(target: SkillInstallTarget, options?: SkillInstallOptions): SkillInstallResult;
|
|
55
|
+
export type SkillTargetState = 'current' | 'stale' | 'missing' | 'broken-link' | 'unmanaged';
|
|
56
|
+
export interface SkillTargetStatus {
|
|
57
|
+
target: SkillInstallTarget;
|
|
58
|
+
path: string;
|
|
59
|
+
state: SkillTargetState;
|
|
60
|
+
mode: 'link' | 'copy' | 'section' | null;
|
|
61
|
+
linkTarget: string | null;
|
|
62
|
+
installedHash: string | null;
|
|
63
|
+
sourceHash: string;
|
|
64
|
+
meta: SkillInstallMeta | null;
|
|
65
|
+
}
|
|
66
|
+
export declare function getSkillTargetStatus(target: SkillInstallTarget, options?: SkillInstallOptions): SkillTargetStatus;
|
|
67
|
+
export declare function isSkillInstallTarget(value: string): value is SkillInstallTarget;
|
|
68
|
+
//# sourceMappingURL=skill-installer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skill-install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,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI,CAWxE;AAQD,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,kBAAkB,EAC1B,OAAO,CAAC,EAAE,mBAAmB,GAC5B,kBAAkB,CAqCpB;AAED,MAAM,MAAM,gBAAgB,GACxB,SAAS,GACT,OAAO,GACP,SAAS,GACT,aAAa,GACb,WAAW,CAAA;AAEf,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,kBAAkB,CAAA;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,gBAAgB,CAAA;IACvB,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,IAAI,CAAA;IACxC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,UAAU,EAAE,MAAM,CAAA;IAClB,IAAI,EAAE,gBAAgB,GAAG,IAAI,CAAA;CAC9B;AAoCD,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,kBAAkB,EAC1B,OAAO,CAAC,EAAE,mBAAmB,GAC5B,iBAAiB,CAmDnB;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,kBAAkB,CAE/E"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { GepaEngine } from './gepa-engine-dispatch.js';
|
|
2
|
+
export interface SkilledProposerLaunch {
|
|
3
|
+
python: string;
|
|
4
|
+
environment: NodeJS.ProcessEnv;
|
|
5
|
+
}
|
|
6
|
+
export declare function prepareSkilledProposerLaunch(python: string, engine: GepaEngine, environment: NodeJS.ProcessEnv): SkilledProposerLaunch;
|
|
7
|
+
//# sourceMappingURL=skilled-proposer-launch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skilled-proposer-launch.d.ts","sourceRoot":"","sources":["../src/skilled-proposer-launch.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAa3D,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,MAAM,CAAA;IACd,WAAW,EAAE,MAAM,CAAC,UAAU,CAAA;CAC/B;AAwCD,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,UAAU,EAClB,WAAW,EAAE,MAAM,CAAC,UAAU,GAC7B,qBAAqB,CAwBvB"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { spawnSync } from 'child_process';
|
|
2
|
+
import { join } from 'path';
|
|
3
|
+
import { fileURLToPath } from 'url';
|
|
4
|
+
import { bundledOfficialGepaPythonPath } from './gepa-python-paths.js';
|
|
5
|
+
import { sanitizeTerminalText } from './json-response.js';
|
|
6
|
+
function ensureSelectedSkilledProposerVenv(python, vendoredGepaPath) {
|
|
7
|
+
const manager = fileURLToPath(new URL('../scripts/ensure-skilled-proposer-venv.mjs', import.meta.url));
|
|
8
|
+
const lock = fileURLToPath(new URL('../requirements/skilled-proposer.lock', import.meta.url));
|
|
9
|
+
// This is a regenerable workspace cache. The manager's publish key further
|
|
10
|
+
// separates interpreters, platforms, and lock revisions inside it.
|
|
11
|
+
const cacheRoot = join(process.cwd(), '.orizu', 'cache', 'skilled-proposer');
|
|
12
|
+
const result = spawnSync(process.execPath, [manager, '--python', python, '--cache-root', cacheRoot, '--lock', lock,
|
|
13
|
+
'--vendored-gepa-path', vendoredGepaPath, '--json'], {
|
|
14
|
+
env: process.env,
|
|
15
|
+
encoding: 'utf8',
|
|
16
|
+
});
|
|
17
|
+
if (result.error) {
|
|
18
|
+
throw new Error(`ALI_1505_VENV_MANAGER_FAILED: ${result.error.message}`, { cause: result.error });
|
|
19
|
+
}
|
|
20
|
+
const stdout = result.stdout || '';
|
|
21
|
+
const stderr = result.stderr || '';
|
|
22
|
+
let report;
|
|
23
|
+
try {
|
|
24
|
+
report = JSON.parse(stdout);
|
|
25
|
+
}
|
|
26
|
+
catch {
|
|
27
|
+
throw new Error(`ALI_1505_VENV_MANAGER_INVALID_REPORT: ${stderr.trim() || 'manager emitted no JSON report'}`);
|
|
28
|
+
}
|
|
29
|
+
if (result.status !== 0) {
|
|
30
|
+
throw new Error(`${report.error || 'ALI_1505_VENV_MANAGER_FAILED'}: ${report.message || 'skilled-proposer venv manager failed'}`);
|
|
31
|
+
}
|
|
32
|
+
if (!report.venv) {
|
|
33
|
+
throw new Error('ALI_1505_VENV_MANAGER_INVALID_REPORT: successful manager report omitted venv');
|
|
34
|
+
}
|
|
35
|
+
return report;
|
|
36
|
+
}
|
|
37
|
+
export function prepareSkilledProposerLaunch(python, engine, environment) {
|
|
38
|
+
if (engine !== 'official' || environment.ORIZU_CANDIDATE_PROPOSER !== 'skilled-proposer') {
|
|
39
|
+
return { python, environment };
|
|
40
|
+
}
|
|
41
|
+
const vendoredGepaPath = bundledOfficialGepaPythonPath();
|
|
42
|
+
if (!vendoredGepaPath) {
|
|
43
|
+
throw new Error('ALI_1505_VENDORED_GEPA_MISSING: skilled-proposer requires the vendored official GEPA source');
|
|
44
|
+
}
|
|
45
|
+
const report = ensureSelectedSkilledProposerVenv(python, vendoredGepaPath);
|
|
46
|
+
environment.ORIZU_SKILLED_PROPOSER_VENV = report.venv;
|
|
47
|
+
for (const warning of report.warnings ?? []) {
|
|
48
|
+
console.warn(`Warning [${sanitizeTerminalText(warning.code)}]: ${sanitizeTerminalText(warning.message)}`);
|
|
49
|
+
}
|
|
50
|
+
// When present, the manager's reported certificate is the same value used
|
|
51
|
+
// for pip. Only the opt-in path resolves or changes this setting.
|
|
52
|
+
if (report.sslCertFile)
|
|
53
|
+
environment.SSL_CERT_FILE = report.sslCertFile;
|
|
54
|
+
return {
|
|
55
|
+
python: process.platform === 'win32'
|
|
56
|
+
? join(report.venv, 'Scripts', 'python.exe')
|
|
57
|
+
: join(report.venv, 'bin', 'python'),
|
|
58
|
+
environment,
|
|
59
|
+
};
|
|
60
|
+
}
|
package/dist/smoke.d.ts
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Terminal-only Phase 2 smoke workflow (ALI-908).
|
|
3
|
+
*
|
|
4
|
+
* Pure, importable step logic with an injected fetcher factory. It drives the
|
|
5
|
+
* REAL Phase 2 CLI command modules (workbench-cli sessions/runs/tail/terminal)
|
|
6
|
+
* plus the RunAPI / promotion-manifest routes over HTTP. The `scripts/workbench-
|
|
7
|
+
* smoke.mjs` driver supplies a live-server fetcher from env; the unit test
|
|
8
|
+
* supplies an in-memory fake server. No process/argv/print here.
|
|
9
|
+
*
|
|
10
|
+
* The workflow proves, against server-side state only:
|
|
11
|
+
* - create-or-attach workspace idempotency (reused on a second run),
|
|
12
|
+
* - a session + workbench run with persisted append-only events,
|
|
13
|
+
* - terminal-death reconnect (a fresh client re-reads every prior event),
|
|
14
|
+
* - promotion-manifest create + apply idempotency,
|
|
15
|
+
* - run-completion idempotency (one terminal event under a retried PATCH).
|
|
16
|
+
*
|
|
17
|
+
* Phase 2 boundaries: no OpenInspect, no hosted sandbox, no Slack/web entry,
|
|
18
|
+
* no Cloudflare Artifacts, no durable overnight jobs.
|
|
19
|
+
*/
|
|
20
|
+
export interface SmokeFetcher {
|
|
21
|
+
(path: string, init?: RequestInit): Promise<Response>;
|
|
22
|
+
}
|
|
23
|
+
export interface SmokeConfig {
|
|
24
|
+
teamSlug: string;
|
|
25
|
+
projectSlug: string;
|
|
26
|
+
workspaceSlug: string;
|
|
27
|
+
/** Optional real score-run id to reference from the eval_scored event. */
|
|
28
|
+
scoreRunId?: string | null;
|
|
29
|
+
}
|
|
30
|
+
export type SmokeDisposition = 'created' | 'reused' | 'verified';
|
|
31
|
+
export interface SmokeStepReport {
|
|
32
|
+
index: number;
|
|
33
|
+
key: string;
|
|
34
|
+
title: string;
|
|
35
|
+
ok: boolean;
|
|
36
|
+
disposition: SmokeDisposition;
|
|
37
|
+
detail: string;
|
|
38
|
+
}
|
|
39
|
+
export interface SmokeStepPlan {
|
|
40
|
+
index: number;
|
|
41
|
+
key: string;
|
|
42
|
+
title: string;
|
|
43
|
+
plan: string;
|
|
44
|
+
}
|
|
45
|
+
export interface SmokeSummary {
|
|
46
|
+
created: string[];
|
|
47
|
+
reused: string[];
|
|
48
|
+
verified: string[];
|
|
49
|
+
}
|
|
50
|
+
export interface SmokeReport {
|
|
51
|
+
ok: boolean;
|
|
52
|
+
steps: SmokeStepReport[];
|
|
53
|
+
failedStep: SmokeStepReport | null;
|
|
54
|
+
summary: SmokeSummary;
|
|
55
|
+
ids: {
|
|
56
|
+
workspaceId?: string;
|
|
57
|
+
sessionId?: string;
|
|
58
|
+
runId?: string;
|
|
59
|
+
manifestId?: string;
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
export interface RunSmokeOptions {
|
|
63
|
+
config: SmokeConfig;
|
|
64
|
+
/** Returns a fresh, stateless HTTP client. Called for the primary flow and
|
|
65
|
+
* again to simulate a terminal kill/reconnect. */
|
|
66
|
+
makeFetcher: () => SmokeFetcher;
|
|
67
|
+
now?: () => string;
|
|
68
|
+
onStep?: (step: SmokeStepReport) => void;
|
|
69
|
+
}
|
|
70
|
+
export declare const SMOKE_RUN_TITLE = "smoke: highlight-derived workflow";
|
|
71
|
+
export declare const SMOKE_EVENTS: readonly [{
|
|
72
|
+
readonly eventId: "smoke-evt-1";
|
|
73
|
+
readonly eventType: "highlight_ingested";
|
|
74
|
+
readonly sequence: 2;
|
|
75
|
+
readonly payload: {
|
|
76
|
+
readonly highlightId: "hl-smoke-001";
|
|
77
|
+
readonly source: "hip";
|
|
78
|
+
readonly span: {
|
|
79
|
+
readonly start: 0;
|
|
80
|
+
readonly end: 42;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
}, {
|
|
84
|
+
readonly eventId: "smoke-evt-2";
|
|
85
|
+
readonly eventType: "eval_scored";
|
|
86
|
+
readonly sequence: 3;
|
|
87
|
+
readonly payload: {
|
|
88
|
+
readonly metricKey: "faithfulness";
|
|
89
|
+
readonly score: 0.87;
|
|
90
|
+
readonly comparable: true;
|
|
91
|
+
};
|
|
92
|
+
}, {
|
|
93
|
+
readonly eventId: "smoke-evt-3";
|
|
94
|
+
readonly eventType: "notes_recorded";
|
|
95
|
+
readonly sequence: 4;
|
|
96
|
+
readonly payload: {
|
|
97
|
+
readonly note: "Highlight-derived smoke: no regression detected.";
|
|
98
|
+
};
|
|
99
|
+
}];
|
|
100
|
+
export declare function planSmokeSteps(_config: SmokeConfig): SmokeStepPlan[];
|
|
101
|
+
export declare function runSmokeWorkflow(opts: RunSmokeOptions): Promise<SmokeReport>;
|
|
102
|
+
//# sourceMappingURL=smoke.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"smoke.d.ts","sourceRoot":"","sources":["../src/smoke.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAWH,MAAM,WAAW,YAAY;IAC3B,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAA;CACtD;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,MAAM,CAAA;IACnB,aAAa,EAAE,MAAM,CAAA;IACrB,0EAA0E;IAC1E,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC3B;AAED,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,QAAQ,GAAG,UAAU,CAAA;AAEhE,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,EAAE,EAAE,OAAO,CAAA;IACX,WAAW,EAAE,gBAAgB,CAAA;IAC7B,MAAM,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;CACb;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,MAAM,EAAE,MAAM,EAAE,CAAA;IAChB,QAAQ,EAAE,MAAM,EAAE,CAAA;CACnB;AAED,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,OAAO,CAAA;IACX,KAAK,EAAE,eAAe,EAAE,CAAA;IACxB,UAAU,EAAE,eAAe,GAAG,IAAI,CAAA;IAClC,OAAO,EAAE,YAAY,CAAA;IACrB,GAAG,EAAE;QACH,WAAW,CAAC,EAAE,MAAM,CAAA;QACpB,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,KAAK,CAAC,EAAE,MAAM,CAAA;QACd,UAAU,CAAC,EAAE,MAAM,CAAA;KACpB,CAAA;CACF;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,WAAW,CAAA;IACnB;uDACmD;IACnD,WAAW,EAAE,MAAM,YAAY,CAAA;IAC/B,GAAG,CAAC,EAAE,MAAM,MAAM,CAAA;IAClB,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,eAAe,KAAK,IAAI,CAAA;CACzC;AAED,eAAO,MAAM,eAAe,sCAAsC,CAAA;AAIlE,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmBf,CAAA;AAaV,wBAAgB,cAAc,CAAC,OAAO,EAAE,WAAW,GAAG,aAAa,EAAE,CAEpE;AAsDD,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,WAAW,CAAC,CAkKlF"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type StartIntentIdGenerator = () => string;
|
|
2
|
+
/** A tiny immediate retry budget for outcomes where the server/provider may
|
|
3
|
+
* have committed before the HTTP response was lost. The UUID intent makes
|
|
4
|
+
* these retries safe; this is recovery, not general availability backoff. */
|
|
5
|
+
export declare const START_RESPONSE_LOSS_MAX_RETRIES = 2;
|
|
6
|
+
export declare function isAmbiguousStartResponseStatus(status: number): boolean;
|
|
7
|
+
export declare function isStartIntentId(value: unknown): value is string;
|
|
8
|
+
/** Mint and validate before the first network mutation. Injection keeps retry
|
|
9
|
+
* identity tests deterministic and prevents a broken generator from sending a
|
|
10
|
+
* malformed key that the server might treat as a non-idempotent legacy call. */
|
|
11
|
+
export declare function createStartIntentId(generate?: StartIntentIdGenerator): string;
|
|
12
|
+
//# sourceMappingURL=start-intent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"start-intent.d.ts","sourceRoot":"","sources":["../src/start-intent.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,sBAAsB,GAAG,MAAM,MAAM,CAAA;AAEjD;;8EAE8E;AAC9E,eAAO,MAAM,+BAA+B,IAAI,CAAA;AAEhD,wBAAgB,8BAA8B,CAC5C,MAAM,EAAE,MAAM,GACb,OAAO,CAOT;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAE/D;AAED;;iFAEiF;AACjF,wBAAgB,mBAAmB,CACjC,QAAQ,GAAE,sBAAmC,GAC5C,MAAM,CAQR"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface ParsedAssignmentManifestEntry {
|
|
2
|
+
rowId: string;
|
|
3
|
+
assignee: string;
|
|
4
|
+
}
|
|
5
|
+
export interface AssignmentManifestLimits {
|
|
6
|
+
maxBytes?: number;
|
|
7
|
+
maxLines?: number;
|
|
8
|
+
}
|
|
9
|
+
export declare const DEFAULT_ASSIGNMENT_MANIFEST_LIMITS: {
|
|
10
|
+
readonly maxBytes: number;
|
|
11
|
+
readonly maxLines: 100000;
|
|
12
|
+
};
|
|
13
|
+
export declare function parseAssignmentManifestJsonl(content: string, limits?: AssignmentManifestLimits): ParsedAssignmentManifestEntry[];
|
|
14
|
+
export declare function readAssignmentManifestJsonlFile(path: string, limits?: AssignmentManifestLimits): ParsedAssignmentManifestEntry[];
|
|
15
|
+
//# sourceMappingURL=task-assignment-manifest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task-assignment-manifest.d.ts","sourceRoot":"","sources":["../src/task-assignment-manifest.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,6BAA6B;IAC5C,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,eAAO,MAAM,kCAAkC;;;CAGrC,CAAA;AAwCV,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,wBAAwB,GAChC,6BAA6B,EAAE,CA8FjC;AAED,wBAAgB,+BAA+B,CAC7C,IAAI,EAAE,MAAM,EACZ,MAAM,CAAC,EAAE,wBAAwB,GAChC,6BAA6B,EAAE,CAMjC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface TaskCreateErrorPayload {
|
|
2
|
+
error?: string;
|
|
3
|
+
invalidAssigneeErrors?: Array<{
|
|
4
|
+
assignee?: string;
|
|
5
|
+
reason?: string;
|
|
6
|
+
}>;
|
|
7
|
+
missingRequiredFields?: string[];
|
|
8
|
+
incompatibleRowCount?: number;
|
|
9
|
+
missingRequiredFieldCounts?: Record<string, number>;
|
|
10
|
+
versionId?: string;
|
|
11
|
+
versionNum?: number;
|
|
12
|
+
}
|
|
13
|
+
export interface CliErrorWithStatus extends Error {
|
|
14
|
+
httpStatus?: number;
|
|
15
|
+
structuredPayload?: Record<string, unknown>;
|
|
16
|
+
}
|
|
17
|
+
export declare function formatTaskCreateError(response: Response): Promise<CliErrorWithStatus>;
|
|
18
|
+
//# sourceMappingURL=task-create-error.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task-create-error.d.ts","sourceRoot":"","sources":["../src/task-create-error.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,sBAAsB;IACrC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,qBAAqB,CAAC,EAAE,KAAK,CAAC;QAC5B,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB,MAAM,CAAC,EAAE,MAAM,CAAA;KAChB,CAAC,CAAA;IACF,qBAAqB,CAAC,EAAE,MAAM,EAAE,CAAA;IAChC,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,0BAA0B,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACnD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,kBAAmB,SAAQ,KAAK;IAC/C,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAC5C;AAaD,wBAAsB,qBAAqB,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAqF3F"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-team hosted-session CONNECTOR allowlist CLI (ALI-1048, CONFIG-SURFACE half):
|
|
3
|
+
* orizu team connectors list [--team <slug>] [--json]
|
|
4
|
+
* orizu team connectors enable <connector> [--team <slug>] [--json]
|
|
5
|
+
* orizu team connectors disable <connector> [--team <slug>] [--json]
|
|
6
|
+
*
|
|
7
|
+
* A team explicitly approves which vault-held connectors (credentials, e.g.
|
|
8
|
+
* 'braintrust') may be INJECTED into hosted agent sessions. Default-deny: a
|
|
9
|
+
* connector is not available to hosted sessions until enabled here. Human ADMIN
|
|
10
|
+
* or CURATOR only — the server rejects agent bearers and non-admin/curator members
|
|
11
|
+
* (the definer RPC gates on is_team_admin_or_curator).
|
|
12
|
+
*
|
|
13
|
+
* DEFERRED (ALI-1031 pairing): this only manages the APPROVAL list. The actual
|
|
14
|
+
* per-session secret injection into the sandbox env is a server-side step deferred
|
|
15
|
+
* to pair with ALI-1031's provisioning (a secret cannot transit the client CLI).
|
|
16
|
+
*
|
|
17
|
+
* Pure command logic with an injected fetcher, mirroring egress-allowlist-cli.
|
|
18
|
+
*/
|
|
19
|
+
export type CliFetcher = (path: string, init?: RequestInit) => Promise<Response>;
|
|
20
|
+
export interface TeamConnectorsCommandIo {
|
|
21
|
+
json: boolean;
|
|
22
|
+
print: (line: string) => void;
|
|
23
|
+
printErr?: (line: string) => void;
|
|
24
|
+
fetcher?: CliFetcher;
|
|
25
|
+
/** Resolve the active team slug when --team is omitted (interactive default). */
|
|
26
|
+
resolveTeamSlug?: () => Promise<string | null>;
|
|
27
|
+
}
|
|
28
|
+
export declare function teamConnectorsCommand(args: string[], io: TeamConnectorsCommandIo): Promise<number>;
|
|
29
|
+
//# sourceMappingURL=team-connectors-cli.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"team-connectors-cli.d.ts","sourceRoot":"","sources":["../src/team-connectors-cli.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAIH,MAAM,MAAM,UAAU,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAA;AAEhF,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,OAAO,CAAA;IACb,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IAC7B,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC,OAAO,CAAC,EAAE,UAAU,CAAA;IACpB,iFAAiF;IACjF,eAAe,CAAC,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAA;CAC/C;AA0FD,wBAAsB,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,uBAAuB,GAAG,OAAO,CAAC,MAAM,CAAC,CAkDxG"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export interface SessionServerCredentials {
|
|
2
|
+
credentialType?: 'session';
|
|
3
|
+
accessToken: string;
|
|
4
|
+
refreshToken: string;
|
|
5
|
+
expiresAt: number;
|
|
6
|
+
}
|
|
7
|
+
export interface PatServerCredentials {
|
|
8
|
+
credentialType: 'pat';
|
|
9
|
+
apiKey: string;
|
|
10
|
+
}
|
|
11
|
+
export type ServerCredentials = SessionServerCredentials | PatServerCredentials;
|
|
12
|
+
export interface StoredCredentialsV1 {
|
|
13
|
+
baseUrl: string;
|
|
14
|
+
accessToken: string;
|
|
15
|
+
refreshToken: string;
|
|
16
|
+
expiresAt: number;
|
|
17
|
+
}
|
|
18
|
+
export interface StoredCredentialsV2 {
|
|
19
|
+
version: 2;
|
|
20
|
+
activeBaseUrl: string | null;
|
|
21
|
+
servers: Record<string, SessionServerCredentials>;
|
|
22
|
+
}
|
|
23
|
+
export interface StoredCredentialsV3 {
|
|
24
|
+
version: 3;
|
|
25
|
+
activeBaseUrl: string | null;
|
|
26
|
+
servers: Record<string, ServerCredentials>;
|
|
27
|
+
}
|
|
28
|
+
export type StoredCredentials = StoredCredentialsV1;
|
|
29
|
+
export interface LoginResponse {
|
|
30
|
+
apiKey?: string;
|
|
31
|
+
accessToken?: string;
|
|
32
|
+
refreshToken?: string;
|
|
33
|
+
expiresAt?: number;
|
|
34
|
+
user: {
|
|
35
|
+
id: string;
|
|
36
|
+
email: string | null;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,wBAAwB;IACvC,cAAc,CAAC,EAA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irroring the
|
|
4
|
+
* Daytona adapter's shape (`createDaytonaProvider`):
|
|
5
|
+
*
|
|
6
|
+
* - the SDK is imported LAZILY through a NON-LITERAL specifier so the CLI /
|
|
7
|
+
* app build resolve without the package and tests never load it;
|
|
8
|
+
* - a `loadModule` dep is injectable, so the fake-SDK unit tests exercise the
|
|
9
|
+
* request mapping (timeout, runtime, egress pass-through, extendTimeout)
|
|
10
|
+
* without the real package or a network.
|
|
11
|
+
*
|
|
12
|
+
* FOUNDER REQUIREMENT (locked): the sandbox `timeout` is ALWAYS set from opts
|
|
13
|
+
* (session length) — the adapter NEVER lets Vercel's 5-minute default apply.
|
|
14
|
+
* Default 60 min, hard cap 24 h.
|
|
15
|
+
*
|
|
16
|
+
* G5 (ALI-1006) owns the egress ALLOWLIST CONTENT (`egress-policy.ts` →
|
|
17
|
+
* `buildEgressPolicy`); this adapter only plumbs the `egressPolicy` option
|
|
18
|
+
* through to the Sandbox firewall (`networkPolicy`) at create. The model-key
|
|
19
|
+
* credential broker (G3/ALI-1004) is COMPOSED into that same default-deny policy
|
|
20
|
+
* by `buildEgressPolicy`: a per-domain request transform injects the model key AT
|
|
21
|
+
* THE PROXY, so the raw key never enters the sandbox (see
|
|
22
|
+
* docs/.../sandbox-secrets-policy.md §3).
|
|
23
|
+
*/
|
|
24
|
+
import type { SandboxProvider } from './sandbox-provider.js';
|
|
25
|
+
/** Default sandbox session length when opts omit one (NEVER Vercel's 5 min). */
|
|
26
|
+
export declare const VERCEL_DEFAULT_TIMEOUT_MS: number;
|
|
27
|
+
/** Hard cap on a configured session length (24 h). */
|
|
28
|
+
export declare const VERCEL_MAX_TIMEOUT_MS: number;
|
|
29
|
+
/** Default runtime image when opts/config omit one. */
|
|
30
|
+
export declare const VERCEL_DEFAULT_RUNTIME = "node24";
|
|
31
|
+
/** Max create attempts when the SDK reports the image is not yet ready. */
|
|
32
|
+
export declare const VERCEL_IMAGE_NOT_READY_MAX_ATTEMPTS = 6;
|
|
33
|
+
/** Base backoff (ms) between image-not-ready retries (multiplied by attempt#). */
|
|
34
|
+
export declare const VERCEL_IMAGE_NOT_READY_BACKOFF_MS = 5000;
|
|
35
|
+
interface VercelSdkCommandFinished {
|
|
36
|
+
exitCode: number;
|
|
37
|
+
stdout(): Promise<string>;
|
|
38
|
+
stderr(): Promise<string>;
|
|
39
|
+
}
|
|
40
|
+
interface VercelRunCommandParams {
|
|
41
|
+
cmd: string;
|
|
42
|
+
args?: string[];
|
|
43
|
+
cwd?: string;
|
|
44
|
+
env?: Record<string, string>;
|
|
45
|
+
sudo?: boolean;
|
|
46
|
+
}
|
|
47
|
+
/** The @vercel/sandbox `Snapshot` surface we touch: the id getter is enough to
|
|
48
|
+
* hand the snapshot to a later `create({ source: { type: 'snapshot', … } })`. */
|
|
49
|
+
interface VercelSdkSnapshot {
|
|
50
|
+
readonly snapshotId: string;
|
|
51
|
+
}
|
|
52
|
+
interface VercelSdkSandbox {
|
|
53
|
+
readonly sandboxId: string;
|
|
54
|
+
runCommand(params: VercelRunCommandParams): Promise<VercelSdkCommandFinished>;
|
|
55
|
+
readFileToBuffer(file: {
|
|
56
|
+
path: string;
|
|
57
|
+
cwd?: string;
|
|
58
|
+
}): Promise<Uint8Array | Buffer | null>;
|
|
59
|
+
writeFiles(files: {
|
|
60
|
+
path: string;
|
|
61
|
+
content: string | Uint8Array;
|
|
62
|
+
mode?: number;
|
|
63
|
+
}[]): Promise<void>;
|
|
64
|
+
stop(opts?: {
|
|
65
|
+
blocking?: boolean;
|
|
66
|
+
}): Promise<unknown>;
|
|
67
|
+
extendTimeout(durationMs: number): Promise<void>;
|
|
68
|
+
updateNetworkPolicy(policy: unknown): Promise<unknown>;
|
|
69
|
+
/** Snapshot the running sandbox; STOPS it as part of the process (verified
|
|
70
|
+
* against @vercel/sandbox@1.10.2 `Sandbox.snapshot(opts?): Promise<Snapshot>`). */
|
|
71
|
+
snapshot(opts?: {
|
|
72
|
+
expiration?: number;
|
|
73
|
+
}): Promise<VercelSdkSnapshot>;
|
|
74
|
+
}
|
|
75
|
+
interface VercelCreateParams {
|
|
76
|
+
timeout: number;
|
|
77
|
+
runtime?: string;
|
|
78
|
+
/** Custom VCR image ref (pre-baked runtime, ALI-1017); omitted → base runtime. */
|
|
79
|
+
image?: string;
|
|
80
|
+
/**
|
|
81
|
+
* Boot from a Vercel Sandbox SNAPSHOT (ALI-1017, zero-Docker prebaked path).
|
|
82
|
+
* VERIFIED against @vercel/sandbox@1.10.2: the create-from-snapshot param is the
|
|
83
|
+
* NESTED `source: { type: 'snapshot', snapshotId }` (NOT a flat `snapshot`), and
|
|
84
|
+
* the snapshot variant of `CreateSandboxParams` OMITS `runtime`/`source` from the
|
|
85
|
+
* base — so we never set `runtime` alongside a snapshot `source`.
|
|
86
|
+
*/
|
|
87
|
+
source?: {
|
|
88
|
+
type: 'snapshot';
|
|
89
|
+
snapshotId: string;
|
|
90
|
+
};
|
|
91
|
+
resources?: {
|
|
92
|
+
vcpus: number;
|
|
93
|
+
};
|
|
94
|
+
ports?: number[];
|
|
95
|
+
networkPolicy?: unknown;
|
|
96
|
+
env?: Record<string, string>;
|
|
97
|
+
token?: string;
|
|
98
|
+
projectId?: string;
|
|
99
|
+
teamId?: string;
|
|
100
|
+
}
|
|
101
|
+
interface VercelSandboxCtor {
|
|
102
|
+
create(params: VercelCreateParams): Promise<VercelSdkSandbox>;
|
|
103
|
+
}
|
|
104
|
+
export interface VercelSdkModule {
|
|
105
|
+
Sandbox: VercelSandboxCtor;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Injectable dynamic-import seam: tests pass an importer that throws so the
|
|
109
|
+
* SDK-absent path is exercised deterministically, regardless of whether
|
|
110
|
+
* `@vercel/sandbox` happens to be resolvable on the host machine. Production
|
|
111
|
+
* callers never pass one — the default is a real dynamic `import()`.
|
|
112
|
+
*/
|
|
113
|
+
export type VercelSdkImporter = (specifier: string) => Promise<unknown>;
|
|
114
|
+
export declare function loadVercelModule(importModule?: VercelSdkImporter): Promise<VercelSdkModule>;
|
|
115
|
+
export interface VercelProviderConfig {
|
|
116
|
+
/** Vercel API token; default env VERCEL_TOKEN, then VERCEL_OIDC_TOKEN. */
|
|
117
|
+
token?: string;
|
|
118
|
+
/** Project id; default env VERCEL_PROJECT_ID. */
|
|
119
|
+
projectId?: string;
|
|
120
|
+
/** Team id; default env VERCEL_TEAM_ID. */
|
|
121
|
+
teamId?: string;
|
|
122
|
+
/** Default runtime image (default node24). */
|
|
123
|
+
runtime?: string;
|
|
124
|
+
/** Default custom VCR image ref (pre-baked runtime); default env
|
|
125
|
+
* ORIZU_HOSTED_IMAGE, else undefined = base runtime (back-compat). */
|
|
126
|
+
image?: string;
|
|
127
|
+
/** Default Vercel Sandbox snapshot id (zero-Docker prebaked runtime); default
|
|
128
|
+
* env ORIZU_HOSTED_SNAPSHOT, else undefined. Mutually exclusive with `image`;
|
|
129
|
+
* when both resolve, the snapshot wins (see createSandbox). */
|
|
130
|
+
snapshot?: string;
|
|
131
|
+
/** Default session length (ms) when createSandbox opts omit one. */
|
|
132
|
+
defaultTimeoutMs?: number;
|
|
133
|
+
/** Hard cap on the configured session length (ms; default 24 h). */
|
|
134
|
+
maxTimeoutMs?: number;
|
|
135
|
+
/** Max create attempts while a custom image reports `image_not_ready`. */
|
|
136
|
+
imageNotReadyMaxAttempts?: number;
|
|
137
|
+
/** Base backoff (ms) between image-not-ready retries (× attempt number). */
|
|
138
|
+
imageNotReadyBackoffMs?: number;
|
|
139
|
+
}
|
|
140
|
+
export interface VercelProviderDeps {
|
|
141
|
+
loadModule?: () => Promise<VercelSdkModule>;
|
|
142
|
+
/** Injectable delay so the image-not-ready retry test runs without real waits. */
|
|
143
|
+
sleep?: (ms: number) => Promise<void>;
|
|
144
|
+
}
|
|
145
|
+
/** True when live credentials are present (used by the env-gated smoke test). */
|
|
146
|
+
export declare function hasVercelCredentials(env?: NodeJS.ProcessEnv): boolean;
|
|
147
|
+
/**
|
|
148
|
+
* True when an error is the SDK's "custom image is still being prepared" signal.
|
|
149
|
+
* We match on a `code` field OR the message text, so we catch the error whether
|
|
150
|
+
* the SDK surfaces it as `{ code: 'image_not_ready' }` or only in `.message`.
|
|
151
|
+
* ONLY this specific condition is retried — any other create failure propagates.
|
|
152
|
+
*/
|
|
153
|
+
export declare function isImageNotReadyError(error: unknown): boolean;
|
|
154
|
+
export declare function createVercelProvider(config?: VercelProviderConfig, deps?: VercelProviderDeps): SandboxProvider;
|
|
155
|
+
export {};
|
|
156
|
+
//# sourceMappingURL=vercel-sandbox-provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vercel-sandbox-provider.d.ts","sourceRoot":"","sources":["../src/vercel-sandbox-provider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EAKV,eAAe,EAEhB,MAAM,uBAAuB,CAAA;AAI9B,gFAAgF;AAChF,eAAO,MAAM,yBAAyB,QAAiB,CAAA;AACvD,sDAAsD;AACtD,eAAO,MAAM,qBAAqB,QAAsB,CAAA;AACxD,uDAAuD;AACvD,eAAO,MAAM,sBAAsB,WAAW,CAAA;AAO9C,2EAA2E;AAC3E,eAAO,MAAM,mCAAmC,IAAI,CAAA;AACpD,kFAAkF;AAClF,eAAO,MAAM,iCAAiC,OAAO,CAAA;AAMrD,UAAU,wBAAwB;IAChC,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;IACzB,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;CAC1B;AAED,UAAU,sBAAsB;IAC9B,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC5B,IAAI,CAAC,EAAE,OAAO,CAAA;CACf;AAED;kFACkF;AAClF,U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