@tetsuo-ai/marketplace-react 0.4.1 → 0.5.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 (84) hide show
  1. package/CHANGELOG.md +56 -0
  2. package/README.md +93 -47
  3. package/dist/chunk-7NKRSPPN.js +227 -0
  4. package/dist/chunk-7NKRSPPN.js.map +1 -0
  5. package/dist/{chunk-JVXGNW3Q.js → chunk-CDDHUFMG.js} +6 -5
  6. package/dist/chunk-CDDHUFMG.js.map +1 -0
  7. package/dist/chunk-FIDFPM5A.cjs +40 -0
  8. package/dist/chunk-FIDFPM5A.cjs.map +1 -0
  9. package/dist/chunk-IJKWKY4H.cjs +1370 -0
  10. package/dist/chunk-IJKWKY4H.cjs.map +1 -0
  11. package/dist/chunk-JTSG5FGC.cjs +397 -0
  12. package/dist/chunk-JTSG5FGC.cjs.map +1 -0
  13. package/dist/chunk-ONC6L3IX.cjs +97 -0
  14. package/dist/chunk-ONC6L3IX.cjs.map +1 -0
  15. package/dist/chunk-R76EUYDI.cjs +233 -0
  16. package/dist/chunk-R76EUYDI.cjs.map +1 -0
  17. package/dist/{chunk-XLA7DARS.js → chunk-RG5JZ6JL.js} +159 -36
  18. package/dist/chunk-RG5JZ6JL.js.map +1 -0
  19. package/dist/components/index.cjs +158 -1594
  20. package/dist/components/index.cjs.map +1 -1
  21. package/dist/components/index.d.cts +2 -2
  22. package/dist/components/index.d.ts +2 -2
  23. package/dist/components/index.js +2 -2
  24. package/dist/hooks/index.cjs +656 -509
  25. package/dist/hooks/index.cjs.map +1 -1
  26. package/dist/hooks/index.d.cts +63 -29
  27. package/dist/hooks/index.d.ts +63 -29
  28. package/dist/hooks/index.js +619 -196
  29. package/dist/hooks/index.js.map +1 -1
  30. package/dist/{index-CmVz0OOm.d.ts → index-BAyr1ODZ.d.ts} +28 -3
  31. package/dist/{index-DAZzhuO4.d.cts → index-C20NVU7_.d.cts} +28 -3
  32. package/dist/index.cjs +284 -1833
  33. package/dist/index.cjs.map +1 -1
  34. package/dist/index.d.cts +7 -8
  35. package/dist/index.d.ts +7 -8
  36. package/dist/index.js +64 -4
  37. package/dist/index.js.map +1 -1
  38. package/dist/signers/index.cjs +22 -161
  39. package/dist/signers/index.cjs.map +1 -1
  40. package/dist/signers/index.d.cts +16 -11
  41. package/dist/signers/index.d.ts +16 -11
  42. package/dist/signers/index.js +1 -1
  43. package/dist/testing/index.d.cts +1 -1
  44. package/dist/testing/index.d.ts +1 -1
  45. package/dist/theme/agenc-tailwind-preset.cjs +134 -108
  46. package/dist/{types-jvISR6bc.d.cts → types-B10rndEI.d.cts} +16 -7
  47. package/dist/{types-jvISR6bc.d.ts → types-B10rndEI.d.ts} +16 -7
  48. package/dist/{useAgentTrackRecord-DPt3SfYz.d.cts → useAgentTrackRecord-Ch7gHTFj.d.cts} +1 -1
  49. package/dist/{useAgentTrackRecord-DPt3SfYz.d.ts → useAgentTrackRecord-Ch7gHTFj.d.ts} +1 -1
  50. package/package.json +6 -3
  51. package/src/components/HireCheckoutModal.tsx +5 -2
  52. package/src/hooks/index.ts +1 -0
  53. package/src/hooks/internal.ts +178 -24
  54. package/src/hooks/useAgentTrackRecord.ts +5 -2
  55. package/src/hooks/useCompletionBond.ts +56 -21
  56. package/src/hooks/useDispute.ts +46 -9
  57. package/src/hooks/useHire.ts +113 -23
  58. package/src/hooks/useHumanlessHireFlow.ts +335 -115
  59. package/src/hooks/useListing.ts +2 -2
  60. package/src/hooks/useListings.ts +2 -2
  61. package/src/hooks/useRateHire.ts +32 -5
  62. package/src/hooks/useReferrerEarnings.ts +4 -1
  63. package/src/hooks/useSubmissionReview.ts +95 -32
  64. package/src/hooks/useTaskActivation.ts +51 -9
  65. package/src/hooks/useTaskGuarantee.ts +4 -1
  66. package/src/hooks/useTaskLifecycle.ts +104 -24
  67. package/src/hooks/useTaskStatus.ts +121 -26
  68. package/src/hooks/useTaskWork.ts +76 -12
  69. package/src/hooks/useWalletSigner.ts +11 -16
  70. package/src/index.ts +3 -0
  71. package/src/provider/AgencProvider.tsx +95 -3
  72. package/src/provider/referrer.ts +1 -1
  73. package/src/signers/README.md +13 -7
  74. package/src/signers/index.ts +6 -1
  75. package/src/signers/strings.ts +13 -1
  76. package/src/signers/types.ts +16 -5
  77. package/src/signers/wallet-account.ts +115 -29
  78. package/src/signers/wallet-adapter.ts +38 -4
  79. package/src/theme/agenc-tailwind-preset.cjs +134 -108
  80. package/src/types.ts +27 -1
  81. package/dist/chunk-JVXGNW3Q.js.map +0 -1
  82. package/dist/chunk-ON6XR4XO.js +0 -128
  83. package/dist/chunk-ON6XR4XO.js.map +0 -1
  84. package/dist/chunk-XLA7DARS.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  import { ReactNode, ButtonHTMLAttributes, HTMLAttributes, RefObject } from 'react';
