@provos/ironcurtain 0.3.0 → 0.4.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 (108) hide show
  1. package/LICENSE +0 -1
  2. package/README.md +20 -1
  3. package/dist/cli.js +15 -0
  4. package/dist/cli.js.map +1 -1
  5. package/dist/config/config-command.d.ts +1 -0
  6. package/dist/config/config-command.js +138 -34
  7. package/dist/config/config-command.js.map +1 -1
  8. package/dist/config/constitution-user-base.md +2 -0
  9. package/dist/config/first-start.js +31 -3
  10. package/dist/config/first-start.js.map +1 -1
  11. package/dist/config/generated/compiled-policy.json +158 -64
  12. package/dist/config/generated/test-scenarios.json +144 -293
  13. package/dist/config/generated/tool-annotations.json +17 -3
  14. package/dist/config/index.js +49 -17
  15. package/dist/config/index.js.map +1 -1
  16. package/dist/config/paths.js +9 -4
  17. package/dist/config/paths.js.map +1 -1
  18. package/dist/config/user-config.d.ts +47 -0
  19. package/dist/config/user-config.js +97 -4
  20. package/dist/config/user-config.js.map +1 -1
  21. package/dist/docker/adapters/claude-code.js +14 -3
  22. package/dist/docker/adapters/claude-code.js.map +1 -1
  23. package/dist/docker/agent-adapter.d.ts +2 -0
  24. package/dist/docker/audit-log-tailer.d.ts +4 -3
  25. package/dist/docker/audit-log-tailer.js +9 -7
  26. package/dist/docker/audit-log-tailer.js.map +1 -1
  27. package/dist/docker/docker-agent-session.d.ts +11 -0
  28. package/dist/docker/docker-agent-session.js +103 -22
  29. package/dist/docker/docker-agent-session.js.map +1 -1
  30. package/dist/docker/docker-manager.js +82 -15
  31. package/dist/docker/docker-manager.js.map +1 -1
  32. package/dist/docker/managed-proxy.d.ts +7 -3
  33. package/dist/docker/managed-proxy.js +98 -8
  34. package/dist/docker/managed-proxy.js.map +1 -1
  35. package/dist/docker/mitm-proxy.d.ts +7 -4
  36. package/dist/docker/mitm-proxy.js +152 -62
  37. package/dist/docker/mitm-proxy.js.map +1 -1
  38. package/dist/docker/orientation.d.ts +1 -1
  39. package/dist/docker/orientation.js +5 -2
  40. package/dist/docker/orientation.js.map +1 -1
  41. package/dist/docker/platform.d.ts +20 -0
  42. package/dist/docker/platform.js +24 -0
  43. package/dist/docker/platform.js.map +1 -0
  44. package/dist/docker/provider-config.d.ts +38 -2
  45. package/dist/docker/provider-config.js +61 -0
  46. package/dist/docker/provider-config.js.map +1 -1
  47. package/dist/docker/types.d.ts +48 -6
  48. package/dist/pipeline/compile.js +2 -2
  49. package/dist/pipeline/compile.js.map +1 -1
  50. package/dist/pipeline/constitution-compiler.js +5 -2
  51. package/dist/pipeline/constitution-compiler.js.map +1 -1
  52. package/dist/pipeline/handwritten-scenarios.js +9 -10
  53. package/dist/pipeline/handwritten-scenarios.js.map +1 -1
  54. package/dist/pipeline/policy-verifier.d.ts +1 -1
  55. package/dist/pipeline/policy-verifier.js +7 -4
  56. package/dist/pipeline/policy-verifier.js.map +1 -1
  57. package/dist/pipeline/types.d.ts +7 -1
  58. package/dist/servers/fetch-server.d.ts +4 -3
  59. package/dist/servers/fetch-server.js +72 -10
  60. package/dist/servers/fetch-server.js.map +1 -1
  61. package/dist/servers/search-providers.d.ts +29 -0
  62. package/dist/servers/search-providers.js +156 -0
  63. package/dist/servers/search-providers.js.map +1 -0
  64. package/dist/session/index.js +16 -6
  65. package/dist/session/index.js.map +1 -1
  66. package/dist/signal/bot-command.d.ts +13 -0
  67. package/dist/signal/bot-command.js +54 -0
  68. package/dist/signal/bot-command.js.map +1 -0
  69. package/dist/signal/format.d.ts +31 -0
  70. package/dist/signal/format.js +101 -0
  71. package/dist/signal/format.js.map +1 -0
  72. package/dist/signal/index.d.ts +16 -0
  73. package/dist/signal/index.js +13 -0
  74. package/dist/signal/index.js.map +1 -0
  75. package/dist/signal/markdown-to-signal.d.ts +29 -0
  76. package/dist/signal/markdown-to-signal.js +154 -0
  77. package/dist/signal/markdown-to-signal.js.map +1 -0
  78. package/dist/signal/setup-signal.d.ts +48 -0
  79. package/dist/signal/setup-signal.js +443 -0
  80. package/dist/signal/setup-signal.js.map +1 -0
  81. package/dist/signal/signal-bot-daemon.d.ts +142 -0
  82. package/dist/signal/signal-bot-daemon.js +504 -0
  83. package/dist/signal/signal-bot-daemon.js.map +1 -0
  84. package/dist/signal/signal-config.d.ts +64 -0
  85. package/dist/signal/signal-config.js +53 -0
  86. package/dist/signal/signal-config.js.map +1 -0
  87. package/dist/signal/signal-container.d.ts +37 -0
  88. package/dist/signal/signal-container.js +112 -0
  89. package/dist/signal/signal-container.js.map +1 -0
  90. package/dist/signal/signal-transport.d.ts +34 -0
  91. package/dist/signal/signal-transport.js +70 -0
  92. package/dist/signal/signal-transport.js.map +1 -0
  93. package/dist/trusted-process/mcp-proxy-server.js +34 -3
  94. package/dist/trusted-process/mcp-proxy-server.js.map +1 -1
  95. package/dist/trusted-process/path-utils.d.ts +5 -1
  96. package/dist/trusted-process/path-utils.js +47 -4
  97. package/dist/trusted-process/path-utils.js.map +1 -1
  98. package/dist/trusted-process/tcp-server-transport.d.ts +43 -0
  99. package/dist/trusted-process/tcp-server-transport.js +119 -0
  100. package/dist/trusted-process/tcp-server-transport.js.map +1 -0
  101. package/dist/types/argument-roles.js +20 -5
  102. package/dist/types/argument-roles.js.map +1 -1
  103. package/docker/Dockerfile.base.arm64 +23 -0
  104. package/package.json +6 -3
  105. package/src/config/constitution-user-base.md +2 -0
  106. package/src/config/generated/compiled-policy.json +158 -64
  107. package/src/config/generated/test-scenarios.json +144 -293
  108. package/src/config/generated/tool-annotations.json +17 -3
