@sanctuary-framework/mcp-server 1.2.0 → 1.2.2

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 (36) hide show
  1. package/dist/cli.cjs +1952 -405
  2. package/dist/cli.cjs.map +1 -1
  3. package/dist/cli.js +1953 -406
  4. package/dist/cli.js.map +1 -1
  5. package/dist/index.cjs +1646 -305
  6. package/dist/index.cjs.map +1 -1
  7. package/dist/index.d.cts +105 -18
  8. package/dist/index.d.ts +105 -18
  9. package/dist/index.js +1646 -306
  10. package/dist/index.js.map +1 -1
  11. package/dist/templates/coding-assistant/commitments.json +14 -0
  12. package/dist/templates/coding-assistant/defaults.json +34 -0
  13. package/dist/templates/coding-assistant/onboarding.md +24 -0
  14. package/dist/templates/coding-assistant/policy.md +1 -0
  15. package/dist/templates/coding-assistant/template.json +23 -0
  16. package/dist/templates/handoff-coordinator/commitments.json +14 -0
  17. package/dist/templates/handoff-coordinator/defaults.json +10 -0
  18. package/dist/templates/handoff-coordinator/onboarding.md +23 -0
  19. package/dist/templates/handoff-coordinator/policy.md +1 -0
  20. package/dist/templates/handoff-coordinator/template.json +17 -0
  21. package/dist/templates/ops-runner/commitments.json +14 -0
  22. package/dist/templates/ops-runner/defaults.json +12 -0
  23. package/dist/templates/ops-runner/onboarding.md +25 -0
  24. package/dist/templates/ops-runner/policy.md +1 -0
  25. package/dist/templates/ops-runner/template.json +16 -0
  26. package/dist/templates/planner/commitments.json +9 -0
  27. package/dist/templates/planner/defaults.json +10 -0
  28. package/dist/templates/planner/onboarding.md +22 -0
  29. package/dist/templates/planner/policy.md +1 -0
  30. package/dist/templates/planner/template.json +8 -0
  31. package/dist/templates/research-assistant/commitments.json +9 -0
  32. package/dist/templates/research-assistant/defaults.json +25 -0
  33. package/dist/templates/research-assistant/onboarding.md +21 -0
  34. package/dist/templates/research-assistant/policy.md +1 -0
  35. package/dist/templates/research-assistant/template.json +8 -0
  36. package/package.json +4 -4
