@vibiz/cli 0.3.12 → 0.3.15

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # vibiz
2
2
 
3
- The [Vibiz Stack](https://app.vibiz.app/docs) CLI and MCP server: website, database, sign-in, email
3
+ The [thelastapi](https://app.vibiz.app/docs) CLI and MCP server: website, database, sign-in, email
4
4
  and AI for a new business, from a terminal or an AI agent.
5
5
 
6
6
  ```bash
@@ -14,7 +14,7 @@ Or install it once: `npm install -g @vibiz/cli`, then run `vibiz …`.
14
14
 
15
15
  ## MCP server
16
16
 
17
- `vibiz mcp` serves the Vibiz tools (and the docs, as resources) to any MCP client over stdio. It
17
+ `vibiz mcp` serves the thelastapi tools (and the docs, as resources) to any MCP client over stdio. It
18
18
  uses the same login as the CLI, or `VIBIZ_API_KEY` / `VIBIZ_API_URL` from its env.
19
19
 
20
20
  ```bash
@@ -7,7 +7,7 @@ function noBodyMessage(status) {
7
7
  if (status === 413) return "Too large (413): send less at once.";
8
8
  if (status === 429) return "Too many requests (429): wait a moment and retry.";
9
9
  if (status >= 500) {
10
- return `The Vibiz API did not answer properly (${status}). It is usually brief: retry in a minute.`;
10
+ return `The thelastapi API did not answer properly (${status}). It is usually brief: retry in a minute.`;
11
11
  }
12
12
  return `The request failed with ${status} and no explanation from the API.`;
13
13
  }
@@ -43,7 +43,7 @@ var Vibiz = class {
43
43
  constructor(options) {
44
44
  this.options = options;
45
45
  if (!options.baseUrl) {
46
- throw new Error("No Vibiz API URL: pass baseUrl (CLI: --api, or VIBIZ_API_URL).");
46
+ throw new Error("No thelastapi API URL: pass baseUrl (CLI: --api, or VIBIZ_API_URL).");
47
47
  }
48
48
  this.baseUrl = options.baseUrl.replace(/\/$/, "");
49
49
  this.fetchImpl = options.fetch ?? globalThis.fetch;
@@ -56,6 +56,7 @@ var Vibiz = class {
56
56
  if (init.body !== void 0) headers["content-type"] = "application/json";
57
57
  if (init.raw) headers["content-type"] = init.contentType ?? "application/octet-stream";
58
58
  if (init.idempotencyKey) headers["idempotency-key"] = init.idempotencyKey;
59
+ if (init.project) headers["x-vibiz-project"] = init.project;
59
60
  if (this.options.user) headers["x-vibiz-user"] = endUserHeader(this.options.user);
60
61
  if (this.options.client) headers["x-vibiz-client"] = this.options.client;
61
62
  return this.fetchImpl(`${this.baseUrl}/v1${path}`, {
@@ -1221,6 +1222,22 @@ var Vibiz = class {
1221
1222
  const tail = qs2.size ? `?${qs2}` : "";
1222
1223
  return this.request(`/ai/models${tail}`).then((r) => r.data);
1223
1224
  },
1225
+ /**
1226
+ * Every image and video model that runs by its id (Kling, Seedance,
1227
+ * face swap, upscalers…), with its live price. Run one with
1228
+ * `jobs.create({ type, model: id, input: { prompt, model_input } })`:
1229
+ * charged from credits.
1230
+ */
1231
+ mediaModels: (opts = {}) => {
1232
+ const qs2 = new URLSearchParams();
1233
+ if (opts.q) qs2.set("q", opts.q);
1234
+ if (opts.category) qs2.set("category", opts.category);
1235
+ if (opts.limit) qs2.set("limit", String(opts.limit));
1236
+ const tail = qs2.size ? `?${qs2}` : "";
1237
+ return this.request(`/ai/media-models${tail}`).then(
1238
+ (r) => r.data
1239
+ );
1240
+ },
1224
1241
  jobs: {
1225
1242
  create: (input, opts = {}) => this.request("/ai/jobs", { method: "POST", body: input, ...opts }),
1226
1243
  get: (id) => this.request(`/ai/jobs/${id}`),
@@ -1740,7 +1757,7 @@ function deployPathProblem(path) {
1740
1757
  return "looks like a credential (a private key or a token file), which is never deployed";
1741
1758
  if (PRIVATE_DIRS.includes(part)) return `is inside ${part}, a home or config folder`;
1742
1759
  if (IGNORED.has(part))
1743
- return part === "vibiz.json" ? "is vibiz.json, the local link to the project, which is never deployed" : `is inside ${part}, which is never deployed (dependencies, VCS data or build output: Vibiz installs and builds the app itself)`;
1760
+ return part === "vibiz.json" ? "is vibiz.json, the local link to the project, which is never deployed" : `is inside ${part}, which is never deployed (dependencies, VCS data or build output: thelastapi installs and builds the app itself)`;
1744
1761
  }
1745
1762
  return null;
1746
1763
  }
@@ -1980,14 +1997,14 @@ function formatMinor(minor, currency) {
1980
1997
  }
1981
1998
 
1982
1999
  // packages/sdk/src/one-key.ts
1983
- var APP_SDK_VERSION = "0.3.12";
2000
+ var APP_SDK_VERSION = "0.3.15";
1984
2001
  var ONE_KEY_GIVES = "database, sign-in, email and inbox, AI models, files, payments, analytics with session replays, web data, social, phone and connectors";
1985
2002
  function oneKeyMessage(url, host) {
1986
2003
  const where = host ?? "your host";
1987
- return `Add one key to ${where} and your app can use everything on Vibiz (${ONE_KEY_GIVES}): copy VIBIZ_APP_KEY here: ${url} , paste it into ${host ? `${host}'s` : "your host's"} production environment variables, and redeploy.`;
2004
+ return `Add one key to ${where} and your app can use everything on thelastapi (${ONE_KEY_GIVES}): copy VIBIZ_APP_KEY here: ${url} , paste it into ${host ? `${host}'s` : "your host's"} production environment variables, and redeploy.`;
1988
2005
  }
1989
2006
  function connectHostMessage(kind, host) {
1990
- return `Or connect ${host ?? "the host"} once (vibiz hosts add ${kind ?? "<host>"} <app>) and Vibiz keeps every variable in sync.`;
2007
+ return `Or connect ${host ?? "the host"} once (vibiz hosts add ${kind ?? "<host>"} <app>) and thelastapi keeps every variable in sync.`;
1991
2008
  }
1992
2009
 
1993
2010
  export {