orizu 0.5.28 → 0.5.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -0
- package/dist/cli-project-slug.d.ts +17 -0
- package/dist/cli-project-slug.d.ts.map +1 -0
- package/dist/cli-project-slug.js +24 -0
- package/dist/credentials.d.ts +4 -0
- package/dist/credentials.d.ts.map +1 -1
- package/dist/credentials.js +15 -4
- package/dist/feedback-cli.d.ts +14 -0
- package/dist/feedback-cli.d.ts.map +1 -0
- package/dist/feedback-cli.js +601 -0
- package/dist/feedback-contract.d.ts +77 -0
- package/dist/feedback-contract.d.ts.map +1 -0
- package/dist/feedback-contract.js +414 -0
- package/dist/feedback-scrub.d.ts +16 -0
- package/dist/feedback-scrub.d.ts.map +1 -0
- package/dist/feedback-scrub.js +324 -0
- package/dist/headless-login.d.ts +2 -0
- package/dist/headless-login.d.ts.map +1 -1
- package/dist/headless-login.js +14 -11
- package/dist/help.d.ts.map +1 -1
- package/dist/help.js +35 -1
- package/dist/hosted-boot.d.ts +5 -0
- package/dist/hosted-boot.d.ts.map +1 -1
- package/dist/hosted-boot.js +12 -3
- package/dist/http.d.ts +5 -3
- package/dist/http.d.ts.map +1 -1
- package/dist/http.js +41 -24
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +60 -24
- package/dist/instruction-set-sync/index.d.ts +1 -0
- package/dist/instruction-set-sync/index.d.ts.map +1 -1
- package/dist/instruction-set-sync/index.js +15 -6
- package/dist/last-error-caps.d.ts +6 -0
- package/dist/last-error-caps.d.ts.map +1 -0
- package/dist/last-error-caps.js +5 -0
- package/dist/last-error-record.d.ts +34 -0
- package/dist/last-error-record.d.ts.map +1 -0
- package/dist/last-error-record.js +289 -0
- package/dist/runner-env.d.ts +3 -0
- package/dist/runner-env.d.ts.map +1 -0
- package/dist/runner-env.js +29 -0
- package/dist/self-update.d.ts +42 -0
- package/dist/self-update.d.ts.map +1 -0
- package/dist/self-update.js +506 -0
- package/package.json +1 -1
- package/src/cli-project-slug.ts +38 -0
- package/src/credentials.ts +21 -4
- package/src/feedback-cli.ts +763 -0
- package/src/feedback-contract.ts +473 -0
- package/src/feedback-scrub.ts +466 -0
- package/src/headless-login.ts +25 -11
- package/src/help.ts +35 -1
- package/src/hosted-boot.ts +21 -3
- package/src/http.ts +46 -23
- package/src/index.ts +61 -23
- package/src/instruction-set-sync/index.ts +25 -6
- package/src/last-error-caps.js +4 -0
- package/src/last-error-caps.ts +5 -0
- package/src/last-error-record.ts +382 -0
- package/src/runner-env.ts +31 -0
- package/src/secret-redaction.js +4 -0
- package/src/self-update.ts +548 -0
- package/vendor/skills/orizu/SKILL.md +4 -0
- package/vendor/skills/orizu/flows/expand.md +2 -0
- package/vendor/skills/orizu/flows/first-win.md +2 -0
- package/vendor/skills/orizu/flows/onboard.md +2 -0
- package/vendor/skills/orizu/flows/promote.md +2 -0
- package/vendor/skills/orizu/flows/recurse.md +2 -0
- package/vendor/skills/orizu/flows/triage.md +2 -0
- package/vendor/skills/orizu/references/authority-map.md +1 -0
- package/vendor/skills/orizu/references/cli-reference.md +62 -0
- package/vendor/skills/orizu/references/feedback.md +101 -0
package/README.md
CHANGED
|
@@ -156,6 +156,35 @@ This prints the skill location plus source metadata (`name`, `root`, `skillMd`,
|
|
|
156
156
|
to reading `SKILL.md` in two commands and verify the guidance matches the CLI
|
|
157
157
|
that supplied it.
|
|
158
158
|
|
|
159
|
+
### Update the CLI
|
|
160
|
+
|
|
161
|
+
An npm-global install can update itself to npm's `latest` release:
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
orizu update [--dry-run] [--json]
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
The command detects the npm prefix, checks and compares versions, installs only
|
|
168
|
+
when `latest` is newer, and verifies the newly installed binary in a fresh
|
|
169
|
+
process. A successful `orizu update` automatically runs `orizu skills update`
|
|
170
|
+
with the installed CLI, including when Orizu is already the latest. `--dry-run`
|
|
171
|
+
stops after the version comparison without installing or refreshing skills. Source checkouts,
|
|
172
|
+
`npx` caches, and pnpm, Bun, or Yarn global layouts are refused without being
|
|
173
|
+
modified.
|
|
174
|
+
For now, Windows installs and custom npm prefixes without their own `bin/node`
|
|
175
|
+
(for example `npm config set prefix ~/.npm-global`) are refused with
|
|
176
|
+
`update_unsupported_install`; use the manual npm command in that error.
|
|
177
|
+
|
|
178
|
+
On other human-readable commands, an npm-global install may print one stderr
|
|
179
|
+
line when its cached release check finds a newer version. Cache refresh happens
|
|
180
|
+
in a detached process at most once every 24 hours, so commands do not wait for
|
|
181
|
+
the registry. Notices and refreshes are suppressed for `--json`, CI,
|
|
182
|
+
`NO_UPDATE_NOTIFIER`, and `update` itself. Disable them explicitly with:
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
ORIZU_NO_UPDATE_CHECK=1 orizu --help
|
|
186
|
+
```
|
|
187
|
+
|
|
159
188
|
Agents are first-class users of this CLI: **every command supports `--json`**
|
|
160
189
|
(as a prefix, `orizu --json teams list`, or a trailing flag) and emits a single
|
|
161
190
|
machine-readable JSON document instead of formatted text. Discover the full
|
|
@@ -210,6 +239,10 @@ orizu logout
|
|
|
210
239
|
<td>Locate the bundled skill (read-only)</td>
|
|
211
240
|
<td><code>orizu skills path --json</code></td>
|
|
212
241
|
</tr>
|
|
242
|
+
<tr>
|
|
243
|
+
<td>Update an npm-global CLI and its installed skills</td>
|
|
244
|
+
<td><code>orizu update</code></td>
|
|
245
|
+
</tr>
|
|
213
246
|
<tr>
|
|
214
247
|
<td>Inspect CLI capabilities as JSON</td>
|
|
215
248
|
<td><code>orizu capabilities --json</code></td>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface ParsedProjectSlug {
|
|
2
|
+
teamSlug: string;
|
|
3
|
+
projectSlug: string;
|
|
4
|
+
}
|
|
5
|
+
export interface SplitProjectArg {
|
|
6
|
+
/** null when the caller passed a bare project slug. */
|
|
7
|
+
teamSlug: string | null;
|
|
8
|
+
projectSlug: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function normalizeSlugInput(slug: string): string;
|
|
11
|
+
/**
|
|
12
|
+
* Accept a `--project` value in either documented form: `teamSlug/projectSlug`
|
|
13
|
+
* or a bare `projectSlug` (resolved within the caller's team).
|
|
14
|
+
*/
|
|
15
|
+
export declare function splitCliProjectArg(value: string): SplitProjectArg | null;
|
|
16
|
+
export declare function parseCliProjectSlug(projectSlug: string): ParsedProjectSlug | null;
|
|
17
|
+
//# sourceMappingURL=cli-project-slug.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-project-slug.d.ts","sourceRoot":"","sources":["../src/cli-project-slug.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,eAAe;IAC9B,uDAAuD;IACvD,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,eAAe,GAAG,IAAI,CAQxE;AAED,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,iBAAiB,GAAG,IAAI,CAQjF"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export function normalizeSlugInput(slug) {
|
|
2
|
+
return slug.trim().toLowerCase();
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* Accept a `--project` value in either documented form: `teamSlug/projectSlug`
|
|
6
|
+
* or a bare `projectSlug` (resolved within the caller's team).
|
|
7
|
+
*/
|
|
8
|
+
export function splitCliProjectArg(value) {
|
|
9
|
+
if (!value.includes('/')) {
|
|
10
|
+
const projectSlug = normalizeSlugInput(value);
|
|
11
|
+
return projectSlug ? { teamSlug: null, projectSlug } : null;
|
|
12
|
+
}
|
|
13
|
+
const parsed = parseCliProjectSlug(value);
|
|
14
|
+
return parsed ? { teamSlug: parsed.teamSlug, projectSlug: parsed.projectSlug } : null;
|
|
15
|
+
}
|
|
16
|
+
export function parseCliProjectSlug(projectSlug) {
|
|
17
|
+
const segments = projectSlug.split('/');
|
|
18
|
+
if (segments.length !== 2)
|
|
19
|
+
return null;
|
|
20
|
+
const [teamSlug, project] = segments.map(normalizeSlugInput);
|
|
21
|
+
if (!teamSlug || !project)
|
|
22
|
+
return null;
|
|
23
|
+
return { teamSlug, projectSlug: project };
|
|
24
|
+
}
|
package/dist/credentials.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ServerCredentials, StoredCredentialsV2, StoredCredentialsV3 } from './types.js';
|
|
2
|
+
export declare function getConfigDir(): string;
|
|
2
3
|
/**
|
|
3
4
|
* Runs a synchronous credentials transaction under the one process-wide and
|
|
4
5
|
* cross-process lock. Exported so real-process fixtures can hold the production
|
|
@@ -18,6 +19,9 @@ export declare function updateServerCredentials(baseUrl: string, credentials: Se
|
|
|
18
19
|
export declare function credentialsEqual(left: ServerCredentials, right: ServerCredentials): boolean;
|
|
19
20
|
export declare function updateServerCredentialsIfCurrent(baseUrl: string, expected: ServerCredentials, replacement: ServerCredentials): boolean;
|
|
20
21
|
export declare function getActiveBaseUrl(): string | null;
|
|
22
|
+
export declare function rememberProcessSecret(secret: string): string;
|
|
23
|
+
export declare function rememberResolvedBearer(bearer: string): string;
|
|
24
|
+
export declare function getSecretsSeenThisProcess(): readonly string[];
|
|
21
25
|
/**
|
|
22
26
|
* In-sandbox bearer resolution (ALI-1044). Resolves a bearer supplied out-of-band
|
|
23
27
|
* to the hosted agent, WITHOUT consulting credentials.json:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AAiBA,OAAO,EAC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AI,SAAS,MAAM,EAAE,CAE7D;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,qBAAqB,IAAI,MAAM,GAAG,IAAI,CA0BrD;AAED;;;;;;;;GAQG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAclE;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAS1D;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,QAMtD;AAED,wBAAgB,+BAA+B,CAC7C,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,iBAAiB,GAC1B,OAAO,CAWT;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAc/D;AAED,wBAAgB,oBAAoB,SAKnC"}
|
package/dist/credentials.js
CHANGED
|
@@ -6,7 +6,7 @@ import { AsyncLocalStorage } from 'async_hooks';
|
|
|
6
6
|
function isNodeError(error) {
|
|
7
7
|
return error instanceof Error;
|
|
8
8
|
}
|
|
9
|
-
function getConfigDir() {
|
|
9
|
+
export function getConfigDir() {
|
|
10
10
|
if (process.env.ORIZU_CONFIG_DIR) {
|
|
11
11
|
return process.env.ORIZU_CONFIG_DIR;
|
|
12
12
|
}
|
|
@@ -364,6 +364,17 @@ export function getActiveBaseUrl() {
|
|
|
364
364
|
const config = loadCredentialsConfig();
|
|
365
365
|
return config?.activeBaseUrl || null;
|
|
366
366
|
}
|
|
367
|
+
const secretsSeenThisProcess = new Set();
|
|
368
|
+
export function rememberProcessSecret(secret) {
|
|
369
|
+
secretsSeenThisProcess.add(secret);
|
|
370
|
+
return secret;
|
|
371
|
+
}
|
|
372
|
+
export function rememberResolvedBearer(bearer) {
|
|
373
|
+
return rememberProcessSecret(bearer);
|
|
374
|
+
}
|
|
375
|
+
export function getSecretsSeenThisProcess() {
|
|
376
|
+
return [...secretsSeenThisProcess];
|
|
377
|
+
}
|
|
367
378
|
/**
|
|
368
379
|
* In-sandbox bearer resolution (ALI-1044). Resolves a bearer supplied out-of-band
|
|
369
380
|
* to the hosted agent, WITHOUT consulting credentials.json:
|
|
@@ -385,7 +396,7 @@ export function getActiveBaseUrl() {
|
|
|
385
396
|
export function resolveEnvBearerToken() {
|
|
386
397
|
const explicit = process.env.ORIZU_TOKEN;
|
|
387
398
|
if (explicit && explicit.trim()) {
|
|
388
|
-
return explicit.trim();
|
|
399
|
+
return rememberResolvedBearer(explicit.trim());
|
|
389
400
|
}
|
|
390
401
|
const tokenFile = process.env.ORIZU_TOKEN_FILE;
|
|
391
402
|
if (tokenFile && tokenFile.length > 0) {
|
|
@@ -404,7 +415,7 @@ export function resolveEnvBearerToken() {
|
|
|
404
415
|
if (!token) {
|
|
405
416
|
throw new Error(`ORIZU_TOKEN_FILE (${tokenFile}) is empty.`);
|
|
406
417
|
}
|
|
407
|
-
return token;
|
|
418
|
+
return rememberResolvedBearer(token);
|
|
408
419
|
}
|
|
409
420
|
return null;
|
|
410
421
|
}
|
|
@@ -426,7 +437,7 @@ export function resolveAuthTokenForBaseUrl(baseUrl) {
|
|
|
426
437
|
if (!credentials) {
|
|
427
438
|
throw new Error(`Not logged in for ${baseUrl}. Run \`orizu login --server ${baseUrl}\` (or \`--local\`) first.`);
|
|
428
439
|
}
|
|
429
|
-
return 'accessToken' in credentials ? credentials.accessToken : credentials.apiKey;
|
|
440
|
+
return rememberResolvedBearer('accessToken' in credentials ? credentials.accessToken : credentials.apiKey);
|
|
430
441
|
}
|
|
431
442
|
/**
|
|
432
443
|
* Non-throwing "is any auth available?" check (login --no-prompt-if-logged-in,
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface FeedbackCliIo {
|
|
2
|
+
json: boolean;
|
|
3
|
+
print: (message: string) => void;
|
|
4
|
+
printErr: (message: string) => void;
|
|
5
|
+
fetcher?: (path: string, init?: RequestInit) => Promise<Response>;
|
|
6
|
+
configDir?: string;
|
|
7
|
+
cwd?: string;
|
|
8
|
+
now?: () => number;
|
|
9
|
+
homeDir?: string;
|
|
10
|
+
hasAuth?: (baseUrl: string) => boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare function resolveFeedbackTimeoutMs(baseUrl: string): number;
|
|
13
|
+
export declare function feedbackCommand(args: string[], io: FeedbackCliIo): Promise<number>;
|
|
14
|
+
//# sourceMappingURL=feedback-cli.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feedback-cli.d.ts","sourceRoot":"","sources":["../src/feedback-cli.ts"],"names":[],"mappings":"AAyDA,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,OAAO,CAAA;IACb,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IAChC,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAA;IACjE,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAA;CACvC;AAwaD,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAWhE;AAiCD,wBAAsB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,CAmOxF"}
|