@synaplink/orqlaude 0.9.3 → 0.9.4
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/dist/cli/easter_egg.js +46 -2
- package/dist/cli/easter_egg.js.map +1 -1
- package/dist/lib/version.d.ts +1 -1
- package/dist/lib/version.js +1 -1
- package/package.json +1 -1
package/dist/cli/easter_egg.js
CHANGED
|
@@ -4,6 +4,15 @@ import { style } from "../lib/style.js";
|
|
|
4
4
|
* Bare `orql` easter egg — typewriter cycling through 149 tagline variants
|
|
5
5
|
* beneath the orqlaude diamond. Runs until Ctrl-C / Ctrl-D.
|
|
6
6
|
*
|
|
7
|
+
* v0.9.4 adds a fake typing cursor. We hide the real terminal cursor (so
|
|
8
|
+
* stdin echo can't bleed into the line, see v0.9.3 below), which means
|
|
9
|
+
* the typewriter looks dead — characters appearing on a line with nothing
|
|
10
|
+
* trailing them. So we draw our own: a medium-shade block (▒) painted
|
|
11
|
+
* right after `currentText`. It stays SOLID while the typewriter is
|
|
12
|
+
* actively typing/erasing (a 700ms "just-typed" pulse window), then
|
|
13
|
+
* BLINKS at the standard 530ms cadence during the hold and gap phases —
|
|
14
|
+
* the same behavior real terminal cursors have when the user goes idle.
|
|
15
|
+
*
|
|
7
16
|
* v0.9.3 rewrite. Two fixes over the v0.6.1 implementation:
|
|
8
17
|
*
|
|
9
18
|
* 1. **Stdin echo no longer bleeds into the line.** Previously the
|
|
@@ -43,6 +52,11 @@ const ERASE_MIN_MS = 12;
|
|
|
43
52
|
const ERASE_MAX_MS = 30;
|
|
44
53
|
const BETWEEN_MIN_MS = 280;
|
|
45
54
|
const BETWEEN_MAX_MS = 600;
|
|
55
|
+
// Fake typing cursor. The real terminal cursor is hidden (see HIDE_CURSOR
|
|
56
|
+
// below) to keep stdin echo out of the line, so we draw our own.
|
|
57
|
+
const CURSOR_BLOCK = "▒";
|
|
58
|
+
const CURSOR_BLINK_MS = 530; // standard terminal cursor blink half-period
|
|
59
|
+
const CURSOR_PULSE_MS = 700; // stay solid for this long after the last keystroke
|
|
46
60
|
// Layout: 1-based rows/cols (ANSI convention).
|
|
47
61
|
// Row 1: blank padding so the logo doesn't kiss the top edge.
|
|
48
62
|
// Row 2-4: logo + wordmark + tagline.
|
|
@@ -62,6 +76,18 @@ export async function runEasterEgg() {
|
|
|
62
76
|
return new Promise((resolve) => {
|
|
63
77
|
let stopped = false;
|
|
64
78
|
let currentText = "";
|
|
79
|
+
// Fake-cursor state. `cursorOn` is the blink phase, toggled by an
|
|
80
|
+
// interval. `lastTypeAt` is the wall-clock timestamp of the last
|
|
81
|
+
// type/erase event — within CURSOR_PULSE_MS we force the cursor to
|
|
82
|
+
// be solid so it looks like an actively-typing person rather than a
|
|
83
|
+
// blinking idle prompt.
|
|
84
|
+
let cursorOn = true;
|
|
85
|
+
let lastTypeAt = 0;
|
|
86
|
+
const isCursorVisible = () => {
|
|
87
|
+
if (Date.now() - lastTypeAt < CURSOR_PULSE_MS)
|
|
88
|
+
return true;
|
|
89
|
+
return cursorOn;
|
|
90
|
+
};
|
|
65
91
|
const cleanup = () => {
|
|
66
92
|
try {
|
|
67
93
|
if (process.stdin.isTTY && process.stdin.setRawMode) {
|
|
@@ -71,6 +97,7 @@ export async function runEasterEgg() {
|
|
|
71
97
|
catch {
|
|
72
98
|
/* harmless on shutdown */
|
|
73
99
|
}
|
|
100
|
+
clearInterval(blinkInterval);
|
|
74
101
|
process.stdin.removeListener("data", onData);
|
|
75
102
|
process.stdin.pause();
|
|
76
103
|
process.stdout.off("resize", onResize);
|
|
@@ -97,8 +124,10 @@ export async function runEasterEgg() {
|
|
|
97
124
|
}
|
|
98
125
|
};
|
|
99
126
|
// Repaint the full frame from the top-left. Called on every animation
|
|
100
|
-
// tick
|
|
127
|
+
// tick, on terminal resize, and from the cursor-blink interval.
|
|
128
|
+
// Idempotent.
|
|
101
129
|
const paintFrame = () => {
|
|
130
|
+
const cursor = isCursorVisible() ? style.sand(CURSOR_BLOCK) : "";
|
|
102
131
|
const out = [
|
|
103
132
|
MOVE_TO_HOME,
|
|
104
133
|
CLEAR_SCREEN,
|
|
@@ -112,12 +141,24 @@ export async function runEasterEgg() {
|
|
|
112
141
|
style.coral("◆◆◆"),
|
|
113
142
|
moveTo(TAGLINE_ROW, TAGLINE_COL),
|
|
114
143
|
style.sand(currentText),
|
|
144
|
+
cursor,
|
|
115
145
|
];
|
|
116
146
|
process.stdout.write(out.join(""));
|
|
117
147
|
};
|
|
118
148
|
const onResize = () => {
|
|
119
149
|
paintFrame();
|
|
120
150
|
};
|
|
151
|
+
// Drive the blink even during the hold/gap phases when the animation
|
|
152
|
+
// loop is sleeping and would otherwise not repaint.
|
|
153
|
+
const blinkInterval = setInterval(() => {
|
|
154
|
+
cursorOn = !cursorOn;
|
|
155
|
+
// Only repaint if the visible cursor state would actually change.
|
|
156
|
+
// Inside the pulse window we're locked-on regardless of cursorOn,
|
|
157
|
+
// so skip the write to avoid stomping on the typing loop's rhythm.
|
|
158
|
+
if (Date.now() - lastTypeAt >= CURSOR_PULSE_MS) {
|
|
159
|
+
paintFrame();
|
|
160
|
+
}
|
|
161
|
+
}, CURSOR_BLINK_MS);
|
|
121
162
|
// Initial setup.
|
|
122
163
|
process.stdout.write(ALT_SCREEN_ENTER + HIDE_CURSOR);
|
|
123
164
|
try {
|
|
@@ -146,11 +187,13 @@ export async function runEasterEgg() {
|
|
|
146
187
|
// Type out character by character. Repainting the whole frame
|
|
147
188
|
// each tick is overkill, but it's correct under resize and
|
|
148
189
|
// makes the code easier to reason about than tracking partial
|
|
149
|
-
// updates.
|
|
190
|
+
// updates. `lastTypeAt` marks the keystroke for the cursor
|
|
191
|
+
// pulse — within CURSOR_PULSE_MS the cursor stays solid.
|
|
150
192
|
for (let i = 1; i <= tagline.length; i++) {
|
|
151
193
|
if (stopped)
|
|
152
194
|
return;
|
|
153
195
|
currentText = tagline.slice(0, i);
|
|
196
|
+
lastTypeAt = Date.now();
|
|
154
197
|
paintFrame();
|
|
155
198
|
await sleep(rand(TYPE_MIN_MS, TYPE_MAX_MS));
|
|
156
199
|
}
|
|
@@ -161,6 +204,7 @@ export async function runEasterEgg() {
|
|
|
161
204
|
if (stopped)
|
|
162
205
|
return;
|
|
163
206
|
currentText = tagline.slice(0, i);
|
|
207
|
+
lastTypeAt = Date.now();
|
|
164
208
|
paintFrame();
|
|
165
209
|
await sleep(rand(ERASE_MIN_MS, ERASE_MAX_MS));
|
|
166
210
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"easter_egg.js","sourceRoot":"","sources":["../../src/cli/easter_egg.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAExC
|
|
1
|
+
{"version":3,"file":"easter_egg.js","sourceRoot":"","sources":["../../src/cli/easter_egg.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAExC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,MAAM,GAAG,GAAG,OAAO,CAAC;AACpB,MAAM,gBAAgB,GAAG,GAAG,GAAG,QAAQ,CAAC;AACxC,MAAM,gBAAgB,GAAG,GAAG,GAAG,QAAQ,CAAC;AACxC,MAAM,WAAW,GAAG,GAAG,GAAG,MAAM,CAAC;AACjC,MAAM,WAAW,GAAG,GAAG,GAAG,MAAM,CAAC;AACjC,MAAM,YAAY,GAAG,GAAG,GAAG,IAAI,CAAC;AAChC,MAAM,YAAY,GAAG,GAAG,GAAG,GAAG,CAAC;AAC/B,MAAM,MAAM,GAAG,CAAC,GAAW,EAAE,GAAW,EAAE,EAAE,CAAC,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,GAAG,CAAC;AAEpE,MAAM,WAAW,GAAG,EAAE,CAAC;AACvB,MAAM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AAC,GAAG,GAAG,GAAG,CAAC,CAAC;AAC3C,CAAC"}
|
package/dist/lib/version.d.ts
CHANGED
package/dist/lib/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synaplink/orqlaude",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.4",
|
|
4
4
|
"description": "Multi-agent orchestrator for Claude Code. One primary session decomposes a complex task, gets a single budget approval, then dispatches N parallel Agnets via the Desktop app's native spawn_task (with explicit fallbacks). Tracks cost/status via JSONL tails; brokers messages between Agnets; streams to Telegram; detects hallucination; manages PRs.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|