@amirhosseinnateghi/vibed-cli 0.1.5 → 0.1.6
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/index.js +18 -3
- package/dist/vibed.cjs +18 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5983,6 +5983,7 @@ import { homedir } from "node:os";
|
|
|
5983
5983
|
import { join } from "node:path";
|
|
5984
5984
|
import { mkdir, readFile, writeFile, chmod } from "node:fs/promises";
|
|
5985
5985
|
var DEFAULT_API = "https://vibed.city";
|
|
5986
|
+
var LEGACY_API_DEFAULTS = /* @__PURE__ */ new Set(["https://web-production-834c9.up.railway.app"]);
|
|
5986
5987
|
var dir = () => join(homedir(), ".vibed");
|
|
5987
5988
|
var file = () => join(dir(), "config.json");
|
|
5988
5989
|
async function readFileConfig() {
|
|
@@ -5994,7 +5995,8 @@ async function readFileConfig() {
|
|
|
5994
5995
|
}
|
|
5995
5996
|
async function loadConfig(overrides = {}) {
|
|
5996
5997
|
const fromFile = await readFileConfig();
|
|
5997
|
-
|
|
5998
|
+
let apiBase = (overrides.api || process.env.VIBED_API || fromFile.apiBase || DEFAULT_API).replace(/\/$/, "");
|
|
5999
|
+
if (LEGACY_API_DEFAULTS.has(apiBase)) apiBase = DEFAULT_API;
|
|
5998
6000
|
const token = process.env.VIBED_TOKEN || fromFile.token;
|
|
5999
6001
|
return { apiBase, token };
|
|
6000
6002
|
}
|
|
@@ -10371,13 +10373,19 @@ var turnAttachmentSchema = external_exports.object({
|
|
|
10371
10373
|
// NUL bytes break Postgres jsonb (and mean binary-not-text) — strip defensively.
|
|
10372
10374
|
text: external_exports.string().max(5e4).transform((t) => t.replace(/\u0000/g, "")).optional()
|
|
10373
10375
|
});
|
|
10376
|
+
var voiceInputSchema = external_exports.object({
|
|
10377
|
+
key: external_exports.string().min(1).max(300),
|
|
10378
|
+
mime: external_exports.string().max(100).default("audio/webm")
|
|
10379
|
+
});
|
|
10374
10380
|
var createTurnRequestSchema = external_exports.object({
|
|
10375
10381
|
clientTurnId: external_exports.string().uuid(),
|
|
10376
10382
|
content: external_exports.string().max(4e3).default(""),
|
|
10377
10383
|
attachments: external_exports.array(turnAttachmentSchema).max(6).optional(),
|
|
10384
|
+
// A voice turn carries no text yet — the worker transcribes `voice` first (م۷).
|
|
10385
|
+
voice: voiceInputSchema.optional(),
|
|
10378
10386
|
model: external_exports.string().max(100).optional()
|
|
10379
|
-
}).refine((v) => v.content.trim().length > 0 || (v.attachments?.length ?? 0) > 0, {
|
|
10380
|
-
message: "Send a message or
|
|
10387
|
+
}).refine((v) => v.content.trim().length > 0 || (v.attachments?.length ?? 0) > 0 || !!v.voice, {
|
|
10388
|
+
message: "Send a message, an attachment, or a voice recording."
|
|
10381
10389
|
});
|
|
10382
10390
|
var builderAttachmentSchema = external_exports.object({
|
|
10383
10391
|
kind: external_exports.enum(["image", "file", "audio"]),
|
|
@@ -10511,6 +10519,13 @@ var buildEventSchema = external_exports.discriminatedUnion("type", [
|
|
|
10511
10519
|
}),
|
|
10512
10520
|
/** Friendly status chip ("index.html", "Fixing a couple of things…"). */
|
|
10513
10521
|
external_exports.object({ ...base, type: external_exports.literal("status"), summary: external_exports.string() }),
|
|
10522
|
+
/**
|
|
10523
|
+
* The user's spoken words, transcribed server-side (م۷). A voice turn starts
|
|
10524
|
+
* with empty `userText` and a "🎤 Transcribing…" bubble; this event fills the
|
|
10525
|
+
* user bubble with the transcript the moment the worker finishes transcribing,
|
|
10526
|
+
* before the build's prose begins.
|
|
10527
|
+
*/
|
|
10528
|
+
external_exports.object({ ...base, type: external_exports.literal("transcript"), text: external_exports.string() }),
|
|
10514
10529
|
/** First-message category classification. */
|
|
10515
10530
|
external_exports.object({ ...base, type: external_exports.literal("category"), category: external_exports.string() }),
|
|
10516
10531
|
/** The validated draft landed. Preview loads it from the draft URL. */
|
package/dist/vibed.cjs
CHANGED
|
@@ -5984,6 +5984,7 @@ var import_node_os = require("node:os");
|
|
|
5984
5984
|
var import_node_path = require("node:path");
|
|
5985
5985
|
var import_promises = require("node:fs/promises");
|
|
5986
5986
|
var DEFAULT_API = "https://vibed.city";
|
|
5987
|
+
var LEGACY_API_DEFAULTS = /* @__PURE__ */ new Set(["https://web-production-834c9.up.railway.app"]);
|
|
5987
5988
|
var dir = () => (0, import_node_path.join)((0, import_node_os.homedir)(), ".vibed");
|
|
5988
5989
|
var file = () => (0, import_node_path.join)(dir(), "config.json");
|
|
5989
5990
|
async function readFileConfig() {
|
|
@@ -5995,7 +5996,8 @@ async function readFileConfig() {
|
|
|
5995
5996
|
}
|
|
5996
5997
|
async function loadConfig(overrides = {}) {
|
|
5997
5998
|
const fromFile = await readFileConfig();
|
|
5998
|
-
|
|
5999
|
+
let apiBase = (overrides.api || process.env.VIBED_API || fromFile.apiBase || DEFAULT_API).replace(/\/$/, "");
|
|
6000
|
+
if (LEGACY_API_DEFAULTS.has(apiBase)) apiBase = DEFAULT_API;
|
|
5999
6001
|
const token = process.env.VIBED_TOKEN || fromFile.token;
|
|
6000
6002
|
return { apiBase, token };
|
|
6001
6003
|
}
|
|
@@ -10372,13 +10374,19 @@ var turnAttachmentSchema = external_exports.object({
|
|
|
10372
10374
|
// NUL bytes break Postgres jsonb (and mean binary-not-text) — strip defensively.
|
|
10373
10375
|
text: external_exports.string().max(5e4).transform((t) => t.replace(/\u0000/g, "")).optional()
|
|
10374
10376
|
});
|
|
10377
|
+
var voiceInputSchema = external_exports.object({
|
|
10378
|
+
key: external_exports.string().min(1).max(300),
|
|
10379
|
+
mime: external_exports.string().max(100).default("audio/webm")
|
|
10380
|
+
});
|
|
10375
10381
|
var createTurnRequestSchema = external_exports.object({
|
|
10376
10382
|
clientTurnId: external_exports.string().uuid(),
|
|
10377
10383
|
content: external_exports.string().max(4e3).default(""),
|
|
10378
10384
|
attachments: external_exports.array(turnAttachmentSchema).max(6).optional(),
|
|
10385
|
+
// A voice turn carries no text yet — the worker transcribes `voice` first (م۷).
|
|
10386
|
+
voice: voiceInputSchema.optional(),
|
|
10379
10387
|
model: external_exports.string().max(100).optional()
|
|
10380
|
-
}).refine((v) => v.content.trim().length > 0 || (v.attachments?.length ?? 0) > 0, {
|
|
10381
|
-
message: "Send a message or
|
|
10388
|
+
}).refine((v) => v.content.trim().length > 0 || (v.attachments?.length ?? 0) > 0 || !!v.voice, {
|
|
10389
|
+
message: "Send a message, an attachment, or a voice recording."
|
|
10382
10390
|
});
|
|
10383
10391
|
var builderAttachmentSchema = external_exports.object({
|
|
10384
10392
|
kind: external_exports.enum(["image", "file", "audio"]),
|
|
@@ -10512,6 +10520,13 @@ var buildEventSchema = external_exports.discriminatedUnion("type", [
|
|
|
10512
10520
|
}),
|
|
10513
10521
|
/** Friendly status chip ("index.html", "Fixing a couple of things…"). */
|
|
10514
10522
|
external_exports.object({ ...base, type: external_exports.literal("status"), summary: external_exports.string() }),
|
|
10523
|
+
/**
|
|
10524
|
+
* The user's spoken words, transcribed server-side (م۷). A voice turn starts
|
|
10525
|
+
* with empty `userText` and a "🎤 Transcribing…" bubble; this event fills the
|
|
10526
|
+
* user bubble with the transcript the moment the worker finishes transcribing,
|
|
10527
|
+
* before the build's prose begins.
|
|
10528
|
+
*/
|
|
10529
|
+
external_exports.object({ ...base, type: external_exports.literal("transcript"), text: external_exports.string() }),
|
|
10515
10530
|
/** First-message category classification. */
|
|
10516
10531
|
external_exports.object({ ...base, type: external_exports.literal("category"), category: external_exports.string() }),
|
|
10517
10532
|
/** The validated draft landed. Preview loads it from the draft URL. */
|