@prism-d1/cli 1.8.0 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/kirocrew-app/README.md +231 -0
- package/dist/assets/kirocrew-app/app.json +94 -0
- package/dist/assets/kirocrew-app/assets/icon.png +0 -0
- package/dist/assets/kirocrew-app/scripts/digest.py +263 -0
- package/dist/assets/kirocrew-app/scripts/page_model.py +298 -0
- package/dist/assets/kirocrew-app/scripts/page_routes.py +241 -0
- package/dist/assets/kirocrew-app/scripts/prism_cli_path.py +131 -0
- package/dist/assets/kirocrew-app/scripts/prism_mcp.py +28 -0
- package/dist/assets/kirocrew-app/skills/prism-fix-findings/SKILL.md +62 -0
- package/dist/assets/kirocrew-app/ui/index.mjs +269 -0
- package/dist/src/commands/_top/version.d.ts +9 -0
- package/dist/src/commands/_top/version.d.ts.map +1 -1
- package/dist/src/commands/_top/version.js +22 -1
- package/dist/src/commands/_top/version.js.map +1 -1
- package/dist/src/commands/enable/kirocrew.d.ts +82 -0
- package/dist/src/commands/enable/kirocrew.d.ts.map +1 -0
- package/dist/src/commands/enable/kirocrew.js +376 -0
- package/dist/src/commands/enable/kirocrew.js.map +1 -0
- package/dist/src/dashboard/setup.d.ts +6 -1
- package/dist/src/dashboard/setup.d.ts.map +1 -1
- package/dist/src/dashboard/setup.js +17 -0
- package/dist/src/dashboard/setup.js.map +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/utils/kirocrew.d.ts +35 -0
- package/dist/src/utils/kirocrew.d.ts.map +1 -0
- package/dist/src/utils/kirocrew.js +65 -0
- package/dist/src/utils/kirocrew.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export declare const KIROCREW_APP_NAME = "prism";
|
|
2
|
+
export declare const ENABLE_KIROCREW_CMD = "prism-cli enable kirocrew";
|
|
3
|
+
export declare const KIROCREW_INSTALL_DOCS = "https://github.com/kirodotdev/KiroCrew/blob/main/docs/getting-started.md#installation";
|
|
4
|
+
/**
|
|
5
|
+
* `kirocrew` on PATH, else in ~/.local/bin (where a pip, pipx or uv tool
|
|
6
|
+
* install puts it, and which a GUI-started process often lacks on PATH).
|
|
7
|
+
*/
|
|
8
|
+
export declare function findKirocrew(pathEnv: string | undefined, home: string): string | null;
|
|
9
|
+
/** The bundled app folder, or null when this CLI was not built (a source checkout before npm run build). */
|
|
10
|
+
export declare function bundledAppDir(): string | null;
|
|
11
|
+
/** app.json (any manifest) as an object, or null. */
|
|
12
|
+
export declare function readManifest(dir: string): Record<string, any> | null;
|
|
13
|
+
/**
|
|
14
|
+
* The installed app's version without running kirocrew (`kirocrew app info`
|
|
15
|
+
* takes seconds: it is a Python CLI that loads its whole config).
|
|
16
|
+
*
|
|
17
|
+
* shortcut: reads Kiro Crew's own record, <KIROCREW_HOME or ~/.kiro/crew>/apps/prism/installed.json,
|
|
18
|
+
* which holds the same fields `kirocrew app info` prints; switch to a fast
|
|
19
|
+
* kirocrew query if Kiro Crew adds one or moves that file.
|
|
20
|
+
*/
|
|
21
|
+
export declare function installedAppVersion(home: string, env?: NodeJS.ProcessEnv): string | null;
|
|
22
|
+
export interface KirocrewAppState {
|
|
23
|
+
/** Installed app version; null when the app is not installed. */
|
|
24
|
+
installed: string | null;
|
|
25
|
+
/** Bundled app version; null when this CLI has no bundle. */
|
|
26
|
+
bundled: string | null;
|
|
27
|
+
}
|
|
28
|
+
/** null when kirocrew is not on this machine: then neither `version` nor the Setup tab mentions the app. */
|
|
29
|
+
export declare function kirocrewAppState(o: {
|
|
30
|
+
pathEnv?: string;
|
|
31
|
+
home: string;
|
|
32
|
+
env?: NodeJS.ProcessEnv;
|
|
33
|
+
bundleDir?: string | null;
|
|
34
|
+
}): KirocrewAppState | null;
|
|
35
|
+
//# sourceMappingURL=kirocrew.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kirocrew.d.ts","sourceRoot":"","sources":["../../../src/utils/kirocrew.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,iBAAiB,UAAU,CAAC;AACzC,eAAO,MAAM,mBAAmB,8BAA8B,CAAC;AAC/D,eAAO,MAAM,qBAAqB,0FAA0F,CAAC;AAE7H;;;GAGG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAErF;AAED,4GAA4G;AAC5G,wBAAgB,aAAa,IAAI,MAAM,GAAG,IAAI,CAM7C;AAED,qDAAqD;AACrD,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAOpE;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,GAAG,IAAI,CAQrG;AAED,MAAM,WAAW,gBAAgB;IAC/B,iEAAiE;IACjE,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,6DAA6D;IAC7D,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED,4GAA4G;AAC5G,wBAAgB,gBAAgB,CAAC,CAAC,EAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,GAAG,gBAAgB,GAAG,IAAI,CAKnJ"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The PRISM Kiro Crew app (kirocrew-app/, bundled in dist/assets/kirocrew-app):
|
|
3
|
+
* where kirocrew is, which app version is bundled, and the quick installed
|
|
4
|
+
* version read that `prism-cli version` and the dashboard Setup tab use.
|
|
5
|
+
*/
|
|
6
|
+
import { readFileSync } from 'node:fs';
|
|
7
|
+
import { join } from 'node:path';
|
|
8
|
+
import { findOnPath } from './tool-check.js';
|
|
9
|
+
import { getAssetPath } from './root.js';
|
|
10
|
+
export const KIROCREW_APP_NAME = 'prism';
|
|
11
|
+
export const ENABLE_KIROCREW_CMD = 'prism-cli enable kirocrew';
|
|
12
|
+
export const KIROCREW_INSTALL_DOCS = 'https://github.com/kirodotdev/KiroCrew/blob/main/docs/getting-started.md#installation';
|
|
13
|
+
/**
|
|
14
|
+
* `kirocrew` on PATH, else in ~/.local/bin (where a pip, pipx or uv tool
|
|
15
|
+
* install puts it, and which a GUI-started process often lacks on PATH).
|
|
16
|
+
*/
|
|
17
|
+
export function findKirocrew(pathEnv, home) {
|
|
18
|
+
return findOnPath('kirocrew', pathEnv) ?? findOnPath('kirocrew', join(home, '.local', 'bin'));
|
|
19
|
+
}
|
|
20
|
+
/** The bundled app folder, or null when this CLI was not built (a source checkout before npm run build). */
|
|
21
|
+
export function bundledAppDir() {
|
|
22
|
+
try {
|
|
23
|
+
return getAssetPath(import.meta.url, 'kirocrew-app');
|
|
24
|
+
}
|
|
25
|
+
catch {
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
/** app.json (any manifest) as an object, or null. */
|
|
30
|
+
export function readManifest(dir) {
|
|
31
|
+
try {
|
|
32
|
+
const m = JSON.parse(readFileSync(join(dir, 'app.json'), 'utf8'));
|
|
33
|
+
return m && typeof m === 'object' ? m : null;
|
|
34
|
+
}
|
|
35
|
+
catch {
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* The installed app's version without running kirocrew (`kirocrew app info`
|
|
41
|
+
* takes seconds: it is a Python CLI that loads its whole config).
|
|
42
|
+
*
|
|
43
|
+
* shortcut: reads Kiro Crew's own record, <KIROCREW_HOME or ~/.kiro/crew>/apps/prism/installed.json,
|
|
44
|
+
* which holds the same fields `kirocrew app info` prints; switch to a fast
|
|
45
|
+
* kirocrew query if Kiro Crew adds one or moves that file.
|
|
46
|
+
*/
|
|
47
|
+
export function installedAppVersion(home, env = process.env) {
|
|
48
|
+
const root = env.KIROCREW_HOME || join(home, '.kiro', 'crew');
|
|
49
|
+
try {
|
|
50
|
+
const v = JSON.parse(readFileSync(join(root, 'apps', KIROCREW_APP_NAME, 'installed.json'), 'utf8')).version;
|
|
51
|
+
return typeof v === 'string' ? v : null;
|
|
52
|
+
}
|
|
53
|
+
catch {
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
/** null when kirocrew is not on this machine: then neither `version` nor the Setup tab mentions the app. */
|
|
58
|
+
export function kirocrewAppState(o) {
|
|
59
|
+
if (!findKirocrew(o.pathEnv ?? process.env.PATH, o.home))
|
|
60
|
+
return null;
|
|
61
|
+
const dir = o.bundleDir === undefined ? bundledAppDir() : o.bundleDir;
|
|
62
|
+
const v = dir ? readManifest(dir)?.version : null;
|
|
63
|
+
return { installed: installedAppVersion(o.home, o.env), bundled: typeof v === 'string' ? v : null };
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=kirocrew.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kirocrew.js","sourceRoot":"","sources":["../../../src/utils/kirocrew.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,MAAM,CAAC,MAAM,iBAAiB,GAAG,OAAO,CAAC;AACzC,MAAM,CAAC,MAAM,mBAAmB,GAAG,2BAA2B,CAAC;AAC/D,MAAM,CAAC,MAAM,qBAAqB,GAAG,uFAAuF,CAAC;AAE7H;;;GAGG;AACH,MAAM,UAAU,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AC1C,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AASD,4GAA4G;AAC5G,MAAM,UAAU,gBAAgB,CAAC,CAAyF;IACxH,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,OAAO,IAAI,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IACtE,MAAM,GAAG,GAAG,CAAC,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACtE,MAAM,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,YAAY,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC;IAClD,OAAO,EAAE,SAAS,EAAE,mBAAmB,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;AACtG,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prism-d1/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.0",
|
|
4
4
|
"description": "PRISM D1 Velocity CLI — AI development lifecycle assessment tool",
|
|
5
5
|
"author": "andklee",
|
|
6
6
|
"engines": {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"access": "public"
|
|
23
23
|
},
|
|
24
24
|
"scripts": {
|
|
25
|
-
"build": "npx tsc && rm -rf dist/assets && mkdir -p dist/assets/infra dist/assets/coding-agent && cp -r ../bootstrapper/metric-hooks ../bootstrapper/eval-harness ../bootstrapper/github-workflows ../bootstrapper/gitlab-workflows dist/assets/ && cp -r ../infra/bin ../infra/lib ../infra/package.json ../infra/tsconfig.json ../infra/cdk.json dist/assets/infra/ && cp -r ../coding-agent/agent.py ../coding-agent/config.py ../coding-agent/system_prompt.py ../coding-agent/requirements.txt ../coding-agent/pyproject.toml ../coding-agent/README.md ../coding-agent/tools ../coding-agent/eval ../coding-agent/deploy dist/assets/coding-agent/ && mkdir -p dist/assets/coding-agent/fixtures && cp ../sample-app/.coding-agent/fixtures/*.json dist/assets/coding-agent/fixtures/ && find dist/assets/coding-agent -name __pycache__ -type d -prune -exec rm -rf {} + && cp -r src/commands/security/pentest-cdk dist/assets/pentest-cdk",
|
|
25
|
+
"build": "npx tsc && rm -rf dist/assets && mkdir -p dist/assets/infra dist/assets/coding-agent && cp -r ../bootstrapper/metric-hooks ../bootstrapper/eval-harness ../bootstrapper/github-workflows ../bootstrapper/gitlab-workflows dist/assets/ && cp -r ../infra/bin ../infra/lib ../infra/package.json ../infra/tsconfig.json ../infra/cdk.json dist/assets/infra/ && cp -r ../coding-agent/agent.py ../coding-agent/config.py ../coding-agent/system_prompt.py ../coding-agent/requirements.txt ../coding-agent/pyproject.toml ../coding-agent/README.md ../coding-agent/tools ../coding-agent/eval ../coding-agent/deploy dist/assets/coding-agent/ && mkdir -p dist/assets/coding-agent/fixtures && cp ../sample-app/.coding-agent/fixtures/*.json dist/assets/coding-agent/fixtures/ && find dist/assets/coding-agent -name __pycache__ -type d -prune -exec rm -rf {} + && cp -r src/commands/security/pentest-cdk dist/assets/pentest-cdk && cp -r ../kirocrew-app dist/assets/kirocrew-app && rm -rf dist/assets/kirocrew-app/tests dist/assets/kirocrew-app/data && find dist/assets/kirocrew-app \\( -name __pycache__ -o -name .pytest_cache \\) -type d -prune -exec rm -rf {} +",
|
|
26
26
|
"test": "tsc -p tsconfig.test.json && node --import tsx --test test/*.test.ts",
|
|
27
27
|
"prepublishOnly": "npm run build",
|
|
28
28
|
"start": "tsx bin/prism-cli.ts",
|