@ziggs-ai/api-client 0.42.5 → 0.42.6
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 +6 -0
- package/dist/capabilities/buckets.js +2 -2
- package/dist/capabilities/context.js +1 -1
- package/dist/capabilities/discovery.js +1 -3
- package/dist/capabilities/everyday.d.ts +2 -4
- package/dist/capabilities/everyday.js +2 -4
- package/dist/capabilities/links.js +2 -3
- package/dist/capabilities/mcpBriefs.js +2 -2
- package/dist/capabilities/messaging.js +1 -1
- package/dist/http/BucketsClient.d.ts +3 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.42.6
|
|
6
|
+
|
|
7
|
+
- Messaging accepts first messages and replies without a bucket; SDK and MCP guidance keep readers and delivery independent from optional filing.
|
|
8
|
+
|
|
9
|
+
- `bucket_send` with `replyTo` (and `BucketsClient.sendMessage` with `relationships.replyToMessageId`): the reply is also read by everyone who read the message it answers, so a bucket never takes anyone out of a chat; from a run, only those the run may write to. A send that names nothing it answers is still read by the bucket's people only. The server also puts a reply into every other bucket that holds the message it answers and whose people all read it. `recipients` are picked among all of these readers.
|
|
10
|
+
|
|
5
11
|
## 0.42.5
|
|
6
12
|
|
|
7
13
|
## 0.42.4
|
|
@@ -237,7 +237,7 @@ export const bucketSendCapability = {
|
|
|
237
237
|
names: { sdk: 'bucket_send', mcp: 'ziggs_bucket_send' },
|
|
238
238
|
title: 'Send in a bucket',
|
|
239
239
|
descriptions: {
|
|
240
|
-
sdk: "Send a message inside a bucket. Its readers are the bucket's people;
|
|
240
|
+
sdk: "Send a message inside a bucket. Its readers are the bucket's people; with replyTo, also everyone who read the message it answers. Name recipients among the readers. To reach anyone else, add them with bucket_add_members first. A request wakes the agents it is delivered to. With page, the message carries an HTML page: its thread shows as that page.",
|
|
241
241
|
},
|
|
242
242
|
annotation: 'destructive',
|
|
243
243
|
needsAgentId: true,
|
|
@@ -252,7 +252,7 @@ export const bucketSendCapability = {
|
|
|
252
252
|
recipients: {
|
|
253
253
|
type: 'array',
|
|
254
254
|
items: { type: 'string' },
|
|
255
|
-
description: 'Who is told, among the
|
|
255
|
+
description: 'Who is told, among the readers. Under work, name at least one person the work is with.',
|
|
256
256
|
},
|
|
257
257
|
intent: { type: 'string', enum: ['fyi', 'request'] },
|
|
258
258
|
replyTo: { type: 'string', description: 'The message this answers. Not for a new page.' },
|
|
@@ -272,7 +272,7 @@ const OPEN_REF_PARAMS = {
|
|
|
272
272
|
};
|
|
273
273
|
function resumeResource(kind, id, env) {
|
|
274
274
|
// After a send grant is approved there is nothing to read: send to the destination.
|
|
275
|
-
//
|
|
275
|
+
// Offer an optional shared bucket with the newly reachable destination.
|
|
276
276
|
if (kind === 'contact')
|
|
277
277
|
return { tool: env.surface === 'mcp' ? 'ziggs_bucket_create' : 'bucket_create', args: { name: 'Conversation', audience: [id] } };
|
|
278
278
|
const tool = kind === 'message' ? 'message_read' : 'open';
|
|
@@ -34,8 +34,6 @@ export const agentSearchCapability = {
|
|
|
34
34
|
throw new Error(result.error ?? result.message ?? 'search failed');
|
|
35
35
|
}
|
|
36
36
|
const send = env.surface === 'mcp' ? 'ziggs_message_send' : 'message_send';
|
|
37
|
-
const bucketCreate = env.surface === 'mcp' ? 'ziggs_bucket_create' : 'bucket_create';
|
|
38
|
-
const bucketSend = env.surface === 'mcp' ? 'ziggs_bucket_send' : 'bucket_send';
|
|
39
37
|
const linkList = env.surface === 'mcp' ? 'ziggs_link_list' : 'link_list';
|
|
40
38
|
const marketplace = env.surface === 'mcp' ? 'ziggs_marketplace_view' : 'marketplace_view';
|
|
41
39
|
const request = env.surface === 'mcp' ? 'ziggs_agreement_request' : 'agreement_request';
|
|
@@ -43,7 +41,7 @@ export const agentSearchCapability = {
|
|
|
43
41
|
const messageThem = people.length
|
|
44
42
|
? {
|
|
45
43
|
people,
|
|
46
|
-
peopleNote: `These are teammates whose name matched. To message the person,
|
|
44
|
+
peopleNote: `These are teammates whose name matched. To message the person, use ${send} with their userId in the command audience and deliveries; which of their agents answers is theirs to decide.`,
|
|
47
45
|
}
|
|
48
46
|
: {};
|
|
49
47
|
const hired = await hireNotes(result.agents ?? [], env);
|
|
@@ -16,10 +16,8 @@ export declare const EVERYDAY_MCP_TOOLS: readonly ["ziggs_inbox", "ziggs_inbox_p
|
|
|
16
16
|
/** Everyday MCP tools the hosted brain does not register. */
|
|
17
17
|
export declare const EVERYDAY_NO_SDK_TWIN: readonly ["ziggs_inbox", "ziggs_inbox_peek", "ziggs_inbox_ack", "ziggs_context_revoke_grant"];
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* with their schemas. The MCP door keeps its size: there they stay in the
|
|
22
|
-
* catalog.
|
|
19
|
+
* Optional organization tools loaded by the hosted brain. Plain messaging
|
|
20
|
+
* needs neither of them. The MCP door keeps these in the catalog.
|
|
23
21
|
*/
|
|
24
22
|
export declare const EVERYDAY_SDK_ONLY: readonly ["bucket_create", "bucket_send"];
|
|
25
23
|
/** SDK names of the everyday set: the MCP list's twins in its order, then the hosted-only ones. */
|
|
@@ -39,10 +39,8 @@ export const EVERYDAY_NO_SDK_TWIN = [
|
|
|
39
39
|
];
|
|
40
40
|
const noSdkTwin = new Set(EVERYDAY_NO_SDK_TWIN);
|
|
41
41
|
/**
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
* with their schemas. The MCP door keeps its size: there they stay in the
|
|
45
|
-
* catalog.
|
|
42
|
+
* Optional organization tools loaded by the hosted brain. Plain messaging
|
|
43
|
+
* needs neither of them. The MCP door keeps these in the catalog.
|
|
46
44
|
*/
|
|
47
45
|
export const EVERYDAY_SDK_ONLY = ['bucket_create', 'bucket_send'];
|
|
48
46
|
/** SDK names of the everyday set: the MCP list's twins in its order, then the hosted-only ones. */
|
|
@@ -8,9 +8,8 @@ export function webAppOrigin(env) {
|
|
|
8
8
|
}
|
|
9
9
|
/** Reach and resource sharing are separate operations with independent consent. */
|
|
10
10
|
export function linkIsReachOnly(env) {
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
return `A link is reach-only and shares no context. To talk, start a bucket with ${create} naming the returned peer.id in audience (never a display face in parties), then ${send} in it. Sharing an artifact or delegating a grant is a separate operation with its own consent.`;
|
|
11
|
+
const send = env.surface === 'mcp' ? 'ziggs_message_send' : 'message_send';
|
|
12
|
+
return `A link is reach-only and shares no context. To talk, use ${send} with the returned peer.id in the command audience and deliveries (never a display face in parties). A bucket is optional. Sharing an artifact or delegating a grant is a separate operation with its own consent.`;
|
|
14
13
|
}
|
|
15
14
|
const LINK_STATUSES = ['active', 'open', 'cancelled', 'all'];
|
|
16
15
|
/**
|
|
@@ -165,7 +165,7 @@ const BRIEFS = {
|
|
|
165
165
|
ziggs_artifact_find: {
|
|
166
166
|
does: 'Searches artifacts you can read by name, filename or body. coverage and notSearched say what was and was not searched.',
|
|
167
167
|
},
|
|
168
|
-
ziggs_message_send: { does: 'Sends
|
|
168
|
+
ziggs_message_send: { does: 'Sends the canonical command for first messages and replies with independent readers and recipients. No bucket is required; filing is optional.', changes: 'delivers a message and grants its readers access; a request wakes the agents it reaches' },
|
|
169
169
|
ziggs_message_replies: { does: 'Reads authorized causal replies by messageId; a reference grants no access and receipt expiry does not erase history.' },
|
|
170
170
|
ziggs_message_read: { does: 'Reads an exact message by messageId under current access and execution policy. Does not acknowledge its receipt.' },
|
|
171
171
|
ziggs_message_list: { does: 'Queries authorized messages by participants, agreement or task. Filters select history, not authority.' },
|
|
@@ -319,7 +319,7 @@ const BRIEFS = {
|
|
|
319
319
|
changes: 'adds them',
|
|
320
320
|
},
|
|
321
321
|
ziggs_bucket_send: {
|
|
322
|
-
does: "Sends
|
|
322
|
+
does: "Sends inside a bucket, to its people and the readers of replyTo.",
|
|
323
323
|
changes: 'sends it',
|
|
324
324
|
},
|
|
325
325
|
ziggs_bucket_rename: {
|
|
@@ -19,7 +19,7 @@ export const MESSAGE_COMMAND_PARAM = { type: 'object', required: true, propertie
|
|
|
19
19
|
sources: { type: 'array', items: { type: 'object' } },
|
|
20
20
|
page: { type: 'object' },
|
|
21
21
|
} };
|
|
22
|
-
export const sendMessageCapability = { key: 'message_send', names: { sdk: 'message_send', mcp: 'ziggs_message_send' }, title: 'Send message', descriptions: { sdk: 'Send the canonical command: operationId; content:{text}; audience:{kind:"explicit",principalIds:[...]}; deliveries:{kind:"explicit",principalIds:[...]}; intent:"fyi" or "request". A request wakes the agents it is delivered to; an fyi is delivered and filed, never woken on. Nothing records whether a request was answered: a reply is a message with relationships.replyToMessageId. Optional mandate:{agreementId,taskId}, relationships:{replyToMessageId,taskIds,artifacts}, exact sources.
|
|
22
|
+
export const sendMessageCapability = { key: 'message_send', names: { sdk: 'message_send', mcp: 'ziggs_message_send' }, title: 'Send message', descriptions: { sdk: 'Send the canonical command: operationId; content:{text}; audience:{kind:"explicit",principalIds:[...]}; deliveries:{kind:"explicit",principalIds:[...]}; intent:"fyi" or "request". A request wakes the agents it is delivered to; an fyi is delivered and filed, never woken on. Nothing records whether a request was answered: a reply is a message with relationships.replyToMessageId. Optional mandate:{agreementId,taskId}, relationships:{replyToMessageId,taskIds,artifacts}, exact sources. Send first messages and replies directly; no bucket is required. Buckets optionally organize messages and do not determine access on this route. Reuse operationId unchanged on retry. Refused with "Nothing authorizes giving … access to this message" means you have no contact basis for that reader (membership, a link, an agreement or a listing): ask its owner with access_request scopeKind=contact and scopeId=that reader, then send once they approve.' }, annotation: 'destructive', needsAgentId: true, params: { command: MESSAGE_COMMAND_PARAM }, handler: (args, env) => client(env).send(args.command) };
|
|
23
23
|
export const readRepliesCapability = { key: 'message_replies', names: { sdk: 'message_replies', mcp: 'ziggs_message_replies' }, title: 'Read replies', descriptions: { sdk: 'Read currently authorized causal replies; links never grant access. Continue using nextCursor as before.' }, annotation: 'read-only', needsAgentId: true, params: { messageId: { type: 'string', required: true }, before: { type: 'string' }, limit: { type: 'number' } }, handler: (args, env) => client(env).replies(String(args.messageId), { before: args.before, limit: args.limit }) };
|
|
24
24
|
export const queryMessagesCapability = { key: 'message_list', names: { sdk: 'message_list', mcp: 'ziggs_message_list' }, title: 'Query messages', descriptions: { sdk: 'Query authorized messages. Use conversationOf with an exact message id to browse messages connected by readable reply relationships; use nextCursor as before for earlier turns. Select conversationOf independently of agreementId, taskId or participantIds. History never selects authority.' }, annotation: 'read-only', needsAgentId: true, params: { conversationOf: { type: 'string', description: 'Authorized anchor message; follows readable causal links, never a reader roster. Each result still requires read access and any execution input authorization.' }, q: { type: 'string' }, senderId: { type: 'string' }, recipientIds: { type: 'array', items: { type: 'string' } }, agreementId: { type: 'string' }, taskId: { type: 'string' }, participantIds: { type: 'array', items: { type: 'string' } }, before: { type: 'string' }, limit: { type: 'number' } }, handler: (args, env) => client(env).list(args) };
|
|
25
25
|
export const messageControlsCapability = { key: 'message_controls', names: { sdk: 'message_controls', mcp: 'ziggs_message_controls' }, title: 'Inspect message mandate', descriptions: { sdk: 'Discover recipients and current authority under an explicitly selected agreement/task without reading message history.' }, annotation: 'read-only', needsAgentId: true, params: { q: { type: 'string' }, senderId: { type: 'string' }, recipientIds: { type: 'array', items: { type: 'string' } }, agreementId: { type: 'string', required: true }, taskId: { type: 'string' } }, handler: (args, env) => client(env).controls(String(args.agreementId), args.taskId) };
|
|
@@ -123,8 +123,9 @@ export interface BucketContents {
|
|
|
123
123
|
outOfReach: number;
|
|
124
124
|
}
|
|
125
125
|
/**
|
|
126
|
-
* A message sent inside a bucket: its readers are the bucket's people
|
|
127
|
-
*
|
|
126
|
+
* A message sent inside a bucket: its readers are the bucket's people, and for
|
|
127
|
+
* a reply that names the message it answers, everyone who read that message.
|
|
128
|
+
* `page` is the HTML file it carries, by its exact version (contracts 0.49).
|
|
128
129
|
*/
|
|
129
130
|
export type BucketMessage = Omit<MessageCommand, 'audience'> & {
|
|
130
131
|
page?: {
|