create-sati-agent 0.1.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.
package/LICENSE ADDED
@@ -0,0 +1,190 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to the Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by the Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding any notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ Copyright 2025 Cascade Protocol
179
+
180
+ Licensed under the Apache License, Version 2.0 (the "License");
181
+ you may not use this file except in compliance with the License.
182
+ You may obtain a copy of the License at
183
+
184
+ http://www.apache.org/licenses/LICENSE-2.0
185
+
186
+ Unless required by applicable law or agreed to in writing, software
187
+ distributed under the License is distributed on an "AS IS" BASIS,
188
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
189
+ See the License for the specific language governing permissions and
190
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,153 @@
1
+ # create-sati-agent
2
+
3
+ CLI for AI agent identity on Solana. Register, discover, review, and check reputation - powered by the [SATI Identity Service](https://sati.cascade.fyi) (ERC-8004 compatible).
4
+
5
+ ## Quick Start
6
+
7
+ ```bash
8
+ # Discover registered agents
9
+ npx create-sati-agent discover
10
+
11
+ # Get agent details
12
+ npx create-sati-agent info <AGENT_MINT>
13
+
14
+ # Give feedback (free, recorded on-chain)
15
+ npx create-sati-agent feedback --agent <MINT> --value 85 --tag1 starred
16
+
17
+ # Check reputation
18
+ npx create-sati-agent reputation <AGENT_MINT>
19
+
20
+ # Register a new agent ($0.30 USDC via x402)
21
+ npx create-sati-agent register --name "MyAgent" --description "AI assistant" --image "https://..." --owner <WALLET>
22
+ ```
23
+
24
+ ## What is SATI?
25
+
26
+ SATI (Solana Attestation & Trust Infrastructure) provides on-chain identity for AI agents on Solana. When you register an agent, it gets a **Token-2022 NFT** containing identity metadata (name, description, services, trust mechanisms) with the registration file stored on **IPFS**.
27
+
28
+ Other agents and users can leave **on-chain feedback attestations** that build verifiable reputation. Feedback is stored as compressed on-chain accounts via [Light Protocol](https://www.lightprotocol.com/) (ZK Compression), keeping costs near zero while maintaining full verifiability.
29
+
30
+ The identity schema follows the [ERC-8004](https://eips.ethereum.org/EIPS/eip-8004) standard for cross-chain agent identity.
31
+
32
+ ## Commands
33
+
34
+ ### `discover` - Find agents
35
+
36
+ ```bash
37
+ # List all agents (mainnet)
38
+ npx create-sati-agent discover
39
+
40
+ # Search by name
41
+ npx create-sati-agent discover --name "weather"
42
+
43
+ # Filter by owner
44
+ npx create-sati-agent discover --owner <WALLET_ADDRESS>
45
+
46
+ # Devnet, limit results, JSON output
47
+ npx create-sati-agent discover --network devnet --limit 5 --json
48
+ ```
49
+
50
+ ### `info` - Agent details
51
+
52
+ ```bash
53
+ npx create-sati-agent info <MINT_ADDRESS>
54
+ npx create-sati-agent info <MINT_ADDRESS> --network devnet
55
+ npx create-sati-agent info <MINT_ADDRESS> --json
56
+ ```
57
+
58
+ Returns agent metadata, services, and reputation summary.
59
+
60
+ ### `reputation` - Check trust score
61
+
62
+ ```bash
63
+ npx create-sati-agent reputation <MINT_ADDRESS>
64
+ npx create-sati-agent reputation <MINT_ADDRESS> --tag1 starred
65
+ npx create-sati-agent reputation <MINT_ADDRESS> --network devnet --json
66
+ ```
67
+
68
+ ### `feedback` - Rate an agent
69
+
70
+ ```bash
71
+ # With flags
72
+ npx create-sati-agent feedback \
73
+ --agent <MINT_ADDRESS> \
74
+ --value 85 \
75
+ --tag1 starred \
76
+ --reviewer <YOUR_ADDRESS>
77
+
78
+ # Interactive mode (prompts for missing fields)
79
+ npx create-sati-agent feedback --agent <MINT_ADDRESS>
80
+ ```
81
+
82
+ Feedback is free and recorded as an on-chain attestation. Available tags: `starred`, `reachable`, `uptime`, `responseTime`, `successRate`.
83
+
84
+ ### `register` - On-chain identity
85
+
86
+ ```bash
87
+ # Interactive mode
88
+ npx create-sati-agent register
89
+
90
+ # All flags
91
+ npx create-sati-agent register \
92
+ --name "MyAgent" \
93
+ --description "AI assistant that helps with coding" \
94
+ --image "https://example.com/avatar.png" \
95
+ --owner <SOLANA_WALLET> \
96
+ --mcp-endpoint "https://myagent.com/mcp" \
97
+ --network mainnet
98
+ ```
99
+
100
+ Registration costs **$0.30 USDC** via the [x402](https://www.x402.org/) payment protocol.
101
+
102
+ ## x402 Payment for Registration
103
+
104
+ The `register` command requires a $0.30 USDC payment settled on Solana via x402. Two options:
105
+
106
+ ### AgentWallet (recommended for AI agents)
107
+
108
+ Set environment variables and the CLI handles payment automatically:
109
+
110
+ ```bash
111
+ export AGENT_WALLET_URL="https://agentwallet.mcpay.tech"
112
+ export AGENT_WALLET_USERNAME="your-wallet-username"
113
+ npx create-sati-agent register --name "MyAgent" ...
114
+ ```
115
+
116
+ See [AgentWallet docs](https://agentwallet.mcpay.tech/skill.md) for setup.
117
+
118
+ ### Manual Payment Header
119
+
120
+ For advanced users who compute the x402 payment externally:
121
+
122
+ ```bash
123
+ npx create-sati-agent register --payment-header "<x402-payment-header>" --name "MyAgent" ...
124
+ ```
125
+
126
+ ## Environment Variables
127
+
128
+ | Variable | Required | Description |
129
+ |----------|----------|-------------|
130
+ | `AGENT_WALLET_URL` | For register | AgentWallet base URL |
131
+ | `AGENT_WALLET_USERNAME` | For register | AgentWallet wallet username |
132
+ | `SATI_API_URL` | No | Override API base (default: `https://sati.cascade.fyi`) |
133
+
134
+ ## Solana Integration
135
+
136
+ This CLI interacts with Solana through the SATI Identity Service API:
137
+
138
+ - **Agent identities** are Token-2022 NFTs minted on Solana via the [SATI program](https://github.com/cascade-protocol/sati)
139
+ - **Feedback** is stored as compressed on-chain attestations using [Light Protocol](https://www.lightprotocol.com/) (ZK Compression) via the [Solana Attestation Service](https://github.com/solana-attestation-service/credential)
140
+ - **Registration metadata** follows the [ERC-8004](https://eips.ethereum.org/EIPS/eip-8004) standard and is stored on IPFS
141
+ - **x402 payments** are settled on Solana mainnet/devnet in USDC
142
+
143
+ ## Architecture
144
+
145
+ - Built with [Stricli](https://github.com/bloomberg/stricli) (type-safe CLI framework)
146
+ - [@clack/prompts](https://github.com/bombshell-dev/clack) for interactive UX
147
+ - [picocolors](https://github.com/alexeyraspopov/picocolors) for terminal styling
148
+ - Native `fetch` for HTTP (Node 18+, zero heavy dependencies)
149
+ - All on-chain operations handled server-side - no Solana SDK needed in the CLI
150
+
151
+ ## License
152
+
153
+ Apache-2.0
package/dist/app.d.ts ADDED
@@ -0,0 +1 @@
1
+ export declare const app: import("@stricli/core").Application<import("@stricli/core").CommandContext>;
package/dist/app.js ADDED
@@ -0,0 +1,27 @@
1
+ import { buildApplication, buildRouteMap } from "@stricli/core";
2
+ import { registerCommand } from "./commands/register.js";
3
+ import { discoverCommand } from "./commands/discover.js";
4
+ import { infoCommand } from "./commands/info.js";
5
+ import { feedbackCommand } from "./commands/feedback.js";
6
+ import { reputationCommand } from "./commands/reputation.js";
7
+ const routes = buildRouteMap({
8
+ routes: {
9
+ register: registerCommand,
10
+ discover: discoverCommand,
11
+ info: infoCommand,
12
+ feedback: feedbackCommand,
13
+ reputation: reputationCommand,
14
+ },
15
+ docs: {
16
+ brief: "On-chain identity for AI agents on Solana",
17
+ },
18
+ });
19
+ export const app = buildApplication(routes, {
20
+ name: "create-sati-agent",
21
+ versionInfo: {
22
+ currentVersion: "0.1.0",
23
+ },
24
+ scanner: {
25
+ caseStyle: "allow-kebab-for-camel",
26
+ },
27
+ });
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env node
2
+ import { run } from "@stricli/core";
3
+ import { app } from "../app.js";
4
+ import { buildContext } from "../context.js";
5
+ await run(app, process.argv.slice(2), buildContext(process));
@@ -0,0 +1 @@
1
+ export declare const discoverCommand: import("@stricli/core").Command<import("@stricli/core").CommandContext>;
@@ -0,0 +1,78 @@
1
+ import { buildCommand, numberParser } from "@stricli/core";
2
+ import { intro, outro, spinner } from "@clack/prompts";
3
+ import pc from "picocolors";
4
+ import { SatiApiClient } from "../lib/api.js";
5
+ import { formatAgentList } from "../lib/format.js";
6
+ export const discoverCommand = buildCommand({
7
+ docs: {
8
+ brief: "Search and list registered agents",
9
+ },
10
+ parameters: {
11
+ flags: {
12
+ name: {
13
+ kind: "parsed",
14
+ parse: String,
15
+ brief: "Filter agents by name",
16
+ optional: true,
17
+ },
18
+ owner: {
19
+ kind: "parsed",
20
+ parse: String,
21
+ brief: "Filter by owner wallet address",
22
+ optional: true,
23
+ },
24
+ limit: {
25
+ kind: "parsed",
26
+ parse: numberParser,
27
+ brief: "Max results (1-50)",
28
+ optional: true,
29
+ },
30
+ network: {
31
+ kind: "enum",
32
+ values: ["devnet", "mainnet"],
33
+ brief: "Solana network",
34
+ default: "mainnet",
35
+ },
36
+ json: {
37
+ kind: "boolean",
38
+ brief: "Output raw JSON",
39
+ optional: true,
40
+ },
41
+ },
42
+ positional: { kind: "tuple", parameters: [] },
43
+ },
44
+ async func(flags) {
45
+ if (flags.json) {
46
+ const client = new SatiApiClient();
47
+ const result = await client.listAgents({
48
+ name: flags.name,
49
+ owner: flags.owner,
50
+ limit: flags.limit,
51
+ network: flags.network,
52
+ });
53
+ console.log(JSON.stringify(result, null, 2));
54
+ return;
55
+ }
56
+ intro(pc.cyan("SATI - Discover Agents"));
57
+ const s = spinner();
58
+ s.start("Searching agents...");
59
+ try {
60
+ const client = new SatiApiClient();
61
+ const result = await client.listAgents({
62
+ name: flags.name,
63
+ owner: flags.owner,
64
+ limit: flags.limit,
65
+ network: flags.network,
66
+ });
67
+ s.stop(`Found ${result.count} agent(s) on ${flags.network}`);
68
+ console.log();
69
+ console.log(formatAgentList(result.agents));
70
+ console.log();
71
+ outro(pc.dim("Use 'create-sati-agent info <mint>' for details"));
72
+ }
73
+ catch (error) {
74
+ s.stop(pc.red("Failed"));
75
+ throw error;
76
+ }
77
+ },
78
+ });
@@ -0,0 +1 @@
1
+ export declare const feedbackCommand: import("@stricli/core").Command<import("@stricli/core").CommandContext>;
@@ -0,0 +1,148 @@
1
+ import { buildCommand, numberParser } from "@stricli/core";
2
+ import { intro, outro, spinner, text, select, isCancel, cancel } from "@clack/prompts";
3
+ import pc from "picocolors";
4
+ import { SatiApiClient } from "../lib/api.js";
5
+ export const feedbackCommand = buildCommand({
6
+ docs: {
7
+ brief: "Give feedback on an agent (free, recorded on-chain)",
8
+ },
9
+ parameters: {
10
+ flags: {
11
+ agent: {
12
+ kind: "parsed",
13
+ parse: String,
14
+ brief: "Agent mint address to review",
15
+ optional: true,
16
+ },
17
+ value: {
18
+ kind: "parsed",
19
+ parse: numberParser,
20
+ brief: "Score value",
21
+ optional: true,
22
+ },
23
+ valueDecimals: {
24
+ kind: "parsed",
25
+ parse: numberParser,
26
+ brief: "Decimal places for value",
27
+ optional: true,
28
+ },
29
+ tag1: {
30
+ kind: "parsed",
31
+ parse: String,
32
+ brief: "Primary dimension (starred, reachable, uptime, etc.)",
33
+ optional: true,
34
+ },
35
+ tag2: {
36
+ kind: "parsed",
37
+ parse: String,
38
+ brief: "Secondary dimension",
39
+ optional: true,
40
+ },
41
+ endpoint: {
42
+ kind: "parsed",
43
+ parse: String,
44
+ brief: "Specific service endpoint being reviewed",
45
+ optional: true,
46
+ },
47
+ reviewer: {
48
+ kind: "parsed",
49
+ parse: String,
50
+ brief: "Your Solana address (for attribution)",
51
+ optional: true,
52
+ },
53
+ network: {
54
+ kind: "enum",
55
+ values: ["devnet", "mainnet"],
56
+ brief: "Solana network",
57
+ default: "mainnet",
58
+ },
59
+ json: {
60
+ kind: "boolean",
61
+ brief: "Output raw JSON",
62
+ optional: true,
63
+ },
64
+ },
65
+ positional: { kind: "tuple", parameters: [] },
66
+ },
67
+ async func(flags) {
68
+ const isJson = flags.json;
69
+ if (!isJson) {
70
+ intro(pc.cyan("SATI - Give Feedback"));
71
+ }
72
+ // Collect missing required fields interactively
73
+ let agentMint = flags.agent;
74
+ let value = flags.value;
75
+ let tag1 = flags.tag1;
76
+ if (!agentMint) {
77
+ const result = await text({
78
+ message: "Agent mint address:",
79
+ validate: (v) => v.length < 32 ? "Must be a valid Solana address" : undefined,
80
+ });
81
+ if (isCancel(result)) {
82
+ cancel("Cancelled");
83
+ process.exit(0);
84
+ }
85
+ agentMint = result;
86
+ }
87
+ if (!tag1) {
88
+ const result = await select({
89
+ message: "Feedback category:",
90
+ options: [
91
+ { value: "starred", label: "Overall Rating (0-100)" },
92
+ { value: "reachable", label: "Reachability (0 or 1)" },
93
+ { value: "uptime", label: "Uptime %" },
94
+ { value: "responseTime", label: "Response Time (ms)" },
95
+ { value: "successRate", label: "Success Rate %" },
96
+ ],
97
+ });
98
+ if (isCancel(result)) {
99
+ cancel("Cancelled");
100
+ process.exit(0);
101
+ }
102
+ tag1 = result;
103
+ }
104
+ if (value === undefined) {
105
+ const result = await text({
106
+ message: "Value:",
107
+ validate: (v) => {
108
+ const n = Number(v);
109
+ return isNaN(n) ? "Must be a number" : undefined;
110
+ },
111
+ });
112
+ if (isCancel(result)) {
113
+ cancel("Cancelled");
114
+ process.exit(0);
115
+ }
116
+ value = Number(result);
117
+ }
118
+ const s = !isJson ? spinner() : null;
119
+ s?.start("Submitting feedback on-chain...");
120
+ try {
121
+ const client = new SatiApiClient();
122
+ const result = await client.submitFeedback({
123
+ agentMint,
124
+ value,
125
+ valueDecimals: flags.valueDecimals,
126
+ tag1,
127
+ tag2: flags.tag2,
128
+ endpoint: flags.endpoint,
129
+ reviewerAddress: flags.reviewer,
130
+ network: flags.network,
131
+ });
132
+ if (isJson) {
133
+ console.log(JSON.stringify(result, null, 2));
134
+ return;
135
+ }
136
+ s?.stop(pc.green("Feedback submitted!"));
137
+ console.log();
138
+ console.log(` ${pc.dim("Tx:")} ${result.txSignature}`);
139
+ console.log(` ${pc.dim("Attestation:")} ${result.attestationAddress}`);
140
+ console.log();
141
+ outro(pc.dim("Feedback recorded on Solana"));
142
+ }
143
+ catch (error) {
144
+ s?.stop(pc.red("Failed"));
145
+ throw error;
146
+ }
147
+ },
148
+ });
@@ -0,0 +1 @@
1
+ export declare const infoCommand: import("@stricli/core").Command<import("@stricli/core").CommandContext>;
@@ -0,0 +1,59 @@
1
+ import { buildCommand } from "@stricli/core";
2
+ import { intro, outro, spinner } from "@clack/prompts";
3
+ import pc from "picocolors";
4
+ import { SatiApiClient } from "../lib/api.js";
5
+ import { formatAgent } from "../lib/format.js";
6
+ export const infoCommand = buildCommand({
7
+ docs: {
8
+ brief: "Get detailed agent information and reputation",
9
+ },
10
+ parameters: {
11
+ flags: {
12
+ network: {
13
+ kind: "enum",
14
+ values: ["devnet", "mainnet"],
15
+ brief: "Solana network",
16
+ default: "mainnet",
17
+ },
18
+ json: {
19
+ kind: "boolean",
20
+ brief: "Output raw JSON",
21
+ optional: true,
22
+ },
23
+ },
24
+ positional: {
25
+ kind: "tuple",
26
+ parameters: [
27
+ {
28
+ brief: "Agent mint address",
29
+ parse: String,
30
+ placeholder: "mint",
31
+ },
32
+ ],
33
+ },
34
+ },
35
+ async func(flags, mint) {
36
+ if (flags.json) {
37
+ const client = new SatiApiClient();
38
+ const agent = await client.getAgent(mint, flags.network);
39
+ console.log(JSON.stringify(agent, null, 2));
40
+ return;
41
+ }
42
+ intro(pc.cyan("SATI - Agent Info"));
43
+ const s = spinner();
44
+ s.start("Loading agent...");
45
+ try {
46
+ const client = new SatiApiClient();
47
+ const agent = await client.getAgent(mint, flags.network);
48
+ s.stop("Agent loaded");
49
+ console.log();
50
+ console.log(formatAgent(agent));
51
+ console.log();
52
+ outro(pc.dim(`Network: ${flags.network}`));
53
+ }
54
+ catch (error) {
55
+ s.stop(pc.red("Failed"));
56
+ throw error;
57
+ }
58
+ },
59
+ });
@@ -0,0 +1 @@
1
+ export declare const registerCommand: import("@stricli/core").Command<import("@stricli/core").CommandContext>;