oneie 1.2.1 ā 1.2.3
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/bin/agent-integration.js +499 -0
- package/bin/cli-animations.js +420 -0
- package/bin/mission-system.js +612 -0
- package/bin/one-installer.js +776 -0
- package/bin/story-system.js +478 -0
- package/bin/task-system.js +717 -0
- package/bin/template-generator.js +661 -0
- package/one/tools/agent-installer.js +575 -0
- package/one/tools/lib/dependency-resolver.js +179 -0
- package/one/tools/lib/template-processor.js +748 -0
- package/one/tools/lib/yaml-utils.js +29 -0
- package/package.json +1 -1
|
@@ -0,0 +1,420 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Beautiful CLI Animations and Progress Indicators
|
|
5
|
+
* Enhanced user experience with context-aware animations
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import chalk from 'chalk';
|
|
9
|
+
import ora from 'ora';
|
|
10
|
+
|
|
11
|
+
export class CLIAnimations {
|
|
12
|
+
constructor(context) {
|
|
13
|
+
this.context = context || { type: 'professional-business' };
|
|
14
|
+
this.currentSpinner = null;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// Context-aware welcome animations
|
|
18
|
+
async playWelcomeAnimation() {
|
|
19
|
+
const animations = {
|
|
20
|
+
'elementary-school': this.playSchoolWelcome,
|
|
21
|
+
'university-research': this.playResearchWelcome,
|
|
22
|
+
'professional-business': this.playBusinessWelcome,
|
|
23
|
+
'government-agency': this.playGovernmentWelcome
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const animation = animations[this.context.type] || animations['professional-business'];
|
|
27
|
+
await animation.call(this);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
async playSchoolWelcome() {
|
|
31
|
+
console.log(chalk.rainbow('\nš Welcome to your AI Study Group! š\n'));
|
|
32
|
+
|
|
33
|
+
const messages = [
|
|
34
|
+
'š Setting up your learning workspace...',
|
|
35
|
+
'š Your AI study buddies are getting ready...',
|
|
36
|
+
'š® Making learning fun and interactive...',
|
|
37
|
+
'⨠Everything is ready for your learning adventure!'
|
|
38
|
+
];
|
|
39
|
+
|
|
40
|
+
for (const message of messages) {
|
|
41
|
+
await this.typewriterEffect(chalk.cyan(message), 30);
|
|
42
|
+
await this.delay(800);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// ASCII art for kids
|
|
46
|
+
console.log(chalk.yellow(`
|
|
47
|
+
š« Your Study Space š«
|
|
48
|
+
āāāāāāāāāāāāāāāāāāāāāāā
|
|
49
|
+
ā š Learning Helper ā
|
|
50
|
+
ā šØ Creative Friend ā
|
|
51
|
+
ā š« Study Partner ā
|
|
52
|
+
āāāāāāāāāāāāāāāāāāāāāāā
|
|
53
|
+
`));
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
async playResearchWelcome() {
|
|
57
|
+
console.log(chalk.blue.bold('\nš Academic Collaboration Environment Initializing š\n'));
|
|
58
|
+
|
|
59
|
+
const messages = [
|
|
60
|
+
'š Configuring research methodology frameworks...',
|
|
61
|
+
'š¬ Activating peer review systems...',
|
|
62
|
+
'š Establishing data analysis protocols...',
|
|
63
|
+
'šÆ Academic collaboration space ready!'
|
|
64
|
+
];
|
|
65
|
+
|
|
66
|
+
for (const message of messages) {
|
|
67
|
+
await this.typewriterEffect(chalk.blue(message), 25);
|
|
68
|
+
await this.delay(1000);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
console.log(chalk.blue(`
|
|
72
|
+
šļø Research Collaboration Lab
|
|
73
|
+
āāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
74
|
+
ā š Research Collaborator ā
|
|
75
|
+
ā š Data Analyst ā
|
|
76
|
+
ā š¬ Methodology Guide ā
|
|
77
|
+
āāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
78
|
+
`));
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
async playBusinessWelcome() {
|
|
82
|
+
console.log(chalk.green.bold('\nš¼ Executive AI Partnership Activated š¼\n'));
|
|
83
|
+
|
|
84
|
+
const messages = [
|
|
85
|
+
'š Initializing strategic planning systems...',
|
|
86
|
+
'š Activating market intelligence networks...',
|
|
87
|
+
'ā” Deploying execution coordination protocols...',
|
|
88
|
+
'šÆ Your AI co-founders are ready to scale!'
|
|
89
|
+
];
|
|
90
|
+
|
|
91
|
+
for (const message of messages) {
|
|
92
|
+
await this.typewriterEffect(chalk.green(message), 20);
|
|
93
|
+
await this.delay(900);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
console.log(chalk.green(`
|
|
97
|
+
š¢ Executive Suite
|
|
98
|
+
āāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
99
|
+
ā š¼ Executive Partner ā
|
|
100
|
+
ā š Strategy Analyst ā
|
|
101
|
+
ā ā” Implementation Lead ā
|
|
102
|
+
āāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
103
|
+
`));
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
async playGovernmentWelcome() {
|
|
107
|
+
console.log(chalk.blue.bold('\nšļø Public Service AI Partnership Established šļø\n'));
|
|
108
|
+
|
|
109
|
+
const messages = [
|
|
110
|
+
'š Establishing regulatory compliance frameworks...',
|
|
111
|
+
'š Activating transparency and accountability systems...',
|
|
112
|
+
'š„ Configuring citizen-focused service protocols...',
|
|
113
|
+
'ā
Institutional AI partners ready for public service!'
|
|
114
|
+
];
|
|
115
|
+
|
|
116
|
+
for (const message of messages) {
|
|
117
|
+
await this.typewriterEffect(chalk.blue(message), 25);
|
|
118
|
+
await this.delay(1000);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
console.log(chalk.blue(`
|
|
122
|
+
šļø Public Service Center
|
|
123
|
+
āāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
124
|
+
ā š Policy Analyst ā
|
|
125
|
+
ā š Compliance Partner ā
|
|
126
|
+
ā š„ Public Service Guide ā
|
|
127
|
+
āāāāāāāāāāāāāāāāāāāāāāāāāāāāā
|
|
128
|
+
`));
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// Context-aware progress spinners
|
|
132
|
+
createContextSpinner(message) {
|
|
133
|
+
const spinnerTypes = {
|
|
134
|
+
'elementary-school': {
|
|
135
|
+
spinner: 'rainbow',
|
|
136
|
+
color: 'cyan',
|
|
137
|
+
prefix: 'š'
|
|
138
|
+
},
|
|
139
|
+
'university-research': {
|
|
140
|
+
spinner: 'dots12',
|
|
141
|
+
color: 'blue',
|
|
142
|
+
prefix: 'š¬'
|
|
143
|
+
},
|
|
144
|
+
'professional-business': {
|
|
145
|
+
spinner: 'arrow3',
|
|
146
|
+
color: 'green',
|
|
147
|
+
prefix: 'š'
|
|
148
|
+
},
|
|
149
|
+
'government-agency': {
|
|
150
|
+
spinner: 'clock',
|
|
151
|
+
color: 'blue',
|
|
152
|
+
prefix: 'šļø'
|
|
153
|
+
}
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
const config = spinnerTypes[this.context.type] || spinnerTypes['professional-business'];
|
|
157
|
+
|
|
158
|
+
return ora({
|
|
159
|
+
text: `${config.prefix} ${message}`,
|
|
160
|
+
spinner: config.spinner,
|
|
161
|
+
color: config.color
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
// Enhanced success celebrations
|
|
166
|
+
async celebrateSuccess() {
|
|
167
|
+
const celebrations = {
|
|
168
|
+
'elementary-school': this.celebrateSchoolSuccess,
|
|
169
|
+
'university-research': this.celebrateResearchSuccess,
|
|
170
|
+
'professional-business': this.celebrateBusinessSuccess,
|
|
171
|
+
'government-agency': this.celebrateGovernmentSuccess
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
const celebration = celebrations[this.context.type] || celebrations['professional-business'];
|
|
175
|
+
await celebration.call(this);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
async celebrateSchoolSuccess() {
|
|
179
|
+
console.log(chalk.rainbow('\nš AWESOME! Your AI Study Group is Ready! š\n'));
|
|
180
|
+
|
|
181
|
+
const messages = [
|
|
182
|
+
'š You did great setting this up!',
|
|
183
|
+
'š¤ Your AI friends are excited to help!',
|
|
184
|
+
'š Ready to make learning super fun!',
|
|
185
|
+
'ā Let\'s learn amazing things together!'
|
|
186
|
+
];
|
|
187
|
+
|
|
188
|
+
for (const message of messages) {
|
|
189
|
+
console.log(chalk.yellow(` ${message}`));
|
|
190
|
+
await this.delay(500);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
console.log(chalk.rainbow('\n⨠Time to start your first learning mission! āØ\n'));
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
async celebrateResearchSuccess() {
|
|
197
|
+
console.log(chalk.blue.bold('\nš Academic Collaboration Framework Established! š\n'));
|
|
198
|
+
|
|
199
|
+
const messages = [
|
|
200
|
+
'š Methodology frameworks configured',
|
|
201
|
+
'š¬ Peer review systems operational',
|
|
202
|
+
'š Data analysis protocols active',
|
|
203
|
+
'š¤ Ready for rigorous academic collaboration'
|
|
204
|
+
];
|
|
205
|
+
|
|
206
|
+
for (const message of messages) {
|
|
207
|
+
console.log(chalk.blue(` ā ${message}`));
|
|
208
|
+
await this.delay(400);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
console.log(chalk.blue.bold('\nš Begin your research mission with confidence! š\n'));
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
async celebrateBusinessSuccess() {
|
|
215
|
+
console.log(chalk.green.bold('\nš AI Co-Founders Successfully Onboarded! š\n'));
|
|
216
|
+
|
|
217
|
+
const messages = [
|
|
218
|
+
'š¼ Executive partnership established',
|
|
219
|
+
'š Strategic intelligence systems online',
|
|
220
|
+
'ā” Implementation protocols activated',
|
|
221
|
+
'šÆ Ready to scale your business exponentially'
|
|
222
|
+
];
|
|
223
|
+
|
|
224
|
+
for (const message of messages) {
|
|
225
|
+
console.log(chalk.green(` ā ${message}`));
|
|
226
|
+
await this.delay(400);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
console.log(chalk.green.bold('\nš Time to launch your next strategic mission! š\n'));
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
async celebrateGovernmentSuccess() {
|
|
233
|
+
console.log(chalk.blue.bold('\nšļø Public Service AI Partnership Operational! šļø\n'));
|
|
234
|
+
|
|
235
|
+
const messages = [
|
|
236
|
+
'š Regulatory compliance frameworks established',
|
|
237
|
+
'š Transparency protocols activated',
|
|
238
|
+
'š„ Citizen-focused systems operational',
|
|
239
|
+
'ā
Ready to serve the public with excellence'
|
|
240
|
+
];
|
|
241
|
+
|
|
242
|
+
for (const message of messages) {
|
|
243
|
+
console.log(chalk.blue(` ā ${message}`));
|
|
244
|
+
await this.delay(400);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
console.log(chalk.blue.bold('\nš Begin your public service mission! š\n'));
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
// Progress tracking animations
|
|
251
|
+
async showProgress(total, current, task) {
|
|
252
|
+
const percentage = Math.round((current / total) * 100);
|
|
253
|
+
const progressBar = this.createProgressBar(percentage);
|
|
254
|
+
|
|
255
|
+
const progressDisplay = {
|
|
256
|
+
'elementary-school': `š ${progressBar} ${percentage}% - ${task}`,
|
|
257
|
+
'university-research': `š¬ ${progressBar} ${percentage}% - ${task}`,
|
|
258
|
+
'professional-business': `š ${progressBar} ${percentage}% - ${task}`,
|
|
259
|
+
'government-agency': `šļø ${progressBar} ${percentage}% - ${task}`
|
|
260
|
+
};
|
|
261
|
+
|
|
262
|
+
const display = progressDisplay[this.context.type] || progressDisplay['professional-business'];
|
|
263
|
+
|
|
264
|
+
process.stdout.write(`\r${display}`);
|
|
265
|
+
|
|
266
|
+
if (current === total) {
|
|
267
|
+
process.stdout.write('\n');
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
createProgressBar(percentage) {
|
|
272
|
+
const width = 20;
|
|
273
|
+
const filled = Math.round((percentage / 100) * width);
|
|
274
|
+
const empty = width - filled;
|
|
275
|
+
|
|
276
|
+
const filledChar = this.context.type === 'elementary-school' ? 'š' : 'ā';
|
|
277
|
+
const emptyChar = this.context.type === 'elementary-school' ? 'ā' : 'ā';
|
|
278
|
+
|
|
279
|
+
return `[${'ā'.repeat(filled)}${'ā'.repeat(empty)}]`;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
// Typewriter effect for messages
|
|
283
|
+
async typewriterEffect(message, speed = 30) {
|
|
284
|
+
process.stdout.write('\r' + ' '.repeat(process.stdout.columns || 80) + '\r');
|
|
285
|
+
|
|
286
|
+
for (let i = 0; i <= message.length; i++) {
|
|
287
|
+
process.stdout.write('\r' + message.slice(0, i));
|
|
288
|
+
await this.delay(speed);
|
|
289
|
+
}
|
|
290
|
+
process.stdout.write('\n');
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
// Interactive dialogue animations
|
|
294
|
+
async showDialogue(speaker, message, delay = 1500) {
|
|
295
|
+
const speakerStyles = {
|
|
296
|
+
'human': chalk.cyan('š¤ Human User:'),
|
|
297
|
+
'installation-agent': chalk.magenta('š¤ Installation Agent:'),
|
|
298
|
+
'integration-specialist': chalk.cyan('š¤ Integration Specialist:'),
|
|
299
|
+
'system': chalk.gray('š» System:')
|
|
300
|
+
};
|
|
301
|
+
|
|
302
|
+
const styledSpeaker = speakerStyles[speaker] || chalk.white(`š¤ ${speaker}:`);
|
|
303
|
+
console.log(styledSpeaker, chalk.white(`"${message}"`));
|
|
304
|
+
await this.delay(delay);
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
// Context-aware next steps animation
|
|
308
|
+
async showNextSteps() {
|
|
309
|
+
const nextStepsConfig = {
|
|
310
|
+
'elementary-school': {
|
|
311
|
+
title: 'š® Fun Next Steps:',
|
|
312
|
+
color: 'yellow',
|
|
313
|
+
icon: 'āØ'
|
|
314
|
+
},
|
|
315
|
+
'university-research': {
|
|
316
|
+
title: 'š Research Next Steps:',
|
|
317
|
+
color: 'blue',
|
|
318
|
+
icon: 'šÆ'
|
|
319
|
+
},
|
|
320
|
+
'professional-business': {
|
|
321
|
+
title: 'š Strategic Next Steps:',
|
|
322
|
+
color: 'green',
|
|
323
|
+
icon: 'š'
|
|
324
|
+
},
|
|
325
|
+
'government-agency': {
|
|
326
|
+
title: 'šļø Public Service Next Steps:',
|
|
327
|
+
color: 'blue',
|
|
328
|
+
icon: 'š'
|
|
329
|
+
}
|
|
330
|
+
};
|
|
331
|
+
|
|
332
|
+
const config = nextStepsConfig[this.context.type] || nextStepsConfig['professional-business'];
|
|
333
|
+
|
|
334
|
+
console.log(chalk[config.color](config.title));
|
|
335
|
+
|
|
336
|
+
const contextSteps = this.getContextSpecificSteps();
|
|
337
|
+
|
|
338
|
+
for (let i = 0; i < contextSteps.length; i++) {
|
|
339
|
+
await this.delay(300);
|
|
340
|
+
console.log(chalk.white(` ${i + 1}. ${config.icon} ${contextSteps[i]}`));
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
getContextSpecificSteps() {
|
|
345
|
+
const steps = {
|
|
346
|
+
'elementary-school': [
|
|
347
|
+
'Create your first learning mission',
|
|
348
|
+
'Chat with your AI study partners',
|
|
349
|
+
'Get help with homework and projects',
|
|
350
|
+
'Celebrate your learning wins!'
|
|
351
|
+
],
|
|
352
|
+
'university-research': [
|
|
353
|
+
'Start: Collaborative research project',
|
|
354
|
+
'Work with AI research partners',
|
|
355
|
+
'Develop academic methodology together',
|
|
356
|
+
'Prepare for peer review and publication'
|
|
357
|
+
],
|
|
358
|
+
'professional-business': [
|
|
359
|
+
'Launch: Strategic business mission',
|
|
360
|
+
'Collaborate with AI executive partners',
|
|
361
|
+
'Scale your business with AI intelligence',
|
|
362
|
+
'Monitor and optimize performance'
|
|
363
|
+
],
|
|
364
|
+
'government-agency': [
|
|
365
|
+
'Begin: Public service mission',
|
|
366
|
+
'Partner with compliant AI agents',
|
|
367
|
+
'Develop policy with full transparency',
|
|
368
|
+
'Measure citizen impact and satisfaction'
|
|
369
|
+
]
|
|
370
|
+
};
|
|
371
|
+
|
|
372
|
+
return steps[this.context.type] || steps['professional-business'];
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
// Utility methods
|
|
376
|
+
delay(ms) {
|
|
377
|
+
return new Promise(resolve => setTimeout(resolve, ms));
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
cleanup() {
|
|
381
|
+
if (this.currentSpinner) {
|
|
382
|
+
this.currentSpinner.stop();
|
|
383
|
+
this.currentSpinner = null;
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
// Predefined animation sequences for different phases
|
|
389
|
+
export const AnimationSequences = {
|
|
390
|
+
INSTALLATION_PHASES: [
|
|
391
|
+
{ phase: 'analysis', message: 'Analyzing your project architecture', duration: 2000 },
|
|
392
|
+
{ phase: 'context', message: 'Detecting context and adapting intelligence', duration: 1500 },
|
|
393
|
+
{ phase: 'framework', message: 'Creating collaborative framework', duration: 2500 },
|
|
394
|
+
{ phase: 'integration', message: 'Integrating lifecycle workflows', duration: 2000 },
|
|
395
|
+
{ phase: 'validation', message: 'Validating collaborative setup', duration: 1500 }
|
|
396
|
+
],
|
|
397
|
+
|
|
398
|
+
CONTEXT_MESSAGES: {
|
|
399
|
+
'elementary-school': {
|
|
400
|
+
welcome: 'š® Hey! Let\'s build something awesome with AI friends!',
|
|
401
|
+
success: 'š Your AI study group is ready to help with homework!',
|
|
402
|
+
encouragement: 'You\'re going to learn so many cool things together!'
|
|
403
|
+
},
|
|
404
|
+
'university-research': {
|
|
405
|
+
welcome: 'š Initializing academic collaboration environment...',
|
|
406
|
+
success: 'š Your academic collaboration partners are initialized!',
|
|
407
|
+
encouragement: 'Ready to advance knowledge through rigorous research!'
|
|
408
|
+
},
|
|
409
|
+
'professional-business': {
|
|
410
|
+
welcome: 'š¼ Deploying executive AI partnership systems...',
|
|
411
|
+
success: 'š Your AI co-founders are ready to scale your business!',
|
|
412
|
+
encouragement: 'Time to achieve exponential business growth!'
|
|
413
|
+
},
|
|
414
|
+
'government-agency': {
|
|
415
|
+
welcome: 'šļø Establishing institutional AI governance framework...',
|
|
416
|
+
success: 'ā
Your institutional AI partners are compliant and ready!',
|
|
417
|
+
encouragement: 'Ready to serve citizens with enhanced capabilities!'
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
};
|