vessels 0.9.0 → 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.
Files changed (2) hide show
  1. package/dist/index.js +48 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -4156,7 +4156,13 @@ var AgentActivitySchema = external_exports.object({
4156
4156
  });
4157
4157
  var CardFieldSchema = external_exports.object({
4158
4158
  label: external_exports.string().min(1),
4159
- value: external_exports.string()
4159
+ value: external_exports.string(),
4160
+ // Optional: render the value as a tappable link, deep-linking the human into
4161
+ // your own web UI (e.g. an admin tray). Rendered on full-size cards (surface /
4162
+ // pinned-card detail), not the compact vessel-list preview.
4163
+ url: external_exports.string().url().max(2048).optional(),
4164
+ // Optional colour hint — pure styling, no behaviour. 'default' === unset.
4165
+ tone: external_exports.enum(["default", "success", "warning", "danger"]).optional()
4160
4166
  });
4161
4167
  var CardSchema = external_exports.object({
4162
4168
  // Optional: a glance-facts card under a surface takes its heading from the
@@ -4966,6 +4972,39 @@ Install the SDK:
4966
4972
  }
4967
4973
  console.log(`Full reference: https://vessels.app/llms-full.txt`);
4968
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
+ }
4969
5008
  var [, , cmd, sub, ...rest] = process.argv;
4970
5009
  var HELP = `
4971
5010
  vessels \u2014 CLI for Vessels (vessels.app)
@@ -5027,6 +5066,13 @@ Commands:
5027
5066
  Send a message as the logged-in user and print webhook delivery logs.
5028
5067
  Accepts vessel UUID or external_id (e.g. booking-123).
5029
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
+
5030
5076
  vessels validate <file.json>
5031
5077
  Check a push payload against the required syntax WITHOUT sending it.
5032
5078
  Also reads piped JSON (cat payload.json | vessels validate) or an inline
@@ -5103,6 +5149,7 @@ Run: vessels help`);
5103
5149
  Run: vessels help`);
5104
5150
  process.exit(1);
5105
5151
  }
5152
+ if (cmd === "conversation" || cmd === "trace") return cmdConversation([sub, ...rest].filter(Boolean));
5106
5153
  if (cmd === "feedback") return cmdFeedback([sub, ...rest].filter(Boolean));
5107
5154
  if (cmd === "push") return cmdPush([sub, ...rest].filter(Boolean));
5108
5155
  if (cmd === "message") return cmdMessage([sub, ...rest].filter(Boolean));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vessels",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "description": "Vessels CLI — manage your agent communication layer from the terminal",
5
5
  "type": "module",
6
6
  "bin": {