neural-loom 0.2.65 → 0.2.67

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.
Files changed (66) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +3 -3
  3. package/.next/cache/.previewinfo +1 -1
  4. package/.next/cache/.rscinfo +1 -1
  5. package/.next/cache/.tsbuildinfo +1 -1
  6. package/.next/fallback-build-manifest.json +3 -3
  7. package/.next/prerender-manifest.json +3 -3
  8. package/.next/server/app/_global-error.html +1 -1
  9. package/.next/server/app/_global-error.rsc +1 -1
  10. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  11. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  12. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  13. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  14. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  15. package/.next/server/app/_not-found.html +1 -1
  16. package/.next/server/app/_not-found.rsc +1 -1
  17. package/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  18. package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  19. package/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  20. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  21. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  22. package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  23. package/.next/server/app/api/configs/route.js.nft.json +1 -1
  24. package/.next/server/app/api/context/aider/route.js.nft.json +1 -1
  25. package/.next/server/app/api/context/claude/route.js.nft.json +1 -1
  26. package/.next/server/app/api/context/route.js.nft.json +1 -1
  27. package/.next/server/app/api/context/ssh/route.js.nft.json +1 -1
  28. package/.next/server/app/api/recents/route.js.nft.json +1 -1
  29. package/.next/server/app/api/sessions/inject/route.js.nft.json +1 -1
  30. package/.next/server/app/api/sessions/input/route.js.nft.json +1 -1
  31. package/.next/server/app/api/sessions/launch/route.js.nft.json +1 -1
  32. package/.next/server/app/api/sessions/route.js.nft.json +1 -1
  33. package/.next/server/app/api/sessions/scope/route.js.nft.json +1 -1
  34. package/.next/server/app/api/sessions/start/route.js.nft.json +1 -1
  35. package/.next/server/app/api/sessions/stats/route.js.nft.json +1 -1
  36. package/.next/server/app/api/sessions/stop/route.js.nft.json +1 -1
  37. package/.next/server/app/api/sessions/upload-image/route.js.nft.json +1 -1
  38. package/.next/server/app/api/sql/connections/route.js.nft.json +1 -1
  39. package/.next/server/app/api/sql/mcp/route.js.nft.json +1 -1
  40. package/.next/server/app/api/sql/query/route.js.nft.json +1 -1
  41. package/.next/server/app/api/sql/schema/route.js.nft.json +1 -1
  42. package/.next/server/app/api/telemetry/route.js.nft.json +1 -1
  43. package/.next/server/app/index.html +1 -1
  44. package/.next/server/app/index.rsc +1 -1
  45. package/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  46. package/.next/server/app/index.segments/_full.segment.rsc +1 -1
  47. package/.next/server/app/index.segments/_head.segment.rsc +1 -1
  48. package/.next/server/app/index.segments/_index.segment.rsc +1 -1
  49. package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  50. package/.next/server/chunks/[root-of-the-server]__0li1h1u._.js +2 -2
  51. package/.next/server/chunks/[root-of-the-server]__0li1h1u._.js.map +1 -1
  52. package/.next/server/chunks/[root-of-the-server]__0tq0maq._.js +1 -1
  53. package/.next/server/chunks/[root-of-the-server]__0tq0maq._.js.map +1 -1
  54. package/.next/server/middleware-build-manifest.js +3 -3
  55. package/.next/server/pages/404.html +1 -1
  56. package/.next/server/pages/500.html +1 -1
  57. package/.next/server/server-reference-manifest.js +1 -1
  58. package/.next/server/server-reference-manifest.json +1 -1
  59. package/.next/trace +1 -1
  60. package/.next/trace-build +1 -1
  61. package/package.json +1 -1
  62. package/src/lib/agents/AgentRunner.ts +16 -11
  63. package/src/lib/agents/MockRunner.ts +34 -1
  64. /package/.next/static/{zUCsAnPxQ6s8RKYlEvQVH → oWEeFdgDSIDLRom42Fn3s}/_buildManifest.js +0 -0
  65. /package/.next/static/{zUCsAnPxQ6s8RKYlEvQVH → oWEeFdgDSIDLRom42Fn3s}/_clientMiddlewareManifest.js +0 -0
  66. /package/.next/static/{zUCsAnPxQ6s8RKYlEvQVH → oWEeFdgDSIDLRom42Fn3s}/_ssgManifest.js +0 -0
