@ziggs-ai/api-client 0.19.0 → 0.20.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/capabilities/agreements.d.ts +3 -0
- package/dist/capabilities/agreements.js +9 -1
- package/dist/capabilities/artifacts.d.ts +38 -0
- package/dist/capabilities/artifacts.js +115 -1
- package/dist/capabilities/context.d.ts +2 -0
- package/dist/capabilities/context.js +83 -0
- package/dist/capabilities/index.d.ts +3 -3
- package/dist/capabilities/index.js +3 -3
- package/dist/capabilities/introductions.js +5 -10
- package/dist/capabilities/links.js +1 -0
- package/dist/capabilities/nextCall.d.ts +72 -14
- package/dist/capabilities/nextCall.js +221 -4
- package/dist/http/ArtifactsClient.d.ts +47 -0
- package/dist/http/ArtifactsClient.js +33 -0
- package/dist/http/ContextOpenClient.d.ts +70 -0
- package/dist/http/ContextOpenClient.js +52 -0
- package/dist/http/InboxClient.d.ts +8 -0
- package/dist/http/InboxClient.js +18 -0
- package/dist/http/TaskClient.d.ts +2 -0
- package/dist/http/TaskClient.js +1 -0
- package/dist/http/index.d.ts +2 -0
- package/dist/http/index.js +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/dist/instanceIdentity.d.ts +1 -1
- package/dist/instanceIdentity.js +2 -2
- package/dist/sessionOrientation.d.ts +50 -0
- package/dist/sessionOrientation.js +43 -0
- package/package.json +1 -1
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Who this session is, who it represents, and whether it can continue
|
|
3
|
+
* unattended. Built from the binding the caller already has. Does not
|
|
4
|
+
* read mail and does not take the inbox lease.
|
|
5
|
+
*/
|
|
6
|
+
const PEEK = {
|
|
7
|
+
tool: 'ziggs_inbox_peek',
|
|
8
|
+
http: { method: 'GET', path: '/inbox/peek' },
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Facts a cold entry needs that `session.ownerId` never labelled: the
|
|
12
|
+
* represented person, whether this host can arm a wake, and who drives ack.
|
|
13
|
+
*/
|
|
14
|
+
export function sessionOrientation(input) {
|
|
15
|
+
const mcp = input.surface === 'mcp';
|
|
16
|
+
return {
|
|
17
|
+
representedPerson: {
|
|
18
|
+
id: input.ownerUserId,
|
|
19
|
+
kind: 'user',
|
|
20
|
+
},
|
|
21
|
+
continuation: mcp
|
|
22
|
+
? {
|
|
23
|
+
kind: 'manual',
|
|
24
|
+
canScheduleWake: false,
|
|
25
|
+
summary: 'This MCP session has no wake_at. Continue by calling ziggs_inbox again — a scheduler in the host is the only unattended path.',
|
|
26
|
+
}
|
|
27
|
+
: {
|
|
28
|
+
kind: 'scheduled',
|
|
29
|
+
canScheduleWake: true,
|
|
30
|
+
summary: 'The hosted runtime can arm wake_at. The brain does not ack; the host owns the inbox loop.',
|
|
31
|
+
},
|
|
32
|
+
inboxHandling: {
|
|
33
|
+
ackDriver: mcp ? 'agent' : 'host',
|
|
34
|
+
readAcquiresHost: true,
|
|
35
|
+
peekDoesNotAcquire: true,
|
|
36
|
+
peek: PEEK,
|
|
37
|
+
},
|
|
38
|
+
identity: {
|
|
39
|
+
agentId: input.agentId,
|
|
40
|
+
distinctFromBackgroundWorker: true,
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
}
|