Mod Types and Constants (mods/types.ts)

qwen-code · packages/core/src/mods/types.ts · typescript · Apache-2.0
ai, dev-tools, lang:typescript, tag:mods, tag:plugins, tag:configuration, tag:constants

Defines shared TypeScript types, limits, and configuration contracts for Qwen Code mods, including sources, dependencies, options, and tool dialects. Reuse when building mod or plugin integrations.

// Source: https://github.com/QwenLM/qwen-code | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
/**
 * @license
 * Copyright 2026 Qwen Team
 * SPDX-License-Identifier: Apache-2.0
 */

import type {
  ModToolCallInput,
  ModToolCheckInput,
  ModToolCheckResult,
  ModToolResult,
} from './tool-events.js';

export const MOD_MAX_BYTES = 262_144;
export const MOD_TIMEOUT_MS = 10_000;
export const MOD_END_TIMEOUT_MS = 1_500;

export interface ModSource {
  root: string;
  entry: string;
  source: string;
}

export type ModOption = string | number | boolean | string[];
export type ModOptions = Record<string, ModOption>;
export type ModToolDialect = 'native' | 'claude';
export type ModPlug

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key