@open-agent-toolkit/cli 0.0.16 → 0.0.19
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/assets/docs/contributing/code.md +4 -2
- package/assets/public-package-versions.json +4 -4
- package/assets/skills/oat-project-complete/SKILL.md +4 -3
- package/dist/app/create-program.js +1 -1
- package/dist/commands/docs/index-generate/index.d.ts +1 -0
- package/dist/commands/docs/index-generate/index.d.ts.map +1 -1
- package/dist/commands/docs/index-generate/index.js +6 -3
- package/dist/commands/docs/init/index.d.ts +3 -0
- package/dist/commands/docs/init/index.d.ts.map +1 -1
- package/dist/commands/docs/init/index.js +48 -3
- package/dist/commands/docs/init/scaffold.d.ts +1 -0
- package/dist/commands/docs/init/scaffold.d.ts.map +1 -1
- package/dist/commands/docs/init/scaffold.js +17 -7
- package/dist/commands/project/archive/archive-utils.d.ts.map +1 -1
- package/dist/commands/project/archive/archive-utils.js +34 -2
- package/dist/commands/providers/inspect/inspect.d.ts.map +1 -1
- package/dist/commands/providers/inspect/inspect.js +4 -1
- package/dist/commands/providers/list/list.d.ts.map +1 -1
- package/dist/commands/providers/list/list.js +14 -2
- package/dist/commands/providers/providers.types.d.ts +3 -3
- package/dist/commands/providers/providers.types.d.ts.map +1 -1
- package/dist/commands/status/index.d.ts +2 -2
- package/dist/commands/status/index.d.ts.map +1 -1
- package/dist/commands/status/index.js +8 -3
- package/dist/drift/detector.d.ts +4 -1
- package/dist/drift/detector.d.ts.map +1 -1
- package/dist/drift/detector.js +14 -3
- package/dist/drift/index.d.ts +1 -0
- package/dist/drift/index.d.ts.map +1 -1
- package/dist/manifest/manager.js +1 -1
- package/package.json +1 -1
|
@@ -69,8 +69,10 @@ not the steady-state path.
|
|
|
69
69
|
- Publish the four public packages manually the first time under the new npm
|
|
70
70
|
org scope.
|
|
71
71
|
- After those packages exist in npm, configure npm trusted publishing for this
|
|
72
|
-
repository so `.github/workflows/release.yml` can
|
|
73
|
-
release path without an npm token.
|
|
72
|
+
repository so `.github/workflows/release.yml` can stay the steady-state
|
|
73
|
+
top-level release path without an npm token.
|
|
74
|
+
- In steady state, `release.yml` owns automatic releases from `main` and manual
|
|
75
|
+
reruns for an existing release tag; `ci.yml` remains validation-only.
|
|
74
76
|
- Use `.github/workflows/release-dry-run.yml` to validate the GitHub path after
|
|
75
77
|
the npm trust relationship is configured.
|
|
76
78
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: oat-project-complete
|
|
3
|
-
version: 1.3.
|
|
3
|
+
version: 1.3.5
|
|
4
4
|
description: Use when all implementation work is finished and the project is ready to close. Marks the OAT project lifecycle as complete.
|
|
5
5
|
disable-model-invocation: true
|
|
6
6
|
user-invocable: true
|
|
@@ -342,7 +342,7 @@ echo "Project archived to $ARCHIVE_PATH"
|
|
|
342
342
|
**Canonical helper behaviors (required):**
|
|
343
343
|
|
|
344
344
|
- Always archive locally first. The local archive is the authoritative completion artifact even when remote sync is also configured.
|
|
345
|
-
- If `archive.summaryExportPath` is configured and `summary.md` exists after archive, copy it to `{repoRoot}/{archive.summaryExportPath}/{PROJECT_NAME}.md`.
|
|
345
|
+
- If `archive.summaryExportPath` is configured and `summary.md` exists after archive, copy it to `{repoRoot}/{archive.summaryExportPath}/YYYYMMDD-{PROJECT_NAME}.md`.
|
|
346
346
|
- If `archive.s3SyncOnComplete=true` and `archive.s3Uri` is configured, sync the archived project to `{archive.s3Uri}/{repo-slug}/{PROJECT_NAME}/`.
|
|
347
347
|
- If AWS CLI is missing or unusable for that S3 sync, warn and continue. Completion must not fail after the local archive succeeds.
|
|
348
348
|
- If `archive.s3SyncOnComplete` is false or `archive.s3Uri` is unset, skip remote sync without prompting.
|
|
@@ -378,9 +378,10 @@ PRIMARY_REPO_ARCHIVE="${PRIMARY_REPO_ROOT}/.oat/projects/archived"
|
|
|
378
378
|
|
|
379
379
|
Guidance:
|
|
380
380
|
|
|
381
|
-
- In a worktree, prefer
|
|
381
|
+
- In a worktree, only prefer `PRIMARY_REPO_ARCHIVE` when the archive destination is local-only/gitignored in the current checkout. If `.oat/projects/archived/` is version controlled on the current branch, archive in the current checkout instead.
|
|
382
382
|
- Do not treat the worktree-local archive as durable.
|
|
383
383
|
- If forced to use a local-only archive, warn and require explicit user confirmation.
|
|
384
|
+
- Always write the dated `archive.summaryExportPath` copy into the current checkout (`repoRoot`), even when the project archive itself is written to the primary checkout.
|
|
384
385
|
- Do not hardcode user-specific absolute paths.
|
|
385
386
|
|
|
386
387
|
### Step 9: Regenerate Dashboard
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Command, Option } from 'commander';
|
|
2
2
|
const PROGRAM_NAME = 'oat';
|
|
3
3
|
const PROGRAM_DESCRIPTION = 'Open Agent Toolkit CLI for provider interoperability';
|
|
4
|
-
const PROGRAM_VERSION = '0.0.
|
|
4
|
+
const PROGRAM_VERSION = '0.0.18';
|
|
5
5
|
const SCOPE_CHOICES = ['project', 'user', 'all'];
|
|
6
6
|
export function createProgram() {
|
|
7
7
|
return new Command()
|
|
@@ -6,6 +6,7 @@ interface IndexGenerateFileDependencies {
|
|
|
6
6
|
writeFile: (path: string, content: string, encoding: BufferEncoding) => Promise<void>;
|
|
7
7
|
readOatConfig: (repoRoot: string) => Promise<import('../../../config/oat-config.js').OatConfig>;
|
|
8
8
|
writeOatConfig: (repoRoot: string, config: import('../../../config/oat-config.js').OatConfig) => Promise<void>;
|
|
9
|
+
resolveRepoRoot: (cwd: string) => Promise<string>;
|
|
9
10
|
}
|
|
10
11
|
interface IndexGenerateDependencies {
|
|
11
12
|
buildCommandContext: (options: GlobalOptions) => CommandContext;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/docs/index-generate/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,aAAa,EACnB,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/docs/index-generate/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,aAAa,EACnB,MAAM,sBAAsB,CAAC;AAI9B,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAS5C,UAAU,6BAA6B;IACrC,aAAa,EAAE,CACb,OAAO,EAAE,MAAM,KACZ,OAAO,CAAC,OAAO,aAAa,EAAE,UAAU,EAAE,CAAC,CAAC;IACjD,WAAW,EAAE,CAAC,OAAO,EAAE,OAAO,aAAa,EAAE,UAAU,EAAE,KAAK,MAAM,CAAC;IACrE,SAAS,EAAE,CACT,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,cAAc,KACrB,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB,aAAa,EAAE,CACb,QAAQ,EAAE,MAAM,KACb,OAAO,CAAC,OAAO,oBAAoB,EAAE,SAAS,CAAC,CAAC;IACrD,cAAc,EAAE,CACd,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,OAAO,oBAAoB,EAAE,SAAS,KAC3C,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB,eAAe,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;CACnD;AAED,UAAU,yBAAyB;IACjC,mBAAmB,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,cAAc,CAAC;IAChE,QAAQ,EAAE,6BAA6B,CAAC;CACzC;AAwED,wBAAgB,8BAA8B,CAC5C,SAAS,GAAE,OAAO,CAAC,yBAAyB,CAAM,GACjD,OAAO,CAsBT"}
|
|
@@ -3,6 +3,7 @@ import { join, relative } from 'node:path';
|
|
|
3
3
|
import { buildCommandContext, } from '../../../app/command-context.js';
|
|
4
4
|
import { readGlobalOptions } from '../../shared/shared.utils.js';
|
|
5
5
|
import { readOatConfig, writeOatConfig } from '../../../config/oat-config.js';
|
|
6
|
+
import { resolveProjectRoot } from '../../../fs/paths.js';
|
|
6
7
|
import { Command, Option } from 'commander';
|
|
7
8
|
import { generateIndex, renderIndex } from './generator.js';
|
|
8
9
|
const DEFAULT_FILE_DEPS = {
|
|
@@ -11,6 +12,7 @@ const DEFAULT_FILE_DEPS = {
|
|
|
11
12
|
writeFile,
|
|
12
13
|
readOatConfig,
|
|
13
14
|
writeOatConfig,
|
|
15
|
+
resolveRepoRoot: resolveProjectRoot,
|
|
14
16
|
};
|
|
15
17
|
const DEFAULT_DEPENDENCIES = {
|
|
16
18
|
buildCommandContext,
|
|
@@ -24,12 +26,13 @@ async function runIndexGenerate(context, options, deps) {
|
|
|
24
26
|
const entries = await deps.generateIndex(docsDir);
|
|
25
27
|
const content = deps.renderIndex(entries);
|
|
26
28
|
await deps.writeFile(outputPath, content, 'utf8');
|
|
27
|
-
const
|
|
29
|
+
const repoRoot = await deps.resolveRepoRoot(context.cwd);
|
|
30
|
+
const config = await deps.readOatConfig(repoRoot);
|
|
28
31
|
config.documentation = {
|
|
29
32
|
...config.documentation,
|
|
30
|
-
index: relative(
|
|
33
|
+
index: relative(repoRoot, outputPath) || 'index.md',
|
|
31
34
|
};
|
|
32
|
-
await deps.writeOatConfig(
|
|
35
|
+
await deps.writeOatConfig(repoRoot, config);
|
|
33
36
|
if (context.json) {
|
|
34
37
|
context.logger.json({
|
|
35
38
|
status: 'ok',
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type CommandContext, type GlobalOptions } from '../../../app/command-context.js';
|
|
2
2
|
import { type UpsertSectionResult } from '../../shared/agents-md.js';
|
|
3
3
|
import { type PromptContext, type SelectChoice } from '../../shared/shared.prompts.js';
|
|
4
|
+
import { type OatConfig } from '../../../config/oat-config.js';
|
|
4
5
|
import { Command } from 'commander';
|
|
5
6
|
import { type DocsInitResolvedOptions } from './resolve-options.js';
|
|
6
7
|
interface DocsInitDependencies {
|
|
@@ -11,6 +12,8 @@ interface DocsInitDependencies {
|
|
|
11
12
|
selectWithAbort: <T extends string>(message: string, choices: SelectChoice<T>[], ctx: PromptContext) => Promise<T | null>;
|
|
12
13
|
runDocsInit: (context: CommandContext, options: DocsInitResolvedOptions, assetsRoot: string) => Promise<void>;
|
|
13
14
|
upsertAgentsMdSection: (repoRoot: string, key: string, body: string) => Promise<UpsertSectionResult>;
|
|
15
|
+
readOatConfig: (repoRoot: string) => Promise<OatConfig>;
|
|
16
|
+
confirmAction: (message: string, ctx: PromptContext) => Promise<boolean>;
|
|
14
17
|
}
|
|
15
18
|
export declare function buildDocsSectionBody(options: DocsInitResolvedOptions): string;
|
|
16
19
|
export declare function createDocsInitCommand(overrides?: Partial<DocsInitDependencies>): Command;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/docs/init/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,aAAa,EACnB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,KAAK,mBAAmB,EAEzB,MAAM,4BAA4B,CAAC;AACpC,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/docs/init/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,aAAa,EACnB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,KAAK,mBAAmB,EAEzB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAGL,KAAK,aAAa,EAClB,KAAK,YAAY,EAElB,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EACL,KAAK,SAAS,EAGf,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAE5C,OAAO,EAIL,KAAK,uBAAuB,EAK7B,MAAM,mBAAmB,CAAC;AAa3B,UAAU,oBAAoB;IAC5B,mBAAmB,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,cAAc,CAAC;IAChE,iBAAiB,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;IACzC,eAAe,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,UAAU,GAAG,gBAAgB,CAAC,CAAC;IAC9E,gBAAgB,EAAE,CAChB,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,MAAM,EACpB,GAAG,EAAE,aAAa,KACf,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC5B,eAAe,EAAE,CAAC,CAAC,SAAS,MAAM,EAChC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,EAC1B,GAAG,EAAE,aAAa,KACf,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IACvB,WAAW,EAAE,CACX,OAAO,EAAE,cAAc,EACvB,OAAO,EAAE,uBAAuB,EAChC,UAAU,EAAE,MAAM,KACf,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB,qBAAqB,EAAE,CACrB,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,KACT,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAClC,aAAa,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,SAAS,CAAC,CAAC;IACxD,aAAa,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,aAAa,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CAC1E;AAiDD,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,uBAAuB,GAAG,MAAM,CAc7E;AA8GD,wBAAgB,qBAAqB,CACnC,SAAS,GAAE,OAAO,CAAC,oBAAoB,CAAM,GAC5C,OAAO,CAsCT"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { buildCommandContext, } from '../../../app/command-context.js';
|
|
2
2
|
import { upsertAgentsMdSection, } from '../../shared/agents-md.js';
|
|
3
|
-
import { inputWithDefault, selectWithAbort, } from '../../shared/shared.prompts.js';
|
|
3
|
+
import { confirmAction, inputWithDefault, selectWithAbort, } from '../../shared/shared.prompts.js';
|
|
4
4
|
import { readGlobalOptions } from '../../shared/shared.utils.js';
|
|
5
|
-
import { readOatConfig, writeOatConfig } from '../../../config/oat-config.js';
|
|
5
|
+
import { readOatConfig, writeOatConfig, } from '../../../config/oat-config.js';
|
|
6
6
|
import { resolveAssetsRoot } from '../../../fs/assets.js';
|
|
7
7
|
import { Command, Option } from 'commander';
|
|
8
|
-
import { DEFAULT_DOCS_REPO_SHAPE_DEPENDENCIES, detectDocsRepoShape, resolveDocsInitOptions, } from './resolve-options.js';
|
|
8
|
+
import { DEFAULT_DOCS_REPO_SHAPE_DEPENDENCIES, detectDocsRepoShape, getDefaultDocsAppName, resolveDocsInitOptions, } from './resolve-options.js';
|
|
9
9
|
import { scaffoldDocsApp } from './scaffold.js';
|
|
10
10
|
const DEFAULT_DEPENDENCIES = {
|
|
11
11
|
buildCommandContext,
|
|
@@ -41,6 +41,8 @@ const DEFAULT_DEPENDENCIES = {
|
|
|
41
41
|
context.logger.info(` Format: ${options.format}`);
|
|
42
42
|
},
|
|
43
43
|
upsertAgentsMdSection,
|
|
44
|
+
readOatConfig,
|
|
45
|
+
confirmAction,
|
|
44
46
|
};
|
|
45
47
|
const FRAMEWORK_LABELS = {
|
|
46
48
|
fumadocs: 'Fumadocs (Next.js + MDX)',
|
|
@@ -83,6 +85,32 @@ async function runDocsInitCommand(context, options, dependencies) {
|
|
|
83
85
|
process.exitCode = 0;
|
|
84
86
|
return;
|
|
85
87
|
}
|
|
88
|
+
const existingConfig = await dependencies.readOatConfig(context.cwd);
|
|
89
|
+
if (existingConfig.documentation?.root) {
|
|
90
|
+
const configDesc = `root: ${existingConfig.documentation.root}, tooling: ${existingConfig.documentation.tooling ?? 'unknown'}`;
|
|
91
|
+
if (context.json) {
|
|
92
|
+
// JSON mode: include warning in output, proceed only with --yes
|
|
93
|
+
if (!options.yes) {
|
|
94
|
+
context.logger.json({
|
|
95
|
+
status: 'error',
|
|
96
|
+
message: `Existing docs config found (${configDesc}). Use --yes to replace.`,
|
|
97
|
+
});
|
|
98
|
+
process.exitCode = 1;
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
context.logger.warn(`Existing docs config detected (${configDesc}). This will replace the current setup.`);
|
|
104
|
+
if (!options.yes) {
|
|
105
|
+
const proceed = await dependencies.confirmAction('Replace existing docs setup?', { interactive: context.interactive });
|
|
106
|
+
if (!proceed) {
|
|
107
|
+
context.logger.info('Docs init cancelled.');
|
|
108
|
+
process.exitCode = 1;
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
86
114
|
const assetsRoot = await dependencies.resolveAssetsRoot();
|
|
87
115
|
await dependencies.runDocsInit(context, resolved, assetsRoot);
|
|
88
116
|
const sectionBody = buildDocsSectionBody(resolved);
|
|
@@ -90,6 +118,23 @@ async function runDocsInitCommand(context, options, dependencies) {
|
|
|
90
118
|
if (!context.json && sectionResult.action !== 'no-change') {
|
|
91
119
|
context.logger.info(`AGENTS.md docs section ${sectionResult.action}.`);
|
|
92
120
|
}
|
|
121
|
+
if (!context.json) {
|
|
122
|
+
context.logger.info('');
|
|
123
|
+
context.logger.info('Next steps:');
|
|
124
|
+
if (resolved.repoShape === 'single-package') {
|
|
125
|
+
context.logger.info(` cd ${resolved.targetDir} && pnpm install`);
|
|
126
|
+
context.logger.info(' pnpm build');
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
context.logger.info(' pnpm install');
|
|
130
|
+
context.logger.info(` pnpm --filter ${resolved.appName} build`);
|
|
131
|
+
const defaultName = getDefaultDocsAppName(context.cwd, resolved.repoShape);
|
|
132
|
+
if (resolved.appName !== defaultName) {
|
|
133
|
+
context.logger.info('');
|
|
134
|
+
context.logger.info(`Note: Your docs app is named "${resolved.appName}" — if you have root scripts or CI filters referencing "${defaultName}", update them to match.`);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
93
138
|
process.exitCode = 0;
|
|
94
139
|
}
|
|
95
140
|
catch (error) {
|
|
@@ -10,6 +10,7 @@ export interface ScaffoldDocsAppResult {
|
|
|
10
10
|
}
|
|
11
11
|
export interface OatDepContext {
|
|
12
12
|
isOatRepo: boolean;
|
|
13
|
+
localPackages: Set<string>;
|
|
13
14
|
oatPackageVersions: Record<string, string>;
|
|
14
15
|
}
|
|
15
16
|
export declare function detectIsOatRepo(repoRoot: string): Promise<boolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scaffold.d.ts","sourceRoot":"","sources":["../../../../src/commands/docs/init/scaffold.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAGjE,OAAO,KAAK,EAGV,uBAAuB,EAExB,MAAM,mBAAmB,CAAC;AA+E3B,MAAM,WAAW,sBAAuB,SAAQ,uBAAuB;IACrE,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,mBAAmB,EAAE,sBAAsB,CAAC;CAC7C;AAED,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,OAAO,CAAC;IACnB,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC5C;AAWD,wBAAsB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAOxE;
|
|
1
|
+
{"version":3,"file":"scaffold.d.ts","sourceRoot":"","sources":["../../../../src/commands/docs/init/scaffold.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAGjE,OAAO,KAAK,EAGV,uBAAuB,EAExB,MAAM,mBAAmB,CAAC;AA+E3B,MAAM,WAAW,sBAAuB,SAAQ,uBAAuB;IACrE,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,mBAAmB,EAAE,sBAAsB,CAAC;CAC7C;AAED,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,OAAO,CAAC;IACnB,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC3B,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC5C;AAWD,wBAAsB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAOxE;AAgDD,wBAAsB,oBAAoB,CACxC,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,aAAa,CAAC,CAaxB;AA4ID,wBAAsB,eAAe,CACnC,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,qBAAqB,CAAC,CAoChC"}
|
|
@@ -71,7 +71,7 @@ const OAT_DEP_PACKAGES = [
|
|
|
71
71
|
'docs-theme',
|
|
72
72
|
'docs-transforms',
|
|
73
73
|
];
|
|
74
|
-
const DEFAULT_OAT_PUBLISHED_VERSION = '0.0.
|
|
74
|
+
const DEFAULT_OAT_PUBLISHED_VERSION = '0.0.18';
|
|
75
75
|
const PUBLIC_PACKAGE_VERSIONS_FILE = 'public-package-versions.json';
|
|
76
76
|
export async function detectIsOatRepo(repoRoot) {
|
|
77
77
|
for (const pkg of OAT_DEP_PACKAGES) {
|
|
@@ -105,17 +105,27 @@ async function readBundledOatPackageVersions(assetsRoot) {
|
|
|
105
105
|
function buildFallbackOatPackageVersions(version) {
|
|
106
106
|
return Object.fromEntries(OAT_DEP_PACKAGES.map((name) => [name, version]));
|
|
107
107
|
}
|
|
108
|
+
async function detectLocalOatPackages(repoRoot) {
|
|
109
|
+
const found = new Set();
|
|
110
|
+
for (const pkg of OAT_DEP_PACKAGES) {
|
|
111
|
+
if (await fileExists(join(repoRoot, 'packages', pkg, 'package.json'))) {
|
|
112
|
+
found.add(pkg);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
return found;
|
|
116
|
+
}
|
|
108
117
|
export async function resolveOatDepContext(repoRoot, assetsRoot) {
|
|
109
|
-
const
|
|
118
|
+
const localPackages = await detectLocalOatPackages(repoRoot);
|
|
119
|
+
const isOatRepo = localPackages.size === OAT_DEP_PACKAGES.length;
|
|
110
120
|
if (isOatRepo) {
|
|
111
|
-
return { isOatRepo, oatPackageVersions: {} };
|
|
121
|
+
return { isOatRepo, localPackages, oatPackageVersions: {} };
|
|
112
122
|
}
|
|
113
123
|
const cliVersion = await readCliVersion(assetsRoot);
|
|
114
124
|
const oatPackageVersions = {
|
|
115
125
|
...buildFallbackOatPackageVersions(cliVersion),
|
|
116
126
|
...(await readBundledOatPackageVersions(assetsRoot)),
|
|
117
127
|
};
|
|
118
|
-
return { isOatRepo, oatPackageVersions };
|
|
128
|
+
return { isOatRepo, localPackages, oatPackageVersions };
|
|
119
129
|
}
|
|
120
130
|
function humanizeAppName(appName) {
|
|
121
131
|
return appName
|
|
@@ -151,10 +161,10 @@ function buildGenerateIndexCmd(isOatRepo, targetDir) {
|
|
|
151
161
|
if (isOatRepo) {
|
|
152
162
|
return `pnpm -w run cli -- docs generate-index --docs-dir ${targetDir}/docs --output ${targetDir}/index.md`;
|
|
153
163
|
}
|
|
154
|
-
return '
|
|
164
|
+
return 'oat docs generate-index --docs-dir docs --output index.md';
|
|
155
165
|
}
|
|
156
166
|
function oatDepVersion(depContext, packageName) {
|
|
157
|
-
if (depContext.
|
|
167
|
+
if (depContext.localPackages.has(packageName)) {
|
|
158
168
|
return 'workspace:*';
|
|
159
169
|
}
|
|
160
170
|
return `^${depContext.oatPackageVersions[packageName] ?? DEFAULT_OAT_PUBLISHED_VERSION}`;
|
|
@@ -193,7 +203,7 @@ function buildDocumentationConfig(framework, targetDir) {
|
|
|
193
203
|
return {
|
|
194
204
|
root: targetDir,
|
|
195
205
|
tooling: 'fumadocs',
|
|
196
|
-
index: join(targetDir, 'index.md'),
|
|
206
|
+
index: join(targetDir, 'docs', 'index.md'),
|
|
197
207
|
};
|
|
198
208
|
}
|
|
199
209
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"archive-utils.d.ts","sourceRoot":"","sources":["../../../../src/commands/project/archive/archive-utils.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,aAAa,EACb,cAAc,EACd,SAAS,EACT,SAAS,EACT,UAAU,EACX,MAAM,QAAQ,CAAC;AAIhB,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,CACzB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,CAAC,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAA;CAAE,KAChD,OAAO,CAAC,cAAc,CAAC,CAAC;AAE7B,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE,YAAY,GAAG,MAAM,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,cAAc,EAAE,OAAO,CAAC;CACzB;AAED,UAAU,iCAAiC;IACzC,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;CACzB;AAED,MAAM,WAAW,2BAA2B;IAC1C,EAAE,EAAE,OAAO,CAAC;IACZ,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,iCAAiC;IAChD,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,YA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B,UAAU,EAAE,MAAM,GACjB,MAAM,CAER;AAmBD,wBAAgB,wBAAwB,CACtC,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,GAChB,MAAM,CAER;AAED,wBAAgB,wBAAwB,CAAC,YAAY,EAAE,MAAM,GAAG;IAC9D,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B,CA4BA;AAED,wBAAgB,8BAA8B,CAC5C,YAAY,EAAE,MAAM,EACpB,WAAW,EAAE,MAAM,GAClB,MAAM,CAIR;
|
|
1
|
+
{"version":3,"file":"archive-utils.d.ts","sourceRoot":"","sources":["../../../../src/commands/project/archive/archive-utils.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,aAAa,EACb,cAAc,EACd,SAAS,EACT,SAAS,EACT,UAAU,EACX,MAAM,QAAQ,CAAC;AAIhB,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,CACzB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,CAAC,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAA;CAAE,KAChD,OAAO,CAAC,cAAc,CAAC,CAAC;AAE7B,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE,YAAY,GAAG,MAAM,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,cAAc,EAAE,OAAO,CAAC;CACzB;AAED,UAAU,iCAAiC;IACzC,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;CACzB;AAED,MAAM,WAAW,2BAA2B;IAC1C,EAAE,EAAE,OAAO,CAAC;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B;AA8BD,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAE7E;AAED,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,GACjB,MAAM,CAER;AAmBD,wBAAgB,wBAAwB,CACtC,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,GAChB,MAAM,CAER;AAED,wBAAgB,wBAAwB,CAAC,YAAY,EAAE,MAAM,GAAG;IAC9D,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B,CA4BA;AAED,wBAAgB,8BAA8B,CAC5C,YAAY,EAAE,MAAM,EACpB,WAAW,EAAE,MAAM,GAClB,MAAM,CAIR;AAqJD,wBAAsB,0BAA0B,CAC9C,OAAO,EAAE,iCAAiC,EAC1C,YAAY,GAAE,sCAA2C,GACxD,OAAO,CAAC,gCAAgC,CAAC,CAoG3C;AAED,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,4BAA4B,EACrC,YAAY,GAAE,iCAAsC,GACnD,OAAO,CAAC,2BAA2B,CAAC,CA0CtC"}
|
|
@@ -87,7 +87,38 @@ function resolveGitPath(repoRoot, gitPath) {
|
|
|
87
87
|
? normalizedPath
|
|
88
88
|
: join(repoRoot, normalizedPath);
|
|
89
89
|
}
|
|
90
|
-
|
|
90
|
+
function isExitCode(error, code) {
|
|
91
|
+
return (typeof error === 'object' &&
|
|
92
|
+
error !== null &&
|
|
93
|
+
'code' in error &&
|
|
94
|
+
Number(error.code) === code);
|
|
95
|
+
}
|
|
96
|
+
async function isGitignoredArchivePath(repoRoot, archiveProjectPath, dependencies) {
|
|
97
|
+
const execFile = dependencies.gitExecFile ?? execFileAsync;
|
|
98
|
+
try {
|
|
99
|
+
await execFile('git', ['check-ignore', '--quiet', '--no-index', archiveProjectPath], {
|
|
100
|
+
cwd: repoRoot,
|
|
101
|
+
env: dependencies.env ?? process.env,
|
|
102
|
+
});
|
|
103
|
+
return true;
|
|
104
|
+
}
|
|
105
|
+
catch (error) {
|
|
106
|
+
if (isExitCode(error, 1)) {
|
|
107
|
+
return false;
|
|
108
|
+
}
|
|
109
|
+
throw error;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
async function resolveArchiveRepoRoot(repoRoot, archiveProjectPath, dependencies) {
|
|
113
|
+
try {
|
|
114
|
+
const archivePathIsGitignored = await isGitignoredArchivePath(repoRoot, archiveProjectPath, dependencies);
|
|
115
|
+
if (!archivePathIsGitignored) {
|
|
116
|
+
return repoRoot;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
catch {
|
|
120
|
+
return repoRoot;
|
|
121
|
+
}
|
|
91
122
|
const execFile = dependencies.gitExecFile ?? execFileAsync;
|
|
92
123
|
try {
|
|
93
124
|
const [{ stdout: commonDir }, { stdout: gitDir }] = await Promise.all([
|
|
@@ -148,7 +179,8 @@ export async function archiveProjectOnCompletion(options, dependencies = {}) {
|
|
|
148
179
|
const execFile = dependencies.execFile ?? execFileAsync;
|
|
149
180
|
const timestamp = dependencies.timestamp?.() ?? new Date().toISOString();
|
|
150
181
|
const snapshotName = buildArchiveSnapshotName(options.projectName, timestamp);
|
|
151
|
-
const
|
|
182
|
+
const archiveProjectPath = resolveLocalArchiveProjectPath(options.projectsRoot, options.projectName);
|
|
183
|
+
const archiveRepoRoot = await resolveArchiveRepoRoot(options.repoRoot, archiveProjectPath, dependencies);
|
|
152
184
|
const archiveBasePath = resolveCompletionArchivePath(archiveRepoRoot, options.projectsRoot, options.projectName);
|
|
153
185
|
const archivePath = await resolveUniqueArchivePath(archiveBasePath, dependencies);
|
|
154
186
|
await makeDir(dirname(archivePath));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inspect.d.ts","sourceRoot":"","sources":["../../../../src/commands/providers/inspect/inspect.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAGV,4BAA4B,EAC7B,MAAM,qCAAqC,CAAC;AAmB7C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"inspect.d.ts","sourceRoot":"","sources":["../../../../src/commands/providers/inspect/inspect.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAGV,4BAA4B,EAC7B,MAAM,qCAAqC,CAAC;AAmB7C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAuLpC,wBAAgB,6BAA6B,CAC3C,SAAS,GAAE,OAAO,CAAC,4BAA4B,CAAM,GACpD,OAAO,CAiBT"}
|
|
@@ -71,6 +71,9 @@ async function collectInspectResult(providerName, context, dependencies) {
|
|
|
71
71
|
drifted: 0,
|
|
72
72
|
missing: 0,
|
|
73
73
|
};
|
|
74
|
+
const copyTransform = mapping.transformCanonical
|
|
75
|
+
? { transformCanonical: mapping.transformCanonical }
|
|
76
|
+
: undefined;
|
|
74
77
|
for (const entry of manifest.entries) {
|
|
75
78
|
if (entry.provider !== adapter.name) {
|
|
76
79
|
continue;
|
|
@@ -79,7 +82,7 @@ async function collectInspectResult(providerName, context, dependencies) {
|
|
|
79
82
|
continue;
|
|
80
83
|
}
|
|
81
84
|
state.managed += 1;
|
|
82
|
-
const report = await dependencies.detectDrift(entry, scopeRoot.root);
|
|
85
|
+
const report = await dependencies.detectDrift(entry, scopeRoot.root, copyTransform);
|
|
83
86
|
if (report.state.status === 'in_sync') {
|
|
84
87
|
state.inSync += 1;
|
|
85
88
|
continue;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../../src/commands/providers/list/list.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAGV,yBAAyB,EAC1B,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../../src/commands/providers/list/list.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAGV,yBAAyB,EAC1B,MAAM,qCAAqC,CAAC;AAmB7C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAwMpC,wBAAgB,0BAA0B,CACxC,SAAS,GAAE,OAAO,CAAC,yBAAyB,CAAM,GACjD,OAAO,CAcT"}
|
|
@@ -2,7 +2,7 @@ import { join } from 'node:path';
|
|
|
2
2
|
import { buildCommandContext } from '../../../app/command-context.js';
|
|
3
3
|
import { readGlobalOptions, resolveConcreteScopes, } from '../../shared/shared.utils.js';
|
|
4
4
|
import { detectDrift } from '../../../drift/index.js';
|
|
5
|
-
import { resolveProjectRoot, resolveScopeRoot } from '../../../fs/paths.js';
|
|
5
|
+
import { normalizeToPosixPath, resolveProjectRoot, resolveScopeRoot, } from '../../../fs/paths.js';
|
|
6
6
|
import { loadManifest } from '../../../manifest/index.js';
|
|
7
7
|
import { claudeAdapter } from '../../../providers/claude/index.js';
|
|
8
8
|
import { codexAdapter } from '../../../providers/codex/index.js';
|
|
@@ -95,9 +95,11 @@ async function collectProviderList(context, dependencies) {
|
|
|
95
95
|
for (const adapter of dependencies.getAdapters()) {
|
|
96
96
|
const summary = createEmptySummary();
|
|
97
97
|
const contentTypes = new Set();
|
|
98
|
+
const allMappings = [];
|
|
98
99
|
for (const scope of scopes) {
|
|
99
100
|
for (const mapping of dependencies.getSyncMappings(adapter, scope)) {
|
|
100
101
|
contentTypes.add(mapping.contentType);
|
|
102
|
+
allMappings.push(mapping);
|
|
101
103
|
}
|
|
102
104
|
}
|
|
103
105
|
let detected = false;
|
|
@@ -114,7 +116,17 @@ async function collectProviderList(context, dependencies) {
|
|
|
114
116
|
continue;
|
|
115
117
|
}
|
|
116
118
|
summary.managed += 1;
|
|
117
|
-
const
|
|
119
|
+
const matchedMapping = allMappings.find((mapping) => {
|
|
120
|
+
const normalizedEntry = normalizeToPosixPath(entry.providerPath);
|
|
121
|
+
const normalizedDir = normalizeToPosixPath(mapping.providerDir);
|
|
122
|
+
return (mapping.contentType === entry.contentType &&
|
|
123
|
+
(normalizedEntry === normalizedDir ||
|
|
124
|
+
normalizedEntry.startsWith(`${normalizedDir}/`)));
|
|
125
|
+
});
|
|
126
|
+
const copyTransform = matchedMapping?.transformCanonical
|
|
127
|
+
? { transformCanonical: matchedMapping.transformCanonical }
|
|
128
|
+
: undefined;
|
|
129
|
+
const report = await dependencies.detectDrift(entry, scopeRoot.root, copyTransform);
|
|
118
130
|
if (report.state.status === 'in_sync') {
|
|
119
131
|
summary.inSync += 1;
|
|
120
132
|
continue;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CommandContext, GlobalOptions } from '../../app/command-context.js';
|
|
2
2
|
import type { SyncConfig } from '../../config/index.js';
|
|
3
|
-
import type { DriftReport } from '../../drift/index.js';
|
|
3
|
+
import type { CopyTransform, DriftReport } from '../../drift/index.js';
|
|
4
4
|
import type { Manifest } from '../../manifest/index.js';
|
|
5
5
|
import type { PathMapping, ProviderAdapter } from '../../providers/shared/index.js';
|
|
6
6
|
import type { ConcreteScope, ContentType, Scope, SyncStrategy } from '../../shared/types.js';
|
|
@@ -24,7 +24,7 @@ export interface ProvidersListDependencies {
|
|
|
24
24
|
getAdapters: () => ProviderAdapter[];
|
|
25
25
|
getSyncMappings: (adapter: ProviderAdapter, scope: Scope) => PathMapping[];
|
|
26
26
|
loadManifest: (manifestPath: string) => Promise<Manifest>;
|
|
27
|
-
detectDrift: (entry: Manifest['entries'][number], scopeRoot: string) => Promise<DriftReport>;
|
|
27
|
+
detectDrift: (entry: Manifest['entries'][number], scopeRoot: string, copyTransform?: CopyTransform) => Promise<DriftReport>;
|
|
28
28
|
}
|
|
29
29
|
export interface ProviderInspectMappingState {
|
|
30
30
|
scope: ConcreteScope;
|
|
@@ -51,7 +51,7 @@ export interface ProvidersInspectDependencies {
|
|
|
51
51
|
getAdapters: () => ProviderAdapter[];
|
|
52
52
|
getSyncMappings: (adapter: ProviderAdapter, scope: Scope) => PathMapping[];
|
|
53
53
|
loadManifest: (manifestPath: string) => Promise<Manifest>;
|
|
54
|
-
detectDrift: (entry: Manifest['entries'][number], scopeRoot: string) => Promise<DriftReport>;
|
|
54
|
+
detectDrift: (entry: Manifest['entries'][number], scopeRoot: string, copyTransform?: CopyTransform) => Promise<DriftReport>;
|
|
55
55
|
}
|
|
56
56
|
export interface ProvidersSetDependencies {
|
|
57
57
|
buildCommandContext: (options: GlobalOptions) => CommandContext;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"providers.types.d.ts","sourceRoot":"","sources":["../../../src/commands/providers/providers.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"providers.types.d.ts","sourceRoot":"","sources":["../../../src/commands/providers/providers.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC/D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACtE,OAAO,KAAK,EACV,aAAa,EACb,WAAW,EACX,KAAK,EACL,YAAY,EACb,MAAM,eAAe,CAAC;AAEvB,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,gBAAg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AW,EAAE,CAAC;IAC5B,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,QAAQ,EAAE,2BAA2B,EAAE,CAAC;CACzC;AAED,MAAM,WAAW,4BAA4B;IAC3C,mBAAmB,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,cAAc,CAAC;IAChE,gBAAgB,EAAE,CAChB,KAAK,EAAE,aAAa,EACpB,OAAO,EAAE,cAAc,KACpB,OAAO,CAAC,MAAM,CAAC,CAAC;IACrB,WAAW,EAAE,MAAM,eAAe,EAAE,CAAC;IACrC,eAAe,EAAE,CAAC,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,KAAK,KAAK,WAAW,EAAE,CAAC;IAC3E,YAAY,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC1D,WAAW,EAAE,CACX,KAAK,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,EAClC,SAAS,EAAE,MAAM,EACjB,aAAa,CAAC,EAAE,aAAa,KAC1B,OAAO,CAAC,WAAW,CAAC,CAAC;CAC3B;AAED,MAAM,WAAW,wBAAwB;IACvC,mBAAmB,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,cAAc,CAAC;IAChE,gBAAgB,EAAE,CAChB,KAAK,EAAE,aAAa,EACpB,OAAO,EAAE,cAAc,KACpB,OAAO,CAAC,MAAM,CAAC,CAAC;IACrB,WAAW,EAAE,MAAM,eAAe,EAAE,CAAC;IACrC,cAAc,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;IAC5D,cAAc,EAAE,CACd,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,UAAU,KACf,OAAO,CAAC,UAAU,CAAC,CAAC;CAC1B"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type CommandContext, type GlobalOptions } from '../../app/command-context.js';
|
|
2
2
|
import { type CodexRoleStray } from '../shared/codex-strays.js';
|
|
3
3
|
import { type MultiSelectChoice, type PromptContext } from '../shared/shared.prompts.js';
|
|
4
|
-
import { type DriftReport } from '../../drift/index.js';
|
|
4
|
+
import { type CopyTransform, type DriftReport } from '../../drift/index.js';
|
|
5
5
|
import { type CanonicalEntry } from '../../engine/index.js';
|
|
6
6
|
import type { Manifest } from '../../manifest/index.js';
|
|
7
7
|
import { type CodexExtensionPlan } from '../../providers/codex/codec/sync-extension.js';
|
|
@@ -17,7 +17,7 @@ interface StatusDependencies {
|
|
|
17
17
|
getAdapters: () => ProviderAdapter[];
|
|
18
18
|
getActiveAdapters: (adapters: ProviderAdapter[], scopeRoot: string) => Promise<ProviderAdapter[]>;
|
|
19
19
|
getSyncMappings: (adapter: ProviderAdapter, scope: Scope) => PathMapping[];
|
|
20
|
-
detectDrift: (entry: Manifest['entries'][number], scopeRoot: string) => Promise<DriftReport>;
|
|
20
|
+
detectDrift: (entry: Manifest['entries'][number], scopeRoot: string, copyTransform?: CopyTransform) => Promise<DriftReport>;
|
|
21
21
|
detectStrays: (provider: string, providerDir: string, manifest: Manifest, canonicalEntries: CanonicalEntry[], mapping?: Pick<PathMapping, 'contentType' | 'providerExtension'>) => Promise<DriftReport[]>;
|
|
22
22
|
detectCodexRoleStrays: (scopeRoot: string, canonicalEntries: CanonicalEntry[]) => Promise<CodexRoleStray[]>;
|
|
23
23
|
computeCodexProjectExtensionPlan: (scopeRoot: string, canonicalEntries: CanonicalEntry[]) => Promise<CodexExtensionPlan>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/status/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,aAAa,EACnB,MAAM,sBAAsB,CAAC;AAK9B,OAAO,EACL,KAAK,cAAc,EAGpB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAEnB,MAAM,iCAAiC,CAAC;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,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,aAAa,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACzE,UAAU,EAAE,CACV,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,oBAAoB,EAC3B,QAAQ,EAAE,QAAQ,EAClB,OAAO,CAAC,EAAE;QAAE,gBAAgB,CAAC,EAAE,OAAO,CAAA;KAAE,KACrC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACvB,iBAAiB,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,MAAM,CAAC;CACvD;AAED,UAAU,oBAAoB;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,WAAW,CAAC;IACpB,OAAO,EAAE,WAAW,CAAC;IACrB,QAAQ,CAAC,EAAE;QACT,IAAI,EAAE,YAAY,CAAC;QACnB,QAAQ,EAAE,MAAM,CAAC;QACjB,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;CACH;AAieD,wBAAgB,mBAAmB,CACjC,SAAS,GAAE,OAAO,CAAC,kBAAkB,CAAM,GAC1C,OAAO,CAcT"}
|
|
@@ -4,7 +4,7 @@ import { adoptStrayToCanonical, isAdoptionConflictError, } from '../shared/adopt
|
|
|
4
4
|
import { detectCodexRoleStrays, regenerateCodexAfterAdoption, } from '../shared/codex-strays.js';
|
|
5
5
|
import { confirmAction, selectManyWithAbort, } from '../shared/shared.prompts.js';
|
|
6
6
|
import { readGlobalOptions, resolveConcreteScopes, } from '../shared/shared.utils.js';
|
|
7
|
-
import { detectDrift, detectStrays } from '../../drift/index.js';
|
|
7
|
+
import { detectDrift, detectStrays, } from '../../drift/index.js';
|
|
8
8
|
import { scanCanonical } from '../../engine/index.js';
|
|
9
9
|
import { normalizeToPosixPath, resolveProjectRoot, resolveScopeRoot, } from '../../fs/paths.js';
|
|
10
10
|
import { loadManifest, saveManifest } from '../../manifest/manager.js';
|
|
@@ -132,10 +132,15 @@ async function collectScopeReports(scope, context, dependencies) {
|
|
|
132
132
|
if (!contentTypeAllowed(entry.contentType, scope)) {
|
|
133
133
|
continue;
|
|
134
134
|
}
|
|
135
|
-
|
|
135
|
+
const matchedMapping = mappings.find((mapping) => mapping.contentType === entry.contentType &&
|
|
136
|
+
entryInsideMapping(entry.providerPath, mapping.providerDir));
|
|
137
|
+
if (!matchedMapping) {
|
|
136
138
|
continue;
|
|
137
139
|
}
|
|
138
|
-
|
|
140
|
+
const copyTransform = matchedMapping.transformCanonical
|
|
141
|
+
? { transformCanonical: matchedMapping.transformCanonical }
|
|
142
|
+
: undefined;
|
|
143
|
+
reports.push(await dependencies.detectDrift(entry, scopeRoot, copyTransform));
|
|
139
144
|
}
|
|
140
145
|
for (const mapping of mappings) {
|
|
141
146
|
for (const canonicalEntry of canonicalEntries) {
|
package/dist/drift/detector.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import type { ManifestEntry } from '../manifest/manifest.types.js';
|
|
2
2
|
import type { DriftReport } from './drift.types.js';
|
|
3
|
-
export
|
|
3
|
+
export interface CopyTransform {
|
|
4
|
+
transformCanonical: (content: string, canonicalPath: string) => string;
|
|
5
|
+
}
|
|
6
|
+
export declare function detectDrift(entry: ManifestEntry, scopeRoot: string, copyTransform?: CopyTransform): Promise<DriftReport>;
|
|
4
7
|
//# sourceMappingURL=detector.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"detector.d.ts","sourceRoot":"","sources":["../../src/drift/detector.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"detector.d.ts","sourceRoot":"","sources":["../../src/drift/detector.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,MAAM,WAAW,aAAa;IAC5B,kBAAkB,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,KAAK,MAAM,CAAC;CACxE;AAcD,wBAAsB,WAAW,CAC/B,KAAK,EAAE,aAAa,EACpB,SAAS,EAAE,MAAM,EACjB,aAAa,CAAC,EAAE,aAAa,GAC5B,OAAO,CAAC,WAAW,CAAC,CAkFtB"}
|
package/dist/drift/detector.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { lstat, readlink, stat } from 'node:fs/promises';
|
|
1
|
+
import { lstat, readFile, readlink, stat } from 'node:fs/promises';
|
|
2
2
|
import { dirname, resolve } from 'node:path';
|
|
3
|
-
import { computeContentHash } from '../manifest/hash.js';
|
|
3
|
+
import { computeContentHash, computeStringHash } from '../manifest/hash.js';
|
|
4
4
|
function createReport(entry, state) {
|
|
5
5
|
return {
|
|
6
6
|
canonical: entry.canonicalPath,
|
|
@@ -9,7 +9,7 @@ function createReport(entry, state) {
|
|
|
9
9
|
state,
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
|
-
export async function detectDrift(entry, scopeRoot) {
|
|
12
|
+
export async function detectDrift(entry, scopeRoot, copyTransform) {
|
|
13
13
|
const providerPath = resolve(scopeRoot, entry.providerPath);
|
|
14
14
|
const canonicalPath = resolve(scopeRoot, entry.canonicalPath);
|
|
15
15
|
// Missing check must run first, before strategy-specific branches.
|
|
@@ -62,6 +62,17 @@ export async function detectDrift(entry, scopeRoot) {
|
|
|
62
62
|
if (entry.contentHash === currentHash) {
|
|
63
63
|
return createReport(entry, { status: 'in_sync' });
|
|
64
64
|
}
|
|
65
|
+
// When the manifest hash is stale (e.g. frontmatter-only edits to the
|
|
66
|
+
// canonical source that don't change the rendered output), re-derive the
|
|
67
|
+
// expected provider content from the current canonical + transform and
|
|
68
|
+
// compare that instead.
|
|
69
|
+
if (copyTransform && entry.isFile) {
|
|
70
|
+
const canonicalContent = await readFile(canonicalPath, 'utf8');
|
|
71
|
+
const rendered = copyTransform.transformCanonical(canonicalContent, entry.canonicalPath);
|
|
72
|
+
if (computeStringHash(rendered) === currentHash) {
|
|
73
|
+
return createReport(entry, { status: 'in_sync' });
|
|
74
|
+
}
|
|
75
|
+
}
|
|
65
76
|
return createReport(entry, {
|
|
66
77
|
status: 'drifted',
|
|
67
78
|
reason: 'modified',
|
package/dist/drift/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/drift/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/drift/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC"}
|
package/dist/manifest/manager.js
CHANGED
|
@@ -3,7 +3,7 @@ import { mkdir, readFile, rename, writeFile } from 'node:fs/promises';
|
|
|
3
3
|
import { dirname } from 'node:path';
|
|
4
4
|
import { CliError } from '../errors/index.js';
|
|
5
5
|
import { ManifestSchema, } from './manifest.types.js';
|
|
6
|
-
const OAT_VERSION = '0.0.
|
|
6
|
+
const OAT_VERSION = '0.0.18';
|
|
7
7
|
function formatIssuePath(path) {
|
|
8
8
|
if (path.length === 0) {
|
|
9
9
|
return '(root)';
|