robert-github-agent 0.1.0b1__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.
- robert_agent/__init__.py +1 -0
- robert_agent/acceptance.py +394 -0
- robert_agent/acceptance_suite.py +287 -0
- robert_agent/audit_result.py +501 -0
- robert_agent/authorize.py +117 -0
- robert_agent/board.py +538 -0
- robert_agent/chat_status.py +338 -0
- robert_agent/cli/__init__.py +1 -0
- robert_agent/cli/exit_codes.py +5 -0
- robert_agent/cli/main.py +535 -0
- robert_agent/cli/output.py +20 -0
- robert_agent/common.py +6 -0
- robert_agent/controlled_e2e_acceptance.py +394 -0
- robert_agent/daemon.py +607 -0
- robert_agent/daemon_state.py +319 -0
- robert_agent/diagnostics.py +119 -0
- robert_agent/discover.py +775 -0
- robert_agent/dispatch.py +217 -0
- robert_agent/doctor.py +94 -0
- robert_agent/github_api.py +12 -0
- robert_agent/init_config.py +126 -0
- robert_agent/integrations/__init__.py +1 -0
- robert_agent/integrations/openclaw.py +285 -0
- robert_agent/live_discovery_acceptance.py +70 -0
- robert_agent/live_worker_acceptance.py +363 -0
- robert_agent/live_worktree_acceptance.py +344 -0
- robert_agent/loop_engine.py +285 -0
- robert_agent/memory_curator.py +105 -0
- robert_agent/migrate.py +157 -0
- robert_agent/notify.py +74 -0
- robert_agent/paths.py +16 -0
- robert_agent/production_write_canary.py +254 -0
- robert_agent/project_memory.py +503 -0
- robert_agent/publish.py +743 -0
- robert_agent/publish_dedupe_acceptance.py +270 -0
- robert_agent/redaction.py +41 -0
- robert_agent/render_prompt.py +544 -0
- robert_agent/resource_files.py +8 -0
- robert_agent/resources/__init__.py +1 -0
- robert_agent/resources/acceptance-matrix.md +120 -0
- robert_agent/resources/classifier.md +19 -0
- robert_agent/resources/command-matrix.md +38 -0
- robert_agent/resources/config.example.yml +20 -0
- robert_agent/resources/db/migrations/001_legacy_dd_to_robert.sql +14 -0
- robert_agent/resources/db/schema.sql +479 -0
- robert_agent/resources/failure-modes.md +36 -0
- robert_agent/resources/fixtures/actor-permission.json +1 -0
- robert_agent/resources/fixtures/discovery.json +1 -0
- robert_agent/resources/fixtures/redaction.json +1 -0
- robert_agent/resources/fixtures/review-followup.json +1 -0
- robert_agent/resources/fixtures/worker-results.json +1 -0
- robert_agent/resources/fixtures/workstreams.json +1 -0
- robert_agent/resources/github-events.md +77 -0
- robert_agent/resources/kanban-control.md +165 -0
- robert_agent/resources/redaction.md +29 -0
- robert_agent/resources/result-contract.md +56 -0
- robert_agent/resources/routes.yml +82 -0
- robert_agent/resources/schemas/config.schema.json +123 -0
- robert_agent/resources/schemas/event.schema.json +18 -0
- robert_agent/resources/schemas/result.schema.json +99 -0
- robert_agent/resources/schemas/route.schema.json +23 -0
- robert_agent/resources/schemas/snapshot.schema.json +17 -0
- robert_agent/resources/schemas/task.schema.json +15 -0
- robert_agent/resources/trust-model.md +16 -0
- robert_agent/resources/worker-prompt.md +121 -0
- robert_agent/resources/worker-protocol.md +47 -0
- robert_agent/resources/workflow.yml +50 -0
- robert_agent/resources/workstream-model.md +17 -0
- robert_agent/route.py +232 -0
- robert_agent/route_config.py +64 -0
- robert_agent/run_once.py +5375 -0
- robert_agent/runtime_knowledge.py +392 -0
- robert_agent/service.py +161 -0
- robert_agent/skills.py +28 -0
- robert_agent/status.py +1051 -0
- robert_agent/storage.py +376 -0
- robert_agent/summarize.py +100 -0
- robert_agent/supervise.py +72 -0
- robert_agent/usage.py +192 -0
- robert_agent/validate_config.py +616 -0
- robert_agent/wakeup.py +261 -0
- robert_agent/web.py +2893 -0
- robert_agent/web_assets/board.css +255 -0
- robert_agent/web_assets/board.html +165 -0
- robert_agent/web_assets/board.js +660 -0
- robert_agent/web_assets/github-shell.css +122 -0
- robert_agent/web_assets/index.html +103 -0
- robert_agent/web_assets/operations.css +168 -0
- robert_agent/web_assets/workbench.css +131 -0
- robert_agent/web_assets/workbench.js +581 -0
- robert_agent/work_items.py +1016 -0
- robert_agent/workbench.py +701 -0
- robert_agent/worker/__init__.py +1 -0
- robert_agent/worker/heartbeat.py +190 -0
- robert_agent/worker/result.py +321 -0
- robert_agent/worker/snapshot.py +98 -0
- robert_agent/worker_adapters/__init__.py +138 -0
- robert_agent/worker_adapters/cbc.py +68 -0
- robert_agent/worker_adapters/codex.py +56 -0
- robert_agent/worker_adapters/command.py +33 -0
- robert_agent/worker_adapters/tcodex.py +56 -0
- robert_agent/worker_heartbeat.py +6 -0
- robert_agent/worker_result.py +6 -0
- robert_agent/worker_snapshot.py +6 -0
- robert_agent/workstream.py +55 -0
- robert_agent/worktree.py +297 -0
- robert_github_agent-0.1.0b1.dist-info/METADATA +217 -0
- robert_github_agent-0.1.0b1.dist-info/RECORD +111 -0
- robert_github_agent-0.1.0b1.dist-info/WHEEL +4 -0
- robert_github_agent-0.1.0b1.dist-info/entry_points.txt +2 -0
- robert_github_agent-0.1.0b1.dist-info/licenses/LICENSE +201 -0
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
# Repository Task Board and Local Control API
|
|
2
|
+
|
|
3
|
+
The task board is the operator-facing control surface for repository-scoped
|
|
4
|
+
work. It projects local assignments and trusted GitHub issue/PR work into one
|
|
5
|
+
canonical six-column view while the existing scheduler, worker, audit, and
|
|
6
|
+
publication paths remain authoritative.
|
|
7
|
+
|
|
8
|
+
## Start the board
|
|
9
|
+
|
|
10
|
+
Writable mode validates the normal runtime config, initializes/migrates its
|
|
11
|
+
SQLite database, synchronizes configured repositories, and allows task
|
|
12
|
+
commands for configured repositories and named workers:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
robert web run \
|
|
16
|
+
--config ~/.config/robert/config.yml \
|
|
17
|
+
--writable \
|
|
18
|
+
--host 127.0.0.1 \
|
|
19
|
+
--port 8765 \
|
|
20
|
+
--operator "$USER"
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Open `http://127.0.0.1:8765/board`. The GitHub workbench is at `/`, and the
|
|
24
|
+
diagnostic dashboard remains at `/operations`.
|
|
25
|
+
|
|
26
|
+
Read-only mode is available when the operator must inspect an existing
|
|
27
|
+
database without creating work or changing Knowledge state:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
robert web run \
|
|
31
|
+
--db ~/.local/share/robert/robert.sqlite3 \
|
|
32
|
+
--host 127.0.0.1 \
|
|
33
|
+
--port 8765
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
In read-only mode, board/detail APIs still work, `/api/session` reports why
|
|
37
|
+
writes are disabled, and every HTTP write returns `503`.
|
|
38
|
+
|
|
39
|
+
## Projected columns
|
|
40
|
+
|
|
41
|
+
The column is a read model, not a mutable status field. Each non-canceled item
|
|
42
|
+
appears in exactly one column according to durable SQLite state:
|
|
43
|
+
|
|
44
|
+
| Column | Meaning |
|
|
45
|
+
| --- | --- |
|
|
46
|
+
| Backlog | A web-created requirement has not been activated and can still be edited. |
|
|
47
|
+
| TODO | An activated task is detected, classified, queued, or otherwise ready for execution. |
|
|
48
|
+
| Doing | A worker attempt is running or accepted GitHub publication is in progress. |
|
|
49
|
+
| Waiting for you | An unresolved Agent question, completion decision, startup failure, or publication failure requires operator action. |
|
|
50
|
+
| Review | An associated PR is open, or PR-specific attention such as an unmerged close must be handled. |
|
|
51
|
+
| Done | Completion has been accepted or an associated PR was merged. |
|
|
52
|
+
|
|
53
|
+
Canceled items remain in history and are excluded from the default six-column
|
|
54
|
+
response. Structured state wins over timestamps and text heuristics. Resolving
|
|
55
|
+
an attention event prevents an old failure or question from returning the card
|
|
56
|
+
to Waiting.
|
|
57
|
+
|
|
58
|
+
## Task commands
|
|
59
|
+
|
|
60
|
+
All mutations are versioned, transactional, and idempotent. Clients must send
|
|
61
|
+
the detail response's `version` as `expected_version` and a new
|
|
62
|
+
`X-Idempotency-Key` for each operator intent.
|
|
63
|
+
|
|
64
|
+
| Command | Normal use |
|
|
65
|
+
| --- | --- |
|
|
66
|
+
| `edit` | Change title, requirement, priority, or routing while in Backlog. |
|
|
67
|
+
| `start` | Activate a Backlog item and enqueue its first task. |
|
|
68
|
+
| `approve` | Resolve an operator decision; completion acceptance can finish the item. |
|
|
69
|
+
| `reply` | Answer an Agent question and create a serial child task. |
|
|
70
|
+
| `request_changes` | Resolve review attention or request another pass on an open PR. |
|
|
71
|
+
| `retry` | Resolve a retryable startup, execution, or publication failure. |
|
|
72
|
+
| `cancel` | Cancel non-running work; a live attempt must finish or be supervised first. |
|
|
73
|
+
| `reopen` | Reopen a completed item as a new serial child task. |
|
|
74
|
+
|
|
75
|
+
`409` means the item changed since the caller read it. The response includes a
|
|
76
|
+
safe current detail projection so the UI can refresh without guessing. Invalid
|
|
77
|
+
filters and command bodies return `422`.
|
|
78
|
+
|
|
79
|
+
## Routing and capacity
|
|
80
|
+
|
|
81
|
+
New work can use `routing_mode: auto` or `routing_mode: manual`. Auto routing
|
|
82
|
+
uses the normal route-to-worker mapping. Manual routing requires a worker name
|
|
83
|
+
from the validated config and is authoritative: if that worker is unavailable,
|
|
84
|
+
the task stays prepared and becomes actionable instead of falling back to a
|
|
85
|
+
different worker.
|
|
86
|
+
|
|
87
|
+
Only attempts with `status = running` consume capacity. The global
|
|
88
|
+
`max_concurrency` bounds the process, and `repos[].max_concurrency` may impose a
|
|
89
|
+
lower limit for one repository. Prepared, waiting, stale, and historical rows
|
|
90
|
+
do not consume a slot, although supervision still inspects stale/running
|
|
91
|
+
attempts. Independent workstreams may run concurrently and receive distinct
|
|
92
|
+
worktrees; a single workstream remains serial.
|
|
93
|
+
|
|
94
|
+
## Waiting and continuation
|
|
95
|
+
|
|
96
|
+
A worker `waiting_for_user` result must contain a structured
|
|
97
|
+
`operator_question`. The accepted result records an unresolved attention event
|
|
98
|
+
and projects the item into Waiting for you. An operator `reply`, `approve`,
|
|
99
|
+
`request_changes`, or `retry` resolves that exact event and creates a child task
|
|
100
|
+
when execution must continue.
|
|
101
|
+
|
|
102
|
+
The child stays on the same work item and serial workstream. Worktree planning
|
|
103
|
+
uses the same local source reference, so follow-up work reuses the same branch
|
|
104
|
+
and worktree when available. Multiple question/reply cycles append events and
|
|
105
|
+
child tasks; they do not create duplicate cards.
|
|
106
|
+
|
|
107
|
+
## GitHub association and completion
|
|
108
|
+
|
|
109
|
+
A trusted GitHub issue/PR intake creates or reuses a stable work item. Repeated
|
|
110
|
+
events for the same root source are deduplicated. A PR derived from an issue
|
|
111
|
+
stays attached to the issue's item; an independent PR receives its own item.
|
|
112
|
+
|
|
113
|
+
Publishing an audited `open_pr` action records the PR link and projects the
|
|
114
|
+
item into Review. Review changes create another task on the same workstream.
|
|
115
|
+
A remote merged PR records `pr_merged` and completes the item. A PR closed
|
|
116
|
+
without merge records unresolved `unmerged_pr_closed` attention and remains in
|
|
117
|
+
Review until the operator decides what to do.
|
|
118
|
+
|
|
119
|
+
Analysis-only and validated no-op local results may complete without a PR. A
|
|
120
|
+
code-producing GitHub route still follows its route verification and required
|
|
121
|
+
publication contracts.
|
|
122
|
+
|
|
123
|
+
## Local security boundary
|
|
124
|
+
|
|
125
|
+
The server defaults to `127.0.0.1` and is intended for local operator use. It
|
|
126
|
+
does not enable CORS. HTTP writes require all of the following:
|
|
127
|
+
|
|
128
|
+
- an exact `Host` matching the configured bind origin;
|
|
129
|
+
- an exact same-origin `Origin`;
|
|
130
|
+
- the process-scoped token returned by `/api/session` in
|
|
131
|
+
`X-Robert-CSRF-Token`;
|
|
132
|
+
- the expected content type;
|
|
133
|
+
- a request body no larger than 64 KiB;
|
|
134
|
+
- an idempotency key for work-item mutations.
|
|
135
|
+
|
|
136
|
+
The API allowlists repositories and workers from the validated config, returns
|
|
137
|
+
safe errors without raw exception text, and writes only SQLite/wakeup state.
|
|
138
|
+
The scheduler remains responsible for worktree creation, worker launch, audit,
|
|
139
|
+
and GitHub publication. Binding to a non-loopback address is outside this local
|
|
140
|
+
trust model and requires an operator-provided authenticated reverse proxy.
|
|
141
|
+
|
|
142
|
+
## Recovery and diagnostics
|
|
143
|
+
|
|
144
|
+
The board retains its last successful data during refresh failures. Startup,
|
|
145
|
+
execution, and publication failures remain unresolved attention until an
|
|
146
|
+
operator command resolves them. Restarting `web.py` is safe because command
|
|
147
|
+
idempotency and item versions live in SQLite; the CSRF token intentionally
|
|
148
|
+
changes with the server process.
|
|
149
|
+
|
|
150
|
+
Use these focused checks before raw SQL:
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
robert status --config ~/.config/robert/config.yml
|
|
154
|
+
|
|
155
|
+
robert web run \
|
|
156
|
+
--db ~/.local/share/robert/robert.sqlite3 --json
|
|
157
|
+
|
|
158
|
+
curl --fail http://127.0.0.1:8765/healthz
|
|
159
|
+
curl --fail http://127.0.0.1:8765/api/board
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
The canonical board endpoints are `/api/board`, `/api/work-items/<id>`, and
|
|
163
|
+
`/api/work-items/<id>/events`. Use `/operations`, `/data.json`, Knowledge, and
|
|
164
|
+
registered artifact views for lower-level run, audit, publication, and worker
|
|
165
|
+
evidence.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Redaction
|
|
2
|
+
|
|
3
|
+
External GitHub-facing text must be conservative.
|
|
4
|
+
|
|
5
|
+
Block publication when text contains high-risk secrets:
|
|
6
|
+
|
|
7
|
+
- tokens
|
|
8
|
+
- Authorization headers
|
|
9
|
+
- cookies
|
|
10
|
+
- SSH keys
|
|
11
|
+
- private keys
|
|
12
|
+
- environment secrets
|
|
13
|
+
|
|
14
|
+
Replace before publication:
|
|
15
|
+
|
|
16
|
+
- local absolute paths, including their username/path segments
|
|
17
|
+
- internal IP addresses
|
|
18
|
+
- internal domains
|
|
19
|
+
- temp directories
|
|
20
|
+
- raw command stderr when it contains host-specific context
|
|
21
|
+
|
|
22
|
+
Keep useful public context:
|
|
23
|
+
|
|
24
|
+
- GitHub URLs
|
|
25
|
+
- public package names
|
|
26
|
+
- public error types
|
|
27
|
+
- relative paths
|
|
28
|
+
- test names
|
|
29
|
+
- function names
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Result Contract
|
|
2
|
+
|
|
3
|
+
Worker results are structured records for agent audit. A result must include:
|
|
4
|
+
|
|
5
|
+
- `task_id`
|
|
6
|
+
- `attempt_id`
|
|
7
|
+
- `output_type`
|
|
8
|
+
- `planned_github_actions` as objects with a non-empty `type` field and optional metadata such as `target_url`
|
|
9
|
+
- `consumed_event_fingerprints`
|
|
10
|
+
- `consumed_work_item_event_ids` for web-origin work; GitHub-origin work keeps
|
|
11
|
+
using `consumed_event_fingerprints`
|
|
12
|
+
- `used_skills` as the list of local skills actually used; use an empty list when none were used
|
|
13
|
+
- `verification`
|
|
14
|
+
- `handoff`
|
|
15
|
+
|
|
16
|
+
A result may also include:
|
|
17
|
+
|
|
18
|
+
- `memory_delta`, an optional project-memory update for reusable decisions,
|
|
19
|
+
implementation notes, paths, symbols, keywords, and verification evidence
|
|
20
|
+
- `used_memory_ids`, an optional list of retrieved memory ids that materially
|
|
21
|
+
influenced the work
|
|
22
|
+
- `operator_question` when `output_type` is `waiting_for_user`; it contains a
|
|
23
|
+
`kind` (`clarification`, `scope_decision`, or `completion_acceptance`), a
|
|
24
|
+
concise `summary`, and at most five `{id, label}` choices
|
|
25
|
+
- `branch_slug` for a `classification_result` that recommends `new-pr`; use a
|
|
26
|
+
meaningful lowercase ASCII kebab-case value of at most 60 characters
|
|
27
|
+
|
|
28
|
+
`local_result` is the terminal output for web-origin analysis that needs no
|
|
29
|
+
GitHub action. Any route may return `waiting_for_user` instead of its ordinary
|
|
30
|
+
output, but the structured `operator_question` is mandatory. Web-origin work
|
|
31
|
+
must not plan public GitHub actions.
|
|
32
|
+
|
|
33
|
+
`planned_github_actions` must stay within the route's `allowed_github_actions`. Use `type`, not legacy keys such as `action`. The agent audits results before publication and rejects results whose planned actions omit publisher-required fields. `recommended_skills` are guidance; workers may use any installed local skill, but must not create, modify, or install skills.
|
|
34
|
+
|
|
35
|
+
`verification` is route-policy evidence. Each entry must be an object with:
|
|
36
|
+
|
|
37
|
+
- `command`: a command string or argv list
|
|
38
|
+
- `status`: `passed`, `failed`, or `skipped`
|
|
39
|
+
- `purpose`: why this check matters for the submitted result
|
|
40
|
+
- `required`: whether the route depends on this check
|
|
41
|
+
- `exit_code`: integer exit code for command-backed checks
|
|
42
|
+
- `skipped_reason`: required when `status` is `skipped`
|
|
43
|
+
|
|
44
|
+
Routes that open a new PR or push updates to an existing PR require at least one
|
|
45
|
+
`required: true` verification entry with `status: "passed"`. Comment-only,
|
|
46
|
+
waiting-for-user, and classification results can leave `verification` empty
|
|
47
|
+
unless the worker ran useful checks.
|
|
48
|
+
|
|
49
|
+
Publisher-required fields:
|
|
50
|
+
|
|
51
|
+
- `comment`: `target_url`, `body` containing the `robert-comment` idempotency marker
|
|
52
|
+
- `open_pr`: `repo`, `head`, `base`, `title`, `body` containing the `robert-workstream` metadata block, optional `draft`
|
|
53
|
+
- `push_existing_pr`: `worktree_path`, `branch`, optional `remote`
|
|
54
|
+
|
|
55
|
+
For `new_pr`, record both a `push_existing_pr` action for the prepared worktree
|
|
56
|
+
branch and the final `open_pr` action.
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
routes:
|
|
2
|
+
- id: local-result
|
|
3
|
+
workspace_mode: none
|
|
4
|
+
expected_output: local_result
|
|
5
|
+
allowed_github_actions: []
|
|
6
|
+
needs_worktree: false
|
|
7
|
+
verification_policy:
|
|
8
|
+
mode: optional
|
|
9
|
+
required_statuses: [passed]
|
|
10
|
+
allow_skipped: true
|
|
11
|
+
recommended_skills: [fast-code-path, fast-zoom-out]
|
|
12
|
+
- id: comment-analysis
|
|
13
|
+
workspace_mode: analysis
|
|
14
|
+
expected_output: comment_analysis
|
|
15
|
+
allowed_github_actions: [comment]
|
|
16
|
+
needs_worktree: false
|
|
17
|
+
verification_policy:
|
|
18
|
+
mode: optional
|
|
19
|
+
required_statuses: [passed]
|
|
20
|
+
allow_skipped: true
|
|
21
|
+
recommended_skills: [fast-code-path, fast-zoom-out, fast-verify-review-point]
|
|
22
|
+
- id: new-pr
|
|
23
|
+
workspace_mode: new_branch
|
|
24
|
+
expected_output: new_pr
|
|
25
|
+
allowed_github_actions: [push_existing_pr, open_pr, comment]
|
|
26
|
+
needs_worktree: true
|
|
27
|
+
verification_policy:
|
|
28
|
+
mode: required
|
|
29
|
+
required_statuses: [passed]
|
|
30
|
+
allow_skipped: false
|
|
31
|
+
recommended_skills: [fast-small-pr, fast-code-path, fast-add-tests, fast-test-fix, fast-preflight]
|
|
32
|
+
- id: update-existing-pr
|
|
33
|
+
workspace_mode: existing_pr
|
|
34
|
+
expected_output: update_existing_pr
|
|
35
|
+
allowed_github_actions: [push_existing_pr, comment]
|
|
36
|
+
needs_worktree: true
|
|
37
|
+
verification_policy:
|
|
38
|
+
mode: required_for_push
|
|
39
|
+
required_statuses: [passed]
|
|
40
|
+
allow_skipped: false
|
|
41
|
+
recommended_skills: [fast-small-pr, fast-verify-review-point, fast-code-path, fast-add-tests, fast-test-fix, fast-code-simplify, fast-preflight]
|
|
42
|
+
- id: review-comment
|
|
43
|
+
workspace_mode: analysis
|
|
44
|
+
expected_output: review_comment
|
|
45
|
+
allowed_github_actions: [comment]
|
|
46
|
+
needs_worktree: false
|
|
47
|
+
verification_policy:
|
|
48
|
+
mode: optional
|
|
49
|
+
required_statuses: [passed]
|
|
50
|
+
allow_skipped: true
|
|
51
|
+
recommended_skills: [fast-review-github-pr, fast-verify-review-point, fast-code-path]
|
|
52
|
+
- id: review-pr
|
|
53
|
+
workspace_mode: review_pr
|
|
54
|
+
expected_output: pr_review_comment
|
|
55
|
+
allowed_github_actions: [comment]
|
|
56
|
+
needs_worktree: true
|
|
57
|
+
worktree_mode: review_pr
|
|
58
|
+
verification_policy:
|
|
59
|
+
mode: optional
|
|
60
|
+
required_statuses: [passed]
|
|
61
|
+
allow_skipped: true
|
|
62
|
+
recommended_skills: [fast-review-github-pr, fast-code-path]
|
|
63
|
+
- id: classification-result
|
|
64
|
+
workspace_mode: none
|
|
65
|
+
expected_output: classification_result
|
|
66
|
+
allowed_github_actions: []
|
|
67
|
+
needs_worktree: false
|
|
68
|
+
verification_policy:
|
|
69
|
+
mode: none
|
|
70
|
+
required_statuses: []
|
|
71
|
+
allow_skipped: false
|
|
72
|
+
recommended_skills: []
|
|
73
|
+
- id: waiting-for-user
|
|
74
|
+
workspace_mode: none
|
|
75
|
+
expected_output: waiting_for_user
|
|
76
|
+
allowed_github_actions: [comment]
|
|
77
|
+
needs_worktree: false
|
|
78
|
+
verification_policy:
|
|
79
|
+
mode: none
|
|
80
|
+
required_statuses: []
|
|
81
|
+
allow_skipped: false
|
|
82
|
+
recommended_skills: []
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "Robert Config",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"$defs": {
|
|
6
|
+
"routeOverride": {
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"worker": {"type": "string", "minLength": 1},
|
|
10
|
+
"required_skills": {
|
|
11
|
+
"type": "array",
|
|
12
|
+
"items": {"type": "string", "minLength": 1}
|
|
13
|
+
},
|
|
14
|
+
"recommended_skills": {
|
|
15
|
+
"type": "array",
|
|
16
|
+
"items": {"type": "string", "minLength": 1}
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"additionalProperties": false
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"required": ["version", "github", "workers", "repos"],
|
|
23
|
+
"properties": {
|
|
24
|
+
"version": {"const": 1},
|
|
25
|
+
"data_dir": {"type": "string", "minLength": 1},
|
|
26
|
+
"database": {"type": "string", "minLength": 1},
|
|
27
|
+
"github": {
|
|
28
|
+
"type": "object",
|
|
29
|
+
"required": ["account"],
|
|
30
|
+
"properties": {
|
|
31
|
+
"account": {"type": "string", "minLength": 1},
|
|
32
|
+
"poll_seconds": {"type": "integer", "minimum": 1}
|
|
33
|
+
},
|
|
34
|
+
"additionalProperties": false
|
|
35
|
+
},
|
|
36
|
+
"skills": {
|
|
37
|
+
"type": "object",
|
|
38
|
+
"properties": {
|
|
39
|
+
"search_paths": {
|
|
40
|
+
"type": "array",
|
|
41
|
+
"items": {"type": "string"}
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"additionalProperties": false
|
|
45
|
+
},
|
|
46
|
+
"workers": {
|
|
47
|
+
"type": "object",
|
|
48
|
+
"minProperties": 1,
|
|
49
|
+
"additionalProperties": {
|
|
50
|
+
"type": "object",
|
|
51
|
+
"required": ["adapter", "command", "model", "effort"],
|
|
52
|
+
"properties": {
|
|
53
|
+
"adapter": {"type": "string", "minLength": 1},
|
|
54
|
+
"command": {
|
|
55
|
+
"oneOf": [
|
|
56
|
+
{"type": "string", "minLength": 1},
|
|
57
|
+
{
|
|
58
|
+
"type": "array",
|
|
59
|
+
"minItems": 1,
|
|
60
|
+
"items": {"type": "string", "minLength": 1}
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
"model": {"type": "string", "minLength": 1},
|
|
65
|
+
"effort": {"type": "string", "minLength": 1},
|
|
66
|
+
"prompt_transport": {
|
|
67
|
+
"type": "string",
|
|
68
|
+
"enum": ["stdin"]
|
|
69
|
+
},
|
|
70
|
+
"timeout_seconds": {
|
|
71
|
+
"type": "integer",
|
|
72
|
+
"minimum": 1
|
|
73
|
+
},
|
|
74
|
+
"environment_allowlist": {
|
|
75
|
+
"type": "array",
|
|
76
|
+
"items": {"type": "string", "minLength": 1}
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"additionalProperties": false
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"routes": {
|
|
83
|
+
"type": "object",
|
|
84
|
+
"additionalProperties": {
|
|
85
|
+
"$ref": "#/$defs/routeOverride"
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"repos": {
|
|
89
|
+
"type": "array",
|
|
90
|
+
"items": {
|
|
91
|
+
"type": "object",
|
|
92
|
+
"required": [
|
|
93
|
+
"full_name",
|
|
94
|
+
"checkout",
|
|
95
|
+
"worktrees",
|
|
96
|
+
"default_branch",
|
|
97
|
+
"trusted_actors"
|
|
98
|
+
],
|
|
99
|
+
"properties": {
|
|
100
|
+
"full_name": {"type": "string", "minLength": 1},
|
|
101
|
+
"github_account": {"type": "string", "minLength": 1},
|
|
102
|
+
"checkout": {"type": "string", "minLength": 1},
|
|
103
|
+
"worktrees": {"type": "string", "minLength": 1},
|
|
104
|
+
"default_branch": {"type": "string", "minLength": 1},
|
|
105
|
+
"trusted_actors": {
|
|
106
|
+
"type": "array",
|
|
107
|
+
"minItems": 1,
|
|
108
|
+
"items": {"type": "string", "minLength": 1}
|
|
109
|
+
},
|
|
110
|
+
"max_concurrency": {"type": "integer", "minimum": 1},
|
|
111
|
+
"routes": {
|
|
112
|
+
"type": "object",
|
|
113
|
+
"additionalProperties": {
|
|
114
|
+
"$ref": "#/$defs/routeOverride"
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"additionalProperties": false
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
"additionalProperties": true
|
|
123
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "Robert Event",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": ["repo", "source_key", "event_fingerprint", "event_type"],
|
|
6
|
+
"properties": {
|
|
7
|
+
"repo": {"type": "string"},
|
|
8
|
+
"source_key": {"type": "string"},
|
|
9
|
+
"source_type": {"type": "string"},
|
|
10
|
+
"workstream_id": {"type": "string"},
|
|
11
|
+
"origin_workstream_id": {"type": "string"},
|
|
12
|
+
"event_fingerprint": {"type": "string"},
|
|
13
|
+
"event_type": {"type": "string"},
|
|
14
|
+
"actor_login": {"type": "string"},
|
|
15
|
+
"author_association": {"type": "string"}
|
|
16
|
+
},
|
|
17
|
+
"additionalProperties": true
|
|
18
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "Robert Worker Result",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": ["task_id", "attempt_id", "output_type", "planned_github_actions", "consumed_event_fingerprints", "used_skills"],
|
|
6
|
+
"properties": {
|
|
7
|
+
"task_id": {"type": "string"},
|
|
8
|
+
"attempt_id": {"type": "string"},
|
|
9
|
+
"output_type": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"enum": ["comment_analysis", "new_pr", "update_existing_pr", "review_comment", "pr_review_comment", "classification_result", "waiting_for_user", "local_result"]
|
|
12
|
+
},
|
|
13
|
+
"planned_github_actions": {
|
|
14
|
+
"type": "array",
|
|
15
|
+
"items": {
|
|
16
|
+
"type": "object",
|
|
17
|
+
"required": ["type"],
|
|
18
|
+
"properties": {
|
|
19
|
+
"type": {"type": "string", "minLength": 1}
|
|
20
|
+
},
|
|
21
|
+
"additionalProperties": true
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"consumed_event_fingerprints": {"type": "array", "items": {"type": "string"}},
|
|
25
|
+
"consumed_work_item_event_ids": {"type": "array", "items": {"type": "string", "minLength": 1}},
|
|
26
|
+
"operator_question": {
|
|
27
|
+
"type": "object",
|
|
28
|
+
"required": ["kind", "summary"],
|
|
29
|
+
"properties": {
|
|
30
|
+
"kind": {"type": "string", "enum": ["clarification", "scope_decision", "completion_acceptance"]},
|
|
31
|
+
"summary": {"type": "string", "minLength": 1, "maxLength": 2000},
|
|
32
|
+
"choices": {
|
|
33
|
+
"type": "array",
|
|
34
|
+
"maxItems": 5,
|
|
35
|
+
"items": {
|
|
36
|
+
"type": "object",
|
|
37
|
+
"required": ["id", "label"],
|
|
38
|
+
"properties": {
|
|
39
|
+
"id": {"type": "string", "minLength": 1},
|
|
40
|
+
"label": {"type": "string", "minLength": 1}
|
|
41
|
+
},
|
|
42
|
+
"additionalProperties": false
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"additionalProperties": false
|
|
47
|
+
},
|
|
48
|
+
"used_skills": {
|
|
49
|
+
"type": "array",
|
|
50
|
+
"items": {"type": "string", "minLength": 1}
|
|
51
|
+
},
|
|
52
|
+
"verification": {
|
|
53
|
+
"type": "array",
|
|
54
|
+
"items": {
|
|
55
|
+
"type": "object",
|
|
56
|
+
"required": ["command", "status", "purpose", "required"],
|
|
57
|
+
"properties": {
|
|
58
|
+
"command": {
|
|
59
|
+
"oneOf": [
|
|
60
|
+
{"type": "string", "minLength": 1},
|
|
61
|
+
{
|
|
62
|
+
"type": "array",
|
|
63
|
+
"items": {"type": "string", "minLength": 1},
|
|
64
|
+
"minItems": 1
|
|
65
|
+
}
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
"status": {"type": "string", "enum": ["passed", "failed", "skipped"]},
|
|
69
|
+
"purpose": {"type": "string", "minLength": 1},
|
|
70
|
+
"exit_code": {"type": "integer"},
|
|
71
|
+
"required": {"type": "boolean"},
|
|
72
|
+
"skipped_reason": {"type": "string", "minLength": 1}
|
|
73
|
+
},
|
|
74
|
+
"additionalProperties": true
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"handoff": {"type": "string"},
|
|
78
|
+
"recommended_route": {
|
|
79
|
+
"type": "string",
|
|
80
|
+
"enum": ["", "local-result", "comment-analysis", "new-pr", "update-existing-pr", "review-comment", "review-pr", "waiting-for-user"]
|
|
81
|
+
},
|
|
82
|
+
"branch_slug": {
|
|
83
|
+
"type": "string",
|
|
84
|
+
"maxLength": 60,
|
|
85
|
+
"pattern": "^$|^[a-z0-9]+(?:-[a-z0-9]+)*$"
|
|
86
|
+
},
|
|
87
|
+
"memory_delta": {
|
|
88
|
+
"type": "object",
|
|
89
|
+
"properties": {
|
|
90
|
+
"status": {"type": "string"},
|
|
91
|
+
"entries": {"type": "array", "items": {"type": "object"}},
|
|
92
|
+
"reason": {"type": "string"}
|
|
93
|
+
},
|
|
94
|
+
"additionalProperties": true
|
|
95
|
+
},
|
|
96
|
+
"used_memory_ids": {"type": "array", "items": {"type": "string", "minLength": 1}}
|
|
97
|
+
},
|
|
98
|
+
"additionalProperties": true
|
|
99
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "Robert Route",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": ["id", "expected_output", "allowed_github_actions", "recommended_skills"],
|
|
6
|
+
"properties": {
|
|
7
|
+
"id": {"type": "string"},
|
|
8
|
+
"expected_output": {
|
|
9
|
+
"enum": [
|
|
10
|
+
"comment_analysis",
|
|
11
|
+
"new_pr",
|
|
12
|
+
"update_existing_pr",
|
|
13
|
+
"review_comment",
|
|
14
|
+
"pr_review_comment",
|
|
15
|
+
"classification_result",
|
|
16
|
+
"waiting_for_user"
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
"allowed_github_actions": {"type": "array", "items": {"type": "string"}},
|
|
20
|
+
"recommended_skills": {"type": "array", "items": {"type": "string"}}
|
|
21
|
+
},
|
|
22
|
+
"additionalProperties": true
|
|
23
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "Robert worker Snapshot",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": ["task_id", "attempt_id", "phase", "status", "summary"],
|
|
6
|
+
"properties": {
|
|
7
|
+
"task_id": {"type": "string"},
|
|
8
|
+
"attempt_id": {"type": "string"},
|
|
9
|
+
"phase": {
|
|
10
|
+
"enum": ["prepare", "analyze", "plan", "execute", "verify", "publish", "handoff"]
|
|
11
|
+
},
|
|
12
|
+
"status": {"type": "string"},
|
|
13
|
+
"summary": {"type": "string"},
|
|
14
|
+
"next_step": {"type": "string"}
|
|
15
|
+
},
|
|
16
|
+
"additionalProperties": true
|
|
17
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "Robert Task",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": ["task_id", "workstream_id", "lifecycle"],
|
|
6
|
+
"properties": {
|
|
7
|
+
"task_id": {"type": "string"},
|
|
8
|
+
"workstream_id": {"type": "string"},
|
|
9
|
+
"parent_task_id": {"type": "string"},
|
|
10
|
+
"lifecycle": {"type": "string"},
|
|
11
|
+
"priority": {"type": "string"},
|
|
12
|
+
"event_fingerprints": {"type": "array", "items": {"type": "string"}}
|
|
13
|
+
},
|
|
14
|
+
"additionalProperties": true
|
|
15
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Trust Model
|
|
2
|
+
|
|
3
|
+
Only configured trusted actors can start new tasks. The first repo configuration enables `wklken` as the trusted actor for `example/backend`.
|
|
4
|
+
|
|
5
|
+
Once a workstream is known, including an inactive completed workstream, follow-up input can come from:
|
|
6
|
+
|
|
7
|
+
- trusted actors
|
|
8
|
+
- `OWNER`
|
|
9
|
+
- `MEMBER`
|
|
10
|
+
- `COLLABORATOR`
|
|
11
|
+
|
|
12
|
+
If `author_association` is absent or unknown, the agent may query repository collaborator permission. If permission cannot be confirmed, record `pending_actor_permission` and do not let that event drive execution.
|
|
13
|
+
|
|
14
|
+
Accepted context on a known inactive workstream is recorded for evidence. It can reopen that workstream only when a trusted actor replies, except that a DD-derived PR follow-up with origin metadata can create an update task for that PR. Active workstreams continue to receive follow-up as pending context for the active task.
|
|
15
|
+
|
|
16
|
+
Waiting tasks resume only when a trusted actor replies. Collaborator replies can add context but cannot approve scope changes, implementation, cancellation, or route selection.
|