Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
5b5c454
feat(workflow): add agentGenerated input type for tool parameters
FinleyGe Jun 12, 2026
0963471
fix(workflow): surface agent generated tool params
FinleyGe Jun 18, 2026
f4d187b
feat(workflow): align agent generated tool input UI
FinleyGe Jun 30, 2026
3b30cf0
refactor: simplify plugin runtime and cleanup workflow logic
FinleyGe Jul 7, 2026
c417d17
feat(workflow): introduce isToolParam to define agent-generated inputs
FinleyGe Jul 8, 2026
acabf98
fix(workflow): honor selected render type index
FinleyGe Jul 8, 2026
a6fe3aa
Restrict agent tool params to selected generated fields
FinleyGe Jul 9, 2026
e6cccd7
Persist selected tool input type in workflow detail
FinleyGe Jul 9, 2026
414c35d
fix(formEdit): preserve saved input type when initializing defaults
FinleyGe Jul 9, 2026
1996019
fix(workflow): avoid materializing unset selectedType
FinleyGe Jul 9, 2026
a281de3
refactor(formEdit): improve tool input selection
FinleyGe Jul 13, 2026
4b14f10
refactor(formEdit): drop default tool input mode
FinleyGe Jul 14, 2026
68559da
fix(form): normalize reference-only tool inputs to agent generated
FinleyGe Jul 15, 2026
1c08971
feat(global): preserve workflow tool node metadata in json schema
FinleyGe Jul 15, 2026
08566ef
refactor(config-tool-modal): unify input and output sections with shared
FinleyGe Jul 16, 2026
77d4577
fix(formEdit): default user chat inputs to agent generated in tools
FinleyGe Jul 16, 2026
49a0b12
fix(tool): align runtime schemas with legacy tool inputs
FinleyGe Jul 17, 2026
6629f43
fix(jsonschema): preserve open union types and secret config state
FinleyGe Jul 17, 2026
e946004
refactor: improve application workflows and supporting modules
FinleyGe Jul 21, 2026
6f92e0a
fix(form-edit): preserve textarea render type selection
FinleyGe Jul 21, 2026
f384817
fix(workflow-tool): preserve hidden inputs and normalize legacy defaults
FinleyGe Jul 23, 2026
9bb4f0a
fix(workflow): migrate legacy tool descriptions to AI inputs
FinleyGe Jul 23, 2026
c4ff366
fix(workflow): scope legacy tool input migration to supported tools
FinleyGe Jul 24, 2026
629f659
fix(workflow): restore legacy workflow tool input types at runtime
FinleyGe Jul 24, 2026
6a6f669
fix(app): preserve legacy tool input compatibility
FinleyGe Jul 24, 2026
9020f2e
fix(workflow): restrict legacy tool description fallback
FinleyGe Jul 24, 2026
8657fd0
feat(agent): persist tool input modes independently
FinleyGe Jul 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/global/core/ai/skill/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,8 @@ export enum AgentSkillTypeEnum {
folder = 'folder',
skill = 'skill'
}

export enum AgentToolInputModeEnum {
agentGenerated = 'agentGenerated',
manual = 'manual'
}
38 changes: 37 additions & 1 deletion packages/global/core/ai/skill/type.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import z from 'zod';
import { NodeToolConfigTypeSchema } from '../../workflow/type/node';
import { FlowNodeInputTypeEnum } from '../../workflow/node/constant';
import {
AgentSkillSourceEnum,
AgentSkillCategoryEnum,
AgentSkillTypeEnum,
AgentSkillCreationStatusEnum
AgentSkillCreationStatusEnum,
AgentToolInputModeEnum
} from './constants';
import { SandboxStatusEnum, SandboxTypeEnum } from '../sandbox/constants';
import { SandboxImageConfigSchema } from '../sandbox/type';
Expand Down Expand Up @@ -174,10 +176,44 @@ export const SandboxInstanceSchema = z.object({
});
export type SandboxInstanceSchemaType = z.infer<typeof SandboxInstanceSchema>;

const AgentToolInputConfigValueSchema = z.object({
key: z.string(),
mode: z.enum(AgentToolInputModeEnum)
});

/**
* Agent 工具只持久化参数输入来源。预处理兼容 selectedType 上线期间产生的临时快照,
* 解析结果始终收敛为 key + mode,避免 runtime 继续依赖工作流渲染协议。
*/
export const AgentToolInputConfigSchema = z.preprocess((value) => {
if (!value || typeof value !== 'object') return value;

const input = value as Record<string, unknown>;
if (input.mode !== undefined) return value;
if (typeof input.key !== 'string') return value;

const renderTypeList = Array.isArray(input.renderTypeList) ? input.renderTypeList : [];
const selectedType =
input.selectedType ??
(typeof input.selectedTypeIndex === 'number'
? renderTypeList[input.selectedTypeIndex]
: undefined);

return {
key: input.key,
mode:
selectedType === FlowNodeInputTypeEnum.agentGenerated
? AgentToolInputModeEnum.agentGenerated
: AgentToolInputModeEnum.manual
};
}, AgentToolInputConfigValueSchema);
export type AgentToolInputConfigType = z.infer<typeof AgentToolInputConfigSchema>;

export const SkillToolSchema = z.object({
id: z.string(),
source: z.string().optional(),
toolConfig: NodeToolConfigTypeSchema.optional(),
inputs: z.array(AgentToolInputConfigSchema).optional(),
config: z.record(z.string(), z.any())
});
export type SkillToolType = z.infer<typeof SkillToolSchema>;
Loading
Loading