agent-trellis 0.1.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 (80) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +127 -0
  3. package/dist/adapters/claude-code.d.ts +23 -0
  4. package/dist/adapters/claude-code.js +86 -0
  5. package/dist/adapters/codex.d.ts +27 -0
  6. package/dist/adapters/codex.js +119 -0
  7. package/dist/adapters/jsonMcp.d.ts +24 -0
  8. package/dist/adapters/jsonMcp.js +84 -0
  9. package/dist/adapters/kiro.d.ts +34 -0
  10. package/dist/adapters/kiro.js +175 -0
  11. package/dist/adapters/mcpPlan.d.ts +28 -0
  12. package/dist/adapters/mcpPlan.js +83 -0
  13. package/dist/adapters/pi.d.ts +23 -0
  14. package/dist/adapters/pi.js +108 -0
  15. package/dist/adapters/symlinkPlan.d.ts +33 -0
  16. package/dist/adapters/symlinkPlan.js +120 -0
  17. package/dist/cli.d.ts +7 -0
  18. package/dist/cli.js +135 -0
  19. package/dist/commands/doctor.d.ts +88 -0
  20. package/dist/commands/doctor.js +269 -0
  21. package/dist/commands/init.d.ts +44 -0
  22. package/dist/commands/init.js +150 -0
  23. package/dist/commands/mcp.d.ts +28 -0
  24. package/dist/commands/mcp.js +70 -0
  25. package/dist/commands/migrate.d.ts +38 -0
  26. package/dist/commands/migrate.js +132 -0
  27. package/dist/commands/onboard.d.ts +50 -0
  28. package/dist/commands/onboard.js +155 -0
  29. package/dist/commands/secretsAudit.d.ts +35 -0
  30. package/dist/commands/secretsAudit.js +115 -0
  31. package/dist/commands/sync.d.ts +40 -0
  32. package/dist/commands/sync.js +91 -0
  33. package/dist/core/adapter.d.ts +133 -0
  34. package/dist/core/adapter.js +16 -0
  35. package/dist/core/canonical.d.ts +16 -0
  36. package/dist/core/canonical.js +148 -0
  37. package/dist/core/types.d.ts +201 -0
  38. package/dist/core/types.js +15 -0
  39. package/dist/lib/dirEquals.d.ts +7 -0
  40. package/dist/lib/dirEquals.js +39 -0
  41. package/dist/lib/envVarNames.d.ts +35 -0
  42. package/dist/lib/envVarNames.js +79 -0
  43. package/dist/lib/fsIdentity.d.ts +16 -0
  44. package/dist/lib/fsIdentity.js +53 -0
  45. package/dist/lib/mcpProbe.d.ts +14 -0
  46. package/dist/lib/mcpProbe.js +96 -0
  47. package/dist/lib/probeCommon.d.ts +24 -0
  48. package/dist/lib/probeCommon.js +108 -0
  49. package/dist/lib/secretEnv.d.ts +19 -0
  50. package/dist/lib/secretEnv.js +46 -0
  51. package/dist/lib/skillFile.d.ts +12 -0
  52. package/dist/lib/skillFile.js +26 -0
  53. package/dist/lib/syncArgs.d.ts +16 -0
  54. package/dist/lib/syncArgs.js +17 -0
  55. package/dist/lib/tomlSection.d.ts +57 -0
  56. package/dist/lib/tomlSection.js +162 -0
  57. package/dist/pi-bridge/bundle.js +32074 -0
  58. package/dist/pi-bridge/index.d.ts +48 -0
  59. package/dist/pi-bridge/index.js +188 -0
  60. package/dist/pi-bridge/schemaTranslate.d.ts +55 -0
  61. package/dist/pi-bridge/schemaTranslate.js +40 -0
  62. package/dist/probes/claude-code.d.ts +13 -0
  63. package/dist/probes/claude-code.js +48 -0
  64. package/dist/probes/codex.d.ts +24 -0
  65. package/dist/probes/codex.js +78 -0
  66. package/dist/probes/kiro.d.ts +12 -0
  67. package/dist/probes/kiro.js +48 -0
  68. package/dist/probes/pi.d.ts +14 -0
  69. package/dist/probes/pi.js +53 -0
  70. package/dist/sdk.d.ts +14 -0
  71. package/dist/sdk.js +13 -0
  72. package/docs/architecture.md +367 -0
  73. package/docs/getting-started.md +235 -0
  74. package/docs/implementation-plan.md +341 -0
  75. package/docs/research.md +175 -0
  76. package/docs/roadmap.md +484 -0
  77. package/package.json +59 -0
  78. package/schema/scope.example.yaml +33 -0
  79. package/schema/secrets.policy.example.yaml +43 -0
  80. package/schema/servers.example.yaml +87 -0
