@open-agent-toolkit/cli 0.0.69 → 0.0.70
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/public-package-versions.json +4 -4
- package/dist/commands/tools/update/index.d.ts +6 -0
- package/dist/commands/tools/update/index.d.ts.map +1 -1
- package/dist/commands/tools/update/index.js +20 -0
- package/dist/commands/tools/update/update-tools.d.ts +2 -0
- package/dist/commands/tools/update/update-tools.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -7,6 +7,12 @@ export declare function buildSyncSubprocessArgs(entrypoint: string, execArgv: st
|
|
|
7
7
|
scope: 'project' | 'user';
|
|
8
8
|
}): string[];
|
|
9
9
|
export declare function createToolsUpdateCommand(dependencies?: UpdateToolsDependencies, syncDependencies?: AutoSyncDependencies): Command;
|
|
10
|
+
/**
|
|
11
|
+
* @internal Exported for focused unit coverage. Current/newer workflow tools
|
|
12
|
+
* intentionally trigger this path so older installs can repair a missing OAT
|
|
13
|
+
* core .gitignore section even when their workflow pack is already current.
|
|
14
|
+
*/
|
|
15
|
+
export declare function shouldBackfillWorkflowGitignore(result: UpdateResult): boolean;
|
|
10
16
|
export declare function shouldRefreshCoreDocs(target: UpdateTarget, result: UpdateResult): boolean;
|
|
11
17
|
export declare function formatUpdatedToolMessage(tool: ToolInfo, dryRun: boolean): string;
|
|
12
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/tools/update/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/tools/update/index.ts"],"names":[],"mappings":"AAaA,OAAO,EACL,KAAK,oBAAoB,EAE1B,MAAM,kCAAkC,CAAC;AAE1C,OAAO,KAAK,EAAY,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAKvE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,uBAAuB,EAE7B,MAAM,gBAAgB,CAAC;AAexB,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAAE,EAClB,OAAO,EAAE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,SAAS,GAAG,MAAM,CAAA;CAAE,GAClD,MAAM,EAAE,CAUV;AAgCD,wBAAgB,wBAAwB,CACtC,YAAY,GAAE,uBAA6C,EAC3D,gBAAgB,GAAE,oBAA8C,GAC/D,OAAO,CAuJT;AAED;;;;GAIG;AACH,wBAAgB,+BAA+B,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAI7E;AAED,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,YAAY,EACpB,MAAM,EAAE,YAAY,GACnB,OAAO,CAOT;AAED,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,QAAQ,EACd,MAAM,EAAE,OAAO,GACd,MAAM,CAMR"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { execFile } from 'node:child_process';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
3
|
import { buildCommandContext } from '../../../app/command-context.js';
|
|
4
|
+
import { applyOatCoreGitignore } from '../../init/gitignore.js';
|
|
4
5
|
import { copyDirWithStatus, copyFileWithStatus, } from '../../init/tools/shared/copy-helpers.js';
|
|
5
6
|
import { readGlobalOptions, resolveConcreteScopes, } from '../../shared/shared.utils.js';
|
|
6
7
|
import { autoSync, } from '../../tools/shared/auto-sync.js';
|
|
@@ -22,6 +23,7 @@ const defaultDependencies = {
|
|
|
22
23
|
copyDirWithStatus,
|
|
23
24
|
copyFileWithStatus,
|
|
24
25
|
fileExists,
|
|
26
|
+
applyOatCoreGitignore,
|
|
25
27
|
};
|
|
26
28
|
export function buildSyncSubprocessArgs(entrypoint, execArgv, options) {
|
|
27
29
|
return [
|
|
@@ -81,6 +83,16 @@ export function createToolsUpdateCommand(dependencies = defaultDependencies, syn
|
|
|
81
83
|
const dryRun = opts.dryRun ?? false;
|
|
82
84
|
const result = await updateTools(target, scopes, context.cwd, context.home, dryRun, dependencies);
|
|
83
85
|
const assetsRoot = dryRun ? null : await dependencies.resolveAssetsRoot();
|
|
86
|
+
if (!dryRun &&
|
|
87
|
+
shouldBackfillWorkflowGitignore(result) &&
|
|
88
|
+
dependencies.applyOatCoreGitignore) {
|
|
89
|
+
const repoRoot = await resolveProjectRoot(context.cwd);
|
|
90
|
+
const gitignoreResult = await dependencies.applyOatCoreGitignore(repoRoot);
|
|
91
|
+
if (gitignoreResult.action !== 'no-change') {
|
|
92
|
+
const verb = gitignoreResult.action === 'created' ? 'Created' : 'Updated';
|
|
93
|
+
logger.info(`${verb} .gitignore OAT core section (${gitignoreResult.entries.length} entries).`);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
84
96
|
// Refresh ~/.oat/docs/ when the core pack is explicitly updated or
|
|
85
97
|
// reconciled through --all (D3 requirement).
|
|
86
98
|
if (shouldRefreshCoreDocs(target, result) && assetsRoot) {
|
|
@@ -152,6 +164,14 @@ export function createToolsUpdateCommand(dependencies = defaultDependencies, syn
|
|
|
152
164
|
}
|
|
153
165
|
});
|
|
154
166
|
}
|
|
167
|
+
/**
|
|
168
|
+
* @internal Exported for focused unit coverage. Current/newer workflow tools
|
|
169
|
+
* intentionally trigger this path so older installs can repair a missing OAT
|
|
170
|
+
* core .gitignore section even when their workflow pack is already current.
|
|
171
|
+
*/
|
|
172
|
+
export function shouldBackfillWorkflowGitignore(result) {
|
|
173
|
+
return [...result.updated, ...result.current, ...result.newer].some((tool) => tool.scope === 'project' && tool.pack === 'workflows');
|
|
174
|
+
}
|
|
155
175
|
export function shouldRefreshCoreDocs(target, result) {
|
|
156
176
|
if (target.kind === 'name')
|
|
157
177
|
return false;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ApplyOatCoreResult } from '../../init/gitignore.js';
|
|
1
2
|
import type { CopyStatus } from '../../init/tools/shared/copy-helpers.js';
|
|
2
3
|
import type { ScanToolsOptions } from '../../tools/shared/scan-tools.js';
|
|
3
4
|
import type { PackName, ToolInfo } from '../../tools/shared/types.js';
|
|
@@ -25,6 +26,7 @@ export interface UpdateToolsDependencies {
|
|
|
25
26
|
copyDirWithStatus: (source: string, destination: string, force: boolean) => Promise<CopyStatus>;
|
|
26
27
|
copyFileWithStatus: (source: string, destination: string, force: boolean) => Promise<CopyStatus>;
|
|
27
28
|
fileExists: (path: string) => Promise<boolean>;
|
|
29
|
+
applyOatCoreGitignore?: (repoRoot: string) => Promise<ApplyOatCoreResult>;
|
|
28
30
|
}
|
|
29
31
|
export declare function updateTools(target: UpdateTarget, scopes: ConcreteScope[], cwd: string, home: string, dryRun: boolean, dependencies: UpdateToolsDependencies): Promise<UpdateResult>;
|
|
30
32
|
//# sourceMappingURL=update-tools.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-tools.d.ts","sourceRoot":"","sources":["../../../../src/commands/tools/update/update-tools.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AAkB3E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,MAAM,MAAM,YAAY,GACpB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC9B;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,QAAQ,CAAA;CAAE,GAChC;IAAE,IAAI,EAAE,KAAK,CAAA;CAAE,CAAC;AAEpB,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,QAAQ,EAAE,CAAC;IACpB,OAAO,E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M,EAAE,OAAO,EACf,YAAY,EAAE,uBAAuB,GACpC,OAAO,CAAC,YAAY,CAAC,CA0GvB"}
|
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.70",
|
|
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.70"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@types/node": "^22.10.0",
|