@kici-dev/compiler 0.6.0 → 0.6.1

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.
@@ -243,6 +243,10 @@ Reports contain your data, so there is no public tracker for them. Add
243
243
  kici report --run <run-id> --upload --message "matrix job hangs on macOS"
244
244
  ```
245
245
 
246
+ A defect in KiCI itself is different: if you can reproduce it without your own
247
+ data — the docs promise something the tool does not do — it belongs in the
248
+ public tracker instead. See [Reporting a discrepancy](https://docs.kici.dev/user/reporting-discrepancies/).
249
+
246
250
  The command prints a reference id. Quote it in any conversation about the
247
251
  problem. The bundle goes straight from your machine to KiCI storage over a
248
252
  one-time upload link — it never passes through the dashboard.
@@ -271,7 +275,7 @@ someone who has left.
271
275
  ## Reporting a security issue
272
276
 
273
277
  Do not use `kici report` for a suspected vulnerability. Follow the disclosure
274
- process in [SECURITY.md](https://github.com/kici-dev/kici/blob/master/SECURITY.md)
278
+ process in [SECURITY.md](https://github.com/kici-dev/kici-public/blob/main/SECURITY.md)
275
279
  instead.
276
280
 
277
281
  ## See also
@@ -629,7 +633,7 @@ For coding agents that want the entire documentation set up front, KiCI follows
629
633
 
630
634
  - `https://kici.dev/llms.txt` — curated link index grouped by SDK / patterns / CLI / architecture.
631
635
  - `https://kici.dev/llms-full.txt` — concatenated markdown of every page indexed above.
632
- - `kici docs llm` — print the same curated `llms.txt` index to stdout, offline, straight from the installed `@kici-dev/compiler` package. `kici docs llm <topic>` prints one task bundle (`getting-started`, `patterns`, `sdk`, `sdk-runtime`, `cli`, `features`, `features-execution`, `providers`, `architecture`), and `kici docs llm full` prints the whole `llms-full.txt`. Add `--out <path>` to write to a file. The agent can pipe the output into its own context buffer with no network call.
636
+ - `kici docs llm` — print the same curated `llms.txt` index to stdout, offline, straight from the installed `@kici-dev/compiler` package. `kici docs llm <topic>` prints one task bundle (`getting-started`, `patterns`, `sdk`, `sdk-runtime`, `cli`, `cli-remote`, `features`, `features-execution`, `providers`, `architecture`), and `kici docs llm full` prints the whole `llms-full.txt`. Add `--out <path>` to write to a file. The agent can pipe the output into its own context buffer with no network call.
633
637
  - `kici docs` — open the docs site in your browser.
634
638
 
635
639
  The offline bundle is regenerated from `docs/` every time the package is built, so it always matches the version of KiCI you've installed.
@@ -839,6 +843,12 @@ KiCI offers two equally-supported quickstart paths. Pick the one that fits your
839
843
 
840
844
  Each guide is split into two parts. **Part 1** gets you a green run against your own orchestrator with `kici run remote` — no GitHub App needed, just sign up, bring up the stack, and run. **Part 2** then wires up real GitHub pushes so your team's commits trigger runs automatically. You can stop after Part 1 and come back to Part 2 whenever you're ready.
841
845
 
