@kici-dev/compiler 0.1.24 → 0.1.26
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/auth/headless-detect.js +1 -1
- package/dist/cli-banner.js +1 -1
- package/dist/cli.d.ts +18 -0
- package/dist/cli.js +57 -6
- package/dist/commands/approve.js +2 -2
- package/dist/commands/check-mode.js +1 -1
- package/dist/commands/compile.js +1 -1
- package/dist/commands/diagnostics.js +1 -1
- package/dist/commands/docs.js +1 -1
- package/dist/commands/drain-worker.js +1 -1
- package/dist/commands/endpoints.js +1 -1
- package/dist/commands/fixture.js +2 -2
- package/dist/commands/held-run-client.d.ts +1 -1
- package/dist/commands/held-run-client.js +1 -1
- package/dist/commands/hook.js +1 -1
- package/dist/commands/index.d.ts +1 -1
- package/dist/commands/index.js +3 -3
- package/dist/commands/init.js +1 -1
- package/dist/commands/login.js +1 -1
- package/dist/commands/logout.js +1 -1
- package/dist/commands/orchestrators.js +1 -1
- package/dist/commands/org.js +1 -1
- package/dist/commands/pat.js +1 -1
- package/dist/commands/preview.js +1 -1
- package/dist/commands/reject.js +2 -2
- package/dist/commands/run-hold-watch.d.ts +10 -1
- package/dist/commands/run-hold-watch.js +13 -12
- package/dist/commands/run.d.ts +9 -0
- package/dist/commands/run.js +29 -6
- package/dist/commands/runs/cancel.js +1 -1
- package/dist/commands/runs/list.js +1 -1
- package/dist/commands/runs/logs.js +1 -1
- package/dist/commands/runs/rerun.js +1 -1
- package/dist/commands/runs/show.js +1 -1
- package/dist/commands/secrets-list.js +1 -1
- package/dist/commands/types.js +1 -1
- package/dist/commands/verify-attestation.js +8 -2
- package/dist/commands/watch.js +1 -1
- package/dist/commands/workflows.js +1 -1
- package/dist/errors/capability-gap.js +1 -1
- package/dist/errors/formatter.js +1 -1
- package/dist/errors/index.js +1 -1
- package/dist/execution/executor.d.ts +5 -6
- package/dist/execution/executor.js +6 -7
- package/dist/execution/index.js +1 -1
- package/dist/execution/sdk-alias.d.ts +4 -14
- package/dist/execution/sdk-alias.js +6 -45
- package/dist/execution/ts-loader.js +1 -1
- package/dist/fixtures/compiler.js +1 -1
- package/dist/fixtures/defaults/index.js +1 -1
- package/dist/fixtures/describe-event.d.ts +0 -4
- package/dist/fixtures/describe-event.js +35 -5
- package/dist/fixtures/picker.js +1 -1
- package/dist/format.js +1 -1
- package/dist/generators/secrets-dts.js +1 -1
- package/dist/hooks/detector.js +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/installer.js +1 -1
- package/dist/hooks/templates.js +1 -1
- package/dist/index.js +1 -1
- package/dist/llm-context/llms-architecture.txt +1 -1
- package/dist/llm-context/llms-cli.txt +230 -40
- package/dist/llm-context/llms-features.txt +24 -19
- package/dist/llm-context/llms-full.txt +256 -61
- package/dist/llm-context/llms-getting-started.txt +1 -1
- package/dist/llm-context/llms.txt +2 -2
- package/dist/local-executor/dag-scheduler.js +1 -1
- package/dist/local-executor/index.js +1 -1
- package/dist/local-executor/job-runner.js +1 -1
- package/dist/local-executor/materializer.js +1 -1
- package/dist/local-executor/output-streamer.js +1 -1
- package/dist/local-executor/payload-generator.js +1 -1
- package/dist/local-executor/picker.js +1 -1
- package/dist/local-executor/runs-on-display.js +1 -1
- package/dist/local-executor/secret-loader.js +1 -1
- package/dist/local-executor/to-event-payload.js +1 -1
- package/dist/local-executor/types.js +1 -1
- package/dist/local-executor/workflow-lock.js +0 -0
- package/dist/lockfile/generator.js +1 -1
- package/dist/lockfile/hash-files.js +1 -1
- package/dist/lockfile/hasher.js +1 -1
- package/dist/lockfile/index.js +1 -1
- package/dist/lockfile/purity-analyzer.js +3 -3
- package/dist/postinstall.js +1 -1
- package/dist/provenance-trust-root.js +1 -1
- package/dist/remote/config.js +1 -1
- package/dist/remote/dashboard-client.js +1 -1
- package/dist/remote/encryption.js +1 -1
- package/dist/remote/history.js +1 -1
- package/dist/remote/local-repo-identity.js +1 -1
- package/dist/remote/oauth.js +1 -1
- package/dist/remote/oidc-discovery.js +1 -1
- package/dist/remote/output/json.js +1 -1
- package/dist/remote/output/junit.js +1 -1
- package/dist/remote/output/streaming.js +1 -1
- package/dist/remote/output/summary.js +1 -1
- package/dist/remote/platform-client.d.ts +2 -0
- package/dist/remote/platform-client.js +1 -1
- package/dist/remote/prod-defaults.d.ts +1 -1
- package/dist/remote/prod-defaults.js +2 -2
- package/dist/remote/render.js +1 -1
- package/dist/remote/secret-upload.js +1 -1
- package/dist/remote/uploader.js +4 -4
- package/dist/{chunk-BTugEXQM.js → rolldown-runtime-ClRpJifh.js} +0 -1
- package/dist/templates/agents-md.js +1 -1
- package/dist/templates/index.js +1 -1
- package/dist/templates/package-json.js +2 -2
- package/dist/templates/tsconfig-json.js +1 -1
- package/dist/templates/workflows/hello-world.js +1 -1
- package/dist/templates/workflows/pr-checks.js +1 -1
- package/dist/test-runner/dry-run.js +1 -1
- package/dist/test-runner/event-types.js +1 -1
- package/dist/test-runner/git-detector.js +1 -1
- package/dist/test-runner/index.js +1 -1
- package/dist/test-runner/job-executor.js +1 -1
- package/dist/test-runner/output-formatter.js +1 -1
- package/dist/test-runner/payload-builder.js +1 -1
- package/dist/test-runner/rule-evaluator.js +1 -1
- package/dist/test-runner/secrets-file.js +1 -1
- package/dist/test-runner/step-context.js +1 -1
- package/dist/types.js +1 -1
- package/dist/validation/index.js +1 -1
- package/dist/validation/validator.js +1 -1
- package/package.json +4 -4
- package/sbom.spdx.json +35 -35
- package/dist/commands/held-run-resolve.js +0 -53
package/dist/errors/formatter.js
CHANGED
package/dist/errors/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../
|
|
1
|
+
import "../rolldown-runtime-ClRpJifh.js";
|
|
2
2
|
import { compilerError, formatError, isCompilerError } from "./formatter.js";
|
|
3
3
|
import { CapabilityGapError, formatCapabilityGapError } from "./capability-gap.js";
|
|
4
4
|
export { CapabilityGapError, compilerError, formatCapabilityGapError, formatError, isCompilerError };
|
|
@@ -19,12 +19,11 @@ export interface DiscoveryResult {
|
|
|
19
19
|
* Execute a TypeScript config file and extract workflow definitions.
|
|
20
20
|
*
|
|
21
21
|
* Process:
|
|
22
|
-
* 1.
|
|
23
|
-
* 2.
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* 6. Clean up temp file
|
|
22
|
+
* 1. Resolve the path and verify the file exists and is readable
|
|
23
|
+
* 2. Register the oxc-transform TS loader hook and dynamic-import the module
|
|
24
|
+
* (TypeScript compiled on the fly by the hook — no bundling, no temp files)
|
|
25
|
+
* 3. Extract workflow definitions from the module's default/named exports
|
|
26
|
+
* 4. Return the workflows with source tracking
|
|
28
27
|
*
|
|
29
28
|
* @param configPath - Path to workflow file (relative or absolute)
|
|
30
29
|
* @returns Workflows exported from the config
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../
|
|
1
|
+
import "../rolldown-runtime-ClRpJifh.js";
|
|
2
2
|
import { compilerError } from "../errors/formatter.js";
|
|
3
3
|
import "../errors/index.js";
|
|
4
4
|
import { ensureTsLoaderHook } from "./ts-loader.js";
|
|
@@ -47,12 +47,11 @@ async function loadModule(entryPoint, errorContext) {
|
|
|
47
47
|
* Execute a TypeScript config file and extract workflow definitions.
|
|
48
48
|
*
|
|
49
49
|
* Process:
|
|
50
|
-
* 1.
|
|
51
|
-
* 2.
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
* 6. Clean up temp file
|
|
50
|
+
* 1. Resolve the path and verify the file exists and is readable
|
|
51
|
+
* 2. Register the oxc-transform TS loader hook and dynamic-import the module
|
|
52
|
+
* (TypeScript compiled on the fly by the hook — no bundling, no temp files)
|
|
53
|
+
* 3. Extract workflow definitions from the module's default/named exports
|
|
54
|
+
* 4. Return the workflows with source tracking
|
|
56
55
|
*
|
|
57
56
|
* @param configPath - Path to workflow file (relative or absolute)
|
|
58
57
|
* @returns Workflows exported from the config
|
package/dist/execution/index.js
CHANGED
|
@@ -1,23 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* SDK
|
|
2
|
+
* SDK development-mode path resolution.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* Resolves a local @kici-dev/sdk checkout for IDE tsconfig `paths` mappings when:
|
|
5
5
|
* 1. sdkPath is configured in .kici/package.json
|
|
6
6
|
* 2. Current project is NOT the kici development repo itself
|
|
7
7
|
*
|
|
8
|
-
* This
|
|
8
|
+
* This gives developers editor autocomplete against local SDK source without
|
|
9
|
+
* publishing or manual linking.
|
|
9
10
|
*/
|
|
10
|
-
/**
|
|
11
|
-
* Get rolldown alias configuration for SDK development mode.
|
|
12
|
-
*
|
|
13
|
-
* Returns alias mapping if:
|
|
14
|
-
* - sdkPath is configured in .kici/package.json
|
|
15
|
-
* - Current project is NOT the kici repo itself
|
|
16
|
-
* - SDK build exists at configured path
|
|
17
|
-
*
|
|
18
|
-
* @returns Alias config for rolldown (empty object if aliasing disabled)
|
|
19
|
-
*/
|
|
20
|
-
export declare function getSdkAliasConfig(): Promise<Record<string, string>>;
|
|
21
11
|
/**
|
|
22
12
|
* Get TypeScript path mappings for IDE support.
|
|
23
13
|
*
|
|
@@ -1,41 +1,18 @@
|
|
|
1
|
-
import "../
|
|
1
|
+
import "../rolldown-runtime-ClRpJifh.js";
|
|
2
2
|
import path from "node:path";
|
|
3
|
-
import { existsSync } from "node:fs";
|
|
4
3
|
import { readFile } from "node:fs/promises";
|
|
5
|
-
import { logger } from "@kici-dev/core";
|
|
6
4
|
//#region src/execution/sdk-alias.ts
|
|
7
5
|
/**
|
|
8
|
-
* SDK
|
|
6
|
+
* SDK development-mode path resolution.
|
|
9
7
|
*
|
|
10
|
-
*
|
|
8
|
+
* Resolves a local @kici-dev/sdk checkout for IDE tsconfig `paths` mappings when:
|
|
11
9
|
* 1. sdkPath is configured in .kici/package.json
|
|
12
10
|
* 2. Current project is NOT the kici development repo itself
|
|
13
11
|
*
|
|
14
|
-
* This
|
|
12
|
+
* This gives developers editor autocomplete against local SDK source without
|
|
13
|
+
* publishing or manual linking.
|
|
15
14
|
*/
|
|
16
15
|
/**
|
|
17
|
-
* Get rolldown alias configuration for SDK development mode.
|
|
18
|
-
*
|
|
19
|
-
* Returns alias mapping if:
|
|
20
|
-
* - sdkPath is configured in .kici/package.json
|
|
21
|
-
* - Current project is NOT the kici repo itself
|
|
22
|
-
* - SDK build exists at configured path
|
|
23
|
-
*
|
|
24
|
-
* @returns Alias config for rolldown (empty object if aliasing disabled)
|
|
25
|
-
*/
|
|
26
|
-
async function getSdkAliasConfig() {
|
|
27
|
-
const basePath = await getSdkPathFromPackageJson();
|
|
28
|
-
if (!basePath) return {};
|
|
29
|
-
if (await isInKiciRepo()) {
|
|
30
|
-
if (process.env.KICI_DEBUG === "true") logger.warn("[kici] SDK aliasing disabled: running inside kici development repo");
|
|
31
|
-
return {};
|
|
32
|
-
}
|
|
33
|
-
const sdkPath = resolveAndValidateSdkPath(basePath);
|
|
34
|
-
if (!sdkPath) return {};
|
|
35
|
-
logger.warn(`[kici] Development mode: using local SDK from ${path.dirname(path.dirname(sdkPath))}`);
|
|
36
|
-
return { "@kici-dev/sdk": sdkPath };
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
16
|
* Read sdkPath from .kici/package.json configuration.
|
|
40
17
|
*
|
|
41
18
|
* @returns Absolute path to SDK repo, or null if not configured
|
|
@@ -66,22 +43,6 @@ async function isInKiciRepo() {
|
|
|
66
43
|
}
|
|
67
44
|
}
|
|
68
45
|
/**
|
|
69
|
-
* Resolve and validate the SDK dist path from a base kici repo path.
|
|
70
|
-
*
|
|
71
|
-
* @returns Absolute path to SDK dist/index.js, or null if not found
|
|
72
|
-
*/
|
|
73
|
-
function resolveAndValidateSdkPath(basePath) {
|
|
74
|
-
const sdkPath = path.resolve(basePath, "packages/sdk/dist/index.js");
|
|
75
|
-
if (!existsSync(sdkPath)) {
|
|
76
|
-
logger.warn("[kici] sdkPath configured but SDK not found at path");
|
|
77
|
-
logger.warn(`[kici] Expected: ${sdkPath}`);
|
|
78
|
-
logger.warn("[kici] Hint: run \"pnpm build\" in the kici repo");
|
|
79
|
-
return null;
|
|
80
|
-
}
|
|
81
|
-
if (process.env.KICI_DEBUG === "true") logger.warn(`[kici] SDK alias resolved to: ${sdkPath}`);
|
|
82
|
-
return sdkPath;
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
46
|
* Get TypeScript path mappings for IDE support.
|
|
86
47
|
*
|
|
87
48
|
* Returns path mapping configuration to include in tsconfig.json:
|
|
@@ -97,6 +58,6 @@ async function getTypeScriptPaths() {
|
|
|
97
58
|
return { "@kici-dev/sdk": [path.resolve(basePath, "packages/sdk/src/index.ts")] };
|
|
98
59
|
}
|
|
99
60
|
//#endregion
|
|
100
|
-
export {
|
|
61
|
+
export { getTypeScriptPaths };
|
|
101
62
|
|
|
102
63
|
//# sourceMappingURL=sdk-alias.js.map
|
|
@@ -1,16 +1,46 @@
|
|
|
1
|
-
import "../
|
|
1
|
+
import "../rolldown-runtime-ClRpJifh.js";
|
|
2
2
|
//#region src/fixtures/describe-event.ts
|
|
3
3
|
/**
|
|
4
4
|
* Describe the event type from a fixture's trigger config, for the fixtures
|
|
5
5
|
* table and the interactive picker.
|
|
6
|
+
*
|
|
7
|
+
* A fixture's `event` is an SDK `TriggerConfig`, discriminated by the `_tag`
|
|
8
|
+
* field (e.g. `PushTrigger`, `PrTrigger`). This maps each tag to a short,
|
|
9
|
+
* human-readable event label.
|
|
6
10
|
*/
|
|
11
|
+
const TAG_TO_EVENT = {
|
|
12
|
+
PushTrigger: "push",
|
|
13
|
+
PrTrigger: "pr",
|
|
14
|
+
TagTrigger: "tag",
|
|
15
|
+
CommentTrigger: "comment",
|
|
16
|
+
ReviewTrigger: "review",
|
|
17
|
+
ReviewCommentTrigger: "review_comment",
|
|
18
|
+
ReleaseTrigger: "release",
|
|
19
|
+
DispatchTrigger: "dispatch",
|
|
20
|
+
CreateTrigger: "create",
|
|
21
|
+
DeleteTrigger: "delete",
|
|
22
|
+
StatusTrigger: "status",
|
|
23
|
+
WorkflowRunTrigger: "workflow_run",
|
|
24
|
+
ForkTrigger: "fork",
|
|
25
|
+
StarTrigger: "star",
|
|
26
|
+
WatchTrigger: "watch",
|
|
27
|
+
KiciEventTrigger: "kici_event",
|
|
28
|
+
WorkflowCompleteTrigger: "workflow_complete",
|
|
29
|
+
JobCompleteTrigger: "job_complete",
|
|
30
|
+
GenericWebhookTrigger: "generic_webhook",
|
|
31
|
+
ScheduleTrigger: "schedule",
|
|
32
|
+
LifecycleTrigger: "lifecycle",
|
|
33
|
+
WebhookTrigger: "webhook"
|
|
34
|
+
};
|
|
7
35
|
function describeEvent(event) {
|
|
8
36
|
if (!event || typeof event !== "object") return "unknown";
|
|
9
37
|
const e = event;
|
|
10
|
-
|
|
11
|
-
if (
|
|
12
|
-
|
|
13
|
-
return "custom";
|
|
38
|
+
const tag = e._tag;
|
|
39
|
+
if (typeof tag !== "string") return "custom";
|
|
40
|
+
const label = TAG_TO_EVENT[tag];
|
|
41
|
+
if (!label) return "custom";
|
|
42
|
+
if (tag === "PrTrigger" && Array.isArray(e.events) && e.events.length > 0) return `pr:${String(e.events[0])}`;
|
|
43
|
+
return label;
|
|
14
44
|
}
|
|
15
45
|
//#endregion
|
|
16
46
|
export { describeEvent };
|
package/dist/fixtures/picker.js
CHANGED
package/dist/format.js
CHANGED
package/dist/hooks/detector.js
CHANGED
package/dist/hooks/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../
|
|
1
|
+
import "../rolldown-runtime-ClRpJifh.js";
|
|
2
2
|
import { detectHookTools, findGitDir, findGitRoot } from "./detector.js";
|
|
3
3
|
import { KICI_HOOK_MARKER, getHookTemplate, hasKiciHook } from "./templates.js";
|
|
4
4
|
import { installHook } from "./installer.js";
|
package/dist/hooks/installer.js
CHANGED
package/dist/hooks/templates.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./
|
|
1
|
+
import "./rolldown-runtime-ClRpJifh.js";
|
|
2
2
|
import { compilerError, formatError, isCompilerError } from "./errors/formatter.js";
|
|
3
3
|
import { CapabilityGapError, formatCapabilityGapError } from "./errors/capability-gap.js";
|
|
4
4
|
import "./errors/index.js";
|
|
@@ -1260,7 +1260,7 @@ flowchart LR
|
|
|
1260
1260
|
|
|
1261
1261
|
**Why three tiers?** Trust boundaries. The Platform relay never sees customer code -- it only verifies webhook signatures and forwards payloads. The orchestrator matches triggers against the lock file without cloning repositories. Only the agent, running on customer infrastructure, clones code and executes steps.
|
|
1262
1262
|
|
|
1263
|
-
This model also
|
|
1263
|
+
This model also supports an independent deployment without the hosted Platform: the orchestrator and agent run on customer infrastructure, with the orchestrator receiving webhooks directly from GitHub instead of through the Platform relay.
|
|
1264
1264
|
|
|
1265
1265
|
## Component responsibilities
|
|
1266
1266
|
|