agentbundle 0.2.0__tar.gz → 0.3.0__tar.gz
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.
- {agentbundle-0.2.0 → agentbundle-0.3.0}/PKG-INFO +9 -9
- agentbundle-0.3.0/README.md +19 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/_data/adapter.schema.json +15 -4
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/_data/adapter.toml +318 -37
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/adapter_root_bins.py +54 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/adapters/__init__.py +5 -1
- agentbundle-0.3.0/agentbundle/build/adapters/copilot.py +112 -0
- agentbundle-0.3.0/agentbundle/build/adapters/cursor.py +436 -0
- agentbundle-0.3.0/agentbundle/build/adapters/gemini.py +484 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/projections/codex_agent_toml.py +126 -24
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/projections/copilot_agent_md.py +14 -9
- agentbundle-0.3.0/agentbundle/build/projections/gemini_command_toml.py +230 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/self_host.py +41 -36
- agentbundle-0.3.0/agentbundle/build/shared_libs.py +66 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/tests/test_adapter_codex.py +34 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/tests/test_adapter_copilot.py +34 -5
- agentbundle-0.3.0/agentbundle/build/tests/test_adapter_cursor.py +410 -0
- agentbundle-0.3.0/agentbundle/build/tests/test_adapter_gemini.py +613 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/tests/test_adapter_kiro_ide.py +5 -4
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/tests/test_adapter_root_bins_projection.py +61 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/tests/test_contract.py +59 -23
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/tests/test_contract_scope.py +7 -7
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/tests/test_contract_v07.py +5 -5
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/tests/test_contract_v08.py +36 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/tests/test_self_host_check.py +84 -16
- agentbundle-0.3.0/agentbundle/build/tests/test_shared_libs_projection.py +217 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/tests/test_shipped_packs_v07_declarations.py +17 -8
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/tests/test_shipped_packs_v08_declarations.py +6 -4
- agentbundle-0.3.0/agentbundle/build/tests/test_user_libs_projection.py +285 -0
- agentbundle-0.3.0/agentbundle/build/user_libs.py +255 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/cli.py +20 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/commands/_common.py +72 -1
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/commands/install.py +297 -13
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/commands/upgrade.py +84 -1
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/safety.py +8 -7
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/scope.py +25 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle.egg-info/PKG-INFO +9 -9
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle.egg-info/SOURCES.txt +7 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/pyproject.toml +1 -1
- agentbundle-0.2.0/README.md +0 -19
- agentbundle-0.2.0/agentbundle/build/adapters/copilot.py +0 -149
- agentbundle-0.2.0/agentbundle/build/shared_libs.py +0 -309
- agentbundle-0.2.0/agentbundle/build/tests/test_shared_libs_projection.py +0 -415
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/__init__.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/__main__.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/_data/install-marker.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/_data/pack.schema.json +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/_data/plugin-manifest.derived.schema.json +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/_data/plugin-manifest.schema.json +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/__init__.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/__main__.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/adapters/claude_code.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/adapters/codex.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/adapters/kiro.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/adapters/kiro_cli.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/adapters/kiro_ide.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/contract.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/lint_packs.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/main.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/phase_order.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/projections/__init__.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/projections/copilot_hooks_json.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/projections/direct_directory.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/projections/hook_id.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/projections/kiro_ide_hook.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/projections/merge_into_agent_json.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/projections/merge_json.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/projections/user_merge_json.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/scope_rails.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/target_resolver.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/tests/__init__.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/tests/test_adapter_claude_code.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/tests/test_adapter_kiro.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/tests/test_adapter_kiro_alias.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/tests/test_adapter_kiro_cli.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/tests/test_build_ships_seeds.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/tests/test_direct_directory_cleanup.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/tests/test_end_to_end_build.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/tests/test_lint_agents_md_legacy_block.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/tests/test_lint_agents_md_risk_block.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/tests/test_lint_packs.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/tests/test_load_pack_hook_wiring_safely.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/tests/test_pack_schema.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/tests/test_pack_schema_allowed_adapters.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/tests/test_pack_schema_install.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/tests/test_pipeline.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/tests/test_plugin_manifest_schema.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/tests/test_projections_merge_json.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/tests/test_scope_rails.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/tests/test_security.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/tests/test_validate.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/build/validate.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/catalogue.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/commands/__init__.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/commands/_drop_warning.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/commands/adapt.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/commands/config.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/commands/diff.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/commands/init_state.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/commands/list_packs.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/commands/list_targets.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/commands/reconcile.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/commands/render.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/commands/scaffold.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/commands/uninstall.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/commands/validate.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/config.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/render.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/user_config.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle/version.py +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle.egg-info/dependency_links.txt +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle.egg-info/entry_points.txt +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/agentbundle.egg-info/top_level.txt +0 -0
- {agentbundle-0.2.0 → agentbundle-0.3.0}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: agentbundle
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: Reference CLI and distribution pipeline for the agent-ready-repo adapter contract.
|
|
5
5
|
Author-email: eugenelim <eugenelim@users.noreply.github.com>
|
|
6
6
|
License: Apache-2.0 OR MIT
|
|
@@ -24,14 +24,14 @@ contract. Ships the `agentbundle` console script — install, validate,
|
|
|
24
24
|
adapt, and inspect packs — plus the build pipeline (`agentbundle.build`)
|
|
25
25
|
that projects pack sources into adapter-shaped trees.
|
|
26
26
|
|
|
27
|
-
As of 0.2.0
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
`
|
|
34
|
-
for the migration
|
|
27
|
+
As of 0.2.0 the `agentbundle.credentials` module that earlier releases
|
|
28
|
+
(0.1.x) exposed has been removed — `agentbundle` no longer ships a
|
|
29
|
+
credential-resolution module. Since RFC-0023, `auth: creds` consumers
|
|
30
|
+
resolve credentials through the standalone, pip-installable `credbroker`
|
|
31
|
+
library, imported in-process (`from credbroker import …`); it replaced the
|
|
32
|
+
build-projected `credentials_shim` sibling, which now survives only as the
|
|
33
|
+
`sso-broker` companion. See the `credbroker` package, RFC-0023, and this
|
|
34
|
+
package's `CHANGELOG.md` for the migration history.
|
|
35
35
|
|
|
36
36
|
See the [top-level README](https://github.com/eugenelim/agent-ready-repo#readme)
|
|
37
37
|
for install routes, the pack catalogue, and the adapter contract.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# agentbundle
|
|
2
|
+
|
|
3
|
+
Runtime library and reference CLI for the
|
|
4
|
+
[agent-ready-repo](https://github.com/eugenelim/agent-ready-repo) adapter
|
|
5
|
+
contract. Ships the `agentbundle` console script — install, validate,
|
|
6
|
+
adapt, and inspect packs — plus the build pipeline (`agentbundle.build`)
|
|
7
|
+
that projects pack sources into adapter-shaped trees.
|
|
8
|
+
|
|
9
|
+
As of 0.2.0 the `agentbundle.credentials` module that earlier releases
|
|
10
|
+
(0.1.x) exposed has been removed — `agentbundle` no longer ships a
|
|
11
|
+
credential-resolution module. Since RFC-0023, `auth: creds` consumers
|
|
12
|
+
resolve credentials through the standalone, pip-installable `credbroker`
|
|
13
|
+
library, imported in-process (`from credbroker import …`); it replaced the
|
|
14
|
+
build-projected `credentials_shim` sibling, which now survives only as the
|
|
15
|
+
`sso-broker` companion. See the `credbroker` package, RFC-0023, and this
|
|
16
|
+
package's `CHANGELOG.md` for the migration history.
|
|
17
|
+
|
|
18
|
+
See the [top-level README](https://github.com/eugenelim/agent-ready-repo#readme)
|
|
19
|
+
for install routes, the pack catalogue, and the adapter contract.
|
|
@@ -49,7 +49,8 @@
|
|
|
49
49
|
"dropped",
|
|
50
50
|
"codex-agent-toml",
|
|
51
51
|
"copilot-agent-md",
|
|
52
|
-
"copilot-hooks-json"
|
|
52
|
+
"copilot-hooks-json",
|
|
53
|
+
"gemini-command-toml"
|
|
53
54
|
]
|
|
54
55
|
},
|
|
55
56
|
"target-path": {"type": "string"},
|
|
@@ -93,7 +94,8 @@
|
|
|
93
94
|
"dropped",
|
|
94
95
|
"codex-agent-toml",
|
|
95
96
|
"copilot-agent-md",
|
|
96
|
-
"copilot-hooks-json"
|
|
97
|
+
"copilot-hooks-json",
|
|
98
|
+
"gemini-command-toml"
|
|
97
99
|
]
|
|
98
100
|
},
|
|
99
101
|
"else": {
|
|
@@ -113,7 +115,8 @@
|
|
|
113
115
|
"dropped",
|
|
114
116
|
"codex-agent-toml",
|
|
115
117
|
"copilot-agent-md",
|
|
116
|
-
"copilot-hooks-json"
|
|
118
|
+
"copilot-hooks-json",
|
|
119
|
+
"gemini-command-toml"
|
|
117
120
|
]
|
|
118
121
|
},
|
|
119
122
|
"user": {
|
|
@@ -129,7 +132,8 @@
|
|
|
129
132
|
"dropped",
|
|
130
133
|
"codex-agent-toml",
|
|
131
134
|
"copilot-agent-md",
|
|
132
|
-
"copilot-hooks-json"
|
|
135
|
+
"copilot-hooks-json",
|
|
136
|
+
"gemini-command-toml"
|
|
133
137
|
]
|
|
134
138
|
}
|
|
135
139
|
}
|
|
@@ -254,6 +258,13 @@
|
|
|
254
258
|
"values": {
|
|
255
259
|
"type": "object",
|
|
256
260
|
"additionalProperties": {"type": "string"}
|
|
261
|
+
},
|
|
262
|
+
"related-values": {
|
|
263
|
+
"type": "object",
|
|
264
|
+
"additionalProperties": {
|
|
265
|
+
"type": "object",
|
|
266
|
+
"additionalProperties": {"type": "string"}
|
|
267
|
+
}
|
|
257
268
|
}
|
|
258
269
|
}
|
|
259
270
|
}
|
|
@@ -30,13 +30,40 @@
|
|
|
30
30
|
# `copilot-agent-md` (markdown → `.github/agents/<name>.agent.md`); `hook-wiring`
|
|
31
31
|
# flips `dropped`→`copilot-hooks-json` (one self-contained `<name>.json` per
|
|
32
32
|
# source file at `.github/hooks/`); `hook-body` retargets `tools/hooks/`→
|
|
33
|
-
# `.github/hooks/`; `skill`
|
|
33
|
+
# `.github/hooks/`; `skill` gained a user target (later flipped to
|
|
34
|
+
# `.github/skills/` SKILL.md in v0.11 — see the [contract] note below);
|
|
34
35
|
# `[adapter.copilot.scope]` gains `user = "~"` + `allowed-prefixes.user`; new
|
|
35
36
|
# `copilot-agent-frontmatter-v0.10` mapping. `command` stays `dropped`
|
|
36
37
|
# (copilot-cli#618/#1113). Two-pack bump (research + core), not all-pack.
|
|
38
|
+
# docs/specs/codex-agent-config-projection: corrects the existing codex
|
|
39
|
+
# `codex-agent-frontmatter-v0.8` mapping to preserve `model` and `tools`
|
|
40
|
+
# intent as documented Codex agent config instead of dropping those fields.
|
|
41
|
+
# RFC-0026 / ADR-0015 / docs/specs/cursor-full-parity (v0.11): new native
|
|
42
|
+
# `cursor` full-parity adapter projecting all five primitives to `.cursor/*`
|
|
43
|
+
# at both scopes. NO new projection mode and NO adapter.schema.json change —
|
|
44
|
+
# skill→direct-directory, agent→direct-file (+ `cursor-agent-frontmatter-v0.11`;
|
|
45
|
+
# `tools` dropped + `readonly` derived inline by cursor.py), hook-body→
|
|
46
|
+
# direct-file, hook-wiring→merge-json (aggregated `.cursor/hooks.json`,
|
|
47
|
+
# event-remapped + `version` key via cursor.py's merge helper), command→
|
|
48
|
+
# direct-file (Cursor honours commands). kiro-ide-hook dropped. Same `.cursor/`
|
|
49
|
+
# prefix at both scopes (claude-code/codex pattern; no prefix rewrite).
|
|
50
|
+
# Distribution-only (not in SELF_HOST_ADAPTERS).
|
|
37
51
|
|
|
38
52
|
[contract]
|
|
39
|
-
|
|
53
|
+
# v0.12 (docs/specs/copilot-skills-and-web, 2026-06-11): copilot `skill` flips
|
|
54
|
+
# `instruction-file`→`direct-directory` (first-class Agent Skills at
|
|
55
|
+
# `.github/skills/<name>/SKILL.md`); the `copilot-instruction` frontmatter-default
|
|
56
|
+
# is retired. Web correction (RFC-0024 § Errata E1) is docs/comments-only.
|
|
57
|
+
# (Lands atop RFC-0026's cursor v0.11; the two co-bumped — copilot takes v0.12.)
|
|
58
|
+
# RFC-0027 / ADR-0016 / docs/specs/gemini-full-parity (v0.13): new native
|
|
59
|
+
# `gemini` full-parity adapter projecting all five primitives to `.gemini/*` at
|
|
60
|
+
# both scopes. One new projection mode (`gemini-command-toml`); a bespoke
|
|
61
|
+
# `.gemini/settings.json` merge carrying `hooks` (event-remapped, fail-closed) +
|
|
62
|
+
# a static `context.fileName` bridge (from `context-filenames`). agent `tools:`
|
|
63
|
+
# kept and name-mapped; tier-preserving model map. hook-body lands under
|
|
64
|
+
# `.gemini/hooks/` (the cursor model — single prefix at both scopes). kiro-ide-hook
|
|
65
|
+
# dropped. Distribution-only (not in SELF_HOST_ADAPTERS).
|
|
66
|
+
version = "0.13"
|
|
40
67
|
|
|
41
68
|
# Sibling schemas this contract references — pack metadata and the
|
|
42
69
|
# per-pack Claude-plugin manifest. Defined by spec AC #3 + #4.
|
|
@@ -68,12 +95,16 @@ source-path = ".apm/commands/"
|
|
|
68
95
|
[primitive."kiro-ide-hook"]
|
|
69
96
|
source-path = ".apm/kiro-ide-hooks/"
|
|
70
97
|
|
|
71
|
-
# RFC-0013 § 4c — `shared-libs/` carries Python sibling
|
|
72
|
-
#
|
|
73
|
-
# `
|
|
74
|
-
#
|
|
75
|
-
#
|
|
76
|
-
#
|
|
98
|
+
# RFC-0013 § 4c / RFC-0023 — `shared-libs/` carries Python sibling
|
|
99
|
+
# files. The original projection into every `metadata.auth: creds`
|
|
100
|
+
# skill's `scripts/` was RETIRED in RFC-0023 (those consumers resolve
|
|
101
|
+
# via the `credbroker` pip library, imported in-process). What survives
|
|
102
|
+
# in `agentbundle.build.shared_libs` is source enumeration
|
|
103
|
+
# (`collect_sources`): the `adapter-root-bins` companion-shim rail reads
|
|
104
|
+
# this path to locate `credentials_shim.py` for projection into
|
|
105
|
+
# `<scope-root>/.agentbundle/bin/`. The declaration here documents the
|
|
106
|
+
# source path so future readers see the full primitive surface in one
|
|
107
|
+
# place.
|
|
77
108
|
[primitive."shared-libs"]
|
|
78
109
|
source-path = ".apm/shared-libs/"
|
|
79
110
|
|
|
@@ -88,6 +119,16 @@ source-path = ".apm/shared-libs/"
|
|
|
88
119
|
[primitive."adapter-root-bins"]
|
|
89
120
|
source-path = ".apm/adapter-root-bins/"
|
|
90
121
|
|
|
122
|
+
# credbroker-user-scope T3 — `user-libs/` carries vendored Python package
|
|
123
|
+
# source projected to the per-scope lib floor (`~/.agentbundle/lib/` at user
|
|
124
|
+
# scope, `<repo>/.agentbundle/lib/` self-host staging) as the lowest-precedence
|
|
125
|
+
# `sys.path` import target. Build-pipeline-only like `adapter-root-bins`: no
|
|
126
|
+
# per-adapter projection rules (the target is `<scope-root>/.agentbundle/lib/`,
|
|
127
|
+
# fenced by `allowed-prefixes.<scope>`, not by per-adapter target paths), so the
|
|
128
|
+
# declaration carries the source path only.
|
|
129
|
+
[primitive."user-libs"]
|
|
130
|
+
source-path = ".apm/user-libs/"
|
|
131
|
+
|
|
91
132
|
# ---------------------------------------------------------------------------
|
|
92
133
|
# Claude Code adapter — 5 projections (one per primitive) + v0.3 forks
|
|
93
134
|
#
|
|
@@ -392,12 +433,16 @@ allowed-prefixes.user = [".kiro/", ".agentbundle/"]
|
|
|
392
433
|
# Copilot adapter — 5 projections (one per primitive)
|
|
393
434
|
# ---------------------------------------------------------------------------
|
|
394
435
|
|
|
436
|
+
# `skill` projects as first-class Copilot Agent Skills (docs/specs/copilot-skills-and-web,
|
|
437
|
+
# RFC-0024 § Errata E2): `direct-directory` passthrough of our canonical
|
|
438
|
+
# `.apm/skills/<name>/SKILL.md` to `.github/skills/<name>/SKILL.md` (repo) and
|
|
439
|
+
# `~/.copilot/skills/<name>/SKILL.md` (user, via the install rewrite). Copilot
|
|
440
|
+
# accepts our Claude SKILL.md verbatim. Was `instruction-file`→`.github/instructions/`.
|
|
395
441
|
[[adapter.copilot.projection]]
|
|
396
442
|
primitive = "skill"
|
|
397
|
-
mode = "
|
|
398
|
-
target-path = ".github/
|
|
399
|
-
|
|
400
|
-
on-conflict = "prompt-then-overwrite"
|
|
443
|
+
mode = "direct-directory"
|
|
444
|
+
target-path = ".github/skills/"
|
|
445
|
+
on-conflict = "prompt-then-preserve"
|
|
401
446
|
|
|
402
447
|
[[adapter.copilot.projection]]
|
|
403
448
|
primitive = "agent"
|
|
@@ -422,25 +467,26 @@ on-conflict = "prompt-then-preserve"
|
|
|
422
467
|
primitive = "command"
|
|
423
468
|
mode = "dropped"
|
|
424
469
|
|
|
425
|
-
# Scope dimension for Copilot (RFC-0024 / ADR-0013 / docs/specs/copilot-full-parity
|
|
426
|
-
# Copilot is
|
|
427
|
-
# discover agents/
|
|
428
|
-
# (user). The repo-only restriction RFC-0012
|
|
429
|
-
# `skill`
|
|
430
|
-
# (`~/.copilot/
|
|
431
|
-
# handler's copilot user-scope prefix rewrite
|
|
432
|
-
# since the build adapter is scope-agnostic and
|
|
470
|
+
# Scope dimension for Copilot (RFC-0024 / ADR-0013 / docs/specs/copilot-full-parity,
|
|
471
|
+
# skill surface per docs/specs/copilot-skills-and-web). Copilot is a full-parity,
|
|
472
|
+
# user-scope-capable adapter: the app + CLI discover skills/agents/hooks from
|
|
473
|
+
# `.github/` (repo) and `~/.copilot/` (user). The repo-only restriction RFC-0012
|
|
474
|
+
# recorded is superseded-in-part. `skill` projects as a `direct-directory`
|
|
475
|
+
# `SKILL.md` tree; its user target (`~/.copilot/skills/<name>/SKILL.md`) is
|
|
476
|
+
# produced by the install handler's copilot user-scope prefix rewrite
|
|
477
|
+
# (`.github/X/`→`.copilot/X/`), since the build adapter is scope-agnostic and
|
|
478
|
+
# emits repo-relpaths.
|
|
433
479
|
[adapter.copilot.scope]
|
|
434
480
|
repo = "."
|
|
435
481
|
user = "~"
|
|
436
|
-
# RFC-0024: repo-scope
|
|
437
|
-
# `.github/
|
|
438
|
-
allowed-prefixes.repo = [".github/
|
|
482
|
+
# RFC-0024 + copilot-skills-and-web: repo-scope skills at `.github/skills/`,
|
|
483
|
+
# agents at `.github/agents/`, hook wiring + bodies at `.github/hooks/`.
|
|
484
|
+
allowed-prefixes.repo = [".github/skills/", ".github/agents/", ".github/hooks/"]
|
|
439
485
|
# User-scope home is `~/.copilot/` — the prefix the install rewrite produces
|
|
440
486
|
# from the adapter's repo-relpaths. `.agentbundle/` carries the install
|
|
441
487
|
# state file (`~/.agentbundle/state.toml`), same as every other user-scope-
|
|
442
488
|
# capable adapter (claude-code, codex).
|
|
443
|
-
allowed-prefixes.user = [".copilot/
|
|
489
|
+
allowed-prefixes.user = [".copilot/skills/", ".copilot/agents/", ".copilot/hooks/", ".agentbundle/"]
|
|
444
490
|
|
|
445
491
|
# ---------------------------------------------------------------------------
|
|
446
492
|
# Codex adapter — 5 projections (one per primitive)
|
|
@@ -488,6 +534,183 @@ user = "~"
|
|
|
488
534
|
allowed-prefixes.repo = [".agents/skills/", ".codex/", ".agentbundle/", "tools/hooks/"]
|
|
489
535
|
allowed-prefixes.user = [".agents/skills/", ".codex/", ".agentbundle/"]
|
|
490
536
|
|
|
537
|
+
# ---------------------------------------------------------------------------
|
|
538
|
+
# Cursor adapter — full-parity native adapter (RFC-0026 / ADR-0015 /
|
|
539
|
+
# docs/specs/cursor-full-parity, v0.11).
|
|
540
|
+
#
|
|
541
|
+
# Projects all five catalogue primitives to Cursor's native `.cursor/*`
|
|
542
|
+
# discovery paths at both repo and user scope. Cursor's CLI and IDE share one
|
|
543
|
+
# `.cursor/` layout (no RFC-0022-style split). No new projection mode and no
|
|
544
|
+
# adapter.schema.json change: every primitive reuses an already-enumerated
|
|
545
|
+
# mode. The agent uses `direct-file` + a frontmatter mapping (the kiro-ide
|
|
546
|
+
# `.md` shape); because Cursor subagents have no per-agent tool allowlist,
|
|
547
|
+
# cursor.py drops the source `tools` and derives a `readonly` flag for
|
|
548
|
+
# non-mutating agents (documented degradation, the ADR-0013 Copilot shape).
|
|
549
|
+
# hook-wiring is `merge-json` to an aggregated `.cursor/hooks.json`; cursor.py's
|
|
550
|
+
# merge helper remaps source events via `hook-event-map` and adds a `version`
|
|
551
|
+
# key. `command` is first-class (Cursor is the second adapter after claude-code
|
|
552
|
+
# to honour commands). `kiro-ide-hook` is dropped (Kiro-only), declared in the
|
|
553
|
+
# table form since the schema's array `primitive` enum admits only the five
|
|
554
|
+
# standard primitives. Scope prefix is identical at both scopes (the
|
|
555
|
+
# claude-code/codex pattern), so the user-scope home is the generic
|
|
556
|
+
# user-rooting of the repo-relpath — NO Cursor-specific prefix rewrite.
|
|
557
|
+
# Distribution-only: cursor is NOT in SELF_HOST_ADAPTERS.
|
|
558
|
+
# ---------------------------------------------------------------------------
|
|
559
|
+
|
|
560
|
+
[[adapter.cursor.projection]]
|
|
561
|
+
primitive = "skill"
|
|
562
|
+
mode = "direct-directory"
|
|
563
|
+
target-path = ".cursor/skills/"
|
|
564
|
+
on-conflict = "prompt-then-preserve"
|
|
565
|
+
|
|
566
|
+
[[adapter.cursor.projection]]
|
|
567
|
+
primitive = "agent"
|
|
568
|
+
mode = "direct-file"
|
|
569
|
+
target-path = ".cursor/agents/"
|
|
570
|
+
frontmatter-mapping = "cursor-agent-frontmatter-v0.11"
|
|
571
|
+
on-conflict = "prompt-then-preserve"
|
|
572
|
+
|
|
573
|
+
[[adapter.cursor.projection]]
|
|
574
|
+
primitive = "hook-body"
|
|
575
|
+
mode = "direct-file"
|
|
576
|
+
target-path = ".cursor/hooks/"
|
|
577
|
+
on-conflict = "prompt-then-preserve"
|
|
578
|
+
|
|
579
|
+
[[adapter.cursor.projection]]
|
|
580
|
+
primitive = "hook-wiring"
|
|
581
|
+
mode = "merge-json"
|
|
582
|
+
target-path = ".cursor/hooks.json"
|
|
583
|
+
managed-key = "hooks"
|
|
584
|
+
on-conflict = "merge-managed-key-only"
|
|
585
|
+
# Hook-event map (RFC-0026 decision 4). Our hook-wiring source uses Claude-
|
|
586
|
+
# native PascalCase event names (e.g. `[[hooks.SessionStart]]`); Cursor's
|
|
587
|
+
# hooks.json uses camelCase event keys. cursor.py's merge helper reads this
|
|
588
|
+
# table to translate each source event; a source event with no entry here is
|
|
589
|
+
# dropped with a build-time log line (fail-open, the no-silent-caps rule —
|
|
590
|
+
# deliberately unlike copilot-hooks-json's fail-closed map). The map lives in
|
|
591
|
+
# the contract, not the adapter code. (Erratum vs RFC-0026: the RFC spelled the
|
|
592
|
+
# source vocabulary `agentSpawn`/…; the shipped source is Claude PascalCase, so
|
|
593
|
+
# the map keys on PascalCase — target events unchanged. See the spec Changelog.)
|
|
594
|
+
hook-event-map = { SessionStart = "sessionStart", UserPromptSubmit = "beforeSubmitPrompt", PreToolUse = "preToolUse", PostToolUse = "postToolUse", Stop = "stop" }
|
|
595
|
+
|
|
596
|
+
[[adapter.cursor.projection]]
|
|
597
|
+
primitive = "command"
|
|
598
|
+
mode = "direct-file"
|
|
599
|
+
target-path = ".cursor/commands/"
|
|
600
|
+
on-conflict = "prompt-then-preserve"
|
|
601
|
+
|
|
602
|
+
# kiro-ide-hook — dropped (Kiro-only primitive). Declared in the table form,
|
|
603
|
+
# not the projection array, because the schema's array `primitive` enum admits
|
|
604
|
+
# only skill/agent/hook-body/hook-wiring/command (kiro-ide / kiro-cli set the
|
|
605
|
+
# table-form precedent).
|
|
606
|
+
[adapter.cursor.projections.kiro-ide-hook]
|
|
607
|
+
mode = "dropped"
|
|
608
|
+
|
|
609
|
+
# Scope dimension for Cursor (RFC-0026 / ADR-0015). Cursor's `.cursor/` prefix
|
|
610
|
+
# is identical at repo and user scope (the claude-code/codex shape), so the
|
|
611
|
+
# divergent user-scope home is produced by the generic user-root resolution,
|
|
612
|
+
# not a Cursor-specific prefix rewrite. `.agentbundle/` carries the install
|
|
613
|
+
# state file at both scopes (as every scope-capable adapter lists it).
|
|
614
|
+
[adapter.cursor.scope]
|
|
615
|
+
repo = "."
|
|
616
|
+
user = "~"
|
|
617
|
+
allowed-prefixes.repo = [".cursor/", ".agentbundle/"]
|
|
618
|
+
allowed-prefixes.user = [".cursor/", ".agentbundle/"]
|
|
619
|
+
|
|
620
|
+
# ---------------------------------------------------------------------------
|
|
621
|
+
# Gemini adapter — full-parity native adapter (RFC-0027 / ADR-0016 /
|
|
622
|
+
# docs/specs/gemini-full-parity, v0.13).
|
|
623
|
+
#
|
|
624
|
+
# Projects all five catalogue primitives to Gemini CLI's native `.gemini/*`
|
|
625
|
+
# discovery paths at both repo and user scope. Unlike Cursor, gemini KEEPS and
|
|
626
|
+
# name-maps the agent `tools:` allowlist (Gemini has a real per-agent tool
|
|
627
|
+
# allowlist) and applies a tier-preserving `model` map (`gemini-agent-frontmatter`).
|
|
628
|
+
# `command` uses the new `gemini-command-toml` mode (markdown body → TOML `prompt`;
|
|
629
|
+
# fail-closed on multi-injection). `hook-body` lands under `.gemini/hooks/` (the
|
|
630
|
+
# cursor model — a single `.gemini/` prefix at both scopes, no `tools/hooks/`), and
|
|
631
|
+
# the carried hook command is path-rewritten `tools/hooks/`→`.gemini/hooks/` by
|
|
632
|
+
# gemini.py's settings-merge helper. `hook-wiring` is `merge-json` into a shared
|
|
633
|
+
# `.gemini/settings.json`: gemini.py's bespoke `_project_settings_json` helper (the
|
|
634
|
+
# cursor `_project_hooks_json` shape, NOT the generic merge_json module) writes the
|
|
635
|
+
# `hooks` map (event-remapped via `hook-event-map`, FAIL-CLOSED on an unmapped event
|
|
636
|
+
# — the copilot precedent, unlike cursor's fail-open) AND a static `context.fileName`
|
|
637
|
+
# bridge sourced from `context-filenames`, in one managed-merge that preserves
|
|
638
|
+
# adopter keys. SINGLE-WRITER (cursor model): the file is written only when the pack
|
|
639
|
+
# ships hook-wiring — repo-scope install writes merge-json targets whole-file, so a
|
|
640
|
+
# settings.json emitted for every pack would clobber another pack's hooks. The
|
|
641
|
+
# `context` bridge rides in that same write; the base `core` pack ships both the
|
|
642
|
+
# session-start wiring and `AGENTS.md`, so the bridge lands with it. `kiro-ide-hook` is dropped
|
|
643
|
+
# (Kiro-only), declared in the table form. Scope prefix is identical at both scopes
|
|
644
|
+
# (the claude-code/cursor pattern), so the user-scope home is the generic
|
|
645
|
+
# user-rooting of the repo-relpath — NO gemini-specific prefix rewrite.
|
|
646
|
+
# Distribution-only: gemini is NOT in SELF_HOST_ADAPTERS.
|
|
647
|
+
# ---------------------------------------------------------------------------
|
|
648
|
+
|
|
649
|
+
[[adapter.gemini.projection]]
|
|
650
|
+
primitive = "skill"
|
|
651
|
+
mode = "direct-directory"
|
|
652
|
+
target-path = ".gemini/skills/"
|
|
653
|
+
on-conflict = "prompt-then-preserve"
|
|
654
|
+
|
|
655
|
+
[[adapter.gemini.projection]]
|
|
656
|
+
primitive = "agent"
|
|
657
|
+
mode = "direct-file"
|
|
658
|
+
target-path = ".gemini/agents/"
|
|
659
|
+
frontmatter-mapping = "gemini-agent-frontmatter"
|
|
660
|
+
on-conflict = "prompt-then-preserve"
|
|
661
|
+
|
|
662
|
+
[[adapter.gemini.projection]]
|
|
663
|
+
primitive = "hook-body"
|
|
664
|
+
mode = "direct-file"
|
|
665
|
+
target-path = ".gemini/hooks/"
|
|
666
|
+
on-conflict = "prompt-then-preserve"
|
|
667
|
+
|
|
668
|
+
[[adapter.gemini.projection]]
|
|
669
|
+
primitive = "hook-wiring"
|
|
670
|
+
mode = "merge-json"
|
|
671
|
+
target-path = ".gemini/settings.json"
|
|
672
|
+
managed-key = "hooks"
|
|
673
|
+
on-conflict = "merge-managed-key-only"
|
|
674
|
+
# Hook-event map (RFC-0027 decision 6). Our hook-wiring source uses Claude-native
|
|
675
|
+
# PascalCase event names (e.g. `[[hooks.SessionStart]]`); Gemini's settings.json
|
|
676
|
+
# uses its own event vocabulary. gemini.py's settings-merge helper reads this table
|
|
677
|
+
# to translate each source event; a source event with no entry here **fails the
|
|
678
|
+
# build** (fail-closed — the copilot-hooks-json precedent, deliberately unlike
|
|
679
|
+
# cursor's fail-open drop-with-log). The map lives in the contract, not the adapter
|
|
680
|
+
# code.
|
|
681
|
+
hook-event-map = { SessionStart = "SessionStart", SessionEnd = "SessionEnd", UserPromptSubmit = "BeforeAgent", PreToolUse = "BeforeTool", PostToolUse = "AfterTool", Stop = "AfterAgent" }
|
|
682
|
+
# Static `context.fileName` bridge (RFC-0027 decision 5). gemini.py's settings-merge
|
|
683
|
+
# helper emits `context = { fileName = <this list> }` into the same `.gemini/settings.json`
|
|
684
|
+
# so Gemini CLI reads the canonical `AGENTS.md` (and `GEMINI.md` if present). Data
|
|
685
|
+
# lives in the contract, not a literal in code; written in the single hook-wiring
|
|
686
|
+
# settings.json write (core ships both the wiring and AGENTS.md).
|
|
687
|
+
context-filenames = ["AGENTS.md", "GEMINI.md"]
|
|
688
|
+
|
|
689
|
+
[[adapter.gemini.projection]]
|
|
690
|
+
primitive = "command"
|
|
691
|
+
mode = "gemini-command-toml"
|
|
692
|
+
target-path = ".gemini/commands/"
|
|
693
|
+
on-conflict = "prompt-then-preserve"
|
|
694
|
+
|
|
695
|
+
# kiro-ide-hook — dropped (Kiro-only primitive). Declared in the table form, not the
|
|
696
|
+
# projection array, because the schema's array `primitive` enum admits only the five
|
|
697
|
+
# standard primitives (the kiro-ide / kiro-cli / cursor precedent).
|
|
698
|
+
[adapter.gemini.projections.kiro-ide-hook]
|
|
699
|
+
mode = "dropped"
|
|
700
|
+
|
|
701
|
+
# Scope dimension for Gemini (RFC-0027 / ADR-0016). Gemini's `.gemini/` prefix is
|
|
702
|
+
# identical at repo and user scope (the claude-code/cursor shape), so the divergent
|
|
703
|
+
# user-scope home is produced by the generic user-root resolution, not a
|
|
704
|
+
# gemini-specific prefix rewrite. Every projected target (skills, agents, commands,
|
|
705
|
+
# settings.json, AND hook bodies at `.gemini/hooks/`) is under `.gemini/`, so the
|
|
706
|
+
# two allowed-prefix lists are identical. `.agentbundle/` carries the install state
|
|
707
|
+
# file at both scopes.
|
|
708
|
+
[adapter.gemini.scope]
|
|
709
|
+
repo = "."
|
|
710
|
+
user = "~"
|
|
711
|
+
allowed-prefixes.repo = [".gemini/", ".agentbundle/"]
|
|
712
|
+
allowed-prefixes.user = [".gemini/", ".agentbundle/"]
|
|
713
|
+
|
|
491
714
|
# ---------------------------------------------------------------------------
|
|
492
715
|
# Frontmatter mappings — rewrite rules applied when projecting a primitive
|
|
493
716
|
# ---------------------------------------------------------------------------
|
|
@@ -541,15 +764,19 @@ values = { Read = "read", Grep = "grep", Glob = "glob", Edit = "write", Write =
|
|
|
541
764
|
rename = "model"
|
|
542
765
|
values = { opus = "claude-opus-4.6", sonnet = "claude-sonnet-4.5", haiku = "claude-haiku-4.5" }
|
|
543
766
|
|
|
544
|
-
# Codex agent frontmatter v0.8 (docs/specs/dropped-primitives-coverage
|
|
767
|
+
# Codex agent frontmatter v0.8 (docs/specs/dropped-primitives-coverage,
|
|
768
|
+
# amended by docs/specs/codex-agent-config-projection):
|
|
545
769
|
# rewrite rules from claude-code-style markdown agent (YAML frontmatter with
|
|
546
770
|
# `name`, `description`, optionally `tools`, `model`) to codex's TOML agent
|
|
547
|
-
# shape
|
|
548
|
-
#
|
|
549
|
-
# `codex-agent-toml` projection
|
|
550
|
-
#
|
|
551
|
-
#
|
|
552
|
-
#
|
|
771
|
+
# shape. `model` maps Claude-style aliases to OpenAI model IDs. `tools`
|
|
772
|
+
# maps Claude-style tool names to Codex capability intents; the
|
|
773
|
+
# `codex-agent-toml` projection reduces duplicate intents to documented
|
|
774
|
+
# config keys (`sandbox_mode`, `[features].shell_tool`, `web_search`,
|
|
775
|
+
# `[tools].web_search`) and never emits a generic `tools = [...]` array.
|
|
776
|
+
# The markdown body lands in TOML `developer_instructions` via a
|
|
777
|
+
# mode-level convention in the `codex-agent-toml` projection mode, NOT
|
|
778
|
+
# via a rename rule (frontmatter mapping is keyed on frontmatter fields;
|
|
779
|
+
# the body is not one).
|
|
553
780
|
[frontmatter-mapping."codex-agent-frontmatter-v0.8"]
|
|
554
781
|
|
|
555
782
|
[frontmatter-mapping."codex-agent-frontmatter-v0.8".name]
|
|
@@ -558,6 +785,15 @@ rename = "name"
|
|
|
558
785
|
[frontmatter-mapping."codex-agent-frontmatter-v0.8".description]
|
|
559
786
|
rename = "description"
|
|
560
787
|
|
|
788
|
+
[frontmatter-mapping."codex-agent-frontmatter-v0.8".tools]
|
|
789
|
+
normalize = "to-list"
|
|
790
|
+
values = { Read = "read", Grep = "read", Glob = "read", Edit = "write", Write = "write", MultiEdit = "write", Bash = "shell", WebFetch = "web_search", WebSearch = "web_search" }
|
|
791
|
+
|
|
792
|
+
[frontmatter-mapping."codex-agent-frontmatter-v0.8".model]
|
|
793
|
+
rename = "model"
|
|
794
|
+
values = { opus = "gpt-5.5", sonnet = "gpt-5.5", haiku = "gpt-5.4-mini" }
|
|
795
|
+
related-values = { model_reasoning_effort = { opus = "xhigh", sonnet = "medium", haiku = "medium" } }
|
|
796
|
+
|
|
561
797
|
# Copilot agent frontmatter v0.10 (RFC-0024 / docs/specs/copilot-full-parity):
|
|
562
798
|
# rewrite rules from claude-code-style markdown agent (YAML frontmatter with
|
|
563
799
|
# `name`, `description`, optionally `tools`, `model`) to Copilot's `.agent.md`
|
|
@@ -575,10 +811,55 @@ rename = "name"
|
|
|
575
811
|
[frontmatter-mapping."copilot-agent-frontmatter-v0.10".description]
|
|
576
812
|
rename = "description"
|
|
577
813
|
|
|
578
|
-
#
|
|
579
|
-
#
|
|
580
|
-
#
|
|
814
|
+
# Cursor agent frontmatter v0.11 (RFC-0026 / docs/specs/cursor-full-parity):
|
|
815
|
+
# rewrite rules from claude-code-style markdown agent (YAML frontmatter with
|
|
816
|
+
# `name`, `description`, optionally `tools`, `model`) to Cursor's subagent `.md`
|
|
817
|
+
# shape. `name` / `description` / `model` pass through (identity renames; `model`
|
|
818
|
+
# is emitted verbatim — Cursor resolves a known id or falls back to inherit, no
|
|
819
|
+
# alias translation). `tools` is **absent** from this mapping: Cursor subagents
|
|
820
|
+
# have no per-agent tool allowlist, so `cursor.py` drops the source `tools` and
|
|
821
|
+
# derives a `readonly` flag for non-mutating agents (an agent whose declared
|
|
822
|
+
# tool set contains none of Edit/Write/MultiEdit/NotebookEdit). `is_background`
|
|
823
|
+
# is not emitted. This is the documented-degradation shape ADR-0013 accepted for
|
|
824
|
+
# Copilot's tool handling.
|
|
825
|
+
[frontmatter-mapping."cursor-agent-frontmatter-v0.11"]
|
|
826
|
+
|
|
827
|
+
[frontmatter-mapping."cursor-agent-frontmatter-v0.11".name]
|
|
828
|
+
rename = "name"
|
|
829
|
+
|
|
830
|
+
[frontmatter-mapping."cursor-agent-frontmatter-v0.11".description]
|
|
831
|
+
rename = "description"
|
|
581
832
|
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
833
|
+
[frontmatter-mapping."cursor-agent-frontmatter-v0.11".model]
|
|
834
|
+
rename = "model"
|
|
835
|
+
|
|
836
|
+
# Gemini agent frontmatter (RFC-0027 / docs/specs/gemini-full-parity, v0.13):
|
|
837
|
+
# rewrite rules from claude-code-style markdown agent (YAML frontmatter with
|
|
838
|
+
# `name`, `description`, optionally `tools`, `model`) to Gemini CLI's subagent `.md`
|
|
839
|
+
# shape. `name` / `description` pass through (identity renames). Unlike Cursor,
|
|
840
|
+
# Gemini has a real per-agent tool allowlist, so `tools` is KEPT and name-mapped to
|
|
841
|
+
# Gemini's built-in tool identifiers (`normalize = "to-list"`, applied per element;
|
|
842
|
+
# duplicates collapse — `Edit`+`MultiEdit`→single `replace` — and an unmapped token
|
|
843
|
+
# drops with a build-time log line). `model` aliases map to Gemini model IDs; a
|
|
844
|
+
# source value not in the map drops, leaving Gemini's default.
|
|
845
|
+
[frontmatter-mapping."gemini-agent-frontmatter"]
|
|
846
|
+
|
|
847
|
+
[frontmatter-mapping."gemini-agent-frontmatter".name]
|
|
848
|
+
rename = "name"
|
|
849
|
+
|
|
850
|
+
[frontmatter-mapping."gemini-agent-frontmatter".description]
|
|
851
|
+
rename = "description"
|
|
852
|
+
|
|
853
|
+
[frontmatter-mapping."gemini-agent-frontmatter".tools]
|
|
854
|
+
normalize = "to-list"
|
|
855
|
+
# Claude Code tool names → Gemini CLI built-in tool identifiers
|
|
856
|
+
# (https://google-gemini.github.io/gemini-cli/docs/tools/). `MultiEdit` maps to
|
|
857
|
+
# `replace` for parity with the codex/claude/kiro maps (collapses onto `Edit`).
|
|
858
|
+
values = { Read = "read_file", Grep = "grep_search", Glob = "glob", Edit = "replace", MultiEdit = "replace", Write = "write_file", Bash = "run_shell_command", WebFetch = "web_fetch", WebSearch = "google_web_search", LS = "list_directory" }
|
|
859
|
+
|
|
860
|
+
[frontmatter-mapping."gemini-agent-frontmatter".model]
|
|
861
|
+
rename = "model"
|
|
862
|
+
# Tier-preserving map to Gemini's stable 2.5 line. opus→pro (most capable),
|
|
863
|
+
# sonnet→flash (balanced), haiku→flash-lite (fastest). A source value not in the
|
|
864
|
+
# map is dropped, leaving Gemini's CLI default.
|
|
865
|
+
values = { opus = "gemini-2.5-pro", sonnet = "gemini-2.5-flash", haiku = "gemini-2.5-flash-lite" }
|
|
@@ -189,6 +189,60 @@ def collect_companion_shim(packs_dir: Path) -> dict[str, Path]:
|
|
|
189
189
|
return {}
|
|
190
190
|
|
|
191
191
|
|
|
192
|
+
def collect_pack_root_bins(pack_dir: Path) -> dict[str, Path]:
|
|
193
|
+
"""Single-pack, companion-aware enumeration for install-time delivery.
|
|
194
|
+
|
|
195
|
+
Returns ``{basename → source_path}`` for one already-resolved
|
|
196
|
+
catalogue ``pack_dir``'s ``.apm/adapter-root-bins/*.py`` plus the AC22b
|
|
197
|
+
companion ``credentials_shim.py`` when the pack ships BOTH that
|
|
198
|
+
directory (at least one ``*.py``) AND
|
|
199
|
+
``.apm/shared-libs/credentials_shim.py`` — the same ship-both opt-in as
|
|
200
|
+
:func:`collect_companion_shim`, scoped to one pack.
|
|
201
|
+
|
|
202
|
+
Why not :func:`compute_projections` / :func:`collect_sources`? Those
|
|
203
|
+
walk a multi-pack build-time ``packs/`` root and fold a ``working_tree``
|
|
204
|
+
target into each pair. ``agentbundle install`` operates on a single
|
|
205
|
+
resolved catalogue ``pack_dir`` and owns its own per-scope path-jail, so
|
|
206
|
+
it needs basenames + sources for one pack, not absolute targets under a
|
|
207
|
+
build tree (credbroker-user-scope plan T4 — the install-side seam). The
|
|
208
|
+
install caller composes ``.agentbundle/bin/<basename>`` relpaths from
|
|
209
|
+
:data:`TARGET_SUBDIR` and writes via ``safety.write_jailed`` with POSIX
|
|
210
|
+
:data:`EXECUTABLE_MODE`.
|
|
211
|
+
|
|
212
|
+
A bare ``adapter-root-bins/*.py`` glob would miss the companion and land
|
|
213
|
+
the per-platform Tier-2 backends (``_sso_keychain_macos.py`` etc.)
|
|
214
|
+
broken on macOS/Windows — they import ``Tier2HardFailError`` from the
|
|
215
|
+
shim. This helper carries it for exactly the ship-both case.
|
|
216
|
+
|
|
217
|
+
The ship-both opt-in here is the single-pack twin of
|
|
218
|
+
:func:`collect_companion_shim` (the multi-pack, ``packs/``-walking
|
|
219
|
+
enumeration). The two predicates are intentionally parallel — a change to
|
|
220
|
+
the opt-in rule must update both.
|
|
221
|
+
"""
|
|
222
|
+
# Skip symlinks: install resolves ``pack_dir`` from an untrusted catalogue
|
|
223
|
+
# (a downloaded archive / git checkout), and these bytes land executable
|
|
224
|
+
# (``0o755``) under ``~/.agentbundle/bin/``. A symlinked ``*.py`` pointing
|
|
225
|
+
# out of tree (e.g. ``~/.ssh/id_rsa``) would otherwise read that content
|
|
226
|
+
# into the floor. The build-pipeline ``collect_sources`` twin operates on
|
|
227
|
+
# the trusted in-repo ``packs/`` and intentionally does not filter.
|
|
228
|
+
bins_dir = pack_dir / SOURCE_SUBDIR
|
|
229
|
+
# A symlinked primitive *directory* would let glob enumerate the link
|
|
230
|
+
# target's real (non-symlink) files, smuggling out-of-tree content in.
|
|
231
|
+
if not bins_dir.is_dir() or bins_dir.is_symlink():
|
|
232
|
+
return {}
|
|
233
|
+
sources: dict[str, Path] = {
|
|
234
|
+
src.name: src
|
|
235
|
+
for src in sorted(bins_dir.glob("*.py"))
|
|
236
|
+
if src.is_file() and not src.is_symlink()
|
|
237
|
+
}
|
|
238
|
+
if not sources:
|
|
239
|
+
return {}
|
|
240
|
+
shim_source = pack_dir / shared_libs.SOURCE_SUBDIR / SHIM_COMPANION_BASENAME
|
|
241
|
+
if shim_source.is_file() and not shim_source.is_symlink():
|
|
242
|
+
sources[SHIM_COMPANION_BASENAME] = shim_source
|
|
243
|
+
return sources
|
|
244
|
+
|
|
245
|
+
|
|
192
246
|
def compute_projections(
|
|
193
247
|
working_tree: Path, packs_dir: Path
|
|
194
248
|
) -> list[AdapterRootBinProjection]:
|
|
@@ -7,7 +7,7 @@ from pathlib import Path
|
|
|
7
7
|
from types import ModuleType
|
|
8
8
|
from typing import Callable, Dict, Mapping
|
|
9
9
|
|
|
10
|
-
from agentbundle.build.adapters import claude_code, codex, copilot, kiro, kiro_cli, kiro_ide
|
|
10
|
+
from agentbundle.build.adapters import claude_code, codex, copilot, cursor, gemini, kiro, kiro_cli, kiro_ide
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
def _kiro_alias_project(pack_path: Path, contract: dict, output_root: Path) -> None:
|
|
@@ -28,7 +28,9 @@ ADAPTERS: Dict[str, Callable] = {
|
|
|
28
28
|
"kiro-cli": kiro_cli.project,
|
|
29
29
|
"kiro": _kiro_alias_project, # deprecated alias → kiro-ide (RFC-0022 D1)
|
|
30
30
|
"copilot": copilot.project,
|
|
31
|
+
"cursor": cursor.project,
|
|
31
32
|
"codex": codex.project,
|
|
33
|
+
"gemini": gemini.project,
|
|
32
34
|
}
|
|
33
35
|
|
|
34
36
|
# Module-keyed registry — the surface RFC-0003 F-cli AC requires.
|
|
@@ -42,5 +44,7 @@ registry: Mapping[str, ModuleType] = {
|
|
|
42
44
|
"kiro_cli": kiro_cli,
|
|
43
45
|
"kiro": kiro, # legacy module; use kiro_ide for new code
|
|
44
46
|
"copilot": copilot,
|
|
47
|
+
"cursor": cursor,
|
|
45
48
|
"codex": codex,
|
|
49
|
+
"gemini": gemini,
|
|
46
50
|
}
|