2
- import { ListActiveListingsOptions, DecodedProgramAccount, ServiceListing, IndexerListing, IndexerHire, IndexerAgentTrackRecord, MarketplaceClient, ProgramAccountsTransport, CreateIndexerClientOptions, TaskGuarantee, TaskStatus, fetchMaybeAgentVerification, AgentVerification } from '@tetsuo-ai/marketplace-sdk';
3
- import { T as TaskGuaranteeReader, f as HireStatus, b as AnyHireInput, i as ReviewStatus, c as DisputeStatus, a as AgentTrackRecord } from './useAgentTrackRecord-DPt3SfYz.js';
2
+ import { ListActiveListingsOptions, DecodedProgramAccount, ServiceListing, IndexerListing, IndexerHire, IndexerAgentTrackRecord, MarketplaceClient, ModerationAccountReadRpc, ProgramAccountsTransport, CreateIndexerClientOptions, TaskGuarantee, TaskStatus, fetchMaybeAgentVerification, AgentVerification } from '@tetsuo-ai/marketplace-sdk';
3
+ import { T as TaskGuaranteeReader, f as HireStatus, b as AnyHireInput, i as ReviewStatus, c as DisputeStatus, a as AgentTrackRecord } from './useAgentTrackRecord-Ch7gHTFj.js';
4
4
  import { Address, TransactionSigner, Rpc, GetProgramAccountsApi } from '@solana/kit';
5
5
 
6
6
  /**
@@ -114,7 +114,7 @@ interface ValidatedReferrerConfig {
114
114
  * The runtime answer to "can a referral fee actually be charged on this
115
115
  * cluster?". Returned by `resolveReferrerCapability()`.
116
116
  *
117
- * Referrer settlement is live on the full 84-instruction surface. `live` is true
117
+ * Referrer settlement is live on the full protocol surface. `live` is true
118
118
  * when a validated provider referrer is configured. Aggregated earnings remain a
119
119
  * separate indexer-gated read surface.
120
120
  */
