orizu 0.5.23 → 0.5.24

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.
Files changed (118) hide show
  1. package/README.md +18 -10
  2. package/dist/child-output-tee.d.ts +48 -0
  3. package/dist/child-output-tee.d.ts.map +1 -0
  4. package/dist/child-output-tee.js +512 -0
  5. package/dist/cli-auth-browser-page.d.ts +2 -0
  6. package/dist/cli-auth-browser-page.d.ts.map +1 -0
  7. package/dist/cli-auth-browser-page.js +107 -0
  8. package/dist/github-setup.js +8 -8
  9. package/dist/headless-login.d.ts +17 -0
  10. package/dist/headless-login.d.ts.map +1 -0
  11. package/dist/headless-login.js +105 -0
  12. package/dist/help.d.ts.map +1 -1
  13. package/dist/help.js +30 -22
  14. package/dist/hosted-boot.js +3 -3
  15. package/dist/hosted-bootstrap.js +2 -2
  16. package/dist/hosted-commands.d.ts +2 -0
  17. package/dist/hosted-commands.d.ts.map +1 -1
  18. package/dist/hosted-commands.js +11 -0
  19. package/dist/hosted-environment.d.ts +3 -0
  20. package/dist/hosted-environment.d.ts.map +1 -0
  21. package/dist/hosted-environment.js +2 -0
  22. package/dist/hosted-gepa-cli.d.ts +3 -0
  23. package/dist/hosted-gepa-cli.d.ts.map +1 -1
  24. package/dist/hosted-gepa-cli.js +92 -5
  25. package/dist/hosted-loop.d.ts +1 -1
  26. package/dist/hosted-loop.d.ts.map +1 -1
  27. package/dist/hosted-loop.js +2 -1
  28. package/dist/hosted-optimization-cli.d.ts +7 -0
  29. package/dist/hosted-optimization-cli.d.ts.map +1 -0
  30. package/dist/hosted-optimization-cli.js +218 -0
  31. package/dist/hosted-optimization-refusals.d.ts +88 -0
  32. package/dist/hosted-optimization-refusals.d.ts.map +1 -0
  33. package/dist/hosted-optimization-refusals.js +86 -0
  34. package/dist/hosted-optimization.d.ts +6 -0
  35. package/dist/hosted-optimization.d.ts.map +1 -0
  36. package/dist/hosted-optimization.js +436 -0
  37. package/dist/hosted-provider-settings.d.ts +3 -0
  38. package/dist/hosted-provider-settings.d.ts.map +1 -1
  39. package/dist/hosted-provider-settings.js +9 -0
  40. package/dist/hosted-session-cli.d.ts.map +1 -1
  41. package/dist/hosted-session-cli.js +6 -1
  42. package/dist/hosted-skill-staging.d.ts +9 -9
  43. package/dist/hosted-skill-staging.d.ts.map +1 -1
  44. package/dist/hosted-skill-staging.js +13 -10
  45. package/dist/index.d.ts +4 -4
  46. package/dist/index.d.ts.map +1 -1
  47. package/dist/index.js +338 -368
  48. package/dist/report-comments-cli.d.ts +1 -0
  49. package/dist/report-comments-cli.d.ts.map +1 -1
  50. package/dist/report-comments-cli.js +70 -4
  51. package/dist/runner-dir-verify.d.ts +5 -0
  52. package/dist/runner-dir-verify.d.ts.map +1 -1
  53. package/dist/runner-dir-verify.js +41 -9
  54. package/dist/runner-version-materialization.d.ts +6 -0
  55. package/dist/runner-version-materialization.d.ts.map +1 -0
  56. package/dist/runner-version-materialization.js +64 -0
  57. package/dist/setup-onboarding.d.ts +16 -0
  58. package/dist/setup-onboarding.d.ts.map +1 -0
  59. package/dist/setup-onboarding.js +59 -0
  60. package/dist/skill-installer.d.ts +3 -3
  61. package/dist/skill-installer.d.ts.map +1 -1
  62. package/dist/skill-installer.js +39 -3
  63. package/dist/skilled-proposer-launch.d.ts +5 -1
  64. package/dist/skilled-proposer-launch.d.ts.map +1 -1
  65. package/dist/skilled-proposer-launch.js +27 -5
  66. package/dist/skilled-proposer-wire.d.ts +2 -0
  67. package/dist/skilled-proposer-wire.d.ts.map +1 -0
  68. package/dist/skilled-proposer-wire.js +25 -0
  69. package/dist/workspace.d.ts +14 -0
  70. package/dist/workspace.d.ts.map +1 -1
  71. package/dist/workspace.js +63 -4
  72. package/package.json +1 -1
  73. package/scripts/vendor-orizu-skill.mjs +3 -3
  74. package/src/child-output-tee.ts +587 -0
  75. package/src/cli-auth-browser-page.ts +108 -0
  76. package/src/github-setup.ts +8 -8
  77. package/src/headless-login.ts +178 -0
  78. package/src/help.ts +30 -22
  79. package/src/hosted-boot.ts +3 -3
  80. package/src/hosted-bootstrap.ts +2 -2
  81. package/src/hosted-commands.ts +16 -0
  82. package/src/hosted-environment.ts +2 -0
  83. package/src/hosted-gepa-cli.ts +112 -4
  84. package/src/hosted-loop.ts +2 -1
  85. package/src/hosted-optimization-cli.ts +215 -0
  86. package/src/hosted-optimization-refusals.ts +101 -0
  87. package/src/hosted-optimization.ts +483 -0
  88. package/src/hosted-provider-settings.ts +12 -0
  89. package/src/hosted-session-cli.ts +6 -1
  90. package/src/hosted-skill-staging.ts +17 -14
  91. package/src/index.ts +289 -290
  92. package/src/report-comments-cli.ts +83 -5
  93. package/src/runner-dir-verify.ts +74 -9
  94. package/src/runner-version-materialization.ts +56 -0
  95. package/src/setup-onboarding.ts +64 -0
  96. package/src/skill-installer.ts +39 -3
  97. package/src/skilled-proposer-launch.ts +36 -5
  98. package/src/skilled-proposer-wire.ts +22 -0
  99. package/src/workspace.ts +65 -4
  100. package/vendor/orizu-gepa/src/orizu_gepa_connector/runtime.py +56 -21
  101. package/vendor/orizu-gepa-python/src/orizu_gepa/client.py +76 -13
  102. package/vendor/orizu-gepa-python/src/orizu_gepa/optimizer.py +16 -2
  103. package/vendor/skills/{orizu-cli → orizu}/SKILL.md +7 -3
  104. package/vendor/skills/orizu/agents/openai.yaml +4 -0
  105. package/vendor/skills/{orizu-cli → orizu}/references/assess-and-plan.md +1 -1
  106. package/vendor/skills/{orizu-cli → orizu}/references/building-apps.md +1 -1
  107. package/vendor/skills/{orizu-cli → orizu}/references/cli-reference.md +4 -4
  108. package/vendor/skills/{orizu-cli → orizu}/references/migrate-existing-gepa-setup.md +1 -1
  109. package/vendor/skills/{orizu-cli → orizu}/references/optimization-with-gepa.md +17 -3
  110. package/vendor/skills/orizu-cli/agents/openai.yaml +0 -4
  111. /package/vendor/skills/{orizu-cli → orizu}/references/building-judges.md +0 -0
  112. /package/vendor/skills/{orizu-cli → orizu}/references/dataset-design.md +0 -0
  113. /package/vendor/skills/{orizu-cli → orizu}/references/eval-strategy.md +0 -0
  114. /package/vendor/skills/{orizu-cli → orizu}/references/instructions-after-prompts.md +0 -0
  115. /package/vendor/skills/{orizu-cli → orizu}/references/optimization-reports.md +0 -0
  116. /package/vendor/skills/{orizu-cli → orizu}/references/primer.md +0 -0
  117. /package/vendor/skills/{orizu-cli → orizu}/references/prompt-control-plane.md +0 -0
  118. /package/vendor/skills/{orizu-cli → orizu}/scripts/test-app.mjs +0 -0
