@ghx-dev/core 0.1.0-beta.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/LICENSE +21 -0
- package/README.md +212 -0
- package/dist/agent-interface/prompt/main-skill.d.ts +3 -0
- package/dist/agent-interface/prompt/main-skill.js +7 -0
- package/dist/agent-interface/prompt/main-skill.js.map +1 -0
- package/dist/agent-interface/tools/execute-tool.d.ts +16 -0
- package/dist/agent-interface/tools/execute-tool.js +7 -0
- package/dist/agent-interface/tools/execute-tool.js.map +1 -0
- package/dist/agent-interface/tools/explain-tool.d.ts +11 -0
- package/dist/agent-interface/tools/explain-tool.js +9 -0
- package/dist/agent-interface/tools/explain-tool.js.map +1 -0
- package/dist/agent-interface/tools/list-capabilities-tool.d.ts +7 -0
- package/dist/agent-interface/tools/list-capabilities-tool.js +9 -0
- package/dist/agent-interface/tools/list-capabilities-tool.js.map +1 -0
- package/dist/agent.d.ts +7 -0
- package/dist/agent.js +21 -0
- package/dist/agent.js.map +1 -0
- package/dist/chunk-2W4L5YCC.js +116 -0
- package/dist/chunk-2W4L5YCC.js.map +1 -0
- package/dist/chunk-3RAT5BCB.js +584 -0
- package/dist/chunk-3RAT5BCB.js.map +1 -0
- package/dist/chunk-3RJCF42N.js +16 -0
- package/dist/chunk-3RJCF42N.js.map +1 -0
- package/dist/chunk-573MDG3I.js +18 -0
- package/dist/chunk-573MDG3I.js.map +1 -0
- package/dist/chunk-5JRLVOF2.js +50 -0
- package/dist/chunk-5JRLVOF2.js.map +1 -0
- package/dist/chunk-B6RLMKS4.js +41 -0
- package/dist/chunk-B6RLMKS4.js.map +1 -0
- package/dist/chunk-BJHVAFTN.js +42 -0
- package/dist/chunk-BJHVAFTN.js.map +1 -0
- package/dist/chunk-D746VR3B.js +38 -0
- package/dist/chunk-D746VR3B.js.map +1 -0
- package/dist/chunk-DJIEG6K7.js +20 -0
- package/dist/chunk-DJIEG6K7.js.map +1 -0
- package/dist/chunk-DLKIQBK6.js +106 -0
- package/dist/chunk-DLKIQBK6.js.map +1 -0
- package/dist/chunk-EBRDO4Y6.js +31 -0
- package/dist/chunk-EBRDO4Y6.js.map +1 -0
- package/dist/chunk-FXN6IIT5.js +14 -0
- package/dist/chunk-FXN6IIT5.js.map +1 -0
- package/dist/chunk-GPU4P7UG.js +92 -0
- package/dist/chunk-GPU4P7UG.js.map +1 -0
- package/dist/chunk-MMG6CIKK.js +44 -0
- package/dist/chunk-MMG6CIKK.js.map +1 -0
- package/dist/chunk-MT4U5DYD.js +88 -0
- package/dist/chunk-MT4U5DYD.js.map +1 -0
- package/dist/chunk-NFF5VF4U.js +28 -0
- package/dist/chunk-NFF5VF4U.js.map +1 -0
- package/dist/chunk-Q4RTT3DV.js +209 -0
- package/dist/chunk-Q4RTT3DV.js.map +1 -0
- package/dist/chunk-QEAMC4IJ.js +34 -0
- package/dist/chunk-QEAMC4IJ.js.map +1 -0
- package/dist/chunk-QX34GTH6.js +30 -0
- package/dist/chunk-QX34GTH6.js.map +1 -0
- package/dist/chunk-QZZC53HF.js +38 -0
- package/dist/chunk-QZZC53HF.js.map +1 -0
- package/dist/chunk-RUQXGZ35.js +34 -0
- package/dist/chunk-RUQXGZ35.js.map +1 -0
- package/dist/chunk-TCLMLVUQ.js +38 -0
- package/dist/chunk-TCLMLVUQ.js.map +1 -0
- package/dist/chunk-TDTKOJKN.js +52 -0
- package/dist/chunk-TDTKOJKN.js.map +1 -0
- package/dist/chunk-UGWIZ3RI.js +7 -0
- package/dist/chunk-UGWIZ3RI.js.map +1 -0
- package/dist/chunk-UOJWOHRM.js +16 -0
- package/dist/chunk-UOJWOHRM.js.map +1 -0
- package/dist/chunk-VD5NXQP7.js +42 -0
- package/dist/chunk-VD5NXQP7.js.map +1 -0
- package/dist/chunk-W2TKG2UL.js +37 -0
- package/dist/chunk-W2TKG2UL.js.map +1 -0
- package/dist/chunk-W6ROKCY5.js +28 -0
- package/dist/chunk-W6ROKCY5.js.map +1 -0
- package/dist/chunk-WYSY75U7.js +156 -0
- package/dist/chunk-WYSY75U7.js.map +1 -0
- package/dist/chunk-YNNDBMNR.js +113 -0
- package/dist/chunk-YNNDBMNR.js.map +1 -0
- package/dist/chunk-YNQNHCRS.js +198 -0
- package/dist/chunk-YNQNHCRS.js.map +1 -0
- package/dist/chunk-YQDQX4BT.js +624 -0
- package/dist/chunk-YQDQX4BT.js.map +1 -0
- package/dist/cli/commands/capabilities-explain.d.ts +3 -0
- package/dist/cli/commands/capabilities-explain.js +10 -0
- package/dist/cli/commands/capabilities-explain.js.map +1 -0
- package/dist/cli/commands/capabilities-list.d.ts +3 -0
- package/dist/cli/commands/capabilities-list.js +10 -0
- package/dist/cli/commands/capabilities-list.js.map +1 -0
- package/dist/cli/commands/doctor.d.ts +3 -0
- package/dist/cli/commands/doctor.js +7 -0
- package/dist/cli/commands/doctor.js.map +1 -0
- package/dist/cli/commands/routes.d.ts +3 -0
- package/dist/cli/commands/routes.js +7 -0
- package/dist/cli/commands/routes.js.map +1 -0
- package/dist/cli/commands/run.d.ts +3 -0
- package/dist/cli/commands/run.js +31 -0
- package/dist/cli/commands/run.js.map +1 -0
- package/dist/cli/commands/setup.d.ts +3 -0
- package/dist/cli/commands/setup.js +7 -0
- package/dist/cli/commands/setup.js.map +1 -0
- package/dist/cli/formatters/json.d.ts +3 -0
- package/dist/cli/formatters/json.js +8 -0
- package/dist/cli/formatters/json.js.map +1 -0
- package/dist/cli/formatters/table.d.ts +3 -0
- package/dist/cli/formatters/table.js +8 -0
- package/dist/cli/formatters/table.js.map +1 -0
- package/dist/cli/index.d.ts +4 -0
- package/dist/cli/index.js +118 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/core/contracts/envelope.d.ts +43 -0
- package/dist/core/contracts/envelope.js +1 -0
- package/dist/core/contracts/envelope.js.map +1 -0
- package/dist/core/contracts/task.d.ts +7 -0
- package/dist/core/contracts/task.js +1 -0
- package/dist/core/contracts/task.js.map +1 -0
- package/dist/core/contracts/tasks/check_run.annotations.list.d.ts +5 -0
- package/dist/core/contracts/tasks/check_run.annotations.list.js +8 -0
- package/dist/core/contracts/tasks/check_run.annotations.list.js.map +1 -0
- package/dist/core/contracts/tasks/issue.comments.list.d.ts +5 -0
- package/dist/core/contracts/tasks/issue.comments.list.js +8 -0
- package/dist/core/contracts/tasks/issue.comments.list.js.map +1 -0
- package/dist/core/contracts/tasks/issue.list.d.ts +5 -0
- package/dist/core/contracts/tasks/issue.list.js +8 -0
- package/dist/core/contracts/tasks/issue.list.js.map +1 -0
- package/dist/core/contracts/tasks/issue.view.d.ts +5 -0
- package/dist/core/contracts/tasks/issue.view.js +8 -0
- package/dist/core/contracts/tasks/issue.view.js.map +1 -0
- package/dist/core/contracts/tasks/pr.checks.get_failed.d.ts +5 -0
- package/dist/core/contracts/tasks/pr.checks.get_failed.js +8 -0
- package/dist/core/contracts/tasks/pr.checks.get_failed.js.map +1 -0
- package/dist/core/contracts/tasks/pr.comment.reply.d.ts +5 -0
- package/dist/core/contracts/tasks/pr.comment.reply.js +8 -0
- package/dist/core/contracts/tasks/pr.comment.reply.js.map +1 -0
- package/dist/core/contracts/tasks/pr.comment.resolve.d.ts +5 -0
- package/dist/core/contracts/tasks/pr.comment.resolve.js +8 -0
- package/dist/core/contracts/tasks/pr.comment.resolve.js.map +1 -0
- package/dist/core/contracts/tasks/pr.comment.unresolve.d.ts +5 -0
- package/dist/core/contracts/tasks/pr.comment.unresolve.js +8 -0
- package/dist/core/contracts/tasks/pr.comment.unresolve.js.map +1 -0
- package/dist/core/contracts/tasks/pr.comments.list.d.ts +5 -0
- package/dist/core/contracts/tasks/pr.comments.list.js +8 -0
- package/dist/core/contracts/tasks/pr.comments.list.js.map +1 -0
- package/dist/core/contracts/tasks/pr.diff.list_files.d.ts +5 -0
- package/dist/core/contracts/tasks/pr.diff.list_files.js +8 -0
- package/dist/core/contracts/tasks/pr.diff.list_files.js.map +1 -0
- package/dist/core/contracts/tasks/pr.list.d.ts +5 -0
- package/dist/core/contracts/tasks/pr.list.js +8 -0
- package/dist/core/contracts/tasks/pr.list.js.map +1 -0
- package/dist/core/contracts/tasks/pr.mergeability.view.d.ts +5 -0
- package/dist/core/contracts/tasks/pr.mergeability.view.js +8 -0
- package/dist/core/contracts/tasks/pr.mergeability.view.js.map +1 -0
- package/dist/core/contracts/tasks/pr.ready_for_review.set.d.ts +5 -0
- package/dist/core/contracts/tasks/pr.ready_for_review.set.js +8 -0
- package/dist/core/contracts/tasks/pr.ready_for_review.set.js.map +1 -0
- package/dist/core/contracts/tasks/pr.reviews.list.d.ts +5 -0
- package/dist/core/contracts/tasks/pr.reviews.list.js +8 -0
- package/dist/core/contracts/tasks/pr.reviews.list.js.map +1 -0
- package/dist/core/contracts/tasks/pr.status.checks.d.ts +5 -0
- package/dist/core/contracts/tasks/pr.status.checks.js +8 -0
- package/dist/core/contracts/tasks/pr.status.checks.js.map +1 -0
- package/dist/core/contracts/tasks/pr.view.d.ts +5 -0
- package/dist/core/contracts/tasks/pr.view.js +8 -0
- package/dist/core/contracts/tasks/pr.view.js.map +1 -0
- package/dist/core/contracts/tasks/repo.view.d.ts +5 -0
- package/dist/core/contracts/tasks/repo.view.js +8 -0
- package/dist/core/contracts/tasks/repo.view.js.map +1 -0
- package/dist/core/contracts/tasks/workflow_job.logs.analyze.d.ts +5 -0
- package/dist/core/contracts/tasks/workflow_job.logs.analyze.js +8 -0
- package/dist/core/contracts/tasks/workflow_job.logs.analyze.js.map +1 -0
- package/dist/core/contracts/tasks/workflow_job.logs.get.d.ts +5 -0
- package/dist/core/contracts/tasks/workflow_job.logs.get.js +8 -0
- package/dist/core/contracts/tasks/workflow_job.logs.get.js.map +1 -0
- package/dist/core/contracts/tasks/workflow_run.jobs.list.d.ts +5 -0
- package/dist/core/contracts/tasks/workflow_run.jobs.list.js +8 -0
- package/dist/core/contracts/tasks/workflow_run.jobs.list.js.map +1 -0
- package/dist/core/contracts/tasks/workflow_runs.list.d.ts +5 -0
- package/dist/core/contracts/tasks/workflow_runs.list.js +8 -0
- package/dist/core/contracts/tasks/workflow_runs.list.js.map +1 -0
- package/dist/core/errors/codes.d.ts +13 -0
- package/dist/core/errors/codes.js +7 -0
- package/dist/core/errors/codes.js.map +1 -0
- package/dist/core/errors/map-error.d.ts +5 -0
- package/dist/core/errors/map-error.js +8 -0
- package/dist/core/errors/map-error.js.map +1 -0
- package/dist/core/errors/retryability.d.ts +3 -0
- package/dist/core/errors/retryability.js +8 -0
- package/dist/core/errors/retryability.js.map +1 -0
- package/dist/core/execute/execute.d.ts +28 -0
- package/dist/core/execute/execute.js +11 -0
- package/dist/core/execute/execute.js.map +1 -0
- package/dist/core/execution/adapters/cli-adapter.d.ts +22 -0
- package/dist/core/execution/adapters/cli-adapter.js +69 -0
- package/dist/core/execution/adapters/cli-adapter.js.map +1 -0
- package/dist/core/execution/adapters/cli-capability-adapter.d.ts +16 -0
- package/dist/core/execution/adapters/cli-capability-adapter.js +11 -0
- package/dist/core/execution/adapters/cli-capability-adapter.js.map +1 -0
- package/dist/core/execution/adapters/graphql-adapter.d.ts +25 -0
- package/dist/core/execution/adapters/graphql-adapter.js +44 -0
- package/dist/core/execution/adapters/graphql-adapter.js.map +1 -0
- package/dist/core/execution/adapters/graphql-capability-adapter.d.ts +20 -0
- package/dist/core/execution/adapters/graphql-capability-adapter.js +11 -0
- package/dist/core/execution/adapters/graphql-capability-adapter.js.map +1 -0
- package/dist/core/execution/adapters/rest-adapter.d.ts +3 -0
- package/dist/core/execution/adapters/rest-adapter.js +8 -0
- package/dist/core/execution/adapters/rest-adapter.js.map +1 -0
- package/dist/core/execution/cli/safe-runner.d.ts +12 -0
- package/dist/core/execution/cli/safe-runner.js +7 -0
- package/dist/core/execution/cli/safe-runner.js.map +1 -0
- package/dist/core/execution/normalizer.d.ts +13 -0
- package/dist/core/execution/normalizer.js +9 -0
- package/dist/core/execution/normalizer.js.map +1 -0
- package/dist/core/execution/preflight.d.ts +24 -0
- package/dist/core/execution/preflight.js +8 -0
- package/dist/core/execution/preflight.js.map +1 -0
- package/dist/core/registry/cards/check_run.annotations.list.yaml +35 -0
- package/dist/core/registry/cards/issue.comments.list.yaml +48 -0
- package/dist/core/registry/cards/issue.list.yaml +48 -0
- package/dist/core/registry/cards/issue.view.yaml +32 -0
- package/dist/core/registry/cards/pr.checks.get_failed.yaml +42 -0
- package/dist/core/registry/cards/pr.comment.reply.yaml +23 -0
- package/dist/core/registry/cards/pr.comment.resolve.yaml +22 -0
- package/dist/core/registry/cards/pr.comment.unresolve.yaml +22 -0
- package/dist/core/registry/cards/pr.comments.list.yaml +98 -0
- package/dist/core/registry/cards/pr.diff.list_files.yaml +43 -0
- package/dist/core/registry/cards/pr.list.yaml +48 -0
- package/dist/core/registry/cards/pr.mergeability.view.yaml +27 -0
- package/dist/core/registry/cards/pr.ready_for_review.set.yaml +24 -0
- package/dist/core/registry/cards/pr.reviews.list.yaml +47 -0
- package/dist/core/registry/cards/pr.status.checks.yaml +42 -0
- package/dist/core/registry/cards/pr.view.yaml +32 -0
- package/dist/core/registry/cards/repo.view.yaml +34 -0
- package/dist/core/registry/cards/workflow_job.logs.analyze.yaml +33 -0
- package/dist/core/registry/cards/workflow_job.logs.get.yaml +24 -0
- package/dist/core/registry/cards/workflow_run.jobs.list.yaml +35 -0
- package/dist/core/registry/cards/workflow_runs.list.yaml +45 -0
- package/dist/core/registry/index.d.ts +15 -0
- package/dist/core/registry/index.js +12 -0
- package/dist/core/registry/index.js.map +1 -0
- package/dist/core/registry/operation-card-schema.d.ts +167 -0
- package/dist/core/registry/operation-card-schema.js +7 -0
- package/dist/core/registry/operation-card-schema.js.map +1 -0
- package/dist/core/registry/schema-validator.d.ts +16 -0
- package/dist/core/registry/schema-validator.js +9 -0
- package/dist/core/registry/schema-validator.js.map +1 -0
- package/dist/core/registry/types.d.ts +51 -0
- package/dist/core/registry/types.js +1 -0
- package/dist/core/registry/types.js.map +1 -0
- package/dist/core/routing/capability-registry.d.ts +8 -0
- package/dist/core/routing/capability-registry.js +15 -0
- package/dist/core/routing/capability-registry.js.map +1 -0
- package/dist/core/routing/engine.d.ts +32 -0
- package/dist/core/routing/engine.js +23 -0
- package/dist/core/routing/engine.js.map +1 -0
- package/dist/core/routing/policy.d.ts +3 -0
- package/dist/core/routing/policy.js +7 -0
- package/dist/core/routing/policy.js.map +1 -0
- package/dist/core/routing/reason-codes.d.ts +4 -0
- package/dist/core/routing/reason-codes.js +15 -0
- package/dist/core/routing/reason-codes.js.map +1 -0
- package/dist/core/telemetry/logger.d.ts +8 -0
- package/dist/core/telemetry/logger.js +9 -0
- package/dist/core/telemetry/logger.js.map +1 -0
- package/dist/core/telemetry/metrics.d.ts +7 -0
- package/dist/core/telemetry/metrics.js +1 -0
- package/dist/core/telemetry/metrics.js.map +1 -0
- package/dist/gql/client.d.ts +183 -0
- package/dist/gql/client.js +17 -0
- package/dist/gql/client.js.map +1 -0
- package/dist/gql/generated/common-types.d.ts +36 -0
- package/dist/gql/generated/common-types.js +1 -0
- package/dist/gql/generated/common-types.js.map +1 -0
- package/dist/gql/operations/issue-comments-list.generated.d.ts +59 -0
- package/dist/gql/operations/issue-comments-list.generated.js +9 -0
- package/dist/gql/operations/issue-comments-list.generated.js.map +1 -0
- package/dist/gql/operations/issue-list.generated.d.ts +40 -0
- package/dist/gql/operations/issue-list.generated.js +9 -0
- package/dist/gql/operations/issue-list.generated.js.map +1 -0
- package/dist/gql/operations/issue-view.generated.d.ts +31 -0
- package/dist/gql/operations/issue-view.generated.js +9 -0
- package/dist/gql/operations/issue-view.generated.js.map +1 -0
- package/dist/gql/operations/pr-comment-reply.generated.d.ts +26 -0
- package/dist/gql/operations/pr-comment-reply.generated.js +25 -0
- package/dist/gql/operations/pr-comment-reply.generated.js.map +1 -0
- package/dist/gql/operations/pr-comment-resolve.generated.d.ts +26 -0
- package/dist/gql/operations/pr-comment-resolve.generated.js +24 -0
- package/dist/gql/operations/pr-comment-resolve.generated.js.map +1 -0
- package/dist/gql/operations/pr-comment-unresolve.generated.d.ts +26 -0
- package/dist/gql/operations/pr-comment-unresolve.generated.js +24 -0
- package/dist/gql/operations/pr-comment-unresolve.generated.js.map +1 -0
- package/dist/gql/operations/pr-comments-list.generated.d.ts +84 -0
- package/dist/gql/operations/pr-comments-list.generated.js +58 -0
- package/dist/gql/operations/pr-comments-list.generated.js.map +1 -0
- package/dist/gql/operations/pr-diff-list-files.generated.d.ts +42 -0
- package/dist/gql/operations/pr-diff-list-files.generated.js +9 -0
- package/dist/gql/operations/pr-diff-list-files.generated.js.map +1 -0
- package/dist/gql/operations/pr-list.generated.d.ts +40 -0
- package/dist/gql/operations/pr-list.generated.js +9 -0
- package/dist/gql/operations/pr-list.generated.js.map +1 -0
- package/dist/gql/operations/pr-reviews-list.generated.d.ts +64 -0
- package/dist/gql/operations/pr-reviews-list.generated.js +9 -0
- package/dist/gql/operations/pr-reviews-list.generated.js.map +1 -0
- package/dist/gql/operations/pr-view.generated.d.ts +31 -0
- package/dist/gql/operations/pr-view.generated.js +9 -0
- package/dist/gql/operations/pr-view.generated.js.map +1 -0
- package/dist/gql/operations/repo-view.generated.d.ts +33 -0
- package/dist/gql/operations/repo-view.generated.js +9 -0
- package/dist/gql/operations/repo-view.generated.js.map +1 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.js +43 -0
- package/dist/index.js.map +1 -0
- package/dist/shared/constants.d.ts +3 -0
- package/dist/shared/constants.js +6 -0
- package/dist/shared/constants.js.map +1 -0
- package/dist/shared/types.d.ts +3 -0
- package/dist/shared/types.js +1 -0
- package/dist/shared/types.js.map +1 -0
- package/dist/shared/utils.d.ts +3 -0
- package/dist/shared/utils.js +8 -0
- package/dist/shared/utils.js.map +1 -0
- package/package.json +79 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
capability_id: pr.reviews.list
|
|
2
|
+
version: "1.0.0"
|
|
3
|
+
description: List pull request reviews.
|
|
4
|
+
input_schema:
|
|
5
|
+
type: object
|
|
6
|
+
required: [owner, name, prNumber]
|
|
7
|
+
properties:
|
|
8
|
+
owner: { type: string, minLength: 1 }
|
|
9
|
+
name: { type: string, minLength: 1 }
|
|
10
|
+
prNumber: { type: integer, minimum: 1 }
|
|
11
|
+
first: { type: integer, minimum: 1 }
|
|
12
|
+
after: { type: [string, "null"] }
|
|
13
|
+
additionalProperties: false
|
|
14
|
+
output_schema:
|
|
15
|
+
type: object
|
|
16
|
+
required: [items, pageInfo]
|
|
17
|
+
properties:
|
|
18
|
+
items:
|
|
19
|
+
type: array
|
|
20
|
+
items:
|
|
21
|
+
type: object
|
|
22
|
+
required: [id, authorLogin, body, state, submittedAt, url, commitOid]
|
|
23
|
+
properties:
|
|
24
|
+
id: { type: string, minLength: 1 }
|
|
25
|
+
authorLogin: { type: [string, "null"] }
|
|
26
|
+
body: { type: string }
|
|
27
|
+
state: { type: string }
|
|
28
|
+
submittedAt: { type: [string, "null"] }
|
|
29
|
+
url: { type: string, minLength: 1 }
|
|
30
|
+
commitOid: { type: [string, "null"] }
|
|
31
|
+
additionalProperties: false
|
|
32
|
+
pageInfo:
|
|
33
|
+
type: object
|
|
34
|
+
required: [hasNextPage, endCursor]
|
|
35
|
+
properties:
|
|
36
|
+
hasNextPage: { type: boolean }
|
|
37
|
+
endCursor: { type: [string, "null"] }
|
|
38
|
+
additionalProperties: false
|
|
39
|
+
additionalProperties: false
|
|
40
|
+
routing:
|
|
41
|
+
preferred: graphql
|
|
42
|
+
fallbacks: []
|
|
43
|
+
graphql:
|
|
44
|
+
operationName: PrReviewsList
|
|
45
|
+
documentPath: src/gql/operations/pr-reviews-list.graphql
|
|
46
|
+
cli:
|
|
47
|
+
command: pr view
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
capability_id: pr.status.checks
|
|
2
|
+
version: "1.0.0"
|
|
3
|
+
description: List pull request check statuses with summary counts.
|
|
4
|
+
input_schema:
|
|
5
|
+
type: object
|
|
6
|
+
required: [owner, name, prNumber]
|
|
7
|
+
properties:
|
|
8
|
+
owner: { type: string, minLength: 1 }
|
|
9
|
+
name: { type: string, minLength: 1 }
|
|
10
|
+
prNumber: { type: integer, minimum: 1 }
|
|
11
|
+
additionalProperties: false
|
|
12
|
+
output_schema:
|
|
13
|
+
type: object
|
|
14
|
+
required: [items, summary]
|
|
15
|
+
properties:
|
|
16
|
+
items:
|
|
17
|
+
type: array
|
|
18
|
+
items:
|
|
19
|
+
type: object
|
|
20
|
+
required: [name, state, workflow, link]
|
|
21
|
+
properties:
|
|
22
|
+
name: { type: [string, "null"] }
|
|
23
|
+
state: { type: [string, "null"] }
|
|
24
|
+
workflow: { type: [string, "null"] }
|
|
25
|
+
link: { type: [string, "null"] }
|
|
26
|
+
additionalProperties: false
|
|
27
|
+
summary:
|
|
28
|
+
type: object
|
|
29
|
+
required: [total, failed, pending, passed]
|
|
30
|
+
properties:
|
|
31
|
+
total: { type: integer, minimum: 0 }
|
|
32
|
+
failed: { type: integer, minimum: 0 }
|
|
33
|
+
pending: { type: integer, minimum: 0 }
|
|
34
|
+
passed: { type: integer, minimum: 0 }
|
|
35
|
+
additionalProperties: false
|
|
36
|
+
additionalProperties: false
|
|
37
|
+
routing:
|
|
38
|
+
preferred: cli
|
|
39
|
+
fallbacks: []
|
|
40
|
+
cli:
|
|
41
|
+
command: pr checks
|
|
42
|
+
jsonFields: [name, state, workflow, link]
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
capability_id: pr.view
|
|
2
|
+
version: "1.0.0"
|
|
3
|
+
description: Fetch one pull request by number.
|
|
4
|
+
input_schema:
|
|
5
|
+
type: object
|
|
6
|
+
required: [owner, name, prNumber]
|
|
7
|
+
properties:
|
|
8
|
+
owner: { type: string, minLength: 1 }
|
|
9
|
+
name: { type: string, minLength: 1 }
|
|
10
|
+
prNumber: { type: integer, minimum: 1 }
|
|
11
|
+
additionalProperties: false
|
|
12
|
+
output_schema:
|
|
13
|
+
type: object
|
|
14
|
+
required: [id, number, title, state, url]
|
|
15
|
+
properties:
|
|
16
|
+
id: { type: string, minLength: 1 }
|
|
17
|
+
number: { type: integer, minimum: 1 }
|
|
18
|
+
title: { type: string }
|
|
19
|
+
state: { type: string }
|
|
20
|
+
url: { type: string, minLength: 1 }
|
|
21
|
+
additionalProperties: false
|
|
22
|
+
routing:
|
|
23
|
+
preferred: cli
|
|
24
|
+
fallbacks: [graphql]
|
|
25
|
+
notes:
|
|
26
|
+
- Prefer CLI for low-latency structured fetches when gh authentication is available.
|
|
27
|
+
graphql:
|
|
28
|
+
operationName: PrView
|
|
29
|
+
documentPath: src/gql/operations/pr-view.graphql
|
|
30
|
+
cli:
|
|
31
|
+
command: pr view
|
|
32
|
+
jsonFields: [id, number, title, state, url]
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
capability_id: repo.view
|
|
2
|
+
version: "1.0.0"
|
|
3
|
+
description: Fetch repository metadata.
|
|
4
|
+
input_schema:
|
|
5
|
+
type: object
|
|
6
|
+
required: [owner, name]
|
|
7
|
+
properties:
|
|
8
|
+
owner: { type: string, minLength: 1 }
|
|
9
|
+
name: { type: string, minLength: 1 }
|
|
10
|
+
additionalProperties: false
|
|
11
|
+
output_schema:
|
|
12
|
+
type: object
|
|
13
|
+
required: [id, name, nameWithOwner, isPrivate, url, defaultBranch]
|
|
14
|
+
properties:
|
|
15
|
+
id: { type: string, minLength: 1 }
|
|
16
|
+
name: { type: string, minLength: 1 }
|
|
17
|
+
nameWithOwner: { type: string, minLength: 1 }
|
|
18
|
+
isPrivate: { type: boolean }
|
|
19
|
+
stargazerCount: { type: integer, minimum: 0 }
|
|
20
|
+
forkCount: { type: integer, minimum: 0 }
|
|
21
|
+
url: { type: string, minLength: 1 }
|
|
22
|
+
defaultBranch: { type: [string, "null"] }
|
|
23
|
+
additionalProperties: false
|
|
24
|
+
routing:
|
|
25
|
+
preferred: cli
|
|
26
|
+
fallbacks: [graphql]
|
|
27
|
+
notes:
|
|
28
|
+
- Prefer CLI for low-latency structured fetches when gh authentication is available.
|
|
29
|
+
graphql:
|
|
30
|
+
operationName: RepoView
|
|
31
|
+
documentPath: src/gql/operations/repo-view.graphql
|
|
32
|
+
cli:
|
|
33
|
+
command: repo view
|
|
34
|
+
jsonFields: [id, name, nameWithOwner, isPrivate, stargazerCount, forkCount, url, defaultBranchRef]
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
capability_id: workflow_job.logs.analyze
|
|
2
|
+
version: "1.0.0"
|
|
3
|
+
description: Fetch and analyze workflow job logs.
|
|
4
|
+
input_schema:
|
|
5
|
+
type: object
|
|
6
|
+
required: [owner, name, jobId]
|
|
7
|
+
properties:
|
|
8
|
+
owner: { type: string, minLength: 1 }
|
|
9
|
+
name: { type: string, minLength: 1 }
|
|
10
|
+
jobId: { type: integer, minimum: 1 }
|
|
11
|
+
additionalProperties: false
|
|
12
|
+
output_schema:
|
|
13
|
+
type: object
|
|
14
|
+
required: [jobId, truncated, summary]
|
|
15
|
+
properties:
|
|
16
|
+
jobId: { type: integer, minimum: 1 }
|
|
17
|
+
truncated: { type: boolean }
|
|
18
|
+
summary:
|
|
19
|
+
type: object
|
|
20
|
+
required: [errorCount, warningCount, topErrorLines]
|
|
21
|
+
properties:
|
|
22
|
+
errorCount: { type: integer, minimum: 0 }
|
|
23
|
+
warningCount: { type: integer, minimum: 0 }
|
|
24
|
+
topErrorLines:
|
|
25
|
+
type: array
|
|
26
|
+
items: { type: string }
|
|
27
|
+
additionalProperties: false
|
|
28
|
+
additionalProperties: false
|
|
29
|
+
routing:
|
|
30
|
+
preferred: cli
|
|
31
|
+
fallbacks: []
|
|
32
|
+
cli:
|
|
33
|
+
command: run view
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
capability_id: workflow_job.logs.get
|
|
2
|
+
version: "1.0.0"
|
|
3
|
+
description: Fetch logs for a workflow job.
|
|
4
|
+
input_schema:
|
|
5
|
+
type: object
|
|
6
|
+
required: [owner, name, jobId]
|
|
7
|
+
properties:
|
|
8
|
+
owner: { type: string, minLength: 1 }
|
|
9
|
+
name: { type: string, minLength: 1 }
|
|
10
|
+
jobId: { type: integer, minimum: 1 }
|
|
11
|
+
additionalProperties: false
|
|
12
|
+
output_schema:
|
|
13
|
+
type: object
|
|
14
|
+
required: [jobId, log, truncated]
|
|
15
|
+
properties:
|
|
16
|
+
jobId: { type: integer, minimum: 1 }
|
|
17
|
+
log: { type: string }
|
|
18
|
+
truncated: { type: boolean }
|
|
19
|
+
additionalProperties: false
|
|
20
|
+
routing:
|
|
21
|
+
preferred: cli
|
|
22
|
+
fallbacks: []
|
|
23
|
+
cli:
|
|
24
|
+
command: run view
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
capability_id: workflow_run.jobs.list
|
|
2
|
+
version: "1.0.0"
|
|
3
|
+
description: List jobs in a workflow run.
|
|
4
|
+
input_schema:
|
|
5
|
+
type: object
|
|
6
|
+
required: [owner, name, runId]
|
|
7
|
+
properties:
|
|
8
|
+
owner: { type: string, minLength: 1 }
|
|
9
|
+
name: { type: string, minLength: 1 }
|
|
10
|
+
runId: { type: integer, minimum: 1 }
|
|
11
|
+
additionalProperties: false
|
|
12
|
+
output_schema:
|
|
13
|
+
type: object
|
|
14
|
+
required: [items]
|
|
15
|
+
properties:
|
|
16
|
+
items:
|
|
17
|
+
type: array
|
|
18
|
+
items:
|
|
19
|
+
type: object
|
|
20
|
+
required: [id, name, status, conclusion, startedAt, completedAt, url]
|
|
21
|
+
properties:
|
|
22
|
+
id: { type: integer, minimum: 0 }
|
|
23
|
+
name: { type: [string, "null"] }
|
|
24
|
+
status: { type: [string, "null"] }
|
|
25
|
+
conclusion: { type: [string, "null"] }
|
|
26
|
+
startedAt: { type: [string, "null"] }
|
|
27
|
+
completedAt: { type: [string, "null"] }
|
|
28
|
+
url: { type: [string, "null"] }
|
|
29
|
+
additionalProperties: false
|
|
30
|
+
additionalProperties: false
|
|
31
|
+
routing:
|
|
32
|
+
preferred: cli
|
|
33
|
+
fallbacks: []
|
|
34
|
+
cli:
|
|
35
|
+
command: run view
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
capability_id: workflow_runs.list
|
|
2
|
+
version: "1.0.0"
|
|
3
|
+
description: List workflow runs for a repository.
|
|
4
|
+
input_schema:
|
|
5
|
+
type: object
|
|
6
|
+
required: [owner, name]
|
|
7
|
+
properties:
|
|
8
|
+
owner: { type: string, minLength: 1 }
|
|
9
|
+
name: { type: string, minLength: 1 }
|
|
10
|
+
first: { type: integer, minimum: 1 }
|
|
11
|
+
branch: { type: string, minLength: 1 }
|
|
12
|
+
event: { type: string, minLength: 1 }
|
|
13
|
+
status: { type: string, minLength: 1 }
|
|
14
|
+
additionalProperties: false
|
|
15
|
+
output_schema:
|
|
16
|
+
type: object
|
|
17
|
+
required: [items, pageInfo]
|
|
18
|
+
properties:
|
|
19
|
+
items:
|
|
20
|
+
type: array
|
|
21
|
+
items:
|
|
22
|
+
type: object
|
|
23
|
+
required: [id, workflowName, status, conclusion, headBranch, url]
|
|
24
|
+
properties:
|
|
25
|
+
id: { type: integer, minimum: 0 }
|
|
26
|
+
workflowName: { type: [string, "null"] }
|
|
27
|
+
status: { type: [string, "null"] }
|
|
28
|
+
conclusion: { type: [string, "null"] }
|
|
29
|
+
headBranch: { type: [string, "null"] }
|
|
30
|
+
url: { type: [string, "null"] }
|
|
31
|
+
additionalProperties: false
|
|
32
|
+
pageInfo:
|
|
33
|
+
type: object
|
|
34
|
+
required: [hasNextPage, endCursor]
|
|
35
|
+
properties:
|
|
36
|
+
hasNextPage: { type: boolean }
|
|
37
|
+
endCursor: { type: [string, "null"] }
|
|
38
|
+
additionalProperties: false
|
|
39
|
+
additionalProperties: false
|
|
40
|
+
routing:
|
|
41
|
+
preferred: cli
|
|
42
|
+
fallbacks: []
|
|
43
|
+
cli:
|
|
44
|
+
command: run list
|
|
45
|
+
jsonFields: [databaseId,workflowName,status,conclusion,headBranch,url]
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { OperationCard } from './types.js';
|
|
2
|
+
import '../contracts/envelope.js';
|
|
3
|
+
import '../routing/reason-codes.js';
|
|
4
|
+
import '../errors/codes.js';
|
|
5
|
+
|
|
6
|
+
declare function validateOperationCard(card: unknown): {
|
|
7
|
+
ok: true;
|
|
8
|
+
} | {
|
|
9
|
+
ok: false;
|
|
10
|
+
error: string;
|
|
11
|
+
};
|
|
12
|
+
declare function listOperationCards(): OperationCard[];
|
|
13
|
+
declare function getOperationCard(capabilityId: string): OperationCard | undefined;
|
|
14
|
+
|
|
15
|
+
export { getOperationCard, listOperationCards, validateOperationCard };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getOperationCard,
|
|
3
|
+
listOperationCards,
|
|
4
|
+
validateOperationCard
|
|
5
|
+
} from "../../chunk-MT4U5DYD.js";
|
|
6
|
+
import "../../chunk-2W4L5YCC.js";
|
|
7
|
+
export {
|
|
8
|
+
getOperationCard,
|
|
9
|
+
listOperationCards,
|
|
10
|
+
validateOperationCard
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
declare const operationCardSchema: {
|
|
2
|
+
readonly $id: "https://ghx.local/schemas/operation-card.json";
|
|
3
|
+
readonly type: "object";
|
|
4
|
+
readonly required: readonly ["capability_id", "version", "description", "input_schema", "output_schema", "routing"];
|
|
5
|
+
readonly properties: {
|
|
6
|
+
readonly capability_id: {
|
|
7
|
+
readonly type: "string";
|
|
8
|
+
readonly minLength: 1;
|
|
9
|
+
};
|
|
10
|
+
readonly version: {
|
|
11
|
+
readonly type: "string";
|
|
12
|
+
readonly minLength: 1;
|
|
13
|
+
};
|
|
14
|
+
readonly description: {
|
|
15
|
+
readonly type: "string";
|
|
16
|
+
readonly minLength: 1;
|
|
17
|
+
};
|
|
18
|
+
readonly input_schema: {
|
|
19
|
+
readonly type: "object";
|
|
20
|
+
};
|
|
21
|
+
readonly output_schema: {
|
|
22
|
+
readonly type: "object";
|
|
23
|
+
};
|
|
24
|
+
readonly routing: {
|
|
25
|
+
readonly type: "object";
|
|
26
|
+
readonly required: readonly ["preferred", "fallbacks"];
|
|
27
|
+
readonly properties: {
|
|
28
|
+
readonly preferred: {
|
|
29
|
+
readonly enum: readonly ["cli", "graphql", "rest"];
|
|
30
|
+
};
|
|
31
|
+
readonly fallbacks: {
|
|
32
|
+
readonly type: "array";
|
|
33
|
+
readonly items: {
|
|
34
|
+
readonly enum: readonly ["cli", "graphql", "rest"];
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
readonly suitability: {
|
|
38
|
+
readonly type: "array";
|
|
39
|
+
readonly items: {
|
|
40
|
+
readonly type: "object";
|
|
41
|
+
readonly required: readonly ["when", "predicate", "reason"];
|
|
42
|
+
readonly properties: {
|
|
43
|
+
readonly when: {
|
|
44
|
+
readonly enum: readonly ["always", "env", "params"];
|
|
45
|
+
};
|
|
46
|
+
readonly predicate: {
|
|
47
|
+
readonly type: "string";
|
|
48
|
+
readonly minLength: 1;
|
|
49
|
+
};
|
|
50
|
+
readonly reason: {
|
|
51
|
+
readonly type: "string";
|
|
52
|
+
readonly minLength: 1;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
readonly additionalProperties: false;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
readonly notes: {
|
|
59
|
+
readonly type: "array";
|
|
60
|
+
readonly items: {
|
|
61
|
+
readonly type: "string";
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
readonly additionalProperties: false;
|
|
66
|
+
};
|
|
67
|
+
readonly graphql: {
|
|
68
|
+
readonly type: "object";
|
|
69
|
+
readonly required: readonly ["operationName", "documentPath"];
|
|
70
|
+
readonly properties: {
|
|
71
|
+
readonly operationName: {
|
|
72
|
+
readonly type: "string";
|
|
73
|
+
readonly minLength: 1;
|
|
74
|
+
};
|
|
75
|
+
readonly documentPath: {
|
|
76
|
+
readonly type: "string";
|
|
77
|
+
readonly minLength: 1;
|
|
78
|
+
};
|
|
79
|
+
readonly variables: {
|
|
80
|
+
readonly type: "object";
|
|
81
|
+
};
|
|
82
|
+
readonly limits: {
|
|
83
|
+
readonly type: "object";
|
|
84
|
+
readonly properties: {
|
|
85
|
+
readonly maxPageSize: {
|
|
86
|
+
readonly type: "number";
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
readonly additionalProperties: false;
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
readonly additionalProperties: false;
|
|
93
|
+
};
|
|
94
|
+
readonly cli: {
|
|
95
|
+
readonly type: "object";
|
|
96
|
+
readonly required: readonly ["command"];
|
|
97
|
+
readonly properties: {
|
|
98
|
+
readonly command: {
|
|
99
|
+
readonly type: "string";
|
|
100
|
+
readonly minLength: 1;
|
|
101
|
+
};
|
|
102
|
+
readonly jsonFields: {
|
|
103
|
+
readonly type: "array";
|
|
104
|
+
readonly items: {
|
|
105
|
+
readonly type: "string";
|
|
106
|
+
readonly minLength: 1;
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
readonly jq: {
|
|
110
|
+
readonly type: "string";
|
|
111
|
+
};
|
|
112
|
+
readonly limits: {
|
|
113
|
+
readonly type: "object";
|
|
114
|
+
readonly properties: {
|
|
115
|
+
readonly maxItemsPerCall: {
|
|
116
|
+
readonly type: "number";
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
readonly additionalProperties: false;
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
readonly additionalProperties: false;
|
|
123
|
+
};
|
|
124
|
+
readonly rest: {
|
|
125
|
+
readonly type: "object";
|
|
126
|
+
readonly required: readonly ["endpoints"];
|
|
127
|
+
readonly properties: {
|
|
128
|
+
readonly endpoints: {
|
|
129
|
+
readonly type: "array";
|
|
130
|
+
readonly items: {
|
|
131
|
+
readonly type: "object";
|
|
132
|
+
readonly required: readonly ["method", "path"];
|
|
133
|
+
readonly properties: {
|
|
134
|
+
readonly method: {
|
|
135
|
+
readonly type: "string";
|
|
136
|
+
};
|
|
137
|
+
readonly path: {
|
|
138
|
+
readonly type: "string";
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
readonly additionalProperties: false;
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
readonly additionalProperties: false;
|
|
146
|
+
};
|
|
147
|
+
readonly examples: {
|
|
148
|
+
readonly type: "array";
|
|
149
|
+
readonly items: {
|
|
150
|
+
readonly type: "object";
|
|
151
|
+
readonly required: readonly ["title", "input"];
|
|
152
|
+
readonly properties: {
|
|
153
|
+
readonly title: {
|
|
154
|
+
readonly type: "string";
|
|
155
|
+
};
|
|
156
|
+
readonly input: {
|
|
157
|
+
readonly type: "object";
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
readonly additionalProperties: false;
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
};
|
|
164
|
+
readonly additionalProperties: false;
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
export { operationCardSchema };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
type SchemaValidationError = {
|
|
2
|
+
instancePath: string;
|
|
3
|
+
message: string;
|
|
4
|
+
keyword: string;
|
|
5
|
+
params: Record<string, unknown>;
|
|
6
|
+
};
|
|
7
|
+
type SchemaValidationResult = {
|
|
8
|
+
ok: true;
|
|
9
|
+
} | {
|
|
10
|
+
ok: false;
|
|
11
|
+
errors: SchemaValidationError[];
|
|
12
|
+
};
|
|
13
|
+
declare function validateInput(inputSchema: Record<string, unknown>, params: Record<string, unknown>): SchemaValidationResult;
|
|
14
|
+
declare function validateOutput(outputSchema: Record<string, unknown>, data: unknown): SchemaValidationResult;
|
|
15
|
+
|
|
16
|
+
export { validateInput, validateOutput };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { RouteSource } from '../contracts/envelope.js';
|
|
2
|
+
import '../routing/reason-codes.js';
|
|
3
|
+
import '../errors/codes.js';
|
|
4
|
+
|
|
5
|
+
type JsonSchema = Record<string, unknown>;
|
|
6
|
+
interface SuitabilityRule {
|
|
7
|
+
when: "always" | "env" | "params";
|
|
8
|
+
predicate: string;
|
|
9
|
+
reason: string;
|
|
10
|
+
}
|
|
11
|
+
interface OperationCard<Input = Record<string, unknown>> {
|
|
12
|
+
capability_id: string;
|
|
13
|
+
version: string;
|
|
14
|
+
description: string;
|
|
15
|
+
input_schema: JsonSchema;
|
|
16
|
+
output_schema: JsonSchema;
|
|
17
|
+
routing: {
|
|
18
|
+
preferred: RouteSource;
|
|
19
|
+
fallbacks: RouteSource[];
|
|
20
|
+
suitability?: SuitabilityRule[];
|
|
21
|
+
notes?: string[];
|
|
22
|
+
};
|
|
23
|
+
graphql?: {
|
|
24
|
+
operationName: string;
|
|
25
|
+
documentPath: string;
|
|
26
|
+
variables?: Record<string, string>;
|
|
27
|
+
limits?: {
|
|
28
|
+
maxPageSize?: number;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
cli?: {
|
|
32
|
+
command: string;
|
|
33
|
+
jsonFields?: string[];
|
|
34
|
+
jq?: string;
|
|
35
|
+
limits?: {
|
|
36
|
+
maxItemsPerCall?: number;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
rest?: {
|
|
40
|
+
endpoints: Array<{
|
|
41
|
+
method: string;
|
|
42
|
+
path: string;
|
|
43
|
+
}>;
|
|
44
|
+
};
|
|
45
|
+
examples?: Array<{
|
|
46
|
+
title: string;
|
|
47
|
+
input: Input;
|
|
48
|
+
}>;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export type { JsonSchema, OperationCard, SuitabilityRule };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
listOperationCards
|
|
3
|
+
} from "../../chunk-MT4U5DYD.js";
|
|
4
|
+
import "../../chunk-2W4L5YCC.js";
|
|
5
|
+
|
|
6
|
+
// src/core/routing/capability-registry.ts
|
|
7
|
+
var capabilityRegistry = listOperationCards().map((card) => ({
|
|
8
|
+
task: card.capability_id,
|
|
9
|
+
defaultRoute: card.routing.preferred,
|
|
10
|
+
fallbackRoutes: [...card.routing.fallbacks]
|
|
11
|
+
}));
|
|
12
|
+
export {
|
|
13
|
+
capabilityRegistry
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=capability-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/core/routing/capability-registry.ts"],"sourcesContent":["import { listOperationCards } from \"../registry/index.js\"\n\nexport interface CapabilityEntry {\n task: string\n defaultRoute: \"cli\" | \"rest\" | \"graphql\"\n fallbackRoutes: Array<\"cli\" | \"rest\" | \"graphql\">\n}\n\nexport const capabilityRegistry: CapabilityEntry[] = listOperationCards().map((card) => ({\n task: card.capability_id,\n defaultRoute: card.routing.preferred,\n fallbackRoutes: [...card.routing.fallbacks]\n}))\n"],"mappings":";;;;;;AAQO,IAAM,qBAAwC,mBAAmB,EAAE,IAAI,CAAC,UAAU;AAAA,EACvF,MAAM,KAAK;AAAA,EACX,cAAc,KAAK,QAAQ;AAAA,EAC3B,gBAAgB,CAAC,GAAG,KAAK,QAAQ,SAAS;AAC5C,EAAE;","names":[]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { routePreferenceOrder } from './policy.js';
|
|
2
|
+
import { ResultEnvelope } from '../contracts/envelope.js';
|
|
3
|
+
import { TaskRequest } from '../contracts/task.js';
|
|
4
|
+
import { GithubClient } from '../../gql/client.js';
|
|
5
|
+
import { RouteReasonCode } from './reason-codes.js';
|
|
6
|
+
import { CliCommandRunner } from '../execution/adapters/cli-capability-adapter.js';
|
|
7
|
+
import '../errors/codes.js';
|
|
8
|
+
import 'graphql';
|
|
9
|
+
import '../../gql/operations/issue-comments-list.generated.js';
|
|
10
|
+
import '../../gql/generated/common-types.js';
|
|
11
|
+
import 'graphql-request';
|
|
12
|
+
import '../../gql/operations/issue-list.generated.js';
|
|
13
|
+
import '../../gql/operations/issue-view.generated.js';
|
|
14
|
+
import '../../gql/operations/pr-diff-list-files.generated.js';
|
|
15
|
+
import '../../gql/operations/pr-reviews-list.generated.js';
|
|
16
|
+
import '../../gql/operations/pr-list.generated.js';
|
|
17
|
+
import '../../gql/operations/pr-view.generated.js';
|
|
18
|
+
import '../../gql/operations/repo-view.generated.js';
|
|
19
|
+
import '../registry/types.js';
|
|
20
|
+
|
|
21
|
+
declare function chooseRoute(): (typeof routePreferenceOrder)[number];
|
|
22
|
+
type ExecutionDeps = {
|
|
23
|
+
githubClient: Pick<GithubClient, "fetchRepoView" | "fetchIssueCommentsList" | "fetchIssueList" | "fetchIssueView" | "fetchPrList" | "fetchPrView" | "fetchPrCommentsList" | "fetchPrReviewsList" | "fetchPrDiffListFiles" | "replyToReviewThread" | "resolveReviewThread" | "unresolveReviewThread">;
|
|
24
|
+
githubToken?: string | null;
|
|
25
|
+
cliRunner?: CliCommandRunner;
|
|
26
|
+
ghCliAvailable?: boolean;
|
|
27
|
+
ghAuthenticated?: boolean;
|
|
28
|
+
reason?: RouteReasonCode;
|
|
29
|
+
};
|
|
30
|
+
declare function executeTask(request: TaskRequest, deps: ExecutionDeps): Promise<ResultEnvelope>;
|
|
31
|
+
|
|
32
|
+
export { chooseRoute, executeTask };
|