needle-cloud 2.4.1 → 2.4.2-next.1784812696.mini-pine.d618341

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";import"@caporal/core";import"fs";export{p as program}from"./cli-517295c7.js";import"dotenv";import"ora";import"open";import"crypto";import"buffer";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"assert";import"tty";import"os";import"zlib";import"events";import"node:readline/promises";import"@logto/node";import"node:readline";import"node:stream";import"node:zlib";import"express";import"ws";import"child_process";import"minimatch";import"body-parser";import"node:child_process";
1
+ import"node-fetch";import"@web-std/file";import"node:crypto";import"@caporal/core";import"fs";export{p as program}from"./cli-89fa0108.js";import"dotenv";import"ora";import"open";import"crypto";import"buffer";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"assert";import"tty";import"os";import"zlib";import"events";import"node:readline/promises";import"@logto/node";import"node:readline";import"node:stream";import"node:zlib";import"express";import"ws";import"child_process";import"minimatch";import"body-parser";import"node:child_process";
@@ -1 +1 @@
1
- import{existsSync as o,readdirSync as t,statSync as r}from"node:fs";import{dirname as i,join as e}from"node:path";import{g as n}from"./cli-517295c7.js";import"node-fetch";import"@web-std/file";import"node:crypto";import"@caporal/core";import"fs";import"open";import"crypto";import"buffer";import"path";import"ora";import"node:fs/promises";import"node:os";import"util";import"stream";import"http";import"https";import"url";import"assert";import"tty";import"os";import"zlib";import"events";import"node:readline/promises";import"dotenv";import"@logto/node";import"node:readline";import"node:stream";import"node:zlib";import"express";import"ws";import"child_process";import"minimatch";import"body-parser";import"node:child_process";function p(){var p;let m;try{m=n()}catch{return null}const l=null==(p=m)||null==(p=p.entries)?void 0:p[0];if(!l)return null;if(!l.log_location)return null;if("unity"!==l.editor&&"blender"!==l.editor)return null;if(!o(l.log_location))return null;const s=l.log_location,c=function(o,i){const n=new Set([i]);try{for(const i of t(o)){if(!i.toLowerCase().endsWith(".log"))continue;const t=e(o,i);try{if(!r(t).isFile())continue}catch{continue}n.add(t)}}catch{}return[...n]}(i(s),s);return{editor:l.editor,path:s,paths:c}}export{p as findActiveEditorLog};
1
+ import{existsSync as o,readdirSync as t,statSync as r}from"node:fs";import{dirname as i,join as e}from"node:path";import{g as n}from"./cli-89fa0108.js";import"node-fetch";import"@web-std/file";import"node:crypto";import"@caporal/core";import"fs";import"open";import"crypto";import"buffer";import"path";import"ora";import"node:fs/promises";import"node:os";import"util";import"stream";import"http";import"https";import"url";import"assert";import"tty";import"os";import"zlib";import"events";import"node:readline/promises";import"dotenv";import"@logto/node";import"node:readline";import"node:stream";import"node:zlib";import"express";import"ws";import"child_process";import"minimatch";import"body-parser";import"node:child_process";function p(){var p;let m;try{m=n()}catch{return null}const l=null==(p=m)||null==(p=p.entries)?void 0:p[0];if(!l)return null;if(!l.log_location)return null;if("unity"!==l.editor&&"blender"!==l.editor)return null;if(!o(l.log_location))return null;const s=l.log_location,c=function(o,i){const n=new Set([i]);try{for(const i of t(o)){if(!i.toLowerCase().endsWith(".log"))continue;const t=e(o,i);try{if(!r(t).isFile())continue}catch{continue}n.add(t)}}catch{}return[...n]}(i(s),s);return{editor:l.editor,path:s,paths:c}}export{p as findActiveEditorLog};
package/dist/index.d.ts CHANGED
@@ -94,8 +94,12 @@ declare namespace Auth {
94
94
  function requestAccessToken(org_id?: string | undefined | null): Promise<string>;
95
95
  /**
96
96
  * Initiate the sign-in process
97
+ * @param {{ signUp?: boolean }} [options] - signUp: land on the registration
98
+ * screen instead of sign-in (first_screen=register).
97
99
  */
98
- function signIn(): Promise<void>;
100
+ function signIn(options?: {
101
+ signUp?: boolean;
102
+ }): Promise<void>;
99
103
  /**
100
104
  * Get the user's default team/org ID from their Logto custom_data.
101
105
  * @returns {string | undefined}
@@ -410,6 +414,11 @@ type ChatSessionHandle$1 = {
410
414
  readChat(slug: string, options?: { offset?: number, limit?: number }): Promise<AIChatGETResponse>,
411
415
  /** List recent chats. */
412
416
  listChats(): Promise<RecentChatsResponse$1>,
417
+ /**
418
+ * Start a new chat: returns a fresh, unique slug. Pass it to `sendMessage` /
419
+ * `sendMessageSync` to begin the conversation (the chat is created on the first message).
420
+ */
421
+ newChat(): string,
413
422
  /** Update the tools registered with the server. No-op if no WS connection. */
414
423
  updateTools(tools: ToolDefinition$1[]): void,
415
424
  /** Most recent token usage info, auto-updated from `done` events. Null until first message completes. */
@@ -538,6 +547,19 @@ type OneTimePurchase = BaseLicense & {
538
547
  created_at: string,
539
548
  license?: string,
540
549
  seats?: number,
550
+ /** Prepaid credit packs included with this purchase. Each entry reports
551
+ * what the pack grants, how much of it is left, and when it expires. */
552
+ credits?: Array<{
553
+ /** What the pack grants, e.g. "ai_chat_tokens" (AI chat tokens),
554
+ * "material_generations", "optimizations". */
555
+ metric: string,
556
+ /** Units originally included with the purchase. */
557
+ granted: number,
558
+ /** Units still available. */
559
+ remaining: number,
560
+ /** When the pack expires (ISO timestamp), or null if it does not expire. */
561
+ expires_at: string | null,
562
+ }>,
541
563
  };
542
564
 
543
565
  type License = NeedleEngineLicense | NeedleCloudLicense | OneTimePurchase;
@@ -642,8 +664,8 @@ declare const CONTENT_TYPES: readonly ["3d-asset", "material", "deployment", "hd
642
664
  type ContentType = typeof CONTENT_TYPES[number];
643
665
 
644
666
  /** All known content formats. Runtime array for validation. */
645
- declare const CONTENT_FORMATS: readonly ["glb", "gltf", "usd", "usda", "usdz", "obj", "fbx", "vrm", "stl", "textures", "html", "exr", "pmrem"];
646
- /** File format — e.g. `glb`, `usdz`, `gltf`, `exr` (HDRI source), `pmrem` (engine-ready HDRI KTX2). */
667
+ declare const CONTENT_FORMATS: readonly ["glb", "gltf", "usd", "usda", "usdz", "obj", "fbx", "vrm", "stl", "ply", "splat", "spz", "ksplat", "sog", "sogs", "textures", "html", "exr", "hdr", "pmrem"];
668
+ /** File format — e.g. `glb`, `usdz`, `gltf`, `ply`/`splat`/`spz`/`ksplat`/`sog` (Gaussian splats), `exr` (HDRI source), `pmrem` (engine-ready HDRI KTX2). */
647
669
  type ContentFormat = typeof CONTENT_FORMATS[number];
648
670
  // #endregion
649
671