@ziggs-ai/api-client 0.37.19 → 0.37.20

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.37.20
6
+
7
+ - Shorter parameter text on the agreement verbs and the artifact record capability. Every rule stays.
8
+
5
9
  ## 0.37.19
6
10
 
7
11
  - Hosted-agent agreement tools take commercial terms from the same definition as the other agreement verbs, including the interface.
@@ -33,12 +33,12 @@ export const AGREEMENT_TERMS_PARAMS = {
33
33
  },
34
34
  price: {
35
35
  type: 'number',
36
- description: 'Price in POINTS, as an integer of hundredths — 500 means ϟ5.00. Recording a price here does not itself move any. Convert BOTH ways or you are off by 100x: a human who says "ϟ2" means 200, and quoting 500 back as "ϟ500" is the same mistake inverted.',
36
+ description: 'Points in hundredths: 500 is ϟ5.00, and a person\'s "ϟ2" is 200. Convert both ways. Recording a price moves no points.',
37
37
  },
38
38
  billing: {
39
39
  type: 'string',
40
40
  enum: ['total', 'per_task'],
41
- description: 'How price reads. total (default) is one price for the whole engagement, settled at fulfilment; per_task is a rate settled as each task completes (standing agreements only, and the default for a hire).',
41
+ description: 'total (default): one price, settled at fulfilment. per_task: a rate per completed task (standing agreements; the default for a hire).',
42
42
  },
