@jskit-ai/agent-docs 0.1.78 → 0.1.79

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.
@@ -212,7 +212,9 @@ That matters because JSKIT maintenance policy changes over time. If the scaffold
212
212
 
213
213
  `jskit app verify` is worth noticing specifically. Linting, tests, and builds check your source code and runtime behavior. The JSKIT part of that flow runs `doctor`, which checks JSKIT-managed app state: installed package visibility, lock-file-backed managed files, and other JSKIT-specific health rules. It is there because a JSKIT app is not only code. It is also a descriptor-driven managed project.
214
214
 
215
- The starter scaffold also writes `.github/workflows/verify.yml`. That workflow stays intentionally small: it runs `npm run verify` for the normal GitHub Actions gate and leaves browser/auth/database-heavy review flows to app-specific local or CI setups. The `--against <base-ref>` review mode exists in the CLI for local pre-merge checks and for advanced CI pipelines, but it is not assumed by the starter scaffold.
215
+ The starter scaffold also writes `.github/workflows/jskit-verify.yml`. JSKIT generates and owns that workflow as a projection of installed package `ci` contracts. The baseline runs checkout, Node setup, `npm ci`, and `npm run verify`. Packages can add job environment values, service containers, and explicit `before-verify` steps without taking ownership of the whole YAML file. For example, the database runtime adds migrations before verification and its MySQL driver adds a MariaDB service with synthetic CI-only credentials and `DB_CLIENT=mysql2`.
216
+
217
+ The workflow content hash is recorded in `.jskit/lock.json`. Package lifecycle commands refresh it when installed requirements change and refuse to overwrite a workflow that differs from its recorded version. Application-specific CI belongs in another workflow. Use `npx jskit app sync-ci` to refresh an unmodified managed file, or `npx jskit app sync-ci --force` when you explicitly intend to replace an edited file that is already recorded as JSKIT-owned. The `--against <base-ref>` review mode still exists for local pre-merge checks and advanced CI pipelines, but the starter workflow does not assume it.
216
218
 
217
219
  The surface-specific script names are also worth noticing early, even in this tiny app. `dev:home`, `server:home`, and `build:home` are the first concrete places where surface selection shows up in the scaffold. They work by setting `VITE_SURFACE=home` on the client side and `SERVER_SURFACE=home` on the server side. In this first chapter, where `home` is the only surface, those variants behave almost the same as the default commands. Later, once more surfaces exist, those scripts become the simplest way to run or build just one surface at a time.
218
220
 
@@ -761,7 +763,7 @@ That keeps the ownership boundary clear: `packages/main` stays composition-only,
761
763
 
762
764
  The `.jskit/lock.json` file is also important. Treat it like JSKIT's own lock and state file. It records which runtime packages JSKIT believes are installed and which managed changes they introduced. When you use `jskit add`, `jskit update`, or generators that depend on installed package state, this file is part of the source of truth. It belongs in version control, and you should not hand-edit it.
763
765
 
764
- This file is narrower than `package.json`. `package.json` lists every npm dependency the app needs, including plain libraries such as Vue, Fastify, and Vuetify. `.jskit/lock.json` only tracks JSKIT package-install state: which JSKIT runtime packages were installed into the app and which files, text mutations, and dependency entries JSKIT is managing on their behalf.
766
+ This file is narrower than `package.json`. `package.json` lists every npm dependency the app needs, including plain libraries such as Vue, Fastify, and Vuetify. `.jskit/lock.json` tracks JSKIT package-install state: which JSKIT runtime packages were installed, which files, text mutations, and dependency entries JSKIT manages on their behalf, and the owned hash of app-level projections such as the composed CI workflow.
765
767
 
766
768
  On a brand-new default app, the lock file is telling you that the app-local package and the standard shell package are installed from the start:
767
769
 
@@ -799,6 +801,12 @@ On a brand-new default app, the lock file is telling you that the app-local pack
799
801
  "text": { "...": "..." }
800
802
  }
801
803
  }
804
+ },
805
+ "managed": {
806
+ "ciWorkflow": {
807
+ "path": ".github/workflows/jskit-verify.yml",
808
+ "hash": "<generated-sha256>"
809
+ }
802
810
  }
803
811
  }
