@scalequality/cli 0.4.33 → 0.4.35
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/connect.build.json +2 -2
- package/dist/connect.cjs +29 -3
- package/package.json +1 -1
package/dist/connect.build.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
2
|
"sdkVersion": "0.3.281",
|
|
3
|
-
"sha256": "
|
|
4
|
-
"sourceCommit": "
|
|
3
|
+
"sha256": "47e8bd8f60955c36e9a87ff9c60d8dfbc2a9911881c4d6a6c485e044911ce46f",
|
|
4
|
+
"sourceCommit": "d6c63e56e4373b7579d4460e06f0b6850c9bc040"
|
|
5
5
|
}
|
package/dist/connect.cjs
CHANGED
|
@@ -7882,6 +7882,7 @@ var MAX_INPUT = 64 * 1024;
|
|
|
7882
7882
|
var MAX_TOKENS = 64;
|
|
7883
7883
|
var MAX_PENDING = 1024 * 1024;
|
|
7884
7884
|
var CATCH_UP_MS = 250;
|
|
7885
|
+
var PING_MS = 3e4;
|
|
7885
7886
|
var STOP_WAIT_MS = 2e3;
|
|
7886
7887
|
function loadPty() {
|
|
7887
7888
|
try {
|
|
@@ -7927,6 +7928,7 @@ var TerminalHost = class {
|
|
|
7927
7928
|
server = null;
|
|
7928
7929
|
wss = null;
|
|
7929
7930
|
port = null;
|
|
7931
|
+
beat = null;
|
|
7930
7932
|
tokens = /* @__PURE__ */ new Set();
|
|
7931
7933
|
tabs = /* @__PURE__ */ new Map();
|
|
7932
7934
|
/** When the person last typed in any tab (the cloud counts it as activity, so the machine does not idle away). */
|
|
@@ -7951,6 +7953,15 @@ var TerminalHost = class {
|
|
|
7951
7953
|
const wss = new import_websocket_server.default({ server, maxPayload: 1024 * 1024, verifyClient: (info) => this.originAllowed(info.origin) });
|
|
7952
7954
|
wss.on("connection", (socket) => this.accept(socket));
|
|
7953
7955
|
this.wss = wss;
|
|
7956
|
+
this.beat = setInterval(() => {
|
|
7957
|
+
for (const client of wss.clients) {
|
|
7958
|
+
try {
|
|
7959
|
+
client.ping();
|
|
7960
|
+
} catch {
|
|
7961
|
+
}
|
|
7962
|
+
}
|
|
7963
|
+
}, this.o.pingMs ?? PING_MS);
|
|
7964
|
+
this.beat.unref?.();
|
|
7954
7965
|
await new Promise((resolve8, reject) => {
|
|
7955
7966
|
server.once("error", reject);
|
|
7956
7967
|
server.listen(this.o.port, this.o.bind, () => {
|
|
@@ -8136,6 +8147,10 @@ var TerminalHost = class {
|
|
|
8136
8147
|
/** Ends every shell and stops listening (the engine stops). */
|
|
8137
8148
|
async stop() {
|
|
8138
8149
|
for (const id of [...this.tabs.keys()]) this.end(id);
|
|
8150
|
+
if (this.beat) {
|
|
8151
|
+
clearInterval(this.beat);
|
|
8152
|
+
this.beat = null;
|
|
8153
|
+
}
|
|
8139
8154
|
const server = this.server, wss = this.wss;
|
|
8140
8155
|
this.server = null;
|
|
8141
8156
|
this.wss = null;
|
|
@@ -14648,7 +14663,8 @@ function designLines(c) {
|
|
|
14648
14663
|
"When the user asks for a prototype, a screen, a mockup, a flow, a landing page or any interface to look at before it is built, make a design: the user opens it in the Design canvas beside this conversation, every screen side by side, and clicks through it.",
|
|
14649
14664
|
"- Ask first only when the request leaves open a decision that changes the whole design (who uses the screen first, which job comes first, which direction): one short question with two or three concrete options" + (c.askQuestions ? ", asked with AskUserQuestion after one sentence saying why you ask; the user picks on a card and you go on in the same turn." : ".") + " Otherwise decide, and say your assumption in one line.",
|
|
14650
14665
|
"- Start from the project, not from nothing: read the repository's styles, theme or tokens, components and copy before designing, and use its fonts, colours, spacing, radii and words. Without a look of its own, commit to a small system (one or two typefaces, a neutral ground, at most two accents) and name it in one line. Never cream or beige grounds unless the brand has them, no gradient washes, no emoji, no cards with a coloured left border.",
|
|
14651
|
-
`- Write it in the repository it belongs to, under design/<short-name>/: one self-contained .html file per screen (its CSS and JS inside it; pictures as files in that folder), and design/<short-name>/design.json listing the screens: {"title": "Stock control", "boards": [{"file": "desktop-light.html", "title": "Desktop \xB7 light", "device": "desktop", "width": 1280, "height": 820}, {"file": "phone-light.html", "title": "Phone \xB7 light", "device": "phone", "width": 390, "height": 844}]}. Titles in the user's language. Make the light and the dark theme, and the phone screens when the interface is used on a phone. Slides, a presentation or a deck are a design too: each slide a board with "device": "slide", 1920\xD71080, in order; one idea per slide, few words set large.`,
|
|
14666
|
+
`- Write it in the repository it belongs to, under design/<short-name>/: one self-contained .html file per screen (its CSS and JS inside it; pictures as files in that folder), and design/<short-name>/design.json listing the screens: {"title": "Stock control", "boards": [{"file": "desktop-light.html", "title": "Desktop \xB7 light", "device": "desktop", "width": 1280, "height": 820}, {"file": "phone-light.html", "title": "Phone \xB7 light", "device": "phone", "width": 390, "height": 844}]}. Titles in the user's language. Make the light and the dark theme, and the phone screens when the interface is used on a phone. Slides, a presentation or a deck are a design too: each slide a board with "device": "slide", 1920\xD71080, in order; one idea per slide, few words set large. At most 12 boards in one design: a longer deck is two designs.`,
|
|
14667
|
+
"- The canvas shows a screen isolated from the internet: a picture goes in an <img> (or <picture><source>) with a path relative to the screen, never in a CSS url() or from an https address, and fonts are the system's or inlined, or the canvas shows the screen without them.",
|
|
14652
14668
|
"- Make it work: real buttons, inputs, menus and states the user can click through, with plausible content in the user's language that fits the subject (never lorem ipsum, never invented claims about a real company). Accessible as drawn: button, a and input with its label, text contrast at least 4.5:1, touch targets at least 44 px on a phone. A phone screen never scrolls sideways.",
|
|
14653
14669
|
"- Never start a dev server or install packages for a design. Fonts and libraries load only from cdn.jsdelivr.net, cdnjs.cloudflare.com or unpkg.com (fonts through @fontsource on jsDelivr; Google Fonts do not load here); anything else stays inside the file.",
|
|
14654
14670
|
"- Then call check_design with the design.json path: it opens every screen in a browser and shows them to you. Fix what it reports and what you see wrong, and call it again until it is clean.",
|
|
@@ -16068,6 +16084,14 @@ var WorkspaceEngine = class {
|
|
|
16068
16084
|
case "discard_hunk":
|
|
16069
16085
|
await this.discardHunkCommand(str("path") ?? "", str("hunkHash") ?? "", str("repoFullName"));
|
|
16070
16086
|
return;
|
|
16087
|
+
case "model": {
|
|
16088
|
+
const model = str("model");
|
|
16089
|
+
if (model) {
|
|
16090
|
+
this.queue.push({ action: "model", model });
|
|
16091
|
+
this.kickTurns();
|
|
16092
|
+
}
|
|
16093
|
+
return;
|
|
16094
|
+
}
|
|
16071
16095
|
case "rewind":
|
|
16072
16096
|
this.dropQueue();
|
|
16073
16097
|
this.turnAbort?.abort();
|
|
@@ -16343,6 +16367,7 @@ var WorkspaceEngine = class {
|
|
|
16343
16367
|
else if (item.action === "run_tests") await this.runTests(typeof item.repoFullName === "string" ? item.repoFullName : void 0);
|
|
16344
16368
|
else if (item.action === "measure") await this.measureAction(typeof item.repoFullName === "string" ? item.repoFullName : void 0);
|
|
16345
16369
|
else if (item.action === "compact") await this.compactConversation(String(item.turnId ?? ""));
|
|
16370
|
+
else if (item.action === "model") await this.switchModel(String(item.model ?? ""), { quiet: true });
|
|
16346
16371
|
else await this.runTurn(item);
|
|
16347
16372
|
}
|
|
16348
16373
|
} finally {
|
|
@@ -16603,10 +16628,11 @@ ${String(item.content)}` : String(item.content);
|
|
|
16603
16628
|
* for it; the engine takes it from the next request on. A failure keeps the
|
|
16604
16629
|
* current one (and says so).
|
|
16605
16630
|
*/
|
|
16606
|
-
|
|
16631
|
+
/** `quiet`: picked before the message (no step in the conversation; a refusal still says so, and the picker goes back). */
|
|
16632
|
+
async switchModel(model, opts = {}) {
|
|
16607
16633
|
const boot = this.boot;
|
|
16608
16634
|
if (!model || model === boot.model || !this.deps.transport.refreshRuntime) return;
|
|
16609
|
-
const step = this.ownStep("model", "tool", `Switching to ${model}`, "STEP_MODEL_SWITCH", { model });
|
|
16635
|
+
const step = opts.quiet ? { end: (_s) => void 0 } : this.ownStep("model", "tool", `Switching to ${model}`, "STEP_MODEL_SWITCH", { model });
|
|
16610
16636
|
try {
|
|
16611
16637
|
const fresh = await this.deps.transport.refreshRuntime({ model: boot.model });
|
|
16612
16638
|
if (!fresh.runtime.token || !fresh.runtime.baseUrl) throw new Error("RUNTIME_INCOMPLETE");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scalequality/cli",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.35",
|
|
4
4
|
"description": "ScaleQuality CLI. Connect your computer to the ScaleQuality AI Workspace (`scalequality login`), run its coding engine in any folder of your computer, and import your Claude Code and Codex conversations.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|