@duckmind/dm-darwin-x64 0.67.6 → 0.67.8

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
@@ -8,7 +8,7 @@ Requires Node.js 22.19.0 or newer for bundled web access (including `undici`).
8
8
  If your Node.js is older, upgrade it before installing or updating DM.
9
9
  Install `@duckmind/dm`, not a platform package for a different OS.
10
10
 
11
- ## What's new in 0.67.6
11
+ ## What's new in 0.67.8
12
12
 
13
- Safe sudo self-update, Opus 5.5 OAuth compatibility, and refreshed bundled extensions.
13
+ Keep TUI drafts intact and enable context compaction only after /acm. Add GPT-6.2 Astra to the Codex model picker and explicit Ultra selection.
14
14
 
package/dm CHANGED
@@ -1,4 +1,4 @@
1
1
  [diffend] Oversized file quarantined before diffing.
2
2
  name: package/dm
3
3
  size: 79235648 bytes
4
- sha256: f0975e8914ed3e02cdf80c3fb8f5e530abdd216837a6f5076db52e1dd90f2579
4
+ sha256: e5791d308a3800a43d152398ac8d0c179d20b9a7f75511cd1fdd66b962627263
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "status": "ok",
3
- "prepared_at": "2026-11-16T08:53:01.554952+00:00",
3
+ "prepared_at": "2026-11-18T00:55:47.116812+00:00",
4
4
  "managed_entries": [
5
5
  {
6
6
  "id": "dm-context",
@@ -102,8 +102,8 @@
102
102
  "src/utils.js"
103
103
  ],
104
104
  "file_count": 3,
105
- "before_bytes": 32134,
106
- "after_bytes": 25217,
105
+ "before_bytes": 31991,
106
+ "after_bytes": 25110,
107
107
  "runtime_specifier_rewrites": 0,
108
108
  "runtime_filename_rewrites": 3,
109
109
  "declaration_files_removed": 0
@@ -2137,7 +2137,7 @@
2137
2137
  "tools/symbol-search.js"
2138
2138
  ],
2139
2139
  "file_count": 1129,
2140
- "before_bytes": 23266828,
2140
+ "before_bytes": 23266809,
2141
2141
  "after_bytes": 10681915,
2142
2142
  "runtime_specifier_rewrites": 16,
2143
2143
  "runtime_filename_rewrites": 543,
@@ -19,6 +19,8 @@ Use only these tools:
19
19
  - `context_timeline`
20
20
  - `context_compact`
21
21
 
22
+ If `context_compact` is unavailable, continue on the current branch using checkpoints and timeline. Only the user can enable compaction with `/acm`; do not prompt for it as a prerequisite for ordinary work.
23
+
22
24
  ## Working-set model
23
25
 
24
26
  Before choosing a tool, ask:
