docs: document package sources

This commit is contained in:
Peter Steinberger
2026-06-04 20:54:41 -04:00
parent b8d08f0cfd
commit 4df95d3c3f
270 changed files with 274 additions and 1 deletions

View File

@@ -1,3 +1,4 @@
// ACP Core helper module supports error format behavior.
const SECRET_PATTERNS: RegExp[] = [ const SECRET_PATTERNS: RegExp[] = [
/\b[A-Z0-9_]*(?:KEY|TOKEN|SECRET|PASSWORD|PASSWD|CARD[_-]?NUMBER|CARD[_-]?CVC|CARD[_-]?CVV|CVC|CVV|SECURITY[_-]?CODE|PAYMENT[_-]?CREDENTIAL|SHARED[_-]?PAYMENT[_-]?TOKEN)\b\s*[=:]\s*(["']?)([^\s"'\\]+)\1/g, /\b[A-Z0-9_]*(?:KEY|TOKEN|SECRET|PASSWORD|PASSWD|CARD[_-]?NUMBER|CARD[_-]?CVC|CARD[_-]?CVV|CVC|CVV|SECURITY[_-]?CODE|PAYMENT[_-]?CREDENTIAL|SHARED[_-]?PAYMENT[_-]?TOKEN)\b\s*[=:]\s*(["']?)([^\s"'\\]+)\1/g,
/\b[A-Z0-9_]*(?:KEY|TOKEN|SECRET|PASSWORD|PASSWD|CARD[_-]?NUMBER|CARD[_-]?CVC|CARD[_-]?CVV|CVC|CVV|SECURITY[_-]?CODE|PAYMENT[_-]?CREDENTIAL|SHARED[_-]?PAYMENT[_-]?TOKEN)\b\s*[=:]\s*\\+(["'])([^\s"'\\]+)\\+\1/g, /\b[A-Z0-9_]*(?:KEY|TOKEN|SECRET|PASSWORD|PASSWD|CARD[_-]?NUMBER|CARD[_-]?CVC|CARD[_-]?CVV|CVC|CVV|SECURITY[_-]?CODE|PAYMENT[_-]?CREDENTIAL|SHARED[_-]?PAYMENT[_-]?TOKEN)\b\s*[=:]\s*\\+(["'])([^\s"'\\]+)\\+\1/g,

View File

@@ -1,3 +1,4 @@
// ACP Core tests cover meta behavior.
import { describe, expect, it } from "vitest"; import { describe, expect, it } from "vitest";
import { readBool, readNonNegativeInteger, readNumber, readString } from "./meta.js"; import { readBool, readNonNegativeInteger, readNumber, readString } from "./meta.js";

View File

@@ -1,3 +1,4 @@
// ACP Core module implements meta behavior.
import { normalizeOptionalString } from "@openclaw/normalization-core/string-coerce"; import { normalizeOptionalString } from "@openclaw/normalization-core/string-coerce";
function readMetaValue<T>( function readMetaValue<T>(

View File

@@ -1,3 +1,4 @@
// ACP Core module implements numeric options behavior.
import { resolveIntegerOption as resolveSharedIntegerOption } from "@openclaw/normalization-core/number-coercion"; import { resolveIntegerOption as resolveSharedIntegerOption } from "@openclaw/normalization-core/number-coercion";
/** Resolves ACP integer options through the shared normalization contract. */ /** Resolves ACP integer options through the shared normalization contract. */

View File

@@ -1,3 +1,4 @@
// ACP Core tests cover error text behavior.
import { describe, expect, it } from "vitest"; import { describe, expect, it } from "vitest";
import { formatAcpRuntimeErrorText, toAcpRuntimeErrorText } from "./error-text.js"; import { formatAcpRuntimeErrorText, toAcpRuntimeErrorText } from "./error-text.js";
import { AcpRuntimeError, toAcpRuntimeError } from "./errors.js"; import { AcpRuntimeError, toAcpRuntimeError } from "./errors.js";

View File

@@ -1,3 +1,4 @@
// ACP Core module implements error text behavior.
import { type AcpRuntimeErrorCode, AcpRuntimeError, toAcpRuntimeError } from "./errors.js"; import { type AcpRuntimeErrorCode, AcpRuntimeError, toAcpRuntimeError } from "./errors.js";
function resolveAcpRuntimeErrorNextStep(error: AcpRuntimeError): string | undefined { function resolveAcpRuntimeErrorNextStep(error: AcpRuntimeError): string | undefined {

View File

@@ -1,3 +1,4 @@
// ACP Core tests cover errors behavior.
import { afterEach, describe, expect, it } from "vitest"; import { afterEach, describe, expect, it } from "vitest";
import { configureAcpErrorRedactor } from "../error-format.js"; import { configureAcpErrorRedactor } from "../error-format.js";
import { import {

View File

@@ -1,3 +1,4 @@
// ACP Core module implements errors behavior.
import { redactSensitiveText, stringifyNonErrorCause } from "../error-format.js"; import { redactSensitiveText, stringifyNonErrorCause } from "../error-format.js";
export const ACP_ERROR_CODES = [ export const ACP_ERROR_CODES = [

View File

@@ -1,3 +1,4 @@
// ACP Core tests cover session identifiers behavior.
import { describe, expect, it } from "vitest"; import { describe, expect, it } from "vitest";
import { import {
resolveAcpSessionCwd, resolveAcpSessionCwd,

View File

@@ -1,3 +1,4 @@
// ACP Core module implements session identifiers behavior.
import { normalizeLowercaseStringOrEmpty } from "@openclaw/normalization-core/string-coerce"; import { normalizeLowercaseStringOrEmpty } from "@openclaw/normalization-core/string-coerce";
import { normalizeText } from "../normalize-text.js"; import { normalizeText } from "../normalize-text.js";
import type { SessionAcpIdentity, SessionAcpMeta } from "../types.js"; import type { SessionAcpIdentity, SessionAcpMeta } from "../types.js";

View File

@@ -1,3 +1,4 @@
// ACP Core module implements session identity behavior.
import { normalizeText } from "../normalize-text.js"; import { normalizeText } from "../normalize-text.js";
import type { SessionAcpIdentity, SessionAcpIdentitySource, SessionAcpMeta } from "../types.js"; import type { SessionAcpIdentity, SessionAcpIdentitySource, SessionAcpMeta } from "../types.js";
import type { AcpRuntimeHandle, AcpRuntimeStatus } from "./types.js"; import type { AcpRuntimeHandle, AcpRuntimeStatus } from "./types.js";

View File

@@ -1,3 +1,4 @@
// ACP Core type module defines shared TypeScript contracts.
export type AcpRuntimePromptMode = "prompt" | "steer"; export type AcpRuntimePromptMode = "prompt" | "steer";
export type AcpRuntimeSessionMode = "persistent" | "oneshot"; export type AcpRuntimeSessionMode = "persistent" | "oneshot";

View File

@@ -1,3 +1,4 @@
// ACP Core tests cover session interaction mode behavior.
import { describe, expect, it } from "vitest"; import { describe, expect, it } from "vitest";
import { import {
isParentOwnedBackgroundAcpSession, isParentOwnedBackgroundAcpSession,

View File

@@ -1,3 +1,4 @@
// ACP Core module implements session interaction mode behavior.
import { normalizeOptionalString } from "@openclaw/normalization-core/string-coerce"; import { normalizeOptionalString } from "@openclaw/normalization-core/string-coerce";
type AcpSessionInteractionMode = "interactive" | "parent-owned-background"; type AcpSessionInteractionMode = "interactive" | "parent-owned-background";

View File

@@ -1,3 +1,4 @@
// ACP Core tests cover session lineage meta behavior.
import { describe, expect, it } from "vitest"; import { describe, expect, it } from "vitest";
import { toAcpSessionLineageMeta, type AcpSessionLineageRow } from "./session-lineage-meta.js"; import { toAcpSessionLineageMeta, type AcpSessionLineageRow } from "./session-lineage-meta.js";

View File

@@ -1,3 +1,4 @@
// ACP Core module implements session lineage meta behavior.
import { normalizeOptionalString } from "@openclaw/normalization-core/string-coerce"; import { normalizeOptionalString } from "@openclaw/normalization-core/string-coerce";
const SUBAGENT_ROLES = ["orchestrator", "leaf"] as const; const SUBAGENT_ROLES = ["orchestrator", "leaf"] as const;

View File

@@ -1,3 +1,4 @@
// ACP Core tests cover session behavior.
import { afterEach, beforeEach, describe, expect, it } from "vitest"; import { afterEach, beforeEach, describe, expect, it } from "vitest";
import { createInMemorySessionStore } from "./session.js"; import { createInMemorySessionStore } from "./session.js";

View File

@@ -1,3 +1,4 @@
// ACP Core module implements session behavior.
import { randomUUID } from "node:crypto"; import { randomUUID } from "node:crypto";
import { resolveIntegerOption } from "./numeric-options.js"; import { resolveIntegerOption } from "./numeric-options.js";
import type { AcpSession } from "./types.js"; import type { AcpSession } from "./types.js";

View File

@@ -1,3 +1,4 @@
// ACP Core type module defines shared TypeScript contracts.
import { normalizeOptionalLowercaseString } from "@openclaw/normalization-core/string-coerce"; import { normalizeOptionalLowercaseString } from "@openclaw/normalization-core/string-coerce";
const ACP_PROVENANCE_MODE_VALUES = ["off", "meta", "meta+receipt"] as const; const ACP_PROVENANCE_MODE_VALUES = ["off", "meta", "meta+receipt"] as const;

View File

@@ -1,3 +1,4 @@
// Agent Core tests cover agent loop behavior.
import { describe, expect, it } from "vitest"; import { describe, expect, it } from "vitest";
import { agentLoop, agentLoopContinue } from "./agent-loop.js"; import { agentLoop, agentLoopContinue } from "./agent-loop.js";
import type { Message, Model } from "./llm.js"; import type { Message, Model } from "./llm.js";

View File

@@ -1,3 +1,4 @@
// Agent Core module implements agent behavior.
import type { import type {
ImageContent, ImageContent,
Message, Message,

View File

@@ -1,3 +1,4 @@
// Agent Core module implements agent harness behavior.
import type { import type {
AssistantMessage, AssistantMessage,
ImageContent, ImageContent,

View File

@@ -1,3 +1,4 @@
// Agent Core module implements branch summarization behavior.
import type { Model, StreamFn } from "../../../../llm-core/src/index.js"; import type { Model, StreamFn } from "../../../../llm-core/src/index.js";
import { import {
type AgentCoreCompletionRuntimeDeps, type AgentCoreCompletionRuntimeDeps,

View File

@@ -1,3 +1,4 @@
// Agent Core module implements compaction behavior.
import type { import type {
AssistantMessage, AssistantMessage,
Context, Context,

View File

@@ -1,3 +1,4 @@
// Agent Core helper module supports utils behavior.
import type { Message } from "../../../../llm-core/src/index.js"; import type { Message } from "../../../../llm-core/src/index.js";
import type { AgentMessage } from "../../types.js"; import type { AgentMessage } from "../../types.js";

View File

@@ -1,3 +1,4 @@
// Agent Core module implements kill tree behavior.
import { spawn } from "node:child_process"; import { spawn } from "node:child_process";
const DEFAULT_GRACE_MS = 3000; const DEFAULT_GRACE_MS = 3000;

View File

@@ -1,3 +1,4 @@
// Agent Core tests cover nodejs behavior.
import { describe, expect, it } from "vitest"; import { describe, expect, it } from "vitest";
import { resolveExecTimeoutMs } from "./nodejs.js"; import { resolveExecTimeoutMs } from "./nodejs.js";

View File

@@ -1,3 +1,4 @@
// Agent Core module implements nodejs behavior.
import { spawn } from "node:child_process"; import { spawn } from "node:child_process";
import { randomUUID } from "node:crypto"; import { randomUUID } from "node:crypto";
import { constants, createReadStream } from "node:fs"; import { constants, createReadStream } from "node:fs";

View File

@@ -1,3 +1,4 @@
// Agent Core helper module supports file loader utils behavior.
import { parse } from "yaml"; import { parse } from "yaml";
import { type ExecutionEnv, type FileInfo, type Result, toError } from "./types.js"; import { type ExecutionEnv, type FileInfo, type Result, toError } from "./types.js";

View File

@@ -1,3 +1,4 @@
// Agent Core tests cover messages behavior.
import { describe, expect, it } from "vitest"; import { describe, expect, it } from "vitest";
import { convertToLlm, createCustomMessage } from "./messages.js"; import { convertToLlm, createCustomMessage } from "./messages.js";

View File

@@ -1,3 +1,4 @@
// Agent Core module implements messages behavior.
import type { ImageContent, Message, TextContent } from "../../../llm-core/src/index.js"; import type { ImageContent, Message, TextContent } from "../../../llm-core/src/index.js";
import type { import type {
AgentMessage, AgentMessage,

View File

@@ -1,3 +1,4 @@
// Agent Core tests cover prompt templates behavior.
import { describe, expect, it } from "vitest"; import { describe, expect, it } from "vitest";
import { parseCommandArgs, substituteArgs } from "./prompt-templates.js"; import { parseCommandArgs, substituteArgs } from "./prompt-templates.js";

View File

@@ -1,3 +1,4 @@
// Agent Core module implements prompt templates behavior.
import { import {
basenameEnvPath, basenameEnvPath,
parseFrontmatter, parseFrontmatter,

View File

@@ -1,3 +1,4 @@
// Agent Core module implements jsonl repo behavior.
import type { import type {
FileSystem, FileSystem,
JsonlSessionCreateOptions, JsonlSessionCreateOptions,

View File

@@ -1,3 +1,4 @@
// Agent Core tests cover jsonl storage behavior.
import { describe, expect, it } from "vitest"; import { describe, expect, it } from "vitest";
import { ok, type FileSystem } from "../types.js"; import { ok, type FileSystem } from "../types.js";
import { JsonlSessionStorage, loadJsonlSessionMetadata } from "./jsonl-storage.js"; import { JsonlSessionStorage, loadJsonlSessionMetadata } from "./jsonl-storage.js";

View File

@@ -1,3 +1,4 @@
// Agent Core module implements jsonl storage behavior.
import type { FileSystem, JsonlSessionMetadata, SessionTreeEntry } from "../types.js"; import type { FileSystem, JsonlSessionMetadata, SessionTreeEntry } from "../types.js";
import { SessionError, toError } from "../types.js"; import { SessionError, toError } from "../types.js";
import { getFileSystemResultOrThrow } from "./repo-utils.js"; import { getFileSystemResultOrThrow } from "./repo-utils.js";

View File

@@ -1,3 +1,4 @@
// Agent Core module implements memory repo behavior.
import { type Session, SessionError, type SessionMetadata, type SessionRepo } from "../types.js"; import { type Session, SessionError, type SessionMetadata, type SessionRepo } from "../types.js";
import { InMemorySessionStorage } from "./memory-storage.js"; import { InMemorySessionStorage } from "./memory-storage.js";
import { createSessionId, createTimestamp, getEntriesToFork, toSession } from "./repo-utils.js"; import { createSessionId, createTimestamp, getEntriesToFork, toSession } from "./repo-utils.js";

View File

@@ -1,3 +1,4 @@
// Agent Core tests cover memory storage behavior.
import { describe, expect, it } from "vitest"; import { describe, expect, it } from "vitest";
import type { SessionTreeEntry } from "../types.js"; import type { SessionTreeEntry } from "../types.js";
import { InMemorySessionStorage } from "./memory-storage.js"; import { InMemorySessionStorage } from "./memory-storage.js";

View File

@@ -1,3 +1,4 @@
// Agent Core module implements memory storage behavior.
import type { SessionMetadata, SessionTreeEntry } from "../types.js"; import type { SessionMetadata, SessionTreeEntry } from "../types.js";
import { BaseSessionStorage } from "./storage-base.js"; import { BaseSessionStorage } from "./storage-base.js";
import { uuidv7 } from "./uuid.js"; import { uuidv7 } from "./uuid.js";

View File

@@ -1,3 +1,4 @@
// Agent Core helper module supports repo utils behavior.
import { import {
type FileError, type FileError,
type Result, type Result,

View File

@@ -1,3 +1,4 @@
// Agent Core module implements session behavior.
import type { ImageContent, TextContent } from "../../../../llm-core/src/index.js"; import type { ImageContent, TextContent } from "../../../../llm-core/src/index.js";
import type { AgentMessage } from "../../types.js"; import type { AgentMessage } from "../../types.js";
import { import {

View File

@@ -1,3 +1,4 @@
// Agent Core module implements storage base behavior.
import { import {
type LeafEntry, type LeafEntry,
SessionError, SessionError,

View File

@@ -1,3 +1,4 @@
// Agent Core module implements uuid behavior.
let lastTimestamp = -Infinity; let lastTimestamp = -Infinity;
let sequence = 0; let sequence = 0;

View File

@@ -1,3 +1,4 @@
// Agent Core module implements skills behavior.
import ignore from "ignore"; import ignore from "ignore";
import { import {
basenameEnvPath, basenameEnvPath,

View File

@@ -1,3 +1,4 @@
// Agent Core module implements system prompt behavior.
import type { Skill } from "./types.js"; import type { Skill } from "./types.js";
/** Format model-visible skill metadata for inclusion in the harness system prompt. */ /** Format model-visible skill metadata for inclusion in the harness system prompt. */

View File

@@ -1,3 +1,4 @@
// Agent Core type module defines shared TypeScript contracts.
import type { import type {
ImageContent, ImageContent,
Model, Model,

View File

@@ -1,3 +1,4 @@
// Agent Core module implements shell output behavior.
import { import {
type ExecutionEnv, type ExecutionEnv,
type ExecutionEnvExecOptions, type ExecutionEnvExecOptions,

View File

@@ -1,3 +1,4 @@
// Agent Core tests cover truncate behavior.
import { describe, expect, it } from "vitest"; import { describe, expect, it } from "vitest";
import { truncateHead, truncateTail } from "./truncate.js"; import { truncateHead, truncateTail } from "./truncate.js";

View File

@@ -1,3 +1,4 @@
// Agent Core module implements truncate behavior.
export const DEFAULT_MAX_LINES = 2000; export const DEFAULT_MAX_LINES = 2000;
export const DEFAULT_MAX_BYTES = 50 * 1024; // 50KB export const DEFAULT_MAX_BYTES = 50 * 1024; // 50KB
export const GREP_MAX_LINE_LENGTH = 500; // Max chars per grep match line export const GREP_MAX_LINE_LENGTH = 500; // Max chars per grep match line

View File

@@ -1,3 +1,4 @@
// Agent Core module implements runtime deps behavior.
import type { CompleteSimpleFn, StreamFn } from "../../llm-core/src/index.js"; import type { CompleteSimpleFn, StreamFn } from "../../llm-core/src/index.js";
/** Runtime functions injected by host packages so agent-core stays provider-agnostic. */ /** Runtime functions injected by host packages so agent-core stays provider-agnostic. */

View File

@@ -1,3 +1,4 @@
// Agent Core type module defines shared TypeScript contracts.
import type { Static, TSchema } from "typebox"; import type { Static, TSchema } from "typebox";
import type { import type {
AssistantMessage, AssistantMessage,

View File

@@ -1,3 +1,4 @@
// Gateway Client module implements client behavior.
import { randomUUID } from "node:crypto"; import { randomUUID } from "node:crypto";
import type { import type {
ConnectParams, ConnectParams,

View File

@@ -1,3 +1,4 @@
// Gateway Client tests cover client.watchdog behavior.
import { createServer as createHttpsServer } from "node:https"; import { createServer as createHttpsServer } from "node:https";
import { createServer } from "node:net"; import { createServer } from "node:net";
import { afterEach, describe, expect, test, vi } from "vitest"; import { afterEach, describe, expect, test, vi } from "vitest";

View File

@@ -1,3 +1,4 @@
// Gateway Client module implements device auth behavior.
export function normalizeDeviceMetadataForAuth(value?: string | null): string { export function normalizeDeviceMetadataForAuth(value?: string | null): string {
if (typeof value !== "string") { if (typeof value !== "string") {
return ""; return "";

View File

@@ -1,3 +1,4 @@
// Gateway Client tests cover event loop ready behavior.
import { afterEach, describe, expect, it, vi } from "vitest"; import { afterEach, describe, expect, it, vi } from "vitest";
import { waitForEventLoopReady } from "./event-loop-ready.js"; import { waitForEventLoopReady } from "./event-loop-ready.js";
import { MAX_SAFE_TIMEOUT_DELAY_MS } from "./timeouts.js"; import { MAX_SAFE_TIMEOUT_DELAY_MS } from "./timeouts.js";

View File

@@ -1,3 +1,4 @@
// Gateway Client module implements event loop ready behavior.
import { resolveFiniteTimeoutDelayMs } from "./timeouts.js"; import { resolveFiniteTimeoutDelayMs } from "./timeouts.js";
/** Readiness probe outcome with timing data for diagnosing event-loop stalls. */ /** Readiness probe outcome with timing data for diagnosing event-loop stalls. */

View File

@@ -1,3 +1,4 @@
// Gateway Client module implements readiness behavior.
import type { GatewayClientOptions } from "./client.js"; import type { GatewayClientOptions } from "./client.js";
import { import {
waitForEventLoopReady, waitForEventLoopReady,

View File

@@ -1,3 +1,4 @@
// Gateway Client tests cover timeouts behavior.
import { describe, expect, it } from "vitest"; import { describe, expect, it } from "vitest";
import { import {
addSafeTimeoutDelayGraceMs, addSafeTimeoutDelayGraceMs,

View File

@@ -1,3 +1,4 @@
// Gateway Client module implements timeouts behavior.
function parseStrictPositiveInteger(value: string): number | undefined { function parseStrictPositiveInteger(value: string): number | undefined {
const trimmed = value.trim(); const trimmed = value.trim();
if (!/^\+?\d+$/u.test(trimmed)) { if (!/^\+?\d+$/u.test(trimmed)) {

View File

@@ -1,3 +1,4 @@
// Gateway Protocol tests cover channels.schema behavior.
import { Compile } from "typebox/compile"; import { Compile } from "typebox/compile";
import { describe, expect, it } from "vitest"; import { describe, expect, it } from "vitest";
import { ChannelsStatusResultSchema, WebLoginWaitParamsSchema } from "./schema/channels.js"; import { ChannelsStatusResultSchema, WebLoginWaitParamsSchema } from "./schema/channels.js";

View File

@@ -1,3 +1,4 @@
// Gateway Protocol tests cover connect error details behavior.
import { describe, expect, it } from "vitest"; import { describe, expect, it } from "vitest";
import { import {
buildPairingConnectCloseReason, buildPairingConnectCloseReason,

View File

@@ -1,3 +1,4 @@
// Gateway Protocol tests cover cron validators behavior.
import { describe, expect, it } from "vitest"; import { describe, expect, it } from "vitest";
import { import {
validateCronAddParams, validateCronAddParams,

View File

@@ -1,3 +1,4 @@
// Gateway Protocol tests cover exec approvals validators behavior.
import { describe, expect, it } from "vitest"; import { describe, expect, it } from "vitest";
import { import {
validateExecApprovalRequestParams, validateExecApprovalRequestParams,

View File

@@ -1,3 +1,4 @@
// Gateway Protocol tests cover index behavior.
import { describe, expect, it } from "vitest"; import { describe, expect, it } from "vitest";
import { TALK_TEST_PROVIDER_ID } from "../../../src/test-utils/talk-test-provider.js"; import { TALK_TEST_PROVIDER_ID } from "../../../src/test-utils/talk-test-provider.js";
import * as protocol from "./index.js"; import * as protocol from "./index.js";

View File

@@ -1,3 +1,4 @@
// Gateway Protocol tests cover native protocol levels.guard behavior.
import fs from "node:fs/promises"; import fs from "node:fs/promises";
import path from "node:path"; import path from "node:path";
import { describe, it } from "vitest"; import { describe, it } from "vitest";

View File

@@ -1,3 +1,4 @@
// Gateway Protocol tests cover primitives.secretref behavior.
import { Compile } from "typebox/compile"; import { Compile } from "typebox/compile";
import { describe, expect, it } from "vitest"; import { describe, expect, it } from "vitest";
import { import {

View File

@@ -1,3 +1,4 @@
// Gateway Protocol tests cover push behavior.
import { Compile } from "typebox/compile"; import { Compile } from "typebox/compile";
import { describe, expect, it } from "vitest"; import { describe, expect, it } from "vitest";
import { PushTestResultSchema } from "./schema/push.js"; import { PushTestResultSchema } from "./schema/push.js";

View File

@@ -1,3 +1,4 @@
// Gateway Protocol tests cover agent behavior.
import { Value } from "typebox/value"; import { Value } from "typebox/value";
import { describe, expect, it } from "vitest"; import { describe, expect, it } from "vitest";
import { AgentParamsSchema } from "./agent.js"; import { AgentParamsSchema } from "./agent.js";

View File

@@ -1,3 +1,4 @@
// Gateway Protocol schema module defines protocol validation shapes.
import { Type } from "typebox"; import { Type } from "typebox";
import { InputProvenanceSchema, NonEmptyString, SessionLabelString } from "./primitives.js"; import { InputProvenanceSchema, NonEmptyString, SessionLabelString } from "./primitives.js";

View File

@@ -1,3 +1,4 @@
// Gateway Protocol tests cover agents models skills behavior.
import { Value } from "typebox/value"; import { Value } from "typebox/value";
import { describe, expect, it } from "vitest"; import { describe, expect, it } from "vitest";
import { import {

View File

@@ -1,3 +1,4 @@
// Gateway Protocol schema module defines protocol validation shapes.
import { Type } from "typebox"; import { Type } from "typebox";
import { NonEmptyString } from "./primitives.js"; import { NonEmptyString } from "./primitives.js";

View File

@@ -1,3 +1,4 @@
// Gateway Protocol schema module defines protocol validation shapes.
import { Type } from "typebox"; import { Type } from "typebox";
import { NonEmptyString } from "./primitives.js"; import { NonEmptyString } from "./primitives.js";

View File

@@ -1,3 +1,4 @@
// Gateway Protocol schema module defines protocol validation shapes.
import { Type } from "typebox"; import { Type } from "typebox";
import { NonEmptyString, SecretInputSchema } from "./primitives.js"; import { NonEmptyString, SecretInputSchema } from "./primitives.js";

View File

@@ -1,3 +1,4 @@
// Gateway Protocol schema module defines protocol validation shapes.
import { Type } from "typebox"; import { Type } from "typebox";
import { NonEmptyString } from "./primitives.js"; import { NonEmptyString } from "./primitives.js";

View File

@@ -1,3 +1,4 @@
// Gateway Protocol schema module defines protocol validation shapes.
import { Type } from "typebox"; import { Type } from "typebox";
import { NonEmptyString } from "./primitives.js"; import { NonEmptyString } from "./primitives.js";

View File

@@ -1,3 +1,4 @@
// Gateway Protocol schema module defines protocol validation shapes.
import { Type, type TSchema } from "typebox"; import { Type, type TSchema } from "typebox";
import { NonEmptyString } from "./primitives.js"; import { NonEmptyString } from "./primitives.js";

View File

@@ -1,3 +1,4 @@
// Gateway Protocol schema module defines protocol validation shapes.
import { Type } from "typebox"; import { Type } from "typebox";
import { NonEmptyString } from "./primitives.js"; import { NonEmptyString } from "./primitives.js";

View File

@@ -1,3 +1,4 @@
// Gateway Protocol schema module defines protocol validation shapes.
import { Type } from "typebox"; import { Type } from "typebox";
import { NonEmptyString } from "./primitives.js"; import { NonEmptyString } from "./primitives.js";

View File

@@ -1,3 +1,4 @@
// Gateway Protocol schema module defines protocol validation shapes.
import type { ErrorShape } from "./types.js"; import type { ErrorShape } from "./types.js";
/** Gateway JSON-RPC style error codes shared by clients and server handlers. */ /** Gateway JSON-RPC style error codes shared by clients and server handlers. */

View File

@@ -1,3 +1,4 @@
// Gateway Protocol schema module defines protocol validation shapes.
import { Type } from "typebox"; import { Type } from "typebox";
import { NonEmptyString } from "./primitives.js"; import { NonEmptyString } from "./primitives.js";

View File

@@ -1,3 +1,4 @@
// Gateway Protocol schema module defines protocol validation shapes.
import { Type } from "typebox"; import { Type } from "typebox";
import { GatewayClientIdSchema, GatewayClientModeSchema, NonEmptyString } from "./primitives.js"; import { GatewayClientIdSchema, GatewayClientModeSchema, NonEmptyString } from "./primitives.js";
import { SnapshotSchema, StateVersionSchema } from "./snapshot.js"; import { SnapshotSchema, StateVersionSchema } from "./snapshot.js";

View File

@@ -1,3 +1,4 @@
// Gateway Protocol schema module defines protocol validation shapes.
import type { Static } from "typebox"; import type { Static } from "typebox";
import { Type } from "typebox"; import { Type } from "typebox";
import { ChatSendSessionKeyString, InputProvenanceSchema, NonEmptyString } from "./primitives.js"; import { ChatSendSessionKeyString, InputProvenanceSchema, NonEmptyString } from "./primitives.js";

View File

@@ -1,3 +1,4 @@
// Gateway Protocol schema module defines protocol validation shapes.
import { Type } from "typebox"; import { Type } from "typebox";
import { NonEmptyString } from "./primitives.js"; import { NonEmptyString } from "./primitives.js";

View File

@@ -1,3 +1,4 @@
// Gateway Protocol schema module defines protocol validation shapes.
import { Type } from "typebox"; import { Type } from "typebox";
import { NonEmptyString } from "./primitives.js"; import { NonEmptyString } from "./primitives.js";

View File

@@ -1,3 +1,4 @@
// Gateway Protocol schema module defines protocol validation shapes.
import { Type } from "typebox"; import { Type } from "typebox";
import { NonEmptyString } from "./primitives.js"; import { NonEmptyString } from "./primitives.js";

View File

@@ -1,3 +1,4 @@
// Gateway Protocol schema module defines protocol validation shapes.
import { Type } from "typebox"; import { Type } from "typebox";
import { GATEWAY_CLIENT_IDS, GATEWAY_CLIENT_MODES } from "../client-info.js"; import { GATEWAY_CLIENT_IDS, GATEWAY_CLIENT_MODES } from "../client-info.js";
import { import {

View File

@@ -1,3 +1,4 @@
// Gateway Protocol schema module defines protocol validation shapes.
import { Type } from "typebox"; import { Type } from "typebox";
import { NonEmptyString } from "./primitives.js"; import { NonEmptyString } from "./primitives.js";

View File

@@ -1,3 +1,4 @@
// Gateway Protocol schema module defines protocol validation shapes.
import { Type, type Static } from "typebox"; import { Type, type Static } from "typebox";
import { NonEmptyString } from "./primitives.js"; import { NonEmptyString } from "./primitives.js";

View File

@@ -1,3 +1,4 @@
// Gateway Protocol schema module defines protocol validation shapes.
import { Type } from "typebox"; import { Type } from "typebox";
import { PluginJsonValueSchema } from "./plugins.js"; import { PluginJsonValueSchema } from "./plugins.js";
import { NonEmptyString, SessionLabelString } from "./primitives.js"; import { NonEmptyString, SessionLabelString } from "./primitives.js";

View File

@@ -1,3 +1,4 @@
// Gateway Protocol schema module defines protocol validation shapes.
import { Type } from "typebox"; import { Type } from "typebox";
import { NonEmptyString } from "./primitives.js"; import { NonEmptyString } from "./primitives.js";

View File

@@ -1,3 +1,4 @@
// Gateway Protocol schema module defines protocol validation shapes.
import { Type } from "typebox"; import { Type } from "typebox";
import { NonEmptyString } from "./primitives.js"; import { NonEmptyString } from "./primitives.js";

View File

@@ -1,3 +1,4 @@
// Gateway Protocol schema module defines protocol validation shapes.
import { Type } from "typebox"; import { Type } from "typebox";
import { NonEmptyString } from "./primitives.js"; import { NonEmptyString } from "./primitives.js";

View File

@@ -1,3 +1,4 @@
// Gateway Protocol tests cover talk config.contract behavior.
import fs from "node:fs"; import fs from "node:fs";
import { describe, expect, it } from "vitest"; import { describe, expect, it } from "vitest";
import { buildTalkConfigResponse } from "../../../src/config/talk.js"; import { buildTalkConfigResponse } from "../../../src/config/talk.js";

View File

@@ -1,3 +1,4 @@
// LLM Core type module defines shared TypeScript contracts.
export type { AssistantMessageDiagnostic, DiagnosticErrorInfo } from "./utils/diagnostics.js"; export type { AssistantMessageDiagnostic, DiagnosticErrorInfo } from "./utils/diagnostics.js";
import type { AssistantMessageDiagnostic } from "./utils/diagnostics.js"; import type { AssistantMessageDiagnostic } from "./utils/diagnostics.js";

View File

@@ -1,3 +1,4 @@
// LLM Core module implements diagnostics behavior.
export interface DiagnosticErrorInfo { export interface DiagnosticErrorInfo {
name?: string; name?: string;
message: string; message: string;

View File

@@ -1,3 +1,4 @@
// LLM Core module implements event stream behavior.
import type { import type {
AssistantMessage, AssistantMessage,
AssistantMessageEvent, AssistantMessageEvent,

View File

@@ -1,3 +1,4 @@
// LLM Core tests cover validation behavior.
import { describe, expect, it } from "vitest"; import { describe, expect, it } from "vitest";
import type { Tool } from "./types.js"; import type { Tool } from "./types.js";
import { validateToolArguments } from "./validation.js"; import { validateToolArguments } from "./validation.js";

View File

@@ -1,3 +1,4 @@
// LLM Core module implements validation behavior.
import { Compile } from "typebox/compile"; import { Compile } from "typebox/compile";
import type { TLocalizedValidationError } from "typebox/error"; import type { TLocalizedValidationError } from "typebox/error";
import { Value } from "typebox/value"; import { Value } from "typebox/value";

View File

@@ -1,3 +1,4 @@
// LLM Runtime tests cover api registry behavior.
import { createAssistantMessageEventStream, type Model } from "@openclaw/llm-core"; import { createAssistantMessageEventStream, type Model } from "@openclaw/llm-core";
import { afterEach, describe, expect, it } from "vitest"; import { afterEach, describe, expect, it } from "vitest";
import { getApiProvider, registerApiProvider, unregisterApiProviders } from "./api-registry.js"; import { getApiProvider, registerApiProvider, unregisterApiProviders } from "./api-registry.js";

View File

@@ -1,3 +1,4 @@
// LLM Runtime module implements api registry behavior.
import type { import type {
Api, Api,
AssistantMessageEventStreamContract, AssistantMessageEventStreamContract,

Some files were not shown because too many files have changed in this diff Show More