@kici-dev/compiler 0.6.1 → 0.7.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.
Files changed (41) hide show
  1. package/dist/cli.js +1 -1
  2. package/dist/commands/compile.js +5 -1
  3. package/dist/commands/doctor.js +8 -2
  4. package/dist/commands/init.d.ts +9 -0
  5. package/dist/commands/init.js +77 -12
  6. package/dist/commands/preview.js +1 -1
  7. package/dist/commands/report/identity.d.ts +11 -0
  8. package/dist/commands/report/identity.js +7 -2
  9. package/dist/commands/run-routed.js +1 -0
  10. package/dist/commands/types.d.ts +6 -1
  11. package/dist/commands/types.js +2 -1
  12. package/dist/execution/executor.js +7 -1
  13. package/dist/llm-context/llms-architecture.txt +72 -86
  14. package/dist/llm-context/llms-cli-remote.txt +40 -7
  15. package/dist/llm-context/llms-cli.txt +67 -34
  16. package/dist/llm-context/llms-features-execution.txt +52 -6
  17. package/dist/llm-context/llms-features.txt +137 -6
  18. package/dist/llm-context/llms-full.txt +527 -174
  19. package/dist/llm-context/llms-getting-started.txt +3 -3
  20. package/dist/llm-context/llms-patterns.txt +81 -5
  21. package/dist/llm-context/llms-providers.txt +6 -2
  22. package/dist/llm-context/llms-sdk-runtime.txt +22 -18
  23. package/dist/llm-context/llms-sdk.txt +47 -7
  24. package/dist/llm-context/llms.txt +8 -8
  25. package/dist/local-plane/orchestrator-process.d.ts +0 -8
  26. package/dist/local-plane/orchestrator-process.js +3 -14
  27. package/dist/local-plane/plane-manager.js +2 -2
  28. package/dist/lockfile/generator.js +25 -9
  29. package/dist/lockfile/hasher.d.ts +5 -13
  30. package/dist/lockfile/hasher.js +1 -15
  31. package/dist/lockfile/workspace-siblings.d.ts +46 -0
  32. package/dist/lockfile/workspace-siblings.js +197 -0
  33. package/dist/templates/package-json.js +1 -1
  34. package/dist/test-runner/job-executor.js +1 -1
  35. package/dist/test-runner/rule-evaluator.js +1 -1
  36. package/dist/types.d.ts +6 -1
  37. package/package.json +7 -9
  38. package/sbom.spdx.json +123 -123
  39. package/dist/postinstall.d.ts +0 -9
  40. package/dist/postinstall.js +0 -62
  41. package/hack/postinstall.mjs +0 -105
