@causyne/agent 1.20.65 → 1.20.69
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 +1 -1
- package/src/agentLoop.js +49 -26
- package/src/agentLoop.ts +49 -26
- package/src/browser/causyneBrowser.js +1 -1
- package/src/browser/causyneBrowser.ts +1 -1
- package/src/cliMode.js +68 -11
- package/src/commands.js +46 -19
- package/src/contextManager.js +1 -1
- package/src/continuum/ui/continuumPicker.js +1 -1
- package/src/continuum/ui/continuumPicker.ts +1 -1
- package/src/embodimentSession.js +1 -1
- package/src/planCache.js +1 -1
- package/src/planCache.ts +1 -1
- package/src/promptMentions.js +7 -7
- package/src/promptMentions.ts +7 -7
- package/src/providers/antigravity.js +52 -12
- package/src/providers/antigravity.ts +47 -16
- package/src/providers/dashscope-byok.js +1 -1
- package/src/providers/qwen-byok.js +1 -1
- package/src/skillsManager.d.ts +4 -1
- package/src/tokenTracker.js +1 -1
- package/src/tokenTracker.ts +1 -1
- package/src/tool-scripts/ax_snapshot.ps1 +10 -10
- package/src/tools/fsList.js +1 -1
- package/src/tools/memoryWrite.js +1 -1
- package/src/tools/memoryWrite.ts +1 -1
- package/src/tui/chatRenderer.js +3 -2
- package/src/tui/codeStreamRenderer.js +8 -5
- package/src/tui/codeStreamRenderer.ts +10 -5
- package/src/tui/consoleGuard.js +15 -0
- package/src/tui/consoleGuard.ts +15 -0
- package/src/tui/lineEditor.js +14 -21
- package/src/tui/modelPicker.js +1 -1
- package/src/tui/modelPicker.ts +1 -1
- package/src/tui/prompt.js +41 -13
- package/src/tui/sessionPicker.js +1 -1
- package/src/tui/sessionPicker.ts +1 -1
- package/src/tui/sessionSidebar.js +13 -0
- package/src/tui/sessionSidebar.ts +15 -0
- package/src/tui/skillAuthoring.js +147 -0
- package/src/tui/skillAuthoring.ts +172 -0
- package/src/tui/stage.js +4 -2
- package/src/tui/stageSurface.js +43 -11
- package/src/tui/text.js +25 -2
- package/src/tui/text.ts +24 -2
- package/src/tui/theme.js +3 -0
- package/src/vfeTracker.js +1 -1
- package/src/vfeTracker.ts +1 -1
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
// @ts-expect-error userSkills.js is awaiting TypeScript migration.
|
|
2
|
+
import { writeUserSkill, validateSegment, skillTemplate } from '../userSkills.js';
|
|
3
|
+
import { invalidateUserSkills } from '../skillsManager.js';
|
|
4
|
+
// @ts-expect-error theme.js has no TypeScript declaration yet.
|
|
5
|
+
import { paint, bold, dim } from './theme.js';
|
|
6
|
+
// @ts-expect-error dialogs.js is awaiting TypeScript migration.
|
|
7
|
+
import { InputLayer, SelectLayer } from './dialogs.js';
|
|
8
|
+
// @ts-expect-error prompt.js is awaiting TypeScript migration.
|
|
9
|
+
import type { ChatPrompt } from './prompt.js';
|
|
10
|
+
|
|
11
|
+
export interface CreatedUserSkill {
|
|
12
|
+
domain: string;
|
|
13
|
+
id: string;
|
|
14
|
+
name: string;
|
|
15
|
+
description: string;
|
|
16
|
+
content: string;
|
|
17
|
+
path?: string;
|
|
18
|
+
source: 'user';
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
interface CommonDomainChoice {
|
|
22
|
+
value: string;
|
|
23
|
+
label: string;
|
|
24
|
+
description: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const COMMON_DOMAINS: CommonDomainChoice[] = [
|
|
28
|
+
{ value: 'custom', label: 'custom', description: 'General project & personal workflow skills' },
|
|
29
|
+
{ value: 'engineering', label: 'engineering', description: 'Software architecture, refactoring & review' },
|
|
30
|
+
{ value: 'frontend', label: 'frontend', description: 'Web UI, CSS, React, components & layout' },
|
|
31
|
+
{ value: 'backend', label: 'backend', description: 'APIs, databases, server infrastructure' },
|
|
32
|
+
{ value: 'devops', label: 'devops', description: 'CI/CD, Docker, deployment & releases' },
|
|
33
|
+
{ value: 'testing', label: 'testing', description: 'Unit, integration & regression tests' },
|
|
34
|
+
{ value: 'mobile', label: 'mobile', description: 'Android, iOS, Flutter, React Native' },
|
|
35
|
+
{ value: '__other__', label: '+ Enter custom category...', description: 'Specify any category name' }
|
|
36
|
+
];
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Interactive wizard hosted on ChatPrompt to scaffold and create a new skill.
|
|
40
|
+
*/
|
|
41
|
+
export async function runInteractiveSkillWizard(prompt: ChatPrompt): Promise<CreatedUserSkill | null> {
|
|
42
|
+
// Step 1: Select or enter domain/category
|
|
43
|
+
const chosenDomain = await new Promise<string | null>((resolve) => {
|
|
44
|
+
let resolved = false;
|
|
45
|
+
const finish = (val: string | null): void => {
|
|
46
|
+
if (!resolved) {
|
|
47
|
+
resolved = true;
|
|
48
|
+
resolve(val);
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
const layer = new SelectLayer({
|
|
52
|
+
title: 'create skill · category',
|
|
53
|
+
placeholder: 'choose or type category',
|
|
54
|
+
items: COMMON_DOMAINS,
|
|
55
|
+
width: 72,
|
|
56
|
+
height: 14,
|
|
57
|
+
onPick: (item: { value?: string } | null) => {
|
|
58
|
+
finish(item?.value || null);
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
prompt.openLayer(layer);
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
if (!chosenDomain) return null;
|
|
65
|
+
|
|
66
|
+
let domain = chosenDomain;
|
|
67
|
+
if (domain === '__other__') {
|
|
68
|
+
const customDomain = await new Promise<string | null>((resolve) => {
|
|
69
|
+
let resolved = false;
|
|
70
|
+
const finish = (val: string | null): void => {
|
|
71
|
+
if (!resolved) {
|
|
72
|
+
resolved = true;
|
|
73
|
+
resolve(val);
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
const layer = new InputLayer({
|
|
77
|
+
title: 'create skill · category name',
|
|
78
|
+
lines: ['Category / domain name (e.g. data, analytics, cloud, tools):'],
|
|
79
|
+
placeholder: 'category-name',
|
|
80
|
+
onSubmit: (val: string) => finish(val.trim().toLowerCase()),
|
|
81
|
+
onCancel: () => finish(null)
|
|
82
|
+
});
|
|
83
|
+
prompt.openLayer(layer);
|
|
84
|
+
});
|
|
85
|
+
if (!customDomain) return null;
|
|
86
|
+
const err = validateSegment(customDomain, 'category');
|
|
87
|
+
if (err) {
|
|
88
|
+
if (typeof prompt.showText === 'function') {
|
|
89
|
+
prompt.showText('Invalid Category', err, { danger: true });
|
|
90
|
+
}
|
|
91
|
+
return null;
|
|
92
|
+
}
|
|
93
|
+
domain = customDomain;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// Step 2: Skill name
|
|
97
|
+
const skillName = await new Promise<string | null>((resolve) => {
|
|
98
|
+
let resolved = false;
|
|
99
|
+
const finish = (val: string | null): void => {
|
|
100
|
+
if (!resolved) {
|
|
101
|
+
resolved = true;
|
|
102
|
+
resolve(val);
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
const layer = new InputLayer({
|
|
106
|
+
title: 'create skill · name',
|
|
107
|
+
lines: [
|
|
108
|
+
`Category: ${paint('accent', domain)}`,
|
|
109
|
+
'Skill name (lowercase letters, numbers, hyphens — e.g. play-store-release, pr-review):'
|
|
110
|
+
],
|
|
111
|
+
placeholder: 'my-new-skill',
|
|
112
|
+
onSubmit: (val: string) => finish(val.trim().toLowerCase()),
|
|
113
|
+
onCancel: () => finish(null)
|
|
114
|
+
});
|
|
115
|
+
prompt.openLayer(layer);
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
if (!skillName) return null;
|
|
119
|
+
const nameErr = validateSegment(skillName, 'skill name');
|
|
120
|
+
if (nameErr) {
|
|
121
|
+
if (typeof prompt.showText === 'function') {
|
|
122
|
+
prompt.showText('Invalid Skill Name', nameErr, { danger: true });
|
|
123
|
+
}
|
|
124
|
+
return null;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// Step 3: Skill description
|
|
128
|
+
const skillDesc = await new Promise<string | null>((resolve) => {
|
|
129
|
+
let resolved = false;
|
|
130
|
+
const finish = (val: string | null): void => {
|
|
131
|
+
if (!resolved) {
|
|
132
|
+
resolved = true;
|
|
133
|
+
resolve(val);
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
const layer = new InputLayer({
|
|
137
|
+
title: 'create skill · description',
|
|
138
|
+
lines: [
|
|
139
|
+
`Skill: ${paint('accent', `${domain}/${skillName}`)}`,
|
|
140
|
+
'Short description: what this skill does and when the agent should use it:'
|
|
141
|
+
],
|
|
142
|
+
placeholder: 'e.g. Prepares and validates Android app bundles for Google Play Store release.',
|
|
143
|
+
onSubmit: (val: string) => finish(val.trim()),
|
|
144
|
+
onCancel: () => finish(null)
|
|
145
|
+
});
|
|
146
|
+
prompt.openLayer(layer);
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
if (!skillDesc) return null;
|
|
150
|
+
|
|
151
|
+
// Step 4: Write skill file
|
|
152
|
+
const content = skillTemplate(domain, skillName, skillDesc);
|
|
153
|
+
const written = writeUserSkill({ domain, name: skillName, content, overwrite: false });
|
|
154
|
+
if (!written.ok) {
|
|
155
|
+
if (typeof prompt.showText === 'function') {
|
|
156
|
+
prompt.showText('Skill Creation Failed', written.error || 'Failed to write skill file', { danger: true });
|
|
157
|
+
}
|
|
158
|
+
return null;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
invalidateUserSkills();
|
|
162
|
+
|
|
163
|
+
return {
|
|
164
|
+
domain,
|
|
165
|
+
id: skillName,
|
|
166
|
+
name: skillName,
|
|
167
|
+
description: skillDesc,
|
|
168
|
+
content,
|
|
169
|
+
path: written.path,
|
|
170
|
+
source: 'user'
|
|
171
|
+
};
|
|
172
|
+
}
|
package/src/tui/stage.js
CHANGED
|
@@ -44,6 +44,8 @@ export const MIN_STAGE_ROWS = 16;
|
|
|
44
44
|
// which is what stops a scroll from tearing.
|
|
45
45
|
const SYNC_ON = '\x1b[?2026h';
|
|
46
46
|
const SYNC_OFF = '\x1b[?2026l';
|
|
47
|
+
const NOWRAP_ON = '\x1b[?7l';
|
|
48
|
+
const NOWRAP_OFF = '\x1b[?7h';
|
|
47
49
|
const HIDE_CURSOR = '\x1b[?25l';
|
|
48
50
|
const SHOW_CURSOR = '\x1b[?25h';
|
|
49
51
|
const ERASE_LINE = '\x1b[K';
|
|
@@ -238,7 +240,7 @@ export class Stage {
|
|
|
238
240
|
// the same bet and calls it out as its main anti-flicker mechanism.
|
|
239
241
|
if (changed.length === 0 && !caretMoved) return 0;
|
|
240
242
|
|
|
241
|
-
this.write(SYNC_ON + HIDE_CURSOR);
|
|
243
|
+
this.write(SYNC_ON + HIDE_CURSOR + NOWRAP_ON);
|
|
242
244
|
for (const i of changed) {
|
|
243
245
|
this.moveTo(i);
|
|
244
246
|
this.write('\r' + next[i] + ERASE_LINE);
|
|
@@ -246,7 +248,7 @@ export class Stage {
|
|
|
246
248
|
this.moveTo(target.row);
|
|
247
249
|
this.write('\r');
|
|
248
250
|
if (target.col > 0) this.write(`\x1b[${target.col}C`);
|
|
249
|
-
this.write((target.hideCursor ? HIDE_CURSOR : SHOW_CURSOR
|
|
251
|
+
this.write(NOWRAP_OFF + (target.hideCursor ? HIDE_CURSOR : SHOW_CURSOR + '\x1b[6 q') + SYNC_OFF);
|
|
250
252
|
|
|
251
253
|
this.prev = next;
|
|
252
254
|
this.caret = target;
|
package/src/tui/stageSurface.js
CHANGED
|
@@ -35,6 +35,7 @@ import { placeHome, placeDialog } from './homeView.js';
|
|
|
35
35
|
import { sidebarVisible, sessionMainWidth, sessionComposerWidth, sessionSidebarRows, joinSessionSidebar } from './sessionSidebar.js';
|
|
36
36
|
import { sessionStageHeight, alignTranscriptRows } from './sessionLayout.js';
|
|
37
37
|
import { hasSessionTurns, collectSessionTurns, buildTurnRailCells, renderTurnPreviewCard, overlayTurnPreviewCard, resolveActiveTurnIndex } from './turnRail.js';
|
|
38
|
+
import { registerStageConsoleGuard, setStageConsoleGuardActive } from './consoleGuard.js';
|
|
38
39
|
|
|
39
40
|
// Rows of evicted transcript held for the exit log. Eviction only happens after
|
|
40
41
|
// MAX_FRAMES, so this is a bound on a pathological session, not a working limit.
|
|
@@ -193,6 +194,9 @@ export class StageSurface {
|
|
|
193
194
|
this.lastPromptRows = [];
|
|
194
195
|
this.lastPromptCaret = null;
|
|
195
196
|
this.messageActionOverlay = null;
|
|
197
|
+
this.unregisterConsoleGuard = null;
|
|
198
|
+
this.wasModal = false;
|
|
199
|
+
this.lastBlockLength = 0;
|
|
196
200
|
}
|
|
197
201
|
|
|
198
202
|
get width() {
|
|
@@ -250,6 +254,9 @@ export class StageSurface {
|
|
|
250
254
|
// the user had typed anything, and 73 of the 77 claimed rows were empty.
|
|
251
255
|
// present() grows it to fit what there actually is.
|
|
252
256
|
if (!this.stage.reserve(1)) return false;
|
|
257
|
+
this.unregisterConsoleGuard?.();
|
|
258
|
+
this.unregisterConsoleGuard = registerStageConsoleGuard(this);
|
|
259
|
+
if (this.out === process.stdout) setStageConsoleGuardActive(true);
|
|
253
260
|
if (!this.homeInfo) this.enableMouse();
|
|
254
261
|
this.armTeardown();
|
|
255
262
|
return true;
|
|
@@ -304,6 +311,11 @@ export class StageSurface {
|
|
|
304
311
|
// Mouse first, unconditionally: it is the one piece of state that outlives
|
|
305
312
|
// the process and damages the terminal the user goes back to.
|
|
306
313
|
this.disableMouse();
|
|
314
|
+
if (this.unregisterConsoleGuard) {
|
|
315
|
+
this.unregisterConsoleGuard();
|
|
316
|
+
this.unregisterConsoleGuard = null;
|
|
317
|
+
if (this.out === process.stdout) setStageConsoleGuardActive(false);
|
|
318
|
+
}
|
|
307
319
|
if (!this.stage.reserved) { this.disarmTeardown(); return false; }
|
|
308
320
|
const rows = this.snapshot();
|
|
309
321
|
this.stage.collapse();
|
|
@@ -325,6 +337,11 @@ export class StageSurface {
|
|
|
325
337
|
suspend() {
|
|
326
338
|
if (!this.stage.reserved) return false;
|
|
327
339
|
this.disableMouse();
|
|
340
|
+
if (this.unregisterConsoleGuard) {
|
|
341
|
+
this.unregisterConsoleGuard();
|
|
342
|
+
this.unregisterConsoleGuard = null;
|
|
343
|
+
if (this.out === process.stdout) setStageConsoleGuardActive(false);
|
|
344
|
+
}
|
|
328
345
|
this.stage.collapse();
|
|
329
346
|
return true;
|
|
330
347
|
}
|
|
@@ -332,6 +349,9 @@ export class StageSurface {
|
|
|
332
349
|
resume() {
|
|
333
350
|
if (this.stage.reserved) return false;
|
|
334
351
|
if (!this.stage.reserve()) return false;
|
|
352
|
+
this.unregisterConsoleGuard?.();
|
|
353
|
+
this.unregisterConsoleGuard = registerStageConsoleGuard(this);
|
|
354
|
+
if (this.out === process.stdout) setStageConsoleGuardActive(true);
|
|
335
355
|
this.stage.invalidate();
|
|
336
356
|
this.enableMouse();
|
|
337
357
|
return true;
|
|
@@ -372,6 +392,9 @@ export class StageSurface {
|
|
|
372
392
|
* the contract in transcript.js.
|
|
373
393
|
*/
|
|
374
394
|
commit(kind, produce, meta = null) {
|
|
395
|
+
if (kind === 'error' || kind === 'turn' || kind === 'approval') {
|
|
396
|
+
this.stage.invalidate();
|
|
397
|
+
}
|
|
375
398
|
return this.transcript.append({ kind, produce, meta });
|
|
376
399
|
}
|
|
377
400
|
|
|
@@ -386,6 +409,12 @@ export class StageSurface {
|
|
|
386
409
|
this.lastPromptCaret = caret;
|
|
387
410
|
}
|
|
388
411
|
|
|
412
|
+
const isModal = Boolean(caret?.modal);
|
|
413
|
+
if (isModal !== this.wasModal) {
|
|
414
|
+
this.wasModal = isModal;
|
|
415
|
+
this.stage.invalidate();
|
|
416
|
+
}
|
|
417
|
+
|
|
389
418
|
if (this.homeInfo || (caret?.modal && !caret?.inline)) {
|
|
390
419
|
if (this.stage.height < this.stage.maxHeight) {
|
|
391
420
|
this.stage.grow(this.stage.maxHeight - this.stage.height);
|
|
@@ -417,21 +446,23 @@ export class StageSurface {
|
|
|
417
446
|
|
|
418
447
|
const height = this.stage.height;
|
|
419
448
|
|
|
420
|
-
//
|
|
421
|
-
//
|
|
422
|
-
//
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
? Math.max(MIN_VIEWPORT_ROWS, this.messageActionOverlay?.panel.length || 0)
|
|
427
|
-
: 0;
|
|
428
|
-
const maxBlock = Math.max(1, height - floor);
|
|
449
|
+
// An active prompt block or modal dialog is the focal point of user interaction.
|
|
450
|
+
// Never slice the top border, title, or input area when the block fits within the stage height.
|
|
451
|
+
// The transcript viewport receives the remaining vertical budget (height - block.length).
|
|
452
|
+
const maxBlock = this.messageActionOverlay?.panel.length
|
|
453
|
+
? Math.max(1, height - this.messageActionOverlay.panel.length)
|
|
454
|
+
: height;
|
|
429
455
|
if (block.length > maxBlock) {
|
|
430
456
|
const cut = block.length - maxBlock;
|
|
431
457
|
block = block.slice(cut);
|
|
432
458
|
caretRow = Math.max(0, caretRow - cut);
|
|
433
459
|
}
|
|
434
460
|
|
|
461
|
+
if (this.lastBlockLength > 0 && this.lastBlockLength !== block.length) {
|
|
462
|
+
this.stage.invalidate();
|
|
463
|
+
}
|
|
464
|
+
this.lastBlockLength = block.length;
|
|
465
|
+
|
|
435
466
|
const budget = Math.max(0, height - block.length);
|
|
436
467
|
let rows = [];
|
|
437
468
|
if (budget > 0) {
|
|
@@ -496,7 +527,8 @@ export class StageSurface {
|
|
|
496
527
|
model: this.sidebarStatus?.model || this.sessionInfo?.model,
|
|
497
528
|
contextChars: this.sidebarStatus?.contextChars,
|
|
498
529
|
contextLimit: this.sidebarStatus?.contextLimit,
|
|
499
|
-
plan: this.sidebarPlan
|
|
530
|
+
plan: this.sidebarPlan,
|
|
531
|
+
activeSkill: this.sessionInfo?.activeSkill
|
|
500
532
|
}, mainRows.length) : [];
|
|
501
533
|
const painted = sidebar ? joinSessionSidebar(mainRows, panelRows, mainWidth) : mainRows;
|
|
502
534
|
return this.stage.paint(painted, {
|
|
@@ -687,7 +719,7 @@ export class StageSurface {
|
|
|
687
719
|
row = ` ${leftCell} ${row}`;
|
|
688
720
|
}
|
|
689
721
|
}
|
|
690
|
-
rows[i] = `${padEnd(row, contentWidth)} ${rightCell}`;
|
|
722
|
+
rows[i] = `${padEnd(truncate(row, contentWidth, ''), contentWidth)} ${rightCell}`;
|
|
691
723
|
}
|
|
692
724
|
return rows;
|
|
693
725
|
}
|
package/src/tui/text.js
CHANGED
|
@@ -32,14 +32,37 @@ export function stripAnsi(text) {
|
|
|
32
32
|
*/
|
|
33
33
|
function isWideCodePoint(code) {
|
|
34
34
|
return ((code >= 0x1100 && code <= 0x115f) || // Hangul Jamo
|
|
35
|
+
code === 0x231a || code === 0x231b || // Watch, Hourglass
|
|
36
|
+
(code >= 0x23e9 && code <= 0x23fa) || // Media control & clock symbols
|
|
37
|
+
code === 0x25fd || code === 0x25fe || // Medium small squares
|
|
38
|
+
code === 0x2614 || code === 0x2615 || // Umbrella with rain, Hot beverage
|
|
39
|
+
(code >= 0x2648 && code <= 0x2653) || // Zodiac symbols
|
|
40
|
+
code === 0x267f || code === 0x2693 || code === 0x26a1 || // Wheelchair, Anchor, High voltage (⚡)
|
|
41
|
+
code === 0x26aa || code === 0x26ab || code === 0x26bd || code === 0x26be ||
|
|
42
|
+
code === 0x26c4 || code === 0x26c5 || code === 0x26ce || code === 0x26d4 ||
|
|
43
|
+
code === 0x26ea || code === 0x26f2 || code === 0x26f3 || code === 0x26f5 ||
|
|
44
|
+
code === 0x26fa || code === 0x26fd ||
|
|
45
|
+
code === 0x2705 || code === 0x270a || code === 0x270b || code === 0x2728 || // ✅ ✊ ✋ ✨
|
|
46
|
+
code === 0x274c || code === 0x274e || (code >= 0x2753 && code <= 0x2755) ||
|
|
47
|
+
code === 0x2757 || (code >= 0x2795 && code <= 0x2797) || code === 0x27b0 || code === 0x27bf ||
|
|
48
|
+
code === 0x2b1b || code === 0x2b1c || code === 0x2b50 || code === 0x2b55 ||
|
|
35
49
|
(code >= 0x2e80 && code <= 0xa4cf) || // CJK radicals … Yi
|
|
36
50
|
(code >= 0xac00 && code <= 0xd7a3) || // Hangul syllables
|
|
37
51
|
(code >= 0xf900 && code <= 0xfaff) || // CJK compatibility ideographs
|
|
38
52
|
(code >= 0xfe30 && code <= 0xfe6f) || // CJK compatibility forms
|
|
39
53
|
(code >= 0xff00 && code <= 0xff60) || // Fullwidth forms
|
|
40
54
|
(code >= 0xffe0 && code <= 0xffe6) ||
|
|
41
|
-
|
|
42
|
-
(code >=
|
|
55
|
+
code === 0x1f004 || code === 0x1f0cf || code === 0x1f18e ||
|
|
56
|
+
(code >= 0x1f191 && code <= 0x1f19a) ||
|
|
57
|
+
(code >= 0x1f1e6 && code <= 0x1f251) ||
|
|
58
|
+
(code >= 0x1f300 && code <= 0x1f64f) || // Misc Symbols, Pictographs & Emoticons
|
|
59
|
+
(code >= 0x1f680 && code <= 0x1f6ff) || // Transport & Map Symbols
|
|
60
|
+
(code >= 0x1f700 && code <= 0x1f7ff) || // Alchemical & Geometric Shapes Extended
|
|
61
|
+
(code >= 0x1f800 && code <= 0x1f8ff) || // Supplemental Arrows-C
|
|
62
|
+
(code >= 0x1f900 && code <= 0x1f9ff) || // Supplemental Symbols & Pictographs
|
|
63
|
+
(code >= 0x1fa00 && code <= 0x1faff) || // Symbols & Pictographs Extended-A
|
|
64
|
+
(code >= 0x20000 && code <= 0x3ffff) // Supplementary Ideographic Planes
|
|
65
|
+
);
|
|
43
66
|
}
|
|
44
67
|
/**
|
|
45
68
|
* The East Asian AMBIGUOUS class (UAX #11).
|
package/src/tui/text.ts
CHANGED
|
@@ -37,14 +37,36 @@ export function stripAnsi(text: unknown): string {
|
|
|
37
37
|
function isWideCodePoint(code: number): boolean {
|
|
38
38
|
return (
|
|
39
39
|
(code >= 0x1100 && code <= 0x115f) || // Hangul Jamo
|
|
40
|
+
code === 0x231a || code === 0x231b || // Watch, Hourglass
|
|
41
|
+
(code >= 0x23e9 && code <= 0x23fa) || // Media control & clock symbols
|
|
42
|
+
code === 0x25fd || code === 0x25fe || // Medium small squares
|
|
43
|
+
code === 0x2614 || code === 0x2615 || // Umbrella with rain, Hot beverage
|
|
44
|
+
(code >= 0x2648 && code <= 0x2653) || // Zodiac symbols
|
|
45
|
+
code === 0x267f || code === 0x2693 || code === 0x26a1 || // Wheelchair, Anchor, High voltage (⚡)
|
|
46
|
+
code === 0x26aa || code === 0x26ab || code === 0x26bd || code === 0x26be ||
|
|
47
|
+
code === 0x26c4 || code === 0x26c5 || code === 0x26ce || code === 0x26d4 ||
|
|
48
|
+
code === 0x26ea || code === 0x26f2 || code === 0x26f3 || code === 0x26f5 ||
|
|
49
|
+
code === 0x26fa || code === 0x26fd ||
|
|
50
|
+
code === 0x2705 || code === 0x270a || code === 0x270b || code === 0x2728 || // ✅ ✊ ✋ ✨
|
|
51
|
+
code === 0x274c || code === 0x274e || (code >= 0x2753 && code <= 0x2755) ||
|
|
52
|
+
code === 0x2757 || (code >= 0x2795 && code <= 0x2797) || code === 0x27b0 || code === 0x27bf ||
|
|
53
|
+
code === 0x2b1b || code === 0x2b1c || code === 0x2b50 || code === 0x2b55 ||
|
|
40
54
|
(code >= 0x2e80 && code <= 0xa4cf) || // CJK radicals … Yi
|
|
41
55
|
(code >= 0xac00 && code <= 0xd7a3) || // Hangul syllables
|
|
42
56
|
(code >= 0xf900 && code <= 0xfaff) || // CJK compatibility ideographs
|
|
43
57
|
(code >= 0xfe30 && code <= 0xfe6f) || // CJK compatibility forms
|
|
44
58
|
(code >= 0xff00 && code <= 0xff60) || // Fullwidth forms
|
|
45
59
|
(code >= 0xffe0 && code <= 0xffe6) ||
|
|
46
|
-
|
|
47
|
-
(code >=
|
|
60
|
+
code === 0x1f004 || code === 0x1f0cf || code === 0x1f18e ||
|
|
61
|
+
(code >= 0x1f191 && code <= 0x1f19a) ||
|
|
62
|
+
(code >= 0x1f1e6 && code <= 0x1f251) ||
|
|
63
|
+
(code >= 0x1f300 && code <= 0x1f64f) || // Misc Symbols, Pictographs & Emoticons
|
|
64
|
+
(code >= 0x1f680 && code <= 0x1f6ff) || // Transport & Map Symbols
|
|
65
|
+
(code >= 0x1f700 && code <= 0x1f7ff) || // Alchemical & Geometric Shapes Extended
|
|
66
|
+
(code >= 0x1f800 && code <= 0x1f8ff) || // Supplemental Arrows-C
|
|
67
|
+
(code >= 0x1f900 && code <= 0x1f9ff) || // Supplemental Symbols & Pictographs
|
|
68
|
+
(code >= 0x1fa00 && code <= 0x1faff) || // Symbols & Pictographs Extended-A
|
|
69
|
+
(code >= 0x20000 && code <= 0x3ffff) // Supplementary Ideographic Planes
|
|
48
70
|
);
|
|
49
71
|
}
|
|
50
72
|
|
package/src/tui/theme.js
CHANGED
|
@@ -254,6 +254,8 @@ export const GLYPHS = HAS_UNICODE
|
|
|
254
254
|
// The left accent bar of a block. Uses box-drawing heavy vertical ('┃')
|
|
255
255
|
// so it joins seamlessly from row to row without font line-height leading gaps.
|
|
256
256
|
bar: '┃', step: '▪',
|
|
257
|
+
// Clean icon glyphs for skills and status indicators (no color emoticons).
|
|
258
|
+
skill: '✦', sparkle: '✦', diamond: '◆',
|
|
257
259
|
// The permission marker. opencode shows a warning triangle and NO risk
|
|
258
260
|
// word — the level is internal plumbing, and printing 'DANGEROUS' at
|
|
259
261
|
// someone just makes them numb to it. Colour still carries the tier.
|
|
@@ -272,6 +274,7 @@ export const GLYPHS = HAS_UNICODE
|
|
|
272
274
|
spinner: getEngineFrames({ unicode: false }),
|
|
273
275
|
hLine: '-', vLine: '|', corner: '`', tee: '+', ellipsis: '...',
|
|
274
276
|
bar: '|', step: '*',
|
|
277
|
+
skill: '*', sparkle: '*', diamond: '*',
|
|
275
278
|
warnMark: '!',
|
|
276
279
|
barHeavy: '|',
|
|
277
280
|
topLeft: '+', topRight: '+', bottomLeft: '+', bottomRight: '+'
|
package/src/vfeTracker.js
CHANGED
|
@@ -150,7 +150,7 @@ export class VFETracker {
|
|
|
150
150
|
* Format the high-priority paradigm shift prompt directive.
|
|
151
151
|
*/
|
|
152
152
|
getParadigmShiftDirective() {
|
|
153
|
-
return (`\n\n
|
|
153
|
+
return (`\n\n△ [PARADIGM SHIFT REQUIRED — ACTIVE INFERENCE DEADLOCK DETECTED]\n` +
|
|
154
154
|
`Variational Free Energy tracking detected a persistent error plateau with zero convergence.\n` +
|
|
155
155
|
`Your current mental model and execution route are trapped in a local minimum.\n` +
|
|
156
156
|
`DO NOT retry previous variations, tweak parameters, or repeat failed commands.\n` +
|
package/src/vfeTracker.ts
CHANGED
|
@@ -230,7 +230,7 @@ export class VFETracker {
|
|
|
230
230
|
*/
|
|
231
231
|
getParadigmShiftDirective(): string {
|
|
232
232
|
return (
|
|
233
|
-
`\n\n
|
|
233
|
+
`\n\n△ [PARADIGM SHIFT REQUIRED — ACTIVE INFERENCE DEADLOCK DETECTED]\n` +
|
|
234
234
|
`Variational Free Energy tracking detected a persistent error plateau with zero convergence.\n` +
|
|
235
235
|
`Your current mental model and execution route are trapped in a local minimum.\n` +
|
|
236
236
|
`DO NOT retry previous variations, tweak parameters, or repeat failed commands.\n` +
|