stk-codegen 1.0.6 → 1.0.7

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.
@@ -0,0 +1,24 @@
1
+ export interface ClipboardImage {
2
+ base64: string;
3
+ mimeType: string;
4
+ }
5
+ /**
6
+ * Best-effort helper to read an image from the system clipboard and return it
7
+ * as a base64 string.
8
+ *
9
+ * Strategy on macOS:
10
+ * - First, try `pngpaste` if it is available on the system PATH. This is very
11
+ * robust for typical PNG clipboard contents.
12
+ * - If `pngpaste` is not available or fails, fall back to an AppleScript that
13
+ * writes the clipboard image (PNG/TIFF/JPEG) to a file in a user/project
14
+ * context directory (instead of /tmp), which we then read from Node.
15
+ *
16
+ * Other platforms currently return null (no-op) until we implement proper
17
+ * portable support.
18
+ */
19
+ export declare function readClipboardImageAsBase64(baseDir?: string): Promise<ClipboardImage | null>;
20
+ /**
21
+ * Best-effort cleanup: remove old clipboard image files created by this
22
+ * service. Files are identified by the `clipboard-` prefix and `maxAgeMs`.
23
+ */
24
+ export declare function cleanupOldClipboardImages(baseDir?: string, maxAgeMs?: number): Promise<void>;
@@ -1,2 +1,3 @@
1
1
  import { ChildProcess } from 'child_process';
2
- export declare const runShellCommand: (command: string, cwd: string) => ChildProcess;
2
+ export type ShellProcess = ChildProcess;
3
+ export declare const runShellCommand: (command: string, cwd: string) => ShellProcess;
@@ -54,6 +54,10 @@ export interface UserMessage {
54
54
  type: 'user_message';
55
55
  payload: {
56
56
  prompt: string;
57
+ images?: {
58
+ base64: string;
59
+ mimeType: string;
60
+ }[];
57
61
  };
58
62
  }
59
63
  export interface MagicCommand {
@@ -14,13 +14,32 @@ export interface ShellRunView {
14
14
  status: 'pending' | 'running' | 'finished' | 'error' | 'cancelled';
15
15
  stdout: string;
16
16
  stderr: string;
17
+ /**
18
+ * Saída agregada (stdout + stderr) em forma já limpa para
19
+ * renderização, potencialmente truncada apenas do ponto de
20
+ * vista visual (o CoreState continua contendo a saída completa).
21
+ */
22
+ visibleOutput: string;
23
+ /**
24
+ * Indica se a saída visual foi truncada em relação à saída real.
25
+ */
26
+ isVisuallyTruncated: boolean;
27
+ /**
28
+ * Número total de linhas de saída (stdout + stderr) no core.
29
+ */
30
+ totalLines: number;
31
+ /**
32
+ * Número de linhas efetivamente renderizadas na UI.
33
+ */
34
+ visibleLinesCount: number;
17
35
  }
18
36
  export interface DiffReviewView {
19
37
  id: string;
20
38
  title?: string;
21
39
  toolName?: string;
22
40
  toolParams?: Record<string, any>;
23
- diffText: string;
41
+ oldContent: string;
42
+ newContent: string;
24
43
  status: 'pending' | 'accepted' | 'rejected';
25
44
  }
26
45
  export interface InkViewModel {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stk-codegen",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "A CLI executor for the autonomous agent.",
5
5
  "main": "index.js",
6
6
  "bin": {