@proofofprotocol/inscribe-mcp 0.3.8 → 0.3.10
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/package.json +1 -1
- package/src/cli/commands/show.js +23 -14
- package/src/server.js +1 -1
package/package.json
CHANGED
package/src/cli/commands/show.js
CHANGED
|
@@ -336,11 +336,11 @@ export const showCommand = new Command('show')
|
|
|
336
336
|
if (sequences.length === 0) {
|
|
337
337
|
console.log(colors.dim('No complete sequences found.'));
|
|
338
338
|
} else {
|
|
339
|
-
// LAN Analyzer style header
|
|
339
|
+
// LAN Analyzer style header (wider Details column: 55 chars)
|
|
340
340
|
console.log('');
|
|
341
|
-
console.log(colors.dim('
|
|
342
|
-
console.log(colors.dim('│ Timestamp │ Dir │ Phase │ Details
|
|
343
|
-
console.log(colors.dim('
|
|
341
|
+
console.log(colors.dim('┌──────────────┬───────┬────────────────────┬─────────────────────────────────────────────────────────┐'));
|
|
342
|
+
console.log(colors.dim('│ Timestamp │ Dir │ Phase │ Details │'));
|
|
343
|
+
console.log(colors.dim('├──────────────┼───────┼────────────────────┼─────────────────────────────────────────────────────────┤'));
|
|
344
344
|
|
|
345
345
|
// Direction symbols
|
|
346
346
|
const dirSymbols = {
|
|
@@ -358,14 +358,20 @@ export const showCommand = new Command('show')
|
|
|
358
358
|
};
|
|
359
359
|
|
|
360
360
|
for (const seq of sequences.slice(-8)) { // Last 8 sequences
|
|
361
|
-
// Sequence header
|
|
361
|
+
// Sequence header with date
|
|
362
362
|
const seqTime = new Date(seq.timestamp);
|
|
363
|
+
const dateStr = seqTime.toLocaleDateString('en-CA'); // YYYY-MM-DD format
|
|
363
364
|
const timeStr = seqTime.toLocaleTimeString('en-US', { hour12: false });
|
|
364
365
|
const msStr = String(seqTime.getMilliseconds()).padStart(3, '0');
|
|
365
366
|
|
|
367
|
+
// Show [tool] and date on the right
|
|
368
|
+
const toolLabel = `[${seq.tool}]`;
|
|
369
|
+
const dateLabel = colors.dim(dateStr);
|
|
370
|
+
const headerDetails = `${toolLabel} ${dateLabel}`.padEnd(55);
|
|
371
|
+
|
|
366
372
|
console.log(colors.dim('│') + colors.bold(` ${timeStr}.${msStr}`) + colors.dim(' │ │ ') +
|
|
367
|
-
colors.cyan(colors.bold(
|
|
368
|
-
colors.dim('
|
|
373
|
+
colors.cyan(colors.bold(toolLabel)) + ' ' + dateLabel +
|
|
374
|
+
' '.repeat(Math.max(0, 55 - toolLabel.length - 1 - dateStr.length)) + colors.dim(' │'));
|
|
369
375
|
|
|
370
376
|
for (const phase of seq.phases) {
|
|
371
377
|
const phaseTime = new Date(phase.timestamp);
|
|
@@ -403,7 +409,7 @@ export const showCommand = new Command('show')
|
|
|
403
409
|
}
|
|
404
410
|
}
|
|
405
411
|
|
|
406
|
-
// Chain → MCP phase: show status, duration, txId
|
|
412
|
+
// Chain → MCP phase: show status, duration, txId/hash
|
|
407
413
|
if (phase.phase === 'chain_to_mcp') {
|
|
408
414
|
if (phase.status) {
|
|
409
415
|
const statusColor = phase.status === 'SUCCESS' ? colors.green : colors.red;
|
|
@@ -412,12 +418,15 @@ export const showCommand = new Command('show')
|
|
|
412
418
|
if (phase.duration !== undefined) {
|
|
413
419
|
details.push(colors.yellow(`${phase.duration}ms`));
|
|
414
420
|
}
|
|
415
|
-
if (phase.resultPreview
|
|
416
|
-
|
|
417
|
-
|
|
421
|
+
if (phase.resultPreview) {
|
|
422
|
+
// Show txId (full Hedera format: 0.0.xxx@timestamp)
|
|
423
|
+
if (phase.resultPreview.txId) {
|
|
424
|
+
const txId = String(phase.resultPreview.txId);
|
|
425
|
+
details.push(colors.cyan(`tx:${txId}`));
|
|
426
|
+
}
|
|
418
427
|
}
|
|
419
428
|
if (phase.error) {
|
|
420
|
-
details.push(colors.red(phase.error.slice(0,
|
|
429
|
+
details.push(colors.red(phase.error.slice(0, 30)));
|
|
421
430
|
}
|
|
422
431
|
}
|
|
423
432
|
|
|
@@ -448,14 +457,14 @@ export const showCommand = new Command('show')
|
|
|
448
457
|
}
|
|
449
458
|
}
|
|
450
459
|
|
|
451
|
-
const detailStr = details.join(' ').slice(0,
|
|
460
|
+
const detailStr = details.join(' ').slice(0, 55).padEnd(55);
|
|
452
461
|
|
|
453
462
|
console.log(colors.dim('│ ') + `${pTimeStr}.${pMsStr}` + colors.dim(' │ ') +
|
|
454
463
|
dir + colors.dim(' │ ') + phaseLabel + colors.dim(' │ ') + detailStr + colors.dim(' │'));
|
|
455
464
|
}
|
|
456
465
|
}
|
|
457
466
|
|
|
458
|
-
console.log(colors.dim('
|
|
467
|
+
console.log(colors.dim('└──────────────┴───────┴────────────────────┴─────────────────────────────────────────────────────────┘'));
|
|
459
468
|
console.log('');
|
|
460
469
|
console.log(colors.dim(`Showing last ${Math.min(8, sequences.length)} of ${sequences.length} sequences`));
|
|
461
470
|
}
|
package/src/server.js
CHANGED