@openagentmarket/nodejs 1.1.0 → 1.1.1
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/registry.d.ts +1 -1
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +4 -2
- package/package.json +1 -1
- package/src/registry.ts +5 -3
package/dist/registry.d.ts
CHANGED
package/dist/registry.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,WAAW;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,WAAW;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAClC;AAED,MAAM,WAAW,cAAc;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;CACvB;AAED,qBAAa,QAAQ;IAGL,OAAO,CAAC,MAAM;IAF1B,OAAO,CAAC,GAAG,CAAM;gBAEG,MAAM,EAAE;QACxB,MAAM,EAAE,MAAM,CAAC;QACf,SAAS,EAAE,MAAM,CAAC;QAClB,MAAM,CAAC,EAAE,MAAM,CAAC;KACnB;IAUY,QAAQ,CAAC,SAAS,EAAE,WAAW,GAAG,OAAO,CAAC,cAAc,CAAC;CA+CzE"}
|
package/dist/registry.js
CHANGED
|
@@ -15,8 +15,10 @@ export class Registry {
|
|
|
15
15
|
async register(agentInfo) {
|
|
16
16
|
console.log(`[OpenAgent] 📝 Creating agent: ${agentInfo.name}...`);
|
|
17
17
|
const agent = this.sdk.createAgent(agentInfo.name, agentInfo.description, agentInfo.image);
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
if (agentInfo.a2aEndpoint) {
|
|
19
|
+
console.log(`[OpenAgent] 🔗 Setting A2A endpoint: ${agentInfo.a2aEndpoint}`);
|
|
20
|
+
await agent.setA2A(agentInfo.a2aEndpoint);
|
|
21
|
+
}
|
|
20
22
|
agent.setTrust(true, false, false);
|
|
21
23
|
agent.setActive(true);
|
|
22
24
|
agent.setX402Support(true);
|
package/package.json
CHANGED
package/src/registry.ts
CHANGED
|
@@ -5,7 +5,7 @@ export interface AgentConfig {
|
|
|
5
5
|
name: string;
|
|
6
6
|
description: string;
|
|
7
7
|
image: string;
|
|
8
|
-
a2aEndpoint
|
|
8
|
+
a2aEndpoint?: string;
|
|
9
9
|
// Optional: if not provided, will look for env vars or throw
|
|
10
10
|
signer?: string; // Private key
|
|
11
11
|
pinataJwt?: string;
|
|
@@ -46,8 +46,10 @@ export class Registry {
|
|
|
46
46
|
agentInfo.image
|
|
47
47
|
);
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
if (agentInfo.a2aEndpoint) {
|
|
50
|
+
console.log(`[OpenAgent] 🔗 Setting A2A endpoint: ${agentInfo.a2aEndpoint}`);
|
|
51
|
+
await agent.setA2A(agentInfo.a2aEndpoint);
|
|
52
|
+
}
|
|
51
53
|
|
|
52
54
|
agent.setTrust(true, false, false);
|
|
53
55
|
agent.setActive(true);
|