@ziggs-ai/ziggs-mcp 0.37.2 → 0.37.3
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/config.d.ts +7 -0
- package/dist/protocol/connectText.d.ts +5 -1
- package/dist/protocol/connectText.js +10 -1
- package/dist/server.js +3 -1
- package/package.json +1 -1
package/dist/config.d.ts
CHANGED
|
@@ -107,6 +107,13 @@ export interface ZiggsMcpConfig extends EnvConfig {
|
|
|
107
107
|
* call may do: every call is still authorized by the backend.
|
|
108
108
|
*/
|
|
109
109
|
directConnection: boolean;
|
|
110
|
+
/**
|
|
111
|
+
* The serving backend delivers `ziggs.inbox.updated` events to hosts that
|
|
112
|
+
* subscribe (its `MCP_EVENTS_ENABLED`). Only the remote server knows, so it
|
|
113
|
+
* sets this; stdio leaves it unset. Adds one rule to the directory door's
|
|
114
|
+
* connect text, inside that text's budget.
|
|
115
|
+
*/
|
|
116
|
+
eventsEnabled?: boolean;
|
|
110
117
|
}
|
|
111
118
|
/** Load delegate credentials from the environment. */
|
|
112
119
|
export declare function loadConfig(): ZiggsMcpConfig;
|
|
@@ -24,4 +24,8 @@ export type ConnectDoor = 'directory' | 'compact';
|
|
|
24
24
|
* inbox read, the first call an agent makes, in the same words as above.
|
|
25
25
|
*/
|
|
26
26
|
export declare function sessionRules(door: ConnectDoor): string[];
|
|
27
|
-
export
|
|
27
|
+
export interface ConnectTextOptions {
|
|
28
|
+
/** The serving backend delivers `ziggs.inbox.updated` events. */
|
|
29
|
+
events?: boolean;
|
|
30
|
+
}
|
|
31
|
+
export declare function renderConnectText(door: ConnectDoor, options?: ConnectTextOptions): string;
|
|
@@ -47,12 +47,21 @@ export function sessionRules(door) {
|
|
|
47
47
|
return [DATA, INBOX[door], WAIT, ACCESS, REPLY, GROUNDING];
|
|
48
48
|
}
|
|
49
49
|
const CATALOG = 'Only the everyday tools are loaded. ziggs_tools lists the rest; call them through ziggs_tool_read or ziggs_tool_write.';
|
|
50
|
-
|
|
50
|
+
/**
|
|
51
|
+
* Directory door only: inbox events ride the connection key that door is
|
|
52
|
+
* minted for. Said only when the serving backend has events on, so a host is
|
|
53
|
+
* never told to subscribe where nothing answers. Lives here, inside the
|
|
54
|
+
* budget the tests enforce, rather than appended by the backend after the
|
|
55
|
+
* text was already sized: that append is what cut the text mid-word.
|
|
56
|
+
*/
|
|
57
|
+
const EVENTS = 'Inbox events: a host may subscribe to ziggs.inbox.updated per workspace; promise alerts only once it confirms. An event carries only orgId: read that inbox and follow its rules.';
|
|
58
|
+
export function renderConnectText(door, options = {}) {
|
|
51
59
|
return [
|
|
52
60
|
`- ${DATA}`,
|
|
53
61
|
`- ${SESSION}`,
|
|
54
62
|
`- ${INBOX[door]}`,
|
|
55
63
|
...RULES.map((r) => `- ${r}`),
|
|
56
64
|
...(door === 'compact' ? [`- ${CATALOG}`] : []),
|
|
65
|
+
...(door === 'directory' && options.events ? [`- ${EVENTS}`] : []),
|
|
57
66
|
].join('\n');
|
|
58
67
|
}
|
package/dist/server.js
CHANGED
|
@@ -23,7 +23,9 @@ export function createZiggsMcpServer(creds, cfg) {
|
|
|
23
23
|
// this into model context on `initialize`: the short connect text, the
|
|
24
24
|
// same for every client — clients truncate a long one. Covers
|
|
25
25
|
// stdio and remote HTTP alike, since both build the server here.
|
|
26
|
-
instructions: renderConnectText(cfg.directConnection === false ? 'directory' : 'compact'
|
|
26
|
+
instructions: renderConnectText(cfg.directConnection === false ? 'directory' : 'compact', {
|
|
27
|
+
events: cfg.eventsEnabled === true,
|
|
28
|
+
}),
|
|
27
29
|
});
|
|
28
30
|
if (cfg.directConnection === false)
|
|
29
31
|
installDirectorySurface(server);
|