orizu 0.5.20 → 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/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 +3 -0
- 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 +48 -2
- package/dist/gepa-python-command.d.ts +6 -0
- package/dist/gepa-python-command.d.ts.map +1 -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 +6 -3
- 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 +91 -23
- 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 +88 -92
- 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/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-report-cli.d.ts +10 -0
- package/dist/prompt-report-cli.d.ts.map +1 -0
- 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-replacement-warning.d.ts +17 -0
- package/dist/report-replacement-warning.d.ts.map +1 -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 +14 -1
- package/requirements/README.md +138 -0
- package/requirements/skilled-proposer.in +66 -0
- package/requirements/skilled-proposer.lock +265 -0
- package/scripts/ensure-skilled-proposer-venv.mjs +5 -0
- package/scripts/refresh-skilled-proposer-lock.mjs +256 -0
- package/src/diff-comments-cli.ts +4 -0
- package/src/gepa-engine-dispatch.ts +42 -2
- package/src/gepa-python-paths.ts +6 -3
- package/src/help.ts +93 -23
- package/src/index.ts +99 -126
- 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/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-summary-table.ts +12 -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/orizu-gepa/src/orizu_gepa_connector/__init__.py +2 -1
- package/vendor/orizu-gepa/src/orizu_gepa_connector/adapter.py +8 -2
- package/vendor/orizu-gepa/src/orizu_gepa_connector/callbacks.py +17 -3
- package/vendor/orizu-gepa/src/orizu_gepa_connector/engine.py +100 -8
- package/vendor/orizu-gepa/src/orizu_gepa_connector/instruction_set_loader.py +52 -0
- package/vendor/orizu-gepa/src/orizu_gepa_connector/reflection.py +92 -12
- package/vendor/orizu-gepa/src/orizu_gepa_connector/runtime.py +100 -22
- 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 +17 -0
- package/vendor/orizu-gepa/src/orizu_gepa_connector/translator.py +2 -1
- package/vendor/orizu-gepa-python/src/orizu_gepa/client.py +52 -7
- package/vendor/orizu-gepa-python/src/orizu_gepa/local_log.py +4 -1
- 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 +2 -0
- 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-with-gepa.md +25 -0
- package/vendor/skills/orizu-cli/references/prompt-control-plane.md +108 -8
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"merge-job.d.ts","sourceRoot":"","sources":["../src/merge-job.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type CliFetcher = (path: string, init?: RequestInit) => Promise<Response>;
|
|
2
|
+
export interface ModelConfigSettingsVersion {
|
|
3
|
+
versionNumber: number;
|
|
4
|
+
settings: Record<string, unknown>;
|
|
5
|
+
}
|
|
6
|
+
export interface ModelConfig {
|
|
7
|
+
identity: string;
|
|
8
|
+
displayName: string;
|
|
9
|
+
currentSettingsVersion: ModelConfigSettingsVersion;
|
|
10
|
+
createdAt: string;
|
|
11
|
+
}
|
|
12
|
+
export interface ModelConfigsCommandIo {
|
|
13
|
+
json: boolean;
|
|
14
|
+
print: (line: string) => void;
|
|
15
|
+
fetcher?: CliFetcher;
|
|
16
|
+
resolveProjectSlug?: (arg: string | null) => Promise<string>;
|
|
17
|
+
}
|
|
18
|
+
export declare function modelConfigsCommand(args: string[], io: ModelConfigsCommandIo): Promise<number>;
|
|
19
|
+
//# sourceMappingURL=model-configs-cli.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-configs-cli.d.ts","sourceRoot":"","sources":["../src/model-configs-cli.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,UAAU,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAA;AAEhF,MAAM,WAAW,0BAA0B;IACzC,aAAa,EAAE,MAAM,CAAA;IACrB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAClC;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,MAAM,CAAA;IACnB,sBAAsB,EAAE,0BAA0B,CAAA;IAClD,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,OAAO,CAAA;IACb,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IAC7B,OAAO,CAAC,EAAE,UAAU,CAAA;IACpB,kBAAkB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;CAC7D;AAiDD,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,qBAAqB,GAAG,OAAO,CAAC,MAAM,CAAC,CA8CpG"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { readFileSync } from 'node:fs';
|
|
2
|
+
import { authedFetch } from './http.js';
|
|
3
|
+
function argValue(args, flag) {
|
|
4
|
+
const index = args.lastIndexOf(flag);
|
|
5
|
+
return index === -1 || !args[index + 1] || args[index + 1].startsWith('--') ? null : args[index + 1];
|
|
6
|
+
}
|
|
7
|
+
function positionalArgs(args) {
|
|
8
|
+
const values = [];
|
|
9
|
+
for (let index = 0; index < args.length; index += 1) {
|
|
10
|
+
if (args[index].startsWith('--')) {
|
|
11
|
+
if (args[index + 1] && !args[index + 1].startsWith('--'))
|
|
12
|
+
index += 1;
|
|
13
|
+
}
|
|
14
|
+
else
|
|
15
|
+
values.push(args[index]);
|
|
16
|
+
}
|
|
17
|
+
return values;
|
|
18
|
+
}
|
|
19
|
+
function readSettings(value, defaultToEmpty = false) {
|
|
20
|
+
if (!value) {
|
|
21
|
+
if (defaultToEmpty)
|
|
22
|
+
return {};
|
|
23
|
+
throw new Error('--settings is required');
|
|
24
|
+
}
|
|
25
|
+
const source = value.startsWith('@') ? readFileSync(value.slice(1), 'utf8') : value;
|
|
26
|
+
const parsed = JSON.parse(source);
|
|
27
|
+
if (typeof parsed !== 'object' || parsed === null || Array.isArray(parsed)) {
|
|
28
|
+
throw new Error('--settings must contain a JSON object');
|
|
29
|
+
}
|
|
30
|
+
return parsed;
|
|
31
|
+
}
|
|
32
|
+
async function responseMessage(response) {
|
|
33
|
+
try {
|
|
34
|
+
const body = await response.clone().json();
|
|
35
|
+
return typeof body.error === 'string' ? body.error : response.statusText;
|
|
36
|
+
}
|
|
37
|
+
catch {
|
|
38
|
+
return response.statusText;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
async function requestJson(fetcher, path, init) {
|
|
42
|
+
const response = await fetcher(path, init);
|
|
43
|
+
if (!response.ok)
|
|
44
|
+
throw new Error(`Model config request failed (${response.status}): ${await responseMessage(response)}`);
|
|
45
|
+
return response.json();
|
|
46
|
+
}
|
|
47
|
+
function renderModelConfig(config) {
|
|
48
|
+
return `${config.identity} ${config.displayName} v${config.currentSettingsVersion.versionNumber}`;
|
|
49
|
+
}
|
|
50
|
+
export async function modelConfigsCommand(args, io) {
|
|
51
|
+
const positional = positionalArgs(args);
|
|
52
|
+
const [command, action, identity] = positional;
|
|
53
|
+
const resolveProjectSlug = io.resolveProjectSlug;
|
|
54
|
+
if (!resolveProjectSlug)
|
|
55
|
+
throw new Error('Project resolver unavailable');
|
|
56
|
+
const projectArg = argValue(args, '--project');
|
|
57
|
+
const project = projectArg || await resolveProjectSlug(null);
|
|
58
|
+
const fetcher = io.fetcher ?? authedFetch;
|
|
59
|
+
const root = `/api/cli/model-configs?project=${encodeURIComponent(project)}`;
|
|
60
|
+
let result;
|
|
61
|
+
if (command === 'list' && !action) {
|
|
62
|
+
result = await requestJson(fetcher, root, { method: 'GET' });
|
|
63
|
+
if (io.json)
|
|
64
|
+
io.print(JSON.stringify(result));
|
|
65
|
+
else
|
|
66
|
+
for (const config of (result.modelConfigs || []))
|
|
67
|
+
io.print(renderModelConfig(config));
|
|
68
|
+
return 0;
|
|
69
|
+
}
|
|
70
|
+
if (command === 'show' && action && !identity) {
|
|
71
|
+
result = await requestJson(fetcher, `/api/cli/model-configs/${encodeURIComponent(action)}?project=${encodeURIComponent(project)}`, { method: 'GET' });
|
|
72
|
+
}
|
|
73
|
+
else if (command === 'create' && action && !identity) {
|
|
74
|
+
result = await requestJson(fetcher, root, {
|
|
75
|
+
method: 'POST', headers: { 'content-type': 'application/json' },
|
|
76
|
+
body: JSON.stringify({ identity: action, displayName: argValue(args, '--name') || action, settings: readSettings(argValue(args, '--settings'), true) }),
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
else if (command === 'settings' && action === 'set' && identity) {
|
|
80
|
+
result = await requestJson(fetcher, `/api/cli/model-configs/${encodeURIComponent(identity)}/settings?project=${encodeURIComponent(project)}`, {
|
|
81
|
+
method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ settings: readSettings(argValue(args, '--settings')) }),
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
else if (command === 'copy' && action && !identity) {
|
|
85
|
+
const to = argValue(args, '--to');
|
|
86
|
+
if (!to)
|
|
87
|
+
throw new Error('--to is required');
|
|
88
|
+
result = await requestJson(fetcher, `/api/cli/model-configs/${encodeURIComponent(action)}/copy?project=${encodeURIComponent(project)}`, {
|
|
89
|
+
method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ to }),
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
io.print('Usage: orizu model-configs <create|list|show|settings set|copy> [--project <team/project>] [--json]');
|
|
94
|
+
return 1;
|
|
95
|
+
}
|
|
96
|
+
if (io.json) {
|
|
97
|
+
io.print(JSON.stringify(result));
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
const config = result.modelConfig;
|
|
101
|
+
io.print(renderModelConfig(config));
|
|
102
|
+
}
|
|
103
|
+
return 0;
|
|
104
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Human-output helpers for `orizu optimizations export`.
|
|
3
|
+
*
|
|
4
|
+
* Lives outside index.ts per the CLI line ratchet (ALI-976).
|
|
5
|
+
*/
|
|
6
|
+
export interface OptimizationExportCliContext {
|
|
7
|
+
getArg: (name: string) => string | null;
|
|
8
|
+
getPositionalArg: (index: number) => string | null;
|
|
9
|
+
authedFetch: (path: string, init?: RequestInit) => Promise<Response>;
|
|
10
|
+
hasJsonFlag: () => boolean;
|
|
11
|
+
printJson: (value: Record<string, unknown>) => void;
|
|
12
|
+
printLine: (message?: string) => void;
|
|
13
|
+
expandHomePath: (path: string) => string;
|
|
14
|
+
writeTextFileEnsuringDir: (path: string, content: string) => void;
|
|
15
|
+
sanitizeTerminalText: (value: unknown) => string;
|
|
16
|
+
}
|
|
17
|
+
export declare function printDiffCommentsSuppressionMarker(ctx: OptimizationExportCliContext, data: Record<string, unknown>): void;
|
|
18
|
+
export declare function exportOptimizationRunCommand(ctx: OptimizationExportCliContext): Promise<void>;
|
|
19
|
+
//# sourceMappingURL=optimization-export-cli.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"optimization-export-cli.d.ts","sourceRoot":"","sources":["../src/optimization-export-cli.ts"],"names":[],"mappings":"AAKA;;;;GAIG;AAEH,MAAM,WAAW,4BAA4B;IAC3C,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAA;IACvC,gBAAgB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAA;IAClD,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAA;IACpE,WAAW,EAAE,MAAM,OAAO,CAAA;IAC1B,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAA;IACnD,SAAS,EAAE,CAAC,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IACrC,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAA;IACxC,wBAAwB,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IACjE,oBAAoB,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,MAAM,CAAA;CACjD;AAED,wBAAgB,kCAAkC,CAChD,GAAG,EAAE,4BAA4B,EACjC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,IAAI,CASN;AAED,wBAAsB,4BAA4B,CAChD,GAAG,EAAE,4BAA4B,GAChC,OAAO,CAAC,IAAI,CAAC,CAgCf"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ALI-1073: `orizu optimizations list` — enumerate the project's optimization
|
|
3
|
+
* runs (id, status, refs, promoted-version link) so an agent/human can
|
|
4
|
+
* discover a prior run.
|
|
5
|
+
*
|
|
6
|
+
* ALI-1175: best scores in this list derive from agent-reported score runs —
|
|
7
|
+
* the human output labels them so the list never implies server-attested
|
|
8
|
+
* evidence.
|
|
9
|
+
*
|
|
10
|
+
* Lives outside index.ts per the CLI index line ratchet (ALI-976): owns its
|
|
11
|
+
* own argument parsing and printing via injected io.
|
|
12
|
+
*/
|
|
13
|
+
export interface OptimizationsListIo {
|
|
14
|
+
json: boolean;
|
|
15
|
+
print: (line: string) => void;
|
|
16
|
+
resolveProjectSlug: (projectArg: string | null) => Promise<string>;
|
|
17
|
+
fetcher?: (path: string, init?: RequestInit) => Promise<Response>;
|
|
18
|
+
}
|
|
19
|
+
export declare function listOptimizationRunsCommand(args: string[], io: OptimizationsListIo): Promise<void>;
|
|
20
|
+
//# sourceMappingURL=optimizations-list-cli.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"optimizations-list-cli.d.ts","sourceRoot":"","sources":["../src/optimizations-list-cli.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAMH,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,OAAO,CAAA;IACb,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IAC7B,kBAAkB,EAAE,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;IAClE,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAA;CAClE;AAqDD,wBAAsB,2BAA2B,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CA0DxG"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface OptimizationsPromoteIo {
|
|
2
|
+
json: boolean;
|
|
3
|
+
print: (line: string) => void;
|
|
4
|
+
resolveProjectSlug: (projectArg: string | null) => Promise<string>;
|
|
5
|
+
fetcher: (path: string, init?: RequestInit) => Promise<Response>;
|
|
6
|
+
}
|
|
7
|
+
export declare function promoteOptimizationCommand(args: string[], io: OptimizationsPromoteIo): Promise<void>;
|
|
8
|
+
//# sourceMappingURL=optimizations-promote-cli.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"optimizations-promote-cli.d.ts","sourceRoot":"","sources":["../src/optimizations-promote-cli.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,OAAO,CAAA;IACb,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IAC7B,kBAAkB,EAAE,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;IAClE,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAA;CACjE;AAOD,wBAAsB,0BAA0B,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,CAyB1G"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { extractErrorMessage } from './error-response.js';
|
|
2
|
+
import { sanitizeTerminalText } from './json-response.js';
|
|
3
|
+
function option(args, name) {
|
|
4
|
+
const index = args.indexOf(name);
|
|
5
|
+
return index === -1 || !args[index + 1] || args[index + 1].startsWith('--') ? null : args[index + 1];
|
|
6
|
+
}
|
|
7
|
+
export async function promoteOptimizationCommand(args, io) {
|
|
8
|
+
const runId = args.find(arg => !arg.startsWith('--') && arg !== option(args, '--candidate') && arg !== option(args, '--label') && arg !== option(args, '--project'));
|
|
9
|
+
const candidateId = option(args, '--candidate');
|
|
10
|
+
const label = option(args, '--label');
|
|
11
|
+
if (!runId || !candidateId || (label !== null && label !== 'production')) {
|
|
12
|
+
throw new Error('Usage: orizu optimizations promote <run-id> --candidate <id> [--label production] [--project <team/project>] [--json]');
|
|
13
|
+
}
|
|
14
|
+
const project = await io.resolveProjectSlug(option(args, '--project'));
|
|
15
|
+
const response = await io.fetcher(`/api/cli/optimization-runs/${encodeURIComponent(runId)}/promote?project=${encodeURIComponent(project)}`, {
|
|
16
|
+
method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ candidateId, label }),
|
|
17
|
+
});
|
|
18
|
+
if (!response.ok)
|
|
19
|
+
throw new Error(`Failed to promote optimization candidate: ${await extractErrorMessage(response)}`);
|
|
20
|
+
const data = await response.json();
|
|
21
|
+
if (io.json) {
|
|
22
|
+
io.print(JSON.stringify(data.profileVersionId
|
|
23
|
+
? { profileVersionId: data.profileVersionId, components: data.components ?? [] }
|
|
24
|
+
: { promptVersionId: data.promptVersionId }));
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
if (data.profileVersionId) {
|
|
28
|
+
io.print(`Promoted profile version ${sanitizeTerminalText(data.profileVersionId)}`);
|
|
29
|
+
for (const component of data.components ?? [])
|
|
30
|
+
io.print(`${sanitizeTerminalText(component.key)}: ${sanitizeTerminalText(component.status)}`);
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
io.print(`Promoted prompt version ${sanitizeTerminalText(data.promptVersionId ?? '')}`);
|
|
34
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Return the first dash-prefixed option that is not in a command's explicit
|
|
3
|
+
* allowlist. An unambiguously value-like single-dash token immediately
|
|
4
|
+
* following a value-taking option is data: this keeps inputs such as
|
|
5
|
+
* `--duration -5` and `--task "- fix the test"` available without allowing a
|
|
6
|
+
* stray token or mistyped short option.
|
|
7
|
+
*
|
|
8
|
+
* `valueOptions` permits the unambiguous `--option=value` form. A separate
|
|
9
|
+
* token beginning with `--`, or an option-like single-dash word, is parsed as
|
|
10
|
+
* an option so a missing value cannot swallow a typo. Callers whose value is
|
|
11
|
+
* itself option-like can use the inline form; Markdown list markers and finite
|
|
12
|
+
* negative numbers remain safe as separate values.
|
|
13
|
+
*/
|
|
14
|
+
export declare function findUnknownOption(args: readonly string[], allowedOptions: ReadonlySet<string>, valueOptions?: ReadonlySet<string>): string | null;
|
|
15
|
+
//# sourceMappingURL=option-validation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"option-validation.d.ts","sourceRoot":"","sources":["../src/option-validation.ts"],"names":[],"mappings":"AA0BA;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,cAAc,EAAE,WAAW,CAAC,MAAM,CAAC,EACnC,YAAY,GAAE,WAAW,CAAC,MAAM,CAAa,GAC5C,MAAM,GAAG,IAAI,CAmBf"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
export declare const PREVIEW_RUNTIME_REGISTRY_VERSION = 1;
|
|
2
|
+
export declare const PREVIEW_ALLOWED_IMPORTS: Record<string, string[]>;
|
|
3
|
+
export interface AppPreviewOptions {
|
|
4
|
+
filePath: string;
|
|
5
|
+
inputSchema: Record<string, unknown>;
|
|
6
|
+
outputSchema: Record<string, unknown>;
|
|
7
|
+
sampleRow: Record<string, unknown>;
|
|
8
|
+
screenshotPath?: string;
|
|
9
|
+
headed?: boolean;
|
|
10
|
+
keepOpen?: boolean;
|
|
11
|
+
componentName?: string;
|
|
12
|
+
cwd?: string;
|
|
13
|
+
forceSnapshot?: boolean;
|
|
14
|
+
playwright?: PreviewPlaywright;
|
|
15
|
+
chromiumExecutablePath?: string | null;
|
|
16
|
+
}
|
|
17
|
+
export interface AppPreviewResult {
|
|
18
|
+
url: string;
|
|
19
|
+
screenshotPath?: string;
|
|
20
|
+
warnings: string[];
|
|
21
|
+
}
|
|
22
|
+
interface Issue {
|
|
23
|
+
level: 'error' | 'warn';
|
|
24
|
+
message: string;
|
|
25
|
+
}
|
|
26
|
+
interface PreviewPlaywright {
|
|
27
|
+
chromium: {
|
|
28
|
+
launch: (options: Record<string, unknown>) => Promise<PreviewBrowser>;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
interface PreviewBrowser {
|
|
32
|
+
newPage: (options: Record<string, unknown>) => Promise<PreviewPage>;
|
|
33
|
+
close: () => Promise<void>;
|
|
34
|
+
once?: (event: string, listener: () => void) => unknown;
|
|
35
|
+
on?: (event: string, listener: () => void) => unknown;
|
|
36
|
+
off?: (event: string, listener: () => void) => unknown;
|
|
37
|
+
}
|
|
38
|
+
interface PreviewPage {
|
|
39
|
+
goto: (url: string, options: Record<string, unknown>) => Promise<unknown>;
|
|
40
|
+
waitForSelector: (selector: string, options: Record<string, unknown>) => Promise<unknown>;
|
|
41
|
+
screenshot: (options: {
|
|
42
|
+
path: string;
|
|
43
|
+
fullPage: boolean;
|
|
44
|
+
}) => Promise<unknown>;
|
|
45
|
+
waitForTimeout: (timeout: number) => Promise<unknown>;
|
|
46
|
+
once?: (event: string, listener: () => void) => unknown;
|
|
47
|
+
on?: (event: string, listener: () => void) => unknown;
|
|
48
|
+
off?: (event: string, listener: () => void) => unknown;
|
|
49
|
+
}
|
|
50
|
+
export declare function validatePreviewInputs(options: AppPreviewOptions): Issue[];
|
|
51
|
+
export declare function runLocalAppPreview(options: AppPreviewOptions): Promise<AppPreviewResult>;
|
|
52
|
+
/**
|
|
53
|
+
* ALI-1071: react/react-dom are no longer dependencies of the PUBLISHED CLI
|
|
54
|
+
* (app-grade packages were moved to devDependencies), so a bare global install
|
|
55
|
+
* may not carry them. Detect that BEFORE esbuild surfaces a raw
|
|
56
|
+
* `Could not resolve "react"` build error, so the preview command can fail with
|
|
57
|
+
* an actionable message instead. Exported for tests.
|
|
58
|
+
*/
|
|
59
|
+
export declare function findMissingPreviewRuntimeDeps(nodeModuleDirs: string[]): string[];
|
|
60
|
+
export declare function buildPreviewCss(repoRoot: string | null, appPath: string): Promise<string>;
|
|
61
|
+
export declare function getPreviewSnapshotModulePaths(): string[];
|
|
62
|
+
export {};
|
|
63
|
+
//# sourceMappingURL=preview-runtime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preview-runtime.d.ts","sourceRoot":"","sources":["../src/preview-runtime.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ADR-007 P4 (ALI-1074): the session-scoped, commit-first prompt push.
|
|
3
|
+
*
|
|
4
|
+
* `orizu prompts|judges push --session <id>` creates the version through
|
|
5
|
+
* POST /api/cli/prompts/drafts: the server commits the artifact files to the
|
|
6
|
+
* session's `orizu/session-*` branch (one Git Data API commit) and then
|
|
7
|
+
* writes a DRAFT row pinning repo_path/content_sha/commit_sha. The draft
|
|
8
|
+
* seals — and gets its version number — when the session branch merges via
|
|
9
|
+
* `orizu session finish` + promotion-manifest apply.
|
|
10
|
+
*
|
|
11
|
+
* The primary text is ALWAYS committed as `prompt.md`: the server read side
|
|
12
|
+
* (lib/artifact-git-read.ts PROMPT_BODY_FILENAMES) prefers that name, so the
|
|
13
|
+
* git filename stays canonical regardless of what the local bundle calls its
|
|
14
|
+
* body file.
|
|
15
|
+
*
|
|
16
|
+
* Lives outside index.ts per the CLI line ratchet (ALI-976).
|
|
17
|
+
*/
|
|
18
|
+
export declare const PROMPT_PRIMARY_GIT_FILENAME = "prompt.md";
|
|
19
|
+
export interface PromptDraftSidecar {
|
|
20
|
+
path: string;
|
|
21
|
+
content?: unknown;
|
|
22
|
+
[key: string]: unknown;
|
|
23
|
+
}
|
|
24
|
+
export interface PromptDraftFile {
|
|
25
|
+
path: string;
|
|
26
|
+
content: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Build the git file set for a prompt-version draft: the primary text at the
|
|
30
|
+
* canonical prompt.md plus every sidecar at its own relative path. A sidecar
|
|
31
|
+
* that collides with prompt.md is a hard error (it would silently overwrite
|
|
32
|
+
* the body in the committed tree).
|
|
33
|
+
*/
|
|
34
|
+
export declare function buildPromptDraftFiles(primaryBody: string, sidecars: PromptDraftSidecar[]): PromptDraftFile[];
|
|
35
|
+
export interface PushPromptDraftInput {
|
|
36
|
+
kind: 'prompt' | 'judge';
|
|
37
|
+
project: string;
|
|
38
|
+
sessionId: string;
|
|
39
|
+
/** The parsed orizu.prompt.json manifest of the local bundle. */
|
|
40
|
+
manifest: Record<string, unknown>;
|
|
41
|
+
/** What to call the artifact in the success message (name or directory). */
|
|
42
|
+
displayName: string;
|
|
43
|
+
bodyKind: string;
|
|
44
|
+
primaryBody: string;
|
|
45
|
+
sidecars: PromptDraftSidecar[];
|
|
46
|
+
runnerVersionId: string;
|
|
47
|
+
parentVersionId?: string;
|
|
48
|
+
report?: {
|
|
49
|
+
markdown: string;
|
|
50
|
+
sourceName: string | null;
|
|
51
|
+
} | null;
|
|
52
|
+
/** Test seam; defaults to the authenticated CLI fetcher. */
|
|
53
|
+
fetcher?: (path: string, init?: RequestInit) => Promise<Response>;
|
|
54
|
+
}
|
|
55
|
+
export interface PushPromptDraftResult {
|
|
56
|
+
data: Record<string, unknown>;
|
|
57
|
+
message: string;
|
|
58
|
+
}
|
|
59
|
+
export declare function pushPromptDraft(input: PushPromptDraftInput): Promise<PushPromptDraftResult>;
|
|
60
|
+
//# sourceMappingURL=prompt-draft-push.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt-draft-push.d.ts","sourceRoot":"","sources":["../src/prompt-draft-push.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;GAgBG;AAEH,eAAO,MAAM,2BAA2B,cAAc,CAAA;AAEtD,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;CAChB;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,kBAAkB,EAAE,GAC7B,eAAe,EAAE,CAYnB;AAMD,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAA;IACxB,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,iEAAiE;IACjE,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACjC,4EAA4E;IAC5E,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,kBAAkB,EAAE,CAAA;IAC9B,eAAe,EAAE,MAAM,CAAA;IACvB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,MAAM,CAAC,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,GAAG,IAAI,CAAA;IAC/D,4DAA4D;IAC5D,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAA;CAClE;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC7B,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,wBAAsB,eAAe,CAAC,KAAK,EAAE,oBAAoB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CA8DjG"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface PromptLabelCliContext {
|
|
2
|
+
getArg: (name: string) => string | null;
|
|
3
|
+
getPositionalArg: (index: number) => string | null;
|
|
4
|
+
json: boolean;
|
|
5
|
+
printJson: (value: Record<string, unknown>) => void;
|
|
6
|
+
printLine: (value: string) => void;
|
|
7
|
+
resolveProjectSlug: (project: string | null) => Promise<string>;
|
|
8
|
+
}
|
|
9
|
+
export declare function setPromptLabel(context: PromptLabelCliContext): Promise<void>;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=prompt-label-cli.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt-label-cli.d.ts","sourceRoot":"","sources":["../src/prompt-label-cli.ts"],"names":[],"mappings":"AAGA,UAAU,qBAAqB;IAC7B,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAA;IACvC,gBAAgB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAA;IAClD,IAAI,EAAE,OAAO,CAAA;IACb,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAA;IACnD,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,kBAAkB,EAAE,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;CAChE;AAYD,wBAAsB,cAAc,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAgClF"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { authedFetch } from './http.js';
|
|
2
|
+
import { parseJsonResponse, sanitizeTerminalText } from './json-response.js';
|
|
3
|
+
export async function setPromptLabel(context) {
|
|
4
|
+
const promptName = context.getPositionalArg(3);
|
|
5
|
+
const label = context.getPositionalArg(4);
|
|
6
|
+
const project = context.getArg('--project') || await context.resolveProjectSlug(null);
|
|
7
|
+
const promptVersionId = context.getArg('--version');
|
|
8
|
+
if (!promptName || !label || !promptVersionId) {
|
|
9
|
+
throw new Error('Usage: orizu prompts labels set <prompt-name> <label> --version <prompt-version-id> [--project <team/project>] [--json]');
|
|
10
|
+
}
|
|
11
|
+
const response = await authedFetch(`/api/cli/prompts/labels?project=${encodeURIComponent(project)}`, {
|
|
12
|
+
method: 'POST',
|
|
13
|
+
headers: { 'Content-Type': 'application/json' },
|
|
14
|
+
body: JSON.stringify({ promptName, label, promptVersionId }),
|
|
15
|
+
});
|
|
16
|
+
if (!response.ok) {
|
|
17
|
+
throw new Error(`Failed to set prompt label: ${await response.text()}`);
|
|
18
|
+
}
|
|
19
|
+
const data = await parseJsonResponse(response, 'Prompt label set');
|
|
20
|
+
if (context.json) {
|
|
21
|
+
context.printJson(data);
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
context.printLine(`Moved ${sanitizeTerminalText(label)} to ${sanitizeTerminalText(promptVersionId)}`);
|
|
25
|
+
if (data.owner) {
|
|
26
|
+
context.printLine(`Owner: ${sanitizeTerminalText(promptName)} (${sanitizeTerminalText(data.prompt_id)}) -> ` +
|
|
27
|
+
`${sanitizeTerminalText(data.owner.instructionSetSlug)} / ${sanitizeTerminalText(data.owner.componentKey)}`);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare const CLI_LENGTH_STATS_FIELDS: readonly ["tokens", "lines", "chars", "words"];
|
|
2
|
+
export declare const CLI_LENGTH_DELTA_SPLIT_UNAVAILABLE_REASONS: readonly ["diff_degraded_size_limit", "diff_degraded_cell_limit"];
|
|
3
|
+
export declare const CLI_LENGTH_MEASUREMENT_UNAVAILABLE_REASONS: readonly ["length_measurement_size_limit", "length_measurement_failed", "body_resolution_failed", "measurement_cap_exceeded", "enrichment_failed", "bodies_unavailable_event_cap"];
|
|
4
|
+
export type CliLengthStatsField = typeof CLI_LENGTH_STATS_FIELDS[number];
|
|
5
|
+
export type CliLengthDeltaSplitUnavailableReason = typeof CLI_LENGTH_DELTA_SPLIT_UNAVAILABLE_REASONS[number];
|
|
6
|
+
export type CliLengthMeasurementUnavailableReason = typeof CLI_LENGTH_MEASUREMENT_UNAVAILABLE_REASONS[number];
|
|
7
|
+
export interface CliLengthStats {
|
|
8
|
+
tokens: number;
|
|
9
|
+
lines: number;
|
|
10
|
+
chars: number;
|
|
11
|
+
words: number;
|
|
12
|
+
}
|
|
13
|
+
export interface CliLengthStatsPair {
|
|
14
|
+
from: CliLengthStats | null;
|
|
15
|
+
to: CliLengthStats | null;
|
|
16
|
+
fromUnavailableReason?: CliLengthMeasurementUnavailableReason;
|
|
17
|
+
toUnavailableReason?: CliLengthMeasurementUnavailableReason;
|
|
18
|
+
}
|
|
19
|
+
export interface CliLengthMetricDelta {
|
|
20
|
+
removed: number | null;
|
|
21
|
+
added: number | null;
|
|
22
|
+
net: number;
|
|
23
|
+
}
|
|
24
|
+
export interface CliLengthDelta extends Record<CliLengthStatsField, CliLengthMetricDelta> {
|
|
25
|
+
splitUnavailableReason: CliLengthDeltaSplitUnavailableReason | null;
|
|
26
|
+
}
|
|
27
|
+
export declare function formatFiniteLengthCount(value: unknown, signed?: boolean): string | null;
|
|
28
|
+
//# sourceMappingURL=prompt-length-wire.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt-length-wire.d.ts","sourceRoot":"","sources":["../src/prompt-length-wire.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,gDAK1B,CAAA;AAEV,eAAO,MAAM,0CAA0C,mEAG7C,CAAA;AACV,eAAO,MAAM,0CAA0C,oLAO7C,CAAA;AAEV,MAAM,MAAM,mBAAmB,GAAG,OAAO,uBAAuB,CAAC,MAAM,CAAC,CAAA;AACxE,MAAM,MAAM,oCAAoC,GAC9C,OAAO,0CAA0C,CAAC,MAAM,CAAC,CAAA;AAC3D,MAAM,MAAM,qCAAqC,GAC/C,OAAO,0CAA0C,CAAC,MAAM,CAAC,CAAA;AAE3D,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,cAAc,GAAG,IAAI,CAAA;IAC3B,EAAE,EAAE,cAAc,GAAG,IAAI,CAAA;IACzB,qBAAqB,CAAC,EAAE,qCAAqC,CAAA;IAC7D,mBAAmB,CAAC,EAAE,qCAAqC,CAAA;CAC5D;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,GAAG,EAAE,MAAM,CAAA;CACZ;AAED,MAAM,WAAW,cAAe,SAAQ,MAAM,CAC5C,mBAAmB,EACnB,oBAAoB,CACrB;IACC,sBAAsB,EAAE,oCAAoC,GAAG,IAAI,CAAA;CACpE;AAED,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,OAAO,EACd,MAAM,UAAQ,GACb,MAAM,GAAG,IAAI,CAQf"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface PromptReportCliContext {
|
|
2
|
+
resolveProjectSlug: (project: string | null) => Promise<string>;
|
|
3
|
+
json: boolean;
|
|
4
|
+
printJson: (payload: Record<string, unknown>) => void;
|
|
5
|
+
printLine: (message?: string) => void;
|
|
6
|
+
fetcher?: (path: string, init?: RequestInit) => Promise<Response>;
|
|
7
|
+
}
|
|
8
|
+
export declare function promptReportCommand(args: readonly string[], context: PromptReportCliContext): Promise<void>;
|
|
9
|
+
export declare function promptPushErrorMessage(response: Response, kind: 'prompt' | 'judge', hasReport: boolean): Promise<string>;
|
|
10
|
+
//# sourceMappingURL=prompt-report-cli.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt-report-cli.d.ts","sourceRoot":"","sources":["../src/prompt-report-cli.ts"],"names":[],"mappings":"AAoBA,MAAM,WAAW,sBAAsB;IACrC,kBAAkB,EAAE,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;IAC/D,IAAI,EAAE,OAAO,CAAA;IACb,SAAS,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAA;IACrD,SAAS,EAAE,CAAC,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IACrC,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAA;CAClE;AAiBD,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,OAAO,EAAE,sBAAsB,iBA0EhC;AAED,wBAAsB,sBAAsB,CAC1C,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,QAAQ,GAAG,OAAO,EACxB,SAAS,EAAE,OAAO,GACjB,OAAO,CAAC,MAAM,CAAC,CASjB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type CliLengthStats } from './prompt-length-wire.js';
|
|
2
|
+
interface PromptSummaryRow {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
role: string;
|
|
6
|
+
status?: string;
|
|
7
|
+
lengthStats?: CliLengthStats | null;
|
|
8
|
+
owner?: {
|
|
9
|
+
instructionSetSlug: string;
|
|
10
|
+
componentKey: string;
|
|
11
|
+
} | null;
|
|
12
|
+
}
|
|
13
|
+
export declare function printPromptSummaryTable(items: PromptSummaryRow[], emptyMessage: string, printLine: (line: string) => void): void;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=prompt-summary-table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt-summary-table.d.ts","sourceRoot":"","sources":["../src/prompt-summary-table.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,yBAAyB,CAAA;AAEhC,UAAU,gBAAgB;IACxB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,WAAW,CAAC,EAAE,cAAc,GAAG,IAAI,CAAA;IACnC,KAAK,CAAC,EAAE;QACN,kBAAkB,EAAE,MAAM,CAAA;QAC1B,YAAY,EAAE,MAAM,CAAA;KACrB,GAAG,IAAI,CAAA;CACT;AAED,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,gBAAgB,EAAE,EACzB,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,QA+ClC"}
|
|
@@ -34,4 +34,10 @@ export function printPromptSummaryTable(items, emptyMessage, printLine) {
|
|
|
34
34
|
rows.forEach(row => {
|
|
35
35
|
printLine(keys.map((key, index) => row[key].padEnd(widths[index])).join(' '));
|
|
36
36
|
});
|
|
37
|
+
items.forEach(item => {
|
|
38
|
+
if (item.owner) {
|
|
39
|
+
printLine(`Owner: ${sanitizeTerminalText(item.name)} (${sanitizeTerminalText(item.id)}) -> ` +
|
|
40
|
+
`${sanitizeTerminalText(item.owner.instructionSetSlug)} / ${sanitizeTerminalText(item.owner.componentKey)}`);
|
|
41
|
+
}
|
|
42
|
+
});
|
|
37
43
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ADR-009 amendment / ALI-1157 (Codex P2 finding 5): a shared, human-readable
|
|
3
|
+
* warning for a registration-tag failure on a draft push.
|
|
4
|
+
*
|
|
5
|
+
* "Registration is publication": every draft writer plants a permanent
|
|
6
|
+
* `orizu/registered/<kind>/<versionId>` tag at the row's pinned commit. That
|
|
7
|
+
* tag is BEST-EFFORT — the row + commit pin are already durable, so a tag that
|
|
8
|
+
* fails to plant never fails the push (exit stays 0). But the failure used to
|
|
9
|
+
* be visible only under `--json`; normal output printed unconditional success.
|
|
10
|
+
* This surfaces it as a one-line warning the push commands append to their
|
|
11
|
+
* success message.
|
|
12
|
+
*
|
|
13
|
+
* Codex round-2 finding 4: the warning must NOT promise automatic retry — no
|
|
14
|
+
* reconciler exists yet (it is a tracked follow-up). It states the version is
|
|
15
|
+
* registered and the tag can be re-planted on the next registration or by hand.
|
|
16
|
+
*
|
|
17
|
+
* A tag "failed to plant" when `registration_tag.planted === false` (the tag
|
|
18
|
+
* already exists at a DIFFERENT commit — never moved — or the transport/pin
|
|
19
|
+
* lookup failed). `planted === true` (freshly created OR idempotent replay)
|
|
20
|
+
* and a missing field (older server / no tag attempted) produce no warning.
|
|
21
|
+
*/
|
|
22
|
+
/**
|
|
23
|
+
* A one-line warning for a failed registration tag on a draft-push response
|
|
24
|
+
* body, or null when the tag planted (or none was attempted).
|
|
25
|
+
*/
|
|
26
|
+
export declare function registrationTagWarning(data: Record<string, unknown>): string | null;
|
|
27
|
+
/**
|
|
28
|
+
* Append the registration-tag warning (if any) to a push success message,
|
|
29
|
+
* keeping it a single trailing line. Exit stays 0 — registration succeeded.
|
|
30
|
+
*/
|
|
31
|
+
export declare function appendRegistrationTagWarning(message: string, data: Record<string, unknown>): string;
|
|
32
|
+
//# sourceMappingURL=registration-tag-warning.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registration-tag-warning.d.ts","sourceRoot":"","sources":["../src/registration-tag-warning.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAYH;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,GAAG,IAAI,CAYnF;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAGnG"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface ReportCommentsCliContext {
|
|
2
|
+
getArg: (name: string) => string | null;
|
|
3
|
+
getPositionalArg: (index: number) => string | null;
|
|
4
|
+
rejectDashPrefixedOptionValue: (name: string, value: string | null) => void;
|
|
5
|
+
resolveProjectSlug: (preferredProject: string | null) => Promise<string>;
|
|
6
|
+
readSourceFile: (pathArg: string) => string;
|
|
7
|
+
authedFetch: (path: string, init?: RequestInit) => Promise<Response>;
|
|
8
|
+
parseJsonResponse: <T>(response: Response, context: string) => Promise<T>;
|
|
9
|
+
hasJsonFlag: () => boolean;
|
|
10
|
+
printJson: (value: Record<string, unknown>) => void;
|
|
11
|
+
printLine: (message?: string) => void;
|
|
12
|
+
sanitizeTerminalText: (value: unknown) => string;
|
|
13
|
+
}
|
|
14
|
+
export declare function reportCommentsCommand(action: string | undefined, ctx: ReportCommentsCliContext): Promise<void>;
|
|
15
|
+
export declare function throwDeprecatedPromptCommentsCommand(): never;
|
|
16
|
+
//# sourceMappingURL=report-comments-cli.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"report-comments-cli.d.ts","sourceRoot":"","sources":["../src/report-comments-cli.ts"],"names":[],"mappings":"AA6FA,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAA;IACvC,gBAAgB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAA;IAClD,6BAA6B,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAA;IAC3E,kBAAkB,EAAE,CAAC,gBAAgB,EAAE,MAAM,GAAG,IAAI,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;IACxE,cAAc,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,CAAA;IAC3C,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAA;IACpE,iBAAiB,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,CAAA;IACzE,WAAW,EAAE,MAAM,OAAO,CAAA;IAC1B,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAA;IACnD,SAAS,EAAE,CAAC,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IACrC,oBAAoB,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,MAAM,CAAA;CACjD;AA6YD,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,GAAG,EAAE,wBAAwB,iBAqB9B;AAED,wBAAgB,oCAAoC,IAAI,KAAK,CAI5D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"report-markdown-blankness.d.ts","sourceRoot":"","sources":["../src/report-markdown-blankness.ts"],"names":[],"mappings":"AAGA,wBAAgB,iCAAiC,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAE3E"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ALI-1452: a shared, human-readable warning for a replaced prompt-version
|
|
3
|
+
* report on a push/draft response.
|
|
4
|
+
*
|
|
5
|
+
* Re-pushing an unchanged prompt with a report deliberately replaces the
|
|
6
|
+
* version's existing report (reports are correctable; versions are immutable).
|
|
7
|
+
* The server discloses that replacement as `report_replaced:
|
|
8
|
+
* { source_name, updated_at } | null`; this turns a non-null disclosure into
|
|
9
|
+
* the stderr warning line the push commands print. JSON mode prints nothing —
|
|
10
|
+
* the payload already carries `report_replaced`.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* A one-line warning when a push response discloses that it replaced an
|
|
14
|
+
* existing report, or null when nothing was replaced (or no report was sent).
|
|
15
|
+
*/
|
|
16
|
+
export declare function reportReplacementWarning(data: Record<string, unknown>): string | null;
|
|
17
|
+
//# sourceMappingURL=report-replacement-warning.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"report-replacement-warning.d.ts","sourceRoot":"","sources":["../src/report-replacement-warning.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAMH;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,GAAG,IAAI,CAcrF"}
|