@causyne/agent 1.20.65 → 1.20.68

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 (42) hide show
  1. package/package.json +1 -1
  2. package/src/agentLoop.js +23 -15
  3. package/src/agentLoop.ts +23 -15
  4. package/src/browser/causyneBrowser.js +1 -1
  5. package/src/browser/causyneBrowser.ts +1 -1
  6. package/src/cliMode.js +62 -8
  7. package/src/commands.js +46 -19
  8. package/src/contextManager.js +1 -1
  9. package/src/continuum/ui/continuumPicker.js +1 -1
  10. package/src/continuum/ui/continuumPicker.ts +1 -1
  11. package/src/embodimentSession.js +1 -1
  12. package/src/planCache.js +1 -1
  13. package/src/planCache.ts +1 -1
  14. package/src/promptMentions.js +7 -7
  15. package/src/promptMentions.ts +7 -7
  16. package/src/providers/dashscope-byok.js +1 -1
  17. package/src/providers/qwen-byok.js +1 -1
  18. package/src/skillsManager.d.ts +4 -1
  19. package/src/tokenTracker.js +1 -1
  20. package/src/tokenTracker.ts +1 -1
  21. package/src/tool-scripts/ax_snapshot.ps1 +10 -10
  22. package/src/tools/fsList.js +1 -1
  23. package/src/tools/memoryWrite.js +1 -1
  24. package/src/tools/memoryWrite.ts +1 -1
  25. package/src/tui/chatRenderer.js +3 -2
  26. package/src/tui/codeStreamRenderer.js +8 -5
  27. package/src/tui/codeStreamRenderer.ts +10 -5
  28. package/src/tui/lineEditor.js +14 -21
  29. package/src/tui/modelPicker.js +1 -1
  30. package/src/tui/modelPicker.ts +1 -1
  31. package/src/tui/prompt.js +38 -13
  32. package/src/tui/sessionPicker.js +1 -1
  33. package/src/tui/sessionPicker.ts +1 -1
  34. package/src/tui/sessionSidebar.js +13 -0
  35. package/src/tui/sessionSidebar.ts +15 -0
  36. package/src/tui/skillAuthoring.js +147 -0
  37. package/src/tui/skillAuthoring.ts +172 -0
  38. package/src/tui/stage.js +1 -1
  39. package/src/tui/stageSurface.js +8 -10
  40. package/src/tui/theme.js +3 -0
  41. package/src/vfeTracker.js +1 -1
  42. package/src/vfeTracker.ts +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@causyne/agent",
3
- "version": "1.20.65",
3
+ "version": "1.20.68",
4
4
  "description": "Agentic AI for software, tools, and computer workflows",
5
5
  "main": "bin/causyne.js",
6
6
  "type": "module",
