@open-agent-toolkit/cli 0.0.30 → 0.0.32
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/README.md +5 -0
- package/assets/docs/cli-utilities/config-and-local-state.md +12 -4
- package/assets/docs/provider-sync/commands.md +13 -6
- package/assets/docs/provider-sync/index.md +2 -0
- package/assets/docs/provider-sync/instruction-sync.md +146 -0
- package/assets/docs/provider-sync/scope-and-surface.md +2 -2
- package/assets/docs/reference/troubleshooting.md +10 -5
- package/assets/public-package-versions.json +4 -4
- package/dist/app/create-program.d.ts.map +1 -1
- package/dist/app/create-program.js +2 -2
- package/dist/commands/docs/init/scaffold.d.ts.map +1 -1
- package/dist/commands/docs/init/scaffold.js +12 -11
- package/dist/commands/instructions/instructions.types.d.ts +17 -4
- package/dist/commands/instructions/instructions.types.d.ts.map +1 -1
- package/dist/commands/instructions/instructions.types.js +5 -1
- package/dist/commands/instructions/instructions.utils.d.ts +4 -2
- package/dist/commands/instructions/instructions.utils.d.ts.map +1 -1
- package/dist/commands/instructions/instructions.utils.js +238 -25
- package/dist/commands/instructions/sync/sync.d.ts +3 -1
- package/dist/commands/instructions/sync/sync.d.ts.map +1 -1
- package/dist/commands/instructions/sync/sync.js +176 -16
- package/dist/commands/instructions/validate/validate.d.ts +1 -1
- package/dist/commands/instructions/validate/validate.d.ts.map +1 -1
- package/dist/commands/instructions/validate/validate.js +16 -6
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -4
- package/dist/manifest/manager.d.ts.map +1 -1
- package/dist/manifest/manager.js +1 -1
- package/dist/shared/oat-version.d.ts +2 -0
- package/dist/shared/oat-version.d.ts.map +1 -0
- package/dist/shared/oat-version.js +3 -0
- package/package.json +2 -2
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { buildCommandContext } from '../../../app/command-context.js';
|
|
2
|
-
import {
|
|
2
|
+
import { INSTRUCTION_SYNC_STRATEGIES, } from '../../instructions/instructions.types.js';
|
|
3
|
+
import { buildInstructionsPayload, DEFAULT_INSTRUCTION_SYNC_STRATEGY, formatInstructionsReport, resolveInstructionSyncStrategy, scanInstructionFiles, } from '../../instructions/instructions.utils.js';
|
|
3
4
|
import { readGlobalOptions } from '../../shared/shared.utils.js';
|
|
4
5
|
import { CliError } from '../../../errors/cli-error.js';
|
|
5
6
|
import { resolveProjectRoot } from '../../../fs/paths.js';
|
|
6
|
-
import { Command } from 'commander';
|
|
7
|
+
import { Command, Option } from 'commander';
|
|
7
8
|
function defaultDependencies() {
|
|
8
9
|
return {
|
|
9
10
|
buildCommandContext,
|
|
@@ -17,12 +18,18 @@ export function createInstructionsValidateCommand(overrides = {}) {
|
|
|
17
18
|
...overrides,
|
|
18
19
|
};
|
|
19
20
|
return new Command('validate')
|
|
20
|
-
.description('Validate AGENTS.md
|
|
21
|
-
.
|
|
21
|
+
.description('Validate AGENTS.md/CLAUDE.md sync integrity for the selected strategy')
|
|
22
|
+
.addOption(new Option('--strategy <strategy>', 'Sync strategy')
|
|
23
|
+
.choices([...INSTRUCTION_SYNC_STRATEGIES])
|
|
24
|
+
.default(DEFAULT_INSTRUCTION_SYNC_STRATEGY))
|
|
25
|
+
.action(async (options, command) => {
|
|
22
26
|
const context = dependencies.buildCommandContext(readGlobalOptions(command));
|
|
27
|
+
const strategy = resolveInstructionSyncStrategy(options.strategy);
|
|
23
28
|
try {
|
|
24
29
|
const repoRoot = await dependencies.resolveProjectRoot(context.cwd);
|
|
25
|
-
const entries = await dependencies.scanInstructionFiles(repoRoot
|
|
30
|
+
const entries = await dependencies.scanInstructionFiles(repoRoot, {
|
|
31
|
+
strategy,
|
|
32
|
+
});
|
|
26
33
|
const payload = buildInstructionsPayload({
|
|
27
34
|
mode: 'validate',
|
|
28
35
|
entries,
|
|
@@ -34,7 +41,10 @@ export function createInstructionsValidateCommand(overrides = {}) {
|
|
|
34
41
|
else {
|
|
35
42
|
context.logger.info(formatInstructionsReport(payload, repoRoot));
|
|
36
43
|
if (payload.status === 'drift') {
|
|
37
|
-
|
|
44
|
+
const fixCommand = strategy === DEFAULT_INSTRUCTION_SYNC_STRATEGY
|
|
45
|
+
? 'Fix with: oat instructions sync'
|
|
46
|
+
: `Fix with: oat instructions sync --strategy ${strategy}`;
|
|
47
|
+
context.logger.info(fixCommand);
|
|
38
48
|
}
|
|
39
49
|
}
|
|
40
50
|
process.exitCode = payload.status === 'ok' ? 0 : 1;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
export declare function normalizeArgv(argv: string[]): string[];
|
|
3
3
|
export declare function main(argv?: string[]): Promise<void>;
|
|
4
|
+
export declare function isEntrypoint(argv?: string[], entrypointUrl?: string): boolean;
|
|
4
5
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAWA,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAatD;AAED,wBAAsB,IAAI,CAAC,IAAI,GAAE,MAAM,EAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAIvE;AAED,wBAAgB,YAAY,CAC1B,IAAI,GAAE,MAAM,EAAiB,EAC7B,aAAa,GAAE,MAAwB,GACtC,OAAO,CAaT"}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { realpathSync } from 'node:fs';
|
|
2
3
|
import { resolve } from 'node:path';
|
|
3
|
-
import { pathToFileURL } from 'node:url';
|
|
4
|
+
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
4
5
|
import { createProgram } from './app/create-program.js';
|
|
5
6
|
import { registerCommands } from './commands/index.js';
|
|
6
7
|
import { CliError } from './errors/index.js';
|
|
@@ -23,11 +24,18 @@ export async function main(argv = process.argv) {
|
|
|
23
24
|
registerCommands(program);
|
|
24
25
|
await program.parseAsync(normalizeArgv(argv));
|
|
25
26
|
}
|
|
26
|
-
function isEntrypoint() {
|
|
27
|
-
if (!
|
|
27
|
+
export function isEntrypoint(argv = process.argv, entrypointUrl = import.meta.url) {
|
|
28
|
+
if (!argv[1]) {
|
|
28
29
|
return false;
|
|
29
30
|
}
|
|
30
|
-
|
|
31
|
+
const entrypointPath = fileURLToPath(entrypointUrl);
|
|
32
|
+
const argvPath = resolve(argv[1]);
|
|
33
|
+
try {
|
|
34
|
+
return realpathSync(entrypointPath) === realpathSync(argvPath);
|
|
35
|
+
}
|
|
36
|
+
catch {
|
|
37
|
+
return entrypointUrl === pathToFileURL(argvPath).href;
|
|
38
|
+
}
|
|
31
39
|
}
|
|
32
40
|
if (isEntrypoint()) {
|
|
33
41
|
void main().catch((error) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../src/manifest/manager.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../src/manifest/manager.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,aAAa,EAEnB,MAAM,kBAAkB,CAAC;AAa1B,wBAAgB,mBAAmB,IAAI,QAAQ,CAO9C;AAED,wBAAsB,YAAY,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CA6C1E;AAED,wBAAsB,YAAY,CAChC,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,QAAQ,GACjB,OAAO,CAAC,IAAI,CAAC,CAQf;AAED,wBAAgB,SAAS,CACvB,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE,MAAM,GACf,aAAa,GAAG,SAAS,CAK3B;AAED,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,aAAa,GAAG,QAAQ,CAc3E;AAED,wBAAgB,WAAW,CACzB,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE,MAAM,GACf,QAAQ,CAeV"}
|
package/dist/manifest/manager.js
CHANGED
|
@@ -2,8 +2,8 @@ import { randomUUID } from 'node:crypto';
|
|
|
2
2
|
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
|
+
import { OAT_VERSION } from '../shared/oat-version.js';
|
|
5
6
|
import { ManifestSchema, } from './manifest.types.js';
|
|
6
|
-
const OAT_VERSION = '0.0.24';
|
|
7
7
|
function formatIssuePath(path) {
|
|
8
8
|
if (path.length === 0) {
|
|
9
9
|
return '(root)';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oat-version.d.ts","sourceRoot":"","sources":["../../src/shared/oat-version.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,WAAW,QAAiC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-agent-toolkit/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.32",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Open Agent Toolkit CLI",
|
|
6
6
|
"homepage": "https://github.com/voxmedia/open-agent-toolkit/tree/main/packages/cli",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"ora": "^9.0.0",
|
|
34
34
|
"yaml": "2.8.2",
|
|
35
35
|
"zod": "^3.25.76",
|
|
36
|
-
"@open-agent-toolkit/control-plane": "0.0.
|
|
36
|
+
"@open-agent-toolkit/control-plane": "0.0.32"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@types/node": "^22.10.0",
|