feat: lean foundry profile defaults and concise env guidance#30
Conversation
WalkthroughImplements hard-signature repo profiling with a single Changes
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/palantir-mcp/mcp-client.ts (1)
192-199: Consider removing[ERROR]prefix from the error message.The coding guidelines specify using
[ERROR]prefix when logging errors, not within error message strings. Embedding it in the thrown error can cause redundant prefixes when the error is later caught and logged (e.g.,[ERROR] [ERROR] Failed to...). The error chaining viacauseis a good improvement.Suggested fix
} catch (err) { const stderrText: string = stderrChunks.join(''); throw new Error( - `[ERROR] Failed to list palantir-mcp tools: ${formatError(err)}\n${stderrText}`, + `Failed to list palantir-mcp tools: ${formatError(err)}\n${stderrText}`, { cause: err, } ); } finally {As per coding guidelines: "Log errors with
[ERROR]prefix for consistency" — this applies to log statements, not error message content.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/palantir-mcp/mcp-client.ts` around lines 192 - 199, The thrown Error in the catch block of the function that lists palantir-mcp tools contains a redundant "[ERROR]" prefix; remove the "[ERROR]" prefix from the Error message (leave the rest: `Failed to list palantir-mcp tools: ${formatError(err)}\n${stderrText}`) and keep the `cause: err` chaining; ensure any logging of this error (e.g., calls to processLogger.error or similar) is responsible for adding the "[ERROR]" prefix instead of embedding it in the thrown message.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@package.json`:
- Around line 31-33: The package.json peerDependencies entry for
"@opencode-ai/plugin" is pointing to a non-existent version ^1.2.6; update the
peerDependencies block to reference the correct published version (e.g.,
"^1.1.53") or the intended released version, ensuring the key "peerDependencies"
and the package name "@opencode-ai/plugin" are updated accordingly so consumers
can install without errors.
---
Nitpick comments:
In `@src/palantir-mcp/mcp-client.ts`:
- Around line 192-199: The thrown Error in the catch block of the function that
lists palantir-mcp tools contains a redundant "[ERROR]" prefix; remove the
"[ERROR]" prefix from the Error message (leave the rest: `Failed to list
palantir-mcp tools: ${formatError(err)}\n${stderrText}`) and keep the `cause:
err` chaining; ensure any logging of this error (e.g., calls to
processLogger.error or similar) is responsible for adding the "[ERROR]" prefix
instead of embedding it in the thrown message.
Summary
This PR delivers a lean v1 implementation for:
Commit 1 (
feat: simplify foundry profile detection and tool policy defaults)defaultprofile.all/unknownprofile IDs from active profile resolution.foundry-librarianandfoundry.foundryagent default mode toallwhen mode is unset (while preserving explicit user modes).Commit 2 (
feat: add concise foundry env guidance without prompt bloat)Design Notes
Validation
bun test(pass: 71, skip: 1, fail: 0)mise run lint(pass)Closes #22
Closes #27
Summary by CodeRabbit
New Features
Tests
Refactor