@agentprojectcontext/apx 1.49.0 → 1.50.1

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentprojectcontext/apx",
3
- "version": "1.49.0",
3
+ "version": "1.50.1",
4
4
  "description": "APX — unified CLI + daemon for the Agent Project Context (APC) standard.",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -32,7 +32,20 @@ export function register(app, { project, config }) {
32
32
  if (!p) return;
33
33
  const conv = readConversation(p.storagePath, req.params.slug, req.params.id);
34
34
  if (!conv) return res.status(404).json({ error: "conversation not found" });
35
- res.json(conv);
35
+ // Shape the response as the `ConversationDetail` the web client expects:
36
+ // `messages[]` (mapped from the parsed `turns`) + id/agent/channel. Without
37
+ // this the client's `detail.messages.filter(...)` throws on every load.
38
+ res.json({
39
+ id: req.params.id,
40
+ agent_slug: req.params.slug,
41
+ channel: conv.fm?.channel,
42
+ messages: (conv.turns || []).map((t) => ({
43
+ role: t.role,
44
+ content: t.content,
45
+ ts: t.ts,
46
+ })),
47
+ meta: conv.fm || {},
48
+ });
36
49
  });
37
50
 
38
51
  async function handleCompact(req, res, filename) {