@kici-dev/compiler 0.1.13 → 0.1.15

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 (70) hide show
  1. package/README.md +21 -1
  2. package/dist/cli.js +27 -22
  3. package/dist/commands/cancel.js +1 -1
  4. package/dist/commands/compile.js +1 -1
  5. package/dist/commands/docs.js +1 -1
  6. package/dist/commands/drain-worker.js +1 -1
  7. package/dist/commands/endpoints.js +1 -1
  8. package/dist/commands/fixture.js +3 -3
  9. package/dist/commands/hook.js +1 -1
  10. package/dist/commands/index.js +6 -6
  11. package/dist/commands/init.js +9 -7
  12. package/dist/commands/login.js +5 -16
  13. package/dist/commands/run.js +19 -8
  14. package/dist/commands/secrets-list.js +2 -2
  15. package/dist/commands/status.js +4 -4
  16. package/dist/commands/test.d.ts +2 -0
  17. package/dist/commands/test.js +2 -2
  18. package/dist/commands/types.js +1 -1
  19. package/dist/commands/watch.js +1 -1
  20. package/dist/commands/workflows.js +3 -3
  21. package/dist/execution/executor.js +6 -3
  22. package/dist/execution/sdk-alias.js +1 -1
  23. package/dist/execution/ts-loader.d.ts +2 -0
  24. package/dist/execution/ts-loader.js +13 -0
  25. package/dist/fixtures/compiler.d.ts +7 -5
  26. package/dist/fixtures/compiler.js +10 -6
  27. package/dist/llm-context/llms-full.txt +1077 -387
  28. package/dist/llm-context/llms.txt +38 -37
  29. package/dist/local-executor/index.js +6 -5
  30. package/dist/local-executor/job-runner.js +6 -5
  31. package/dist/local-executor/materializer.d.ts +5 -0
  32. package/dist/local-executor/materializer.js +22 -1
  33. package/dist/local-executor/output-streamer.js +1 -1
  34. package/dist/local-executor/picker.js +1 -1
  35. package/dist/local-executor/to-event-payload.d.ts +16 -0
  36. package/dist/local-executor/to-event-payload.js +21 -0
  37. package/dist/local-executor/workflow-lock.d.ts +4 -3
  38. package/dist/local-executor/workflow-lock.js +0 -0
  39. package/dist/lockfile/generator.js +11 -6
  40. package/dist/lockfile/hasher.js +1 -1
  41. package/dist/remote/client.d.ts +4 -0
  42. package/dist/remote/client.js +1 -1
  43. package/dist/remote/encryption.d.ts +1 -1
  44. package/dist/remote/encryption.js +1 -1
  45. package/dist/remote/history.js +2 -2
  46. package/dist/remote/oauth.js +1 -1
  47. package/dist/remote/oidc-discovery.js +1 -1
  48. package/dist/remote/output/streaming.js +1 -1
  49. package/dist/remote/output/summary.js +1 -1
  50. package/dist/remote/prod-defaults.d.ts +18 -0
  51. package/dist/remote/prod-defaults.js +23 -0
  52. package/dist/remote/secret-upload.d.ts +20 -0
  53. package/dist/remote/secret-upload.js +58 -0
  54. package/dist/remote/uploader.js +1 -1
  55. package/dist/templates/index.js +1 -1
  56. package/dist/templates/package-json.js +1 -1
  57. package/dist/templates/workflows/pr-checks.js +3 -2
  58. package/dist/templates/workflows/pr-checks.ts +4 -2
  59. package/dist/test-runner/dry-run.js +1 -1
  60. package/dist/test-runner/index.js +4 -4
  61. package/dist/test-runner/job-executor.js +1 -1
  62. package/dist/test-runner/output-formatter.js +1 -1
  63. package/dist/test-runner/payload-builder.js +2 -2
  64. package/dist/test-runner/rule-evaluator.js +1 -1
  65. package/dist/test-runner/step-context.js +6 -2
  66. package/dist/types.d.ts +17 -1
  67. package/dist/types.js +1 -0
  68. package/dist/workflows/pr-checks.ts +4 -2
  69. package/package.json +13 -9
  70. package/sbom.spdx.json +1328 -8436
@@ -2,9 +2,10 @@
2
2
  * Fixture auto-compilation pipeline.
3
3
  *
4
4
  * Discovers and dynamic-imports Fixture exports from `.kici/tests/*.ts` files.