@@ -1,76 +1,143 @@
1
1
  {
2
- "generatedAt": "2026-02-24T06:09:20.644Z",
3
- "constitutionHash": "dbebe147dfac369859c5d1cca2ed2fb1753f605a9d5db65ee73c4cc95908fe77",
4
- "inputHash": "bfb5da6dad59ef18fc9fe45eb809215d6b075b1353b77f2b73941b5274991159",
2
+ "generatedAt": "2026-02-25T03:02:42.079Z",
3
+ "constitutionHash": "7e403dc318faee9df1b20a2fb4ae2d1a8007ca9c775a9616cc4037e5a702ae82",
4
+ "inputHash": "7d80f5f4ac73f845e1668fdefc297fbf3a9f2bd4bc465240193f805c7f511047",
5
5
  "rules": [
6
6
  {
7
- "name": "allow-downloads-read-write-delete",
8
- "description": "Allow reading, writing, and deleting content in the Downloads folder.",
7
+ "name": "allow-downloads-read",
8
+ "description": "Allow reading files in the Downloads folder.",
9
+ "principle": "The agent is allowed to read, write and delete content in the Downloads folder.",
10
+ "if": {
11
+ "paths": {
12
+ "roles": [
13
+ "read-path"
14
+ ],
15
+ "within": "/mnt/c/Users/provo/Downloads"
16
+ }
17
+ },
18
+ "then": "allow",
19
+ "reason": "Policy explicitly permits reading in the Downloads folder."
20
+ },
21
+ {
22
+ "name": "allow-downloads-write",
23
+ "description": "Allow writing files in the Downloads folder.",
24
+ "principle": "The agent is allowed to read, write and delete content in the Downloads folder.",
25
+ "if": {
26
+ "paths": {
27
+ "roles": [
28
+ "write-path"
29
+ ],
30
+ "within": "/mnt/c/Users/provo/Downloads"
31
+ }
32
+ },
33
+ "then": "allow",
34
+ "reason": "Policy explicitly permits writing in the Downloads folder."
35
+ },
36
+ {
37
+ "name": "allow-downloads-delete",
38
+ "description": "Allow deleting files in the Downloads folder.",
9
39
  "principle": "The agent is allowed to read, write and delete content in the Downloads folder.",
10
40
  "if": {
11
41
  "paths": {
12
42
  "roles": [
13
- "read-path",
14
- "write-path",
15
43
  "delete-path"
16
44
  ],
17
- "within": "~/Downloads"
45
+ "within": "/mnt/c/Users/provo/Downloads"
18
46
  }
19
47
  },
20
48
  "then": "allow",
21
- "reason": "Constitution explicitly permits all read, write, and delete operations within the Downloads folder."
49
+ "reason": "Policy explicitly permits deletion in the Downloads folder."
22
50
  },
23
51
  {
24
52
  "name": "allow-documents-read",
25
- "description": "Allow reading documents in the Users document folder.",
53
+ "description": "Allow reading documents in the user's Documents folder.",
26
54
  "principle": "The agent is allowed to read documents in the Users document folder.",
27
55
  "if": {
28
56
  "paths": {
29
57
  "roles": [
30
58
  "read-path"
31
59
  ],
32
- "within": "~/Documents"
60
+ "within": "/home/provos/Documents"
33
61
  }
34
62
  },
35
63
  "then": "allow",
36
- "reason": "Constitution explicitly permits read access to the Users document folder."
64
+ "reason": "Policy explicitly permits reading in the user Documents folder."
65
+ },
66
+ {
67
+ "name": "escalate-documents-write",
68
+ "description": "Escalate write operations to the user's Documents folder for human approval.",
69
+ "principle": "Human oversight: Operations outside the sandbox require explicit human approval.",
70
+ "if": {
71
+ "paths": {
72
+ "roles": [
73
+ "write-path"
74
+ ],
75
+ "within": "/home/provos/Documents"
76
+ }
77
+ },
78
+ "then": "escalate",
79
+ "reason": "Writes to the Documents folder are not explicitly permitted and require human approval."
37
80
  },
38
81
  {
39
- "name": "allow-git-readonly",
40
- "description": "Allow read-only git operations within the sandbox.",
41
- "principle": "The agent may perform read-only git operations (status, diff, log, show, blame) within the sandbox without approval.",
82
+ "name": "allow-git-local-read-ops",
83
+ "description": "Allow local read-only git operations (status, log, diff, etc.).",
84
+ "principle": "The agent is allowed to perform all local read and write git operations within the sandbox.",
42
85
  "if": {
86
+ "server": [
87
+ "git"
88
+ ],
43
89
  "tool": [
44
90
  "git_status",
45
- "git_diff",
46
91
  "git_log",
92
+ "git_diff",
47
93
  "git_show",
48
94
  "git_blame",
49
95
  "git_reflog",
50
- "git_changelog_analyze"
96
+ "git_changelog_analyze",
97
+ "git_wrapup_instructions",
98
+ "git_clear_working_dir"
51
99
  ]
52
100
  },
53
101
  "then": "allow",
54
- "reason": "Constitution explicitly allows read-only git operations without approval."
102
+ "reason": "Read-only git operations are permitted as local operations."
55
103
  },
56
104
  {
57
- "name": "allow-git-stage-commit",
58
- "description": "Allow git stage (add) and commit operations within the sandbox.",
59
- "principle": "The agent may stage files (git add) and commit within the sandbox without approval.",
105
+ "name": "allow-git-local-write-ops",
106
+ "description": "Allow local git write operations (add, commit, branch, checkout, merge, rebase, stash, tag, init, worktree, set_working_dir, cherry_pick, reset, clean).",
107
+ "principle": "The agent is allowed to perform all local read and write git operations within the sandbox.",
60
108
  "if": {
109
+ "server": [
110
+ "git"
111
+ ],
61
112
  "tool": [
62
113
  "git_add",
63
- "git_commit"
114
+ "git_commit",
115
+ "git_branch",
116
+ "git_checkout",
117
+ "git_merge",
118
+ "git_rebase",
119
+ "git_stash",
120
+ "git_tag",
121
+ "git_init",
122
+ "git_worktree",
123
+ "git_set_working_dir",
124
+ "git_cherry_pick",
125
+ "git_reset",
126
+ "git_clean",
127
+ "git_remote"
64
128
  ]
65
129
  },
66
130
  "then": "allow",
67
- "reason": "Constitution explicitly allows staging and committing without approval."
131
+ "reason": "Local git write operations are explicitly permitted by policy."
68
132
  },
69
133
  {
70
- "name": "escalate-git-remote-operations",
71
- "description": "Require human approval for git push, pull, fetch, and any remote-contacting operations.",
72
- "principle": "The agent must receive human approval before git push, git pull, git fetch, or any remote-contacting operation.",
134
+ "name": "escalate-git-remote-ops",
135
+ "description": "Escalate git remote operations (push, pull, fetch, clone) for human approval.",
136
+ "principle": "The agent must ask for human approval for all other git operations.",
73
137
  "if": {
138
+ "server": [
139
+ "git"
140
+ ],
74
141
  "tool": [
75
142
  "git_push",
76
143
  "git_pull",
@@ -79,87 +146,107 @@
79
146
  ]
80
147
  },
81
148
  "then": "escalate",
82
- "reason": "Constitution requires human approval before any remote-contacting git operations."
149
+ "reason": "Remote git operations require explicit human approval per policy."
83
150
  },
84
151
  {
85
- "name": "escalate-git-history-rewrite",
86
- "description": "Require human approval for git reset, rebase, merge, or any history-rewriting operation.",
87
- "principle": "The agent must receive human approval before git reset, git rebase, git merge, or any history-rewriting operation.",
152
+ "name": "allow-web-search",
153
+ "description": "Allow web searches.",
154
+ "principle": "The agent may perform web searches to find information.",
88
155
  "if": {
89
156
  "tool": [
90
- "git_reset",
91
- "git_rebase",
92
- "git_merge",
93
- "git_cherry_pick"
157
+ "web_search"
94
158
  ]
95
159
  },
96
- "then": "escalate",
97
- "reason": "Constitution requires human approval before history-rewriting git operations."
160
+ "then": "allow",
161
+ "reason": "Policy explicitly permits web searches."
98
162
  },
99
163
  {
100
- "name": "escalate-git-branch-delete-force",
101
- "description": "Require human approval for git branch deletion or force operations.",
102
- "principle": "The agent must receive human approval before git branch deletion or force operations.",
164
+ "name": "allow-fetch-news-sites",
165
+ "description": "Allow fetching content from popular news sites.",
166
+ "principle": "The agent may fetch web content from popular news sites.",
103
167
  "if": {
104
- "roles": [
105
- "delete-history"
106
- ]
168
+ "tool": [
169
+ "http_fetch"
170
+ ],
171
+ "domains": {
172
+ "roles": [
173
+ "fetch-url"
174
+ ],
175
+ "allowed": [
176
+ "@popular-news-sites"
177
+ ]
178
+ }
107
179
  },
108
- "then": "escalate",
109
- "reason": "Constitution requires human approval before branch deletion or force operations."
180
+ "then": "allow",
181
+ "reason": "Policy explicitly permits fetching from popular news sites."
110
182
  },
111
183
  {
112
- "name": "allow-fetch-news-sites",
113
- "description": "Allow fetching web content from popular news sites.",
114
- "principle": "The agent may fetch web content from popular news sites.",
184
+ "name": "allow-fetch-development-sites",
185
+ "description": "Allow fetching content from popular development sites.",
186
+ "principle": "The agent may fetch web content from popular development sites.",
115
187
  "if": {
188
+ "tool": [
189
+ "http_fetch"
190
+ ],
116
191
  "domains": {
117
192
  "roles": [
118
193
  "fetch-url"
119
194
  ],
120
195
  "allowed": [
121
- "@popular-news-sites"
196
+ "@popular-development-sites"
122
197
  ]
123
198
  }
124
199
  },
125
200
  "then": "allow",
126
- "reason": "Constitution explicitly permits fetching content from popular news sites."
201
+ "reason": "Policy explicitly permits fetching from popular development sites."
127
202
  },
128
203
  {
129
- "name": "escalate-fetch-other-urls",
130
- "description": "Escalate fetching content from non-news URLs for human approval.",
131
- "principle": "Human oversight: operations outside the sandbox require explicit human approval.",
204
+ "name": "escalate-other-fetch",
205
+ "description": "Escalate HTTP fetch requests to domains not explicitly permitted.",
206
+ "principle": "Human oversight: Operations outside the sandbox require explicit human approval.",
207
+ "if": {
208
+ "tool": [
209
+ "http_fetch"
210
+ ]
211
+ },
212
+ "then": "escalate",
213
+ "reason": "Fetching from domains not explicitly allowed requires human approval."
214
+ },
215
+ {
216
+ "name": "escalate-move-with-delete-outside-permitted",
217
+ "description": "Escalate move operations where the source is outside permitted areas.",
218
+ "principle": "No destruction: Delete operations outside the sandbox are never permitted, unless an explicit exception is granted by the user guidance.",
132
219
  "if": {
133
220
  "roles": [
134
- "fetch-url"
221
+ "delete-path"
135
222
  ]
136
223
  },
137
224
  "then": "escalate",
138
- "reason": "Fetching from URLs not on the approved news sites list requires human judgment."
225
+ "reason": "Move/delete operations with sources outside sandbox or explicitly permitted directories require human approval."
139
226
  },
140
227
  {
141
228
  "name": "escalate-write-outside-permitted",
142
- "description": "Escalate write operations outside explicitly permitted directories.",
143
- "principle": "Human oversight: operations outside the sandbox require explicit human approval.",
229
+ "description": "Escalate write operations to areas not explicitly permitted.",
230
+ "principle": "Human oversight: Operations outside the sandbox require explicit human approval.",
144
231
  "if": {
145
232
  "roles": [
146
233
  "write-path"
147
234
  ]
148
235
  },
149
236
  "then": "escalate",
150
- "reason": "Write operations outside the sandbox or Downloads folder require human approval."
237
+ "reason": "Writes to areas not explicitly permitted require human approval."
151
238
  },
152
239
  {
153
- "name": "escalate-git-other",
154
- "description": "Escalate other git operations not explicitly allowed or denied.",
155
- "principle": "Human oversight: operations outside the sandbox require explicit human approval.",
240
+ "name": "escalate-write-history-outside-sandbox",
241
+ "description": "Escalate git history-modifying operations outside the sandbox.",
242
+ "principle": "Human oversight: Operations outside the sandbox require explicit human approval.",
156
243
  "if": {
157
- "server": [
158
- "git"
244
+ "roles": [
245
+ "write-history"
159
246
  ]
160
247
  },
161
248
  "then": "escalate",
162
- "reason": "Git operations not explicitly permitted require human oversight."
249
+ "reason": "Git operations that modify history outside the sandbox require human approval."
163
250
  }
164
251
  ],
165
252
  "listDefinitions": [
@@ -167,7 +254,14 @@
167
254
  "name": "popular-news-sites",
168
255
  "type": "domains",
169
256
  "principle": "The agent may fetch web content from popular news sites.",
170
- "generationPrompt": "List the domains of approximately 50 popular news websites from around the world, including major national newspapers, international wire services, and widely-read online news outlets.",
257
+ "generationPrompt": "List the domains of approximately 30 popular and well-known news websites from around the world, including major national and international outlets such as newspapers, broadcasters, and digital news publications.",
258
+ "requiresMcp": false
259
+ },
260
+ {
261
+ "name": "popular-development-sites",
262
+ "type": "domains",
263
+ "principle": "The agent may fetch web content from popular development sites.",
264
+ "generationPrompt": "List the domains of approximately 30 popular software development websites and resources, including code hosting platforms, developer documentation sites, package registries, programming Q&A sites, and developer blogs.",
171
265
  "requiresMcp": false
172
266
  }
173
267
  ]