@terminator-network/cli 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.
@@ -0,0 +1 @@
1
+ #!/usr/bin/env node
package/dist/index.js ADDED
@@ -0,0 +1,232 @@
1
+ #!/usr/bin/env node
2
+ #!/usr/bin/env node
3
+
4
+ // src/index.ts
5
+ import { Command as Command7 } from "commander";
6
+
7
+ // src/commands/create.ts
8
+ import { Command } from "commander";
9
+ import { Terminator } from "@terminator-network/core";
10
+ var createCommand = new Command("create").description("Create a new disposable agent identity").option("-e, --email", "Include email inbox", true).option("-p, --phone", "Include phone number", true).option("-c, --card", "Include virtual card", true).option("--no-email", "Exclude email inbox").option("--no-phone", "Exclude phone number").option("--no-card", "Exclude virtual card").option("--ttl <minutes>", "Time-to-live in minutes", parseInt).option("--spend-limit <cents>", "Card spend limit in cents", parseInt).option("--confirm", "Confirm card creation (if policy requires it)").action(async (options) => {
11
+ const resources = [];
12
+ if (options.email) resources.push("email");
13
+ if (options.phone) resources.push("phone");
14
+ if (options.card) resources.push("card");
15
+ const terminator = new Terminator();
16
+ try {
17
+ console.log("Creating identity...");
18
+ const identity = await terminator.createIdentity({
19
+ resources,
20
+ ttlMinutes: options.ttl,
21
+ spendLimitCents: options.spendLimit,
22
+ confirm: options.confirm
23
+ });
24
+ console.log("");
25
+ console.log(`Identity created: ${identity.id}`);
26
+ console.log(` Name: ${identity.persona.fullName}`);
27
+ console.log(` Status: ${identity.status}`);
28
+ if (identity.email) console.log(` Email: ${identity.email}`);
29
+ if (identity.phone) console.log(` Phone: ${identity.phone}`);
30
+ if (identity.cardLastFour) console.log(` Card: ****${identity.cardLastFour}`);
31
+ if (identity.ttlExpiresAt) console.log(` TTL: ${identity.ttlExpiresAt}`);
32
+ } catch (error) {
33
+ console.error(`Error: ${error instanceof Error ? error.message : String(error)}`);
34
+ process.exit(1);
35
+ } finally {
36
+ terminator.close();
37
+ }
38
+ });
39
+
40
+ // src/commands/list.ts
41
+ import { Command as Command2 } from "commander";
42
+ import { Terminator as Terminator2 } from "@terminator-network/core";
43
+ var listCommand = new Command2("list").description("List all agent identities").option("-s, --status <status>", "Filter by status: active, killed, all", "all").action((options) => {
44
+ const terminator = new Terminator2();
45
+ try {
46
+ const identities = terminator.listIdentities(
47
+ options.status
48
+ );
49
+ if (identities.length === 0) {
50
+ console.log("No identities found.");
51
+ return;
52
+ }
53
+ console.log(`Found ${identities.length} identities:
54
+ `);
55
+ for (const id of identities) {
56
+ const resources = [
57
+ id.email ? `email:${id.email}` : null,
58
+ id.phone ? `phone:${id.phone}` : null,
59
+ id.cardLastFour ? `card:****${id.cardLastFour}` : null
60
+ ].filter(Boolean).join(" ");
61
+ console.log(` ${id.id} [${id.status}] ${id.persona.fullName}`);
62
+ if (resources) console.log(` ${resources}`);
63
+ }
64
+ } finally {
65
+ terminator.close();
66
+ }
67
+ });
68
+
69
+ // src/commands/messages.ts
70
+ import { Command as Command3 } from "commander";
71
+ import { Terminator as Terminator3 } from "@terminator-network/core";
72
+ var messagesCommand = new Command3("messages").description("View messages (email + SMS) for an identity").argument("<identity-id>", "Identity ID").option("--since <timestamp>", "Only show messages after this ISO timestamp").action(async (identityId, options) => {
73
+ const terminator = new Terminator3();
74
+ try {
75
+ const sinceDate = options.since ? new Date(options.since) : void 0;
76
+ const { emails, sms } = await terminator.readMessages(identityId, sinceDate);
77
+ if (emails.length === 0 && sms.length === 0) {
78
+ console.log("No messages found.");
79
+ return;
80
+ }
81
+ if (emails.length > 0) {
82
+ console.log(`Emails (${emails.length}):
83
+ `);
84
+ for (const e of emails) {
85
+ console.log(` From: ${e.from}`);
86
+ console.log(` Subject: ${e.subject}`);
87
+ console.log(` Date: ${e.receivedAt}`);
88
+ console.log(` Body: ${e.text.slice(0, 200)}${e.text.length > 200 ? "..." : ""}`);
89
+ console.log("");
90
+ }
91
+ }
92
+ if (sms.length > 0) {
93
+ console.log(`SMS (${sms.length}):
94
+ `);
95
+ for (const s of sms) {
96
+ console.log(` From: ${s.from}`);
97
+ console.log(` Date: ${s.receivedAt}`);
98
+ console.log(` Body: ${s.body}`);
99
+ console.log("");
100
+ }
101
+ }
102
+ const code = await terminator.extractCode(identityId);
103
+ if (code) {
104
+ console.log(`Verification code found: ${code}`);
105
+ }
106
+ } catch (error) {
107
+ console.error(`Error: ${error instanceof Error ? error.message : String(error)}`);
108
+ process.exit(1);
109
+ } finally {
110
+ terminator.close();
111
+ }
112
+ });
113
+
114
+ // src/commands/kill.ts
115
+ import { Command as Command4 } from "commander";
116
+ import { Terminator as Terminator4 } from "@terminator-network/core";
117
+ var killCommand = new Command4("kill").description("Kill an identity (revoke all its resources)").argument("[identity-id]", "Identity ID to kill").option("--all", "Kill ALL active identities (emergency kill switch)").action(async (identityId, options) => {
118
+ const terminator = new Terminator4();
119
+ try {
120
+ if (options.all) {
121
+ console.log("KILL SWITCH: Revoking ALL active identities...\n");
122
+ const results = await terminator.killAll();
123
+ if (results.length === 0) {
124
+ console.log("No active identities to kill.");
125
+ return;
126
+ }
127
+ for (const r of results) {
128
+ const status = r.errors.length === 0 ? "OK" : "PARTIAL";
129
+ console.log(` ${r.identityId} [${status}]`);
130
+ if (r.emailRevoked) console.log(" email revoked");
131
+ if (r.phoneRevoked) console.log(" phone revoked");
132
+ if (r.cardRevoked) console.log(" card revoked");
133
+ for (const err of r.errors) {
134
+ console.log(` ERROR: ${err}`);
135
+ }
136
+ }
137
+ console.log(`
138
+ Killed ${results.length} identities.`);
139
+ return;
140
+ }
141
+ if (!identityId) {
142
+ console.error("Error: specify an identity ID, or use --all to kill everything.");
143
+ process.exit(1);
144
+ }
145
+ console.log(`Killing identity ${identityId}...`);
146
+ const result = await terminator.killIdentity(identityId);
147
+ console.log(`
148
+ Identity ${result.identityId} killed.`);
149
+ if (result.emailRevoked) console.log(" email revoked");
150
+ if (result.phoneRevoked) console.log(" phone revoked");
151
+ if (result.cardRevoked) console.log(" card revoked");
152
+ for (const err of result.errors) {
153
+ console.log(` ERROR: ${err}`);
154
+ }
155
+ } catch (error) {
156
+ console.error(`Error: ${error instanceof Error ? error.message : String(error)}`);
157
+ process.exit(1);
158
+ } finally {
159
+ terminator.close();
160
+ }
161
+ });
162
+
163
+ // src/commands/log.ts
164
+ import { Command as Command5 } from "commander";
165
+ import { Terminator as Terminator5 } from "@terminator-network/core";
166
+ var logCommand = new Command5("log").description("View the activity log").argument("[identity-id]", "Optional: filter by identity ID").option("-n, --limit <count>", "Number of events to show", parseInt, 20).option("-t, --type <event-type>", "Filter by event type").action((identityId, options) => {
167
+ const terminator = new Terminator5();
168
+ try {
169
+ const events = terminator.getActivityLog({
170
+ identityId,
171
+ eventType: options.type,
172
+ limit: options.limit
173
+ });
174
+ if (events.length === 0) {
175
+ console.log("No activity log events found.");
176
+ return;
177
+ }
178
+ console.log(`Activity log (${events.length} events):
179
+ `);
180
+ for (const e of events) {
181
+ const ts = e.timestamp.replace("T", " ").slice(0, 19);
182
+ const cost = e.costEstimateCents ? ` ($${(e.costEstimateCents / 100).toFixed(2)})` : "";
183
+ const provider = e.provider ? ` [${e.provider}]` : "";
184
+ console.log(` ${ts} ${e.eventType}${provider}${cost}`);
185
+ if (e.identityId) console.log(` identity: ${e.identityId}`);
186
+ if (e.details) {
187
+ const detailStr = JSON.stringify(e.details);
188
+ if (detailStr.length < 120) {
189
+ console.log(` ${detailStr}`);
190
+ }
191
+ }
192
+ }
193
+ } finally {
194
+ terminator.close();
195
+ }
196
+ });
197
+
198
+ // src/commands/status.ts
199
+ import { Command as Command6 } from "commander";
200
+ import { Terminator as Terminator6 } from "@terminator-network/core";
201
+ var statusCommand = new Command6("status").description("Show configured providers and system health").action(async () => {
202
+ const terminator = new Terminator6();
203
+ try {
204
+ const status = await terminator.checkStatus();
205
+ console.log("Terminator Status\n");
206
+ console.log("Providers:");
207
+ for (const p of status.providers) {
208
+ const icon = p.healthy ? "+" : "x";
209
+ console.log(` [${icon}] ${p.provider}: ${p.message ?? (p.healthy ? "healthy" : "unhealthy")}`);
210
+ }
211
+ console.log(`
212
+ Configured: email=${status.configuredProviders.email} phone=${status.configuredProviders.phone} card=${status.configuredProviders.card}`);
213
+ console.log(`Active identities: ${status.activeIdentities}`);
214
+ } catch (error) {
215
+ console.error(`Error: ${error instanceof Error ? error.message : String(error)}`);
216
+ process.exit(1);
217
+ } finally {
218
+ terminator.close();
219
+ }
220
+ });
221
+
222
+ // src/index.ts
223
+ var program = new Command7();
224
+ program.name("terminator").description("Disposable identities for AI agents \u2014 email, phone, and virtual cards").version("0.1.0");
225
+ program.addCommand(createCommand);
226
+ program.addCommand(listCommand);
227
+ program.addCommand(messagesCommand);
228
+ program.addCommand(killCommand);
229
+ program.addCommand(logCommand);
230
+ program.addCommand(statusCommand);
231
+ program.parse();
232
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts","../src/commands/create.ts","../src/commands/list.ts","../src/commands/messages.ts","../src/commands/kill.ts","../src/commands/log.ts","../src/commands/status.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { Command } from \"commander\";\nimport { createCommand } from \"./commands/create.js\";\nimport { listCommand } from \"./commands/list.js\";\nimport { messagesCommand } from \"./commands/messages.js\";\nimport { killCommand } from \"./commands/kill.js\";\nimport { logCommand } from \"./commands/log.js\";\nimport { statusCommand } from \"./commands/status.js\";\n\nconst program = new Command();\n\nprogram\n\t.name(\"terminator\")\n\t.description(\"Disposable identities for AI agents — email, phone, and virtual cards\")\n\t.version(\"0.1.0\");\n\nprogram.addCommand(createCommand);\nprogram.addCommand(listCommand);\nprogram.addCommand(messagesCommand);\nprogram.addCommand(killCommand);\nprogram.addCommand(logCommand);\nprogram.addCommand(statusCommand);\n\nprogram.parse();\n","import { Command } from \"commander\";\nimport { Terminator } from \"@terminator-network/core\";\n\nexport const createCommand = new Command(\"create\")\n\t.description(\"Create a new disposable agent identity\")\n\t.option(\"-e, --email\", \"Include email inbox\", true)\n\t.option(\"-p, --phone\", \"Include phone number\", true)\n\t.option(\"-c, --card\", \"Include virtual card\", true)\n\t.option(\"--no-email\", \"Exclude email inbox\")\n\t.option(\"--no-phone\", \"Exclude phone number\")\n\t.option(\"--no-card\", \"Exclude virtual card\")\n\t.option(\"--ttl <minutes>\", \"Time-to-live in minutes\", parseInt)\n\t.option(\"--spend-limit <cents>\", \"Card spend limit in cents\", parseInt)\n\t.option(\"--confirm\", \"Confirm card creation (if policy requires it)\")\n\t.action(async (options) => {\n\t\tconst resources: (\"email\" | \"phone\" | \"card\")[] = [];\n\t\tif (options.email) resources.push(\"email\");\n\t\tif (options.phone) resources.push(\"phone\");\n\t\tif (options.card) resources.push(\"card\");\n\n\t\tconst terminator = new Terminator();\n\n\t\ttry {\n\t\t\tconsole.log(\"Creating identity...\");\n\t\t\tconst identity = await terminator.createIdentity({\n\t\t\t\tresources,\n\t\t\t\tttlMinutes: options.ttl,\n\t\t\t\tspendLimitCents: options.spendLimit,\n\t\t\t\tconfirm: options.confirm,\n\t\t\t});\n\n\t\t\tconsole.log(\"\");\n\t\t\tconsole.log(`Identity created: ${identity.id}`);\n\t\t\tconsole.log(` Name: ${identity.persona.fullName}`);\n\t\t\tconsole.log(` Status: ${identity.status}`);\n\t\t\tif (identity.email) console.log(` Email: ${identity.email}`);\n\t\t\tif (identity.phone) console.log(` Phone: ${identity.phone}`);\n\t\t\tif (identity.cardLastFour) console.log(` Card: ****${identity.cardLastFour}`);\n\t\t\tif (identity.ttlExpiresAt) console.log(` TTL: ${identity.ttlExpiresAt}`);\n\t\t} catch (error) {\n\t\t\tconsole.error(`Error: ${error instanceof Error ? error.message : String(error)}`);\n\t\t\tprocess.exit(1);\n\t\t} finally {\n\t\t\tterminator.close();\n\t\t}\n\t});\n","import { Command } from \"commander\";\nimport { Terminator } from \"@terminator-network/core\";\n\nexport const listCommand = new Command(\"list\")\n\t.description(\"List all agent identities\")\n\t.option(\"-s, --status <status>\", \"Filter by status: active, killed, all\", \"all\")\n\t.action((options) => {\n\t\tconst terminator = new Terminator();\n\n\t\ttry {\n\t\t\tconst identities = terminator.listIdentities(\n\t\t\t\toptions.status as \"active\" | \"killed\" | \"all\",\n\t\t\t);\n\n\t\t\tif (identities.length === 0) {\n\t\t\t\tconsole.log(\"No identities found.\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconsole.log(`Found ${identities.length} identities:\\n`);\n\n\t\t\tfor (const id of identities) {\n\t\t\t\tconst resources = [\n\t\t\t\t\tid.email ? `email:${id.email}` : null,\n\t\t\t\t\tid.phone ? `phone:${id.phone}` : null,\n\t\t\t\t\tid.cardLastFour ? `card:****${id.cardLastFour}` : null,\n\t\t\t\t]\n\t\t\t\t\t.filter(Boolean)\n\t\t\t\t\t.join(\" \");\n\n\t\t\t\tconsole.log(` ${id.id} [${id.status}] ${id.persona.fullName}`);\n\t\t\t\tif (resources) console.log(` ${resources}`);\n\t\t\t}\n\t\t} finally {\n\t\t\tterminator.close();\n\t\t}\n\t});\n","import { Command } from \"commander\";\nimport { Terminator } from \"@terminator-network/core\";\n\nexport const messagesCommand = new Command(\"messages\")\n\t.description(\"View messages (email + SMS) for an identity\")\n\t.argument(\"<identity-id>\", \"Identity ID\")\n\t.option(\"--since <timestamp>\", \"Only show messages after this ISO timestamp\")\n\t.action(async (identityId, options) => {\n\t\tconst terminator = new Terminator();\n\n\t\ttry {\n\t\t\tconst sinceDate = options.since ? new Date(options.since) : undefined;\n\t\t\tconst { emails, sms } = await terminator.readMessages(identityId, sinceDate);\n\n\t\t\tif (emails.length === 0 && sms.length === 0) {\n\t\t\t\tconsole.log(\"No messages found.\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (emails.length > 0) {\n\t\t\t\tconsole.log(`Emails (${emails.length}):\\n`);\n\t\t\t\tfor (const e of emails) {\n\t\t\t\t\tconsole.log(` From: ${e.from}`);\n\t\t\t\t\tconsole.log(` Subject: ${e.subject}`);\n\t\t\t\t\tconsole.log(` Date: ${e.receivedAt}`);\n\t\t\t\t\tconsole.log(` Body: ${e.text.slice(0, 200)}${e.text.length > 200 ? \"...\" : \"\"}`);\n\t\t\t\t\tconsole.log(\"\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (sms.length > 0) {\n\t\t\t\tconsole.log(`SMS (${sms.length}):\\n`);\n\t\t\t\tfor (const s of sms) {\n\t\t\t\t\tconsole.log(` From: ${s.from}`);\n\t\t\t\t\tconsole.log(` Date: ${s.receivedAt}`);\n\t\t\t\t\tconsole.log(` Body: ${s.body}`);\n\t\t\t\t\tconsole.log(\"\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Try to extract a verification code\n\t\t\tconst code = await terminator.extractCode(identityId);\n\t\t\tif (code) {\n\t\t\t\tconsole.log(`Verification code found: ${code}`);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tconsole.error(`Error: ${error instanceof Error ? error.message : String(error)}`);\n\t\t\tprocess.exit(1);\n\t\t} finally {\n\t\t\tterminator.close();\n\t\t}\n\t});\n","import { Command } from \"commander\";\nimport { Terminator } from \"@terminator-network/core\";\n\nexport const killCommand = new Command(\"kill\")\n\t.description(\"Kill an identity (revoke all its resources)\")\n\t.argument(\"[identity-id]\", \"Identity ID to kill\")\n\t.option(\"--all\", \"Kill ALL active identities (emergency kill switch)\")\n\t.action(async (identityId, options) => {\n\t\tconst terminator = new Terminator();\n\n\t\ttry {\n\t\t\tif (options.all) {\n\t\t\t\tconsole.log(\"KILL SWITCH: Revoking ALL active identities...\\n\");\n\t\t\t\tconst results = await terminator.killAll();\n\n\t\t\t\tif (results.length === 0) {\n\t\t\t\t\tconsole.log(\"No active identities to kill.\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tfor (const r of results) {\n\t\t\t\t\tconst status = r.errors.length === 0 ? \"OK\" : \"PARTIAL\";\n\t\t\t\t\tconsole.log(` ${r.identityId} [${status}]`);\n\t\t\t\t\tif (r.emailRevoked) console.log(\" email revoked\");\n\t\t\t\t\tif (r.phoneRevoked) console.log(\" phone revoked\");\n\t\t\t\t\tif (r.cardRevoked) console.log(\" card revoked\");\n\t\t\t\t\tfor (const err of r.errors) {\n\t\t\t\t\t\tconsole.log(` ERROR: ${err}`);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tconsole.log(`\\nKilled ${results.length} identities.`);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (!identityId) {\n\t\t\t\tconsole.error(\"Error: specify an identity ID, or use --all to kill everything.\");\n\t\t\t\tprocess.exit(1);\n\t\t\t}\n\n\t\t\tconsole.log(`Killing identity ${identityId}...`);\n\t\t\tconst result = await terminator.killIdentity(identityId);\n\n\t\t\tconsole.log(`\\nIdentity ${result.identityId} killed.`);\n\t\t\tif (result.emailRevoked) console.log(\" email revoked\");\n\t\t\tif (result.phoneRevoked) console.log(\" phone revoked\");\n\t\t\tif (result.cardRevoked) console.log(\" card revoked\");\n\t\t\tfor (const err of result.errors) {\n\t\t\t\tconsole.log(` ERROR: ${err}`);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tconsole.error(`Error: ${error instanceof Error ? error.message : String(error)}`);\n\t\t\tprocess.exit(1);\n\t\t} finally {\n\t\t\tterminator.close();\n\t\t}\n\t});\n","import { Command } from \"commander\";\nimport { Terminator } from \"@terminator-network/core\";\n\nexport const logCommand = new Command(\"log\")\n\t.description(\"View the activity log\")\n\t.argument(\"[identity-id]\", \"Optional: filter by identity ID\")\n\t.option(\"-n, --limit <count>\", \"Number of events to show\", parseInt, 20)\n\t.option(\"-t, --type <event-type>\", \"Filter by event type\")\n\t.action((identityId, options) => {\n\t\tconst terminator = new Terminator();\n\n\t\ttry {\n\t\t\tconst events = terminator.getActivityLog({\n\t\t\t\tidentityId,\n\t\t\t\teventType: options.type,\n\t\t\t\tlimit: options.limit,\n\t\t\t});\n\n\t\t\tif (events.length === 0) {\n\t\t\t\tconsole.log(\"No activity log events found.\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconsole.log(`Activity log (${events.length} events):\\n`);\n\n\t\t\tfor (const e of events) {\n\t\t\t\tconst ts = e.timestamp.replace(\"T\", \" \").slice(0, 19);\n\t\t\t\tconst cost = e.costEstimateCents\n\t\t\t\t\t? ` ($${(e.costEstimateCents / 100).toFixed(2)})`\n\t\t\t\t\t: \"\";\n\t\t\t\tconst provider = e.provider ? ` [${e.provider}]` : \"\";\n\n\t\t\t\tconsole.log(` ${ts} ${e.eventType}${provider}${cost}`);\n\t\t\t\tif (e.identityId) console.log(` identity: ${e.identityId}`);\n\t\t\t\tif (e.details) {\n\t\t\t\t\tconst detailStr = JSON.stringify(e.details);\n\t\t\t\t\tif (detailStr.length < 120) {\n\t\t\t\t\t\tconsole.log(` ${detailStr}`);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} finally {\n\t\t\tterminator.close();\n\t\t}\n\t});\n","import { Command } from \"commander\";\nimport { Terminator } from \"@terminator-network/core\";\n\nexport const statusCommand = new Command(\"status\")\n\t.description(\"Show configured providers and system health\")\n\t.action(async () => {\n\t\tconst terminator = new Terminator();\n\n\t\ttry {\n\t\t\tconst status = await terminator.checkStatus();\n\n\t\t\tconsole.log(\"Terminator Status\\n\");\n\n\t\t\tconsole.log(\"Providers:\");\n\t\t\tfor (const p of status.providers) {\n\t\t\t\tconst icon = p.healthy ? \"+\" : \"x\";\n\t\t\t\tconsole.log(` [${icon}] ${p.provider}: ${p.message ?? (p.healthy ? \"healthy\" : \"unhealthy\")}`);\n\t\t\t}\n\n\t\t\tconsole.log(`\\nConfigured: email=${status.configuredProviders.email} phone=${status.configuredProviders.phone} card=${status.configuredProviders.card}`);\n\t\t\tconsole.log(`Active identities: ${status.activeIdentities}`);\n\t\t} catch (error) {\n\t\t\tconsole.error(`Error: ${error instanceof Error ? error.message : String(error)}`);\n\t\t\tprocess.exit(1);\n\t\t} finally {\n\t\t\tterminator.close();\n\t\t}\n\t});\n"],"mappings":";;;;AAEA,SAAS,WAAAA,gBAAe;;;ACFxB,SAAS,eAAe;AACxB,SAAS,kBAAkB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AAAA,QAC/B;AAAA,MACD;AAAA,IACD;AAAA,EACD,UAAE;AACD,eAAW,MAAM;AAAA,EAClB;AACD,CAAC;;;AC5CF,SAAS,WAAAC,gBAAe;AACxB,SAAS,cAAAC,mBAAkB;AAEpB,IAAM,gBAAgB,IAAID,SAAQ,QAAQ,EAC/C,YAAY,6CAA6C,EACzD,OAAO,YAAY;AACnB,QAAM,aAAa,IAAIC,YAAW;AAElC,MAAI;AACH,UAAM,SAAS,MAAM,WAAW,YAAY;AAE5C,YAAQ,IAAI,qBAAqB;AAEjC,YAAQ,IAAI,YAAY;AACxB,eAAW,KAAK,OAAO,WAAW;AACjC,YAAM,OAAO,EAAE,UAAU,MAAM;AAC/B,cAAQ,IAAI,MAAM,IAAI,KAAK,EAAE,QAAQ,KAAK,EAAE,YAAY,EAAE,UAAU,YAAY,YAAY,EAAE;AAAA,IAC/F;AAEA,YAAQ,IAAI;AAAA,oBAAuB,OAAO,oBAAoB,KAAK,UAAU,OAAO,oBAAoB,KAAK,SAAS,OAAO,oBAAoB,IAAI,EAAE;AACvJ,YAAQ,IAAI,sBAAsB,OAAO,gBAAgB,EAAE;AAAA,EAC5D,SAAS,OAAO;AACf,YAAQ,MAAM,UAAU,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,CAAC,EAAE;AAChF,YAAQ,KAAK,CAAC;AAAA,EACf,UAAE;AACD,eAAW,MAAM;AAAA,EAClB;AACD,CAAC;;;ANjBF,IAAM,UAAU,IAAIC,SAAQ;AAE5B,QACE,KAAK,YAAY,EACjB,YAAY,4EAAuE,EACnF,QAAQ,OAAO;AAEjB,QAAQ,WAAW,aAAa;AAChC,QAAQ,WAAW,WAAW;AAC9B,QAAQ,WAAW,eAAe;AAClC,QAAQ,WAAW,WAAW;AAC9B,QAAQ,WAAW,UAAU;AAC7B,QAAQ,WAAW,aAAa;AAEhC,QAAQ,MAAM;","names":["Command","Command","Terminator","Command","Terminator","Command","Terminator","Command","Terminator","Command","Terminator","Command"]}
package/package.json ADDED
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "@terminator-network/cli",
3
+ "publishConfig": {
4
+ "access": "public"
5
+ },
6
+ "version": "0.1.0",
7
+ "type": "module",
8
+ "main": "dist/index.js",
9
+ "bin": {
10
+ "terminator": "dist/index.js"
11
+ },
12
+ "files": ["dist"],
13
+ "scripts": {
14
+ "build": "tsup",
15
+ "test": "vitest run",
16
+ "dev": "tsx src/index.ts",
17
+ "clean": "rm -rf dist"
18
+ },
19
+ "dependencies": {
20
+ "@terminator-network/core": "workspace:*",
21
+ "commander": "^13.0.0"
22
+ },
23
+ "devDependencies": {
24
+ "tsup": "^8.3.0",
25
+ "tsx": "^4.0.0",
26
+ "typescript": "^5.7.0",
27
+ "vitest": "^3.0.0"
28
+ },
29
+ "engines": {
30
+ "node": ">=20.0.0"
31
+ }
32
+ }