@productbrain/mcp 0.0.1-beta.40 → 0.0.1-beta.41

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.
@@ -4403,6 +4403,7 @@ async function handleRespond(args) {
4403
4403
  persist("problem_clarity", "problem", 50);
4404
4404
  persist("appetite", "appetite", 20);
4405
4405
  persist("architecture", "architecture", 50);
4406
+ persist("done_when", "done_when", 30);
4406
4407
  if (!refreshedData._overlapIds) {
4407
4408
  fieldUpdates._overlapIds = overlapIds.length > 0 ? overlapIds.join(",") : "_checked";
4408
4409
  }
@@ -4448,6 +4449,21 @@ async function handleRespond(args) {
4448
4449
  relatedTensions: chainSurfaced.filter((e) => e.collection === "tensions").map((e) => ({ entryId: e.entryId, name: e.name }))
4449
4450
  };
4450
4451
  buildContract = generateBuildContract(contractCtx);
4452
+ if (refreshedData.buildContract !== buildContract) {
4453
+ try {
4454
+ await mcpMutation("chain.updateEntry", {
4455
+ entryId: betId,
4456
+ data: { buildContract },
4457
+ changeNote: "Updated build contract from shaping session"
4458
+ });
4459
+ await recordSessionActivity({ entryModified: refreshedBet?._id ?? betEntry._id });
4460
+ } catch (updErr) {
4461
+ captureErrors.push({
4462
+ operation: "update",
4463
+ detail: `buildContract field: ${updErr instanceof Error ? updErr.message : String(updErr)}`
4464
+ });
4465
+ }
4466
+ }
4451
4467
  }
4452
4468
  let commitBlockers;
4453
4469
  if (captureReady) {
@@ -4735,7 +4751,6 @@ ${directive}` : ""
4735
4751
  async function handleCommitConstellation(args) {
4736
4752
  requireWriteAccess();
4737
4753
  const betId = args.betEntryId;
4738
- const operationId = args.operationId ?? `${Date.now()}-${Math.random().toString(36).slice(2, 10)}`;
4739
4754
  if (!betId) {
4740
4755
  return {
4741
4756
  content: [{ type: "text", text: "`betEntryId` is required for commit-constellation action." }]
@@ -4748,6 +4763,7 @@ async function handleCommitConstellation(args) {
4748
4763
  };
4749
4764
  }
4750
4765
  const betData = betEntry.data ?? {};
4766
+ const operationId = args.operationId ?? `${betId}:${getAgentSessionId() ?? "sessionless"}:${betEntry.status}:${betEntry.currentVersion ?? 0}`;
4751
4767
  const relations = await mcpQuery("chain.listEntryRelations", {
4752
4768
  entryId: betId
4753
4769
  });
@@ -9671,4 +9687,4 @@ export {
9671
9687
  SERVER_VERSION,
9672
9688
  createProductBrainServer
9673
9689
  };
9674
- //# sourceMappingURL=chunk-6WVRGNJU.js.map
9690
+ //# sourceMappingURL=chunk-5IH3KEAZ.js.map