804
812
  ```
@@ -81,7 +81,17 @@ This gives you a clean ownership split:
81
81
 
82
82
  That split is worth keeping in mind through the rest of the guide. When you see `npm run verify`, read it as "run the app's JSKIT baseline verification policy, then any app-specific extra verification hook".
83
83
 
84
- The starter scaffold also includes `.github/workflows/verify.yml`. That workflow is intentionally conservative: it runs `npm run verify` and does not assume that every app can stand up full browser, auth, seed-data, and database verification inside hosted CI.
84
+ The starter scaffold also includes `.github/workflows/jskit-verify.yml`. This is a JSKIT-managed projection, not a static template. Installed package descriptors can contribute CI environment values, services, and preparation steps through their top-level `ci` contract. JSKIT composes those contributions and renders one verification workflow in this order: checkout, Node setup, `npm ci`, package-contributed `before-verify` steps, and `npm run verify`.
85
+
86
+ For example, `database-runtime` contributes the `database-migrations` step, while `database-runtime-mysql` contributes the MariaDB service and matching synthetic CI-only `DB_*` values. `DB_CLIENT` remains the canonical `mysql2` value. Local `.env` values are never copied into the workflow.
87
+
88
+ The workflow path and generated content hash live under `managed.ciWorkflow` in `.jskit/lock.json`. Package add, remove, update, and app-wide package updates refresh this projection. If the workflow no longer matches its recorded hash, JSKIT refuses to overwrite it during those operations. Move application-specific jobs to another workflow, then explicitly regenerate the managed projection with:
89
+
90
+ ```bash
91
+ npx jskit app sync-ci
92
+ ```
93
+
94
+ The command refuses to replace an edited workflow unless you explicitly run `npx jskit app sync-ci --force`. Even with `--force`, it replaces the file only when `.jskit/lock.json` already records JSKIT ownership. It does not claim an unrecorded `.github/workflows/jskit-verify.yml` or remove a customized legacy `.github/workflows/verify.yml`.
85
95
 
86
96
  If your app uses a non-default npm registry for JSKIT packages, pass it to the maintained CLI command rather than hard-coding it in the scaffold. For example:
87
97
 
@@ -563,6 +573,7 @@ That state lives in `.jskit/lock.json`, which is why lifecycle commands all star
563
573
  - which package is installed
564
574
  - which install options were used
565
575
  - which files, text mutations, dependency entries, and migrations it owns
576
+ - the path and content hash of the composed JSKIT CI workflow
566
577
 
567
578
  The easiest way to think about the lifecycle is:
568
579
 
@@ -571,6 +582,8 @@ The easiest way to think about the lifecycle is:
571
582
  3. `jskit position element ...` reapplies just the positioning layer
572
583
  4. `jskit remove package ...` removes the managed state
573
584
 
585
+ Package add, update, and remove also recompose `.github/workflows/jskit-verify.yml` from the complete installed package set. No individual package owns that file through `mutations.files`; it is one app-level projection with contributions from many descriptors.
586
+
574
587
  That is a better mental model than thinking of these as three unrelated commands.
575
588
 
576
589
  ### `update` re-applies one installed package
@@ -692,6 +705,7 @@ In the current CLI, that includes checks such as:
692
705
  - installed package entries in `.jskit/lock.json`
693
706
  - whether managed files recorded in the lock still exist
694
707
  - whether installed packages are still visible in the package registry
708
+ - whether package CI contributions compose without conflicts and match the managed workflow service, environment, preparation steps, and ordering
695
709
  - explicit `transport` passed to high-level CRUD hooks such as `useCrudList()`, `useCrudView()`, and `useCrudAddEdit()`, where the shared CRUD resource should derive the JSON:API transport automatically
696
710
  - certain JSKIT-specific app checks, such as invalid raw `mdi-*` icon literals in Vue templates when the app uses Vuetify's `mdi-svg` iconset
697
711
  - UI verification receipts for current dirty UI files in git, via `.jskit/verification/ui.json`
@@ -725,7 +739,7 @@ That is a different job from:
725
739
 
726
740
  Those commands can all pass while JSKIT-managed state is still inconsistent. `doctor` is the command that checks that JSKIT's own view of the app still makes sense.
727
741
 
728
- That is exactly why the starter scaffold routes `npm run verify` through `jskit app verify`.
742
+ That is exactly why the starter scaffold routes `npm run verify` through `jskit app verify`. CI structure is checked before lint, test, client-test, and build scripts, so a stale database service or missing migration step fails directly instead of surfacing later as an opaque provider boot failure.
729
743
 
730
744
  It belongs there because JSKIT apps are not only source trees. They also have:
731
745
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jskit-ai/agent-docs",
3
- "version": "0.1.78",
3
+ "version": "0.1.79",
4
4
  "description": "Distributed JSKIT agent references, prompts, guides, and generated reference maps.",
5
5
  "type": "module",
6
6
  "files": [
@@ -73,6 +73,75 @@ Local functions
73
73
  - `collectPlannedCapabilityIssues(plannedPackageIds, packageRegistry)`
74
74
  - `collectExclusiveCapabilityIssues(plannedPackageIds, packageRegistry)`
75
75
 
76
+ ### `src/server/cliRuntime/ci/composer.js`
77
+ Exports
78
+ - `CiCompositionError`
79
+ - `composeCiContributions(packageEntries = [])`
80
+ Local functions
81
+ - `canonicalValue(value)`
82
+ - `valuesMatch(left, right)`
83
+ - `formatConflictValue(value)`
84
+ - `normalizePackageEntries(packageEntries = [])`
85
+ - `appendSource(sourceMap, key, packageId)`
86
+ - `conflict({ kind, id, existing, incoming, existingPackages, incomingPackage })`
87
+ - `sourcesToObject(sourceMap)`
88
+
89
+ ### `src/server/cliRuntime/ci/contract.js`
90
+ Exports
91
+ - `CI_STEP_PHASE_BEFORE_VERIFY`
92
+ - `CI_STEP_PHASES`
93
+ - `normalizeCiContribution(value, context = {})`
94
+ Local functions
95
+ - `isPlainObject(value)`
96
+ - `invalidCiContract(message, { descriptorPath = "", packageId = "" } = {})`
97
+ - `requirePlainObject(value, label, context)`
98
+ - `rejectUnknownKeys(value, allowedKeys, label, context)`
99
+ - `normalizeCiScalar(value, label, context)`
100
+ - `normalizeCiEnvironment(value, label, context)`
101
+ - `normalizeCiPorts(value, label, context)`
102
+ - `normalizeCiHealthCheck(value, label, context)`
103
+ - `normalizeCiService(value, index, context)`
104
+ - `normalizeCiStep(value, index, context)`
105
+
106
+ ### `src/server/cliRuntime/ci/githubWorkflow.js`
107
+ Exports
108
+ - `GENERATED_WORKFLOW_HEADER`
109
+ - `JSKIT_CI_WORKFLOW_RELATIVE_PATH`
110
+ - `LEGACY_CI_WORKFLOW_RELATIVE_PATH`
111
+ - `LEGACY_VERIFY_WORKFLOW_HASH`
112
+ - `buildGithubWorkflowDocument(model = {})`
113
+ - `parseGithubWorkflow(source = "")`
114
+ - `renderGithubServiceOptions(service = {})`
115
+ - `renderGithubWorkflow(model = {})`
116
+ Local functions
117
+ - `quoteDockerOptionValue(value)`
118
+ - `renderGithubService(service = {})`
119
+
120
+ ### `src/server/cliRuntime/ci/managedWorkflow.js`
121
+ Exports
122
+ - `assertAppManagedCiWorkflowUnmodified({ appRoot })`
123
+ - `assertManagedCiWorkflowUnmodified({ appRoot, lock, allowManagedOverwrite = false })`
124
+ - `composeInstalledPackageCi({ lock, packageRegistry, installedPackageIds = null })`
125
+ - `synchronizeAppCiWorkflow({ appRoot, allowManagedOverwrite = false, dryRun = false })`
126
+ - `synchronizeManagedCiWorkflow({ appRoot, lock, packageRegistry, installedPackageIds = null, touchedFiles = null, dryRun = false, allowManagedOverwrite = false })`
127
+ - `validateAppCiWorkflow({ appRoot })`
128
+ - `validateManagedCiWorkflow({ appRoot, lock, packageRegistry })`
129
+ Local functions
130
+ - `contentHash(content = "")`
131
+ - `collectInstalledPackageEntries({ lock, packageRegistry, installedPackageIds = null })`
132
+ - `managedCiRecord(lock = {})`
133
+ - `setManagedCiRecord(lock, record)`
134
+ - `recoveryError(message, { force = false } = {})`
135
+ - `inspectWorkflowOwnership({ appRoot, lock })`
136
+ - `createValidationIssue(code, message, details = {})`
137
+ - `formatRequirementPackages(packageIds = [])`
138
+ - `describeCiRequirements(model = {})`
139
+ - `normalizeActualEnvironment(value)`
140
+ - `collectEnvironmentIssues({ expected, actual, sources, issues })`
141
+ - `collectServiceIssues({ model, verifyJob, issues })`
142
+ - `collectStepIssues({ model, verifyJob, issues })`
143
+ - `loadAppCiContext(appRoot)`
144
+
76
145
  ### `src/server/cliRuntime/completion.js`
77
146
  Exports
78
147
  - `discoverPlacementTargets(appRoot)`
@@ -495,6 +564,10 @@ Exports
495
564
  Local functions
496
565
  - `ensureCommandSucceeded(result, label, { createCliError, cwd = "", stdout, stderr, quiet = false } = {})`
497
566
 
567
+ ### `src/server/commandHandlers/appCommands/syncCi.js`
568
+ Exports
569
+ - `runAppSyncCiCommand(ctx = {}, { appRoot = "", options = {}, stdout })`
570
+
498
571
  ### `src/server/commandHandlers/appCommands/updatePackages.js`
499
572
  Exports
500
573
  - `runAppUpdatePackagesCommand(ctx = {}, { appRoot = "", options = {}, stdout, stderr })`
@@ -884,6 +957,11 @@ Exports
884
957
  ### `src/server/index.js`
885
958
  Exports
886
959
  - `runCli`
960
+ - `synchronizeAppCiWorkflow`
961
+ - `validateAppCiWorkflow`
962
+ - `composeCiContributions`
963
+ - `JSKIT_CI_WORKFLOW_RELATIVE_PATH`
964
+ - `renderGithubWorkflow`
887
965
 
888
966
  ### `src/server/shared/cliError.js`
889
967
  Exports