package/src/agentLoop.js CHANGED
@@ -867,7 +867,7 @@ export class AgentLoop {
867
867
  try {
868
868
  const matches = await cortexDb.search(this.currentTaskPrompt, 2, { workspace: this.workspaceRoot });
869
869
  if (matches.length > 0 && matches[0]) {
870
- lessonsLearned = `\n\n🧠 DIGITAL BRAIN (LESSONS LEARNED FROM PAST MISTAKES):\n` + matches.map((m) => `- ${m.text}`).join('\n');
870
+ lessonsLearned = `\n\n◆ DIGITAL BRAIN (LESSONS LEARNED FROM PAST MISTAKES):\n` + matches.map((m) => `- ${m.text}`).join('\n');
871
871
  this._lessonSimilarity = matches[0].similarity || 0;
872
872
  this.debugLog(`cortex search hit: ${(this._lessonSimilarity * 100).toFixed(0)}% similarity`);
873
873
  }
@@ -891,7 +891,7 @@ export class AgentLoop {
891
891
  try {
892
892
  const recentPatterns = await cortexDb.getRecentCreativePatterns(5);
893
893
  if (recentPatterns.length > 0) {
894
- antiRepeatDirective = `\n\n🎨 CREATIVE DIVERSITY (DO NOT REPEAT RECENT PATTERNS):\n` +
894
+ antiRepeatDirective = `\n\n◆ CREATIVE DIVERSITY (DO NOT REPEAT RECENT PATTERNS):\n` +
895
895
  recentPatterns.map((p) => `- ${p}`).join('\n') +
896
896
  `\nChoose a DIFFERENT design approach, color palette, and font combination than the above.`;
897
897
  }
@@ -1168,7 +1168,8 @@ export class AgentLoop {
1168
1168
  const assessment = await coldObserver.evaluateMutation(tool, args, { workspaceRoot: this.workspaceRoot });
1169
1169
  if (assessment.veto)
1170
1170
  return false;
1171
- const needsApproval = uncertain || requiresToolApproval({
1171
+ const isModeC = (this.config.autonomyMode || 'C') === 'C';
1172
+ const needsApproval = (!isModeC && uncertain) || requiresToolApproval({
1172
1173
  mode: this.config.autonomyMode || 'C', tool, args,
1173
1174
  risk: assessment.requiresConfirmation ? 'dangerous' : validation.risk,
1174
1175
  heavyDownload: false, standingApproval: this.isAlwaysAllowed(tool)
@@ -2082,7 +2083,7 @@ You are operating in a text-and-code modality without direct image pixel renderi
2082
2083
  Array.isArray(ctx.keyFiles) && ctx.keyFiles.length > 0 && `Key files: ${ctx.keyFiles.slice(0, 25).join(', ')}`
2083
2084
  ].filter(Boolean);
2084
2085
  if (facts.length > 0) {
2085
- workspaceSummary = `\n\n📂 WORKSPACE CONTEXT (already scanned for you — do NOT waste steps rediscovering this):\n${facts.join('\n')}`;
2086
+ workspaceSummary = `\n\n◆ WORKSPACE CONTEXT (already scanned for you — do NOT waste steps rediscovering this):\n${facts.join('\n')}`;
2086
2087
  }
2087
2088
  }
2088
2089
  // --- PROMPT ASSEMBLY, ORDERED STABLE → VOLATILE ---
@@ -2188,7 +2189,7 @@ You are operating in a text-and-code modality without direct image pixel renderi
2188
2189
  // here never invalidates the cached prefix in [1]-[3].
2189
2190
  {
2190
2191
  role: 'system',
2191
- content: `${uncertaintyDirective ? uncertaintyDirective + '\n\n' : ''}${describeSession(this.taskId)}CURRENT AUTONOMY MODE: ${autonomyMode}\nALLOWED WORKSPACE PATHS: ${allowedPaths}\n(You MUST NOT write files outside these paths!)\n\n🧠 PERSISTENT MEMORY (FACTS LEARNED ABOUT THE USER):\n${memoryContext}`
2192
+ content: `${uncertaintyDirective ? uncertaintyDirective + '\n\n' : ''}${describeSession(this.taskId)}CURRENT AUTONOMY MODE: ${autonomyMode}\nALLOWED WORKSPACE PATHS: ${allowedPaths}\n(You MUST NOT write files outside these paths!)\n\n◆ PERSISTENT MEMORY (FACTS LEARNED ABOUT THE USER):\n${memoryContext}`
2192
2193
  }
2193
2194
  ];
2194
2195
  // Dev-only visibility into what fills each step's prompt. Set
@@ -3144,7 +3145,7 @@ You are operating in a text-and-code modality without direct image pixel renderi
3144
3145
  const needsDepth = this.config.enforceGameDepth === true && this.stepsCompleted < 50;
3145
3146
  if (needsDepth) {
3146
3147
  this.gameGuardFired = true;
3147
- this.emitEvent({ type: 'status', message: '⚡ Sovereign Game Guard: Checking production depth...' });
3148
+ this.emitEvent({ type: 'status', message: 'âœĻ Sovereign Game Guard: Checking production depth...' });
3148
3149
  const guardMsg = `[SOVEREIGN DEPTH NOTICE: You are building a Full Production Game with enforceGameDepth enabled. Current step count: ${this.stepsCompleted}. Expand the game with more levels, richer UI, complex enemy AI, or more assets before finishing. If the task is genuinely complete, state so and finish.]`;
3149
3150
  this.messages.push({ role: 'system', content: guardMsg });
3150
3151
  this.memoryManager.saveHistory(this.messages);
@@ -3188,7 +3189,7 @@ You are operating in a text-and-code modality without direct image pixel renderi
3188
3189
  event: 'anti_slop_notice', taskId: this.taskId,
3189
3190
  score: result.score, signals: result.findings.map((f) => f.id)
3190
3191
  });
3191
- this.emitEvent({ type: 'status', message: `⚡ Anti-Slop Audit: design scored ${result.score}` });
3192
+ this.emitEvent({ type: 'status', message: `âœĻ Anti-Slop Audit: design scored ${result.score}` });
3192
3193
  if (this.slopReviewAttempts >= 2 || auditHash === this.slopLastAuditHash) {
3193
3194
  this.emitEvent({ type: 'error', message: `Web design audit still found generic patterns (score ${result.score}); the result was not verified as complete.` });
3194
3195
  this.memoryManager.saveHistory(this.messages);
@@ -3267,7 +3268,7 @@ You are operating in a text-and-code modality without direct image pixel renderi
3267
3268
  // The verification tools live in the web pack; make sure they are
3268
3269
  // actually in context before demanding the agent use them.
3269
3270
  this.unlockPack('web');
3270
- this.emitEvent({ type: 'status', message: '⚡ Anti-Slop Check: Visual/semantic verification recommended.' });
3271
+ this.emitEvent({ type: 'status', message: 'âœĻ Anti-Slop Check: Visual/semantic verification recommended.' });
3271
3272
  this.messages.push({ role: 'system', content: webGuardMsg });
3272
3273
  this.memoryManager.saveHistory(this.messages);
3273
3274
  if (!this.webVerificationState.htmlInspected || browserReady || (hasVision && visionReady)) {
@@ -4074,7 +4075,7 @@ You are operating in a text-and-code modality without direct image pixel renderi
4074
4075
  this.webVerificationState.browserActUsed = false;
4075
4076
  this.emitEvent({
4076
4077
  type: 'status',
4077
- message: `âš ī¸ Browser runtime error(s) detected: ${allRuntimeErrors[0]}`
4078
+ message: `â–ŗ Browser runtime error(s) detected: ${allRuntimeErrors[0]}`
4078
4079
  });
4079
4080
  this.messages.push({
4080
4081
  role: 'system',
@@ -4134,8 +4135,15 @@ You are operating in a text-and-code modality without direct image pixel renderi
4134
4135
  const eventResult = result?._is_image_marker
4135
4136
  ? { success: result.success !== false && !result.error, output: result.output || `Image captured: ${result.filename || 'image'} (${result.mimeType || 'image/png'})` }
4136
4137
  : result;
4137
- this.emitEvent({ type: result?.success === false || typeof result?.error === 'string' ? 'step_error' : 'step_complete',
4138
- tool: functionName, result: eventResult, toolCallId: toolCall.id });
4138
+ const isErrorOutcome = result?.success === false || typeof result?.error === 'string';
4139
+ const errorMsg = eventResult?.error || (typeof result?.error === 'string' ? result.error : undefined);
4140
+ this.emitEvent({
4141
+ type: isErrorOutcome ? 'step_error' : 'step_complete',
4142
+ tool: functionName,
4143
+ ...(isErrorOutcome && errorMsg ? { error: errorMsg } : {}),
4144
+ result: eventResult,
4145
+ toolCallId: toolCall.id
4146
+ });
4139
4147
  this.stepsCompleted++;
4140
4148
  if (this._implementationPlanSeeded && result?.success !== false && !result?.error && functionName !== 'update_plan') {
4141
4149
  this.advanceImplementationPlanProgress('mutation');
@@ -4199,7 +4207,7 @@ You are operating in a text-and-code modality without direct image pixel renderi
4199
4207
  stepsCompleted: this.stepsCompleted,
4200
4208
  activeTier: this.activeTier,
4201
4209
  maxTierSteps: this.maxSteps,
4202
- message: `⚡ Circuit Breaker Checkpoint (100 steps reached). Approve to unlock and continue using your remaining ${this.activeTier.toUpperCase()} tier budget (up to ${this.maxSteps} steps total)?`
4210
+ message: `â–ŗ Circuit Breaker Checkpoint (100 steps reached). Approve to unlock and continue using your remaining ${this.activeTier.toUpperCase()} tier budget (up to ${this.maxSteps} steps total)?`
4203
4211
  },
4204
4212
  risk: 'info'
4205
4213
  });
@@ -4210,7 +4218,7 @@ You are operating in a text-and-code modality without direct image pixel renderi
4210
4218
  break;
4211
4219
  }
4212
4220
  this.circuitBreakerUnlocked = true;
4213
- this.emitEvent({ type: 'status', message: `⚡ Circuit breaker unlocked! Resuming execution up to ${this.maxSteps} tier budget...` });
4221
+ this.emitEvent({ type: 'status', message: `✓ Circuit breaker unlocked! Resuming execution up to ${this.maxSteps} tier budget...` });
4214
4222
  }
4215
4223
  }
4216
4224
  // Sovereign Tier Budget Extension Checkpoint Gate
@@ -4229,7 +4237,7 @@ You are operating in a text-and-code modality without direct image pixel renderi
4229
4237
  stepsCompleted: this.stepsCompleted,
4230
4238
  activeTier: this.activeTier,
4231
4239
  currentMaxSteps: this.maxSteps,
4232
- message: `⚡ Tier Limit Reached (${this.stepsCompleted} / ${this.maxSteps} steps). The agent needs more steps to fulfill your intent. Approve to unlock another +${extensionBatch} steps for your ${this.activeTier.toUpperCase()} tier?`
4240
+ message: `â–ŗ Tier Limit Reached (${this.stepsCompleted} / ${this.maxSteps} steps). The agent needs more steps to fulfill your intent. Approve to unlock another +${extensionBatch} steps for your ${this.activeTier.toUpperCase()} tier?`
4233
4241
  },
4234
4242
  risk: 'info'
4235
4243
  });
@@ -4241,7 +4249,7 @@ You are operating in a text-and-code modality without direct image pixel renderi
4241
4249
  }
