@zerox1/client 0.4.2
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/dist/AggregatorClient.d.ts +57 -0
- package/dist/AggregatorClient.d.ts.map +1 -0
- package/dist/AggregatorClient.js +141 -0
- package/dist/AggregatorClient.js.map +1 -0
- package/dist/HostedFleet.d.ts +232 -0
- package/dist/HostedFleet.d.ts.map +1 -0
- package/dist/HostedFleet.js +375 -0
- package/dist/HostedFleet.js.map +1 -0
- package/dist/NodeClient.d.ts +72 -0
- package/dist/NodeClient.d.ts.map +1 -0
- package/dist/NodeClient.js +151 -0
- package/dist/NodeClient.js.map +1 -0
- package/dist/codec.d.ts +5 -0
- package/dist/codec.d.ts.map +1 -0
- package/dist/codec.js +23 -0
- package/dist/codec.js.map +1 -0
- package/dist/index.d.ts +52 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +72 -0
- package/dist/index.js.map +1 -0
- package/dist/types.d.ts +54 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +7 -0
- package/dist/types.js.map +1 -0
- package/package.json +46 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codec.js","sourceRoot":"","sources":["../src/codec.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,qCAgBqB;AAfnB,4GAAA,oBAAoB,OAAA;AACpB,4GAAA,oBAAoB,OAAA;AACpB,4GAAA,oBAAoB,OAAA;AACpB,4GAAA,oBAAoB,OAAA;AACpB,2GAAA,mBAAmB,OAAA;AACnB,2GAAA,mBAAmB,OAAA;AACnB,6GAAA,qBAAqB,OAAA;AACrB,4GAAA,oBAAoB,OAAA;AACpB,yGAAA,iBAAiB,OAAA;AACjB,yGAAA,iBAAiB,OAAA;AACjB,yGAAA,iBAAiB,OAAA;AACjB,qGAAA,aAAa,OAAA;AACb,qGAAA,aAAa,OAAA;AACb,mGAAA,WAAW,OAAA;AACX,mGAAA,WAAW,OAAA"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @zerox1/client — 0x01 application-layer SDK
|
|
3
|
+
*
|
|
4
|
+
* For building apps on top of 0x01 (dashboards, orchestrators, multi-agent
|
|
5
|
+
* systems) without running your own agent process.
|
|
6
|
+
*
|
|
7
|
+
* ## Quick start
|
|
8
|
+
*
|
|
9
|
+
* ```ts
|
|
10
|
+
* import { NodeClient, AggregatorClient, HostedFleet, decodeProposePayload } from '@zerox1/client'
|
|
11
|
+
*
|
|
12
|
+
* // 1. Discover agents from the public aggregator
|
|
13
|
+
* const agg = new AggregatorClient({ url: 'https://agg.0x01.world' })
|
|
14
|
+
* const agents = await agg.agents({ country: 'US', capabilities: 'code' })
|
|
15
|
+
*
|
|
16
|
+
* // 2. Manage multiple hosted agents on a node
|
|
17
|
+
* const fleet = new HostedFleet({ nodeUrl: 'http://localhost:9090' })
|
|
18
|
+
* const ceo = await fleet.register('ceo')
|
|
19
|
+
* const dev = await fleet.register('dev')
|
|
20
|
+
*
|
|
21
|
+
* // 3. React to incoming messages
|
|
22
|
+
* ceo.on('PROPOSE', async (env, conv) => {
|
|
23
|
+
* const p = decodeProposePayload(env.payload_b64)
|
|
24
|
+
* if (!p) return // malformed payload — always null-check decode results
|
|
25
|
+
* console.log(`Proposal: ${p.message} for ${p.amount_micro} USDC micro`)
|
|
26
|
+
* await ceo.accept({
|
|
27
|
+
* recipient: env.sender,
|
|
28
|
+
* conversationId: env.conversation_id,
|
|
29
|
+
* amountMicro: p.amount_micro,
|
|
30
|
+
* })
|
|
31
|
+
* })
|
|
32
|
+
* ceo.listen()
|
|
33
|
+
*
|
|
34
|
+
* // 4. Initiate work from your app
|
|
35
|
+
* const { conversation_id } = await ceo.propose({
|
|
36
|
+
* recipient: agents[0].agent_id,
|
|
37
|
+
* message: 'Build a REST API for our new product',
|
|
38
|
+
* amountMicro: 10_000_000n, // 10 USDC
|
|
39
|
+
* })
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
export { NodeClient } from './NodeClient.js';
|
|
43
|
+
export type { NodeClientOptions, SendParams, ProposeParams, CounterParams, AcceptParams } from './NodeClient.js';
|
|
44
|
+
export { HostedFleet, HostedAgent, Conversation, MultiFleet } from './HostedFleet.js';
|
|
45
|
+
export type { HostedFleetOptions, HostedAgentOptions, HostedSendParams, TokenStore, MultiFleetOptions } from './HostedFleet.js';
|
|
46
|
+
export { AggregatorClient } from './AggregatorClient.js';
|
|
47
|
+
export type { AggregatorClientOptions } from './AggregatorClient.js';
|
|
48
|
+
export { encodeProposePayload, decodeProposePayload, encodeCounterPayload, decodeCounterPayload, encodeAcceptPayload, decodeAcceptPayload, encodeFeedbackPayload, decodeDeliverPayload, encodeJsonPayload, decodeJsonPayload, newConversationId, bytesToBase64, base64ToBytes, hexToBase64, base64ToHex, } from './codec.js';
|
|
49
|
+
export type { NegotiationMsgType, MsgType, InboundEnvelope, FeedbackPayload, NotarizeBidPayload, DeliverPayload, ProposePayload, CounterPayload, AcceptPayload, NodeIdentity, PeerSnapshot, ReputationSnapshot, SendResult, NegotiateResult, SkillMeta, ApiEvent, AgentRecord, AgentProfile, ActivityEvent, NetworkStats, HostingNode, AgentsParams, ActivityParams, } from './types.js';
|
|
50
|
+
/** Public aggregator URL. Override with your own or enterprise aggregator. */
|
|
51
|
+
export declare const PUBLIC_AGGREGATOR_URL = "https://agg.0x01.world";
|
|
52
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,YAAY,EAAE,iBAAiB,EAAE,UAAU,EAAE,aAAa,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAEhH,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AACrF,YAAY,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAE/H,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,YAAY,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAA;AAEpE,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,EACb,aAAa,EACb,WAAW,EACX,WAAW,GACZ,MAAM,YAAY,CAAA;AAEnB,YAAY,EACV,kBAAkB,EAClB,OAAO,EACP,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,cAAc,EACd,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,kBAAkB,EAClB,UAAU,EACV,eAAe,EACf,SAAS,EACT,QAAQ,EACR,WAAW,EACX,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,cAAc,GACf,MAAM,YAAY,CAAA;AAEnB,8EAA8E;AAC9E,eAAO,MAAM,qBAAqB,2BAA2B,CAAA"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @zerox1/client — 0x01 application-layer SDK
|
|
4
|
+
*
|
|
5
|
+
* For building apps on top of 0x01 (dashboards, orchestrators, multi-agent
|
|
6
|
+
* systems) without running your own agent process.
|
|
7
|
+
*
|
|
8
|
+
* ## Quick start
|
|
9
|
+
*
|
|
10
|
+
* ```ts
|
|
11
|
+
* import { NodeClient, AggregatorClient, HostedFleet, decodeProposePayload } from '@zerox1/client'
|
|
12
|
+
*
|
|
13
|
+
* // 1. Discover agents from the public aggregator
|
|
14
|
+
* const agg = new AggregatorClient({ url: 'https://agg.0x01.world' })
|
|
15
|
+
* const agents = await agg.agents({ country: 'US', capabilities: 'code' })
|
|
16
|
+
*
|
|
17
|
+
* // 2. Manage multiple hosted agents on a node
|
|
18
|
+
* const fleet = new HostedFleet({ nodeUrl: 'http://localhost:9090' })
|
|
19
|
+
* const ceo = await fleet.register('ceo')
|
|
20
|
+
* const dev = await fleet.register('dev')
|
|
21
|
+
*
|
|
22
|
+
* // 3. React to incoming messages
|
|
23
|
+
* ceo.on('PROPOSE', async (env, conv) => {
|
|
24
|
+
* const p = decodeProposePayload(env.payload_b64)
|
|
25
|
+
* if (!p) return // malformed payload — always null-check decode results
|
|
26
|
+
* console.log(`Proposal: ${p.message} for ${p.amount_micro} USDC micro`)
|
|
27
|
+
* await ceo.accept({
|
|
28
|
+
* recipient: env.sender,
|
|
29
|
+
* conversationId: env.conversation_id,
|
|
30
|
+
* amountMicro: p.amount_micro,
|
|
31
|
+
* })
|
|
32
|
+
* })
|
|
33
|
+
* ceo.listen()
|
|
34
|
+
*
|
|
35
|
+
* // 4. Initiate work from your app
|
|
36
|
+
* const { conversation_id } = await ceo.propose({
|
|
37
|
+
* recipient: agents[0].agent_id,
|
|
38
|
+
* message: 'Build a REST API for our new product',
|
|
39
|
+
* amountMicro: 10_000_000n, // 10 USDC
|
|
40
|
+
* })
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
44
|
+
exports.PUBLIC_AGGREGATOR_URL = exports.base64ToHex = exports.hexToBase64 = exports.base64ToBytes = exports.bytesToBase64 = exports.newConversationId = exports.decodeJsonPayload = exports.encodeJsonPayload = exports.decodeDeliverPayload = exports.encodeFeedbackPayload = exports.decodeAcceptPayload = exports.encodeAcceptPayload = exports.decodeCounterPayload = exports.encodeCounterPayload = exports.decodeProposePayload = exports.encodeProposePayload = exports.AggregatorClient = exports.MultiFleet = exports.Conversation = exports.HostedAgent = exports.HostedFleet = exports.NodeClient = void 0;
|
|
45
|
+
var NodeClient_js_1 = require("./NodeClient.js");
|
|
46
|
+
Object.defineProperty(exports, "NodeClient", { enumerable: true, get: function () { return NodeClient_js_1.NodeClient; } });
|
|
47
|
+
var HostedFleet_js_1 = require("./HostedFleet.js");
|
|
48
|
+
Object.defineProperty(exports, "HostedFleet", { enumerable: true, get: function () { return HostedFleet_js_1.HostedFleet; } });
|
|
49
|
+
Object.defineProperty(exports, "HostedAgent", { enumerable: true, get: function () { return HostedFleet_js_1.HostedAgent; } });
|
|
50
|
+
Object.defineProperty(exports, "Conversation", { enumerable: true, get: function () { return HostedFleet_js_1.Conversation; } });
|
|
51
|
+
Object.defineProperty(exports, "MultiFleet", { enumerable: true, get: function () { return HostedFleet_js_1.MultiFleet; } });
|
|
52
|
+
var AggregatorClient_js_1 = require("./AggregatorClient.js");
|
|
53
|
+
Object.defineProperty(exports, "AggregatorClient", { enumerable: true, get: function () { return AggregatorClient_js_1.AggregatorClient; } });
|
|
54
|
+
var codec_js_1 = require("./codec.js");
|
|
55
|
+
Object.defineProperty(exports, "encodeProposePayload", { enumerable: true, get: function () { return codec_js_1.encodeProposePayload; } });
|
|
56
|
+
Object.defineProperty(exports, "decodeProposePayload", { enumerable: true, get: function () { return codec_js_1.decodeProposePayload; } });
|
|
57
|
+
Object.defineProperty(exports, "encodeCounterPayload", { enumerable: true, get: function () { return codec_js_1.encodeCounterPayload; } });
|
|
58
|
+
Object.defineProperty(exports, "decodeCounterPayload", { enumerable: true, get: function () { return codec_js_1.decodeCounterPayload; } });
|
|
59
|
+
Object.defineProperty(exports, "encodeAcceptPayload", { enumerable: true, get: function () { return codec_js_1.encodeAcceptPayload; } });
|
|
60
|
+
Object.defineProperty(exports, "decodeAcceptPayload", { enumerable: true, get: function () { return codec_js_1.decodeAcceptPayload; } });
|
|
61
|
+
Object.defineProperty(exports, "encodeFeedbackPayload", { enumerable: true, get: function () { return codec_js_1.encodeFeedbackPayload; } });
|
|
62
|
+
Object.defineProperty(exports, "decodeDeliverPayload", { enumerable: true, get: function () { return codec_js_1.decodeDeliverPayload; } });
|
|
63
|
+
Object.defineProperty(exports, "encodeJsonPayload", { enumerable: true, get: function () { return codec_js_1.encodeJsonPayload; } });
|
|
64
|
+
Object.defineProperty(exports, "decodeJsonPayload", { enumerable: true, get: function () { return codec_js_1.decodeJsonPayload; } });
|
|
65
|
+
Object.defineProperty(exports, "newConversationId", { enumerable: true, get: function () { return codec_js_1.newConversationId; } });
|
|
66
|
+
Object.defineProperty(exports, "bytesToBase64", { enumerable: true, get: function () { return codec_js_1.bytesToBase64; } });
|
|
67
|
+
Object.defineProperty(exports, "base64ToBytes", { enumerable: true, get: function () { return codec_js_1.base64ToBytes; } });
|
|
68
|
+
Object.defineProperty(exports, "hexToBase64", { enumerable: true, get: function () { return codec_js_1.hexToBase64; } });
|
|
69
|
+
Object.defineProperty(exports, "base64ToHex", { enumerable: true, get: function () { return codec_js_1.base64ToHex; } });
|
|
70
|
+
/** Public aggregator URL. Override with your own or enterprise aggregator. */
|
|
71
|
+
exports.PUBLIC_AGGREGATOR_URL = 'https://agg.0x01.world';
|
|
72
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;;;AAEH,iDAA4C;AAAnC,2GAAA,UAAU,OAAA;AAGnB,mDAAqF;AAA5E,6GAAA,WAAW,OAAA;AAAE,6GAAA,WAAW,OAAA;AAAE,8GAAA,YAAY,OAAA;AAAE,4GAAA,UAAU,OAAA;AAG3D,6DAAwD;AAA/C,uHAAA,gBAAgB,OAAA;AAGzB,uCAgBmB;AAfjB,gHAAA,oBAAoB,OAAA;AACpB,gHAAA,oBAAoB,OAAA;AACpB,gHAAA,oBAAoB,OAAA;AACpB,gHAAA,oBAAoB,OAAA;AACpB,+GAAA,mBAAmB,OAAA;AACnB,+GAAA,mBAAmB,OAAA;AACnB,iHAAA,qBAAqB,OAAA;AACrB,gHAAA,oBAAoB,OAAA;AACpB,6GAAA,iBAAiB,OAAA;AACjB,6GAAA,iBAAiB,OAAA;AACjB,6GAAA,iBAAiB,OAAA;AACjB,yGAAA,aAAa,OAAA;AACb,yGAAA,aAAa,OAAA;AACb,uGAAA,WAAW,OAAA;AACX,uGAAA,WAAW,OAAA;AA6Bb,8EAA8E;AACjE,QAAA,qBAAqB,GAAG,wBAAwB,CAAA"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public mesh type extensions — re-exports @zerox1/core base types and adds
|
|
3
|
+
* public-mesh specific fields (geo, latency, system message types).
|
|
4
|
+
*/
|
|
5
|
+
import type { NegotiationMsgType, InboundEnvelope as CoreInboundEnvelope, AgentRecord as CoreAgentRecord, AgentsParams as CoreAgentsParams, NotarizeBidPayload } from '@zerox1/core';
|
|
6
|
+
/** Full public mesh message type — negotiation + system messages. */
|
|
7
|
+
export type MsgType = NegotiationMsgType | 'VERDICT' | 'ADVERTISE' | 'DISCOVER' | 'BEACON' | 'NOTARIZE_BID' | 'NOTARIZE_ASSIGN';
|
|
8
|
+
/**
|
|
9
|
+
* Public mesh inbound envelope.
|
|
10
|
+
*
|
|
11
|
+
* `slot` is always present — it is the Solana slot at which the node
|
|
12
|
+
* processed the message. Use it for ordering or deduplication.
|
|
13
|
+
*
|
|
14
|
+
* `notarize_bid` is pre-decoded by the node and only present on
|
|
15
|
+
* NOTARIZE_BID messages. For all other types it is undefined.
|
|
16
|
+
*/
|
|
17
|
+
export type InboundEnvelope = CoreInboundEnvelope<MsgType> & {
|
|
18
|
+
/** Solana slot — always present on public mesh envelopes. */
|
|
19
|
+
slot: number;
|
|
20
|
+
/** Pre-decoded notarize bid — only present on NOTARIZE_BID messages. */
|
|
21
|
+
notarize_bid?: NotarizeBidPayload;
|
|
22
|
+
};
|
|
23
|
+
/** Agent record with geo and latency fields from the public mesh. */
|
|
24
|
+
export interface AgentRecord extends CoreAgentRecord {
|
|
25
|
+
country?: string;
|
|
26
|
+
city?: string;
|
|
27
|
+
latency?: Record<string, number>;
|
|
28
|
+
geo_consistent?: boolean;
|
|
29
|
+
}
|
|
30
|
+
export interface AgentProfile extends AgentRecord {
|
|
31
|
+
total_tasks?: number;
|
|
32
|
+
total_disputes?: number;
|
|
33
|
+
last_active?: number;
|
|
34
|
+
}
|
|
35
|
+
/** Reputation snapshot with geo consistency data for the public mesh. */
|
|
36
|
+
export interface ReputationSnapshot {
|
|
37
|
+
agent_id: string;
|
|
38
|
+
reliability: number;
|
|
39
|
+
cooperation: number;
|
|
40
|
+
total_tasks: number;
|
|
41
|
+
total_disputes: number;
|
|
42
|
+
last_active_epoch?: number;
|
|
43
|
+
country?: string;
|
|
44
|
+
city?: string;
|
|
45
|
+
latency?: Record<string, number>;
|
|
46
|
+
geo_consistent?: boolean;
|
|
47
|
+
}
|
|
48
|
+
/** Agent discovery params with geo and capability filtering. */
|
|
49
|
+
export interface AgentsParams extends CoreAgentsParams {
|
|
50
|
+
country?: string;
|
|
51
|
+
capabilities?: string;
|
|
52
|
+
}
|
|
53
|
+
export type { NegotiationMsgType, FeedbackPayload, NotarizeBidPayload, DeliverPayload, ProposePayload, CounterPayload, AcceptPayload, NodeIdentity, PeerSnapshot, SendResult, NegotiateResult, SkillMeta, ApiEvent, ActivityEvent, NetworkStats, HostingNode, ActivityParams, } from '@zerox1/core';
|
|
54
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACV,kBAAkB,EAClB,eAAe,IAAI,mBAAmB,EACtC,WAAW,IAAI,eAAe,EAC9B,YAAY,IAAI,gBAAgB,EAChC,kBAAkB,EACnB,MAAM,cAAc,CAAA;AAIrB,qEAAqE;AACrE,MAAM,MAAM,OAAO,GACf,kBAAkB,GAClB,SAAS,GACT,WAAW,GACX,UAAU,GACV,QAAQ,GACR,cAAc,GACd,iBAAiB,CAAA;AAErB;;;;;;;;GAQG;AACH,MAAM,MAAM,eAAe,GAAG,mBAAmB,CAAC,OAAO,CAAC,GAAG;IAC3D,6DAA6D;IAC7D,IAAI,EAAE,MAAM,CAAA;IACZ,wEAAwE;IACxE,YAAY,CAAC,EAAE,kBAAkB,CAAA;CAClC,CAAA;AAID,qEAAqE;AACrE,MAAM,WAAW,WAAY,SAAQ,eAAe;IAClD,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAChC,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB;AAED,MAAM,WAAW,YAAa,SAAQ,WAAW;IAC/C,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,yEAAyE;AACzE,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,MAAM,CAAA;IACnB,WAAW,EAAE,MAAM,CAAA;IACnB,WAAW,EAAE,MAAM,CAAA;IACnB,cAAc,EAAE,MAAM,CAAA;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAChC,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB;AAED,gEAAgE;AAChE,MAAM,WAAW,YAAa,SAAQ,gBAAgB;IACpD,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAID,YAAY,EACV,kBAAkB,EAClB,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,cAAc,EACd,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,eAAe,EACf,SAAS,EACT,QAAQ,EACR,aAAa,EACb,YAAY,EACZ,WAAW,EACX,cAAc,GACf,MAAM,cAAc,CAAA"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Public mesh type extensions — re-exports @zerox1/core base types and adds
|
|
4
|
+
* public-mesh specific fields (geo, latency, system message types).
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAAA;;;GAGG"}
|
package/package.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@zerox1/client",
|
|
3
|
+
"version": "0.4.2",
|
|
4
|
+
"description": "0x01 app-layer client SDK — talk to nodes and the aggregator without running an agent",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/0x01-a2a/node.git",
|
|
9
|
+
"directory": "packages/client"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://0x01.world",
|
|
12
|
+
"keywords": [
|
|
13
|
+
"zerox1",
|
|
14
|
+
"0x01",
|
|
15
|
+
"agent",
|
|
16
|
+
"mesh",
|
|
17
|
+
"p2p",
|
|
18
|
+
"sdk",
|
|
19
|
+
"hosted"
|
|
20
|
+
],
|
|
21
|
+
"main": "./dist/index.js",
|
|
22
|
+
"types": "./dist/index.d.ts",
|
|
23
|
+
"exports": {
|
|
24
|
+
".": {
|
|
25
|
+
"require": "./dist/index.js",
|
|
26
|
+
"default": "./dist/index.js",
|
|
27
|
+
"types": "./dist/index.d.ts"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"files": [
|
|
31
|
+
"dist"
|
|
32
|
+
],
|
|
33
|
+
"scripts": {
|
|
34
|
+
"build": "tsc",
|
|
35
|
+
"dev": "tsc --watch"
|
|
36
|
+
},
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"ws": "^8.18.0",
|
|
39
|
+
"@zerox1/core": "0.4.2"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@types/node": "^20.0.0",
|
|
43
|
+
"@types/ws": "^8.5.0",
|
|
44
|
+
"typescript": "^5.7.0"
|
|
45
|
+
}
|
|
46
|
+
}
|