needle-cloud 2.9.0 → 2.10.0-rc.1791984447.e5bbdaf
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/CHANGELOG.md +22 -0
- package/README.md +69 -0
- package/bin/cli.js +8 -2
- package/dist/cli-a49d647a.js +63 -0
- package/dist/cli.esm.js +1 -1
- package/dist/cli.send-logs.discovery-e22d7ff5.js +1 -0
- package/dist/index.d.ts +1251 -1045
- package/dist/index.esm.js +1 -1
- package/package.json +2 -2
- package/dist/cli-66ceb720.js +0 -63
- package/dist/cli.send-logs.discovery-ecfe98f2.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,28 @@ All notable changes to this package will be documented in this file.
|
|
|
4
4
|
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
|
5
5
|
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [2.10.0] - 2026-10-14
|
|
8
|
+
### Added
|
|
9
|
+
- `upload --wait` to wait for a selected optimized asset and optionally download it with `--outdir`.
|
|
10
|
+
- `--format json`, `--format source-url`, and `--format edit-url` on upload and optimize commands, with pinned source identities and separately labeled optimized URLs.
|
|
11
|
+
- `mcp` stdio support that starts or reuses the shared local server and keeps browser/Inspector tools available through the bridge.
|
|
12
|
+
- `status` to inspect the local server, port and process ID.
|
|
13
|
+
- Runtime snapshot read helpers in the browser SDK.
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
- Upload and optimize use one workflow; optimize remains compatible shorthand for upload with waiting enabled.
|
|
17
|
+
- Upload progress and diagnostics go to stderr so structured and scalar output can be used reliably in scripts.
|
|
18
|
+
- Grouped directory uploads return a source-file URL list in JSON; source-url output requires a single file.
|
|
19
|
+
- Local file tools enforce project boundaries, refuse sensitive files and hard-link aliases, and redact recognizable secrets before reads, searches and previews.
|
|
20
|
+
- Local MCP requests validate loopback hosts and browser origins; the stdio bridge attaches local credentials automatically.
|
|
21
|
+
|
|
22
|
+
### Fixed
|
|
23
|
+
- Healthy idle MCP notification streams no longer repeatedly disconnect and reconnect.
|
|
24
|
+
- MCP agent names are preserved through the stdio bridge.
|
|
25
|
+
- Upload and optimize accept environment access tokens without requiring an interactive login.
|
|
26
|
+
- `--progressive false` is respected when selecting an optimization variant.
|
|
27
|
+
- Development SDK sign-in callbacks work with local authentication tunnels.
|
|
28
|
+
|
|
7
29
|
## [2.9.0] - 2026-10-01
|
|
8
30
|
### Added
|
|
9
31
|
- Approved local project commands for creating Needle projects, installing packages, building, and deploying from Cloud chat.
|
package/README.md
CHANGED
|
@@ -35,6 +35,51 @@ npx needle-cloud help <command> # Help for a specific command
|
|
|
35
35
|
- `start` — Start the local server for licensing, editor integrations, and MCP tools
|
|
36
36
|
- `settings` — View CLI settings, including [local tool access for Needle Cloud AI](#local-tools-in-needle-cloud-ai)
|
|
37
37
|
|
|
38
|
+
## Upload assets
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
# Upload the source; processing continues in the background
|
|
42
|
+
npx needle-cloud upload ./model.glb --team "My Team"
|
|
43
|
+
|
|
44
|
+
# Print only the URL for this exact uploaded source file
|
|
45
|
+
npx needle-cloud upload ./model.glb --format source-url
|
|
46
|
+
|
|
47
|
+
# Return source identity and links as JSON
|
|
48
|
+
npx needle-cloud upload ./models --format json
|
|
49
|
+
|
|
50
|
+
# Wait for optimization and download the result
|
|
51
|
+
npx needle-cloud upload ./model.glb --wait --outdir ./optimized
|
|
52
|
+
|
|
53
|
+
# Existing scripts continue to work
|
|
54
|
+
npx needle-cloud optimize ./model.glb --outdir ./optimized
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Use `--no-optimize` to upload without requesting processing. `--wait` selects the
|
|
58
|
+
optimized variant with `--progressive true|false` and `--usecase product|world`.
|
|
59
|
+
The latter options and `--outdir` require waiting. `optimize` always waits.
|
|
60
|
+
|
|
61
|
+
Both commands support `--format cli` (default), `json`, `source-url`, and
|
|
62
|
+
`edit-url`. Progress and diagnostics, including `--verbose` output, go to stderr;
|
|
63
|
+
stdout contains only the selected result. Errors produce a nonzero exit code.
|
|
64
|
+
Authentication supports saved login, `--token`, or `NEEDLE_CLOUD_TOKEN`; `--team`
|
|
65
|
+
selects the team for saved-login uploads. Access tokens retain their team scope.
|
|
66
|
+
|
|
67
|
+
JSON contains `assetId`, `versionId`, `editUrl`, `sourceUrl`, `optimizedUrl`,
|
|
68
|
+
`processingStatus`, and `files`. Source URLs are pinned to the uploaded version;
|
|
69
|
+
optimization never changes `versionId` or the source links. After waiting,
|
|
70
|
+
`optimizedUrl` is pinned to the selected optimization and `optimization` describes
|
|
71
|
+
its version, progressive setting and use case.
|
|
72
|
+
|
|
73
|
+
Folders are collected recursively into one grouped upload, preserving current
|
|
74
|
+
behavior. The JSON `files` array contains a path and source URL for every uploaded
|
|
75
|
+
file. `sourceUrl` is null for a multi-file upload; `--format source-url` refuses
|
|
76
|
+
multiple files before uploading. `edit-url` returns the group's management URL.
|
|
77
|
+
|
|
78
|
+
Without waiting, `processingStatus` is `unknown`: background processing is not
|
|
79
|
+
queried. `--no-optimize` reports `not_requested` for this invocation; it does not
|
|
80
|
+
cancel processing from earlier uploads. Waiting reports `completed` for the
|
|
81
|
+
requested variant, which can differ from other background processing jobs.
|
|
82
|
+
|
|
38
83
|
Manage stored content by using the identifier shown by `list`:
|
|
39
84
|
|
|
40
85
|
```bash
|
|
@@ -93,6 +138,30 @@ npx needle-cloud settings local-project-commands false
|
|
|
93
138
|
|
|
94
139
|
Both settings are enabled by default, but Needle Cloud chat still asks for approval before it edits a file or starts a project command. A Cloud approval cannot override a disabled local setting. Pass `true` to either command to turn that capability back on. Project commands cover creating a Needle project, installing packages, running its build or dev script, and deploying an existing build. These commands can run project or package scripts; a deployment publishes files to the selected team. `needle-cloud settings` shows the current values.
|
|
95
140
|
|
|
141
|
+
To find the local server's version and process ID (for example, in Task Manager):
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
npx needle-cloud status
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
This only checks the running server. It does not start or restart it. For older
|
|
148
|
+
servers, a PID read from the local server record is labeled `recorded`.
|
|
149
|
+
|
|
150
|
+
For AI clients that support stdio, use:
|
|
151
|
+
|
|
152
|
+
```toml
|
|
153
|
+
[mcp_servers.needle]
|
|
154
|
+
command = "npx"
|
|
155
|
+
args = ["-y", "needle-cloud", "mcp"]
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
On Windows, use `npx.cmd` if your client cannot resolve `npx`.
|
|
159
|
+
The command reuses or starts the local server, exposes its tools over stdio,
|
|
160
|
+
and reconnects if that server restarts. Inspector and Unity tools appear as
|
|
161
|
+
those apps connect. Closing the AI client stops its stdio process; the shared
|
|
162
|
+
local server stays available to other apps. Cloud access follows your
|
|
163
|
+
`remote-ai-tools` setting and requires a signed-in account.
|
|
164
|
+
|
|
96
165
|
See the [Needle MCP documentation](https://engine.needle.tools/docs/ai/needle-mcp-server) for available tools and how to connect other AI assistants.
|
|
97
166
|
|
|
98
167
|
## CI/CD
|
package/bin/cli.js
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import { Console } from 'node:console';
|
|
3
|
+
// Configure diagnostics before loading the bundle, including SDK/startup logs.
|
|
4
|
+
// Result output uses process.stdout.write explicitly in the upload action.
|
|
5
|
+
if (process.argv[2] === 'upload' || process.argv[2] === 'optimize') {
|
|
6
|
+
globalThis.console = new Console({stdout:process.stderr,stderr:process.stderr});
|
|
7
|
+
}
|
|
8
|
+
const { program } = await import('../dist/cli.esm.js');
|
|
9
|
+
program.run();
|