@ouro.bot/cli 0.1.0-alpha.1005 → 0.1.0-alpha.1007

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,18 @@
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.1007",
6
+ "changes": [
7
+ "Unattended onboarding: ouro hatch --answers <json> --secret-file <path> [--no-chat] hatches with no terminal, and ouro vault unlock|create|replace|recover take --secret-file (a file, /dev/stdin or /dev/fd/N), so no secret reaches argv."
8
+ ]
9
+ },
10
+ {
11
+ "version": "0.1.0-alpha.1006",
12
+ "changes": [
13
+ "On Linux outside a container, habits and awaits fire from the daemon's own timers instead of writing launchd plists and spawning launchctl, and are no longer reported as degraded. macOS keeps launchd and containers keep supercronic."
14
+ ]
15
+ },
4
16
  {
5
17
  "version": "0.1.0-alpha.1005",
6
18
  "changes": [
@@ -1,5 +1,5 @@
1
1
  {
2
- "runtimeVersion": "0.1.0-alpha.1005",
2
+ "runtimeVersion": "0.1.0-alpha.1007",
3
3
  "bundleSchemaVersion": 3,
4
4
  "lastUpdated": "2026-09-03T00:00:00.000Z"
5
5
  }
@@ -1,7 +1,7 @@
1
1
  <?xml version="1.0"?>
2
2
  <Container version="2">
3
3
  <Name>ouro-butler</Name>
4
- <Repository>ghcr.io/ourostack/ouroboros-butler:0.1.0-alpha.1005</Repository>
4
+ <Repository>ghcr.io/ourostack/ouroboros-butler:0.1.0-alpha.1007</Repository>
5
5
  <Registry>https://github.com/ourostack/ouroboros/pkgs/container/ouroboros-butler</Registry>
6
6
  <Network>host</Network>
7
7
  <Shell>sh</Shell>
@@ -253,6 +253,18 @@ class AwaitScheduler {
253
253
  }
254
254
  }
255
255
  verifyCronAndCreateFallbacks(jobs) {
256
+ if (this.osCronManager.firesInProcess) {
257
+ // Nothing is registered with the OS: every await runs on an in-process timer, which is not degraded.
258
+ for (const job of jobs) {
259
+ const bareName = job.taskId.slice(exports.AWAIT_CRON_LABEL_PREFIX_MARKER.length + 1);
260
+ const ms = (0, cadence_1.parseCadenceToMs)(this.getAwaitFile(bareName)?.cadence);
261
+ if (ms !== null)
262
+ this.createTimerFallback(bareName, ms);
263
+ else
264
+ this.degradedAwaitNames.set(bareName, "cadence cannot be scheduled with an in-process timer");
265
+ }
266
+ return;
267
+ }
256
268
  if (!this.execForVerify && !this.verifyJobs)
257
269
  return;
258
270
  const verifiedLabels = this.verifyJobs?.(jobs)
@@ -1575,12 +1575,32 @@ function habitProbeJsonResponse(response) {
1575
1575
  ?? "habit probe did not produce verified zero-transport evidence",
1576
1576
  }, null, 2);
1577
1577
  }
