chore: wtf.

This commit is contained in:
cpojer
2026-02-17 13:36:48 +09:00
parent ed11e93cf2
commit d0cb8c19b2
1111 changed files with 2051 additions and 2051 deletions

View File

@@ -1,8 +1,8 @@
import type { CliDeps } from "../../../cli/deps.js";
import type { OpenClawConfig } from "../../../config/config.js";
import type { HookHandler } from "../../hooks.js";
import { createDefaultDeps } from "../../../cli/deps.js";
import type { OpenClawConfig } from "../../../config/config.js";
import { runBootOnce } from "../../../gateway/boot.js";
import type { HookHandler } from "../../hooks.js";
type BootHookContext = {
cfg?: OpenClawConfig;

View File

@@ -2,8 +2,8 @@ import fs from "node:fs/promises";
import path from "node:path";
import { describe, expect, it } from "vitest";
import type { OpenClawConfig } from "../../../config/config.js";
import type { AgentBootstrapHookContext } from "../../hooks.js";
import { makeTempWorkspace, writeWorkspaceFile } from "../../../test-helpers/workspace.js";
import type { AgentBootstrapHookContext } from "../../hooks.js";
import { createHookEvent } from "../../hooks.js";
import handler from "./handler.js";

View File

@@ -26,8 +26,8 @@
import fs from "node:fs/promises";
import os from "node:os";
import path from "node:path";
import type { HookHandler } from "../../hooks.js";
import { resolveStateDir } from "../../../config/paths.js";
import type { HookHandler } from "../../hooks.js";
/**
* Log all command events to a file

View File

@@ -2,8 +2,8 @@ import fs from "node:fs/promises";
import path from "node:path";
import { beforeAll, describe, expect, it, vi } from "vitest";
import type { OpenClawConfig } from "../../../config/config.js";
import type { HookHandler } from "../../hooks.js";
import { makeTempWorkspace, writeWorkspaceFile } from "../../../test-helpers/workspace.js";
import type { HookHandler } from "../../hooks.js";
import { createHookEvent } from "../../hooks.js";
// Avoid calling the embedded Pi agent (global command lane); keep this unit test deterministic.

View File

@@ -8,14 +8,14 @@
import fs from "node:fs/promises";
import os from "node:os";
import path from "node:path";
import type { OpenClawConfig } from "../../../config/config.js";
import type { HookHandler } from "../../hooks.js";
import { resolveAgentWorkspaceDir } from "../../../agents/agent-scope.js";
import type { OpenClawConfig } from "../../../config/config.js";
import { resolveStateDir } from "../../../config/paths.js";
import { createSubsystemLogger } from "../../../logging/subsystem.js";
import { resolveAgentIdFromSessionKey } from "../../../routing/session-key.js";
import { hasInterSessionUserProvenance } from "../../../sessions/input-provenance.js";
import { resolveHookConfig } from "../../config.js";
import type { HookHandler } from "../../hooks.js";
import { generateSlugViaLLM } from "../../llm-slug-generator.js";
const log = createSubsystemLogger("hooks/session-memory");

View File

@@ -1,5 +1,4 @@
import type { OpenClawConfig, HookConfig } from "../config/config.js";
import type { HookEligibilityContext, HookEntry } from "./types.js";
import {
evaluateRuntimeRequires,
hasBinary,
@@ -8,6 +7,7 @@ import {
resolveRuntimePlatform,
} from "../shared/config-eval.js";
import { resolveHookKey } from "./frontmatter.js";
import type { HookEligibilityContext, HookEntry } from "./types.js";
const DEFAULT_CONFIG_VALUES: Record<string, boolean> = {
"browser.enabled": true,

View File

@@ -1,10 +1,3 @@
import type {
OpenClawHookMetadata,
HookEntry,
HookInstallSpec,
HookInvocationPolicy,
ParsedHookFrontmatter,
} from "./types.js";
import { parseFrontmatterBlock } from "../markdown/frontmatter.js";
import {
getFrontmatterString,
@@ -16,6 +9,13 @@ import {
resolveOpenClawManifestOs,
resolveOpenClawManifestRequires,
} from "../shared/frontmatter.js";
import type {
OpenClawHookMetadata,
HookEntry,
HookInstallSpec,
HookInvocationPolicy,
ParsedHookFrontmatter,
} from "./types.js";
export function parseFrontmatter(content: string): ParsedHookFrontmatter {
return parseFrontmatterBlock(content);

View File

@@ -6,8 +6,8 @@
*/
import { type ChildProcess, spawn } from "node:child_process";
import type { OpenClawConfig } from "../config/config.js";
import { hasBinary } from "../agents/skills.js";
import type { OpenClawConfig } from "../config/config.js";
import { createSubsystemLogger } from "../logging/subsystem.js";
import { runCommandWithTimeout } from "../process/exec.js";
import { ensureTailscaleEndpoint } from "./gmail-setup-utils.js";

View File

@@ -1,10 +1,10 @@
import path from "node:path";
import type { OpenClawConfig } from "../config/config.js";
import type { RequirementConfigCheck, Requirements } from "../shared/requirements.js";
import type { HookEligibilityContext, HookEntry, HookInstallSpec } from "./types.js";
import { evaluateEntryMetadataRequirements } from "../shared/entry-status.js";
import type { RequirementConfigCheck, Requirements } from "../shared/requirements.js";
import { CONFIG_DIR } from "../utils.js";
import { hasBinary, isConfigPathTruthy, resolveHookConfig } from "./config.js";
import type { HookEligibilityContext, HookEntry, HookInstallSpec } from "./types.js";
import { loadWorkspaceHookEntries } from "./workspace.js";
export type HookStatusConfigCheck = RequirementConfigCheck;

View File

@@ -5,13 +5,13 @@
import fs from "node:fs/promises";
import os from "node:os";
import path from "node:path";
import type { OpenClawConfig } from "../config/config.js";
import {
resolveDefaultAgentId,
resolveAgentWorkspaceDir,
resolveAgentDir,
} from "../agents/agent-scope.js";
import { runEmbeddedPiAgent } from "../agents/pi-embedded.js";
import type { OpenClawConfig } from "../config/config.js";
/**
* Generate a short 1-2 word filename slug from session content using LLM

View File

@@ -8,10 +8,10 @@
import path from "node:path";
import { pathToFileURL } from "node:url";
import type { OpenClawConfig } from "../config/config.js";
import type { InternalHookHandler } from "./internal-hooks.js";
import { createSubsystemLogger } from "../logging/subsystem.js";
import { resolveHookConfig } from "./config.js";
import { shouldIncludeHook } from "./config.js";
import type { InternalHookHandler } from "./internal-hooks.js";
import { registerInternalHook } from "./internal-hooks.js";
import { loadWorkspaceHookEntries } from "./workspace.js";

View File

@@ -1,9 +1,9 @@
import path from "node:path";
import { pathToFileURL } from "node:url";
import type { OpenClawPluginApi } from "../plugins/types.js";
import { shouldIncludeHook } from "./config.js";
import type { InternalHookHandler } from "./internal-hooks.js";
import type { HookEntry } from "./types.js";
import { shouldIncludeHook } from "./config.js";
import { loadHookEntriesFromDir } from "./workspace.js";
export type PluginHookLoadResult = {

View File

@@ -1,15 +1,7 @@
import fs from "node:fs";
import path from "node:path";
import type { OpenClawConfig } from "../config/config.js";
import type {
Hook,
HookEligibilityContext,
HookEntry,
HookSnapshot,
HookSource,
ParsedHookFrontmatter,
} from "./types.js";
import { MANIFEST_KEY } from "../compat/legacy-names.js";
import type { OpenClawConfig } from "../config/config.js";
import { CONFIG_DIR, resolveUserPath } from "../utils.js";
import { resolveBundledHooksDir } from "./bundled-dir.js";
import { shouldIncludeHook } from "./config.js";
@@ -18,6 +10,14 @@ import {
resolveOpenClawMetadata,
resolveHookInvocationPolicy,
} from "./frontmatter.js";
import type {
Hook,
HookEligibilityContext,
HookEntry,
HookSnapshot,
HookSource,
ParsedHookFrontmatter,
} from "./types.js";
type HookPackageManifest = {
name?: string;