agentbundle 0.2.0__py3-none-any.whl

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 (99) hide show
  1. agentbundle/__init__.py +14 -0
  2. agentbundle/__main__.py +5 -0
  3. agentbundle/_data/adapter.schema.json +270 -0
  4. agentbundle/_data/adapter.toml +584 -0
  5. agentbundle/_data/install-marker.py +1099 -0
  6. agentbundle/_data/pack.schema.json +152 -0
  7. agentbundle/_data/plugin-manifest.derived.schema.json +33 -0
  8. agentbundle/_data/plugin-manifest.schema.json +18 -0
  9. agentbundle/build/__init__.py +206 -0
  10. agentbundle/build/__main__.py +8 -0
  11. agentbundle/build/adapter_root_bins.py +336 -0
  12. agentbundle/build/adapters/__init__.py +46 -0
  13. agentbundle/build/adapters/claude_code.py +142 -0
  14. agentbundle/build/adapters/codex.py +227 -0
  15. agentbundle/build/adapters/copilot.py +149 -0
  16. agentbundle/build/adapters/kiro.py +608 -0
  17. agentbundle/build/adapters/kiro_cli.py +53 -0
  18. agentbundle/build/adapters/kiro_ide.py +275 -0
  19. agentbundle/build/contract.py +20 -0
  20. agentbundle/build/lint_packs.py +555 -0
  21. agentbundle/build/main.py +596 -0
  22. agentbundle/build/phase_order.py +40 -0
  23. agentbundle/build/projections/__init__.py +13 -0
  24. agentbundle/build/projections/codex_agent_toml.py +232 -0
  25. agentbundle/build/projections/copilot_agent_md.py +206 -0
  26. agentbundle/build/projections/copilot_hooks_json.py +142 -0
  27. agentbundle/build/projections/direct_directory.py +41 -0
  28. agentbundle/build/projections/hook_id.py +27 -0
  29. agentbundle/build/projections/kiro_ide_hook.py +256 -0
  30. agentbundle/build/projections/merge_into_agent_json.py +264 -0
  31. agentbundle/build/projections/merge_json.py +58 -0
  32. agentbundle/build/projections/user_merge_json.py +324 -0
  33. agentbundle/build/scope_rails.py +728 -0
  34. agentbundle/build/self_host.py +1486 -0
  35. agentbundle/build/shared_libs.py +309 -0
  36. agentbundle/build/target_resolver.py +85 -0
  37. agentbundle/build/tests/__init__.py +0 -0
  38. agentbundle/build/tests/test_adapter_claude_code.py +275 -0
  39. agentbundle/build/tests/test_adapter_codex.py +699 -0
  40. agentbundle/build/tests/test_adapter_copilot.py +91 -0
  41. agentbundle/build/tests/test_adapter_kiro.py +449 -0
  42. agentbundle/build/tests/test_adapter_kiro_alias.py +105 -0
  43. agentbundle/build/tests/test_adapter_kiro_cli.py +102 -0
  44. agentbundle/build/tests/test_adapter_kiro_ide.py +173 -0
  45. agentbundle/build/tests/test_adapter_root_bins_projection.py +429 -0
  46. agentbundle/build/tests/test_build_ships_seeds.py +78 -0
  47. agentbundle/build/tests/test_contract.py +582 -0
  48. agentbundle/build/tests/test_contract_scope.py +224 -0
  49. agentbundle/build/tests/test_contract_v07.py +191 -0
  50. agentbundle/build/tests/test_contract_v08.py +230 -0
  51. agentbundle/build/tests/test_direct_directory_cleanup.py +65 -0
  52. agentbundle/build/tests/test_end_to_end_build.py +227 -0
  53. agentbundle/build/tests/test_lint_agents_md_legacy_block.py +135 -0
  54. agentbundle/build/tests/test_lint_agents_md_risk_block.py +116 -0
  55. agentbundle/build/tests/test_lint_packs.py +703 -0
  56. agentbundle/build/tests/test_load_pack_hook_wiring_safely.py +176 -0
  57. agentbundle/build/tests/test_pack_schema.py +265 -0
  58. agentbundle/build/tests/test_pack_schema_allowed_adapters.py +258 -0
  59. agentbundle/build/tests/test_pack_schema_install.py +305 -0
  60. agentbundle/build/tests/test_pipeline.py +272 -0
  61. agentbundle/build/tests/test_plugin_manifest_schema.py +327 -0
  62. agentbundle/build/tests/test_projections_merge_json.py +148 -0
  63. agentbundle/build/tests/test_scope_rails.py +398 -0
  64. agentbundle/build/tests/test_security.py +97 -0
  65. agentbundle/build/tests/test_self_host_check.py +2100 -0
  66. agentbundle/build/tests/test_shared_libs_projection.py +415 -0
  67. agentbundle/build/tests/test_shipped_packs_v07_declarations.py +100 -0
  68. agentbundle/build/tests/test_shipped_packs_v08_declarations.py +80 -0
  69. agentbundle/build/tests/test_validate.py +250 -0
  70. agentbundle/build/validate.py +141 -0
  71. agentbundle/catalogue.py +164 -0
  72. agentbundle/cli.py +486 -0
  73. agentbundle/commands/__init__.py +5 -0
  74. agentbundle/commands/_common.py +174 -0
  75. agentbundle/commands/_drop_warning.py +329 -0
  76. agentbundle/commands/adapt.py +343 -0
  77. agentbundle/commands/config.py +125 -0
  78. agentbundle/commands/diff.py +211 -0
  79. agentbundle/commands/init_state.py +279 -0
  80. agentbundle/commands/install.py +3026 -0
  81. agentbundle/commands/list_packs.py +170 -0
  82. agentbundle/commands/list_targets.py +23 -0
  83. agentbundle/commands/reconcile.py +161 -0
  84. agentbundle/commands/render.py +165 -0
  85. agentbundle/commands/scaffold.py +69 -0
  86. agentbundle/commands/uninstall.py +294 -0
  87. agentbundle/commands/upgrade.py +699 -0
  88. agentbundle/commands/validate.py +688 -0
  89. agentbundle/config.py +747 -0
  90. agentbundle/render.py +123 -0
  91. agentbundle/safety.py +633 -0
  92. agentbundle/scope.py +319 -0
  93. agentbundle/user_config.py +284 -0
  94. agentbundle/version.py +49 -0
  95. agentbundle-0.2.0.dist-info/METADATA +37 -0
  96. agentbundle-0.2.0.dist-info/RECORD +99 -0
  97. agentbundle-0.2.0.dist-info/WHEEL +5 -0
  98. agentbundle-0.2.0.dist-info/entry_points.txt +2 -0
  99. agentbundle-0.2.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,14 @@
