@noir-ai/cli 1.0.0-beta.1

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.
@@ -0,0 +1,38 @@
1
+ declare const EXIT: {
2
+ readonly OK: 0;
3
+ readonly ERROR: 1;
4
+ readonly USAGE: 2;
5
+ readonly NOT_FOUND: 3;
6
+ readonly DAEMON_DOWN: 4;
7
+ readonly CANCELLED: 5;
8
+ };
9
+ /**
10
+ * Application-level CLI error carrying an S9 exit code. Thrown directly by
11
+ * bin.ts for legacy usage paths; `fail()` is the ergonomic throw helper.
12
+ * `inferExitCode` / `handleError` map it onto `process.exitCode`.
13
+ */
14
+ declare class NoirCliError extends Error {
15
+ readonly exitCode: number;
16
+ constructor(exitCode: number, message: string);
17
+ }
18
+ interface CliOptions {
19
+ readonly json?: boolean;
20
+ readonly quiet?: boolean;
21
+ readonly verbose?: boolean;
22
+ /** Commander's storage for `--no-input` (`false` ⇒ no input). */
23
+ readonly input?: boolean;
24
+ /** Convenience alias matching the `--no-input` intent (`true` ⇒ no input). */
25
+ readonly noInput?: boolean;
26
+ }
27
+ /**
28
+ * Write a diagnostic and throw a `CommanderError` carrying the S9 exit code,
29
+ * so bin.ts's `exitOverride` + `handleError` surface it as `process.exitCode`
30
+ * without any mid-action `process.exit`. Under `--json` the message becomes a
31
+ * structured `{ok:false,error}` envelope on STDOUT; otherwise plain text on
32
+ * STDERR. Always throws (`never`).
33
+ */
34
+ declare function fail(exitCode: number, message: string, opts?: CliOptions): never;
35
+ /** Map any thrown value onto the S9 exit-code contract. */
36
+ declare function inferExitCode(err: unknown): number;
37
+
38
+ export { type CliOptions as C, EXIT as E, NoirCliError as N, fail as f, inferExitCode as i };
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env node
2
+
3
+ // src/sync.ts
4
+ import { claudeAdapter } from "@noir-ai/adapters";
5
+ import { loadProjectInfo } from "@noir-ai/core";
6
+ import { emitSkillsToDir } from "@noir-ai/skills";
7
+ async function sync(root) {
8
+ loadProjectInfo(root);
9
+ if (!claudeAdapter.skillsDir) {
10
+ process.stderr.write("This host has no skill emitter; nothing to sync.\n");
11
+ return;
12
+ }
13
+ const summary = await emitSkillsToDir(claudeAdapter.skillsDir({ root }));
14
+ process.stderr.write(`Synced ${summary.emitted.length} Noir skills to .claude/skills/.
15
+ `);
16
+ }
17
+ export {
18
+ sync
19
+ };
20
+ //# sourceMappingURL=sync-7YLRJYMR.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/sync.ts"],"sourcesContent":["import { claudeAdapter } from '@noir-ai/adapters';\nimport { loadProjectInfo } from '@noir-ai/core';\nimport { emitSkillsToDir } from '@noir-ai/skills';\n\nexport async function sync(root: string): Promise<void> {\n loadProjectInfo(root); // asserts Noir is initialized (throws otherwise)\n if (!claudeAdapter.skillsDir) {\n process.stderr.write('This host has no skill emitter; nothing to sync.\\n');\n return;\n }\n const summary = await emitSkillsToDir(claudeAdapter.skillsDir({ root }));\n process.stderr.write(`Synced ${summary.emitted.length} Noir skills to .claude/skills/.\\n`);\n}\n"],"mappings":";;;AAAA,SAAS,qBAAqB;AAC9B,SAAS,uBAAuB;AAChC,SAAS,uBAAuB;AAEhC,eAAsB,KAAK,MAA6B;AACtD,kBAAgB,IAAI;AACpB,MAAI,CAAC,cAAc,WAAW;AAC5B,YAAQ,OAAO,MAAM,oDAAoD;AACzE;AAAA,EACF;AACA,QAAM,UAAU,MAAM,gBAAgB,cAAc,UAAU,EAAE,KAAK,CAAC,CAAC;AACvE,UAAQ,OAAO,MAAM,UAAU,QAAQ,QAAQ,MAAM;AAAA,CAAoC;AAC3F;","names":[]}
package/package.json ADDED
@@ -0,0 +1,69 @@
1
+ {
2
+ "name": "@noir-ai/cli",
3
+ "version": "1.0.0-beta.1",
4
+ "description": "Noir CLI — the `noir` command tree (commander + @clack/prompts), the shell entry point to the Noir AI toolkit.",
5
+ "license": "MIT",
6
+ "author": "agaaaptr",
7
+ "homepage": "https://github.com/agaaaptr/noir#readme",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "https://github.com/agaaaptr/noir.git",
11
+ "directory": "packages/cli"
12
+ },
13
+ "bugs": {
14
+ "url": "https://github.com/agaaaptr/noir/issues"
15
+ },
16
+ "keywords": [
17
+ "noir",
18
+ "cli",
19
+ "agent",
20
+ "sdd",
21
+ "spec-driven",
22
+ "mcp",
23
+ "claude"
24
+ ],
25
+ "engines": {
26
+ "node": ">=20"
27
+ },
28
+ "publishConfig": {
29
+ "access": "public",
30
+ "provenance": true
31
+ },
32
+ "type": "module",
33
+ "bin": {
34
+ "noir": "dist/bin.js"
35
+ },
36
+ "main": "./dist/index.js",
37
+ "types": "./dist/index.d.ts",
38
+ "exports": {
39
+ ".": {
40
+ "types": "./dist/index.d.ts",
41
+ "import": "./dist/index.js"
42
+ }
43
+ },
44
+ "files": [
45
+ "dist",
46
+ "README.md"
47
+ ],
48
+ "dependencies": {
49
+ "@clack/prompts": "^0.7.0",
50
+ "@modelcontextprotocol/client": "^2.0.0-beta.5",
51
+ "cli-table3": "^0.6.5",
52
+ "commander": "^12.1.0",
53
+ "ora": "^8.1.0",
54
+ "picocolors": "^1.1.1",
55
+ "@noir-ai/adapters": "1.0.0-beta.1",
56
+ "@noir-ai/store": "1.0.0-beta.1",
57
+ "@noir-ai/core": "1.0.0-beta.1",
58
+ "@noir-ai/model": "1.0.0-beta.1",
59
+ "@noir-ai/skills": "1.0.0-beta.1",
60
+ "@noir-ai/daemon": "1.0.0-beta.1"
61
+ },
62
+ "devDependencies": {
63
+ "@types/node": "^26.1.1"
64
+ },
65
+ "scripts": {
66
+ "build": "tsup",
67
+ "typecheck": "tsc --noEmit"
68
+ }
69
+ }