@@ -0,0 +1,107 @@
1
+ export function renderCliAuthBrowserPage(status) {
2
+ const isSuccess = status === 'success';
3
+ const eyebrow = isSuccess ? '// cli login complete' : '// cli login';
4
+ const title = isSuccess ? 'Browser authorization complete' : 'Missing authorization code';
5
+ const detail = isSuccess
6
+ ? 'Your terminal will finish connecting the Orizu CLI. You can close this tab.'
7
+ : 'Close this tab and run orizu login again to start a fresh browser request.';
8
+ const accent = isSuccess ? '#E8923C' : '#C8442A';
9
+ return `<!doctype html>
10
+ <html lang="en">
11
+ <head>
12
+ <meta charset="utf-8">
13
+ <meta name="viewport" content="width=device-width, initial-scale=1">
14
+ <title>Orizu CLI Login</title>
15
+ <style>
16
+ @import url('https://fonts.googleapis.com/css2?family=Geist+Mono:wght@400;500;700&display=swap');
17
+ :root {
18
+ color-scheme: light;
19
+ --paper: #F4EFE3;
20
+ --border: #E6DFCE;
21
+ --ink: #353535;
22
+ --muted: #6B6358;
23
+ }
24
+ * { box-sizing: border-box; }
25
+ body {
26
+ margin: 0;
27
+ min-height: 100vh;
28
+ background: #FFFFFF;
29
+ color: #4B4B4B;
30
+ font-family: 'Geist Mono', Menlo, Monaco, Consolas, monospace;
31
+ letter-spacing: -0.025em;
32
+ }
33
+ main {
34
+ min-height: 100vh;
35
+ display: flex;
36
+ align-items: center;
37
+ justify-content: center;
38
+ padding: 48px 24px;
39
+ }
40
+ section {
41
+ width: min(100%, 520px);
42
+ text-align: center;
43
+ }
44
+ .brand {
45
+ display: flex;
46
+ flex-direction: column;
47
+ align-items: center;
48
+ gap: 12px;
49
+ margin-bottom: 28px;
50
+ }
51
+ .brand svg {
52
+ width: 42px;
53
+ height: 42px;
54
+ color: #202124;
55
+ }
56
+ .brand span {
57
+ color: #000000;
58
+ font-size: 16px;
59
+ font-weight: 700;
60
+ }
61
+ .eyebrow {
62
+ margin: 0 0 12px;
63
+ color: ${accent};
64
+ font-size: 12px;
65
+ text-transform: lowercase;
66
+ }
67
+ h1 {
68
+ margin: 0 0 8px;
69
+ color: var(--ink);
70
+ font-size: 24px;
71
+ line-height: 1.15;
72
+ letter-spacing: -0.05em;
73
+ }
74
+ .detail {
75
+ margin: 0;
76
+ color: var(--muted);
77
+ font-size: 13px;
78
+ line-height: 1.6;
79
+ }
80
+ </style>
81
+ </head>
82
+ <body>
83
+ <main>
84
+ <section>
85
+ <div class="brand" aria-hidden="true">
86
+ <svg viewBox="0 0 2048 2048" xmlns="http://www.w3.org/2000/svg">
87
+ <g fill="currentColor">
88
+ <polygon points="1545,879 787,1195 1189,1577"></polygon>
89
+ <polygon points="992,624 444,1104 688,1338"></polygon>
90
+ <polygon points="602,1593 1180,1594 768,1202"></polygon>
91
+ <polygon points="1650,1195 1398,1203 1204,1594 1229,1593"></polygon>
92
+ <polygon points="807,413 751,509 823,744 980,608"></polygon>
93
+ <polygon points="441,1127 592,1572 681,1356"></polygon>
94
+ <polygon points="793,399 611,457 604,471 658,602"></polygon>
95
+ <polygon points="593,493 498,667 636,600"></polygon>
96
+ </g>
97
+ </svg>
98
+ <span>orizu</span>
99
+ </div>
100
+ <p class="eyebrow">${eyebrow}</p>
101
+ <h1>${title}</h1>
102
+ <p class="detail">${detail}</p>
103
+ </section>
104
+ </main>
105
+ </body>
106
+ </html>`;
107
+ }
@@ -46,8 +46,8 @@ function alreadyInstalledHintLines(teamSlug) {
46
46
  ' • Install the App into a DIFFERENT GitHub org for this team (each org',
47
47
  ' installation can be linked to exactly one Orizu team).',
48
48
  ' • If the org is not linked to any Orizu team, uninstall the Orizu App',
49
- ' from the org (GitHub → org Settings → GitHub Apps) and re-run',
50
- ` \`orizu github link --team ${teamSlug}\` to do a fresh install.`,
49
+ ' from the org (GitHub → org Settings → GitHub Apps), then',
50
+ ` contact Orizu support to restart GitHub linking for team ${teamSlug}.`,
51
51
  ];
