Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 | import type { NewKnowledgeInput as KnowledgeSourceInput } from "@/objects/KnowledgeSetup";
import { Knowledge, KnowledgeCategoryKey, KnowledgeRepository } from "@/objects/Knowledge";
import { RuleAction, RuleCondition, RuleLayer } from "@/objects/Rule";
import { Skill } from "@/objects/Skill";
import { Skillset } from "@/objects/Skillset";
import { Toolkit } from "@/objects/Toolkit";
/** Agent identity fields carried through the generative setup wizard. */
export interface ProposalAgent {
name: string;
description: string;
icon: string;
accent: string;
system_prompt: string;
}
export interface ProposedSkill {
name: string;
description: string;
tags: string[];
graph_definition: Record<string, unknown>;
}
export interface ProposedKnowledgeStub {
name: string;
description: string;
source_type: string;
}
export interface ProposedWorker {
name: string;
description: string;
role: string;
system_prompt: string;
base_worker?: string | null;
tags: string[];
}
export interface ProposedRepository {
name: string;
description: string;
icon: string;
accent: string;
/** What kind of knowledge it holds, as proposed (clamped by svc-core);
* editable in the review. Absent from an older server: Domain. */
category?: KnowledgeCategoryKey;
/** Existing knowledge base ids to include as members. */
member_knowledge_ids: string[];
/** Names of proposed (new) knowledge bases to include as members. */
member_proposed_knowledge_names: string[];
}
export interface ProposedSkillsetInfo {
name: string;
description: string;
/** Existing skill ids to include as members. */
member_skill_ids: string[];
/** Names of proposed (new) skills to include as members. Skills-only —
* never tools or MCP servers (a human curates that membership on an
* existing skillset instead). */
member_proposed_skill_names: string[];
}
export interface ProposedToolkitInfo {
name: string;
description: string;
/** Existing MCP server ids to include as members. Existing-only — a
* proposed toolkit never invents a server (they carry live credentials only
* a human can safely configure). Built-in tools are not members: svc-ai
* binds its general set to every agent. */
member_mcp_server_ids: string[];
}
export interface ProposedRule {
name: string;
description: string;
layer: RuleLayer;
conditions: RuleCondition[];
actions: RuleAction[];
priority: number;
}
export interface GenerationModelInfo {
provider: string;
model_name: string;
ai_model_id?: string | null;
}
export interface GenerateAgentRequest {
problem_description: string;
ai_model_id?: string | null;
}
/** The reviewed-and-editable proposal returned by POST /agents/generate. */
export interface AgentGenerationProposal {
agent: ProposalAgent;
reasoning: string;
/** Informational only — agents only ever integrate skills through an
* attached skillset, never individually, so selecting one here does not
* grant it. */
selected_skills: Skill[];
selected_knowledge: Knowledge[];
selected_repositories: KnowledgeRepository[];
selected_skillsets: Skillset[];
/** Informational only in the same sense as selected_skills — agents only
* ever integrate tools/MCP servers through an attached toolkit, never
* individually. */
selected_toolkits: Toolkit[];
proposed_skills: ProposedSkill[];
proposed_knowledge: ProposedKnowledgeStub[];
proposed_workers: ProposedWorker[];
proposed_repositories: ProposedRepository[];
/** Skills-only proposals — see ProposedSkillsetInfo. Auto-attached to the
* agent on creation if included. */
proposed_skillsets: ProposedSkillsetInfo[];
/** Existing-members-only proposals — see ProposedToolkitInfo.
* Auto-attached to the agent on creation if included. */
proposed_toolkits: ProposedToolkitInfo[];
proposed_rules: ProposedRule[];
warnings: string[];
model: GenerationModelInfo;
/** The invocation that produced this proposal — passed back on
* create-from-config, so what is created resolves to it. */
generation_id: string;
}
export interface NewSkillInput {
name: string;
description: string;
tags: string[];
graph_definition: Record<string, unknown>;
}
/** A new source, with the links found for it that the person kept — the
* same shape knowledge setup sends. */
export type NewKnowledgeInput = KnowledgeSourceInput;
export interface NewWorkerInput {
name: string;
description: string;
role?: string | null;
system_prompt: string;
base_worker?: string | null;
tags: string[];
}
export interface NewRepositoryInput {
name: string;
description: string;
icon: string;
accent: string;
/** What kind of knowledge it holds. */
category?: KnowledgeCategoryKey;
/** Existing knowledge base ids to include as members. */
knowledge_ids: string[];
/** Names of entries in the request's new_knowledge list to include. */
new_knowledge_names: string[];
}
export interface NewSkillsetInput {
name: string;
description: string;
/** Existing skill ids to include as members (access-verified on create). */
skill_ids: string[];
/** Names of entries in the request's new_skills list to include. */
new_skill_names: string[];
}
export interface NewToolkitInput {
name: string;
description: string;
/** Existing MCP server ids to include as members (access-verified on
* create). Existing-only — there is no proposed-name field here at all.
* Built-in tools are not members: every agent has them already. */
mcp_server_ids: string[];
}
export interface NewRuleInput {
name: string;
description: string;
layer: RuleLayer;
conditions: RuleCondition[];
actions: RuleAction[];
priority: number;
}
export interface CreateFromConfigRequest {
agent: ProposalAgent;
ai_model_id?: string | null;
/** The proposal's generation (AgentGenerationProposal.generation_id). */
generation_id?: string | null;
// Agents only ever integrate skills through an attached skillset — never
// individually — so there is no existing_skill_ids field here.
existing_knowledge_ids: string[];
existing_repository_ids: string[];
/** Existing skillsets only — see AgentGenerationProposal.selected_skillsets. */
existing_skillset_ids: string[];
/** Existing toolkits only — see AgentGenerationProposal.selected_toolkits. */
existing_toolkit_ids: string[];
new_skills: NewSkillInput[];
new_knowledge: NewKnowledgeInput[];
new_workers: NewWorkerInput[];
new_repositories: NewRepositoryInput[];
/** Skills-only (see NewSkillsetInput) — auto-granted to the agent since it
* exists specifically to carry skills for it. */
new_skillsets: NewSkillsetInput[];
/** Existing-members-only (see NewToolkitInput) — auto-granted to the agent
* since it exists specifically to carry MCP servers for it. */
new_toolkits: NewToolkitInput[];
new_rules: NewRuleInput[];
/** The search that found the new sources' links (POST
* /app/knowledge/discover), marked applied to the agent. */
source_discovery_id?: string | null;
}
export type GeneratedResourceType =
| "skill"
| "knowledge"
| "repository"
| "skillset"
| "toolkit"
| "worker"
| "rule";
/** A resource created by an agent's generative setup. */
export interface GeneratedResourceRef {
id: string;
name: string;
type: GeneratedResourceType | string;
}
export interface GeneratedResourcesResponse {
resources: GeneratedResourceRef[];
total: number;
}
export interface CreateFromConfigResponse {
agent: { id: string; name: string };
created_skill_ids: string[];
created_knowledge_ids: string[];
created_worker_ids: string[];
created_repository_ids: string[];
created_skillset_ids: string[];
created_toolkit_ids: string[];
created_rule_ids: string[];
/** The new website sources whose first crawl started. */
crawls_started?: string[];
/** How many documents are being imported into the new file sources. */
imports_queued?: number;
}
|