@standardagents/code 0.9.9 → 0.9.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/dist/index.js CHANGED
@@ -249,6 +249,13 @@ var ApiClient = class {
249
249
  async verify() {
250
250
  return (await this.verifyDetailed()).ok;
251
251
  }
252
+ /** Replace a thread's tags (published `PATCH /api/threads/:id { tags }`). */
253
+ async setThreadTags(threadId, tags) {
254
+ await this.json(`/api/threads/${threadId}`, {
255
+ method: "PATCH",
256
+ body: JSON.stringify({ tags })
257
+ });
258
+ }
252
259
  /**
253
260
  * Re-point a thread's ROOT agent (mid-session agent switch). The runtime
254
261
  * treats this as an explicit handoff: the full conversation is preserved
@@ -6840,6 +6847,12 @@ Run \`standardcode daemon install\` (or plain \`standardcode\`) once to sign in.
6840
6847
  await worker.start();
6841
6848
  void registerProject(api, identity, projectDir).catch(() => {
6842
6849
  });
6850
+ const rawPath = tags.find((t) => t.startsWith("path:"))?.slice("path:".length);
6851
+ if (rawPath && rawPath !== projectDir) {
6852
+ const fixed = tags.map((t) => t === `path:${rawPath}` ? `path:${projectDir}` : t);
6853
+ void api.setThreadTags(threadId, fixed).catch(() => {
6854
+ });
6855
+ }
6843
6856
  };
6844
6857
  const detach = (threadId) => {
6845
6858
  const worker = workers.get(threadId);