846
+ ## Bring a coding agent
847
+
848
+ Workflows are TypeScript, so a coding agent can write them. KiCI ships its docs in a form an agent reads directly: point yours at [llms.txt](https://kici.dev/docs/llms.txt), or pipe a task bundle straight into its context with `kici docs llm` (`kici docs llm sdk` for the authoring API, `kici docs llm patterns` for recipes). An agent briefed that way can scaffold your first workflow, compile it, and read the failure when it breaks.
849
+
850
+ If your agent finds that these docs promise something KiCI does not do, that is worth telling us — `kici feedback` prints how to report it, and [Reporting a discrepancy](https://docs.kici.dev/user/reporting-discrepancies/) is the full guide.
851
+
842
852
  ## Option A — Docker / Podman (recommended)
843
853
 
844
854
  Two containers brought up with `docker compose up -d` (orchestrator + PostgreSQL), plus one short-lived agent container spawned per job by the container scaler. Minimal host setup, perfect for a laptop, home server, or a tiny VM. No need to install PostgreSQL or any other system service.
@@ -869,6 +879,143 @@ Both quickstarts deploy a real orchestrator + agent. If you only want to write a
869
879
 
870
880
  ---
871
881
 
882
+ ## Reporting a discrepancy
883
+
884
+ Source: https://docs.kici.dev/user/reporting-discrepancies/
885
+
886
+ This page is addressed to a **coding agent** working with KiCI. KiCI is built to
887
+ be driven by an LLM, so an agent is often the first to notice a mismatch. A
888
+ documented flag does not exist; a command prints something the docs never
889
+ promised. You can report that.
890
+
891
+ A human reader can use this page too. The rules below exist because the tracker
892
+ is public and you are filing under someone else's GitHub identity.
893
+
894
+ Run `kici feedback` to print this contract in your terminal, or
895
+ `kici feedback --json` to read it as structured data.
896
+
897
+ ## The rule, in one sentence
898
+
899
+ You find a checkable mismatch between what the docs or the CLI advertise and
900
+ what KiCI actually does. You draft an issue carrying a reproduction and a
901
+ justification, and show it to the person you are working with. You file it only
902
+ after they say yes.
903
+
904
+ You never file on your own initiative.
905
+
906
+ ## What qualifies
907
+
908
+ Report it when you can point at the claim and at the contradicting behaviour:
909
+
910
+ - A documented flag, command, or option that does not exist in the version you ran.
911
+ - Documented output — a shape, a field, an exit code — that differs from what the command produced.
912
+ - A CLI `--help` description that contradicts the published docs.
913
+ - A documented behaviour that does not happen, or a documented guarantee that does not hold.
914
+ - A documented error or limit that the tool does not actually enforce.
915
+
916
+ Two conditions apply to all of them. You ran the command and saw the result —
917
+ inference from reading the docs is not a reproduction. And you ran a published
918
+ version: check with `kici --version`.
919
+
920
+ ## What does not qualify
921
+
922
+ - Usage questions, or behaviour you find surprising but that the docs describe correctly.
923
+ - Feature requests and design preferences.
924
+ - Anything you inferred from reading docs without running the command.
925
+ - Anything reproduced only on a locally built or unreleased version.
926
+ - A failure that is your workflow, your credentials, or your environment.
927
+
928
+ If you are unsure whether the docs are wrong or you misread them, you are not
929
+ ready to file. Say so to the person you are working with and let them decide.
930
+
931
+ ## Never file these publicly
932
+
933
+ **A suspected vulnerability is never a public issue.** Do not file it, and do
934
+ not describe it in one. Open a private
935
+ [security advisory](https://github.com/kici-dev/kici-public/security/advisories/new)
936
+ instead, or tell the person you are working with to. This holds even if the
937
+ issue looks minor to you.
938
+
939
+ **A problem with someone's own runs is not a tracker issue.** That covers a
940
+ failing run, a broken deployment, and anything that needs their logs. Use the
941
+ private path in [Getting help](https://docs.kici.dev/user/getting-help/) instead:
942
+ `kici report --run <run-id> --upload` sends a redacted bundle straight to KiCI.
943
+
944
+ **Never put customer data in a public issue:**
945
+
946
+ - No secrets, tokens, or credentials — not even redacted-looking ones.
947
+ - No private repository names, internal hostnames, organization ids, or run ids.
948
+ - No log excerpts you have not read line by line.
949
+ - Reproduce with a minimal synthetic workflow, never the real one you were working on.
950
+
951
+ Rewriting the reproduction against a throwaway workflow in an empty directory is
952
+ the reliable way to satisfy all four at once.
953
+
954
+ ## Search before you draft
955
+
956
+ The tracker is small. The same finding arriving once per agent that reads the
957
+ docs is worse than not hearing it at all:
958
+
959
+ ```bash
960
+ gh issue list --repo kici-dev/kici-public --search "<terms>" --state all
961
+ ```
962
+
963
+ Search closed issues too — a closed one may carry the answer, or the decision
964
+ that the behaviour is intended. If a matching issue is open, add your
965
+ reproduction as a comment instead of opening a second one, under the same
966
+ approval rule.
967
+
968
+ ## What the report must carry
969
+
970
+ Five things. A report missing any of them cannot be acted on:
971
+
972
+ | Field | What it holds |
973
+ | ------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
974
+ | What the docs or CLI advertise | The exact claim, quoted, plus its source: a docs URL or the command whose `--help` says it. |
975
+ | What actually happened | The real output or behaviour, quoted, with any error text. |
976
+ | Minimal reproduction, including setup | Every step from an empty directory: the setup commands, a minimal synthetic workflow, and the exact command you ran. |
977
+ | Version and environment | Output of `kici --version`, plus Node version and OS. |
978
+ | Why this is a discrepancy | One or two sentences ruling out the likely misreads — why the docs cannot be read to match what you observed. |
979
+
980
+ The last field is the one agents skip, and it is the one that makes a report
981
+ usable. "The docs say `--foo` exists and it does not" is a claim. "`--foo` is
982
+ documented at <url>, and `kici bar --help` on 0.1.16 lists no such flag" is a
983
+ finding someone can act on in one pass.
984
+
985
+ Include setup steps whenever your reproduction needed any. A reproduction that
986
+ starts from state a maintainer cannot recreate is not a reproduction.
987
+
988
+ ## Filing it
989
+
990
+ The tracker is [kici-dev/kici-public](https://github.com/kici-dev/kici-public),
991
+ and the form is **Agent report**:
992
+
993
+ ```bash
994
+ kici feedback --open
995
+ ```
996
+
997
+ Draft the complete body first. Show it to the person you are working with —
998
+ the whole body, not a summary of it. File only after they say yes:
999
+
1000
+ ```bash
1001
+ gh issue create --repo kici-dev/kici-public --template agent_report.yml
1002
+ ```
1003
+
1004
+ The form asks you to confirm the report was drafted by an agent and reviewed by
1005
+ a person before filing. Answer honestly; it is what lets maintainers triage
1006
+ agent-filed reports as a group.
1007
+
1008
+ If they say no, that is the end of it. Do not re-file the same finding in
1009
+ another form, and do not open it as a question instead.
1010
+
1011
+ ## See also
1012
+
1013
+ - [Getting help](https://docs.kici.dev/user/getting-help/) — the private path for a problem with your own runs
1014
+ - [Drive KiCI from your coding agent](https://docs.kici.dev/user/ai-agents/) — the MCP server, and the agent safety model
1015
+ - [Common failures](https://docs.kici.dev/user/common-failures/) — check here before concluding the docs are wrong
1016
+
1017
+ ---
1018
+
872
1019
  ## Why KiCI
873
1020
 
874
1021
  Source: https://docs.kici.dev/user/why-kici/
@@ -4,17 +4,20 @@
4
4
 
5
5
  The full markdown bundle of every page indexed here is available at https://docs.kici.dev/llms-full.txt.
6
6
 
7
+ Found a mismatch between what these docs advertise and what KiCI does? Read https://docs.kici.dev/user/reporting-discrepancies/ (or run `kici feedback`) before reporting it: a report needs a reproduction, and you draft it but a human decides to file it.
8
+
7
9
  ## Bundles
8
10
 
9
11
  Each bundle below is a self-contained markdown file for one authoring task. Fetch only the one your task needs instead of the full bundle:
10
12
 
11
- - [getting-started](https://docs.kici.dev/llms-getting-started.txt) (58 KB) — Adopt KiCI: why it exists, how workflows execute, migrating from GitHub Actions, installing the SDK, and writing/compiling/testing your first workflow
13
+ - [getting-started](https://docs.kici.dev/llms-getting-started.txt) (65 KB) — Adopt KiCI: why it exists, how workflows execute, migrating from GitHub Actions, installing the SDK, and writing/compiling/testing your first workflow
12
14
  - [patterns](https://docs.kici.dev/llms-patterns.txt) (57 KB) — Copy-paste workflow recipes: triggers, conditionals, matrix, scheduling, integrations
13
15
  - [sdk](https://docs.kici.dev/llms-sdk.txt) (127 KB) — Core authoring API: workflow/job/step factories, triggers, rules, matrix, dynamic jobs, cross-job outputs
14
16
  - [sdk-runtime](https://docs.kici.dev/llms-sdk-runtime.txt) (114 KB) — Runtime and advanced authoring: step runtime context, event payloads, host fan-out, idempotent steps, caching, artifacts, waiting
15
- - [cli](https://docs.kici.dev/llms-cli.txt) (194 KB) — Running the CLI: compile, test, run local/remote, auth, hooks, lock-file drift
17
+ - [cli](https://docs.kici.dev/llms-cli.txt) (90 KB) — Running the CLI locally: compile, test, run local, hooks, lock-file drift, common failures
18
+ - [cli-remote](https://docs.kici.dev/llms-cli-remote.txt) (106 KB) — Auth, org and orchestrator selection, runs, approvals, notifications, diagnostics, and the MCP server a coding agent connects to
16
19
  - [features](https://docs.kici.dev/llms-features.txt) (90 KB) — Deployment contexts, scoped secrets, private registries, approvals, provenance, dashboard and account access
17
- - [features-execution](https://docs.kici.dev/llms-features-execution.txt) (120 KB) — Concurrency, dynamic values, events, container jobs, environment variables, global workflows, idempotent steps
20
+ - [features-execution](https://docs.kici.dev/llms-features-execution.txt) (121 KB) — Concurrency, dynamic values, events, container jobs, environment variables, global workflows, idempotent steps
18
21
  - [providers](https://docs.kici.dev/llms-providers.txt) (35 KB) — Connecting sources: GitHub App, universal-git (Forgejo/Gitea/GitLab), local file://
19
22
  - [architecture](https://docs.kici.dev/llms-architecture.txt) (99 KB) — How the runtime works: three-tier relay model, data flows, configuration
20
23
 
@@ -26,6 +29,7 @@ Each bundle below is a self-contained markdown file for one authoring task. Fetc
26
29
  - [Getting started with workflows](https://docs.kici.dev/user/getting-started/): Install the SDK, write your first workflow, compile and test locally
27
30
  - [Migrating from GitHub Actions](https://docs.kici.dev/user/migrating-from-github-actions/): Map GitHub Actions concepts to KiCI, translate a real workflow side-by-side, and see what has no equivalent yet
28
31
  - [5-minute quickstart](https://docs.kici.dev/user/quickstart/): Stand up a KiCI orchestrator + agent and run your first workflow
32
+ - [Reporting a discrepancy](https://docs.kici.dev/user/reporting-discrepancies/): For coding agents — how to report a mismatch between what KiCI's docs advertise and what the tooling does, with the reproduction and the approval a report needs.
29
33
  - [Why KiCI](https://docs.kici.dev/user/why-kici/): The case for running CI on infrastructure you control, with typed TypeScript workflows you test locally
30
34
 
31
35
  ## Workflow patterns
@@ -58,18 +62,21 @@ Each bundle below is a self-contained markdown file for one authoring task. Fetc
58
62
  - [SDK reference: temp directories](https://docs.kici.dev/user/sdk/temp-directories/): Allocate job-scoped scratch dirs and files with ctx.mktemp() / ctx.mktempFile()
59
63
  - [SDK reference: waitFor](https://docs.kici.dev/user/sdk/wait-for/): Polling helpers for steps that pause until an external condition becomes true
60
64
 
61
- ## CLI and authoring
65
+ ## CLI: authoring on your own machine
62
66
 
63
- - [Drive KiCI from your coding agent](https://docs.kici.dev/user/ai-agents/): Point a coding agent at KiCI's MCP server and let it trigger, read, and re-run your CI under your own identity.
64
- - [CLI authentication](https://docs.kici.dev/user/cli-auth/): Authenticate the KiCI CLI with browser OAuth, device flow, or API key paste
65
- - [CLI reference](https://docs.kici.dev/user/cli-reference/): All CLI commands: compile, preview, local, fixture, types, workflows, hook, docs, run, runs, approve, reject, login, logout, init, org, pat, secrets, admin, orchestrators, endpoints, notifications, verify-attestation, diagnostics, doctor, report
67
+ - [CLI reference](https://docs.kici.dev/user/cli-reference/): All CLI commands: compile, preview, local, fixture, types, workflows, hook, docs, run, runs, approve, reject, login, logout, init, org, pat, secrets, admin, orchestrators, endpoints, notifications, verify-attestation, diagnostics, doctor, report, feedback
66
68
  - [Common failures](https://docs.kici.dev/user/common-failures/): Symptom-to-fix reference for the failures workflow authors hit most — no jobs dispatched, lock-file drift, missing webhooks, and agents that won't connect
67
69
  - [Lifecycle hooks](https://docs.kici.dev/user/hooks/): SDK hook API for cancel, cleanup, success, failure, and step-level callbacks
68
70
  - [Lock file and workflow drift](https://docs.kici.dev/user/lock-file-and-drift/): Keep the lock file in sync with your workflow source and avoid drift
69
71
  - [Testing guide](https://docs.kici.dev/user/testing-guide/): Running remote test fixtures with kici run remote
70
72
  - [Workflow patterns](https://docs.kici.dev/user/workflow-patterns/): Common patterns: monorepo builds, conditional jobs, dynamic matrices, generic webhooks, scheduling
71
- - [kici: account & org](https://docs.kici.dev/user/cli/account-and-org/): Login, org selection, personal access tokens, secrets, and admin
72
73
  - [kici: authoring & local dev](https://docs.kici.dev/user/cli/authoring-and-local/): Compile, preview, local execution, fixtures, types, workflows, hooks, and docs
74
+
75
+ ## CLI: driving a deployed orchestrator
76
+
77
+ - [Drive KiCI from your coding agent](https://docs.kici.dev/user/ai-agents/): Point a coding agent at KiCI's MCP server and let it trigger, read, and re-run your CI under your own identity.
78
+ - [CLI authentication](https://docs.kici.dev/user/cli-auth/): Authenticate the KiCI CLI with browser OAuth, device flow, or API key paste
79
+ - [kici: account & org](https://docs.kici.dev/user/cli/account-and-org/): Login, org selection, personal access tokens, secrets, and admin
73
80
  - [kici: notifications & diagnostics](https://docs.kici.dev/user/cli/notifications-and-diagnostics/): Notification channels, attestation verification, and diagnostics
74
81
  - [kici: runs & approvals](https://docs.kici.dev/user/cli/runs-and-approvals/): Run push and inspection plus approval / rejection of held runs
75
82
 
@@ -19,8 +19,8 @@ import { generateKeyPairSync, randomBytes } from "node:crypto";
19
19
  */
20
20
  function currentBuildIdentity() {
21
21
  return {
22
- version: "0.6.0",
23
- buildCommit: "e4a936029"
22
+ version: "0.6.1",
23
+ buildCommit: "d32193b6b"
24
24
  };
25
25
  }
26
26
  /**
@@ -1,6 +1,6 @@
1
1
  import "../rolldown-runtime-ClRpJifh.js";
2
2
  //#region src/templates/package-json.ts
3
- const sdkVersion = "0.6.0";
3
+ const sdkVersion = "0.6.1";
4
4
  /**
5
5
  * The npm version range the scaffold pins `@kici-dev/sdk` to.
6
6
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kici-dev/compiler",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "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.",
5
5
  "keywords": [
6
6
  "ci",
@@ -62,17 +62,17 @@
62
62
  "yaml": "^2.9.0",
63
63
  "zod": "^4.4.3",
64
64
  "zx": "^8.8.5",
65
- "@kici-dev/agent": "0.6.0",
66
- "@kici-dev/core": "0.6.0",
67
- "@kici-dev/engine": "0.6.0",
68
- "@kici-dev/orchestrator": "0.6.0"
65
+ "@kici-dev/agent": "0.6.1",
66
+ "@kici-dev/core": "0.6.1",
67
+ "@kici-dev/engine": "0.6.1",
68
+ "@kici-dev/orchestrator": "0.6.1"
69
69
  },
70
70
  "devDependencies": {
71
71
  "@types/archiver": "^8.0.0",
72
72
  "jszip": "^3.10.1"
73
73
  },
74
74
  "peerDependencies": {
75
- "@kici-dev/sdk": "0.6.0"
75
+ "@kici-dev/sdk": "0.6.1"
76
76
  },
77
77
  "scripts": {
78
78
  "build": "node ../../scripts/build-ts.mjs && tsgo --emitDeclarationOnly",