@@ -1,9 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * Post-install script for @kici-dev/compiler
4
- *
5
- * Prompts users to run `kici init` after installing the package.
6
- * Skips in CI environments, non-TTY, dev mode, and if .kici/ already exists.
7
- */
8
- export {};
9
- //# sourceMappingURL=postinstall.d.ts.map
@@ -1,62 +0,0 @@
1
- #!/usr/bin/env node
2
- import "./rolldown-runtime-ClRpJifh.js";
3
- import path from "node:path";
4
- import { readFile } from "node:fs/promises";
5
- import { spawn } from "node:child_process";
6
- import { confirm } from "@inquirer/prompts";
7
- import { isCiEnvironment } from "@kici-dev/core/ci-env";
8
- //#region src/postinstall.ts
9
- /**
10
- * Post-install script for @kici-dev/compiler
11
- *
12
- * Prompts users to run `kici init` after installing the package.
13
- * Skips in CI environments, non-TTY, dev mode, and if .kici/ already exists.
14
- */
15
- /**
16
- * Detect if running in development mode
17
- *
18
- * Development mode is used when developing KiCI itself.
19
- * Checks:
20
- * 1. KICI_DEV environment variable
21
- * 2. Root package.json kici.development flag
22
- *
23
- * @returns true if in development mode
24
- */
25
- async function detectDevelopmentMode() {
26
- if (process.env.KICI_DEV === "true") return true;
27
- try {
28
- const rootDir = process.env.INIT_CWD || process.cwd();
29
- const rootPkgPath = path.join(rootDir, "package.json");
30
- const content = await readFile(rootPkgPath, "utf-8");
31
- return JSON.parse(content).kici?.development === true;
32
- } catch {
33
- return false;
34
- }
35
- }
36
- async function main() {
37
- if (await detectDevelopmentMode()) return;
38
- if (isCiEnvironment() || !process.stdout.isTTY) return;
39
- const fs = await import("node:fs/promises");
40
- try {
41
- await fs.access(".kici");
42
- return;
43
- } catch {}
44
- console.log("\n");
45
- if (await confirm({
46
- message: "Would you like to initialize .kici/ directory now?",
47
- default: true
48
- })) {
49
- console.log("\nRunning kici init...\n");
50
- spawn("npx", ["kici", "init"], {
51
- stdio: "inherit",
52
- shell: true
53
- }).on("error", (err) => {
54
- console.error("Failed to run kici init:", err.message);
55
- });
56
- } else console.log("\nYou can run \"npx kici init\" later to set up workflows.\n");
57
- }
58
- main().catch(() => {});
59
- //#endregion
60
- export {};
61
-
62
- //# sourceMappingURL=postinstall.js.map
@@ -1,105 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * Postinstall wrapper script for @kici-dev/compiler
4
- *
5
- * This wrapper:
6
- * 1. Detects development mode (KICI_DEV env or kici.development in root package.json)
7
- * 2. Skips postinstall in dev mode (prevents "Cannot find dist/postinstall.mjs" errors)
8
- * 3. Delegates to dist/postinstall.mjs in production mode
9
- *
10
- * Purpose: Allow `pnpm install` to succeed even when dist/ hasn't been built yet
11
- */
12
-
13
- import { spawn } from 'node:child_process';
14
- import { readFile } from 'node:fs/promises';
15
- import path from 'node:path';
16
- import { fileURLToPath } from 'node:url';
17
-
18
- const __filename = fileURLToPath(import.meta.url);
19
- const __dirname = path.dirname(__filename);
20
-
21
- /**
22
- * Detect if running in development mode
23
- *
24
- * Development mode is used when developing KiCI itself.
25
- * Checks:
26
- * 1. KICI_DEV environment variable
27
- * 2. Root package.json kici.development flag
28
- *
29
- * @returns {Promise<boolean>} true if in development mode
30
- */
31
- async function detectDevelopmentMode() {
32
- // Method 1: Environment variable
33
- if (process.env.KICI_DEV === 'true') {
34
- if (process.env.KICI_DEBUG === 'true') {
35
- console.log('[postinstall] Skipping: KICI_DEV=true');
36
- }
37
- return true;
38
- }
39
-
40
- // Method 2: Check root package.json for kici.development flag
41
- // During npm/pnpm install, INIT_CWD contains the original working directory (project root)
42
- try {
43
- const rootDir = process.env.INIT_CWD || process.cwd();
44
- const rootPkgPath = path.join(rootDir, 'package.json');
45
- const content = await readFile(rootPkgPath, 'utf-8');
46
- const pkg = JSON.parse(content);
47
-
48
- if (pkg.kici?.development === true) {
49
- if (process.env.KICI_DEBUG === 'true') {
50
- console.log('[postinstall] Skipping: kici.development=true in root package.json');
51
- }
52
- return true;
53
- }
54
- } catch {
55
- // Root package.json doesn't exist or can't be read
56
- }
57
-
58
- return false;
59
- }
60
-
61
- /**
62
- * Run the actual postinstall script
63
- *
64
- * @returns {Promise<void>}
65
- */
66
- function runPostinstall() {
67
- return new Promise((resolve, reject) => {
68
- const postinstallPath = path.join(__dirname, '..', 'dist', 'postinstall.js');
69
-
70
- const child = spawn('node', [postinstallPath], {
71
- stdio: 'inherit',
72
- });
73
-
74
- child.on('close', (code) => {
75
- if (code === 0) {
76
- resolve();
77
- } else {
78
- reject(new Error(`postinstall.mjs exited with code ${code}`));
79
- }
80
- });
81
-
82
- child.on('error', (err) => {
83
- reject(err);
84
- });
85
- });
86
- }
87
-
88
- async function main() {
89
- try {
90
- // Skip in development mode
91
- if (await detectDevelopmentMode()) {
92
- return;
93
- }
94
-
95
- // Run the actual postinstall
96
- await runPostinstall();
97
- } catch (err) {
98
- // Silently fail - postinstall should not break npm install
99
- if (process.env.KICI_DEBUG === 'true') {
100
- console.error('[postinstall] Error:', err.message);
101
- }
102
- }
103
- }
104
-
105
- main();