Commit Graph
1677 Commits
Author SHA1 Message Date
Devesh Maheshwari 33d063de48 fix(cli): show registered agents in status agents 2026-10-10 03:18:15 -05:00
randRuFlo 01fa240e7c wip(memory): agentdb alpha.20 floor + sql.js lock/concurrency guard
Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-09 17:17:36 -04:00
Dragan SpiridonovandRuflo & AQE bc14216777 fix(task,console): task_update accepts only the five statuses; a task stored as "complete" is never shown pending or re-dispatched
task_update stored any string as a task's status, so an agent writing
"complete" left a finished task every reader misread: the ruflo-console
Automation kanban listed it under PENDING (offering assign/cancel), and
Mission Control derived it as ready, so nextTask() would hand finished work
to Claude again as a new billed turn.

CLI (mcp-tools/task-tools.ts)
- statusOf(): trimmed, case-insensitive, aliases complete/done/canceled/
  running/in-progress; anything else (incl. "" and prototype keys) is
  refused with the allowed list and the task is left unchanged.
- No schema enum on purpose: the HTTP/WebSocket registry validates enums
  before the handler, which would refuse aliases there but not over stdio.
- Completing through task_update now finishes the task as task_complete
  does (progress 100, completedAt, worker idle and counted once per
  hand-out); cancelling frees workers as failing already did. Worker
  effects run after the task store is saved.

Console
- taskStatusOf() reads the spellings older CLIs already stored; used by the
  kanban lanes and verbs, Mission Control derive (no re-dispatch), mission
  cancel, workflow links and the workflow guide.

