@hosty-sdk/app 0.54.0 → 0.55.0
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/dist/agent-workflow-tools.d.ts +1 -1
- package/dist/agent-workflow-tools.js +24 -4
- package/dist/agent.d.ts +4 -1
- package/dist/agent.js +5 -0
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type AgentSessionWorkflowTool } from "./agent.js";
|
|
2
2
|
export declare const workflowTools: (selected?: readonly AgentSessionWorkflowTool[]) => {
|
|
3
|
-
name: "task_executor_options" | "task_options" | "task_list" | "task_get" | "task_create" | "task_edit" | "task_action" | "task_result" | "task_fail" | "task_request_input" | "task_adopt" | "task_prepare_executor" | "task_delegate" | "task_wait" | "task_plan" | "task_bind_workspace" | "task_execution_get" | "subagent_profiles" | "subagent_spawn" | "subagent_status" | "subagent_wait";
|
|
3
|
+
name: "task_executor_options" | "task_options" | "task_list" | "task_get" | "task_create" | "task_edit" | "task_action" | "task_result" | "task_fail" | "task_request_input" | "task_adopt" | "task_prepare_executor" | "task_delegate" | "task_wait" | "task_plan" | "task_bind_workspace" | "task_execution_get" | "subagent_profiles" | "subagent_spawn" | "subagent_status" | "subagent_wait" | "profile_list" | "profile_options" | "profile_create" | "profile_edit" | "skill_list" | "skill_discover" | "skill_install";
|
|
4
4
|
description: string;
|
|
5
5
|
inputSchema: {
|
|
6
6
|
type: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AGENT_SESSION_WORKFLOW_TOOLS, AGENT_SUBAGENT_WORKFLOW_TOOLS } from "./agent.js";
|
|
1
|
+
import { AGENT_PROFILE_MANAGEMENT_WORKFLOW_TOOLS, AGENT_SESSION_WORKFLOW_TOOLS, AGENT_SUBAGENT_WORKFLOW_TOOLS } from "./agent.js";
|
|
2
2
|
const object = (properties, required = []) => ({ type: "object", properties, required, additionalProperties: false });
|
|
3
3
|
const id = { type: "string", format: "uuid" }, revision = { type: "integer", minimum: 1 }, counter = { type: "integer", minimum: 0 };
|
|
4
4
|
const text = (maxLength) => ({ type: "string", maxLength });
|
|
@@ -18,7 +18,20 @@ const result = object({ markdown: text(32000), resources }, ["markdown", "resour
|
|
|
18
18
|
const requestId = { ...id, description: "A fresh globally unique UUID for a new operation. Never reuse sample IDs or IDs from another chat or task. Retain this exact UUID and input only when recovering the same operation." };
|
|
19
19
|
const mutation = { requestId, expectedRevision: revision };
|
|
20
20
|
const writeScope = object({ mode: { enum: ["read", "write", "exclusive"] }, paths: { type: "array", items: text(2000), maxItems: 100 } }, ["mode", "paths"]);
|
|
21
|
+
const optionalText = (maxLength) => ({ oneOf: [text(maxLength), { type: "null" }] });
|
|
22
|
+
const profileFields = {
|
|
23
|
+
name: text(100), description: text(2000), instructions: text(8000), connectionId: optionalText(128),
|
|
24
|
+
model: optionalText(256), reasoningEffort: optionalText(128), skillIds: { type: "array", items: text(64), maxItems: 202 },
|
|
25
|
+
};
|
|
26
|
+
const gitSkillSource = object({ repository: text(2048), ref: text(256), path: text(1024), connectionId: optionalText(200) }, ["repository"]);
|
|
21
27
|
const schemas = {
|
|
28
|
+
"profile-list": object({ profileId: text(200) }),
|
|
29
|
+
"profile-options": object({ connectionId: text(128) }),
|
|
30
|
+
"profile-create": object({ expectedRevision: counter, profile: object(profileFields, ["name"]) }, ["expectedRevision", "profile"]),
|
|
31
|
+
"profile-edit": object({ profileId: text(200), expectedRevision: counter, changes: object(profileFields) }, ["profileId", "expectedRevision", "changes"]),
|
|
32
|
+
"skill-list": object({ includeSourceConnections: { type: "boolean" } }),
|
|
33
|
+
"skill-discover": object({ source: gitSkillSource }, ["source"]),
|
|
34
|
+
"skill-install": object({ source: gitSkillSource, commit: text(64), paths: { type: "array", items: text(1024), minItems: 1, maxItems: 200 } }, ["source", "commit", "paths"]),
|
|
22
35
|
"subagent-profiles": object({}),
|
|
23
36
|
"subagent-spawn": object({ requestId, profileId: text(200), profileRevision: revision, prompt: text(32000), title: text(200) }, ["requestId", "profileId", "profileRevision", "prompt"]),
|
|
24
37
|
"subagent-status": object({ childSessionId: id }),
|
|
@@ -52,6 +65,13 @@ const schemas = {
|
|
|
52
65
|
"task-execution-get": object({ cursor: text(200), limit: { type: "integer", minimum: 1, maximum: 100 } }),
|
|
53
66
|
};
|
|
54
67
|
const descriptions = {
|
|
68
|
+
"profile-list": "List saved profile summaries and the directory revision. Supply a profile ID to read its configuration.",
|
|
69
|
+
"profile-options": "List available connections. Supply one connection ID to read its model and reasoning choices.",
|
|
70
|
+
"profile-create": "Create a reusable profile at the current directory revision. Attach installed skills by their stable IDs.",
|
|
71
|
+
"profile-edit": "Edit the named fields of a reusable profile at the current directory revision. Read the stored configuration before editing.",
|
|
72
|
+
"skill-list": "List installed skill packages with stable IDs, descriptions and provenance. Set includeSourceConnections to see the operator's source connection IDs and labels for private Git repositories.",
|
|
73
|
+
"skill-discover": "Read skill candidates from a Git source. Use their descriptions for recommendations and retain the commit and exact paths for installation.",
|
|
74
|
+
"skill-install": "Install the selected package paths into the shared skill library at the commit returned by discovery. Use the returned stable IDs to attach them to profiles.",
|
|
55
75
|
"subagent-profiles": "List saved agent profiles and their current revisions for a child chat.",
|
|
56
76
|
"subagent-spawn": "Open a child chat with the selected profile and prompt. Reuse the request UUID only to recover this exact delegation.",
|
|
57
77
|
"subagent-status": "Read the state and available results of this chat’s children. Supply a child session ID to inspect one.",
|
|
@@ -75,9 +95,9 @@ const descriptions = {
|
|
|
75
95
|
"task-execution-get": "Read this session's task binding, root plan, limits and bounded child results. Before adoption, read the current session revisions and mode.",
|
|
76
96
|
};
|
|
77
97
|
/** Fixed business tools only. Their schemas grant no native, Core MCP or source authority. */
|
|
78
|
-
const knownTools = [...AGENT_SESSION_WORKFLOW_TOOLS, ...AGENT_SUBAGENT_WORKFLOW_TOOLS];
|
|
98
|
+
const knownTools = [...AGENT_SESSION_WORKFLOW_TOOLS, ...AGENT_SUBAGENT_WORKFLOW_TOOLS, ...AGENT_PROFILE_MANAGEMENT_WORKFLOW_TOOLS];
|
|
79
99
|
export const workflowTools = (selected = AGENT_SESSION_WORKFLOW_TOOLS) => knownTools.filter(name => selected.includes(name)).map(name => {
|
|
80
100
|
const action = name.replaceAll("_", "-");
|
|
81
|
-
return { name, description: descriptions[action], inputSchema: object(name.startsWith("
|
|
82
|
-
annotations: { readOnlyHint: ["subagent_profiles", "subagent_status", "task_executor_options", "task_options", "task_list", "task_get", "task_execution_get"].includes(name), destructiveHint: name === "task_action", openWorldHint:
|
|
101
|
+
return { name, description: descriptions[action], inputSchema: object(name.startsWith("task_") ? { input: schemas[action], source: provider } : { input: schemas[action] }, ["input"]),
|
|
102
|
+
annotations: { readOnlyHint: ["profile_list", "profile_options", "skill_list", "skill_discover", "subagent_profiles", "subagent_status", "task_executor_options", "task_options", "task_list", "task_get", "task_execution_get"].includes(name), destructiveHint: name === "task_action", openWorldHint: name === "skill_discover" || name === "skill_install" } };
|
|
83
103
|
});
|
package/dist/agent.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ export declare const AGENT_CAPABILITIES: {
|
|
|
30
30
|
readonly mcpPolicy: "mcp.policy-update";
|
|
31
31
|
readonly consumerWorkflow: "workflow.consumer";
|
|
32
32
|
readonly sessionSubagents: "workflow.subagents";
|
|
33
|
+
readonly profileManagement: "workflow.profile-management";
|
|
33
34
|
};
|
|
34
35
|
export type AgentCapability = typeof AGENT_CAPABILITIES[keyof typeof AGENT_CAPABILITIES] | (string & {});
|
|
35
36
|
export type AgentLimits = {
|
|
@@ -507,7 +508,9 @@ export type AgentOperation = "capabilities" | "connections.list" | "connections.
|
|
|
507
508
|
export declare const AGENT_SESSION_WORKFLOW_TOOLS: readonly ["task_executor_options", "task_options", "task_list", "task_get", "task_create", "task_edit", "task_action", "task_result", "task_fail", "task_request_input", "task_adopt", "task_prepare_executor", "task_delegate", "task_wait", "task_plan", "task_bind_workspace", "task_execution_get"];
|
|
508
509
|
/** Optional business workflow owned by the invoking consumer, separate from native execution. */
|
|
509
510
|
export declare const AGENT_SUBAGENT_WORKFLOW_TOOLS: readonly ["subagent_profiles", "subagent_spawn", "subagent_status", "subagent_wait"];
|
|
510
|
-
|
|
511
|
+
/** Profile and skill management is separately selected for an operator's conversation. */
|
|
512
|
+
export declare const AGENT_PROFILE_MANAGEMENT_WORKFLOW_TOOLS: readonly ["profile_list", "profile_options", "profile_create", "profile_edit", "skill_list", "skill_discover", "skill_install"];
|
|
513
|
+
export type AgentSessionWorkflowTool = typeof AGENT_SESSION_WORKFLOW_TOOLS[number] | typeof AGENT_SUBAGENT_WORKFLOW_TOOLS[number] | typeof AGENT_PROFILE_MANAGEMENT_WORKFLOW_TOOLS[number];
|
|
511
514
|
export type AgentSessionWorkflowBinding = {
|
|
512
515
|
executor: ProviderRef;
|
|
513
516
|
sessionId: string;
|
package/dist/agent.js
CHANGED
|
@@ -11,6 +11,7 @@ export const AGENT_CAPABILITIES = {
|
|
|
11
11
|
predictions: "predictions", connectionUsage: "connections.usage",
|
|
12
12
|
approvalMode: "configuration.approval-mode",
|
|
13
13
|
mcpPolicy: "mcp.policy-update", consumerWorkflow: "workflow.consumer", sessionSubagents: "workflow.subagents",
|
|
14
|
+
profileManagement: "workflow.profile-management",
|
|
14
15
|
};
|
|
15
16
|
export class AgentApiError extends Error {
|
|
16
17
|
code;
|
|
@@ -36,3 +37,7 @@ export const AGENT_SESSION_WORKFLOW_TOOLS = [
|
|
|
36
37
|
];
|
|
37
38
|
/** Optional business workflow owned by the invoking consumer, separate from native execution. */
|
|
38
39
|
export const AGENT_SUBAGENT_WORKFLOW_TOOLS = ["subagent_profiles", "subagent_spawn", "subagent_status", "subagent_wait"];
|
|
40
|
+
/** Profile and skill management is separately selected for an operator's conversation. */
|
|
41
|
+
export const AGENT_PROFILE_MANAGEMENT_WORKFLOW_TOOLS = [
|
|
42
|
+
"profile_list", "profile_options", "profile_create", "profile_edit", "skill_list", "skill_discover", "skill_install",
|
|
43
|
+
];
|
package/package.json
CHANGED