@clawos-dev/clawd 0.2.510 → 0.2.512

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.
Files changed (2) hide show
  1. package/dist/cli.cjs +16 -16
  2. package/package.json +1 -1
package/dist/cli.cjs CHANGED
@@ -51884,6 +51884,10 @@ function codexAgentsCliArgs(cfg) {
51884
51884
  }
51885
51885
  return out;
51886
51886
  }
51887
+ function codexMemoriesCliArgs(ctx) {
51888
+ if (ctx.personaMode === "guest") return ["-c", "features.memories=false"];
51889
+ return ["-c", "features.memories=true", "-c", "memories.dedicated_tools=true"];
51890
+ }
51887
51891
  function threadStartParams(ctx) {
51888
51892
  const params = {
51889
51893
  cwd: ctx.cwd,
@@ -52405,6 +52409,7 @@ function createCodexSession(ctx, sink, deps = {}) {
52405
52409
  )
52406
52410
  );
52407
52411
  args.push(...codexAgentsCliArgs(loadCodexAgentsConfig({ cwd: ctx.cwd, logger: deps.logger })));
52412
+ args.push(...codexMemoriesCliArgs(ctx));
52408
52413
  const resolvedCodexHome = deps.codexHomeFor?.(ctx.cwd);
52409
52414
  const env = {
52410
52415
  ...process.env,
@@ -58736,7 +58741,8 @@ var GATEWAY_ROUTES = {
58736
58741
  healthz: () => "/healthz",
58737
58742
  session: (personaId2) => `/p/${encodeURIComponent(personaId2)}/session`,
58738
58743
  sessionSend: (personaId2, sessionId) => `/p/${encodeURIComponent(personaId2)}/session/${encodeURIComponent(sessionId)}`,
58739
- thread: (personaId2, threadId) => `/p/${encodeURIComponent(personaId2)}/threads/${encodeURIComponent(threadId)}`
58744
+ // 历史文件不挂在 persona 下:使用者的 codex-home 卷跨 persona 共用(design 2026-09-14-codex-native-memories §3.2f)
58745
+ thread: (threadId) => `/threads/${encodeURIComponent(threadId)}`
58740
58746
  };
58741
58747
  var trimSlash = (u) => u.replace(/\/+$/, "");
58742
58748
  var CLOUD_PERSONA_ID_SUFFIX = "-cloud";
@@ -58815,9 +58821,9 @@ var CloudGatewayClient = class {
58815
58821
  });
58816
58822
  }
58817
58823
  /** rollout 原文;404 = 没这条 thread(还没开过第一轮 / 卷被清)→ null */
58818
- async fetchRollout(personaId2, threadId) {
58824
+ async fetchRollout(threadId) {
58819
58825
  const { apiKey, gatewayUrl } = await this.credentials();
58820
- const res = await this.fetchImpl(gatewayUrl + GATEWAY_ROUTES.thread(personaId2, threadId), {
58826
+ const res = await this.fetchImpl(gatewayUrl + GATEWAY_ROUTES.thread(threadId), {
58821
58827
  headers: { authorization: `Bearer ${apiKey}` }
58822
58828
  });
58823
58829
  if (res.status === 404) return null;
@@ -59037,21 +59043,20 @@ var CloudCodexHistoryReader = class {
59037
59043
  return [];
59038
59044
  }
59039
59045
  async read(args) {
59040
- const personaId2 = this.personaOf(args.cwd);
59041
- const parent = await this.fetchThread(personaId2, args.toolSessionId);
59046
+ const parent = await this.fetchThread(args.toolSessionId);
59042
59047
  const messages = await withSubagentResults(
59043
59048
  parent,
59044
59049
  args.toolSessionId,
59045
- (agentId) => this.client.fetchRollout(personaId2, agentId),
59050
+ (agentId) => this.client.fetchRollout(agentId),
59046
59051
  this.logger
59047
59052
  );
59048
59053
  return pageMessages(messages, args);
59049
59054
  }
59050
59055
  async listSubagents(args) {
59051
- return subagentSummaries(await this.fetchThread(this.personaOf(args.cwd), args.toolSessionId));
59056
+ return subagentSummaries(await this.fetchThread(args.toolSessionId));
59052
59057
  }
59053
59058
  async readSubagent(args) {
59054
- const child = await this.fetchThread(this.personaOf(args.cwd), args.subagentId);
59059
+ const child = await this.fetchThread(args.subagentId);
59055
59060
  if (child.meta?.threadId !== args.subagentId || child.meta.parentThreadId !== args.toolSessionId) {
59056
59061
  throw new Error(
59057
59062
  `Codex subagent thread ${args.subagentId} does not belong to parent thread ${args.toolSessionId}`
@@ -59065,13 +59070,8 @@ var CloudCodexHistoryReader = class {
59065
59070
  listRewindableUserMessageIds() {
59066
59071
  return [];
59067
59072
  }
59068
- personaOf(cwd) {
59069
- const id = personaIdFromCloudCwd(cwd);
59070
- if (!id) throw new Error(`cloud session cwd has no persona: ${cwd}`);
59071
- return id;
59072
- }
59073
- async fetchThread(personaId2, threadId) {
59074
- const text = await this.client.fetchRollout(personaId2, threadId);
59073
+ async fetchThread(threadId) {
59074
+ const text = await this.client.fetchRollout(threadId);
59075
59075
  if (text === null) throw new Error(`Codex rollout not found for thread ${threadId}`);
59076
59076
  return parseCodexRollout(text);
59077
59077
  }
@@ -66899,7 +66899,7 @@ function computeMethodAccess(args) {
66899
66899
  }
66900
66900
 
66901
66901
  // src/version.ts
66902
- var version = "0.2.510".length > 0 ? "0.2.510" : "dev";
66902
+ var version = "0.2.512".length > 0 ? "0.2.512" : "dev";
66903
66903
 
66904
66904
  // src/cli-probe/probe.ts
66905
66905
  var fs77 = __toESM(require("fs"), 1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clawos-dev/clawd",
3
- "version": "0.2.510",
3
+ "version": "0.2.512",
4
4
  "description": "Standalone clawd daemon — Claude Code (and future Codex) session server over WebSocket",
5
5
  "type": "module",
6
6
  "license": "MIT",