@ampersend_ai/ampersend-sdk 0.0.25 → 0.0.26
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/ampersend/agent.d.ts +65 -66
- package/dist/ampersend/agent.d.ts.map +1 -1
- package/dist/ampersend/agent.js +32 -22
- package/dist/ampersend/agent.js.map +1 -1
- package/dist/ampersend/approval.js.map +1 -1
- package/dist/ampersend/client.d.ts +2 -2
- package/dist/ampersend/client.d.ts.map +1 -1
- package/dist/ampersend/client.js.map +1 -1
- package/dist/ampersend/curated-agent.d.ts +94 -94
- package/dist/ampersend/curated-agent.d.ts.map +1 -1
- package/dist/ampersend/curated-agent.js +41 -41
- package/dist/ampersend/curated-agent.js.map +1 -1
- package/dist/ampersend/management.d.ts +23 -59
- package/dist/ampersend/management.d.ts.map +1 -1
- package/dist/ampersend/management.js +6 -8
- package/dist/ampersend/management.js.map +1 -1
- package/dist/ampersend/types.d.ts +194 -318
- package/dist/ampersend/types.d.ts.map +1 -1
- package/dist/ampersend/types.js +134 -123
- package/dist/ampersend/types.js.map +1 -1
- package/dist/ampersend/zod-bridge.d.ts +4 -5
- package/dist/ampersend/zod-bridge.d.ts.map +1 -1
- package/dist/ampersend/zod-bridge.js +35 -19
- package/dist/ampersend/zod-bridge.js.map +1 -1
- package/dist/cli/commands/agent.d.ts +3 -1
- package/dist/cli/commands/agent.d.ts.map +1 -1
- package/dist/cli/commands/agent.js +44 -22
- package/dist/cli/commands/agent.js.map +1 -1
- package/dist/cli/commands/card.d.ts +19 -16
- package/dist/cli/commands/card.d.ts.map +1 -1
- package/dist/cli/commands/card.js +21 -16
- package/dist/cli/commands/card.js.map +1 -1
- package/dist/cli/commands/config.d.ts +1 -1
- package/dist/cli/commands/config.d.ts.map +1 -1
- package/dist/cli/commands/config.js +31 -42
- package/dist/cli/commands/config.js.map +1 -1
- package/dist/cli/commands/fetch.d.ts +1 -0
- package/dist/cli/commands/fetch.d.ts.map +1 -1
- package/dist/cli/commands/fetch.js +3 -2
- package/dist/cli/commands/fetch.js.map +1 -1
- package/dist/cli/commands/marketplace.d.ts +5 -2
- package/dist/cli/commands/marketplace.d.ts.map +1 -1
- package/dist/cli/commands/marketplace.js +12 -12
- package/dist/cli/commands/marketplace.js.map +1 -1
- package/dist/cli/commands/setup.d.ts +4 -1
- package/dist/cli/commands/setup.d.ts.map +1 -1
- package/dist/cli/commands/setup.js +66 -41
- package/dist/cli/commands/setup.js.map +1 -1
- package/dist/cli/config.d.ts +190 -68
- package/dist/cli/config.d.ts.map +1 -1
- package/dist/cli/config.js +357 -150
- package/dist/cli/config.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
|
@@ -1,117 +1,117 @@
|
|
|
1
1
|
import * as Schema from "effect/Schema";
|
|
2
|
-
export declare const CuratedAgentSource: Schema.
|
|
2
|
+
export declare const CuratedAgentSource: Schema.Literals<readonly ["catalog", "bazaar", "ampersend", "registry"]>;
|
|
3
3
|
export type CuratedAgentSource = typeof CuratedAgentSource.Type;
|
|
4
|
-
export declare const HTTPMethod: Schema.
|
|
4
|
+
export declare const HTTPMethod: Schema.Literals<readonly ["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"]>;
|
|
5
5
|
export type HTTPMethod = typeof HTTPMethod.Type;
|
|
6
|
-
export declare const x402ProtocolVersion: Schema.
|
|
6
|
+
export declare const x402ProtocolVersion: Schema.Literals<readonly [1, 2]>;
|
|
7
7
|
export type x402ProtocolVersion = typeof x402ProtocolVersion.Type;
|
|
8
8
|
export declare const CuratedAgentEndpointX402PricingConfig: Schema.Struct<{
|
|
9
|
-
amount: Schema.
|
|
10
|
-
amountAtomicUnit: Schema.
|
|
11
|
-
currency: Schema.
|
|
12
|
-
networkCaip2ID: Schema.
|
|
13
|
-
assetAddress: Schema.
|
|
14
|
-
payTo: Schema.NullOr<Schema.
|
|
15
|
-
x402Schema: Schema.NullOr<Schema.
|
|
9
|
+
readonly amount: Schema.BigIntFromString;
|
|
10
|
+
readonly amountAtomicUnit: Schema.BigIntFromString;
|
|
11
|
+
readonly currency: Schema.String;
|
|
12
|
+
readonly networkCaip2ID: Schema.NonEmptyString;
|
|
13
|
+
readonly assetAddress: Schema.NonEmptyString;
|
|
14
|
+
readonly payTo: Schema.NullOr<Schema.NonEmptyString>;
|
|
15
|
+
readonly x402Schema: Schema.NullOr<Schema.Literals<readonly ["exact", "deferred"]>>;
|
|
16
16
|
}>;
|
|
17
17
|
export type CuratedAgentEndpointX402PricingConfig = typeof CuratedAgentEndpointX402PricingConfig.Type;
|
|
18
|
-
export declare const CuratedAgentEndpointPricingConfig: Schema.Struct<{
|
|
19
|
-
amount: Schema.
|
|
20
|
-
amountAtomicUnit: Schema.
|
|
21
|
-
currency: Schema.
|
|
22
|
-
networkCaip2ID: Schema.
|
|
23
|
-
assetAddress: Schema.
|
|
24
|
-
payTo: Schema.NullOr<Schema.
|
|
25
|
-
x402Schema: Schema.NullOr<Schema.
|
|
26
|
-
}>;
|
|
18
|
+
export declare const CuratedAgentEndpointPricingConfig: Schema.Union<readonly [Schema.Struct<{
|
|
19
|
+
readonly amount: Schema.BigIntFromString;
|
|
20
|
+
readonly amountAtomicUnit: Schema.BigIntFromString;
|
|
21
|
+
readonly currency: Schema.String;
|
|
22
|
+
readonly networkCaip2ID: Schema.NonEmptyString;
|
|
23
|
+
readonly assetAddress: Schema.NonEmptyString;
|
|
24
|
+
readonly payTo: Schema.NullOr<Schema.NonEmptyString>;
|
|
25
|
+
readonly x402Schema: Schema.NullOr<Schema.Literals<readonly ["exact", "deferred"]>>;
|
|
26
|
+
}>]>;
|
|
27
27
|
export type CuratedAgentEndpointPricingConfig = typeof CuratedAgentEndpointPricingConfig.Type;
|
|
28
28
|
export declare const CuratedAgentEndpointDTO: Schema.Struct<{
|
|
29
|
-
id: Schema.brand<
|
|
30
|
-
curated_agent_id: Schema.brand<
|
|
31
|
-
url: Schema.
|
|
32
|
-
methods: Schema
|
|
33
|
-
x402_enabled: Schema.
|
|
34
|
-
x402_protocol_version: Schema.
|
|
35
|
-
network: Schema.NullOr<
|
|
36
|
-
description: Schema.NullOr<
|
|
37
|
-
enabled: Schema.
|
|
38
|
-
pricing_config: Schema.Struct<{
|
|
39
|
-
amount: Schema.
|
|
40
|
-
amountAtomicUnit: Schema.
|
|
41
|
-
currency: Schema.
|
|
42
|
-
networkCaip2ID: Schema.
|
|
43
|
-
assetAddress: Schema.
|
|
44
|
-
payTo: Schema.NullOr<Schema.
|
|
45
|
-
x402Schema: Schema.NullOr<Schema.
|
|
46
|
-
}>;
|
|
47
|
-
created_at: Schema.Union<[Schema.
|
|
48
|
-
updated_at: Schema.Union<[Schema.
|
|
29
|
+
readonly id: Schema.brand<Schema.String, "ID">;
|
|
30
|
+
readonly curated_agent_id: Schema.brand<Schema.String, "ID">;
|
|
31
|
+
readonly url: Schema.NonEmptyString;
|
|
32
|
+
readonly methods: Schema.$Array<Schema.Literals<readonly ["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"]>>;
|
|
33
|
+
readonly x402_enabled: Schema.Boolean;
|
|
34
|
+
readonly x402_protocol_version: Schema.Literals<readonly [1, 2]>;
|
|
35
|
+
readonly network: Schema.NullOr<Schema.String>;
|
|
36
|
+
readonly description: Schema.NullOr<Schema.String>;
|
|
37
|
+
readonly enabled: Schema.Boolean;
|
|
38
|
+
readonly pricing_config: Schema.Union<readonly [Schema.Struct<{
|
|
39
|
+
readonly amount: Schema.BigIntFromString;
|
|
40
|
+
readonly amountAtomicUnit: Schema.BigIntFromString;
|
|
41
|
+
readonly currency: Schema.String;
|
|
42
|
+
readonly networkCaip2ID: Schema.NonEmptyString;
|
|
43
|
+
readonly assetAddress: Schema.NonEmptyString;
|
|
44
|
+
readonly payTo: Schema.NullOr<Schema.NonEmptyString>;
|
|
45
|
+
readonly x402Schema: Schema.NullOr<Schema.Literals<readonly ["exact", "deferred"]>>;
|
|
46
|
+
}>]>;
|
|
47
|
+
readonly created_at: Schema.Union<readonly [Schema.Int, Schema.compose<Schema.Int, Schema.NumberFromString>]>;
|
|
48
|
+
readonly updated_at: Schema.Union<readonly [Schema.Int, Schema.compose<Schema.Int, Schema.NumberFromString>]>;
|
|
49
49
|
}>;
|
|
50
50
|
export type CuratedAgentEndpointDTO = typeof CuratedAgentEndpointDTO.Type;
|
|
51
51
|
export declare const CuratedAgentSkillDTO: Schema.Struct<{
|
|
52
|
-
id: Schema.brand<
|
|
53
|
-
curated_agent_id: Schema.brand<
|
|
54
|
-
name: Schema.
|
|
55
|
-
instructions: Schema.
|
|
56
|
-
docs_url: Schema.NullOr<
|
|
57
|
-
skillmd_url: Schema.NullOr<
|
|
58
|
-
created_at: Schema.Union<[Schema.
|
|
59
|
-
updated_at: Schema.Union<[Schema.
|
|
52
|
+
readonly id: Schema.brand<Schema.String, "ID">;
|
|
53
|
+
readonly curated_agent_id: Schema.brand<Schema.String, "ID">;
|
|
54
|
+
readonly name: Schema.NonEmptyString;
|
|
55
|
+
readonly instructions: Schema.Unknown;
|
|
56
|
+
readonly docs_url: Schema.NullOr<Schema.String>;
|
|
57
|
+
readonly skillmd_url: Schema.NullOr<Schema.String>;
|
|
58
|
+
readonly created_at: Schema.Union<readonly [Schema.Int, Schema.compose<Schema.Int, Schema.NumberFromString>]>;
|
|
59
|
+
readonly updated_at: Schema.Union<readonly [Schema.Int, Schema.compose<Schema.Int, Schema.NumberFromString>]>;
|
|
60
60
|
}>;
|
|
61
61
|
export type CuratedAgentSkillDTO = typeof CuratedAgentSkillDTO.Type;
|
|
62
62
|
export declare const CuratedAgentDTO: Schema.Struct<{
|
|
63
|
-
id: Schema.brand<
|
|
64
|
-
name: Schema.
|
|
65
|
-
description: Schema.NullOr<
|
|
66
|
-
source: Schema.
|
|
67
|
-
enabled: Schema.
|
|
68
|
-
category: Schema.
|
|
69
|
-
tags: Schema
|
|
70
|
-
url: Schema.NullOr<
|
|
71
|
-
logo_url: Schema.NullOr<
|
|
72
|
-
docs_url: Schema.NullOr<
|
|
73
|
-
ampersend_agent_address: Schema.NullOr<Schema.
|
|
74
|
-
created_at: Schema.Union<[Schema.
|
|
75
|
-
updated_at: Schema.Union<[Schema.
|
|
76
|
-
endpoints: Schema
|
|
77
|
-
id: Schema.brand<
|
|
78
|
-
curated_agent_id: Schema.brand<
|
|
79
|
-
url: Schema.
|
|
80
|
-
methods: Schema
|
|
81
|
-
x402_enabled: Schema.
|
|
82
|
-
x402_protocol_version: Schema.
|
|
83
|
-
network: Schema.NullOr<
|
|
84
|
-
description: Schema.NullOr<
|
|
85
|
-
enabled: Schema.
|
|
86
|
-
pricing_config: Schema.Struct<{
|
|
87
|
-
amount: Schema.
|
|
88
|
-
amountAtomicUnit: Schema.
|
|
89
|
-
currency: Schema.
|
|
90
|
-
networkCaip2ID: Schema.
|
|
91
|
-
assetAddress: Schema.
|
|
92
|
-
payTo: Schema.NullOr<Schema.
|
|
93
|
-
x402Schema: Schema.NullOr<Schema.
|
|
94
|
-
}>;
|
|
95
|
-
created_at: Schema.Union<[Schema.
|
|
96
|
-
updated_at: Schema.Union<[Schema.
|
|
63
|
+
readonly id: Schema.brand<Schema.String, "ID">;
|
|
64
|
+
readonly name: Schema.NonEmptyString;
|
|
65
|
+
readonly description: Schema.NullOr<Schema.String>;
|
|
66
|
+
readonly source: Schema.Literals<readonly ["catalog", "bazaar", "ampersend", "registry"]>;
|
|
67
|
+
readonly enabled: Schema.Boolean;
|
|
68
|
+
readonly category: Schema.NonEmptyString;
|
|
69
|
+
readonly tags: Schema.$Array<Schema.NonEmptyString>;
|
|
70
|
+
readonly url: Schema.NullOr<Schema.String>;
|
|
71
|
+
readonly logo_url: Schema.NullOr<Schema.String>;
|
|
72
|
+
readonly docs_url: Schema.NullOr<Schema.String>;
|
|
73
|
+
readonly ampersend_agent_address: Schema.NullOr<Schema.NonEmptyString>;
|
|
74
|
+
readonly created_at: Schema.Union<readonly [Schema.Int, Schema.compose<Schema.Int, Schema.NumberFromString>]>;
|
|
75
|
+
readonly updated_at: Schema.Union<readonly [Schema.Int, Schema.compose<Schema.Int, Schema.NumberFromString>]>;
|
|
76
|
+
readonly endpoints: Schema.$Array<Schema.Struct<{
|
|
77
|
+
readonly id: Schema.brand<Schema.String, "ID">;
|
|
78
|
+
readonly curated_agent_id: Schema.brand<Schema.String, "ID">;
|
|
79
|
+
readonly url: Schema.NonEmptyString;
|
|
80
|
+
readonly methods: Schema.$Array<Schema.Literals<readonly ["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"]>>;
|
|
81
|
+
readonly x402_enabled: Schema.Boolean;
|
|
82
|
+
readonly x402_protocol_version: Schema.Literals<readonly [1, 2]>;
|
|
83
|
+
readonly network: Schema.NullOr<Schema.String>;
|
|
84
|
+
readonly description: Schema.NullOr<Schema.String>;
|
|
85
|
+
readonly enabled: Schema.Boolean;
|
|
86
|
+
readonly pricing_config: Schema.Union<readonly [Schema.Struct<{
|
|
87
|
+
readonly amount: Schema.BigIntFromString;
|
|
88
|
+
readonly amountAtomicUnit: Schema.BigIntFromString;
|
|
89
|
+
readonly currency: Schema.String;
|
|
90
|
+
readonly networkCaip2ID: Schema.NonEmptyString;
|
|
91
|
+
readonly assetAddress: Schema.NonEmptyString;
|
|
92
|
+
readonly payTo: Schema.NullOr<Schema.NonEmptyString>;
|
|
93
|
+
readonly x402Schema: Schema.NullOr<Schema.Literals<readonly ["exact", "deferred"]>>;
|
|
94
|
+
}>]>;
|
|
95
|
+
readonly created_at: Schema.Union<readonly [Schema.Int, Schema.compose<Schema.Int, Schema.NumberFromString>]>;
|
|
96
|
+
readonly updated_at: Schema.Union<readonly [Schema.Int, Schema.compose<Schema.Int, Schema.NumberFromString>]>;
|
|
97
97
|
}>>;
|
|
98
|
-
skills: Schema
|
|
99
|
-
id: Schema.brand<
|
|
100
|
-
curated_agent_id: Schema.brand<
|
|
101
|
-
name: Schema.
|
|
102
|
-
instructions: Schema.
|
|
103
|
-
docs_url: Schema.NullOr<
|
|
104
|
-
skillmd_url: Schema.NullOr<
|
|
105
|
-
created_at: Schema.Union<[Schema.
|
|
106
|
-
updated_at: Schema.Union<[Schema.
|
|
98
|
+
readonly skills: Schema.$Array<Schema.Struct<{
|
|
99
|
+
readonly id: Schema.brand<Schema.String, "ID">;
|
|
100
|
+
readonly curated_agent_id: Schema.brand<Schema.String, "ID">;
|
|
101
|
+
readonly name: Schema.NonEmptyString;
|
|
102
|
+
readonly instructions: Schema.Unknown;
|
|
103
|
+
readonly docs_url: Schema.NullOr<Schema.String>;
|
|
104
|
+
readonly skillmd_url: Schema.NullOr<Schema.String>;
|
|
105
|
+
readonly created_at: Schema.Union<readonly [Schema.Int, Schema.compose<Schema.Int, Schema.NumberFromString>]>;
|
|
106
|
+
readonly updated_at: Schema.Union<readonly [Schema.Int, Schema.compose<Schema.Int, Schema.NumberFromString>]>;
|
|
107
107
|
}>>;
|
|
108
108
|
}>;
|
|
109
109
|
export type CuratedAgentDTO = typeof CuratedAgentDTO.Type;
|
|
110
110
|
export declare const AgentMarketplaceListQueryParams: Schema.Struct<{
|
|
111
|
-
source: Schema.optional<Schema.
|
|
112
|
-
category: Schema.optional<
|
|
113
|
-
search: Schema.optional<
|
|
114
|
-
network: Schema.optional<
|
|
111
|
+
readonly source: Schema.optional<Schema.Literals<readonly ["catalog", "bazaar", "ampersend", "registry"]>>;
|
|
112
|
+
readonly category: Schema.optional<Schema.String>;
|
|
113
|
+
readonly search: Schema.optional<Schema.String>;
|
|
114
|
+
readonly network: Schema.optional<Schema.String>;
|
|
115
115
|
}>;
|
|
116
116
|
export type AgentMarketplaceListQueryParams = typeof AgentMarketplaceListQueryParams.Type;
|
|
117
117
|
//# sourceMappingURL=curated-agent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"curated-agent.d.ts","sourceRoot":"","sources":["../../src/ampersend/curated-agent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAIvC,eAAO,MAAM,kBAAkB,
|
|
1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schema";
|
|
2
|
-
import { Address, ConvertedTimestamp, ID, Scheme } from "./types.js";
|
|
3
|
-
export const CuratedAgentSource = Schema.
|
|
4
|
-
export const HTTPMethod = Schema.
|
|
5
|
-
export const x402ProtocolVersion = Schema.
|
|
2
|
+
import { Address, ConvertedTimestamp, ID, NonEmptyTrimmedString, Scheme } from "./types.js";
|
|
3
|
+
export const CuratedAgentSource = Schema.Literals(["catalog", "bazaar", "ampersend", "registry"]);
|
|
4
|
+
export const HTTPMethod = Schema.Literals(["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"]);
|
|
5
|
+
export const x402ProtocolVersion = Schema.Literals([1, 2]);
|
|
6
6
|
export const CuratedAgentEndpointX402PricingConfig = Schema.Struct({
|
|
7
|
-
amount: Schema.
|
|
7
|
+
amount: Schema.BigIntFromString.annotate({
|
|
8
8
|
jsonSchema: {},
|
|
9
9
|
description: "The amount charged per request to the endpoint",
|
|
10
10
|
examples: [1000n],
|
|
11
11
|
}),
|
|
12
|
-
amountAtomicUnit: Schema.
|
|
12
|
+
amountAtomicUnit: Schema.BigIntFromString.annotate({
|
|
13
13
|
jsonSchema: {},
|
|
14
14
|
description: "atomic unit of the accepted asset for the payment to the endpoint. USDC has 6 decimals → $0.001 = '1000'",
|
|
15
15
|
examples: [100000n],
|
|
16
16
|
}),
|
|
17
|
-
currency: Schema.String.
|
|
17
|
+
currency: Schema.String.annotate({
|
|
18
18
|
examples: ["USDC"],
|
|
19
19
|
}),
|
|
20
|
-
networkCaip2ID:
|
|
20
|
+
networkCaip2ID: NonEmptyTrimmedString.annotate({
|
|
21
21
|
examples: ["eip155:8453"],
|
|
22
22
|
}),
|
|
23
23
|
assetAddress: Address,
|
|
24
24
|
payTo: Schema.NullOr(Address),
|
|
25
25
|
x402Schema: Schema.NullOr(Scheme),
|
|
26
|
-
}).
|
|
26
|
+
}).annotate({
|
|
27
27
|
identifier: "Ampersend/db/tables/CuratedAgentEndpoint/CuratedAgentEndpointX402PricingConfig",
|
|
28
28
|
});
|
|
29
|
-
export const CuratedAgentEndpointPricingConfig = Schema.Union(CuratedAgentEndpointX402PricingConfig);
|
|
29
|
+
export const CuratedAgentEndpointPricingConfig = Schema.Union([CuratedAgentEndpointX402PricingConfig]);
|
|
30
30
|
export const CuratedAgentEndpointDTO = Schema.Struct({
|
|
31
|
-
id: ID.
|
|
31
|
+
id: ID.annotate({
|
|
32
32
|
identifier: "curated_agent_endpoint.id",
|
|
33
33
|
}),
|
|
34
|
-
curated_agent_id: ID.
|
|
34
|
+
curated_agent_id: ID.annotate({
|
|
35
35
|
identifier: "curated_agent_endpoint.curated_agent_id",
|
|
36
36
|
}),
|
|
37
|
-
url:
|
|
37
|
+
url: NonEmptyTrimmedString.annotate({
|
|
38
38
|
identifier: "curated_agent_endpoint.url",
|
|
39
39
|
examples: ["https://api.venice.ai/api/v1/chat/completions"],
|
|
40
40
|
}),
|
|
41
|
-
methods: Schema.Array(HTTPMethod).
|
|
41
|
+
methods: Schema.Array(HTTPMethod).annotate({
|
|
42
42
|
identifier: "curated_agent_endpoint.methods",
|
|
43
43
|
description: "What HTTP method(s) does the endpoint allow/support",
|
|
44
44
|
}),
|
|
45
|
-
x402_enabled: Schema.Boolean.
|
|
45
|
+
x402_enabled: Schema.Boolean.annotate({
|
|
46
46
|
identifier: "curated_agent_endpoint.x402_enabled",
|
|
47
47
|
}),
|
|
48
|
-
x402_protocol_version: x402ProtocolVersion.
|
|
48
|
+
x402_protocol_version: x402ProtocolVersion.annotate({
|
|
49
49
|
identifier: "curated_agent_endpoint.x402_protocol_version",
|
|
50
50
|
description: "Identified which version of x402 the endpoint supports, which shows how to use the endpoint correctly",
|
|
51
51
|
}),
|
|
52
|
-
network: Schema.NullOr(Schema.String).
|
|
52
|
+
network: Schema.NullOr(Schema.String).annotate({
|
|
53
53
|
identifier: "curated_agent_endpoint.network",
|
|
54
54
|
description: "The network supported for payment to the endpoint; if the endpoint is x402 enabled",
|
|
55
55
|
examples: ["base", "base-sepolia", "solana"],
|
|
56
56
|
}),
|
|
57
|
-
description: Schema.NullOr(Schema.String).
|
|
57
|
+
description: Schema.NullOr(Schema.String).annotate({
|
|
58
58
|
identifier: "curated_agent_endpoint.description",
|
|
59
59
|
}),
|
|
60
|
-
enabled: Schema.Boolean.
|
|
60
|
+
enabled: Schema.Boolean.annotate({
|
|
61
61
|
identifier: "curated_agent_endpoint.enabled",
|
|
62
62
|
}),
|
|
63
|
-
pricing_config: CuratedAgentEndpointPricingConfig.
|
|
63
|
+
pricing_config: CuratedAgentEndpointPricingConfig.annotate({
|
|
64
64
|
identifier: "curated_agent_endpoint.pricing_config",
|
|
65
65
|
description: "Contains the required pricing information for paying for the service",
|
|
66
66
|
}),
|
|
67
67
|
created_at: ConvertedTimestamp,
|
|
68
68
|
updated_at: ConvertedTimestamp,
|
|
69
|
-
}).
|
|
69
|
+
}).annotate({
|
|
70
70
|
identifier: "Ampersend/domain/CuratedAgentEndpointDTO",
|
|
71
71
|
});
|
|
72
72
|
export const CuratedAgentSkillDTO = Schema.Struct({
|
|
73
|
-
id: ID.
|
|
73
|
+
id: ID.annotate({
|
|
74
74
|
identifier: "curated_agent_skill.id",
|
|
75
75
|
}),
|
|
76
|
-
curated_agent_id: ID.
|
|
76
|
+
curated_agent_id: ID.annotate({
|
|
77
77
|
identifier: "curated_agent_skill.curated_agent_id",
|
|
78
78
|
}),
|
|
79
|
-
name:
|
|
79
|
+
name: NonEmptyTrimmedString.annotate({
|
|
80
80
|
identifier: "curated_agent_skill.name",
|
|
81
81
|
}),
|
|
82
|
-
instructions: Schema.Unknown.
|
|
82
|
+
instructions: Schema.Unknown.annotate({
|
|
83
83
|
identifier: "curated_agent_skill.instructions",
|
|
84
84
|
description: "Provided setup/install instructions for how to use the skill",
|
|
85
85
|
}),
|
|
86
|
-
docs_url: Schema.NullOr(Schema.String).
|
|
86
|
+
docs_url: Schema.NullOr(Schema.String).annotate({
|
|
87
87
|
identifier: "curated_agent_skill.docs_url",
|
|
88
88
|
description: "Link to any docs for using the skill",
|
|
89
89
|
}),
|
|
90
|
-
skillmd_url: Schema.NullOr(Schema.String).
|
|
90
|
+
skillmd_url: Schema.NullOr(Schema.String).annotate({
|
|
91
91
|
identifier: "curated_agent_skill.skillmd_url",
|
|
92
92
|
description: "Link to the skill.md file",
|
|
93
93
|
}),
|
|
94
94
|
created_at: ConvertedTimestamp,
|
|
95
95
|
updated_at: ConvertedTimestamp,
|
|
96
|
-
}).
|
|
96
|
+
}).annotate({
|
|
97
97
|
identifier: "Ampersend/domain/CuratedAgentSkillDTO",
|
|
98
98
|
});
|
|
99
99
|
export const CuratedAgentDTO = Schema.Struct({
|
|
100
|
-
id: ID.
|
|
100
|
+
id: ID.annotate({
|
|
101
101
|
identifier: "curated_agent.id",
|
|
102
102
|
}),
|
|
103
|
-
name:
|
|
103
|
+
name: NonEmptyTrimmedString.annotate({
|
|
104
104
|
identifier: "curated_agent.name",
|
|
105
105
|
}),
|
|
106
|
-
description: Schema.NullOr(Schema.String).
|
|
106
|
+
description: Schema.NullOr(Schema.String).annotate({
|
|
107
107
|
identifier: "curated_agent.description",
|
|
108
108
|
}),
|
|
109
|
-
source: CuratedAgentSource.
|
|
109
|
+
source: CuratedAgentSource.annotate({
|
|
110
110
|
identifier: "curated_agent.source",
|
|
111
111
|
}),
|
|
112
|
-
enabled: Schema.Boolean.
|
|
112
|
+
enabled: Schema.Boolean.annotate({
|
|
113
113
|
identifier: "curated_agent.enabled",
|
|
114
114
|
}),
|
|
115
|
-
category:
|
|
115
|
+
category: NonEmptyTrimmedString.annotate({
|
|
116
116
|
identifier: "curated_agent.category",
|
|
117
117
|
}),
|
|
118
|
-
tags: Schema.Array(
|
|
118
|
+
tags: Schema.Array(NonEmptyTrimmedString).annotate({
|
|
119
119
|
identifier: "curated_agent.tags",
|
|
120
120
|
}),
|
|
121
|
-
url: Schema.NullOr(Schema.String).
|
|
121
|
+
url: Schema.NullOr(Schema.String).annotate({
|
|
122
122
|
identifier: "curated_agent.url",
|
|
123
123
|
}),
|
|
124
|
-
logo_url: Schema.NullOr(Schema.String).
|
|
124
|
+
logo_url: Schema.NullOr(Schema.String).annotate({
|
|
125
125
|
identifier: "curated_agent.logo_url",
|
|
126
126
|
}),
|
|
127
|
-
docs_url: Schema.NullOr(Schema.String).
|
|
127
|
+
docs_url: Schema.NullOr(Schema.String).annotate({
|
|
128
128
|
identifier: "curated_agent.docs_url",
|
|
129
129
|
}),
|
|
130
|
-
ampersend_agent_address: Schema.NullOr(Address).
|
|
130
|
+
ampersend_agent_address: Schema.NullOr(Address).annotate({
|
|
131
131
|
identifier: "curated_agent.ampersend_agent_address",
|
|
132
132
|
description: "FK to the agent.address if the curated agent is also registered in ampersend.",
|
|
133
133
|
}),
|
|
@@ -135,7 +135,7 @@ export const CuratedAgentDTO = Schema.Struct({
|
|
|
135
135
|
updated_at: ConvertedTimestamp,
|
|
136
136
|
endpoints: Schema.Array(CuratedAgentEndpointDTO),
|
|
137
137
|
skills: Schema.Array(CuratedAgentSkillDTO),
|
|
138
|
-
}).
|
|
138
|
+
}).annotate({
|
|
139
139
|
identifier: "Ampersend/domain/CuratedAgentDTO",
|
|
140
140
|
});
|
|
141
141
|
export const AgentMarketplaceListQueryParams = Schema.Struct({
|
|
@@ -143,7 +143,7 @@ export const AgentMarketplaceListQueryParams = Schema.Struct({
|
|
|
143
143
|
category: Schema.String.pipe(Schema.optional),
|
|
144
144
|
search: Schema.String.pipe(Schema.optional),
|
|
145
145
|
network: Schema.String.pipe(Schema.optional),
|
|
146
|
-
}).
|
|
146
|
+
}).annotate({
|
|
147
147
|
identifier: "Ampersend/domain/AgentMarketplaceListQueryParams",
|
|
148
148
|
});
|
|
149
149
|
//# sourceMappingURL=curated-agent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"curated-agent.js","sourceRoot":"","sources":["../../src/ampersend/curated-agent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAEvC,OAAO,EAAE,OA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CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC;QACvD,UAAU,EAAE,uCAAuC;QACnD,WAAW,EAAE,+EAA+E;KAC7F,CAAC;IACF,UAAU,EAAE,kBAAkB;IAC9B,UAAU,EAAE,kBAAkB;IAC9B,SAAS,EAAE,MAAM,CAAC,KAAK,CAAC,uBAAuB,CAAC;IAChD,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,oBAAoB,CAAC;CAC3C,CAAC,CAAC,QAAQ,CAAC;IACV,UAAU,EAAE,kCAAkC;CAC/C,CAAC,CAAA;AAGF,MAAM,CAAC,MAAM,+BAA+B,GAAG,MAAM,CAAC,MAAM,CAAC;IAC3D,MAAM,EAAE,kBAAkB,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC;IAChD,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC;IAC7C,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC;IAC3C,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC;CAC7C,CAAC,CAAC,QAAQ,CAAC;IACV,UAAU,EAAE,kDAAkD;CAC/D,CAAC,CAAA"}
|
|
@@ -1,63 +1,28 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
import type { Address, Hex } from "viem";
|
|
3
|
-
declare const
|
|
4
|
-
address: Schema.optional<
|
|
5
|
-
factory: Schema.optional<
|
|
6
|
-
factoryData: Schema.optional<
|
|
7
|
-
intentExecutorInstalled: Schema.optional<
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
readonly
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
name: typeof Schema.NonEmptyTrimmedString;
|
|
27
|
-
userId: typeof Schema.String;
|
|
28
|
-
balance: typeof Schema.String;
|
|
29
|
-
initData: typeof AgentInitData;
|
|
30
|
-
nonce: typeof Schema.String;
|
|
31
|
-
createdAt: typeof Schema.Number;
|
|
32
|
-
updatedAt: typeof Schema.Number;
|
|
33
|
-
}, Schema.Struct.Encoded<{
|
|
34
|
-
address: Schema.refine<string, typeof Schema.NonEmptyTrimmedString>;
|
|
35
|
-
name: typeof Schema.NonEmptyTrimmedString;
|
|
36
|
-
userId: typeof Schema.String;
|
|
37
|
-
balance: typeof Schema.String;
|
|
38
|
-
initData: typeof AgentInitData;
|
|
39
|
-
nonce: typeof Schema.String;
|
|
40
|
-
createdAt: typeof Schema.Number;
|
|
41
|
-
updatedAt: typeof Schema.Number;
|
|
42
|
-
}>, never, {
|
|
43
|
-
readonly nonce: string;
|
|
44
|
-
} & {
|
|
45
|
-
readonly name: string;
|
|
46
|
-
} & {
|
|
47
|
-
readonly address: string;
|
|
48
|
-
} & {
|
|
49
|
-
readonly userId: string;
|
|
50
|
-
} & {
|
|
51
|
-
readonly balance: string;
|
|
52
|
-
} & {
|
|
53
|
-
readonly initData: AgentInitData;
|
|
54
|
-
} & {
|
|
55
|
-
readonly createdAt: number;
|
|
56
|
-
} & {
|
|
57
|
-
readonly updatedAt: number;
|
|
58
|
-
}, {}, {}>;
|
|
59
|
-
export declare class AgentResponse extends AgentResponse_base {
|
|
60
|
-
}
|
|
3
|
+
export declare const AgentInitData: Schema.Struct<{
|
|
4
|
+
readonly address: Schema.optional<Schema.String>;
|
|
5
|
+
readonly factory: Schema.optional<Schema.String>;
|
|
6
|
+
readonly factoryData: Schema.optional<Schema.String>;
|
|
7
|
+
readonly intentExecutorInstalled: Schema.optional<Schema.Boolean>;
|
|
8
|
+
}>;
|
|
9
|
+
export type AgentInitData = typeof AgentInitData.Type;
|
|
10
|
+
export declare const AgentResponse: Schema.Struct<{
|
|
11
|
+
readonly address: Schema.NonEmptyString;
|
|
12
|
+
readonly name: Schema.NonEmptyString;
|
|
13
|
+
readonly userId: Schema.String;
|
|
14
|
+
readonly balance: Schema.String;
|
|
15
|
+
readonly initData: Schema.Struct<{
|
|
16
|
+
readonly address: Schema.optional<Schema.String>;
|
|
17
|
+
readonly factory: Schema.optional<Schema.String>;
|
|
18
|
+
readonly factoryData: Schema.optional<Schema.String>;
|
|
19
|
+
readonly intentExecutorInstalled: Schema.optional<Schema.Boolean>;
|
|
20
|
+
}>;
|
|
21
|
+
readonly nonce: Schema.String;
|
|
22
|
+
readonly createdAt: Schema.Number;
|
|
23
|
+
readonly updatedAt: Schema.Number;
|
|
24
|
+
}>;
|
|
25
|
+
export type AgentResponse = typeof AgentResponse.Type;
|
|
61
26
|
export interface SpendConfig {
|
|
62
27
|
autoTopupAllowed?: boolean;
|
|
63
28
|
dailyLimit?: bigint;
|
|
@@ -112,5 +77,4 @@ export declare class AmpersendManagementClient {
|
|
|
112
77
|
private fetch;
|
|
113
78
|
private fetchRaw;
|
|
114
79
|
}
|
|
115
|
-
export {};
|
|
116
80
|
//# sourceMappingURL=management.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"management.d.ts","sourceRoot":"","sources":["../../src/ampersend/management.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA
|
|
1
|
+
{"version":3,"file":"management.d.ts","sourceRoot":"","sources":["../../src/ampersend/management.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;AASxC,eAAO,MAAM,aAAa;;;;;EAKkB,CAAA;AAC5C,MAAM,MAAM,aAAa,GAAG,OAAO,aAAa,CAAC,IAAI,CAAA;AAErD,eAAO,MAAM,aAAa;;;;;;;;;;;;;;EASkB,CAAA;AAC5C,MAAM,MAAM,aAAa,GAAG,OAAO,aAAa,CAAC,IAAI,CAAA;AAIrD,MAAM,WAAW,WAAW;IAC1B,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,mBAAmB,CAAC,EAAE,MAAM,CAAA;CAC7B;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,GAAG,CAAA;IACf,WAAW,CAAC,EAAE,WAAW,CAAA;IACzB,iBAAiB,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,CAAA;CACnC;AAaD;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,yBAAyB;IACpC,OAAO,CAAC,MAAM,CAAQ;IACtB,OAAO,CAAC,OAAO,CAAQ;IACvB,OAAO,CAAC,OAAO,CAAQ;gBAEX,OAAO,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE;IAM1E;;;;;;;;OAQG;IACG,WAAW,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,aAAa,CAAC;IActE;;OAEG;IACG,UAAU,IAAI,OAAO,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;YAOnC,KAAK;YAKL,QAAQ;CAwCvB"}
|
|
@@ -1,26 +1,24 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
import { privateKeyToAccount } from "viem/accounts";
|
|
3
|
-
import { Address as AddressSchema, ApiError } from "./types.js";
|
|
3
|
+
import { Address as AddressSchema, ApiError, NonEmptyTrimmedString } from "./types.js";
|
|
4
4
|
const DEFAULT_API_URL = "https://api.ampersend.ai";
|
|
5
5
|
// ============ Response Schemas ============
|
|
6
|
-
export
|
|
6
|
+
export const AgentInitData = Schema.Struct({
|
|
7
7
|
address: Schema.optional(Schema.String),
|
|
8
8
|
factory: Schema.optional(Schema.String),
|
|
9
9
|
factoryData: Schema.optional(Schema.String),
|
|
10
10
|
intentExecutorInstalled: Schema.optional(Schema.Boolean),
|
|
11
|
-
})
|
|
12
|
-
|
|
13
|
-
export class AgentResponse extends Schema.Class("AgentResponse")({
|
|
11
|
+
}).annotate({ identifier: "AgentInitData" });
|
|
12
|
+
export const AgentResponse = Schema.Struct({
|
|
14
13
|
address: AddressSchema,
|
|
15
|
-
name:
|
|
14
|
+
name: NonEmptyTrimmedString,
|
|
16
15
|
userId: Schema.String,
|
|
17
16
|
balance: Schema.String,
|
|
18
17
|
initData: AgentInitData,
|
|
19
18
|
nonce: Schema.String,
|
|
20
19
|
createdAt: Schema.Number,
|
|
21
20
|
updatedAt: Schema.Number,
|
|
22
|
-
})
|
|
23
|
-
}
|
|
21
|
+
}).annotate({ identifier: "AgentResponse" });
|
|
24
22
|
// ============ Helpers ============
|
|
25
23
|
function serializeSpendConfig(sc) {
|
|
26
24
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"management.js","sourceRoot":"","sources":["../../src/ampersend/management.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAE/B,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AAEnD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"management.js","sourceRoot":"","sources":["../../src/ampersend/management.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAE/B,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AAEnD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,QAAQ,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAA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