@kici-dev/compiler 0.0.0 → 0.1.2
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/LICENSE +202 -0
- package/README.md +1 -6
- package/dist/assets/api-TJJVHrjC.json +118 -0
- package/dist/assets/descriptor-BTtjzN9L.json +1382 -0
- package/dist/assets/package-BpQF9kR8.json +74 -0
- package/dist/assets/package-Ceo2h27X.json +89 -0
- package/dist/assets/source_context-D0atuL28.json +20 -0
- package/dist/assets/type-BFqO8SCZ.json +202 -0
- package/dist/auth/headless-detect.d.ts +14 -0
- package/dist/auth/headless-detect.js +25 -0
- package/dist/chunk-gOLHoazu.js +4 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.js +193 -0
- package/dist/commands/cancel.d.ts +22 -0
- package/dist/commands/cancel.js +124 -0
- package/dist/commands/compile.d.ts +17 -0
- package/dist/commands/compile.js +99 -0
- package/dist/commands/docs.d.ts +26 -0
- package/dist/commands/docs.js +60 -0
- package/dist/commands/drain-worker.d.ts +19 -0
- package/dist/commands/drain-worker.js +45 -0
- package/dist/commands/endpoints.d.ts +53 -0
- package/dist/commands/endpoints.js +185 -0
- package/dist/commands/fixture.d.ts +14 -0
- package/dist/commands/fixture.js +104 -0
- package/dist/commands/hook.d.ts +20 -0
- package/dist/commands/hook.js +97 -0
- package/dist/commands/index.d.ts +33 -0
- package/dist/commands/index.js +20 -0
- package/dist/commands/init.d.ts +35 -0
- package/dist/commands/init.js +393 -0
- package/dist/commands/login.d.ts +23 -0
- package/dist/commands/login.js +144 -0
- package/dist/commands/logout.d.ts +18 -0
- package/dist/commands/logout.js +55 -0
- package/dist/commands/org.d.ts +27 -0
- package/dist/commands/org.js +126 -0
- package/dist/commands/run.d.ts +21 -0
- package/dist/commands/run.js +562 -0
- package/dist/commands/secrets-list.d.ts +16 -0
- package/dist/commands/secrets-list.js +85 -0
- package/dist/commands/status.d.ts +30 -0
- package/dist/commands/status.js +210 -0
- package/dist/commands/test.d.ts +61 -0
- package/dist/commands/test.js +220 -0
- package/dist/commands/types.d.ts +18 -0
- package/dist/commands/types.js +74 -0
- package/dist/commands/watch.d.ts +14 -0
- package/dist/commands/watch.js +97 -0
- package/dist/commands/workflows.d.ts +28 -0
- package/dist/commands/workflows.js +154 -0
- package/dist/comment-created.json +30 -0
- package/dist/create-branch.json +17 -0
- package/dist/delete-branch.json +15 -0
- package/dist/dispatch.json +15 -0
- package/dist/errors/capability-gap.d.ts +50 -0
- package/dist/errors/capability-gap.js +54 -0
- package/dist/errors/codes.d.ts +25 -0
- package/dist/errors/formatter.d.ts +32 -0
- package/dist/errors/formatter.js +35 -0
- package/dist/errors/index.d.ts +5 -0
- package/dist/errors/index.js +4 -0
- package/dist/execution/executor.d.ts +61 -0
- package/dist/execution/executor.js +230 -0
- package/dist/execution/index.d.ts +4 -0
- package/dist/execution/index.js +3 -0
- package/dist/execution/sdk-alias.d.ts +33 -0
- package/dist/execution/sdk-alias.js +102 -0
- package/dist/fixtures/compiler.d.ts +47 -0
- package/dist/fixtures/compiler.js +177 -0
- package/dist/fixtures/defaults/comment-created.json +30 -0
- package/dist/fixtures/defaults/create-branch.json +17 -0
- package/dist/fixtures/defaults/delete-branch.json +15 -0
- package/dist/fixtures/defaults/dispatch.json +15 -0
- package/dist/fixtures/defaults/fork.json +19 -0
- package/dist/fixtures/defaults/index.d.ts +16 -0
- package/dist/fixtures/defaults/index.js +105 -0
- package/dist/fixtures/defaults/index.ts +145 -0
- package/dist/fixtures/defaults/pr-closed.json +28 -0
- package/dist/fixtures/defaults/pr-opened.json +27 -0
- package/dist/fixtures/defaults/pr-reopened.json +27 -0
- package/dist/fixtures/defaults/pr-synchronize.json +27 -0
- package/dist/fixtures/defaults/push.json +16 -0
- package/dist/fixtures/defaults/release-published.json +23 -0
- package/dist/fixtures/defaults/review-comment-created.json +36 -0
- package/dist/fixtures/defaults/review-submitted.json +35 -0
- package/dist/fixtures/defaults/star-created.json +15 -0
- package/dist/fixtures/defaults/status.json +26 -0
- package/dist/fixtures/defaults/tag-push.json +20 -0
- package/dist/fixtures/defaults/watch-started.json +15 -0
- package/dist/fixtures/defaults/workflow-run-completed.json +23 -0
- package/dist/fork.json +19 -0
- package/dist/format.d.ts +5 -0
- package/dist/format.js +20 -0
- package/dist/generators/secrets-dts.d.ts +29 -0
- package/dist/generators/secrets-dts.js +67 -0
- package/dist/hooks/detector.d.ts +39 -0
- package/dist/hooks/detector.js +133 -0
- package/dist/hooks/index.d.ts +6 -0
- package/dist/hooks/index.js +5 -0
- package/dist/hooks/installer.d.ts +24 -0
- package/dist/hooks/installer.js +328 -0
- package/dist/hooks/templates.d.ts +26 -0
- package/dist/hooks/templates.js +63 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +12 -0
- package/dist/llm-context/llms-full.txt +9974 -0
- package/dist/llm-context/llms.txt +61 -0
- package/dist/local-executor/dag-scheduler.d.ts +44 -0
- package/dist/local-executor/dag-scheduler.js +183 -0
- package/dist/local-executor/index.d.ts +23 -0
- package/dist/local-executor/index.js +309 -0
- package/dist/local-executor/job-runner.d.ts +40 -0
- package/dist/local-executor/job-runner.js +307 -0
- package/dist/local-executor/output-streamer.d.ts +31 -0
- package/dist/local-executor/output-streamer.js +166 -0
- package/dist/local-executor/payload-generator.d.ts +16 -0
- package/dist/local-executor/payload-generator.js +138 -0
- package/dist/local-executor/picker.d.ts +33 -0
- package/dist/local-executor/picker.js +109 -0
- package/dist/local-executor/secret-loader.d.ts +18 -0
- package/dist/local-executor/secret-loader.js +105 -0
- package/dist/local-executor/types.d.ts +80 -0
- package/dist/local-executor/types.js +2 -0
- package/dist/local-executor/workflow-lock.d.ts +81 -0
- package/dist/local-executor/workflow-lock.js +0 -0
- package/dist/lockfile/generator.d.ts +39 -0
- package/dist/lockfile/generator.js +688 -0
- package/dist/lockfile/hash-files.d.ts +14 -0
- package/dist/lockfile/hash-files.js +50 -0
- package/dist/lockfile/hasher.d.ts +36 -0
- package/dist/lockfile/hasher.js +46 -0
- package/dist/lockfile/index.d.ts +3 -0
- package/dist/lockfile/index.js +4 -0
- package/dist/lockfile/purity-analyzer.d.ts +25 -0
- package/dist/lockfile/purity-analyzer.js +204 -0
- package/dist/package-F7UXSDHW.json +74 -0
- package/dist/postinstall.d.ts +9 -0
- package/dist/postinstall.js +60 -0
- package/dist/pr-closed.json +28 -0
- package/dist/pr-opened.json +27 -0
- package/dist/pr-reopened.json +27 -0
- package/dist/pr-synchronize.json +27 -0
- package/dist/push.json +16 -0
- package/dist/release-published.json +23 -0
- package/dist/remote/client.d.ts +204 -0
- package/dist/remote/client.js +203 -0
- package/dist/remote/config.d.ts +54 -0
- package/dist/remote/config.js +92 -0
- package/dist/remote/encryption.d.ts +35 -0
- package/dist/remote/encryption.js +87 -0
- package/dist/remote/history.d.ts +91 -0
- package/dist/remote/history.js +146 -0
- package/dist/remote/oauth.d.ts +65 -0
- package/dist/remote/oauth.js +302 -0
- package/dist/remote/observer.d.ts +81 -0
- package/dist/remote/observer.js +174 -0
- package/dist/remote/output/json.d.ts +13 -0
- package/dist/remote/output/json.js +36 -0
- package/dist/remote/output/junit.d.ts +18 -0
- package/dist/remote/output/junit.js +50 -0
- package/dist/remote/output/streaming.d.ts +57 -0
- package/dist/remote/output/streaming.js +124 -0
- package/dist/remote/output/summary.d.ts +39 -0
- package/dist/remote/output/summary.js +99 -0
- package/dist/remote/uploader.d.ts +87 -0
- package/dist/remote/uploader.js +197 -0
- package/dist/review-comment-created.json +36 -0
- package/dist/review-submitted.json +35 -0
- package/dist/star-created.json +15 -0
- package/dist/status.json +26 -0
- package/dist/tag-push.json +20 -0
- package/dist/templates/agents-md.d.ts +8 -0
- package/dist/templates/agents-md.js +130 -0
- package/dist/templates/index.d.ts +43 -0
- package/dist/templates/index.js +48 -0
- package/dist/templates/package-json.d.ts +18 -0
- package/dist/templates/package-json.js +34 -0
- package/dist/templates/tsconfig-json.d.ts +9 -0
- package/dist/templates/tsconfig-json.js +26 -0
- package/dist/templates/workflows/hello-world.d.ts +2 -0
- package/dist/templates/workflows/hello-world.js +16 -0
- package/dist/templates/workflows/hello-world.ts +21 -0
- package/dist/templates/workflows/pr-checks.d.ts +2 -0
- package/dist/templates/workflows/pr-checks.js +40 -0
- package/dist/templates/workflows/pr-checks.ts +57 -0
- package/dist/test-runner/dry-run.d.ts +12 -0
- package/dist/test-runner/dry-run.js +66 -0
- package/dist/test-runner/event-types.d.ts +86 -0
- package/dist/test-runner/event-types.js +330 -0
- package/dist/test-runner/git-detector.d.ts +15 -0
- package/dist/test-runner/git-detector.js +30 -0
- package/dist/test-runner/index.d.ts +13 -0
- package/dist/test-runner/index.js +11 -0
- package/dist/test-runner/job-executor.d.ts +48 -0
- package/dist/test-runner/job-executor.js +245 -0
- package/dist/test-runner/output-formatter.d.ts +47 -0
- package/dist/test-runner/output-formatter.js +92 -0
- package/dist/test-runner/payload-builder.d.ts +20 -0
- package/dist/test-runner/payload-builder.js +216 -0
- package/dist/test-runner/rule-evaluator.d.ts +14 -0
- package/dist/test-runner/rule-evaluator.js +31 -0
- package/dist/test-runner/secrets-file.d.ts +24 -0
- package/dist/test-runner/secrets-file.js +62 -0
- package/dist/test-runner/step-context.d.ts +15 -0
- package/dist/test-runner/step-context.js +140 -0
- package/dist/test-runner/summary.d.ts +7 -0
- package/dist/types.d.ts +525 -0
- package/dist/types.js +33 -0
- package/dist/validation/index.d.ts +3 -0
- package/dist/validation/index.js +3 -0
- package/dist/validation/validator.d.ts +26 -0
- package/dist/validation/validator.js +164 -0
- package/dist/watch-started.json +15 -0
- package/dist/workflow-run-completed.json +23 -0
- package/dist/workflows/hello-world.ts +21 -0
- package/dist/workflows/pr-checks.ts +57 -0
- package/hack/postinstall.mjs +105 -0
- package/package.json +60 -6
- package/sbom.spdx.json +10997 -0
- package/index.js +0 -3
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "winston",
|
|
3
|
+
"description": "A logger for just about everything.",
|
|
4
|
+
"version": "3.19.0",
|
|
5
|
+
"author": "Charlie Robbins <charlie.robbins@gmail.com>",
|
|
6
|
+
"maintainers": [
|
|
7
|
+
"David Hyde <dabh@alumni.stanford.edu>"
|
|
8
|
+
],
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://github.com/winstonjs/winston.git"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [
|
|
14
|
+
"winston",
|
|
15
|
+
"logger",
|
|
16
|
+
"logging",
|
|
17
|
+
"logs",
|
|
18
|
+
"sysadmin",
|
|
19
|
+
"bunyan",
|
|
20
|
+
"pino",
|
|
21
|
+
"loglevel",
|
|
22
|
+
"tools",
|
|
23
|
+
"json",
|
|
24
|
+
"stream"
|
|
25
|
+
],
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"@dabh/diagnostics": "^2.0.8",
|
|
28
|
+
"@colors/colors": "^1.6.0",
|
|
29
|
+
"async": "^3.2.3",
|
|
30
|
+
"is-stream": "^2.0.0",
|
|
31
|
+
"logform": "^2.7.0",
|
|
32
|
+
"one-time": "^1.0.0",
|
|
33
|
+
"readable-stream": "^3.4.0",
|
|
34
|
+
"safe-stable-stringify": "^2.3.1",
|
|
35
|
+
"stack-trace": "0.0.x",
|
|
36
|
+
"triple-beam": "^1.3.0",
|
|
37
|
+
"winston-transport": "^4.9.0"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@babel/cli": "^7.23.9",
|
|
41
|
+
"@babel/core": "^7.24.0",
|
|
42
|
+
"@babel/preset-env": "^7.24.0",
|
|
43
|
+
"@dabh/eslint-config-populist": "^4.4.0",
|
|
44
|
+
"@types/node": "^20.11.24",
|
|
45
|
+
"abstract-winston-transport": "^0.5.1",
|
|
46
|
+
"assume": "^2.2.0",
|
|
47
|
+
"cross-spawn-async": "^2.2.5",
|
|
48
|
+
"eslint": "^8.57.0",
|
|
49
|
+
"hock": "^1.4.1",
|
|
50
|
+
"jest": "^29.7.0",
|
|
51
|
+
"rimraf": "5.0.10",
|
|
52
|
+
"split2": "^4.1.0",
|
|
53
|
+
"std-mocks": "^2.0.0",
|
|
54
|
+
"through2": "^4.0.2",
|
|
55
|
+
"winston-compat": "^0.1.5"
|
|
56
|
+
},
|
|
57
|
+
"main": "./lib/winston.js",
|
|
58
|
+
"browser": "./dist/winston",
|
|
59
|
+
"types": "./index.d.ts",
|
|
60
|
+
"scripts": {
|
|
61
|
+
"lint": "eslint lib/*.js lib/winston/*.js lib/winston/**/*.js --resolve-plugins-relative-to ./node_modules/@dabh/eslint-config-populist",
|
|
62
|
+
"test": "jest",
|
|
63
|
+
"test:unit": "jest -c test/jest.config.unit.js",
|
|
64
|
+
"test:integration": "jest -c test/jest.config.integration.js",
|
|
65
|
+
"test:typescript": "npx --package typescript tsc --project test",
|
|
66
|
+
"build": "babel lib -d dist",
|
|
67
|
+
"prebuild": "rimraf dist",
|
|
68
|
+
"prepublishOnly": "npm run build"
|
|
69
|
+
},
|
|
70
|
+
"engines": {
|
|
71
|
+
"node": ">= 12.0.0"
|
|
72
|
+
},
|
|
73
|
+
"license": "MIT"
|
|
74
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@grpc/grpc-js",
|
|
3
|
+
"version": "1.14.3",
|
|
4
|
+
"description": "gRPC Library for Node - pure JS implementation",
|
|
5
|
+
"homepage": "https://grpc.io/",
|
|
6
|
+
"repository": "https://github.com/grpc/grpc-node/tree/master/packages/grpc-js",
|
|
7
|
+
"main": "build/src/index.js",
|
|
8
|
+
"engines": {
|
|
9
|
+
"node": ">=12.10.0"
|
|
10
|
+
},
|
|
11
|
+
"keywords": [],
|
|
12
|
+
"author": {
|
|
13
|
+
"name": "Google Inc."
|
|
14
|
+
},
|
|
15
|
+
"types": "build/src/index.d.ts",
|
|
16
|
+
"license": "Apache-2.0",
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"@grpc/proto-loader": "file:../proto-loader",
|
|
19
|
+
"@types/gulp": "^4.0.17",
|
|
20
|
+
"@types/gulp-mocha": "0.0.37",
|
|
21
|
+
"@types/lodash": "^4.14.202",
|
|
22
|
+
"@types/mocha": "^10.0.6",
|
|
23
|
+
"@types/ncp": "^2.0.8",
|
|
24
|
+
"@types/node": ">=20.11.20",
|
|
25
|
+
"@types/pify": "^5.0.4",
|
|
26
|
+
"@types/semver": "^7.5.8",
|
|
27
|
+
"@typescript-eslint/eslint-plugin": "^7.1.0",
|
|
28
|
+
"@typescript-eslint/parser": "^7.1.0",
|
|
29
|
+
"@typescript-eslint/typescript-estree": "^7.1.0",
|
|
30
|
+
"clang-format": "^1.8.0",
|
|
31
|
+
"eslint": "^8.42.0",
|
|
32
|
+
"eslint-config-prettier": "^8.8.0",
|
|
33
|
+
"eslint-plugin-node": "^11.1.0",
|
|
34
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
35
|
+
"execa": "^2.0.3",
|
|
36
|
+
"gulp": "^4.0.2",
|
|
37
|
+
"gulp-mocha": "^6.0.0",
|
|
38
|
+
"lodash": "^4.17.21",
|
|
39
|
+
"madge": "^5.0.1",
|
|
40
|
+
"mocha-jenkins-reporter": "^0.4.1",
|
|
41
|
+
"ncp": "^2.0.0",
|
|
42
|
+
"pify": "^4.0.1",
|
|
43
|
+
"prettier": "^2.8.8",
|
|
44
|
+
"rimraf": "^3.0.2",
|
|
45
|
+
"semver": "^7.6.0",
|
|
46
|
+
"ts-node": "^10.9.2",
|
|
47
|
+
"typescript": "^5.3.3"
|
|
48
|
+
},
|
|
49
|
+
"contributors": [
|
|
50
|
+
{
|
|
51
|
+
"name": "Google Inc."
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
"scripts": {
|
|
55
|
+
"build": "npm run compile",
|
|
56
|
+
"clean": "rimraf ./build",
|
|
57
|
+
"compile": "tsc -p .",
|
|
58
|
+
"format": "clang-format -i -style=\"{Language: JavaScript, BasedOnStyle: Google, ColumnLimit: 80}\" src/*.ts test/*.ts",
|
|
59
|
+
"lint": "eslint src/*.ts test/*.ts",
|
|
60
|
+
"prepare": "npm run copy-protos && npm run generate-types && npm run generate-test-types && npm run compile",
|
|
61
|
+
"test": "gulp test",
|
|
62
|
+
"check": "npm run lint",
|
|
63
|
+
"fix": "eslint --fix src/*.ts test/*.ts",
|
|
64
|
+
"pretest": "npm run generate-types && npm run generate-test-types && npm run compile",
|
|
65
|
+
"posttest": "npm run check && madge -c ./build/src",
|
|
66
|
+
"generate-types": "proto-loader-gen-types --keepCase --longs String --enums String --defaults --oneofs --includeComments --includeDirs proto/ --include-dirs proto/ proto/xds/ proto/protoc-gen-validate/ -O src/generated/ --grpcLib ../index channelz.proto xds/service/orca/v3/orca.proto",
|
|
67
|
+
"generate-test-types": "proto-loader-gen-types --keepCase --longs String --enums String --defaults --oneofs --includeComments --include-dirs test/fixtures/ -O test/generated/ --grpcLib ../../src/index test_service.proto echo_service.proto",
|
|
68
|
+
"copy-protos": "node ./copy-protos"
|
|
69
|
+
},
|
|
70
|
+
"dependencies": {
|
|
71
|
+
"@grpc/proto-loader": "^0.8.0",
|
|
72
|
+
"@js-sdsl/ordered-map": "^4.4.2"
|
|
73
|
+
},
|
|
74
|
+
"files": [
|
|
75
|
+
"src/**/*.ts",
|
|
76
|
+
"build/src/**/*.{js,d.ts,js.map}",
|
|
77
|
+
"proto/**/*.proto",
|
|
78
|
+
"proto/**/LICENSE",
|
|
79
|
+
"LICENSE",
|
|
80
|
+
"deps/envoy-api/envoy/api/v2/**/*.proto",
|
|
81
|
+
"deps/envoy-api/envoy/config/**/*.proto",
|
|
82
|
+
"deps/envoy-api/envoy/service/**/*.proto",
|
|
83
|
+
"deps/envoy-api/envoy/type/**/*.proto",
|
|
84
|
+
"deps/udpa/udpa/**/*.proto",
|
|
85
|
+
"deps/googleapis/google/api/*.proto",
|
|
86
|
+
"deps/googleapis/google/rpc/*.proto",
|
|
87
|
+
"deps/protoc-gen-validate/validate/**/*.proto"
|
|
88
|
+
]
|
|
89
|
+
}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
{
|
|
2
|
+
"nested": {
|
|
3
|
+
"google": {
|
|
4
|
+
"nested": {
|
|
5
|
+
"protobuf": {
|
|
6
|
+
"nested": {
|
|
7
|
+
"Type": {
|
|
8
|
+
"fields": {
|
|
9
|
+
"name": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"id": 1
|
|
12
|
+
},
|
|
13
|
+
"fields": {
|
|
14
|
+
"rule": "repeated",
|
|
15
|
+
"type": "Field",
|
|
16
|
+
"id": 2
|
|
17
|
+
},
|
|
18
|
+
"oneofs": {
|
|
19
|
+
"rule": "repeated",
|
|
20
|
+
"type": "string",
|
|
21
|
+
"id": 3
|
|
22
|
+
},
|
|
23
|
+
"options": {
|
|
24
|
+
"rule": "repeated",
|
|
25
|
+
"type": "Option",
|
|
26
|
+
"id": 4
|
|
27
|
+
},
|
|
28
|
+
"sourceContext": {
|
|
29
|
+
"type": "SourceContext",
|
|
30
|
+
"id": 5
|
|
31
|
+
},
|
|
32
|
+
"syntax": {
|
|
33
|
+
"type": "Syntax",
|
|
34
|
+
"id": 6
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"Field": {
|
|
39
|
+
"fields": {
|
|
40
|
+
"kind": {
|
|
41
|
+
"type": "Kind",
|
|
42
|
+
"id": 1
|
|
43
|
+
},
|
|
44
|
+
"cardinality": {
|
|
45
|
+
"type": "Cardinality",
|
|
46
|
+
"id": 2
|
|
47
|
+
},
|
|
48
|
+
"number": {
|
|
49
|
+
"type": "int32",
|
|
50
|
+
"id": 3
|
|
51
|
+
},
|
|
52
|
+
"name": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"id": 4
|
|
55
|
+
},
|
|
56
|
+
"typeUrl": {
|
|
57
|
+
"type": "string",
|
|
58
|
+
"id": 6
|
|
59
|
+
},
|
|
60
|
+
"oneofIndex": {
|
|
61
|
+
"type": "int32",
|
|
62
|
+
"id": 7
|
|
63
|
+
},
|
|
64
|
+
"packed": {
|
|
65
|
+
"type": "bool",
|
|
66
|
+
"id": 8
|
|
67
|
+
},
|
|
68
|
+
"options": {
|
|
69
|
+
"rule": "repeated",
|
|
70
|
+
"type": "Option",
|
|
71
|
+
"id": 9
|
|
72
|
+
},
|
|
73
|
+
"jsonName": {
|
|
74
|
+
"type": "string",
|
|
75
|
+
"id": 10
|
|
76
|
+
},
|
|
77
|
+
"defaultValue": {
|
|
78
|
+
"type": "string",
|
|
79
|
+
"id": 11
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"nested": {
|
|
83
|
+
"Kind": {
|
|
84
|
+
"values": {
|
|
85
|
+
"TYPE_UNKNOWN": 0,
|
|
86
|
+
"TYPE_DOUBLE": 1,
|
|
87
|
+
"TYPE_FLOAT": 2,
|
|
88
|
+
"TYPE_INT64": 3,
|
|
89
|
+
"TYPE_UINT64": 4,
|
|
90
|
+
"TYPE_INT32": 5,
|
|
91
|
+
"TYPE_FIXED64": 6,
|
|
92
|
+
"TYPE_FIXED32": 7,
|
|
93
|
+
"TYPE_BOOL": 8,
|
|
94
|
+
"TYPE_STRING": 9,
|
|
95
|
+
"TYPE_GROUP": 10,
|
|
96
|
+
"TYPE_MESSAGE": 11,
|
|
97
|
+
"TYPE_BYTES": 12,
|
|
98
|
+
"TYPE_UINT32": 13,
|
|
99
|
+
"TYPE_ENUM": 14,
|
|
100
|
+
"TYPE_SFIXED32": 15,
|
|
101
|
+
"TYPE_SFIXED64": 16,
|
|
102
|
+
"TYPE_SINT32": 17,
|
|
103
|
+
"TYPE_SINT64": 18
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"Cardinality": {
|
|
107
|
+
"values": {
|
|
108
|
+
"CARDINALITY_UNKNOWN": 0,
|
|
109
|
+
"CARDINALITY_OPTIONAL": 1,
|
|
110
|
+
"CARDINALITY_REQUIRED": 2,
|
|
111
|
+
"CARDINALITY_REPEATED": 3
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
"Enum": {
|
|
117
|
+
"fields": {
|
|
118
|
+
"name": {
|
|
119
|
+
"type": "string",
|
|
120
|
+
"id": 1
|
|
121
|
+
},
|
|
122
|
+
"enumvalue": {
|
|
123
|
+
"rule": "repeated",
|
|
124
|
+
"type": "EnumValue",
|
|
125
|
+
"id": 2
|
|
126
|
+
},
|
|
127
|
+
"options": {
|
|
128
|
+
"rule": "repeated",
|
|
129
|
+
"type": "Option",
|
|
130
|
+
"id": 3
|
|
131
|
+
},
|
|
132
|
+
"sourceContext": {
|
|
133
|
+
"type": "SourceContext",
|
|
134
|
+
"id": 4
|
|
135
|
+
},
|
|
136
|
+
"syntax": {
|
|
137
|
+
"type": "Syntax",
|
|
138
|
+
"id": 5
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"EnumValue": {
|
|
143
|
+
"fields": {
|
|
144
|
+
"name": {
|
|
145
|
+
"type": "string",
|
|
146
|
+
"id": 1
|
|
147
|
+
},
|
|
148
|
+
"number": {
|
|
149
|
+
"type": "int32",
|
|
150
|
+
"id": 2
|
|
151
|
+
},
|
|
152
|
+
"options": {
|
|
153
|
+
"rule": "repeated",
|
|
154
|
+
"type": "Option",
|
|
155
|
+
"id": 3
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
"Option": {
|
|
160
|
+
"fields": {
|
|
161
|
+
"name": {
|
|
162
|
+
"type": "string",
|
|
163
|
+
"id": 1
|
|
164
|
+
},
|
|
165
|
+
"value": {
|
|
166
|
+
"type": "Any",
|
|
167
|
+
"id": 2
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
"Syntax": {
|
|
172
|
+
"values": {
|
|
173
|
+
"SYNTAX_PROTO2": 0,
|
|
174
|
+
"SYNTAX_PROTO3": 1
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
"Any": {
|
|
178
|
+
"fields": {
|
|
179
|
+
"type_url": {
|
|
180
|
+
"type": "string",
|
|
181
|
+
"id": 1
|
|
182
|
+
},
|
|
183
|
+
"value": {
|
|
184
|
+
"type": "bytes",
|
|
185
|
+
"id": 2
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
"SourceContext": {
|
|
190
|
+
"fields": {
|
|
191
|
+
"fileName": {
|
|
192
|
+
"type": "string",
|
|
193
|
+
"id": 1
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Detect if the current environment is headless (no browser available).
|
|
3
|
+
*
|
|
4
|
+
* Used to determine whether to use the PKCE localhost callback flow
|
|
5
|
+
* (desktop) or the RFC 8628 device authorization flow (headless/SSH).
|
|
6
|
+
*
|
|
7
|
+
* Checks in order:
|
|
8
|
+
* 1. SSH session (SSH_CLIENT, SSH_TTY)
|
|
9
|
+
* 2. CI environments (CI, GITHUB_ACTIONS, GITLAB_CI)
|
|
10
|
+
* 3. Container environments (container, DOCKER_CONTAINER)
|
|
11
|
+
* 4. Linux without display server (no DISPLAY and no WAYLAND_DISPLAY)
|
|
12
|
+
*/
|
|
13
|
+
export declare function isHeadless(): boolean;
|
|
14
|
+
//# sourceMappingURL=headless-detect.d.ts.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import "../chunk-gOLHoazu.js";
|
|
2
|
+
//#region src/auth/headless-detect.ts
|
|
3
|
+
/**
|
|
4
|
+
* Detect if the current environment is headless (no browser available).
|
|
5
|
+
*
|
|
6
|
+
* Used to determine whether to use the PKCE localhost callback flow
|
|
7
|
+
* (desktop) or the RFC 8628 device authorization flow (headless/SSH).
|
|
8
|
+
*
|
|
9
|
+
* Checks in order:
|
|
10
|
+
* 1. SSH session (SSH_CLIENT, SSH_TTY)
|
|
11
|
+
* 2. CI environments (CI, GITHUB_ACTIONS, GITLAB_CI)
|
|
12
|
+
* 3. Container environments (container, DOCKER_CONTAINER)
|
|
13
|
+
* 4. Linux without display server (no DISPLAY and no WAYLAND_DISPLAY)
|
|
14
|
+
*/
|
|
15
|
+
function isHeadless() {
|
|
16
|
+
if (process.env.SSH_CLIENT || process.env.SSH_TTY) return true;
|
|
17
|
+
if (process.env.CI || process.env.GITHUB_ACTIONS || process.env.GITLAB_CI) return true;
|
|
18
|
+
if (process.env.container || process.env.DOCKER_CONTAINER) return true;
|
|
19
|
+
if (process.platform === "linux" && !process.env.DISPLAY && !process.env.WAYLAND_DISPLAY) return true;
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
export { isHeadless };
|
|
24
|
+
|
|
25
|
+
//# sourceMappingURL=headless-detect.js.map
|
package/dist/cli.d.ts
ADDED
package/dist/cli.js
ADDED
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import "./chunk-gOLHoazu.js";
|
|
3
|
+
import { compileCommand } from "./commands/compile.js";
|
|
4
|
+
import { watchCommand } from "./commands/watch.js";
|
|
5
|
+
import { fixtureCommand } from "./commands/fixture.js";
|
|
6
|
+
import { testCommand } from "./commands/test.js";
|
|
7
|
+
import { runLocalCommand, runRemoteCommand } from "./commands/run.js";
|
|
8
|
+
import { initCommand } from "./commands/init.js";
|
|
9
|
+
import { hookInstallCommand } from "./commands/hook.js";
|
|
10
|
+
import { loginCommand } from "./commands/login.js";
|
|
11
|
+
import { secretsListCommand } from "./commands/secrets-list.js";
|
|
12
|
+
import { statusCommand } from "./commands/status.js";
|
|
13
|
+
import { typesCommand } from "./commands/types.js";
|
|
14
|
+
import { endpointsCommand } from "./commands/endpoints.js";
|
|
15
|
+
import { orgCurrentCommand, orgListCommand, orgUseCommand } from "./commands/org.js";
|
|
16
|
+
import { logoutCommand } from "./commands/logout.js";
|
|
17
|
+
import { cancelCommand } from "./commands/cancel.js";
|
|
18
|
+
import { workflowsListCommand } from "./commands/workflows.js";
|
|
19
|
+
import { drainWorkerCommand } from "./commands/drain-worker.js";
|
|
20
|
+
import { docsCommand, docsLlmCommand } from "./commands/docs.js";
|
|
21
|
+
import "./commands/index.js";
|
|
22
|
+
import { Argument, Command, Option } from "commander";
|
|
23
|
+
import pc from "picocolors";
|
|
24
|
+
//#region src/cli.ts
|
|
25
|
+
const version = typeof KICI_VERSION !== "undefined" ? KICI_VERSION : "0.0.1";
|
|
26
|
+
const program = new Command();
|
|
27
|
+
program.name("kici").description("KiCI workflow compiler").version(version);
|
|
28
|
+
program.hook("preAction", () => {
|
|
29
|
+
console.log(pc.gray(`kici v${version}`));
|
|
30
|
+
});
|
|
31
|
+
program.configureOutput({ outputError: (str, write) => {
|
|
32
|
+
write(pc.red(str));
|
|
33
|
+
} });
|
|
34
|
+
program.command("compile").description("Compile workflows from .kici/workflows/ to kici.lock.json").option("--check", "Validate workflows without writing lock file", false).option("--kici-dir <path>", "Path to .kici directory", ".kici").option("--verbose", "Detailed output", false).option("--watch", "Watch for changes and recompile", false).action(async (options) => {
|
|
35
|
+
if (options.watch) await watchCommand({
|
|
36
|
+
kiciDir: options.kiciDir,
|
|
37
|
+
verbose: options.verbose
|
|
38
|
+
});
|
|
39
|
+
else {
|
|
40
|
+
const success = await compileCommand({
|
|
41
|
+
kiciDir: options.kiciDir,
|
|
42
|
+
check: options.check,
|
|
43
|
+
verbose: options.verbose
|
|
44
|
+
});
|
|
45
|
+
process.exit(success ? 0 : 1);
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
const fixtureEventArg = new Argument("<event>", "Event to generate fixture for (e.g., pr:open, push, schedule, lifecycle:workflow_complete)");
|
|
49
|
+
program.command("fixture").addArgument(fixtureEventArg).description("Generate fixture template for event type").option("--output <path>", "Write to file instead of stdout").action(async (event, options) => {
|
|
50
|
+
await fixtureCommand(event, options);
|
|
51
|
+
});
|
|
52
|
+
const runCommand = program.command("run").description("Execute workflows locally or remotely");
|
|
53
|
+
runCommand.command("local").argument("[event]", "Event type (e.g., push, pr:open, schedule) — optional with --pick").description("Execute workflows locally without orchestrator infrastructure").option("-p, --pick", "Interactively pick a workflow and trigger to simulate", false).option("--workflow <name>", "Run only the specified workflow").option("--job <name>", "Run only the specified job (and its dependencies)").option("--branch <name>", "Override detected git branch").option("--sha <hash>", "Override detected git SHA").option("--payload <path>", "Path to explicit event payload JSON file").option("--concurrency <n>", "Max parallel jobs (default: CPU cores)", parseInt).option("--keep-going", "Continue after job failure", false).option("--container", "Use Podman container isolation", false).option("--env <KEY=VALUE>", "Environment variable override (repeatable)", (val, prev) => [...prev, val], []).option("--quiet", "Suppress streaming output", false).option("--json", "Output structured JSON result", false).option("--junit <path>", "Output JUnit XML result").option("--files <path>", "Override changed file paths (repeatable, default: git diff)", (val, prev) => [...prev, val], []).option("--debug", "Verbose internals", false).option("--kici-dir <path>", "Path to .kici directory", ".kici").action(async (event, options) => {
|
|
54
|
+
if (options.pick && options.workflow) {
|
|
55
|
+
console.error("Error: --pick is mutually exclusive with --workflow.");
|
|
56
|
+
process.exit(2);
|
|
57
|
+
}
|
|
58
|
+
if (!options.pick && !event) {
|
|
59
|
+
console.error("Error: missing event argument. Pass an event or use --pick.");
|
|
60
|
+
process.exit(2);
|
|
61
|
+
}
|
|
62
|
+
const success = await runLocalCommand({
|
|
63
|
+
event,
|
|
64
|
+
pick: options.pick,
|
|
65
|
+
workflow: options.workflow,
|
|
66
|
+
job: options.job,
|
|
67
|
+
branch: options.branch,
|
|
68
|
+
sha: options.sha,
|
|
69
|
+
payload: options.payload,
|
|
70
|
+
concurrency: options.concurrency,
|
|
71
|
+
keepGoing: options.keepGoing,
|
|
72
|
+
container: options.container,
|
|
73
|
+
env: options.env,
|
|
74
|
+
quiet: options.quiet,
|
|
75
|
+
json: options.json,
|
|
76
|
+
junit: options.junit,
|
|
77
|
+
files: options.files,
|
|
78
|
+
debug: options.debug,
|
|
79
|
+
kiciDir: options.kiciDir
|
|
80
|
+
});
|
|
81
|
+
process.exit(success ? 0 : 1);
|
|
82
|
+
});
|
|
83
|
+
runCommand.command("remote").argument("[fixture]", "Fixture name or glob pattern (omit to list available)").description("Execute fixtures remotely via orchestrator").option("--workflow <name>", "Run a specific workflow directly (bypass triggers)").option("--all", "Run all available fixtures", false).option("--parallel", "Run matching fixtures concurrently", false).option("--no-wait", "Fire and forget (print runIds, don't stream)").option("--quiet", "Suppress output except final result", false).option("--json", "Output structured JSON result", false).option("--junit <path>", "Output JUnit XML result").option("--history", "Show recent run history", false).option("--routing-key <key>", "Override routing key for this run").option("--debug", "Verbose internals", false).option("--kici-dir <path>", "Path to .kici directory", ".kici").option("--secret <key=value>", "Inject flat secret (repeatable)", (val, prev) => [...prev, val], []).option("--context <ctx.key=value>", "Inject context secret (repeatable)", (val, prev) => [...prev, val], []).action(async (fixture, options) => {
|
|
84
|
+
const success = await runRemoteCommand(fixture, options);
|
|
85
|
+
process.exit(success ? 0 : 1);
|
|
86
|
+
});
|
|
87
|
+
program.command("test").argument("[event]", "Event type to preview (e.g., push, pr:open, schedule)").description("Preview which workflows match a trigger event (dry-run)").option("--branch <name>", "Override target branch for trigger matching (default: main)").option("--sha <hash>", "Override commit SHA").option("--workflow <name>", "Filter to specific workflow in display").option("--job <name>", "Filter to specific job in display").option("--debug", "Verbose internals", false).option("--kici-dir <path>", "Path to .kici directory", ".kici").option("--files <path>", "Simulate changed file path for trigger matching (repeatable)", (val, prev) => [...prev, val], []).option("--secret <key=value>", "Inject flat secret (repeatable)", (val, prev) => [...prev, val], []).option("--context <ctx.key=value>", "Inject context secret (repeatable)", (val, prev) => [...prev, val], []).action(async (event, options) => {
|
|
88
|
+
const success = await testCommand(event, options);
|
|
89
|
+
process.exit(success ? 0 : 1);
|
|
90
|
+
});
|
|
91
|
+
program.command("init").description("Initialize .kici/ directory with default workflows").option("--force", "Overwrite existing .kici/ directory", false).option("--skip-install", "Create files without running npm install", false).option("--mjs", "JavaScript-only mode (no TypeScript, no dependencies)", false).option("--no-agents-md", "Skip writing .kici/AGENTS.md (LLM authoring context)").option("--private-registry <url>", "Scaffold a workflow registries: entry pointing at <url>").option("--private-registry-scope <scope>", "Optional npm package scope (e.g. @my-org) for the private registry").option("--private-registry-secret <ref>", "Qualified secret reference (env:NAME) the private registry token comes from", "production:NPM_TOKEN").addOption(new Option("--use-verdaccio-local").default(false).hideHelp()).action(async (options) => {
|
|
92
|
+
const success = await initCommand({
|
|
93
|
+
...options,
|
|
94
|
+
noAgentsMd: options.agentsMd === false
|
|
95
|
+
});
|
|
96
|
+
process.exit(success ? 0 : 1);
|
|
97
|
+
});
|
|
98
|
+
program.command("hook").description("Manage pre-commit hooks").command("install").description("Install kici compile pre-commit hook").option("--git", "Use raw git hook (.git/hooks/pre-commit)", false).action(async (options) => {
|
|
99
|
+
const success = await hookInstallCommand({ git: options.git });
|
|
100
|
+
process.exit(success ? 0 : 1);
|
|
101
|
+
});
|
|
102
|
+
program.command("login").description("Authenticate with KiCI via browser OAuth (default) or API key (--token)").option("--token <key>", "API key for direct authentication (legacy)").option("--device", "Force device authorization flow (for headless/SSH environments)").option("--endpoint <url>", "Orchestrator URL for direct connection").option("--platform-endpoint <url>", "Platform relay URL").option("--routing-key <key>", "Routing key for webhook source identification").addHelpText("after", `
|
|
103
|
+
Environment variables:
|
|
104
|
+
KICI_BROWSER_CMD Custom browser command (use {url} placeholder, or 'none' to suppress)
|
|
105
|
+
KICI_CALLBACK_PORT Fixed port for OAuth PKCE callback server (default: random)
|
|
106
|
+
KICI_CONFIG_DIR Override config directory (default: ~/.kici)
|
|
107
|
+
KICI_OIDC_ISSUER Override OIDC issuer URL
|
|
108
|
+
KICI_OIDC_CLIENT_ID Override OIDC client ID
|
|
109
|
+
`).action(async (options) => {
|
|
110
|
+
const success = await loginCommand({
|
|
111
|
+
token: options.token,
|
|
112
|
+
device: options.device,
|
|
113
|
+
endpoint: options.endpoint,
|
|
114
|
+
platformEndpoint: options.platformEndpoint,
|
|
115
|
+
routingKey: options.routingKey
|
|
116
|
+
});
|
|
117
|
+
process.exit(success ? 0 : 1);
|
|
118
|
+
});
|
|
119
|
+
program.command("logout").description("Revoke PAT and clear local credentials").action(async () => {
|
|
120
|
+
const success = await logoutCommand();
|
|
121
|
+
process.exit(success ? 0 : 1);
|
|
122
|
+
});
|
|
123
|
+
const orgCommand = program.command("org").description("Manage organizations");
|
|
124
|
+
orgCommand.command("list").description("List organizations you belong to").action(async () => {
|
|
125
|
+
const success = await orgListCommand();
|
|
126
|
+
process.exit(success ? 0 : 1);
|
|
127
|
+
});
|
|
128
|
+
orgCommand.command("use").argument("<name>", "Organization name or ID").description("Switch active organization").action(async (name) => {
|
|
129
|
+
const success = await orgUseCommand(name);
|
|
130
|
+
process.exit(success ? 0 : 1);
|
|
131
|
+
});
|
|
132
|
+
orgCommand.command("current").description("Show current active organization").action(async () => {
|
|
133
|
+
const success = await orgCurrentCommand();
|
|
134
|
+
process.exit(success ? 0 : 1);
|
|
135
|
+
});
|
|
136
|
+
program.command("secrets").description("Manage secrets").command("list").description("List test-available secret contexts").option("--endpoint <url>", "Orchestrator URL override").action(async (options) => {
|
|
137
|
+
const success = await secretsListCommand({ endpoint: options.endpoint });
|
|
138
|
+
process.exit(success ? 0 : 1);
|
|
139
|
+
});
|
|
140
|
+
program.command("status").argument("<run-id>", "Run ID to inspect").description("Show status and details of a test run").option("--logs", "Stream full log replay", false).option("--job <name>", "Filter logs to specific job").option("--json", "Output raw JSON", false).action(async (runId, options) => {
|
|
141
|
+
const success = await statusCommand(runId, {
|
|
142
|
+
logs: options.logs,
|
|
143
|
+
job: options.job,
|
|
144
|
+
json: options.json
|
|
145
|
+
});
|
|
146
|
+
process.exit(success ? 0 : 1);
|
|
147
|
+
});
|
|
148
|
+
program.command("cancel").argument("[run-id]", "Run ID to cancel").description("Cancel a running workflow or all runs on a branch").option("--force", "Force cancel (kill immediately, skip hooks)", false).option("--branch <name>", "Cancel all in-progress runs on this branch").action(async (runId, options) => {
|
|
149
|
+
const success = await cancelCommand(runId, {
|
|
150
|
+
force: options.force,
|
|
151
|
+
branch: options.branch
|
|
152
|
+
});
|
|
153
|
+
process.exit(success ? 0 : 1);
|
|
154
|
+
});
|
|
155
|
+
program.command("types").description("Generate TypeScript declarations for secret contexts").option("--kici-dir <path>", "Path to .kici directory", ".kici").option("--endpoint <url>", "Orchestrator URL override").action(async (options) => {
|
|
156
|
+
const success = await typesCommand({
|
|
157
|
+
kiciDir: options.kiciDir,
|
|
158
|
+
endpoint: options.endpoint
|
|
159
|
+
});
|
|
160
|
+
process.exit(success ? 0 : 1);
|
|
161
|
+
});
|
|
162
|
+
program.command("endpoints").description("List all webhook entrypoints for the current project").option("--kici-dir <path>", "Path to .kici directory", ".kici").action(async (options) => {
|
|
163
|
+
const success = await endpointsCommand({ kiciDir: options.kiciDir });
|
|
164
|
+
process.exit(success ? 0 : 1);
|
|
165
|
+
});
|
|
166
|
+
program.command("workflows").description("Manage workflow registrations").command("list").description("List permanently registered workflows").option("--json", "Output as JSON", false).option("--stale <duration>", "Filter stale registrations (e.g., 30d, 7d)").option("--trigger-type <type>", "Filter by trigger type").option("--repo <repo>", "Filter by repository").action(async (options) => {
|
|
167
|
+
const success = await workflowsListCommand({
|
|
168
|
+
json: options.json,
|
|
169
|
+
stale: options.stale,
|
|
170
|
+
triggerType: options.triggerType,
|
|
171
|
+
repo: options.repo
|
|
172
|
+
});
|
|
173
|
+
process.exit(success ? 0 : 1);
|
|
174
|
+
});
|
|
175
|
+
program.command("docs").description("Open the KiCI documentation site in the default browser").option("--no-open", "Print the docs URL instead of opening a browser").action(async (options) => {
|
|
176
|
+
const success = await docsCommand({ open: options.open });
|
|
177
|
+
process.exit(success ? 0 : 1);
|
|
178
|
+
}).command("llm").description("Print the bundled LLM context (llms-full.txt) to stdout").option("--index", "Print the curated llms.txt index instead of the full bundle", false).option("--out <path>", "Write the bundle to a file instead of stdout").action(async (options) => {
|
|
179
|
+
const success = await docsLlmCommand({
|
|
180
|
+
index: options.index,
|
|
181
|
+
out: options.out
|
|
182
|
+
});
|
|
183
|
+
process.exit(success ? 0 : 1);
|
|
184
|
+
});
|
|
185
|
+
program.command("admin").description("Operator-facing commands for running instances").command("drain-worker").description("Trigger graceful drain on a worker instance").requiredOption("--url <url>", "Worker URL (e.g., http://worker-host:<port>)").action(async (options) => {
|
|
186
|
+
const success = await drainWorkerCommand({ url: options.url });
|
|
187
|
+
process.exit(success ? 0 : 1);
|
|
188
|
+
});
|
|
189
|
+
program.parse();
|
|
190
|
+
//#endregion
|
|
191
|
+
export {};
|
|
192
|
+
|
|
193
|
+
//# sourceMappingURL=cli.js.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* kici cancel command
|
|
3
|
+
*
|
|
4
|
+
* Cancels a specific run by ID, or all in-progress runs on a branch.
|
|
5
|
+
* Uses the Platform dashboard API (PAT auth) or orchestrator API (direct mode).
|
|
6
|
+
*/
|
|
7
|
+
/** Options for the cancel command */
|
|
8
|
+
export interface CancelOptions {
|
|
9
|
+
/** Force cancel (SIGKILL, skip hooks) */
|
|
10
|
+
force?: boolean;
|
|
11
|
+
/** Cancel all in-progress runs on this branch */
|
|
12
|
+
branch?: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Cancel a run or all runs on a branch.
|
|
16
|
+
*
|
|
17
|
+
* @param runId - Run ID to cancel (optional if --branch is provided)
|
|
18
|
+
* @param options - Cancel options
|
|
19
|
+
* @returns true on success, false on error
|
|
20
|
+
*/
|
|
21
|
+
export declare function cancelCommand(runId: string | undefined, options?: CancelOptions): Promise<boolean>;
|
|
22
|
+
//# sourceMappingURL=cancel.d.ts.map
|