5
- * TypeScript transformation is handled by the shared oxc-transform ESM loader
6
- * hook registered by the kici CLI bin (`@kici-dev/shared/ts-loader-hook`),
7
- * which is the same hook the agent registers. Fixture files are imported in
5
+ * TypeScript transformation is handled by the `@kici-dev/core/ts-loader-hook`
6
+ * oxc-transform ESM loader hook, registered lazily via `ensureTsLoaderHook()`
7
+ * before the dynamic import (the same hook the agent registers). Fixture files
8
+ * are imported in
8
9
  * place so Node resolves `@kici-dev/sdk` from the customer's
9
10
  * `.kici/node_modules/` — no temp files, no Rolldown bundle step.
10
11
  */
@@ -30,8 +31,9 @@ export declare function discoverFixtureFiles(testsDir: string): Promise<string[]
30
31
  *
31
32
  * Process:
32
33
  * 1. Discover fixture files.
33
- * 2. Dynamic-import each `.ts` file (transformed on the fly by the shared
34
- * oxc-transform ESM loader hook registered by the kici CLI bin).
34
+ * 2. Dynamic-import each `.ts` file (transformed on the fly by the
35
+ * `@kici-dev/core/ts-loader-hook` oxc-transform ESM loader hook, registered
36
+ * lazily via `ensureTsLoaderHook()`).
35
37
  * 3. Extract Fixture exports.
36
38
  * 4. Resolve async factory fixtures.
37
39
  * 5. Validate no duplicate fixture IDs.
@@ -1,4 +1,5 @@
1
1
  import "../chunk-gOLHoazu.js";
2
+ import { ensureTsLoaderHook } from "../execution/ts-loader.js";
2
3
  import fs from "node:fs/promises";
3
4
  import path from "node:path";
4
5
  import { fileURLToPath, pathToFileURL } from "node:url";
@@ -8,9 +9,10 @@ import picomatch from "picomatch";
8
9
  * Fixture auto-compilation pipeline.
9
10
  *
10
11
  * Discovers and dynamic-imports Fixture exports from `.kici/tests/*.ts` files.
11
- * TypeScript transformation is handled by the shared oxc-transform ESM loader
12
- * hook registered by the kici CLI bin (`@kici-dev/shared/ts-loader-hook`),
13
- * which is the same hook the agent registers. Fixture files are imported in
12
+ * TypeScript transformation is handled by the `@kici-dev/core/ts-loader-hook`
13
+ * oxc-transform ESM loader hook, registered lazily via `ensureTsLoaderHook()`
14
+ * before the dynamic import (the same hook the agent registers). Fixture files
15
+ * are imported in
14
16
  * place so Node resolves `@kici-dev/sdk` from the customer's
15
17
  * `.kici/node_modules/` — no temp files, no Rolldown bundle step.
16
18
  */
@@ -46,8 +48,9 @@ async function scanDirectory(dir) {
46
48
  *
47
49
  * Process:
48
50
  * 1. Discover fixture files.
49
- * 2. Dynamic-import each `.ts` file (transformed on the fly by the shared
50
- * oxc-transform ESM loader hook registered by the kici CLI bin).
51
+ * 2. Dynamic-import each `.ts` file (transformed on the fly by the
52
+ * `@kici-dev/core/ts-loader-hook` oxc-transform ESM loader hook, registered
53
+ * lazily via `ensureTsLoaderHook()`).
51
54
  * 3. Extract Fixture exports.
52
55
  * 4. Resolve async factory fixtures.
53
56
  * 5. Validate no duplicate fixture IDs.
@@ -72,6 +75,7 @@ async function loadFixtureFile(filePath) {
72
75
  const createdLinks = await ensureRuntimeSymlinks(filePath);
73
76
  let mod;
74
77
  try {
78
+ ensureTsLoaderHook();
75
79
  mod = await import(pathToFileURL(filePath).href + `?t=${Date.now()}`);
76
80
  } catch (err) {
77
81
  throw new Error(`Failed to load fixture module ${filePath}: ${err.message}`);
@@ -98,7 +102,7 @@ async function loadFixtureFile(filePath) {
98
102
  const RUNTIME_PACKAGES = [
99
103
  "@kici-dev/sdk",
100
104
  "zx",
101
- "@kici-dev/shared"
105
+ "@kici-dev/core"
102
106
  ];
103
107
  async function ensureRuntimeSymlinks(filePath) {
104
108
  const created = [];