1578
- // ── Hatch input resolution ──
1578
+ /** An answers file for an unattended hatch: JSON with agentName, humanName, provider and credentials. */
1579
+ function readHatchAnswers(filePath) {
1580
+ const raw = readSecretValueFile("--answers", filePath);
1581
+ let parsed;
1582
+ try {
1583
+ parsed = JSON.parse(raw);
1584
+ }
1585
+ catch {
1586
+ throw new Error(`--answers ${filePath} is not JSON. Expected {"agentName", "humanName", "provider", "credentials"}.`);
1587
+ }
1588
+ if (!parsed || typeof parsed !== "object" || Array.isArray(parsed))
1589
+ throw new Error(`--answers ${filePath} must be a JSON object.`);
1590
+ const answers = parsed;
1591
+ const text = (key) => typeof answers[key] === "string" ? answers[key] : undefined;
1592
+ const credentials = answers.credentials && typeof answers.credentials === "object" && !Array.isArray(answers.credentials)
1593
+ ? answers.credentials
1594
+ : undefined;
1595
+ return { agentName: text("agentName"), humanName: text("humanName"), provider: text("provider"), credentials };
1596
+ }
1579
1597
  async function resolveHatchInput(command, deps) {
1580
- const prompt = deps.promptInput;
1581
- const agentName = command.agentName ?? (prompt ? await prompt("Hatchling name: ") : "");
1582
- const humanName = command.humanName ?? (prompt ? await prompt("Your name: ") : os.userInfo().username);
1583
- const providerRaw = command.provider ?? (prompt ? await prompt("Provider (azure|anthropic|minimax|openai-codex|github-copilot): ") : "");
1598
+ const answers = command.answersFile ? readHatchAnswers(command.answersFile) : {};
1599
+ // An unattended hatch never prompts: whatever the answers and flags leave out is a usage error.
1600
+ const prompt = command.answersFile ? undefined : deps.promptInput;
1601
+ const agentName = command.agentName ?? answers.agentName ?? (prompt ? await prompt("Hatchling name: ") : "");
1602
+ const humanName = command.humanName ?? answers.humanName ?? (prompt ? await prompt("Your name: ") : os.userInfo().username);
1603
+ const providerRaw = command.provider ?? answers.provider ?? (prompt ? await prompt("Provider (azure|anthropic|minimax|openai-codex|github-copilot): ") : "");
1584
1604
  if (!agentName || !humanName || !(0, cli_parse_2.isAgentProvider)(providerRaw)) {
1585
1605
  throw new Error(`Usage\n${(0, cli_parse_2.usage)()}`);
1586
1606
  }
@@ -1591,7 +1611,7 @@ async function resolveHatchInput(command, deps) {
1591
1611
  credentials = await (0, auth_flow_1.resolveHatchCredentials)({
1592
1612
  agentName,
1593
1613
  provider: providerRaw,
1594
- credentials: command.credentials,
1614
+ credentials: command.credentials ?? answers.credentials,
1595
1615
  promptInput: prompt,
1596
1616
  runAuthFlow: deps.runAuthFlow,
1597
1617
  onProgress: (message) => progress.updateDetail(message),
@@ -1603,12 +1623,21 @@ async function resolveHatchInput(command, deps) {
1603
1623
  throw error;
1604
1624
  }
1605
1625
  progress.end();
1626
+ const vaultUnlockSecret = command.secretFile
1627
+ ? await (0, vault_unlock_1.promptConfirmedVaultUnlockSecret)({
1628
+ promptSecret: ensureVaultSecretPrompt(undefined, "create", command.secretFile),
1629
+ question: "",
1630
+ confirmQuestion: "",
1631
+ emptyError: `--secret-file ${command.secretFile} is empty.`,
1632
+ })
1633
+ : undefined;
1606
1634
  return {
1607
1635
  agentName,
1608
1636
  humanName,
1609
1637
  provider: providerRaw,
1610
1638
  credentials,
1611
1639
  migrationPath: command.migrationPath,
1640
+ ...(vaultUnlockSecret ? { vaultUnlockSecret } : {}),
1612
1641
  };
1613
1642
  }
1614
1643
  // ── Provider selection CLI helpers ──
@@ -1814,7 +1843,12 @@ function defaultRepairVaultEmail(agentName, config) {
1814
1843
  return configuredEmail;
1815
1844
  return (0, identity_1.defaultStableVaultEmail)(agentName);
1816
1845
  }
1817
- function ensureVaultSecretPrompt(promptSecret, action) {
1846
+ function ensureVaultSecretPrompt(promptSecret, action, secretFile) {
1847
+ if (secretFile) {
1848
+ // Read once: /dev/stdin can only be read once, and a confirmation prompt asks again.
1849
+ const secret = readSecretValueFile("--secret-file", secretFile);
1850
+ return async () => secret;
1851
+ }
1818
1852
  if (promptSecret)
1819
1853
  return promptSecret;
1820
1854
  throw new Error(`vault ${action} requires an interactive secret prompt that does not echo the vault unlock secret`);
@@ -1855,7 +1889,7 @@ async function executeVaultUnlock(command, deps) {
1855
1889
  if (command.agent === "SerpentGuide") {
1856
1890
  throw new Error("SerpentGuide does not have a persistent credential vault. Hatch bootstrap uses selected provider credentials in memory only.");
1857
1891
  }
1858
- const promptSecret = ensureVaultSecretPrompt(deps.promptSecret, "unlock");
1892
+ const promptSecret = ensureVaultSecretPrompt(deps.promptSecret, "unlock", command.secretFile);
1859
1893
  const { config } = (0, auth_flow_1.readAgentConfigForAgent)(command.agent, deps.bundlesRoot);
1860
1894
  const vault = (0, identity_1.resolveVaultConfig)(command.agent, config.vault);
1861
1895
  const unlockSecret = await promptSecret(`Ouro vault unlock secret for ${vault.email}: `);
@@ -1911,7 +1945,7 @@ async function executeVaultCreate(command, deps) {
1911
1945
  const { configPath, config } = (0, auth_flow_1.readAgentConfigForAgent)(command.agent, deps.bundlesRoot);
1912
1946
  const configuredVault = (0, identity_1.resolveVaultConfig)(command.agent, config.vault);
1913
1947
  const email = command.email ?? config.vault?.email ?? configuredVault.email;
1914
- const promptSecret = ensureVaultSecretPrompt(deps.promptSecret, "create");
1948
+ const promptSecret = ensureVaultSecretPrompt(deps.promptSecret, "create", command.secretFile);
1915
1949
  const serverUrl = command.serverUrl ?? config.vault?.serverUrl ?? configuredVault.serverUrl;
1916
1950
  const unlockSecret = await (0, vault_unlock_1.promptConfirmedVaultUnlockSecret)({
1917
1951
  promptSecret,
@@ -1994,7 +2028,7 @@ async function executeVaultReplace(command, deps) {
1994
2028
  }
1995
2029
  if (command.generateUnlockSecret)
1996
2030
  rejectGeneratedVaultUnlockSecret("replace");
1997
- const promptSecret = ensureVaultSecretPrompt(deps.promptSecret, "replace");
2031
+ const promptSecret = ensureVaultSecretPrompt(deps.promptSecret, "replace", command.secretFile);
1998
2032
  const { configPath, config } = (0, auth_flow_1.readAgentConfigForAgent)(command.agent, deps.bundlesRoot);
1999
2033
  const configuredVault = (0, identity_1.resolveVaultConfig)(command.agent, config.vault);
2000
2034
  const email = command.email ?? defaultRepairVaultEmail(command.agent, config);
@@ -2073,7 +2107,7 @@ async function executeVaultRecover(command, deps) {
2073
2107
  if (command.generateUnlockSecret)
2074
2108
  rejectGeneratedVaultUnlockSecret("recover");
2075
2109
  const sourceImports = command.sources.map(readVaultRecoverSource);
2076
- const promptSecret = ensureVaultSecretPrompt(deps.promptSecret, "recover");
2110
+ const promptSecret = ensureVaultSecretPrompt(deps.promptSecret, "recover", command.secretFile);
2077
2111
  const now = providerCliNow(deps);
2078
2112
  const { configPath, config } = (0, auth_flow_1.readAgentConfigForAgent)(command.agent, deps.bundlesRoot);
2079
2113
  const configuredVault = (0, identity_1.resolveVaultConfig)(command.agent, config.vault);
@@ -9036,7 +9070,7 @@ async function runOuroCli(args, deps = (0, cli_defaults_1.createDefaultOuroCliDe
9036
9070
  }
9037
9071
  if (command.kind === "hatch.start") {
9038
9072
  // Route through serpent guide when no explicit hatch args were provided
9039
- const hasExplicitHatchArgs = !!(command.agentName || command.humanName || command.provider || command.credentials);
9073
+ const hasExplicitHatchArgs = !!(command.agentName || command.humanName || command.provider || command.credentials || command.answersFile);
9040
9074
  if (deps.runSerpentGuide && !hasExplicitHatchArgs) {
9041
9075
  if (ttyBoardEnabled(deps)) {
9042
9076
  deps.writeStdout(renderCommandBoard(deps, {
@@ -9078,7 +9112,7 @@ async function runOuroCli(args, deps = (0, cli_defaults_1.createDefaultOuroCliDe
9078
9112
  const result = await hatchRunner(hatchInput);
9079
9113
  await performSystemSetup(deps);
9080
9114
  const daemonResult = await ensureDaemonRunning(deps);
9081
- if (deps.startChat) {
9115
+ if (deps.startChat && !command.noChat) {
9082
9116
  const health = await checkProviderHealthBeforeChat(hatchInput.agentName, deps);
9083
9117
  if (!health.ok)
9084
9118
  return health.output;
@@ -60,8 +60,8 @@ exports.COMMAND_REGISTRY = {
60
60
  hatch: {
61
61
  category: "Lifecycle",
62
62
  description: "Create a new agent",
63
- usage: "ouro hatch [--agent <name>] [--human <name>] [--provider <provider>]",
64
- example: "ouro hatch --agent Sprout --human <your-name> --provider anthropic",
63
+ usage: "ouro hatch [--agent <name>] [--human <name>] [--provider <provider>] [--answers <json-file>] [--secret-file <path>] [--no-chat]",
64
+ example: "ouro hatch --answers ./hatch.json --secret-file /dev/fd/3 --no-chat 3< ./unlock-secret",
65
65
  },
66
66
  rollback: {
67
67
  category: "Lifecycle",
@@ -620,23 +620,23 @@ const SUBCOMMAND_HELP = {
620
620
  },
621
621
  "vault create": {
622
622
  description: "Create an agent credential vault and store local unlock material",
623
- usage: "ouro vault create [--agent <name>] --email <email> [--server <url>] [--store <store>]",
623
+ usage: "ouro vault create [--agent <name>] --email <email> [--server <url>] [--store <store>] [--secret-file <path>]",
624
624
  example: "ouro vault create --email ouroboros@ouro.bot",
625
625
  },
626
626
  "vault replace": {
627
627
  description: "Create an empty agent vault at the stable agent email when no unlock secret or JSON export exists",
628
- usage: "ouro vault replace [--agent <name>] [--email <email>] [--server <url>] [--store <store>]",
628
+ usage: "ouro vault replace [--agent <name>] [--email <email>] [--server <url>] [--store <store>] [--secret-file <path>]",
629
629
  example: "ouro vault replace",
630
630
  },
631
631
  "vault recover": {
632
632
  description: "Create an agent vault at the stable agent email and import local JSON credential exports",
633
- usage: "ouro vault recover [--agent <name>] --from <json> [--from <json> ...] [--email <email>] [--server <url>] [--store <store>]",
633
+ usage: "ouro vault recover [--agent <name>] --from <json> [--from <json> ...] [--email <email>] [--server <url>] [--store <store>] [--secret-file <path>]",
634
634
  example: "ouro vault recover --from ./credentials.json",
635
635
  },
636
636
  "vault unlock": {
637
637
  description: "Unlock an existing agent credential vault on this machine",
638
- usage: "ouro vault unlock [--agent <name>] [--store <store>]",
639
- example: "ouro vault unlock",
638
+ usage: "ouro vault unlock [--agent <name>] [--store <store>] [--secret-file <path>]",
639
+ example: "ouro vault unlock --secret-file /dev/stdin < secret.txt",
640
640
  },
641
641
  "vault status": {
642
642
  description: "Show whether this machine can unlock an agent credential vault",
@@ -784,6 +784,9 @@ function parseHatchCommand(args) {
784
784
  let humanName;
785
785
  let providerRaw;
786
786
  let migrationPath;
787
+ let answersFile;
788
+ let secretFile;
789
+ let noChat = false;
787
790
  const credentials = {};
788
791
  for (let i = 0; i < args.length; i += 1) {
789
792
  const token = args[i];
@@ -842,6 +845,22 @@ function parseHatchCommand(args) {
842
845
  i += 1;
843
846
  continue;
844
847
  }
848
+ // Unattended hatch: answers (including provider credentials) and the vault unlock secret come from files, never argv.
849
+ if (token === "--answers" || token === "--secret-file") {
850
+ const value = args[i + 1];
851
+ if (!value || value.startsWith("--"))
852
+ throw new Error(`${token} requires a path (use /dev/stdin or /dev/fd/<n> to pipe it).`);
853
+ if (token === "--answers")
854
+ answersFile = value;
855
+ else
856
+ secretFile = value;
857
+ i += 1;
858
+ continue;
859
+ }
860
+ if (token === "--no-chat") {
861
+ noChat = true;
862
+ continue;
863
+ }
845
864
  }
846
865
  if (providerRaw && !isAgentProvider(providerRaw)) {
847
866
  throw new Error("Unknown provider. Use azure|anthropic|minimax|openai-codex|github-copilot.");
@@ -854,6 +873,9 @@ function parseHatchCommand(args) {
854
873
  provider,
855
874
  credentials: Object.keys(credentials).length > 0 ? credentials : undefined,
856
875
  migrationPath,
876
+ ...(answersFile ? { answersFile } : {}),
877
+ ...(secretFile ? { secretFile } : {}),
878
+ ...(noChat ? { noChat: true } : {}),
857
879
  };
858
880
  }
859
881
  function parseAuthCommand(args) {
@@ -950,6 +972,7 @@ function parseVaultCommand(args) {
950
972
  let serverUrl;
951
973
  let store;
952
974
  let generateUnlockSecret = false;
975
+ let secretFile;
953
976
  const sources = [];
954
977
  for (let i = 0; i < rest.length; i += 1) {
955
978
  const token = rest[i];
@@ -987,6 +1010,15 @@ function parseVaultCommand(args) {
987
1010
  generateUnlockSecret = true;
988
1011
  continue;
989
1012
  }
1013
+ // The unlock secret is read from a file (or /dev/stdin, /dev/fd/N), never from argv.
1014
+ if (token === "--secret-file" && sub !== "status") {
1015
+ const value = rest[i + 1];
1016
+ if (!value || value.startsWith("--") || secretFile !== undefined)
1017
+ throw new Error("--secret-file requires one path (use /dev/stdin to pipe the secret).");
1018
+ secretFile = value;
1019
+ i += 1;
1020
+ continue;
1021
+ }
990
1022
  throw new Error("Usage: ouro vault create|replace|recover|unlock|status [--agent <name>]");
991
1023
  }
992
1024
  if (sub !== "create" && sub !== "replace" && sub !== "recover" && sub !== "unlock" && sub !== "status") {
@@ -1000,6 +1032,7 @@ function parseVaultCommand(args) {
1000
1032
  ...(serverUrl ? { serverUrl } : {}),
1001
1033
  ...(store ? { store } : {}),
1002
1034
  ...(generateUnlockSecret ? { generateUnlockSecret: true } : {}),
1035
+ ...(secretFile ? { secretFile } : {}),
1003
1036
  };
1004
1037
  }
1005
1038
  if (sub === "replace") {
@@ -1010,6 +1043,7 @@ function parseVaultCommand(args) {
1010
1043
  ...(serverUrl ? { serverUrl } : {}),
1011
1044
  ...(store ? { store } : {}),
1012
1045
  ...(generateUnlockSecret ? { generateUnlockSecret: true } : {}),
1046
+ ...(secretFile ? { secretFile } : {}),
1013
1047
  };
1014
1048
  }
1015
1049
  if (sub === "recover") {
@@ -1024,10 +1058,11 @@ function parseVaultCommand(args) {
1024
1058
  ...(serverUrl ? { serverUrl } : {}),
1025
1059
  ...(store ? { store } : {}),
1026
1060
  ...(generateUnlockSecret ? { generateUnlockSecret: true } : {}),
1061
+ ...(secretFile ? { secretFile } : {}),
1027
1062
  };
1028
1063
  }
1029
1064
  if (sub === "unlock") {
1030
- return { kind: "vault.unlock", ...(agent ? { agent } : {}), ...(store ? { store } : {}) };
1065
+ return { kind: "vault.unlock", ...(agent ? { agent } : {}), ...(store ? { store } : {}), ...(secretFile ? { secretFile } : {}) };
1031
1066
  }
1032
1067
  return { kind: "vault.status", ...(agent ? { agent } : {}), ...(store ? { store } : {}) };
1033
1068
  }
@@ -748,7 +748,7 @@ void (0, daemon_bootstrap_startup_1.startDaemonAfterContainerCredentialBootstrap
748
748
  (0, habit_migration_1.migrateHabitsFromTaskSystem)(bundleRoot);
749
749
  const osCronManager = supercronicSupervisor
750
750
  ? supercronicSupervisor.namespace(`habit:${agent}`)
751
- : new os_cron_1.LaunchdCronManager(osCronDeps, { ownsLabel: habitCronLabelOwner(agent) });
751
+ : (0, os_cron_1.hostOsCronManager)(process.platform, () => new os_cron_1.LaunchdCronManager(osCronDeps, { ownsLabel: habitCronLabelOwner(agent) }));
752
752
  const scheduler = new habit_scheduler_1.HabitScheduler({
753
753
  agent,
754
754
  habitsDir,
@@ -847,7 +847,7 @@ void (0, daemon_bootstrap_startup_1.startDaemonAfterContainerCredentialBootstrap
847
847
  try {
848
848
  const awaitOsCronManager = supercronicSupervisor
849
849
  ? supercronicSupervisor.namespace(`await:${agent}`)
850
- : new os_cron_1.LaunchdCronManager(osCronDeps, { ownsLabel: awaitCronLabelOwner(agent) });
850
+ : (0, os_cron_1.hostOsCronManager)(process.platform, () => new os_cron_1.LaunchdCronManager(osCronDeps, { ownsLabel: awaitCronLabelOwner(agent) }));
851
851
  const awaitScheduler = new await_scheduler_1.AwaitScheduler({
852
852
  agent,
853
853
  awaitsDir,
@@ -641,7 +641,7 @@ function checkHabits(deps) {
641
641
  checks.push({
642
642
  label: `${agentDir} launchd plists`,
643
643
  status: "pass",
644
- detail: `launchd not applicable on ${platform}; scheduled habits use the platform cron manager`,
644
+ detail: `launchd not applicable on ${platform}; scheduled habits fire from the daemon's timers, or supercronic in a container`,
645
645
  });
646
646
  continue;
647
647
  }
@@ -33,7 +33,8 @@ var __importStar = (this && this.__importStar) || (function () {
33
33
  };
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.CrontabCronManager = exports.LaunchdCronManager = void 0;
36
+ exports.InProcessCronManager = exports.CrontabCronManager = exports.LaunchdCronManager = void 0;
37
+ exports.hostOsCronManager = hostOsCronManager;
37
38
  exports.createOsCronManager = createOsCronManager;
38
39
  exports.cadenceToSeconds = cadenceToSeconds;
39
40
  exports.scheduleToCalendarInterval = scheduleToCalendarInterval;
@@ -240,6 +241,27 @@ class CrontabCronManager {
240
241
  }
241
242
  }
242
243
  exports.CrontabCronManager = CrontabCronManager;
244
+ /**
245
+ * For hosts with no per-user scheduler we can own: the daemon's in-process
246
+ * timers fire every job, so nothing is written to the OS. A Linux appliance's
247
+ * crontab is shared with the system, and a supervised daemon (`ouro service`)
248
+ * is already running whenever a timer is due.
249
+ */
250
+ class InProcessCronManager {
251
+ firesInProcess = true;
252
+ sync(jobs) {
253
+ (0, runtime_1.emitNervesEvent)({ component: "daemon", event: "daemon.os_cron_in_process", message: "scheduled jobs fire from in-process timers", meta: { jobCount: jobs.length } });
254
+ }
255
+ removeAll() { }
256
+ list() {
257
+ return [];
258
+ }
259
+ }
260
+ exports.InProcessCronManager = InProcessCronManager;
261
+ /** launchd on macOS; in-process timers on every other host outside a container. */
262
+ function hostOsCronManager(platform, launchd) {
263
+ return platform === "darwin" ? launchd() : new InProcessCronManager();
264
+ }
243
265
  function createOsCronManager(options = {}) {
244
266
  const platform = options.platform ?? process.platform;
245
267
  if (platform === "darwin") {
@@ -270,6 +270,8 @@ class HabitScheduler {
270
270
  }, intervalMs);
271
271
  }
272
272
  verifyCronAndCreateFallbacks(state) {
273
+ if (this.osCronManager.firesInProcess)
274
+ return this.scheduleInProcess(state);
273
275
  if ((!this.execForVerify && !this.verifyJobs) || state.jobs.length === 0)
274
276
  return state;
275
277
  let currentState = state;
@@ -335,6 +337,18 @@ class HabitScheduler {
335
337
  });
336
338
  return null;
337
339
  }
340
+ /** Nothing is registered with the OS, so every job runs on an in-process timer; that is not degraded. */
341
+ scheduleInProcess(state) {
342
+ for (const job of state.jobs) {
343
+ const cadence = state.habits.find((habit) => habit.name === job.taskId).cadence;
344
+ const ms = (0, cadence_1.cadenceFallbackDelayMs)(cadence, this.deps.now());
345
+ if (ms !== null)
346
+ this.createTimerFallback(job.taskId, cadence, ms);
347
+ else
348
+ this.degradedHabitNames.set(job.taskId, "cadence cannot be scheduled with an in-process timer");
349
+ }
350
+ return state;
351
+ }
338
352
  verifyCronEntries() {
339
353
  const verified = new Set();
340
354
  try {
@@ -48,6 +48,15 @@ const habit_lifecycle_1 = require("../habits/habit-lifecycle");
48
48
  const bundle_manifest_1 = require("../../mind/bundle-manifest");
49
49
  const record_paths_1 = require("../../mind/record-paths");
50
50
  const hatch_specialist_1 = require("./hatch-specialist");
51
+ async function createHatchlingVault(agentName, unlockSecret) {
52
+ const vault = (0, identity_1.resolveVaultConfig)(agentName);
53
+ const { createVaultAccount } = await Promise.resolve().then(() => __importStar(require("../../repertoire/vault-setup")));
54
+ const { storeVaultUnlockSecret } = await Promise.resolve().then(() => __importStar(require("../../repertoire/vault-unlock")));
55
+ const created = await createVaultAccount(agentName, vault.serverUrl, vault.email, unlockSecret);
56
+ if (!created.success)
57
+ throw new Error(`failed to create the vault for ${agentName}: ${created.error}`);
58
+ storeVaultUnlockSecret({ agentName, email: vault.email, serverUrl: vault.serverUrl }, unlockSecret);
59
+ }
51
60
  function requiredCredentialKeys(provider) {
52
61
  return identity_1.PROVIDER_CREDENTIALS[provider].required;
53
62
  }
@@ -185,6 +194,8 @@ async function runHatchFlow(input, deps = {}) {
185
194
  writeReadme(path.join(bundleRoot, "senses", "teams"), "Teams sense config.");
186
195
  writeHatchlingAgentConfig(bundleRoot, input);
187
196
  fs.writeFileSync(path.join(bundleRoot, "bundle-meta.json"), `${JSON.stringify((0, bundle_manifest_1.createBundleMeta)(), null, 2)}\n`, "utf-8");
197
+ if (input.vaultUnlockSecret)
198
+ await (deps.createVault ?? createHatchlingVault)(input.agentName, input.vaultUnlockSecret);
188
199
  const credentialPath = await storeHatchlingProviderCredentials(input.agentName, input.provider, input.credentials);
189
200
  writeRecordScaffold(bundleRoot);
190
201
  writeFriendImprint(bundleRoot, input.humanName, now);
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.1005",
3
+ "version": "0.1.0-alpha.1007",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@ouro.bot/cli",
9
- "version": "0.1.0-alpha.1005",
9
+ "version": "0.1.0-alpha.1007",
10
10
  "dependencies": {
11
11
  "@anthropic-ai/sdk": "^0.78.0",
12
12
  "@azure/identity": "^4.13.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.1005",
3
+ "version": "0.1.0-alpha.1007",
4
4
  "engines": {
5
5
  "node": ">=22"
6
6
  },