@cleocode/core 2026.8.2 → 2026.8.3
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/dist/check/pr-gate.d.ts.map +1 -1
- package/dist/check/pr-gate.js +9 -0
- package/dist/check/pr-gate.js.map +1 -1
- package/dist/docs/export-document.js +66 -16
- package/dist/docs/export-document.js.map +3 -3
- package/dist/hooks/registry.d.ts +2 -2
- package/dist/hooks/registry.d.ts.map +1 -1
- package/dist/hooks/registry.js +5 -0
- package/dist/hooks/registry.js.map +1 -1
- package/dist/hooks/types.d.ts +59 -0
- package/dist/hooks/types.d.ts.map +1 -1
- package/dist/init/scaffold-workflows.d.ts +12 -0
- package/dist/init/scaffold-workflows.d.ts.map +1 -1
- package/dist/init/scaffold-workflows.js +16 -0
- package/dist/init/scaffold-workflows.js.map +1 -1
- package/dist/init/upgrade-workflows.d.ts.map +1 -1
- package/dist/init/upgrade-workflows.js +16 -0
- package/dist/init/upgrade-workflows.js.map +1 -1
- package/dist/init.d.ts.map +1 -1
- package/dist/init.js +16 -1
- package/dist/init.js.map +1 -1
- package/dist/internal.d.ts +1 -0
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js +2 -0
- package/dist/internal.js.map +1 -1
- package/dist/llm/credentials.d.ts +16 -1
- package/dist/llm/credentials.d.ts.map +1 -1
- package/dist/llm/credentials.js.map +1 -1
- package/dist/llm/cross-provider-selector.d.ts +25 -0
- package/dist/llm/cross-provider-selector.d.ts.map +1 -1
- package/dist/llm/cross-provider-selector.js +76 -3
- package/dist/llm/cross-provider-selector.js.map +1 -1
- package/dist/llm/local-inference-probe.d.ts +101 -0
- package/dist/llm/local-inference-probe.d.ts.map +1 -0
- package/dist/llm/local-inference-probe.js +174 -0
- package/dist/llm/local-inference-probe.js.map +1 -0
- package/dist/llm/plugin-facade.js +199 -21
- package/dist/llm/plugin-facade.js.map +3 -3
- package/dist/llm/role-executor.d.ts.map +1 -1
- package/dist/llm/role-executor.js +95 -9
- package/dist/llm/role-executor.js.map +1 -1
- package/dist/llm/role-resolver.d.ts +10 -0
- package/dist/llm/role-resolver.d.ts.map +1 -1
- package/dist/llm/role-resolver.js +92 -1
- package/dist/llm/role-resolver.js.map +1 -1
- package/dist/llm/system-resolver.d.ts.map +1 -1
- package/dist/llm/system-resolver.js +2 -0
- package/dist/llm/system-resolver.js.map +1 -1
- package/dist/memory/brain-search.d.ts +109 -0
- package/dist/memory/brain-search.d.ts.map +1 -1
- package/dist/memory/brain-search.js +149 -37
- package/dist/memory/brain-search.js.map +1 -1
- package/dist/memory/brain-stub-prune.d.ts +109 -0
- package/dist/memory/brain-stub-prune.d.ts.map +1 -0
- package/dist/memory/brain-stub-prune.js +155 -0
- package/dist/memory/brain-stub-prune.js.map +1 -0
- package/dist/memory/engine-compat.d.ts.map +1 -1
- package/dist/memory/engine-compat.js +61 -3
- package/dist/memory/engine-compat.js.map +1 -1
- package/dist/nexus/analyze-orchestrator.d.ts.map +1 -1
- package/dist/nexus/analyze-orchestrator.js +28 -0
- package/dist/nexus/analyze-orchestrator.js.map +1 -1
- package/dist/nexus/context.d.ts.map +1 -1
- package/dist/nexus/context.js +3 -3
- package/dist/nexus/context.js.map +1 -1
- package/dist/nexus/impact.d.ts.map +1 -1
- package/dist/nexus/impact.js +3 -3
- package/dist/nexus/impact.js.map +1 -1
- package/dist/nexus/symbol-miss.d.ts +132 -0
- package/dist/nexus/symbol-miss.d.ts.map +1 -0
- package/dist/nexus/symbol-miss.js +168 -0
- package/dist/nexus/symbol-miss.js.map +1 -0
- package/dist/orchestrate/spawn-ops.d.ts +21 -1
- package/dist/orchestrate/spawn-ops.d.ts.map +1 -1
- package/dist/orchestrate/spawn-ops.js +39 -2
- package/dist/orchestrate/spawn-ops.js.map +1 -1
- package/dist/orchestrate/worker-verify.d.ts.map +1 -1
- package/dist/orchestrate/worker-verify.js +22 -0
- package/dist/orchestrate/worker-verify.js.map +1 -1
- package/dist/release/changesets-aggregator.d.ts.map +1 -1
- package/dist/release/changesets-aggregator.js +15 -1
- package/dist/release/changesets-aggregator.js.map +1 -1
- package/dist/release/open.d.ts +29 -2
- package/dist/release/open.d.ts.map +1 -1
- package/dist/release/open.js +48 -11
- package/dist/release/open.js.map +1 -1
- package/dist/resources/governor.d.ts +12 -2
- package/dist/resources/governor.d.ts.map +1 -1
- package/dist/resources/governor.js +12 -3
- package/dist/resources/governor.js.map +1 -1
- package/dist/scaffold/ensure-dirs.d.ts.map +1 -1
- package/dist/scaffold/ensure-dirs.js +14 -2
- package/dist/scaffold/ensure-dirs.js.map +1 -1
- package/dist/scaffold/project-detection.d.ts.map +1 -1
- package/dist/scaffold/project-detection.js +2 -1
- package/dist/scaffold/project-detection.js.map +1 -1
- package/dist/selfimprove/draft-pr.d.ts +14 -1
- package/dist/selfimprove/draft-pr.d.ts.map +1 -1
- package/dist/selfimprove/draft-pr.js.map +1 -1
- package/dist/selfimprove/fix-gen.d.ts +0 -21
- package/dist/selfimprove/fix-gen.d.ts.map +1 -1
- package/dist/selfimprove/fix-gen.js +276 -76
- package/dist/selfimprove/fix-gen.js.map +3 -3
- package/dist/selfimprove/run-loop.d.ts.map +1 -1
- package/dist/selfimprove/run-loop.js +50 -19
- package/dist/selfimprove/run-loop.js.map +1 -1
- package/dist/selfimprove/scenarios/dhq-replay-find/golden.json +114 -4
- package/dist/selfimprove/scenarios/dhq-replay-find/scenario.json +3 -3
- package/dist/sentient/dream-cycle.d.ts +20 -19
- package/dist/sentient/dream-cycle.d.ts.map +1 -1
- package/dist/sentient/dream-cycle.js +322 -11
- package/dist/sentient/dream-cycle.js.map +1 -1
- package/dist/sentient/dream-watermark.d.ts +134 -0
- package/dist/sentient/dream-watermark.d.ts.map +1 -0
- package/dist/sentient/dream-watermark.js +156 -0
- package/dist/sentient/dream-watermark.js.map +1 -0
- package/dist/sentient/state.d.ts +17 -0
- package/dist/sentient/state.d.ts.map +1 -1
- package/dist/sentient/state.js +22 -3
- package/dist/sentient/state.js.map +1 -1
- package/dist/sentient/tick.d.ts.map +1 -1
- package/dist/sentient/tick.js +79 -2
- package/dist/sentient/tick.js.map +1 -1
- package/dist/sessions/index.d.ts.map +1 -1
- package/dist/sessions/index.js +5 -1
- package/dist/sessions/index.js.map +1 -1
- package/dist/sessions/snapshot.d.ts.map +1 -1
- package/dist/sessions/snapshot.js +6 -3
- package/dist/sessions/snapshot.js.map +1 -1
- package/dist/store/checkpoint-git-dir.d.ts +95 -0
- package/dist/store/checkpoint-git-dir.d.ts.map +1 -0
- package/dist/store/checkpoint-git-dir.js +111 -0
- package/dist/store/checkpoint-git-dir.js.map +1 -0
- package/dist/store/git-checkpoint.d.ts.map +1 -1
- package/dist/store/git-checkpoint.js +6 -5
- package/dist/store/git-checkpoint.js.map +1 -1
- package/dist/system/health.d.ts.map +1 -1
- package/dist/system/health.js +2 -1
- package/dist/system/health.js.map +1 -1
- package/dist/tasks/add.d.ts.map +1 -1
- package/dist/tasks/add.js +40 -4
- package/dist/tasks/add.js.map +1 -1
- package/dist/tasks/collection.d.ts +51 -0
- package/dist/tasks/collection.d.ts.map +1 -0
- package/dist/tasks/collection.js +81 -0
- package/dist/tasks/collection.js.map +1 -0
- package/dist/tasks/complete.d.ts.map +1 -1
- package/dist/tasks/complete.js +8 -3
- package/dist/tasks/complete.js.map +1 -1
- package/dist/tasks/evidence.d.ts.map +1 -1
- package/dist/tasks/evidence.js +17 -0
- package/dist/tasks/evidence.js.map +1 -1
- package/dist/tasks/find.d.ts +50 -0
- package/dist/tasks/find.d.ts.map +1 -1
- package/dist/tasks/find.js +63 -2
- package/dist/tasks/find.js.map +1 -1
- package/dist/tasks/tool-resolver.d.ts +1 -1
- package/dist/tasks/tool-resolver.d.ts.map +1 -1
- package/dist/tasks/tool-resolver.js +83 -0
- package/dist/tasks/tool-resolver.js.map +1 -1
- package/dist/tasks/tool-semaphore.d.ts +82 -12
- package/dist/tasks/tool-semaphore.d.ts.map +1 -1
- package/dist/tasks/tool-semaphore.js +79 -17
- package/dist/tasks/tool-semaphore.js.map +1 -1
- package/package.json +13 -13
- package/templates/CLEO-INJECTION.md +40 -25
- package/templates/workflows/release-prepare.yml.tmpl +73 -16
|
@@ -127,7 +127,7 @@ CLEO has **three distinct relationship systems**. Do not conflate them.
|
|
|
127
127
|
|------|---------|
|
|
128
128
|
| Check session | `cleo session status` |
|
|
129
129
|
| Resume context | `cleo briefing` |
|
|
130
|
-
| Start session | `cleo session start --scope global` |
|
|
130
|
+
| Start session | `cleo session start --scope global --name "<what you are doing>"` (both flags are REQUIRED) |
|
|
131
131
|
| End session | `cleo session end --note "..."` |
|
|
132
132
|
<!-- /CLEO-INJECTION:section=session-commands -->
|
|
133
133
|
|
|
@@ -151,29 +151,44 @@ Memory context: `cleo memory digest --brief` gives a live project memory summary
|
|
|
151
151
|
<!-- CLEO-INJECTION:section=nexus -->
|
|
152
152
|
## Nexus — when to use which scope
|
|
153
153
|
|
|
154
|
-
`cleo nexus` is the code-intelligence surface
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
|
160
|
-
|
|
|
161
|
-
|
|
|
162
|
-
|
|
|
163
|
-
|
|
|
164
|
-
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
**
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
154
|
+
`cleo nexus` is the code-intelligence surface over THIS repo's symbol graph.
|
|
155
|
+
Pick by intent. Every command below is verified to exist — see the gate note.
|
|
156
|
+
|
|
157
|
+
| Intent | Command |
|
|
158
|
+
|-------------------------------------------|----------------------------------|
|
|
159
|
+
| **Check the index before trusting it** | `cleo nexus status` |
|
|
160
|
+
| Blast radius before editing a symbol | `cleo nexus impact <symbol>` |
|
|
161
|
+
| Callers / callees / community of a symbol | `cleo nexus context <symbol>` |
|
|
162
|
+
| Everything about one symbol in one call | `cleo nexus full-context <symbol>` |
|
|
163
|
+
| Find a symbol by code text | `cleo nexus search-code "<text>"` |
|
|
164
|
+
| Symbols touched by a task | `cleo nexus task-symbols <taskId>` |
|
|
165
|
+
| Why does this symbol exist / who needs it | `cleo nexus why <symbol>` |
|
|
166
|
+
| Detected communities / execution flows | `cleo nexus clusters` / `flows` |
|
|
167
|
+
| Rebuild the index | `cleo nexus analyze` |
|
|
168
|
+
|
|
169
|
+
**FIRST CALL IS `cleo nexus status`.** It returns `nodeCount`, `lastIndexedAt`
|
|
170
|
+
and `staleFileCount`. The index is NOT auto-refreshed — a symbol added after
|
|
171
|
+
the last `analyze` run is simply absent, and a lookup for it returns
|
|
172
|
+
`E_NOT_FOUND` that reads identically to "no such symbol". If `staleFileCount`
|
|
173
|
+
is a large fraction of `fileCount`, run `cleo nexus analyze` or treat
|
|
174
|
+
`git grep` as the ground truth and SAY SO in your response.
|
|
175
|
+
|
|
176
|
+
`E_NOT_FOUND` from `impact`/`context` now reports the index size, its median
|
|
177
|
+
entry age, and the repair command. Read it — do not infer that nexus is broken.
|
|
178
|
+
|
|
179
|
+
**Project resolution**: `--project-id` > `--path` > `cwd`.
|
|
180
|
+
Default ID = `base64url(path).slice(0,32)`.
|
|
181
|
+
|
|
182
|
+
**Rule**: BEFORE editing any symbol, run `cleo nexus impact <symbol>`.
|
|
183
|
+
HIGH/CRITICAL = stop and warn. If the index is stale, say that instead of
|
|
184
|
+
silently substituting `git grep`.
|
|
185
|
+
|
|
186
|
+
> Commands named here are asserted against the live CLI by
|
|
187
|
+
> `scripts/lint-injection-commands.mjs` (T12069). Five commands previously
|
|
188
|
+
> listed in this section — `nexus report`, `nexus brain find`, `nexus compare`,
|
|
189
|
+
> `nexus shared`, `nexus synthesize`, plus `nexus admin` — never existed; the
|
|
190
|
+
> gate exists so a protocol that every agent is told to follow can no longer
|
|
191
|
+
> drift from the binary.
|
|
177
192
|
<!-- /CLEO-INJECTION:section=nexus -->
|
|
178
193
|
|
|
179
194
|
<!-- CLEO-INJECTION:section=orchestration -->
|
|
@@ -372,7 +387,7 @@ Every spawn prompt contains these required sections — orchestrators can progra
|
|
|
372
387
|
## Rules
|
|
373
388
|
|
|
374
389
|
- No time estimates — use `small`, `medium`, `large` sizing
|
|
375
|
-
- Token budget: avoid `cleo list` without `--parent
|
|
390
|
+
- Token budget: avoid `cleo list` without `--parent`; get usage from `cleo <command> --help` (there is no top-level help command)
|
|
376
391
|
- Do not read full task details for tasks you won't work on
|
|
377
392
|
<!-- /CLEO-INJECTION:section=rules -->
|
|
378
393
|
|
|
@@ -40,6 +40,10 @@ on:
|
|
|
40
40
|
description: 'Epic task ID (e.g. T9999) used by `cleo release plan`'
|
|
41
41
|
type: string
|
|
42
42
|
required: false
|
|
43
|
+
tasks:
|
|
44
|
+
description: 'Comma-separated task IDs (e.g. T101,T102) used by `cleo release plan` when the release is task-scoped rather than epic-scoped'
|
|
45
|
+
type: string
|
|
46
|
+
required: false
|
|
43
47
|
channel:
|
|
44
48
|
description: 'Release channel'
|
|
45
49
|
type: choice
|
|
@@ -310,11 +314,24 @@ jobs:
|
|
|
310
314
|
PLAN_FILE=".cleo/release/${{ inputs.version }}.plan.json"
|
|
311
315
|
if [ -z "${{ inputs.plan-blob-sha256 }}" ]; then
|
|
312
316
|
echo "No plan-blob-sha256 input — generating fresh plan."
|
|
313
|
-
|
|
317
|
+
# T12089: `cleo release plan` REQUIRES a scope (--saga | --epic |
|
|
318
|
+
# --tasks). This branch previously passed none whenever `epic` was
|
|
319
|
+
# empty, so `plan` exited 2 and every release died here at
|
|
320
|
+
# "Prepare bump-PR" — after a full green preflight. Forward whichever
|
|
321
|
+
# scope the dispatcher supplied, and if none was, say so plainly
|
|
322
|
+
# instead of surfacing an argparse error from a nested command.
|
|
323
|
+
SCOPE_ARGS=()
|
|
314
324
|
if [ -n "${{ inputs.epic }}" ]; then
|
|
315
|
-
|
|
325
|
+
SCOPE_ARGS+=(--epic "${{ inputs.epic }}")
|
|
316
326
|
fi
|
|
317
|
-
|
|
327
|
+
if [ -n "${{ inputs.tasks }}" ]; then
|
|
328
|
+
SCOPE_ARGS+=(--tasks "${{ inputs.tasks }}")
|
|
329
|
+
fi
|
|
330
|
+
if [ ${#SCOPE_ARGS[@]} -eq 0 ]; then
|
|
331
|
+
echo "::error::No release scope supplied. Dispatch with 'epic' or 'tasks' (cleo release plan requires --saga, --epic or --tasks), or pass plan-blob-sha256 with a committed plan file."
|
|
332
|
+
exit 1
|
|
333
|
+
fi
|
|
334
|
+
cleo release plan "${{ inputs.version }}" "${SCOPE_ARGS[@]}" --json > "$PLAN_FILE"
|
|
318
335
|
else
|
|
319
336
|
echo "Verifying pre-computed plan against sha256=${{ inputs.plan-blob-sha256 }}"
|
|
320
337
|
if [ ! -f "$PLAN_FILE" ]; then
|
|
@@ -330,27 +347,46 @@ jobs:
|
|
|
330
347
|
echo "plan_file=$PLAN_FILE" >> "$GITHUB_OUTPUT"
|
|
331
348
|
timeout-minutes: 5
|
|
332
349
|
|
|
333
|
-
# R-205(c): bump
|
|
350
|
+
# R-205(c): bump every package manifest to the release version.
|
|
351
|
+
#
|
|
352
|
+
# T12093: this step used to run `cleo version-bump`, a command that has
|
|
353
|
+
# NEVER existed — the verb is absent from the CLI manifest, so the step
|
|
354
|
+
# died with `Unknown command version-bump` (exit 127) on every dispatch,
|
|
355
|
+
# always AFTER a full green preflight (~20 min). Version bumping is
|
|
356
|
+
# project-shaped (single package vs workspace), so it is a placeholder:
|
|
357
|
+
# override with `versionBumpCmd` in `.cleo/release-config.json`.
|
|
334
358
|
- name: Bump version
|
|
335
|
-
run:
|
|
359
|
+
run: |
|
|
360
|
+
VERSION="${{ inputs.version }}"
|
|
361
|
+
{{VERSION_BUMP_CMD}}
|
|
336
362
|
timeout-minutes: 3
|
|
337
363
|
|
|
338
|
-
# R-205(d):
|
|
339
|
-
#
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
364
|
+
# R-205(d): CHANGELOG.md.
|
|
365
|
+
#
|
|
366
|
+
# T12093: this step used to run `cleo release changelog`, which also does
|
|
367
|
+
# not exist (`cleo release` has no `changelog` sub-verb). CHANGELOG.md is
|
|
368
|
+
# written by `cleo release plan` itself (T9838), so there is nothing to
|
|
369
|
+
# regenerate here — the correct action is to VERIFY the section is present
|
|
370
|
+
# and fail loudly if it is not, rather than silently ship a release whose
|
|
371
|
+
# notes were never written.
|
|
372
|
+
- name: Verify CHANGELOG section
|
|
373
|
+
run: cleo release validate-changelog "${{ inputs.version }}"
|
|
348
374
|
timeout-minutes: 3
|
|
349
375
|
|
|
350
376
|
# R-205(e): commit with the canonical subject line.
|
|
377
|
+
#
|
|
378
|
+
# T12093: `git commit` exits 1 on an empty index, so an already-prepared
|
|
379
|
+
# version failed here with a bare "nothing to commit" and no explanation.
|
|
380
|
+
# An empty prepare cannot become a PR either (`gh pr create` rejects a head
|
|
381
|
+
# with no commits ahead of base), so say what state the repo is in and what
|
|
382
|
+
# to do next instead of pushing a branch that cannot open.
|
|
351
383
|
- name: Commit prepare
|
|
352
384
|
run: |
|
|
353
385
|
git add -A
|
|
386
|
+
if git diff --cached --quiet; then
|
|
387
|
+
echo "::error::Nothing to commit — every package.json and CHANGELOG.md already match ${{ inputs.version }} on main. This release is already prepared; tag it directly (git tag -a ${{ inputs.version }} && git push origin ${{ inputs.version }}) instead of re-running prepare."
|
|
388
|
+
exit 1
|
|
389
|
+
fi
|
|
354
390
|
git commit -m "release: prepare ${{ inputs.version }}"
|
|
355
391
|
timeout-minutes: 2
|
|
356
392
|
|
|
@@ -362,6 +398,27 @@ jobs:
|
|
|
362
398
|
timeout-minutes: 5
|
|
363
399
|
|
|
364
400
|
# R-205(f): open the bump-PR via `gh pr create`.
|
|
401
|
+
#
|
|
402
|
+
# T12093: the body was `--body-file <plan>.json`, so every bump-PR opened
|
|
403
|
+
# with a raw schema envelope as its description. The plan already carries
|
|
404
|
+
# the rendered notes at `meta.releaseNotes` (the same text that lands in
|
|
405
|
+
# CHANGELOG.md) — use that, and fall back to the JSON only if absent.
|
|
406
|
+
- name: Render PR body
|
|
407
|
+
id: body
|
|
408
|
+
run: |
|
|
409
|
+
node -e '
|
|
410
|
+
const fs = require("node:fs");
|
|
411
|
+
const plan = JSON.parse(fs.readFileSync(process.argv[1], "utf8"));
|
|
412
|
+
const notes = plan?.meta?.releaseNotes;
|
|
413
|
+
fs.writeFileSync(
|
|
414
|
+
"/tmp/bump-pr-body.md",
|
|
415
|
+
typeof notes === "string" && notes.trim().length > 0
|
|
416
|
+
? notes
|
|
417
|
+
: "```json\n" + JSON.stringify(plan, null, 2) + "\n```\n",
|
|
418
|
+
);
|
|
419
|
+
' "${{ steps.plan.outputs.plan_file }}"
|
|
420
|
+
timeout-minutes: 2
|
|
421
|
+
|
|
365
422
|
- name: Open bump-PR
|
|
366
423
|
run: |
|
|
367
424
|
gh pr create \
|
|
@@ -369,7 +426,7 @@ jobs:
|
|
|
369
426
|
--head "${{ steps.branch.outputs.name }}" \
|
|
370
427
|
--title "release: prepare ${{ inputs.version }}" \
|
|
371
428
|
--label "{{PR_LABEL}}" \
|
|
372
|
-
--body-file
|
|
429
|
+
--body-file /tmp/bump-pr-body.md
|
|
373
430
|
timeout-minutes: 5
|
|
374
431
|
|
|
375
432
|
# R-209(c): emit recovery hint into the job summary artifact.
|