feat: add tag support to createAgent (#37)

This commit is contained in:
Christina Tong
2026-02-13 20:11:30 -08:00
committed by GitHub
parent 12b1050953
commit 9dbcb70186
2 changed files with 16 additions and 5 deletions

View File

@@ -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;
}

View File

@@ -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[];
}
// ═══════════════════════════════════════════════════════════════