@openserv-labs/client 2.4.5 → 2.4.7

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.
@@ -1 +1 @@
1
- {"version":3,"file":"erc8004-api.d.ts","sourceRoot":"","sources":["../src/erc8004-api.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,KAAK,EACV,oBAAoB,EACpB,sBAAsB,EACtB,YAAY,EACb,MAAM,SAAS,CAAC;AAKjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,qBAAa,UAAU;IACT,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,cAAc;IAM1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAqDG;IACG,MAAM,CACV,MAAM,EAAE,oBAAoB,GAAG;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,GACpD,OAAO,CAAC,YAAY,CAAC;IAsBxB;;;OAGG;YACW,iBAAiB;IAiC/B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiCG;IACG,eAAe,CAAC,MAAM,EAAE;QAC5B,UAAU,EAAE,MAAM,CAAC;QACnB,UAAU,EAAE,MAAM,CAAC;QACnB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,GAAG,OAAO,CAAC,qBAAqB,CAAC;IA0TlC;;OAEG;YACW,YAAY;IAyB1B;;;OAGG;IACH,OAAO,CAAC,yBAAyB;IA8CjC;;;;;;;;;;;;;;;;OAgBG;IACG,cAAc,CAAC,MAAM,EAAE;QAC3B,UAAU,EAAE,MAAM,CAAC;KACpB,GAAG,OAAO,CAAC,sBAAsB,CAAC;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oUlC;;OAEG;YACW,YAAY;IAyB1B;;;OAGG;IACH,OAAO,CAAC,yBAAyB;IA8CjC;;;;;;;;;;;;;;;;OAgBG;IACG,cAAc,CAAC,MAAM,EAAE;QAC3B,UAAU,EAAE,MAAM,CAAC;KACpB,GAAG,OAAO,CAAC,sBAAsB,CAAC;CAKpC;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,sEAAsE;IACtE,OAAO,EAAE,MAAM,CAAC;IAChB,0CAA0C;IAC1C,OAAO,EAAE,MAAM,CAAC;IAChB,yDAAyD;IACzD,MAAM,EAAE,MAAM,CAAC;IACf,yCAAyC;IACzC,YAAY,EAAE,MAAM,CAAC;IACrB,wDAAwD;IACxD,gBAAgB,EAAE,MAAM,CAAC;IACzB,4FAA4F;IAC5F,OAAO,EAAE,MAAM,CAAC;CACjB"}
@@ -227,6 +227,7 @@ class Erc8004API {
227
227
  // Build the full request schema including the x402 envelope
228
228
  // (buyerAddress + payload wrapping the trigger's own input schema)
229
229
  const requestSchema = {
230
+ $schema: "http://json-schema.org/draft-07/schema#",
230
231
  type: "object",
231
232
  required: ["buyerAddress", "payload"],
232
233
  properties: {
@@ -234,10 +235,13 @@ class Erc8004API {
234
235
  type: "string",
235
236
  description: "The buyer's wallet address (e.g. 0x...) for x402 payment",
236
237
  },
237
- payload: t.inputSchema ?? { type: "object" },
238
+ payload: t.inputSchema
239
+ ? Object.fromEntries(Object.entries(t.inputSchema).filter(([key]) => key !== "$schema"))
240
+ : { type: "object" },
238
241
  },
239
242
  };
240
- httpMeta.inputSchema = requestSchema;
243
+ httpMeta.schema = requestSchema;
244
+ httpMeta.method = "POST";
241
245
  services.push({
242
246
  name: "http",
243
247
  endpoint: t.httpEndpoint,
@@ -293,7 +297,9 @@ class Erc8004API {
293
297
  };
294
298
  const agentCardJson = JSON.stringify(agentCard);
295
299
  // 3. Detect first deploy vs re-deploy
296
- const isRedeploy = !!wallet.latestDeploymentTransactionHash || !!wallet.erc8004AgentId;
300
+ const isRedeploy = wallet.deployed ||
301
+ !!wallet.latestDeploymentTransactionHash ||
302
+ !!wallet.erc8004AgentId;
297
303
  // 4. On-chain setup
298
304
  const contracts = (0, erc8004_contracts_js_1.getErc8004Contracts)(chainId);
299
305
  const chainConfig = (0, erc8004_contracts_js_1.getErc8004Chain)(chainId);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openserv-labs/client",
3
- "version": "2.4.5",
3
+ "version": "2.4.7",
4
4
  "description": "OpenServ Platform Client - Manage agents, workflows, tasks, and triggers via the OpenServ API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",