ace-lab 0.8.0 → 0.13.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 (73) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +363 -92
  3. data/README.md +66 -100
  4. data/docs/usage.md +529 -404
  5. data/lib/ace/lab/atoms/install_schema.rb +373 -0
  6. data/lib/ace/lab/cli/commands/install.rb +161 -0
  7. data/lib/ace/lab/cli/commands/prepare.rb +118 -0
  8. data/lib/ace/lab/cli/commands/project_add.rb +101 -0
  9. data/lib/ace/lab/cli/commands/status.rb +109 -0
  10. data/lib/ace/lab/cli/commands/verify.rb +115 -0
  11. data/lib/ace/lab/cli.rb +21 -13
  12. data/lib/ace/lab/install_manifest_path.rb +23 -0
  13. data/lib/ace/lab/models/status_report.rb +38 -0
  14. data/lib/ace/lab/molecules/account_provisioner.rb +196 -0
  15. data/lib/ace/lab/molecules/config_state_classifier.rb +145 -0
  16. data/lib/ace/lab/molecules/directory_provisioner.rb +208 -0
  17. data/lib/ace/lab/molecules/grant_provisioner.rb +250 -0
  18. data/lib/ace/lab/molecules/grant_resolver.rb +49 -23
  19. data/lib/ace/lab/molecules/hitl_routes.rb +263 -0
  20. data/lib/ace/lab/molecules/install_manifest_loader.rb +64 -0
  21. data/lib/ace/lab/molecules/key_provisioner.rb +736 -0
  22. data/lib/ace/lab/molecules/lab_state_scanner.rb +55 -0
  23. data/lib/ace/lab/molecules/overseer_provisioner.rb +188 -0
  24. data/lib/ace/lab/molecules/project_registry.rb +251 -0
  25. data/lib/ace/lab/molecules/repository_provisioner.rb +141 -0
  26. data/lib/ace/lab/molecules/role_verifier.rb +223 -0
  27. data/lib/ace/lab/organisms/install.rb +213 -0
  28. data/lib/ace/lab/organisms/prepare.rb +156 -0
  29. data/lib/ace/lab/organisms/project_add.rb +170 -0
  30. data/lib/ace/lab/organisms/status_service.rb +70 -0
  31. data/lib/ace/lab/organisms/verify.rb +768 -0
  32. data/lib/ace/lab/version.rb +1 -1
  33. data/lib/ace/lab.rb +34 -6
  34. metadata +34 -102
  35. data/lib/ace/lab/atoms/protected_publication_input.rb +0 -50
  36. data/lib/ace/lab/atoms/protected_workspace_prune_input.rb +0 -114
  37. data/lib/ace/lab/atoms/protected_workspace_prune_preview.rb +0 -86
  38. data/lib/ace/lab/atoms/service_input.rb +0 -92
  39. data/lib/ace/lab/cli/commands/assignment.rb +0 -45
  40. data/lib/ace/lab/cli/commands/service.rb +0 -240
  41. data/lib/ace/lab/models/service_receipt.rb +0 -18
  42. data/lib/ace/lab/molecules/hitl_authorizer.rb +0 -63
  43. data/lib/ace/lab/molecules/ordinary_admission_resolver.rb +0 -131
  44. data/lib/ace/lab/molecules/ordinary_listener.rb +0 -262
  45. data/lib/ace/lab/molecules/ordinary_merge_read.rb +0 -45
  46. data/lib/ace/lab/molecules/ordinary_native_read.rb +0 -106
  47. data/lib/ace/lab/molecules/ordinary_owner_admission.rb +0 -139
  48. data/lib/ace/lab/molecules/ordinary_owner_config.rb +0 -232
  49. data/lib/ace/lab/molecules/ordinary_receiver_config.rb +0 -94
  50. data/lib/ace/lab/molecules/ordinary_socket.rb +0 -126
  51. data/lib/ace/lab/molecules/ordinary_worktree_read.rb +0 -216
  52. data/lib/ace/lab/molecules/protected_cleanup_owner_admission.rb +0 -163
  53. data/lib/ace/lab/molecules/protected_cleanup_owner_client.rb +0 -165
  54. data/lib/ace/lab/molecules/protected_cleanup_owner_identity.rb +0 -239
  55. data/lib/ace/lab/molecules/protected_publication_publisher.rb +0 -110
  56. data/lib/ace/lab/molecules/protected_service_handler.rb +0 -43
  57. data/lib/ace/lab/molecules/protected_service_policy.rb +0 -156
  58. data/lib/ace/lab/molecules/service_executor.rb +0 -99
  59. data/lib/ace/lab/molecules/service_policy.rb +0 -289
  60. data/lib/ace/lab/organisms/authority_composition.rb +0 -87
  61. data/lib/ace/lab/organisms/ordinary_assignment_client.rb +0 -149
  62. data/lib/ace/lab/organisms/ordinary_authority_composition.rb +0 -123
  63. data/lib/ace/lab/organisms/ordinary_merge_receiver.rb +0 -688
  64. data/lib/ace/lab/organisms/ordinary_merge_request.rb +0 -456
  65. data/lib/ace/lab/organisms/protected_cleanup_owner.rb +0 -361
  66. data/lib/ace/lab/organisms/protected_service_client.rb +0 -129
  67. data/lib/ace/lab/organisms/protected_service_listener.rb +0 -181
  68. data/lib/ace/lab/organisms/protected_service_publication.rb +0 -268
  69. data/lib/ace/lab/organisms/protected_service_receiver.rb +0 -267
  70. data/lib/ace/lab/organisms/protected_service_recovery.rb +0 -185
  71. data/lib/ace/lab/organisms/protected_service_request.rb +0 -128
  72. data/lib/ace/lab/organisms/protected_service_worker.rb +0 -89
  73. data/lib/ace/lab/organisms/service_request_service.rb +0 -249
