@ziggs-ai/api-client 0.41.0 → 0.42.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 +4 -0
- package/dist/capabilities/buckets.d.ts +0 -1
- package/dist/capabilities/buckets.js +0 -33
- package/dist/capabilities/index.d.ts +1 -1
- package/dist/capabilities/index.js +1 -1
- package/dist/capabilities/mcpBriefs.js +0 -4
- package/dist/http/BucketsClient.d.ts +0 -16
- package/dist/http/BucketsClient.js +0 -6
- package/dist/http/index.d.ts +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.42.0
|
|
6
|
+
|
|
7
|
+
- Items are copied between buckets, never moved. `bucket_move` and the `BucketsClient` `move` and `split` calls are removed; copy into a new bucket with `bucket_duplicate`, or into an existing one with `bucket_insert`, and take the original out with `bucket_remove`.
|
|
8
|
+
|
|
5
9
|
## 0.41.0
|
|
6
10
|
|
|
7
11
|
- Short handles name a task (T…), an agreement (A…) or an artifact (F…); `HandleKind` drops `address`. A C… handle or a 24-letter room id is still refused locally on open as a retired room reference.
|
|
@@ -3,7 +3,6 @@ export declare const bucketCreateCapability: CapabilityDefinition;
|
|
|
3
3
|
export declare const bucketListCapability: CapabilityDefinition;
|
|
4
4
|
export declare const bucketReadCapability: CapabilityDefinition;
|
|
5
5
|
export declare const bucketInsertCapability: CapabilityDefinition;
|
|
6
|
-
export declare const bucketMoveCapability: CapabilityDefinition;
|
|
7
6
|
export declare const bucketRemoveCapability: CapabilityDefinition;
|
|
8
7
|
export declare const bucketDuplicateCapability: CapabilityDefinition;
|
|
9
8
|
export declare const bucketAddMembersCapability: CapabilityDefinition;
|
|
@@ -144,38 +144,6 @@ export const bucketInsertCapability = {
|
|
|
144
144
|
params: { bucketId: BUCKET_ID, items: ITEMS, share: SHARE },
|
|
145
145
|
handler: (args, env) => run('bucket_insert', () => client(env).insert(bucketId(args), items(args), args['share'] === true ? { share: true } : {})),
|
|
146
146
|
};
|
|
147
|
-
export const bucketMoveCapability = {
|
|
148
|
-
key: 'bucket_move',
|
|
149
|
-
names: { sdk: 'bucket_move', mcp: 'ziggs_bucket_move' },
|
|
150
|
-
title: 'Move bucket items',
|
|
151
|
-
descriptions: {
|
|
152
|
-
sdk: "Move items out of a bucket into another one (to), or into a new one (name, and audience when not this bucket's): a split. Each moves only if that bucket's audience can all read it; misfits stay where they are.",
|
|
153
|
-
},
|
|
154
|
-
annotation: 'write',
|
|
155
|
-
needsAgentId: true,
|
|
156
|
-
params: {
|
|
157
|
-
bucketId: BUCKET_ID,
|
|
158
|
-
items: ITEMS,
|
|
159
|
-
to: { type: 'string', description: 'An existing bucket.' },
|
|
160
|
-
name: { type: 'string', description: 'A new bucket.' },
|
|
161
|
-
audience: { ...AUDIENCE, description: "With name. Left out: this bucket's." },
|
|
162
|
-
},
|
|
163
|
-
handler: (args, env) => run('bucket_move', () => {
|
|
164
|
-
const to = args['to'];
|
|
165
|
-
const name = args['name'];
|
|
166
|
-
const hasTo = typeof to === 'string' && !!to.trim();
|
|
167
|
-
const hasName = typeof name === 'string' && !!name.trim();
|
|
168
|
-
if (hasTo === hasName)
|
|
169
|
-
throw new Error('Give to (an existing bucket) or name (a new one), not both');
|
|
170
|
-
if (hasTo)
|
|
171
|
-
return client(env).move(bucketId(args), { to: to.trim(), items: items(args) });
|
|
172
|
-
return client(env).split(bucketId(args), {
|
|
173
|
-
items: items(args),
|
|
174
|
-
name: name.trim(),
|
|
175
|
-
...(args['audience'] !== undefined ? { audience: principals(args['audience'], 'audience') } : {}),
|
|
176
|
-
});
|
|
177
|
-
}),
|
|
178
|
-
};
|
|
179
147
|
export const bucketRemoveCapability = {
|
|
180
148
|
key: 'bucket_remove',
|
|
181
149
|
names: { sdk: 'bucket_remove', mcp: 'ziggs_bucket_remove' },
|
|
@@ -375,7 +343,6 @@ export const BUCKET_CAPABILITIES = [
|
|
|
375
343
|
bucketInsertCapability,
|
|
376
344
|
bucketRemoveCapability,
|
|
377
345
|
bucketDuplicateCapability,
|
|
378
|
-
bucketMoveCapability,
|
|
379
346
|
bucketAddMembersCapability,
|
|
380
347
|
bucketJoinCapability,
|
|
381
348
|
bucketSendCapability,
|
|
@@ -13,7 +13,7 @@ export { TASK_CAPABILITIES, listTasksCapability, cancelTaskCapability, delegateT
|
|
|
13
13
|
export { AGREEMENT_PROPOSE_PROVIDER_ID_DESCRIPTION } from './proposeProviderId.js';
|
|
14
14
|
export { MARKETPLACE_CAPABILITIES, marketplaceViewCapability } from './marketplace.js';
|
|
15
15
|
export { GRANTS_CAPABILITIES, listGrantsCapability } from './grants.js';
|
|
16
|
-
export { BUCKET_CAPABILITIES, bucketCreateCapability, bucketListCapability, bucketReadCapability, bucketInsertCapability, bucketRemoveCapability,
|
|
16
|
+
export { BUCKET_CAPABILITIES, bucketCreateCapability, bucketListCapability, bucketReadCapability, bucketInsertCapability, bucketRemoveCapability, bucketAddMembersCapability, bucketJoinCapability, bucketSendCapability, bucketRemoveMemberCapability, bucketDuplicateCapability, bucketRenameCapability, bucketDeleteCapability, } from './buckets.js';
|
|
17
17
|
export { CONTEXT_CAPABILITIES, contextReadCapability, openCapability, accessExplainCapability, contextDelegateCapability, accessRequestCapability, contextExpandReachCapability, contextDiscoverGrantableCapability, contextBounds, resolveOrgScopeId, explainRefusedRead, RESOURCE_HIDDEN_MESSAGE, RESOURCE_UNREADABLE_MESSAGE, type RefusedRead, } from './context.js';
|
|
18
18
|
export { CONNECTION_CAPABILITIES, connectionProxyCapability, requestConnectionCapability, } from './connections.js';
|
|
19
19
|
export { DISCOVERY_CAPABILITIES, agentSearchCapability, agentGetCapability, } from './discovery.js';
|
|
@@ -13,7 +13,7 @@ export { TASK_CAPABILITIES, listTasksCapability, cancelTaskCapability, delegateT
|
|
|
13
13
|
export { AGREEMENT_PROPOSE_PROVIDER_ID_DESCRIPTION } from './proposeProviderId.js';
|
|
14
14
|
export { MARKETPLACE_CAPABILITIES, marketplaceViewCapability } from './marketplace.js';
|
|
15
15
|
export { GRANTS_CAPABILITIES, listGrantsCapability } from './grants.js';
|
|
16
|
-
export { BUCKET_CAPABILITIES, bucketCreateCapability, bucketListCapability, bucketReadCapability, bucketInsertCapability, bucketRemoveCapability,
|
|
16
|
+
export { BUCKET_CAPABILITIES, bucketCreateCapability, bucketListCapability, bucketReadCapability, bucketInsertCapability, bucketRemoveCapability, bucketAddMembersCapability, bucketJoinCapability, bucketSendCapability, bucketRemoveMemberCapability, bucketDuplicateCapability, bucketRenameCapability, bucketDeleteCapability, } from './buckets.js';
|
|
17
17
|
export { CONTEXT_CAPABILITIES, contextReadCapability, openCapability, accessExplainCapability, contextDelegateCapability, accessRequestCapability, contextExpandReachCapability, contextDiscoverGrantableCapability, contextBounds, resolveOrgScopeId, explainRefusedRead, RESOURCE_HIDDEN_MESSAGE, RESOURCE_UNREADABLE_MESSAGE, } from './context.js';
|
|
18
18
|
export { CONNECTION_CAPABILITIES, connectionProxyCapability, requestConnectionCapability, } from './connections.js';
|
|
19
19
|
export { DISCOVERY_CAPABILITIES, agentSearchCapability, agentGetCapability, } from './discovery.js';
|
|
@@ -310,10 +310,6 @@ const BRIEFS = {
|
|
|
310
310
|
does: 'Copies items into a new bucket for another audience. The original stays.',
|
|
311
311
|
changes: 'creates it with what fits',
|
|
312
312
|
},
|
|
313
|
-
ziggs_bucket_move: {
|
|
314
|
-
does: 'Moves items to another or a new bucket, if its audience can read them.',
|
|
315
|
-
changes: 'moves what fits',
|
|
316
|
-
},
|
|
317
313
|
ziggs_bucket_add_members: {
|
|
318
314
|
does: "Adds to a bucket audience, or an agreement's people; your listing gives each taker a split. Misfits need onMisfit.",
|
|
319
315
|
changes: 'adds them',
|
|
@@ -54,13 +54,6 @@ export interface BucketInsertResult {
|
|
|
54
54
|
misfits: BucketMisfit[];
|
|
55
55
|
shared: BucketShare[];
|
|
56
56
|
}
|
|
57
|
-
export interface BucketMoveResult {
|
|
58
|
-
source: BucketView;
|
|
59
|
-
bucket: BucketView;
|
|
60
|
-
moved: BucketItemRef[];
|
|
61
|
-
notIn: BucketItemRef[];
|
|
62
|
-
misfits: BucketMisfit[];
|
|
63
|
-
}
|
|
64
57
|
export interface BucketAddMembersResult {
|
|
65
58
|
bucket: BucketView;
|
|
66
59
|
added: string[];
|
|
@@ -205,15 +198,6 @@ export declare class BucketsClient {
|
|
|
205
198
|
}): Promise<BucketInsertResult & {
|
|
206
199
|
notIn: BucketItemRef[];
|
|
207
200
|
}>;
|
|
208
|
-
move(bucketId: string, input: {
|
|
209
|
-
to: string;
|
|
210
|
-
items: BucketItemRef[];
|
|
211
|
-
}): Promise<BucketMoveResult>;
|
|
212
|
-
split(bucketId: string, input: {
|
|
213
|
-
items: BucketItemRef[];
|
|
214
|
-
name: string;
|
|
215
|
-
audience?: string[];
|
|
216
|
-
}): Promise<BucketMoveResult>;
|
|
217
201
|
addMembers(bucketId: string, principalIds: string[], opts?: {
|
|
218
202
|
onMisfit?: BucketMisfitChoice;
|
|
219
203
|
}): Promise<BucketAddMembersResult>;
|
|
@@ -78,12 +78,6 @@ export class BucketsClient {
|
|
|
78
78
|
duplicate(bucketId, input) {
|
|
79
79
|
return this.request('POST', `${this.path(bucketId)}/duplicate`, input, 'bucket duplicate');
|
|
80
80
|
}
|
|
81
|
-
move(bucketId, input) {
|
|
82
|
-
return this.request('POST', `${this.path(bucketId)}/move`, input, 'bucket move');
|
|
83
|
-
}
|
|
84
|
-
split(bucketId, input) {
|
|
85
|
-
return this.request('POST', `${this.path(bucketId)}/split`, input, 'bucket split');
|
|
86
|
-
}
|
|
87
81
|
addMembers(bucketId, principalIds, opts = {}) {
|
|
88
82
|
return this.request('POST', `${this.path(bucketId)}/members`, { principalIds, ...(opts.onMisfit ? { onMisfit: opts.onMisfit } : {}) }, 'bucket add members', { inRun: true });
|
|
89
83
|
}
|
package/dist/http/index.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ export { AgentSearchClient } from './AgentSearchClient.js';
|
|
|
29
29
|
export { TelemetryClient } from './TelemetryClient.js';
|
|
30
30
|
export { InboxClient } from './InboxClient.js';
|
|
31
31
|
export { BucketsClient, BUCKET_ITEM_KINDS } from './BucketsClient.js';
|
|
32
|
-
export type { BucketItemKind, BucketItemRef, BucketItemPage, BucketAddMembersResult, BucketContents, BucketThread, BucketJoinResult, BucketMessage, BucketInsertResult, BucketMisfit, BucketMisfitChoice,
|
|
32
|
+
export type { BucketItemKind, BucketItemRef, BucketItemPage, BucketAddMembersResult, BucketContents, BucketThread, BucketJoinResult, BucketMessage, BucketInsertResult, BucketMisfit, BucketMisfitChoice, BucketShare, BucketView, } from './BucketsClient.js';
|
|
33
33
|
export { SessionsClient } from './SessionsClient.js';
|
|
34
34
|
export type { AssistantSessionRow } from './SessionsClient.js';
|
|
35
35
|
export { planInboxAck, planPartialInboxAck, inboxAckAllowed, inboxAckHandledIds, } from '../inboxAck.js';
|