chore: update vendored skills and record provenance
humanizer 2.2.0 -> 2.9.1 (blader/humanizer, MIT): adds a Voice Calibration section and a passive-voice pattern, reworks negative parallelisms and em dashes. Version moved to metadata.version upstream. impeccable 3.6.0 -> 4.0.4 (pbakaus/impeccable, Apache-2.0): the repo tags the skill and the npm CLI separately, so 3.6.0 was a real release and npm's 3.5.0 was never the comparison. Adds native-platform reference briefs. Each now carries an UPSTREAM file; bin/check-vendored.sh reports drift.
This commit is contained in:
@@ -26,6 +26,7 @@ import {
|
||||
scaffoldSvelteComponentInsertSession,
|
||||
shouldUseSvelteComponentInjection,
|
||||
} from './live/svelte-component.mjs';
|
||||
import { enterLiveRoot } from './live/roots.mjs';
|
||||
|
||||
const INSERT_POSITIONS = new Set(['before', 'after']);
|
||||
|
||||
@@ -131,6 +132,9 @@ Output (JSON):
|
||||
const query = argVal(args, '--query');
|
||||
const filePath = argVal(args, '--file');
|
||||
const text = argVal(args, '--text');
|
||||
// See live-wrap.mjs: preflight computes the scaffold but leaves source
|
||||
// untouched so the agent's single edit is the only framework reload.
|
||||
const deferSourceWrite = args.includes('--defer-source-write');
|
||||
|
||||
if (!id) { console.error('Missing --id'); process.exit(1); }
|
||||
if (!position) { console.error('Missing --position (before | after)'); process.exit(1); }
|
||||
@@ -244,12 +248,23 @@ Output (JSON):
|
||||
isJsx,
|
||||
});
|
||||
|
||||
const newLines = [
|
||||
...lines.slice(0, spliceIndex),
|
||||
...wrapperLines,
|
||||
...lines.slice(spliceIndex),
|
||||
];
|
||||
fs.writeFileSync(targetFile, newLines.join('\n'), 'utf-8');
|
||||
let deferredWrapper = null;
|
||||
if (deferSourceWrite) {
|
||||
// Insert-as-empty-range: the agent inserts `wrapperBlock` (variants spliced
|
||||
// at the marker) at spliceIndex without removing any source line.
|
||||
deferredWrapper = {
|
||||
block: wrapperLines.join('\n'),
|
||||
replaceStartLine: spliceIndex + 1,
|
||||
replaceEndLine: spliceIndex, // empty range (endLine < startLine) => insertion
|
||||
};
|
||||
} else {
|
||||
const newLines = [
|
||||
...lines.slice(0, spliceIndex),
|
||||
...wrapperLines,
|
||||
...lines.slice(spliceIndex),
|
||||
];
|
||||
fs.writeFileSync(targetFile, newLines.join('\n'), 'utf-8');
|
||||
}
|
||||
|
||||
const insertLine = spliceIndex + 3;
|
||||
|
||||
@@ -257,6 +272,10 @@ Output (JSON):
|
||||
mode: 'insert',
|
||||
position,
|
||||
file: relTargetFile,
|
||||
sourceWritten: deferredWrapper ? false : undefined,
|
||||
wrapperBlock: deferredWrapper ? deferredWrapper.block : undefined,
|
||||
replaceStartLine: deferredWrapper ? deferredWrapper.replaceStartLine : undefined,
|
||||
replaceEndLine: deferredWrapper ? deferredWrapper.replaceEndLine : undefined,
|
||||
insertLine: insertLine + 1,
|
||||
commentSyntax,
|
||||
styleMode: styleMode.mode,
|
||||
@@ -268,5 +287,6 @@ Output (JSON):
|
||||
|
||||
const _running = process.argv[1];
|
||||
if (_running?.endsWith('live-insert.mjs') || _running?.endsWith('live-insert.mjs/')) {
|
||||
enterLiveRoot();
|
||||
insertCli();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user