@a5c-ai/kradle 5.0.1-staging.3abdf9534c25
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 +31 -0
- package/README.md +187 -0
- package/bin/kradle-demo.mjs +23 -0
- package/bin/kradle-server.mjs +14 -0
- package/dist/kradle-controller-ui.json +3482 -0
- package/dist/kradle-lifecycle.json +201 -0
- package/dist/kradle-runtime-snapshot.json +3125 -0
- package/dist/kradle-summary.json +724 -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/gaps-agent-mux-to-kradle-crds.md +298 -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/architecture-v2.md +2759 -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/crd-behaviors-and-relationships.md +3926 -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/integration-and-design-decisions.md +1530 -0
- package/docs/kradle-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/openapi.yaml +1291 -0
- package/docs/product-requirements.md +62 -0
- package/docs/requirements-v2.md +235 -0
- package/docs/roadmap-mvp.md +87 -0
- package/docs/sdk-api-reference.md +1108 -0
- package/docs/system-requirements.md +90 -0
- package/docs/system-spec-v2.md +1230 -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/todos.md +4 -0
- package/docs/user-stories.md +78 -0
- package/docs/web-console-spec.md +533 -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 +66 -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 +95 -0
- package/scripts/validate-ui.mjs +305 -0
- package/src/agent-adapter-controller.js +169 -0
- package/src/agent-approval-controller.js +170 -0
- package/src/agent-context-bundles.js +242 -0
- package/src/agent-dispatch-controller.js +549 -0
- package/src/agent-gateway-config-controller.js +147 -0
- package/src/agent-identity-migration.js +115 -0
- package/src/agent-memory-controller.js +357 -0
- package/src/agent-memory-import.js +327 -0
- package/src/agent-memory-query.js +292 -0
- package/src/agent-memory-repository-source-controller.js +255 -0
- package/src/agent-mux-client.js +589 -0
- package/src/agent-permission-review.js +250 -0
- package/src/agent-persona-controller.js +135 -0
- package/src/agent-project-controller.js +117 -0
- package/src/agent-prompt-composition.js +55 -0
- package/src/agent-provider-config-controller.js +151 -0
- package/src/agent-secret-config-grant-controller.js +282 -0
- package/src/agent-session-transcript-controller.js +189 -0
- package/src/agent-stack-controller.js +421 -0
- package/src/agent-subagent-controller.js +160 -0
- package/src/agent-transport-binding-controller.js +121 -0
- package/src/agent-trigger-controller.js +387 -0
- package/src/agent-workspace-controller.js +702 -0
- package/src/agent-writeback-controller.js +302 -0
- package/src/api-controller.js +621 -0
- package/src/argocd-gitops.js +43 -0
- package/src/artifact-registry-controller.js +542 -0
- package/src/assistant-runtime.js +284 -0
- package/src/async-controller.js +207 -0
- package/src/audit-controller.js +191 -0
- package/src/auth.js +310 -0
- package/src/component-catalog.js +41 -0
- package/src/control-plane.js +136 -0
- package/src/controller-client.js +112 -0
- package/src/controller-ui.js +620 -0
- package/src/data-plane.js +179 -0
- package/src/event-bus.js +397 -0
- package/src/external/conflict-controller.js +225 -0
- package/src/external/github/auth.js +96 -0
- package/src/external/github/cicd.js +180 -0
- package/src/external/github/git-forge.js +240 -0
- package/src/external/github/index.js +144 -0
- package/src/external/github/issue-tracking.js +163 -0
- package/src/external/provider-adapter.js +161 -0
- package/src/external/provider-resource-factory.js +221 -0
- package/src/external/sync-controller.js +235 -0
- package/src/external/webhook-controller.js +144 -0
- package/src/external/write-controller.js +283 -0
- package/src/gitea-backend.js +131 -0
- package/src/gitea-service.js +173 -0
- package/src/handoff.js +98 -0
- package/src/health-probes.js +134 -0
- package/src/hooks-events.js +63 -0
- package/src/hooks-lifecycle.js +117 -0
- package/src/http-server.js +409 -0
- package/src/identity-policy.js +86 -0
- package/src/index.js +71 -0
- package/src/jitsi-agent-bridge.js +141 -0
- package/src/jitsi-meeting-controller.js +291 -0
- package/src/jitsi-sync-controller.js +198 -0
- package/src/kradle-inference-service-controller.js +246 -0
- package/src/kubernetes-controller-async.js +531 -0
- package/src/kubernetes-controller.js +904 -0
- package/src/kubernetes-resource-gateway.js +48 -0
- package/src/model-route-controller.js +364 -0
- package/src/notification-controller.js +178 -0
- package/src/operations.js +112 -0
- package/src/org-scoping.js +5 -0
- package/src/resource-model.js +282 -0
- package/src/runner-controller.js +272 -0
- package/src/runners-ci.js +48 -0
- package/src/runtime.js +196 -0
- package/src/snapshot-cache.js +157 -0
- package/src/virtual-model-controller.js +538 -0
- package/src/virtual-model-hook-bridge.js +200 -0
- package/src/web-ui.js +40 -0
- package/tests/agent-adapter-controller.test.js +361 -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 +679 -0
- package/tests/agent-gateway-config-controller.test.js +386 -0
- package/tests/agent-identity-migration.test.js +87 -0
- package/tests/agent-memory-controller.test.js +461 -0
- package/tests/agent-memory-import-snapshot.test.js +477 -0
- package/tests/agent-memory-query.test.js +404 -0
- package/tests/agent-memory-repository-source.test.js +514 -0
- package/tests/agent-mux-client.test.js +389 -0
- package/tests/agent-mux-integration.test.js +971 -0
- package/tests/agent-permission-review-v2.test.js +317 -0
- package/tests/agent-permission-review.test.js +209 -0
- package/tests/agent-persona-controller.test.js +127 -0
- package/tests/agent-project-controller.test.js +302 -0
- package/tests/agent-prompt-composition.test.js +76 -0
- package/tests/agent-provider-config-controller.test.js +376 -0
- package/tests/agent-resources.test.js +303 -0
- package/tests/agent-secret-config-grant.test.js +231 -0
- package/tests/agent-session-transcript-controller.test.js +499 -0
- package/tests/agent-stack-controller.test.js +283 -0
- package/tests/agent-subagent-controller.test.js +201 -0
- package/tests/agent-transport-binding-controller.test.js +294 -0
- package/tests/agent-trigger-controller.test.js +271 -0
- package/tests/agent-trigger-routes.test.js +190 -0
- package/tests/agent-trigger-sources.test.js +245 -0
- package/tests/agent-workspace-controller.test.js +181 -0
- package/tests/agent-writeback.test.js +292 -0
- package/tests/approval-persistence.test.js +171 -0
- package/tests/artifact-registry.test.js +511 -0
- package/tests/assistant-runtime.test.js +506 -0
- package/tests/async-controller.test.js +252 -0
- package/tests/audit-controller.test.js +227 -0
- package/tests/codespace-controller.test.js +318 -0
- package/tests/controller-client.test.js +133 -0
- package/tests/deployment.test.js +527 -0
- package/tests/e2e/lifecycle.test.js +120 -0
- package/tests/event-bus-integration.test.js +355 -0
- package/tests/external-github-forge.test.js +560 -0
- package/tests/external-github-issues-cicd.test.js +520 -0
- package/tests/external-integration.test.js +470 -0
- package/tests/external-persistence.test.js +415 -0
- package/tests/external-provider-adapter.test.js +365 -0
- package/tests/external-resource-model.test.js +223 -0
- package/tests/external-webhook-sync.test.js +287 -0
- package/tests/external-write-conflict.test.js +353 -0
- package/tests/gitea-service.test.js +253 -0
- package/tests/health-check-real.test.js +165 -0
- package/tests/health-probes.test.js +90 -0
- package/tests/hooks-lifecycle.test.js +364 -0
- package/tests/integration/full-flow.test.js +266 -0
- package/tests/jitsi-agent-bridge.test.js +119 -0
- package/tests/jitsi-helm-integration.test.js +77 -0
- package/tests/jitsi-meeting-controller.test.js +170 -0
- package/tests/jitsi-resource-model.test.js +73 -0
- package/tests/jitsi-sync-controller.test.js +112 -0
- package/tests/kradle-inference-service.test.js +689 -0
- package/tests/kradle.test.js +779 -0
- package/tests/memory-search-wiring.test.js +270 -0
- package/tests/model-route-controller.test.js +733 -0
- package/tests/notification-controller.test.js +196 -0
- package/tests/notification-integration.test.js +179 -0
- package/tests/org-scoping.test.js +687 -0
- package/tests/runner-controller.test.js +327 -0
- package/tests/runner-integration.test.js +231 -0
- package/tests/session-cookie-hmac.test.js +151 -0
- package/tests/snapshot-performance.test.js +315 -0
- package/tests/sse-events.test.js +107 -0
- package/tests/virtual-model-controller.test.js +877 -0
- package/tests/virtual-model-hook-bridge.test.js +384 -0
- package/tests/webhook-trigger.test.js +198 -0
- package/tests/workspace-volumes.test.js +312 -0
- package/tests/writeback-persistence.test.js +207 -0
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
# Provider capability manifests
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Provider manifests make external backend support data-driven. Each adapter declares supported interfaces, operations, auth modes, webhook events, rate-limit model, object identity fields, and unsupported features. Kradle uses the manifest to render UI, validate CRDs, run contract tests, and disable unsupported actions.
|
|
6
|
+
|
|
7
|
+
## Manifest schema
|
|
8
|
+
|
|
9
|
+
```yaml
|
|
10
|
+
apiVersion: kradle.a5c.ai/v1alpha1
|
|
11
|
+
kind: ExternalProviderCapabilityManifest
|
|
12
|
+
metadata:
|
|
13
|
+
name: github-v1
|
|
14
|
+
spec:
|
|
15
|
+
providerType: github
|
|
16
|
+
displayName: GitHub
|
|
17
|
+
hosting:
|
|
18
|
+
- saas
|
|
19
|
+
- github-enterprise-server
|
|
20
|
+
authModes:
|
|
21
|
+
- github-app
|
|
22
|
+
- oauth-user
|
|
23
|
+
api:
|
|
24
|
+
rest: true
|
|
25
|
+
graphql: true
|
|
26
|
+
webhook: true
|
|
27
|
+
identity:
|
|
28
|
+
nativeIdFields: [id, number]
|
|
29
|
+
globalIdField: node_id
|
|
30
|
+
urlField: html_url
|
|
31
|
+
versionFields: [etag, updated_at, head_sha]
|
|
32
|
+
interfaces: {}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Operation shape
|
|
36
|
+
|
|
37
|
+
```yaml
|
|
38
|
+
operation: createPullRequest
|
|
39
|
+
supported: true
|
|
40
|
+
write: true
|
|
41
|
+
requires:
|
|
42
|
+
permissions:
|
|
43
|
+
- gitForge.pullRequests.write
|
|
44
|
+
authModes:
|
|
45
|
+
- github-app
|
|
46
|
+
- oauth-user
|
|
47
|
+
nativeScopes:
|
|
48
|
+
- pull_requests:write
|
|
49
|
+
idempotency:
|
|
50
|
+
mode: synthetic-key
|
|
51
|
+
rateLimitCost:
|
|
52
|
+
restRequests: 1
|
|
53
|
+
webhookConfirmation:
|
|
54
|
+
events: [pull_request]
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## GitHub manifest sketch
|
|
58
|
+
|
|
59
|
+
```yaml
|
|
60
|
+
providerType: github
|
|
61
|
+
interfaces:
|
|
62
|
+
issueTracking:
|
|
63
|
+
supported: true
|
|
64
|
+
objects: [Issue, IssueComment, Label, Milestone]
|
|
65
|
+
operations:
|
|
66
|
+
- listIssues
|
|
67
|
+
- getIssue
|
|
68
|
+
- createIssue
|
|
69
|
+
- updateIssue
|
|
70
|
+
- closeIssue
|
|
71
|
+
- listComments
|
|
72
|
+
- createComment
|
|
73
|
+
- updateComment
|
|
74
|
+
- listLabels
|
|
75
|
+
- syncLabels
|
|
76
|
+
webhooks: [issues, issue_comment, label, milestone]
|
|
77
|
+
cicd:
|
|
78
|
+
supported: true
|
|
79
|
+
objects: [WorkflowRun, WorkflowJob, CheckRun, CheckSuite, CommitStatus, Runner]
|
|
80
|
+
operations:
|
|
81
|
+
- listWorkflowRuns
|
|
82
|
+
- getWorkflowRun
|
|
83
|
+
- listWorkflowJobs
|
|
84
|
+
- rerunWorkflowRun
|
|
85
|
+
- cancelWorkflowRun
|
|
86
|
+
- listSelfHostedRunners
|
|
87
|
+
- createCheckRun
|
|
88
|
+
- updateCheckRun
|
|
89
|
+
webhooks: [workflow_run, workflow_job, check_run, check_suite, status]
|
|
90
|
+
gitForge:
|
|
91
|
+
supported: true
|
|
92
|
+
objects: [Repository, PullRequest, Review, Ref, Commit, DeployKey, BranchProtection, Collaborator]
|
|
93
|
+
operations:
|
|
94
|
+
- listRepositories
|
|
95
|
+
- getRepository
|
|
96
|
+
- createRepository
|
|
97
|
+
- updateRepository
|
|
98
|
+
- listPullRequests
|
|
99
|
+
- createPullRequest
|
|
100
|
+
- updatePullRequest
|
|
101
|
+
- mergePullRequest
|
|
102
|
+
- listRefs
|
|
103
|
+
- getCommit
|
|
104
|
+
- syncDeployKeys
|
|
105
|
+
- syncBranchProtection
|
|
106
|
+
webhooks: [repository, pull_request, pull_request_review, pull_request_review_comment, push, create, delete, deploy_key, branch_protection_rule]
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## GitLab manifest sketch
|
|
110
|
+
|
|
111
|
+
```yaml
|
|
112
|
+
providerType: gitlab
|
|
113
|
+
hosting: [saas, self-managed]
|
|
114
|
+
authModes: [oauth-user, project-token, group-token, personal-access-token]
|
|
115
|
+
interfaces:
|
|
116
|
+
issueTracking:
|
|
117
|
+
supported: true
|
|
118
|
+
objects: [Issue, Note, Label, Milestone]
|
|
119
|
+
webhooks: [Issues Hook, Note Hook]
|
|
120
|
+
cicd:
|
|
121
|
+
supported: true
|
|
122
|
+
objects: [Pipeline, Job, Artifact, Runner]
|
|
123
|
+
webhooks: [Pipeline Hook, Job Hook]
|
|
124
|
+
gitForge:
|
|
125
|
+
supported: true
|
|
126
|
+
objects: [Project, MergeRequest, Approval, Branch, Tag, DeployKey, ProtectedBranch]
|
|
127
|
+
webhooks: [Push Hook, Tag Push Hook, Merge Request Hook]
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## Jira manifest sketch
|
|
131
|
+
|
|
132
|
+
```yaml
|
|
133
|
+
providerType: jira
|
|
134
|
+
hosting: [cloud, data-center]
|
|
135
|
+
interfaces:
|
|
136
|
+
issueTracking:
|
|
137
|
+
supported: true
|
|
138
|
+
objects: [Issue, Comment, Project, Component, Version, Sprint, Board]
|
|
139
|
+
operations: [listIssues, getIssue, createIssue, updateIssue, transitionIssue, createComment, updateComment]
|
|
140
|
+
webhooks: [issue_created, issue_updated, issue_deleted, comment_created, comment_updated]
|
|
141
|
+
cicd:
|
|
142
|
+
supported: false
|
|
143
|
+
gitForge:
|
|
144
|
+
supported: false
|
|
145
|
+
notes:
|
|
146
|
+
bodyFormat: atlassian-document-format
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
## Buildkite manifest sketch
|
|
150
|
+
|
|
151
|
+
```yaml
|
|
152
|
+
providerType: buildkite
|
|
153
|
+
interfaces:
|
|
154
|
+
issueTracking:
|
|
155
|
+
supported: false
|
|
156
|
+
cicd:
|
|
157
|
+
supported: true
|
|
158
|
+
objects: [Pipeline, Build, Job, Agent, Artifact]
|
|
159
|
+
operations: [listPipelines, listBuilds, getBuild, listJobs, getLog, rebuildBuild, cancelBuild, listAgents]
|
|
160
|
+
webhooks: [build.scheduled, build.running, build.finished, job.finished]
|
|
161
|
+
gitForge:
|
|
162
|
+
supported: false
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
## Custom provider manifest
|
|
166
|
+
|
|
167
|
+
Custom providers must declare exact operations and webhook normalization rules:
|
|
168
|
+
|
|
169
|
+
```yaml
|
|
170
|
+
providerType: custom
|
|
171
|
+
adapterRef:
|
|
172
|
+
package: '@a5c-ai/kradle-provider-acme'
|
|
173
|
+
version: 1.x
|
|
174
|
+
interfaces:
|
|
175
|
+
issueTracking:
|
|
176
|
+
supported: true
|
|
177
|
+
operations: [listIssues, getIssue]
|
|
178
|
+
cicd:
|
|
179
|
+
supported: false
|
|
180
|
+
gitForge:
|
|
181
|
+
supported: false
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
## UI use
|
|
185
|
+
|
|
186
|
+
The UI uses manifests to:
|
|
187
|
+
|
|
188
|
+
- show only supported interface checkboxes;
|
|
189
|
+
- explain unsupported actions;
|
|
190
|
+
- choose auth forms;
|
|
191
|
+
- show webhook event requirements;
|
|
192
|
+
- render provider-specific object labels;
|
|
193
|
+
- warn when selected sync mode requires unsupported write operations;
|
|
194
|
+
- drive setup wizard validation.
|
|
195
|
+
|
|
196
|
+
## Test use
|
|
197
|
+
|
|
198
|
+
Contract tests use manifests to:
|
|
199
|
+
|
|
200
|
+
- generate provider capability tests;
|
|
201
|
+
- assert unsupported operations are disabled;
|
|
202
|
+
- run shared interface suites only for supported interfaces;
|
|
203
|
+
- validate provider fixture completeness;
|
|
204
|
+
- verify webhook event normalization coverage.
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# Pluggable backend provider catalog
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
This catalog lists likely external backend integrations and how each maps to Kradle's three unified interfaces:
|
|
6
|
+
|
|
7
|
+
1. issue tracking;
|
|
8
|
+
2. CI/CD;
|
|
9
|
+
3. git forge.
|
|
10
|
+
|
|
11
|
+
A backend can support one, two, or all three. Provider implementations should be capability-driven rather than hard-coded to GitHub semantics.
|
|
12
|
+
|
|
13
|
+
## Provider matrix
|
|
14
|
+
|
|
15
|
+
| Provider | Issue tracking | CI/CD | Git forge | Notes |
|
|
16
|
+
| --- | --- | --- | --- | --- |
|
|
17
|
+
| GitHub | yes | yes | yes | first full provider; GitHub Apps, REST, GraphQL, webhooks, Actions, Checks. |
|
|
18
|
+
| GitLab | yes | yes | yes | issues, merge requests, pipelines/jobs, webhooks, project/group APIs; supports SaaS and self-managed. |
|
|
19
|
+
| Bitbucket Cloud | limited/yes | yes | yes | repositories, pull requests, pipelines, webhooks; issue support depends on workspace/repo configuration. |
|
|
20
|
+
| Bitbucket Data Center | limited/yes | external/limited | yes | repo/PR APIs and webhooks; CI often external Jenkins/Bamboo. |
|
|
21
|
+
| Azure DevOps | yes | yes | yes | Work Items, Boards, Git repos/PRs, Pipelines, service hooks. |
|
|
22
|
+
| Jira Cloud/Data Center | yes | no | no | work items/issues only; pairs well with GitHub/GitLab/Bitbucket or CI-only providers. |
|
|
23
|
+
| Linear | yes | no | no | GraphQL issue/workflow model and webhooks; no native git forge. |
|
|
24
|
+
| Buildkite | no | yes | no | builds, jobs, agents, artifacts, webhooks; pairs with GitHub/GitLab/Bitbucket. |
|
|
25
|
+
| CircleCI | no | yes | no | pipelines, workflows, jobs, webhooks, artifacts; pairs with git forge providers. |
|
|
26
|
+
| Jenkins | no | yes | no | jobs/builds/logs via remote API; webhook support usually plugin-specific. |
|
|
27
|
+
| Gitea | yes | limited/external | yes | current internal/default forge path; can also be external-managed. |
|
|
28
|
+
| Gerrit | no/limited | no | yes | code review and Git refs; often pairs with Jenkins/Buildkite. |
|
|
29
|
+
| Raw Git server | no | no | partial | clone/fetch/push/refs only; no issue/PR semantics unless paired. |
|
|
30
|
+
| Custom webhook backend | optional | optional | optional | provider adapter can normalize proprietary events into one interface. |
|
|
31
|
+
|
|
32
|
+
## Provider profiles
|
|
33
|
+
|
|
34
|
+
### Full forge providers
|
|
35
|
+
|
|
36
|
+
Full forge providers typically implement all three interfaces:
|
|
37
|
+
|
|
38
|
+
- GitHub;
|
|
39
|
+
- GitLab;
|
|
40
|
+
- Azure DevOps;
|
|
41
|
+
- partially Bitbucket when issue and pipeline features are enabled.
|
|
42
|
+
|
|
43
|
+
These providers can power repository pages end to end, but Kradle should still let each interface be enabled independently.
|
|
44
|
+
|
|
45
|
+
### Work tracking providers
|
|
46
|
+
|
|
47
|
+
Work tracking providers implement issue tracking only:
|
|
48
|
+
|
|
49
|
+
- Jira;
|
|
50
|
+
- Linear;
|
|
51
|
+
- Azure Boards if used separately from Azure Repos/Pipelines;
|
|
52
|
+
- custom ticket systems.
|
|
53
|
+
|
|
54
|
+
Kradle maps these into issues/work items, labels, project fields, comments, assignees, and issue-triggered agent dispatch.
|
|
55
|
+
|
|
56
|
+
### CI/CD providers
|
|
57
|
+
|
|
58
|
+
CI/CD providers implement pipeline/job/run functionality only:
|
|
59
|
+
|
|
60
|
+
- Buildkite;
|
|
61
|
+
- CircleCI;
|
|
62
|
+
- Jenkins;
|
|
63
|
+
- Azure Pipelines if used separately;
|
|
64
|
+
- GitHub Actions if GitHub forge is not used;
|
|
65
|
+
- GitLab CI if GitLab forge is not used.
|
|
66
|
+
|
|
67
|
+
Kradle maps these into `Pipeline`, `Job`, logs, artifacts, checks, runners, and triggers.
|
|
68
|
+
|
|
69
|
+
### Git forge providers
|
|
70
|
+
|
|
71
|
+
Git forge providers implement repos/PRs/refs/keys but may not own issues or CI:
|
|
72
|
+
|
|
73
|
+
- GitHub;
|
|
74
|
+
- GitLab;
|
|
75
|
+
- Bitbucket;
|
|
76
|
+
- Gitea;
|
|
77
|
+
- Gerrit;
|
|
78
|
+
- raw Git with limited semantics.
|
|
79
|
+
|
|
80
|
+
Kradle maps these into repositories, pull requests/reviews, refs, commits, deploy keys, repository permissions, and branch protection.
|
|
81
|
+
|
|
82
|
+
## Capability descriptor
|
|
83
|
+
|
|
84
|
+
Each provider adapter should expose a descriptor:
|
|
85
|
+
|
|
86
|
+
```yaml
|
|
87
|
+
providerType: gitlab
|
|
88
|
+
version: v1
|
|
89
|
+
interfaces:
|
|
90
|
+
issueTracking:
|
|
91
|
+
supported: true
|
|
92
|
+
operations: [list, get, create, update, comment, label, transition]
|
|
93
|
+
webhookEvents: [issue, note]
|
|
94
|
+
cicd:
|
|
95
|
+
supported: true
|
|
96
|
+
operations: [listRuns, getRun, listJobs, getLog, retry, cancel]
|
|
97
|
+
webhookEvents: [pipeline, job]
|
|
98
|
+
gitForge:
|
|
99
|
+
supported: true
|
|
100
|
+
operations: [listRepos, getRepo, listPullRequests, createPullRequest, merge, listRefs]
|
|
101
|
+
webhookEvents: [push, mergeRequest, tagPush]
|
|
102
|
+
authModes: [oauth-app, personal-token, project-token, self-managed-token]
|
|
103
|
+
hosting: [saas, self-managed]
|
|
104
|
+
rateLimitModel: provider-specific
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Provider-specific notes
|
|
108
|
+
|
|
109
|
+
### GitLab
|
|
110
|
+
|
|
111
|
+
GitLab should support issues, merge requests, pipelines/jobs, project/group webhooks, branches/tags, approvals, protected branches, deploy keys, and self-managed base URLs.
|
|
112
|
+
|
|
113
|
+
### Bitbucket
|
|
114
|
+
|
|
115
|
+
Bitbucket should separate Cloud and Data Center adapters because authentication, APIs, webhook payloads, and feature availability differ.
|
|
116
|
+
|
|
117
|
+
### Jira
|
|
118
|
+
|
|
119
|
+
Jira issue payloads use Atlassian Document Format for rich text in Cloud REST v3. Kradle needs a markdown/ADF conversion layer for issue body/comments.
|
|
120
|
+
|
|
121
|
+
### Linear
|
|
122
|
+
|
|
123
|
+
Linear is GraphQL-first and issue/workflow-oriented. It should support issue tracking with webhooks and a provider-specific field mapping for teams, cycles, projects, states, and labels.
|
|
124
|
+
|
|
125
|
+
### Azure DevOps
|
|
126
|
+
|
|
127
|
+
Azure DevOps can support all three interfaces, but Work Items, Git repos/PRs, Pipelines, and Service Hooks are separate service areas. Kradle should model them under one provider with separate interface credentials/scopes where needed.
|
|
128
|
+
|
|
129
|
+
### Buildkite/CircleCI/Jenkins
|
|
130
|
+
|
|
131
|
+
These are CI/CD-only providers. They should map to `Pipeline`/`Job` and can be paired with GitHub/GitLab/Bitbucket/Gitea for repo and PR context.
|
|
132
|
+
|
|
133
|
+
## Acceptance criteria
|
|
134
|
+
|
|
135
|
+
- Provider adapter selection is capability-driven.
|
|
136
|
+
- A single Kradle repository can bind different providers per interface.
|
|
137
|
+
- A provider can be self-managed with custom base URLs.
|
|
138
|
+
- UI can explain unsupported operations before a user clicks them.
|
|
139
|
+
- Tests can run provider contract suites against fake adapters for each interface.
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Provider rollout and testing
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
This document defines implementation slices and QA coverage for GitHub and future providers.
|
|
6
|
+
|
|
7
|
+
## Rollout slices
|
|
8
|
+
|
|
9
|
+
### Slice 1: provider registry and read-only GitHub binding
|
|
10
|
+
|
|
11
|
+
- Add `ExternalBackendProvider`, `ExternalBackendBinding`, and sync policy resources.
|
|
12
|
+
- Configure GitHub App Secret metadata.
|
|
13
|
+
- Validate auth and installation access.
|
|
14
|
+
- Show provider in org settings.
|
|
15
|
+
|
|
16
|
+
### Slice 2: git forge read sync
|
|
17
|
+
|
|
18
|
+
- Sync repositories and pull requests read-only.
|
|
19
|
+
- Store external IDs and native URLs.
|
|
20
|
+
- Show GitHub badges and links.
|
|
21
|
+
- Backfill plus webhook convergence tests.
|
|
22
|
+
|
|
23
|
+
### Slice 3: issue tracking sync
|
|
24
|
+
|
|
25
|
+
- Sync issues, comments, labels, milestones.
|
|
26
|
+
- Handle PR-backed issue identity.
|
|
27
|
+
- Add issue write-through for authorized humans.
|
|
28
|
+
|
|
29
|
+
### Slice 4: CI/CD sync
|
|
30
|
+
|
|
31
|
+
- Sync workflow runs, jobs, checks, statuses.
|
|
32
|
+
- Show GitHub Actions runs beside Kradle pipelines.
|
|
33
|
+
- Add logs/artifacts lazy fetch.
|
|
34
|
+
|
|
35
|
+
### Slice 5: write intents and conflicts
|
|
36
|
+
|
|
37
|
+
- Add reviewed-write and write-through actions.
|
|
38
|
+
- Add `ExternalWriteIntent` and `ExternalSyncConflict` UI.
|
|
39
|
+
- Add agent write-back approval flow.
|
|
40
|
+
|
|
41
|
+
### Slice 6: runner and advanced repo management
|
|
42
|
+
|
|
43
|
+
- Self-hosted runner inventory/registration if enabled.
|
|
44
|
+
- Deploy keys, collaborators, and branch protection sync.
|
|
45
|
+
- Rate-limit aware bulk backfill.
|
|
46
|
+
|
|
47
|
+
## Test coverage
|
|
48
|
+
|
|
49
|
+
| Slice | Required tests |
|
|
50
|
+
| --- | --- |
|
|
51
|
+
| provider registry | auth Secret metadata, missing Secret, bad installation, no-token leak. |
|
|
52
|
+
| git forge read | repo/PR backfill, webhook update, duplicate delivery, cross-org denial. |
|
|
53
|
+
| issue sync | issue/comment/label update, PR-backed issue link, conflict. |
|
|
54
|
+
| CI/CD sync | workflow/job/check event, rerun/cancel permission, log lazy fetch. |
|
|
55
|
+
| write intents | approval required, provider write failure, confirmation, conflict. |
|
|
56
|
+
| advanced repo | deploy key sync, branch protection drift, runner registration token no-leak. |
|
|
57
|
+
|
|
58
|
+
## Fixtures
|
|
59
|
+
|
|
60
|
+
Add fixtures for:
|
|
61
|
+
|
|
62
|
+
- GitHub App provider Secret metadata;
|
|
63
|
+
- installation binding;
|
|
64
|
+
- repository webhook payloads;
|
|
65
|
+
- issue/comment/label payloads;
|
|
66
|
+
- pull request/review payloads;
|
|
67
|
+
- workflow run/job/check payloads;
|
|
68
|
+
- deploy key/branch protection payloads;
|
|
69
|
+
- rate limit and abuse-limit responses;
|
|
70
|
+
- redelivery payloads.
|
|
71
|
+
|
|
72
|
+
## Acceptance criteria
|
|
73
|
+
|
|
74
|
+
- GitHub can be enabled for one org/repository with selected interfaces.
|
|
75
|
+
- A provider implementing only one interface can still be represented.
|
|
76
|
+
- Webhook replay and backfill converge.
|
|
77
|
+
- Bidirectional writes are explicit, permission-checked, and audited.
|
|
78
|
+
- Future providers can be added by implementing one or more provider contracts.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Research results
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
This document records the GitHub research used to design Kradle external backend integration. It intentionally focuses on official GitHub surfaces and the implications for Kradle's provider abstractions.
|
|
6
|
+
|
|
7
|
+
## GitHub integration surfaces
|
|
8
|
+
|
|
9
|
+
| Surface | Relevant GitHub capability | Kradle implication |
|
|
10
|
+
| --- | --- | --- |
|
|
11
|
+
| GitHub Apps | authenticate as app, installation, or user; installation tokens; permission-scoped access | use GitHub App installation as default automation identity; use user tokens only for actor-attributed actions. |
|
|
12
|
+
| REST API | repositories, issues, pull requests, Actions, checks, webhooks, deploy keys, refs, commits | implement provider connectors with endpoint-specific permissions and rate-limit handling. |
|
|
13
|
+
| GraphQL API | precise data selection, node IDs, connections/cursors | use for efficient list/detail sync, cross-object hydration, and stable global IDs. |
|
|
14
|
+
| Webhooks | repository/org/app events with payloads and delivery IDs | use webhook-first sync for freshness and as trigger source. |
|
|
15
|
+
| Webhook delivery APIs | recent delivery inspection and redelivery | support replay/recovery and delivery audit. |
|
|
16
|
+
| Actions APIs | workflows, workflow runs, jobs, logs, self-hosted runners | map GitHub Actions into Kradle pipeline/job/runner abstractions. |
|
|
17
|
+
| Checks/status APIs | checks, statuses, workflow check suites/runs | map external checks into Kradle CI status and PR gates. |
|
|
18
|
+
| Deploy keys and Git access | repository-scoped SSH deploy keys and installation-token HTTP Git access | support external Git checkout/mirroring without PATs. |
|
|
19
|
+
|
|
20
|
+
## Key findings
|
|
21
|
+
|
|
22
|
+
- GitHub's REST API covers repository management, issue management, pull requests/reviews, workflow runs, self-hosted runners, checks, deploy keys, refs, commits, and repository webhooks.
|
|
23
|
+
- GitHub webhooks should be subscribed narrowly; GitHub documents using secrets, HTTPS, event/action filtering, unique delivery IDs, fast 2XX responses, queues for asynchronous processing, and redelivery for recovery.
|
|
24
|
+
- GitHub App installation tokens expire and are permission-bound; user access tokens can attribute user actions but are limited by both app permissions and user permissions.
|
|
25
|
+
- GitHub GraphQL exposes precise object selection, node IDs, connections, and cursors; REST payloads often include `node_id`, which can bridge REST and GraphQL identities.
|
|
26
|
+
- GitHub Actions workflow runs can be viewed, rerun, canceled, and logged through REST; self-hosted runners can be listed, registered, and deleted through Actions APIs.
|
|
27
|
+
- GitHub pull requests are issue-like for labels, assignees, milestones, and comments, so issue and pull-request sync must coordinate shared issue-number identity.
|
|
28
|
+
- GitHub deploy keys are repository-scoped SSH keys and are separate from GitHub App installation-token HTTP Git access.
|
|
29
|
+
|
|
30
|
+
## Sources
|
|
31
|
+
|
|
32
|
+
- GitHub REST API overview and repository endpoints.
|
|
33
|
+
- GitHub Issues REST endpoints.
|
|
34
|
+
- GitHub Pull Requests REST endpoints.
|
|
35
|
+
- GitHub Actions workflow run, workflow, checks, and self-hosted runner endpoints.
|
|
36
|
+
- GitHub Webhooks docs: events/payloads, best practices, validation, deliveries, redelivery.
|
|
37
|
+
- GitHub Apps auth docs: app JWT, installation tokens, user tokens, permissions.
|
|
38
|
+
- GitHub GraphQL docs: node IDs, precise queries, cursor pagination, schema.
|
|
39
|
+
|
|
40
|
+
## Design impact
|
|
41
|
+
|
|
42
|
+
Kradle should not create a GitHub-only data model. Instead, GitHub is the first provider implementation of three interfaces:
|
|
43
|
+
|
|
44
|
+
1. issue tracking provider;
|
|
45
|
+
2. CI/CD provider;
|
|
46
|
+
3. git forge provider.
|
|
47
|
+
|
|
48
|
+
GitHub can support all three. Other providers may only support one or two. For example, Jira may support issue tracking only; Buildkite may support CI/CD only; a raw Git server may support git forge only.
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Security, auth, and permissions
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
External backend integration introduces provider tokens, webhooks, native permissions, and bidirectional writes. This document defines the security model.
|
|
6
|
+
|
|
7
|
+
## Auth principles
|
|
8
|
+
|
|
9
|
+
- Prefer GitHub Apps over PATs.
|
|
10
|
+
- Store app IDs, private keys, webhook secrets, and client secrets in Kubernetes Secrets.
|
|
11
|
+
- Never store provider access tokens in resource status.
|
|
12
|
+
- Installation tokens are short-lived and cached in memory only when possible.
|
|
13
|
+
- User-attributed writes require both Kradle authorization and provider user authorization.
|
|
14
|
+
|
|
15
|
+
## Secret resources
|
|
16
|
+
|
|
17
|
+
```yaml
|
|
18
|
+
kind: Secret
|
|
19
|
+
metadata:
|
|
20
|
+
name: github-app-a5c
|
|
21
|
+
namespace: kradle-org-a5c
|
|
22
|
+
type: Opaque
|
|
23
|
+
stringData:
|
|
24
|
+
app-id: "..."
|
|
25
|
+
private-key.pem: "..."
|
|
26
|
+
webhook-secret: "..."
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
`ExternalBackendProvider.spec.authRef` points to the Secret. UI displays only Secret name/key metadata.
|
|
30
|
+
|
|
31
|
+
## Permission checks
|
|
32
|
+
|
|
33
|
+
Every write requires:
|
|
34
|
+
|
|
35
|
+
1. Kradle org/RBAC permission;
|
|
36
|
+
2. provider binding allows interface and write mode;
|
|
37
|
+
3. provider credentials have required native permission;
|
|
38
|
+
4. actor attribution policy is satisfied;
|
|
39
|
+
5. approval policy is satisfied for agents or high-risk writes;
|
|
40
|
+
6. audit event is emitted.
|
|
41
|
+
|
|
42
|
+
## Webhook security
|
|
43
|
+
|
|
44
|
+
- Require HTTPS in production.
|
|
45
|
+
- Validate provider signature before parsing payload.
|
|
46
|
+
- Enforce replay/dedupe by delivery ID and timestamp where available.
|
|
47
|
+
- Queue processing after quick 2XX response.
|
|
48
|
+
- Store raw payloads only according to retention and redaction policy.
|
|
49
|
+
- Avoid logging headers or payload fields containing secrets.
|
|
50
|
+
|
|
51
|
+
## No-leak requirements
|
|
52
|
+
|
|
53
|
+
Provider secrets and tokens must not appear in:
|
|
54
|
+
|
|
55
|
+
- API responses;
|
|
56
|
+
- resource status;
|
|
57
|
+
- Kubernetes events;
|
|
58
|
+
- sync events;
|
|
59
|
+
- logs;
|
|
60
|
+
- UI;
|
|
61
|
+
- browser traces;
|
|
62
|
+
- memory/context bundles;
|
|
63
|
+
- test artifacts.
|
|
64
|
+
|
|
65
|
+
## Agent interactions
|
|
66
|
+
|
|
67
|
+
Agents may propose external writes, but Kradle owns approval and execution. Agent write-back to GitHub issues, PRs, checks, comments, labels, or branch updates must produce an `ExternalWriteIntent` and pass approval policy unless explicitly trusted.
|
|
68
|
+
|
|
69
|
+
## Audit fields
|
|
70
|
+
|
|
71
|
+
Audit external operations with:
|
|
72
|
+
|
|
73
|
+
- org and namespace;
|
|
74
|
+
- provider and binding;
|
|
75
|
+
- interface;
|
|
76
|
+
- actor and optional provider user;
|
|
77
|
+
- native object ID/URL;
|
|
78
|
+
- action;
|
|
79
|
+
- write intent ID;
|
|
80
|
+
- result;
|
|
81
|
+
- digest of request/response with secrets removed.
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# External sync state machines
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
This document defines stable phases and transitions for provider setup, bindings, webhook deliveries, backfill, write intents, conflicts, and provider health. UI, controllers, tests, and audit should use these phases consistently.
|
|
6
|
+
|
|
7
|
+
## Provider phases
|
|
8
|
+
|
|
9
|
+
| Phase | Meaning |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| `Pending` | resource created, not yet validated. |
|
|
12
|
+
| `Authenticating` | controller is checking credentials. |
|
|
13
|
+
| `Discovering` | capabilities, installation, and rate-limit metadata are being discovered. |
|
|
14
|
+
| `Ready` | provider can serve at least one enabled interface. |
|
|
15
|
+
| `Degraded` | provider is usable but has warnings such as rate limits or partial interface failure. |
|
|
16
|
+
| `Paused` | user paused sync/write operations. |
|
|
17
|
+
| `Failed` | provider cannot be used until configuration changes. |
|
|
18
|
+
|
|
19
|
+
## Binding phases
|
|
20
|
+
|
|
21
|
+
| Phase | Meaning |
|
|
22
|
+
| --- | --- |
|
|
23
|
+
| `Pending` | binding accepted. |
|
|
24
|
+
| `ValidatingTarget` | target Kradle repo/project/org is being validated. |
|
|
25
|
+
| `RegisteringWebhook` | provider webhook registration is in progress. |
|
|
26
|
+
| `Backfilling` | initial sync is running. |
|
|
27
|
+
| `Ready` | binding sync is active. |
|
|
28
|
+
| `Conflict` | sync conflicts exist but binding may continue. |
|
|
29
|
+
| `Paused` | sync paused for this binding. |
|
|
30
|
+
| `Failed` | binding cannot sync. |
|
|
31
|
+
|
|
32
|
+
## Webhook delivery phases
|
|
33
|
+
|
|
34
|
+
| Phase | Meaning |
|
|
35
|
+
| --- | --- |
|
|
36
|
+
| `Received` | request accepted. |
|
|
37
|
+
| `SignatureRejected` | signature validation failed; no payload processing. |
|
|
38
|
+
| `Queued` | valid delivery queued. |
|
|
39
|
+
| `Normalizing` | provider payload is becoming canonical events. |
|
|
40
|
+
| `Processing` | sync controller is applying events. |
|
|
41
|
+
| `Succeeded` | event applied or safely deduped. |
|
|
42
|
+
| `Retrying` | transient failure. |
|
|
43
|
+
| `DeadLettered` | repeated failure needs operator action. |
|
|
44
|
+
|
|
45
|
+
## Backfill phases
|
|
46
|
+
|
|
47
|
+
| Phase | Meaning |
|
|
48
|
+
| --- | --- |
|
|
49
|
+
| `Scheduled` | backfill requested. |
|
|
50
|
+
| `Listing` | provider objects are being paginated. |
|
|
51
|
+
| `Hydrating` | details are being fetched. |
|
|
52
|
+
| `Applying` | Kradle projections are being updated. |
|
|
53
|
+
| `Checkpointing` | cursor/high-watermark is being persisted. |
|
|
54
|
+
| `Succeeded` | backfill completed. |
|
|
55
|
+
| `RateLimited` | paused until reset. |
|
|
56
|
+
| `Failed` | backfill failed. |
|
|
57
|
+
|
|
58
|
+
## Write intent phases
|
|
59
|
+
|
|
60
|
+
| Phase | Meaning |
|
|
61
|
+
| --- | --- |
|
|
62
|
+
| `PendingApproval` | approval required before provider call. |
|
|
63
|
+
| `ReadyToSend` | admitted and queued for provider write. |
|
|
64
|
+
| `Sending` | provider call in progress. |
|
|
65
|
+
| `AwaitingConfirmation` | provider response accepted; waiting for webhook/read confirmation. |
|
|
66
|
+
| `Succeeded` | provider state confirmed. |
|
|
67
|
+
| `Conflict` | provider state changed or rejected due to version mismatch. |
|
|
68
|
+
| `Retrying` | transient failure. |
|
|
69
|
+
| `Rejected` | human or policy rejected the write. |
|
|
70
|
+
| `Failed` | non-retryable failure. |
|
|
71
|
+
|
|
72
|
+
## Conflict phases
|
|
73
|
+
|
|
74
|
+
| Phase | Meaning |
|
|
75
|
+
| --- | --- |
|
|
76
|
+
| `Open` | conflict requires resolution. |
|
|
77
|
+
| `Resolving` | selected resolution is being applied. |
|
|
78
|
+
| `Resolved` | conflict closed and sync confirmed. |
|
|
79
|
+
| `Ignored` | unsupported or intentionally ignored field. |
|
|
80
|
+
| `Superseded` | newer sync state replaced this conflict. |
|
|
81
|
+
|
|
82
|
+
## State transition invariants
|
|
83
|
+
|
|
84
|
+
- `SignatureRejected` deliveries never become `Processing`.
|
|
85
|
+
- `DeadLettered` deliveries require explicit replay or skip.
|
|
86
|
+
- `PendingApproval` write intents never call provider before approval.
|
|
87
|
+
- `Succeeded` write intents include provider native response or confirmation digest.
|
|
88
|
+
- `Conflict` states must link to `ExternalSyncConflict`.
|
|
89
|
+
- `Paused` provider/binding states block new backfills and writes but preserve webhook delivery records.
|
|
90
|
+
|
|
91
|
+
## UI state mapping
|
|
92
|
+
|
|
93
|
+
| State | UI tone | Action |
|
|
94
|
+
| --- | --- | --- |
|
|
95
|
+
| `Ready` | good | normal actions. |
|
|
96
|
+
| `Degraded` | warning | show reason and retry/backfill actions. |
|
|
97
|
+
| `RateLimited` | warning | show reset time. |
|
|
98
|
+
| `Conflict` | danger/warning | link to conflict resolution. |
|
|
99
|
+
| `Paused` | neutral | resume action. |
|
|
100
|
+
| `Failed` | danger | show configuration fix. |
|
|
101
|
+
| `DeadLettered` | danger | replay or skip action. |
|
|
102
|
+
|
|
103
|
+
## Acceptance criteria
|
|
104
|
+
|
|
105
|
+
- Every external backend resource has a stable phase and conditions.
|
|
106
|
+
- Tests assert phase transitions, not only final data shape.
|
|
107
|
+
- UI uses consistent status language across providers.
|
|
108
|
+
- Audit events include phase transitions for deliveries, writes, and conflicts.
|