@@ -4,9 +4,6 @@ import {
4
4
  import { formatTokens } from "./utils.js";
5
5
  const InternalTools = ["context_checkpoint", "context_timeline", "context_compact"];
6
6
  const DmContextCustomMessageType = "dm-context";
7
- const AcmEnableFollowUp = "Agentic context management is now enabled";
8
- let CommandCtx = null;
9
- let CompactParams = null;
10
7
  const isInternal = (name) => InternalTools.includes(name);
11
8
  const formatContextUsage = (usage, includeTokens = false) => {
12
9
  if (usage?.percent == null)
@@ -65,10 +62,20 @@ const ContextCheckpointParams = Type.Object({
65
62
  target: Type.Optional(Type.String({ description: "Optional history node ID or checkpoint name to label. Defaults to the current meaningful position near the conversation head." }))
66
63
  });
67
64
  export default function src_default(pi) {
65
+ let commandContext = null;
66
+ let pending = null;
67
+ pi.on("session_shutdown", () => {
68
+ commandContext = null;
69
+ pending = null;
70
+ pi.unregisterTool("context_compact");
71
+ });
68
72
  pi.registerCommand("acm", {
69
73
  description: "Enable agentic context management for the current session",
70
74
  handler: async (args, ctx) => {
71
- CommandCtx = ctx;
75
+ if (!commandContext) {
76
+ commandContext = ctx;
77
+ registerCompact();
78
+ }
72
79
  ctx.ui.notify("Agentic Context Management enabled.", "info");
73
80
  if (args) {
74
81
  pi.sendUserMessage(args, { deliverAs: "followUp" });
@@ -301,24 +308,14 @@ export default function src_default(pi) {
301
308
  `) || "(Root Path Only)") }], details: {} };
302
309
  }
303
310
  });
304
- pi.registerTool({
311
+ const registerCompact = () => pi.registerTool({
305
312
  name: "context_compact",
306
313
  label: "Context Compact",
307
314
  description: ContextCompactDescription,
308
315
  parameters: ContextCompactParams,
309
316
  async execute(_id, params, _signal, _onUpdate, ctx) {
310
- if (!CommandCtx) {
311
- const editorText = ctx.ui.getEditorText();
312
- const followUp = editorText ? `${AcmEnableFollowUp}
313
- ${editorText}` : AcmEnableFollowUp;
314
- ctx.ui.setEditorText(`/acm ${followUp}`);
315
- return {
316
- content: [{
317
- type: "text",
318
- text: "Agentic context management is not enabled. Ask the user to run `/acm` in DM to enable it, then retry."
319
- }],
320
- details: {}
321
- };
317
+ if (!commandContext || commandContext.sessionManager !== ctx.sessionManager) {
318
+ throw new Error("Compaction is unavailable in this session.");
322
319
  }
323
320
  const sm = ctx.sessionManager;
324
321
  const usageBeforeText = formatContextUsage(ctx.getContextUsage());
@@ -334,34 +331,30 @@ ${editorText}` : AcmEnableFollowUp;
334
331
  const origin = currentLabel ? `checkpoint: ${currentLabel}` : currentLeaf || "unknown";
335
332
  const enrichedMessage = `(handoff summary from ${origin})
336
333
  ${params.summary}`;
337
- CompactParams = params;
338
- CompactParams.tid = tid;
339
- CompactParams.enrichedMessage = enrichedMessage;
340
- CompactParams.usageBeforeText = usageBeforeText;
334
+ pending = { ...params, tid, enrichedMessage, usageBeforeText };
341
335
  return { content: [{ type: "text", text: "compact start" }], details: {} };
342
336
  }
343
337
  });
344
338
  pi.on("turn_end", async (_event, ctx) => {
345
- if (!CompactParams) {
346
- return;
347
- }
348
- ctx.abort();
339
+ if (pending)
340
+ ctx.abort();
349
341
  });
350
342
  pi.on("agent_end", async (_event, ctx) => {
351
- if (!CompactParams) {
352
- return;
353
- }
354
- if (!CommandCtx) {
343
+ if (!pending || !commandContext) {
355
344
  return;
356
345
  }
357
346
  const sm = ctx.sessionManager;
358
- const compactParams = CompactParams;
359
- const commandCtx = CommandCtx;
360
- CompactParams = null;
347
+ const compactParams = pending;
348
+ const commandCtx = commandContext;
349
+ pending = null;
361
350
  const compactTurnLeaf = sm.getLeafId();
362
351
  setTimeout(async () => {
363
352
  try {
353
+ if (commandContext !== commandCtx)
354
+ return;
364
355
  await commandCtx.waitForIdle();
356
+ if (commandContext !== commandCtx)
357
+ return;
365
358
  const branch = sm.getBranch();
366
359
  if (didConversationAdvance(branch, compactTurnLeaf)) {
367
360
  commandCtx.ui.notify("context_compact cancelled: conversation advanced before compaction completed.", "warning");
@@ -380,11 +373,12 @@ ${params.summary}`;
380
373
  return;
381
374
  }
382
375
  const nid = sm.branchWithSummary(compactParams.tid, compactParams.enrichedMessage);
383
- compactParams.nid = nid;
384
376
  sm.branch(compactParams.tid);
385
- await commandCtx.navigateTree(compactParams.nid, {
377
+ await commandCtx.navigateTree(nid, {
386
378
  summarize: false
387
379
  });
380
+ if (commandContext !== commandCtx)
381
+ return;
388
382
  const usageAfter = commandCtx.getContextUsage();
389
383
  commandCtx.ui.notify([
390
384
  `Compacted to ${compactParams.target}${compactParams.target === compactParams.tid ? "" : `(${compactParams.tid})`}`,
@@ -402,6 +396,8 @@ ${params.summary}`;
402
396
  deliverAs: "followUp"
403
397
  });
404
398
  } catch (err) {
399
+ if (commandContext !== commandCtx)
400
+ return;
405
401
  const message = err instanceof Error ? err.message : String(err);
406
402
  commandCtx.ui.notify(`context_compact failed: ${message}`, "error");
407
403
  pi.sendMessage({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duckmind/dm-darwin-x64",
3
- "version": "0.67.6",
3
+ "version": "0.67.8",
4
4
  "description": "DuckMind (dm) binary payload for darwin x64",
5
5
  "license": "MIT",
6
6
  "os": [