@archastro/sdk 0.5.2 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +86 -0
- package/dist/auth.d.ts +143 -0
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +187 -1
- package/dist/auth.js.map +1 -1
- package/dist/client.d.ts +26 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +27 -1
- package/dist/client.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/types/ai.d.ts +150 -12
- package/dist/types/ai.d.ts.map +1 -1
- package/dist/types/ai.js +71 -41
- package/dist/types/ai.js.map +1 -1
- package/dist/types/artifacts.d.ts +81 -24
- package/dist/types/artifacts.d.ts.map +1 -1
- package/dist/types/artifacts.js +39 -21
- package/dist/types/artifacts.js.map +1 -1
- package/dist/types/automations.d.ts +41 -9
- package/dist/types/automations.d.ts.map +1 -1
- package/dist/types/automations.js +25 -17
- package/dist/types/automations.js.map +1 -1
- package/dist/types/chat.d.ts +21418 -0
- package/dist/types/chat.d.ts.map +1 -0
- package/dist/types/chat.js +70 -0
- package/dist/types/chat.js.map +1 -0
- package/dist/types/common.d.ts +16970 -2136
- package/dist/types/common.d.ts.map +1 -1
- package/dist/types/common.js +1695 -332
- package/dist/types/common.js.map +1 -1
- package/dist/types/config.d.ts +239 -31
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/config.js +86 -34
- package/dist/types/config.js.map +1 -1
- package/dist/types/image.d.ts +27 -4
- package/dist/types/image.d.ts.map +1 -1
- package/dist/types/image.js +17 -10
- package/dist/types/image.js.map +1 -1
- package/dist/types/index.d.ts +2 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +3 -2
- package/dist/types/index.js.map +1 -1
- package/dist/types/invites.d.ts +20 -11
- package/dist/types/invites.d.ts.map +1 -1
- package/dist/types/invites.js +9 -12
- package/dist/types/invites.js.map +1 -1
- package/dist/types/notifications.d.ts +163 -0
- package/dist/types/notifications.d.ts.map +1 -0
- package/dist/types/notifications.js +44 -0
- package/dist/types/notifications.js.map +1 -0
- package/dist/types/teams.d.ts +1628 -231
- package/dist/types/teams.d.ts.map +1 -1
- package/dist/types/teams.js +76 -45
- package/dist/types/teams.js.map +1 -1
- package/dist/types/threads.d.ts +997 -243
- package/dist/types/threads.d.ts.map +1 -1
- package/dist/types/threads.js +84 -51
- package/dist/types/threads.js.map +1 -1
- package/dist/types/users.d.ts +98 -18
- package/dist/types/users.d.ts.map +1 -1
- package/dist/types/users.js +43 -18
- package/dist/types/users.js.map +1 -1
- package/dist/v1/resources/activity_feed.d.ts +89 -0
- package/dist/v1/resources/activity_feed.d.ts.map +1 -1
- package/dist/v1/resources/activity_feed.js +56 -2
- package/dist/v1/resources/activity_feed.js.map +1 -1
- package/dist/v1/resources/agent_computers.d.ts +48 -2
- package/dist/v1/resources/agent_computers.d.ts.map +1 -1
- package/dist/v1/resources/agent_computers.js +48 -1
- package/dist/v1/resources/agent_computers.js.map +1 -1
- package/dist/v1/resources/agent_env_vars.d.ts +50 -0
- package/dist/v1/resources/agent_env_vars.d.ts.map +1 -0
- package/dist/v1/resources/agent_env_vars.js +56 -0
- package/dist/v1/resources/agent_env_vars.js.map +1 -0
- package/dist/v1/resources/agent_health_actions.d.ts +43 -0
- package/dist/v1/resources/agent_health_actions.d.ts.map +1 -0
- package/dist/v1/resources/agent_health_actions.js +50 -0
- package/dist/v1/resources/agent_health_actions.js.map +1 -0
- package/dist/v1/resources/agent_installations.d.ts +100 -0
- package/dist/v1/resources/agent_installations.d.ts.map +1 -1
- package/dist/v1/resources/agent_installations.js +106 -2
- package/dist/v1/resources/agent_installations.js.map +1 -1
- package/dist/v1/resources/agent_routine_runs.d.ts +33 -0
- package/dist/v1/resources/agent_routine_runs.d.ts.map +1 -0
- package/dist/v1/resources/agent_routine_runs.js +48 -0
- package/dist/v1/resources/agent_routine_runs.js.map +1 -0
- package/dist/v1/resources/agent_routines.d.ts +148 -2
- package/dist/v1/resources/agent_routines.d.ts.map +1 -1
- package/dist/v1/resources/agent_routines.js +168 -3
- package/dist/v1/resources/agent_routines.js.map +1 -1
- package/dist/v1/resources/agent_sessions.d.ts +118 -1
- package/dist/v1/resources/agent_sessions.d.ts.map +1 -1
- package/dist/v1/resources/agent_sessions.js +134 -2
- package/dist/v1/resources/agent_sessions.js.map +1 -1
- package/dist/v1/resources/agent_skills.d.ts +83 -1
- package/dist/v1/resources/agent_skills.d.ts.map +1 -1
- package/dist/v1/resources/agent_skills.js +87 -2
- package/dist/v1/resources/agent_skills.js.map +1 -1
- package/dist/v1/resources/agent_tools.d.ts +109 -2
- package/dist/v1/resources/agent_tools.d.ts.map +1 -1
- package/dist/v1/resources/agent_tools.js +114 -2
- package/dist/v1/resources/agent_tools.js.map +1 -1
- package/dist/v1/resources/agents.d.ts +517 -9
- package/dist/v1/resources/agents.d.ts.map +1 -1
- package/dist/v1/resources/agents.js +515 -12
- package/dist/v1/resources/agents.js.map +1 -1
- package/dist/v1/resources/ai.d.ts +93 -0
- package/dist/v1/resources/ai.d.ts.map +1 -1
- package/dist/v1/resources/ai.js +89 -1
- package/dist/v1/resources/ai.js.map +1 -1
- package/dist/v1/resources/artifacts.d.ts +73 -0
- package/dist/v1/resources/artifacts.d.ts.map +1 -1
- package/dist/v1/resources/artifacts.js +74 -2
- package/dist/v1/resources/artifacts.js.map +1 -1
- package/dist/v1/resources/automation_runs.d.ts +8 -4
- package/dist/v1/resources/automation_runs.d.ts.map +1 -1
- package/dist/v1/resources/automation_runs.js +9 -5
- package/dist/v1/resources/automation_runs.js.map +1 -1
- package/dist/v1/resources/automations.d.ts +20 -0
- package/dist/v1/resources/automations.d.ts.map +1 -1
- package/dist/v1/resources/automations.js +21 -1
- package/dist/v1/resources/automations.js.map +1 -1
- package/dist/v1/resources/bug_reports.d.ts +29 -0
- package/dist/v1/resources/bug_reports.d.ts.map +1 -0
- package/dist/v1/resources/bug_reports.js +29 -0
- package/dist/v1/resources/bug_reports.js.map +1 -0
- package/dist/v1/resources/config.d.ts +429 -4
- package/dist/v1/resources/config.d.ts.map +1 -1
- package/dist/v1/resources/config.js +493 -9
- package/dist/v1/resources/config.js.map +1 -1
- package/dist/v1/resources/custom_objects.d.ts +117 -2
- package/dist/v1/resources/custom_objects.d.ts.map +1 -1
- package/dist/v1/resources/custom_objects.js +132 -3
- package/dist/v1/resources/custom_objects.js.map +1 -1
- package/dist/v1/resources/files.d.ts +62 -0
- package/dist/v1/resources/files.d.ts.map +1 -0
- package/dist/v1/resources/files.js +58 -0
- package/dist/v1/resources/files.js.map +1 -0
- package/dist/v1/resources/index.d.ts +13 -0
- package/dist/v1/resources/index.d.ts.map +1 -1
- package/dist/v1/resources/index.js +14 -1
- package/dist/v1/resources/index.js.map +1 -1
- package/dist/v1/resources/installation_sources.d.ts +12 -0
- package/dist/v1/resources/installation_sources.d.ts.map +1 -1
- package/dist/v1/resources/installation_sources.js +13 -1
- package/dist/v1/resources/installation_sources.js.map +1 -1
- package/dist/v1/resources/invites.d.ts +15 -0
- package/dist/v1/resources/invites.d.ts.map +1 -1
- package/dist/v1/resources/invites.js +16 -1
- package/dist/v1/resources/invites.js.map +1 -1
- package/dist/v1/resources/knowledge_documents.d.ts +104 -0
- package/dist/v1/resources/knowledge_documents.d.ts.map +1 -0
- package/dist/v1/resources/knowledge_documents.js +112 -0
- package/dist/v1/resources/knowledge_documents.js.map +1 -0
- package/dist/v1/resources/knowledge_sources.d.ts +190 -0
- package/dist/v1/resources/knowledge_sources.d.ts.map +1 -0
- package/dist/v1/resources/knowledge_sources.js +176 -0
- package/dist/v1/resources/knowledge_sources.js.map +1 -0
- package/dist/v1/resources/kv.d.ts +73 -0
- package/dist/v1/resources/kv.d.ts.map +1 -1
- package/dist/v1/resources/kv.js +96 -3
- package/dist/v1/resources/kv.js.map +1 -1
- package/dist/v1/resources/notification_preferences.d.ts +61 -0
- package/dist/v1/resources/notification_preferences.d.ts.map +1 -0
- package/dist/v1/resources/notification_preferences.js +65 -0
- package/dist/v1/resources/notification_preferences.js.map +1 -0
- package/dist/v1/resources/notifications.d.ts +133 -0
- package/dist/v1/resources/notifications.d.ts.map +1 -0
- package/dist/v1/resources/notifications.js +136 -0
- package/dist/v1/resources/notifications.js.map +1 -0
- package/dist/v1/resources/orgs.d.ts +18 -0
- package/dist/v1/resources/orgs.d.ts.map +1 -1
- package/dist/v1/resources/orgs.js +30 -2
- package/dist/v1/resources/orgs.js.map +1 -1
- package/dist/v1/resources/slack_channel_bindings.d.ts +101 -0
- package/dist/v1/resources/slack_channel_bindings.d.ts.map +1 -0
- package/dist/v1/resources/slack_channel_bindings.js +114 -0
- package/dist/v1/resources/slack_channel_bindings.js.map +1 -0
- package/dist/v1/resources/solution_categories.d.ts +36 -0
- package/dist/v1/resources/solution_categories.d.ts.map +1 -0
- package/dist/v1/resources/solution_categories.js +55 -0
- package/dist/v1/resources/solution_categories.js.map +1 -0
- package/dist/v1/resources/solution_tags.d.ts +37 -0
- package/dist/v1/resources/solution_tags.d.ts.map +1 -0
- package/dist/v1/resources/solution_tags.js +54 -0
- package/dist/v1/resources/solution_tags.js.map +1 -0
- package/dist/v1/resources/solutions.d.ts +309 -0
- package/dist/v1/resources/solutions.d.ts.map +1 -0
- package/dist/v1/resources/solutions.js +214 -0
- package/dist/v1/resources/solutions.js.map +1 -0
- package/dist/v1/resources/team_memberships.d.ts +31 -0
- package/dist/v1/resources/team_memberships.d.ts.map +1 -1
- package/dist/v1/resources/team_memberships.js +49 -2
- package/dist/v1/resources/team_memberships.js.map +1 -1
- package/dist/v1/resources/teams.d.ts +458 -49
- package/dist/v1/resources/teams.d.ts.map +1 -1
- package/dist/v1/resources/teams.js +319 -27
- package/dist/v1/resources/teams.js.map +1 -1
- package/dist/v1/resources/thread_messages.d.ts +70 -0
- package/dist/v1/resources/thread_messages.d.ts.map +1 -1
- package/dist/v1/resources/thread_messages.js +85 -2
- package/dist/v1/resources/thread_messages.js.map +1 -1
- package/dist/v1/resources/threads.d.ts +201 -0
- package/dist/v1/resources/threads.d.ts.map +1 -1
- package/dist/v1/resources/threads.js +220 -4
- package/dist/v1/resources/threads.js.map +1 -1
- package/dist/v1/resources/users.d.ts +213 -39
- package/dist/v1/resources/users.d.ts.map +1 -1
- package/dist/v1/resources/users.js +121 -16
- package/dist/v1/resources/users.js.map +1 -1
- package/dist/v1.d.ts +26 -0
- package/dist/v1.d.ts.map +1 -1
- package/dist/v1.js +40 -1
- package/dist/v1.js.map +1 -1
- package/package.json +3 -1
- package/dist/types/agents.d.ts +0 -2084
- package/dist/types/agents.d.ts.map +0 -1
- package/dist/types/agents.js +0 -203
- package/dist/types/agents.js.map +0 -1
|
@@ -1,24 +1,106 @@
|
|
|
1
1
|
import { HttpClient } from "../../runtime/http-client.js";
|
|
2
|
-
import type { AgentSkill, AgentSkillList } from "../../types/
|
|
2
|
+
import type { AgentSkill, AgentSkillList } from "../../types/common.js";
|
|
3
3
|
export declare class AgentSkillResource {
|
|
4
4
|
private http;
|
|
5
5
|
constructor(http: HttpClient);
|
|
6
|
+
/**
|
|
7
|
+
* List agent skills
|
|
8
|
+
* Returns all agent skills belonging to the authenticated app. Results include
|
|
9
|
+
* skills in any status (`"active"` or `"inactive"`). Use the `agent` filter to
|
|
10
|
+
* narrow results to one or more specific agents.
|
|
11
|
+
* Requires an app-scoped API key. Supplying one or more `agent` values that
|
|
12
|
+
* cannot be resolved within the app returns 404.
|
|
13
|
+
* @param params - Query parameters.
|
|
14
|
+
* @param params.agent - Filter results to skills belonging to the specified agent(s). Accepts one or more agent IDs (`agt_...`) or lookup keys. Omit to return skills across all agents in the app.
|
|
15
|
+
* @returns List of agent skills matching the query.
|
|
16
|
+
*/
|
|
6
17
|
list(params?: {
|
|
7
18
|
agent?: string[];
|
|
8
19
|
}): Promise<AgentSkillList>;
|
|
20
|
+
/**
|
|
21
|
+
* Enable a skill on an agent
|
|
22
|
+
* Attaches a skill config to an agent, creating an agent skill record and
|
|
23
|
+
* returning it with an initial status of `"inactive"`. Use the activate
|
|
24
|
+
* endpoint to make the skill available during agent runs.
|
|
25
|
+
* Requires an app-scoped API key. The `agent` and `config` must both belong
|
|
26
|
+
* to the authenticated app. Supplying a `config` that does not exist within
|
|
27
|
+
* the app returns 422. Returns 201 on success.
|
|
28
|
+
* @param input - Request body.
|
|
29
|
+
* @param input.agent - Agent ID (`agt_...`) to attach the skill to.
|
|
30
|
+
* @param input.config - Skill config ID (`cfg_...`) that defines the skill's behavior. Must belong to the authenticated app.
|
|
31
|
+
* @param input.instruction - Optional plain-text instruction override. When supplied, replaces the default instruction from the skill config for this agent.
|
|
32
|
+
* @param input.metadata - Arbitrary key-value metadata to store with the agent skill. Useful for tracking provisioning context or custom labels.
|
|
33
|
+
* @returns The newly created agent skill record.
|
|
34
|
+
*/
|
|
9
35
|
create(input: {
|
|
10
36
|
agent: string;
|
|
11
37
|
config: string;
|
|
12
38
|
instruction?: string | undefined;
|
|
13
39
|
metadata?: Record<string, unknown> | undefined;
|
|
14
40
|
}): Promise<AgentSkill>;
|
|
41
|
+
/**
|
|
42
|
+
* Remove a skill from an agent
|
|
43
|
+
* Permanently removes the specified agent skill, detaching the skill config
|
|
44
|
+
* from the agent. This action cannot be undone. To temporarily stop a skill
|
|
45
|
+
* from being invoked without removing it, use the deactivate endpoint instead.
|
|
46
|
+
* Requires an app-scoped API key. Returns 204 No Content on success.
|
|
47
|
+
* @param agentSkill - Agent skill ID (`ask_...`) to remove.
|
|
48
|
+
* @returns No content
|
|
49
|
+
*/
|
|
15
50
|
delete(agentSkill: string): Promise<void>;
|
|
51
|
+
/**
|
|
52
|
+
* Retrieve an agent skill
|
|
53
|
+
* Returns the agent skill identified by its ID. The skill must belong to
|
|
54
|
+
* the authenticated app's scope.
|
|
55
|
+
* Requires an app-scoped API key.
|
|
56
|
+
* @param agentSkill - Agent skill ID (`ask_...`) to retrieve.
|
|
57
|
+
* @returns The requested agent skill.
|
|
58
|
+
*/
|
|
16
59
|
get(agentSkill: string): Promise<AgentSkill>;
|
|
60
|
+
/**
|
|
61
|
+
* Update an agent skill
|
|
62
|
+
* Updates one or more mutable fields on the specified agent skill. All
|
|
63
|
+
* parameters are optional; supply only the fields you want to change.
|
|
64
|
+
* When `template` is provided, the platform re-resolves that skill template
|
|
65
|
+
* and re-points the skill's underlying config in place. The skill's current
|
|
66
|
+
* status is preserved. Any `instruction` or `metadata` supplied alongside
|
|
67
|
+
* `template` override the template's defaults.
|
|
68
|
+
* Requires an app-scoped API key. The skill must belong to the authenticated
|
|
69
|
+
* app's scope.
|
|
70
|
+
* @param agentSkill - Agent skill ID (`ask_...`) to update.
|
|
71
|
+
* @param input - Request body.
|
|
72
|
+
* @param input.instruction - Plain-text instruction override for this agent skill. Replaces the default instruction from the skill config. Omit to leave the current value unchanged.
|
|
73
|
+
* @param input.metadata - Arbitrary key-value metadata to store with the agent skill. Omit to leave the current value unchanged.
|
|
74
|
+
* @param input.template - Agent skill template config ID (`cfg_...`), virtual path, or lookup key. When supplied, re-resolves the template and updates the skill's underlying config in place, refreshing template provenance while preserving the skill's current status. Any `instruction` or `metadata` values provided alongside `template` override the template defaults.
|
|
75
|
+
* @returns The agent skill after the update has been applied.
|
|
76
|
+
*/
|
|
17
77
|
update(agentSkill: string, input: {
|
|
18
78
|
instruction?: string | undefined;
|
|
19
79
|
metadata?: Record<string, unknown> | undefined;
|
|
80
|
+
template?: string | undefined;
|
|
20
81
|
}): Promise<AgentSkill>;
|
|
82
|
+
/**
|
|
83
|
+
* Activate an agent skill
|
|
84
|
+
* Sets the status of the specified agent skill to `"active"`, allowing the
|
|
85
|
+
* skill to be invoked during agent runs. The skill must already exist on the
|
|
86
|
+
* agent (created via the enable endpoint) and belong to the authenticated
|
|
87
|
+
* app's scope.
|
|
88
|
+
* Requires an app-scoped API key. Activating a skill that is already active
|
|
89
|
+
* is a no-op and returns the skill unchanged.
|
|
90
|
+
* @param agentSkill - Agent skill ID (`ask_...`) to activate.
|
|
91
|
+
* @returns The agent skill after activation, with `status` set to `"active"`.
|
|
92
|
+
*/
|
|
21
93
|
activate(agentSkill: string): Promise<AgentSkill>;
|
|
94
|
+
/**
|
|
95
|
+
* Deactivate an agent skill
|
|
96
|
+
* Sets the status of the specified agent skill to `"inactive"`, preventing
|
|
97
|
+
* the skill from being invoked during future agent runs. The skill record
|
|
98
|
+
* is preserved and can be reactivated at any time.
|
|
99
|
+
* Requires an app-scoped API key. Deactivating a skill that is already
|
|
100
|
+
* inactive is a no-op and returns the skill unchanged.
|
|
101
|
+
* @param agentSkill - Agent skill ID (`ask_...`) to deactivate.
|
|
102
|
+
* @returns The agent skill after deactivation, with `status` set to `"inactive"`.
|
|
103
|
+
*/
|
|
22
104
|
deactivate(agentSkill: string): Promise<AgentSkill>;
|
|
23
105
|
}
|
|
24
106
|
//# sourceMappingURL=agent_skills.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent_skills.d.ts","sourceRoot":"","sources":["../../../src/v1/resources/agent_skills.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAExE,qBAAa,kBAAkB;IACjB,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;
|
|
1
|
+
{"version":3,"file":"agent_skills.d.ts","sourceRoot":"","sources":["../../../src/v1/resources/agent_skills.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAExE,qBAAa,kBAAkB;IACjB,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAEpC;;;;;;;;;;OAUG;IACG,IAAI,CAAC,MAAM,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,GAAG,OAAO,CAAC,cAAc,CAAC;IASlE;;;;;;;;;;;;;;OAcG;IACG,MAAM,CAAC,KAAK,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAA;KAAE,GAAG,OAAO,CAAC,UAAU,CAAC;IAI7J;;;;;;;;OAQG;IACG,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI/C;;;;;;;OAOG;IACG,GAAG,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;IAIlD;;;;;;;;;;;;;;;;OAgBG;IACG,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE;QAAE,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,GAAG,OAAO,CAAC,UAAU,CAAC;IAIjL;;;;;;;;;;OAUG;IACG,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;IAIvD;;;;;;;;;OASG;IACG,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;CAG1D"}
|
|
@@ -1,29 +1,114 @@
|
|
|
1
1
|
// Copyright (c) 2026 ArchAstro Inc. All Rights Reserved.
|
|
2
2
|
// This file is auto-generated by @archastro/sdk-generator. Do not edit.
|
|
3
|
-
// Content hash:
|
|
3
|
+
// Content hash: a3351405be16
|
|
4
4
|
export class AgentSkillResource {
|
|
5
5
|
http;
|
|
6
6
|
constructor(http) {
|
|
7
7
|
this.http = http;
|
|
8
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* List agent skills
|
|
11
|
+
* Returns all agent skills belonging to the authenticated app. Results include
|
|
12
|
+
* skills in any status (`"active"` or `"inactive"`). Use the `agent` filter to
|
|
13
|
+
* narrow results to one or more specific agents.
|
|
14
|
+
* Requires an app-scoped API key. Supplying one or more `agent` values that
|
|
15
|
+
* cannot be resolved within the app returns 404.
|
|
16
|
+
* @param params - Query parameters.
|
|
17
|
+
* @param params.agent - Filter results to skills belonging to the specified agent(s). Accepts one or more agent IDs (`agt_...`) or lookup keys. Omit to return skills across all agents in the app.
|
|
18
|
+
* @returns List of agent skills matching the query.
|
|
19
|
+
*/
|
|
9
20
|
async list(params) {
|
|
10
|
-
|
|
21
|
+
const query = {};
|
|
22
|
+
if (params?.agent !== undefined) {
|
|
23
|
+
query["agent"] = params?.agent;
|
|
24
|
+
}
|
|
25
|
+
return this.http.request(`/api/v1/agent_skills`, { query });
|
|
11
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* Enable a skill on an agent
|
|
29
|
+
* Attaches a skill config to an agent, creating an agent skill record and
|
|
30
|
+
* returning it with an initial status of `"inactive"`. Use the activate
|
|
31
|
+
* endpoint to make the skill available during agent runs.
|
|
32
|
+
* Requires an app-scoped API key. The `agent` and `config` must both belong
|
|
33
|
+
* to the authenticated app. Supplying a `config` that does not exist within
|
|
34
|
+
* the app returns 422. Returns 201 on success.
|
|
35
|
+
* @param input - Request body.
|
|
36
|
+
* @param input.agent - Agent ID (`agt_...`) to attach the skill to.
|
|
37
|
+
* @param input.config - Skill config ID (`cfg_...`) that defines the skill's behavior. Must belong to the authenticated app.
|
|
38
|
+
* @param input.instruction - Optional plain-text instruction override. When supplied, replaces the default instruction from the skill config for this agent.
|
|
39
|
+
* @param input.metadata - Arbitrary key-value metadata to store with the agent skill. Useful for tracking provisioning context or custom labels.
|
|
40
|
+
* @returns The newly created agent skill record.
|
|
41
|
+
*/
|
|
12
42
|
async create(input) {
|
|
13
43
|
return this.http.request(`/api/v1/agent_skills`, { method: "POST", body: input });
|
|
14
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* Remove a skill from an agent
|
|
47
|
+
* Permanently removes the specified agent skill, detaching the skill config
|
|
48
|
+
* from the agent. This action cannot be undone. To temporarily stop a skill
|
|
49
|
+
* from being invoked without removing it, use the deactivate endpoint instead.
|
|
50
|
+
* Requires an app-scoped API key. Returns 204 No Content on success.
|
|
51
|
+
* @param agentSkill - Agent skill ID (`ask_...`) to remove.
|
|
52
|
+
* @returns No content
|
|
53
|
+
*/
|
|
15
54
|
async delete(agentSkill) {
|
|
16
55
|
await this.http.request(`/api/v1/agent_skills/${agentSkill}`, { method: "DELETE" });
|
|
17
56
|
}
|
|
57
|
+
/**
|
|
58
|
+
* Retrieve an agent skill
|
|
59
|
+
* Returns the agent skill identified by its ID. The skill must belong to
|
|
60
|
+
* the authenticated app's scope.
|
|
61
|
+
* Requires an app-scoped API key.
|
|
62
|
+
* @param agentSkill - Agent skill ID (`ask_...`) to retrieve.
|
|
63
|
+
* @returns The requested agent skill.
|
|
64
|
+
*/
|
|
18
65
|
async get(agentSkill) {
|
|
19
66
|
return this.http.request(`/api/v1/agent_skills/${agentSkill}`);
|
|
20
67
|
}
|
|
68
|
+
/**
|
|
69
|
+
* Update an agent skill
|
|
70
|
+
* Updates one or more mutable fields on the specified agent skill. All
|
|
71
|
+
* parameters are optional; supply only the fields you want to change.
|
|
72
|
+
* When `template` is provided, the platform re-resolves that skill template
|
|
73
|
+
* and re-points the skill's underlying config in place. The skill's current
|
|
74
|
+
* status is preserved. Any `instruction` or `metadata` supplied alongside
|
|
75
|
+
* `template` override the template's defaults.
|
|
76
|
+
* Requires an app-scoped API key. The skill must belong to the authenticated
|
|
77
|
+
* app's scope.
|
|
78
|
+
* @param agentSkill - Agent skill ID (`ask_...`) to update.
|
|
79
|
+
* @param input - Request body.
|
|
80
|
+
* @param input.instruction - Plain-text instruction override for this agent skill. Replaces the default instruction from the skill config. Omit to leave the current value unchanged.
|
|
81
|
+
* @param input.metadata - Arbitrary key-value metadata to store with the agent skill. Omit to leave the current value unchanged.
|
|
82
|
+
* @param input.template - Agent skill template config ID (`cfg_...`), virtual path, or lookup key. When supplied, re-resolves the template and updates the skill's underlying config in place, refreshing template provenance while preserving the skill's current status. Any `instruction` or `metadata` values provided alongside `template` override the template defaults.
|
|
83
|
+
* @returns The agent skill after the update has been applied.
|
|
84
|
+
*/
|
|
21
85
|
async update(agentSkill, input) {
|
|
22
86
|
return this.http.request(`/api/v1/agent_skills/${agentSkill}`, { method: "PATCH", body: input });
|
|
23
87
|
}
|
|
88
|
+
/**
|
|
89
|
+
* Activate an agent skill
|
|
90
|
+
* Sets the status of the specified agent skill to `"active"`, allowing the
|
|
91
|
+
* skill to be invoked during agent runs. The skill must already exist on the
|
|
92
|
+
* agent (created via the enable endpoint) and belong to the authenticated
|
|
93
|
+
* app's scope.
|
|
94
|
+
* Requires an app-scoped API key. Activating a skill that is already active
|
|
95
|
+
* is a no-op and returns the skill unchanged.
|
|
96
|
+
* @param agentSkill - Agent skill ID (`ask_...`) to activate.
|
|
97
|
+
* @returns The agent skill after activation, with `status` set to `"active"`.
|
|
98
|
+
*/
|
|
24
99
|
async activate(agentSkill) {
|
|
25
100
|
return this.http.request(`/api/v1/agent_skills/${agentSkill}/activate`, { method: "POST" });
|
|
26
101
|
}
|
|
102
|
+
/**
|
|
103
|
+
* Deactivate an agent skill
|
|
104
|
+
* Sets the status of the specified agent skill to `"inactive"`, preventing
|
|
105
|
+
* the skill from being invoked during future agent runs. The skill record
|
|
106
|
+
* is preserved and can be reactivated at any time.
|
|
107
|
+
* Requires an app-scoped API key. Deactivating a skill that is already
|
|
108
|
+
* inactive is a no-op and returns the skill unchanged.
|
|
109
|
+
* @param agentSkill - Agent skill ID (`ask_...`) to deactivate.
|
|
110
|
+
* @returns The agent skill after deactivation, with `status` set to `"inactive"`.
|
|
111
|
+
*/
|
|
27
112
|
async deactivate(agentSkill) {
|
|
28
113
|
return this.http.request(`/api/v1/agent_skills/${agentSkill}/deactivate`, { method: "POST" });
|
|
29
114
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent_skills.js","sourceRoot":"","sources":["../../../src/v1/resources/agent_skills.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,wEAAwE;AACxE,6BAA6B;AAK7B,MAAM,OAAO,kBAAkB;IACT;IAApB,YAAoB,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAExC,KAAK,CAAC,IAAI,CAAC,MAA6B;QACtC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,sBAAsB,EAAE,EAAE,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"agent_skills.js","sourceRoot":"","sources":["../../../src/v1/resources/agent_skills.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,wEAAwE;AACxE,6BAA6B;AAK7B,MAAM,OAAO,kBAAkB;IACT;IAApB,YAAoB,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAExC;;;;;;;;;;OAUG;IACH,KAAK,CAAC,IAAI,CAAC,MAA6B;QACtC,MAAM,KAAK,GAA6F,EAAE,CAAC;QAC3G,IAAI,MAAM,EAAE,KAAK,KAAK,SAAS,EAAE,CAAC;YAChC,KAAK,CAAC,OAAO,CAAC,GAAG,MAAM,EAAE,KAAK,CAAC;QACjC,CAAC;QAED,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,sBAAsB,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;IAC9D,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,KAAK,CAAC,MAAM,CAAC,KAA0H;QACrI,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,sBAAsB,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IACpF,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,MAAM,CAAC,UAAkB;QAC7B,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,wBAAwB,UAAU,EAAE,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC;IACtF,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,GAAG,CAAC,UAAkB;QAC1B,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,wBAAwB,UAAU,EAAE,CAAC,CAAC;IACjE,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,KAAK,CAAC,MAAM,CAAC,UAAkB,EAAE,KAA0H;QACzJ,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,wBAAwB,UAAU,EAAE,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IACnG,CAAC;IAED;;;;;;;;;;OAUG;IACH,KAAK,CAAC,QAAQ,CAAC,UAAkB;QAC/B,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,wBAAwB,UAAU,WAAW,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IAC9F,CAAC;IAED;;;;;;;;;OASG;IACH,KAAK,CAAC,UAAU,CAAC,UAAkB;QACjC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,wBAAwB,UAAU,aAAa,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IAChG,CAAC;CACF"}
|
|
@@ -1,17 +1,96 @@
|
|
|
1
1
|
import { HttpClient } from "../../runtime/http-client.js";
|
|
2
|
-
import type { AgentTool, AgentToolListResponse } from "../../types/
|
|
3
|
-
import type { BuiltinToolCatalogEntry } from "../../types/common.js";
|
|
2
|
+
import type { AgentTool, AgentToolListResponse, BuiltinToolCatalogEntry } from "../../types/common.js";
|
|
4
3
|
export declare class AgentToolResource {
|
|
5
4
|
private http;
|
|
6
5
|
constructor(http: HttpClient);
|
|
6
|
+
/**
|
|
7
|
+
* List agent tools
|
|
8
|
+
* Returns all tools for the authenticated app, optionally filtered by agent
|
|
9
|
+
* or tool kind. Both explicitly created tools and tools derived from connected
|
|
10
|
+
* integrations (installation-sourced tools) are included in the response.
|
|
11
|
+
* Installation-sourced tools appear with `source: "installation"` and
|
|
12
|
+
* `status: "active"`. They are synthesized at request time from connected
|
|
13
|
+
* integrations and do not have a persistent tool ID of the `atl_...` form;
|
|
14
|
+
* their `id` is a composite of the installation ID and server tool type.
|
|
15
|
+
* Use the `agent` filter to retrieve tools for a specific agent. Supplying an
|
|
16
|
+
* `agent` ID that does not belong to the authenticated app returns 404.
|
|
17
|
+
* Requires app scope.
|
|
18
|
+
* @param params - Query parameters.
|
|
19
|
+
* @param params.agent - Filter results to tools belonging to this agent (`agt_...`). Omit to return tools across all agents in the app.
|
|
20
|
+
* @param params.kind - Filter by tool kind. One of `"builtin"` or `"custom"`. Omit to return tools of all kinds.
|
|
21
|
+
* @returns List of tools matching the supplied filters.
|
|
22
|
+
*/
|
|
7
23
|
list(params?: {
|
|
8
24
|
agent?: string;
|
|
9
25
|
kind?: string;
|
|
10
26
|
}): Promise<AgentToolListResponse>;
|
|
27
|
+
/**
|
|
28
|
+
* List built-in tool categories
|
|
29
|
+
* Returns the full catalog of built-in tool categories available on the platform.
|
|
30
|
+
* Each entry describes a tool type that can be added to an agent, including its
|
|
31
|
+
* key, display label, configuration schema, and the individual tools it exposes
|
|
32
|
+
* to the LLM.
|
|
33
|
+
* The catalog is global — it is not filtered by app or agent. Use the `key` from
|
|
34
|
+
* each entry as the `builtin_tool_key` when creating a built-in tool. Entries
|
|
35
|
+
* whose `requires_integration` is `true` require a connected integration before
|
|
36
|
+
* the tool can be activated on an agent.
|
|
37
|
+
* Requires app scope.
|
|
38
|
+
* @returns Array of built-in tool catalog entries, one per registered tool category.
|
|
39
|
+
*/
|
|
11
40
|
catalog(): Promise<BuiltinToolCatalogEntry[]>;
|
|
41
|
+
/**
|
|
42
|
+
* Delete an agent tool
|
|
43
|
+
* Permanently removes a tool from the agent. This action cannot be undone.
|
|
44
|
+
* Both `"draft"` and `"active"` tools can be deleted. If you only want to
|
|
45
|
+
* stop the agent from using a tool without removing it, use the deactivate
|
|
46
|
+
* endpoint instead.
|
|
47
|
+
* Requires app scope. The authenticated caller must own the tool's parent agent.
|
|
48
|
+
* @param tool - Tool ID (`atl_...`) of the tool to delete.
|
|
49
|
+
* @returns Empty response. Returns HTTP 204 on success.
|
|
50
|
+
*/
|
|
12
51
|
delete(tool: string): Promise<void>;
|
|
52
|
+
/**
|
|
53
|
+
* Retrieve an agent tool
|
|
54
|
+
* Returns the tool identified by `tool`. The tool must belong to an agent
|
|
55
|
+
* owned by the authenticated app.
|
|
56
|
+
* Use this endpoint to inspect a tool's current configuration, status, and
|
|
57
|
+
* metadata. To retrieve all tools for an agent or app, use the list endpoint.
|
|
58
|
+
* Requires app scope.
|
|
59
|
+
* @param tool - Tool ID (`atl_...`) of the tool to retrieve.
|
|
60
|
+
* @returns The requested tool.
|
|
61
|
+
*/
|
|
13
62
|
get(tool: string): Promise<AgentTool>;
|
|
63
|
+
/**
|
|
64
|
+
* Update an agent tool
|
|
65
|
+
* Updates the configuration of an existing tool. All parameters are optional;
|
|
66
|
+
* supply only the fields you want to change. Unspecified fields are left as-is.
|
|
67
|
+
* You can update both `"draft"` and `"active"` tools. Updating an active tool
|
|
68
|
+
* takes effect on the next agent run; any run already in progress continues
|
|
69
|
+
* with the configuration it loaded at start.
|
|
70
|
+
* Supplying `template` re-resolves the referenced AgentToolTemplate and patches
|
|
71
|
+
* the tool in place, preserving its `status`, `lookup_key`, `kind`, and agent
|
|
72
|
+
* association. Any other params you supply alongside `template` override the
|
|
73
|
+
* template defaults.
|
|
74
|
+
* Requires app scope. The authenticated caller must own the tool's parent agent.
|
|
75
|
+
* @param tool - Tool ID (`atl_...`) of the tool to update.
|
|
76
|
+
* @param input - Request body.
|
|
77
|
+
* @param input.async - When `true`, the tool executes asynchronously and the agent does not block waiting for a result. Applies to `"custom"` tools.
|
|
78
|
+
* @param input.builtin_tool_config - Configuration object for the built-in tool. Shape is defined by the catalog entry's `config_schema` for the tool's `builtin_tool_key`. Applies to `"builtin"` tools.
|
|
79
|
+
* @param input.config - Config ID (`cfg_...`) referencing the script or workflow graph that implements the tool handler. Applies to `"custom"` tools.
|
|
80
|
+
* @param input.description - Human-readable description of what the tool does, shown to the LLM as context. Applies primarily to `"custom"` tools.
|
|
81
|
+
* @param input.handler_type - Execution handler for the tool. One of `"script"` or `"workflow_graph"`. Applies to `"custom"` tools.
|
|
82
|
+
* @param input.instruction - Additional natural-language instruction provided to the LLM describing when and how to call this tool. Supplements the tool's `description`.
|
|
83
|
+
* @param input.lookup_key - Stable identifier you can use to look up this tool without its ID. Must be unique within the app.
|
|
84
|
+
* @param input.metadata - Arbitrary key-value metadata to attach to the tool. Replaces the existing metadata when supplied.
|
|
85
|
+
* @param input.name - Display name for the tool. Applies to `"custom"` tools.
|
|
86
|
+
* @param input.name_prefix - Per-instance namespace for built-in tools that support multiple instances per agent. Stamped onto LLM-facing tool names (e.g. `"org"` produces `"org_knowledge_search"`). Must match `^[a-z][a-z0-9_]*$` and be at most 24 characters.
|
|
87
|
+
* @param input.parameters - JSON Schema object describing the tool's input parameters. Replaces the existing parameter schema when supplied.
|
|
88
|
+
* @param input.parameters_config - Config ID (`cfg_...`) referencing a reusable JSON Schema definition for this tool's input parameters. Takes precedence over an inline `parameters` value.
|
|
89
|
+
* @param input.template - Config ID or lookup key of an AgentToolTemplate. When provided, re-resolves the template and patches the tool in place, preserving its `status`, `lookup_key`, `kind`, and agent association. Other params you supply alongside `template` override the template defaults.
|
|
90
|
+
* @returns The updated tool.
|
|
91
|
+
*/
|
|
14
92
|
update(tool: string, input: {
|
|
93
|
+
async?: boolean | undefined;
|
|
15
94
|
builtin_tool_config?: Record<string, unknown> | undefined;
|
|
16
95
|
config?: string | undefined;
|
|
17
96
|
description?: string | undefined;
|
|
@@ -20,10 +99,38 @@ export declare class AgentToolResource {
|
|
|
20
99
|
lookup_key?: string | undefined;
|
|
21
100
|
metadata?: Record<string, unknown> | undefined;
|
|
22
101
|
name?: string | undefined;
|
|
102
|
+
name_prefix?: string | undefined;
|
|
23
103
|
parameters?: Record<string, unknown> | undefined;
|
|
24
104
|
parameters_config?: string | undefined;
|
|
105
|
+
template?: string | undefined;
|
|
25
106
|
}): Promise<AgentTool>;
|
|
107
|
+
/**
|
|
108
|
+
* Activate an agent tool
|
|
109
|
+
* Transitions a tool from `"draft"` status to `"active"`, making it available
|
|
110
|
+
* for the agent to use during runs. Only tools in `"draft"` status can be
|
|
111
|
+
* activated; calling this on an already-active tool is a no-op that returns the
|
|
112
|
+
* current tool state.
|
|
113
|
+
* Activation validates that all required configuration is present. For built-in
|
|
114
|
+
* tools, this means the `builtin_tool_key` must resolve to a registered tool
|
|
115
|
+
* type and any required integration must be connected. Returns 422 if
|
|
116
|
+
* prerequisite checks fail.
|
|
117
|
+
* Requires app scope. The authenticated caller must own the tool's parent agent.
|
|
118
|
+
* @param tool - Tool ID (`atl_...`) of the tool to activate.
|
|
119
|
+
* @returns The updated tool with `status: "active"`.
|
|
120
|
+
*/
|
|
26
121
|
activate(tool: string): Promise<AgentTool>;
|
|
122
|
+
/**
|
|
123
|
+
* Deactivate an agent tool
|
|
124
|
+
* Transitions a tool from `"active"` status back to `"draft"`, removing it
|
|
125
|
+
* from the set of tools the agent can use during future runs. Calling this on a
|
|
126
|
+
* tool that is already in `"draft"` status is a no-op that returns the current
|
|
127
|
+
* tool state.
|
|
128
|
+
* Deactivation does not delete the tool or its configuration. To remove the
|
|
129
|
+
* tool permanently, use the delete endpoint.
|
|
130
|
+
* Requires app scope. The authenticated caller must own the tool's parent agent.
|
|
131
|
+
* @param tool - Tool ID (`atl_...`) of the tool to deactivate.
|
|
132
|
+
* @returns The updated tool with `status: "draft"`.
|
|
133
|
+
*/
|
|
27
134
|
deactivate(tool: string): Promise<AgentTool>;
|
|
28
135
|
}
|
|
29
136
|
//# sourceMappingURL=agent_tools.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent_tools.d.ts","sourceRoot":"","sources":["../../../src/v1/resources/agent_tools.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,qBAAqB,EAAE,
|
|
1
|
+
{"version":3,"file":"agent_tools.d.ts","sourceRoot":"","sources":["../../../src/v1/resources/agent_tools.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAEvG,qBAAa,iBAAiB;IAChB,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAEpC;;;;;;;;;;;;;;;;OAgBG;IACG,IAAI,CAAC,MAAM,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAYtF;;;;;;;;;;;;OAYG;IACG,OAAO,IAAI,OAAO,CAAC,uBAAuB,EAAE,CAAC;IAInD;;;;;;;;;OASG;IACG,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIzC;;;;;;;;;OASG;IACG,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;IAI3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACG,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;QAAC,mBAAmB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;QAAC,iBAAiB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,GAAG,OAAO,CAAC,SAAS,CAAC;IAI5hB;;;;;;;;;;;;;OAaG;IACG,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;IAIhD;;;;;;;;;;;OAWG;IACG,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;CAGnD"}
|
|
@@ -1,29 +1,141 @@
|
|
|
1
1
|
// Copyright (c) 2026 ArchAstro Inc. All Rights Reserved.
|
|
2
2
|
// This file is auto-generated by @archastro/sdk-generator. Do not edit.
|
|
3
|
-
// Content hash:
|
|
3
|
+
// Content hash: 5598947505a8
|
|
4
4
|
export class AgentToolResource {
|
|
5
5
|
http;
|
|
6
6
|
constructor(http) {
|
|
7
7
|
this.http = http;
|
|
8
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* List agent tools
|
|
11
|
+
* Returns all tools for the authenticated app, optionally filtered by agent
|
|
12
|
+
* or tool kind. Both explicitly created tools and tools derived from connected
|
|
13
|
+
* integrations (installation-sourced tools) are included in the response.
|
|
14
|
+
* Installation-sourced tools appear with `source: "installation"` and
|
|
15
|
+
* `status: "active"`. They are synthesized at request time from connected
|
|
16
|
+
* integrations and do not have a persistent tool ID of the `atl_...` form;
|
|
17
|
+
* their `id` is a composite of the installation ID and server tool type.
|
|
18
|
+
* Use the `agent` filter to retrieve tools for a specific agent. Supplying an
|
|
19
|
+
* `agent` ID that does not belong to the authenticated app returns 404.
|
|
20
|
+
* Requires app scope.
|
|
21
|
+
* @param params - Query parameters.
|
|
22
|
+
* @param params.agent - Filter results to tools belonging to this agent (`agt_...`). Omit to return tools across all agents in the app.
|
|
23
|
+
* @param params.kind - Filter by tool kind. One of `"builtin"` or `"custom"`. Omit to return tools of all kinds.
|
|
24
|
+
* @returns List of tools matching the supplied filters.
|
|
25
|
+
*/
|
|
9
26
|
async list(params) {
|
|
10
|
-
|
|
27
|
+
const query = {};
|
|
28
|
+
if (params?.agent !== undefined) {
|
|
29
|
+
query["agent"] = params?.agent;
|
|
30
|
+
}
|
|
31
|
+
if (params?.kind !== undefined) {
|
|
32
|
+
query["kind"] = params?.kind;
|
|
33
|
+
}
|
|
34
|
+
return this.http.request(`/api/v1/agent_tools`, { query });
|
|
11
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* List built-in tool categories
|
|
38
|
+
* Returns the full catalog of built-in tool categories available on the platform.
|
|
39
|
+
* Each entry describes a tool type that can be added to an agent, including its
|
|
40
|
+
* key, display label, configuration schema, and the individual tools it exposes
|
|
41
|
+
* to the LLM.
|
|
42
|
+
* The catalog is global — it is not filtered by app or agent. Use the `key` from
|
|
43
|
+
* each entry as the `builtin_tool_key` when creating a built-in tool. Entries
|
|
44
|
+
* whose `requires_integration` is `true` require a connected integration before
|
|
45
|
+
* the tool can be activated on an agent.
|
|
46
|
+
* Requires app scope.
|
|
47
|
+
* @returns Array of built-in tool catalog entries, one per registered tool category.
|
|
48
|
+
*/
|
|
12
49
|
async catalog() {
|
|
13
50
|
return this.http.request(`/api/v1/agent_tools/catalog`);
|
|
14
51
|
}
|
|
52
|
+
/**
|
|
53
|
+
* Delete an agent tool
|
|
54
|
+
* Permanently removes a tool from the agent. This action cannot be undone.
|
|
55
|
+
* Both `"draft"` and `"active"` tools can be deleted. If you only want to
|
|
56
|
+
* stop the agent from using a tool without removing it, use the deactivate
|
|
57
|
+
* endpoint instead.
|
|
58
|
+
* Requires app scope. The authenticated caller must own the tool's parent agent.
|
|
59
|
+
* @param tool - Tool ID (`atl_...`) of the tool to delete.
|
|
60
|
+
* @returns Empty response. Returns HTTP 204 on success.
|
|
61
|
+
*/
|
|
15
62
|
async delete(tool) {
|
|
16
63
|
await this.http.request(`/api/v1/agent_tools/${tool}`, { method: "DELETE" });
|
|
17
64
|
}
|
|
65
|
+
/**
|
|
66
|
+
* Retrieve an agent tool
|
|
67
|
+
* Returns the tool identified by `tool`. The tool must belong to an agent
|
|
68
|
+
* owned by the authenticated app.
|
|
69
|
+
* Use this endpoint to inspect a tool's current configuration, status, and
|
|
70
|
+
* metadata. To retrieve all tools for an agent or app, use the list endpoint.
|
|
71
|
+
* Requires app scope.
|
|
72
|
+
* @param tool - Tool ID (`atl_...`) of the tool to retrieve.
|
|
73
|
+
* @returns The requested tool.
|
|
74
|
+
*/
|
|
18
75
|
async get(tool) {
|
|
19
76
|
return this.http.request(`/api/v1/agent_tools/${tool}`);
|
|
20
77
|
}
|
|
78
|
+
/**
|
|
79
|
+
* Update an agent tool
|
|
80
|
+
* Updates the configuration of an existing tool. All parameters are optional;
|
|
81
|
+
* supply only the fields you want to change. Unspecified fields are left as-is.
|
|
82
|
+
* You can update both `"draft"` and `"active"` tools. Updating an active tool
|
|
83
|
+
* takes effect on the next agent run; any run already in progress continues
|
|
84
|
+
* with the configuration it loaded at start.
|
|
85
|
+
* Supplying `template` re-resolves the referenced AgentToolTemplate and patches
|
|
86
|
+
* the tool in place, preserving its `status`, `lookup_key`, `kind`, and agent
|
|
87
|
+
* association. Any other params you supply alongside `template` override the
|
|
88
|
+
* template defaults.
|
|
89
|
+
* Requires app scope. The authenticated caller must own the tool's parent agent.
|
|
90
|
+
* @param tool - Tool ID (`atl_...`) of the tool to update.
|
|
91
|
+
* @param input - Request body.
|
|
92
|
+
* @param input.async - When `true`, the tool executes asynchronously and the agent does not block waiting for a result. Applies to `"custom"` tools.
|
|
93
|
+
* @param input.builtin_tool_config - Configuration object for the built-in tool. Shape is defined by the catalog entry's `config_schema` for the tool's `builtin_tool_key`. Applies to `"builtin"` tools.
|
|
94
|
+
* @param input.config - Config ID (`cfg_...`) referencing the script or workflow graph that implements the tool handler. Applies to `"custom"` tools.
|
|
95
|
+
* @param input.description - Human-readable description of what the tool does, shown to the LLM as context. Applies primarily to `"custom"` tools.
|
|
96
|
+
* @param input.handler_type - Execution handler for the tool. One of `"script"` or `"workflow_graph"`. Applies to `"custom"` tools.
|
|
97
|
+
* @param input.instruction - Additional natural-language instruction provided to the LLM describing when and how to call this tool. Supplements the tool's `description`.
|
|
98
|
+
* @param input.lookup_key - Stable identifier you can use to look up this tool without its ID. Must be unique within the app.
|
|
99
|
+
* @param input.metadata - Arbitrary key-value metadata to attach to the tool. Replaces the existing metadata when supplied.
|
|
100
|
+
* @param input.name - Display name for the tool. Applies to `"custom"` tools.
|
|
101
|
+
* @param input.name_prefix - Per-instance namespace for built-in tools that support multiple instances per agent. Stamped onto LLM-facing tool names (e.g. `"org"` produces `"org_knowledge_search"`). Must match `^[a-z][a-z0-9_]*$` and be at most 24 characters.
|
|
102
|
+
* @param input.parameters - JSON Schema object describing the tool's input parameters. Replaces the existing parameter schema when supplied.
|
|
103
|
+
* @param input.parameters_config - Config ID (`cfg_...`) referencing a reusable JSON Schema definition for this tool's input parameters. Takes precedence over an inline `parameters` value.
|
|
104
|
+
* @param input.template - Config ID or lookup key of an AgentToolTemplate. When provided, re-resolves the template and patches the tool in place, preserving its `status`, `lookup_key`, `kind`, and agent association. Other params you supply alongside `template` override the template defaults.
|
|
105
|
+
* @returns The updated tool.
|
|
106
|
+
*/
|
|
21
107
|
async update(tool, input) {
|
|
22
108
|
return this.http.request(`/api/v1/agent_tools/${tool}`, { method: "PATCH", body: input });
|
|
23
109
|
}
|
|
110
|
+
/**
|
|
111
|
+
* Activate an agent tool
|
|
112
|
+
* Transitions a tool from `"draft"` status to `"active"`, making it available
|
|
113
|
+
* for the agent to use during runs. Only tools in `"draft"` status can be
|
|
114
|
+
* activated; calling this on an already-active tool is a no-op that returns the
|
|
115
|
+
* current tool state.
|
|
116
|
+
* Activation validates that all required configuration is present. For built-in
|
|
117
|
+
* tools, this means the `builtin_tool_key` must resolve to a registered tool
|
|
118
|
+
* type and any required integration must be connected. Returns 422 if
|
|
119
|
+
* prerequisite checks fail.
|
|
120
|
+
* Requires app scope. The authenticated caller must own the tool's parent agent.
|
|
121
|
+
* @param tool - Tool ID (`atl_...`) of the tool to activate.
|
|
122
|
+
* @returns The updated tool with `status: "active"`.
|
|
123
|
+
*/
|
|
24
124
|
async activate(tool) {
|
|
25
125
|
return this.http.request(`/api/v1/agent_tools/${tool}/activate`, { method: "POST" });
|
|
26
126
|
}
|
|
127
|
+
/**
|
|
128
|
+
* Deactivate an agent tool
|
|
129
|
+
* Transitions a tool from `"active"` status back to `"draft"`, removing it
|
|
130
|
+
* from the set of tools the agent can use during future runs. Calling this on a
|
|
131
|
+
* tool that is already in `"draft"` status is a no-op that returns the current
|
|
132
|
+
* tool state.
|
|
133
|
+
* Deactivation does not delete the tool or its configuration. To remove the
|
|
134
|
+
* tool permanently, use the delete endpoint.
|
|
135
|
+
* Requires app scope. The authenticated caller must own the tool's parent agent.
|
|
136
|
+
* @param tool - Tool ID (`atl_...`) of the tool to deactivate.
|
|
137
|
+
* @returns The updated tool with `status: "draft"`.
|
|
138
|
+
*/
|
|
27
139
|
async deactivate(tool) {
|
|
28
140
|
return this.http.request(`/api/v1/agent_tools/${tool}/deactivate`, { method: "POST" });
|
|
29
141
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent_tools.js","sourceRoot":"","sources":["../../../src/v1/resources/agent_tools.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,wEAAwE;AACxE,6BAA6B;
|
|
1
|
+
{"version":3,"file":"agent_tools.js","sourceRoot":"","sources":["../../../src/v1/resources/agent_tools.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,wEAAwE;AACxE,6BAA6B;AAK7B,MAAM,OAAO,iBAAiB;IACR;IAApB,YAAoB,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAExC;;;;;;;;;;;;;;;;OAgBG;IACH,KAAK,CAAC,IAAI,CAAC,MAA0C;QACnD,MAAM,KAAK,GAA6F,EAAE,CAAC;QAC3G,IAAI,MAAM,EAAE,KAAK,KAAK,SAAS,EAAE,CAAC;YAChC,KAAK,CAAC,OAAO,CAAC,GAAG,MAAM,EAAE,KAAK,CAAC;QACjC,CAAC;QACD,IAAI,MAAM,EAAE,IAAI,KAAK,SAAS,EAAE,CAAC;YAC/B,KAAK,CAAC,MAAM,CAAC,GAAG,MAAM,EAAE,IAAI,CAAC;QAC/B,CAAC;QAED,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,qBAAqB,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;IAC7D,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,KAAK,CAAC,OAAO;QACX,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,6BAA6B,CAAC,CAAC;IAC1D,CAAC;IAED;;;;;;;;;OASG;IACH,KAAK,CAAC,MAAM,CAAC,IAAY;QACvB,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,uBAAuB,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC;IAC/E,CAAC;IAED;;;;;;;;;OASG;IACH,KAAK,CAAC,GAAG,CAAC,IAAY;QACpB,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,uBAAuB,IAAI,EAAE,CAAC,CAAC;IAC1D,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,KAAK,CAAC,MAAM,CAAC,IAAY,EAAE,KAA4e;QACrgB,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,uBAAuB,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IAC5F,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,KAAK,CAAC,QAAQ,CAAC,IAAY;QACzB,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,uBAAuB,IAAI,WAAW,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IACvF,CAAC;IAED;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,UAAU,CAAC,IAAY;QAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,uBAAuB,IAAI,aAAa,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IACzF,CAAC;CACF"}
|