data/README.md CHANGED
@@ -1,122 +1,88 @@
1
- ## ace-lab
2
-
3
- Topology, routing, and scoped service request CLI for the Lab. Part of ACE
4
- (Agentic Coding Environment).
5
-
6
- `ace-lab` answers one question -- *what is the stable ID of the project, agent,
7
- or service I mean, and what is it authorized and able to do?* -- from
8
- configuration. Topology queries never invoke a service. The `service`
9
- commands submit configured operations through a verified executor and use
10
- `ace-assign` for durable request evidence. No command hands credentials to
11
- the caller or guesses transient pane or session identifiers.
12
-
13
- ### Install
14
-
15
- gem install ace-lab
16
-
17
- ### Usage
18
-
19
- Configure topology via the ADR-022 cascade (`~/.ace/lab/config.yml` or
20
- `.ace/lab/config.yml`; deployed values are owned by the `lab-config`
21
- repository). Authorization grants live in a separate deployment-controlled
22
- file at the fixed path `/etc/lab/ace-lab/authorization.yml` -- root-owned and
23
- not group/world-writable, verified at every query -- never in the
24
- caller-writable cascade and never at a caller-selected location:
25
-
26
- ```yaml
27
- # .ace/lab/config.yml -- topology only
28
- schema_version: 1
29
- topology:
30
- projects:
31
- - { id: atlas, label: Atlas platform }
32
- agents:
33
- - id: atlas-planner
34
- project: atlas
35
- role: planner
36
- capabilities: [planning]
37
- binding: { kind: runtime, state: active, instance_id: i1, attested_instance_id: i1 }
38
- services:
39
- - id: atlas-search
40
- project: atlas
41
- capabilities: [search]
42
- default_for: [search]
43
- endpoint: { kind: http, url: "https://search.example.internal/query?token=secret" }
44
- binding: { kind: service, state: active, instance_id: i2, attested_instance_id: i2 }
45
- ```
46
-
47
- ```yaml
48
- # trusted grants file (deployment-owned)
49
- principals:
50
- "<verified-local-uid>": { projects: ["atlas"] }
51
- ```
52
-
53
- Query it:
54
-
55
- ace-lab projects --format json
56
- ace-lab agents --project atlas --format json
57
- ace-lab services --project atlas --format json
58
- ace-lab resolve --id atlas-planner --format json
59
- ace-lab route --project atlas --capability search --format json
1
+ # ace-lab
60
2
 
61
- Request a configured operation for an active, managed assignment attempt:
3
+ Environment and project preparation for the local, file-based ACE Lab. Part of
4
+ ACE (Agentic Coding Environment).
62
5
 
63
- ace-lab service request --project atlas --assignment A --attempt ATT \
64
- --operation publish --input release.json --authorization DECISION \
65
- --request-id REQUEST --dry-run
66
- ace-lab service status --request REQUEST --format json
6
+ > **State owner:** none for task work. `ace-lab` prepares lab environments and
7
+ > projects; task/assignment state belongs to `.ace-tasks/` (ace-task) and the
8
+ > local stores under `.ace-local/`. The canonical flow is
9
+ > [docs/lab-flow.md](../docs/lab-flow.md).
67
10
 
68
- The trusted grants file may also contain exact `operations` and
69
- `authorizations` mappings. See [usage](docs/usage.md) for the request schema,
70
- executor transport, and uncertain-state recovery.
11
+ > **Planned (L8):** project onboarding and readiness verification are not
12
+ > available yet; the installer's preparation phase is delivered as
13
+ > `ace-lab prepare` (L8.1).
71
14
 
72
- Every command prints one deterministic JSON document:
15
+ ## What exists today
73
16
 
74
- {"status":"ok","data":{"entry":{"id":"atlas-search","project":"atlas",
75
- "capabilities":["search"],"default_for":["search"],
76
- "binding":{"kind":"service","state":"available",
77
- "endpoint":{"kind":"http","url":"https://search.example.internal"}}}}}
17
+ `ace-lab` is the Lab environment package. Its installer and project-onboarding
18
+ capabilities are the L8 target; today the package ships read-only topology
19
+ queries, the lab status snapshot, and the `prepare` phase. It does not run a
20
+ queue, daemon, journal, authorization service, or command kernel.
78
21
 
