agent-trellis 0.20.0 → 0.21.0

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 (37) hide show
  1. package/dist/adapters/claude-code.js +2 -2
  2. package/dist/adapters/codex.js +3 -3
  3. package/dist/adapters/jsonMcp.d.ts +1 -1
  4. package/dist/adapters/jsonMcp.js +2 -2
  5. package/dist/adapters/kimi-code.js +2 -2
  6. package/dist/adapters/kiro.js +11 -9
  7. package/dist/adapters/mcpPlan.d.ts +1 -1
  8. package/dist/adapters/mcpPlan.js +35 -12
  9. package/dist/adapters/pi.js +5 -5
  10. package/dist/adapters/zcode.d.ts +1 -1
  11. package/dist/adapters/zcode.js +6 -6
  12. package/dist/commands/doctor.d.ts +1 -1
  13. package/dist/commands/doctor.js +5 -5
  14. package/dist/commands/mcp.js +1 -1
  15. package/dist/commands/mcpAuth.js +1 -1
  16. package/dist/commands/mcpGateway.d.ts +2 -2
  17. package/dist/commands/mcpGateway.js +4 -4
  18. package/dist/commands/mcpImport.js +2 -1
  19. package/dist/commands/secretsAudit.d.ts +1 -1
  20. package/dist/commands/secretsAudit.js +36 -13
  21. package/dist/lib/envVarNames.js +7 -0
  22. package/dist/lib/mcpConnect.d.ts +1 -1
  23. package/dist/lib/mcpConnect.js +19 -8
  24. package/dist/lib/mcpMigrateRead.js +14 -2
  25. package/dist/lib/secretEnv.d.ts +53 -8
  26. package/dist/lib/secretEnv.js +78 -15
  27. package/dist/lib/tomlSection.js +3 -2
  28. package/dist/lib/workspaceDoctor.d.ts +1 -1
  29. package/dist/lib/workspaceDoctor.js +8 -4
  30. package/dist/lib/workspaceMcp.d.ts +1 -1
  31. package/dist/lib/workspaceMcp.js +5 -5
  32. package/dist/pi-bridge/bundle.js +42220 -2695
  33. package/dist/pi-bridge/index.js +2 -2
  34. package/docs/research.md +4 -1
  35. package/package.json +2 -1
  36. package/schema/secrets.policy.example.yaml +5 -0
  37. package/schema/servers.example.yaml +5 -1
@@ -24,7 +24,7 @@ import { toParametersSchema, toPiContent } from "./schemaTranslate.js";
24
24
  * extraction changed nothing it could observe. */
25
25
  export { withTimeout };
26
26
  const CLIENT_INFO = { name: "trellis-mcp-bridge", version: "0.0.0" };
27
- function listServerTools(client, timeoutMs) {
27
+ async function listServerTools(client, timeoutMs) {
28
28
  return withTimeout(client.listTools(), timeoutMs, `listTools timed out after ${timeoutMs}ms`).then((result) => result.tools);
29
29
  }
30
30
  /**
@@ -43,7 +43,7 @@ export default async function trellisMcpBridge(pi, homeDir = homedir(), connectT
43
43
  // independent of whether `trellis onboard` was ever run to add pi to
44
44
  // managed.yaml. managedAgents governs static config-file writes; this
45
45
  // is pi reading canonical directly at its own runtime, P4's own concern.
46
- const { desired } = resolveMcpPlan("pi", canonical.mcp, ALL_AGENTS, canonical.secretsPolicy);
46
+ const { desired } = await resolveMcpPlan("pi", canonical.mcp, ALL_AGENTS, canonical.secretsPolicy);
47
47
  const clients = new Set();
48
48
  const registry = new McpToolRegistry();
49
49
  const closeClient = async (client) => {
package/docs/research.md CHANGED
@@ -221,7 +221,10 @@ real incidents during development (a GitLab PAT stored under the wrong
221
221
  variable name, and three divergent values of the same router token, one of
222
222
  which was silently invalid). Trellis's contribution here is `trellis secrets
223
223
  audit` — a linter that fails a build if any adapter output contains a raw
224
- credential — not a new secret store.
224
+ credential — not a new secret store. The concrete reference form is
225
+ `mxenv://<profile>/<KEY>` (mx-env-secret-source): written in `servers.yaml`
226
+ `env`/`envAliases`, resolved from the encrypted mxenv store at consumption
227
+ point, delivered under the `KEY` segment.
225
228
 
226
229
  A third real incident during migrate-in: a source config's `${VAR}`
227
230
  reference doesn't always name itself (`OPENAPI_MCP_HEADERS:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-trellis",
3
- "version": "0.20.0",
3
+ "version": "0.21.0",
4
4
  "description": "A unified Code Agent Runtime for Skills, MCP, Memory, and shared instructions across Claude Code, Codex, Kiro, pi, Kimi Code, and ZCode.",
5
5
  "license": "MIT",
6
6
  "author": "Paul Leo",
@@ -69,6 +69,7 @@
69
69
  "@modelcontextprotocol/client": "^2.3.1",
70
70
  "@modelcontextprotocol/sdk": "^1.30.0",
71
71
  "@modelcontextprotocol/server": "^2.3.1",
72
+ "@morphixai/mxenv-core": "^0.12.2",
72
73
  "smol-toml": "^1.9.1",
73
74
  "yaml": "^2.9.1",
74
75
  "zod": "^4.6.5"
@@ -12,6 +12,11 @@
12
12
  # whose own native MCP client resolves `${VAR}` in its own process), so it
13
13
  # already has to read a value into memory to hand to that subprocess.
14
14
  #
15
+ # Prefer `mxenv://<profile>/<KEY>` references in servers.yaml `env` /
16
+ # `envAliases` entries where possible: they resolve from the encrypted
17
+ # mxenv store at consumption time and need neither ambient env nor a
18
+ # plaintext env_file (mx-env-secret-source).
19
+ #
15
20
  # env_file (optional) narrows *where* the bridge reads those values from —
16
21
  # a dotenv-format file (KEY=VALUE per line, no quoting/interpolation), never
17
22
  # merged with ambient process env once set: a name absent from it resolves
@@ -1,7 +1,11 @@
1
1
  # .trellis/mcp/servers.yaml — canonical MCP server definitions.
2
2
  #
3
3
  # Rules (see docs/architecture.md and docs/research.md §"Secrets"):
4
- # - `env` values are variable NAMES only. Never a literal secret.
4
+ # - `env` values are variable NAMES only, or `mxenv://<profile>/<KEY>`
5
+ # references resolved from the mxenv store at consumption time and
6
+ # delivered under the `KEY` segment (mx-env-secret-source). A
7
+ # reference gives this file value-free, machine-independent
8
+ # provenance; prefer it over relying on ambient process env.
5
9
  # - Real values come from whatever already populates process env
6
10
  # (a plain `.env`-style file, 1Password's `op run`, etc.) — Trellis
7
11
  # does not store or transport secret values itself.