@tbox.cn/app-agent-sdk-server 0.3.2 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ import{z as e}from"zod";var n=e.object({enableImageUpload:e.boolean().default(!0),enableVideoUpload:e.boolean().default(!0),enableTTS:e.boolean().default(!0),enableVoiceInput:e.boolean().default(!0),defaultInputMode:e.enum(["TEXT","VOICE"]).default("TEXT"),quickCommands:e.array(e.object({label:e.string().describe("展示文案"),query:e.string().describe("点击后发送给智能体的用户消息")}).passthrough()).default([])}),l=e.strictObject({instructions:e.array(e.string()).min(1).describe("必填;逐行拼接的业务提示词,拼接后不得全为空白;不替代平台规则"),memoryInstructions:e.array(e.string()).min(1).optional().describe("装配长期记忆时追加的业务提示词;在场时拼接后不得全为空白")}),t=e.union([e.boolean(),e.literal("auto"),e.record(e.string(),e.unknown())]),o=e.union([e.boolean(),e.literal("auto")]),r=e.object({modelName:e.string().min(1).optional().describe("模型路由名;缺席时使用 APP_AI_MODEL_NAME"),thinking:t.optional().describe("true/false 控制思考;auto 不注入;对象作为网关兼容请求字段,禁止凭证"),parallelToolCalls:o.optional().describe("true/false 控制并行工具调用;auto 使用网关默认"),contentTagHygiene:e.object({off:e.array(e.enum(["think","tool-call-text"])).optional(),extraTags:e.array(e.object({name:e.string().regex(/^[a-zA-Z][a-zA-Z0-9_-]{0,31}$/),family:e.enum(["think","tool-call-text"])})).max(16).optional()}).optional()});export{n as a,l as b,t as c,o as d,r as e};
@@ -0,0 +1,108 @@
1
+ import { z } from 'zod';
2
+
3
+ /** Pure configuration contracts: no filesystem, logger or agent/runtime initialization. */
4
+
5
+ declare const chatConfigSchema: z.ZodObject<{
6
+ enableImageUpload: z.ZodDefault<z.ZodBoolean>;
7
+ enableVideoUpload: z.ZodDefault<z.ZodBoolean>;
8
+ enableTTS: z.ZodDefault<z.ZodBoolean>;
9
+ enableVoiceInput: z.ZodDefault<z.ZodBoolean>;
10
+ defaultInputMode: z.ZodDefault<z.ZodEnum<["TEXT", "VOICE"]>>;
11
+ quickCommands: z.ZodDefault<z.ZodArray<z.ZodObject<{
12
+ label: z.ZodString;
13
+ query: z.ZodString;
14
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
15
+ label: z.ZodString;
16
+ query: z.ZodString;
17
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
18
+ label: z.ZodString;
19
+ query: z.ZodString;
20
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
21
+ }, "strip", z.ZodTypeAny, {
22
+ enableImageUpload: boolean;
23
+ enableVideoUpload: boolean;
24
+ enableTTS: boolean;
25
+ enableVoiceInput: boolean;
26
+ defaultInputMode: "TEXT" | "VOICE";
27
+ quickCommands: z.objectOutputType<{
28
+ label: z.ZodString;
29
+ query: z.ZodString;
30
+ }, z.ZodTypeAny, "passthrough">[];
31
+ }, {
32
+ enableImageUpload?: boolean | undefined;
33
+ enableVideoUpload?: boolean | undefined;
34
+ enableTTS?: boolean | undefined;
35
+ enableVoiceInput?: boolean | undefined;
36
+ defaultInputMode?: "TEXT" | "VOICE" | undefined;
37
+ quickCommands?: z.objectInputType<{
38
+ label: z.ZodString;
39
+ query: z.ZodString;
40
+ }, z.ZodTypeAny, "passthrough">[] | undefined;
41
+ }>;
42
+ declare const agentPromptFileSchema: z.ZodObject<{
43
+ instructions: z.ZodArray<z.ZodString, "many">;
44
+ memoryInstructions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
45
+ }, "strict", z.ZodTypeAny, {
46
+ instructions: string[];
47
+ memoryInstructions?: string[] | undefined;
48
+ }, {
49
+ instructions: string[];
50
+ memoryInstructions?: string[] | undefined;
51
+ }>;
52
+ declare const thinkingSchema: z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"auto">, z.ZodRecord<z.ZodString, z.ZodUnknown>]>;
53
+ declare const parallelSchema: z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"auto">]>;
54
+ /** Discovery schema shares field validators with the fail-soft loader; individual invalid fields are ignored at runtime. */
55
+ declare const llmProviderFileSchema: z.ZodObject<{
56
+ modelName: z.ZodOptional<z.ZodString>;
57
+ thinking: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"auto">, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
58
+ parallelToolCalls: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"auto">]>>;
59
+ contentTagHygiene: z.ZodOptional<z.ZodObject<{
60
+ off: z.ZodOptional<z.ZodArray<z.ZodEnum<["think", "tool-call-text"]>, "many">>;
61
+ extraTags: z.ZodOptional<z.ZodArray<z.ZodObject<{
62
+ name: z.ZodString;
63
+ family: z.ZodEnum<["think", "tool-call-text"]>;
64
+ }, "strip", z.ZodTypeAny, {
65
+ name: string;
66
+ family: "think" | "tool-call-text";
67
+ }, {
68
+ name: string;
69
+ family: "think" | "tool-call-text";
70
+ }>, "many">>;
71
+ }, "strip", z.ZodTypeAny, {
72
+ off?: ("think" | "tool-call-text")[] | undefined;
73
+ extraTags?: {
74
+ name: string;
75
+ family: "think" | "tool-call-text";
76
+ }[] | undefined;
77
+ }, {
78
+ off?: ("think" | "tool-call-text")[] | undefined;
79
+ extraTags?: {
80
+ name: string;
81
+ family: "think" | "tool-call-text";
82
+ }[] | undefined;
83
+ }>>;
84
+ }, "strip", z.ZodTypeAny, {
85
+ modelName?: string | undefined;
86
+ thinking?: boolean | "auto" | Record<string, unknown> | undefined;
87
+ parallelToolCalls?: boolean | "auto" | undefined;
88
+ contentTagHygiene?: {
89
+ off?: ("think" | "tool-call-text")[] | undefined;
90
+ extraTags?: {
91
+ name: string;
92
+ family: "think" | "tool-call-text";
93
+ }[] | undefined;
94
+ } | undefined;
95
+ }, {
96
+ modelName?: string | undefined;
97
+ thinking?: boolean | "auto" | Record<string, unknown> | undefined;
98
+ parallelToolCalls?: boolean | "auto" | undefined;
99
+ contentTagHygiene?: {
100
+ off?: ("think" | "tool-call-text")[] | undefined;
101
+ extraTags?: {
102
+ name: string;
103
+ family: "think" | "tool-call-text";
104
+ }[] | undefined;
105
+ } | undefined;
106
+ }>;
107
+
108
+ export { agentPromptFileSchema, chatConfigSchema, llmProviderFileSchema, parallelSchema, thinkingSchema };
package/dist/config.js ADDED
@@ -0,0 +1 @@
1
+ import{a,b,c,d,e}from"./chunk-2M4P57DG.js";export{b as agentPromptFileSchema,a as chatConfigSchema,e as llmProviderFileSchema,d as parallelSchema,c as thinkingSchema};