@@ -0,0 +1,14 @@
1
+ {
2
+ "shapes": [
3
+ {
4
+ "commitment_class": "task-accept",
5
+ "example_deliverable": "Implement the requested feature or fix",
6
+ "example_deadline_or_terminal": "2026-12-31T23:59:59Z"
7
+ },
8
+ {
9
+ "commitment_class": "output-publish",
10
+ "example_deliverable": "Code diff, test results, or build artifacts",
11
+ "example_deadline_or_terminal": "Task completion or explicit operator cancel"
12
+ }
13
+ ]
14
+ }
@@ -0,0 +1,34 @@
1
+ {
2
+ "egress": [
3
+ {
4
+ "destination": "api.example-llm-provider.com",
5
+ "methods": ["POST"],
6
+ "comment": "Replace with your model provider inference endpoint."
7
+ },
8
+ {
9
+ "destination": "registry.npmjs.org",
10
+ "methods": ["GET"],
11
+ "comment": "npm package registry (read-only). Replace or extend with your package registries."
12
+ },
13
+ {
14
+ "destination": "pypi.org",
15
+ "methods": ["GET"],
16
+ "comment": "Python package index (read-only). Remove if not needed."
17
+ },
18
+ {
19
+ "destination": "docs.example-framework.com",
20
+ "methods": ["GET"],
21
+ "comment": "Replace with documentation sites your coding agent references."
22
+ }
23
+ ],
24
+ "budgets": {
25
+ "daily": { "amount": 500000, "unit": "tokens" }
26
+ },
27
+ "retention": {
28
+ "windows": {
29
+ "memory": { "max_age_seconds": 604800 },
30
+ "plans": { "max_age_seconds": 2592000 },
31
+ "outputs": { "max_age_seconds": 7776000 }
32
+ }
33
+ }
34
+ }
@@ -0,0 +1,24 @@
1
+ # Coding Assistant
2
+
3
+ A full-access coding agent with bidirectional memory and output sync, a daily token budget, and egress to your model provider and developer services.
4
+
5
+ ## What this agent does
6
+
7
+ - Reads and writes to all four slots (memory, credentials, plans, outputs).
8
+ - Syncs memory and outputs bidirectionally with peer agents in the mesh.
9
+ - Makes inference calls to your configured model provider.
10
+ - Accesses package registries and documentation sites for development tasks.
11
+
12
+ ## What this agent does not do
13
+
14
+ - It cannot exceed the daily token budget (default: 500,000 tokens/day).
15
+ - It cannot reach endpoints outside the egress allowlist.
16
+ - It cannot share credentials with other agents without explicit operator policy.
17
+
18
+ ## What you will need to set
19
+
20
+ 1. **Model provider endpoint.** Replace the placeholder domain with your actual LLM inference endpoint (e.g., your provider's API domain).
21
+ 2. **Developer service endpoints.** Add or replace package registries and documentation sites your agent needs.
22
+ 3. **Daily token budget.** The default is 500,000 tokens/day. Adjust based on your workload and cost tolerance.
23
+ 4. **Agent identity.** Provide an agent ID when initializing.
24
+ 5. **Retention windows.** Memory: 7 days. Plans: 30 days. Outputs: 90 days. Credentials: indefinite. Adjust as needed.
@@ -0,0 +1 @@
1
+ This agent may read and write to all four slots: memory, credentials, plans, and outputs. Memory and outputs are synced bidirectionally with peer agents in the mesh. Credentials access is scoped to the agent's own stored secrets. Plans are read-write for task tracking. The operator sets a daily token budget to cap inference spend. Egress is limited to the model provider and approved developer service endpoints.
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "coding-assistant",
3
+ "version": "1.0.0",
4
+ "channel": "read-then-report",
5
+ "tier": "B",
6
+ "slot_augmentations": {
7
+ "memory": {
8
+ "mode": "grant",
9
+ "grants": [
10
+ { "counterparty": "*", "action": "read" },
11
+ { "counterparty": "*", "action": "subscribe" }
12
+ ]
13
+ },
14
+ "outputs": {
15
+ "mode": "grant",
16
+ "grants": [
17
+ { "counterparty": "*", "action": "subscribe" }
18
+ ]
19
+ }
20
+ },
21
+ "target_archetype": "A Tier B adapter-wrapped agent running an external coding harness. Full four-slot access with bidirectional memory and output sync.",
22
+ "description": "Coding agent: bidirectional sync on memory and outputs. Daily token budget. Egress to model provider and dev services."
23
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "shapes": [
3
+ {
4
+ "commitment_class": "task-delegate",
5
+ "example_deliverable": "Delegate subtask to a peer agent",
6
+ "example_deadline_or_terminal": "Peer agent completion or timeout"
7
+ },
8
+ {
9
+ "commitment_class": "escrow-hold",
10
+ "example_deliverable": "Hold handoff output in escrow until counterparty confirms",
11
+ "example_deadline_or_terminal": "Counterparty confirmation or operator intervention"
12
+ }
13
+ ]
14
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "egress": [],
3
+ "budgets": {},
4
+ "retention": {
5
+ "windows": {
6
+ "plans": { "max_age_seconds": 2592000 },
7
+ "outputs": { "max_age_seconds": 2592000 }
8
+ }
9
+ }
10
+ }
@@ -0,0 +1,23 @@
1
+ # Handoff Coordinator
2
+
3
+ An agent that coordinates escrow-style handoffs between other agents in your fortress. Every handoff is gated by a commitment boundary check.
4
+
5
+ ## What this agent does
6
+
7
+ - Reads and writes to plans and outputs to manage handoffs.
8
+ - Delegates tasks to peer agents and holds results in escrow.
9
+ - Every handoff produces a commitment that passes the boundary gate.
10
+ - Declares the intra-mesh-escrow commitment class for structured handoffs.
11
+
12
+ ## What this agent does not do
13
+
14
+ - It cannot access credentials or memory.
15
+ - It cannot make outbound network requests (empty egress allowlist).
16
+ - It cannot spend tokens or money (no budget configured).
17
+ - It cannot bypass the commitment boundary; every handoff is gated.
18
+
19
+ ## What you will need to set
20
+
21
+ 1. **Agent identity.** Provide an agent ID when initializing.
22
+ 2. **Peer agents.** The coordinator needs at least two peer agents to coordinate between. Ensure those agents have compatible channel policies.
23
+ 3. **Retention windows.** Plans and outputs: 30 days each. Adjust if your handoff workflows span longer periods.
@@ -0,0 +1 @@
1
+ This agent coordinates handoffs between other agents in the mesh. It may read and write to plans and outputs. Every handoff must pass the commitment boundary gate. The intra-mesh-escrow commitment class is declared. No credentials access. No memory sync. No egress. No budget. The operator reviews handoff outcomes via the outputs slot.
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "handoff-coordinator",
3
+ "version": "1.0.0",
4
+ "channel": "fortress-relay",
5
+ "tier": "B",
6
+ "slot_augmentations": {
7
+ "plans": {
8
+ "mode": "grant",
9
+ "grants": [
10
+ { "counterparty": "*", "action": "read" }
11
+ ]
12
+ },
13
+ "concordia_commitment_classes": ["intra-mesh-escrow"]
14
+ },
15
+ "target_archetype": "A Tier B adapter-wrapped agent that coordinates handoffs between other agents. Commitment boundary enforces every handoff.",
16
+ "description": "Handoff coordinator: manages escrow-style handoffs between agents. Commitment boundary on every handoff."
17
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "shapes": [
3
+ {
4
+ "commitment_class": "task-accept",
5
+ "example_deliverable": "Execute the authorized ops task",
6
+ "example_deadline_or_terminal": "2026-12-31T23:59:59Z"
7
+ },
8
+ {
9
+ "commitment_class": "credential-share",
10
+ "example_deliverable": "Share scoped credential with authorized service",
11
+ "example_deadline_or_terminal": "Credential expiry or operator revocation"
12
+ }
13
+ ]
14
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "egress": [],
3
+ "budgets": {
4
+ "monthly": { "amount": 100, "unit": "usd" }
5
+ },
6
+ "retention": {
7
+ "windows": {
8
+ "plans": { "max_age_seconds": 2592000 },
9
+ "outputs": { "max_age_seconds": 7776000 }
10
+ }
11
+ }
12
+ }
@@ -0,0 +1,25 @@
1
+ # Ops Runner
2
+
3
+ An operations agent that runs authorized tasks against scoped credentials, with a monthly USD budget and operator-controlled egress.
4
+
5
+ ## What this agent does
6
+
7
+ - Accepts operator-authorized tasks via the commitment boundary.
8
+ - Accesses scoped credentials (one credential at a time, named by ID).
9
+ - Writes task results to the outputs slot for operator review.
10
+ - Tracks spend against a monthly USD budget.
11
+
12
+ ## What this agent does not do
13
+
14
+ - It cannot access credentials beyond the scope the operator configures.
15
+ - It cannot make outbound requests until the operator fills the egress allowlist.
16
+ - It cannot exceed the monthly USD budget (default: $100/month).
17
+ - It cannot act without first proposing a commitment that passes the boundary gate.
18
+
19
+ ## What you will need to set
20
+
21
+ 1. **Egress allowlist.** This template ships with an empty allowlist. You must add every service endpoint your ops agent needs to reach.
22
+ 2. **Credential scope.** When initializing, specify which credential ID the agent may access.
23
+ 3. **Monthly USD budget.** The default is $100/month. Adjust based on the cost of the APIs your agent calls.
24
+ 4. **Agent identity.** Provide an agent ID when initializing.
25
+ 5. **Retention windows.** Plans: 30 days. Outputs: 90 days. Credentials: indefinite. Adjust as needed.
@@ -0,0 +1 @@
1
+ This agent may access scoped credentials for operator-authorized operations tasks. Plans are gated by the commitment boundary: the agent must propose a commitment before acting. Outputs are written for operator review. The operator configures a monthly USD budget to cap metered API spend. Egress is empty by default; the operator must explicitly allowlist the service endpoints this agent needs to reach.
@@ -0,0 +1,16 @@
1
+ {
2
+ "name": "ops-runner",
3
+ "version": "1.0.0",
4
+ "channel": "read-then-report",
5
+ "tier": "B",
6
+ "slot_augmentations": {
7
+ "credentials": {
8
+ "mode": "grant",
9
+ "grants": [
10
+ { "counterparty": "*", "action": "share" }
11
+ ]
12
+ }
13
+ },
14
+ "target_archetype": "A Tier B adapter-wrapped agent that runs operator-authorized ops tasks against scoped credentials. Monthly USD budget. Plans gated by commitment boundary.",
15
+ "description": "Ops agent: runs authorized tasks with scoped credentials. Monthly USD budget. Operator fills egress allowlist."
16
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "shapes": [
3
+ {
4
+ "commitment_class": "plan-publish",
5
+ "example_deliverable": "Implementation plan or revision for operator review",
6
+ "example_deadline_or_terminal": "Operator approval or plan superseded"
7
+ }
8
+ ]
9
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "egress": [],
3
+ "budgets": {},
4
+ "retention": {
5
+ "windows": {
6
+ "plans": { "max_age_seconds": 7776000 },
7
+ "outputs": { "max_age_seconds": 7776000 }
8
+ }
9
+ }
10
+ }
@@ -0,0 +1,22 @@
1
+ # Planner
2
+
3
+ A planning agent that writes and revises plans for your review. Operates entirely offline with no egress and no budget.
4
+
5
+ ## What this agent does
6
+
7
+ - Writes and revises plans in the plans slot.
8
+ - Other agents in the mesh can read-only inspect this agent's plans.
9
+ - Reads memory and outputs for context (read-only).
10
+
11
+ ## What this agent does not do
12
+
13
+ - It cannot access credentials.
14
+ - It cannot make outbound network requests (empty egress allowlist).
15
+ - It cannot spend tokens or money (no budget configured).
16
+ - It cannot execute plans; it only writes them for your approval.
17
+
18
+ ## What you will need to set
19
+
20
+ 1. **Agent identity.** Provide an agent ID when initializing.
21
+ 2. **Retention windows.** Plans and outputs: 90 days each. Adjust based on your planning cycle length.
22
+ 3. **Peer agents.** If you want other agents to inspect this planner's output, they will need a channel opened to read the plans slot.
@@ -0,0 +1 @@
1
+ This agent may write and revise plans. The operator reads plans before approving them. Other agents in the mesh may read this agent's plans (read-only inspect). Memory and outputs are read-only for this agent. No credentials access. No egress. No budget. This agent works entirely offline, producing plans for human review.
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "planner",
3
+ "version": "1.0.0",
4
+ "channel": "plan-draft-only",
5
+ "tier": "B",
6
+ "target_archetype": "A Tier B adapter-wrapped agent that writes and revises plans for operator review. Plans slot read-write; other slots read-only. No egress.",
7
+ "description": "Planning agent: writes plans for operator review. No egress, no budget, read-only on other slots."
8
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "shapes": [
3
+ {
4
+ "commitment_class": "output-publish",
5
+ "example_deliverable": "Research summary on the requested topic",
6
+ "example_deadline_or_terminal": "2026-12-31T23:59:59Z"
7
+ }
8
+ ]
9
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "egress": [
3
+ {
4
+ "destination": "api.example-research-provider.com",
5
+ "methods": ["GET"],
6
+ "comment": "Replace with your research data provider endpoint."
7
+ },
8
+ {
9
+ "destination": "scholar.example.com",
10
+ "methods": ["GET"],
11
+ "comment": "Replace with your academic search endpoint."
12
+ },
13
+ {
14
+ "destination": "api.example-llm-provider.com",
15
+ "methods": ["POST"],
16
+ "comment": "Replace with your model provider inference endpoint."
17
+ }
18
+ ],
19
+ "budgets": {},
20
+ "retention": {
21
+ "windows": {
22
+ "outputs": { "max_age_seconds": 2592000 }
23
+ }
24
+ }
25
+ }
@@ -0,0 +1,21 @@
1
+ # Research Assistant
2
+
3
+ A read-only research agent that fetches information from approved sources and writes summaries to your fortress outputs.
4
+
5
+ ## What this agent does
6
+
7
+ - Reads from external research sources you configure in the egress allowlist.
8
+ - Writes research summaries to the outputs slot for your review.
9
+ - Does not access credentials, plans, or memory from other agents.
10
+
11
+ ## What this agent does not do
12
+
13
+ - It cannot share credentials or access secrets.
14
+ - It cannot modify plans or coordinate with other agents.
15
+ - It cannot make outbound requests to destinations outside the egress allowlist.
16
+
17
+ ## What you will need to set
18
+
19
+ 1. **Egress allowlist.** Replace the placeholder domains in the egress configuration with your actual research data providers and model inference endpoint.
20
+ 2. **Agent identity.** Provide an agent ID when initializing (used for policy binding and audit trail).
21
+ 3. **Review cadence.** Outputs are retained for 30 days by default. Adjust if your review cycle is longer.
@@ -0,0 +1 @@
1
+ This agent may read approved external sources and write research summaries to the outputs slot. No credentials access. No plans access. No memory sync with other agents. The operator reviews all outputs before acting on them. Outputs are read-only to other agents in the mesh.
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "research-assistant",
3
+ "version": "1.0.0",
4
+ "channel": "read-then-report",
5
+ "tier": "B",
6
+ "target_archetype": "A Tier B adapter-wrapped agent that reads approved sources and writes research summaries. Minimal footprint, read-only output surface.",
7
+ "description": "Research agent: reads sources, writes summaries to outputs. No credentials, no plans, no bidirectional sync."
8
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sanctuary-framework/mcp-server",
3
- "version": "1.2.0",
4
- "description": "Your agent, your machine, your keys an MCP server that adds encrypted state, approval gates, and a portable identity to any AI agent.",
3
+ "version": "1.2.2",
4
+ "description": "Your agent, your machine, your keys. An MCP server that adds encrypted state, approval gates, and a portable identity to any AI agent.",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
7
7
  "module": "dist/index.js",
@@ -23,7 +23,7 @@
23
23
  "LICENSE"
24
24
  ],
25
25
  "scripts": {
26
- "build": "tsup",
26
+ "build": "tsup && node scripts/copy-templates.js",
27
27
  "dev": "tsup --watch",
28
28
  "start": "node dist/cli.js",
29
29
  "test": "vitest run",
@@ -80,7 +80,7 @@
80
80
  "license": "Apache-2.0",
81
81
  "repository": {
82
82
  "type": "git",
83
- "url": "https://github.com/eriknewton/sanctuary-framework.git",
83
+ "url": "git+https://github.com/eriknewton/sanctuary-framework.git",
84
84
  "directory": "server"
85
85
  },
86
86
  "keywords": [