@jskit-ai/agent-docs 0.1.64 → 0.1.65

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.
@@ -98,6 +98,22 @@ npx jskit app adopt-managed-scripts
98
98
 
99
99
  That command rewrites known old scaffold values to the thin wrapper form above.
100
100
 
101
+ For older apps that were installed before JSKIT source mutations replaced raw source appends, run the source migration after updating JSKIT packages:
102
+
103
+ ```bash
104
+ npx jskit app update-packages
105
+ npx jskit app migrate-source-mutations --dry-run
106
+ npx jskit app migrate-source-mutations
107
+ npm run verify
108
+ ```
109
+
110
+ That migration is the one upgrade script for JSKIT-owned legacy source mutation shapes. It currently normalizes:
111
+
112
+ - `packages/main/src/client/providers/MainClientProvider.js`: moves legacy appended `registerMainClientComponent(...)` calls before `class MainClientProvider`, which is the layout produced by current descriptor `mutations.source` installs.
113
+ - `src/pages/**` CRUD form field modules: folds legacy `UI_CREATE_FORM_FIELDS.push(...)` and `UI_EDIT_FORM_FIELDS.push(...)` calls into the corresponding array literals.
114
+
115
+ The command is idempotent, so rerunning it should report that the source files are already current.
116
+
101
117
  ## Discover first, change second
102
118
 
103
119
  One of the best habits in JSKIT is to inspect the catalog before mutating the app.
@@ -382,7 +398,7 @@ This is especially useful when you are asking questions like:
382
398
 
383
399
  #### "What app-owned files will it touch?"
384
400
 
385
- The `File writes`, `Text mutations`, and `Script mutations` sections answer one of the most practical questions in JSKIT:
401
+ The `File writes`, `Text mutations`, `Source mutations`, and `Script mutations` sections answer one of the most practical questions in JSKIT:
386
402
 
387
403
  - *what will this package actually do to my app tree?*
388
404
 
@@ -396,7 +412,11 @@ For `@jskit-ai/workspaces-web`, the detailed view shows app-owned files such as:
396
412
  It also shows text mutations such as:
397
413
 
398
414
  - appending placement entries to `src/placement.js`
399
- - registering tokens in `packages/main/src/client/providers/MainClientProvider.js`
415
+
416
+ And it shows source mutations such as:
417
+
418
+ - adding imports to `packages/main/src/client/providers/MainClientProvider.js`
419
+ - registering component tokens in `packages/main/src/client/providers/MainClientProvider.js`
400
420
 
401
421
  That matters because JSKIT packages are not only libraries. Many of them also write scaffold files into the app and extend app-owned provider files.
402
422
 
@@ -425,7 +445,7 @@ Not every package shows every section, and that is normal. A good reading order
425
445
  - what role does it play in the runtime graph?
426
446
  5. `Placement contributions` / `Placement outlets`
427
447
  - what UI surfaces does it add?
428
- 6. `File writes` and `Text mutations`
448
+ 6. `File writes`, `Text mutations`, and `Source mutations`
429
449
  - what app-owned files will change?
430
450
  7. `Runtime providers` and `Container tokens`
431
451
  - what does it register internally?
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jskit-ai/agent-docs",
3
- "version": "0.1.64",
3
+ "version": "0.1.65",
4
4
  "description": "Distributed JSKIT agent references, prompts, guides, and generated reference maps.",
5
5
  "type": "module",
