@ouro.bot/cli 0.1.0-alpha.389 → 0.1.0-alpha.390
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/changelog.json
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_note": "This changelog is maintained as part of the PR/version-bump workflow. Agent-curated, not auto-generated. Agents read this file directly via read_file to understand what changed between versions.",
|
|
3
3
|
"versions": [
|
|
4
|
+
{
|
|
5
|
+
"version": "0.1.0-alpha.390",
|
|
6
|
+
"changes": [
|
|
7
|
+
"Interactive SerpentGuide adoption now asks the human for the hatchling vault unlock secret through the shared hidden terminal prompt instead of generating and printing one.",
|
|
8
|
+
"`complete_adoption` refuses to finish without an interactive secret prompt, validates that the human-provided hatchling vault secret is non-empty, and keeps rollback coverage for vault/provider write failures.",
|
|
9
|
+
"Hatch prompts and auth/provider docs now state that hatchling vault unlock secrets must never be typed into chat, included in tool arguments, generated by Ouro, or printed back to the terminal.",
|
|
10
|
+
"`ouro help` now covers documented bootstrap and repair commands including `auth verify`, `auth switch`, `provider refresh`, and `use`.",
|
|
11
|
+
"`@ouro.bot/cli` and the `ouro.bot` wrapper are version-synced for the hatchling vault secret bootstrap release."
|
|
12
|
+
]
|
|
13
|
+
},
|
|
4
14
|
{
|
|
5
15
|
"version": "0.1.0-alpha.389",
|
|
6
16
|
"changes": [
|
|
@@ -427,6 +427,7 @@ async function defaultRunSerpentGuide() {
|
|
|
427
427
|
provider: providerRaw,
|
|
428
428
|
bundlesRoot,
|
|
429
429
|
animationWriter: (text) => process.stdout.write(text),
|
|
430
|
+
promptSecret: defaultPromptSecret,
|
|
430
431
|
});
|
|
431
432
|
// Run the serpent guide session via runCliSession
|
|
432
433
|
const result = await runCliSession({
|
|
@@ -3192,10 +3192,7 @@ async function runOuroCli(args, deps = (0, cli_defaults_1.createDefaultOuroCliDe
|
|
|
3192
3192
|
await deps.startChat(hatchInput.agentName);
|
|
3193
3193
|
return "";
|
|
3194
3194
|
}
|
|
3195
|
-
const
|
|
3196
|
-
? `\nvault unlock secret for ${hatchInput.agentName}: ${result.vaultUnlockSecret}\nUse this with \`ouro vault unlock --agent ${hatchInput.agentName}\` on another machine.`
|
|
3197
|
-
: "";
|
|
3198
|
-
const message = `hatched ${hatchInput.agentName} at ${result.bundleRoot} using specialist identity ${result.selectedIdentity}; ${daemonResult.message}${vaultLine}`;
|
|
3195
|
+
const message = `hatched ${hatchInput.agentName} at ${result.bundleRoot} using specialist identity ${result.selectedIdentity}; ${daemonResult.message}`;
|
|
3199
3196
|
deps.writeStdout(message);
|
|
3200
3197
|
return message;
|
|
3201
3198
|
}
|
|
@@ -163,6 +163,25 @@ exports.COMMAND_REGISTRY = {
|
|
|
163
163
|
example: "ouro auth --agent ouroboros",
|
|
164
164
|
subcommands: ["verify", "switch"],
|
|
165
165
|
},
|
|
166
|
+
use: {
|
|
167
|
+
category: "Auth",
|
|
168
|
+
description: "Choose this machine's provider/model lane for an agent",
|
|
169
|
+
usage: "ouro use --agent <name> --lane outward|inner --provider <provider> --model <model> [--force]",
|
|
170
|
+
example: "ouro use --agent ouroboros --lane outward --provider minimax --model MiniMax-M2.5",
|
|
171
|
+
},
|
|
172
|
+
check: {
|
|
173
|
+
category: "Auth",
|
|
174
|
+
description: "Run a live check for this machine's selected provider/model lane",
|
|
175
|
+
usage: "ouro check --agent <name> --lane outward|inner",
|
|
176
|
+
example: "ouro check --agent ouroboros --lane outward",
|
|
177
|
+
},
|
|
178
|
+
provider: {
|
|
179
|
+
category: "Auth",
|
|
180
|
+
description: "Refresh daemon provider credentials from an agent vault",
|
|
181
|
+
usage: "ouro provider refresh --agent <name>",
|
|
182
|
+
example: "ouro provider refresh --agent ouroboros",
|
|
183
|
+
subcommands: ["refresh"],
|
|
184
|
+
},
|
|
166
185
|
vault: {
|
|
167
186
|
category: "Auth",
|
|
168
187
|
description: "Create, recover, unlock, inspect, and populate the agent credential vault",
|
|
@@ -230,6 +249,21 @@ exports.COMMAND_REGISTRY = {
|
|
|
230
249
|
},
|
|
231
250
|
};
|
|
232
251
|
const SUBCOMMAND_HELP = {
|
|
252
|
+
"auth verify": {
|
|
253
|
+
description: "Verify agent provider credentials without changing provider/model lanes",
|
|
254
|
+
usage: "ouro auth verify --agent <name> [--provider <provider>]",
|
|
255
|
+
example: "ouro auth verify --agent ouroboros --provider openai-codex",
|
|
256
|
+
},
|
|
257
|
+
"auth switch": {
|
|
258
|
+
description: "Switch local provider/model lanes after credentials are available",
|
|
259
|
+
usage: "ouro auth switch --agent <name> --provider <provider> [--facing human|agent]",
|
|
260
|
+
example: "ouro auth switch --agent ouroboros --provider minimax",
|
|
261
|
+
},
|
|
262
|
+
"provider refresh": {
|
|
263
|
+
description: "Reload this agent's provider credentials from its vault into daemon memory",
|
|
264
|
+
usage: "ouro provider refresh --agent <name>",
|
|
265
|
+
example: "ouro provider refresh --agent ouroboros",
|
|
266
|
+
},
|
|
233
267
|
"vault create": {
|
|
234
268
|
description: "Create an agent credential vault and store local unlock material",
|
|
235
269
|
usage: "ouro vault create --agent <name> --email <email> [--server <url>] [--store <store>]",
|
|
@@ -92,7 +92,8 @@ function buildSpecialistSystemPrompt(soulText, identityText, existingBundles, co
|
|
|
92
92
|
"- `read_file`: Read a file from disk. Useful for reviewing existing agent bundles or migration sources.",
|
|
93
93
|
"- `list_directory`: List directory contents. Useful for exploring existing agent bundles.",
|
|
94
94
|
"- I also have the normal local harness tools when useful here, including `shell`, `ouro task create`, `ouro reminder create`, note tools, coding tools, and repo helpers.",
|
|
95
|
-
"- `complete_adoption`: Finalize the bundle. Validates, scaffolds structural dirs, moves to ~/AgentBundles/, writes secrets, plays hatch animation. I call this with `name` (PascalCase) and `handoff_message` (warm message for the human).",
|
|
95
|
+
"- `complete_adoption`: Finalize the bundle. Validates, asks the harness to collect the hatchling vault unlock secret through a hidden terminal prompt, scaffolds structural dirs, moves to ~/AgentBundles/, writes secrets, plays hatch animation. I call this with `name` (PascalCase) and `handoff_message` (warm message for the human).",
|
|
96
|
+
"- The complete_adoption tool triggers a hidden terminal prompt for the hatchling vault unlock secret. I must never ask the human to type the vault unlock secret into chat, and I must never include it in tool arguments.",
|
|
96
97
|
"- `settle`: End the conversation with a final message. I call this after complete_adoption succeeds.",
|
|
97
98
|
"",
|
|
98
99
|
"I must call `settle` when I am done to end the session cleanly.",
|
|
@@ -35,7 +35,6 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.getSpecialistTools = getSpecialistTools;
|
|
37
37
|
exports.createSpecialistExecTool = createSpecialistExecTool;
|
|
38
|
-
const crypto = __importStar(require("crypto"));
|
|
39
38
|
const fs = __importStar(require("fs"));
|
|
40
39
|
const path = __importStar(require("path"));
|
|
41
40
|
const tools_base_1 = require("../../repertoire/tools-base");
|
|
@@ -50,7 +49,7 @@ const completeAdoptionTool = {
|
|
|
50
49
|
type: "function",
|
|
51
50
|
function: {
|
|
52
51
|
name: "complete_adoption",
|
|
53
|
-
description: "finalize the agent bundle and hatch the new agent. call this only when you have written all 5 psyche files and agent.json to the temp directory, and the human has approved the bundle.",
|
|
52
|
+
description: "finalize the agent bundle and hatch the new agent. call this only when you have written all 5 psyche files and agent.json to the temp directory, and the human has approved the bundle. tool execution asks the human for the hatchling vault unlock secret through a hidden terminal prompt; do not ask for or include vault unlock secrets in chat or tool args.",
|
|
54
53
|
parameters: {
|
|
55
54
|
type: "object",
|
|
56
55
|
properties: {
|
|
@@ -169,21 +168,31 @@ async function execCompleteAdoption(args, deps) {
|
|
|
169
168
|
if (fs.existsSync(targetBundle)) {
|
|
170
169
|
return `error: bundle '${name}.ouro' already exists at ${deps.bundlesRoot}. choose a different name.`;
|
|
171
170
|
}
|
|
171
|
+
if (!deps.promptSecret) {
|
|
172
|
+
return "error: complete_adoption requires an interactive vault unlock secret prompt. Re-run `ouro hatch` in a terminal so the human can enter a hatchling vault unlock secret without echoing it.";
|
|
173
|
+
}
|
|
174
|
+
const vault = (0, identity_1.resolveVaultConfig)(name);
|
|
175
|
+
let vaultUnlockSecret;
|
|
176
|
+
try {
|
|
177
|
+
vaultUnlockSecret = (await deps.promptSecret(`Choose Ouro vault unlock secret for ${vault.email}: `)).trim();
|
|
178
|
+
}
|
|
179
|
+
catch (error) {
|
|
180
|
+
return `error: failed to read hatchling vault unlock secret: ${error instanceof Error ? error.message : /* v8 ignore next -- defensive: non-Error catch branch @preserve */ String(error)}`;
|
|
181
|
+
}
|
|
182
|
+
if (!vaultUnlockSecret) {
|
|
183
|
+
return "error: hatchling vault creation requires an unlock secret. Re-run `ouro hatch` in an interactive terminal and enter a human-chosen unlock secret.";
|
|
184
|
+
}
|
|
172
185
|
// Scaffold structural dirs into tempDir
|
|
173
186
|
scaffoldBundle(deps.tempDir);
|
|
174
187
|
// Move tempDir -> final bundle location
|
|
175
188
|
moveDir(deps.tempDir, targetBundle);
|
|
176
189
|
// Write secrets
|
|
177
|
-
let generatedVaultUnlockSecret = null;
|
|
178
190
|
try {
|
|
179
|
-
const vault = (0, identity_1.resolveVaultConfig)(name);
|
|
180
|
-
const vaultUnlockSecret = crypto.randomBytes(32).toString("base64");
|
|
181
191
|
const vaultResult = await (0, vault_setup_1.createVaultAccount)(name, vault.serverUrl, vault.email, vaultUnlockSecret);
|
|
182
192
|
if (!vaultResult.success) {
|
|
183
193
|
throw new Error(`failed to create vault: ${vaultResult.error}`);
|
|
184
194
|
}
|
|
185
195
|
(0, vault_unlock_1.storeVaultUnlockSecret)({ agentName: name, email: vault.email, serverUrl: vault.serverUrl }, vaultUnlockSecret);
|
|
186
|
-
generatedVaultUnlockSecret = vaultUnlockSecret;
|
|
187
196
|
await (0, hatch_flow_1.storeHatchlingProviderCredentials)(name, deps.provider, deps.credentials);
|
|
188
197
|
}
|
|
189
198
|
catch (e) {
|
|
@@ -229,14 +238,6 @@ async function execCompleteAdoption(args, deps) {
|
|
|
229
238
|
if (handoffMessage && deps.animationWriter) {
|
|
230
239
|
deps.animationWriter(`\n${handoffMessage}\n`);
|
|
231
240
|
}
|
|
232
|
-
if (generatedVaultUnlockSecret && deps.animationWriter) {
|
|
233
|
-
deps.animationWriter([
|
|
234
|
-
"",
|
|
235
|
-
`Vault unlock secret for ${name}: ${generatedVaultUnlockSecret}`,
|
|
236
|
-
`Use this with \`ouro vault unlock --agent ${name}\` on another machine.`,
|
|
237
|
-
"",
|
|
238
|
-
].join("\n"));
|
|
239
|
-
}
|
|
240
241
|
(0, runtime_1.emitNervesEvent)({
|
|
241
242
|
component: "daemon",
|
|
242
243
|
event: "daemon.adoption_complete",
|