needle-cloud 2.7.0 → 2.8.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/dist/cli.esm.js CHANGED
@@ -1 +1 @@
1
- import"node-fetch";import"@web-std/file";import"node:crypto";export{p as program}from"./cli-6d1357ac.js";import"fs";import"dotenv";import"ora";import"commander";import"child_process";import"open";import"path";import"node:fs";import"node:fs/promises";import"node:os";import"node:path";import"util";import"stream";import"http";import"https";import"url";import"crypto";import"net";import"tls";import"assert";import"tty";import"os";import"events";import"http2";import"zlib";import"node:readline/promises";import"@logto/node";import"node:readline";import"node:stream";import"node:zlib";import"express";import"ws";import"node:child_process";import"minimatch";import"body-parser";
1
+ import"node-fetch";import"@web-std/file";import"node:crypto";export{p as program}from"./cli-9b88b99c.js";import"fs";import"dotenv";import"ora";import"commander";import"child_process";import"open";import"path";import"node:fs";import"node:fs/promises";import"node:os";import"node:path";import"util";import"stream";import"http";import"https";import"url";import"crypto";import"net";import"tls";import"assert";import"tty";import"os";import"events";import"http2";import"zlib";import"node:readline/promises";import"@logto/node";import"node:readline";import"node:stream";import"node:zlib";import"express";import"ws";import"node:child_process";import"minimatch";import"body-parser";
@@ -1 +1 @@
1
- import{existsSync as t,readdirSync as o,statSync as r}from"node:fs";import{dirname as i,join as e}from"node:path";import{g as n}from"./cli-6d1357ac.js";import"node-fetch";import"@web-std/file";import"node:crypto";import"commander";import"fs";import"child_process";import"open";import"path";import"ora";import"node:fs/promises";import"node:os";import"util";import"stream";import"http";import"https";import"url";import"crypto";import"net";import"tls";import"assert";import"tty";import"os";import"events";import"http2";import"zlib";import"node:readline/promises";import"dotenv";import"@logto/node";import"node:readline";import"node:stream";import"node:zlib";import"express";import"ws";import"node:child_process";import"minimatch";import"body-parser";function p(){var p;let m;try{m=n()}catch{return null}const s=null==(p=m)||null==(p=p.entries)?void 0:p[0];if(!s)return null;if(!s.log_location)return null;if("unity"!==s.editor&&"blender"!==s.editor)return null;if(!t(s.log_location))return null;const l=s.log_location,c=function(t,i){const n=new Set([i]);try{for(const i of o(t)){if(!i.toLowerCase().endsWith(".log"))continue;const o=e(t,i);try{if(!r(o).isFile())continue}catch{continue}n.add(o)}}catch{}return[...n]}(i(l),l);return{editor:s.editor,path:l,paths:c}}export{p as findActiveEditorLog};
1
+ import{existsSync as t,readdirSync as o,statSync as r}from"node:fs";import{dirname as i,join as e}from"node:path";import{g as n}from"./cli-9b88b99c.js";import"node-fetch";import"@web-std/file";import"node:crypto";import"commander";import"fs";import"child_process";import"open";import"path";import"ora";import"node:fs/promises";import"node:os";import"util";import"stream";import"http";import"https";import"url";import"crypto";import"net";import"tls";import"assert";import"tty";import"os";import"events";import"http2";import"zlib";import"node:readline/promises";import"dotenv";import"@logto/node";import"node:readline";import"node:stream";import"node:zlib";import"express";import"ws";import"node:child_process";import"minimatch";import"body-parser";function p(){var p;let m;try{m=n()}catch{return null}const s=null==(p=m)||null==(p=p.entries)?void 0:p[0];if(!s)return null;if(!s.log_location)return null;if("unity"!==s.editor&&"blender"!==s.editor)return null;if(!t(s.log_location))return null;const l=s.log_location,c=function(t,i){const n=new Set([i]);try{for(const i of o(t)){if(!i.toLowerCase().endsWith(".log"))continue;const o=e(t,i);try{if(!r(o).isFile())continue}catch{continue}n.add(o)}}catch{}return[...n]}(i(l),l);return{editor:s.editor,path:l,paths:c}}export{p as findActiveEditorLog};
package/dist/index.d.ts CHANGED
@@ -268,7 +268,7 @@ type AIChatGETResponse = {
268
268
  */
269
269
  pending_elicitation?: {
270
270
  action_id: string,
271
- kind: "ask" | "confirm_action",
271
+ kind: "ask" | "confirm_action" | "file_edit_permission",
272
272
  message: string,
273
273
  note?: string,
274
274
  options?: ElicitationOption[],
@@ -351,6 +351,8 @@ type ChatStreamEvent = { /** SSE event id for position tracking. */ id?: number
351
351
  | { type: "tool_call", name: string, display_name?: string | null, args: Record<string, any> }
352
352
  /** A tool finished executing. The AI will continue generating with the result. */
353
353
  | { type: "tool_result", name: string }
354
+ /** A local project file changed and can be restored using its checkpoint. */
355
+ | { type: "file_change", path: string, checkpoint_id: string, turn_id: string }
354
356
  /** User messages joined this generation between tool rounds. Start a new assistant message after them. */
355
357
  | { type: "message_inserted", messages: Array<{ id: string, content: string }>, assistant_message_id: string }
356
358
  /** An error occurred. Display `message` to the user. */
@@ -381,7 +383,7 @@ type ChatStreamEvent = { /** SSE event id for position tracking. */ id?: number
381
383
  | {
382
384
  type: "elicitation",
383
385
  action_id: string,
384
- kind: "ask" | "confirm_action",
386
+ kind: "ask" | "confirm_action" | "file_edit_permission",
385
387
  message: string,
386
388
  /** Secondary caveat shown smaller/muted under the question (e.g. usage note). */
387
389
  note?: string,
@@ -604,6 +606,10 @@ type ChatSessionHandle$1 = {
604
606
 
605
607
  /** Options for `ChatSessionHandle.sendMessage()` and `sendMessageSync()`. */
606
608
  type ChatSessionSendOptions$1 = {
609
+ /** Allow this chat to request local file edit approval. Defaults to false; this is not permission to write. */
610
+ allowFileEdits?: boolean,
611
+ /** Current local chat session ID used for a separate user approval. */
612
+ fileEditSessionId?: string,
607
613
  /** Full URL of the page (for context). */
608
614
  full_url?: string,
609
615
  /** Pathname of the page (for context). */