@kal-elsam/kairo-runtime 0.4.0 → 0.4.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kal-elsam/kairo-runtime",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
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.0");
28
+ assert.equal(pkg.version, "0.4.2");
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 || 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],
@@ -126,9 +127,9 @@ export function resolveProjectReadiness({
126
127
 
127
128
  /**
128
129
  * Contextual next step from existing diagnostics + dashboard snapshot.
129
- * Priority: configure review when blocked → launch when launchable →
130
- * enable intelligence → review.
131
- * Launchable agents win over missing optional intelligence.
130
+ * Priority: configure without state → launch when launchable → configure when
131
+ * nothing detected → review when blocked → enable intelligence → review.
132
+ * Launchable agents win over missing optional intelligence and empty detected counts.
132
133
  */
133
134
  export function resolveDashboardRecommendation({
134
135
  hasGlobalState = false,
@@ -140,6 +141,17 @@ export function resolveDashboardRecommendation({
140
141
  const launchableCount = countLaunchableAgents(dashboard);
141
142
  const blocked = hasBlockingDiagnostics(diagnostics);
142
143
 
144
+ if (launchableCount > 0) {
145
+ return {
146
+ kind: NEXT_STEP_KINDS.LAUNCH,
147
+ title: "Create a new run",
148
+ message: "Create a new run",
149
+ detail: "Delegate a task to Cursor, Codex or Claude.",
150
+ targetView: RECOMMENDATION_TARGETS.LAUNCH,
151
+ targetAction: "launch"
152
+ };
153
+ }
154
+
143
155
  if (!hasGlobalState || (summary.detected ?? 0) === 0) {
144
156
  return {
145
157
  kind: NEXT_STEP_KINDS.CONFIGURE,
@@ -151,7 +163,7 @@ export function resolveDashboardRecommendation({
151
163
  };
152
164
  }
153
165
 
154
- if (blocked && launchableCount === 0) {
166
+ if (blocked) {
155
167
  return {
156
168
  kind: NEXT_STEP_KINDS.REVIEW,
157
169
  title: "Review system health",
@@ -162,17 +174,6 @@ export function resolveDashboardRecommendation({
162
174
  };
163
175
  }
164
176
 
165
- if (launchableCount > 0) {
166
- return {
167
- kind: NEXT_STEP_KINDS.LAUNCH,
168
- title: "Create a new run",
169
- message: "Create a new run",
170
- detail: "Delegate a task to Cursor, Codex or Claude.",
171
- targetView: RECOMMENDATION_TARGETS.LAUNCH,
172
- targetAction: "launch"
173
- };
174
- }
175
-
176
177
  if (!intelligence?.localAvailable && !intelligence?.cloudAuthenticated) {
177
178
  return {
178
179
  kind: NEXT_STEP_KINDS.ENABLE_INTELLIGENCE,