agentbnb 8.2.2 → 8.3.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.
Files changed (62) hide show
  1. package/dist/{card-EX2EYGCZ.js → card-BN643ZOY.js} +6 -2
  2. package/dist/card-T2XJZA5A.js +92 -0
  3. package/dist/{chunk-3LWBH7P3.js → chunk-4NFJ3VYZ.js} +20 -1
  4. package/dist/chunk-5AIYALBX.js +857 -0
  5. package/dist/chunk-6QMDJVMS.js +238 -0
  6. package/dist/{chunk-LKLKYXLV.js → chunk-74LZDEDT.js} +6 -4
  7. package/dist/{chunk-GKVTD4EZ.js → chunk-77KGEDH4.js} +1 -1
  8. package/dist/{chunk-QCGIG7WW.js → chunk-7IQE34QK.js} +14 -7
  9. package/dist/{chunk-QHZGOG3O.js → chunk-D242QZCR.js} +168 -41
  10. package/dist/chunk-EE3V3DXK.js +60 -0
  11. package/dist/{chunk-RYISHSHB.js → chunk-F3KIEVJ2.js} +207 -265
  12. package/dist/{chunk-XBGVQMQJ.js → chunk-FELGHDCA.js} +16 -39
  13. package/dist/{chunk-EJKW57ZV.js → chunk-GIEJVKZZ.js} +1 -1
  14. package/dist/{chunk-WVY2W7AA.js → chunk-I7KWA7OB.js} +20 -0
  15. package/dist/{chunk-4IPJJRTP.js → chunk-IGQNP3ZO.js} +5 -2
  16. package/dist/chunk-NQANA6WH.js +797 -0
  17. package/dist/{chunk-Z4MCGKTL.js → chunk-NX27AFPA.js} +15 -2
  18. package/dist/{chunk-Z2GEFFDO.js → chunk-O4Q7BRG6.js} +2 -2
  19. package/dist/{chunk-SSK653A6.js → chunk-PQIP7EXY.js} +6 -0
  20. package/dist/{chunk-EG6RS4JC.js → chunk-QFPXZITP.js} +20 -65
  21. package/dist/chunk-R4F4XII4.js +264 -0
  22. package/dist/{chunk-DYQOFGGI.js → chunk-RVBW2QXU.js} +178 -49
  23. package/dist/{chunk-CQFBNTGT.js → chunk-S7DZHKCG.js} +25 -12
  24. package/dist/chunk-U6LP4KWN.js +238 -0
  25. package/dist/{chunk-MWOXW7JQ.js → chunk-VJ7XBEY6.js} +24 -16
  26. package/dist/chunk-WTHMHNKC.js +129 -0
  27. package/dist/{chunk-OCSU2S6W.js → chunk-WX3GZVFG.js} +2 -1
  28. package/dist/{chunk-CKOOVZOI.js → chunk-YKMBFQC2.js} +37 -5
  29. package/dist/{chunk-S3V6R3EN.js → chunk-ZU2TP7CN.js} +70 -27
  30. package/dist/cli/index.js +211 -278
  31. package/dist/client-OKJJ3UP2.js +19 -0
  32. package/dist/client-UQBGCIPA.js +20 -0
  33. package/dist/conduct-4JDMWBQD.js +22 -0
  34. package/dist/{conduct-AZFLNUX3.js → conduct-VYYBCPHA.js} +14 -13
  35. package/dist/{conductor-mode-WKB42PYM.js → conductor-mode-OPGQJFLA.js} +12 -8
  36. package/dist/{conductor-mode-PLTB6MS3.js → conductor-mode-SBDCRIX6.js} +16 -11
  37. package/dist/execute-FZLQGIXB.js +14 -0
  38. package/dist/execute-TEZPQ5WP.js +15 -0
  39. package/dist/index.d.ts +172 -11
  40. package/dist/index.js +1529 -433
  41. package/dist/{process-guard-GH5LRNWO.js → process-guard-TNSUNHSR.js} +1 -1
  42. package/dist/{publish-capability-QDR2QIZ2.js → publish-capability-HVYILTPR.js} +4 -3
  43. package/dist/{reliability-metrics-QG7WC5QK.js → reliability-metrics-G7LPUYJD.js} +3 -1
  44. package/dist/reliability-metrics-RRUKJ4ME.js +20 -0
  45. package/dist/{request-NX7GSPIG.js → request-KJNKR27T.js} +96 -43
  46. package/dist/{serve-skill-E6EJQYAK.js → serve-skill-GC6NIQ5T.js} +10 -11
  47. package/dist/{server-VBCT32FC.js → server-YV3XPTX5.js} +11 -10
  48. package/dist/{service-coordinator-KMSA6BST.js → service-coordinator-RY5AKUZS.js} +420 -171
  49. package/dist/{skill-config-FETXPNVP.js → skill-config-5O2VR546.js} +1 -1
  50. package/dist/skills/agentbnb/bootstrap.js +550 -231
  51. package/dist/websocket-client-3U27WJUU.js +7 -0
  52. package/dist/{websocket-client-4Z5P54RU.js → websocket-client-SNDF3B6N.js} +1 -1
  53. package/package.json +18 -12
  54. package/skills/agentbnb/install.sh +0 -0
  55. package/dist/chunk-MCED4GDW.js +0 -1572
  56. package/dist/chunk-NWIQJ2CL.js +0 -108
  57. package/dist/chunk-WNXXLCV5.js +0 -32
  58. package/dist/client-XOLP5IUZ.js +0 -12
  59. package/dist/conduct-VPUYTNEA.js +0 -21
  60. package/dist/execute-NNDCXTN4.js +0 -13
  61. package/dist/execute-RIRHTIBU.js +0 -16
  62. package/dist/websocket-client-QOVARTRN.js +0 -7
