@ziggs-ai/ziggs-mcp 0.11.0 → 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.
@@ -65,7 +65,7 @@ export function buildReadPlan(inbox, grantsByScope, self = { agentId: '' }) {
65
65
  // every time — the plan says to carry it to the human instead.
66
66
  const mayAnswer = (facts) => resolvePendingApprovalPartyId({
67
67
  pendingPartyIds: facts.pendingApprovalPartyIds ?? [],
68
- proposedTo: facts.proposedTo,
68
+ proposedToIds: facts.proposedTo ? [facts.proposedTo] : [],
69
69
  }, [self.agentId]) === self.agentId && self.agentId !== '';
70
70
  for (const p of proposals) {
71
71
  add(`respond:${p.agreementId}`, mayAnswer(p)
@@ -97,8 +97,8 @@ export declare function buildPaymentApprovalItems(approvals: Array<Record<string
97
97
  * A task is "for me" when:
98
98
  * - it is explicitly assigned (`assigneeId`) to one of my ids, or
99
99
  * - it has no explicit assignee and one of my ids sits on the executing side
100
- * of the task/agreement (executor, agent, provider, providerAgent,
101
- * proposedTo).
100
+ * of the task/agreement (executor, agent, or either column of the provider /
101
+ * proposedTo party sides).
102
102
  * Tasks with no assignee and no readable agreement parties are excluded —
103
103
  * "can't tell" must not render as "yours".
104
104
  */
@@ -1,4 +1,4 @@
1
- import { resolvePendingApprovalPartyId, } from '@ziggs-ai/api-client';
1
+ import { partySideIds, resolvePendingApprovalPartyId, } from '@ziggs-ai/api-client';
2
2
  /** Chat/tool cues when {@link PendingDecisionItem.respondableBy} is `agent`. */
3
3
  export function decisionRespondCues(item) {
4
4
  if (item.respondableBy !== 'agent')
@@ -77,7 +77,7 @@ function respondableByFor(facts, self) {
77
77
  // Agent id first: when both owe a decision, ours is the one we can act on.
78
78
  const slot = resolvePendingApprovalPartyId({
79
79
  pendingPartyIds: facts.pendingApprovalPartyIds ?? [],
80
- proposedTo: facts.proposedTo,
80
+ proposedToIds: facts.proposedTo ? [facts.proposedTo] : [],
81
81
  }, [self.agentId, self.ownerUserId]);
82
82
  return slot != null && slot === self.agentId ? 'agent' : 'human';
83
83
  }
@@ -171,8 +171,8 @@ export function buildPaymentApprovalItems(approvals, webOrigin) {
171
171
  * A task is "for me" when:
172
172
  * - it is explicitly assigned (`assigneeId`) to one of my ids, or
173
173
  * - it has no explicit assignee and one of my ids sits on the executing side
174
- * of the task/agreement (executor, agent, provider, providerAgent,
175
- * proposedTo).
174
+ * of the task/agreement (executor, agent, or either column of the provider /
175
+ * proposedTo party sides).
176
176
  * Tasks with no assignee and no readable agreement parties are excluded —
177
177
  * "can't tell" must not render as "yours".
178
178
  */
@@ -186,7 +186,7 @@ export function filterTasksForDelegate(tasks, selfIds) {
186
186
  const p = t.agreement?.parties;
187
187
  if (!p)
188
188
  return false;
189
- return mine(p.provider) || mine(p.providerAgent) || mine(p.proposedTo);
189
+ return [...partySideIds(p.provider), ...partySideIds(p.proposedTo)].some(mine);
190
190
  });
191
191
  }
192
192
  export function buildActiveWorkItems(tasks, webOrigin) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ziggs-ai/ziggs-mcp",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
4
4
  "description": "MCP server for Claude Code, Cursor, and other MCP hosts — act as your Ziggs delegate agent",
5
5
  "type": "module",
6
6
  "bin": {
@@ -39,7 +39,7 @@
39
39
  },
40
40
  "dependencies": {
41
41
  "@modelcontextprotocol/sdk": "^1.29.0",
42
- "@ziggs-ai/api-client": "0.11.0",
42
+ "@ziggs-ai/api-client": "0.12.0",
43
43
  "dotenv": "^16.6.1",
44
44
  "zod": "^3.24.2",
45
45
  "zod-to-json-schema": "^3.25.1"
@@ -45,16 +45,20 @@ connection) **is just an agreement** (`engagementKind: "link"`). Create it, the
45
45
  counterparty owner approves it, and unpublished delegates can then reach each other.
46
46
 
47
47
  1. Human describes goal and counterparty.
48
- 2. Propose the link with **`ziggs_agreement_buy`** (`engagementKind: "link"`, `proposedTo` =
49
- the target delegate agent id; use `ziggs_agent_search` to find agents — do not guess ids).
50
- No agent id? Mint a shareable invite with **`ziggs_link_create_invite`** instead; the
51
- recipient claims it with **`ziggs_agreement_claim`**.
48
+ 2. Connect with **`ziggs_link_propose`**: pass `to` = their email address, or the id of an
49
+ agent that answers to them (use `ziggs_agent_search` to find agents — do not guess ids).
50
+ The link is with the PERSON either way; an agent answering to an organisation is refused,
51
+ because a link connects two people. Leave `to` out and you get `shareUrl` to hand your
52
+ human; the recipient claims it with **`ziggs_agreement_claim`**. The reply is identical
53
+ every time, so it never reveals whether an address has an account.
52
54
  3. Target human approves via **`ziggs_agreement_respond`** (action `approve`) when the
53
55
  pending link agreement shows in their inbox / `ziggs_link_list`. This is the same generic
54
56
  approval tool used for hire and service proposals — there is no separate link-response tool.
55
- 4. **A link ≠ a grant.** The link only allows unpublished delegates to *reach* each other. To
56
- chat or read context, continue with **`ziggs_chat_open`** (participantId = peer agent
57
- id) and/or **`ziggs_context_issue_grant`** still approval-gated when exposing existing scope.
57
+ 4. **A link ≠ a grant.** The link only makes the two people reachable to each other. To
58
+ chat or read context, continue with **`ziggs_chat_open`** (participantId = the peer
59
+ PRINCIPAL, a person: delivery lands in their mailbox and whoever runs that side picks it
60
+ up) and/or **`ziggs_context_issue_grant`** — still approval-gated when exposing existing
61
+ scope.
58
62
  5. `ziggs_context_read` only after grant is active.
59
63
  6. `ziggs_context_revoke_grant` when context access should end; **`ziggs_agreement_revoke`** when
60
64
  the agreement should end — any kind: hire, service, request, offer, or link.