antri_cli 1.44.0 โ 1.46.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/dist/cli/banner.d.ts.map +1 -1
- package/dist/cli/banner.js +16 -1
- package/dist/cli/banner.js.map +1 -1
- package/dist/cli/prompt.d.ts.map +1 -1
- package/dist/cli/prompt.js +8 -0
- package/dist/cli/prompt.js.map +1 -1
- package/dist/cli/shortcuts.d.ts.map +1 -1
- package/dist/cli/shortcuts.js +62 -16
- package/dist/cli/shortcuts.js.map +1 -1
- package/dist/cloud/auth.d.ts.map +1 -1
- package/dist/cloud/auth.js +15 -6
- package/dist/cloud/auth.js.map +1 -1
- package/dist/cloud/firestore.d.ts.map +1 -1
- package/dist/cloud/firestore.js +49 -16
- package/dist/cloud/firestore.js.map +1 -1
- package/dist/core/agent.d.ts +2 -2
- package/dist/core/agent.d.ts.map +1 -1
- package/dist/core/agent.js +49 -26
- package/dist/core/agent.js.map +1 -1
- package/dist/core/config.d.ts +1 -0
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +9 -4
- package/dist/core/config.js.map +1 -1
- package/dist/core/tools.d.ts.map +1 -1
- package/dist/core/tools.js +83 -15
- package/dist/core/tools.js.map +1 -1
- package/dist/core/updater.d.ts +1 -1
- package/dist/core/updater.d.ts.map +1 -1
- package/dist/core/updater.js +1 -1
- package/dist/core/updater.js.map +1 -1
- package/dist/desktop/public/app.js +412 -31
- package/dist/desktop/public/index.html +92 -10
- package/dist/desktop/public/style.css +316 -28
- package/dist/desktop/server.d.ts.map +1 -1
- package/dist/desktop/server.js +84 -4
- package/dist/desktop/server.js.map +1 -1
- package/dist/memory/manager.d.ts.map +1 -1
- package/dist/memory/manager.js +4 -0
- package/dist/memory/manager.js.map +1 -1
- package/dist/mobile/server.d.ts.map +1 -1
- package/dist/mobile/server.js +8 -2
- package/dist/mobile/server.js.map +1 -1
- package/dist/profiles/profileManager.d.ts +17 -4
- package/dist/profiles/profileManager.d.ts.map +1 -1
- package/dist/profiles/profileManager.js +202 -12
- package/dist/profiles/profileManager.js.map +1 -1
- package/dist/skills/skillManager.d.ts +62 -0
- package/dist/skills/skillManager.d.ts.map +1 -0
- package/dist/skills/skillManager.js +645 -0
- package/dist/skills/skillManager.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,645 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import os from 'os';
|
|
4
|
+
const USER_SKILLS_DIR = path.join(os.homedir(), '.antri', 'skills');
|
|
5
|
+
export class SkillManager {
|
|
6
|
+
skillsDir;
|
|
7
|
+
workspaceSkillsDir = null;
|
|
8
|
+
skillsCache = new Map();
|
|
9
|
+
constructor(customDir) {
|
|
10
|
+
this.skillsDir = customDir || USER_SKILLS_DIR;
|
|
11
|
+
this.ensureDirectories();
|
|
12
|
+
this.seedCoreSkills();
|
|
13
|
+
this.reloadSkills();
|
|
14
|
+
}
|
|
15
|
+
setWorkspaceDir(workingDir) {
|
|
16
|
+
const wsSkills = path.join(workingDir, '.antri', 'skills');
|
|
17
|
+
if (fs.existsSync(wsSkills)) {
|
|
18
|
+
this.workspaceSkillsDir = wsSkills;
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
this.workspaceSkillsDir = null;
|
|
22
|
+
}
|
|
23
|
+
this.reloadSkills();
|
|
24
|
+
}
|
|
25
|
+
ensureDirectories() {
|
|
26
|
+
if (!fs.existsSync(this.skillsDir)) {
|
|
27
|
+
fs.mkdirSync(this.skillsDir, { recursive: true });
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Seed core markdown skills into ~/.antri/skills/ if they don't exist yet
|
|
32
|
+
*/
|
|
33
|
+
seedCoreSkills() {
|
|
34
|
+
this.ensureDirectories();
|
|
35
|
+
const coreDefinitions = SkillManager.getCoreSkillTemplates();
|
|
36
|
+
for (const [filename, content] of Object.entries(coreDefinitions)) {
|
|
37
|
+
const targetPath = path.join(this.skillsDir, filename);
|
|
38
|
+
// If file doesn't exist, write default core skill
|
|
39
|
+
if (!fs.existsSync(targetPath)) {
|
|
40
|
+
try {
|
|
41
|
+
fs.writeFileSync(targetPath, content, 'utf-8');
|
|
42
|
+
}
|
|
43
|
+
catch { }
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Reload all .md skills from disk (user directory + workspace directory)
|
|
49
|
+
*/
|
|
50
|
+
reloadSkills() {
|
|
51
|
+
this.skillsCache.clear();
|
|
52
|
+
this.ensureDirectories();
|
|
53
|
+
const searchDirs = [this.skillsDir];
|
|
54
|
+
if (this.workspaceSkillsDir && fs.existsSync(this.workspaceSkillsDir)) {
|
|
55
|
+
searchDirs.push(this.workspaceSkillsDir);
|
|
56
|
+
}
|
|
57
|
+
for (const dir of searchDirs) {
|
|
58
|
+
try {
|
|
59
|
+
const files = fs.readdirSync(dir).filter((f) => f.endsWith('.md'));
|
|
60
|
+
for (const file of files) {
|
|
61
|
+
const filePath = path.join(dir, file);
|
|
62
|
+
const skill = this.parseSkillFile(filePath);
|
|
63
|
+
if (skill) {
|
|
64
|
+
this.skillsCache.set(skill.id, skill);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
catch { }
|
|
69
|
+
}
|
|
70
|
+
return Array.from(this.skillsCache.values());
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Parse a .md skill file extracting YAML/Header metadata and markdown instructions
|
|
74
|
+
*/
|
|
75
|
+
parseSkillFile(filePath) {
|
|
76
|
+
try {
|
|
77
|
+
const content = fs.readFileSync(filePath, 'utf-8');
|
|
78
|
+
const filename = path.basename(filePath);
|
|
79
|
+
const fallbackId = filename.replace(/\.md$/, '').toLowerCase().replace(/[^a-z0-9_-]/g, '_');
|
|
80
|
+
const stat = fs.statSync(filePath);
|
|
81
|
+
let name = fallbackId.replace(/_/g, ' ').replace(/\b\w/g, (c) => c.toUpperCase());
|
|
82
|
+
let description = 'Custom markdown skill.';
|
|
83
|
+
let category = 'General';
|
|
84
|
+
let triggers = [];
|
|
85
|
+
let author = 'Community';
|
|
86
|
+
let version = '1.0.0';
|
|
87
|
+
let instructions = content;
|
|
88
|
+
// Check for YAML Frontmatter (--- ... ---)
|
|
89
|
+
if (content.startsWith('---')) {
|
|
90
|
+
const endMarker = content.indexOf('---', 3);
|
|
91
|
+
if (endMarker !== -1) {
|
|
92
|
+
const frontmatter = content.slice(3, endMarker).trim();
|
|
93
|
+
instructions = content.slice(endMarker + 3).trim();
|
|
94
|
+
const lines = frontmatter.split('\n');
|
|
95
|
+
for (const line of lines) {
|
|
96
|
+
const colonIdx = line.indexOf(':');
|
|
97
|
+
if (colonIdx === -1)
|
|
98
|
+
continue;
|
|
99
|
+
const key = line.slice(0, colonIdx).trim().toLowerCase();
|
|
100
|
+
const val = line.slice(colonIdx + 1).trim();
|
|
101
|
+
if (key === 'name')
|
|
102
|
+
name = val.replace(/^['"]|['"]$/g, '');
|
|
103
|
+
else if (key === 'description')
|
|
104
|
+
description = val.replace(/^['"]|['"]$/g, '');
|
|
105
|
+
else if (key === 'category')
|
|
106
|
+
category = val.replace(/^['"]|['"]$/g, '');
|
|
107
|
+
else if (key === 'author')
|
|
108
|
+
author = val.replace(/^['"]|['"]$/g, '');
|
|
109
|
+
else if (key === 'version')
|
|
110
|
+
version = val.replace(/^['"]|['"]$/g, '');
|
|
111
|
+
else if (key === 'triggers') {
|
|
112
|
+
triggers = val
|
|
113
|
+
.split(',')
|
|
114
|
+
.map((t) => t.trim().toLowerCase())
|
|
115
|
+
.filter(Boolean);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
// Look for markdown header # Title and first paragraph description
|
|
122
|
+
const lines = content.split('\n');
|
|
123
|
+
for (let i = 0; i < lines.length; i++) {
|
|
124
|
+
const line = lines[i].trim();
|
|
125
|
+
if (line.startsWith('# ')) {
|
|
126
|
+
name = line.slice(2).trim();
|
|
127
|
+
}
|
|
128
|
+
else if (line && !description && !line.startsWith('#')) {
|
|
129
|
+
description = line.slice(0, 150);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
const isCore = ['code_reviewer', 'system_architect', 'root_cause_debugger', 'api_designer', 'security_auditor', 'database_designer', 'performance_optimizer', 'test_automator', 'ui_ux_architect', 'git_devops_specialist', 'documentation_writer', 'refactoring_specialist'].includes(fallbackId);
|
|
134
|
+
return {
|
|
135
|
+
id: fallbackId,
|
|
136
|
+
name,
|
|
137
|
+
description,
|
|
138
|
+
category,
|
|
139
|
+
triggers,
|
|
140
|
+
author: isCore ? 'ANTRI Core' : author,
|
|
141
|
+
version,
|
|
142
|
+
isCore,
|
|
143
|
+
filePath,
|
|
144
|
+
content,
|
|
145
|
+
instructions,
|
|
146
|
+
lastModified: stat.mtimeMs,
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
catch {
|
|
150
|
+
return null;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
listSkills() {
|
|
154
|
+
return Array.from(this.skillsCache.values()).sort((a, b) => {
|
|
155
|
+
if (a.isCore !== b.isCore)
|
|
156
|
+
return a.isCore ? -1 : 1;
|
|
157
|
+
return a.name.localeCompare(b.name);
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
getSkill(idOrName) {
|
|
161
|
+
const cleanId = idOrName.toLowerCase().replace(/[^a-z0-9_-]/g, '_');
|
|
162
|
+
if (this.skillsCache.has(cleanId)) {
|
|
163
|
+
return this.skillsCache.get(cleanId);
|
|
164
|
+
}
|
|
165
|
+
// Search by name match
|
|
166
|
+
for (const skill of this.skillsCache.values()) {
|
|
167
|
+
if (skill.name.toLowerCase() === idOrName.toLowerCase() || skill.id === cleanId) {
|
|
168
|
+
return skill;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
return undefined;
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Creates a new markdown skill file in ~/.antri/skills/
|
|
175
|
+
*/
|
|
176
|
+
createSkill(name, description, category = 'Custom', triggers = [], customInstructions) {
|
|
177
|
+
this.ensureDirectories();
|
|
178
|
+
const cleanId = name.toLowerCase().replace(/[^a-z0-9_-]/g, '_').trim() || `skill_${Date.now()}`;
|
|
179
|
+
const filePath = path.join(this.skillsDir, `${cleanId}.md`);
|
|
180
|
+
const triggerStr = triggers.length > 0 ? triggers.join(', ') : `${name.toLowerCase()}, ${cleanId}`;
|
|
181
|
+
const defaultInstructions = customInstructions || `# โก ${name} Skill\n\n## ๐ฏ Purpose & Scope\n${description}\n\n## ๐ Execution Guidelines\n1. Analyze requirements carefully.\n2. Follow best practices and domain standards.\n3. Provide clean, modular, production-ready solutions with explanations.\n\n## ๐ก Key Heuristics & Rules\n- Maintain clean architecture and explicit type safety.\n- Validate edge cases and handle error conditions gracefully.\n`;
|
|
182
|
+
const fullContent = `---
|
|
183
|
+
name: ${name}
|
|
184
|
+
id: ${cleanId}
|
|
185
|
+
description: ${description}
|
|
186
|
+
category: ${category}
|
|
187
|
+
triggers: ${triggerStr}
|
|
188
|
+
author: User
|
|
189
|
+
version: 1.0.0
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
${defaultInstructions}
|
|
193
|
+
`;
|
|
194
|
+
fs.writeFileSync(filePath, fullContent, 'utf-8');
|
|
195
|
+
const skill = this.parseSkillFile(filePath);
|
|
196
|
+
this.skillsCache.set(cleanId, skill);
|
|
197
|
+
return skill;
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Imports an existing .md file or content as a skill
|
|
201
|
+
*/
|
|
202
|
+
importSkill(name, content) {
|
|
203
|
+
this.ensureDirectories();
|
|
204
|
+
const cleanId = name.toLowerCase().replace(/\.md$/, '').replace(/[^a-z0-9_-]/g, '_').trim() || `skill_${Date.now()}`;
|
|
205
|
+
const filePath = path.join(this.skillsDir, `${cleanId}.md`);
|
|
206
|
+
fs.writeFileSync(filePath, content, 'utf-8');
|
|
207
|
+
const skill = this.parseSkillFile(filePath);
|
|
208
|
+
this.skillsCache.set(cleanId, skill);
|
|
209
|
+
return skill;
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Saves updated content for an existing skill
|
|
213
|
+
*/
|
|
214
|
+
saveSkill(id, content) {
|
|
215
|
+
const skill = this.getSkill(id);
|
|
216
|
+
if (!skill)
|
|
217
|
+
return false;
|
|
218
|
+
try {
|
|
219
|
+
fs.writeFileSync(skill.filePath, content, 'utf-8');
|
|
220
|
+
const updated = this.parseSkillFile(skill.filePath);
|
|
221
|
+
if (updated) {
|
|
222
|
+
this.skillsCache.set(updated.id, updated);
|
|
223
|
+
}
|
|
224
|
+
return true;
|
|
225
|
+
}
|
|
226
|
+
catch {
|
|
227
|
+
return false;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* Deletes a custom skill file
|
|
232
|
+
*/
|
|
233
|
+
deleteSkill(id) {
|
|
234
|
+
const skill = this.getSkill(id);
|
|
235
|
+
if (!skill)
|
|
236
|
+
return false;
|
|
237
|
+
try {
|
|
238
|
+
if (fs.existsSync(skill.filePath)) {
|
|
239
|
+
fs.unlinkSync(skill.filePath);
|
|
240
|
+
}
|
|
241
|
+
this.skillsCache.delete(skill.id);
|
|
242
|
+
return true;
|
|
243
|
+
}
|
|
244
|
+
catch {
|
|
245
|
+
return false;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* Finds relevant skills that match a user prompt or task query
|
|
250
|
+
*/
|
|
251
|
+
findRelevantSkills(userPrompt) {
|
|
252
|
+
const lower = userPrompt.toLowerCase();
|
|
253
|
+
const matches = [];
|
|
254
|
+
for (const skill of this.skillsCache.values()) {
|
|
255
|
+
// 1. Direct trigger match
|
|
256
|
+
const triggerMatch = skill.triggers.some((t) => t && lower.includes(t));
|
|
257
|
+
// 2. Name or ID match
|
|
258
|
+
const nameMatch = lower.includes(skill.name.toLowerCase()) || lower.includes(skill.id.replace(/_/g, ' '));
|
|
259
|
+
if (triggerMatch || nameMatch) {
|
|
260
|
+
matches.push(skill);
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
return matches.slice(0, 3); // Top 3 relevant skills
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* Returns complete suite of core production-grade Markdown skills
|
|
267
|
+
*/
|
|
268
|
+
static getCoreSkillTemplates() {
|
|
269
|
+
return {
|
|
270
|
+
'code_reviewer.md': `---
|
|
271
|
+
name: Code Reviewer
|
|
272
|
+
id: code_reviewer
|
|
273
|
+
description: Expert code reviewer analyzing code quality, architecture, edge cases, type safety, performance, and best practices.
|
|
274
|
+
category: Engineering
|
|
275
|
+
triggers: review, code review, audit, inspect code, pr review, pull request, code quality
|
|
276
|
+
author: ANTRI Core
|
|
277
|
+
version: 1.0.0
|
|
278
|
+
---
|
|
279
|
+
|
|
280
|
+
# ๐ Code Reviewer Skill
|
|
281
|
+
|
|
282
|
+
## ๐ฏ Role & Objective
|
|
283
|
+
You are an Elite Principal Code Reviewer. Your mission is to provide thorough, constructive, and actionable feedback on code quality, design patterns, security, and maintainability.
|
|
284
|
+
|
|
285
|
+
## ๐ Comprehensive Review Checklist
|
|
286
|
+
1. **Architecture & Design**:
|
|
287
|
+
- Adheres to SOLID, DRY, and KISS principles.
|
|
288
|
+
- Separation of concerns: business logic isolated from presentation and IO.
|
|
289
|
+
- Appropriate use of design patterns without over-engineering.
|
|
290
|
+
2. **Correctness & Edge Cases**:
|
|
291
|
+
- Handles null, undefined, empty collections, and boundary numbers.
|
|
292
|
+
- Proper async/await and promise rejection handling.
|
|
293
|
+
- Idempotency and race condition prevention.
|
|
294
|
+
3. **Type Safety & Contracts**:
|
|
295
|
+
- Avoids unsafe type casts (\`any\`, \`as unknown as T\`).
|
|
296
|
+
- Strict function signatures, readonly immutability where appropriate.
|
|
297
|
+
4. **Performance & Resources**:
|
|
298
|
+
- Time/space complexity of loops and data structures.
|
|
299
|
+
- Memory leak avoidance (event listeners, open connections, unclosed handles).
|
|
300
|
+
5. **Security**:
|
|
301
|
+
- Input validation, SQL/command injection defense, secret sanitization.
|
|
302
|
+
|
|
303
|
+
## ๐ก Output Structure
|
|
304
|
+
Provide feedback formatted with:
|
|
305
|
+
- **Summary**: High-level impression and overall health score.
|
|
306
|
+
- **Critical Issues (Must Fix)**: Bugs, race conditions, or security vulnerabilities.
|
|
307
|
+
- **Improvements & Refactoring**: Cleanliness, performance, and type enhancements.
|
|
308
|
+
- **Refactored Code Example**: Clean, drop-in replacement snippet.
|
|
309
|
+
`,
|
|
310
|
+
'system_architect.md': `---
|
|
311
|
+
name: System Architect
|
|
312
|
+
id: system_architect
|
|
313
|
+
description: Senior system architect for high-level distributed systems, microservices vs monoliths, scaling, resilience, and clean architecture.
|
|
314
|
+
category: Architecture
|
|
315
|
+
triggers: architecture, system design, scalable, microservice, distributed, infrastructure, schema design, high level design, hld
|
|
316
|
+
author: ANTRI Core
|
|
317
|
+
version: 1.0.0
|
|
318
|
+
---
|
|
319
|
+
|
|
320
|
+
# ๐๏ธ System Architect Skill
|
|
321
|
+
|
|
322
|
+
## ๐ฏ Role & Objective
|
|
323
|
+
You are a Staff System Architect. You design robust, scalable, resilient, and fault-tolerant software systems and formulate Architecture Decision Records (ADRs).
|
|
324
|
+
|
|
325
|
+
## ๐ Architecture Blueprint Framework
|
|
326
|
+
1. **System Context & Boundaries**:
|
|
327
|
+
- Define external actors, clients (Web, Mobile, CLI), and third-party integrations.
|
|
328
|
+
- Clear API boundaries (REST, GraphQL, gRPC, WebSocket).
|
|
329
|
+
2. **Data Storage & Flow**:
|
|
330
|
+
- Polyglot persistence: Relational (PostgreSQL) vs Document (MongoDB) vs Cache (Redis) vs Vector (Embeddings).
|
|
331
|
+
- Event-driven patterns: Pub/Sub, message queues (Kafka, RabbitMQ, SQS).
|
|
332
|
+
3. **Scalability & Reliability**:
|
|
333
|
+
- Horizontal scaling, stateless services, load balancing.
|
|
334
|
+
- Fault tolerance: Circuit breakers, retries with exponential backoff, rate limiting.
|
|
335
|
+
- Data consistency: ACID vs BASE (Eventual Consistency).
|
|
336
|
+
4. **Architecture Decision Record (ADR)**:
|
|
337
|
+
- Format: Context $\\rightarrow$ Decision $\\rightarrow$ Consequences (Trade-offs).
|
|
338
|
+
|
|
339
|
+
## ๐ก Output Structure
|
|
340
|
+
- **Architecture Overview**: High-level design summary.
|
|
341
|
+
- **Component Diagram**: Mermaid ASCII or block diagram.
|
|
342
|
+
- **Data Model & Flow**: Data storage schemas and event pipelines.
|
|
343
|
+
- **Trade-off Analysis**: Why this design was chosen over alternatives.
|
|
344
|
+
`,
|
|
345
|
+
'root_cause_debugger.md': `---
|
|
346
|
+
name: Root Cause Debugger
|
|
347
|
+
id: root_cause_debugger
|
|
348
|
+
description: Systematic error investigator performing stack trace analysis, hypothesis testing, minimal reproduction, and patch validation.
|
|
349
|
+
category: Debugging
|
|
350
|
+
triggers: debug, error, bug, fix, crash, exception, failed, traceback, issue, root cause
|
|
351
|
+
author: ANTRI Core
|
|
352
|
+
version: 1.0.0
|
|
353
|
+
---
|
|
354
|
+
|
|
355
|
+
# ๐ Root Cause Debugger Skill
|
|
356
|
+
|
|
357
|
+
## ๐ฏ Role & Objective
|
|
358
|
+
You are an expert Diagnostics and Debugging Specialist. You diagnose obscure bugs, race conditions, memory leaks, and runtime errors systematically without guesswork.
|
|
359
|
+
|
|
360
|
+
## ๐ 4-Phase Debugging Methodology
|
|
361
|
+
1. **Phase 1: Trace Inspection & Symptom Isolation**:
|
|
362
|
+
- Inspect the exact error message, exit codes, and full stack trace.
|
|
363
|
+
- Identify the offending file, function, and exact line number.
|
|
364
|
+
2. **Phase 2: Hypothesis Formulation & Invariant Checking**:
|
|
365
|
+
- Formulate 2-3 hypotheses for why the failure occurred (state mutation, null reference, async timing, type mismatch).
|
|
366
|
+
- Check system invariants and assumptions.
|
|
367
|
+
3. **Phase 3: Minimal Reproduction & Root Cause Identification**:
|
|
368
|
+
- Isolate the minimal set of inputs or sequence of events causing the bug.
|
|
369
|
+
- Differentiate the root cause from downstream surface symptoms.
|
|
370
|
+
4. **Phase 4: Targeted Patch & Regression Prevention**:
|
|
371
|
+
- Provide the minimal, surgical fix that resolves the root cause.
|
|
372
|
+
- Provide a unit test case that fails before the fix and passes after.
|
|
373
|
+
|
|
374
|
+
## ๐ก Output Structure
|
|
375
|
+
- **Root Cause Diagnosis**: Plain explanation of why it failed.
|
|
376
|
+
- **Code Fix (Diff)**: Clear before vs after replacement.
|
|
377
|
+
- **Verification Plan**: Exact commands or unit test to prove the fix.
|
|
378
|
+
`,
|
|
379
|
+
'api_designer.md': `---
|
|
380
|
+
name: API Designer
|
|
381
|
+
id: api_designer
|
|
382
|
+
description: Designs REST, GraphQL, gRPC, and SSE APIs adhering to OpenAPI standards, idempotency, proper status codes, and error envelopes.
|
|
383
|
+
category: API & Backend
|
|
384
|
+
triggers: api, rest, endpoint, route, graphql, grpc, sse, openapi, swagger, http
|
|
385
|
+
author: ANTRI Core
|
|
386
|
+
version: 1.0.0
|
|
387
|
+
---
|
|
388
|
+
|
|
389
|
+
# ๐ API Designer Skill
|
|
390
|
+
|
|
391
|
+
## ๐ฏ Role & Objective
|
|
392
|
+
You are a Principal API Architect. You craft intuitive, developer-friendly, secure, and future-proof APIs.
|
|
393
|
+
|
|
394
|
+
## ๐ API Design Principles
|
|
395
|
+
1. **RESTful Resource Modeling**:
|
|
396
|
+
- Nouns for resources (\`/api/v1/projects/:id/tasks\`), HTTP verbs for actions (\`GET\`, \`POST\`, \`PUT\`, \`PATCH\`, \`DELETE\`).
|
|
397
|
+
- Idempotency: \`PUT\`, \`DELETE\`, and \`GET\` must be idempotent.
|
|
398
|
+
2. **Standard Response Envelope**:
|
|
399
|
+
- Success: \`{ "success": true, "data": { ... }, "meta": { "page": 1, "total": 100 } }\`
|
|
400
|
+
- Error: \`{ "success": false, "error": { "code": "VALIDATION_FAILED", "message": "...", "details": [] } }\`
|
|
401
|
+
3. **HTTP Status Codes**:
|
|
402
|
+
- \`200 OK\`, \`201 Created\`, \`204 No Content\`, \`400 Bad Request\`, \`401 Unauthorized\`, \`403 Forbidden\`, \`404 Not Found\`, \`409 Conflict\`, \`422 Unprocessable\`, \`429 Too Many Requests\`.
|
|
403
|
+
4. **Pagination, Filtering, & Sorting**:
|
|
404
|
+
- Cursor-based pagination for high volume: \`?cursor=xyz&limit=25\`.
|
|
405
|
+
5. **Real-time Streaming**:
|
|
406
|
+
- Server-Sent Events (SSE) for unidirection token/event streaming with structured event types (\`event: token\\ndata: {...}\\n\\n\`).
|
|
407
|
+
`,
|
|
408
|
+
'security_auditor.md': `---
|
|
409
|
+
name: Security Auditor
|
|
410
|
+
id: security_auditor
|
|
411
|
+
description: Security engineer auditing vulnerabilities, OWASP Top 10, sanitization, auth/authz flaws, cryptographic standards, and secret protection.
|
|
412
|
+
category: Security
|
|
413
|
+
triggers: security, audit, vulnerability, xss, injection, auth, jwt, sanitize, secret, cve, owasp
|
|
414
|
+
author: ANTRI Core
|
|
415
|
+
version: 1.0.0
|
|
416
|
+
---
|
|
417
|
+
|
|
418
|
+
# ๐ก๏ธ Security Auditor Skill
|
|
419
|
+
|
|
420
|
+
## ๐ฏ Role & Objective
|
|
421
|
+
You are a Lead Application Security Engineer. You perform rigorous threat modeling, static analysis, vulnerability assessments, and secure code audits.
|
|
422
|
+
|
|
423
|
+
## ๐ Security Audit Vectors
|
|
424
|
+
1. **OWASP Top 10 Defense**:
|
|
425
|
+
- **Injection**: SQL, Command, NoSQL, LDAP injection (always use parameterized queries).
|
|
426
|
+
- **Broken Authentication**: Insecure session management, missing MFA, weak JWT signing.
|
|
427
|
+
- **Sensitive Data Exposure**: Secrets in code, unencrypted storage, improper TLS config.
|
|
428
|
+
- **Security Misconfiguration**: Default credentials, overly permissive CORS, debug endpoints in production.
|
|
429
|
+
- **Cross-Site Scripting (XSS)**: Output encoding, Content Security Policy (CSP), DOM sanitization.
|
|
430
|
+
- **Broken Access Control**: Missing IDOR checks (Insecure Direct Object Reference).
|
|
431
|
+
2. **Cryptographic Standards**:
|
|
432
|
+
- Use constant-time comparisons for HMACs/passwords (\`crypto.timingSafeEqual\`).
|
|
433
|
+
- Secure random generation (\`crypto.randomBytes\`).
|
|
434
|
+
3. **Secret & Credential Hygiene**:
|
|
435
|
+
- Zero hardcoded API keys, tokens, or passwords.
|
|
436
|
+
- Enforce environment variable isolation.
|
|
437
|
+
`,
|
|
438
|
+
'database_designer.md': `---
|
|
439
|
+
name: Database Designer
|
|
440
|
+
id: database_designer
|
|
441
|
+
description: Relational and NoSQL database modeling, schema normalization, indexing strategies, migrations, and query performance.
|
|
442
|
+
category: Data & Storage
|
|
443
|
+
triggers: database, sql, postgres, mysql, sqlite, mongodb, redis, schema, migration, table, index, query
|
|
444
|
+
author: ANTRI Core
|
|
445
|
+
version: 1.0.0
|
|
446
|
+
---
|
|
447
|
+
|
|
448
|
+
# ๐๏ธ Database Designer Skill
|
|
449
|
+
|
|
450
|
+
## ๐ฏ Role & Objective
|
|
451
|
+
You are a Principal Database Administrator and Data Modeling Specialist. You architect high-throughput, normalized, and performant data layers.
|
|
452
|
+
|
|
453
|
+
## ๐ Database Design Checklist
|
|
454
|
+
1. **Relational Data Modeling (PostgreSQL, SQLite, MySQL)**:
|
|
455
|
+
- Normalization: 3NF for transactional tables to prevent data anomalies.
|
|
456
|
+
- Primary Keys: UUIDv7 (time-ordered) or BigInt auto-increment.
|
|
457
|
+
- Foreign Keys & Constraints: Explicit \`ON DELETE CASCADE / SET NULL\`, \`CHECK\` constraints.
|
|
458
|
+
2. **Indexing Strategy**:
|
|
459
|
+
- Composite B-Tree indexes matching WHERE and ORDER BY clauses (Left-to-Right rule).
|
|
460
|
+
- Partial indexes for filtered queries (\`WHERE status = 'pending'\`).
|
|
461
|
+
- Foreign key indexing to prevent full table locks on deletes.
|
|
462
|
+
3. **NoSQL & Document Modeling (MongoDB, DynamoDB, Firestore)**:
|
|
463
|
+
- Access-pattern driven modeling (Embed for atomic reads, Reference for unbounded growth).
|
|
464
|
+
4. **Migration & Versioning**:
|
|
465
|
+
- Non-destructive schema migrations (Add column as nullable, backfill, make NOT NULL).
|
|
466
|
+
`,
|
|
467
|
+
'performance_optimizer.md': `---
|
|
468
|
+
name: Performance Optimizer
|
|
469
|
+
id: performance_optimizer
|
|
470
|
+
description: Identifies bottlenecks, profiles algorithmic complexity, eliminates memory leaks, and optimizes latency, caching, and batching.
|
|
471
|
+
category: Performance
|
|
472
|
+
triggers: performance, optimize, speed up, slow, latency, memory leak, cache, bottleneck, fast, benchmark
|
|
473
|
+
author: ANTRI Core
|
|
474
|
+
version: 1.0.0
|
|
475
|
+
---
|
|
476
|
+
|
|
477
|
+
# โก Performance Optimizer Skill
|
|
478
|
+
|
|
479
|
+
## ๐ฏ Role & Objective
|
|
480
|
+
You are a High-Performance Computing Specialist. You eliminate algorithmic inefficiencies, memory bloat, and I/O bottlenecks.
|
|
481
|
+
|
|
482
|
+
## ๐ Performance Optimization Framework
|
|
483
|
+
1. **Algorithmic Complexity**:
|
|
484
|
+
- Reduce $O(N^2)$ nested loops to $O(N)$ using HashMaps / Sets / Lookup tables.
|
|
485
|
+
- Use binary search $O(\\log N)$ for sorted datasets.
|
|
486
|
+
2. **I/O & Network Optimization**:
|
|
487
|
+
- Eliminate N+1 query problems using batching (\`DataLoader\`, \`WHERE id IN (...)\`).
|
|
488
|
+
- Connection pooling and keep-alive HTTP agents.
|
|
489
|
+
- Gzip / Brotli compression and streaming responses.
|
|
490
|
+
3. **Multi-Level Caching**:
|
|
491
|
+
- In-memory L1 cache (LRU with TTL).
|
|
492
|
+
- Distributed L2 cache (Redis).
|
|
493
|
+
- HTTP caching headers (\`Cache-Control: max-age\`, \`ETag\`).
|
|
494
|
+
4. **Memory Management**:
|
|
495
|
+
- Avoid unbounded in-memory arrays; stream large files with Node.js streams or iterators.
|
|
496
|
+
- Clean up event listeners and intervals.
|
|
497
|
+
`,
|
|
498
|
+
'test_automator.md': `---
|
|
499
|
+
name: Test Automator
|
|
500
|
+
id: test_automator
|
|
501
|
+
description: Test engineering specialist for TDD/BDD, unit tests, integration tests, mock strategies, high branch coverage, and assertion patterns.
|
|
502
|
+
category: Testing
|
|
503
|
+
triggers: test, unit test, integration test, tdd, jest, vitest, mocha, mock, coverage, assert, testing
|
|
504
|
+
author: ANTRI Core
|
|
505
|
+
version: 1.0.0
|
|
506
|
+
---
|
|
507
|
+
|
|
508
|
+
# ๐งช Test Automator Skill
|
|
509
|
+
|
|
510
|
+
## ๐ฏ Role & Objective
|
|
511
|
+
You are a Test Automation Lead. You design rock-solid test suites with high branch coverage, deterministic execution, and clean mock boundaries.
|
|
512
|
+
|
|
513
|
+
## ๐ Testing Standards
|
|
514
|
+
1. **Test Structure (AAA Pattern)**:
|
|
515
|
+
- **Arrange**: Set up mocks, fixtures, and inputs.
|
|
516
|
+
- **Act**: Invoke the unit under test.
|
|
517
|
+
- **Assert**: Verify expected outcomes and side effects.
|
|
518
|
+
2. **Testing Pyramid**:
|
|
519
|
+
- **Unit Tests (70%)**: Fast, isolated, zero network/disk dependencies.
|
|
520
|
+
- **Integration Tests (20%)**: Test interactions between modules and database/cache.
|
|
521
|
+
- **E2E Tests (10%)**: End-to-end critical user journeys.
|
|
522
|
+
3. **Mocking & Isolation**:
|
|
523
|
+
- Mock external boundaries (HTTP clients, third-party APIs, timers).
|
|
524
|
+
- Avoid mocking internal implementation details.
|
|
525
|
+
4. **Edge Case Coverage**:
|
|
526
|
+
- Test empty states, boundary numbers, invalid inputs, network timeouts, and thrown exceptions.
|
|
527
|
+
`,
|
|
528
|
+
'ui_ux_architect.md': `---
|
|
529
|
+
name: UI/UX Architect
|
|
530
|
+
id: ui_ux_architect
|
|
531
|
+
description: Frontend UI/UX architect for modern design systems, accessibility (WCAG a11y), responsive layouts, state management, and design tokens.
|
|
532
|
+
category: Frontend
|
|
533
|
+
triggers: ui, ux, frontend, css, design system, responsive, accessibility, a11y, layout, component, style
|
|
534
|
+
author: ANTRI Core
|
|
535
|
+
version: 1.0.0
|
|
536
|
+
---
|
|
537
|
+
|
|
538
|
+
# ๐จ UI/UX Architect Skill
|
|
539
|
+
|
|
540
|
+
## ๐ฏ Role & Objective
|
|
541
|
+
You are a Principal Frontend Architect and Design Systems Lead. You create beautiful, responsive, fluid, and accessible user interfaces.
|
|
542
|
+
|
|
543
|
+
## ๐ UI/UX Engineering Principles
|
|
544
|
+
1. **Design System & Token Architecture**:
|
|
545
|
+
- CSS Variables for color scales (body, surface, subtle, border, accent).
|
|
546
|
+
- Consistent typography scales and harmonic spacing tokens (4px/8px grid).
|
|
547
|
+
2. **Accessibility (WCAG 2.1 AA)**:
|
|
548
|
+
- High color contrast ratios (minimum 4.5:1 for body text).
|
|
549
|
+
- Full keyboard navigation (\`tabindex\`, \`:focus-visible\`, ARIA attributes).
|
|
550
|
+
- Semantic HTML5 elements (\`<header>\`, \`<main>\`, \`<nav>\`, \`<section>\`, \`<button>\`).
|
|
551
|
+
3. **Responsive & Ergonomic Layouts**:
|
|
552
|
+
- Mobile-first CSS Grid and Flexbox layouts.
|
|
553
|
+
- Touch-friendly click targets (minimum 44px $\\times$ 44px).
|
|
554
|
+
- Zero layout shifts (CLS prevention).
|
|
555
|
+
4. **Micro-Interactions**:
|
|
556
|
+
- Smooth 150ms-200ms ease-out transitions for hover and active states.
|
|
557
|
+
`,
|
|
558
|
+
'git_devops_specialist.md': `---
|
|
559
|
+
name: Git & DevOps Specialist
|
|
560
|
+
id: git_devops_specialist
|
|
561
|
+
description: Git branching/rebasing, CI/CD pipelines, Docker containerization, Kubernetes, infrastructure as code, and automated releases.
|
|
562
|
+
category: DevOps
|
|
563
|
+
triggers: git, github, docker, devops, ci/cd, pipeline, action, container, kubernetes, deployment, release
|
|
564
|
+
author: ANTRI Core
|
|
565
|
+
version: 1.0.0
|
|
566
|
+
---
|
|
567
|
+
|
|
568
|
+
# ๐ Git & DevOps Specialist Skill
|
|
569
|
+
|
|
570
|
+
## ๐ฏ Role & Objective
|
|
571
|
+
You are a Principal DevOps and Release Engineer. You design rock-solid Git workflows, automated CI/CD pipelines, Docker containers, and release management systems.
|
|
572
|
+
|
|
573
|
+
## ๐ DevOps Best Practices
|
|
574
|
+
1. **Advanced Git Workflows**:
|
|
575
|
+
- Conventional Commits: \`feat:\`, \`fix:\`, \`refactor:\`, \`docs:\`, \`test:\`, \`chore:\`.
|
|
576
|
+
- Clean linear history: Interactive rebasing (\`git rebase -i\`), atomic commits.
|
|
577
|
+
2. **Docker Containerization**:
|
|
578
|
+
- Multi-stage builds for minimal image size.
|
|
579
|
+
- Non-root user execution (\`USER node\` / \`USER app\`).
|
|
580
|
+
- \`.dockerignore\` to exclude node_modules, logs, and secrets.
|
|
581
|
+
3. **CI/CD Pipelines (GitHub Actions)**:
|
|
582
|
+
- Automated linting, type-checking, testing, and security scanning on PRs.
|
|
583
|
+
- Automated semantic versioning and changelog generation.
|
|
584
|
+
- Release artifact building and container registry publishing.
|
|
585
|
+
`,
|
|
586
|
+
'documentation_writer.md': `---
|
|
587
|
+
name: Documentation Writer
|
|
588
|
+
id: documentation_writer
|
|
589
|
+
description: Creates technical documentation, API references, Mermaid architecture diagrams, quickstart guides, and developer tutorials.
|
|
590
|
+
category: Documentation
|
|
591
|
+
triggers: docs, documentation, readme, guide, tutorial, api docs, mermaid, diagram, explanation
|
|
592
|
+
author: ANTRI Core
|
|
593
|
+
version: 1.0.0
|
|
594
|
+
---
|
|
595
|
+
|
|
596
|
+
# ๐ Documentation Writer Skill
|
|
597
|
+
|
|
598
|
+
## ๐ฏ Role & Objective
|
|
599
|
+
You are a Staff Technical Writer. You transform complex codebases and architectures into crystal-clear, structured, and engaging documentation.
|
|
600
|
+
|
|
601
|
+
## ๐ Technical Documentation Framework
|
|
602
|
+
1. **Structure & Information Hierarchy**:
|
|
603
|
+
- **Overview & Value Proposition**: What is this project, why does it exist?
|
|
604
|
+
- **Quickstart (5-Minute Guide)**: Prerequisites, installation, and first working example.
|
|
605
|
+
- **Core Concepts & Architecture**: Detailed breakdown with Mermaid diagrams.
|
|
606
|
+
- **API Reference**: Methods, parameters, types, returns, and error codes.
|
|
607
|
+
2. **Visual Flow (Mermaid Diagrams)**:
|
|
608
|
+
- Use flowcharts, sequence diagrams, and class diagrams for complex workflows.
|
|
609
|
+
3. **Code Examples**:
|
|
610
|
+
- Copy-paste ready, fully working, syntactically verified code snippets.
|
|
611
|
+
`,
|
|
612
|
+
'refactoring_specialist.md': `---
|
|
613
|
+
name: Refactoring Specialist
|
|
614
|
+
id: refactoring_specialist
|
|
615
|
+
description: Code modernization, eliminating code smells, improving modularity, decoupling components, and applying clean design patterns.
|
|
616
|
+
category: Engineering
|
|
617
|
+
triggers: refactor, clean code, code smell, modernize, decouple, modularize, simplify, extract function
|
|
618
|
+
author: ANTRI Core
|
|
619
|
+
version: 1.0.0
|
|
620
|
+
---
|
|
621
|
+
|
|
622
|
+
# ๐งน Refactoring Specialist Skill
|
|
623
|
+
|
|
624
|
+
## ๐ฏ Role & Objective
|
|
625
|
+
You are a Software Craftsmanship and Clean Code Specialist. You modernize legacy code, eliminate technical debt, and boost readability without altering behavior.
|
|
626
|
+
|
|
627
|
+
## ๐ Refactoring Techniques & Catalog
|
|
628
|
+
1. **Code Smells Elimination**:
|
|
629
|
+
- Long Methods: Extract Function.
|
|
630
|
+
- Large Classes: Extract Class / Service.
|
|
631
|
+
- Feature Envy: Move Method to the data owner.
|
|
632
|
+
- Duplicate Code: Pull Up Method / Parameterize Method.
|
|
633
|
+
- Primitive Obsession: Replace Data Value with Object / Value Object.
|
|
634
|
+
2. **Preserving Behavior & Invariants**:
|
|
635
|
+
- Refactor in small, verifiable steps.
|
|
636
|
+
- Ensure test suite passes after each individual transformation.
|
|
637
|
+
3. **Modern Idioms**:
|
|
638
|
+
- Modernize callbacks to async/await.
|
|
639
|
+
- Replace complex imperative loops with functional iterators (\`map\`, \`filter\`, \`reduce\`) or readable for-of loops.
|
|
640
|
+
`,
|
|
641
|
+
};
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
export const skillManager = new SkillManager();
|
|
645
|
+
//# sourceMappingURL=skillManager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skillManager.js","sourceRoot":"","sources":["../../src/skills/skillManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,IAAI,CAAC;AAkBpB,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AAEpE,MAAM,OAAO,YAAY;IACf,SAAS,CAAS;IAClB,kBAAkB,GAAkB,IAAI,CAAC;IACzC,WAAW,GAA+B,IAAI,GAAG,EAAE,CAAC;IAE5D,YAAY,SAAkB;QAC5B,IAAI,CAAC,SAAS,GAAG,SAAS,IAAI,eAAe,CAAC;QAC9C,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACzB,IAAI,CAAC,cAAc,EAAE,CAAC;QACtB,IAAI,CAAC,YAAY,EAAE,CAAC;IACtB,CAAC;IAEM,eAAe,CAAC,UAAkB;QACvC,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAC3D,IAAI,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC5B,IAAI,CAAC,kBAAkB,GAAG,QAAQ,CAAC;QACrC,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC;QACjC,CAAC;QACD,IAAI,CAAC,YAAY,EAAE,CAAC;IACtB,CAAC;IAEO,iBAAiB;QACvB,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;YACnC,EAAE,CAAC,SAAS,CAAC,IAAI,C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,CAAC,CAAC,CAAC,CAAC,wBAAwB;IACtD,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,qBAAqB;QACjC,OAAO;YACL,kBAAkB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuCzB;YAEK,qBAAqB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkC5B;YAEK,wBAAwB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiC/B;YAEK,iBAAiB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BxB;YAEK,qBAAqB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6B5B;YAEK,sBAAsB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4B7B;YAEK,0BAA0B,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BjC;YAEK,mBAAmB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6B1B;YAEK,oBAAoB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6B3B;YAEK,0BAA0B,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BjC;YAEK,yBAAyB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;CAyBhC;YAEK,2BAA2B,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BlC;SACI,CAAC;IACJ,CAAC;CACF;AAED,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,YAAY,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "antri_cli",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.46.0",
|
|
4
|
+
"description": "Terminal-First AI Agent & Cognitive Memory Engine with Dialectic Multi-Stage Reasoning",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"antri": "./bin/antri.js",
|