@kici-dev/compiler 0.1.16 → 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.js +56 -19
- package/dist/commands/approve.js +1 -1
- package/dist/commands/compile.js +5 -3
- package/dist/commands/diagnostics.d.ts +7 -0
- package/dist/commands/diagnostics.js +58 -0
- 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 +1 -1
- package/dist/commands/held-run-client.js +1 -1
- package/dist/commands/held-run-resolve.js +1 -1
- package/dist/commands/hook.js +1 -1
- package/dist/commands/index.d.ts +16 -4
- package/dist/commands/index.js +10 -4
- package/dist/commands/init.js +2 -2
- 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.js +1 -1
- package/dist/commands/run.d.ts +2 -9
- package/dist/commands/run.js +256 -315
- 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 +1 -1
- package/dist/commands/types.d.ts +3 -5
- package/dist/commands/types.js +13 -37
- package/dist/commands/verify-attestation.d.ts +12 -0
- package/dist/commands/verify-attestation.js +69 -0
- package/dist/commands/watch.js +1 -1
- 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 +1 -1
- package/dist/execution/index.js +1 -1
- package/dist/execution/sdk-alias.js +1 -1
- 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/format.js +1 -1
- package/dist/generators/secrets-dts.js +2 -2
- 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-full.txt +1047 -132
- package/dist/llm-context/llms.txt +4 -1
- package/dist/local-executor/dag-scheduler.js +1 -1
- package/dist/local-executor/index.js +1 -1
- package/dist/local-executor/job-runner.js +37 -16
- 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/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.d.ts +7 -5
- package/dist/lockfile/generator.js +21 -18
- 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 +1 -1
- package/dist/postinstall.js +1 -1
- 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 +7 -4
- 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 +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 +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 +51 -4
- package/dist/templates/agents-md.d.ts +1 -1
- package/dist/templates/agents-md.js +8 -3
- package/dist/templates/index.js +1 -1
- 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 +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 +10 -6
- package/dist/types.d.ts +8 -5
- 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
package/sbom.spdx.json
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
"spdxVersion": "SPDX-2.3",
|
|
3
3
|
"dataLicense": "CC0-1.0",
|
|
4
4
|
"SPDXID": "SPDXRef-DOCUMENT",
|
|
5
|
-
"name": "@kici-dev/compiler@0.1.
|
|
6
|
-
"documentNamespace": "https://kici.dev/sbom/%40kici-dev%2Fcompiler/0.1.
|
|
5
|
+
"name": "@kici-dev/compiler@0.1.17",
|
|
6
|
+
"documentNamespace": "https://kici.dev/sbom/%40kici-dev%2Fcompiler/0.1.17/b2436f89-39b8-484e-a33e-7dc3d8b15c7c",
|
|
7
7
|
"creationInfo": {
|
|
8
|
-
"created": "2026-06-
|
|
8
|
+
"created": "2026-06-14T12:30:30Z",
|
|
9
9
|
"creators": [
|
|
10
10
|
"Tool: kici-sbom-generator"
|
|
11
11
|
]
|
|
@@ -484,7 +484,7 @@
|
|
|
484
484
|
{
|
|
485
485
|
"SPDXID": "SPDXRef-RootPackage",
|
|
486
486
|
"name": "@kici-dev/compiler",
|
|
487
|
-
"versionInfo": "0.1.
|
|
487
|
+
"versionInfo": "0.1.17",
|
|
488
488
|
"downloadLocation": "NOASSERTION",
|
|
489
489
|
"filesAnalyzed": false,
|
|
490
490
|
"licenseConcluded": "NOASSERTION",
|
|
@@ -495,16 +495,16 @@
|
|
|
495
495
|
{
|
|
496
496
|
"referenceCategory": "PACKAGE-MANAGER",
|
|
497
497
|
"referenceType": "purl",
|
|
498
|
-
"referenceLocator": "pkg:npm/%40kici-dev/compiler@0.1.
|
|
498
|
+
"referenceLocator": "pkg:npm/%40kici-dev/compiler@0.1.17"
|
|
499
499
|
}
|
|
500
500
|
],
|
|
501
501
|
"description": "Compiler and CLI for KiCI workflows. Compiles `.kici/workflows/*.ts` to a `kici.lock.json` file consumed by the orchestrator and agents, and runs workflows locally or against a remote orchestrator.",
|
|
502
502
|
"homepage": "https://kici.dev"
|
|
503
503
|
},
|
|
504
504
|
{
|
|
505
|
-
"SPDXID": "SPDXRef-Package--kici-dev-core-0.1.
|
|
505
|
+
"SPDXID": "SPDXRef-Package--kici-dev-core-0.1.17",
|
|
506
506
|
"name": "@kici-dev/core",
|
|
507
|
-
"versionInfo": "0.1.
|
|
507
|
+
"versionInfo": "0.1.17",
|
|
508
508
|
"downloadLocation": "NOASSERTION",
|
|
509
509
|
"filesAnalyzed": false,
|
|
510
510
|
"licenseConcluded": "NOASSERTION",
|
|
@@ -515,16 +515,16 @@
|
|
|
515
515
|
{
|
|
516
516
|
"referenceCategory": "PACKAGE-MANAGER",
|
|
517
517
|
"referenceType": "purl",
|
|
518
|
-
"referenceLocator": "pkg:npm/%40kici-dev/core@0.1.
|
|
518
|
+
"referenceLocator": "pkg:npm/%40kici-dev/core@0.1.17"
|
|
519
519
|
}
|
|
520
520
|
],
|
|
521
521
|
"description": "Light shared utilities for the KiCI stack (logging, errors, formatting, crypto, zx init, the TypeScript ESM loader hook). No server-side dependencies.",
|
|
522
522
|
"homepage": "https://kici.dev"
|
|
523
523
|
},
|
|
524
524
|
{
|
|
525
|
-
"SPDXID": "SPDXRef-Package--kici-dev-engine-0.1.
|
|
525
|
+
"SPDXID": "SPDXRef-Package--kici-dev-engine-0.1.17",
|
|
526
526
|
"name": "@kici-dev/engine",
|
|
527
|
-
"versionInfo": "0.1.
|
|
527
|
+
"versionInfo": "0.1.17",
|
|
528
528
|
"downloadLocation": "NOASSERTION",
|
|
529
529
|
"filesAnalyzed": false,
|
|
530
530
|
"licenseConcluded": "NOASSERTION",
|
|
@@ -535,16 +535,16 @@
|
|
|
535
535
|
{
|
|
536
536
|
"referenceCategory": "PACKAGE-MANAGER",
|
|
537
537
|
"referenceType": "purl",
|
|
538
|
-
"referenceLocator": "pkg:npm/%40kici-dev/engine@0.1.
|
|
538
|
+
"referenceLocator": "pkg:npm/%40kici-dev/engine@0.1.17"
|
|
539
539
|
}
|
|
540
540
|
],
|
|
541
541
|
"description": "Shared business logic for the KiCI CI/CD stack: protocol, triggers, state machine, and provider interfaces used by the Platform relay, orchestrator, and compiler.",
|
|
542
542
|
"homepage": "https://kici.dev"
|
|
543
543
|
},
|
|
544
544
|
{
|
|
545
|
-
"SPDXID": "SPDXRef-Package--kici-dev-sdk-0.1.
|
|
545
|
+
"SPDXID": "SPDXRef-Package--kici-dev-sdk-0.1.17",
|
|
546
546
|
"name": "@kici-dev/sdk",
|
|
547
|
-
"versionInfo": "0.1.
|
|
547
|
+
"versionInfo": "0.1.17",
|
|
548
548
|
"downloadLocation": "NOASSERTION",
|
|
549
549
|
"filesAnalyzed": false,
|
|
550
550
|
"licenseConcluded": "NOASSERTION",
|
|
@@ -555,7 +555,7 @@
|
|
|
555
555
|
{
|
|
556
556
|
"referenceCategory": "PACKAGE-MANAGER",
|
|
557
557
|
"referenceType": "purl",
|
|
558
|
-
"referenceLocator": "pkg:npm/%40kici-dev/sdk@0.1.
|
|
558
|
+
"referenceLocator": "pkg:npm/%40kici-dev/sdk@0.1.17"
|
|
559
559
|
}
|
|
560
560
|
],
|
|
561
561
|
"description": "TypeScript SDK for defining KiCI workflows. Import into `.kici/workflows/*.ts` to declare workflows, jobs, steps, triggers, rules, and matrix configurations.",
|
|
@@ -1814,6 +1814,26 @@
|
|
|
1814
1814
|
],
|
|
1815
1815
|
"description": "Check if the process is running inside Windows Subsystem for Linux (Bash on Windows)"
|
|
1816
1816
|
},
|
|
1817
|
+
{
|
|
1818
|
+
"SPDXID": "SPDXRef-Package-jose-6.2.3",
|
|
1819
|
+
"name": "jose",
|
|
1820
|
+
"versionInfo": "6.2.3",
|
|
1821
|
+
"downloadLocation": "https://registry.npmjs.org/jose/-/jose-6.2.3.tgz",
|
|
1822
|
+
"filesAnalyzed": false,
|
|
1823
|
+
"licenseConcluded": "NOASSERTION",
|
|
1824
|
+
"licenseDeclared": "MIT",
|
|
1825
|
+
"copyrightText": "NOASSERTION",
|
|
1826
|
+
"supplier": "NOASSERTION",
|
|
1827
|
+
"externalRefs": [
|
|
1828
|
+
{
|
|
1829
|
+
"referenceCategory": "PACKAGE-MANAGER",
|
|
1830
|
+
"referenceType": "purl",
|
|
1831
|
+
"referenceLocator": "pkg:npm/jose@6.2.3"
|
|
1832
|
+
}
|
|
1833
|
+
],
|
|
1834
|
+
"description": "JWA, JWS, JWE, JWT, JWK, JWKS for Node.js, Browser, Cloudflare Workers, Deno, Bun, and other Web-interoperable runtimes",
|
|
1835
|
+
"homepage": "https://github.com/panva/jose"
|
|
1836
|
+
},
|
|
1817
1837
|
{
|
|
1818
1838
|
"SPDXID": "SPDXRef-Package-jsep-1.4.0",
|
|
1819
1839
|
"name": "jsep",
|
|
@@ -3182,17 +3202,17 @@
|
|
|
3182
3202
|
},
|
|
3183
3203
|
{
|
|
3184
3204
|
"spdxElementId": "SPDXRef-RootPackage",
|
|
3185
|
-
"relatedSpdxElement": "SPDXRef-Package--kici-dev-core-0.1.
|
|
3205
|
+
"relatedSpdxElement": "SPDXRef-Package--kici-dev-core-0.1.17",
|
|
3186
3206
|
"relationshipType": "DEPENDS_ON"
|
|
3187
3207
|
},
|
|
3188
3208
|
{
|
|
3189
3209
|
"spdxElementId": "SPDXRef-RootPackage",
|
|
3190
|
-
"relatedSpdxElement": "SPDXRef-Package--kici-dev-engine-0.1.
|
|
3210
|
+
"relatedSpdxElement": "SPDXRef-Package--kici-dev-engine-0.1.17",
|
|
3191
3211
|
"relationshipType": "DEPENDS_ON"
|
|
3192
3212
|
},
|
|
3193
3213
|
{
|
|
3194
3214
|
"spdxElementId": "SPDXRef-RootPackage",
|
|
3195
|
-
"relatedSpdxElement": "SPDXRef-Package--kici-dev-sdk-0.1.
|
|
3215
|
+
"relatedSpdxElement": "SPDXRef-Package--kici-dev-sdk-0.1.17",
|
|
3196
3216
|
"relationshipType": "DEPENDS_ON"
|
|
3197
3217
|
},
|
|
3198
3218
|
{
|
|
@@ -3250,83 +3270,93 @@
|
|
|
3250
3270
|
"relatedSpdxElement": "SPDXRef-Package-yaml-2.8.3",
|
|
3251
3271
|
"relationshipType": "DEPENDS_ON"
|
|
3252
3272
|
},
|
|
3273
|
+
{
|
|
3274
|
+
"spdxElementId": "SPDXRef-RootPackage",
|
|
3275
|
+
"relatedSpdxElement": "SPDXRef-Package-zod-4.3.6",
|
|
3276
|
+
"relationshipType": "DEPENDS_ON"
|
|
3277
|
+
},
|
|
3253
3278
|
{
|
|
3254
3279
|
"spdxElementId": "SPDXRef-RootPackage",
|
|
3255
3280
|
"relatedSpdxElement": "SPDXRef-Package-zx-8.8.5",
|
|
3256
3281
|
"relationshipType": "DEPENDS_ON"
|
|
3257
3282
|
},
|
|
3258
3283
|
{
|
|
3259
|
-
"spdxElementId": "SPDXRef-Package--kici-dev-core-0.1.
|
|
3284
|
+
"spdxElementId": "SPDXRef-Package--kici-dev-core-0.1.17",
|
|
3260
3285
|
"relatedSpdxElement": "SPDXRef-Package-oxc-transform-0.128.0",
|
|
3261
3286
|
"relationshipType": "DEPENDS_ON"
|
|
3262
3287
|
},
|
|
3263
3288
|
{
|
|
3264
|
-
"spdxElementId": "SPDXRef-Package--kici-dev-core-0.1.
|
|
3289
|
+
"spdxElementId": "SPDXRef-Package--kici-dev-core-0.1.17",
|
|
3265
3290
|
"relatedSpdxElement": "SPDXRef-Package-picocolors-1.1.1",
|
|
3266
3291
|
"relationshipType": "DEPENDS_ON"
|
|
3267
3292
|
},
|
|
3268
3293
|
{
|
|
3269
|
-
"spdxElementId": "SPDXRef-Package--kici-dev-core-0.1.
|
|
3294
|
+
"spdxElementId": "SPDXRef-Package--kici-dev-core-0.1.17",
|
|
3270
3295
|
"relatedSpdxElement": "SPDXRef-Package-winston-daily-rotate-file-5.0.0",
|
|
3271
3296
|
"relationshipType": "DEPENDS_ON"
|
|
3272
3297
|
},
|
|
3273
3298
|
{
|
|
3274
|
-
"spdxElementId": "SPDXRef-Package--kici-dev-core-0.1.
|
|
3299
|
+
"spdxElementId": "SPDXRef-Package--kici-dev-core-0.1.17",
|
|
3275
3300
|
"relatedSpdxElement": "SPDXRef-Package-winston-3.19.0",
|
|
3276
3301
|
"relationshipType": "DEPENDS_ON"
|
|
3277
3302
|
},
|
|
3278
3303
|
{
|
|
3279
|
-
"spdxElementId": "SPDXRef-Package--kici-dev-core-0.1.
|
|
3304
|
+
"spdxElementId": "SPDXRef-Package--kici-dev-core-0.1.17",
|
|
3280
3305
|
"relatedSpdxElement": "SPDXRef-Package-zod-4.3.6",
|
|
3281
3306
|
"relationshipType": "DEPENDS_ON"
|
|
3282
3307
|
},
|
|
3283
3308
|
{
|
|
3284
|
-
"spdxElementId": "SPDXRef-Package--kici-dev-core-0.1.
|
|
3309
|
+
"spdxElementId": "SPDXRef-Package--kici-dev-core-0.1.17",
|
|
3285
3310
|
"relatedSpdxElement": "SPDXRef-Package-zx-8.8.5",
|
|
3286
3311
|
"relationshipType": "DEPENDS_ON"
|
|
3287
3312
|
},
|
|
3288
3313
|
{
|
|
3289
|
-
"spdxElementId": "SPDXRef-Package--kici-dev-engine-0.1.
|
|
3290
|
-
"relatedSpdxElement": "SPDXRef-Package-
|
|
3314
|
+
"spdxElementId": "SPDXRef-Package--kici-dev-engine-0.1.17",
|
|
3315
|
+
"relatedSpdxElement": "SPDXRef-Package-fast-cartesian-9.0.1",
|
|
3291
3316
|
"relationshipType": "DEPENDS_ON"
|
|
3292
3317
|
},
|
|
3293
3318
|
{
|
|
3294
|
-
"spdxElementId": "SPDXRef-Package--kici-dev-engine-0.1.
|
|
3295
|
-
"relatedSpdxElement": "SPDXRef-Package-
|
|
3319
|
+
"spdxElementId": "SPDXRef-Package--kici-dev-engine-0.1.17",
|
|
3320
|
+
"relatedSpdxElement": "SPDXRef-Package-jose-6.2.3",
|
|
3296
3321
|
"relationshipType": "DEPENDS_ON"
|
|
3297
3322
|
},
|
|
3298
3323
|
{
|
|
3299
|
-
"spdxElementId": "SPDXRef-Package--kici-dev-engine-0.1.
|
|
3300
|
-
"relatedSpdxElement": "SPDXRef-Package-
|
|
3324
|
+
"spdxElementId": "SPDXRef-Package--kici-dev-engine-0.1.17",
|
|
3325
|
+
"relatedSpdxElement": "SPDXRef-Package-jsonpath-plus-10.4.0",
|
|
3301
3326
|
"relationshipType": "DEPENDS_ON"
|
|
3302
3327
|
},
|
|
3303
3328
|
{
|
|
3304
|
-
"spdxElementId": "SPDXRef-Package--kici-dev-
|
|
3305
|
-
"relatedSpdxElement": "SPDXRef-Package
|
|
3329
|
+
"spdxElementId": "SPDXRef-Package--kici-dev-engine-0.1.17",
|
|
3330
|
+
"relatedSpdxElement": "SPDXRef-Package-picomatch-4.0.4",
|
|
3306
3331
|
"relationshipType": "DEPENDS_ON"
|
|
3307
3332
|
},
|
|
3308
3333
|
{
|
|
3309
|
-
"spdxElementId": "SPDXRef-Package--kici-dev-
|
|
3310
|
-
"relatedSpdxElement": "SPDXRef-Package
|
|
3334
|
+
"spdxElementId": "SPDXRef-Package--kici-dev-engine-0.1.17",
|
|
3335
|
+
"relatedSpdxElement": "SPDXRef-Package-zod-4.3.6",
|
|
3311
3336
|
"relationshipType": "DEPENDS_ON"
|
|
3312
3337
|
},
|
|
3313
3338
|
{
|
|
3314
|
-
"spdxElementId": "SPDXRef-Package--kici-dev-sdk-0.1.
|
|
3315
|
-
"relatedSpdxElement": "SPDXRef-Package-
|
|
3339
|
+
"spdxElementId": "SPDXRef-Package--kici-dev-sdk-0.1.17",
|
|
3340
|
+
"relatedSpdxElement": "SPDXRef-Package--kici-dev-core-0.1.17",
|
|
3341
|
+
"relationshipType": "DEPENDS_ON"
|
|
3342
|
+
},
|
|
3343
|
+
{
|
|
3344
|
+
"spdxElementId": "SPDXRef-Package--kici-dev-sdk-0.1.17",
|
|
3345
|
+
"relatedSpdxElement": "SPDXRef-Package--kici-dev-engine-0.1.17",
|
|
3316
3346
|
"relationshipType": "DEPENDS_ON"
|
|
3317
3347
|
},
|
|
3318
3348
|
{
|
|
3319
|
-
"spdxElementId": "SPDXRef-Package--kici-dev-sdk-0.1.
|
|
3349
|
+
"spdxElementId": "SPDXRef-Package--kici-dev-sdk-0.1.17",
|
|
3320
3350
|
"relatedSpdxElement": "SPDXRef-Package-micromatch-4.0.8",
|
|
3321
3351
|
"relationshipType": "DEPENDS_ON"
|
|
3322
3352
|
},
|
|
3323
3353
|
{
|
|
3324
|
-
"spdxElementId": "SPDXRef-Package--kici-dev-sdk-0.1.
|
|
3354
|
+
"spdxElementId": "SPDXRef-Package--kici-dev-sdk-0.1.17",
|
|
3325
3355
|
"relatedSpdxElement": "SPDXRef-Package-zod-4.3.6",
|
|
3326
3356
|
"relationshipType": "DEPENDS_ON"
|
|
3327
3357
|
},
|
|
3328
3358
|
{
|
|
3329
|
-
"spdxElementId": "SPDXRef-Package--kici-dev-sdk-0.1.
|
|
3359
|
+
"spdxElementId": "SPDXRef-Package--kici-dev-sdk-0.1.17",
|
|
3330
3360
|
"relatedSpdxElement": "SPDXRef-Package-zx-8.8.5",
|
|
3331
3361
|
"relationshipType": "DEPENDS_ON"
|
|
3332
3362
|
},
|
package/dist/commands/cancel.js
DELETED
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
import "../chunk-gOLHoazu.js";
|
|
2
|
-
import { loadGlobalConfig } from "../remote/config.js";
|
|
3
|
-
import pc from "picocolors";
|
|
4
|
-
import { logger, toErrorMessage } from "@kici-dev/core";
|
|
5
|
-
//#region src/commands/cancel.ts
|
|
6
|
-
/**
|
|
7
|
-
* kici cancel command
|
|
8
|
-
*
|
|
9
|
-
* Cancels a specific run by ID, or all in-progress runs on a branch.
|
|
10
|
-
* Uses the Platform dashboard API (PAT auth) or orchestrator API (direct mode).
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
* Cancel a run or all runs on a branch.
|
|
14
|
-
*
|
|
15
|
-
* @param runId - Run ID to cancel (optional if --branch is provided)
|
|
16
|
-
* @param options - Cancel options
|
|
17
|
-
* @returns true on success, false on error
|
|
18
|
-
*/
|
|
19
|
-
async function cancelCommand(runId, options = {}) {
|
|
20
|
-
try {
|
|
21
|
-
const config = await loadGlobalConfig();
|
|
22
|
-
const token = config.pat ?? config.token;
|
|
23
|
-
if (!token) {
|
|
24
|
-
logger.error(pc.red("Not authenticated. Run `kici login` to get started."));
|
|
25
|
-
return false;
|
|
26
|
-
}
|
|
27
|
-
const endpoint = config.platformEndpoint ?? config.endpoint;
|
|
28
|
-
if (!endpoint) {
|
|
29
|
-
logger.error(pc.red("No endpoint configured. Run `kici login` to configure."));
|
|
30
|
-
return false;
|
|
31
|
-
}
|
|
32
|
-
if (options.branch) return await cancelByBranch(endpoint, token, config.activeOrgId, options.branch);
|
|
33
|
-
if (!runId) {
|
|
34
|
-
logger.error(pc.red("Please provide a run ID or use --branch to cancel by branch."));
|
|
35
|
-
return false;
|
|
36
|
-
}
|
|
37
|
-
return await cancelRun(endpoint, token, config.activeOrgId, runId, options.force ?? false);
|
|
38
|
-
} catch (error) {
|
|
39
|
-
const message = toErrorMessage(error);
|
|
40
|
-
logger.error(pc.red(`Error: ${message}`));
|
|
41
|
-
return false;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Cancel a specific run by ID.
|
|
46
|
-
*/
|
|
47
|
-
async function cancelRun(endpoint, token, orgId, runId, force) {
|
|
48
|
-
if (!orgId) {
|
|
49
|
-
logger.error(pc.red("No active organization. Run `kici org use <name>` to set one."));
|
|
50
|
-
return false;
|
|
51
|
-
}
|
|
52
|
-
const action = force ? "Force-cancelling" : "Cancelling";
|
|
53
|
-
logger.info(`${action} run ${pc.cyan(runId)}...`);
|
|
54
|
-
const url = `${endpoint}/api/v1/orgs/${orgId}/runs/${runId}/cancel`;
|
|
55
|
-
const response = await fetch(url, {
|
|
56
|
-
method: "POST",
|
|
57
|
-
headers: {
|
|
58
|
-
"Content-Type": "application/json",
|
|
59
|
-
Authorization: `Bearer ${token}`
|
|
60
|
-
},
|
|
61
|
-
body: JSON.stringify({ force })
|
|
62
|
-
});
|
|
63
|
-
if (response.ok) {
|
|
64
|
-
const jobs = (await response.json()).cancelledJobs ?? 0;
|
|
65
|
-
logger.info(pc.green(`Run ${runId} cancelled (${jobs} job${jobs !== 1 ? "s" : ""} affected).`));
|
|
66
|
-
return true;
|
|
67
|
-
}
|
|
68
|
-
return handleApiError(response, runId);
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Cancel all in-progress runs on a branch.
|
|
72
|
-
*/
|
|
73
|
-
async function cancelByBranch(endpoint, token, orgId, branch) {
|
|
74
|
-
if (!orgId) {
|
|
75
|
-
logger.error(pc.red("No active organization. Run `kici org use <name>` to set one."));
|
|
76
|
-
return false;
|
|
77
|
-
}
|
|
78
|
-
logger.info(`Cancelling all in-progress runs on branch ${pc.cyan(branch)}...`);
|
|
79
|
-
const url = `${endpoint}/api/v1/orgs/${orgId}/runs/cancel-by-branch`;
|
|
80
|
-
const response = await fetch(url, {
|
|
81
|
-
method: "POST",
|
|
82
|
-
headers: {
|
|
83
|
-
"Content-Type": "application/json",
|
|
84
|
-
Authorization: `Bearer ${token}`
|
|
85
|
-
},
|
|
86
|
-
body: JSON.stringify({ branch })
|
|
87
|
-
});
|
|
88
|
-
if (response.ok) {
|
|
89
|
-
const runs = (await response.json()).cancelledRuns ?? 0;
|
|
90
|
-
if (runs === 0) logger.info(pc.yellow(`No in-progress runs found on branch ${branch}.`));
|
|
91
|
-
else logger.info(pc.green(`Cancelled ${runs} run${runs !== 1 ? "s" : ""} on branch ${branch}.`));
|
|
92
|
-
return true;
|
|
93
|
-
}
|
|
94
|
-
return handleApiError(response);
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* Handle API error responses with clear user-facing messages.
|
|
98
|
-
*/
|
|
99
|
-
async function handleApiError(response, runId) {
|
|
100
|
-
let errorDetail;
|
|
101
|
-
try {
|
|
102
|
-
errorDetail = (await response.json()).error;
|
|
103
|
-
} catch {}
|
|
104
|
-
switch (response.status) {
|
|
105
|
-
case 401:
|
|
106
|
-
logger.error(pc.red("Authentication failed. Run `kici login` to re-authenticate."));
|
|
107
|
-
break;
|
|
108
|
-
case 403:
|
|
109
|
-
logger.error(pc.red(`Access denied${errorDetail ? `: ${errorDetail}` : ""}.`));
|
|
110
|
-
break;
|
|
111
|
-
case 404:
|
|
112
|
-
logger.error(pc.red(`Run not found${runId ? `: ${runId}` : ""}.`));
|
|
113
|
-
break;
|
|
114
|
-
case 409:
|
|
115
|
-
logger.error(pc.yellow(errorDetail ?? `Run ${runId ?? ""} is already in a terminal state.`));
|
|
116
|
-
break;
|
|
117
|
-
default: logger.error(pc.red(errorDetail ?? `Request failed with status ${response.status}.`));
|
|
118
|
-
}
|
|
119
|
-
return false;
|
|
120
|
-
}
|
|
121
|
-
//#endregion
|
|
122
|
-
export { cancelCommand };
|
|
123
|
-
|
|
124
|
-
//# sourceMappingURL=cancel.js.map
|
package/dist/commands/status.js
DELETED
|
@@ -1,212 +0,0 @@
|
|
|
1
|
-
import "../chunk-gOLHoazu.js";
|
|
2
|
-
import { formatCapabilityGapError } from "../errors/capability-gap.js";
|
|
3
|
-
import { AuthenticationError, ConnectionError, NotFoundError, OrchestratorClient } from "../remote/client.js";
|
|
4
|
-
import { loadGlobalConfig } from "../remote/config.js";
|
|
5
|
-
import { RunHistory } from "../remote/history.js";
|
|
6
|
-
import { StreamingFormatter } from "../remote/output/streaming.js";
|
|
7
|
-
import { observeCompletion } from "./run.js";
|
|
8
|
-
import pc from "picocolors";
|
|
9
|
-
import { formatDuration, logger, toErrorMessage } from "@kici-dev/core";
|
|
10
|
-
//#region src/commands/status.ts
|
|
11
|
-
/**
|
|
12
|
-
* kici status command
|
|
13
|
-
*
|
|
14
|
-
* Shows the status and details of a test run, with optional log streaming.
|
|
15
|
-
* Looks up local history first, then fetches from the orchestrator for
|
|
16
|
-
* up-to-date status and logs.
|
|
17
|
-
*/
|
|
18
|
-
const CLI_VERSION = "0.1.16";
|
|
19
|
-
/**
|
|
20
|
-
* Show status and details of a test run.
|
|
21
|
-
*
|
|
22
|
-
* Default mode: show run summary table from local history + orchestrator.
|
|
23
|
-
* --logs: stream full logs from the orchestrator.
|
|
24
|
-
* --job <name>: filter logs to a specific job.
|
|
25
|
-
* --json: output raw JSON.
|
|
26
|
-
*
|
|
27
|
-
* @param runId - The run ID to inspect
|
|
28
|
-
* @param options - Status display options
|
|
29
|
-
* @returns true on success, false on error
|
|
30
|
-
*/
|
|
31
|
-
async function statusCommand(runId, options = {}) {
|
|
32
|
-
try {
|
|
33
|
-
const history = new RunHistory();
|
|
34
|
-
await history.load();
|
|
35
|
-
const localEntry = history.getEntry(runId);
|
|
36
|
-
if (!options.json) displayAuthInfo(await loadGlobalConfig());
|
|
37
|
-
const config = await loadGlobalConfig();
|
|
38
|
-
const endpoint = config.endpoint ?? config.platformEndpoint;
|
|
39
|
-
if (!config.token || !endpoint) {
|
|
40
|
-
if (localEntry) {
|
|
41
|
-
if (options.json) console.log(JSON.stringify(localEntry, null, 2));
|
|
42
|
-
else displayLocalEntry(localEntry);
|
|
43
|
-
return true;
|
|
44
|
-
}
|
|
45
|
-
logger.error(pc.red("Not authenticated and no local history for this run. Run `kici login` to authenticate."));
|
|
46
|
-
return false;
|
|
47
|
-
}
|
|
48
|
-
const client = new OrchestratorClient({
|
|
49
|
-
endpoint,
|
|
50
|
-
token: config.token
|
|
51
|
-
});
|
|
52
|
-
try {
|
|
53
|
-
const remoteStatus = await client.getRunStatus(runId);
|
|
54
|
-
if (options.json) {
|
|
55
|
-
console.log(JSON.stringify(remoteStatus, null, 2));
|
|
56
|
-
return true;
|
|
57
|
-
}
|
|
58
|
-
if (options.logs) return await displayLogs(client, config.token, runId, options.job);
|
|
59
|
-
displayRunSummary(remoteStatus, localEntry);
|
|
60
|
-
return true;
|
|
61
|
-
} catch (error) {
|
|
62
|
-
if (error instanceof NotFoundError) {
|
|
63
|
-
if (localEntry) {
|
|
64
|
-
if (options.json) console.log(JSON.stringify(localEntry, null, 2));
|
|
65
|
-
else {
|
|
66
|
-
logger.info(pc.yellow("Run not found on orchestrator. Showing local history:\n"));
|
|
67
|
-
displayLocalEntry(localEntry);
|
|
68
|
-
}
|
|
69
|
-
return true;
|
|
70
|
-
}
|
|
71
|
-
logger.error(pc.red(`Run not found: ${runId}`));
|
|
72
|
-
return false;
|
|
73
|
-
}
|
|
74
|
-
if (error instanceof AuthenticationError) {
|
|
75
|
-
logger.error(pc.red("Authentication failed. Run `kici login` to re-authenticate."));
|
|
76
|
-
return false;
|
|
77
|
-
}
|
|
78
|
-
if (error instanceof ConnectionError) {
|
|
79
|
-
if (localEntry) {
|
|
80
|
-
logger.info(pc.yellow("Cannot reach orchestrator. Showing local history (may be stale):\n"));
|
|
81
|
-
if (options.json) console.log(JSON.stringify(localEntry, null, 2));
|
|
82
|
-
else displayLocalEntry(localEntry);
|
|
83
|
-
return true;
|
|
84
|
-
}
|
|
85
|
-
logger.error(pc.red(`Connection failed: ${error.message}`));
|
|
86
|
-
return false;
|
|
87
|
-
}
|
|
88
|
-
throw error;
|
|
89
|
-
}
|
|
90
|
-
} catch (error) {
|
|
91
|
-
const message = toErrorMessage(error);
|
|
92
|
-
logger.error(pc.red(`Error: ${message}`));
|
|
93
|
-
return false;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* Display a run summary from remote status (+ local context).
|
|
98
|
-
*/
|
|
99
|
-
function displayRunSummary(remote, local) {
|
|
100
|
-
const statusColor = remote.status === "success" ? pc.green : remote.status === "failed" ? pc.red : remote.status === "cancelled" ? pc.yellow : pc.blue;
|
|
101
|
-
logger.info(pc.bold(`\nRun: ${remote.runId}`));
|
|
102
|
-
logger.info(`Status: ${statusColor(remote.status)}`);
|
|
103
|
-
if (remote.status === "failed" && remote.failureReason) logger.info(`Reason: ${pc.red(remote.failureReason)}`);
|
|
104
|
-
if (local?.fixtureId) logger.info(`Fixture: ${pc.cyan(local.fixtureId)}`);
|
|
105
|
-
if (local?.endpoint) logger.info(`Endpoint: ${pc.gray(local.endpoint)}`);
|
|
106
|
-
if (local?.startedAt) logger.info(`Started: ${pc.gray(local.startedAt)}`);
|
|
107
|
-
if (local?.completedAt) logger.info(`Completed: ${pc.gray(local.completedAt)}`);
|
|
108
|
-
if (remote.summary) {
|
|
109
|
-
const totalDuration = remote.summary.totalDurationMs;
|
|
110
|
-
logger.info(`Duration: ${pc.gray(formatDuration(totalDuration))}`);
|
|
111
|
-
if (remote.summary.jobs.length > 0) {
|
|
112
|
-
logger.info(pc.bold("\nJobs:"));
|
|
113
|
-
const nameWidth = Math.max(10, ...remote.summary.jobs.map((j) => j.name.length)) + 2;
|
|
114
|
-
for (const job of remote.summary.jobs) {
|
|
115
|
-
const jobColor = job.status === "success" ? pc.green : job.status === "failed" ? pc.red : job.status === "cancelled" ? pc.yellow : pc.blue;
|
|
116
|
-
const duration = job.durationMs ? formatDuration(job.durationMs) : "-";
|
|
117
|
-
logger.info(` ${jobColor(job.status.padEnd(12))} ${job.name.padEnd(nameWidth)} ${pc.gray(duration)}`);
|
|
118
|
-
if (job.status === "failed" && job.errorMessage) logger.info(` ${pc.red("↳")} ${pc.gray(job.errorMessage)}`);
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
logger.info("");
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* Display a local-only history entry.
|
|
126
|
-
*/
|
|
127
|
-
function displayLocalEntry(entry) {
|
|
128
|
-
const statusColor = entry.status === "success" ? pc.green : entry.status === "failed" ? pc.red : entry.status === "cancelled" ? pc.yellow : pc.blue;
|
|
129
|
-
logger.info(pc.bold(`\nRun: ${entry.runId}`));
|
|
130
|
-
logger.info(`Status: ${statusColor(entry.status)}`);
|
|
131
|
-
logger.info(`Fixture: ${pc.cyan(entry.fixtureId)}`);
|
|
132
|
-
logger.info(`Endpoint: ${pc.gray(entry.endpoint)}`);
|
|
133
|
-
logger.info(`Started: ${pc.gray(entry.startedAt)}`);
|
|
134
|
-
if (entry.completedAt) logger.info(`Completed: ${pc.gray(entry.completedAt)}`);
|
|
135
|
-
if (entry.durationMs) logger.info(`Duration: ${pc.gray(formatDuration(entry.durationMs))}`);
|
|
136
|
-
if (entry.jobs && entry.jobs.length > 0) {
|
|
137
|
-
logger.info(pc.bold("\nJobs:"));
|
|
138
|
-
for (const job of entry.jobs) {
|
|
139
|
-
const jobColor = job.status === "success" ? pc.green : job.status === "failed" ? pc.red : job.status === "cancelled" ? pc.yellow : pc.blue;
|
|
140
|
-
const duration = job.durationMs ? formatDuration(job.durationMs) : "-";
|
|
141
|
-
logger.info(` ${jobColor(job.status.padEnd(12))} ${job.name} ${pc.gray(duration)}`);
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
logger.info(pc.gray("\n(Local history only -- run may have updated on orchestrator)"));
|
|
145
|
-
logger.info("");
|
|
146
|
-
}
|
|
147
|
-
/**
|
|
148
|
-
* Stream logs for a run from the orchestrator.
|
|
149
|
-
*
|
|
150
|
-
* For active runs, connects via WebSocket for live streaming.
|
|
151
|
-
* For completed runs, fetches historical logs from storage.
|
|
152
|
-
*/
|
|
153
|
-
async function displayLogs(client, token, runId, jobFilter) {
|
|
154
|
-
let logsResponse;
|
|
155
|
-
try {
|
|
156
|
-
logsResponse = await client.getRunLogs(runId, jobFilter);
|
|
157
|
-
} catch (error) {
|
|
158
|
-
if (error instanceof NotFoundError) {
|
|
159
|
-
const caps = await client.getCapabilities();
|
|
160
|
-
logger.error(formatCapabilityGapError({
|
|
161
|
-
feature: "log-streaming",
|
|
162
|
-
cliVersion: CLI_VERSION,
|
|
163
|
-
orchestratorVersion: caps.orchestratorVersion
|
|
164
|
-
}));
|
|
165
|
-
return false;
|
|
166
|
-
}
|
|
167
|
-
throw error;
|
|
168
|
-
}
|
|
169
|
-
if (logsResponse.observeUrl) {
|
|
170
|
-
logger.info(pc.bold(`\nStreaming live logs for run: ${runId}\n`));
|
|
171
|
-
return (await observeCompletion("status", runId, logsResponse.observeUrl, token, client, {})).status === "success";
|
|
172
|
-
}
|
|
173
|
-
logger.info(pc.bold(`\nLogs for run: ${runId}\n`));
|
|
174
|
-
if (!logsResponse.logs || logsResponse.logs.length === 0) {
|
|
175
|
-
logger.info(pc.gray("No logs available for this run."));
|
|
176
|
-
return true;
|
|
177
|
-
}
|
|
178
|
-
const formatter = new StreamingFormatter();
|
|
179
|
-
for (const entry of logsResponse.logs) for (const line of entry.lines) {
|
|
180
|
-
const output = formatter.formatLogLine(entry.jobName, entry.stepName, line);
|
|
181
|
-
if (output) process.stdout.write(output);
|
|
182
|
-
}
|
|
183
|
-
logger.info("");
|
|
184
|
-
return true;
|
|
185
|
-
}
|
|
186
|
-
/**
|
|
187
|
-
* Display authentication information section.
|
|
188
|
-
*
|
|
189
|
-
* Shows logged-in user, active org, and PAT expiry with warnings.
|
|
190
|
-
*/
|
|
191
|
-
function displayAuthInfo(config) {
|
|
192
|
-
logger.info(pc.bold("\nAuth:"));
|
|
193
|
-
if (config.pat) {
|
|
194
|
-
const email = config.userEmail || "unknown";
|
|
195
|
-
logger.info(` Logged in as: ${pc.cyan(email)}`);
|
|
196
|
-
logger.info(` Active org: ${config.activeOrgId || pc.gray("none")}`);
|
|
197
|
-
if (config.patExpiresAt) {
|
|
198
|
-
const expiryDate = new Date(config.patExpiresAt);
|
|
199
|
-
const now = /* @__PURE__ */ new Date();
|
|
200
|
-
const daysRemaining = Math.ceil((expiryDate.getTime() - now.getTime()) / (1e3 * 60 * 60 * 24));
|
|
201
|
-
if (daysRemaining <= 0) logger.info(pc.red(` PAT expired. Run 'kici login' to re-authenticate.`));
|
|
202
|
-
else if (daysRemaining <= 7) logger.info(pc.yellow(` PAT expires in ${daysRemaining} day(s). Run 'kici login' to refresh.`));
|
|
203
|
-
else logger.info(` PAT expires: ${expiryDate.toLocaleDateString()} (${daysRemaining} days remaining)`);
|
|
204
|
-
}
|
|
205
|
-
} else if (config.token) logger.info(` Using API key authentication.`);
|
|
206
|
-
else logger.info(pc.gray(` Not authenticated. Run 'kici login' to get started.`));
|
|
207
|
-
logger.info("");
|
|
208
|
-
}
|
|
209
|
-
//#endregion
|
|
210
|
-
export { displayRunSummary, statusCommand };
|
|
211
|
-
|
|
212
|
-
//# sourceMappingURL=status.js.map
|