@@ -136,6 +136,15 @@ interface ReferrerCapability {
136
136
  interface AgencProviderConfig {
137
137
  /** Target cluster; drives default RPC/indexer endpoint resolution. */
138
138
  network?: AgencNetwork;
139
+ /**
140
+ * Stable identity for an opaque/custom deployment. It is folded into every
141
+ * TanStack Query key in addition to the resolved network and endpoints.
142
+ * Supply this when `client`, `queryTransport`, or hook-level readers point at
143
+ * a deployment whose identity cannot be derived from public URLs. Use the
144
+ * same value during SSR/hydration and across reloads that share persisted
145
+ * query state; never place credentials in it.
146
+ */
147
+ cacheNamespace?: string;
139
148
  /** HTTP RPC endpoint. Overrides the network default. */
140
149
  rpcUrl?: string;
141
150
  /** WebSocket RPC endpoint (for subscriptions). Overrides the network default. */
@@ -152,6 +161,13 @@ interface AgencProviderConfig {
152
161
  * `startLocalMarketplace().client` plugs in for hook e2e.
153
162
  */
154
163
  client?: MarketplaceClient;
164
+ /**
165
+ * Explicit account-read RPC for funded hire/activation orchestration,
166
+ * including moderation-account resolution and finalized reconciliation.
167
+ * It wins over `rpcUrl`. Supply this alongside a custom `client` when that
168
+ * client is not backed by the provider network's HTTP endpoint.
169
+ */
170
+ orchestrationRpc?: ModerationAccountReadRpc;
155
171
  /**
156
172
  * Pre-built read transport override slot (tests/mocks/SSR fixtures). Wins over
157
173
  * `indexer`/`rpc` resolution.
@@ -165,6 +181,8 @@ interface AgencProviderConfig {
165
181
  interface AgencContextValue {
166
182
  /** Resolved target network. */
167
183
  network: AgencNetwork;
184
+ /** Stable deployment identity included in every query key and invalidation. */
185
+ cacheNamespace: string;
168
186
  /** The unified read transport (indexer-first, gPA fallback). */
169
187
  read: ReadTransport;
170
188
  /**
@@ -182,6 +200,13 @@ interface AgencContextValue {
182
200
  * queries stay with the read transport.
183
201
  */
184
202
  rpcUrl: string | null;
203
+ /** Explicit account-read seam used by funded orchestration, or `null`. */
204
+ orchestrationRpc: ModerationAccountReadRpc | null;
205
+ /**
206
+ * HTTP RPC used by funded orchestration. A network default is used only for
207
+ * a provider-built client; a custom client receives no implicit endpoint.
208
+ */
209
+ orchestrationRpcUrl: string | null;
185
210
  /**
186
211
  * The configured hosted-indexer base URL (`config.indexer.baseUrl`), or
187
212
  * `null` when reads run over gPA/queryTransport. Earnings hooks prefer it
@@ -1,6 +1,6 @@
1
1
  import { ReactNode, ButtonHTMLAttributes, HTMLAttributes, RefObject } from 'react';
2
- import { ListActiveListingsOptions, DecodedProgramAccount, ServiceListing, IndexerListing, IndexerHire, IndexerAgentTrackRecord, MarketplaceClient, ProgramAccountsTransport, CreateIndexerClientOptions, TaskGuarantee, TaskStatus, fetchMaybeAgentVerification, AgentVerification } from '@tetsuo-ai/marketplace-sdk';
3
- import { T as TaskGuaranteeReader, f as HireStatus, b as AnyHireInput, i as ReviewStatus, c as DisputeStatus, a as AgentTrackRecord } from './useAgentTrackRecord-DPt3SfYz.cjs';
2
+ import { ListActiveListingsOptions, DecodedProgramAccount, ServiceListing, IndexerListing, IndexerHire, IndexerAgentTrackRecord, MarketplaceClient, ModerationAccountReadRpc, ProgramAccountsTransport, CreateIndexerClientOptions, TaskGuarantee, TaskStatus, fetchMaybeAgentVerification, AgentVerification } from '@tetsuo-ai/marketplace-sdk';
3
+ import { T as TaskGuaranteeReader, f as HireStatus, b as AnyHireInput, i as ReviewStatus, c as DisputeStatus, a as AgentTrackRecord } from './useAgentTrackRecord-Ch7gHTFj.cjs';
4
4
  import { Address, TransactionSigner, Rpc, GetProgramAccountsApi } from '@solana/kit';
5
5
 
6
6
  /**
@@ -114,7 +114,7 @@ interface ValidatedReferrerConfig {
114
114
  * The runtime answer to "can a referral fee actually be charged on this
115
115
  * cluster?". Returned by `resolveReferrerCapability()`.
116
116
  *
117
- * Referrer settlement is live on the full 84-instruction surface. `live` is true
117
+ * Referrer settlement is live on the full protocol surface. `live` is true
118
118
  * when a validated provider referrer is configured. Aggregated earnings remain a
119
119
  * separate indexer-gated read surface.
120
120
  */
@@ -136,6 +136,15 @@ interface ReferrerCapability {
136
136
  interface AgencProviderConfig {
137
137
  /** Target cluster; drives default RPC/indexer endpoint resolution. */
138
138
  network?: AgencNetwork;
139
+ /**
140
+ * Stable identity for an opaque/custom deployment. It is folded into every
141
+ * TanStack Query key in addition to the resolved network and endpoints.
142
+ * Supply this when `client`, `queryTransport`, or hook-level readers point at
143
+ * a deployment whose identity cannot be derived from public URLs. Use the
144
+ * same value during SSR/hydration and across reloads that share persisted
145
+ * query state; never place credentials in it.
146
+ */
147
+ cacheNamespace?: string;
139
148
  /** HTTP RPC endpoint. Overrides the network default. */
140
149
  rpcUrl?: string;
141
150
  /** WebSocket RPC endpoint (for subscriptions). Overrides the network default. */
@@ -152,6 +161,13 @@ interface AgencProviderConfig {
152
161
  * `startLocalMarketplace().client` plugs in for hook e2e.
153
162
  */
154
163
  client?: MarketplaceClient;
164
+ /**
165
+ * Explicit account-read RPC for funded hire/activation orchestration,
166
+ * including moderation-account resolution and finalized reconciliation.
167
+ * It wins over `rpcUrl`. Supply this alongside a custom `client` when that
168
+ * client is not backed by the provider network's HTTP endpoint.
169
+ */
170
+ orchestrationRpc?: ModerationAccountReadRpc;
155
171
  /**
156
172
  * Pre-built read transport override slot (tests/mocks/SSR fixtures). Wins over
157
173
  * `indexer`/`rpc` resolution.
@@ -165,6 +181,8 @@ interface AgencProviderConfig {
165
181
  interface AgencContextValue {
166
182
  /** Resolved target network. */
167
183
  network: AgencNetwork;
184
+ /** Stable deployment identity included in every query key and invalidation. */
185
+ cacheNamespace: string;
168
186
  /** The unified read transport (indexer-first, gPA fallback). */
169
187
  read: ReadTransport;
170
188
  /**
@@ -182,6 +200,13 @@ interface AgencContextValue {
182
200
  * queries stay with the read transport.
183
201
  */
184
202
  rpcUrl: string | null;
203
+ /** Explicit account-read seam used by funded orchestration, or `null`. */
204
+ orchestrationRpc: ModerationAccountReadRpc | null;
205
+ /**
206
+ * HTTP RPC used by funded orchestration. A network default is used only for
207
+ * a provider-built client; a custom client receives no implicit endpoint.
208
+ */
209
+ orchestrationRpcUrl: string | null;
185
210
  /**
186
211
  * The configured hosted-indexer base URL (`config.indexer.baseUrl`), or
187
212
  * `null` when reads run over gPA/queryTransport. Earnings hooks prefer it