feat: add tag support to createAgent (#37)
This commit is contained in:
@@ -362,6 +362,11 @@ export class SubprocessTransport {
|
||||
args.push("--disallowedTools", this.options.disallowedTools.join(","));
|
||||
}
|
||||
|
||||
// Tags
|
||||
if (this.options.tags && this.options.tags.length > 0) {
|
||||
args.push("--tags", this.options.tags.join(","));
|
||||
}
|
||||
|
||||
return args;
|
||||
}
|
||||
|
||||
|
||||
16
src/types.ts
16
src/types.ts
@@ -148,16 +148,16 @@ export type AgentToolUpdateCallback<T> = (update: Partial<AgentToolResult<T>>) =
|
||||
export interface AgentTool<TParams, TResult> {
|
||||
/** Display label */
|
||||
label: string;
|
||||
|
||||
|
||||
/** Tool name (used in API calls) */
|
||||
name: string;
|
||||
|
||||
|
||||
/** Description shown to the model */
|
||||
description: string;
|
||||
|
||||
|
||||
/** JSON Schema for parameters (TypeBox or plain object) */
|
||||
parameters: TParams;
|
||||
|
||||
|
||||
/** Execution function */
|
||||
execute: (
|
||||
toolCallId: string,
|
||||
@@ -202,12 +202,15 @@ export interface InternalSessionOptions {
|
||||
model?: string;
|
||||
embedding?: string;
|
||||
systemPrompt?: SystemPromptConfig;
|
||||
|
||||
|
||||
// Memory blocks (only for new agents)
|
||||
memory?: MemoryItem[];
|
||||
persona?: string; // Convenience for persona block
|
||||
human?: string; // Convenience for human block
|
||||
|
||||
// Tags (only for new agents)
|
||||
tags?: string[];
|
||||
|
||||
// Permissions
|
||||
allowedTools?: string[];
|
||||
disallowedTools?: string[];
|
||||
@@ -312,6 +315,9 @@ export interface CreateAgentOptions {
|
||||
* These tools are registered with the CLI and executed when the LLM calls them.
|
||||
*/
|
||||
tools?: AnyAgentTool[];
|
||||
|
||||
/** Tags to organize and categorize the agent */
|
||||
tags?: string[];
|
||||
}
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════
|
||||
|
||||
Reference in New Issue
Block a user