vessels 0.9.1 → 0.10.0
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 +41 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4972,6 +4972,39 @@ Install the SDK:
|
|
|
4972
4972
|
}
|
|
4973
4973
|
console.log(`Full reference: https://vessels.app/llms-full.txt`);
|
|
4974
4974
|
}
|
|
4975
|
+
async function cmdConversation(args) {
|
|
4976
|
+
const flags = parseFlags(args);
|
|
4977
|
+
const vessel = flags.vessel ?? args.find((a) => !a.startsWith("--"));
|
|
4978
|
+
if (!vessel) {
|
|
4979
|
+
console.error("Usage: vessels conversation <vessel> [--out <file.json>] [--limit <n>]");
|
|
4980
|
+
process.exit(1);
|
|
4981
|
+
}
|
|
4982
|
+
const vesselId = await resolveVesselId(vessel);
|
|
4983
|
+
const qs = flags.limit ? `?limit=${encodeURIComponent(flags.limit)}` : "";
|
|
4984
|
+
const data = await api(`/api/v1/vessels/${vesselId}/trace${qs}`);
|
|
4985
|
+
const trace = data.trace;
|
|
4986
|
+
const outPath = resolve(flags.out ?? `vessels-trace-${vessel.replace(/[^a-zA-Z0-9_-]/g, "_")}.json`);
|
|
4987
|
+
writeFileSync(outPath, JSON.stringify(trace, null, 2));
|
|
4988
|
+
const s = trace.summary;
|
|
4989
|
+
console.log(`
|
|
4990
|
+
Wrote ${s.events} events \u2192 ${outPath}`);
|
|
4991
|
+
console.log(` ${s.requests} agent calls \xB7 ${s.degraded} degraded \xB7 ${s.rejected} rejected \xB7 ${s.webhookFailures} webhook failures`);
|
|
4992
|
+
if (!trace.verbose) {
|
|
4993
|
+
console.log(` note: workspace not in debug mode \u2014 request bodies weren't captured, so agent calls are absent.`);
|
|
4994
|
+
}
|
|
4995
|
+
if (s.issues.length) {
|
|
4996
|
+
console.log(`
|
|
4997
|
+
${s.issues.length} issue(s) \u2014 read these first:
|
|
4998
|
+
`);
|
|
4999
|
+
for (const i of s.issues) {
|
|
5000
|
+
const where = i.endpoint ? ` ${i.endpoint}` : "";
|
|
5001
|
+
console.log(` [#${i.seq} ${i.severity}] ${i.code}${i.field ? ` (${i.field})` : ""}${where}`);
|
|
5002
|
+
console.log(` ${i.message}`);
|
|
5003
|
+
if (i.hint) console.log(` \u2192 ${i.hint}`);
|
|
5004
|
+
}
|
|
5005
|
+
}
|
|
5006
|
+
console.log("");
|
|
5007
|
+
}
|
|
4975
5008
|
var [, , cmd, sub, ...rest] = process.argv;
|
|
4976
5009
|
var HELP = `
|
|
4977
5010
|
vessels \u2014 CLI for Vessels (vessels.app)
|
|
@@ -5033,6 +5066,13 @@ Commands:
|
|
|
5033
5066
|
Send a message as the logged-in user and print webhook delivery logs.
|
|
5034
5067
|
Accepts vessel UUID or external_id (e.g. booking-123).
|
|
5035
5068
|
|
|
5069
|
+
vessels conversation <vessel> [--out <file.json>] [--limit <n>]
|
|
5070
|
+
Replay a vessel to a JSON trace file for debugging an agent run: a single
|
|
5071
|
+
timeline of your agent's calls (with the sent-vs-applied diff \u2014 which fields
|
|
5072
|
+
actually landed), the messages that rendered, agent-activity step timing,
|
|
5073
|
+
human responses and webhook deliveries. Prints a summary + issues; the full
|
|
5074
|
+
trace goes to the file. Accepts vessel UUID or external_id.
|
|
5075
|
+
|
|
5036
5076
|
vessels validate <file.json>
|
|
5037
5077
|
Check a push payload against the required syntax WITHOUT sending it.
|
|
5038
5078
|
Also reads piped JSON (cat payload.json | vessels validate) or an inline
|
|
@@ -5109,6 +5149,7 @@ Run: vessels help`);
|
|
|
5109
5149
|
Run: vessels help`);
|
|
5110
5150
|
process.exit(1);
|
|
5111
5151
|
}
|
|
5152
|
+
if (cmd === "conversation" || cmd === "trace") return cmdConversation([sub, ...rest].filter(Boolean));
|
|
5112
5153
|
if (cmd === "feedback") return cmdFeedback([sub, ...rest].filter(Boolean));
|
|
5113
5154
|
if (cmd === "push") return cmdPush([sub, ...rest].filter(Boolean));
|
|
5114
5155
|
if (cmd === "message") return cmdMessage([sub, ...rest].filter(Boolean));
|