@personaai/runtime 0.5.3 → 0.6.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/README.md CHANGED
@@ -91,6 +91,7 @@ user; `resolveUser` returning `null` or throwing responds `401`.
91
91
  | `PATCH` | `/threads/:id` | `client.threads.update(id, {title?, isArchived?})` |
92
92
  | `DELETE` | `/threads/:id` | `client.threads.delete(id)` → `204` |
93
93
  | `GET` | `/threads/:id/messages` | `client.threads.getMessages(id)` — full history + graph state, the same data `chat.stream()` resumes from; load a past conversation on page reopen. |
94
+ | `POST` | `/threads/:id/reset` | `client.threads.reset(id)` — clears message history/files/todos/subagent traces in place, keeping the same Thread id/title. |
94
95
  | `GET` | `/agents` | `client.agents.list({page, limit, search, category, scope})` — read-only discovery, e.g. "let the user pick an agent." |
95
96
  | `GET` | `/files` | `client.files.list({page, limit})` |
96
97
  | `POST` | `/files` | `client.files.upload({filename, content, contentType?, agentId?, threadId?})` — multipart, `file` part required. `201` |
package/dist/index.cjs CHANGED
@@ -159,7 +159,7 @@ function evictStaleRuns(runs, now, graceMs = DEFAULT_RUN_GRACE_MS, maxTracked =
159
159
  }
160
160
 
161
161
  // src/version.ts
162
- var RUNTIME_VERSION = "0.5.3";
162
+ var RUNTIME_VERSION = "0.5.4";
163
163
 
164
164
  // src/routes/health.ts
165
165
  var alwaysOnCapabilities = {
@@ -738,6 +738,10 @@ var getThreadMessages = async (_request, ctx) => {
738
738
  const messages = await ctx.client.threads.getMessages(requireParam(ctx.params, "id"));
739
739
  return json(200, messages);
740
740
  };
741
+ var resetThread = async (_request, ctx) => {
742
+ const thread = await ctx.client.threads.reset(requireParam(ctx.params, "id"));
743
+ return json(200, thread);
744
+ };
741
745
 
742
746
  // src/routes/agents.ts
743
747
  var listAgents = async (request, ctx) => {
@@ -1279,6 +1283,7 @@ function buildRoutes(capabilities) {
1279
1283
  { method: "PATCH", pattern: ["threads", ":id"], handler: updateThread },
1280
1284
  { method: "DELETE", pattern: ["threads", ":id"], handler: deleteThread },
1281
1285
  { method: "GET", pattern: ["threads", ":id", "messages"], handler: getThreadMessages },
1286
+ { method: "POST", pattern: ["threads", ":id", "reset"], handler: resetThread },
1282
1287
  // Agents — read-only discovery always on; write ops behind agentsWrite.
1283
1288
  { method: "GET", pattern: ["agents"], handler: listAgents },
1284
1289
  // Files — always on, end-user-scoped uploads.