@a5c-ai/krate 5.0.1-staging.f672fe79b
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.
- package/Dockerfile +29 -0
- package/README.md +183 -0
- package/bin/krate-demo.mjs +23 -0
- package/bin/krate-server.mjs +14 -0
- package/dist/krate-controller-ui.json +2407 -0
- package/dist/krate-lifecycle.json +201 -0
- package/dist/krate-runtime-snapshot.json +2955 -0
- package/dist/krate-summary.json +687 -0
- package/docs/README.md +61 -0
- package/docs/agents/README.md +83 -0
- package/docs/agents/acceptance-test-matrix.md +193 -0
- package/docs/agents/agent-mux-adapter-contract.md +167 -0
- package/docs/agents/agent-mux-source-map.md +310 -0
- package/docs/agents/agent-run-memory-import-spec.md +256 -0
- package/docs/agents/agent-stack-management-spec.md +421 -0
- package/docs/agents/api-contract-spec.md +309 -0
- package/docs/agents/artifacts-writeback-spec.md +145 -0
- package/docs/agents/chart-packaging-spec.md +128 -0
- package/docs/agents/ci-orchestration-spec.md +140 -0
- package/docs/agents/context-assembly-spec.md +219 -0
- package/docs/agents/controller-reconciliation-spec.md +255 -0
- package/docs/agents/crd-schema-spec.md +315 -0
- package/docs/agents/decision-log-open-questions.md +169 -0
- package/docs/agents/developer-implementation-checklist.md +329 -0
- package/docs/agents/dispatching-design.md +262 -0
- package/docs/agents/glossary.md +66 -0
- package/docs/agents/implementation-blueprint.md +324 -0
- package/docs/agents/implementation-rollout-slices.md +251 -0
- package/docs/agents/memory-context-integration-spec.md +194 -0
- package/docs/agents/memory-ontology-schema-spec.md +253 -0
- package/docs/agents/memory-operations-runbook.md +121 -0
- package/docs/agents/mvp-vertical-slice-spec.md +146 -0
- package/docs/agents/observability-audit-spec.md +265 -0
- package/docs/agents/operator-runbook.md +174 -0
- package/docs/agents/org-memory-api-payload-examples.md +333 -0
- package/docs/agents/org-memory-controller-sequence-spec.md +181 -0
- package/docs/agents/org-memory-e2e-fixture-plan.md +161 -0
- package/docs/agents/org-memory-ui-implementation-map.md +114 -0
- package/docs/agents/org-memory-vertical-slice-spec.md +168 -0
- package/docs/agents/org-resource-model-delta-spec.md +111 -0
- package/docs/agents/org-route-resource-model-spec.md +183 -0
- package/docs/agents/org-scoping-namespace-spec.md +114 -0
- package/docs/agents/rbac-secrets-management-spec.md +406 -0
- package/docs/agents/repository-page-integration-spec.md +255 -0
- package/docs/agents/resource-contract-examples.md +808 -0
- package/docs/agents/resource-relationship-map.md +190 -0
- package/docs/agents/security-threat-model.md +188 -0
- package/docs/agents/shared-memory-company-brain-spec.md +358 -0
- package/docs/agents/storage-migration-spec.md +168 -0
- package/docs/agents/subagent-orchestration-spec.md +152 -0
- package/docs/agents/system-overview.md +88 -0
- package/docs/agents/tools-mcp-skills-spec.md +189 -0
- package/docs/agents/traceability-matrix.md +79 -0
- package/docs/agents/ui-flow-spec.md +211 -0
- package/docs/agents/ui-ux-system-spec.md +426 -0
- package/docs/agents/workspace-lifecycle-spec.md +166 -0
- package/docs/architecture-spec.md +78 -0
- package/docs/components/control-plane.md +78 -0
- package/docs/components/data-plane.md +69 -0
- package/docs/components/hooks-events.md +67 -0
- package/docs/components/identity-rbac-policy.md +73 -0
- package/docs/components/kubevela-oam.md +70 -0
- package/docs/components/operations-publishing.md +81 -0
- package/docs/components/runners-ci.md +66 -0
- package/docs/components/web-ui.md +94 -0
- package/docs/external/README.md +47 -0
- package/docs/external/bidirectional-sync-design.md +134 -0
- package/docs/external/cicd-interface.md +64 -0
- package/docs/external/external-backend-controllers.md +170 -0
- package/docs/external/external-backend-crds.md +234 -0
- package/docs/external/external-backend-ui-spec.md +151 -0
- package/docs/external/external-backend-ux-flows.md +115 -0
- package/docs/external/external-object-mapping.md +125 -0
- package/docs/external/git-forge-interface.md +68 -0
- package/docs/external/github-integration-design.md +151 -0
- package/docs/external/issue-tracking-interface.md +66 -0
- package/docs/external/provider-capability-manifests.md +204 -0
- package/docs/external/provider-catalog.md +139 -0
- package/docs/external/provider-rollout-testing.md +78 -0
- package/docs/external/research-results.md +48 -0
- package/docs/external/security-auth-permissions.md +81 -0
- package/docs/external/sync-state-machines.md +108 -0
- package/docs/external/unified-external-backend-model.md +107 -0
- package/docs/external/user-facing-changes.md +67 -0
- package/docs/gaps.md +161 -0
- package/docs/install.md +94 -0
- package/docs/krate-design.md +334 -0
- package/docs/local-minikube.md +55 -0
- package/docs/ontology/README.md +32 -0
- package/docs/ontology/bounded-contexts.md +29 -0
- package/docs/ontology/events-and-hooks.md +32 -0
- package/docs/ontology/oam-kubevela.md +32 -0
- package/docs/ontology/operations-and-release.md +25 -0
- package/docs/ontology/personas-and-actors.md +32 -0
- package/docs/ontology/policies-and-invariants.md +33 -0
- package/docs/ontology/problem-space.md +30 -0
- package/docs/ontology/resource-contracts.md +40 -0
- package/docs/ontology/resource-taxonomy.md +42 -0
- package/docs/ontology/runners-and-ci.md +29 -0
- package/docs/ontology/solution-space.md +24 -0
- package/docs/ontology/storage-and-data-boundaries.md +29 -0
- package/docs/ontology/validation-matrix.md +24 -0
- package/docs/ontology/web-ui-excellent-flows.md +32 -0
- package/docs/ontology/workflows.md +39 -0
- package/docs/ontology/world.md +35 -0
- package/docs/product-requirements.md +62 -0
- package/docs/roadmap-mvp.md +87 -0
- package/docs/system-requirements.md +90 -0
- package/docs/tests/README.md +53 -0
- package/docs/tests/agent-qa-plan.md +63 -0
- package/docs/tests/browser-ui-tests.md +62 -0
- package/docs/tests/ci-quality-gates.md +48 -0
- package/docs/tests/coverage-model.md +64 -0
- package/docs/tests/e2e-scenario-tests.md +53 -0
- package/docs/tests/fixtures-test-data.md +63 -0
- package/docs/tests/observability-reliability-tests.md +54 -0
- package/docs/tests/product-test-matrix.md +145 -0
- package/docs/tests/qa-adoption-roadmap.md +130 -0
- package/docs/tests/qa-automation-plan.md +101 -0
- package/docs/tests/security-compliance-tests.md +57 -0
- package/docs/tests/test-framework-tools.md +88 -0
- package/docs/tests/test-suite-layout.md +121 -0
- package/docs/tests/unit-integration-tests.md +48 -0
- package/docs/todo-kyverno +714 -0
- package/docs/user-stories.md +78 -0
- package/examples/minikube-demo.yaml +190 -0
- package/examples/oam-application.yaml +23 -0
- package/examples/policy-kyverno-pr-title.yaml +18 -0
- package/package.json +63 -0
- package/scripts/build.mjs +29 -0
- package/scripts/setup-minikube.mjs +65 -0
- package/scripts/smoke.mjs +37 -0
- package/scripts/validate-doc-coverage.mjs +152 -0
- package/scripts/validate-package.mjs +93 -0
- package/scripts/validate-ui.mjs +207 -0
- package/src/agent-approval-controller.js +123 -0
- package/src/agent-context-bundles.js +242 -0
- package/src/agent-dispatch-controller.js +86 -0
- package/src/agent-mux-client.js +280 -0
- package/src/agent-permission-review.js +162 -0
- package/src/agent-stack-controller.js +296 -0
- package/src/agent-trigger-controller.js +108 -0
- package/src/api-controller.js +206 -0
- package/src/argocd-gitops.js +43 -0
- package/src/auth.js +265 -0
- package/src/component-catalog.js +41 -0
- package/src/control-plane.js +136 -0
- package/src/controller-client.js +38 -0
- package/src/controller-ui.js +538 -0
- package/src/data-plane.js +178 -0
- package/src/gitea-backend.js +95 -0
- package/src/handoff.js +98 -0
- package/src/hooks-events.js +63 -0
- package/src/http-server.js +151 -0
- package/src/identity-policy.js +86 -0
- package/src/index.js +30 -0
- package/src/kubernetes-controller.js +812 -0
- package/src/kubernetes-resource-gateway.js +48 -0
- package/src/operations.js +112 -0
- package/src/resource-model.js +203 -0
- package/src/runners-ci.js +48 -0
- package/src/runtime.js +196 -0
- package/src/web-ui.js +40 -0
- package/tests/agent-approval-controller.test.js +173 -0
- package/tests/agent-context-bundles.test.js +278 -0
- package/tests/agent-dispatch-controller.test.js +176 -0
- package/tests/agent-mux-client.test.js +204 -0
- package/tests/agent-permission-review.test.js +209 -0
- package/tests/agent-resources.test.js +212 -0
- package/tests/agent-stack-controller.test.js +221 -0
- package/tests/agent-trigger-controller.test.js +211 -0
- package/tests/deployment.test.js +395 -0
- package/tests/e2e/lifecycle.test.js +117 -0
- package/tests/krate.test.js +727 -0
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
# Agent repository page integration spec
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Agent orchestration should feel native to Krate's GitHub-like repository experience. This document maps agent capabilities into the current repository routes and `ui-shell.jsx` page patterns.
|
|
6
|
+
|
|
7
|
+
Current routes:
|
|
8
|
+
|
|
9
|
+
- `/orgs/[org]/repositories/[repo]/code`
|
|
10
|
+
- `/orgs/[org]/repositories/[repo]/issues`
|
|
11
|
+
- `/orgs/[org]/repositories/[repo]/pull-requests`
|
|
12
|
+
- `/orgs/[org]/repositories/[repo]/runs`
|
|
13
|
+
- `/orgs/[org]/repositories/[repo]/hooks`
|
|
14
|
+
- `/orgs/[org]/repositories/[repo]/settings`
|
|
15
|
+
|
|
16
|
+
Future agent-specific repository settings should extend this hierarchy, not replace it.
|
|
17
|
+
|
|
18
|
+
## Shared repository affordances
|
|
19
|
+
|
|
20
|
+
Every repository page should be able to show:
|
|
21
|
+
|
|
22
|
+
- active agent runs for the repository;
|
|
23
|
+
- pending approvals related to the repository;
|
|
24
|
+
- missing permission warnings for enabled stacks;
|
|
25
|
+
- linked workspaces/sessions;
|
|
26
|
+
- dispatch composer entry point when policy allows;
|
|
27
|
+
- watch stream link for relevant resource type;
|
|
28
|
+
- breadcrumbs back to repository and source object.
|
|
29
|
+
|
|
30
|
+
These should be added to the controller UI model as repository-scoped agent affordances so server components do not invent local state.
|
|
31
|
+
|
|
32
|
+
## Code page
|
|
33
|
+
|
|
34
|
+
Route: `/orgs/[org]/repositories/[repo]/code`
|
|
35
|
+
|
|
36
|
+
Current role:
|
|
37
|
+
|
|
38
|
+
- browse files;
|
|
39
|
+
- choose branch/path;
|
|
40
|
+
- copy clone/open code commands;
|
|
41
|
+
- inspect repository plan.
|
|
42
|
+
|
|
43
|
+
Agent additions:
|
|
44
|
+
|
|
45
|
+
- `Dispatch agent` button scoped to selected path/ref;
|
|
46
|
+
- stack selector filtered by repository permission;
|
|
47
|
+
- context preview with selected files and `AGENTS.md`/instructions;
|
|
48
|
+
- active workspace chip for the same branch/path;
|
|
49
|
+
- active session chip for same workspace;
|
|
50
|
+
- missing permission warning if selected stack cannot read required Secret/ConfigMap/Role;
|
|
51
|
+
- create workspace action when dispatch needs isolated worktree.
|
|
52
|
+
|
|
53
|
+
Writes:
|
|
54
|
+
|
|
55
|
+
- `AgentContextBundle` preview;
|
|
56
|
+
- `AgentDispatchRun` on confirm;
|
|
57
|
+
- optional `AgentWorkspace`/`WorkItemWorkspaceLink`.
|
|
58
|
+
|
|
59
|
+
## Issues page
|
|
60
|
+
|
|
61
|
+
Route: `/orgs/[org]/repositories/[repo]/issues`
|
|
62
|
+
|
|
63
|
+
Current role:
|
|
64
|
+
|
|
65
|
+
- issue/work item lifecycle and triage surface.
|
|
66
|
+
|
|
67
|
+
Agent additions:
|
|
68
|
+
|
|
69
|
+
- issue board/list cards show dispatch readiness;
|
|
70
|
+
- context label chips per issue;
|
|
71
|
+
- linked session/workspace/run list;
|
|
72
|
+
- create/link workspace from issue;
|
|
73
|
+
- dispatch from issue with prompt template;
|
|
74
|
+
- child issue/subtask association for subagents;
|
|
75
|
+
- review artifacts or patch suggestions linked back to issue.
|
|
76
|
+
|
|
77
|
+
Writes:
|
|
78
|
+
|
|
79
|
+
- `AgentContextLabel` refs;
|
|
80
|
+
- `WorkItemSessionLink`;
|
|
81
|
+
- `WorkItemWorkspaceLink`;
|
|
82
|
+
- `AgentDispatchRun`;
|
|
83
|
+
- `AgentArtifact` links.
|
|
84
|
+
|
|
85
|
+
## Pull requests page
|
|
86
|
+
|
|
87
|
+
Route: `/orgs/[org]/repositories/[repo]/pull-requests`
|
|
88
|
+
|
|
89
|
+
Current role:
|
|
90
|
+
|
|
91
|
+
- review pull requests, checks, and merge readiness.
|
|
92
|
+
|
|
93
|
+
Agent additions:
|
|
94
|
+
|
|
95
|
+
- diagnose failed checks;
|
|
96
|
+
- attempt repair;
|
|
97
|
+
- review diff with agent;
|
|
98
|
+
- summarize discussion;
|
|
99
|
+
- produce patch/review artifacts;
|
|
100
|
+
- request write-back approval for comments, branch pushes, review submissions, check reruns;
|
|
101
|
+
- show agent run rows linked to PR and checks.
|
|
102
|
+
|
|
103
|
+
Writes:
|
|
104
|
+
|
|
105
|
+
- `AgentDispatchRun` from PR/check context;
|
|
106
|
+
- `AgentReviewArtifact`;
|
|
107
|
+
- `AgentApproval`;
|
|
108
|
+
- write-back action after approval.
|
|
109
|
+
|
|
110
|
+
## Runs page
|
|
111
|
+
|
|
112
|
+
Route: `/orgs/[org]/repositories/[repo]/runs`
|
|
113
|
+
|
|
114
|
+
Current role:
|
|
115
|
+
|
|
116
|
+
- list/follow runs and jobs;
|
|
117
|
+
- debug failures;
|
|
118
|
+
- watch pipeline resources.
|
|
119
|
+
|
|
120
|
+
Agent additions:
|
|
121
|
+
|
|
122
|
+
- show `AgentDispatchRun` rows beside `Pipeline` and `Job` rows;
|
|
123
|
+
- `Diagnose with agent` from failed job;
|
|
124
|
+
- `Repair with agent` when policy allows;
|
|
125
|
+
- show source pipeline/job link in run row;
|
|
126
|
+
- show dedupe/coalesced runs;
|
|
127
|
+
- show agent run status in CI-like phases.
|
|
128
|
+
|
|
129
|
+
Run row fields:
|
|
130
|
+
|
|
131
|
+
- status;
|
|
132
|
+
- task kind;
|
|
133
|
+
- stack;
|
|
134
|
+
- source job/check;
|
|
135
|
+
- branch/SHA;
|
|
136
|
+
- runner pool;
|
|
137
|
+
- ServiceAccount;
|
|
138
|
+
- duration;
|
|
139
|
+
- approvals;
|
|
140
|
+
- artifacts;
|
|
141
|
+
- linked session.
|
|
142
|
+
|
|
143
|
+
## Hooks page
|
|
144
|
+
|
|
145
|
+
Route: `/orgs/[org]/repositories/[repo]/hooks`
|
|
146
|
+
|
|
147
|
+
Current role:
|
|
148
|
+
|
|
149
|
+
- inspect webhook subscriptions and deliveries.
|
|
150
|
+
|
|
151
|
+
Agent additions:
|
|
152
|
+
|
|
153
|
+
- trigger rule matches for each delivery;
|
|
154
|
+
- dry-run delivery against selected rule;
|
|
155
|
+
- replay delivery;
|
|
156
|
+
- show rejected/coalesced/created dispatch decision;
|
|
157
|
+
- link to resulting `AgentTriggerExecution` and `AgentDispatchRun`.
|
|
158
|
+
|
|
159
|
+
Writes:
|
|
160
|
+
|
|
161
|
+
- `AgentTriggerExecution` on replay/dry-run;
|
|
162
|
+
- `AgentDispatchRun` when admitted;
|
|
163
|
+
- rule lifecycle changes from settings.
|
|
164
|
+
|
|
165
|
+
## Settings page
|
|
166
|
+
|
|
167
|
+
Route: `/orgs/[org]/repositories/[repo]/settings`
|
|
168
|
+
|
|
169
|
+
Future sub-route: `/orgs/[org]/repositories/[repo]/settings/agents`
|
|
170
|
+
|
|
171
|
+
Agent settings sections:
|
|
172
|
+
|
|
173
|
+
- enabled stacks;
|
|
174
|
+
- stack permissions;
|
|
175
|
+
- trigger rules;
|
|
176
|
+
- runner pools;
|
|
177
|
+
- runtime ServiceAccounts;
|
|
178
|
+
- runner ServiceAccounts;
|
|
179
|
+
- role bindings;
|
|
180
|
+
- Secret grants;
|
|
181
|
+
- ConfigMap grants;
|
|
182
|
+
- write-back policies;
|
|
183
|
+
- dry-run permission review;
|
|
184
|
+
- generated YAML preview.
|
|
185
|
+
|
|
186
|
+
This page should use progressive disclosure: safe forms first, YAML/advanced plans in expandable panels, matching current `PlanCard` conventions.
|
|
187
|
+
|
|
188
|
+
## Inbox integration
|
|
189
|
+
|
|
190
|
+
Global route: `/inbox`
|
|
191
|
+
|
|
192
|
+
Agent additions:
|
|
193
|
+
|
|
194
|
+
- pending `AgentApproval` items;
|
|
195
|
+
- failed dispatches requiring action;
|
|
196
|
+
- missing permission warnings assigned to current user/team;
|
|
197
|
+
- workspace rebase conflicts;
|
|
198
|
+
- review artifacts awaiting decision.
|
|
199
|
+
|
|
200
|
+
## Controller UI model additions
|
|
201
|
+
|
|
202
|
+
Suggested shape:
|
|
203
|
+
|
|
204
|
+
```json
|
|
205
|
+
{
|
|
206
|
+
"views": {
|
|
207
|
+
"agents": {
|
|
208
|
+
"repositories": {
|
|
209
|
+
"krate": {
|
|
210
|
+
"activeRuns": [],
|
|
211
|
+
"pendingApprovals": [],
|
|
212
|
+
"missingPermissions": [],
|
|
213
|
+
"enabledStacks": [],
|
|
214
|
+
"dispatchActions": []
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
Repository pages can consume this alongside existing `repositories`, `pullRequests`, `issues`, `pipelines`, `runnerPools`, and `webhooks` arrays.
|
|
223
|
+
|
|
224
|
+
## Empty states
|
|
225
|
+
|
|
226
|
+
When no agent stack exists:
|
|
227
|
+
|
|
228
|
+
- Code page: `Create an agent stack to dispatch from this repository.`
|
|
229
|
+
- PR page: `Create a reviewer or CI repair stack to diagnose pull requests.`
|
|
230
|
+
- Runs page: `Create a CI diagnosis stack to attach agents to failed jobs.`
|
|
231
|
+
- Settings page: show stack creation path and YAML preview.
|
|
232
|
+
|
|
233
|
+
When permissions are missing:
|
|
234
|
+
|
|
235
|
+
- Show exact missing ServiceAccount/Role/Secret/ConfigMap grant.
|
|
236
|
+
- Link to `/orgs/[org]/repositories/[repo]/settings/agents` or global permissions page.
|
|
237
|
+
- Do not show a generic disabled button without explanation.
|
|
238
|
+
|
|
239
|
+
## Acceptance criteria
|
|
240
|
+
|
|
241
|
+
- Agent entry points appear in existing repository hierarchy, not only global `/agents` pages.
|
|
242
|
+
- Repository pages consume server-projected agent affordances.
|
|
243
|
+
- Dispatch rows in pipelines feel like CI runs while linking to Agent Mux chat.
|
|
244
|
+
- Denied actions explain policy/RBAC/Secret/ConfigMap blockers.
|
|
245
|
+
- Settings page lets users manage repository-scoped stacks, triggers, ServiceAccounts, grants, and runner policy without hand-writing YAML for common paths.
|
|
246
|
+
|
|
247
|
+
## Repository memory integration
|
|
248
|
+
|
|
249
|
+
Repository pages should surface company brain associations without forcing users to leave repository context.
|
|
250
|
+
|
|
251
|
+
- Code page: show applicable runbooks, decisions, services, and agent practices for the selected path/ref; dispatch composer can include them in memory context.
|
|
252
|
+
- Issues/PRs: show related incidents, decisions, previous agent practices, and proposed memory updates linked to the work item.
|
|
253
|
+
- Pipelines: show CI runbooks and previous remediation memories for failed jobs.
|
|
254
|
+
- Settings/Agents: configure `AgentMemorySource` path/kind scopes, default query mode, and required approvals.
|
|
255
|
+
- Run detail: show memory snapshot, selected records/excerpts, stale warning, diff against current, and propose-update action.
|