@gizai/cli 2.0.0 → 2.0.1

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/cli/giz.mjs CHANGED
@@ -2,7 +2,7 @@
2
2
  import { computerIdentity, managedRevision } from './computer-identity.mjs'
3
3
  import { checkForUpdate, explicitUpdate, installSource, maybeNotify } from './update.mjs'
4
4
  import { createHash, randomBytes } from 'node:crypto'
5
- import { openAsBlob } from 'node:fs'
5
+ import { openAsBlob, statSync } from 'node:fs'
6
6
  import { mkdir, readFile, rename, unlink, writeFile } from 'node:fs/promises'
7
7
  import { createServer } from 'node:http'
8
8
  import { once } from 'node:events'
@@ -229,6 +229,10 @@ async function api(baseUrl, pathname, data, options = {}) {
229
229
 
230
230
  async function uploadMedia(baseUrl, localFile) {
231
231
  const filePath = path.resolve(String(localFile))
232
+ // openAsBlob reports a missing or unreadable path only as "Unable to open file as blob".
233
+ let isFile = false
234
+ try { isFile = statSync(filePath).isFile() } catch {}
235
+ if (!isFile) throw new CliError(`Cannot read the file to upload: ${filePath}`, 'Check the path; it is resolved from the current directory.')
232
236
  const body = new FormData()
233
237
  body.append('file', await openAsBlob(filePath), path.basename(filePath))
234
238
  const response = await authenticatedFetch(baseUrl, new URL('/api/storage/media', baseUrl), {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gizai/cli",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "The official command-line interface for giz.ai: run AI models, Drive, Computers and Apps, and connect Claude Code, Codex and other agents over MCP.",
5
5
  "keywords": [
6
6
  "giz",
package/plugin.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
3
3
  "name": "giz",
4
- "version": "2.0.0",
4
+ "version": "2.0.1",
5
5
  "description": "Run Giz models, media generation, Drive, tables, Apps and Computers from any agent: the giz skill plus the Giz MCP server.",
6
6
  "author": { "name": "Giz", "url": "https://www.giz.ai" },
7
7
  "homepage": "https://www.giz.ai/mcp/",