6
6
  "files": [
@@ -47,18 +47,22 @@ Local functions
47
47
  Exports
48
48
  - `createLocalAuthService`
49
49
  - `createLocalFileBackend`
50
+ - `hashPassword`
51
+ - `normalizePasswordStrategy`
52
+ - `verifyPassword`
50
53
 
51
54
  ### `src/server/lib/passwords.js`
52
55
  Exports
53
56
  - `hashPassword(password)`
54
57
  - `verifyPassword(password, record)`
58
+ - `normalizePasswordStrategy(strategy = null)`
55
59
  Local functions
56
60
  - `base64url(buffer)`
57
61
  - `fromBase64url(value)`
58
62
 
59
63
  ### `src/server/lib/service.js`
60
64
  Exports
61
- - `createLocalAuthService({ backend, config, profileProjector = null })`
65
+ - `createLocalAuthService({ backend, config, profileProjector = null, passwordStrategy = null })`
62
66
  Local functions
63
67
  - `nowSeconds()`
64
68
  - `isoFromNow(seconds)`
@@ -138,6 +138,7 @@ Exports
138
138
  Local functions
139
139
  - `normalizePackageKind(rawValue, descriptorPath)`
140
140
  - `validateFileMutationShape(descriptor, descriptorPath)`
141
+ - `validateSourceMutationShape(descriptor, descriptorPath)`
141
142
  - `validateLifecycleHookSpec(spec = {}, descriptorPath, label = "lifecycle hook")`
142
143
  - `validateLifecycleShape(descriptor, descriptorPath)`
143
144
 
@@ -187,6 +188,9 @@ Exports
187
188
  - `applyTextMutations`
188
189
  - `partitionPreFileConfigTextMutations`
189
190
  - `resolvePositioningMutations`
191
+ - `applySourceMutations`
192
+ - `partitionPreFileConfigSourceMutations`
193
+ - `resolvePositioningSourceMutations`
190
194
 
191
195
  ### `src/server/cliRuntime/mutations/fileMutations.js`
192
196
  Exports
@@ -201,6 +205,32 @@ Exports
201
205
  Exports
202
206
  - `normalizeMutationRelativeFilePath(value = "")`
203
207
 
208
+ ### `src/server/cliRuntime/mutations/sourceMutations.js`
209
+ Exports
210
+ - `applySourceMutations(packageEntry, appRoot, sourceMutations, options, managedSource, touchedFiles, { dryRun = false } = {})`
211
+ - `partitionPreFileConfigSourceMutations(sourceMutations = [])`
212
+ - `resolvePositioningSourceMutations(descriptorMutations = {})`
213
+ Local functions
214
+ - `createSourceFile(relativeFile, sourceText)`
215
+ - `normalizeSourceText(value = "")`
216
+ - `insertText(sourceText, index, text)`
217
+ - `appendBlock(sourceText, block)`
218
+ - `renderImportMutation(mutation, options, packageId, mutationId)`
219
+ - `sourceAlreadyHasImport(sourceFile, rendered)`
220
+ - `ensureImport(sourceText, relativeFile, mutation, options, packageId, mutationId)`
221
+ - `normalizeSourceArg(value = "")`
222
+ - `callExpressionMatches(callExpression, callee, expectedArgs, uniqueArgIndex)`
223
+ - `renderCallMutation(mutation, options, packageId, mutationId)`
224
+ - `ensureCall(sourceText, relativeFile, mutation, options, packageId, mutationId)`
225
+ - `sourceHasAssignmentToTarget(sourceFile, target)`
226
+ - `renderAssignmentStatement(target, value)`
227
+ - `ensureAssignment(sourceText, relativeFile, mutation, options, packageId, mutationId)`
228
+ - `ensureExportConst(sourceText, relativeFile, mutation, options, packageId, mutationId)`
229
+ - `applySourceMutationToContent(sourceText, relativeFile, mutation, options, packageId)`
230
+ - `createManagedSourceRecord(relativeFile, mutation)`
231
+ - `isPositioningSourceMutation(value = {})`
232
+ - `isPreFileConfigSourceMutation(value = {})`
233
+
204
234
  ### `src/server/cliRuntime/mutations/surfaceTargets.js`
205
235
  Exports
206
236
  - `resolveSurfaceTargetPathsForMutation({ appRoot, packageId, mutation, configContext } = {})`
@@ -401,6 +431,27 @@ Local functions
401
431
  - `replaceWithSymlink(targetPath = "", sourceDir = "", { packageName = "" } = {})`
402
432
  - `maybeLinkCompanionPackages({ appRoot = "", repoRoot = "", stdout, createCliError })`
403
433
 
434
+ ### `src/server/commandHandlers/appCommands/migrateSourceMutations.js`
435
+ Exports
436
+ - `buildCrudFormFieldPushMigration(sourceText = "")`
437
+ - `buildMainClientProviderMigration(sourceText = "")`
438
+ - `runAppMigrateSourceMutationsCommand(_ctx = {}, { appRoot = "", options = {}, stdout })`
439
+ Local functions
440
+ - `createSourceFile(sourceText = "")`
441
+ - `readStringLiteralValue(node)`
442
+ - `readRegisterMainClientComponentToken(statement)`
443
+ - `escapeRegExp(value = "")`
444
+ - `findMatchingDelimiter(sourceText = "", openIndex = -1, openChar = "(", closeChar = ")")`
445
+ - `readLineIndent(sourceText = "", index = 0)`
446
+ - `readFormFieldKey(sourceText = "")`
447
+ - `readFormFieldKeys(sourceText = "")`
448
+ - `formatArrayEntry(entrySource = "", indent = " ")`
449
+ - `findFormFieldArrayDeclaration(sourceText = "", arrayName = "")`
450
+ - `findFormFieldPushCalls(sourceText = "", arrayName = "")`
451
+ - `buildArrayContentWithAddedEntries(existingContent = "", entries = [], indent = "")`
452
+ - `applyTextReplacements(sourceText = "", replacements = [])`
453
+ - `collectCrudFormFieldCandidateFiles(appRoot = "")`
454
+
404
455
  ### `src/server/commandHandlers/appCommands/preparePreviewUser.js`
405
456
  Exports
406
457
  - `runAppPreparePreviewUserCommand(_ctx = {}, { appRoot = "", options = {}, stdout = process.stdout })`