@productbrain/mcp 0.0.1-beta.14218 → 0.0.1-beta.14227

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.
@@ -48,7 +48,7 @@ import {
48
48
  startAgentSession,
49
49
  startTimingLine,
50
50
  withAcceptPrompt
51
- } from "./chunk-KT4RGUWI.js";
51
+ } from "./chunk-F4FYLPGO.js";
52
52
 
53
53
  // src/server.ts
54
54
  import { McpServer as McpServer2 } from "@modelcontextprotocol/sdk/server/mcp.js";
@@ -7050,9 +7050,9 @@ var orientSchema = z23.object({
7050
7050
  action: z23.enum(ORIENT_ACTIONS).optional().default("task").describe(
7051
7051
  "'task': task-grounded context loader, the only action."
7052
7052
  ),
7053
- mode: z23.enum(["full", "brief"]).optional().default("full").describe("For 'task': full = full context (default). brief = compact summary for mid-session re-orientation. Prefer using the `tier` param for depth control."),
7053
+ mode: z23.enum(["full", "brief"]).optional().default("full").describe("For 'task': full (default), or brief: a compact summary (tier=summary)."),
7054
7054
  tier: z23.enum(["summary", "standard", "full"]).optional().describe(
7055
- "For 'task': payload depth. Defaults to standard (~256 KB), with or without a task. Pass summary, standard, or full to override."
7055
+ "For 'task': payload depth: summary (~10 KB), standard (~256 KB, the default) or full (no cap). An explicit tier wins."
7056
7056
  ),
7057
7057
  task: z23.string().max(2e3).optional().describe(
7058
7058
  "For 'task': natural-language task description for task-scoped context. When provided, orient returns scored, relevant entries for the task."
@@ -7064,7 +7064,9 @@ var orientSchema = z23.object({
7064
7064
  branchName: z23.string().max(120).optional().describe("Current git branch name, if known."),
7065
7065
  worktreeName: z23.string().max(120).optional().describe("Current worktree/directory name, if known.")
7066
7066
  }).optional().describe("For 'task': best-effort startup signals \u2014 changedPaths/reviewedArtifactRefs/branchName/worktreeName. All optional; omit fields you don't know."),
7067
- invocationPath: z23.enum(["session-start", "session-close", "manual-orient", "handshake", "unknown"]).optional().describe("For 'task': how this orient was invoked. Defaults to 'manual-orient' (the direct `orient task=...` call shape) when omitted.")
7067
+ invocationPath: z23.enum(["session-start", "session-close", "manual-orient", "handshake", "unknown"]).optional().describe("For 'task': how this orient was invoked. Defaults to 'manual-orient' (the direct `orient task=...` call shape) when omitted."),
7068
+ rules: z23.boolean().optional().describe("For 'task': true adds each rule's whole body under its line.")
7069
+ // TASK-1632
7068
7070
  });
7069
7071
  function taskGroundingWarningLines(task, hasTaskGrounding = false) {
7070
7072
  if (hasTaskGrounding) return [];
@@ -7094,7 +7096,7 @@ function registerOrientTool(server) {
7094
7096
  "orient",
7095
7097
  {
7096
7098
  title: "Orient",
7097
- description: "Task-grounded context loader. Call `session action=start` first; it opens the session and hands you the briefing.\n\nPass `task` to load the governance and context for a specific task. Orient is advice for captures, relations, accepts, ticks and questions; " + ORIENT_REQUIRED_NOTE + "\n\n**tier** (action=task): Controls payload depth.\n- `summary` (~10 KB) \u2014 compact, calibrated for task-scoped retrieval.\n- `standard` (~256 KB) \u2014 rich, suited to workspace standups.\n- `full` \u2014 complete payload, no cap. Use with deliberation.\n\nPurpose, vision and strategy highlights are always served in full; a grounding status flags when other context was reduced.\n\nDefault: `standard`, with or without `task`. Explicit `tier` always wins.\n\n**mode** (action=task): `full` (default) returns full context. `brief` returns compact summary \u2014 mapped to tier=summary internally.",
7099
+ description: "Task-grounded context loader. Call `session action=start` first; it opens the session and hands you the briefing.\n\nPass `task` to load the governance and context for a specific task. Orient is advice for captures, relations, accepts, ticks and questions; " + ORIENT_REQUIRED_NOTE + "\n\nPurpose, vision and strategy highlights are always served in full; a grounding status flags when other context was reduced. Set depth with `tier` or `mode`; `rules` adds each rule's whole body.",
7098
7100
  inputSchema: orientSchema,
7099
7101
  // Not read-only: a task-shaped orient marks the session oriented.
7100
7102
  annotations: { readOnlyHint: false, idempotentHint: true, openWorldHint: false }
@@ -7102,19 +7104,19 @@ function registerOrientTool(server) {
7102
7104
  thinWrapper(async (args) => {
7103
7105
  const parsed = parseOrFail(orientSchema, args);
7104
7106
  if (!parsed.ok) return parsed.result;
7105
- const { action, mode: mode2, tier, task, startupSignals, invocationPath } = parsed.data;
7107
+ const { action, mode: mode2, tier, task, startupSignals, invocationPath, rules } = parsed.data;
7106
7108
  return runWithToolContext(
7107
7109
  { tool: "orient", action },
7108
- () => _handleOrient({ mode: mode2, tier, task, startupSignals, invocationPath })
7110
+ () => _handleOrient({ mode: mode2, tier, task, startupSignals, invocationPath, rules })
7109
7111
  );
7110
7112
  })
7111
7113
  );
7112
7114
  }
7113
- async function _handleOrient({ mode: mode2 = "full", tier, task, startupSignals, invocationPath }) {
7115
+ async function _handleOrient({ mode: mode2 = "full", tier, task, startupSignals, invocationPath, rules }) {
7114
7116
  const errors = [];
7115
7117
  const callTier = tier ?? (mode2 === "brief" ? "summary" : void 0);
7116
7118
  const agentSessionId = getAgentSessionId();
7117
- if (isSessionOriented() && mode2 === "brief" && !task) {
7119
+ if (isSessionOriented() && mode2 === "brief" && !task && !rules) {
7118
7120
  return buildAlreadyOrientedResult(kernelQuery, agentSessionId, taskGroundingWarningLines());
7119
7121
  }
7120
7122
  let wsCtx = null;
@@ -7137,6 +7139,7 @@ async function _handleOrient({ mode: mode2 = "full", tier, task, startupSignals,
7137
7139
  orientArgs.invocationPath = "manual-orient";
7138
7140
  }
7139
7141
  if (callTier) orientArgs.tier = callTier;
7142
+ if (rules) orientArgs.ruleBodies = true;
7140
7143
  orientArgs.renderMode = "json";
7141
7144
  if (agentSessionId) orientArgs.sessionId = agentSessionId;
7142
7145
  const orientConversationId = getConversationId();
@@ -12109,4 +12112,4 @@ export {
12109
12112
  SERVER_VERSION,
12110
12113
  createProductBrainServer
12111
12114
  };
12112
- //# sourceMappingURL=chunk-V5WZ3G7W.js.map
12115
+ //# sourceMappingURL=chunk-RX4OW3OO.js.map