1
+ """agentbundle — distribution machinery for the agent-ready-repo catalogue.
2
+
3
+ The `build` submodule ships the adapter contract, the four reference
4
+ adapters, the recipe-driven build pipeline, and the self-host gate.
5
+
6
+ The CLI surface (RFC-0003 F-cli) lives in this package's top-level modules
7
+ and imports `agentbundle.build` as a library — no `sys.path` tricks, no
8
+ `subprocess` to `tools/build/build.py`.
9
+ """
10
+
11
+ from agentbundle.version import CLI_VERSION as __version__
12
+ from agentbundle.version import SPEC_VERSION
13
+
14
+ __all__ = ["__version__", "SPEC_VERSION"]
@@ -0,0 +1,5 @@
1
+ """`python -m agentbundle` entrypoint."""
2
+
3
+ from agentbundle.cli import main
4
+
5
+ raise SystemExit(main())
@@ -0,0 +1,270 @@
1
+ {
2
+ "type": "object",
3
+ "required": ["contract", "primitive", "adapter"],
4
+ "properties": {
5
+ "contract": {
6
+ "type": "object",
7
+ "required": ["version"],
8
+ "properties": {
9
+ "version": {"type": "string", "pattern": "^[0-9]+\\.[0-9]+$"}
10
+ }
11
+ },
12
+ "primitive": {
13
+ "type": "object",
14
+ "required": ["skill", "agent", "hook-body", "hook-wiring", "command"],
15
+ "additionalProperties": {
16
+ "type": "object",
17
+ "required": ["source-path"],
18
+ "properties": {
19
+ "source-path": {"type": "string"}
20
+ }
21
+ }
22
+ },
23
+ "adapter": {
24
+ "type": "object",
25
+ "additionalProperties": {
26
+ "type": "object",
27
+ "properties": {
28
+ "projection": {
29
+ "type": "array",
30
+ "items": {
31
+ "type": "object",
32
+ "required": ["primitive", "mode"],
33
+ "properties": {
34
+ "primitive": {
35
+ "type": "string",
36
+ "enum": ["skill", "agent", "hook-body", "hook-wiring", "command"]
37
+ },
38
+ "mode": {
39
+ "type": "string",
40
+ "enum": [
41
+ "direct-directory",
42
+ "direct-file",
43
+ "merge-json",
44
+ "user-merge-json",
45
+ "merge-into-agent-json",
46
+ "instruction-file",
47
+ "managed-block-inline",
48
+ "degraded-info-log",
49
+ "dropped",
50
+ "codex-agent-toml",
51
+ "copilot-agent-md",
52
+ "copilot-hooks-json"
53
+ ]
54
+ },
55
+ "target-path": {"type": "string"},
56
+ "on-conflict": {
57
+ "type": "string",
58
+ "enum": [
59
+ "prompt-then-preserve",
60
+ "prompt-then-overwrite",
61
+ "preserve-outside-block",
62
+ "merge-managed-key-only",
63
+ "overwrite-without-prompt"
64
+ ]
65
+ },
66
+ "managed-key": {"type": "string"},
67
+ "managed-block-delimiter-start": {"type": "string"},
68
+ "managed-block-delimiter-end": {"type": "string"},
69
+ "frontmatter-mapping": {"type": "string"},
70
+ "frontmatter-default": {"type": "string"},
71
+ "info-message": {"type": "string"}
72
+ }
73
+ }
74
+ },
75
+ "projections": {
76
+ "type": "object",
77
+ "additionalProperties": {
78
+ "type": "object",
79
+ "required": ["mode"],
80
+ "properties": {
81
+ "mode": {
82
+ "if": {"type": "string"},
83
+ "then": {
84
+ "enum": [
85
+ "direct-directory",
86
+ "direct-file",
87
+ "merge-json",
88
+ "user-merge-json",
89
+ "merge-into-agent-json",
90
+ "instruction-file",
91
+ "managed-block-inline",
92
+ "degraded-info-log",
93
+ "dropped",
94
+ "codex-agent-toml",
95
+ "copilot-agent-md",
96
+ "copilot-hooks-json"
97
+ ]
98
+ },
99
+ "else": {
100
+ "type": "object",
101
+ "additionalProperties": false,
102
+ "properties": {
103
+ "repo": {
104
+ "enum": [
105
+ "direct-directory",
106
+ "direct-file",
107
+ "merge-json",
108
+ "user-merge-json",
109
+ "merge-into-agent-json",
110
+ "instruction-file",
111
+ "managed-block-inline",
112
+ "degraded-info-log",
113
+ "dropped",
114
+ "codex-agent-toml",
115
+ "copilot-agent-md",
116
+ "copilot-hooks-json"
117
+ ]
118
+ },
119
+ "user": {
120
+ "enum": [
121
+ "direct-directory",
122
+ "direct-file",
123
+ "merge-json",
124
+ "user-merge-json",
125
+ "merge-into-agent-json",
126
+ "instruction-file",
127
+ "managed-block-inline",
128
+ "degraded-info-log",
129
+ "dropped",
130
+ "codex-agent-toml",
131
+ "copilot-agent-md",
132
+ "copilot-hooks-json"
133
+ ]
134
+ }
135
+ }
136
+ }
137
+ },
138
+ "target": {
139
+ "if": {"type": "string"},
140
+ "then": {},
141
+ "else": {
142
+ "type": "object",
143
+ "additionalProperties": false,
144
+ "properties": {
145
+ "repo": {"type": "string"},
146
+ "user": {"type": "string"}
147
+ }
148
+ }
149
+ },
150
+ "managed-key": {
151
+ "if": {"type": "string"},
152
+ "then": {},
153
+ "else": {
154
+ "type": "object",
155
+ "additionalProperties": false,
156
+ "properties": {
157
+ "repo": {"type": "string"},
158
+ "user": {"type": "string"}
159
+ }
160
+ }
161
+ },
162
+ "agent-event-vocabulary": {
163
+ "type": "array",
164
+ "minItems": 1,
165
+ "items": {"type": "string"}
166
+ },
167
+ "ide-event-vocabulary": {
168
+ "type": "array",
169
+ "minItems": 1,
170
+ "items": {"type": "string"}
171
+ },
172
+ "ide-action-vocabulary": {
173
+ "type": "array",
174
+ "minItems": 1,
175
+ "items": {"type": "string"}
176
+ },
177
+ "on-conflict": {
178
+ "type": "string",
179
+ "enum": [
180
+ "prompt-then-preserve",
181
+ "prompt-then-overwrite",
182
+ "preserve-outside-block",
183
+ "merge-managed-key-only",
184
+ "overwrite-without-prompt"
185
+ ]
186
+ },
187
+ "frontmatter-mapping": {"type": "string"},
188
+ "frontmatter-default": {"type": "string"},
189
+ "info-message": {"type": "string"}
190
+ }
191
+ }
192
+ },
193
+ "scope": {
194
+ "type": "object",
195
+ "required": ["repo", "allowed-prefixes"],
196
+ "properties": {
197
+ "repo": {"type": "string"},
198
+ "user": {"type": "string"},
199
+ "allowed-prefixes": {
200
+ "type": "object",
201
+ "required": ["repo"],
202
+ "properties": {
203
+ "repo": {
204
+ "type": "array",
205
+ "minItems": 1,
206
+ "items": {
207
+ "type": "string",
208
+ "pattern": "^((?!\\.\\.(\\/|$))[^/]+/)+$"
209
+ }
210
+ },
211
+ "user": {
212
+ "type": "array",
213
+ "minItems": 1,
214
+ "items": {
215
+ "type": "string",
216
+ "pattern": "^((?!\\.\\.(\\/|$))[^/]+/)+$"
217
+ }
218
+ }
219
+ },
220
+ "additionalProperties": {
221
+ "type": "array",
222
+ "minItems": 1,
223
+ "items": {
224
+ "type": "string",
225
+ "pattern": "^((?!\\.\\.(\\/|$))[^/]+/)+$"
226
+ }
227
+ }
228
+ }
229
+ }
230
+ },
231
+ "install-routes": {
232
+ "type": "array",
233
+ "items": {
234
+ "type": "string",
235
+ "enum": ["cli", "claude-plugins", "apm"]
236
+ }
237
+ }
238
+ }
239
+ }
240
+ },
241
+ "frontmatter-mapping": {
242
+ "type": "object",
243
+ "additionalProperties": {
244
+ "type": "object",
245
+ "additionalProperties": {
246
+ "type": "object",
247
+ "properties": {
248
+ "rename": {"type": "string"},
249
+ "normalize": {
250
+ "type": "string",
251
+ "enum": ["to-list", "to-string", "lowercase"]
252
+ },
253
+ "default": {"type": "string"},
254
+ "values": {
255
+ "type": "object",
256
+ "additionalProperties": {"type": "string"}
257
+ }
258
+ }
259
+ }
260
+ }
261
+ },
262
+ "frontmatter-default": {
263
+ "type": "object",
264
+ "additionalProperties": {
265
+ "type": "object",
266
+ "additionalProperties": {"type": "string"}
267
+ }
268
+ }
269
+ }
270
+ }