codiedev 0.5.4 → 0.5.5
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/mcp.js +8 -1
- package/package.json +1 -1
package/dist/mcp.js
CHANGED
|
@@ -621,8 +621,15 @@ async function handlePull(args, config) {
|
|
|
621
621
|
throw new Error("key required");
|
|
622
622
|
const res = await (0, shared_1.apiRequest)("GET", "/api/cli/pull", { config, query: { key, version } });
|
|
623
623
|
const a = res.artifact;
|
|
624
|
+
// Lead with the new-vocab kind. Legacy doc-shape (spec/decision/...) is
|
|
625
|
+
// surfaced as a tag list after, so callers still see it but it's no
|
|
626
|
+
// longer the primary label. Falls back to "doc" if the row pre-dates the
|
|
627
|
+
// kind field.
|
|
628
|
+
const kindLabel = a.kind ?? "doc";
|
|
629
|
+
const tagList = (a.tags ?? []).filter((t) => t).join(", ");
|
|
630
|
+
const tagSuffix = tagList ? ` · tags: ${tagList}` : "";
|
|
624
631
|
const header = `# ${a.title}\n\n` +
|
|
625
|
-
`**${
|
|
632
|
+
`**${kindLabel}** · v${a.version ?? 1} · ${a.lifecycle ?? "draft"}${tagSuffix} · ` +
|
|
626
633
|
`updated ${(0, shared_1.timeAgo)(a.updatedAt ?? a.createdAt)}\n\n---\n\n`;
|
|
627
634
|
return {
|
|
628
635
|
content: [{ type: "text", text: header + a.markdown }],
|