Skip to content
Merged
Show file tree
Hide file tree
Changes from 51 commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
92726f9
feat: merge knowledge graph + conversation arc into memdir
Gravirei Jun 29, 2026
65b76a4
fix: type errors, add test suites, fix resetArc() disk-write bug
Gravirei Jun 29, 2026
951a210
fix: remove generic type param from restore() call
Gravirei Jun 29, 2026
123f824
fix: address CodeRabbit findings — YAML injection, secrets leak, cach…
Gravirei Jun 29, 2026
91b235e
fix: redact URL credentials/query/hash in endpoint extraction; add pe…
Gravirei Jun 29, 2026
4db3578
test: add regression for URL credential/query/hash redaction in fact …
Gravirei Jun 29, 2026
1d13e61
feat: wire getOrchestratedMemory into query.ts prompt; remove dead pr…
Gravirei Jun 29, 2026
3b52952
feat: enhance memory management by adding clearArcArtifacts function …
Gravirei Jun 29, 2026
9049c3d
feat: enhance fact extraction by adding tests for absolute paths, bac…
Gravirei Jun 29, 2026
09eed41
Review-fix: scoped IP tagging, scrubbedContent, arcMemoryDir null, ve…
Gravirei Jun 29, 2026
7db4f33
Review-fix: isAutoMemoryEnabled gate, scrubbed paths, clearIndex in c…
Gravirei Jun 30, 2026
c77132e
Review-fix: URL-stripped path scan, digit-key/quoted-value env redact…
Gravirei Jun 30, 2026
6ea502a
Review-fix: quoted multi-token env values fully redacted, regression …
Gravirei Jun 30, 2026
b973e5a
Review-fix: freshness check on each search, integration test, typeche…
Gravirei Jun 30, 2026
58347fc
Review-fix: missing-index-file reinit, full-pipeline integration test
Gravirei Jun 30, 2026
7ad10c5
Review-fix: gate arc/RAG on isAutoMemoryEnabled, add integration+stal…
Gravirei Jun 30, 2026
ffe0346
Review-fix: use >= for mtime staleness check to catch same-ms edits
Gravirei Jun 30, 2026
db8b551
Review-fix: move auto-memory gate to persistence layer
Gravirei Jun 30, 2026
09fec56
Refactor memory handling: consolidate metadata retrieval and improve …
Gravirei Jun 30, 2026
f20f27f
Fix: update expectation to use toEqual for prompt comparison in conve…
Gravirei Jun 30, 2026
a41f198
fix: detect same-size content changes via content hash; handle text-b…
Gravirei Jul 1, 2026
d19cef8
fix: skip symlinked dirs in vector index walk; enable arc/multi-turn …
Gravirei Jul 2, 2026
81f5e98
fix: follow symlinked dirs in vector index walk per review
Gravirei Jul 2, 2026
7375ebc
fix: skip symlinked dirs in vector index walk; add symlink-boundary r…
Gravirei Jul 2, 2026
3fb78fa
fix: skip indexing symlinked directories and ensure only files are pr…
Gravirei Jul 2, 2026
241db19
fix: show cmd output on failure in verifier; add multi-turn coverage;…
Gravirei Jul 8, 2026
b04e14b
fix: clear memoized auto-mem path after teardown in knowledge + conve…
Gravirei Jul 9, 2026
eacfd78
fix: isolate vector index per memdir, filter secrets from backtick fa…
Gravirei Jul 10, 2026
09d220a
fix: extend credential filter for AWS/GitLab tokens; reject all symli…
Gravirei Jul 10, 2026
2cd56fa
fix: use repo's redactSecretSubstringsForDisplay; add npm/glpat/AKIA/…
Gravirei Jul 10, 2026
14ff234
fix: P1 backtick credential safety + untrusted-data boundary; P2 lega…
Gravirei Jul 12, 2026
b6aac70
fix: B1-B5, M6, M8 — no message mutation, migration data loss, empty-…
Gravirei Jul 12, 2026
1867090
fix: address 8 reviewer findings (R1-R8)
Gravirei Jul 13, 2026
31f46a4
fix: close 9 memory findings — approval gate, non-fatal writes, secre…
Gravirei Jul 13, 2026
72961b3
test: avoid global cwd pollution in knowledgeGraph tests
Gravirei Jul 13, 2026
dfcb5eb
fix: address 15 reviewer findings (R1-R15)
Gravirei Jul 14, 2026
1263fb9
test: isolate governance mock by removing afterEach clear
Gravirei Jul 14, 2026
1418ed7
fix: isolate governance mock per async context via executionAsyncId t…
Gravirei Jul 14, 2026
b82c632
Refactor knowledge graph legacy migration, secure secrets and IP octe…
Gravirei Jul 15, 2026
9cc8743
Fix governancePolicy enablement in full test runs by checking for tes…
Gravirei Jul 15, 2026
ccb5fbb
fix: ensure auto memory is enabled in conversationArc, knowledgeGraph…
Gravirei Jul 15, 2026
347fc26
fix: address P1/P2 review findings — redaction, bounds, legacy backup
Gravirei Jul 16, 2026
92e7254
fix: address P1 findings — safe legacy retirement, multi-turn aggrega…
Gravirei Jul 19, 2026
bf33b8f
fix: address P1/P2 review findings — rule extraction gate, SQLite rea…
Gravirei Jul 24, 2026
c6d2b28
fix: tighten looksLikeOpaqueToken to avoid flagging compound model names
Gravirei Jul 24, 2026
39dfb24
fix: address P1/P2 review findings — rebase, test isolation, SQLite r…
Gravirei Jul 27, 2026
5d0f62a
fix: address P1/P2/P3 review findings — secret scrub on migrate, lean…
Gravirei Aug 5, 2026
4121c52
fix: scrub secret entity names on migrate, exclude summary facts from…
Gravirei Aug 12, 2026
5b69436
fix: address P1 review findings for legacy graph redaction, recovery-…
Gravirei Aug 13, 2026
cbf6b0e
Potential fix for pull request finding
Gravirei Aug 13, 2026
2644050
fix: redact protocol-relative URL userinfo in legacy migration
Gravirei Aug 13, 2026
4b1a1ac
Merge branch 'main' into codex/pr-1811
kevincodex1 Aug 19, 2026
dfcc402
fix(memory): harden memdir migration and retrieval
kevincodex1 Aug 19, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions scripts/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ const featureFlags: Record<string, boolean> = {
VERIFICATION_AGENT: true, // Built-in read-only agent for test/verification
PROMPT_CACHE_BREAK_DETECTION: true, // Detect & log unexpected prompt cache invalidations
HOOK_PROMPTS: true, // Allow tools to request interactive user prompts
CONVERSATION_ARC: true, // Conversation arc tracking (goals/decisions/phases)
MULTI_TURN_CONTEXT: true, // Multi-turn context tracking across tool cycles
Comment on lines +130 to +131

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

Add focused regression coverage for the newly enabled runtime paths.

These flags turn on conversation-arc and multi-turn-context behavior in production builds. Please add or point to focused tests that exercise the exact enabled path, including .arc.json persistence/finalization and query hook integration. As per coding guidelines, “Add or update tests when the change affects behavior.” As per path instructions, “Block when risky runtime changes lack focused regression coverage.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/build.ts` around lines 65 - 66, Add focused regression coverage for
the newly enabled runtime paths in build/config handling, since CONVERSATION_ARC
and MULTI_TURN_CONTEXT now affect production behavior. Update or add tests
around the relevant execution path in scripts/build.ts and the arc-related code
paths to exercise .arc.json persistence/finalization plus query hook
integration. If tests already exist, point them to the exact enabled path and
verify they fail without these flags and pass with them.

Sources: Coding guidelines, Path instructions

}

// ── Pre-process: replace feature() calls with boolean literals ──────
Expand Down
171 changes: 171 additions & 0 deletions scripts/verify-kg-merge.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
#!/usr/bin/env bash
set -euo pipefail

REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)"
cd "$REPO_ROOT"

PASS=0
FAIL=0

pass() { echo " ✅ $1"; PASS=$((PASS+1)); }
fail() { echo " ❌ $1"; FAIL=$((FAIL+1)); }
check() {
local msg="$1"; shift
local tmpfile; tmpfile=$(mktemp)
if "$@" &>"$tmpfile"; then
rm -f "$tmpfile"; pass "$msg"
else
cat "$tmpfile"; rm -f "$tmpfile"; fail "$msg"
fi
}

echo "═══════════════════════════════════════════════════════════════"
echo " Verifying memdir-kg-merge refactor"
echo "═══════════════════════════════════════════════════════════════"
echo ""

# ── 1. File existence ──────────────────────────────────────────────
echo "── 1. File existence ──"

check "vectorIndex.ts exists" test -f src/memdir/vectorIndex.ts
check "autoExtractFacts.ts exists" test -f src/memdir/autoExtractFacts.ts
check "knowledgeGraph.ts exists" test -f src/utils/knowledgeGraph.ts
check "conversationArc.ts exists" test -f src/utils/conversationArc.ts

check "SQLiteProvider.ts is REMOVED" test ! -f src/utils/storage/SQLiteProvider.ts
check "JSONProvider.ts is REMOVED" test ! -f src/utils/storage/JSONProvider.ts
check "storage/ dir is REMOVED" test ! -d src/utils/storage

# ── 2. Build checks ────────────────────────────────────────────────
echo ""
echo "── 2. Build checks ──"

check "knowledgeGraph.ts builds" bun build --no-bundle src/utils/knowledgeGraph.ts
check "conversationArc.ts builds" bun build --no-bundle src/utils/conversationArc.ts
check "vectorIndex.ts builds" bun build --no-bundle src/memdir/vectorIndex.ts
check "autoExtractFacts.ts builds" bun build --no-bundle src/memdir/autoExtractFacts.ts
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved

# ── 3. Feature flags in build.ts ───────────────────────────────────
echo ""
echo "── 3. Feature flags ──"

check "CONVERSATION_ARC=true in build.ts" grep -q "CONVERSATION_ARC: true" scripts/build.ts
check "MULTI_TURN_CONTEXT=true in build.ts" grep -q "MULTI_TURN_CONTEXT: true" scripts/build.ts

# ── 4. No dangling imports ─────────────────────────────────────────
echo ""
echo "── 4. No dangling imports ──"

# These symbols were removed — nothing should import them anymore
check "No addGlobalEntity imports" test "$(rg "import.*addGlobalEntity" src/ --type ts -c | wc -l)" -eq 0
check "No addGlobalRelation imports" test "$(rg "import.*addGlobalRelation" src/ --type ts -c | wc -l)" -eq 0
check "No addGlobalSummary imports" test "$(rg "import.*addGlobalSummary" src/ --type ts -c | wc -l)" -eq 0
check "No addGlobalRule imports" test "$(rg "import.*addGlobalRule" src/ --type ts -c | wc -l)" -eq 0
check "No SQLiteProvider imports" test "$(rg "SQLiteProvider" src/ --type ts -c | wc -l)" -eq 0
check "No JSONProvider imports" test "$(rg "JSONProvider" src/ --type ts -c | wc -l)" -eq 0

# ── 5. Export integrity ────────────────────────────────────────────
echo ""
echo "── 5. Export integrity ──"

# knowledgeGraph.ts must export these (backward compat)
check "knowledgeGraph exports Entity" grep -q "export interface Entity" src/utils/knowledgeGraph.ts
check "knowledgeGraph exports extractKeywords" grep -q "export function extractKeywords" src/utils/knowledgeGraph.ts
check "knowledgeGraph exports getGlobalGraph" grep -q "export function getGlobalGraph" src/utils/knowledgeGraph.ts
check "knowledgeGraph exports getOrchestratedMemory" grep -q "export async function getOrchestratedMemory" src/utils/knowledgeGraph.ts
check "knowledgeGraph exports searchGlobalGraph" grep -q "export async function searchGlobalGraph" src/utils/knowledgeGraph.ts
check "knowledgeGraph exports resetGlobalGraph" grep -q "export function resetGlobalGraph" src/utils/knowledgeGraph.ts

# conversationArc.ts must export these
check "conversationArc exports Goal" grep -q "export interface Goal" src/utils/conversationArc.ts
check "conversationArc exports ConversationArc" grep -q "export interface ConversationArc" src/utils/conversationArc.ts
check "conversationArc exports initializeArc" grep -q "export function initializeArc" src/utils/conversationArc.ts
check "conversationArc exports updateArcPhase" grep -q "export async function updateArcPhase" src/utils/conversationArc.ts
check "conversationArc exports finalizeArcTurn" grep -q "export async function finalizeArcTurn" src/utils/conversationArc.ts
check "conversationArc exports getArcSummary" grep -q "export async function getArcSummary" src/utils/conversationArc.ts
check "conversationArc exports resetArc" grep -q "export function resetArc" src/utils/conversationArc.ts

# vectorIndex.ts must export these
check "vectorIndex exports initMemdirIndex" grep -q "export async function initMemdirIndex" src/memdir/vectorIndex.ts
check "vectorIndex exports searchMemdirIndex" grep -q "export async function searchMemdirIndex" src/memdir/vectorIndex.ts
check "vectorIndex exports rebuildIndex" grep -q "export async function rebuildIndex" src/memdir/vectorIndex.ts

# autoExtractFacts.ts must export extractFactsIntoMemdir
check "autoExtractFacts exports extractFactsIntoMemdir" grep -q "export async function extractFactsIntoMemdir" src/memdir/autoExtractFacts.ts

# ── 6. query.ts integration ────────────────────────────────────────
echo ""
echo "── 6. query.ts integration ──"

# OpenClaude already has the user message hook for updateArcPhase
check "query.ts has updateArcPhase on user messages" grep -q "updateArcPhase" src/query.ts
check "query.ts has multiTurnContext startNewTurn" grep -q "startNewTurn" src/query.ts
check "query.ts has finalizeArcTurn" grep -q "finalizeArcTurn" src/query.ts

# ── 7. knowledge command ──────────────────────────────────────────
echo ""
echo "── 7. knowledge command ──"

check "knowledge.ts exists" test -f src/commands/knowledge/knowledge.ts
check "knowledge command registered" grep -q "knowledge" src/commands.ts

# ── 8. Config ──────────────────────────────────────────────────────
echo ""
echo "── 8. Config ──"

check "knowledgeGraphEnabled in config" grep -q "knowledgeGraphEnabled" src/utils/config.ts

# ── 9. No removed-symbol references in test files ───────────────────
echo ""
echo "── 9. Test file hygiene ──"

check "No test imports addGlobalEntity" test "$(rg "addGlobalEntity" src/ --type ts -g '*.test.ts' -c | wc -l)" -eq 0
check "No test imports loadProjectGraph" test "$(rg "loadProjectGraph" src/ --type ts -g '*.test.ts' -c | wc -l)" -eq 0
check "No test imports getProjectGraphPath" test "$(rg "getProjectGraphPath" src/ --type ts -g '*.test.ts' -c | wc -l)" -eq 0

# ── 10. full production build dry-run ──────────────────────────────
echo ""
echo "── 10. Production build check ──"

# Use bun build to verify the main entry points resolve
if bun build --no-bundle src/query.ts &>/dev/null; then
pass "query.ts builds (verifies full import chain)"
else
fail "query.ts builds (verifies full import chain)"
fi

# ── 11. Feature-flag entry path regression ──────────────────────────
echo ""
echo "── 11. Feature-flag entry path regression ──"

# Run the real production build flow using scripts/build.ts
if bun run scripts/build.ts &>/dev/null; then
# Verify that the build output does not contain un-transformed feature() calls
if ! grep -q "feature(\s*['\"]CONVERSATION_ARC['\"]" dist/cli.mjs && \
! grep -q "feature(\s*['\"]MULTI_TURN_CONTEXT['\"]" dist/cli.mjs; then
pass "production build resolved feature flags successfully"
else
fail "production build has unresolved feature() calls in bundle"
fi
else
fail "production build script (scripts/build.ts) failed"
fi

# ── 12. TypeScript type check ────────────────────────────────────────
echo ""
echo "── 12. TypeScript type check ──"

check "bun run typecheck passes" bun run typecheck

# ── 13. Test suite ──────────────────────────────────────────────────
echo ""
echo "── 13. Test suite ──"

check "All focused tests pass" bun test src/memdir/vectorIndex.test.ts src/memdir/autoExtractFacts.test.ts src/utils/conversationArc.test.ts src/utils/knowledgeGraph.test.ts src/utils/multiTurnContext.test.ts src/commands/knowledge/knowledge.test.ts

echo ""
echo "═══════════════════════════════════════════════════════════════"
echo " Results: $PASS passed, $FAIL failed"
echo "═══════════════════════════════════════════════════════════════"

exit $FAIL
2 changes: 1 addition & 1 deletion src/cli/handlers/xaiAuth.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ beforeEach(async () => {
process.chdir(tempCwd)
process.env.CLAUDE_CONFIG_DIR = tempConfigDir
process.env.CLAUDE_CODE_SIMPLE = '1'
// Other test files (SQLiteProvider, knowledgeGraph, …) call
// Other test files (knowledgeGraph, …) call
// setClaudeConfigHomeDirForTesting and may leak the override. Pin it
// to our temp dir so clearPersistedXaiOAuthProfile's path resolution
// lands on the file we just wrote.
Expand Down
58 changes: 50 additions & 8 deletions src/commands/knowledge/knowledge.test.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
import { describe, expect, it, beforeEach, afterEach } from 'bun:test'
import { mkdtempSync, rmSync } from 'fs'
import { mkdtempSync, mkdirSync, writeFileSync, rmSync } from 'fs'
import { tmpdir } from 'os'
import { join } from 'path'
import { call as knowledgeCall } from './knowledge.js'
import { getGlobalConfig, saveGlobalConfig } from '../../utils/config.js'
import { getArc, addEntity, resetArc } from '../../utils/conversationArc.js'
import { getArc, resetArc, initializeArc, addGoal } from '../../utils/conversationArc.js'
import { getGlobalGraph, resetGlobalGraph } from '../../utils/knowledgeGraph.js'
import {
getMultiTurnStats,
getTurnHistory,
startNewTurn,
} from '../../utils/multiTurnContext.js'
import { setClaudeConfigHomeDirForTesting } from '../../utils/envUtils.js'
import { getAutoMemPath } from '../../memdir/paths.js'
import {
acquireSharedMutationLock,
releaseSharedMutationLock,
Expand All @@ -22,6 +28,7 @@ describe('knowledge command', () => {
configDir = mkdtempSync(join(tmpdir(), 'openclaude-knowledge-command-'))
process.env.CLAUDE_CONFIG_DIR = configDir
setClaudeConfigHomeDirForTesting(configDir)
getAutoMemPath.cache?.clear?.()
resetArc()
resetGlobalGraph()
})
Expand All @@ -36,6 +43,7 @@ describe('knowledge command', () => {
process.env.CLAUDE_CONFIG_DIR = originalConfigDir
}
setClaudeConfigHomeDirForTesting(undefined)
getAutoMemPath.cache?.clear?.()
} finally {
const dirToRemove = configDir
configDir = undefined
Expand Down Expand Up @@ -91,17 +99,51 @@ describe('knowledge command', () => {
}
})

it('clears the knowledge graph', async () => {
// Add a fact first
await addEntity('test', 'fact')
it('clears the knowledge graph and arc state', async () => {
// Seed a fact file so we have state to clear
const memDir = getAutoMemPath()
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
const factsDir = join(memDir, '.facts')
mkdirSync(factsDir, { recursive: true })
writeFileSync(join(factsDir, 'test-fact.md'), `---
title: Test Fact
type: reference
factType: test
description: A seeded fact
---

Test content
`)

const graph = getGlobalGraph()
expect(Object.keys(graph.entities).length).toBe(1)
const countBefore = Object.keys(graph.entities).length
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
expect(countBefore).toBeGreaterThan(0)

// Seed arc state: initialize arc and add a goal
initializeArc(memDir)
addGoal('Test goal for clear')
expect(getArc()).not.toBeNull()
expect(getArc()!.goals.length).toBeGreaterThan(0)
expect(getArc()!.decisions.length).toBe(0)

// Seed multi-turn state: start a turn so it survives and must be reset
startNewTurn()
expect(getTurnHistory().length).toBeGreaterThan(0)
expect(getMultiTurnStats().totalTurns).toBeGreaterThan(0)

// Clear it
const res = await knowledgeCallWithCapture('clear')
const graphAfter = getGlobalGraph()
expect(Object.keys(graphAfter.entities).length).toBe(0)
expect(res.toLowerCase()).toContain('cleared')
expect(Object.keys(graphAfter.entities).length).toBe(0)

// Multi-turn tracking must not inject prior tool-call context after clear
expect(getTurnHistory().length).toBe(0)
expect(getMultiTurnStats().totalTurns).toBe(0)

// Arc state should be reset (getArc re-initializes an empty arc
// since clear deletes the .arc.json file from disk)
expect(getArc()).not.toBeNull()
expect(getArc()!.goals.length).toBe(0)
expect(getArc()!.currentPhase).toBe('init')
})

it('shows error on unknown subcommand', async () => {
Expand Down
44 changes: 36 additions & 8 deletions src/commands/knowledge/knowledge.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import type { LocalCommandCall } from '../../types/command.js';
import { getArcSummary, resetArc, getArcStats } from '../../utils/conversationArc.js';
import { getArcSummary, resetArc, getArcStats, clearArcArtifacts } from '../../utils/conversationArc.js';
import { getAutoMemPath } from '../../memdir/paths.js';
import { getGlobalGraph, resetGlobalGraph } from '../../utils/knowledgeGraph.js';
import { resetMultiTurnState } from '../../utils/multiTurnContext.js';
import { getGlobalConfig, saveGlobalConfig } from '../../utils/config.js';
import chalk from 'chalk';

Expand All @@ -11,17 +13,21 @@ export const call: LocalCommandCall = async (args, _context) => {

if (!subCommand || subCommand === 'status') {
const config = getGlobalConfig();
const stats = getArcStats();
const graph = getGlobalGraph();
const entityCount = Object.keys(graph.entities).length;

const statusText = (config.knowledgeGraphEnabled !== false)
? chalk.green('ENABLED')
: chalk.red('DISABLED');

let output = `${chalk.bold('Knowledge Graph Engine')}: ${statusText}\n`;
if (stats) {
output += `• Stats: ${stats.goalCount} goals, ${stats.milestoneCount} milestones, ${entityCount} technical facts learned`;

// Do not initialize or migrate when disabled (P2).
if (config.knowledgeGraphEnabled !== false) {
const stats = getArcStats();
const graph = getGlobalGraph();
const entityCount = Object.keys(graph.entities).length;
if (stats) {
output += `• Stats: ${stats.goalCount} goals, ${stats.milestoneCount} milestones, ${entityCount} technical facts learned`;
}
}

return { type: 'text', value: output };
Expand All @@ -45,14 +51,36 @@ export const call: LocalCommandCall = async (args, _context) => {

if (subCommand === 'clear') {
resetArc();
resetGlobalGraph();
const retireResult = resetGlobalGraph();
resetMultiTurnState();
const memDir = getAutoMemPath();
if (memDir) {
clearArcArtifacts(memDir);
}
if (retireResult.failures.length > 0) {
return {
type: 'text',
value: '⚠️ Knowledge graph memory cleared, but the following legacy artifacts could not be backed up and were left in place — resolve any read/write issue and retry: '
+ retireResult.failures.join(', ')
+ '.'
};
}
return {
type: 'text',
value: '🗑️ Knowledge graph memory has been cleared for this session.'
value: '🗑️ Knowledge graph memory has been cleared (all .facts files, vector index, arc state, and multi-turn tracking removed'.concat(
retireResult.archived.length > 0
? `; ${retireResult.archived.length} legacy artifact(s) verified and archived alongside originals`
: '; no legacy JSON/SQLite stores present',
').',
)
};
}

if (subCommand === 'list') {
const config = getGlobalConfig();
if (config.knowledgeGraphEnabled === false) {
return { type: 'text', value: 'Knowledge graph is disabled.' };
}
return { type: 'text', value: await getArcSummary() };
}

Expand Down
Loading
Loading