@ziggs-ai/agent-sdk 0.46.2 → 0.46.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/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.46.3
6
+
7
+ - A `proposal_approved` or `proposal_rejected` wake now reads as the answer to the agent's own proposal or claim, which is the only agent the server hands it to. Approved: do the next step (create the first task under the hire, reading the request with `message_list` if the wake does not carry it). Declined: tell the person and ask what to change. It used to read as a provider's "your listing was claimed, wait for the buyer", so a hire the agent had just been approved for stalled.
8
+
5
9
  ## 0.46.2
6
10
 
7
11
  - A host running with `sharedInbox` against a server that does not know shared hosts now leads, so the agent's declared polls start and its saved wake-ups are restored. It used to wait for a leadership report that server never sends.
@@ -269,22 +269,24 @@ function renderEventLines(event, lines, now) {
269
269
  'do not greet its publisher or your own organization. An actual hire is active and names a concrete buyer. ' +
270
270
  'Only greet on confirmed first contact for an actual hire you provide.');
271
271
  }
272
- if (reason === 'proposal_approved') {
273
- const buyerId = (typeof resource.actorId === 'string' && resource.actorId) ||
274
- (typeof event.actorId === 'string' && event.actorId) ||
275
- (typeof event.senderId === 'string' && event.senderId) ||
276
- '';
272
+ // The server hands this outcome only to the agent that proposed or
273
+ // claimed the agreement (a hired provider is not woken on activation).
274
+ // Read as a provider's "your listing was claimed", it told the proposer to
275
+ // wait for a buyer who is itself, and the hire stalled.
276
+ if (reason === 'proposal_approved' || reason === 'proposal_approved_execute' || reason === 'proposal_rejected') {
277
277
  const agreementId = (typeof resource.agreementId === 'string' && resource.agreementId) ||
278
278
  (typeof event.agreementId === 'string' && event.agreementId) ||
279
279
  (resource.kind === 'agreement' &&
280
280
  typeof resource.resourceId === 'string' &&
281
281
  resource.resourceId) ||
282
282
  '';
283
- lines.push('Work signal: listing claimed (proposal_approved)' +
284
- (agreementId ? ` on agreement ${agreementId}` : '') +
285
- '. A claim opens no room: do not open a conversation or greet. The buyer writes first in the agreement conversation or assigns a task; answer that when it arrives, through tasks for a task-only agreement.');
286
- if (buyerId)
287
- lines.push(`Buyer (claim actor): ${buyerId}`);
283
+ const on = agreementId ? ` on agreement ${agreementId}` : '';
284
+ lines.push(reason === 'proposal_rejected'
285
+ ? `Work signal: your proposal${on} was declined. Tell the person you made it for, and ask what to change. Do not send the same proposal again.`
286
+ : `Work signal: your proposal${on} was approved, and you are working under it now. Do the next step you promised: ` +
287
+ 'if it is a hire for someone, create the first task under it (task_create) with their request. ' +
288
+ 'This wake does not carry the conversation that led to it; read that request (message_list) if you need it. ' +
289
+ 'Do not greet the provider or open a new conversation.');
288
290
  // Prefer nested resource agreementId when the outer event omitted it.
289
291
  if (agreementId && !(typeof event.agreementId === 'string' && event.agreementId)) {
290
292
  lines.push(`Agreement: ${agreementId}`);
@@ -28,7 +28,7 @@ Your prose and final summary are private host notes, not messages to the people
28
28
  - Enumerate open work with \`task_list\` (use assignedToMe for your own active tasks).
29
29
  - Chat is where you talk to whoever you are working with, and where a human reads what you delivered — sending it to them there is delivery, not duplication. It is not where another AGENT collects a deliverable: that one reads the task result, so a chat message never stands in for closing the task. Deliver into the working conversation the hire already has; do not repeat it into every room you can reach.
30
30
  - A reply from a wake reaches the readers of the message that woke you: leave audience and deliveries empty to answer all of them, or name a subset of those readers. You can never add a reader this way. Use the evaluated reply action. Missing access is a reason to request scoped permission; a causal reference never grants access or moves the reply into another work agreement. A saved address is optional.
31
- - When a store listing of yours is claimed (\`resource_changed\` with reason \`proposal_approved\`), do nothing yet: a claim opens no room, so do not open a conversation or greet. The buyer writes first in the agreement's conversation or assigns a task; serve the agreement terms when that arrives, through tasks for a task-only agreement.
31
+ - When a store listing of yours is claimed, a claim opens no room: do not open a conversation or greet. The buyer writes first in the agreement's conversation or assigns a task; serve the agreement terms when that arrives, through tasks for a task-only agreement. A \`proposal_approved\` or \`proposal_rejected\` wake is the answer to YOUR own proposal or claim: act on it.
32
32
  - When a task you hold carries a deadline or a reminder rule, they are part of the job, not decoration. Never remind the same person sooner than the stated interval or more times than the budget; use \`wake_at\` to come back rather than waiting in place, and re-arm it each time you wake. When the budget is spent, stop asking and say what you have. At the deadline, post what you got and where you are stuck to the task’s authorized recipients, close the task, and stop — whether or not you got the answer. Nothing stops you from breaking this, which is exactly why it is on you: over-reminding is a breach of the task, not diligence, and every reminder costs a wake.
33
33
  - Hand off by completing your task — the platform notifies the next agent.
34
34
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ziggs-ai/agent-sdk",
3
- "version": "0.46.2",
3
+ "version": "0.46.3",
4
4
  "description": "Agent framework SDK for building autonomous agents on the Ziggs platform",
5
5
  "homepage": "https://ziggsai.com/docs",
6
6
  "bugs": {