@ouro.bot/cli 0.1.0-alpha.61 → 0.1.0-alpha.63

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.63",
6
+ "changes": [
7
+ "ensureSkillManagement now iterates all discovered agent bundles instead of requiring a single-agent context. Fixes skill-management not being installed during ouro up."
8
+ ]
9
+ },
10
+ {
11
+ "version": "0.1.0-alpha.62",
12
+ "changes": [
13
+ "ensureSkillManagement now prints to stdout on install/failure instead of only emitting silent nerves events."
14
+ ]
15
+ },
4
16
  {
5
17
  "version": "0.1.0-alpha.61",
6
18
  "changes": [
@@ -1178,6 +1178,7 @@ async function performSystemSetup(deps) {
1178
1178
  if (deps.ensureSkillManagement) {
1179
1179
  try {
1180
1180
  await deps.ensureSkillManagement();
1181
+ /* v8 ignore start -- defensive: ensureSkillManagement handles its own errors internally @preserve */
1181
1182
  }
1182
1183
  catch (error) {
1183
1184
  (0, runtime_1.emitNervesEvent)({
@@ -1185,9 +1186,10 @@ async function performSystemSetup(deps) {
1185
1186
  component: "daemon",
1186
1187
  event: "daemon.system_setup_skill_management_error",
1187
1188
  message: "failed to ensure skill-management skill",
1188
- meta: { error: error instanceof Error ? error.message : /* v8 ignore next -- defensive: non-Error catch branch @preserve */ String(error) },
1189
+ meta: { error: error instanceof Error ? error.message : String(error) },
1189
1190
  });
1190
1191
  }
1192
+ /* v8 ignore stop */
1191
1193
  }
1192
1194
  // Register .ouro bundle type (UTI on macOS)
1193
1195
  await registerOuroBundleTypeNonBlocking(deps);
@@ -36,18 +36,31 @@ Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.ensureSkillManagement = ensureSkillManagement;
37
37
  const fs = __importStar(require("fs"));
38
38
  const path = __importStar(require("path"));
39
- const identity_1 = require("../identity");
40
39
  const runtime_1 = require("../../nerves/runtime");
40
+ const identity_1 = require("../identity");
41
41
  const SKILL_MANAGEMENT_URL = "https://raw.githubusercontent.com/ouroborosbot/ouroboros-skills/main/skills/skill-management/SKILL.md";
42
42
  async function ensureSkillManagement() {
43
- const skillsDir = path.join((0, identity_1.getAgentRoot)(), "skills");
44
- const targetPath = path.join(skillsDir, "skill-management.md");
45
- if (fs.existsSync(targetPath)) {
43
+ const bundlesRoot = (0, identity_1.getAgentBundlesRoot)();
44
+ if (!fs.existsSync(bundlesRoot))
46
45
  return;
47
- }
46
+ // Find all agent bundles
47
+ const entries = fs.readdirSync(bundlesRoot).filter(e => e.endsWith(".ouro"));
48
+ if (entries.length === 0)
49
+ return;
50
+ // Check if ANY bundle is missing the skill
51
+ const missing = entries.filter(e => {
52
+ const targetPath = path.join(bundlesRoot, e, "skills", "skill-management.md");
53
+ return !fs.existsSync(targetPath);
54
+ });
55
+ if (missing.length === 0)
56
+ return;
57
+ // eslint-disable-next-line no-console -- terminal UX: visible install status
58
+ console.log("installing skill-management from ouroboros-skills...");
48
59
  try {
49
60
  const response = await fetch(SKILL_MANAGEMENT_URL);
50
61
  if (!response.ok) {
62
+ // eslint-disable-next-line no-console -- terminal UX: visible install status
63
+ console.error(`✗ failed to fetch skill-management (HTTP ${response.status})`);
51
64
  (0, runtime_1.emitNervesEvent)({
52
65
  level: "warn",
53
66
  component: "daemon",
@@ -58,10 +71,18 @@ async function ensureSkillManagement() {
58
71
  return;
59
72
  }
60
73
  const content = await response.text();
61
- fs.mkdirSync(skillsDir, { recursive: true });
62
- fs.writeFileSync(targetPath, content, "utf-8");
74
+ for (const bundle of missing) {
75
+ const skillsDir = path.join(bundlesRoot, bundle, "skills");
76
+ const targetPath = path.join(skillsDir, "skill-management.md");
77
+ fs.mkdirSync(skillsDir, { recursive: true });
78
+ fs.writeFileSync(targetPath, content, "utf-8");
79
+ }
80
+ // eslint-disable-next-line no-console -- terminal UX: visible install status
81
+ console.log(`✓ installed skill-management (${missing.length} agent${missing.length > 1 ? "s" : ""})`);
63
82
  }
64
83
  catch (error) {
84
+ // eslint-disable-next-line no-console -- terminal UX: visible install status
85
+ console.error(`✗ failed to install skill-management: ${error instanceof Error ? error.message : String(error)}`);
65
86
  (0, runtime_1.emitNervesEvent)({
66
87
  level: "warn",
67
88
  component: "daemon",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.61",
3
+ "version": "0.1.0-alpha.63",
4
4
  "main": "dist/heart/daemon/ouro-entry.js",
5
5
  "bin": {
6
6
  "cli": "dist/heart/daemon/ouro-bot-entry.js",