@the-open-engine/zeroshot 6.31.0 → 6.31.2
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/cli/index.js +1 -2
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/cli/lib/first-run.js +0 -223
package/cli/index.js
CHANGED
|
@@ -92,7 +92,6 @@ const {
|
|
|
92
92
|
waitForResumeOwnership,
|
|
93
93
|
} = require('../lib/detached-startup');
|
|
94
94
|
const { isProcessRunning: isClusterProcessAlive } = require('../lib/process-liveness');
|
|
95
|
-
// Setup wizard removed - use: zeroshot settings set <key> <value>
|
|
96
95
|
const {
|
|
97
96
|
checkForUpdates,
|
|
98
97
|
isAutomaticUpdateEligible,
|
|
@@ -2603,7 +2602,7 @@ program
|
|
|
2603
2602
|
.name('zeroshot')
|
|
2604
2603
|
.description('Multi-agent orchestration and task management for Claude, Codex, and Gemini')
|
|
2605
2604
|
.version(require('../package.json').version)
|
|
2606
|
-
.option('-q, --quiet', '
|
|
2605
|
+
.option('-q, --quiet', 'Skip automatic update checks')
|
|
2607
2606
|
.addHelpText(
|
|
2608
2607
|
'after',
|
|
2609
2608
|
`
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@the-open-engine/zeroshot",
|
|
3
|
-
"version": "6.31.
|
|
3
|
+
"version": "6.31.2",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@the-open-engine/zeroshot",
|
|
9
|
-
"version": "6.31.
|
|
9
|
+
"version": "6.31.2",
|
|
10
10
|
"hasInstallScript": true,
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"dependencies": {
|
package/package.json
CHANGED
package/cli/lib/first-run.js
DELETED
|
@@ -1,223 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* First-Run Setup Wizard
|
|
3
|
-
*
|
|
4
|
-
* Interactive setup on first use:
|
|
5
|
-
* - Welcome banner
|
|
6
|
-
* - Max model ceiling selection (sonnet/opus/haiku)
|
|
7
|
-
* - Auto-update preference
|
|
8
|
-
* - Marks setup as complete
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
const readline = require('readline');
|
|
12
|
-
const { loadSettings, mutateSettings } = require('../../lib/settings');
|
|
13
|
-
const { listProviderMetadata } = require('../../lib/provider-names');
|
|
14
|
-
const { detectProviders } = require('../../src/providers');
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Print welcome banner
|
|
18
|
-
*/
|
|
19
|
-
function printWelcome() {
|
|
20
|
-
console.log(`
|
|
21
|
-
╔═══════════════════════════════════════════════════════════════╗
|
|
22
|
-
║ ║
|
|
23
|
-
║ Welcome to Zeroshot! ║
|
|
24
|
-
║ Multi-agent orchestration engine ║
|
|
25
|
-
║ ║
|
|
26
|
-
║ Let's configure a few settings to get started. ║
|
|
27
|
-
║ ║
|
|
28
|
-
╚═══════════════════════════════════════════════════════════════╝
|
|
29
|
-
`);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Create readline interface
|
|
34
|
-
* @returns {readline.Interface}
|
|
35
|
-
*/
|
|
36
|
-
function createReadline() {
|
|
37
|
-
return readline.createInterface({
|
|
38
|
-
input: process.stdin,
|
|
39
|
-
output: process.stdout,
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
function printProviderInstallChoices() {
|
|
44
|
-
for (const provider of listProviderMetadata()) {
|
|
45
|
-
const [firstLine, ...remainingLines] = provider.installInstructions.split('\n');
|
|
46
|
-
console.log(` - ${provider.displayName}: ${firstLine}`);
|
|
47
|
-
for (const line of remainingLines) {
|
|
48
|
-
console.log(` ${line}`);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Prompt for provider selection
|
|
55
|
-
* @param {readline.Interface} rl
|
|
56
|
-
* @param {object} detected
|
|
57
|
-
* @returns {Promise<string>}
|
|
58
|
-
*/
|
|
59
|
-
function promptProvider(rl, detected) {
|
|
60
|
-
console.log('\nWhich AI provider would you like to use by default?\n');
|
|
61
|
-
|
|
62
|
-
const available = Object.entries(detected).filter(([_, status]) => status.available);
|
|
63
|
-
|
|
64
|
-
if (available.length === 0) {
|
|
65
|
-
console.log('No AI CLI tools detected. Please install one of:');
|
|
66
|
-
printProviderInstallChoices();
|
|
67
|
-
process.exit(1);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
available.forEach(([name], i) => {
|
|
71
|
-
console.log(` ${i + 1}) ${name} (installed)`);
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
return new Promise((resolve) => {
|
|
75
|
-
rl.question('\nChoice [1]: ', (answer) => {
|
|
76
|
-
const idx = parseInt(answer) - 1 || 0;
|
|
77
|
-
resolve(available[idx]?.[0] || available[0][0]);
|
|
78
|
-
});
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Prompt for model selection
|
|
84
|
-
* @param {readline.Interface} rl
|
|
85
|
-
* @returns {Promise<string>}
|
|
86
|
-
*/
|
|
87
|
-
function promptModel(rl) {
|
|
88
|
-
return new Promise((resolve) => {
|
|
89
|
-
console.log('What is the maximum Claude model agents can use? (cost ceiling)\n');
|
|
90
|
-
console.log(' 1) sonnet - Agents can use sonnet or haiku (recommended)');
|
|
91
|
-
console.log(' 2) opus - Agents can use opus, sonnet, or haiku');
|
|
92
|
-
console.log(' 3) haiku - Agents can only use haiku (lowest cost)\n');
|
|
93
|
-
|
|
94
|
-
rl.question('Enter 1, 2, or 3 [2]: ', (answer) => {
|
|
95
|
-
const choice = answer.trim() || '2';
|
|
96
|
-
switch (choice) {
|
|
97
|
-
case '2':
|
|
98
|
-
resolve('opus');
|
|
99
|
-
break;
|
|
100
|
-
case '3':
|
|
101
|
-
resolve('haiku');
|
|
102
|
-
break;
|
|
103
|
-
default:
|
|
104
|
-
resolve('sonnet');
|
|
105
|
-
}
|
|
106
|
-
});
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* Prompt for auto-update preference
|
|
112
|
-
* @param {readline.Interface} rl
|
|
113
|
-
* @returns {Promise<boolean>}
|
|
114
|
-
*/
|
|
115
|
-
function promptAutoUpdate(rl) {
|
|
116
|
-
return new Promise((resolve) => {
|
|
117
|
-
console.log('\nWould you like zeroshot to check for updates automatically?');
|
|
118
|
-
console.log('(Checks npm registry every 24 hours)\n');
|
|
119
|
-
|
|
120
|
-
rl.question('Enable auto-update checks? [Y/n]: ', (answer) => {
|
|
121
|
-
const normalized = answer.trim().toLowerCase();
|
|
122
|
-
// Default to yes if empty or starts with 'y'
|
|
123
|
-
resolve(normalized === '' || normalized === 'y' || normalized === 'yes');
|
|
124
|
-
});
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* Print completion message
|
|
130
|
-
* @param {object} settings - Saved settings
|
|
131
|
-
*/
|
|
132
|
-
function printComplete(settings) {
|
|
133
|
-
console.log(`
|
|
134
|
-
╔═══════════════════════════════════════════════════════════════╗
|
|
135
|
-
║ Setup complete! ║
|
|
136
|
-
╚═══════════════════════════════════════════════════════════════╝
|
|
137
|
-
|
|
138
|
-
Your settings:
|
|
139
|
-
• Provider: ${settings.defaultProvider}
|
|
140
|
-
• Max model: ${settings.maxModel} (Claude ceiling)
|
|
141
|
-
• Auto-updates: ${settings.autoCheckUpdates ? 'enabled' : 'disabled'}
|
|
142
|
-
|
|
143
|
-
Change anytime with: zeroshot settings set <key> <value>
|
|
144
|
-
|
|
145
|
-
Get started:
|
|
146
|
-
zeroshot run "Fix the bug in auth.js"
|
|
147
|
-
zeroshot run 123 (GitHub issue number)
|
|
148
|
-
zeroshot --help
|
|
149
|
-
|
|
150
|
-
`);
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* Check if first-run setup is needed
|
|
155
|
-
* @param {object} settings - Current settings
|
|
156
|
-
* @returns {boolean}
|
|
157
|
-
*/
|
|
158
|
-
function detectFirstRun(settings) {
|
|
159
|
-
return !settings.firstRunComplete;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* Main entry point - run first-time setup if needed
|
|
164
|
-
* @param {object} options
|
|
165
|
-
* @param {boolean} options.quiet - Skip interactive prompts
|
|
166
|
-
* @returns {Promise<boolean>} True if setup was run
|
|
167
|
-
*/
|
|
168
|
-
async function checkFirstRun(options = {}) {
|
|
169
|
-
const settings = loadSettings();
|
|
170
|
-
|
|
171
|
-
// Already completed setup
|
|
172
|
-
if (!detectFirstRun(settings)) {
|
|
173
|
-
return false;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
// Quiet mode - use defaults, mark complete
|
|
177
|
-
if (options.quiet) {
|
|
178
|
-
mutateSettings((current) => {
|
|
179
|
-
current.firstRunComplete = true;
|
|
180
|
-
});
|
|
181
|
-
return true;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
// Interactive setup
|
|
185
|
-
printWelcome();
|
|
186
|
-
|
|
187
|
-
const rl = createReadline();
|
|
188
|
-
|
|
189
|
-
try {
|
|
190
|
-
const detected = await detectProviders();
|
|
191
|
-
const provider = await promptProvider(rl, detected);
|
|
192
|
-
// Model ceiling selection
|
|
193
|
-
const model = await promptModel(rl);
|
|
194
|
-
|
|
195
|
-
// Auto-update preference
|
|
196
|
-
const autoUpdate = await promptAutoUpdate(rl);
|
|
197
|
-
|
|
198
|
-
const savedSettings = mutateSettings((current) => {
|
|
199
|
-
current.defaultProvider = provider;
|
|
200
|
-
current.maxModel = model;
|
|
201
|
-
current.autoCheckUpdates = autoUpdate;
|
|
202
|
-
current.firstRunComplete = true;
|
|
203
|
-
return current;
|
|
204
|
-
});
|
|
205
|
-
|
|
206
|
-
// Print completion
|
|
207
|
-
printComplete(savedSettings);
|
|
208
|
-
|
|
209
|
-
return true;
|
|
210
|
-
} finally {
|
|
211
|
-
rl.close();
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
module.exports = {
|
|
216
|
-
checkFirstRun,
|
|
217
|
-
// Exported for testing
|
|
218
|
-
detectFirstRun,
|
|
219
|
-
printWelcome,
|
|
220
|
-
printComplete,
|
|
221
|
-
promptProvider,
|
|
222
|
-
printProviderInstallChoices,
|
|
223
|
-
};
|