4242
4250
  this.maxSteps += extensionBatch;
4243
4251
  this.maxCircuitBreaker = this.maxSteps;
4244
- this.emitEvent({ type: 'status', message: `⚡ Tier budget extended (+${extensionBatch} steps unlocked, new limit: ${this.maxSteps}). Resuming task...` });
4252
+ this.emitEvent({ type: 'status', message: `✓ Tier budget extended (+${extensionBatch} steps unlocked, new limit: ${this.maxSteps}). Resuming task...` });
4245
4253
  }
4246
4254
  }
4247
4255
  // SmartToolsUse tracks actual local tool calls, without denying
package/src/agentLoop.ts CHANGED
@@ -979,7 +979,7 @@ export class AgentLoop {
979
979
  try {
980
980
  const matches = await cortexDb.search(this.currentTaskPrompt, 2, { workspace: this.workspaceRoot });
981
981
  if (matches.length > 0 && matches[0]) {
982
- lessonsLearned = `\n\n🧠 DIGITAL BRAIN (LESSONS LEARNED FROM PAST MISTAKES):\n` + matches.map((m: any) => `- ${m.text}`).join('\n');
982
+ lessonsLearned = `\n\n◆ DIGITAL BRAIN (LESSONS LEARNED FROM PAST MISTAKES):\n` + matches.map((m: any) => `- ${m.text}`).join('\n');
983
983
  this._lessonSimilarity = matches[0].similarity || 0;
984
984
  this.debugLog(`cortex search hit: ${(this._lessonSimilarity * 100).toFixed(0)}% similarity`);
985
985
  }
@@ -1003,7 +1003,7 @@ export class AgentLoop {
1003
1003
  try {
1004
1004
  const recentPatterns = await cortexDb.getRecentCreativePatterns(5);
1005
1005
  if (recentPatterns.length > 0) {
1006
- antiRepeatDirective = `\n\n🎨 CREATIVE DIVERSITY (DO NOT REPEAT RECENT PATTERNS):\n` +
1006
+ antiRepeatDirective = `\n\n◆ CREATIVE DIVERSITY (DO NOT REPEAT RECENT PATTERNS):\n` +
1007
1007
  recentPatterns.map((p: any) => `- ${p}`).join('\n') +
1008
1008
  `\nChoose a DIFFERENT design approach, color palette, and font combination than the above.`;
1009
1009
  }
@@ -1267,7 +1267,8 @@ export class AgentLoop {
1267
1267
  if (hook?.denied) return false;
1268
1268
  const assessment = await coldObserver.evaluateMutation(tool, args, { workspaceRoot: this.workspaceRoot });
1269
1269
  if (assessment.veto) return false;
1270
- const needsApproval = uncertain || requiresToolApproval({
1270
+ const isModeC = (this.config.autonomyMode || 'C') === 'C';
1271
+ const needsApproval = (!isModeC && uncertain) || requiresToolApproval({
1271
1272
  mode: this.config.autonomyMode || 'C', tool, args,
1272
1273
  risk: assessment.requiresConfirmation ? 'dangerous' : validation.risk,
1273
1274
  heavyDownload: false, standingApproval: this.isAlwaysAllowed(tool)
@@ -2180,7 +2181,7 @@ You are operating in a text-and-code modality without direct image pixel renderi
2180
2181
  Array.isArray(ctx.keyFiles) && ctx.keyFiles.length > 0 && `Key files: ${ctx.keyFiles.slice(0, 25).join(', ')}`
2181
2182
  ].filter(Boolean);
2182
2183
  if (facts.length > 0) {
2183
- workspaceSummary = `\n\n📂 WORKSPACE CONTEXT (already scanned for you — do NOT waste steps rediscovering this):\n${facts.join('\n')}`;
2184
+ workspaceSummary = `\n\n◆ WORKSPACE CONTEXT (already scanned for you — do NOT waste steps rediscovering this):\n${facts.join('\n')}`;
2184
2185
  }
2185
2186
  }
2186
2187
 
@@ -2294,7 +2295,7 @@ You are operating in a text-and-code modality without direct image pixel renderi
2294
2295
  // here never invalidates the cached prefix in [1]-[3].
2295
2296
  {
2296
2297
  role: 'system',
2297
- content: `${uncertaintyDirective ? uncertaintyDirective + '\n\n' : ''}${describeSession(this.taskId)}CURRENT AUTONOMY MODE: ${autonomyMode}\nALLOWED WORKSPACE PATHS: ${allowedPaths}\n(You MUST NOT write files outside these paths!)\n\n🧠 PERSISTENT MEMORY (FACTS LEARNED ABOUT THE USER):\n${memoryContext}`
2298
+ content: `${uncertaintyDirective ? uncertaintyDirective + '\n\n' : ''}${describeSession(this.taskId)}CURRENT AUTONOMY MODE: ${autonomyMode}\nALLOWED WORKSPACE PATHS: ${allowedPaths}\n(You MUST NOT write files outside these paths!)\n\n◆ PERSISTENT MEMORY (FACTS LEARNED ABOUT THE USER):\n${memoryContext}`
2298
2299
  }
2299
2300
  ];
2300
2301
 
@@ -3304,7 +3305,7 @@ You are operating in a text-and-code modality without direct image pixel renderi
3304
3305
 
3305
3306
  if (needsDepth) {
3306
3307
  this.gameGuardFired = true;
3307
- this.emitEvent({ type: 'status', message: '⚡ Sovereign Game Guard: Checking production depth...' });
3308
+ this.emitEvent({ type: 'status', message: 'âœĻ Sovereign Game Guard: Checking production depth...' });
3308
3309
 
3309
3310
  const guardMsg = `[SOVEREIGN DEPTH NOTICE: You are building a Full Production Game with enforceGameDepth enabled. Current step count: ${this.stepsCompleted}. Expand the game with more levels, richer UI, complex enemy AI, or more assets before finishing. If the task is genuinely complete, state so and finish.]`;
3310
3311
 
@@ -3351,7 +3352,7 @@ You are operating in a text-and-code modality without direct image pixel renderi
3351
3352
  event: 'anti_slop_notice', taskId: this.taskId,
3352
3353
  score: result.score, signals: result.findings.map((f: any) => f.id)
3353
3354
  });
3354
- this.emitEvent({ type: 'status', message: `⚡ Anti-Slop Audit: design scored ${result.score}` });
3355
+ this.emitEvent({ type: 'status', message: `âœĻ Anti-Slop Audit: design scored ${result.score}` });
3355
3356
  if (this.slopReviewAttempts >= 2 || auditHash === this.slopLastAuditHash) {
3356
3357
  this.emitEvent({ type: 'error', message: `Web design audit still found generic patterns (score ${result.score}); the result was not verified as complete.` });
3357
3358
  this.memoryManager.saveHistory(this.messages);
@@ -3429,7 +3430,7 @@ You are operating in a text-and-code modality without direct image pixel renderi
3429
3430
  // The verification tools live in the web pack; make sure they are
3430
3431
  // actually in context before demanding the agent use them.
3431
3432
  this.unlockPack('web');
3432
- this.emitEvent({ type: 'status', message: '⚡ Anti-Slop Check: Visual/semantic verification recommended.' });
3433
+ this.emitEvent({ type: 'status', message: 'âœĻ Anti-Slop Check: Visual/semantic verification recommended.' });
3433
3434
  this.messages.push({ role: 'system', content: webGuardMsg });
3434
3435
  this.memoryManager.saveHistory(this.messages);
3435
3436
  if (!this.webVerificationState.htmlInspected || browserReady || (hasVision && visionReady)) {
@@ -4297,7 +4298,7 @@ You are operating in a text-and-code modality without direct image pixel renderi
4297
4298
  this.webVerificationState.browserActUsed = false;
4298
4299
  this.emitEvent({
4299
4300
  type: 'status',
4300
- message: `âš ī¸ Browser runtime error(s) detected: ${allRuntimeErrors[0]}`
4301
+ message: `â–ŗ Browser runtime error(s) detected: ${allRuntimeErrors[0]}`
4301
4302
  });
4302
4303
  this.messages.push({
4303
4304
  role: 'system',
@@ -4361,8 +4362,15 @@ You are operating in a text-and-code modality without direct image pixel renderi
4361
4362
  const eventResult = result?._is_image_marker
4362
4363
  ? { success: result.success !== false && !result.error, output: result.output || `Image captured: ${result.filename || 'image'} (${result.mimeType || 'image/png'})` }
4363
4364
  : result;
4364
- this.emitEvent({ type: result?.success === false || typeof result?.error === 'string' ? 'step_error' : 'step_complete',
4365
- tool: functionName, result: eventResult, toolCallId: toolCall.id });
4365
+ const isErrorOutcome = result?.success === false || typeof result?.error === 'string';
4366
+ const errorMsg = eventResult?.error || (typeof result?.error === 'string' ? result.error : undefined);
4367
+ this.emitEvent({
4368
+ type: isErrorOutcome ? 'step_error' : 'step_complete',
4369
+ tool: functionName,
4370
+ ...(isErrorOutcome && errorMsg ? { error: errorMsg } : {}),
4371
+ result: eventResult,
4372
+ toolCallId: toolCall.id
4373
+ });
4366
4374
  this.stepsCompleted++;
4367
4375
  if (this._implementationPlanSeeded && result?.success !== false && !result?.error && functionName !== 'update_plan') {
4368
4376
  this.advanceImplementationPlanProgress('mutation');
@@ -4433,7 +4441,7 @@ You are operating in a text-and-code modality without direct image pixel renderi
4433
4441
  stepsCompleted: this.stepsCompleted,
4434
4442
  activeTier: this.activeTier,
4435
4443
  maxTierSteps: this.maxSteps,
4436
- message: `⚡ Circuit Breaker Checkpoint (100 steps reached). Approve to unlock and continue using your remaining ${this.activeTier.toUpperCase()} tier budget (up to ${this.maxSteps} steps total)?`
4444
+ message: `â–ŗ Circuit Breaker Checkpoint (100 steps reached). Approve to unlock and continue using your remaining ${this.activeTier.toUpperCase()} tier budget (up to ${this.maxSteps} steps total)?`
4437
4445
  },
4438
4446
  risk: 'info'
4439
4447
  });
@@ -4445,7 +4453,7 @@ You are operating in a text-and-code modality without direct image pixel renderi
4445
4453
  break;
4446
4454
  }
4447
4455
  this.circuitBreakerUnlocked = true;
4448
- this.emitEvent({ type: 'status', message: `⚡ Circuit breaker unlocked! Resuming execution up to ${this.maxSteps} tier budget...` });
4456
+ this.emitEvent({ type: 'status', message: `✓ Circuit breaker unlocked! Resuming execution up to ${this.maxSteps} tier budget...` });
4449
4457
  }
4450
4458
  }
4451
4459
 
@@ -4464,7 +4472,7 @@ You are operating in a text-and-code modality without direct image pixel renderi
4464
4472
  stepsCompleted: this.stepsCompleted,
4465
4473
  activeTier: this.activeTier,
4466
4474
  currentMaxSteps: this.maxSteps,
4467
- message: `⚡ Tier Limit Reached (${this.stepsCompleted} / ${this.maxSteps} steps). The agent needs more steps to fulfill your intent. Approve to unlock another +${extensionBatch} steps for your ${this.activeTier.toUpperCase()} tier?`
4475
+ message: `â–ŗ Tier Limit Reached (${this.stepsCompleted} / ${this.maxSteps} steps). The agent needs more steps to fulfill your intent. Approve to unlock another +${extensionBatch} steps for your ${this.activeTier.toUpperCase()} tier?`
4468
4476
  },
4469
4477
  risk: 'info'
4470
4478
  });
@@ -4477,7 +4485,7 @@ You are operating in a text-and-code modality without direct image pixel renderi
4477
4485
  }
