@open-agent-toolkit/cli 0.1.54 → 0.1.59
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/agents/oat-phase-implementer.md +195 -238
- package/assets/docs/cli-utilities/configuration.md +7 -6
- package/assets/docs/contributing/index.md +1 -0
- package/assets/docs/contributing/smoke-testing.md +284 -0
- package/assets/docs/provider-sync/providers.md +11 -11
- package/assets/docs/provider-sync/scope-and-surface.md +2 -2
- package/assets/docs/workflows/projects/dispatch-ceiling.md +29 -26
- package/assets/docs/workflows/projects/evidence-layers.md +123 -0
- package/assets/docs/workflows/projects/implementation-execution.md +160 -406
- package/assets/docs/workflows/projects/index.md +8 -0
- package/assets/docs/workflows/projects/orchestration-model.md +190 -0
- package/assets/docs/workflows/projects/programmatic-execution.md +137 -0
- package/assets/docs/workflows/projects/review-flavors.md +129 -0
- package/assets/docs/workflows/skills/repo-improve.md +14 -0
- package/assets/public-package-versions.json +4 -4
- package/assets/skills/oat-agent-instructions-analyze/references/docs/provider-reference.md +5 -4
- package/assets/skills/oat-agent-instructions-apply/references/docs/provider-reference.md +5 -4
- package/assets/skills/oat-dispatch-subagents/SKILL.md +6 -1
- package/assets/skills/oat-dispatch-subagents/references/record-schema.md +5 -0
- package/assets/skills/oat-project-dispatch-subagents/SKILL.md +37 -15
- package/assets/skills/oat-project-implement/SKILL.md +63 -1904
- package/assets/skills/oat-project-implement/references/completion-and-closeout.md +431 -0
- package/assets/skills/oat-project-implement/references/dispatch-and-dry-run.md +715 -0
- package/assets/skills/oat-project-implement/references/phase-execution.md +270 -0
- package/assets/skills/oat-project-implement/references/plan-and-resume.md +279 -0
- package/assets/skills/oat-project-import-plan/SKILL.md +16 -8
- package/assets/skills/oat-project-plan/SKILL.md +15 -7
- package/assets/skills/oat-project-plan-writing/SKILL.md +74 -40
- package/assets/skills/oat-project-quick-start/SKILL.md +16 -8
- package/assets/skills/oat-project-review-provide/SKILL.md +8 -5
- package/assets/skills/oat-repo-improve/SKILL.md +17 -2
- package/assets/skills/oat-repo-improve/references/audit-playbook.md +6 -0
- package/assets/skills/oat-worktree-bootstrap/SKILL.md +22 -12
- package/assets/skills/oat-worktree-bootstrap/references/worktree-conventions.md +8 -8
- package/assets/skills/oat-worktree-bootstrap-auto/SKILL.md +233 -44
- package/dist/commands/docs/index-generate/index.d.ts.map +1 -1
- package/dist/commands/docs/index-generate/index.js +10 -5
- package/dist/commands/doctor/index.d.ts.map +1 -1
- package/dist/commands/doctor/index.js +7 -4
- package/dist/commands/gate/index.d.ts +9 -1
- package/dist/commands/gate/index.d.ts.map +1 -1
- package/dist/commands/gate/index.js +62 -2
- package/dist/commands/project/dispatch-ceiling/index.js +2 -2
- package/package.json +4 -4
- package/assets/skills/oat-worktree-bootstrap-auto/scripts/bootstrap.sh +0 -236
|
@@ -1225,7 +1225,7 @@ function managedCodexDepthBlockMessage(scope, entry) {
|
|
|
1225
1225
|
: validDepth
|
|
1226
1226
|
? `agents.max_depth is ${entry.value}`
|
|
1227
1227
|
: 'agents.max_depth is not a valid number';
|
|
1228
|
-
return `BLOCKED: Codex ${state}; managed implementation requires root (0) → phase
|
|
1228
|
+
return `BLOCKED: Codex ${state}; managed implementation requires root (0) → phase implementer (1). Depth 2 is optional capacity for benefit-driven nested work.\nRun \`oat sync --scope ${scope}\`, or materialize a single role with \`oat providers codex materialize <agent-name> --model <model> --effort <effort> --scope ${scope}\`.`;
|
|
1229
1229
|
}
|
|
1230
1230
|
async function resolveCodexProviderDefaultEffort(repoRoot, context, dependencies) {
|
|
1231
1231
|
const candidates = [
|
|
@@ -1286,7 +1286,7 @@ async function resolveDispatchCeiling(context, dependencies, options) {
|
|
|
1286
1286
|
const numericDepth = typeof depth.value === 'number' && Number.isFinite(depth.value)
|
|
1287
1287
|
? depth.value
|
|
1288
1288
|
: null;
|
|
1289
|
-
if (numericDepth === null || numericDepth <
|
|
1289
|
+
if (depth.present && (numericDepth === null || numericDepth < 1)) {
|
|
1290
1290
|
return {
|
|
1291
1291
|
status: 'blocked',
|
|
1292
1292
|
provider,
|
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.59",
|
|
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.59"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@types/node": "^22.10.0",
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
"node": ">=22.17.0"
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
|
-
"build": "bash scripts/bundle-assets.sh && tsc && tsc-alias",
|
|
51
|
-
"clean": "rm -rf dist",
|
|
50
|
+
"build": "bash scripts/bundle-assets.sh && tsc && tsc-alias && chmod +x dist/index.js && touch dist/index.js",
|
|
51
|
+
"clean": "rm -rf dist tsconfig.tsbuildinfo",
|
|
52
52
|
"dev": "tsx watch src/index.ts",
|
|
53
53
|
"check": "oxlint . && oxfmt --check .",
|
|
54
54
|
"check:fix": "oxlint --fix . && oxfmt .",
|
|
@@ -1,236 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# oat-worktree-bootstrap-auto: Autonomous worktree bootstrap
|
|
3
|
-
#
|
|
4
|
-
# Usage: bootstrap.sh <branch-name> [--base <ref>] [--path <root>] [--baseline-policy <strict|allow-failing>]
|
|
5
|
-
#
|
|
6
|
-
# This script is a reference implementation for agent execution.
|
|
7
|
-
# Agents may execute it directly or follow its logic step-by-step.
|
|
8
|
-
|
|
9
|
-
set -euo pipefail
|
|
10
|
-
|
|
11
|
-
# ─── Defaults ───────────────────────────────────────────────────────────────
|
|
12
|
-
BRANCH_NAME=""
|
|
13
|
-
BASE_REF="origin/main"
|
|
14
|
-
WORKTREE_ROOT=""
|
|
15
|
-
BASELINE_POLICY="strict"
|
|
16
|
-
|
|
17
|
-
# ─── Parse Arguments ────────────────────────────────────────────────────────
|
|
18
|
-
while [[ $# -gt 0 ]]; do
|
|
19
|
-
case "$1" in
|
|
20
|
-
--base) BASE_REF="$2"; shift 2 ;;
|
|
21
|
-
--path) WORKTREE_ROOT="$2"; shift 2 ;;
|
|
22
|
-
--baseline-policy) BASELINE_POLICY="$2"; shift 2 ;;
|
|
23
|
-
-*) echo "error: unknown flag $1" >&2; exit 1 ;;
|
|
24
|
-
*) BRANCH_NAME="$1"; shift ;;
|
|
25
|
-
esac
|
|
26
|
-
done
|
|
27
|
-
|
|
28
|
-
if [[ -z "$BRANCH_NAME" ]]; then
|
|
29
|
-
echo "error: branch name required" >&2
|
|
30
|
-
exit 1
|
|
31
|
-
fi
|
|
32
|
-
|
|
33
|
-
# Validate branch name
|
|
34
|
-
if ! [[ "$BRANCH_NAME" =~ ^[a-zA-Z0-9._/-]+$ ]]; then
|
|
35
|
-
echo "error: invalid branch name '$BRANCH_NAME' (must match ^[a-zA-Z0-9._/-]+\$)" >&2
|
|
36
|
-
exit 1
|
|
37
|
-
fi
|
|
38
|
-
|
|
39
|
-
# ─── Step 1: Resolve Worktree Root ──────────────────────────────────────────
|
|
40
|
-
REPO_ROOT=$(git rev-parse --show-toplevel)
|
|
41
|
-
REPO_NAME=$(basename "$REPO_ROOT")
|
|
42
|
-
|
|
43
|
-
if [[ -z "$WORKTREE_ROOT" ]]; then
|
|
44
|
-
# Precedence 2: environment variable
|
|
45
|
-
if [[ -n "${OAT_WORKTREES_ROOT:-}" ]]; then
|
|
46
|
-
WORKTREE_ROOT="$OAT_WORKTREES_ROOT"
|
|
47
|
-
# Precedence 3: .oat/config.json
|
|
48
|
-
elif [[ -f "$REPO_ROOT/.oat/config.json" ]]; then
|
|
49
|
-
CONFIG_ROOT=$(node -e "try{const c=JSON.parse(require('fs').readFileSync('$REPO_ROOT/.oat/config.json','utf8'));console.log(c.worktrees?.root||'')}catch{}" 2>/dev/null || true)
|
|
50
|
-
if [[ -n "$CONFIG_ROOT" ]]; then
|
|
51
|
-
# Resolve relative to REPO_ROOT
|
|
52
|
-
if [[ "$CONFIG_ROOT" = /* ]]; then
|
|
53
|
-
WORKTREE_ROOT="$CONFIG_ROOT"
|
|
54
|
-
else
|
|
55
|
-
WORKTREE_ROOT="$REPO_ROOT/$CONFIG_ROOT"
|
|
56
|
-
fi
|
|
57
|
-
fi
|
|
58
|
-
fi
|
|
59
|
-
|
|
60
|
-
# Precedence 4: discover existing directories (ordered)
|
|
61
|
-
if [[ -z "$WORKTREE_ROOT" ]]; then
|
|
62
|
-
if [[ -d "$REPO_ROOT/.worktrees" ]]; then
|
|
63
|
-
WORKTREE_ROOT="$REPO_ROOT/.worktrees"
|
|
64
|
-
elif [[ -d "$REPO_ROOT/worktrees" ]]; then
|
|
65
|
-
WORKTREE_ROOT="$REPO_ROOT/worktrees"
|
|
66
|
-
elif [[ -d "$(dirname "$REPO_ROOT")/${REPO_NAME}-worktrees" ]]; then
|
|
67
|
-
WORKTREE_ROOT="$(dirname "$REPO_ROOT")/${REPO_NAME}-worktrees"
|
|
68
|
-
else
|
|
69
|
-
# Precedence 5: fallback
|
|
70
|
-
WORKTREE_ROOT="$(dirname "$REPO_ROOT")/${REPO_NAME}-worktrees"
|
|
71
|
-
fi
|
|
72
|
-
fi
|
|
73
|
-
fi
|
|
74
|
-
|
|
75
|
-
# Verify gitignore for project-local roots
|
|
76
|
-
RELATIVE_ROOT="${WORKTREE_ROOT#"$REPO_ROOT"/}"
|
|
77
|
-
if [[ "$RELATIVE_ROOT" == ".worktrees" || "$RELATIVE_ROOT" == "worktrees" ]]; then
|
|
78
|
-
if ! git check-ignore -q "$WORKTREE_ROOT" 2>/dev/null; then
|
|
79
|
-
echo "warning: $RELATIVE_ROOT is not in .gitignore" >&2
|
|
80
|
-
fi
|
|
81
|
-
fi
|
|
82
|
-
|
|
83
|
-
# ─── Step 2: Create or Reuse Worktree ──────────────────────────────────────
|
|
84
|
-
TARGET_PATH="$WORKTREE_ROOT/$BRANCH_NAME"
|
|
85
|
-
|
|
86
|
-
# Check if worktree already exists at target
|
|
87
|
-
if [[ -d "$TARGET_PATH/.git" ]] || git worktree list --porcelain | grep -q "worktree $TARGET_PATH$"; then
|
|
88
|
-
# Reuse: validate branch matches
|
|
89
|
-
EXISTING_BRANCH=$(git -C "$TARGET_PATH" branch --show-current 2>/dev/null || true)
|
|
90
|
-
if [[ "$EXISTING_BRANCH" != "$BRANCH_NAME" ]]; then
|
|
91
|
-
echo "error: worktree at $TARGET_PATH is on branch '$EXISTING_BRANCH', expected '$BRANCH_NAME'" >&2
|
|
92
|
-
exit 1
|
|
93
|
-
fi
|
|
94
|
-
echo "info: reusing existing worktree at $TARGET_PATH"
|
|
95
|
-
else
|
|
96
|
-
mkdir -p "$(dirname "$TARGET_PATH")"
|
|
97
|
-
|
|
98
|
-
# Check if branch exists
|
|
99
|
-
if git show-ref --verify --quiet "refs/heads/$BRANCH_NAME" 2>/dev/null; then
|
|
100
|
-
git worktree add "$TARGET_PATH" "$BRANCH_NAME"
|
|
101
|
-
else
|
|
102
|
-
git worktree add "$TARGET_PATH" -b "$BRANCH_NAME" "$BASE_REF"
|
|
103
|
-
fi
|
|
104
|
-
fi
|
|
105
|
-
|
|
106
|
-
# ─── Step 2.5: Propagate Local-Only Config + Local Paths ──────────────────
|
|
107
|
-
SRC_CONFIG="$REPO_ROOT/.oat/config.local.json"
|
|
108
|
-
DST_CONFIG="$TARGET_PATH/.oat/config.local.json"
|
|
109
|
-
if [[ -f "$SRC_CONFIG" && ! -f "$DST_CONFIG" ]]; then
|
|
110
|
-
mkdir -p "$TARGET_PATH/.oat"
|
|
111
|
-
cp "$SRC_CONFIG" "$DST_CONFIG"
|
|
112
|
-
fi
|
|
113
|
-
|
|
114
|
-
# Sync localPaths into the worktree (non-blocking)
|
|
115
|
-
oat local sync "$TARGET_PATH" 2>/dev/null || true
|
|
116
|
-
|
|
117
|
-
# ─── Step 3: Run Baseline Checks ───────────────────────────────────────────
|
|
118
|
-
cd "$TARGET_PATH"
|
|
119
|
-
|
|
120
|
-
declare -A CHECK_RESULTS
|
|
121
|
-
WARNINGS=()
|
|
122
|
-
HAS_ERROR=false
|
|
123
|
-
|
|
124
|
-
run_check() {
|
|
125
|
-
local name="$1"
|
|
126
|
-
shift
|
|
127
|
-
if "$@" >/dev/null 2>&1; then
|
|
128
|
-
CHECK_RESULTS["$name"]="pass"
|
|
129
|
-
else
|
|
130
|
-
CHECK_RESULTS["$name"]="fail"
|
|
131
|
-
if [[ "$BASELINE_POLICY" == "strict" ]]; then
|
|
132
|
-
HAS_ERROR=true
|
|
133
|
-
echo "error: baseline check '$name' failed (strict policy)" >&2
|
|
134
|
-
else
|
|
135
|
-
WARNINGS+=("$name: check failed")
|
|
136
|
-
fi
|
|
137
|
-
fi
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
run_check "worktree_init" pnpm run worktree:init
|
|
141
|
-
if [[ "$HAS_ERROR" == true ]]; then
|
|
142
|
-
cat <<YAML
|
|
143
|
-
status: error
|
|
144
|
-
worktree_path: "$TARGET_PATH"
|
|
145
|
-
branch: "$BRANCH_NAME"
|
|
146
|
-
base_ref: "$BASE_REF"
|
|
147
|
-
error: "worktree_init failed under strict policy"
|
|
148
|
-
baseline_policy: $BASELINE_POLICY
|
|
149
|
-
YAML
|
|
150
|
-
exit 1
|
|
151
|
-
fi
|
|
152
|
-
|
|
153
|
-
run_check "project_status" oat status --scope project
|
|
154
|
-
run_check "tests" pnpm test
|
|
155
|
-
|
|
156
|
-
# ─── Step 4: Create Provider Directories ────────────────────────────────────
|
|
157
|
-
mkdir -p "$TARGET_PATH/.claude/skills"
|
|
158
|
-
mkdir -p "$TARGET_PATH/.cursor/rules"
|
|
159
|
-
run_check "git_clean" test -z "$(git status --porcelain)"
|
|
160
|
-
|
|
161
|
-
if oat sync --scope all >/dev/null 2>&1; then
|
|
162
|
-
CHECK_RESULTS["provider_sync"]="pass"
|
|
163
|
-
else
|
|
164
|
-
CHECK_RESULTS["provider_sync"]="fail"
|
|
165
|
-
if [[ "$BASELINE_POLICY" == "strict" ]]; then
|
|
166
|
-
HAS_ERROR=true
|
|
167
|
-
else
|
|
168
|
-
WARNINGS+=("provider_sync: sync failed")
|
|
169
|
-
fi
|
|
170
|
-
fi
|
|
171
|
-
|
|
172
|
-
# ─── Step 4.5: Commit Sync Output ───────────────────────────────────────────
|
|
173
|
-
SYNC_PATHS=(.oat/sync/manifest.json .claude .cursor .codex)
|
|
174
|
-
SYNC_STAGE_PATHS=()
|
|
175
|
-
for sync_path in "${SYNC_PATHS[@]}"; do
|
|
176
|
-
if [[ -e "$sync_path" ]] || [[ -n "$(git ls-files -- "$sync_path")" ]]; then
|
|
177
|
-
SYNC_STAGE_PATHS+=("$sync_path")
|
|
178
|
-
fi
|
|
179
|
-
done
|
|
180
|
-
|
|
181
|
-
SYNC_DIRTY=""
|
|
182
|
-
if [[ ${#SYNC_STAGE_PATHS[@]} -gt 0 ]]; then
|
|
183
|
-
SYNC_DIRTY=$(git status --porcelain -- "${SYNC_STAGE_PATHS[@]}" 2>/dev/null || true)
|
|
184
|
-
fi
|
|
185
|
-
if [[ -n "$SYNC_DIRTY" ]]; then
|
|
186
|
-
git add -A -- "${SYNC_STAGE_PATHS[@]}" 2>/dev/null || true
|
|
187
|
-
if ! git diff --cached --quiet -- "${SYNC_STAGE_PATHS[@]}"; then
|
|
188
|
-
STAGED_SYNC_FILES=()
|
|
189
|
-
while IFS= read -r -d '' staged_sync_file; do
|
|
190
|
-
STAGED_SYNC_FILES+=("$staged_sync_file")
|
|
191
|
-
done < <(git diff --cached --name-only -z --no-renames -- "${SYNC_STAGE_PATHS[@]}")
|
|
192
|
-
|
|
193
|
-
if [[ ${#STAGED_SYNC_FILES[@]} -eq 0 ]]; then
|
|
194
|
-
CHECK_RESULTS["sync_commit"]="skip"
|
|
195
|
-
elif git commit -m "chore: run sync" -- "${STAGED_SYNC_FILES[@]}" >/dev/null 2>&1; then
|
|
196
|
-
CHECK_RESULTS["sync_commit"]="pass"
|
|
197
|
-
else
|
|
198
|
-
CHECK_RESULTS["sync_commit"]="fail"
|
|
199
|
-
if [[ "$BASELINE_POLICY" == "strict" ]]; then
|
|
200
|
-
HAS_ERROR=true
|
|
201
|
-
else
|
|
202
|
-
WARNINGS+=("sync_commit: commit failed")
|
|
203
|
-
fi
|
|
204
|
-
fi
|
|
205
|
-
else
|
|
206
|
-
CHECK_RESULTS["sync_commit"]="skip"
|
|
207
|
-
fi
|
|
208
|
-
else
|
|
209
|
-
CHECK_RESULTS["sync_commit"]="skip"
|
|
210
|
-
fi
|
|
211
|
-
|
|
212
|
-
# ─── Step 5: Return Structured Status ───────────────────────────────────────
|
|
213
|
-
if [[ "$HAS_ERROR" == true ]]; then
|
|
214
|
-
STATUS="error"
|
|
215
|
-
elif [[ ${#WARNINGS[@]} -gt 0 ]]; then
|
|
216
|
-
STATUS="warning"
|
|
217
|
-
else
|
|
218
|
-
STATUS="success"
|
|
219
|
-
fi
|
|
220
|
-
|
|
221
|
-
cat <<YAML
|
|
222
|
-
status: $STATUS
|
|
223
|
-
worktree_path: "$TARGET_PATH"
|
|
224
|
-
branch: "$BRANCH_NAME"
|
|
225
|
-
base_ref: "$BASE_REF"
|
|
226
|
-
checks:
|
|
227
|
-
worktree_init: ${CHECK_RESULTS[worktree_init]:-skip}
|
|
228
|
-
project_status: ${CHECK_RESULTS[project_status]:-skip}
|
|
229
|
-
tests: ${CHECK_RESULTS[tests]:-skip}
|
|
230
|
-
git_clean: ${CHECK_RESULTS[git_clean]:-skip}
|
|
231
|
-
provider_sync: ${CHECK_RESULTS[provider_sync]:-skip}
|
|
232
|
-
sync_commit: ${CHECK_RESULTS[sync_commit]:-skip}
|
|
233
|
-
warnings: [$(IFS=','; echo "${WARNINGS[*]:-}")]
|
|
234
|
-
error: ${HAS_ERROR:+baseline check failed under strict policy}
|
|
235
|
-
baseline_policy: $BASELINE_POLICY
|
|
236
|
-
YAML
|