@quadient/skillshare 1.13.2 → 1.15.0

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/README.md CHANGED
@@ -372,7 +372,7 @@ bunx @quadient/skillshare@^1.6.0 pages dev . --slug my-app
372
372
  ```
373
373
 
374
374
  The directory must contain one `wrangler.json` or `wrangler.jsonc`. The CLI downloads
375
- and verifies celld 0.4.1 on first use, caches it under `~/.cache/skillshare/celld`,
375
+ and verifies celld 0.6.2 on first use, caches it under `~/.cache/skillshare/celld`,
376
376
  and uses its packaged esbuild. Supported hosts are macOS Apple Silicon and Linux
377
377
  x64/ARM64; Windows users can use WSL2. `--celld <executable>` or `CELLD_EXECUTABLE`
378
378
  selects an existing installation.
@@ -170,6 +170,8 @@ class ClaudeDriver {
170
170
  cwd: workdir,
171
171
  env: {
172
172
  ...mcpTokenEnvironment(servers), SKILLSHARE_SESSION_ID: this.context.sessionId,
173
+ // Claude Code holds suggestions back when the account nears a rate limit; the user can still turn them off with this variable.
174
+ CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION: process.env.CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION ?? 'true',
173
175
  // Claude Code lets auto-memory write to its own folder even under the read-only allowlist; a sandboxed session writes nothing.
174
176
  ...(isSandboxed(this.context.start.configuration, this.context) ? { CLAUDE_CODE_DISABLE_AUTO_MEMORY: '1' } : {}),
175
177
  },
@@ -178,7 +180,8 @@ class ClaudeDriver {
178
180
  });
179
181
  void this.process.exited.then(code => this.onExit(code));
180
182
  // Claude Code answers initialize once it is ready, which turns a bad install or a bad flag into a clear start failure.
181
- await this.control({ subtype: 'initialize' });
183
+ // Suggestions come after a turn's result; versions without them ignore the field.
184
+ await this.control({ subtype: 'initialize', promptSuggestions: true });
182
185
  if (this.context.start.resumeThreadId)
183
186
  this.adopt(this.context.start.resumeThreadId);
184
187
  }
@@ -303,6 +306,11 @@ class ClaudeDriver {
303
306
  return frame.isReplay === true ? this.replayed(frame.message?.content) : this.toolResults(frame.message?.content);
304
307
  case 'result':
305
308
  return this.result(frame);
309
+ case 'prompt_suggestion':
310
+ // A suggestion that arrives after the next message was written answers a conversation that has moved on.
311
+ if (!this.current && this.echoes.length === 0 && typeof frame.suggestion === 'string')
312
+ this.context.suggestion(frame.suggestion);
313
+ return;
306
314
  }
307
315
  }
308
316
  /** Text arrives in deltas first; the complete assistant frame later replaces it under the same key. */
@@ -117,6 +117,10 @@ class CodexDriver {
117
117
  threadId = null;
118
118
  current = null;
119
119
  texts = new Map();
120
+ /** The last finished turn, the only one whose predicted next message is still worth showing. */
121
+ lastTurnId = null;
122
+ /** Cleared once Codex says it cannot predict, so later turns do not ask again. */
123
+ predictions = true;
120
124
  closing = false;
121
125
  constructor(context, options) {
122
126
  this.context = context;
@@ -199,6 +203,15 @@ class CodexDriver {
199
203
  this.closing = true;
200
204
  await this.process?.kill();
201
205
  }
206
+ /** Asks for the user's likely next message; it arrives as thread/prediction/updated. Codex 0.162 declares the method but does not implement it yet. */
207
+ predict() {
208
+ if (!this.predictions || !this.threadId || !this.lastTurnId)
209
+ return;
210
+ this.request('thread/prediction/request', { threadId: this.threadId, sourceTurnId: this.lastTurnId }).catch(error => {
211
+ if (/not implemented|method not found|unknown variant/i.test(String(error?.message)))
212
+ this.predictions = false;
213
+ });
214
+ }
202
215
  request(method, params) {
203
216
  if (!this.process)
204
217
  return Promise.reject(new Error('Codex is not running.'));
@@ -314,6 +327,16 @@ class CodexDriver {
314
327
  current.resolve(status === 'failed'
315
328
  ? { status, error: codexErrorText(turn.error?.message) ?? current.error ?? 'The turn failed.', stats }
316
329
  : { status, stats });
330
+ this.lastTurnId = typeof turn.id === 'string' ? turn.id : current.id ?? null;
331
+ if (status === 'completed')
332
+ this.predict();
333
+ return;
334
+ }
335
+ case 'thread/prediction/updated': {
336
+ const result = params.result ?? {};
337
+ if (this.current || params.sourceTurnId !== this.lastTurnId || result.type !== 'completed' || typeof result.text !== 'string')
338
+ return;
339
+ this.context.suggestion(result.text);
317
340
  return;
318
341
  }
319
342
  }
@@ -5,6 +5,7 @@ export const SANDBOX_NOTE = 'This session is sandboxed: you can read files, sear
5
5
  'run commands that modify anything.';
6
6
  export const DEFAULT = 'default';
7
7
  const MAX_TEXT = 50_000;
8
+ const MAX_SUGGESTION = 2_000;
8
9
  export function isSandboxed(configuration, options) {
9
10
  return options.sandbox === true || options.profile?.sandbox === true || configuration.sandbox === true;
10
11
  }
@@ -152,6 +153,11 @@ export class SessionRunner {
152
153
  sandbox: options.sandbox,
153
154
  item: item => this.events.push({ type: 'item', ...item, text: item.text === undefined ? undefined : clip(item.text) }),
154
155
  thread: threadId => this.events.push({ type: 'thread', threadId }),
156
+ suggestion: text => {
157
+ if (this.busy || this.closing || !text.trim())
158
+ return;
159
+ this.events.push({ type: 'suggestion', text: clip(text.trim(), MAX_SUGGESTION) });
160
+ },
155
161
  exited: error => void this.finish(error ?? 'The agent stopped unexpectedly.'),
156
162
  });
157
163
  }
@@ -3,19 +3,19 @@ import { chmod, mkdir, readFile, rename, rm, writeFile } from 'node:fs/promises'
3
3
  import { homedir } from 'node:os';
4
4
  import { join, resolve } from 'node:path';
5
5
  import { gunzipSync } from 'node:zlib';
6
- const release = '0.4.1';
6
+ const release = '0.6.2';
7
7
  const platforms = {
8
8
  'darwin-arm64': [
9
9
  'aarch64-apple-darwin',
10
- '95c689769f66c08fd0d191fbfc731adb4c8340b49678b11979698ecf2e73393d',
10
+ 'b81a38299800679e9651fd7c1544540185682dcb59eed1a24c8cc36c6b31e76d',
11
11
  ],
12
12
  'linux-x64': [
13
13
  'x86_64-unknown-linux-gnu',
14
- '7b42a410e340bca4dbadd08ecb7f8983854aa855aa7467c29ab0e08b8b7f2007',
14
+ 'ce0ee3552cc8d55dde3998dc3b1b0c8f547bbcb4bc803d2a94842368b047646c',
15
15
  ],
16
16
  'linux-arm64': [
17
17
  'aarch64-unknown-linux-gnu',
18
- '5cc2281493a896b2cc7c7b6c46b2188753832d6b028457338c8eea774a1dd9a1',
18
+ '4eca87c6797590000a344c1b768364e9696e8817f5fbc16193f459d2edac7cd0',
19
19
  ],
20
20
  };
21
21
  export async function ensureCelld(override, signal) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quadient/skillshare",
3
- "version": "1.13.2",
3
+ "version": "1.15.0",
4
4
  "description": "Skillshare CLI for installing and publishing Quadient skills",
5
5
  "type": "module",
6
6
  "bin": {