Co-Authored-By: Ruflo & AQE
Claude-Session: https://claude.ai/code/session_01CGoza3gyxBjpaiMPhGHcHs
2026-10-09 15:54:18 +02:00
rUv 6287f19938 Merge pull request #3901 from rudycelekli/fix/config-reset-section-20261007
fix(config): preserve unrelated sections during targeted reset
2026-10-08 20:42:02 -07:00
rUv f49ddd4f78 Merge pull request #3923 from ruvnet/fix/3918-encrypted-store-rewrite
fix(cli): ensureSchemaColumns no longer rewrites an up-to-date (encrypted) store (#3918)
2026-10-08 20:25:40 -07:00
rUv 9f8e37dac3 Merge pull request #3922 from ruvnet/fix/3919-policy-anchor-home
fix(cli): policy trust mirror/key honour HOME and XDG_CONFIG_HOME (#3919)
2026-10-08 20:25:37 -07:00
rUv 1a84aece9e Merge branch 'main' into fix/config-reset-section-20261007 2026-10-08 20:10:18 -07:00
randRuFlo 6625465a50 fix(cli): ensureSchemaColumns rewrites the store only when something changed (#3918)
The status backfill set modified=true even when the UPDATE touched 0 rows, so
every open of an up-to-date store re-exported and rewrote the whole image; with
encryption at rest each write uses a fresh nonce, so read-only commands such as
'memory stats' changed the RFE1 bytes every call. Gate on getRowsModified().

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-08 22:50:40 -04:00
randRuFlo 1c10601716 fix(cli): policy trust mirror and key honour HOME/XDG_CONFIG_HOME; guardrail test runs in a scratch project (#3919)
The anchor mirror and trust key were resolved with userInfo().homedir, which
ignores a throwaway HOME, so tests wrote into the developer's real
~/.config/ruflo/policy-trust and later failed closed on a reused path.
Resolve from the environment at call time (XDG_CONFIG_HOME when absolute,
else os.homedir()/.config; legacy location kept for XDG users who already
have trust state there). mcp-client-guardrail.test.ts now uses a scratch
cwd and HOME.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-08 22:47:14 -04:00
rUv 7ae3a6481e Merge branch 'main' into fix/config-reset-section-20261007 2026-10-08 19:46:50 -07:00
rUv 438f9189fb Merge branch 'main' into fix/config-cli-mcp-interop-20261007 2026-10-08 19:46:47 -07:00
randRuFlo e201290385 style(memory): move append-conditions imports below the file header (#3750 review nit)
Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-08 16:56:05 -04:00
r fa7e4a966c Merge branch 'pr-3750' into feat/release-3.56.0-batch 2026-10-08 16:55:50 -04:00
r d821c22653 Merge branch 'pr-3498' into feat/release-3.56.0-batch 2026-10-08 16:55:50 -04:00
r be5da99198 Merge branch 'pr-3904' into feat/release-3.56.0-batch 2026-10-08 16:55:50 -04:00
r a52b7877a1 Merge branch 'pr-3505' into feat/release-3.56.0-batch
# Conflicts:
#	v3/@claude-flow/cli/src/mcp-tools/workflow-tools.ts
2026-10-08 16:55:21 -04:00
r 8129a3d6f7 Merge branch 'pr-3495' into feat/release-3.56.0-batch
# Conflicts:
#	v3/@claude-flow/cli/src/mcp-tools/agent-execute-core.ts
2026-10-08 16:55:05 -04:00
r 3fb09bc31c Merge branch 'pr-3528' into feat/release-3.56.0-batch 2026-10-08 16:54:43 -04:00
r c2fc22ef1e Merge branch 'pr-3506' into feat/release-3.56.0-batch 2026-10-08 16:54:35 -04:00
r 9abd649b79 Merge branch 'pr-3502' into feat/release-3.56.0-batch 2026-10-08 16:54:35 -04:00
r 92c93ae9a8 Merge branch 'pr-3501' into feat/release-3.56.0-batch 2026-10-08 16:54:35 -04:00
r a187611c17 Merge branch 'pr-3500' into feat/release-3.56.0-batch 2026-10-08 16:54:35 -04:00
r a6e1cf3d93 Merge branch 'pr-3499' into feat/release-3.56.0-batch 2026-10-08 16:54:35 -04:00
r 27ed89b06d Merge branch 'pr-3497' into feat/release-3.56.0-batch 2026-10-08 16:54:35 -04:00
r 77a187aa41 Merge branch 'pr-3496' into feat/release-3.56.0-batch 2026-10-08 16:54:35 -04:00
r 9f2ce096d2 Merge branch 'pr-3494' into feat/release-3.56.0-batch 2026-10-08 16:54:34 -04:00
r b0e730d07c Merge branch 'pr-3493' into feat/release-3.56.0-batch 2026-10-08 16:54:34 -04:00
r f6f6d68548 Merge branch 'pr-3492' into feat/release-3.56.0-batch 2026-10-08 16:54:34 -04:00
r 5668f4c87b Merge branch 'pr-3491' into feat/release-3.56.0-batch 2026-10-08 16:54:34 -04:00
r e34e742e0f Merge branch 'pr-3490' into feat/release-3.56.0-batch 2026-10-08 16:54:34 -04:00
r feb362921e Merge branch 'pr-3489' into feat/release-3.56.0-batch 2026-10-08 16:54:34 -04:00
r 2083853282 Merge branch 'pr-3488' into feat/release-3.56.0-batch 2026-10-08 16:54:34 -04:00
r 729bb70d5f Merge branch 'pr-3484' into feat/release-3.56.0-batch 2026-10-08 16:54:34 -04:00
r 63a252fe9e Merge branch 'pr-3586' into feat/release-3.56.0-batch 2026-10-08 16:54:34 -04:00
r 4a133615c7 Merge branch 'pr-3523' into feat/release-3.56.0-batch 2026-10-08 16:54:34 -04:00
r 213c5c5635 Merge branch 'pr-3903' into feat/release-3.56.0-batch
# Conflicts:
#	v3/@claude-flow/cli/src/services/memory-backup.ts
2026-10-08 16:54:34 -04:00
r 0c824cd845 Merge branch 'pr-3907' into feat/release-3.56.0-batch 2026-10-08 16:54:20 -04:00
r 649c6c961b Merge branch 'pr-3910' into feat/release-3.56.0-batch 2026-10-08 16:54:20 -04:00
r 9d8ae56e9d Merge branch 'pr-3911' into feat/release-3.56.0-batch 2026-10-08 16:54:11 -04:00
r eb00b52b95 Merge branch 'pr-3897' into feat/release-3.56.0-batch 2026-10-08 16:53:19 -04:00
r a7c97868a3 Merge branch 'pr-3894' into feat/release-3.56.0-batch 2026-10-08 16:53:19 -04:00
r 4e8dbfeca2 Merge branch 'pr-3906' into feat/release-3.56.0-batch 2026-10-08 16:53:19 -04:00
martinvladandRuflo & AQE 3add332a32 fix(cli): report unknown agent/task ids and value-less options as errors
Found by running the 3.54.1 CLI with missing and bad arguments:

1. `agent status <unknown>` and `task status <unknown>`: the MCP tool answers
   { status: 'not_found' } and the command rendered it as a record,
   "Agent: undefined", "Created: Invalid Date", "Progress: undefined%",
   and exited 0, so scripts and agents read it as success. Both now print
   "<Agent|Task> not found: <id>" (or the raw JSON under --format json) and
   exit 1.

2. A string/number option given with no value (`hooks route --task`,
   `memory retrieve --key`, or followed by another flag) was parsed as
   boolean `true`, and commands used it as the value: `hooks route --task`
   failed with "task.trim is not a function", `memory retrieve --key` looked
   up the key "true". validateFlags now reports "Option --<name> needs a
   value" for every declared string/number option, so all commands get it.

Co-Authored-By: Ruflo & AQE
Claude-Session: https://claude.ai/code/session_01RMjr52YGVk9fkqtNvb5jg2
2026-10-08 09:05:10 -07:00
Rudy Celekli 39e58ee8da fix(analyze): emit JSON for successful analysis results
Signed-off-by: Rudy Celekli <47457359+rudycelekli@users.noreply.github.com>
2026-10-08 03:27:43 -04:00
Rudy Celekli edbeaea602 fix(doctor): reject unsupported component selections
Signed-off-by: Rudy Celekli <47457359+rudycelekli@users.noreply.github.com>
2026-10-08 01:54:04 -04:00
Nicholas RuestandRuFlo 81064e8cb2 fix(memory): dedup the RFE1 warning per dbPath, not per process (#2889 follow-up)
The once-per-process warning added in the prior commit was keyed by a
single global boolean, so a process touching more than one RFE1-encrypted
dbPath (a custom dbPath passed to insertGraphEdge/queryEdgesBySource/
countGraphEdges, or any multi-store scenario) only ever warned for the
first path it happened to see — the second silently returned null with
zero diagnostic signal, reproducing the original bug's exact symptom for
that second store.

_warnedRfe1Encrypted: boolean -> _warnedRfe1EncryptedPaths: Set<string>,
keyed by path.resolve(dbPath), matching this module's existing per-path
convention (_dbPath). _resetRfe1WarningFlag() now clears the set.

Added a regression test: two distinct encrypted paths in one module
instance each get exactly one warning, and a repeat call on the first
path doesn't double-warn.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-08 00:28:20 -04:00
Nicholas RuestandRuFlo 3232d0b765 fix(memory): distinguish an RFE1-encrypted store from a broken one (#2889)
graph-edge-writer.ts's getBridgeDb() opened dbPath via `new BetterSqlite3(dbPath)`
with no RFE1 encryption-at-rest sniff. When CLAUDE_FLOW_ENCRYPT_AT_REST=1,
memory.db is an opaque encrypted blob; the native open throws SQLITE_NOTADB,
caught by a generic catch that returns null with zero diagnostic signal —
indistinguishable from a missing native module, a permissions failure, or
genuine corruption. Nothing stopped a caller from concluding the store was
broken and running the destructive `memory init`, which creates a fresh
EMPTY store instead of using the existing encrypted data. The underlying
corpus was never damaged, but nothing said so.

This implements only the narrow, safe guard (Option C) a prior automated
triage pass on this issue recommended as the scoped starting point. The two
bigger options are deliberately out of scope: teaching the external
@claude-flow/memory package to decrypt RFE1 natively is a different
package entirely, and an automatic decrypt-and-migrate has real
data-safety stakes that call for human judgment, not a guess.

getBridgeDb() now sniffs the file's header bytes (never buffering the
whole file — memory.db can be multi-GB) before attempting the native open,
using the existing isEncryptedBlob() primitive (encryption/vault.ts) the
same way commands/doctor.ts already does, reimplemented locally since a
memory-layer module must not depend on the command layer. If the file is
RFE1-encrypted, the native open is skipped entirely (it would only throw)
and a clear, once-per-process warning fires: the store is encrypted, this
is a known limitation not corruption, the data is NOT lost, and do NOT run
`memory init`. Every other failure mode is byte-for-byte unchanged.

Also fixed the three reachable call sites in agentdb-tools.ts
(graph-pathfinder's semantic, pagerank, and algorithm-dispatch branches)
that turned a null db handle into a hardcoded "try `memory init`" hint —
now they call the new isBridgeDbEncryptedAtRest() predicate first and
pick the correct hint. Checked hooks-tools.ts's own memory-init hint too;
it's in a vector-search fallback that never touches getBridgeDb/
insertGraphEdge, so it's unreachable from this path and was left alone.

Added graph-edge-writer-rfe1-guard-2889.test.ts (4 tests): a genuinely
RFE1-encrypted file (real encryptBuffer/getKey, not a hand-faked prefix)
never reaches the native open and warns exactly once across repeated
calls; a genuinely corrupted non-encrypted file still reaches the native
open and does NOT produce the encrypted-store warning, proving the two
failure modes are actually distinguished; a normal plaintext memory.db is
unaffected. Spot-verified the core guard test is a real regression guard
by reverting it locally and confirming the test fails, then restoring it.
Existing graph-writer-shared-sqlite-3693.test.ts passes unmodified.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-08 00:23:06 -04:00
Rudy Celekli 8d7b479051 fix(hooks): route eligible persisted SONA patterns
Signed-off-by: Rudy Celekli <47457359+rudycelekli@users.noreply.github.com>
2026-10-07 23:09:24 -04:00
Rudy Celekli 651126776e Merge current upstream and preserve worker selection isolation
Signed-off-by: Rudy Celekli <47457359+rudycelekli@users.noreply.github.com>
2026-10-07 22:09:01 -04:00
Rudy Celekli 8337ce103a fix(memory): include active project stores in default backups
Signed-off-by: Rudy Celekli <47457359+rudycelekli@users.noreply.github.com>
2026-10-07 21:23:43 -04:00