@kal-elsam/kairo-runtime 0.4.1 → 0.4.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kal-elsam/kairo-runtime",
3
- "version": "0.4.1",
3
+ "version": "0.4.3",
4
4
  "description": "Kairo Runtime — local agent operating system for Codex, Cursor, Claude, Gemini, Copilot, Engram, and Graphify.",
5
5
  "type": "module",
6
6
  "homepage": "https://github.com/Kal-elSam/harness#readme",
@@ -25,7 +25,7 @@ const root = join(dirname(fileURLToPath(import.meta.url)), "..");
25
25
  const require = createRequire(import.meta.url);
26
26
  const pkg = require(join(root, "package.json"));
27
27
 
28
- assert.equal(pkg.version, "0.4.1");
28
+ assert.equal(pkg.version, "0.4.3");
29
29
  assert.ok(pkg.dependencies["ansi-escapes"]);
30
30
 
31
31
  assert.equal(resolveLayoutMode({ columns: 120, rows: 40 }), LAYOUT_MODES.WIDE);
@@ -71,7 +71,8 @@ export function resolveProjectReadiness({
71
71
  const intelConfigured = hasIntelligenceConfigured(diagnostics);
72
72
  const summaryLine = `${agentsReady} agents ready · ${detected} detected · ${activeRuns} active runs`;
73
73
 
74
- if (!hasGlobalState || (launchableCount === 0 && detected === 0)) {
74
+ // Launchable agents win over missing global state or empty detected inventory.
75
+ if (launchableCount === 0 && (!hasGlobalState || detected === 0)) {
75
76
  return {
76
77
  kind: READINESS_KINDS.NEEDS_SETUP,
77
78
  label: READINESS_LABELS[READINESS_KINDS.NEEDS_SETUP],
@@ -140,17 +141,6 @@ export function resolveDashboardRecommendation({
140
141
  const launchableCount = countLaunchableAgents(dashboard);
141
142
  const blocked = hasBlockingDiagnostics(diagnostics);
142
143
 
143
- if (!hasGlobalState) {
144
- return {
145
- kind: NEXT_STEP_KINDS.CONFIGURE,
146
- title: "Finish local setup",
147
- message: `Configure the local environment with ${formatCliCommand("setup")}.`,
148
- detail: "Open System health to review what Kairo detected.",
149
- targetView: RECOMMENDATION_TARGETS.DIAGNOSTICS,
150
- targetAction: null
151
- };
152
- }
153
-
154
144
  if (launchableCount > 0) {
155
145
  return {
156
146
  kind: NEXT_STEP_KINDS.LAUNCH,
@@ -162,7 +152,7 @@ export function resolveDashboardRecommendation({
162
152
  };
163
153
  }
164
154
 
165
- if ((summary.detected ?? 0) === 0) {
155
+ if (!hasGlobalState || (summary.detected ?? 0) === 0) {
166
156
  return {
167
157
  kind: NEXT_STEP_KINDS.CONFIGURE,
168
158
  title: "Finish local setup",
@@ -173,7 +163,7 @@ export function resolveDashboardRecommendation({
173
163
  };
174
164
  }
175
165
 
176
- if (blocked && launchableCount === 0) {
166
+ if (blocked) {
177
167
  return {
178
168
  kind: NEXT_STEP_KINDS.REVIEW,
179
169
  title: "Review system health",
@@ -193,6 +193,21 @@ export function formatDiagnosticsLines(diagnostics) {
193
193
  return formatSystemHealthLines(diagnostics);
194
194
  }
195
195
 
196
+ /**
197
+ * Format active profile source labels from the real `{ global, project }` contract.
198
+ * Paths are omitted; only source kind labels are shown.
199
+ */
200
+ export function formatProfileSourcesLabel(sources) {
201
+ if (!sources || typeof sources !== "object" || Array.isArray(sources)) {
202
+ return "none";
203
+ }
204
+
205
+ const labels = [];
206
+ if (sources.global) labels.push("global");
207
+ if (sources.project) labels.push("project");
208
+ return labels.length > 0 ? labels.join(", ") : "none";
209
+ }
210
+
196
211
  export function formatSystemHealthLines(diagnostics) {
197
212
  const summary = diagnostics?.diagnostics;
198
213
  const intelligence = diagnostics?.intelligence?.summary;
@@ -225,7 +240,7 @@ export function formatSystemHealthLines(diagnostics) {
225
240
  "",
226
241
  "Configuration",
227
242
  `CLI version: ${diagnostics?.cliVersion ?? "unknown"}`,
228
- `Profile sources: ${(profile?.sources ?? []).join(", ") || "none"}`
243
+ `Profile sources: ${formatProfileSourcesLabel(profile?.sources)}`
229
244
  ];
230
245
 
231
246
  const recommendations = diagnostics?.recommendations ?? [];