52
52
  }
53
53
  function defaultSleep(ms) {
@@ -99,7 +99,7 @@ export async function runGithubLink(teamSlug, io) {
99
99
  else {
100
100
  io.print(' Open the URL above and install the App, then return here.');
101
101
  }
102
- io.print(` Waiting for you to finish installing in the browser… (Ctrl+C to abort; resume later with \`orizu github link --team ${teamSlug}\`).`);
102
+ io.print(' Waiting for you to finish installing in the browser… (Ctrl+C to abort).');
103
103
  const now = io.now ?? (() => Date.now());
104
104
  const sleep = io.sleep ?? defaultSleep;
105
105
  const interval = io.pollIntervalMs ?? DEFAULT_POLL_INTERVAL_MS;
@@ -125,7 +125,7 @@ export async function runGithubLink(teamSlug, io) {
125
125
  // the server's reason and exit non-zero instead of polling until timeout.
126
126
  if (data.status === 'unsupported_account' || data.status === 'expired') {
127
127
  throw new Error(data.error ??
128
- `GitHub link could not be completed. Re-run \`orizu github link --team ${teamSlug}\`.`);
128
+ `GitHub link could not be completed for team ${teamSlug}. Contact Orizu support to restart it.`);
129
129
  }
130
130
  // status 'pending' → keep waiting.
131
131
  }
@@ -135,12 +135,12 @@ export async function runGithubLink(teamSlug, io) {
135
135
  throw new Error(`Timed out waiting for the GitHub App install to complete after ${Math.round(timeout / 60000)} minutes. ` +
136
136
  'If the Orizu GitHub App is already installed in that org, GitHub never notifies Orizu when you finish the "Configure" flow — ' +
137
137
  'install the App into a DIFFERENT GitHub org for this team (or uninstall it from the org first if no other Orizu team uses it). ' +
138
- `Resume with \`orizu github link --team ${teamSlug}\` after finishing the install.`);
138
+ `Contact Orizu support to resume GitHub linking for team ${teamSlug} after finishing the install.`);
139
139
  }
140
140
  if (!printedAlreadyInstalledHint && now() - started >= ALREADY_INSTALLED_HINT_MS) {
141
141
  for (const line of alreadyInstalledHintLines(teamSlug))
142
142
  io.print(line);
143
- io.print(` Still waiting (Ctrl+C to abort; resume later with \`orizu github link --team ${teamSlug}\`)…`);
143
+ io.print(' Still waiting (Ctrl+C to abort)…');
144
144
  printedAlreadyInstalledHint = true;
145
145
  lastHeartbeat = now();
146
146
  }
@@ -160,12 +160,12 @@ async function confirmLink(teamSlug, orgLogin, io, fetcher) {
160
160
  io.print(` GitHub reported installation on org: ${orgLogin ?? '(unknown)'}`);
161
161
  if (!io.confirm) {
162
162
  throw new Error(`Org ${orgLogin ?? '(unknown)'} is bound but needs confirmation. ` +
163
- `Run \`orizu github link --team ${teamSlug}\` interactively to confirm.`);
163
+ `Contact Orizu support to confirm GitHub linking for team ${teamSlug}.`);
164
164
  }
165
165
  const approved = await io.confirm(orgLogin);
166
166
  if (!approved) {
167
167
  throw new Error(`Did not confirm org ${orgLogin ?? '(unknown)'}. ` +
168
- `Re-run \`orizu github link --team ${teamSlug}\` to link the correct org.`);
168
+ `Contact Orizu support to link the correct GitHub organization for team ${teamSlug}.`);
169
169
  }