43
43
  engagementKind: {
44
44
  type: 'string',
@@ -48,14 +48,14 @@ export const AGREEMENT_TERMS_PARAMS = {
48
48
  lifecycle: {
49
49
  type: 'string',
50
50
  enum: ['open', 'time-bound', 'count-bound'],
51
- description: 'open (default) is standing: no expiry, unlimited tasks. Set this only when the engagement should end on its own.',
51
+ description: 'open (default): no expiry, unlimited tasks. Set it only when this should end on its own.',
52
52
  },
53
53
  expiresAt: {
54
54
  type: 'string',
55
55
  description: 'ISO timestamp after which this can no longer be acted on.',
56
56
  },
57
57
  interactionMode: { type: 'string', enum: ['messages', 'tasks', 'both'], description: 'Accepted interface. Task-only services need no chat or negotiation.' },
58
- conversationAllowance: { type: 'number', description: 'Shared incoming-message limit across covered rooms. A helper hired inside this job draws on this limit and has none of its own. Omit for unlimited messages on a new agreement; on a counter, omission preserves the existing term.' },
58
+ conversationAllowance: { type: 'number', description: 'Incoming messages allowed across covered rooms, shared with any helper hired under this job. Omit for unlimited; on a counter, omit to keep the current limit.' },
59
59
  maxExecutions: {
60
60
  type: 'number',
61
61
  description: 'End the engagement after this many tasks.',
@@ -90,7 +90,7 @@ function engagementKindFrom(args) {
90
90
  /** The declared job governs the work; hiring consent uses grants or agreement approval. */
91
91
  const MANDATE_PARAM = {
92
92
  type: 'string',
93
- description: "The active agreement whose work this is part of — the job you are doing. It becomes this engagement's parent, so it ends when the job ends, but does not itself authorize a hire. Agent-initiated hires require a covering approval-authority grant or approval on the agreement. Name only an agreement you are actually a party to; the server checks, and a wrong name simply earns nothing. Leave it out for work that belongs to no job. It never names who you act for — the server reads that off the room or contract that woke you.",
93
+ description: 'The job you are doing, if this work is part of it: an active agreement you are a party to. This work ends when that job ends. It does not authorize the hire by itself, and never says who you act for.',
94
94
  };
95
95
  /** Pull the declared mandate off a validated arg bag, as the wire field. */
96
96
  function mandateFrom(args) {
@@ -140,7 +140,7 @@ const COUNTERPARTY_PARAM = {
140
140
  const CHAT_PARAM = {
141
141
  type: 'string',
142
142
  required: false,
143
- description: 'The room this is proposed in, when there is one — the counterparty can read and discuss the terms there. Omit it for an agreement between parties with no conversation; the proposal still reaches them, it just has no room to be discussed in.',
143
+ description: 'The room to discuss the terms in, if any. Without one the proposal still reaches them.',
144
144
  };
145
145
  /** Marketplace follow-up: a published listing is claimed, never countered. */
146
146
  function publishedNext(env) {
@@ -162,7 +162,7 @@ export const agreementBuyCapability = {
162
162
  chatId: CHAT_PARAM,
163
163
  ...AGREEMENT_TERMS_PARAMS,
164
164
  mandateAgreementId: MANDATE_PARAM,
165
- parentAgreementId: { type: 'string', description: 'The job this work is part of; ending that job ends this work. Never a link: a link is who can reach whom, so paid work cannot be placed under one. This placement does not grant spending consent.' },
165
+ parentAgreementId: { type: 'string', description: 'The job this work is part of; ending it ends this work. Not a link, and no spending consent.' },
166
166
  },
167
167
  needsAgentId: true,
168
168
  handler: async (args, env) => {
@@ -193,7 +193,7 @@ export const agreementBidCapability = {
193
193
  chatId: CHAT_PARAM,
194
194
  ...AGREEMENT_TERMS_PARAMS,
195
195
  mandateAgreementId: MANDATE_PARAM,
196
- parentAgreementId: { type: 'string', description: 'The job this work is part of; ending that job ends this work. Never a link: a link is who can reach whom, so paid work cannot be placed under one. This placement does not grant spending consent.' },
196
+ parentAgreementId: { type: 'string', description: 'The job this work is part of; ending it ends this work. Not a link, and no spending consent.' },
197
197
  },
198
198
  needsAgentId: true,
199
199
  handler: async (args, env) => {
@@ -232,7 +232,7 @@ export const agreementBrokerCapability = {
232
232
  chatId: CHAT_PARAM,
233
233
  ...AGREEMENT_TERMS_PARAMS,
234
234
  mandateAgreementId: MANDATE_PARAM,
235
- parentAgreementId: { type: 'string', description: 'The job this work is part of; ending that job ends this work. Never a link: a link is who can reach whom, so paid work cannot be placed under one. This placement does not grant spending consent.' },
235
+ parentAgreementId: { type: 'string', description: 'The job this work is part of; ending it ends this work. Not a link, and no spending consent.' },
236
236
  },
237
237
  needsAgentId: true,
238
238
  handler: async (args, env) => {
@@ -262,7 +262,7 @@ export const agreementRequestCapability = {
262
262
  ...AGREEMENT_TERMS_PARAMS,
263
263
  match: MATCH_PARAM,
264
264
  mandateAgreementId: MANDATE_PARAM,
265
- parentAgreementId: { type: 'string', description: 'The job this work is part of; ending that job ends this work. Never a link: a link is who can reach whom, so paid work cannot be placed under one. This placement does not grant spending consent.' },
265
+ parentAgreementId: { type: 'string', description: 'The job this work is part of; ending it ends this work. Not a link, and no spending consent.' },
266
266
  },
267
267
  needsAgentId: true,
268
268
  handler: async (args, env) => {
@@ -210,8 +210,7 @@ export const recordArtifactCapability = {
210
210
  },
211
211
  idempotencyKey: {
212
212
  type: 'string',
213
- description: 'Optional dedup key: a redelivered record with the same key no-ops and returns the original artifact. Derive it deterministically (e.g. from the source event + step) — not a random value — so a crash-replay reproduces it. ' +
214
- 'A task-bound result artifact is one deliverable per task: recordReport keys it `task-result:<taskId>`, so a retry after a partial failure reuses that row. A later revision of the same task still returns the original artifact — change the key if you mean a new deliverable.',
213
+ description: 'Dedup key: the same key returns the original artifact instead of a new one. Derive it from the event and step, never at random. A new revision needs a new key.',
215
214
  },
216
215
  externalRef: {
217
216
  type: 'object',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ziggs-ai/api-client",
3
- "version": "0.37.19",
3
+ "version": "0.37.20",
4
4
  "description": "HTTP and WebSocket client for the Ziggs backend API",
5
5
  "homepage": "https://ziggsai.com/docs",
6
6
  "bugs": {