4478
4486
  this.maxSteps += extensionBatch;
4479
4487
  this.maxCircuitBreaker = this.maxSteps;
4480
- this.emitEvent({ type: 'status', message: `⚡ Tier budget extended (+${extensionBatch} steps unlocked, new limit: ${this.maxSteps}). Resuming task...` });
4488
+ this.emitEvent({ type: 'status', message: `✓ Tier budget extended (+${extensionBatch} steps unlocked, new limit: ${this.maxSteps}). Resuming task...` });
4481
4489
  }
4482
4490
  }
4483
4491
 
@@ -10,7 +10,7 @@ import { windowSnapshot } from './snapshotWindow.js';
10
10
  const NAVIGATION_TIMEOUT_MS = 30_000;
11
11
  const ACTION_TIMEOUT_MS = 12_000;
12
12
  const IFRAME_SNAPSHOT_TIMEOUT_MS = 3_000;
13
- const IDLE_CLOSE_MS = 30 * 60_000;
13
+ const IDLE_CLOSE_MS = 120 * 60_000;
14
14
  const MAX_SEARCH_RESULTS = 10;
15
15
  const MAX_EXTRACT_CHARS = 80_000;
16
16
  const MAX_DOWNLOAD_BYTES = 250 * 1024 * 1024;
@@ -16,7 +16,7 @@ import { windowSnapshot, type SnapshotWindow } from './snapshotWindow.js';
16
16
  const NAVIGATION_TIMEOUT_MS = 30_000;
