@ziggs-ai/agent-sdk 0.48.7 → 0.48.8
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/CHANGELOG.md +4 -0
- package/dist/brain/claudeSdkTools.d.ts +2 -2
- package/dist/brain/claudeSdkTools.js +7 -2
- package/dist/platform/tasks/TaskService.d.ts +2 -2
- package/dist/platform/tasks/TaskService.js +3 -1
- package/dist/platform/tools/index.d.ts +1 -1
- package/dist/platform/tools/index.js +1 -1
- package/dist/platform/tools/tier2/taskTools.d.ts +1 -0
- package/dist/platform/tools/tier2/taskTools.js +4 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ToolDefinition } from '../tools/defineTool.js';
|
|
2
|
-
import { cancelTaskTool, listTasksTool, delegateTaskTool } from '../platform/tools/tier2/taskTools.js';
|
|
2
|
+
import { cancelTaskTool, listTasksTool, delegateTaskTool, passTaskOnTool } from '../platform/tools/tier2/taskTools.js';
|
|
3
3
|
import type { EffectHandler, DeliveryWriteKeys } from '../types.js';
|
|
4
4
|
import type { MemoryStore } from '../memory/MemoryStore.js';
|
|
5
5
|
export interface ClaudeSdkToolContext extends Record<string, unknown> {
|
|
@@ -24,5 +24,5 @@ export interface ClaudeSdkToolContext extends Record<string, unknown> {
|
|
|
24
24
|
}
|
|
25
25
|
export declare const contextSnapshotTool: ToolDefinition;
|
|
26
26
|
export declare const messageSendTool: ToolDefinition;
|
|
27
|
-
export { listTasksTool, cancelTaskTool, delegateTaskTool };
|
|
27
|
+
export { listTasksTool, cancelTaskTool, delegateTaskTool, passTaskOnTool };
|
|
28
28
|
export declare const CLAUDE_SDK_TOOLS: ToolDefinition[];
|
|
@@ -3,7 +3,7 @@ import { MESSAGING_CAPABILITIES } from '@ziggs-ai/api-client';
|
|
|
3
3
|
import { toolsFromCapabilities } from '../tools/capabilityAdapter.js';
|
|
4
4
|
import { defineTool } from '../tools/defineTool.js';
|
|
5
5
|
import { listGrantsTool } from '../platform/tools/tier2/grantsTools.js';
|
|
6
|
-
import { cancelTaskTool, listTasksTool, delegateTaskTool } from '../platform/tools/tier2/taskTools.js';
|
|
6
|
+
import { cancelTaskTool, listTasksTool, delegateTaskTool, passTaskOnTool } from '../platform/tools/tier2/taskTools.js';
|
|
7
7
|
import { BUCKET_TOOLS } from '../platform/tools/tier2/bucketTools.js';
|
|
8
8
|
// Optional message history stays bounded; deeper history is an explicit read.
|
|
9
9
|
const DEFAULT_SNAPSHOT_MAX_MESSAGES = 12;
|
|
@@ -75,7 +75,11 @@ export const messageSendTool = defineTool('message_send', { command: { type: 'ob
|
|
|
75
75
|
// task_list IS here: MCP delegates have ziggs_task_list; the hosted
|
|
76
76
|
// Claude surface previously had no way to enumerate its own open tasks (reads
|
|
77
77
|
// were prompt-injected only). Same GET /tasks capability as the MCP tool.
|
|
78
|
-
|
|
78
|
+
//
|
|
79
|
+
// task_pass_on IS here: an agent that opened a request is the one who chases
|
|
80
|
+
// it, and passing it up when nobody answered is making someone else the
|
|
81
|
+
// assignee. Without it the agent can only cancel and ask again.
|
|
82
|
+
export { listTasksTool, cancelTaskTool, delegateTaskTool, passTaskOnTool };
|
|
79
83
|
/**
|
|
80
84
|
* A new conversation starts in a bucket made on purpose: the agent creates one
|
|
81
85
|
* with the people it is for and sends inside it. A file reaches people the same
|
|
@@ -90,6 +94,7 @@ export const CLAUDE_SDK_TOOLS = [
|
|
|
90
94
|
listGrantsTool,
|
|
91
95
|
listTasksTool,
|
|
92
96
|
cancelTaskTool,
|
|
97
|
+
passTaskOnTool,
|
|
93
98
|
delegateTaskTool,
|
|
94
99
|
...toolsFromCapabilities(MESSAGING_CAPABILITIES),
|
|
95
100
|
...BUCKET_DEFAULTS,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TaskUpdateState } from '@ziggs-ai/contracts';
|
|
2
2
|
import type { WriteSource } from '@ziggs-ai/api-client';
|
|
3
|
-
import { type Task } from '@ziggs-ai/api-client';
|
|
3
|
+
import { type HeldTaskCreate, type Task } from '@ziggs-ai/api-client';
|
|
4
4
|
import type { CountTasksFilters, CreateTaskData, TaskChargeStatement } from '@ziggs-ai/api-client';
|
|
5
5
|
export declare class TaskService {
|
|
6
6
|
private creds;
|
|
@@ -9,7 +9,7 @@ export declare class TaskService {
|
|
|
9
9
|
getTask(taskId: string): Promise<Task>;
|
|
10
10
|
getActiveTasksForAgent(agentId: string): Promise<Task[]>;
|
|
11
11
|
getSubtasks(parentTaskId: string): Promise<Task[]>;
|
|
12
|
-
spawnUnderAgreement(agreementId: string, taskData: Omit<CreateTaskData, 'agreementId'>): Promise<Task>;
|
|
12
|
+
spawnUnderAgreement(agreementId: string, taskData: Omit<CreateTaskData, 'agreementId'>): Promise<Task | HeldTaskCreate>;
|
|
13
13
|
updateState(taskId: string, state: TaskUpdateState, result?: unknown, idempotencyKey?: string, sources?: WriteSource[], charge?: TaskChargeStatement): Promise<{
|
|
14
14
|
ok: true;
|
|
15
15
|
taskId: string;
|
|
@@ -48,7 +48,9 @@ export class TaskService {
|
|
|
48
48
|
throw new Error('TaskService.spawnUnderAgreement: agreementId is required');
|
|
49
49
|
try {
|
|
50
50
|
const result = await createTask({ ...taskData, agreementId }, this.creds);
|
|
51
|
-
runtimeLog.info('TaskService',
|
|
51
|
+
runtimeLog.info('TaskService', 'handOver' in result
|
|
52
|
+
? `Task under agreement ${agreementId} waits on approval card ${result.handOver.agreementId}`
|
|
53
|
+
: `Task spawned under agreement ${agreementId}: ${result?.taskId || 'unknown'}`);
|
|
52
54
|
return result;
|
|
53
55
|
}
|
|
54
56
|
catch (error) {
|
|
@@ -25,7 +25,7 @@ export { CONNECTION_TOOLS, connectionProxyTool, connectionListGrantsTool, reques
|
|
|
25
25
|
export { CONTEXT_TOOLS, contextReadTool, accessRequestTool, contextDelegateTool, contextExpandReachTool, contextDiscoverGrantableTool, } from './tier2/contextTools.js';
|
|
26
26
|
export { GRANTS_TOOLS, listGrantsTool } from './tier2/grantsTools.js';
|
|
27
27
|
export { BUCKET_TOOLS } from './tier2/bucketTools.js';
|
|
28
|
-
export { TASK_TOOLS, listTasksTool, cancelTaskTool, delegateTaskTool } from './tier2/taskTools.js';
|
|
28
|
+
export { TASK_TOOLS, listTasksTool, cancelTaskTool, passTaskOnTool, delegateTaskTool } from './tier2/taskTools.js';
|
|
29
29
|
export { PLAN_TOOLS, taskReplacePlanTool } from './tier2/planTools.js';
|
|
30
30
|
export { LINK_TOOLS, linkProposeTool, linkListTool, } from './tier2/linkTools.js';
|
|
31
31
|
export { INTRODUCTION_TOOLS, introductionMintTool, introductionRedeemTool, introductionListTool, introductionRevokeTool, } from './tier2/introductionTools.js';
|
|
@@ -29,7 +29,7 @@ export { CONTEXT_TOOLS, contextReadTool, accessRequestTool, contextDelegateTool,
|
|
|
29
29
|
// payment_list_grants). Always-available on the hosted agent — see CLAUDE_SDK_TOOLS.
|
|
30
30
|
export { GRANTS_TOOLS, listGrantsTool } from './tier2/grantsTools.js';
|
|
31
31
|
export { BUCKET_TOOLS } from './tier2/bucketTools.js';
|
|
32
|
-
export { TASK_TOOLS, listTasksTool, cancelTaskTool, delegateTaskTool } from './tier2/taskTools.js';
|
|
32
|
+
export { TASK_TOOLS, listTasksTool, cancelTaskTool, passTaskOnTool, delegateTaskTool } from './tier2/taskTools.js';
|
|
33
33
|
export { PLAN_TOOLS, taskReplacePlanTool } from './tier2/planTools.js';
|
|
34
34
|
// links (agreements with engagementKind 'link') — cross-org reach.
|
|
35
35
|
///1022: the rail is two tools; propose/claim/revoke ride the
|
|
@@ -2,4 +2,5 @@ import type { ToolDefinition } from '../../../tools/defineTool.js';
|
|
|
2
2
|
export declare const listTasksTool: ToolDefinition;
|
|
3
3
|
export declare const delegateTaskTool: ToolDefinition;
|
|
4
4
|
export declare const cancelTaskTool: ToolDefinition;
|
|
5
|
+
export declare const passTaskOnTool: ToolDefinition;
|
|
5
6
|
export declare const TASK_TOOLS: ToolDefinition[];
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import { delegateTaskCapability, cancelTaskCapability, listTasksCapability, TASK_CAPABILITIES } from '@ziggs-ai/api-client';
|
|
1
|
+
import { delegateTaskCapability, cancelTaskCapability, listTasksCapability, passTaskOnCapability, TASK_CAPABILITIES } from '@ziggs-ai/api-client';
|
|
2
2
|
import { toolFromCapability, toolsFromCapabilities } from '../../../tools/capabilityAdapter.js';
|
|
3
3
|
// GET /tasks, defined once in api-client. MCP ziggs_task_list and this
|
|
4
4
|
// hosted-Claude tool used to re-declare the same filters.
|
|
5
5
|
export const listTasksTool = toolFromCapability(listTasksCapability);
|
|
6
6
|
export const delegateTaskTool = toolFromCapability(delegateTaskCapability);
|
|
7
7
|
export const cancelTaskTool = toolFromCapability(cancelTaskCapability);
|
|
8
|
+
// The chaser's move: a request nobody answered in time goes up by making
|
|
9
|
+
// someone else its assignee.
|
|
10
|
+
export const passTaskOnTool = toolFromCapability(passTaskOnCapability);
|
|
8
11
|
export const TASK_TOOLS = toolsFromCapabilities(TASK_CAPABILITIES);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ziggs-ai/agent-sdk",
|
|
3
|
-
"version": "0.48.
|
|
3
|
+
"version": "0.48.8",
|
|
4
4
|
"description": "Agent framework SDK for building autonomous agents on the Ziggs platform",
|
|
5
5
|
"homepage": "https://ziggsai.com/docs",
|
|
6
6
|
"bugs": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"@anthropic-ai/claude-agent-sdk": "^0.3.284",
|
|
31
31
|
"@anthropic-ai/sdk": "^0.110.0",
|
|
32
32
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
33
|
-
"@ziggs-ai/api-client": "0.42.
|
|
33
|
+
"@ziggs-ai/api-client": "0.42.7",
|
|
34
34
|
"@ziggs-ai/contracts": "0.50.1",
|
|
35
35
|
"ajv": "^8.17.1",
|
|
36
36
|
"dotenv": "^17.2.3",
|