@@ -0,0 +1,87 @@
1
+ # .trellis/mcp/servers.yaml — canonical MCP server definitions.
2
+ #
3
+ # Rules (see docs/architecture.md and docs/research.md §"Secrets"):
4
+ # - `env` values are variable NAMES only. Never a literal secret.
5
+ # - Real values come from whatever already populates process env
6
+ # (a plain `.env`-style file, 1Password's `op run`, etc.) — Trellis
7
+ # does not store or transport secret values itself.
8
+ # - A server name that a host environment is known to inject at runtime
9
+ # (see `known_host_injected` below) must not be redefined here — on
10
+ # Codex this causes the entire process to fail to start, not just that
11
+ # server. See docs/research.md §"Codex — three hard constraints".
12
+ # - `agents:` is optional and restricts a server to specific agents; omit
13
+ # it and the server goes to all four (the default). Unlike skills/
14
+ # subagents/memories, this scoping lives inline here rather than in
15
+ # `scope.yaml` — this file is Trellis's own format, never handed to an
16
+ # agent directly, so there's no risk of an agent rejecting an unknown
17
+ # field the way Codex does with SKILL.md frontmatter.
18
+
19
+ servers:
20
+ # Default shared-memory backend (docs/research.md "Shared memory") —
21
+ # @modelcontextprotocol/server-memory: zero-dependency, local JSON
22
+ # knowledge graph, MIT-licensed. Left commented out here because this
23
+ # exact example ALSO lists "memory" under known_host_injected below —
24
+ # uncommenting both would self-collide (Trellis's own collision guard
25
+ # would correctly refuse to write it). Which situation you're actually
26
+ # in depends on your host:
27
+ # - If your host (e.g. mirasim) already injects a runtime connector
28
+ # under this name — check with `trellis doctor` — leave this
29
+ # commented out and keep "memory" in known_host_injected below;
30
+ # you already have it, just not from a static definition.
31
+ # - If your host injects nothing under this name, uncomment this
32
+ # entry AND remove "memory" from known_host_injected below (it's
33
+ # only there as inherited example content, not a fact about your
34
+ # environment) — that's what actually wires the default.
35
+ # mem0/OpenMemory or a totalrecallai-class semantic-search server are
36
+ # documented opt-in upgrades from this default, not silent defaults —
37
+ # same section of docs/research.md.
38
+ # memory:
39
+ # transport: stdio
40
+ # command: npx
41
+ # args: ["-y", "@modelcontextprotocol/server-memory"]
42
+
43
+ tanka:
44
+ transport: stdio
45
+ command: tanka-mcp
46
+ env: [TANKA_EMAIL, TANKA_ENV]
47
+
48
+ gitlab:
49
+ transport: stdio
50
+ command: npx
51
+ args: ["-y", "@zereight/mcp-gitlab"]
52
+ env: [GITLAB_PERSONAL_ACCESS_TOKEN, GITLAB_API_URL]
53
+
54
+ figma:
55
+ transport: http
56
+ url: "https://mcp.figma.com/mcp"
57
+ auth: oauth
58
+
59
+ # Example of a private/agent-specific server: only Claude Code has a use
60
+ # for this one, so the other three agents never see it defined at all.
61
+ claude-only-tool:
62
+ transport: stdio
63
+ command: node
64
+ args: ["/path/to/claude-specific-server.js"]
65
+ agents: [claude-code]
66
+
67
+ # Names a known host (e.g. mirasim) may inject into an agent process at
68
+ # runtime, independent of this file. Trellis's collision check refuses to
69
+ # generate a local definition under any of these names.
70
+ known_host_injected:
71
+ - atlassian
72
+ - sentry
73
+ - memory
74
+ - mirasim
75
+
76
+ # How the servers above reach the four agents. Omit this whole block for
77
+ # direct mode (today's default: every agent gets all N server definitions
78
+ # written straight into its native config).
79
+ #
80
+ # Set it to route every agent through a single HTTP endpoint instead —
81
+ # every adapter then writes exactly ONE entry (this URL), not N. What runs
82
+ # behind the URL is not Trellis's concern: could be a self-hosted
83
+ # github.com/ravitemer/mcp-hub instance, a hosted mcp-router account,
84
+ # anything else speaking MCP over HTTP. No engine/product switch to
85
+ # maintain — see docs/architecture.md "MCP hub mode".
86
+ hub:
87
+ url: "http://127.0.0.1:37373/mcp"