@@ -1,108 +0,0 @@
1
- // src/credit/reliability-metrics.ts
2
- var RELIABILITY_METRICS_SCHEMA = `
3
- CREATE TABLE IF NOT EXISTS provider_reliability_metrics (
4
- owner TEXT PRIMARY KEY,
5
- current_streak INTEGER NOT NULL DEFAULT 0,
6
- longest_streak INTEGER NOT NULL DEFAULT 0,
7
- total_hires INTEGER NOT NULL DEFAULT 0,
8
- repeat_hires INTEGER NOT NULL DEFAULT 0,
9
- feedback_count INTEGER NOT NULL DEFAULT 0,
10
- feedback_sum REAL NOT NULL DEFAULT 0,
11
- availability_checks INTEGER NOT NULL DEFAULT 0,
12
- availability_hits INTEGER NOT NULL DEFAULT 0,
13
- cycle_start TEXT NOT NULL,
14
- updated_at TEXT NOT NULL
15
- );
16
- `;
17
- function ensureReliabilityTable(db) {
18
- db.exec(RELIABILITY_METRICS_SCHEMA);
19
- }
20
- function ensureRow(db, owner) {
21
- const now = (/* @__PURE__ */ new Date()).toISOString();
22
- db.prepare(
23
- `INSERT OR IGNORE INTO provider_reliability_metrics
24
- (owner, current_streak, longest_streak, total_hires, repeat_hires,
25
- feedback_count, feedback_sum, availability_checks, availability_hits,
26
- cycle_start, updated_at)
27
- VALUES (?, 0, 0, 0, 0, 0, 0, 0, 0, ?, ?)`
28
- ).run(owner, now, now);
29
- }
30
- function recordSuccessfulHire(db, providerOwner, consumerOwner) {
31
- const now = (/* @__PURE__ */ new Date()).toISOString();
32
- ensureRow(db, providerOwner);
33
- const isRepeat = db.prepare(
34
- `SELECT COUNT(*) as cnt FROM credit_transactions
35
- WHERE owner = ? AND reason = 'settlement'
36
- AND reference_id IN (
37
- SELECT id FROM credit_escrow WHERE owner = ?
38
- )`
39
- ).get(providerOwner, consumerOwner);
40
- const repeatIncrement = (isRepeat?.cnt ?? 0) > 0 ? 1 : 0;
41
- db.prepare(
42
- `UPDATE provider_reliability_metrics
43
- SET current_streak = current_streak + 1,
44
- longest_streak = MAX(longest_streak, current_streak + 1),
45
- total_hires = total_hires + 1,
46
- repeat_hires = repeat_hires + ?,
47
- updated_at = ?
48
- WHERE owner = ?`
49
- ).run(repeatIncrement, now, providerOwner);
50
- }
51
- function recordQualityFailure(db, providerOwner) {
52
- const now = (/* @__PURE__ */ new Date()).toISOString();
53
- ensureRow(db, providerOwner);
54
- db.prepare(
55
- `UPDATE provider_reliability_metrics
56
- SET current_streak = 0, updated_at = ?
57
- WHERE owner = ?`
58
- ).run(now, providerOwner);
59
- }
60
- function recordFeedback(db, providerOwner, score) {
61
- const now = (/* @__PURE__ */ new Date()).toISOString();
62
- ensureRow(db, providerOwner);
63
- db.prepare(
64
- `UPDATE provider_reliability_metrics
65
- SET feedback_count = feedback_count + 1,
66
- feedback_sum = feedback_sum + ?,
67
- updated_at = ?
68
- WHERE owner = ?`
69
- ).run(score, now, providerOwner);
70
- }
71
- function recordAvailabilityCheck(db, providerOwner, wasAvailable) {
72
- const now = (/* @__PURE__ */ new Date()).toISOString();
73
- ensureRow(db, providerOwner);
74
- db.prepare(
75
- `UPDATE provider_reliability_metrics
76
- SET availability_checks = availability_checks + 1,
77
- availability_hits = availability_hits + ?,
78
- updated_at = ?
79
- WHERE owner = ?`
80
- ).run(wasAvailable ? 1 : 0, now, providerOwner);
81
- }
82
- function getReliabilityMetrics(db, owner) {
83
- const row = db.prepare(
84
- `SELECT current_streak, longest_streak, total_hires, repeat_hires,
85
- feedback_count, feedback_sum, availability_checks, availability_hits
86
- FROM provider_reliability_metrics WHERE owner = ?`
87
- ).get(owner);
88
- if (!row) return null;
89
- return {
90
- current_streak: row.current_streak,
91
- longest_streak: row.longest_streak,
92
- total_hires: row.total_hires,
93
- repeat_hires: row.repeat_hires,
94
- repeat_hire_rate: row.total_hires > 0 ? row.repeat_hires / row.total_hires : 0,
95
- avg_feedback_score: row.feedback_count > 0 ? row.feedback_sum / row.feedback_count : 0,
96
- availability_rate: row.availability_checks > 0 ? row.availability_hits / row.availability_checks : 0
97
- };
98
- }
99
-
100
- export {
101
- RELIABILITY_METRICS_SCHEMA,
102
- ensureReliabilityTable,
103
- recordSuccessfulHire,
104
- recordQualityFailure,
105
- recordFeedback,
106
- recordAvailabilityCheck,
107
- getReliabilityMetrics
108
- };
@@ -1,32 +0,0 @@
1
- import {
2
- NETWORK_FEE_RATE,
3
- confirmEscrowDebit,
4
- recordEarning,
5
- releaseEscrow
6
- } from "./chunk-RYISHSHB.js";
7
-
8
- // src/credit/settlement.ts
9
- function settleProviderEarning(providerDb, providerOwner, receipt) {
10
- const feeAmount = Math.floor(receipt.amount * NETWORK_FEE_RATE);
11
- const providerAmount = receipt.amount - feeAmount;
12
- recordEarning(
13
- providerDb,
14
- providerOwner,
15
- providerAmount,
16
- receipt.card_id,
17
- receipt.nonce
18
- );
19
- return { settled: true };
20
- }
21
- function settleRequesterEscrow(requesterDb, escrowId) {
22
- confirmEscrowDebit(requesterDb, escrowId);
23
- }
24
- function releaseRequesterEscrow(requesterDb, escrowId) {
25
- releaseEscrow(requesterDb, escrowId);
26
- }
27
-
28
- export {
29
- settleProviderEarning,
30
- settleRequesterEscrow,
31
- releaseRequesterEscrow
32
- };
@@ -1,12 +0,0 @@
1
- import {
2
- requestCapability,
3
- requestCapabilityBatch,
4
- requestViaRelay
5
- } from "./chunk-CKOOVZOI.js";
6
- import "./chunk-EJKW57ZV.js";
7
- import "./chunk-WVY2W7AA.js";
8
- export {
9
- requestCapability,
10
- requestCapabilityBatch,
11
- requestViaRelay
12
- };
@@ -1,21 +0,0 @@
1
- import {
2
- conductAction
3
- } from "./chunk-MWOXW7JQ.js";
4
- import "./chunk-QCGIG7WW.js";
5
- import "./chunk-3MJT4PZG.js";
6
- import "./chunk-QHZGOG3O.js";
7
- import "./chunk-GKVTD4EZ.js";
8
- import "./chunk-CQFBNTGT.js";
9
- import "./chunk-RYISHSHB.js";
10
- import "./chunk-NWIQJ2CL.js";
11
- import "./chunk-CKOOVZOI.js";
12
- import "./chunk-EJKW57ZV.js";
13
- import "./chunk-5AH3CMOX.js";
14
- import "./chunk-75OC6E4F.js";
15
- import "./chunk-Z4MCGKTL.js";
16
- import "./chunk-SSK653A6.js";
17
- import "./chunk-S3V6R3EN.js";
18
- import "./chunk-WVY2W7AA.js";
19
- export {
20
- conductAction
21
- };
@@ -1,13 +0,0 @@
1
- import {
2
- executeCapabilityBatch,
3
- executeCapabilityRequest
4
- } from "./chunk-EG6RS4JC.js";
5
- import "./chunk-MCED4GDW.js";
6
- import "./chunk-NWIQJ2CL.js";
7
- import "./chunk-EJKW57ZV.js";
8
- import "./chunk-IVOYM3WG.js";
9
- import "./chunk-WVY2W7AA.js";
10
- export {
11
- executeCapabilityBatch,
12
- executeCapabilityRequest
13
- };
@@ -1,16 +0,0 @@
1
- import {
2
- executeCapabilityBatch,
3
- executeCapabilityRequest
4
- } from "./chunk-XBGVQMQJ.js";
5
- import "./chunk-WNXXLCV5.js";
6
- import "./chunk-CQFBNTGT.js";
7
- import "./chunk-RYISHSHB.js";
8
- import "./chunk-NWIQJ2CL.js";
9
- import "./chunk-EJKW57ZV.js";
10
- import "./chunk-75OC6E4F.js";
11
- import "./chunk-S3V6R3EN.js";
12
- import "./chunk-WVY2W7AA.js";
13
- export {
14
- executeCapabilityBatch,
15
- executeCapabilityRequest
16
- };
@@ -1,7 +0,0 @@
1
- import {
2
- RelayClient
3
- } from "./chunk-Z4MCGKTL.js";
4
- import "./chunk-SSK653A6.js";
5
- export {
6
- RelayClient
7
- };