diff --git a/src/cli/commands/create/command.tsx b/src/cli/commands/create/command.tsx index 646c3e572..78e566779 100644 --- a/src/cli/commands/create/command.tsx +++ b/src/cli/commands/create/command.tsx @@ -17,7 +17,7 @@ import { AgentFramework, AgentLanguage, AgentProtocol, - AgentType, + AgentSource, MemoryType, ModelProvider as ModelProviderEnum, NetworkMode as NetworkModeEnum, @@ -251,7 +251,7 @@ async function handleCreateCLI(options: CreateOptions): Promise { memory_type: standardize(MemoryType, options.memory ?? 'none'), agent_protocol: standardize(AgentProtocol, options.protocol ?? 'http'), build_type: standardize(TelemetryBuildType, options.build ?? 'codezip'), - agent_type: standardize(AgentType, options.type ?? 'create'), + agent_source: standardize(AgentSource, options.type ?? 'create'), network_mode: standardize(NetworkModeEnum, options.networkMode ?? 'public'), has_agent: options.agent !== false, }; diff --git a/src/cli/primitives/AgentPrimitive.tsx b/src/cli/primitives/AgentPrimitive.tsx index d6927f85e..f6b987428 100644 --- a/src/cli/primitives/AgentPrimitive.tsx +++ b/src/cli/primitives/AgentPrimitive.tsx @@ -52,7 +52,7 @@ import { AgentFramework, AgentLanguage, AgentProtocol, - AgentType, + AgentSource, AuthorizerType, MemoryType, ModelProvider as ModelProviderEnum, @@ -368,7 +368,7 @@ export class AgentPrimitive extends BasePrimitive { memory_type: 'shortterm', agent_protocol: 'mcp', build_type: 'codezip', - agent_type: 'create', + agent_source: 'create', network_mode: 'public', has_agent: true, }, @@ -118,7 +118,7 @@ describe('withCommandRunTelemetry', () => { memory_type: 'none', agent_protocol: 'http', build_type: 'codezip', - agent_type: 'create', + agent_source: 'create', network_mode: 'public', has_agent: true, }, diff --git a/src/cli/telemetry/schemas/__tests__/command-run.test.ts b/src/cli/telemetry/schemas/__tests__/command-run.test.ts index 561899d7e..65b42c74b 100644 --- a/src/cli/telemetry/schemas/__tests__/command-run.test.ts +++ b/src/cli/telemetry/schemas/__tests__/command-run.test.ts @@ -94,7 +94,7 @@ describe('COMMAND_SCHEMAS', () => { memory_type: 'shortterm', agent_protocol: 'mcp', build_type: 'codezip', - agent_type: 'create', + agent_source: 'create', network_mode: 'public', has_agent: true, }; @@ -110,7 +110,7 @@ describe('COMMAND_SCHEMAS', () => { memory_type: 'shortterm', agent_protocol: 'mcp', build_type: 'codezip', - agent_type: 'create', + agent_source: 'create', network_mode: 'public', has_agent: true, }) @@ -246,7 +246,7 @@ describe('resilientParse', () => { memory_type: 'shortterm', agent_protocol: 'mcp', build_type: 'codezip', - agent_type: 'create', + agent_source: 'create', network_mode: 'public', has_agent: true, }; @@ -261,7 +261,7 @@ describe('resilientParse', () => { memory_type: 'shortterm', agent_protocol: 'mcp', build_type: 'codezip', - agent_type: 'create', + agent_source: 'create', network_mode: 'public', has_agent: true, }; diff --git a/src/cli/telemetry/schemas/command-run.ts b/src/cli/telemetry/schemas/command-run.ts index 631fccb11..4bb25bd3a 100644 --- a/src/cli/telemetry/schemas/command-run.ts +++ b/src/cli/telemetry/schemas/command-run.ts @@ -2,7 +2,7 @@ import { AgentFramework, AgentLanguage, AgentProtocol, - AgentType, + AgentSource, AttachMode, AuthType, AuthorizerType, @@ -39,7 +39,7 @@ const CreateAttrs = safeSchema({ memory_type: MemoryType, agent_protocol: AgentProtocol, build_type: BuildType, - agent_type: AgentType, + agent_source: AgentSource, network_mode: NetworkMode, has_agent: z.boolean(), }); @@ -48,7 +48,7 @@ const AddAgentAttrs = safeSchema({ agent_language: AgentLanguage, agent_framework: AgentFramework, model_provider: ModelProvider, - agent_type: AgentType, + agent_source: AgentSource, build_type: BuildType, agent_protocol: AgentProtocol, network_mode: NetworkMode, diff --git a/src/cli/telemetry/schemas/common-shapes.ts b/src/cli/telemetry/schemas/common-shapes.ts index 552abfd5d..61adfe0e3 100644 --- a/src/cli/telemetry/schemas/common-shapes.ts +++ b/src/cli/telemetry/schemas/common-shapes.ts @@ -46,7 +46,7 @@ export const Count = z.number().int().nonnegative(); export const DevAction = z.enum(['server', 'invoke', 'exec']); export const UiMode = z.enum(['browser', 'terminal']); -export const AgentType = z.enum(['create', 'byo', 'import']); +export const AgentSource = z.enum(['create', 'byo', 'import']); export const AttachMode = z.enum(['log_only', 'enforce']); export const AuthType = z.enum(['sigv4', 'bearer_token']); export const AuthorizerType = z.enum(['aws_iam', 'custom_jwt', 'none']); @@ -153,7 +153,7 @@ export type DeployMode = z.infer; */ export const ATTRIBUTES = { dev_action: DevAction, - agent_type: AgentType, + agent_source: AgentSource, attach_gateway_count: Count, attach_mode: AttachMode, auth_type: AuthType, diff --git a/src/cli/tui/screens/agent/useAddAgent.ts b/src/cli/tui/screens/agent/useAddAgent.ts index 80b63af26..f72475e03 100644 --- a/src/cli/tui/screens/agent/useAddAgent.ts +++ b/src/cli/tui/screens/agent/useAddAgent.ts @@ -25,7 +25,7 @@ import { AgentFramework, AgentLanguage, AgentProtocol, - AgentType as AgentTypeEnum, + AgentSource, AuthorizerType as AuthorizerTypeEnum, BuildType, MemoryType as MemoryEnum, @@ -163,7 +163,7 @@ export function useAddAgent() { agent_language: standardize(AgentLanguage, config.language), agent_framework: standardize(AgentFramework, config.framework), model_provider: standardize(ModelProvider, config.modelProvider), - agent_type: standardize(AgentTypeEnum, config.agentType), + agent_source: standardize(AgentSource, config.agentType), build_type: standardize(BuildType, config.buildType), agent_protocol: standardize(AgentProtocol, config.protocol ?? 'HTTP'), network_mode: standardize(NetworkMode, config.networkMode ?? 'PUBLIC'), diff --git a/src/cli/tui/screens/create/useCreateFlow.ts b/src/cli/tui/screens/create/useCreateFlow.ts index 3c5386476..645bcc095 100644 --- a/src/cli/tui/screens/create/useCreateFlow.ts +++ b/src/cli/tui/screens/create/useCreateFlow.ts @@ -29,7 +29,7 @@ import { AgentFramework, AgentLanguage, AgentProtocol, - AgentType, + AgentSource, BuildType, MemoryType as MemoryEnum, ModelProvider, @@ -266,7 +266,7 @@ export function useCreateFlow(cwd: string): CreateFlowState { memory_type: standardize(MemoryEnum, addAgentConfig?.memory ?? 'none'), agent_protocol: standardize(AgentProtocol, addAgentConfig?.protocol ?? 'HTTP'), build_type: standardize(BuildType, addAgentConfig?.buildType ?? 'CodeZip'), - agent_type: standardize(AgentType, addAgentConfig?.agentType ?? 'create'), + agent_source: standardize(AgentSource, addAgentConfig?.agentType ?? 'create'), network_mode: standardize(NetworkMode, addAgentConfig?.networkMode ?? 'PUBLIC'), has_agent: addAgentConfig !== null, };