instar 1.3.311 → 1.3.313

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 (48) hide show
  1. package/dist/commands/server.d.ts.map +1 -1
  2. package/dist/commands/server.js +8 -5
  3. package/dist/commands/server.js.map +1 -1
  4. package/dist/core/AgentWorktreeDetector.d.ts +27 -3
  5. package/dist/core/AgentWorktreeDetector.d.ts.map +1 -1
  6. package/dist/core/AgentWorktreeDetector.js +77 -19
  7. package/dist/core/AgentWorktreeDetector.js.map +1 -1
  8. package/dist/core/InstarWorktreeManager.d.ts +7 -0
  9. package/dist/core/InstarWorktreeManager.d.ts.map +1 -1
  10. package/dist/core/InstarWorktreeManager.js +47 -1
  11. package/dist/core/InstarWorktreeManager.js.map +1 -1
  12. package/dist/core/PostUpdateMigrator.d.ts +10 -0
  13. package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
  14. package/dist/core/PostUpdateMigrator.js +57 -0
  15. package/dist/core/PostUpdateMigrator.js.map +1 -1
  16. package/dist/messaging/AttentionTopicGuard.d.ts +14 -0
  17. package/dist/messaging/AttentionTopicGuard.d.ts.map +1 -1
  18. package/dist/messaging/AttentionTopicGuard.js +21 -0
  19. package/dist/messaging/AttentionTopicGuard.js.map +1 -1
  20. package/dist/messaging/TelegramAdapter.d.ts +40 -3
  21. package/dist/messaging/TelegramAdapter.d.ts.map +1 -1
  22. package/dist/messaging/TelegramAdapter.js +61 -11
  23. package/dist/messaging/TelegramAdapter.js.map +1 -1
  24. package/dist/scheduler/JobScheduler.d.ts.map +1 -1
  25. package/dist/scheduler/JobScheduler.js +3 -3
  26. package/dist/scheduler/JobScheduler.js.map +1 -1
  27. package/dist/server/routes.js +2 -2
  28. package/dist/server/routes.js.map +1 -1
  29. package/dist/threadline/CollaborationSurfacer.d.ts +4 -1
  30. package/dist/threadline/CollaborationSurfacer.d.ts.map +1 -1
  31. package/dist/threadline/CollaborationSurfacer.js +1 -1
  32. package/dist/threadline/CollaborationSurfacer.js.map +1 -1
  33. package/dist/threadline/TelegramBridge.d.ts +4 -1
  34. package/dist/threadline/TelegramBridge.d.ts.map +1 -1
  35. package/dist/threadline/TelegramBridge.js +1 -1
  36. package/dist/threadline/TelegramBridge.js.map +1 -1
  37. package/dist/threadline/hubCommands.d.ts +4 -1
  38. package/dist/threadline/hubCommands.d.ts.map +1 -1
  39. package/dist/threadline/hubCommands.js +3 -3
  40. package/dist/threadline/hubCommands.js.map +1 -1
  41. package/package.json +2 -2
  42. package/scripts/instar-dev-precommit.js +89 -1
  43. package/scripts/lint-no-direct-destructive.js +4 -0
  44. package/scripts/lint-no-unfunneled-topic-creation.js +129 -0
  45. package/src/data/builtin-manifest.json +64 -64
  46. package/upgrades/1.3.312.md +31 -0
  47. package/upgrades/1.3.313.md +21 -0
  48. package/upgrades/side-effects/bounded-notification-surface.md +34 -0
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA4SH,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAqxDD,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAkmRtE;AAED,wBAAsB,UAAU,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAsDzE;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAuD5E"}
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA4SH,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAuxDD,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAmmRtE;AAED,wBAAsB,UAAU,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAsDzE;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAuD5E"}
@@ -1109,7 +1109,7 @@ getHubDeps) {
1109
1109
  const topicDisplayName = `${topicEmoji} ${topicName}`;
1110
1110
  (async () => {
1111
1111
  try {
1112
- const topic = await telegram.findOrCreateForumTopic(topicDisplayName, TOPIC_STYLE.SESSION.color);
1112
+ const topic = await telegram.findOrCreateForumTopic(topicDisplayName, TOPIC_STYLE.SESSION.color, { origin: 'user' });
1113
1113
  // Don't create a session — findOrCreateForumTopic already stored the topic name.
1114
1114
  // The first message in this topic will trigger auto-spawn with real content.
1115
1115
  await telegram.sendToTopic(topic.topicId, `Ready — send your first message to start.`);
@@ -1575,7 +1575,8 @@ async function ensureAgentAttentionTopic(telegram, state) {
1575
1575
  return;
1576
1576
  }
1577
1577
  try {
1578
- const topic = await telegram.createForumTopic(`${TOPIC_STYLE.ALERT.emoji} Attention`, TOPIC_STYLE.ALERT.color);
1578
+ const topic = await telegram.createForumTopic(`${TOPIC_STYLE.ALERT.emoji} Attention`, TOPIC_STYLE.ALERT.color, // Yellow — needs user action
1579
+ { origin: 'system' });
1579
1580
  state.set('agent-attention-topic', topic.topicId);
1580
1581
  await telegram.sendToTopic(topic.topicId, `This is your agent's direct line to you — for things that genuinely need your attention.\n\nBlocked tasks, critical errors, memory pressure, quota alerts, and anything where your agent can't proceed without you.`);
1581
1582
  console.log(pc.green(` Created Agent Attention topic: ${topic.topicId}`));
@@ -1634,7 +1635,8 @@ async function ensureAgentUpdatesTopic(telegram, state) {
1634
1635
  return;
1635
1636
  }
1636
1637
  try {
1637
- const topic = await telegram.createForumTopic(`${TOPIC_STYLE.INFO.emoji} Updates`, TOPIC_STYLE.INFO.color);
1638
+ const topic = await telegram.createForumTopic(`${TOPIC_STYLE.INFO.emoji} Updates`, TOPIC_STYLE.INFO.color, // Blue — informational
1639
+ { origin: 'system' });
1638
1640
  state.set('agent-updates-topic', topic.topicId);
1639
1641
  await telegram.sendToTopic(topic.topicId, `This is where I'll post updates about new features, version changes, and improvements.\n\nNothing urgent — just keeping you in the loop about what's new.`);
1640
1642
  console.log(pc.green(` Created Agent Updates topic: ${topic.topicId}`));
@@ -3512,9 +3514,10 @@ export async function startServer(options) {
3512
3514
  safeRoots,
3513
3515
  emitAttention,
3514
3516
  });
3515
- if (detectionResult.emitted > 0) {
3517
+ if (detectionResult.misplacedCount > 0 || detectionResult.timedOut) {
3516
3518
  const channel = telegram ? 'Telegram' : 'JSONL fallback';
3517
- console.log(pc.yellow(` Worktree detector: ${detectionResult.emitted} misplaced worktree(s) flagged via ${channel} (` +
3519
+ console.log(pc.yellow(` Worktree detector: ${detectionResult.misplacedCount} misplaced worktree(s) flagged via ${channel} ` +
3520
+ `(${detectionResult.emitted} aggregated item(s), ` +
3518
3521
  `enumerated=${detectionResult.enumerated} skipped=${detectionResult.skipped}` +
3519
3522
  `${detectionResult.deduped ? ` deduped=${detectionResult.deduped}` : ''}` +
3520
3523
  `${detectionResult.timedOut ? ' [timeout]' : ''})`));