17
17
  const ACTION_TIMEOUT_MS = 12_000;
18
18
  const IFRAME_SNAPSHOT_TIMEOUT_MS = 3_000;
19
- const IDLE_CLOSE_MS = 30 * 60_000;
19
+ const IDLE_CLOSE_MS = 120 * 60_000;
20
20
  const MAX_SEARCH_RESULTS = 10;
21
21
  const MAX_EXTRACT_CHARS = 80_000;
22
22
  const MAX_DOWNLOAD_BYTES = 250 * 1024 * 1024;
package/src/cliMode.js CHANGED
@@ -472,12 +472,66 @@ export async function chatMode({ home = false } = {}) {
472
472
 
473
473
  // surfaces, and the text form remains the fallback rather than a
474
474
  // second implementation that can disagree.
475
+ if (commandResult.effect === 'clear-skill') {
476
+ loop.activeSkill = null;
477
+ if (surface) surface.setSessionInfo({ activeSkill: null });
478
+ if (prompt) {
479
+ prompt.notice = 'Active skill cleared';
480
+ if (typeof prompt.draw === 'function') prompt.draw();
481
+ }
482
+ conn.renderer.write('\n' + paint('muted', ' Active skill cleared.') + '\n');
483
+ continue;
484
+ }
485
+
486
+ if (commandResult.effect === 'create-skill' && prompt) {
487
+ const { runInteractiveSkillWizard } = await import('./tui/skillAuthoring.js');
488
+ const created = await runInteractiveSkillWizard(prompt);
489
+ if (created) {
490
+ loop.activeSkill = created;
491
+ if (surface) surface.setSessionInfo({ activeSkill: loop.activeSkill });
492
+ prompt.notice = `âœĻ Skill created & activated: ${created.domain}/${created.id}`;
493
+ conn.renderer.write('\n' + paint('success', ` Created and activated skill: ${bold(created.domain + '/' + created.id)}`) + '\n');
494
+ if (created.path) conn.renderer.write(dim(` Stored at: ${created.path}\n`));
495
+ if (typeof prompt.draw === 'function') prompt.draw();
496
+ }
497
+ continue;
498
+ }
499
+
475
500
  if (commandResult.effect === 'pick-skill' && prompt) {
476
- // Picking a skill puts it on the input line rather than running it
477
- // straight away, so the user can add what they want done with it. That
478
- // is the difference between a launcher and a document viewer.
479
- prompt.browseSkills(commandResult.items, (skill) => {
480
- prompt.setText(`/skills ${skill.domain}/${skill.id} `);
501
+ prompt.browseSkills(commandResult.items, async (skill) => {
502
+ if (!skill) return;
503
+ if (skill.isCreateAction || (skill.domain === 'custom' && skill.id === 'create')) {
504
+ const { runInteractiveSkillWizard } = await import('./tui/skillAuthoring.js');
505
+ const created = await runInteractiveSkillWizard(prompt);
506
+ if (created) {
507
+ loop.activeSkill = created;
508
+ if (surface) surface.setSessionInfo({ activeSkill: loop.activeSkill });
509
+ prompt.notice = `âœĻ Skill created & activated: ${created.domain}/${created.id}`;
510
+ conn.renderer.write('\n' + paint('success', ` Created and activated skill: ${bold(created.domain + '/' + created.id)}`) + '\n');
511
+ if (created.path) conn.renderer.write(dim(` Stored at: ${created.path}\n`));
512
+ if (typeof prompt.draw === 'function') prompt.draw();
513
+ }
514
+ return;
515
+ }
516
+
517
+ const { readCompiledSkill } = await import('./skillsManager.js');
518
+ const content = readCompiledSkill(skill.domain, skill.id);
519
+ loop.activeSkill = {
520
+ id: `${skill.domain}/${skill.id}`,
521
+ name: skill.name || skill.id,
522
+ domain: skill.domain,
523
+ description: skill.description || '',
524
+ content: typeof content === 'string' ? content : ''
525
+ };
526
+ if (surface) surface.setSessionInfo({ activeSkill: loop.activeSkill });
527
+ prompt.notice = `âœĻ Skill active: ${skill.domain}/${skill.id}`;
528
+ conn.renderer.write('\n' + paint('success', ` âœĻ Activated skill: ${bold(skill.domain + '/' + skill.id)}`) + '\n');
529
+ if (skill.description) {
530
+ conn.renderer.write(dim(` ${skill.description}\n`));
531
+ }
532
+ conn.renderer.write(dim(` Type instructions for this skill, or press Enter to apply to workspace.\n`));
533
+ prompt.setText('');
534
+ if (typeof prompt.draw === 'function') prompt.draw();
481
535
  });
482
536
  continue;
483
537
  }
@@ -526,6 +580,7 @@ export async function chatMode({ home = false } = {}) {
526
580
  // a working method the agent follows rather than a document it shows you.
527
581
  if (commandResult.effect === 'invoke-skill') {
528
582
  loop.activeSkill = commandResult.skill;
583
+ if (surface) surface.setSessionInfo({ activeSkill: loop.activeSkill });
529
584
  conn.renderer.skillInvoked(commandResult.skill.id, commandResult.instruction);
530
585
  task = commandResult.instruction
531
586
  || `Apply the ${commandResult.skill.id} skill to the current workspace.`;
@@ -589,9 +644,8 @@ export async function chatMode({ home = false } = {}) {
589
644
  if (prompt) prompt.setBusy(false);
590
645
  }
591
646
  conn.stopSpinner();
592
- // One turn, one skill: an invocation must not silently steer every later
593
- // message in the session.
594
- loop.activeSkill = null;
647
+ // Active skill remains persistent across turns until explicitly cleared via /skill clear or another skill is selected.
648
+ if (surface) surface.setSessionInfo({ activeSkill: loop.activeSkill });
595
649
  conn.renderer.turnFooter(Date.now() - startedAt);
596
650
  }
597
651
 
package/src/commands.js CHANGED
@@ -191,7 +191,15 @@ export const COMMANDS = [
191
191
  + 'A skill name is one word: lowercase letters, digits and hyphens.');
192
192
  }
193
193
 
194
- if (!action || action === 'mine') {
194
+ if (action === 'clear' || action === 'off' || action === 'reset') {
195
+ return { ok: true, effect: 'clear-skill', output: 'Active skill cleared.' };
196
+ }
197
+
198
+ if (!action || (action === 'new' && !target) || action === 'create') {
199
+ return { ok: true, effect: 'create-skill' };
200
+ }
201
+
202
+ if (action === 'mine' || action === 'list') {
195
203
  const own = mine();
196
204
  const problems = userSkillProblems();
197
205
  const lines = [`Your own skills (${own.length})`, ''];
@@ -286,7 +294,11 @@ export const COMMANDS = [
286
294
  label: domain,
287
295
  description: `${skills.filter((s) => s.domain === domain).length} skills`
288
296
  }));
289
- return domains.concat(skills.map((skill) => ({
297
+ const base = [
298
+ { value: 'clear', label: 'clear', description: 'clear the currently active skill' },
299
+ ...domains
300
+ ];
301
+ return base.concat(skills.map((skill) => ({
290
302
  value: `${skill.domain}/${skill.id}`,
291
303
  // Rank against the skill id as well as the full path, so typing the
292
304
  // skill name alone finds it without knowing which domain it lives in.
@@ -298,6 +310,10 @@ export const COMMANDS = [
298
310
  run: (argv) => {
299
311
  const [target] = argv;
300
312
 
313
+ if (target === 'clear' || target === 'off' || target === 'reset') {
314
+ return { ok: true, effect: 'clear-skill', output: 'Active skill cleared.' };
315
+ }
316
+
301
317
  if (!target) {
302
318
  const catalogue = listCompiledSkills();
303
319
  if (catalogue.length === 0) return ok('No skills are compiled into this build.');
@@ -322,7 +338,18 @@ export const COMMANDS = [
322
338
  summary.push(`${catalogue.length} skills across ${byDomain.size} domains.`);
323
339
  summary.push('Read one with /skills <domain>/<skill>.');
324
340
 
325
- return { ok: true, output: summary.join('\n'), effect: 'pick-skill', items: catalogue };
341
+ const pickerItems = [
342
+ {
343
+ domain: 'custom',
344
+ id: 'create',
345
+ name: '+ Create new skill...',
346
+ description: 'Author a new custom procedure with interactive wizard',
347
+ isCreateAction: true
348
+ },
349
+ ...catalogue
350
+ ];
351
+
352
+ return { ok: true, output: summary.join('\n'), effect: 'pick-skill', items: pickerItems };
326
353
  }
327
354
 
328
355
  if (target.includes('/')) {
@@ -1302,7 +1329,7 @@ export const COMMANDS = [
1302
1329
  lines.push('ACP PEER AGENTS (Local Coding Agents & CLI Engines)');
1303
1330
  lines.push('────────────────────────────────────────────────────────────');
1304
1331
  for (const peer of overview.acp) {
1305
- const icon = peer.installed ? '✅' : '❌';
1332
+ const icon = peer.installed ? '✓' : '✕';
1306
1333
  const status = peer.installed ? (peer.isCurrent ? 'READY (Active)' : 'READY') : 'NOT INSTALLED';
1307
1334
  lines.push(` ${icon} ${peer.label.padEnd(24)} — ${status}`);
1308
1335
  }
@@ -1356,7 +1383,7 @@ export const COMMANDS = [
1356
1383
  lines.push('ACP PEER AGENTS (Local Agents & CLI Engines)');
1357
1384
  lines.push('============================================================');
1358
1385
  for (const peer of overview.acp) {
1359
- const icon = peer.installed ? '✅' : '❌';
1386
+ const icon = peer.installed ? '✓' : '✕';
1360
1387
  const status = peer.installed ? (peer.isCurrent ? 'READY (Active)' : 'READY') : 'NOT INSTALLED';
1361
1388
  lines.push(` ${icon} ${peer.label} — ${status}`);
1362
1389
  lines.push(` Command: ${peer.command}`);
@@ -1413,7 +1440,7 @@ export const COMMANDS = [
1413
1440
  const latencyMs = Math.round(performance.now() - t0);
1414
1441
 
1415
1442
  const outputLines = [
1416
- `✅ API Call Test Succeeded: "${targetProvider}" / "${providerInstance.model || targetModel || 'default'}"`,
1443
+ `✓ API Call Test Succeeded: "${targetProvider}" / "${providerInstance.model || targetModel || 'default'}"`,
1417
1444
  '',
1418
1445
  ` â€ĸ Round-trip Latency : ${latencyMs} ms`,
1419
1446
  ` â€ĸ Response Content : ${JSON.stringify(response.content || '').slice(0, 80)}`,
@@ -1424,7 +1451,7 @@ export const COMMANDS = [
1424
1451
  return ok(outputLines.join('\n'));
1425
1452
  } catch (err) {
1426
1453
  return fail(
1427
- `❌ API Call Test Failed for "${targetProvider}" / "${targetModel || config.model || 'default'}":\n\n`
1454
+ `✕ API Call Test Failed for "${targetProvider}" / "${targetModel || config.model || 'default'}":\n\n`
1428
1455
  + ` Error: ${err.message || err}\n\n`
1429
1456
  + `Checks:\n`
1430
1457
  + ` - Verify the API key in /setup.\n`
@@ -1714,7 +1741,7 @@ export const COMMANDS = [
1714
1741
  const detected = await detectAllPeers();
1715
1742
  const lines = ['Discovered ACP Peer Agents', ''];
1716
1743
  for (const item of detected) {
1717
- const statusIcon = item.status === 'ready' ? '✅' : (item.status === 'needs_auth' ? 'âš ī¸ ' : '❌');
1744
+ const statusIcon = item.status === 'ready' ? '✓' : (item.status === 'needs_auth' ? 'â–ŗ ' : '✕');
1718
1745
  lines.push(` ${statusIcon} ${item.id} (${item.label}) — ${item.status.toUpperCase()}`);
1719
1746
  lines.push(` Command: ${item.command} ${item.args.join(' ')}`);
1720
1747
  if (item.details) lines.push(` Details: ${item.details}`);
@@ -1732,7 +1759,7 @@ export const COMMANDS = [
1732
1759
  const { resolveAgyBinary } = await import('./providers/antigravity.js');
1733
1760
  const bin = resolveAgyBinary();
1734
1761
  return ok(
1735
- `✅ Agent Peer Test Passed: "antigravity"\n\n`
1762
+ `✓ Agent Peer Test Passed: "antigravity"\n\n`
1736
1763
  + `Agent: Google Antigravity (AGY)\n`
1737
1764
  + `Command: ${bin} --output-format json\n`
1738
1765
  + `Policy: local-cli\n`
@@ -1753,7 +1780,7 @@ export const COMMANDS = [
1753
1780
  if (handshake.ready) {
1754
1781
  const name = handshake.agentInfo ? `${handshake.agentInfo.name} ${handshake.agentInfo.version}` : profile.label;
1755
1782
  return ok(
1756
- `✅ ACP Peer Test Passed: "${peerId}"\n\n`
1783
+ `✓ ACP Peer Test Passed: "${peerId}"\n\n`
1757
1784
  + `Agent: ${name}\n`
1758
1785
  + `Command: ${profile.command} ${profile.args.join(' ')}\n`
1759
1786
  + `Policy: ${profile.policy}\n`
@@ -1762,7 +1789,7 @@ export const COMMANDS = [
1762
1789
  );
1763
1790
  } else {
1764
1791
  return fail(
1765
- `❌ ACP Peer Test Failed: "${peerId}"\n\n`
1792
+ `✕ ACP Peer Test Failed: "${peerId}"\n\n`
1766
1793
  + `Error: ${handshake.error || 'Handshake failed'}\n`
1767
1794
  + `Command: ${profile.command} ${profile.args.join(' ')}`
1768
1795
  );
@@ -2257,8 +2284,8 @@ export const COMMANDS = [
2257
2284
 
2258
2285
  const nodeVer = process.version;
2259
2286
  const nodeOk = parseInt(nodeVer.slice(1).split('.')[0], 10) >= 24;
2260
- lines.push(` ${nodeOk ? '✅' : 'âš ī¸'} Node.js version : ${nodeVer} ${nodeOk ? '(supported)' : '(Node >= 24 required)'}`);
2261
- lines.push(` â„šī¸ Platform : ${process.platform} (${process.arch})`);
2287
+ lines.push(` ${nodeOk ? '✓' : 'â–ŗ'} Node.js version : ${nodeVer} ${nodeOk ? '(supported)' : '(Node >= 24 required)'}`);
2288
+ lines.push(` â€ĸ Platform : ${process.platform} (${process.arch})`);
2262
2289
 
2263
2290
  const ws = ctx.loop?.workspaceRoot || process.cwd();
2264
2291
  let isGit = false;
@@ -2266,19 +2293,19 @@ export const COMMANDS = [
2266
2293
  execSync('git rev-parse --is-inside-work-tree', { cwd: ws, stdio: 'pipe' });
2267
2294
  isGit = true;
2268
2295
  } catch {}
2269
- lines.push(` ✅ Workspace root : ${ws}`);
2270
- lines.push(` ${isGit ? '✅' : 'â„šī¸'} Git repository : ${isGit ? 'active' : 'not a git repo'}`);
2296
+ lines.push(` ✓ Workspace root : ${ws}`);
2297
+ lines.push(` ${isGit ? '✓' : 'â€ĸ'} Git repository : ${isGit ? 'active' : 'not a git repo'}`);
2271
2298
 
2272
2299
  const provider = config.provider || 'not configured';
2273
2300
  const model = config.model || 'default';
2274
- lines.push(` â„šī¸ Provider / Model : ${provider} / ${model}`);
2301
+ lines.push(` â€ĸ Provider / Model : ${provider} / ${model}`);
2275
2302
 
2276
2303
  const servers = serverStatus();
2277
2304
  const grantedCount = servers.filter(s => s.granted).length;
2278
- lines.push(` â„šī¸ MCP Servers : ${servers.length} configured (${grantedCount} granted)`);
2305
+ lines.push(` â€ĸ MCP Servers : ${servers.length} configured (${grantedCount} granted)`);
2279
2306
 
2280
2307
  const peers = listAllPeers();
2281
- lines.push(` â„šī¸ ACP Peers : ${peers.length} available`);
2308
+ lines.push(` â€ĸ ACP Peers : ${peers.length} available`);
2282
2309
 
2283
2310
  lines.push('');
2284
2311
  lines.push('All diagnostic invariants passed. Run /peers detect or /model list for component details.');
@@ -2311,7 +2338,7 @@ export const COMMANDS = [
2311
2338
  const body = session.messages
2312
2339
  .filter(m => m.role !== 'system')
2313
2340
  .map(m => {
2314
- const roleLabel = m.role === 'user' ? '### 👤 User' : '### 🤖 Causyne Agent';
2341
+ const roleLabel = m.role === 'user' ? '### User' : '### Causyne Agent';
2315
2342
  return `${roleLabel}\n\n${typeof m.content === 'string' ? m.content : JSON.stringify(m.content, null, 2)}\n`;
2316
2343
  })
2317
2344
  .join('\n---\n\n');
@@ -495,7 +495,7 @@ export function snipOversizedToolOutputs(messages, options = {}) {
495
495
  const tail = msg.content.slice(-tailChars);
496
496
  const pointer = msg.spillPath ? ` Full output preserved at: ${msg.spillPath}.` : '';
497
497
 
498
- msg.content = `${head}\n\n[... âœ‚ī¸ SNIPPED ${removed.toLocaleString()} CHARS (${Math.round(removed / CHARS_PER_TOKEN).toLocaleString()} TOKENS) TO PREVENT CONTEXT OVERFLOW.${pointer} Use targeted file reads to inspect specific sections ...] \n\n${tail}`;
498
+ msg.content = `${head}\n\n[... SNIPPED ${removed.toLocaleString()} CHARS (${Math.round(removed / CHARS_PER_TOKEN).toLocaleString()} TOKENS) TO PREVENT CONTEXT OVERFLOW.${pointer} Use targeted file reads to inspect specific sections ...] \n\n${tail}`;
499
499
 
500
500
  snippedCount++;
501
501
  reclaimedChars += (len - msg.content.length);
@@ -110,7 +110,7 @@ export async function openContinuumPreview(sessionId, prompt, scanner) {
110
110
  ''
111
111
  ];
112
112
  for (const msg of detail.messages) {
113
- const rolePrefix = msg.role === 'user' ? '👤 USER' : '🤖 ASSISTANT';
113
+ const rolePrefix = msg.role === 'user' ? 'USER' : 'ASSISTANT';
114
114
  lines.push(`${rolePrefix}:`);
115
115
  for (const textLine of msg.content.split('\n')) {
116
116
  lines.push(` ${textLine}`);
@@ -143,7 +143,7 @@ export async function openContinuumPreview(
143
143
  ];
144
144
 
145
145
  for (const msg of detail.messages) {
146
- const rolePrefix = msg.role === 'user' ? '👤 USER' : '🤖 ASSISTANT';
146
+ const rolePrefix = msg.role === 'user' ? 'USER' : 'ASSISTANT';
147
147
  lines.push(`${rolePrefix}:`);
148
148
  for (const textLine of msg.content.split('\n')) {
149
149
  lines.push(` ${textLine}`);
@@ -145,7 +145,7 @@ export function describeSession(taskId) {
145
145
  parts.push('You do NOT know whether they landed — the screen may have changed while you were gone.');
146
146
  }
147
147
  parts.push('Call ax_snapshot before acting again, and compare what you see to what you expected.');
148
- return `\n\nđŸ–Ĩī¸ EMBODIMENT SESSION\n${parts.join(' ')}`;
148
+ return `\n\n◆ EMBODIMENT SESSION\n${parts.join(' ')}`;
149
149
  }
150
150
 
151
151
  /** Drop a task's session, e.g. when the task completes. */
package/src/planCache.js CHANGED
@@ -877,7 +877,7 @@ export function renderPlanHint(match) {
877
877
  .filter(({ step }) => !step.ok);
878
878
  if (failureWarnings.length > 0) {
879
879
  lines.push('');
880
- lines.push('âš ī¸ FAILURE ROUTE WARNINGS (learned from previous attempts — plan alternatives):');
880
+ lines.push('â–ŗ FAILURE ROUTE WARNINGS (learned from previous attempts — plan alternatives):');
881
881
  failureWarnings.forEach(({ step, idx }) => {
882
882
  lines.push(`- Step ${idx} (${step.tool}${step.note ? ' → ' + step.note : ''}) FAILED with reason: ${step.why || 'failed'}. Consider an alternative approach.`);
883
883
  });
package/src/planCache.ts CHANGED
@@ -1026,7 +1026,7 @@ export function renderPlanHint(match: PlanMatch | null | undefined): string {
1026
1026
 
1027
1027
  if (failureWarnings.length > 0) {
1028
1028
  lines.push('');
1029
- lines.push('âš ī¸ FAILURE ROUTE WARNINGS (learned from previous attempts — plan alternatives):');
1029
+ lines.push('â–ŗ FAILURE ROUTE WARNINGS (learned from previous attempts — plan alternatives):');
1030
1030
  failureWarnings.forEach(({ step, idx }) => {
1031
1031
  lines.push(`- Step ${idx} (${step.tool}${step.note ? ' → ' + step.note : ''}) FAILED with reason: ${step.why || 'failed'}. Consider an alternative approach.`);
1032
1032
  });