Files
UHD_Media_Tool/packages/agent/src/index.ts
T
rootandClaude Opus 5.5 0508f3418f feat(agent): require Chinese thinking and reports in subagent prompts (AG-4)
Subagent / vision subflow prompts (audience=agent) get a dedicated section:
report goes to the parent session, and thinking, step notes and reports stay
in Chinese even when the goal, tool results or web pages are in English.
Prompt regression test covers both the shared hard rule and the new section.

Child reports reaching the user are already humanized: the child session page
uses the same FIX-7 report-humanize path, and the parent's final report resolves
child run IDs to their goal titles; agent.spawn/await tool rows show no raw summary.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-30 17:58:08 +08:00

72 lines
2.0 KiB
TypeScript

// @umt/agent 公开入口。Pi SDK 类型只出现在 src/pi/*,这里只导出本包自有接口。
export const PACKAGE_NAME = "@umt/agent";
export { CapabilityError, type CapabilityErrorCode, isCapabilityError } from "./capability/errors.ts";
export {
CapabilityRegistry,
type CapabilityRegistryOptions,
defaultIdempotencyKey,
type RegisteredCapability,
stableStringify,
} from "./capability/registry.ts";
export { capabilityIdToToolName, isCapabilityId, toolNameToCapabilityId } from "./capability/tool-name.ts";
export * from "./capability/types.ts";
export {
ENV_FIELDS,
OAUTH_CALLBACK_PORTS,
OAUTH_MODES,
PI_AI_VERSION,
providerCatalog,
providerInfo,
} from "./pi/catalog.ts";
export {
type CreateFakeRuntimeOptions,
createFakeRuntime,
FAKE_AGENT_SETTINGS,
FakeModelProvider,
type FakeModelProviderOptions,
type FakeScript,
type FakeStep,
type FakeToolCall,
type FakeToolResult,
} from "./pi/fake.ts";
export { DEFAULT_FAKE_OAUTH, FakeOAuthControl } from "./pi/fake-upstream.ts";
export {
checkToolCall,
DEFAULT_COMPACTION_INSTRUCTIONS,
PiAgentRuntime,
type PiAgentRuntimeOptions,
toolContent,
} from "./pi/runtime.ts";
export { sessionPathFor } from "./pi/session.ts";
export {
classifyUpstreamError,
PiUpstreamClient,
type UpstreamAuthEvent,
type UpstreamAuthPrompt,
type UpstreamClientOptions,
type UpstreamCredential,
type UpstreamCredentialStore,
UpstreamError,
type UpstreamLoginInteraction,
type UpstreamSpec,
} from "./pi/upstream.ts";
export { isSensitiveKey, REDACTED, redactForModel, redactString, summarizeForLog } from "./redact.ts";
export * from "./runtime/port.ts";
export {
type AgentSettings,
AgentSettingsSchema,
type AgentThinkingLevel,
describeSettings,
type ResolvedAgentSettings,
resolveAgentSettings,
THINKING_LEVELS,
} from "./settings.ts";
export {
AGENT_AUDIENCE,
buildSystemPrompt,
interactionRules,
REPORT_FORMAT,
type SystemPromptInput,
} from "./system-prompt.ts";