@ziggs-ai/agent-sdk 0.11.1 → 0.12.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/CHANGELOG.md +11 -0
- package/dist/AgentHost.d.ts +27 -5
- package/dist/AgentHost.js +106 -14
- package/dist/agent/claudeSdkProtocol.d.ts +1 -1
- package/dist/agent/claudeSdkProtocol.js +3 -2
- package/dist/agent/claudeSdkTools.js +46 -10
- package/dist/index.d.ts +4 -2
- package/dist/index.js +8 -1
- package/dist/runtime/PromptBuilder.js +13 -1
- package/dist/server/ConnectionPool.d.ts +19 -0
- package/dist/server/ConnectionPool.js +30 -0
- package/dist/server/OutboxBuffer.d.ts +1 -1
- package/dist/server/ZiggsEffectHandler.d.ts +1 -1
- package/dist/server/ZiggsEffectHandler.js +6 -2
- package/dist/server/agreements/AgreementService.d.ts +8 -3
- package/dist/server/agreements/AgreementService.js +10 -5
- package/dist/server/inboxLoop.d.ts +6 -6
- package/dist/server/inboxLoop.js +31 -18
- package/dist/server/requestMatch.d.ts +5 -0
- package/dist/server/{questMatch.js → requestMatch.js} +2 -2
- package/dist/server/runLauncher.js +24 -3
- package/dist/server/tools/index.d.ts +1 -1
- package/dist/server/tools/index.js +1 -1
- package/dist/server/tools/tier1/protocolRunner.js +2 -2
- package/dist/server/tools/tier1/protocolTools.js +7 -7
- package/dist/server/tools/tier2/marketplaceTools.js +2 -2
- package/dist/server/tools/tier2/mcpConnectionTools.d.ts +33 -0
- package/dist/server/tools/tier2/mcpConnectionTools.js +138 -6
- package/dist/server/tools/tier2/paymentTools.d.ts +0 -8
- package/dist/server/tools/tier2/paymentTools.js +8 -12
- package/dist/types.d.ts +23 -4
- package/package.json +2 -2
- package/dist/server/questMatch.d.ts +0 -5
|
@@ -1,16 +1,12 @@
|
|
|
1
|
-
import { PAYMENT_CAPABILITIES, paymentBalanceCapability
|
|
1
|
+
import { PAYMENT_CAPABILITIES, paymentBalanceCapability } from '@ziggs-ai/api-client';
|
|
2
2
|
import { toolFromCapability, toolsFromCapabilities } from '../../../tools/capabilityAdapter.js';
|
|
3
3
|
// the wallet toolset is defined once in api-client's shared
|
|
4
|
-
// capability layer; this file only adapts it onto the SDK surface.
|
|
5
|
-
//
|
|
6
|
-
//
|
|
4
|
+
// capability layer; this file only adapts it onto the SDK surface.
|
|
5
|
+
//
|
|
6
|
+
// The movement verbs are gone from both agent surfaces —
|
|
7
|
+
// transfer, hold, release, wait_for_approval, resolve_wallet, and the three
|
|
8
|
+
// grant mutations. Points are a meter, and an agent does not move the meter on
|
|
9
|
+
// its own. Agreements still settle in points server-side, so nothing an agent
|
|
10
|
+
// needs in order to be paid went with them. Reading your own balance survives.
|
|
7
11
|
export const paymentBalanceTool = toolFromCapability(paymentBalanceCapability);
|
|
8
|
-
export const paymentTransferTool = toolFromCapability(paymentTransferCapability);
|
|
9
|
-
export const paymentWaitForApprovalTool = toolFromCapability(paymentWaitForApprovalCapability);
|
|
10
|
-
export const paymentHoldTool = toolFromCapability(paymentHoldCapability);
|
|
11
|
-
export const paymentReleaseTool = toolFromCapability(paymentReleaseCapability);
|
|
12
|
-
export const paymentResolveWalletTool = toolFromCapability(paymentResolveWalletCapability);
|
|
13
|
-
export const paymentIssueGrantTool = toolFromCapability(paymentIssueGrantCapability);
|
|
14
|
-
export const paymentAttenuateGrantTool = toolFromCapability(paymentAttenuateGrantCapability);
|
|
15
|
-
export const paymentRevokeGrantTool = toolFromCapability(paymentRevokeGrantCapability);
|
|
16
12
|
export const PAYMENT_TOOLS = toolsFromCapabilities(PAYMENT_CAPABILITIES);
|
package/dist/types.d.ts
CHANGED
|
@@ -328,11 +328,23 @@ export interface LlmResponse {
|
|
|
328
328
|
completionTokens?: number;
|
|
329
329
|
};
|
|
330
330
|
}
|
|
331
|
+
/**
|
|
332
|
+
* One participant on the snapshot roster. `kind` is the declared holder kind the
|
|
333
|
+
* server projection stamped, so a consumer reads what a participant IS instead
|
|
334
|
+
* of inferring it from which array the row arrived in. Optional because a
|
|
335
|
+
* backend that predates it simply omits the field.
|
|
336
|
+
*/
|
|
337
|
+
export interface SnapshotParticipant {
|
|
338
|
+
role?: string;
|
|
339
|
+
kind?: string;
|
|
340
|
+
isYou?: boolean;
|
|
341
|
+
[key: string]: unknown;
|
|
342
|
+
}
|
|
331
343
|
export interface ContextSnapshot {
|
|
332
344
|
history: HistoryEntry[];
|
|
333
345
|
agreements: unknown[];
|
|
334
|
-
agents:
|
|
335
|
-
users:
|
|
346
|
+
agents: SnapshotParticipant[];
|
|
347
|
+
users: SnapshotParticipant[];
|
|
336
348
|
timelineSummary?: string | null;
|
|
337
349
|
latestSequence?: string | null;
|
|
338
350
|
unavailable?: boolean;
|
|
@@ -472,10 +484,17 @@ export type Effect = {
|
|
|
472
484
|
stateId?: string;
|
|
473
485
|
/** Replay-stable write keys for this wake — write-capable tools derive their idempotency key from here, never from the LLM. */
|
|
474
486
|
writeKeys?: DeliveryWriteKeys;
|
|
475
|
-
}
|
|
487
|
+
}
|
|
488
|
+
/**
|
|
489
|
+
* `receiverId` is optional: in a room with one other participant the backend
|
|
490
|
+
* resolves the recipient from the room itself, which is the only answer
|
|
491
|
+
* available when the wake's sender belongs to a DIFFERENT room.
|
|
492
|
+
* Name a receiver whenever the room holds more than two parties.
|
|
493
|
+
*/
|
|
494
|
+
| {
|
|
476
495
|
kind: 'send-message';
|
|
477
496
|
sessionId: string;
|
|
478
|
-
receiverId
|
|
497
|
+
receiverId?: string;
|
|
479
498
|
text: string;
|
|
480
499
|
messageId?: string;
|
|
481
500
|
} | {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ziggs-ai/agent-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "Agent framework SDK for building autonomous agents on the Ziggs platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@anthropic-ai/claude-agent-sdk": "^0.3.204",
|
|
27
27
|
"@anthropic-ai/sdk": "^0.110.0",
|
|
28
28
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
29
|
-
"@ziggs-ai/api-client": "0.
|
|
29
|
+
"@ziggs-ai/api-client": "0.11.0",
|
|
30
30
|
"ajv": "^8.17.1",
|
|
31
31
|
"dotenv": "^17.2.3",
|
|
32
32
|
"openai": "^4.0.0",
|