79
- Failures are classified: `missing`, `ambiguous`, `stale`, `unauthorized`,
80
- `invalid_configuration` -- for example a replaced agent process:
22
+ ### Topology queries
81
23
 
82
- {"status":"error","error":{"code":"stale","message":"stable ID
83
- \"atlas-planner\" has a stale runtime binding; ...","id":"atlas-planner",
84
- "project":"atlas"}}
24
+ Topology configuration uses the ACE configuration cascade
25
+ (`~/.ace/lab/config.yml` or `.ace/lab/config.yml`). Queries never invoke a
26
+ service and never hand credentials to the caller.
85
27
 
86
- ### Guarantees
28
+ ```bash
29
+ ace-lab projects --format json
30
+ ace-lab agents --project atlas --format json
31
+ ace-lab services --project atlas --format json
32
+ ace-lab resolve --id atlas-planner --format json
33
+ ace-lab route --project atlas --capability search --format json
34
+ ```
87
35
 
88
- - **Stable IDs are canonical.** Labels are display values and never resolve.
36
+ Every query prints one deterministic JSON document. Failures are classified
37
+ (`missing`, `ambiguous`, `stale`, `unauthorized`, `invalid_configuration`).
38
+ Stable IDs are canonical; labels are display values and never resolve.
89
39
 
90
- Exact match or a classified `missing` error.
40
+ ### Lab status
91
41
 
92
- - **Public output never leaks.** Tokens, auth-file paths, endpoint userinfo,
42
+ ```bash
43
+ ace-lab status # configuration + local file state (read-only)
44
+ ace-lab status --format json
45
+ ```
93
46
 
94
- query parameters, fragments, pane/session identifiers, and instance
95
- identities are excluded by an allowlist projection, not field redaction.
47
+ `ace-lab status` distinguishes a valid empty set, missing configuration, and a
48
+ source error — never presenting an incomplete lab as empty-and-ready. The
49
+ enriched worktree view stays `ace-git-worktree list`; live terminal layout is
50
+ `ace-herdr status`.
96
51
 
97
- - **Authorization comes from the verified local process owner**, matched
52
+ ### Lab preparation (`prepare`, L8.1)
98
53
 
99
- against configured principals. There is no `--role` or `--principal` flag;
100
- identity flags are rejected outright.
54
+ ```bash
55
+ ace-lab prepare --dry-run
56
+ ```
101
57
 
102
- - **Routing is project-local.** Candidates are capable services of the
58
+ Idempotently prepares accounts, directories (mode/ownership), ed25519 key
59
+ pairs and the role catalog from the trusted root-owned install manifest at
60
+ `/etc/lab/ace-lab/install.yml` (verified fail-closed like the authorization
61
+ document; no `--manifest` flag by design). Reports fingerprints, never key
62
+ material; refuses foreign-takeover of existing directories and key paths
63
+ inside git worktrees. See [docs/usage.md](docs/usage.md) for the manifest
64
+ schema, status table and L8.2–L8.5 boundaries.
103
65
 
104
- requested project with fresh (active + attested) bindings. Zero candidates
105
- are `missing`; several equal candidates need a configured `default_for`, or
106
- the result is `ambiguous`. Another project's service is never picked.
66
+ ## Not owners of the flow
107
67
 
108
- - **Execution evidence is separate from topology.** `ace-lab service` uses a
68
+ `ace-lab` does not own task state, assignment plans, HITL events, worktrees, or
69
+ a queue. There is no journal, no authority/admission service, no listener that
70
+ blocks ordinary work, and no second state store.
109
71
 
110
- managed `ace-assign` attempt and its evidence ref. A lost executor receipt
111
- remains uncertain and a repeated request ID never replays the effect.
72
+ The installed authority/admission/journal/command path is removed in L1: the
73
+ `service request|status|listen`, `ace-lab assignment …`, `run`, `run-status`,
74
+ and `command execute` commands no longer exist, and the local file-based flow
75
+ does not use them. The Forgejo merge adapter and its trusted configuration
76
+ loader remain as provider building blocks; the local flow does not invoke them.
112
77
 
113
- ### Non-goals
78
+ ## Install
114
79
 
115
- `ace-lab` does not track Works or schedule anything. `ace-assign` owns attempt
116
- state; deployed operation handlers and topology values are owned by `lab-config`
117
- (`8wl.t.gad`); this package defines and validates the schema.
80
+ ```bash
81
+ gem install ace-lab
82
+ ```
118
83
 
119
- ### Development
84
+ ## Development
120
85
 
121
- bundle install
122
- bin/ace-test ace-lab all
86
+ ```bash
87
+ bin/ace-test ace-lab all
88
+ ```