@aviaratech/ai-delivery 0.3.34 → 0.3.36
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/CONTRIBUTING.md +12 -206
- package/README.md +57 -506
- package/dist/agent.d.ts +0 -2
- package/dist/agent.js +76 -16
- package/dist/agent.js.map +7 -1
- package/dist/agentReadiness.test.js +73 -67
- package/dist/agentReadiness.test.js.map +7 -1
- package/dist/boardReconcile.test.js +1746 -0
- package/dist/boardReconcile.test.js.map +7 -0
- package/dist/build.test.js +130 -0
- package/dist/build.test.js.map +7 -0
- package/dist/callerErrors.test.js +105 -0
- package/dist/callerErrors.test.js.map +7 -0
- package/dist/cli.js +406 -485
- package/dist/cli.js.map +7 -1
- package/dist/cliResult.d.ts +2 -2
- package/dist/cliResult.js +42 -25
- package/dist/cliResult.js.map +7 -1
- package/dist/cliResult.test.js +434 -297
- package/dist/cliResult.test.js.map +7 -1
- package/dist/config/deliveryConfig.d.ts +320 -14
- package/dist/config/deliveryConfig.js +472 -385
- package/dist/config/deliveryConfig.js.map +7 -1
- package/dist/config/deliveryConfig.test.js +775 -584
- package/dist/config/deliveryConfig.test.js.map +7 -1
- package/dist/contributorChecks.test.js +1694 -916
- package/dist/contributorChecks.test.js.map +7 -1
- package/dist/currentConsumer.test.js +819 -737
- package/dist/currentConsumer.test.js.map +7 -1
- package/dist/currentTrackingScenario.test.js +499 -477
- package/dist/currentTrackingScenario.test.js.map +7 -1
- package/dist/delivery/common.js +160 -172
- package/dist/delivery/common.js.map +7 -1
- package/dist/delivery/delivery.test.js +509 -431
- package/dist/delivery/delivery.test.js.map +7 -1
- package/dist/delivery/evidence.d.ts +2 -2
- package/dist/delivery/evidence.js +133 -120
- package/dist/delivery/evidence.js.map +7 -1
- package/dist/delivery/index.js +7 -2
- package/dist/delivery/index.js.map +7 -1
- package/dist/delivery/legacy.js +65 -5
- package/dist/delivery/legacy.js.map +7 -1
- package/dist/delivery/policy.d.ts +10 -10
- package/dist/delivery/policy.js +211 -238
- package/dist/delivery/policy.js.map +7 -1
- package/dist/delivery/stage.d.ts +18 -18
- package/dist/delivery/stage.js +220 -235
- package/dist/delivery/stage.js.map +7 -1
- package/dist/deliveryBoard.d.ts +74 -0
- package/dist/deliveryBoard.js +644 -0
- package/dist/deliveryBoard.js.map +7 -0
- package/dist/deliveryBoard.test.d.ts +1 -0
- package/dist/deliveryBoard.test.js +649 -0
- package/dist/deliveryBoard.test.js.map +7 -0
- package/dist/deliveryHealth.test.js +179 -155
- package/dist/deliveryHealth.test.js.map +7 -1
- package/dist/dependencyCompatibility.test.js +154 -140
- package/dist/dependencyCompatibility.test.js.map +7 -1
- package/dist/directoryIndependent.test.js +417 -383
- package/dist/directoryIndependent.test.js.map +7 -1
- package/dist/dispatch.d.ts +17 -12
- package/dist/dispatch.js +330 -322
- package/dist/dispatch.js.map +7 -1
- package/dist/errors.d.ts +16 -3
- package/dist/errors.js +104 -82
- package/dist/errors.js.map +7 -1
- package/dist/fixtures/deliveryBoardReplay.d.ts +56 -0
- package/dist/fixtures/deliveryBoardReplay.js +617 -0
- package/dist/fixtures/deliveryBoardReplay.js.map +7 -0
- package/dist/fixtures/discovery.d.ts +59 -19
- package/dist/fixtures/discovery.js +96 -90
- package/dist/fixtures/discovery.js.map +7 -1
- package/dist/fixtures/inertEntrypointChild.js +57 -56
- package/dist/fixtures/inertEntrypointChild.js.map +7 -1
- package/dist/fixtures/inertEntrypoints.d.ts +1 -1
- package/dist/fixtures/inertEntrypoints.js +321 -276
- package/dist/fixtures/inertEntrypoints.js.map +7 -1
- package/dist/fixtures/inertTarget.d.ts +78 -7
- package/dist/fixtures/inertTarget.js +769 -691
- package/dist/fixtures/inertTarget.js.map +7 -1
- package/dist/fixtures/issue63.d.ts +4 -3
- package/dist/fixtures/issue63.js +260 -274
- package/dist/fixtures/issue63.js.map +7 -1
- package/dist/fixtures/issueProjectItems.d.ts +20 -0
- package/dist/fixtures/issueProjectItems.js +15 -0
- package/dist/fixtures/issueProjectItems.js.map +7 -0
- package/dist/fixtures/readView.d.ts +120 -0
- package/dist/fixtures/readView.js +172 -0
- package/dist/fixtures/readView.js.map +7 -0
- package/dist/fixtures/recordedGitHubFlows.d.ts +120 -0
- package/dist/fixtures/recordedGitHubFlows.js +109 -0
- package/dist/fixtures/recordedGitHubFlows.js.map +7 -0
- package/dist/genericCompatibility.test.js +64 -55
- package/dist/genericCompatibility.test.js.map +7 -1
- package/dist/git.js +73 -67
- package/dist/git.js.map +7 -1
- package/dist/gitProcess.d.ts +1 -1
- package/dist/gitProcess.js +58 -53
- package/dist/gitProcess.js.map +7 -1
- package/dist/github/client.d.ts +2 -2
- package/dist/github/client.js +484 -379
- package/dist/github/client.js.map +7 -1
- package/dist/github/commandIdentityPolicy.js +44 -51
- package/dist/github/commandIdentityPolicy.js.map +7 -1
- package/dist/github/discovery.d.ts +3 -0
- package/dist/github/discovery.js +197 -201
- package/dist/github/discovery.js.map +7 -1
- package/dist/github/discovery.test.js +223 -177
- package/dist/github/discovery.test.js.map +7 -1
- package/dist/github/issueHistory.d.ts +2 -2
- package/dist/github/issueHistory.js +117 -125
- package/dist/github/issueHistory.js.map +7 -1
- package/dist/github/machineAuth.d.ts +1 -1
- package/dist/github/machineAuth.js +126 -117
- package/dist/github/machineAuth.js.map +7 -1
- package/dist/github/machineAuth.test.js +755 -639
- package/dist/github/machineAuth.test.js.map +7 -1
- package/dist/github/nativeIssueMetadata.js +286 -273
- package/dist/github/nativeIssueMetadata.js.map +7 -1
- package/dist/github/projectDelivery.d.ts +53 -1
- package/dist/github/projectDelivery.js +623 -460
- package/dist/github/projectDelivery.js.map +7 -1
- package/dist/github/relationships.d.ts +5 -2
- package/dist/github/relationships.js +434 -333
- package/dist/github/relationships.js.map +7 -1
- package/dist/github/repo.d.ts +1 -0
- package/dist/github/repo.js +123 -96
- package/dist/github/repo.js.map +7 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +7 -1
- package/dist/issue.d.ts +103 -7
- package/dist/issue.js +2104 -1547
- package/dist/issue.js.map +7 -1
- package/dist/issue63History.test.js +40 -42
- package/dist/issue63History.test.js.map +7 -1
- package/dist/issue63Routes.test.js +154 -143
- package/dist/issue63Routes.test.js.map +7 -1
- package/dist/issueBatchUpdate.test.js +1004 -683
- package/dist/issueBatchUpdate.test.js.map +7 -1
- package/dist/issueBlockerGuard.test.js +262 -226
- package/dist/issueBlockerGuard.test.js.map +7 -1
- package/dist/issueContract.d.ts +23 -4
- package/dist/issueContract.js +416 -395
- package/dist/issueContract.js.map +7 -1
- package/dist/issueContract.test.d.ts +4 -3
- package/dist/issueContract.test.js +358 -321
- package/dist/issueContract.test.js.map +7 -1
- package/dist/issueDates.test.js +235 -233
- package/dist/issueDates.test.js.map +7 -1
- package/dist/issueInfoReadback.test.js +304 -190
- package/dist/issueInfoReadback.test.js.map +7 -1
- package/dist/issueIntake.test.js +1945 -1732
- package/dist/issueIntake.test.js.map +7 -1
- package/dist/issueJournal.d.ts +40 -19
- package/dist/issueJournal.js +229 -138
- package/dist/issueJournal.js.map +7 -1
- package/dist/issueJournal.test.js +605 -422
- package/dist/issueJournal.test.js.map +7 -1
- package/dist/issueRollup.test.d.ts +1 -0
- package/dist/issueRollup.test.js +476 -0
- package/dist/issueRollup.test.js.map +7 -0
- package/dist/issueTracking.test.js +1088 -593
- package/dist/issueTracking.test.js.map +7 -1
- package/dist/issueWriteRecovery.test.d.ts +1 -0
- package/dist/issueWriteRecovery.test.js +260 -0
- package/dist/issueWriteRecovery.test.js.map +7 -0
- package/dist/lifecycle.test.js +112 -441
- package/dist/lifecycle.test.js.map +7 -1
- package/dist/logger.js +80 -74
- package/dist/logger.js.map +7 -1
- package/dist/mcp/index.js +116 -90
- package/dist/mcp/index.js.map +7 -1
- package/dist/mcp/tools.d.ts +790 -220
- package/dist/mcp/tools.js +267 -333
- package/dist/mcp/tools.js.map +7 -1
- package/dist/pluginAuthProbe.js +63 -52
- package/dist/pluginAuthProbe.js.map +7 -1
- package/dist/pluginAuthProbe.test.js +85 -62
- package/dist/pluginAuthProbe.test.js.map +7 -1
- package/dist/pluginCredentials.test.js +282 -259
- package/dist/pluginCredentials.test.js.map +7 -1
- package/dist/pluginDoctor.test.js +653 -588
- package/dist/pluginDoctor.test.js.map +7 -1
- package/dist/pluginInstaller.d.ts +7 -5
- package/dist/pluginInstaller.js +1173 -1231
- package/dist/pluginInstaller.js.map +7 -1
- package/dist/pluginInstaller.test.js +1822 -1283
- package/dist/pluginInstaller.test.js.map +7 -1
- package/dist/pluginPackaging.test.js +485 -305
- package/dist/pluginPackaging.test.js.map +7 -1
- package/dist/pr.d.ts +132 -94
- package/dist/pr.js +1521 -1323
- package/dist/pr.js.map +7 -1
- package/dist/pr.test.js +1678 -632
- package/dist/pr.test.js.map +7 -1
- package/dist/prAssociation.test.js +2419 -1788
- package/dist/prAssociation.test.js.map +7 -1
- package/dist/prDispatch.test.js +150 -89
- package/dist/prDispatch.test.js.map +7 -1
- package/dist/readView.d.ts +183 -0
- package/dist/readView.js +217 -0
- package/dist/readView.js.map +7 -0
- package/dist/readView.test.d.ts +1 -0
- package/dist/readView.test.js +119 -0
- package/dist/readView.test.js.map +7 -0
- package/dist/releaseReconciliation.test.js +267 -288
- package/dist/releaseReconciliation.test.js.map +7 -1
- package/dist/releaseWorkflow.test.js +2493 -422
- package/dist/releaseWorkflow.test.js.map +7 -1
- package/dist/review.d.ts +738 -2
- package/dist/review.js +601 -348
- package/dist/review.js.map +7 -1
- package/dist/review.test.js +1218 -812
- package/dist/review.test.js.map +7 -1
- package/dist/reviewSubmit.test.d.ts +1 -0
- package/dist/reviewSubmit.test.js +747 -0
- package/dist/reviewSubmit.test.js.map +7 -0
- package/dist/services/agentReadinessService.js +42 -37
- package/dist/services/agentReadinessService.js.map +7 -1
- package/dist/services/blockerGuardService.js +188 -188
- package/dist/services/blockerGuardService.js.map +7 -1
- package/dist/services/boardReconcileService.d.ts +1204 -0
- package/dist/services/boardReconcileService.js +1445 -0
- package/dist/services/boardReconcileService.js.map +7 -0
- package/dist/services/deliveryAdmission.d.ts +2 -0
- package/dist/services/deliveryAdmission.js +129 -152
- package/dist/services/deliveryAdmission.js.map +7 -1
- package/dist/services/deliveryHealthService.js +197 -199
- package/dist/services/deliveryHealthService.js.map +7 -1
- package/dist/services/legacyIssueMigration.js +263 -277
- package/dist/services/legacyIssueMigration.js.map +7 -1
- package/dist/services/worktreeRegistry.d.ts +27 -119
- package/dist/services/worktreeRegistry.js +765 -1182
- package/dist/services/worktreeRegistry.js.map +7 -1
- package/dist/stagedChecks.test.js +396 -194
- package/dist/stagedChecks.test.js.map +7 -1
- package/dist/start.test.js +99 -95
- package/dist/start.test.js.map +7 -1
- package/dist/stdoutRegression.test.js +354 -350
- package/dist/stdoutRegression.test.js.map +7 -1
- package/dist/targetPolicyDiscovery.test.js +141 -143
- package/dist/targetPolicyDiscovery.test.js.map +7 -1
- package/dist/targetPolicyEntrypoints.test.js +308 -269
- package/dist/targetPolicyEntrypoints.test.js.map +7 -1
- package/dist/targetPolicyLocal.test.js +580 -1051
- package/dist/targetPolicyLocal.test.js.map +7 -1
- package/dist/targetPolicyRoutes.test.js +305 -281
- package/dist/targetPolicyRoutes.test.js.map +7 -1
- package/dist/targetRepositoryExecution.test.d.ts +1 -0
- package/dist/targetRepositoryExecution.test.js +463 -0
- package/dist/targetRepositoryExecution.test.js.map +7 -0
- package/dist/terminalMessages.js +41 -35
- package/dist/terminalMessages.js.map +7 -1
- package/dist/toolOutput.d.ts +2 -0
- package/dist/toolOutput.js +36 -0
- package/dist/toolOutput.js.map +7 -0
- package/dist/toolOutput.test.d.ts +1 -0
- package/dist/toolOutput.test.js +240 -0
- package/dist/toolOutput.test.js.map +7 -0
- package/dist/utils/atomicJson.js +84 -76
- package/dist/utils/atomicJson.js.map +7 -1
- package/dist/utils/filesystem.js +15 -18
- package/dist/utils/filesystem.js.map +7 -1
- package/dist/utils/lockfile.js +68 -71
- package/dist/utils/lockfile.js.map +7 -1
- package/dist/verification.d.ts +1 -19
- package/dist/verification.js +1020 -1929
- package/dist/verification.js.map +7 -1
- package/dist/verificationGate.test.js +127 -117
- package/dist/verificationGate.test.js.map +7 -1
- package/dist/version.d.ts +6 -0
- package/dist/version.js +24 -10
- package/dist/version.js.map +7 -1
- package/dist/worktree.d.ts +3 -15
- package/dist/worktree.js +97 -177
- package/dist/worktree.js.map +7 -1
- package/package.json +10 -8
- package/plugins/ai-delivery/.claude-plugin/plugin.json +2 -2
- package/plugins/ai-delivery/README.md +47 -156
- package/plugins/ai-delivery/plugin.json +1 -1
- package/plugins/ai-delivery/runtime/dist/THIRD-PARTY-NOTICES.md +261 -43
- package/plugins/ai-delivery/runtime/dist/cli.js +369 -125
- package/plugins/ai-delivery/runtime/package.json +1 -1
- package/plugins/ai-delivery/skills/intake-create/SKILL.md +14 -78
- package/plugins/ai-delivery/skills/pr-handoff/SKILL.md +35 -36
- package/plugins/ai-delivery/skills/worktree-lifecycle/SKILL.md +14 -15
- package/dist/investigationCompletion.test.js +0 -728
- package/dist/investigationCompletion.test.js.map +0 -1
- package/dist/setup.d.ts +0 -60
- package/dist/setup.js +0 -585
- package/dist/setup.js.map +0 -1
- package/dist/setup.test.js +0 -3058
- package/dist/setup.test.js.map +0 -1
- package/dist/worktreeTransition.d.ts +0 -211
- package/dist/worktreeTransition.js +0 -1037
- package/dist/worktreeTransition.js.map +0 -1
- package/dist/worktreeTransition.test.js +0 -1191
- package/dist/worktreeTransition.test.js.map +0 -1
- /package/dist/{investigationCompletion.test.d.ts → boardReconcile.test.d.ts} +0 -0
- /package/dist/{setup.test.d.ts → build.test.d.ts} +0 -0
- /package/dist/{worktreeTransition.test.d.ts → callerErrors.test.d.ts} +0 -0
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/services/deliveryAdmission.ts"],
|
|
4
|
+
"sourcesContent": ["import { createHash } from 'node:crypto';\nimport { readFileSync, readdirSync, realpathSync } from 'node:fs';\nimport { dirname, join } from 'node:path';\nimport { z } from 'zod';\n\nimport { loadDeliveryConfig, type LoadedDeliveryConfig, type LoadedGitHubConfig } from '../config/deliveryConfig.js';\nimport { assertPrivateFile } from '../delivery/common.js';\nimport { digestValue } from '../delivery/index.js';\nimport { DeliveryError } from '../errors.js';\nimport { gitCommonDir, gitRoot } from '../git.js';\n\nconst Sha256 = z.string().regex(/^sha256:[a-f0-9]{64}$/u);\nconst CAPABILITY = 2;\nexport const RuntimeAdmissionSchema = z\n .object({\n admissionId: Sha256,\n capability: z.object({ cli: z.number().int().positive(), mcp: z.number().int().positive() }).strict(),\n cliPath: z.string().min(1),\n cliSha256: Sha256,\n configDigest: Sha256,\n mcpLauncherPath: z.string().min(1),\n mcpLauncherSha256: Sha256,\n packageDistSha256: Sha256,\n packageManifestSha256: Sha256,\n packageVersion: z.string().min(1),\n pluginManifestPath: z.string().min(1),\n pluginManifestSha256: Sha256,\n repository: z.string().min(1),\n schemaVersion: z.literal('ai-delivery.runtime-admission@2'),\n sourceArchiveSha256: Sha256,\n sourceCommit: z.string().regex(/^[a-f0-9]{40}$/u),\n })\n .strict()\n .superRefine((value, context) => {\n const { admissionId, ...content } = value;\n if (admissionId !== digestValue(content)) {\n context.addIssue({ code: 'custom', message: 'Runtime admission identity is invalid.' });\n }\n });\n\nexport type RuntimeAdmission = z.infer<typeof RuntimeAdmissionSchema>;\n\nexport function fileDigest(path: string): string {\n return `sha256:${createHash('sha256').update(readFileSync(path)).digest('hex')}`;\n}\n\nexport function directoryDigest(path: string): string {\n const entries: { path: string; sha256: string }[] = [];\n const visit = (directory: string, relative: string): void => {\n for (const entry of readdirSync(directory, { withFileTypes: true }).sort((left, right) =>\n left.name < right.name ? -1 : left.name > right.name ? 1 : 0,\n )) {\n const child = join(directory, entry.name);\n const childRelative = relative ? `${relative}/${entry.name}` : entry.name;\n if (entry.isDirectory()) visit(child, childRelative);\n else if (entry.isFile()) entries.push({ path: childRelative, sha256: fileDigest(child) });\n else throw new DeliveryError('Runtime distribution contains an unsupported link or file type.');\n }\n };\n visit(path, '');\n if (entries.length === 0) throw new DeliveryError('Runtime distribution is empty.');\n return digestValue(entries);\n}\n\nfunction manifest(path: string): Record<string, unknown> {\n const value: unknown = JSON.parse(readFileSync(path, 'utf8')) as unknown;\n if (typeof value !== 'object' || value === null || Array.isArray(value)) {\n throw new DeliveryError('Runtime package or plugin manifest is invalid.');\n }\n return value as Record<string, unknown>;\n}\n\n/**\n * An installer-owned, private, immutable admission binds the actual CLI and MCP\n * bytes to one source archive and the consuming repository configuration.\n * Neither invocation surface can refresh its own admission during a mutation.\n */\nexport async function assertDeliveryRuntimeAdmitted(input: {\n repoRoot: string;\n runtimeEntryPath?: string;\n personalAuth?: boolean;\n configuration?: LoadedDeliveryConfig | LoadedGitHubConfig;\n}): Promise<RuntimeAdmission> {\n const root = gitRoot(input.repoRoot);\n const loaded =\n input.configuration ??\n (await loadDeliveryConfig(root, input.personalAuth === undefined ? {} : { personalAuth: input.personalAuth }));\n const path = join(gitCommonDir(root), 'ai-delivery', 'runtime-admission.json');\n let admission: RuntimeAdmission;\n try {\n admission = RuntimeAdmissionSchema.parse(JSON.parse(assertPrivateFile(path).toString('utf8')) as unknown);\n } catch {\n throw new DeliveryError(\n 'Missing or invalid private ai-delivery runtime admission; refresh the installed binding before lifecycle mutation.',\n );\n }\n return validateRuntimeAdmission(admission, loaded, input.runtimeEntryPath);\n}\n\n/** @internal Shared installed-byte validation for explicit setup and lifecycle admission. */\nexport function validateRuntimeAdmission(\n admission: RuntimeAdmission,\n loaded: LoadedDeliveryConfig | LoadedGitHubConfig,\n runtimeEntryPath?: string,\n): RuntimeAdmission {\n const entry = runtimeEntryPath ?? process.argv[1];\n if (!entry) throw new DeliveryError('Running ai-delivery entry path is unavailable.');\n try {\n const cliPath = realpathSync(entry);\n const launcherPath = realpathSync(admission.mcpLauncherPath);\n const pluginManifestPath = realpathSync(admission.pluginManifestPath);\n const distPath = dirname(cliPath);\n const packageManifestPath = join(dirname(distPath), 'package.json');\n const packageManifest = manifest(packageManifestPath);\n const pluginManifest = manifest(pluginManifestPath);\n // Preserve the original short-circuit order and refusal; expose only the first predicate's fixed name.\n const failedPredicate =\n (cliPath !== admission.cliPath && 'cliPath') ||\n (launcherPath !== admission.mcpLauncherPath && 'mcpLauncherPath') ||\n (pluginManifestPath !== admission.pluginManifestPath && 'pluginManifestPath') ||\n (realpathSync(join(dirname(dirname(launcherPath)), '.claude-plugin', 'plugin.json')) !== pluginManifestPath &&\n 'launcherPluginManifestPath') ||\n (fileDigest(cliPath) !== admission.cliSha256 && 'cliSha256') ||\n (fileDigest(launcherPath) !== admission.mcpLauncherSha256 && 'mcpLauncherSha256') ||\n (fileDigest(pluginManifestPath) !== admission.pluginManifestSha256 && 'pluginManifestSha256') ||\n (fileDigest(packageManifestPath) !== admission.packageManifestSha256 && 'packageManifestSha256') ||\n (directoryDigest(distPath) !== admission.packageDistSha256 && 'packageDistSha256') ||\n (admission.configDigest !== loaded.configDigest && 'configDigest') ||\n (admission.repository !== loaded.config.repository && 'repository') ||\n (admission.capability.cli !== CAPABILITY && 'cliCapability') ||\n (admission.capability.mcp !== CAPABILITY && 'mcpCapability') ||\n (packageManifest.name !== '@aviaratech/ai-delivery' && 'packageName') ||\n (packageManifest.version !== admission.packageVersion && 'packageVersion') ||\n (pluginManifest.name !== 'ai-delivery' && 'pluginName') ||\n (pluginManifest.packageVersion !== admission.packageVersion && 'pluginPackageVersion') ||\n (pluginManifest.deliveryCapabilityVersion !== CAPABILITY && 'pluginCapability');\n if (failedPredicate) {\n throw new DeliveryError(\n `Installed CLI/MCP source, capability or repository admission disagrees with the running delivery contract. Failed predicate: ${failedPredicate}.`,\n );\n }\n } catch (error) {\n if (error instanceof DeliveryError) throw error;\n throw new DeliveryError('Installed CLI/MCP source or capability readback is unavailable.');\n }\n return admission;\n}\n\n/** @internal Build the existing schema from actual installed bytes, never caller-supplied hashes. */\nexport function buildRuntimeAdmission(input: {\n cliPath: string;\n mcpLauncherPath: string;\n pluginManifestPath: string;\n packageVersion: string;\n sourceArchiveSha256: string;\n sourceCommit: string;\n configuration: LoadedDeliveryConfig | LoadedGitHubConfig;\n}): RuntimeAdmission {\n for (const path of [input.cliPath, input.mcpLauncherPath, input.pluginManifestPath]) {\n if (realpathSync(path) !== path)\n throw new DeliveryError('Installed runtime paths must be canonical regular files.');\n }\n const dist = dirname(input.cliPath);\n const packagePath = join(dirname(dist), 'package.json');\n const packageManifest = manifest(packagePath);\n const bin = packageManifest.bin;\n if (\n typeof bin !== 'object' ||\n bin === null ||\n !('ai-delivery' in bin) ||\n (bin as Record<string, unknown>)['ai-delivery'] !== './dist/cli.js'\n ) {\n throw new DeliveryError('Installed package CLI entry is not the supported ai-delivery executable.');\n }\n const content = {\n capability: { cli: CAPABILITY, mcp: CAPABILITY },\n cliPath: input.cliPath,\n cliSha256: fileDigest(input.cliPath),\n configDigest: input.configuration.configDigest,\n mcpLauncherPath: input.mcpLauncherPath,\n mcpLauncherSha256: fileDigest(input.mcpLauncherPath),\n packageDistSha256: directoryDigest(dist),\n packageManifestSha256: fileDigest(packagePath),\n packageVersion: input.packageVersion,\n pluginManifestPath: input.pluginManifestPath,\n pluginManifestSha256: fileDigest(input.pluginManifestPath),\n repository: input.configuration.config.repository,\n schemaVersion: 'ai-delivery.runtime-admission@2' as const,\n sourceArchiveSha256: input.sourceArchiveSha256,\n sourceCommit: input.sourceCommit,\n };\n return validateRuntimeAdmission(\n RuntimeAdmissionSchema.parse({ ...content, admissionId: digestValue(content) }),\n input.configuration,\n input.cliPath,\n );\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,kBAAkB;AAC3B,SAAS,cAAc,aAAa,oBAAoB;AACxD,SAAS,SAAS,YAAY;AAC9B,SAAS,SAAS;AAElB,SAAS,0BAA8E;AACvF,SAAS,yBAAyB;AAClC,SAAS,mBAAmB;AAC5B,SAAS,qBAAqB;AAC9B,SAAS,cAAc,eAAe;AAEtC,MAAM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from
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { DeliveryError } from "../errors.js";
|
|
3
|
+
import {
|
|
4
|
+
getIssueProjectStatus,
|
|
5
|
+
getProjectDeliveryConfiguration,
|
|
6
|
+
projectSettingsFromDeliveryConfig
|
|
7
|
+
} from "../github/projectDelivery.js";
|
|
8
|
+
import { historicalActivityEvidence, readIssueHistory } from "../github/issueHistory.js";
|
|
9
|
+
const DeliveryHealthInput = z.strictObject({
|
|
10
|
+
repo: z.string().regex(/^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/u),
|
|
11
|
+
from: z.iso.datetime(),
|
|
12
|
+
to: z.iso.datetime(),
|
|
13
|
+
maxIssues: z.number().int().positive().max(500).default(200),
|
|
14
|
+
maxProjectPages: z.number().int().positive().max(20).default(5),
|
|
15
|
+
maxTimelinePages: z.number().int().positive().max(20).default(5),
|
|
16
|
+
oldestLimit: z.number().int().positive().max(20).default(10)
|
|
17
|
+
}).refine((value) => Date.parse(value.from) < Date.parse(value.to), { message: "from must precede to", path: ["to"] }).refine((value) => Date.parse(value.to) <= Date.now(), {
|
|
18
|
+
message: "to must be at or before collection time",
|
|
19
|
+
path: ["to"]
|
|
19
20
|
});
|
|
20
21
|
const RepositoryIssue = z.object({
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
number: z.number().int().positive(),
|
|
23
|
+
node_id: z.string().min(1),
|
|
24
|
+
created_at: z.iso.datetime(),
|
|
25
|
+
state: z.enum(["open", "closed"]),
|
|
26
|
+
html_url: z.string().url(),
|
|
27
|
+
title: z.string(),
|
|
28
|
+
pull_request: z.unknown().optional()
|
|
28
29
|
});
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
catch (error) {
|
|
75
|
-
limitations.push({
|
|
76
|
-
scope: 'repository inventory',
|
|
77
|
-
reason: (error instanceof Error ? error.message : String(error)).slice(0, 1000),
|
|
78
|
-
});
|
|
79
|
-
break;
|
|
80
|
-
}
|
|
30
|
+
async function deliveryHealth(context, raw) {
|
|
31
|
+
const input = DeliveryHealthInput.parse(raw);
|
|
32
|
+
const repository = `${context.repo.owner}/${context.repo.repo}`;
|
|
33
|
+
if (repository.toLowerCase() !== input.repo.toLowerCase())
|
|
34
|
+
throw new DeliveryError("Health repository selector disagrees with the configured context.");
|
|
35
|
+
const collectionStartedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
36
|
+
const asOf = collectionStartedAt;
|
|
37
|
+
const issues = /* @__PURE__ */ new Map();
|
|
38
|
+
const limitations = [];
|
|
39
|
+
const configuration = context.projectConfiguration ?? await getProjectDeliveryConfiguration({
|
|
40
|
+
graphql: context.clients.graphql,
|
|
41
|
+
org: context.config.native.organization,
|
|
42
|
+
settings: projectSettingsFromDeliveryConfig(context.config)
|
|
43
|
+
});
|
|
44
|
+
let listingComplete = false;
|
|
45
|
+
for (let page = 1; page <= 20; page++) {
|
|
46
|
+
try {
|
|
47
|
+
const batch = (await context.clients.rest.issues.listForRepo({
|
|
48
|
+
...context.repo,
|
|
49
|
+
state: "all",
|
|
50
|
+
sort: "created",
|
|
51
|
+
direction: "asc",
|
|
52
|
+
per_page: 100,
|
|
53
|
+
page
|
|
54
|
+
})).data;
|
|
55
|
+
for (const value of batch) {
|
|
56
|
+
if ("pull_request" in value) continue;
|
|
57
|
+
const issue = RepositoryIssue.parse(value);
|
|
58
|
+
const url = new URL(issue.html_url);
|
|
59
|
+
if (url.hostname !== "github.com" || url.protocol !== "https:" || url.pathname.toLowerCase() !== `/${repository}/issues/${issue.number}`.toLowerCase())
|
|
60
|
+
throw new DeliveryError("Health issue repository identity disagrees.");
|
|
61
|
+
if (!issues.has(issue.number) && issues.size === input.maxIssues)
|
|
62
|
+
throw new DeliveryError("Repository issue limit reached");
|
|
63
|
+
issues.set(issue.number, issue);
|
|
64
|
+
}
|
|
65
|
+
if (batch.length < 100) {
|
|
66
|
+
listingComplete = true;
|
|
67
|
+
break;
|
|
68
|
+
}
|
|
69
|
+
} catch (error) {
|
|
70
|
+
limitations.push({
|
|
71
|
+
scope: "repository inventory",
|
|
72
|
+
reason: (error instanceof Error ? error.message : String(error)).slice(0, 1e3)
|
|
73
|
+
});
|
|
74
|
+
break;
|
|
81
75
|
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
historyComplete = false;
|
|
143
|
-
limitations.push({
|
|
144
|
-
issueNumber: issue.number,
|
|
145
|
-
scope: 'native timeline',
|
|
146
|
-
reason: (error instanceof Error ? error.message : String(error)).slice(0, 1000),
|
|
147
|
-
});
|
|
76
|
+
}
|
|
77
|
+
if (!listingComplete && !limitations.length)
|
|
78
|
+
limitations.push({ scope: "repository inventory", reason: "Repository listing page limit reached" });
|
|
79
|
+
const within = (time) => Date.parse(time) >= Date.parse(input.from) && Date.parse(time) < Date.parse(input.to);
|
|
80
|
+
const opened = [...issues.values()].filter((issue) => within(issue.created_at)).length;
|
|
81
|
+
const closed = /* @__PURE__ */ new Set();
|
|
82
|
+
const blockerEvents = /* @__PURE__ */ new Map();
|
|
83
|
+
const active = [];
|
|
84
|
+
let currentStatusUnknown = 0;
|
|
85
|
+
let historyComplete = true;
|
|
86
|
+
const historicalUnknownReasons = /* @__PURE__ */ new Map();
|
|
87
|
+
for (const issue of issues.values()) {
|
|
88
|
+
try {
|
|
89
|
+
const status = await getIssueProjectStatus({
|
|
90
|
+
graphql: context.clients.graphql,
|
|
91
|
+
issueNodeId: issue.node_id,
|
|
92
|
+
org: context.config.native.organization,
|
|
93
|
+
configuration,
|
|
94
|
+
maxPages: input.maxProjectPages
|
|
95
|
+
});
|
|
96
|
+
if (status === null) {
|
|
97
|
+
currentStatusUnknown++;
|
|
98
|
+
limitations.push({
|
|
99
|
+
issueNumber: issue.number,
|
|
100
|
+
scope: "current Project status",
|
|
101
|
+
reason: "No resolvable current configured-Project status"
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
if (issue.state === "open" && status?.status === "In Progress") active.push(issue);
|
|
105
|
+
} catch (error) {
|
|
106
|
+
currentStatusUnknown++;
|
|
107
|
+
limitations.push({
|
|
108
|
+
issueNumber: issue.number,
|
|
109
|
+
scope: "current Project status",
|
|
110
|
+
reason: (error instanceof Error ? error.message : String(error)).slice(0, 1e3)
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
try {
|
|
114
|
+
const history = await readIssueHistory(context, issue.number, input.maxTimelinePages, issue.node_id);
|
|
115
|
+
if (!history.complete) {
|
|
116
|
+
historyComplete = false;
|
|
117
|
+
limitations.push({
|
|
118
|
+
issueNumber: issue.number,
|
|
119
|
+
scope: "native timeline",
|
|
120
|
+
reason: history.reason ?? "Incomplete timeline"
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
for (const event of history.events.filter((value) => within(value.createdAt))) {
|
|
124
|
+
if (event.__typename === "ClosedEvent") closed.add(issue.number);
|
|
125
|
+
if (event.__typename === "BlockedByAddedEvent" && !blockerEvents.has(event.id)) {
|
|
126
|
+
const evidence = historicalActivityEvidence(
|
|
127
|
+
history,
|
|
128
|
+
event,
|
|
129
|
+
configuration.projectId,
|
|
130
|
+
context.config.native.project.statuses.inProgress,
|
|
131
|
+
Object.values(context.config.native.project.statuses)
|
|
132
|
+
);
|
|
133
|
+
blockerEvents.set(event.id, evidence.activity);
|
|
134
|
+
if (evidence.reason)
|
|
135
|
+
historicalUnknownReasons.set(evidence.reason, (historicalUnknownReasons.get(evidence.reason) ?? 0) + 1);
|
|
148
136
|
}
|
|
137
|
+
}
|
|
138
|
+
} catch (error) {
|
|
139
|
+
historyComplete = false;
|
|
140
|
+
limitations.push({
|
|
141
|
+
issueNumber: issue.number,
|
|
142
|
+
scope: "native timeline",
|
|
143
|
+
reason: (error instanceof Error ? error.message : String(error)).slice(0, 1e3)
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
const classifications = [...blockerEvents.values()];
|
|
148
|
+
return {
|
|
149
|
+
repository,
|
|
150
|
+
lane: { kind: "repository", repository, projectId: configuration.projectId },
|
|
151
|
+
window: { from: input.from, to: input.to, bounds: "[from,to)" },
|
|
152
|
+
snapshot: { asOf, collectionStartedAt, collectionFinishedAt: (/* @__PURE__ */ new Date()).toISOString(), atomic: false },
|
|
153
|
+
completeness: {
|
|
154
|
+
complete: listingComplete && limitations.length === 0 && historicalUnknownReasons.size === 0,
|
|
155
|
+
issuesObserved: issues.size,
|
|
156
|
+
listingComplete,
|
|
157
|
+
limitations,
|
|
158
|
+
metricCoverage: {
|
|
159
|
+
opened: listingComplete,
|
|
160
|
+
closed: listingComplete && historyComplete,
|
|
161
|
+
active: listingComplete && currentStatusUnknown === 0,
|
|
162
|
+
blockerAdditions: listingComplete && historyComplete,
|
|
163
|
+
historicalActivity: listingComplete && historyComplete && historicalUnknownReasons.size === 0
|
|
164
|
+
},
|
|
165
|
+
limits: {
|
|
166
|
+
maxIssues: input.maxIssues,
|
|
167
|
+
maxTimelinePages: input.maxTimelinePages,
|
|
168
|
+
maxProjectPages: input.maxProjectPages
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
countsBasis: "Observed counts; metrics with incomplete coverage are lower bounds.",
|
|
172
|
+
historicalUnknownReasons: [...historicalUnknownReasons].map(([reason, count]) => ({ reason, count })),
|
|
173
|
+
counts: {
|
|
174
|
+
opened,
|
|
175
|
+
closed: closed.size,
|
|
176
|
+
active: active.length,
|
|
177
|
+
currentStatusUnknown,
|
|
178
|
+
blockerAdditions: {
|
|
179
|
+
total: blockerEvents.size,
|
|
180
|
+
active: classifications.filter((value) => value === "active").length,
|
|
181
|
+
inactive: classifications.filter((value) => value === "inactive").length,
|
|
182
|
+
unknown: classifications.filter((value) => value === "unknown").length
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
oldestActive: active.sort((a, b) => Date.parse(a.created_at) - Date.parse(b.created_at) || a.number - b.number).slice(0, input.oldestLimit).map((issue) => ({
|
|
186
|
+
number: issue.number,
|
|
187
|
+
title: issue.title,
|
|
188
|
+
url: issue.html_url,
|
|
189
|
+
createdAt: issue.created_at,
|
|
190
|
+
createdAgeDays: Math.max(0, Math.floor((Date.parse(asOf) - Date.parse(issue.created_at)) / 864e5))
|
|
191
|
+
})),
|
|
192
|
+
semantics: {
|
|
193
|
+
closed: "Distinct issues with a native ClosedEvent in the window; reopen/reclose counts once.",
|
|
194
|
+
blockerAdditions: "Distinct native BlockedByAddedEvent IDs; comments alone do not count. Unknown historical activity is not a policy violation.",
|
|
195
|
+
oldestActive: "Current open In Progress issues ordered by creation time; age is since creation, not time in progress.",
|
|
196
|
+
scope: "One explicitly selected repository; Project grouping defines the repository lane. Missing or inaccessible status and history are reported, not inferred."
|
|
149
197
|
}
|
|
150
|
-
|
|
151
|
-
return {
|
|
152
|
-
repository,
|
|
153
|
-
lane: { kind: 'repository', repository, projectId: configuration.projectId },
|
|
154
|
-
window: { from: input.from, to: input.to, bounds: '[from,to)' },
|
|
155
|
-
snapshot: { asOf, collectionStartedAt, collectionFinishedAt: new Date().toISOString(), atomic: false },
|
|
156
|
-
completeness: {
|
|
157
|
-
complete: listingComplete && limitations.length === 0 && historicalUnknownReasons.size === 0,
|
|
158
|
-
issuesObserved: issues.size,
|
|
159
|
-
listingComplete,
|
|
160
|
-
limitations,
|
|
161
|
-
metricCoverage: {
|
|
162
|
-
opened: listingComplete,
|
|
163
|
-
closed: listingComplete && historyComplete,
|
|
164
|
-
active: listingComplete && currentStatusUnknown === 0,
|
|
165
|
-
blockerAdditions: listingComplete && historyComplete,
|
|
166
|
-
historicalActivity: listingComplete && historyComplete && historicalUnknownReasons.size === 0,
|
|
167
|
-
},
|
|
168
|
-
limits: {
|
|
169
|
-
maxIssues: input.maxIssues,
|
|
170
|
-
maxTimelinePages: input.maxTimelinePages,
|
|
171
|
-
maxProjectPages: input.maxProjectPages,
|
|
172
|
-
},
|
|
173
|
-
},
|
|
174
|
-
countsBasis: 'Observed counts; metrics with incomplete coverage are lower bounds.',
|
|
175
|
-
historicalUnknownReasons: [...historicalUnknownReasons].map(([reason, count]) => ({ reason, count })),
|
|
176
|
-
counts: {
|
|
177
|
-
opened,
|
|
178
|
-
closed: closed.size,
|
|
179
|
-
active: active.length,
|
|
180
|
-
currentStatusUnknown,
|
|
181
|
-
blockerAdditions: {
|
|
182
|
-
total: blockerEvents.size,
|
|
183
|
-
active: classifications.filter((value) => value === 'active').length,
|
|
184
|
-
inactive: classifications.filter((value) => value === 'inactive').length,
|
|
185
|
-
unknown: classifications.filter((value) => value === 'unknown').length,
|
|
186
|
-
},
|
|
187
|
-
},
|
|
188
|
-
oldestActive: active
|
|
189
|
-
.sort((a, b) => Date.parse(a.created_at) - Date.parse(b.created_at) || a.number - b.number)
|
|
190
|
-
.slice(0, input.oldestLimit)
|
|
191
|
-
.map((issue) => ({
|
|
192
|
-
number: issue.number,
|
|
193
|
-
title: issue.title,
|
|
194
|
-
url: issue.html_url,
|
|
195
|
-
createdAt: issue.created_at,
|
|
196
|
-
createdAgeDays: Math.max(0, Math.floor((Date.parse(asOf) - Date.parse(issue.created_at)) / 86400000)),
|
|
197
|
-
})),
|
|
198
|
-
semantics: {
|
|
199
|
-
closed: 'Distinct issues with a native ClosedEvent in the window; reopen/reclose counts once.',
|
|
200
|
-
blockerAdditions: 'Distinct native BlockedByAddedEvent IDs; comments alone do not count. Unknown historical activity is not a policy violation.',
|
|
201
|
-
oldestActive: 'Current open In Progress issues ordered by creation time; age is since creation, not time in progress.',
|
|
202
|
-
scope: 'One explicitly selected repository; Project grouping defines the repository lane. Missing or inaccessible status and history are reported, not inferred.',
|
|
203
|
-
},
|
|
204
|
-
};
|
|
198
|
+
};
|
|
205
199
|
}
|
|
206
|
-
|
|
200
|
+
export {
|
|
201
|
+
DeliveryHealthInput,
|
|
202
|
+
deliveryHealth
|
|
203
|
+
};
|
|
204
|
+
//# sourceMappingURL=deliveryHealthService.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/services/deliveryHealthService.ts"],
|
|
4
|
+
"sourcesContent": ["import { z } from 'zod';\nimport type { DeliveryContext } from '../issue.js';\nimport { DeliveryError } from '../errors.js';\nimport {\n getIssueProjectStatus,\n getProjectDeliveryConfiguration,\n projectSettingsFromDeliveryConfig,\n} from '../github/projectDelivery.js';\nimport { historicalActivityEvidence, readIssueHistory } from '../github/issueHistory.js';\n\nexport const DeliveryHealthInput = z\n .strictObject({\n repo: z.string().regex(/^[A-Za-z0-9_.-]+\\/[A-Za-z0-9_.-]+$/u),\n from: z.iso.datetime(),\n to: z.iso.datetime(),\n maxIssues: z.number().int().positive().max(500).default(200),\n maxProjectPages: z.number().int().positive().max(20).default(5),\n maxTimelinePages: z.number().int().positive().max(20).default(5),\n oldestLimit: z.number().int().positive().max(20).default(10),\n })\n .refine((value) => Date.parse(value.from) < Date.parse(value.to), { message: 'from must precede to', path: ['to'] })\n .refine((value) => Date.parse(value.to) <= Date.now(), {\n message: 'to must be at or before collection time',\n path: ['to'],\n });\nexport type DeliveryHealthRequest = z.input<typeof DeliveryHealthInput>;\nconst RepositoryIssue = z.object({\n number: z.number().int().positive(),\n node_id: z.string().min(1),\n created_at: z.iso.datetime(),\n state: z.enum(['open', 'closed']),\n html_url: z.string().url(),\n title: z.string(),\n pull_request: z.unknown().optional(),\n});\n\n/** A bounded, non-atomic read-only view of one repository lane in the configured Project. */\nexport async function deliveryHealth(context: DeliveryContext, raw: DeliveryHealthRequest) {\n const input = DeliveryHealthInput.parse(raw);\n const repository = `${context.repo.owner}/${context.repo.repo}`;\n if (repository.toLowerCase() !== input.repo.toLowerCase())\n throw new DeliveryError('Health repository selector disagrees with the configured context.');\n const collectionStartedAt = new Date().toISOString();\n const asOf = collectionStartedAt;\n const issues = new Map<number, z.infer<typeof RepositoryIssue>>();\n const limitations: { issueNumber?: number; scope: string; reason: string }[] = [];\n const configuration =\n context.projectConfiguration ??\n (await getProjectDeliveryConfiguration({\n graphql: context.clients.graphql,\n org: context.config.native.organization,\n settings: projectSettingsFromDeliveryConfig(context.config),\n }));\n let listingComplete = false;\n for (let page = 1; page <= 20; page++) {\n try {\n const batch = (\n await context.clients.rest.issues.listForRepo({\n ...context.repo,\n state: 'all',\n sort: 'created',\n direction: 'asc',\n per_page: 100,\n page,\n })\n ).data;\n for (const value of batch) {\n if ('pull_request' in value) continue;\n const issue = RepositoryIssue.parse(value);\n const url = new URL(issue.html_url);\n if (\n url.hostname !== 'github.com' ||\n url.protocol !== 'https:' ||\n url.pathname.toLowerCase() !== `/${repository}/issues/${issue.number}`.toLowerCase()\n )\n throw new DeliveryError('Health issue repository identity disagrees.');\n if (!issues.has(issue.number) && issues.size === input.maxIssues)\n throw new DeliveryError('Repository issue limit reached');\n issues.set(issue.number, issue);\n }\n if (batch.length < 100) {\n listingComplete = true;\n break;\n }\n } catch (error) {\n limitations.push({\n scope: 'repository inventory',\n reason: (error instanceof Error ? error.message : String(error)).slice(0, 1000),\n });\n break;\n }\n }\n if (!listingComplete && !limitations.length)\n limitations.push({ scope: 'repository inventory', reason: 'Repository listing page limit reached' });\n const within = (time: string) =>\n Date.parse(time) >= Date.parse(input.from) && Date.parse(time) < Date.parse(input.to);\n const opened = [...issues.values()].filter((issue) => within(issue.created_at)).length;\n const closed = new Set<number>();\n const blockerEvents = new Map<string, 'active' | 'inactive' | 'unknown'>();\n const active: z.infer<typeof RepositoryIssue>[] = [];\n let currentStatusUnknown = 0;\n let historyComplete = true;\n const historicalUnknownReasons = new Map<string, number>();\n for (const issue of issues.values()) {\n try {\n const status = await getIssueProjectStatus({\n graphql: context.clients.graphql,\n issueNodeId: issue.node_id,\n org: context.config.native.organization,\n configuration,\n maxPages: input.maxProjectPages,\n });\n if (status === null) {\n currentStatusUnknown++;\n limitations.push({\n issueNumber: issue.number,\n scope: 'current Project status',\n reason: 'No resolvable current configured-Project status',\n });\n }\n if (issue.state === 'open' && status?.status === 'In Progress') active.push(issue);\n } catch (error) {\n currentStatusUnknown++;\n limitations.push({\n issueNumber: issue.number,\n scope: 'current Project status',\n reason: (error instanceof Error ? error.message : String(error)).slice(0, 1000),\n });\n }\n try {\n const history = await readIssueHistory(context, issue.number, input.maxTimelinePages, issue.node_id);\n if (!history.complete) {\n historyComplete = false;\n limitations.push({\n issueNumber: issue.number,\n scope: 'native timeline',\n reason: history.reason ?? 'Incomplete timeline',\n });\n }\n for (const event of history.events.filter((value) => within(value.createdAt))) {\n if (event.__typename === 'ClosedEvent') closed.add(issue.number);\n if (event.__typename === 'BlockedByAddedEvent' && !blockerEvents.has(event.id)) {\n const evidence = historicalActivityEvidence(\n history,\n event,\n configuration.projectId,\n context.config.native.project.statuses.inProgress,\n Object.values(context.config.native.project.statuses),\n );\n blockerEvents.set(event.id, evidence.activity);\n if (evidence.reason)\n historicalUnknownReasons.set(evidence.reason, (historicalUnknownReasons.get(evidence.reason) ?? 0) + 1);\n }\n }\n } catch (error) {\n historyComplete = false;\n limitations.push({\n issueNumber: issue.number,\n scope: 'native timeline',\n reason: (error instanceof Error ? error.message : String(error)).slice(0, 1000),\n });\n }\n }\n const classifications = [...blockerEvents.values()];\n return {\n repository,\n lane: { kind: 'repository', repository, projectId: configuration.projectId },\n window: { from: input.from, to: input.to, bounds: '[from,to)' },\n snapshot: { asOf, collectionStartedAt, collectionFinishedAt: new Date().toISOString(), atomic: false },\n completeness: {\n complete: listingComplete && limitations.length === 0 && historicalUnknownReasons.size === 0,\n issuesObserved: issues.size,\n listingComplete,\n limitations,\n metricCoverage: {\n opened: listingComplete,\n closed: listingComplete && historyComplete,\n active: listingComplete && currentStatusUnknown === 0,\n blockerAdditions: listingComplete && historyComplete,\n historicalActivity: listingComplete && historyComplete && historicalUnknownReasons.size === 0,\n },\n limits: {\n maxIssues: input.maxIssues,\n maxTimelinePages: input.maxTimelinePages,\n maxProjectPages: input.maxProjectPages,\n },\n },\n countsBasis: 'Observed counts; metrics with incomplete coverage are lower bounds.',\n historicalUnknownReasons: [...historicalUnknownReasons].map(([reason, count]) => ({ reason, count })),\n counts: {\n opened,\n closed: closed.size,\n active: active.length,\n currentStatusUnknown,\n blockerAdditions: {\n total: blockerEvents.size,\n active: classifications.filter((value) => value === 'active').length,\n inactive: classifications.filter((value) => value === 'inactive').length,\n unknown: classifications.filter((value) => value === 'unknown').length,\n },\n },\n oldestActive: active\n .sort((a, b) => Date.parse(a.created_at) - Date.parse(b.created_at) || a.number - b.number)\n .slice(0, input.oldestLimit)\n .map((issue) => ({\n number: issue.number,\n title: issue.title,\n url: issue.html_url,\n createdAt: issue.created_at,\n createdAgeDays: Math.max(0, Math.floor((Date.parse(asOf) - Date.parse(issue.created_at)) / 86400000)),\n })),\n semantics: {\n closed: 'Distinct issues with a native ClosedEvent in the window; reopen/reclose counts once.',\n blockerAdditions:\n 'Distinct native BlockedByAddedEvent IDs; comments alone do not count. Unknown historical activity is not a policy violation.',\n oldestActive:\n 'Current open In Progress issues ordered by creation time; age is since creation, not time in progress.',\n scope:\n 'One explicitly selected repository; Project grouping defines the repository lane. Missing or inaccessible status and history are reported, not inferred.',\n },\n };\n}\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,SAAS;AAElB,SAAS,qBAAqB;AAC9B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,4BAA4B,wBAAwB;AAEtD,MAAM,sBAAsB,EAChC,aAAa;AAAA,EACZ,MAAM,EAAE,OAAO,EAAE,MAAM,qCAAqC;AAAA,EAC5D,MAAM,EAAE,IAAI,SAAS;AAAA,EACrB,IAAI,EAAE,IAAI,SAAS;AAAA,EACnB,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,GAAG,EAAE,QAAQ,GAAG;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