170
170
  const resp = await fetcher('/api/cli/github/link/confirm', {
171
171
  method: 'POST',
@@ -0,0 +1,17 @@
1
+ interface HeadlessLoginDependencies {
2
+ parseJsonResponse: <T>(response: Response, context: string) => Promise<T>;
3
+ printProgress: (message: string) => void;
4
+ sanitizeTerminalText: (text: string) => string;
5
+ validateBrowserUrl: (url: string, expectedOrigin?: string) => URL;
6
+ }
7
+ export declare function shouldUseHeadlessLogin({ isForced, platform, environment, }: {
8
+ isForced: boolean;
9
+ platform?: NodeJS.Platform;
10
+ environment?: Record<string, string | undefined>;
11
+ }): boolean;
12
+ export declare function waitForHeadlessAuthorization({ baseUrl, codeChallenge, }: {
13
+ baseUrl: string;
14
+ codeChallenge: string;
15
+ }, dependencies: HeadlessLoginDependencies): Promise<string>;
16
+ export {};
17
+ //# sourceMappingURL=headless-login.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"headless-login.d.ts","sourceRoot":"","sources":["../src/headless-login.ts"],"names":[],"mappings":"AAYA,UAAU,yBAAyB;IACjC,iBAAiB,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,CAAA;IACzE,aAAa,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IACxC,oBAAoB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAA;IAC9C,kBAAkB,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,MAAM,KAAK,GAAG,CAAA;CAClE;AAED,wBAAgB,sBAAsB,CAAC,EACrC,QAAQ,EACR,QAA2B,EAC3B,WAAyB,GAC1B,EAAE;IACD,QAAQ,EAAE,OAAO,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAA;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAA;CACjD,GAAG,OAAO,CAMV;AAsCD,wBAAsB,4BAA4B,CAChD,EACE,OAAO,EACP,aAAa,GACd,EAAE;IACD,OAAO,EAAE,MAAM,CAAA;IACf,aAAa,EAAE,MAAM,CAAA;CACtB,EACD,YAAY,EAAE,yBAAyB,GACtC,OAAO,CAAC,MAAM,CAAC,CAiGjB"}
@@ -0,0 +1,105 @@
1
+ export function shouldUseHeadlessLogin({ isForced, platform = process.platform, environment = process.env, }) {
2
+ if (isForced || environment.SSH_CONNECTION || environment.SSH_TTY) {
3
+ return true;
4
+ }
5
+ return platform === 'linux' && !environment.DISPLAY && !environment.WAYLAND_DISPLAY;
6
+ }
7
+ const POLL_INTERVAL_MS = 2_000;
8
+ const POLL_REQUEST_TIMEOUT_MS = 15_000;
9
+ const MAX_RETRY_DELAY_MS = 60_000;
10
+ const MAX_CONSECUTIVE_TRANSPORT_ERRORS = 3;
11
+ function retryDelayMs(response) {
12
+ if (response.status !== 429)
13
+ return POLL_INTERVAL_MS;
14
+ const retryAfterHeader = response.headers.get('retry-after');
15
+ const retryAfterSeconds = retryAfterHeader === null ? NaN : Number(retryAfterHeader);
16
+ return Number.isFinite(retryAfterSeconds) && retryAfterSeconds > 0
17
+ ? Math.min(retryAfterSeconds * 1000, MAX_RETRY_DELAY_MS)
18
+ : POLL_INTERVAL_MS;
19
+ }
20
+ async function sleepWithinDeadline(delayMs, expiresAt) {
21
+ const remainingMs = expiresAt - Date.now();
22
+ if (remainingMs <= 0)
23
+ return;
24
+ await new Promise(resolve => setTimeout(resolve, Math.min(delayMs, remainingMs)));
25
+ }
26
+ async function retryAfterTransportError(error, consecutiveErrors, expiresAt) {
27
+ const nextCount = consecutiveErrors + 1;
28
+ if (nextCount >= MAX_CONSECUTIVE_TRANSPORT_ERRORS) {
29
+ const detail = error instanceof Error ? error.message : String(error);
30
+ throw new Error(`Headless login could not reach the server after ${nextCount} attempts: ${detail}`);
31
+ }
32
+ await sleepWithinDeadline(POLL_INTERVAL_MS, expiresAt);
33
+ return nextCount;
34
+ }
35
+ export async function waitForHeadlessAuthorization({ baseUrl, codeChallenge, }, dependencies) {
36
+ const startResponse = await fetch(`${baseUrl}/api/cli/auth/start`, {
37
+ method: 'POST',
38
+ headers: { 'Content-Type': 'application/json' },
39
+ body: JSON.stringify({ codeChallenge, flow: 'headless' }),
40
+ signal: AbortSignal.timeout(POLL_REQUEST_TIMEOUT_MS),
41
+ });
42
+ if (!startResponse.ok) {
43
+ throw new Error(`Failed to start login: ${await startResponse.text()}`);
44
+ }
45
+ const started = await dependencies.parseJsonResponse(startResponse, 'CLI headless auth start');
46
+ const authorizeUrl = dependencies.validateBrowserUrl(started.authorizeUrl, baseUrl).href;
47
+ if (!started.requestId || !started.pollToken || !Number.isFinite(started.expiresInSeconds)) {
48
+ throw new Error('Server returned an invalid headless login response.');
49
+ }
50
+ dependencies.printProgress(`Open this URL to log in: ${dependencies.sanitizeTerminalText(authorizeUrl)}`);
51
+ const expiresAt = Date.now() + (started.expiresInSeconds * 1000);
52
+ let consecutiveTransportErrors = 0;
53
+ while (Date.now() < expiresAt) {
54
+ const remainingMs = expiresAt - Date.now();
55
+ let pollResponse;
56
+ try {
57
+ pollResponse = await fetch(`${baseUrl}/api/cli/auth/poll`, {
58
+ method: 'POST',
59
+ headers: { 'Content-Type': 'application/json' },
60
+ body: JSON.stringify({
61
+ requestId: started.requestId,
62
+ pollToken: started.pollToken,
63
+ }),
64
+ signal: AbortSignal.timeout(Math.max(1, Math.min(POLL_REQUEST_TIMEOUT_MS, remainingMs))),
65
+ });
66
+ }
67
+ catch (error) {
68
+ consecutiveTransportErrors = await retryAfterTransportError(error, consecutiveTransportErrors, expiresAt);
69
+ continue;
70
+ }
71
+ if (!pollResponse.ok) {
72
+ if (pollResponse.status === 429) {
73
+ consecutiveTransportErrors = 0;
74
+ await sleepWithinDeadline(retryDelayMs(pollResponse), expiresAt);
75
+ continue;
76
+ }
77
+ if (pollResponse.status >= 500) {
78
+ const detail = await pollResponse.text().catch(() => 'response body unavailable');
79
+ consecutiveTransportErrors = await retryAfterTransportError(new Error(`Server returned ${pollResponse.status}: ${detail}`), consecutiveTransportErrors, expiresAt);
80
+ continue;
81
+ }
82
+ throw new Error(`Failed to poll login: ${await pollResponse.text()}`);
83
+ }
84
+ let polled;
85
+ try {
86
+ polled = await dependencies.parseJsonResponse(pollResponse, 'CLI headless auth poll');
87
+ }
88
+ catch (error) {
89
+ consecutiveTransportErrors = await retryAfterTransportError(error, consecutiveTransportErrors, expiresAt);
90
+ continue;
91
+ }
92
+ consecutiveTransportErrors = 0;
93
+ if (polled.status === 'approved' && polled.code) {
94
+ return polled.code;
95
+ }
96
+ if (polled.status === 'expired') {
97
+ break;
98
+ }
99
+ if (polled.status !== 'pending') {
100
+ throw new Error('Server returned an invalid headless login status.');
101
+ }
102
+ await sleepWithinDeadline(POLL_INTERVAL_MS, expiresAt);
103
+ }
104
+ throw new Error('Headless login expired. Run `orizu login --headless` to try again.');
105
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../src/help.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,EAAE,EAAE,CAAA;IACpB,OAAO,CAAC,EAAE,YAAY,EAAE,CAAA;IACxB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;CACpB;AAoCD,eAAO,MAAM,YAAY,EAAE,aAAa,EA6nCvC,CAAA;AAUD,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,aAAa,GAAG,SAAS,CAMxE;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,aAAa,EAAE,CAWrE;AAOD,wBAAgB,cAAc,IAAI,MAAM,CA0CvC;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,CAoBtD;AAED,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CA4B5D;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,CAgBxD;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;EAoB9C"}
1
+ {"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../src/help.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,EAAE,EAAE,CAAA;IACpB,OAAO,CAAC,EAAE,YAAY,EAAE,CAAA;IACxB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;CACpB;AAoCD,eAAO,MAAM,YAAY,EAAE,aAAa,EAqoCvC,CAAA;AAUD,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,aAAa,GAAG,SAAS,CAMxE;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,aAAa,EAAE,CAWrE;AAOD,wBAAgB,cAAc,IAAI,MAAM,CA0CvC;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,CAoBtD;AAED,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CA4B5D;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,CAgBxD;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;EAoB9C"}
package/dist/help.js CHANGED
@@ -12,7 +12,7 @@ const GROUPS = [
12
12
  { name: 'Projects', summary: 'Manage projects inside teams.' },
13
13
  { name: 'Prompts and judges', summary: 'Work with versioned prompt and judge artifacts.' },
14
14
  { name: 'Instruction sets', summary: 'Inspect the project-scoped instruction-set control plane.' },
15
- { name: 'Report comments', summary: 'Review and mutate anchored report comments across prompt, optimization, and task reports.' },
15
+ { name: 'Report comments', summary: 'Review and mutate anchored report comments across prompt, optimization, task, and dataset README surfaces.' },
16
16
  { name: 'Diff comments', summary: 'Export inline comments with recoverable prompt-diff context.' },
17
17
  { name: 'Scorers and runners', summary: 'Register scorers, push runnable artifacts, execute runners, and submit scores.' },
18
18
  { name: 'Optimizations', summary: 'Start, run, export, and finalize optimization runs.' },
@@ -100,13 +100,14 @@ export const COMMAND_DOCS = [
100
100
  },
101
101
  {
102
102
  path: ['login'],
103
- usage: 'orizu login [--no-prompt-if-logged-in]',
103
+ usage: 'orizu login [--headless] [--no-prompt-if-logged-in]',
104
104
  summary: 'Open the browser login flow and store CLI credentials for the selected server.',
105
105
  group: 'Auth',
106
106
  options: [
107
+ { name: '--headless', help: 'Print an approval URL and poll instead of opening a browser. Selected automatically for SSH and display-less Linux sessions.' },
107
108
  { name: '--no-prompt-if-logged-in', help: 'Return immediately when credentials already exist.' },
108
109
  ],
109
- examples: ['orizu login', 'orizu --local login'],
110
+ examples: ['orizu login', 'orizu login --headless', 'orizu --local login'],
110
111
  },
111
112
  {
112
113
  path: ['logout'],
@@ -134,22 +135,24 @@ export const COMMAND_DOCS = [
134
135
  },
135
136
  {
136
137
  path: ['comments', 'list'],
137
- usage: 'orizu comments list (--prompt <id-or-name> --project <team/project> [--label <label> | --version <id>] | --run <run-id> | --task <task-id>) [--json]',
138
- summary: 'List report comment threads with open/resolved status and replies.',
138
+ usage: 'orizu comments list (--prompt <id-or-name> --project <team/project> [--label <label> | --version <id>] | --run <run-id> | --task <task-id> | --dataset <id-or-name> --project <team/project>) [--json]',
139
+ summary: 'List report or README comment threads with open/resolved status and replies.',
139
140
  group: 'Report comments',
140
141
  options: [
141
142
  { name: '--prompt <id-or-name>', help: 'Prompt report target. Requires --project.' },
142
- { name: '--project <team/project>', help: 'Project slug for prompt targets.' },
143
+ { name: '--project <team/project>', help: 'Project slug for prompt and dataset targets.' },
143
144
  { name: '--label <label>', help: 'Prompt version label to comment on.' },
144
145
  { name: '--version <id>', help: 'Prompt version ID to comment on.' },
145
146
  { name: '--run <run-id>', help: 'Optimization run report target.' },
146
147
  { name: '--task <task-id>', help: 'Task report target.' },
148
+ { name: '--dataset <id-or-name>', help: 'Dataset target; resolves the current README version in --project.' },
147
149
  { name: '--json', help: 'Emit the full comments payload.' },
148
150
  ],
149
151
  examples: [
150
152
  'orizu comments list --prompt Generator --project core/evals --label production',
151
153
  'orizu comments list --run <run-id>',
152
154
  'orizu comments list --task <task-id>',
155
+ 'orizu comments list --dataset Golden --project core/evals',
153
156
  ],
154
157
  },
155
158
  {
@@ -172,19 +175,22 @@ export const COMMAND_DOCS = [
172
175
  },
173
176
  {
174
177
  path: ['comments', 'add'],
175
- usage: 'orizu comments add (--prompt <id-or-name> --project <team/project> [--label <label> | --version <id>] | --run <run-id> | --task <task-id>) --body <text|@file> [--anchor <text>] [--lines <start:end>] [--via <name>] [--json]',
176
- summary: 'Add an anchored top-level comment to a report.',
178
+ usage: 'orizu comments add (--prompt <id-or-name> --project <team/project> [--label <label> | --version <id>] | --run <run-id> | --task <task-id> | --dataset <id-or-name> --project <team/project>) --body <text|@file> [--anchor <text>] [--lines <start:end>] [--via <name>] [--json]',
179
+ summary: 'Add an anchored top-level comment to a report or current dataset README.',
177
180
  group: 'Report comments',
178
181
  options: [
179
182
  { name: '--body <text|@file>', help: 'Comment body or @file reference.', required: true },
180
- { name: '--anchor <text>', help: 'Quoted report text for the comment anchor.' },
183
+ { name: '--anchor <text>', help: 'Quoted report or README text for the comment anchor.' },
181
184
  { name: '--lines <start:end>', help: 'One-based inclusive line range for the anchor.' },
182
185
  { name: '--via <name>', help: 'Tool or agent name to show in attribution.' },
186
+ { name: '--dataset <id-or-name>', help: 'Dataset target; resolves the current README version in --project.' },
187
+ { name: '--project <team/project>', help: 'Project slug for prompt and dataset targets.' },
183
188
  { name: '--json', help: 'Emit the created comment payload.' },
184
189
  ],
185
190
  examples: [
186
191
  'orizu comments add --run <run-id> --body @comment.md --anchor "Score summary" --lines 4:6',
187
192
  'orizu comments add --task <task-id> --body "Clarify this finding" --via Codex',
193
+ 'orizu comments add --dataset Golden --project core/evals --body "Clarify this README" --anchor "Scoring column" --lines 4:4',
188
194
  ],
189
195
  },
190
196
  {
@@ -213,11 +219,14 @@ export const COMMAND_DOCS = [
213
219
  },
214
220
  {
215
221
  path: ['setup'],
216
- usage: 'orizu setup [--team <slug>] [--agent <claude|codex>]... [--workspace [path]|--no-workspace] [--validate] [--fix] [--no-symlinks] [--verbose] [--no-install] [--handoff|--no-handoff] [--launch <claude|codex>] [--skip-login] [--yes] [--dry-run] [--no-input|--non-interactive] [--json]',
222
+ usage: 'orizu setup [--team <slug>|--create-team <name>] [--project <slug>|--create-project <name>] [--agent <agent>]... [--workspace [path]|--no-workspace] [--validate] [--fix] [--no-symlinks] [--verbose] [--no-install] [--handoff|--no-handoff] [--launch <claude|codex|pi>] [--skip-login] [--dry-run] [--no-input|--non-interactive] [--json]',
217
223
  summary: 'Guided onboarding: sign in, initialize the workbench contract, and install agent skills.',
218
224
  group: 'Agent setup',
219
225
  options: [
220
- { name: '--team <slug>', help: 'Team/workbench slug. Authenticated setup materializes all projects in this team.' },
226
+ { name: '--team <slug>', help: 'Choose an existing accessible team.' },
227
+ { name: '--create-team <name>', help: 'Create and select a new team; mutually exclusive with --team.' },
228
+ { name: '--project <slug>', help: 'Choose the project to use as coding-agent handoff context. The workspace still materializes all team projects.' },
229
+ { name: '--create-project <name>', help: 'Create and select a project in the chosen team; mutually exclusive with --project.' },
221
230
  { name: '--workspace [path]', help: 'Initialize or validate a workspace path, or the current directory when no path is provided. If provided, the value must be a filesystem path.' },
222
231
  { name: '--service-origin <url>', help: 'Service origin written to setup metadata. Defaults to the active CLI server.' },
223
232
  { name: '--attach-workspace <id>', help: 'Record an existing Orizu workspace id for future attachment.' },
@@ -225,14 +234,13 @@ export const COMMAND_DOCS = [
225
234
  { name: '--fix', help: 'Apply safe idempotent repairs only.' },
226
235
  { name: '--no-symlinks', help: 'Write CLAUDE.md as a pointer file instead of a symlink to AGENTS.md.' },
227
236
  { name: '--verbose', help: 'Show per-file setup actions. Default setup output is summary-oriented.' },
228
- { name: '--agent <agent>', help: 'Install the global Orizu skill for this coding agent after workspace setup. Repeat for multiple agents.', repeatable: true, choices: ['claude', 'codex'] },
237
+ { name: '--agent <agent>', help: 'Non-interactive opt-in to install the shared global Orizu skill plus any applicable native target. Repeat for multiple agents.', repeatable: true, choices: ['claude', 'codex', 'pi', 'devin', 'droid', 'grok', 'windsurf', 'opencode'] },
229
238
  { name: '--no-workspace', help: 'Skip workspace creation during guided setup. `--validate` and `--fix` still inspect or repair the workspace contract.' },
230
239
  { name: '--no-install', help: 'Skip the coding-agent skill install step.' },
231
- { name: '--handoff', help: 'Print the coding-agent setup prompt after setup. By default, setup points to `orizu setup prompt` instead of printing it inline.' },
232
- { name: '--no-handoff', help: 'Compatibility flag; suppresses --handoff/--launch. Setup does not print the handoff prompt by default.' },
233
- { name: '--launch <agent>', help: 'Launch a detected coding agent with the setup prompt (interactive terminals only).', choices: ['claude', 'codex'] },
240
+ { name: '--handoff', help: 'Print the llms.txt and selected-project handoff prompt after setup.' },
241
+ { name: '--no-handoff', help: 'Compatibility flag; suppresses the final launch picker and explicit handoff/launch.' },
242
+ { name: '--launch <agent>', help: 'Launch a detected coding agent with the selected project and llms.txt prompt (interactive terminals only).', choices: ['claude', 'codex', 'pi'] },
234
243
  { name: '--skip-login', help: 'Skip the authentication phase.' },
235
- { name: '--yes', help: 'Replace existing managed skill links without prompting.' },
236
244
  { name: '--dry-run', help: 'Preview every planned change without writing.' },
237
245
  { name: '--no-input', help: 'Never prompt; behave as in a non-interactive terminal.' },
238
246
  { name: '--non-interactive', help: 'Alias for --no-input.' },
@@ -240,8 +248,8 @@ export const COMMAND_DOCS = [
240
248
  ],
241
249
  examples: [
242
250
  'orizu setup',
243
- 'orizu setup --team highlight',
244
- 'orizu setup --team highlight --agent codex --agent claude --non-interactive --yes',
251
+ 'orizu setup --team highlight --project support-agent',
252
+ 'orizu setup --create-team "Acme" --create-project "Support Agent" --agent codex --agent claude --non-interactive',
245
253
  'orizu setup --validate --workspace ./workbench',
246
254
  ],
247
255
  },
@@ -254,7 +262,7 @@ export const COMMAND_DOCS = [
254
262
  },
255
263
  {
256
264
  path: ['install-skill'],
257
- usage: 'orizu install-skill [--agent <claude|codex|opencode>]... [--scope global|project] [--mode auto|link|copy] [--target <target>]... [--yes] [--dry-run]',
265
+ usage: 'orizu install-skill [--agent <claude|codex|pi|devin|droid|grok|windsurf|opencode>]... [--scope global|project] [--mode auto|link|copy] [--target <target>]... [--yes] [--dry-run]',
258
266
  summary: 'Install or repair the Orizu coding-agent skill.',
259
267
  group: 'Agent setup',
260
268
  aliases: [['skills', 'install']],
@@ -263,7 +271,7 @@ export const COMMAND_DOCS = [
263
271
  name: '--agent <agent>',
264
272
  help: 'Coding agent to set up. Repeat for multiple agents.',
265
273
  repeatable: true,
266
- choices: ['claude', 'codex'],
274
+ choices: ['claude', 'codex', 'pi', 'devin', 'droid', 'grok', 'windsurf', 'opencode'],
267
275
  },
268
276
  {
269
277
  name: '--scope <scope>',
@@ -279,7 +287,7 @@ export const COMMAND_DOCS = [
279
287
  name: '--target <target>',
280
288
  help: 'Advanced: explicit install destination ID. Repeat for multiple targets.',
281
289
  repeatable: true,
282
- choices: ['codex-user', 'agent-user', 'agents-project', 'codex-project', 'claude-user', 'claude-project', 'agents-md'],
290
+ choices: ['codex-user', 'agent-user', 'agents-project', 'codex-project', 'claude-user', 'claude-project', 'devin-user', 'droid-user', 'grok-user', 'windsurf-user', 'opencode-user', 'opencode-project', 'agents-md'],
283
291
  },
284
292
  { name: '--yes', help: 'Replace an existing managed skill or AGENTS.md section without prompting.' },
285
293
  { name: '--dry-run', help: 'Show planned writes without changing files.' },
@@ -576,7 +584,7 @@ export const COMMAND_DOCS = [
576
584
  {
577
585
  path: ['optimizations', 'run-gepa'],
578
586
  usage: 'orizu optimizations run-gepa [--hosted [--launch-intent-id <uuid>]] --project <team/project> --optimizer-version-id <id> (--candidate-version-id <id> | --instruction-set <name> --model-config <identity> [--component-selector round-robin|all]) --runner-version-id <id> [--candidate-runner-dir <dir>] --scorer-version-id <id> --scorer-runner-version-id <id> [--scorer-runner-dir <dir>] [--engine official|legacy] [--candidate-proposer skilled-proposer [--candidate-proposer-config <@file|path>] [--proposal-max-calls <n>] [--proposal-max-tokens <n>]] [--scorer-input-contract gepa|flat_row] [--scorer-candidate-field <row-field>] [--allow-degenerate-seed] [--seed <n>] --dataset-version-id <id> --split-set-id <id> [--train-split train] [--val-split validation] [--minibatch-size <n>] [--candidate-selection-strategy pareto|current_best|epsilon_greedy] [--epsilon <n>] [--objective <text>] [--budget auto|light|medium|heavy | --max-metric-calls <n> | --max-full-evals <n> | --max-iterations <n> | --max-candidate-proposals <n>] [--num-threads auto|N] [--reflection-model <provider/model>] [--reflection-temperature <n>] [--reflection-prompt-template <text|@file>] [--reflection-max-tokens N] [--reflection-provider-settings <json|@file>] [--reflection-retry-attempts N] [--reflection-http-timeout-seconds N] [--skip-perfect-parent-reflection|--no-skip-perfect-parent-reflection] [--disable-evaluation-cache] [--auto-promote] [--promotion-label <label>] [--log-row-snapshots] [--metadata <json>] [--python <command>] [--log-dir logs] [--no-local-log] [--json]',
579
- summary: 'Run official GEPA locally and stream events, or use --hosted for a queued Orizu launch. Hosted mode does not require --candidate-runner-dir or --scorer-runner-dir, accepts only a named --budget preset, and supports response-loss recovery with --launch-intent-id. Local runner version ids materialize registered bytes, while optional runner dirs are additionally byte-verified before execution. Pass --engine legacy only for the frozen safety hatch. Skilled-proposer is official-only, its config requires that selection, and the selection cannot be combined with --reflection-prompt-template. --instruction-set requires --model-config and cannot be combined with --candidate-version-id; round-robin updates one component-map entry per round and all updates every component. --max-candidate-proposals is official-engine-only. Validates the scorer contract on the seed before iterating; judge runners built for flat-row score runs need --scorer-input-contract flat_row (ALI-1158).',
587
+ summary: 'Run official GEPA locally and stream events, or use --hosted for a queued Orizu-managed sandbox launch. Hosted eligibility requires a staff-enabled team, capacity below its concurrent-run cap, a launch-project optimizer version whose validated manifest.optimizer_family is gepa, registered candidate/scorer runners, an Anthropic or OpenAI reflection model, and a named --budget preset within the team ceiling. Hosted eligibility catalog refusals use stable code/remediation JSON with optional bounded detail, and capacity refusals include monitor URLs for running runs. A successful launch prints a durable monitor URL; queued means accepted, not completed. Hosted mode does not require --candidate-runner-dir or --scorer-runner-dir; when supplied, those directories must byte-match their registered versions. Retry response loss with the same --launch-intent-id. Local runner version ids materialize registered bytes, while optional runner dirs are additionally byte-verified before execution. Pass --engine legacy only for the frozen safety hatch. Skilled-proposer is official-only, its config requires that selection, and the selection cannot be combined with --reflection-prompt-template. --instruction-set requires --model-config and cannot be combined with --candidate-version-id; round-robin updates one component-map entry per round and all updates every component. --max-candidate-proposals is official-engine-only. Validates the scorer contract on the seed before iterating; judge runners built for flat-row score runs need --scorer-input-contract flat_row (ALI-1158).',
580
588
  group: 'Optimizations',
581
589
  },
582
590
  {
@@ -509,7 +509,7 @@ export async function runHostedBoot(opts) {
509
509
  exec('git', ['-C', workspaceDir, 'config', 'user.name', AGENT_GIT_IDENTITY.name]);
510
510
  exec('git', ['-C', workspaceDir, 'config', 'user.email', AGENT_GIT_IDENTITY.email]);
511
511
  log(`cloned ${session.repoBranch}`);
512
- // 5b — Stage the orizu-cli skill into the cloned repo so the agent discovers the
512
+ // 5b — Stage the orizu skill into the cloned repo so the agent discovers the
513
513
  // Orizu workflows (ALI-1059). SHARED with the operator path via `stageOrizuSkill`
514
514
  // (one resolution chain + the harvest-safe .git/info/exclude append). Non-fatal:
515
515
  // a staging failure is logged, never aborts the boot. The DO `BootExec` is
@@ -522,10 +522,10 @@ export async function runHostedBoot(opts) {
522
522
  return { exitCode: res.status, stdout: res.stdout, stderr: res.stderr ?? '' };
523
523
  },
524
524
  });
525
- log(`orizu-cli skill staged: ${skillStage.ok ? skillStage.method : 'unresolved'}`);
525
+ log(`orizu skill staged: ${skillStage.ok ? skillStage.method : 'unresolved'}`);
526
526
  }
527
527
  catch (error) {
528
- log(`orizu-cli skill staging failed: ${error instanceof Error ? error.message : String(error)}`);
528
+ log(`orizu skill staging failed: ${error instanceof Error ? error.message : String(error)}`);
529
529
  }
530
530
  // ALI-1060: the agent is now genuinely LIVE — bearer minted, connectors
531
531
  // applied, session/run resolved, repo cloned, skill staged. Signal the
@@ -266,7 +266,7 @@ export async function bootstrapHostedSandbox(opts) {
266
266
  outputTail: tail(install.stdout, install.stderr),
267
267
  });
268
268
  }
269
- // 4b — Stage the orizu-cli skill into the workspace so the agent discovers it
269
+ // 4b — Stage the orizu skill into the workspace so the agent discovers it
270
270
  // (ALI-1044). SHARED with the DO path (ALI-1059): the resolution chain + the
271
271
  // .git/info/exclude append live in `stageOrizuSkill`; here we only adapt the
272
272
  // sandbox exec seam and record the outcome. Non-fatal + recorded, exactly like
@@ -280,7 +280,7 @@ export async function bootstrapHostedSandbox(opts) {
280
280
  },
281
281
  });
282
282
  record('skill_staged', stage.ok, stage.ok
283
- ? `orizu-cli skill staged (${stage.method})`
283
+ ? `orizu skill staged (${stage.method})`
284
284
  : `skill staging unresolved: ${stage.stdout.trim() || `exit ${stage.exitCode}`}`);
285
285
  await sink.append('skill_staged', {
286
286
  ok: stage.ok,
@@ -1,3 +1,5 @@
1
+ import type { GepaEngineDispatch } from './gepa-engine-dispatch.js';
2
+ export declare function applyHostedInstructionSetProfileOverride(dispatch: GepaEngineDispatch): GepaEngineDispatch;
1
3
  interface HostedCommandContext {
2
4
  environment: NodeJS.ProcessEnv;
3
5
  getArg: (name: string) => string | null;
@@ -1 +1 @@
1
- {"version":3,"file":"hosted-commands.d.ts","sourceRoot":"","sources":["../src/hosted-commands.ts"],"names":[],"mappings":"AAEA,UAAU,oBAAoB;IAAG,WAAW,EAAE,MAAM,CAAC,UAAU,CAAC;IAAC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAC;IAAC,IAAI,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;IAAC,SAAS,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAAC,kBAAkB,EAAE,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAAC,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;CAAE;AAC/V,wBAAsB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,OAAO,CAAC,CAAwqB"}
1
+ {"version":3,"file":"hosted-commands.d.ts","sourceRoot":"","sources":["../src/hosted-commands.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAEnE,wBAAgB,wCAAwC,CACtD,QAAQ,EAAE,kBAAkB,GAC3B,kBAAkB,CAUpB;AAED,UAAU,oBAAoB;IAAG,WAAW,EAAE,MAAM,CAAC,UAAU,CAAC;IAAC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAC;IAAC,IAAI,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;IAAC,SAAS,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAAC,kBAAkB,EAAE,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAAC,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;CAAE;AAC/V,wBAAsB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,OAAO,CAAC,CAAwqB"}
@@ -1,5 +1,16 @@
1
1
  import { runHostedGepaOptimization } from './hosted-gepa-cli.js';
2
2
  import { hostedCommand } from './hosted-session-cli.js';
3
+ export function applyHostedInstructionSetProfileOverride(dispatch) {
4
+ const profileVersionId = process.env.ORIZU_HOSTED_INSTRUCTION_SET_PROFILE_VERSION_ID;
5
+ if (process.env.ORIZU_HOSTED_OPTIMIZATION_RUN_ID && profileVersionId) {
6
+ dispatch.environment.ORIZU_INSTRUCTION_SET_PROFILE_VERSION_ID = profileVersionId;
7
+ }
8
+ const proposerConfig = process.env.ORIZU_HOSTED_SKILLED_PROPOSER_CONFIG;
9
+ if (process.env.ORIZU_HOSTED_OPTIMIZATION_RUN_ID && proposerConfig) {
10
+ dispatch.environment.ORIZU_SKILLED_PROPOSER_CONFIG = proposerConfig;
11
+ }
12
+ return dispatch;
13
+ }
3
14
  export async function dispatchHostedCommands(args, context) { const [command, subcommand] = args; if (command === 'optimizations' && subcommand === 'run-gepa' && args.includes('--hosted')) {
4
15
  const project = context.getArg('--project') || await context.resolveProjectSlug(null);
5
16
  await runHostedGepaOptimization({ args: args.slice(2), project, environment: context.environment, json: context.json, printJson: context.printJson, printLine: context.printLine });
@@ -0,0 +1,3 @@
1
+ /** Env var naming every secret-bearing environment variable injected into a hosted run. */
2
+ export declare const INJECTED_ENV_VARS_ENV = "ORIZU_INJECTED_ENV_VARS";
3
+ //# sourceMappingURL=hosted-environment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hosted-environment.d.ts","sourceRoot":"","sources":["../src/hosted-environment.ts"],"names":[],"mappings":"AAAA,2FAA2F;AAC3F,eAAO,MAAM,qBAAqB,4BAA4B,CAAA"}
@@ -0,0 +1,2 @@
1
+ /** Env var naming every secret-bearing environment variable injected into a hosted run. */
2
+ export const INJECTED_ENV_VARS_ENV = 'ORIZU_INJECTED_ENV_VARS';
@@ -1,3 +1,4 @@
1
+ import { verifyRunnerDirRegistered } from './runner-dir-verify.js';
1
2
  interface HostedGepaOptions {
2
3
  args: string[];
3
4
  project: string;
@@ -5,6 +6,8 @@ interface HostedGepaOptions {
5
6
  json: boolean;
6
7
  printJson: (value: Record<string, unknown>) => void;
7
8
  printLine: (value: string) => void;
9
+ /** Test seam for cleanup-failure orchestration; production always uses the real verifier. */
10
+ verifyRunnerDir?: typeof verifyRunnerDirRegistered;
8
11
  }
9
12
  export declare function runHostedGepaOptimization(options: HostedGepaOptions): Promise<void>;
10
13
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"hosted-gepa-cli.d.ts","sourceRoot":"","sources":["../src/hosted-gepa-cli.ts"],"names":[],"mappings":"AAQA,UAAU,iBAAiB;IACzB,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,MAAM,CAAC,UAAU,CAAA;IAC9B,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;CACnC;AAmBD,wBAAsB,yBAAyB,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAwEzF"}
1
+ {"version":3,"file":"hosted-gepa-cli.d.ts","sourceRoot":"","sources":["../src/hosted-gepa-cli.ts"],"names":[],"mappings":"AAWA,OAAO,EAGL,yBAAyB,EAC1B,MAAM,wBAAwB,CAAA;AAE/B,UAAU,iBAAiB;IACzB,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,MAAM,CAAC,UAAU,CAAA;IAC9B,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,6FAA6F;IAC7F,eAAe,CAAC,EAAE,OAAO,yBAAyB,CAAA;CACnD;AAmBD,wBAAsB,yBAAyB,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAyKzF"}