@app-vitals/agent-admin 1.32.0 → 1.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/openapi.platform.json +473 -1
- package/package.json +2 -2
- package/src/admin-boot.ts +12 -0
- package/src/agents-api.smoke.test.ts +496 -0
- package/src/agents-api.ts +314 -3
- package/src/github-reconcile-wiring.ts +22 -0
- package/src/lost-access-removal.ts +333 -0
- package/src/lost-access-removal.unit.test.ts +467 -0
- package/src/reconcile-planner.ts +26 -11
- package/src/repo-removal-open-work.ts +64 -0
- package/src/repo-removal-open-work.unit.test.ts +105 -0
package/openapi.platform.json
CHANGED
|
@@ -3580,6 +3580,196 @@
|
|
|
3580
3580
|
"repos"
|
|
3581
3581
|
]
|
|
3582
3582
|
},
|
|
3583
|
+
"GithubLostAccessPreview": {
|
|
3584
|
+
"type": "object",
|
|
3585
|
+
"properties": {
|
|
3586
|
+
"status": {
|
|
3587
|
+
"type": "string",
|
|
3588
|
+
"enum": [
|
|
3589
|
+
"previewed",
|
|
3590
|
+
"skipped"
|
|
3591
|
+
],
|
|
3592
|
+
"description": "`skipped` (not an error) when no GitHub username is bound, the user is not found or unverified, the agent has no GH_APP_ID, or the Apps are not configured; `reason` says why."
|
|
3593
|
+
},
|
|
3594
|
+
"reason": {
|
|
3595
|
+
"type": "string"
|
|
3596
|
+
},
|
|
3597
|
+
"repos": {
|
|
3598
|
+
"type": "array",
|
|
3599
|
+
"items": {
|
|
3600
|
+
"type": "string"
|
|
3601
|
+
},
|
|
3602
|
+
"description": "Every repo the bound user can no longer push to that would be removed from the installation or the agent's repos."
|
|
3603
|
+
},
|
|
3604
|
+
"installationRemoves": {
|
|
3605
|
+
"type": "array",
|
|
3606
|
+
"items": {
|
|
3607
|
+
"type": "string"
|
|
3608
|
+
}
|
|
3609
|
+
},
|
|
3610
|
+
"configRemoves": {
|
|
3611
|
+
"type": "array",
|
|
3612
|
+
"items": {
|
|
3613
|
+
"type": "string"
|
|
3614
|
+
}
|
|
3615
|
+
},
|
|
3616
|
+
"skippedOrgs": {
|
|
3617
|
+
"type": "array",
|
|
3618
|
+
"items": {
|
|
3619
|
+
"type": "object",
|
|
3620
|
+
"properties": {
|
|
3621
|
+
"org": {
|
|
3622
|
+
"type": "string"
|
|
3623
|
+
},
|
|
3624
|
+
"reason": {
|
|
3625
|
+
"type": "string"
|
|
3626
|
+
}
|
|
3627
|
+
},
|
|
3628
|
+
"required": [
|
|
3629
|
+
"org",
|
|
3630
|
+
"reason"
|
|
3631
|
+
]
|
|
3632
|
+
},
|
|
3633
|
+
"description": "Orgs whose access listing is missing, partial or failed, or whose lookup App is installed on selected repositories only; nothing there is removed."
|
|
3634
|
+
},
|
|
3635
|
+
"openWork": {
|
|
3636
|
+
"type": "array",
|
|
3637
|
+
"items": {
|
|
3638
|
+
"type": "object",
|
|
3639
|
+
"properties": {
|
|
3640
|
+
"id": {
|
|
3641
|
+
"type": "string"
|
|
3642
|
+
},
|
|
3643
|
+
"repo": {
|
|
3644
|
+
"type": "string"
|
|
3645
|
+
},
|
|
3646
|
+
"title": {
|
|
3647
|
+
"type": "string"
|
|
3648
|
+
}
|
|
3649
|
+
},
|
|
3650
|
+
"required": [
|
|
3651
|
+
"id",
|
|
3652
|
+
"repo"
|
|
3653
|
+
]
|
|
3654
|
+
},
|
|
3655
|
+
"description": "The agent's open tasks and PRs on those repos that removing them would block; empty when no open-work port is wired."
|
|
3656
|
+
},
|
|
3657
|
+
"warnings": {
|
|
3658
|
+
"type": "array",
|
|
3659
|
+
"items": {
|
|
3660
|
+
"type": "string"
|
|
3661
|
+
}
|
|
3662
|
+
}
|
|
3663
|
+
},
|
|
3664
|
+
"required": [
|
|
3665
|
+
"status"
|
|
3666
|
+
]
|
|
3667
|
+
},
|
|
3668
|
+
"GithubLostAccessRemoveResult": {
|
|
3669
|
+
"type": "object",
|
|
3670
|
+
"properties": {
|
|
3671
|
+
"status": {
|
|
3672
|
+
"type": "string",
|
|
3673
|
+
"enum": [
|
|
3674
|
+
"applied",
|
|
3675
|
+
"noop",
|
|
3676
|
+
"skipped"
|
|
3677
|
+
]
|
|
3678
|
+
},
|
|
3679
|
+
"reason": {
|
|
3680
|
+
"type": "string"
|
|
3681
|
+
},
|
|
3682
|
+
"auditId": {
|
|
3683
|
+
"type": "string"
|
|
3684
|
+
},
|
|
3685
|
+
"repos": {
|
|
3686
|
+
"type": "array",
|
|
3687
|
+
"items": {
|
|
3688
|
+
"type": "string"
|
|
3689
|
+
}
|
|
3690
|
+
},
|
|
3691
|
+
"installationRemoves": {
|
|
3692
|
+
"type": "array",
|
|
3693
|
+
"items": {
|
|
3694
|
+
"type": "string"
|
|
3695
|
+
}
|
|
3696
|
+
},
|
|
3697
|
+
"configRemoves": {
|
|
3698
|
+
"type": "array",
|
|
3699
|
+
"items": {
|
|
3700
|
+
"type": "string"
|
|
3701
|
+
}
|
|
3702
|
+
},
|
|
3703
|
+
"notRemoved": {
|
|
3704
|
+
"type": "array",
|
|
3705
|
+
"items": {
|
|
3706
|
+
"type": "object",
|
|
3707
|
+
"properties": {
|
|
3708
|
+
"repo": {
|
|
3709
|
+
"type": "string"
|
|
3710
|
+
},
|
|
3711
|
+
"reason": {
|
|
3712
|
+
"type": "string"
|
|
3713
|
+
}
|
|
3714
|
+
},
|
|
3715
|
+
"required": [
|
|
3716
|
+
"repo",
|
|
3717
|
+
"reason"
|
|
3718
|
+
]
|
|
3719
|
+
},
|
|
3720
|
+
"description": "Named repos left alone: the user can still push, the org was skipped, or the repo is on neither the installation nor the agent."
|
|
3721
|
+
},
|
|
3722
|
+
"skippedOrgs": {
|
|
3723
|
+
"type": "array",
|
|
3724
|
+
"items": {
|
|
3725
|
+
"type": "object",
|
|
3726
|
+
"properties": {
|
|
3727
|
+
"org": {
|
|
3728
|
+
"type": "string"
|
|
3729
|
+
},
|
|
3730
|
+
"reason": {
|
|
3731
|
+
"type": "string"
|
|
3732
|
+
}
|
|
3733
|
+
},
|
|
3734
|
+
"required": [
|
|
3735
|
+
"org",
|
|
3736
|
+
"reason"
|
|
3737
|
+
]
|
|
3738
|
+
}
|
|
3739
|
+
},
|
|
3740
|
+
"warnings": {
|
|
3741
|
+
"type": "array",
|
|
3742
|
+
"items": {
|
|
3743
|
+
"type": "string"
|
|
3744
|
+
}
|
|
3745
|
+
}
|
|
3746
|
+
},
|
|
3747
|
+
"required": [
|
|
3748
|
+
"status"
|
|
3749
|
+
]
|
|
3750
|
+
},
|
|
3751
|
+
"GithubLostAccessRemoveBody": {
|
|
3752
|
+
"type": "object",
|
|
3753
|
+
"properties": {
|
|
3754
|
+
"repos": {
|
|
3755
|
+
"type": "array",
|
|
3756
|
+
"items": {
|
|
3757
|
+
"type": "string",
|
|
3758
|
+
"pattern": "^[^/\\s]+\\/[^/\\s]+$"
|
|
3759
|
+
},
|
|
3760
|
+
"minItems": 1,
|
|
3761
|
+
"maxItems": 100,
|
|
3762
|
+
"description": "The repos (owner/repo) the admin confirmed from the preview. Each is re-checked; only those the user still cannot push to are removed."
|
|
3763
|
+
},
|
|
3764
|
+
"confirmRemovals": {
|
|
3765
|
+
"type": "boolean",
|
|
3766
|
+
"description": "Required when more than 10 repos would be removed."
|
|
3767
|
+
}
|
|
3768
|
+
},
|
|
3769
|
+
"required": [
|
|
3770
|
+
"repos"
|
|
3771
|
+
]
|
|
3772
|
+
},
|
|
3583
3773
|
"AgentConfigResponse": {
|
|
3584
3774
|
"type": "object",
|
|
3585
3775
|
"properties": {
|
|
@@ -4547,7 +4737,7 @@
|
|
|
4547
4737
|
"/agents/{id}/repos/{owner}/{name}": {
|
|
4548
4738
|
"delete": {
|
|
4549
4739
|
"summary": "Remove a repo from an agent",
|
|
4550
|
-
"description": "Admin, the agent's own key, or platform.ops. Removes one `owner/name` repo from the agent's `repos`, preserving the order of the rest. 404 when the agent does not have that repo. Returns the full updated agent.",
|
|
4740
|
+
"description": "Admin, the agent's own key, or platform.ops. Removes one `owner/name` repo from the agent's `repos`, preserving the order of the rest. The agent's open work on the repo is blocked through the optional open-work port (a failure there is a warning; the removal still succeeds), whoever the caller is; re-adding the repo never unblocks it. 404 when the agent does not have that repo. Returns the full updated agent.",
|
|
4551
4741
|
"parameters": [
|
|
4552
4742
|
{
|
|
4553
4743
|
"schema": {
|
|
@@ -4611,6 +4801,110 @@
|
|
|
4611
4801
|
}
|
|
4612
4802
|
}
|
|
4613
4803
|
},
|
|
4804
|
+
"/agents/{id}/repos/{owner}/{name}/removal-preview": {
|
|
4805
|
+
"get": {
|
|
4806
|
+
"summary": "Preview the open work blocked by removing a repo from an agent",
|
|
4807
|
+
"description": "Admin or session member. Read-only: lists the agent's open tasks and PRs that removing `owner/name` from its repos would block (via the optional open-work port); nothing is changed. `openWork` is empty when no port is wired; a port failure is reported in `warnings`. 404 when the agent does not have that repo.",
|
|
4808
|
+
"parameters": [
|
|
4809
|
+
{
|
|
4810
|
+
"schema": {
|
|
4811
|
+
"type": "string",
|
|
4812
|
+
"example": "clx1234567890"
|
|
4813
|
+
},
|
|
4814
|
+
"required": true,
|
|
4815
|
+
"name": "id",
|
|
4816
|
+
"in": "path"
|
|
4817
|
+
},
|
|
4818
|
+
{
|
|
4819
|
+
"schema": {
|
|
4820
|
+
"type": "string",
|
|
4821
|
+
"example": "my-org"
|
|
4822
|
+
},
|
|
4823
|
+
"required": true,
|
|
4824
|
+
"name": "owner",
|
|
4825
|
+
"in": "path"
|
|
4826
|
+
},
|
|
4827
|
+
{
|
|
4828
|
+
"schema": {
|
|
4829
|
+
"type": "string",
|
|
4830
|
+
"example": "my-repo"
|
|
4831
|
+
},
|
|
4832
|
+
"required": true,
|
|
4833
|
+
"name": "name",
|
|
4834
|
+
"in": "path"
|
|
4835
|
+
}
|
|
4836
|
+
],
|
|
4837
|
+
"responses": {
|
|
4838
|
+
"200": {
|
|
4839
|
+
"description": "Open work that would be blocked",
|
|
4840
|
+
"content": {
|
|
4841
|
+
"application/json": {
|
|
4842
|
+
"schema": {
|
|
4843
|
+
"type": "object",
|
|
4844
|
+
"properties": {
|
|
4845
|
+
"repo": {
|
|
4846
|
+
"type": "string"
|
|
4847
|
+
},
|
|
4848
|
+
"openWork": {
|
|
4849
|
+
"type": "array",
|
|
4850
|
+
"items": {
|
|
4851
|
+
"type": "object",
|
|
4852
|
+
"properties": {
|
|
4853
|
+
"id": {
|
|
4854
|
+
"type": "string"
|
|
4855
|
+
},
|
|
4856
|
+
"repo": {
|
|
4857
|
+
"type": "string"
|
|
4858
|
+
},
|
|
4859
|
+
"title": {
|
|
4860
|
+
"type": "string"
|
|
4861
|
+
}
|
|
4862
|
+
},
|
|
4863
|
+
"required": [
|
|
4864
|
+
"id",
|
|
4865
|
+
"repo"
|
|
4866
|
+
]
|
|
4867
|
+
}
|
|
4868
|
+
},
|
|
4869
|
+
"warnings": {
|
|
4870
|
+
"type": "array",
|
|
4871
|
+
"items": {
|
|
4872
|
+
"type": "string"
|
|
4873
|
+
}
|
|
4874
|
+
}
|
|
4875
|
+
},
|
|
4876
|
+
"required": [
|
|
4877
|
+
"repo",
|
|
4878
|
+
"openWork",
|
|
4879
|
+
"warnings"
|
|
4880
|
+
]
|
|
4881
|
+
}
|
|
4882
|
+
}
|
|
4883
|
+
}
|
|
4884
|
+
},
|
|
4885
|
+
"403": {
|
|
4886
|
+
"description": "Forbidden",
|
|
4887
|
+
"content": {
|
|
4888
|
+
"application/json": {
|
|
4889
|
+
"schema": {
|
|
4890
|
+
"$ref": "#/components/schemas/Error"
|
|
4891
|
+
}
|
|
4892
|
+
}
|
|
4893
|
+
}
|
|
4894
|
+
},
|
|
4895
|
+
"404": {
|
|
4896
|
+
"description": "Agent or repo not found",
|
|
4897
|
+
"content": {
|
|
4898
|
+
"application/json": {
|
|
4899
|
+
"schema": {
|
|
4900
|
+
"$ref": "#/components/schemas/Error"
|
|
4901
|
+
}
|
|
4902
|
+
}
|
|
4903
|
+
}
|
|
4904
|
+
}
|
|
4905
|
+
}
|
|
4906
|
+
}
|
|
4907
|
+
},
|
|
4614
4908
|
"/agents": {
|
|
4615
4909
|
"get": {
|
|
4616
4910
|
"summary": "List all agents",
|
|
@@ -7676,6 +7970,184 @@
|
|
|
7676
7970
|
}
|
|
7677
7971
|
}
|
|
7678
7972
|
},
|
|
7973
|
+
"/agents/{id}/github-lost-access/preview": {
|
|
7974
|
+
"get": {
|
|
7975
|
+
"summary": "Preview removing the repos the bound user can no longer push to",
|
|
7976
|
+
"description": "Platform-admin only (session members, ops keys and agent keys get 403). Read-only: nothing is changed or audited. Lists the repos on the agent App's installation or in the agent's repos that the bound githubUsername can no longer push to, and the agent's open tasks and PRs on them (via the optional open-work port; a port failure is a warning). Orgs whose access listing is missing, partial or failed, or whose lookup App is installed on selected repositories only, are skipped and reported. 200 with `status: skipped` when the user is unbound, not found or unverified, the agent has no GH_APP_ID, or the Apps are not configured.",
|
|
7977
|
+
"parameters": [
|
|
7978
|
+
{
|
|
7979
|
+
"schema": {
|
|
7980
|
+
"type": "string",
|
|
7981
|
+
"example": "clx1234567890"
|
|
7982
|
+
},
|
|
7983
|
+
"required": true,
|
|
7984
|
+
"name": "id",
|
|
7985
|
+
"in": "path"
|
|
7986
|
+
}
|
|
7987
|
+
],
|
|
7988
|
+
"responses": {
|
|
7989
|
+
"200": {
|
|
7990
|
+
"description": "Lost-access removal preview",
|
|
7991
|
+
"content": {
|
|
7992
|
+
"application/json": {
|
|
7993
|
+
"schema": {
|
|
7994
|
+
"$ref": "#/components/schemas/GithubLostAccessPreview"
|
|
7995
|
+
}
|
|
7996
|
+
}
|
|
7997
|
+
}
|
|
7998
|
+
},
|
|
7999
|
+
"401": {
|
|
8000
|
+
"description": "Unauthorized",
|
|
8001
|
+
"content": {
|
|
8002
|
+
"application/json": {
|
|
8003
|
+
"schema": {
|
|
8004
|
+
"$ref": "#/components/schemas/Error"
|
|
8005
|
+
}
|
|
8006
|
+
}
|
|
8007
|
+
}
|
|
8008
|
+
},
|
|
8009
|
+
"403": {
|
|
8010
|
+
"description": "Platform admin required",
|
|
8011
|
+
"content": {
|
|
8012
|
+
"application/json": {
|
|
8013
|
+
"schema": {
|
|
8014
|
+
"$ref": "#/components/schemas/Error"
|
|
8015
|
+
}
|
|
8016
|
+
}
|
|
8017
|
+
}
|
|
8018
|
+
},
|
|
8019
|
+
"404": {
|
|
8020
|
+
"description": "Agent not found",
|
|
8021
|
+
"content": {
|
|
8022
|
+
"application/json": {
|
|
8023
|
+
"schema": {
|
|
8024
|
+
"$ref": "#/components/schemas/Error"
|
|
8025
|
+
}
|
|
8026
|
+
}
|
|
8027
|
+
}
|
|
8028
|
+
},
|
|
8029
|
+
"502": {
|
|
8030
|
+
"description": "GitHub unavailable or refused",
|
|
8031
|
+
"content": {
|
|
8032
|
+
"application/json": {
|
|
8033
|
+
"schema": {
|
|
8034
|
+
"$ref": "#/components/schemas/Error"
|
|
8035
|
+
}
|
|
8036
|
+
}
|
|
8037
|
+
}
|
|
8038
|
+
},
|
|
8039
|
+
"503": {
|
|
8040
|
+
"description": "GitHub Apps are not configured",
|
|
8041
|
+
"content": {
|
|
8042
|
+
"application/json": {
|
|
8043
|
+
"schema": {
|
|
8044
|
+
"$ref": "#/components/schemas/Error"
|
|
8045
|
+
}
|
|
8046
|
+
}
|
|
8047
|
+
}
|
|
8048
|
+
}
|
|
8049
|
+
}
|
|
8050
|
+
}
|
|
8051
|
+
},
|
|
8052
|
+
"/agents/{id}/github-lost-access/remove": {
|
|
8053
|
+
"post": {
|
|
8054
|
+
"summary": "Remove the confirmed repos the bound user can no longer push to",
|
|
8055
|
+
"description": "Platform-admin only. Never adds repos. Takes the repos the admin confirmed from the preview, re-checks each against the bound user's current access, and removes only those still without push access: first from the agent App's installation, then from the agent's repos; then writes one audit entry (GitHubReconcileAudit, planHash `lost-access:remove`) and blocks the agent's open work on the removed repos through the optional open-work port (a failure there is a warning). Named repos left alone are reported in `notRemoved`. Same skip rules as the preview: a skipped call (200 `status: skipped`) changes and audits nothing; `noop` when nothing named still lacks access. 422 when more than 10 repos would be removed without `confirmRemovals: true`. 502 when GitHub refuses (a failed audit entry records only what landed).",
|
|
8056
|
+
"parameters": [
|
|
8057
|
+
{
|
|
8058
|
+
"schema": {
|
|
8059
|
+
"type": "string",
|
|
8060
|
+
"example": "clx1234567890"
|
|
8061
|
+
},
|
|
8062
|
+
"required": true,
|
|
8063
|
+
"name": "id",
|
|
8064
|
+
"in": "path"
|
|
8065
|
+
}
|
|
8066
|
+
],
|
|
8067
|
+
"requestBody": {
|
|
8068
|
+
"required": true,
|
|
8069
|
+
"content": {
|
|
8070
|
+
"application/json": {
|
|
8071
|
+
"schema": {
|
|
8072
|
+
"$ref": "#/components/schemas/GithubLostAccessRemoveBody"
|
|
8073
|
+
}
|
|
8074
|
+
}
|
|
8075
|
+
}
|
|
8076
|
+
},
|
|
8077
|
+
"responses": {
|
|
8078
|
+
"200": {
|
|
8079
|
+
"description": "Removal result",
|
|
8080
|
+
"content": {
|
|
8081
|
+
"application/json": {
|
|
8082
|
+
"schema": {
|
|
8083
|
+
"$ref": "#/components/schemas/GithubLostAccessRemoveResult"
|
|
8084
|
+
}
|
|
8085
|
+
}
|
|
8086
|
+
}
|
|
8087
|
+
},
|
|
8088
|
+
"401": {
|
|
8089
|
+
"description": "Unauthorized",
|
|
8090
|
+
"content": {
|
|
8091
|
+
"application/json": {
|
|
8092
|
+
"schema": {
|
|
8093
|
+
"$ref": "#/components/schemas/Error"
|
|
8094
|
+
}
|
|
8095
|
+
}
|
|
8096
|
+
}
|
|
8097
|
+
},
|
|
8098
|
+
"403": {
|
|
8099
|
+
"description": "Platform admin required",
|
|
8100
|
+
"content": {
|
|
8101
|
+
"application/json": {
|
|
8102
|
+
"schema": {
|
|
8103
|
+
"$ref": "#/components/schemas/Error"
|
|
8104
|
+
}
|
|
8105
|
+
}
|
|
8106
|
+
}
|
|
8107
|
+
},
|
|
8108
|
+
"404": {
|
|
8109
|
+
"description": "Agent not found",
|
|
8110
|
+
"content": {
|
|
8111
|
+
"application/json": {
|
|
8112
|
+
"schema": {
|
|
8113
|
+
"$ref": "#/components/schemas/Error"
|
|
8114
|
+
}
|
|
8115
|
+
}
|
|
8116
|
+
}
|
|
8117
|
+
},
|
|
8118
|
+
"422": {
|
|
8119
|
+
"description": "Removal cap needs confirmRemovals",
|
|
8120
|
+
"content": {
|
|
8121
|
+
"application/json": {
|
|
8122
|
+
"schema": {
|
|
8123
|
+
"$ref": "#/components/schemas/Error"
|
|
8124
|
+
}
|
|
8125
|
+
}
|
|
8126
|
+
}
|
|
8127
|
+
},
|
|
8128
|
+
"502": {
|
|
8129
|
+
"description": "GitHub unavailable or refused",
|
|
8130
|
+
"content": {
|
|
8131
|
+
"application/json": {
|
|
8132
|
+
"schema": {
|
|
8133
|
+
"$ref": "#/components/schemas/Error"
|
|
8134
|
+
}
|
|
8135
|
+
}
|
|
8136
|
+
}
|
|
8137
|
+
},
|
|
8138
|
+
"503": {
|
|
8139
|
+
"description": "GitHub Apps are not configured",
|
|
8140
|
+
"content": {
|
|
8141
|
+
"application/json": {
|
|
8142
|
+
"schema": {
|
|
8143
|
+
"$ref": "#/components/schemas/Error"
|
|
8144
|
+
}
|
|
8145
|
+
}
|
|
8146
|
+
}
|
|
8147
|
+
}
|
|
8148
|
+
}
|
|
8149
|
+
}
|
|
8150
|
+
},
|
|
7679
8151
|
"/agents/{id}/config": {
|
|
7680
8152
|
"get": {
|
|
7681
8153
|
"tags": [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@app-vitals/agent-admin",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.34.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/app-vitals/agent.git",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@anthropic-ai/sdk": "0.135.0",
|
|
45
|
-
"@app-vitals/agent-lib": "1.
|
|
45
|
+
"@app-vitals/agent-lib": "1.34.0",
|
|
46
46
|
"@hono/zod-openapi": "^1.0.0",
|
|
47
47
|
"@prisma/adapter-pg": "^7.10.0",
|
|
48
48
|
"@prisma/client": "^7.10.0",
|
package/src/admin-boot.ts
CHANGED
|
@@ -107,6 +107,7 @@ import {
|
|
|
107
107
|
import { GitHubEnterpriseAppService } from "./github-enterprise-apps.ts";
|
|
108
108
|
import {
|
|
109
109
|
createGithubInstallationRepos,
|
|
110
|
+
createGithubLostAccessRemoval,
|
|
110
111
|
createGithubReconcile,
|
|
111
112
|
} from "./github-reconcile-wiring.ts";
|
|
112
113
|
import { HttpGoogleAuthClient } from "./google-auth-client.ts";
|
|
@@ -488,10 +489,21 @@ export async function startAdmin(
|
|
|
488
489
|
access: githubAccessPreview,
|
|
489
490
|
agentEnv: agentEnvService,
|
|
490
491
|
});
|
|
492
|
+
const githubLostAccessRemoval = createGithubLostAccessRemoval({
|
|
493
|
+
prisma,
|
|
494
|
+
appService: githubEnterpriseAppService,
|
|
495
|
+
access: githubAccessPreview,
|
|
496
|
+
agentEnv: agentEnvService,
|
|
497
|
+
openWork: resolvedExtensions.openWork,
|
|
498
|
+
});
|
|
491
499
|
const adminApiApp = createAdminApp({
|
|
492
500
|
githubAccessPreview,
|
|
493
501
|
githubReconcile,
|
|
502
|
+
...(resolvedExtensions.openWork
|
|
503
|
+
? { openWork: resolvedExtensions.openWork }
|
|
504
|
+
: {}),
|
|
494
505
|
githubInstallationRepos,
|
|
506
|
+
githubLostAccessRemoval,
|
|
495
507
|
agentService,
|
|
496
508
|
agentEnvService,
|
|
497
509
|
agentCronJobService,
|