mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-12 06:06:37 +03:00
Sync generated provider output
This commit is contained in:
@@ -22,7 +22,7 @@ import path from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { execFileSync } from 'node:child_process';
|
||||
import { loadContext, extractRegister } from './context.mjs';
|
||||
import { getCritiqueDir } from './impeccable-paths.mjs';
|
||||
import { getCritiqueDir } from './lib/impeccable-paths.mjs';
|
||||
|
||||
/** Is there code here at all, or just context files / an empty repo? */
|
||||
function hasCode(cwd) {
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import { fileURLToPath, pathToFileURL } from 'node:url';
|
||||
import { getCritiqueDir } from './impeccable-paths.mjs';
|
||||
import { getCritiqueDir } from './lib/impeccable-paths.mjs';
|
||||
|
||||
const SLUG_MAX = 50;
|
||||
|
||||
|
||||
@@ -15,14 +15,14 @@
|
||||
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import { isGeneratedFile } from './is-generated.mjs';
|
||||
import { readBuffer as readManualEditsBuffer, writeBuffer as writeManualEditsBuffer } from './live-manual-edits-buffer.mjs';
|
||||
import { isGeneratedFile } from './lib/is-generated.mjs';
|
||||
import { readBuffer as readManualEditsBuffer, writeBuffer as writeManualEditsBuffer } from './live/manual-edits-buffer.mjs';
|
||||
import {
|
||||
applyDeferredSvelteComponentAccepts,
|
||||
findSvelteComponentManifest,
|
||||
inlineSvelteComponentAccept,
|
||||
removeSvelteComponentSession,
|
||||
} from './live-svelte-component.mjs';
|
||||
} from './live/svelte-component.mjs';
|
||||
|
||||
const EXTENSIONS = ['.html', '.jsx', '.tsx', '.vue', '.svelte', '.astro'];
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
]);
|
||||
|
||||
// Command vocabulary (values + labels + icons) comes from the canonical source,
|
||||
// skill/scripts/live-vocabulary.mjs, which live-server.mjs serializes into
|
||||
// skill/scripts/live/vocabulary.mjs, which live-server.mjs serializes into
|
||||
// window.__IMPECCABLE_VOCAB__ when it serves /live.js (same injection path as
|
||||
// the token/port above, so it is always present here). The icons stack above
|
||||
// each chip label and recolor to C.brand when selected (strokes use
|
||||
@@ -1216,7 +1216,7 @@
|
||||
: (focused ? BP.accentSoft : BP.hairline);
|
||||
}
|
||||
|
||||
// Insert mode helpers (mirrors skill/scripts/live-insert-ui.mjs)
|
||||
// Insert mode helpers (mirrors skill/scripts/live/insert-ui.mjs)
|
||||
|
||||
function detectInsertAxisFromStyle(style) {
|
||||
const display = style?.display || 'block';
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
*/
|
||||
|
||||
import { buildManualEditEvidence } from './live-manual-edit-evidence.mjs';
|
||||
import { readBuffer, readBufferStrict, writeBuffer, countByPage } from './live-manual-edits-buffer.mjs';
|
||||
import { isGeneratedFile } from './is-generated.mjs';
|
||||
import { readBuffer, readBufferStrict, writeBuffer, countByPage } from './live/manual-edits-buffer.mjs';
|
||||
import { isGeneratedFile } from './lib/is-generated.mjs';
|
||||
import {
|
||||
runCopyEditBatchAgent,
|
||||
runCopyEditPostApplyChecks,
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* Canonical durable completion acknowledgement for Impeccable live sessions.
|
||||
*/
|
||||
|
||||
import { createLiveSessionStore } from './live-session-store.mjs';
|
||||
import { readLiveServerInfo } from './impeccable-paths.mjs';
|
||||
import { createLiveSessionStore } from './live/session-store.mjs';
|
||||
import { readLiveServerInfo } from './lib/impeccable-paths.mjs';
|
||||
|
||||
function parseArgs(argv) {
|
||||
const out = { status: 'complete' };
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
* Output JSON: { discarded: N, entries: [...discardedEntries], totalCount: N }
|
||||
*/
|
||||
|
||||
import { readBuffer, removeEntries, truncateBuffer } from './live-manual-edits-buffer.mjs';
|
||||
import { readBuffer, removeEntries, truncateBuffer } from './live/manual-edits-buffer.mjs';
|
||||
|
||||
function argVal(args, name) {
|
||||
const prefix = name + '=';
|
||||
|
||||
@@ -16,12 +16,12 @@
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { resolveLiveConfigPath } from './impeccable-paths.mjs';
|
||||
import { resolveLiveConfigPath } from './lib/impeccable-paths.mjs';
|
||||
import {
|
||||
applySvelteKitLiveAdapter,
|
||||
detectSvelteKitProject,
|
||||
removeSvelteKitLiveAdapter,
|
||||
} from './live-sveltekit-adapter.mjs';
|
||||
} from './live/sveltekit-adapter.mjs';
|
||||
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
const CONFIG_PATH = resolveLiveConfigPath({ cwd: process.cwd(), scriptsDir: __dirname });
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import { isGeneratedFile } from './is-generated.mjs';
|
||||
import { isGeneratedFile } from './lib/is-generated.mjs';
|
||||
import {
|
||||
buildSearchQueries,
|
||||
findElement,
|
||||
@@ -25,7 +25,7 @@ import {
|
||||
buildSvelteComponentCssAuthoring,
|
||||
scaffoldSvelteComponentInsertSession,
|
||||
shouldUseSvelteComponentInjection,
|
||||
} from './live-svelte-component.mjs';
|
||||
} from './live/svelte-component.mjs';
|
||||
|
||||
const INSERT_POSITIONS = new Set(['before', 'after']);
|
||||
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import { isGeneratedFile } from './is-generated.mjs';
|
||||
import { readBuffer, getBufferPath } from './live-manual-edits-buffer.mjs';
|
||||
import { isGeneratedFile } from './lib/is-generated.mjs';
|
||||
import { readBuffer, getBufferPath } from './live/manual-edits-buffer.mjs';
|
||||
|
||||
const EVIDENCE_VERSION = 1;
|
||||
const TEXT_EXTENSIONS = new Set(['.html', '.jsx', '.tsx', '.vue', '.svelte', '.astro', '.js', '.mjs', '.ts']);
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
import { execFileSync } from 'node:child_process';
|
||||
import path from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { completionAckForAcceptResult, completionTypeForAcceptResult } from './live-completion.mjs';
|
||||
import { readLiveServerInfo } from './impeccable-paths.mjs';
|
||||
import { completionAckForAcceptResult, completionTypeForAcceptResult } from './live/completion.mjs';
|
||||
import { readLiveServerInfo } from './lib/impeccable-paths.mjs';
|
||||
|
||||
// Node's built-in fetch (undici under the hood) enforces a 300s headers
|
||||
// timeout that can't be lowered per-request. We cap each request below
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Recover the next agent action from the durable live-session journal.
|
||||
*/
|
||||
|
||||
import { createLiveSessionStore } from './live-session-store.mjs';
|
||||
import { createLiveSessionStore } from './live/session-store.mjs';
|
||||
|
||||
function manualApplyReplyCommand(eventOrId = 'EVENT_ID') {
|
||||
const id = typeof eventOrId === 'string' ? eventOrId : eventOrId?.id || 'EVENT_ID';
|
||||
|
||||
@@ -20,11 +20,11 @@ import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import net from 'node:net';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { parseDesignMd } from './design-parser.mjs';
|
||||
import { parseDesignMd } from './lib/design-parser.mjs';
|
||||
import { resolveContextDir } from './context.mjs';
|
||||
import { createLiveSessionStore } from './live-session-store.mjs';
|
||||
import { validateEvent } from './live-event-validation.mjs';
|
||||
import { LIVE_COMMANDS } from './live-vocabulary.mjs';
|
||||
import { createLiveSessionStore } from './live/session-store.mjs';
|
||||
import { validateEvent } from './live/event-validation.mjs';
|
||||
import { LIVE_COMMANDS } from './live/vocabulary.mjs';
|
||||
import {
|
||||
getDesignSidecarPath,
|
||||
getLiveDir,
|
||||
@@ -33,20 +33,20 @@ import {
|
||||
removeLiveServerInfo,
|
||||
resolveDesignSidecarPath,
|
||||
writeLiveServerInfo,
|
||||
} from './impeccable-paths.mjs';
|
||||
} from './lib/impeccable-paths.mjs';
|
||||
import {
|
||||
countByPage as countPendingByPage,
|
||||
readBuffer as readManualEditsBuffer,
|
||||
removeEntries as removeManualEditEntries,
|
||||
stageEntry as stageManualEditEntry,
|
||||
truncateBuffer as truncateManualEditsBuffer,
|
||||
} from './live-manual-edits-buffer.mjs';
|
||||
} from './live/manual-edits-buffer.mjs';
|
||||
import { buildManualEditEvidence } from './live-manual-edit-evidence.mjs';
|
||||
import { commitManualEdits } from './live-commit-manual-edits.mjs';
|
||||
import {
|
||||
applyDeferredSvelteComponentAccepts,
|
||||
removeAllSvelteComponentSessions,
|
||||
} from './live-svelte-component.mjs';
|
||||
} from './live/svelte-component.mjs';
|
||||
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
// PRODUCT.md / DESIGN.md live wherever context.mjs resolves. The generated
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* Print durable recovery status for Impeccable live sessions.
|
||||
*/
|
||||
|
||||
import { createLiveSessionStore } from './live-session-store.mjs';
|
||||
import { readLiveServerInfo } from './impeccable-paths.mjs';
|
||||
import { createLiveSessionStore } from './live/session-store.mjs';
|
||||
import { readLiveServerInfo } from './lib/impeccable-paths.mjs';
|
||||
import { manualApplyResumeHint } from './live-resume.mjs';
|
||||
|
||||
function readServerInfo() {
|
||||
|
||||
@@ -13,13 +13,13 @@
|
||||
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import { isGeneratedFile } from './is-generated.mjs';
|
||||
import { readBuffer as readManualEditsBuffer } from './live-manual-edits-buffer.mjs';
|
||||
import { isGeneratedFile } from './lib/is-generated.mjs';
|
||||
import { readBuffer as readManualEditsBuffer } from './live/manual-edits-buffer.mjs';
|
||||
import {
|
||||
buildSvelteComponentCssAuthoring,
|
||||
scaffoldSvelteComponentSession,
|
||||
shouldUseSvelteComponentInjection,
|
||||
} from './live-svelte-component.mjs';
|
||||
} from './live/svelte-component.mjs';
|
||||
|
||||
const EXTENSIONS = ['.html', '.jsx', '.tsx', '.vue', '.svelte', '.astro'];
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ import path from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { loadContext } from './context.mjs';
|
||||
import { resolveFiles } from './live-inject.mjs';
|
||||
import { readLiveServerInfo } from './impeccable-paths.mjs';
|
||||
import { readLiveServerInfo } from './lib/impeccable-paths.mjs';
|
||||
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
|
||||
|
||||
+2
-2
@@ -3,12 +3,12 @@
|
||||
* Extracted for unit testing (insert mode rules).
|
||||
*/
|
||||
|
||||
import { canCreateInsert } from './live-insert-ui.mjs';
|
||||
import { canCreateInsert } from './insert-ui.mjs';
|
||||
|
||||
// The accepted visual action values come from the canonical vocabulary so the
|
||||
// validator, the picker UI, and the marketing demo never drift. Imported (not
|
||||
// just re-exported) so it is also in scope for the validators below.
|
||||
import { VISUAL_ACTIONS } from './live-vocabulary.mjs';
|
||||
import { VISUAL_ACTIONS } from './vocabulary.mjs';
|
||||
export { VISUAL_ACTIONS };
|
||||
|
||||
const ID_PATTERN = /^[0-9a-f]{8}$/;
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import { getLiveDir } from './impeccable-paths.mjs';
|
||||
import { getLiveDir } from '../lib/impeccable-paths.mjs';
|
||||
|
||||
const BUFFER_VERSION = 1;
|
||||
const BUFFER_FILENAME = 'pending-manual-edits.json';
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import { getLegacyLiveSessionsDir, getLiveSessionsDir } from './impeccable-paths.mjs';
|
||||
import { getLegacyLiveSessionsDir, getLiveSessionsDir } from '../lib/impeccable-paths.mjs';
|
||||
|
||||
const COMPLETED_PHASES = new Set(['completed', 'discarded']);
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
* so the icon recolors when its chip is selected.
|
||||
*
|
||||
* Single source of truth, consumed by:
|
||||
* - skill/scripts/live-event-validation.mjs — re-exports VISUAL_ACTIONS.
|
||||
* - skill/scripts/live/event-validation.mjs — re-exports VISUAL_ACTIONS.
|
||||
* - skill/scripts/live-browser.js — the real picker. It is served raw and
|
||||
* injected as an IIFE, so it cannot import this at runtime; live-server.mjs
|
||||
* serializes LIVE_COMMANDS into window.__IMPECCABLE_VOCAB__ alongside the
|
||||
Reference in New Issue
Block a user