@jaimevalasek/aioson 1.9.1 → 1.9.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jaimevalasek/aioson",
3
- "version": "1.9.1",
3
+ "version": "1.9.2",
4
4
  "description": "AI operating framework for hyper-personalized software.",
5
5
  "keywords": [
6
6
  "ai",
@@ -10,12 +10,14 @@ async function runUpdate({ args, options, logger, t }) {
10
10
  const targetDir = path.resolve(process.cwd(), args[0] || '.');
11
11
  const dryRun = Boolean(options['dry-run']);
12
12
  const all = Boolean(options.all);
13
+ const selective = Boolean(options.selective);
13
14
  const requestedLanguage = options.lang || options.language;
14
15
 
15
16
  const detection = await detectFramework(targetDir);
16
17
  const result = await updateInstallation(targetDir, {
17
18
  dryRun,
18
19
  all,
20
+ selective,
19
21
  frameworkDetection: detection.framework
20
22
  });
21
23
 
@@ -14,6 +14,7 @@ const { exists, copyFileWithDir, toRelativeSafe } = require('./utils');
14
14
 
15
15
  const MARKER_BEGIN = '<!-- AIOSON:BEGIN -->';
16
16
  const MARKER_END = '<!-- AIOSON:END -->';
17
+ const BLOCK_NOTICE = '> Managed by AIOSON — edits inside this block will be overwritten on `aioson update`. Put project-specific rules above or below this block.';
17
18
 
18
19
  const GATEWAY_POINTER_FILES = new Set([
19
20
  'CLAUDE.md',
@@ -28,7 +29,7 @@ function isGatewayPointerPath(rel) {
28
29
 
29
30
  function buildBlock(templateContent) {
30
31
  const body = templateContent.endsWith('\n') ? templateContent : `${templateContent}\n`;
31
- return `${MARKER_BEGIN}\n${body}${MARKER_END}\n`;
32
+ return `${MARKER_BEGIN}\n${BLOCK_NOTICE}\n\n${body}${MARKER_END}\n`;
32
33
  }
33
34
 
34
35
  function findBlockRange(content) {
@@ -93,6 +94,7 @@ async function mergeGatewayPointer({ templatePath, targetPath, backupRoot, targe
93
94
  module.exports = {
94
95
  MARKER_BEGIN,
95
96
  MARKER_END,
97
+ BLOCK_NOTICE,
96
98
  GATEWAY_POINTER_FILES,
97
99
  isGatewayPointerPath,
98
100
  buildBlock,
package/src/parser.js CHANGED
@@ -30,6 +30,7 @@ function parseArgv(argv) {
30
30
  'help', 'version', 'no-launch', 'attach', 'tmux',
31
31
  'allow-warnings', 'install-hook', 'uninstall-hook', 'remove-hook',
32
32
  'agent-safe',
33
+ 'selective',
33
34
  'status', 'suggest', 'apply',
34
35
  // `--resume` alone means "resume last"; `--resume=<id>` carries a value
35
36
  // and is handled by the `=` branch above. Without this entry, `--resume`
package/src/updater.js CHANGED
@@ -16,8 +16,12 @@ async function updateInstallation(targetDir, options = {}) {
16
16
 
17
17
  const savedProfile = await readInstallProfile(targetDir);
18
18
 
19
- // Default: only update files already present in the target (selective update).
20
- // With --all: install every file from the template, including new ones not yet installed.
19
+ // Default: sync everything from the template, including files added by the
20
+ // release that aren't yet in the target. Pre-1.9.2 this defaulted to
21
+ // selective and silently dropped new agents/slash commands between versions.
22
+ // `--selective` restores the legacy conservative mode; `--all` is accepted
23
+ // as a backwards-compat no-op since "all" is now the default.
24
+ const selective = Boolean(options.selective) && !options.all;
21
25
  const result = await installTemplate(targetDir, {
22
26
  overwrite: true,
23
27
  dryRun: Boolean(options.dryRun),
@@ -25,7 +29,7 @@ async function updateInstallation(targetDir, options = {}) {
25
29
  backupOnOverwrite: true,
26
30
  frameworkDetection: options.frameworkDetection || null,
27
31
  installProfile: savedProfile,
28
- selectiveUpdate: !options.all
32
+ selectiveUpdate: selective
29
33
  });
30
34
 
31
35
  // Post-install migrations. Best-effort: a migration failure must not break