runbrief 0.1.4 → 0.1.5

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 (3) hide show
  1. package/README.md +5 -5
  2. package/dist/cli.js +219 -47
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -13,13 +13,13 @@ name used in the install command.
13
13
  Claude Code:
14
14
 
15
15
  ```sh
16
- claude mcp add --transport stdio --scope user brief -- npx -y runbrief@^0.1.4
16
+ claude mcp add --transport stdio --scope user brief -- npx -y runbrief@^0.1.5
17
17
  ```
18
18
 
19
19
  Codex:
20
20
 
21
21
  ```sh
22
- codex mcp add brief -- npx -y runbrief@^0.1.4
22
+ codex mcp add brief -- npx -y runbrief@^0.1.5
23
23
  ```
24
24
 
25
25
  Generic MCP configuration:
@@ -29,7 +29,7 @@ Generic MCP configuration:
29
29
  "mcpServers": {
30
30
  "brief": {
31
31
  "command": "npx",
32
- "args": ["-y", "runbrief@^0.1.4"],
32
+ "args": ["-y", "runbrief@^0.1.5"],
33
33
  "env": {
34
34
  "BRIEF_CONNECTOR_DISTRIBUTION": "package"
35
35
  }
@@ -42,7 +42,7 @@ Brief works locally without an account. Connect a Brief workspace only when
42
42
  you want approved team context, derived scan sync, shared learnings, and hosted
43
43
  proof history.
44
44
 
45
- The published setup uses the compatible patch range (`^0.1.4`). Each fresh MCP
45
+ The published setup uses the compatible patch range (`^0.1.5`). Each fresh MCP
46
46
  start resolves the latest compatible connector patch, so routine fixes do not
47
47
  require a reinstall. A new setup is needed only when a future release changes
48
48
  the supported minor or major version.
@@ -94,7 +94,7 @@ to another machine after redemption.
94
94
  To remove the local credential and pair again:
95
95
 
96
96
  ```bash
97
- npx -y runbrief@^0.1.4 cloud-logout
97
+ npx -y runbrief@^0.1.5 cloud-logout
98
98
  ```
99
99
 
100
100
  The explicit `BRIEF_API_URL` + `BRIEF_API_KEY` environment path remains as an
package/dist/cli.js CHANGED
@@ -27065,7 +27065,7 @@ var init_agentSetup = __esm({
27065
27065
  "ide",
27066
27066
  "generic"
27067
27067
  ];
27068
- briefPublishedPackageVersion = "0.1.4";
27068
+ briefPublishedPackageVersion = "0.1.5";
27069
27069
  briefPublishedPackageSpec = `runbrief@${briefPublishedPackageVersion}`;
27070
27070
  briefPublishedPackageInstallSpec = `runbrief@^${briefPublishedPackageVersion}`;
27071
27071
  TARGET_LABELS = {
@@ -33949,6 +33949,7 @@ var init_dist2 = __esm({
33949
33949
  "use strict";
33950
33950
  init_types();
33951
33951
  init_utils();
33952
+ init_localCache();
33952
33953
  init_localLearning();
33953
33954
  init_localReceipts();
33954
33955
  init_localHandoffs();
@@ -34704,16 +34705,156 @@ var init_cloud = __esm({
34704
34705
  }
34705
34706
  });
34706
34707
 
34708
+ // ../mcp/src/autoScan.ts
34709
+ async function autoSyncScanSummary(scan, repoRoot, env = process.env, fetcher = fetch) {
34710
+ const fingerprint = scanFingerprintFor(repoRoot, scan);
34711
+ const cloud = cloudSyncStatus(env);
34712
+ if (!cloud.configured) {
34713
+ return {
34714
+ status: "skipped",
34715
+ changed: false,
34716
+ scannedAt: scan.scannedAt,
34717
+ reason: cloud.reason ?? "Cloud sync is not configured."
34718
+ };
34719
+ }
34720
+ const previous = readAutoScanState(repoRoot);
34721
+ const now = Date.now();
34722
+ const lastSuccessfulAt = previous?.lastSuccessfulAt ? Date.parse(previous.lastSuccessfulAt) : Number.NaN;
34723
+ const lastAttemptedAt = previous?.lastAttemptedAt ? Date.parse(previous.lastAttemptedAt) : Number.NaN;
34724
+ const sameState = previous?.fingerprint === fingerprint;
34725
+ if (sameState && Number.isFinite(lastSuccessfulAt) && now - lastSuccessfulAt < successfulResyncMs) {
34726
+ return {
34727
+ status: "unchanged",
34728
+ changed: false,
34729
+ scannedAt: scan.scannedAt,
34730
+ reason: "The hosted map already matches this repo state."
34731
+ };
34732
+ }
34733
+ if (sameState && Number.isFinite(lastAttemptedAt) && !Number.isFinite(lastSuccessfulAt) && now - lastAttemptedAt < failedSyncRetryMs) {
34734
+ return {
34735
+ status: "throttled",
34736
+ changed: false,
34737
+ scannedAt: scan.scannedAt,
34738
+ reason: "The previous map sync failed recently; Brief will retry shortly."
34739
+ };
34740
+ }
34741
+ const attemptedAt = new Date(now).toISOString();
34742
+ const cloudSync = await syncScanSummary(scan, repoRoot, env, fetcher);
34743
+ if (cloudSync.status === "accepted") {
34744
+ writeBriefCacheFile(
34745
+ repoRoot,
34746
+ autoScanStateFile,
34747
+ `${JSON.stringify(
34748
+ {
34749
+ fingerprint,
34750
+ lastAttemptedAt: attemptedAt,
34751
+ lastSuccessfulAt: (/* @__PURE__ */ new Date()).toISOString()
34752
+ },
34753
+ null,
34754
+ 2
34755
+ )}
34756
+ `
34757
+ );
34758
+ return {
34759
+ status: "synced",
34760
+ changed: !sameState,
34761
+ scannedAt: scan.scannedAt,
34762
+ reason: sameState ? "The hosted map was revalidated after its daily refresh window." : "The hosted map was refreshed from the current repo state.",
34763
+ cloudSync
34764
+ };
34765
+ }
34766
+ writeBriefCacheFile(
34767
+ repoRoot,
34768
+ autoScanStateFile,
34769
+ `${JSON.stringify(
34770
+ { fingerprint, lastAttemptedAt: attemptedAt },
34771
+ null,
34772
+ 2
34773
+ )}
34774
+ `
34775
+ );
34776
+ return {
34777
+ status: "failed",
34778
+ changed: !sameState,
34779
+ scannedAt: scan.scannedAt,
34780
+ reason: cloudSync.reason,
34781
+ cloudSync
34782
+ };
34783
+ }
34784
+ function scanFingerprintFor(repoRoot, scan) {
34785
+ const sourceIdentity = scan.sources.map((source) => `${source.path}:${source.contentHash}`).sort();
34786
+ const mapIdentity = scan.map.map(
34787
+ (node) => JSON.stringify({
34788
+ type: node.type,
34789
+ name: node.name,
34790
+ path: node.path,
34791
+ summary: node.summary,
34792
+ tags: node.tags,
34793
+ metadata: node.metadata
34794
+ })
34795
+ ).sort();
34796
+ return contentHash(
34797
+ JSON.stringify({
34798
+ branch: runGit(repoRoot, ["branch", "--show-current"]),
34799
+ commit: runGit(repoRoot, ["rev-parse", "HEAD"]),
34800
+ changedPaths: runGit(repoRoot, [
34801
+ "status",
34802
+ "--short",
34803
+ "--untracked-files=all"
34804
+ ]),
34805
+ sourceIdentity,
34806
+ mapIdentity,
34807
+ stats: scan.stats
34808
+ })
34809
+ );
34810
+ }
34811
+ function readAutoScanState(repoRoot) {
34812
+ for (const filePath of briefCacheCandidatePaths(
34813
+ repoRoot,
34814
+ autoScanStateFile
34815
+ )) {
34816
+ const raw = readBriefLedgerFile(filePath);
34817
+ if (!raw) continue;
34818
+ try {
34819
+ const parsed = JSON.parse(raw);
34820
+ if (!isAutoScanState(parsed)) continue;
34821
+ return parsed;
34822
+ } catch {
34823
+ }
34824
+ }
34825
+ return void 0;
34826
+ }
34827
+ function isAutoScanState(value) {
34828
+ if (!value || typeof value !== "object") return false;
34829
+ const state = value;
34830
+ return typeof state.fingerprint === "string" && typeof state.lastAttemptedAt === "string" && (state.lastSuccessfulAt === void 0 || typeof state.lastSuccessfulAt === "string");
34831
+ }
34832
+ var autoScanStateFile, failedSyncRetryMs, successfulResyncMs;
34833
+ var init_autoScan = __esm({
34834
+ "../mcp/src/autoScan.ts"() {
34835
+ "use strict";
34836
+ init_dist2();
34837
+ init_cloud();
34838
+ autoScanStateFile = "auto-scan.json";
34839
+ failedSyncRetryMs = 6e4;
34840
+ successfulResyncMs = 24 * 60 * 60 * 1e3;
34841
+ }
34842
+ });
34843
+
34707
34844
  // ../mcp/src/teamContext.ts
34708
34845
  async function scanRepoWithTeamContext(repoRoot, options2 = {}, env = process.env) {
34709
34846
  const localScan = scanRepo(repoRoot, options2);
34710
- const teamContext = await fetchTeamContext(repoRoot, env);
34847
+ const [teamContext, autoScan] = await Promise.all([
34848
+ fetchTeamContext(repoRoot, env),
34849
+ autoSyncScanSummary(localScan, repoRoot, env)
34850
+ ]);
34711
34851
  if (teamContext.status !== "fetched") {
34712
- return { scan: localScan, teamContext };
34852
+ return { scan: localScan, teamContext, autoScan };
34713
34853
  }
34714
34854
  return {
34715
34855
  scan: mergeTeamContext(localScan, teamContext.context),
34716
- teamContext
34856
+ teamContext,
34857
+ autoScan
34717
34858
  };
34718
34859
  }
34719
34860
  function summarizeTeamContext(teamContext) {
@@ -34922,6 +35063,7 @@ var init_teamContext = __esm({
34922
35063
  "use strict";
34923
35064
  init_dist2();
34924
35065
  init_cloud();
35066
+ init_autoScan();
34925
35067
  ruleKinds = /* @__PURE__ */ new Set([
34926
35068
  "workflow",
34927
35069
  "architecture",
@@ -36221,7 +36363,7 @@ var init_installStatus = __esm({
36221
36363
  "use strict";
36222
36364
  init_dist2();
36223
36365
  init_serverInstructions();
36224
- briefConnectorVersion = "0.1.4";
36366
+ briefConnectorVersion = "0.1.5";
36225
36367
  }
36226
36368
  });
36227
36369
 
@@ -36495,7 +36637,7 @@ function renderWikiReadme(wiki, pageArtifacts) {
36495
36637
  "- Open the most relevant page under `pages/` and cite it in the plan, review, or handoff.",
36496
36638
  "- Before final handoff, run `brief.review_diff`; for multi-step work, also save handoff proof and verify receipts.",
36497
36639
  "- End each coding pass with a Brief final recap in one or two lines: name the Brief tools actually used, one concrete way they helped, and validation or remaining risk. Say plainly when Brief did not materially help.",
36498
- "- If the web app scan timestamp is stale, ask your connected agent to call `brief.scan_repo` from the active repo/worktree.",
36640
+ "- The connected agent automatically rechecks map freshness at session start and before context; call `brief.scan_repo` from the active repo/worktree only when you need an immediate retry.",
36499
36641
  "- If this wiki looks stale, ask your connected agent to call `brief.initialize_repo_wiki` with `update: true`.",
36500
36642
  "- Prefer existing routes, helpers, tests, owners, and reference implementations surfaced here before adding new code.",
36501
36643
  "",
@@ -36503,7 +36645,7 @@ function renderWikiReadme(wiki, pageArtifacts) {
36503
36645
  "",
36504
36646
  "There are three freshness actions. Use the first when the web app timestamp is old, the second when repo-local wiki pages are stale, and the third when the team wants refresh to happen without reminders.",
36505
36647
  "",
36506
- "1. **Rescan the repo for the web app and code map**: ask the connected agent to call `brief.scan_repo` from the repo it is editing.",
36648
+ "1. **Refresh the repo for the web app and code map**: when a connected agent starts, Brief automatically rechecks the map; call `brief.scan_repo` from the repo it is editing for an immediate retry.",
36507
36649
  "2. **Refresh the repo-local wiki**: ask the connected agent to call `brief.initialize_repo_wiki` with `update: true`.",
36508
36650
  "3. **Make refresh continuous**: after a trusted first run, ask the connected agent to call `brief.initialize_repo_wiki` with `update: true` and `writeGithubWorkflow: true`, then review the generated workflow PR behavior.",
36509
36651
  "",
@@ -36663,7 +36805,7 @@ function wikiAgentBlock() {
36663
36805
  "- Cite the wiki page and source files used in your plan, review, or handoff.",
36664
36806
  "- Before final handoff after code changes, call `brief.review_diff`; for multi-step work also call `brief.save_handoff` and `brief.verify_receipts`.",
36665
36807
  "- End each coding pass with a Brief final recap in one or two lines: name the Brief tools actually used, one concrete way they helped, and validation or remaining risk. Say plainly when Brief did not materially help.",
36666
- "- If the web app scan timestamp is stale, ask the connected agent to call `brief.scan_repo` from the active repo/worktree.",
36808
+ "- The connected agent automatically rechecks map freshness at session start and before context; call `brief.scan_repo` from the active repo/worktree only when you need an immediate retry.",
36667
36809
  "- If `.brief/wiki` is stale, ask the connected agent to call `brief.initialize_repo_wiki` with `update: true` before trusting reuse guidance.",
36668
36810
  "- To keep wiki freshness continuous, ask the connected agent to call `brief.initialize_repo_wiki` with `update: true` and `writeGithubWorkflow: true`, then review the generated workflow.",
36669
36811
  '- Use `brief context --repo "$PWD" --task "<task>"` when you need a compact packet for a specific change.',
@@ -37989,7 +38131,7 @@ var init_server = __esm({
37989
38131
  server = new McpServer(
37990
38132
  {
37991
38133
  name: "brief",
37992
- version: "0.1.4"
38134
+ version: "0.1.5"
37993
38135
  },
37994
38136
  {
37995
38137
  instructions: briefMcpInstructions
@@ -38166,9 +38308,12 @@ var init_server = __esm({
38166
38308
  })
38167
38309
  );
38168
38310
  }
38169
- const { scan, teamContext } = await scanRepoWithTeamContext(repoRoot, {
38170
- maxFiles: 1200
38171
- });
38311
+ const { scan, teamContext, autoScan } = await scanRepoWithTeamContext(
38312
+ repoRoot,
38313
+ {
38314
+ maxFiles: 1200
38315
+ }
38316
+ );
38172
38317
  const activation = task?.trim() ? await buildActivationContext({
38173
38318
  scan,
38174
38319
  repoRoot,
@@ -38203,6 +38348,7 @@ var init_server = __esm({
38203
38348
  skillLearning: summarizeSkillLearningForStart(skillLearning, void 0),
38204
38349
  connectorHealth: summarizeAgentConnectorHealth(setups),
38205
38350
  proofLoop: report.proofLoop,
38351
+ mapRefresh: autoScan,
38206
38352
  ...activation ? { activation } : {},
38207
38353
  value: {
38208
38354
  receiptCount: report.receiptCount,
@@ -38232,6 +38378,7 @@ var init_server = __esm({
38232
38378
  valueReport: report,
38233
38379
  serverInstructionsActive: true
38234
38380
  }),
38381
+ mapRefresh: autoScan,
38235
38382
  ...activation ? { activation } : {}
38236
38383
  });
38237
38384
  }
@@ -38590,13 +38737,14 @@ var init_server = __esm({
38590
38737
  return repoTargetBlock(repoTargetInfo);
38591
38738
  }
38592
38739
  const { repoRoot, rootResolution, repoTarget } = repoTargetInfo;
38593
- const { scan, teamContext } = await scanRepoWithTeamContext(repoRoot);
38740
+ const { scan, teamContext, autoScan } = await scanRepoWithTeamContext(repoRoot);
38594
38741
  return jsonText({
38595
38742
  repoRoot,
38596
38743
  rootResolution,
38597
38744
  repoTarget,
38598
38745
  repoName: scan.repoName,
38599
38746
  teamContext: summarizeTeamContext(teamContext),
38747
+ mapRefresh: autoScan,
38600
38748
  appliedContext: {
38601
38749
  rules: scan.rules.slice(0, 20),
38602
38750
  memories: scan.memories.slice(0, 12),
@@ -38728,9 +38876,12 @@ var init_server = __esm({
38728
38876
  });
38729
38877
  }
38730
38878
  const { rootResolution, repoRoot, repoTarget } = repoTargetInfo;
38731
- const { scan, teamContext } = await scanRepoWithTeamContext(repoRoot, {
38732
- maxFiles: 1200
38733
- });
38879
+ const { scan, teamContext, autoScan } = await scanRepoWithTeamContext(
38880
+ repoRoot,
38881
+ {
38882
+ maxFiles: 1200
38883
+ }
38884
+ );
38734
38885
  const task = request?.trim() || "Continue the current repo work safely.";
38735
38886
  const skillLearning = buildRepoSkillLearningReport(repoRoot, {
38736
38887
  maxFiles: 6e3
@@ -38800,6 +38951,7 @@ var init_server = __esm({
38800
38951
  ...readinessPreview ? { readinessPreview } : {},
38801
38952
  workflowWiring: summarizeWorkflowWiringForStart(workflowWiring),
38802
38953
  autoEngage: summarizeAutoEngageForStart(autoEngage),
38954
+ mapRefresh: autoScan,
38803
38955
  skillLearning: summarizeSkillLearningForStart(
38804
38956
  skillLearning,
38805
38957
  learnedWorkflow
@@ -38850,6 +39002,7 @@ var init_server = __esm({
38850
39002
  sharedContext: summarizeBeforeYouCodeSharedContext(
38851
39003
  beforeYouCode.teamGuidance
38852
39004
  ),
39005
+ mapRefresh: autoScan,
38853
39006
  referenceFirst: summarizeBeforeYouCodeReferences(beforeYouCode),
38854
39007
  ...learnedWorkflow ? {
38855
39008
  learnedWorkflow: {
@@ -38891,9 +39044,12 @@ var init_server = __esm({
38891
39044
  });
38892
39045
  }
38893
39046
  const { rootResolution, repoRoot, repoTarget } = repoTargetInfo;
38894
- const { scan, teamContext } = await scanRepoWithTeamContext(repoRoot, {
38895
- maxFiles: 1200
38896
- });
39047
+ const { scan, teamContext, autoScan } = await scanRepoWithTeamContext(
39048
+ repoRoot,
39049
+ {
39050
+ maxFiles: 1200
39051
+ }
39052
+ );
38897
39053
  const beforeYouCode = buildBeforeYouCodeMap(scan, {
38898
39054
  task,
38899
39055
  repoRoot,
@@ -38909,7 +39065,8 @@ var init_server = __esm({
38909
39065
  repoTarget,
38910
39066
  cockpit: beforeYouCode.cockpit,
38911
39067
  beforeYouCode: summarizeBeforeYouCodeForStart(beforeYouCode),
38912
- teamContext: summarizeTeamContext(teamContext)
39068
+ teamContext: summarizeTeamContext(teamContext),
39069
+ mapRefresh: autoScan
38913
39070
  });
38914
39071
  }
38915
39072
  );
@@ -38965,7 +39122,7 @@ var init_server = __esm({
38965
39122
  });
38966
39123
  }
38967
39124
  const { rootResolution, repoRoot, repoTarget } = repoTargetInfo;
38968
- const { scan, teamContext } = await scanRepoWithTeamContext(repoRoot);
39125
+ const { scan, teamContext, autoScan } = await scanRepoWithTeamContext(repoRoot);
38969
39126
  const skillLearning = buildRepoSkillLearningReport(repoRoot, {
38970
39127
  maxFiles: 6e3
38971
39128
  });
@@ -39040,7 +39197,8 @@ var init_server = __esm({
39040
39197
  context: summarizePacket(packet),
39041
39198
  localReceipt: summarizeLocalReceipt(localReceipt2),
39042
39199
  cloudSync: cloudSync2,
39043
- teamContext: summarizeTeamContext(teamContext)
39200
+ teamContext: summarizeTeamContext(teamContext),
39201
+ mapRefresh: autoScan
39044
39202
  };
39045
39203
  return jsonText(
39046
39204
  expanded ? fullResponse2 : buildCompactStartEnvelope({
@@ -39586,7 +39744,7 @@ var init_server = __esm({
39586
39744
  }
39587
39745
  );
39588
39746
  }
39589
- const { scan, teamContext } = await scanRepoWithTeamContext(repoRoot);
39747
+ const { scan, teamContext, autoScan } = await scanRepoWithTeamContext(repoRoot);
39590
39748
  const request = { task, repoRoot, agent: "mcp" };
39591
39749
  if (files) request.files = files;
39592
39750
  if (branch) request.branch = branch;
@@ -39615,7 +39773,8 @@ var init_server = __esm({
39615
39773
  repoTarget,
39616
39774
  localReceipt: summarizeLocalReceipt(localReceipt),
39617
39775
  cloudSync,
39618
- teamContext: summarizeTeamContext(teamContext)
39776
+ teamContext: summarizeTeamContext(teamContext),
39777
+ mapRefresh: autoScan
39619
39778
  });
39620
39779
  }
39621
39780
  );
@@ -39669,7 +39828,7 @@ var init_server = __esm({
39669
39828
  });
39670
39829
  }
39671
39830
  const { rootResolution, repoRoot, repoTarget } = repoTargetInfo;
39672
- const { scan, teamContext } = await scanRepoWithTeamContext(repoRoot);
39831
+ const { scan, teamContext, autoScan } = await scanRepoWithTeamContext(repoRoot);
39673
39832
  const request = {
39674
39833
  task: missionTaskFromInputs(task, workItem, runtimeEvidence),
39675
39834
  repoRoot,
@@ -39722,7 +39881,8 @@ var init_server = __esm({
39722
39881
  repoTarget,
39723
39882
  localReceipt: summarizeLocalReceipt(localReceipt),
39724
39883
  cloudSync,
39725
- teamContext: summarizeTeamContext(teamContext)
39884
+ teamContext: summarizeTeamContext(teamContext),
39885
+ mapRefresh: autoScan
39726
39886
  });
39727
39887
  }
39728
39888
  );
@@ -41071,9 +41231,12 @@ async function runCli(commandName, commandArgs) {
41071
41231
  );
41072
41232
  return;
41073
41233
  }
41074
- const { scan, teamContext } = await scanRepoWithTeamContext(repoRoot, {
41075
- maxFiles: 400
41076
- });
41234
+ const { scan, teamContext, autoScan } = await scanRepoWithTeamContext(
41235
+ repoRoot,
41236
+ {
41237
+ maxFiles: 400
41238
+ }
41239
+ );
41077
41240
  const report = buildLocalValueReport(repoRoot, scan.repoName);
41078
41241
  const setups = generateAgentSetup(scan, { target: "all" });
41079
41242
  const skillLearning = buildRepoSkillLearningReport(repoRoot, {
@@ -41100,6 +41263,7 @@ async function runCli(commandName, commandArgs) {
41100
41263
  skillLearning: summarizeSkillLearningForCli(skillLearning, void 0),
41101
41264
  connectorHealth: summarizeAgentConnectorHealth(setups),
41102
41265
  proofLoop: report.proofLoop,
41266
+ mapRefresh: autoScan,
41103
41267
  value: {
41104
41268
  receiptCount: report.receiptCount,
41105
41269
  contextPacketCount: report.contextPacketCount,
@@ -41112,21 +41276,24 @@ async function runCli(commandName, commandArgs) {
41112
41276
  next: report.proofLoop.next
41113
41277
  };
41114
41278
  printJson(
41115
- hasFlag(commandArgs, "full") ? fullStatus : compactInstallStatus({
41116
- mode: "cli",
41117
- repoRoot,
41118
- rootResolution,
41119
- repoTarget,
41120
- scan,
41121
- connectorReadiness: connector,
41122
- serverFreshness: freshness,
41123
- cloudSync: cloud,
41124
- teamContext: summarizedTeamContext,
41125
- readiness,
41126
- workflowWiring,
41127
- valueReport: report,
41128
- serverInstructionsActive: false
41129
- })
41279
+ hasFlag(commandArgs, "full") ? fullStatus : {
41280
+ ...compactInstallStatus({
41281
+ mode: "cli",
41282
+ repoRoot,
41283
+ rootResolution,
41284
+ repoTarget,
41285
+ scan,
41286
+ connectorReadiness: connector,
41287
+ serverFreshness: freshness,
41288
+ cloudSync: cloud,
41289
+ teamContext: summarizedTeamContext,
41290
+ readiness,
41291
+ workflowWiring,
41292
+ valueReport: report,
41293
+ serverInstructionsActive: false
41294
+ }),
41295
+ mapRefresh: autoScan
41296
+ }
41130
41297
  );
41131
41298
  return;
41132
41299
  }
@@ -41307,9 +41474,12 @@ async function runCli(commandName, commandArgs) {
41307
41474
  const stage = option2(commandArgs, "stage") ?? "auto";
41308
41475
  const maxLines = numberOption(commandArgs, "max-lines");
41309
41476
  const task = request?.trim() || "Continue the current repo work safely.";
41310
- const { scan, teamContext } = await scanRepoWithTeamContext(repoRoot, {
41311
- maxFiles: 1200
41312
- });
41477
+ const { scan, teamContext, autoScan } = await scanRepoWithTeamContext(
41478
+ repoRoot,
41479
+ {
41480
+ maxFiles: 1200
41481
+ }
41482
+ );
41313
41483
  const skillLearning = buildRepoSkillLearningReport(repoRoot, {
41314
41484
  maxFiles: 6e3
41315
41485
  });
@@ -41359,6 +41529,7 @@ async function runCli(commandName, commandArgs) {
41359
41529
  ...start && recommendation.mcpTool !== "brief.before_you_code" ? { start: summarizeStartForCli(start) } : {},
41360
41530
  workflowWiring: summarizeWorkflowWiringForCli(workflowWiring),
41361
41531
  autoEngage: summarizeAutoEngageForCli(autoEngage),
41532
+ mapRefresh: autoScan,
41362
41533
  skillLearning: summarizeSkillLearningForCli(
41363
41534
  skillLearning,
41364
41535
  learnedWorkflow
@@ -41405,6 +41576,7 @@ async function runCli(commandName, commandArgs) {
41405
41576
  sharedContext: summarizeBeforeYouCodeSharedContext(
41406
41577
  beforeYouCode.teamGuidance
41407
41578
  ),
41579
+ mapRefresh: autoScan,
41408
41580
  autoEngage: {
41409
41581
  status: autoEngage.status,
41410
41582
  chatFeedback: autoEngage.chatFeedback.slice(0, 1),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "runbrief",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "private": false,
5
5
  "description": "Brief Connector: the local MCP companion for repo context, reuse guidance, review gates, and handoff proof.",
6
6
  "type": "module",