@kici-dev/compiler 0.1.15 → 0.1.17
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 +9 -1
- package/dist/cli.js +251 -183
- package/dist/commands/approve.d.ts +23 -0
- package/dist/commands/approve.js +46 -0
- package/dist/commands/compile.js +6 -4
- package/dist/commands/diagnostics.d.ts +7 -0
- package/dist/commands/diagnostics.js +58 -0
- package/dist/commands/docs.js +3 -3
- package/dist/commands/drain-worker.js +1 -1
- package/dist/commands/endpoints.js +2 -2
- package/dist/commands/fixture.js +1 -1
- package/dist/commands/held-run-client.d.ts +26 -0
- package/dist/commands/held-run-client.js +98 -0
- package/dist/commands/held-run-resolve.d.ts +45 -0
- package/dist/commands/held-run-resolve.js +53 -0
- package/dist/commands/hook.js +2 -2
- package/dist/commands/index.d.ts +20 -4
- package/dist/commands/index.js +12 -4
- package/dist/commands/init.js +3 -3
- package/dist/commands/login.d.ts +0 -2
- package/dist/commands/login.js +1 -3
- package/dist/commands/logout.js +1 -1
- package/dist/commands/orchestrators.d.ts +25 -0
- package/dist/commands/orchestrators.js +115 -0
- package/dist/commands/org.js +1 -1
- package/dist/commands/reject.d.ts +25 -0
- package/dist/commands/reject.js +49 -0
- package/dist/commands/run.d.ts +2 -9
- package/dist/commands/run.js +257 -316
- package/dist/commands/runs/cancel.d.ts +6 -0
- package/dist/commands/runs/cancel.js +32 -0
- package/dist/commands/runs/list.d.ts +6 -0
- package/dist/commands/runs/list.js +49 -0
- package/dist/commands/runs/logs.d.ts +7 -0
- package/dist/commands/runs/logs.js +67 -0
- package/dist/commands/runs/rerun.d.ts +5 -0
- package/dist/commands/runs/rerun.js +21 -0
- package/dist/commands/runs/show.d.ts +5 -0
- package/dist/commands/runs/show.js +65 -0
- package/dist/commands/secrets-list.d.ts +7 -9
- package/dist/commands/secrets-list.js +40 -64
- package/dist/commands/test.d.ts +4 -0
- package/dist/commands/test.js +2 -2
- package/dist/commands/types.d.ts +3 -5
- package/dist/commands/types.js +14 -38
- package/dist/commands/verify-attestation.d.ts +12 -0
- package/dist/commands/verify-attestation.js +69 -0
- package/dist/commands/watch.js +2 -2
- package/dist/commands/workflows.js +14 -34
- 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.js +3 -3
- package/dist/execution/index.js +1 -1
- package/dist/execution/sdk-alias.js +2 -2
- package/dist/execution/ts-loader.js +1 -1
- package/dist/fixtures/compiler.js +3 -3
- package/dist/fixtures/defaults/index.js +3 -3
- package/dist/format.js +1 -1
- package/dist/generators/secrets-dts.js +2 -2
- package/dist/hooks/detector.js +2 -2
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/installer.js +2 -2
- package/dist/hooks/templates.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/llm-context/llms-full.txt +1180 -131
- package/dist/llm-context/llms.txt +6 -2
- package/dist/local-executor/dag-scheduler.js +1 -1
- package/dist/local-executor/index.js +2 -2
- package/dist/local-executor/job-runner.js +38 -17
- package/dist/local-executor/materializer.js +2 -2
- 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/secret-loader.js +2 -2
- 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.d.ts +7 -5
- package/dist/lockfile/generator.js +38 -23
- package/dist/lockfile/hash-files.js +2 -2
- package/dist/lockfile/hasher.js +1 -1
- package/dist/lockfile/index.js +1 -1
- package/dist/lockfile/purity-analyzer.js +1 -1
- package/dist/postinstall.js +2 -2
- package/dist/provenance-trust-root.d.ts +14 -0
- package/dist/provenance-trust-root.js +49 -0
- package/dist/remote/config.d.ts +6 -2
- package/dist/remote/config.js +8 -5
- package/dist/remote/dashboard-client.d.ts +92 -0
- package/dist/remote/dashboard-client.js +168 -0
- package/dist/remote/encryption.js +3 -4
- package/dist/remote/history.js +2 -2
- 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 +142 -0
- package/dist/remote/platform-client.js +187 -0
- package/dist/remote/prod-defaults.js +1 -1
- package/dist/remote/render.d.ts +11 -0
- package/dist/remote/render.js +48 -0
- package/dist/remote/secret-upload.js +1 -1
- package/dist/remote/uploader.d.ts +9 -0
- package/dist/remote/uploader.js +52 -5
- package/dist/templates/agents-md.d.ts +1 -1
- package/dist/templates/agents-md.js +8 -3
- package/dist/templates/index.js +2 -2
- package/dist/templates/package-json.js +4 -5
- package/dist/templates/tsconfig-json.js +1 -1
- package/dist/templates/workflows/hello-world.js +2 -2
- package/dist/templates/workflows/hello-world.ts +1 -1
- package/dist/templates/workflows/pr-checks.js +3 -3
- package/dist/templates/workflows/pr-checks.ts +2 -2
- 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 +2 -2
- package/dist/test-runner/index.js +1 -1
- package/dist/test-runner/job-executor.js +3 -3
- 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 +2 -2
- package/dist/test-runner/step-context.js +11 -7
- package/dist/types.d.ts +24 -6
- package/dist/types.js +2 -1
- package/dist/validation/index.js +1 -1
- package/dist/validation/validator.js +1 -1
- package/dist/workflows/hello-world.ts +1 -1
- package/dist/workflows/pr-checks.ts +2 -2
- package/package.json +5 -4
- package/sbom.spdx.json +68 -38
- package/dist/commands/cancel.js +0 -124
- package/dist/commands/status.js +0 -212
- package/dist/remote/client.js +0 -203
- package/dist/remote/observer.js +0 -174
- /package/dist/{chunk-gOLHoazu.js → chunk-BTugEXQM.js} +0 -0
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import "../chunk-
|
|
1
|
+
import "../chunk-BTugEXQM.js";
|
|
2
2
|
import { formatRelativeTime } from "../format.js";
|
|
3
|
-
import {
|
|
4
|
-
import { loadGlobalConfig } from "../remote/config.js";
|
|
3
|
+
import { DashboardClient, DashboardClientError } from "../remote/dashboard-client.js";
|
|
5
4
|
import pc from "picocolors";
|
|
6
5
|
import { toErrorMessage } from "@kici-dev/core";
|
|
7
6
|
//#region src/commands/workflows.ts
|
|
@@ -37,43 +36,20 @@ function parseDuration(duration) {
|
|
|
37
36
|
*/
|
|
38
37
|
async function workflowsListCommand(options = {}) {
|
|
39
38
|
try {
|
|
40
|
-
const
|
|
41
|
-
const token = config.pat ?? config.token;
|
|
42
|
-
if (!token) {
|
|
43
|
-
console.error(pc.red("Not authenticated. Run `kici login` to authenticate."));
|
|
44
|
-
return false;
|
|
45
|
-
}
|
|
46
|
-
const endpoint = config.platformEndpoint ?? config.endpoint;
|
|
47
|
-
if (!endpoint) {
|
|
48
|
-
console.error(pc.red("No endpoint configured. Run `kici login` to configure."));
|
|
49
|
-
return false;
|
|
50
|
-
}
|
|
51
|
-
const orgId = config.activeOrgId;
|
|
52
|
-
if (!orgId) {
|
|
53
|
-
console.error(pc.red("No organization selected. Run `kici org use <name>` to select one."));
|
|
54
|
-
return false;
|
|
55
|
-
}
|
|
56
|
-
const client = new OrchestratorClient({
|
|
57
|
-
endpoint,
|
|
58
|
-
token
|
|
59
|
-
});
|
|
39
|
+
const client = await DashboardClient.load();
|
|
60
40
|
const filters = {};
|
|
61
41
|
if (options.triggerType) filters.triggerType = options.triggerType;
|
|
62
42
|
if (options.repo) filters.repoIdentifier = options.repo;
|
|
63
43
|
let data;
|
|
64
44
|
try {
|
|
65
|
-
data = await client.
|
|
45
|
+
data = await client.listRegistrations(filters);
|
|
66
46
|
} catch (error) {
|
|
67
|
-
if (error instanceof
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
console.error(pc.red(
|
|
73
|
-
return false;
|
|
74
|
-
}
|
|
75
|
-
if (error instanceof ConnectionError) {
|
|
76
|
-
console.error(pc.red(`Connection failed: ${error.message}`));
|
|
47
|
+
if (error instanceof DashboardClientError) {
|
|
48
|
+
if (error.kind === "orchestrator_offline") {
|
|
49
|
+
console.error(pc.red("No orchestrator connected. Ensure your orchestrator is running and connected."));
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
console.error(pc.red(error.message));
|
|
77
53
|
return false;
|
|
78
54
|
}
|
|
79
55
|
throw error;
|
|
@@ -143,6 +119,10 @@ async function workflowsListCommand(options = {}) {
|
|
|
143
119
|
console.log(pc.gray(`Registry v${data.registryVersion}, last updated ${formatRelativeTime(data.registryUpdatedAt)}`));
|
|
144
120
|
return true;
|
|
145
121
|
} catch (err) {
|
|
122
|
+
if (err instanceof DashboardClientError) {
|
|
123
|
+
console.error(pc.red(err.message));
|
|
124
|
+
return false;
|
|
125
|
+
}
|
|
146
126
|
const message = toErrorMessage(err);
|
|
147
127
|
console.error(pc.red(`Failed to list workflows: ${message}`));
|
|
148
128
|
return false;
|
package/dist/errors/formatter.js
CHANGED
package/dist/errors/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../chunk-
|
|
1
|
+
import "../chunk-BTugEXQM.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 };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import "../chunk-
|
|
1
|
+
import "../chunk-BTugEXQM.js";
|
|
2
2
|
import { compilerError } from "../errors/formatter.js";
|
|
3
3
|
import "../errors/index.js";
|
|
4
4
|
import { ensureTsLoaderHook } from "./ts-loader.js";
|
|
5
|
+
import { pathToFileURL } from "node:url";
|
|
6
|
+
import path from "node:path";
|
|
5
7
|
import { existsSync } from "node:fs";
|
|
6
8
|
import fs from "node:fs/promises";
|
|
7
|
-
import path from "node:path";
|
|
8
|
-
import { pathToFileURL } from "node:url";
|
|
9
9
|
//#region src/execution/executor.ts
|
|
10
10
|
/**
|
|
11
11
|
* Load a TypeScript workflow/config module by direct dynamic import.
|
package/dist/execution/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "../chunk-
|
|
1
|
+
import "../chunk-BTugEXQM.js";
|
|
2
|
+
import path from "node:path";
|
|
2
3
|
import { existsSync } from "node:fs";
|
|
3
4
|
import { readFile } from "node:fs/promises";
|
|
4
|
-
import path from "node:path";
|
|
5
5
|
import { logger } from "@kici-dev/core";
|
|
6
6
|
//#region src/execution/sdk-alias.ts
|
|
7
7
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "../chunk-
|
|
1
|
+
import "../chunk-BTugEXQM.js";
|
|
2
2
|
import { ensureTsLoaderHook } from "../execution/ts-loader.js";
|
|
3
|
-
import fs from "node:fs/promises";
|
|
4
|
-
import path from "node:path";
|
|
5
3
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
4
|
+
import path from "node:path";
|
|
5
|
+
import fs from "node:fs/promises";
|
|
6
6
|
import picomatch from "picomatch";
|
|
7
7
|
//#region src/fixtures/compiler.ts
|
|
8
8
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "../../chunk-
|
|
2
|
-
import { readFileSync } from "node:fs";
|
|
3
|
-
import { dirname, join } from "node:path";
|
|
1
|
+
import "../../chunk-BTugEXQM.js";
|
|
4
2
|
import { fileURLToPath } from "node:url";
|
|
3
|
+
import { dirname, join } from "node:path";
|
|
4
|
+
import { readFileSync } from "node:fs";
|
|
5
5
|
//#region src/fixtures/defaults/index.ts
|
|
6
6
|
/**
|
|
7
7
|
* Built-in fixture registry for common GitHub webhook events.
|
package/dist/format.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../chunk-
|
|
1
|
+
import "../chunk-BTugEXQM.js";
|
|
2
2
|
//#region src/generators/secrets-dts.ts
|
|
3
3
|
/**
|
|
4
4
|
* Check if a string is a valid TypeScript identifier (unquoted property name).
|
|
@@ -37,7 +37,7 @@ function generateSecretsDts(options) {
|
|
|
37
37
|
const { environments, endpoint, generatedAt } = options;
|
|
38
38
|
const lines = [];
|
|
39
39
|
lines.push("// @generated by kici types -- DO NOT EDIT");
|
|
40
|
-
lines.push(`//
|
|
40
|
+
lines.push(`// Source: ${endpoint}`);
|
|
41
41
|
lines.push(`// Generated: ${generatedAt.toISOString()}`);
|
|
42
42
|
lines.push("// Run `kici types` to refresh");
|
|
43
43
|
lines.push("");
|
package/dist/hooks/detector.js
CHANGED
package/dist/hooks/index.js
CHANGED
package/dist/hooks/installer.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "../chunk-
|
|
1
|
+
import "../chunk-BTugEXQM.js";
|
|
2
2
|
import { findGitDir } from "./detector.js";
|
|
3
3
|
import { getHookTemplate, hasKiciHook } from "./templates.js";
|
|
4
|
-
import { chmod, mkdir, readFile, stat, writeFile } from "node:fs/promises";
|
|
5
4
|
import path from "node:path";
|
|
5
|
+
import { chmod, mkdir, readFile, stat, writeFile } from "node:fs/promises";
|
|
6
6
|
import { exec } from "node:child_process";
|
|
7
7
|
import { promisify } from "node:util";
|
|
8
8
|
//#region src/hooks/installer.ts
|
package/dist/hooks/templates.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export { validateConfig } from './validation/index.js';
|
|
|
4
4
|
export type { ValidationResult } from './validation/index.js';
|
|
5
5
|
export { generateLockFile, serializeLockFile } from './lockfile/index.js';
|
|
6
6
|
export { SCHEMA_VERSION, isLockStaticJob } from './types.js';
|
|
7
|
-
export type { LockFile, LockWorkflow, LockJob, LockDynamicJobFn, LockJobOrFactory, LockTrigger, LockPrTrigger, LockPushTrigger, LockMatrix, LockRule, LockStep, LockSource, LockBranchPattern, } from './types.js';
|
|
7
|
+
export type { LockFile, LockWorkflow, LockJob, LockDynamicJobFn, LockJobOrFactory, LockTrigger, LockPrTrigger, LockPushTrigger, LockMatrix, LockRule, LockStep, LockApproval, LockSource, LockBranchPattern, } from './types.js';
|
|
8
8
|
export { formatError, compilerError, isCompilerError } from './errors/index.js';
|
|
9
9
|
export type { SourceLocation, CompilerError } from './errors/index.js';
|
|
10
10
|
export { CapabilityGapError, formatCapabilityGapError } from './errors/index.js';
|
package/dist/index.js
CHANGED