@standardagents/code 0.9.8 → 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
@@ -5923,8 +5930,8 @@ var AGENT_ID_VARIANTS = [
5923
5930
  var OPENSAMA_AGENT_ID = "opensama_agent";
5924
5931
  var AGENT_CHOICES = [
5925
5932
  { id: "frontier_one", title: "Frontier One", description: "coming soon", disabled: true },
5926
- { id: AGENT_ID, title: "Unlimited One", description: "adaptive high/low routing" },
5927
- { id: OPENSAMA_AGENT_ID, title: "Sama One", description: "ChatGPT Pro sign-in required" },
5933
+ { id: AGENT_ID, title: "Unlimited One", description: "Standard Code's unlimited-usage coding agent" },
5934
+ { id: OPENSAMA_AGENT_ID, title: "Sama One", description: "coding on OpenAI with your ChatGPT account" },
5928
5935
  { id: "dario", title: "Dario", description: "unavailable", disabled: true }
5929
5936
  ];
5930
5937
  var PRODUCTION_ENDPOINT = "https://api.standardcode.ai";
@@ -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);