@open-agent-toolkit/cli 0.1.32 → 0.1.33
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/cli-utilities/config-and-local-state.md +1 -1
- package/assets/docs/cli-utilities/tool-packs.md +1 -1
- package/assets/docs/reference/cli-reference.md +14 -14
- package/assets/public-package-versions.json +4 -4
- package/assets/scripts/resolve-tracking.sh +52 -0
- package/dist/commands/doctor/index.d.ts +4 -1
- package/dist/commands/doctor/index.d.ts.map +1 -1
- package/dist/commands/doctor/index.js +12 -3
- package/dist/commands/pjm/doctor.d.ts +5 -1
- package/dist/commands/pjm/doctor.d.ts.map +1 -1
- package/dist/commands/pjm/doctor.js +13 -1
- package/dist/commands/pjm/index.d.ts.map +1 -1
- package/dist/commands/pjm/index.js +5 -2
- package/dist/commands/sync/apply.d.ts.map +1 -1
- package/dist/commands/sync/apply.js +6 -2
- package/dist/manifest/manager.d.ts.map +1 -1
- package/dist/manifest/manager.js +4 -1
- package/package.json +2 -2
|
@@ -87,7 +87,7 @@ Tool-pack installation state also lives here as shared repo config:
|
|
|
87
87
|
- `tools.utility`
|
|
88
88
|
- `tools.workflows`
|
|
89
89
|
|
|
90
|
-
Use `oat config get tools.<pack>` when you need an explicit installed-capability signal for workflows or troubleshooting.
|
|
90
|
+
Use `oat config get tools.<pack>` when you need an explicit installed-capability signal for workflows or troubleshooting. PJM diagnostics use `tools.project-management`; disabled or unset repos report PJM as skipped instead of treating absent `.oat/repo/pjm/` files as drift.
|
|
91
91
|
|
|
92
92
|
Workflow automation preferences are also visible through `oat config` and can be set at local, shared, or user scope. Notable review-loop keys:
|
|
93
93
|
|
|
@@ -53,7 +53,7 @@ Decisions are now file-per-record under `reference/decisions/` (created and inde
|
|
|
53
53
|
|
|
54
54
|
`oat pjm init` is idempotent and non-destructive. Existing reference docs are skipped and left unchanged, so curated repo state is not overwritten on repeated runs.
|
|
55
55
|
|
|
56
|
-
Run `oat pjm doctor` to check an existing surface: it reports missing canonical files, leftover template frontmatter, and legacy/loose/second-roadmap drift, and accepts `--json` for machine-readable output. The same checks also run under project-scope `oat doctor
|
|
56
|
+
Run `oat pjm doctor` to check an existing surface after the `project-management` pack is enabled: it reports missing canonical files, leftover template frontmatter, and legacy/loose/second-roadmap drift, and accepts `--json` for machine-readable output. When the pack is disabled or not configured, doctor reports PJM as disabled and skips drift checks. The same gated checks also run under project-scope `oat doctor`.
|
|
57
57
|
|
|
58
58
|
Useful options:
|
|
59
59
|
|
|
@@ -37,20 +37,20 @@ The first practical expansion path is to keep improving the existing owners: [Do
|
|
|
37
37
|
|
|
38
38
|
## Command Groups
|
|
39
39
|
|
|
40
|
-
| Command group | What it covers
|
|
41
|
-
| ----------------------------------------------- |
|
|
42
|
-
| `oat init` | Bootstrap canonical OAT directories, sync config, optional hooks, and guided setup.
|
|
43
|
-
| `oat tools ...` | Install, inspect, update, and remove bundled OAT tool packs and assets.
|
|
44
|
-
| `oat pjm ...` | Initialize the two-layer repo-reference surface (`init`), run reference diagnostics (`doctor`), and migrate legacy layouts to `pjm/` + `reference/` (`migrate`) after installing the project-management pack. | [Install vs. initialize](../cli-utilities/tool-packs.md#install-vs-initialize) |
|
|
45
|
-
| `oat decision ...` | Create, index, and migrate file-per-record repo decisions under `reference/decisions/` (`init`, `new`, `regenerate-index`, `migrate`).
|
|
46
|
-
| `oat backlog ...` / `oat local ...` | File-backed backlog helpers, local path sync, and local-only operational support.
|
|
47
|
-
| `oat config ...` / `oat instructions ...` | Config discovery, source-aware config dumps, supported mutations, and instruction-integrity helpers.
|
|
48
|
-
| `oat state ...` / `oat index ...` / `internal` | Repo dashboard refresh, repo indexing, validation helpers, and diagnostics.
|
|
49
|
-
| `oat docs ...` | Docs app bootstrap, migration, index generation, nav sync, and docs workflow entrypoints.
|
|
50
|
-
| `oat status` / `oat sync` / `oat providers ...` | Provider sync, drift inspection, provider configuration, and adoption behavior.
|
|
51
|
-
| `oat project ...` / `oat cleanup ...` | Project scaffolding, active-project status inspection, tracked-project listing, plan validation, archive creation, and project/artifact cleanup commands.
|
|
52
|
-
| `oat review ...` | Review artifact discovery helpers, including latest-review resolution for project and ad-hoc review flows.
|
|
53
|
-
| `oat repo ...` | Repository-level workflows such as archive sync and PR-comment analysis.
|
|
40
|
+
| Command group | What it covers | Go deeper |
|
|
41
|
+
| ----------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
|
|
42
|
+
| `oat init` | Bootstrap canonical OAT directories, sync config, optional hooks, and guided setup. | [CLI Bootstrap](../cli-utilities/bootstrap.md) |
|
|
43
|
+
| `oat tools ...` | Install, inspect, update, and remove bundled OAT tool packs and assets. | [Tool Packs](../cli-utilities/tool-packs.md) |
|
|
44
|
+
| `oat pjm ...` | Initialize the two-layer repo-reference surface (`init`), run enabled-pack reference diagnostics (`doctor`), and migrate legacy layouts to `pjm/` + `reference/` (`migrate`) after installing the project-management pack. | [Install vs. initialize](../cli-utilities/tool-packs.md#install-vs-initialize) |
|
|
45
|
+
| `oat decision ...` | Create, index, and migrate file-per-record repo decisions under `reference/decisions/` (`init`, `new`, `regenerate-index`, `migrate`). | [Config and Local State](../cli-utilities/config-and-local-state.md#oat-decision-) |
|
|
46
|
+
| `oat backlog ...` / `oat local ...` | File-backed backlog helpers, local path sync, and local-only operational support. | [Config and Local State](../cli-utilities/config-and-local-state.md) |
|
|
47
|
+
| `oat config ...` / `oat instructions ...` | Config discovery, source-aware config dumps, supported mutations, and instruction-integrity helpers. | [Config and Local State](../cli-utilities/config-and-local-state.md) |
|
|
48
|
+
| `oat state ...` / `oat index ...` / `internal` | Repo dashboard refresh, repo indexing, validation helpers, and diagnostics. | [Config and Local State](../cli-utilities/config-and-local-state.md) |
|
|
49
|
+
| `oat docs ...` | Docs app bootstrap, migration, index generation, nav sync, and docs workflow entrypoints. | [Docs Tooling Commands](../docs-tooling/commands.md) |
|
|
50
|
+
| `oat status` / `oat sync` / `oat providers ...` | Provider sync, drift inspection, provider configuration, and adoption behavior. | [Provider Sync](../provider-sync/index.md) |
|
|
51
|
+
| `oat project ...` / `oat cleanup ...` | Project scaffolding, active-project status inspection, tracked-project listing, plan validation, archive creation, and project/artifact cleanup commands. | [Workflow & Projects](../workflows/projects/index.md) |
|
|
52
|
+
| `oat review ...` | Review artifact discovery helpers, including latest-review resolution for project and ad-hoc review flows. | [Reviews](../workflows/projects/reviews.md) |
|
|
53
|
+
| `oat repo ...` | Repository-level workflows such as archive sync and PR-comment analysis. | [Repository Analysis](../workflows/projects/repo-analysis.md) |
|
|
54
54
|
|
|
55
55
|
Notable commands introduced in the current CLI surface:
|
|
56
56
|
|
|
@@ -100,6 +100,41 @@ resolve_root_commit_hash() {
|
|
|
100
100
|
git rev-parse HEAD
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
+
is_agent_instructions_operation() {
|
|
104
|
+
local operation="${1:?Missing operation}"
|
|
105
|
+
[[ "$operation" == "agentInstructions" || "$operation" == "agentInstructionsApply" ]]
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
normalize_repo_relative_path() {
|
|
109
|
+
local path="${1:?Missing path}"
|
|
110
|
+
|
|
111
|
+
path="${path#./}"
|
|
112
|
+
if [[ "$path" == "$REPO_ROOT"/* ]]; then
|
|
113
|
+
path="${path#"$REPO_ROOT"/}"
|
|
114
|
+
fi
|
|
115
|
+
|
|
116
|
+
echo "$path"
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
artifact_path_is_tracked_and_present() {
|
|
120
|
+
local artifact_path="${1:?Missing artifact path}"
|
|
121
|
+
local relative_path absolute_path
|
|
122
|
+
|
|
123
|
+
relative_path="$(normalize_repo_relative_path "$artifact_path")"
|
|
124
|
+
absolute_path="${REPO_ROOT}/${relative_path}"
|
|
125
|
+
|
|
126
|
+
[[ -e "$absolute_path" ]] || return 1
|
|
127
|
+
git -C "$REPO_ROOT" ls-files --error-unmatch -- "$relative_path" >/dev/null 2>&1
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
remove_tracking_key() {
|
|
131
|
+
local operation="${1:?Missing operation}"
|
|
132
|
+
local existing="${2:?Missing existing tracking JSON}"
|
|
133
|
+
|
|
134
|
+
mkdir -p "$(dirname "$TRACKING_FILE")"
|
|
135
|
+
echo "$existing" | jq --arg op "$operation" 'del(.[$op])' > "$TRACKING_FILE"
|
|
136
|
+
}
|
|
137
|
+
|
|
103
138
|
cmd_init() {
|
|
104
139
|
mkdir -p "$(dirname "$TRACKING_FILE")"
|
|
105
140
|
if [[ ! -f "$TRACKING_FILE" ]] || ! jq empty "$TRACKING_FILE" 2>/dev/null; then
|
|
@@ -118,6 +153,16 @@ cmd_read() {
|
|
|
118
153
|
return 0
|
|
119
154
|
fi
|
|
120
155
|
|
|
156
|
+
if is_agent_instructions_operation "$operation"; then
|
|
157
|
+
local artifact_path
|
|
158
|
+
artifact_path="$(jq -r --arg op "$operation" '.[$op].artifactPath // empty' "$TRACKING_FILE")"
|
|
159
|
+
if [[ -n "$artifact_path" ]] && ! artifact_path_is_tracked_and_present "$artifact_path"; then
|
|
160
|
+
remove_tracking_key "$operation" "$(cat "$TRACKING_FILE")"
|
|
161
|
+
echo "{}"
|
|
162
|
+
return 0
|
|
163
|
+
fi
|
|
164
|
+
fi
|
|
165
|
+
|
|
121
166
|
jq -r --arg op "$operation" '.[$op] // empty' "$TRACKING_FILE"
|
|
122
167
|
}
|
|
123
168
|
|
|
@@ -172,6 +217,13 @@ cmd_write() {
|
|
|
172
217
|
existing='{"version":1}'
|
|
173
218
|
fi
|
|
174
219
|
|
|
220
|
+
if is_agent_instructions_operation "$operation" && [[ -n "$artifact_path" ]] && ! artifact_path_is_tracked_and_present "$artifact_path"; then
|
|
221
|
+
remove_tracking_key "$operation" "$existing"
|
|
222
|
+
echo "Info: skipped $operation tracking because artifactPath is missing or untracked: $artifact_path" >&2
|
|
223
|
+
echo "Updated $TRACKING_FILE [$operation]"
|
|
224
|
+
return 0
|
|
225
|
+
fi
|
|
226
|
+
|
|
175
227
|
if [[ -n "$artifact_path" ]]; then
|
|
176
228
|
echo "$existing" | jq \
|
|
177
229
|
--arg op "$operation" \
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { type CommandContext, type GlobalOptions } from '../../app/command-context.js';
|
|
2
|
+
import { type PjmDoctorOptions } from '../pjm/doctor.js';
|
|
3
|
+
import { type OatConfig } from '../../config/oat-config.js';
|
|
2
4
|
import { type Manifest } from '../../manifest/index.js';
|
|
3
5
|
import type { ConcreteScope } from '../../shared/types.js';
|
|
4
6
|
import { type DoctorCheck } from '../../ui/output.js';
|
|
@@ -16,7 +18,8 @@ interface DoctorDependencies {
|
|
|
16
18
|
}>>;
|
|
17
19
|
readFile: (path: string) => Promise<string>;
|
|
18
20
|
resolveAssetsRoot: () => Promise<string>;
|
|
19
|
-
|
|
21
|
+
readOatConfig: (repoRoot: string) => Promise<OatConfig>;
|
|
22
|
+
runPjmDoctorChecks: (repoRoot: string, options?: PjmDoctorOptions) => Promise<DoctorCheck[]>;
|
|
20
23
|
checkSkillVersions: (scopeRoot: string, assetsRoot: string, pathExists: (path: string) => Promise<boolean>) => Promise<SkillVersionReport>;
|
|
21
24
|
}
|
|
22
25
|
interface OutdatedSkillVersion {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/doctor/index.ts"],"names":[],"mappings":"AAWA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,aAAa,EACnB,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/doctor/index.ts"],"names":[],"mappings":"AAWA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,aAAa,EACnB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAGL,KAAK,gBAAgB,EACtB,MAAM,sBAAsB,CAAC;AAM9B,OAAO,EAAiB,KAAK,SAAS,EAAE,MAAM,oBAAoB,CA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ACjB,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,KAC3C,OAAO,CAAC,kBAAkB,CAAC,CAAC;CAClC;AAED,UAAU,oBAAoB;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AAED,UAAU,kBAAkB;IAC1B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,0BAA0B,EAAE,MAAM,CAAC;IACnC,cAAc,EAAE,oBAAoB,EAAE,CAAC;CACxC;AAsbD,wBAAgB,mBAAmB,CACjC,SAAS,GAAE,OAAO,CAAC,kBAAkB,CAAM,GAC1C,OAAO,CAcT"}
|
|
@@ -3,9 +3,10 @@ import { tmpdir } from 'node:os';
|
|
|
3
3
|
import { join } from 'node:path';
|
|
4
4
|
import { buildCommandContext, } from '../../app/command-context.js';
|
|
5
5
|
import { compareVersions } from '../init/tools/shared/version.js';
|
|
6
|
-
import { runPjmDoctorChecks } from '../pjm/doctor.js';
|
|
6
|
+
import { createPjmDisabledCheck, runPjmDoctorChecks, } from '../pjm/doctor.js';
|
|
7
7
|
import { getSkillVersion } from '../shared/frontmatter.js';
|
|
8
8
|
import { readGlobalOptions, resolveConcreteScopes, } from '../shared/shared.utils.js';
|
|
9
|
+
import { readOatConfig } from '../../config/oat-config.js';
|
|
9
10
|
import { resolveAssetsRoot } from '../../fs/assets.js';
|
|
10
11
|
import { resolveProjectRoot, resolveScopeRoot } from '../../fs/paths.js';
|
|
11
12
|
import TOML from '@iarna/toml';
|
|
@@ -126,6 +127,7 @@ function createDependencies() {
|
|
|
126
127
|
checkProviders: checkProvidersDefault,
|
|
127
128
|
readFile: async (path) => readFile(path, 'utf8'),
|
|
128
129
|
resolveAssetsRoot,
|
|
130
|
+
readOatConfig,
|
|
129
131
|
runPjmDoctorChecks,
|
|
130
132
|
// Default binding remains self-contained, but still honors the caller-
|
|
131
133
|
// provided pathExists dependency from runChecksForScope when available.
|
|
@@ -342,8 +344,15 @@ async function runChecksForScope(scope, scopeRoot, dependencies) {
|
|
|
342
344
|
}
|
|
343
345
|
}
|
|
344
346
|
const repoReferenceRoot = join(scopeRoot, '.oat', 'repo');
|
|
345
|
-
|
|
346
|
-
|
|
347
|
+
const config = await dependencies.readOatConfig(scopeRoot);
|
|
348
|
+
const projectManagementEnabled = config.tools?.['project-management'] === true;
|
|
349
|
+
if (projectManagementEnabled) {
|
|
350
|
+
checks.push(...(await dependencies.runPjmDoctorChecks(repoReferenceRoot, {
|
|
351
|
+
projectManagementEnabled: true,
|
|
352
|
+
})));
|
|
353
|
+
}
|
|
354
|
+
else if (await dependencies.pathExists(repoReferenceRoot)) {
|
|
355
|
+
checks.push(createPjmDisabledCheck());
|
|
347
356
|
}
|
|
348
357
|
}
|
|
349
358
|
return checks;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import type { DoctorCheck } from '../../ui/output.js';
|
|
2
|
-
export
|
|
2
|
+
export interface PjmDoctorOptions {
|
|
3
|
+
projectManagementEnabled?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare function createPjmDisabledCheck(): DoctorCheck;
|
|
6
|
+
export declare function runPjmDoctorChecks(repoRoot: string, options?: PjmDoctorOptions): Promise<DoctorCheck[]>;
|
|
3
7
|
//# sourceMappingURL=doctor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../../src/commands/pjm/doctor.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AA0I9C,wBAAsB,kBAAkB,CACtC,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../../src/commands/pjm/doctor.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AA0I9C,MAAM,WAAW,gBAAgB;IAC/B,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACpC;AAED,wBAAgB,sBAAsB,IAAI,WAAW,CAQpD;AAED,wBAAsB,kBAAkB,CACtC,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,WAAW,EAAE,CAAC,CAyJxB"}
|
|
@@ -114,7 +114,19 @@ function checkStatus(missing) {
|
|
|
114
114
|
function warnStatus(items) {
|
|
115
115
|
return items.length === 0 ? 'pass' : 'warn';
|
|
116
116
|
}
|
|
117
|
-
export
|
|
117
|
+
export function createPjmDisabledCheck() {
|
|
118
|
+
return {
|
|
119
|
+
name: 'pjm:disabled',
|
|
120
|
+
description: 'Project-management pack enablement',
|
|
121
|
+
status: 'pass',
|
|
122
|
+
message: 'Project-management pack is disabled; PJM checks skipped.',
|
|
123
|
+
fix: 'Run `oat init tools project-management` to install and enable PJM checks.',
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
export async function runPjmDoctorChecks(repoRoot, options = {}) {
|
|
127
|
+
if (options.projectManagementEnabled === false) {
|
|
128
|
+
return [createPjmDisabledCheck()];
|
|
129
|
+
}
|
|
118
130
|
const checks = [];
|
|
119
131
|
const missingCanonical = [];
|
|
120
132
|
for (const relativePath of CANONICAL_REPO_REFERENCE_PATHS) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/pjm/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAuB,MAAM,sBAAsB,CAAC;AAEhF,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAE/C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO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iBAAiB,CAAC;IAC5C,aAAa,EAAE,OAAO,aAAa,CAAC;IACpC,uBAAuB,EAAE,OAAO,uBAAuB,CAAC;IACxD,kBAAkB,EAAE,OAAO,kBAAkB,CAAC;IAC9C,cAAc,EAAE,OAAO,cAAc,CAAC;IACtC,sBAAsB,EAAE,OAAO,sBAAsB,CAAC;CACvD;AA6FD,wBAAgB,gBAAgB,CAC9B,SAAS,GAAE,OAAO,CAAC,sBAAsB,CAAM,GAC9C,OAAO,CAsJT"}
|
|
@@ -120,14 +120,17 @@ export function createPjmCommand(overrides = {}) {
|
|
|
120
120
|
});
|
|
121
121
|
cmd
|
|
122
122
|
.command('doctor')
|
|
123
|
-
.description('Run PJM repo reference diagnostics')
|
|
123
|
+
.description('Run PJM repo reference diagnostics when enabled')
|
|
124
124
|
.option('--repo-root <path>', 'PJM repo reference root directory (defaults to .oat/repo)')
|
|
125
125
|
.action(async (options, command) => {
|
|
126
126
|
const context = dependencies.buildCommandContext(readGlobalOptions(command));
|
|
127
127
|
try {
|
|
128
128
|
const projectRoot = await dependencies.resolveProjectRoot(context.cwd);
|
|
129
129
|
const repoRoot = await resolveRepoRoot(context, projectRoot, options.repoRoot);
|
|
130
|
-
const
|
|
130
|
+
const config = await dependencies.readOatConfig(projectRoot);
|
|
131
|
+
const checks = await dependencies.runPjmDoctorChecks(repoRoot, {
|
|
132
|
+
projectManagementEnabled: config.tools?.['project-management'] === true,
|
|
133
|
+
});
|
|
131
134
|
const status = doctorStatus(checks);
|
|
132
135
|
if (context.json) {
|
|
133
136
|
context.logger.json({ status, repoRoot, checks });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apply.d.ts","sourceRoot":"","sources":["../../../src/commands/sync/apply.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"apply.d.ts","sourceRoot":"","sources":["../../../src/commands/sync/apply.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAG3D,OAAO,KAAK,EACV,aAAa,EACb,uBAAuB,EAExB,MAAM,cAAc,CAAC;AAgEtB,wBAAsB,YAAY,CAChC,OAAO,EAAE,cAAc,EACvB,UAAU,EAAE,aAAa,EAAE,EAC3B,YAAY,EAAE,uBAAuB,GACpC,OAAO,CAAC,IAAI,CAAC,CA8Ef"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { OAT_VERSION } from '../../shared/oat-version.js';
|
|
1
2
|
import { countPlannedOperations } from './sync.utils.js';
|
|
2
3
|
function countSkippedEntries(scopePlans) {
|
|
3
4
|
return scopePlans.reduce((total, scopePlan) => {
|
|
@@ -45,10 +46,13 @@ export async function runSyncApply(context, scopePlans, dependencies) {
|
|
|
45
46
|
for (const scopePlan of scopePlans) {
|
|
46
47
|
const hasSyncEntries = scopePlan.plan.entries.length > 0 || scopePlan.plan.removals.length > 0;
|
|
47
48
|
const hasCodexPlannedOperations = scopePlan.codexExtensionPlan?.operations.some((operation) => operation.action !== 'skip') ?? false;
|
|
48
|
-
|
|
49
|
+
const shouldRefreshManifestVersion = scopePlan.manifest.oatVersion !== OAT_VERSION;
|
|
50
|
+
if (!hasSyncEntries &&
|
|
51
|
+
!hasCodexPlannedOperations &&
|
|
52
|
+
!shouldRefreshManifestVersion) {
|
|
49
53
|
continue;
|
|
50
54
|
}
|
|
51
|
-
if (hasSyncEntries) {
|
|
55
|
+
if (hasSyncEntries || shouldRefreshManifestVersion) {
|
|
52
56
|
const result = await dependencies.executeSyncPlan(scopePlan.plan, scopePlan.manifest, scopePlan.manifestPath);
|
|
53
57
|
applied += result.applied;
|
|
54
58
|
failed += result.failed;
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,CAWf;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
|
@@ -54,7 +54,10 @@ export async function loadManifest(manifestPath) {
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
export async function saveManifest(manifestPath, manifest) {
|
|
57
|
-
const validated = ManifestSchema.parse(
|
|
57
|
+
const validated = ManifestSchema.parse({
|
|
58
|
+
...manifest,
|
|
59
|
+
oatVersion: OAT_VERSION,
|
|
60
|
+
});
|
|
58
61
|
const dir = dirname(manifestPath);
|
|
59
62
|
const tempPath = `${manifestPath}.${randomUUID()}.tmp`;
|
|
60
63
|
await mkdir(dir, { recursive: true });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-agent-toolkit/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.33",
|
|
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",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"ora": "^9.0.0",
|
|
35
35
|
"yaml": "2.8.2",
|
|
36
36
|
"zod": "^3.25.76",
|
|
37
|
-
"@open-agent-toolkit/control-plane": "0.1.
|
|
37
|
+
"@open-agent-toolkit/control-plane": "0.1.33"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@types/node": "^22.10.0",
|