@@ -42,6 +42,7 @@ export abstract class AgentRunner {
42
42
  agentState: 'idle' | 'thinking' | 'complete' | 'needs-input' = 'idle';
43
43
  protected hasAnalyzedInitialState = false;
44
44
  private stateTimer: NodeJS.Timeout | null = null;
45
+ private idleTimer: NodeJS.Timeout | null = null;
45
46
  private lastLoggedUsage = { input: 0, output: 0, cost: 0 };
46
47
 
47
48
  public resetInitialStateAnalysis(): void {
@@ -207,7 +208,9 @@ export abstract class AgentRunner {
207
208
  return;
208
209
  }
209
210
 
210
- if (newData.trim().length > 0) {
211
+ const isTelemetry = /\[Telemetry\]/i.test(newData);
212
+
213
+ if (newData.trim().length > 0 && !isTelemetry) {
211
214
  this.agentState = 'thinking';
212
215
  }
213
216
 
@@ -226,12 +229,11 @@ export abstract class AgentRunner {
226
229
  return;
227
230
  }
228
231
 
229
- const tailLines = this.logs.slice(-5).join("");
232
+ // Filter out telemetry lines to prevent shifting the prompt/question out of the logs tail
233
+ const nonTelemetryLogs = this.logs.filter(line => !/\[Telemetry\]/i.test(line));
234
+ const tailLines = nonTelemetryLogs.slice(-5).join("");
230
235
  const cleanTail = tailLines.replace(/\x1b\[[0-9;]*[a-zA-Z]/g, "").trim();
231
236
 
232
- const isQuestion =
233
- /(\[y\/n\]|\(y\/n\)|\?|confirm|allow|should I|would you|press enter|proceed)/i.test(cleanTail);
234
-
235
237
  const isPrompt =
236
238
  cleanTail.endsWith(">") ||
237
239
  cleanTail.endsWith("> ") ||
@@ -239,19 +241,22 @@ export abstract class AgentRunner {
239
241
  cleanTail.endsWith("$") ||
240
242
  cleanTail.endsWith("$ ");
241
243
 
242
- if (isQuestion) {
243
- this.agentState = 'needs-input';
244
- } else if (isPrompt) {
245
- if (this.agentState === 'thinking') {
244
+ const isQuestion =
245
+ /(\[y\/n\]|\(y\/n\)|\?|confirm|allow|should I|would you|press enter|proceed)/i.test(cleanTail);
246
+
247
+ if (isPrompt) {
248
+ if (this.agentState === 'thinking' || this.agentState === 'needs-input') {
246
249
  this.agentState = 'complete';
247
250
 
248
- if (this.stateTimer) clearTimeout(this.stateTimer);
249
- this.stateTimer = setTimeout(() => {
251
+ if (this.idleTimer) clearTimeout(this.idleTimer);
252
+ this.idleTimer = setTimeout(() => {
250
253
  if (this.agentState === 'complete') {
251
254
  this.agentState = 'idle';
252
255
  }
253
256
  }, 5000);
254
257
  }
258
+ } else if (isQuestion) {
259
+ this.agentState = 'needs-input';
255
260
  }
256
261
  }
257
262
  }
@@ -10,12 +10,14 @@ export class MockRunner extends AgentRunner {
10
10
  logs: string[] = [];
11
11
 
12
12
  private intervalId: NodeJS.Timeout | null = null;
13
+ private awaitingConfirmation = false;
13
14
  private mockSteps = [
14
15
  "[NeuralLoom] Loading virtual PTY context...",
15
16
  "[NeuralLoom] Spawning sandbox mock runtime environment...",
16
17
  "[Mock Agent] Model online (v2.0-mock-flash). Dedicated memory allocated.",
17
18
  "[Mock Agent] System rules parsed successfully from global context registry.",
18
- "[Mock Agent] Awaiting developer commands. Type '/help' to list mock skills."
19
+ "[Mock Agent] Awaiting developer commands. Type '/help' to list mock skills.",
20
+ "mock-agent> "
19
21
  ];
20
22
  private stepIndex = 0;
21
23
 
@@ -85,28 +87,59 @@ export class MockRunner extends AgentRunner {
85
87
  // Simulated parser responses
86
88
  setTimeout(() => {
87
89
  const cleanInput = text.trim().toLowerCase();
90
+
91
+ if (this.awaitingConfirmation) {
92
+ if (cleanInput === 'y' || cleanInput === 'yes') {
93
+ this.appendLog("[Mock Agent] Proceeding with production deployment...");
94
+ setTimeout(() => {
95
+ this.appendLog("[Mock Agent] Deploying build artifacts to edge network...");
96
+ this.appendLog("[Mock Agent] Deployment complete. Site live!");
97
+ this.appendLog("mock-agent> ");
98
+ }, 1000);
99
+ } else if (cleanInput === 'n' || cleanInput === 'no') {
100
+ this.appendLog("[Mock Agent] Deployment aborted.");
101
+ this.appendLog("mock-agent> ");
102
+ } else {
103
+ this.appendLog("[Mock Agent] Invalid input. Please confirm with y/n:");
104
+ return; // Remain in confirmation state
105
+ }
106
+ this.awaitingConfirmation = false;
107
+ return;
108
+ }
109
+
88
110
  if (cleanInput === '/help') {
89
111
  this.appendLog("[Mock Agent] Available commands:");
90
112
  this.appendLog(" /help - List available mock commands.");
91
113
  this.appendLog(" /status - Fetch current agent diagnostic metrics.");
92
114
  this.appendLog(" /context - View loaded staging files.");
115
+ this.appendLog(" /deploy - Trigger production deployment wizard (requires confirmation).");
93
116
  this.appendLog(" /clear - Flush terminal console buffer.");
117
+ this.appendLog("mock-agent> ");
94
118
  } else if (cleanInput === '/status') {
95
119
  this.appendLog("[Mock Agent] Diagnostics:");
96
120
  this.appendLog(" - Connection Type: WebSocket gateway (mock)");
97
121
  this.appendLog(` - Active Runtime: ${this.id}`);
98
122
  this.appendLog(" - Sandbox State: Healthy (0 warnings)");
123
+ this.appendLog("mock-agent> ");
99
124
  } else if (cleanInput === '/context') {
100
125
  this.appendLog("[Mock Agent] Loaded Workspace Context Files:");
101
126
  this.appendLog(" - [Mounted] src/app/globals.css (Modified)");
102
127
  this.appendLog(" - [Mounted] src/app/page.tsx");
128
+ this.appendLog("mock-agent> ");
129
+ } else if (cleanInput === '/deploy') {
130
+ this.appendLog("[Mock Agent] Starting production deployment...");
131
+ this.appendLog("[Mock Agent] Warning: This will push current local build to server.");
132
+ this.appendLog("[Mock Agent] Are you sure you want to proceed? (y/n)");
133
+ this.awaitingConfirmation = true;
103
134
  } else if (cleanInput === '/clear') {
104
135
  this.logs = [];
105
136
  this.appendLog("\x1b[1;33m[Console Cleared]\x1b[0m");
137
+ this.appendLog("mock-agent> ");
106
138
  } else {
107
139
  this.appendLog(`[Mock Agent] Received command: "${text}". Processing...`);
108
140
  setTimeout(() => {
109
141
  this.appendLog(`[Mock Agent] Done. Task simulated successfully.`);
142
+ this.appendLog("mock-agent> ");
110
143
  }, 1500);
111
144
  }
112
145
  }, 400);