Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

Merge remote-tracking branch 'origin/capy/weights-20261102' into capy/gbra267-install-mcp-wave

garrytan810ab20ef534
diff --cc src/commands/setup.ts
index ac09da929e,c12b7b5f18..17e7f22079
--- a/src/commands/setup.ts
+++ b/src/commands/setup.ts
@@@ -23,10 -23,10 +23,10 @@@
* Engine-free: setup never opens the database itself.
*/
import { realpathSync } from 'node:fs';
-import { dirname, join } from 'node:path';
+import { dirname, join, resolve } from 'node:path';
import { removeHermesTurnHook, syncHermesTurnHook } from '../core/setup/hermes-turn-hook.ts';
import { removeOpenclawTurnPlugin, syncOpenclawTurnPlugin } from '../core/setup/openclaw-turn-plugin.ts';
- import { isTurnRuleHarness, removeTurnRuleHook, syncTurnRuleHook, type TurnHookOutcome, type TurnRuleHarness } from '../core/setup/turn-hook.ts';
+ import { hasTurnRuleHook, isTurnRuleHarness, removeTurnRuleHook, syncTurnRuleHook, type TurnHookOutcome, type TurnRuleHarness } from '../core/setup/turn-hook.ts';
import { inspectTurnHook, TURN_HOOK_NATIVE_INSPECT, turnHookFix, verifyTurnHook, type TurnHookVerdict } from '../core/setup/turn-hook-check.ts';
import { opError, OperationError } from '../core/ops/contract.ts';
import { cliRenderContext, renderCliError, renderNotice, type Action, type Notice } from '../core/agent-output.ts';
diff --cc src/core/ops/admin.ts
index d22b9e139b,b665a2e6d5..dc237c9930
--- a/src/core/ops/admin.ts
+++ b/src/core/ops/admin.ts
@@@ -236,8 -236,10 +236,10 @@@ const get_versions: Operation =
}
const plain = page(await ctx.engine.getVersions(p.slug as string, opts));
const versions = canReadWriteAttribution(ctx) ? await attributeVersions(ctx.engine, plain) : plain;
- // Wave B: a segmented version's body is never returned whole; body_ref names its size and the windowed read.
+ // Wave B: a segmented version's body is never returned whole; body_ref names its size (no read serves an older segmented body yet, #7800).
const out = [];
+ const snapshotTiers = ctx.remote === false || versions.length === 0 ? new Map<number, unknown>() : new Map((await ctx.engine.executeRaw<{ id: number | string; trust_tier: string | null }>(
+ 'SELECT id, trust_tier FROM page_versions WHERE id = ANY($1::bigint[])', [versions.map(v => Number(v.id))])).map(r => [Number(r.id), r.trust_tier] as const));
for (const v of versions) {
if (isSegmentedPage(v)) {
const sized = await remoteVersionSize(ctx, v);
diff --cc src/core/setup/turn-hook-check.ts
index 0f4dbbe216,2b374be01a..c23d50692a
--- a/src/core/setup/turn-hook-check.ts
+++ b/src/core/setup/turn-hook-check.ts
@@@ -17,8 -17,11 +17,11 @@@ import type { Action } from '../agent-o
import { bunSpawnSync } from '../spawn.ts';
import { codexHookCensus, codexHookGroupRuns, codexHookTrustHash } from '../bootstrap/codex-hooks.ts';
import { readCodexTomlTable } from '../bootstrap/codex-toml.ts';
- import { classifyHarnessHook } from '../bootstrap/hooks.ts';
- import { GBRAIN_HOOK_MARKER_KEY, claudeManagedSettingsPaths, claudeUserSettingsPath, codexConfigPath, codexHooksPath } from '../bootstrap/host-specs.ts';
+ import { classifyHarnessHook, hookEntryHash } from '../bootstrap/hooks.ts';
+ import { localSetupRecords } from './local-receipts.ts';
-import { CLAUDE_SETTINGS_FILE_RELPATH, GBRAIN_HOOK_MARKER_KEY, GBRAIN_SETUP_MARKER_VALUE, claudeUserSettingsPath, codexConfigPath, codexHooksPath } from '../bootstrap/host-specs.ts';
++import { CLAUDE_SETTINGS_FILE_RELPATH, GBRAIN_HOOK_MARKER_KEY, GBRAIN_SETUP_MARKER_VALUE, claudeManagedSettingsPaths, claudeUserSettingsPath, codexConfigPath, codexHooksPath } from '../bootstrap/host-specs.ts';
+ import { hookLauncherInCommand, hookLauncherState, type HookLauncherState } from './hook-launcher.ts';
+ import type { LauncherLane } from './launcher-lanes.ts';
import { enabledPluginLanes } from '../bootstrap/plugin-lanes.ts';
import { brainFirstTarget, openclawConfigPath, parseJson5ish } from './brain-first.ts';
import { inspectHermesTurnHook } from './hermes-turn-hook.ts';
diff --cc src/core/setup/turn-hook.ts
index 73bd702ae7,e2a420af11..648fd2f00a
--- a/src/core/setup/turn-hook.ts
+++ b/src/core/setup/turn-hook.ts
@@@ -35,7 -37,8 +37,8 @@@ import { ownedEntryFingerprint } from '
import { codexHookCensus, codexHookGroupRuns, codexHookTrustHash, codexSetupHookGroup, codexSetupTrustEntry, writeCodexSetupHooks, type CodexHookGroup } from '../bootstrap/codex-hooks.ts';
import { appendCodexTomlTable, readCodexTomlTable, removeCodexTomlTable } from '../bootstrap/codex-toml.ts';
import { buildClaudeHookCommand, classifyHarnessHook, hookEntryHash, removeClaudeHooksAt, writeClaudeHooksAt } from '../bootstrap/hooks.ts';
-import { CLAUDE_HOOK_DEFAULT_TIMEOUT_SECS, GBRAIN_HOOK_MARKER_KEY, claudeUserSettingsPath, codexConfigPath, codexHooksPath } from '../bootstrap/host-specs.ts';
+import { CLAUDE_HOOK_DEFAULT_TIMEOUT_SECS, GBRAIN_HOOK_MARKER_KEY, claudeManagedSettingsPaths, claudeUserSettingsPath, codexConfigPath, codexHooksPath } from '../bootstrap/host-specs.ts';
+ import { ensureHookLauncher, hookLauncherPath, hookLauncherState } from './hook-launcher.ts';
export const TURN_RULE_LANE = 'turn-rule';
export const TURN_RULE_MARKER = 'turn-rule-v1';