@vypdev/copilot 3.10.6 → 3.10.8
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/build/api/index.js +13233 -302
- package/build/api/src/application/ports/agent_findings_ports.d.ts +4 -0
- package/build/api/src/application/ports/bugbot_context_ports.d.ts +2 -1
- package/build/api/src/application/ports/bugbot_pull_request_read_ports.d.ts +1 -0
- package/build/api/src/application/ports/bugbot_review_source_ports.d.ts +7 -0
- package/build/api/src/application/ports/bugbot_scm_ports.d.ts +2 -0
- package/build/api/src/application/ports/bugbot_telemetry_ports.d.ts +11 -0
- package/build/api/src/data/model/application_error.d.ts +31 -1
- package/build/api/src/domain/agent_source_snapshot.d.ts +24 -0
- package/build/api/src/domain/branch_sync_catalog_diagnostic.d.ts +24 -0
- package/build/api/src/domain/branch_sync_publication.d.ts +18 -0
- package/build/api/src/domain/bugbot/context.d.ts +7 -1
- package/build/api/src/domain/bugbot/framed_review.d.ts +98 -0
- package/build/api/src/domain/issue_assignment_diagnostic.d.ts +19 -0
- package/build/api/src/domain/progress_capacity_diagnostic.d.ts +136 -0
- package/build/api/src/domain/progress_completion_diagnostic.d.ts +9 -0
- package/build/api/src/domain/progress_inventory_diagnostic.d.ts +13 -0
- package/build/api/src/domain/progress_partition_length_failure.d.ts +20 -0
- package/build/api/src/domain/progress_response_diagnostic.d.ts +34 -0
- package/build/api/src/domain/sdd_validation_diagnostic.d.ts +26 -0
- package/build/cli/index.js +20063 -1598
- package/build/deployment_recovery/index.js +11757 -245
- package/build/github_action/index.js +19969 -1520
- package/package.json +7 -3
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import type { AgentQueryRequest, AgentQueryResult } from './agent_query_ports';
|
|
2
|
+
import type { AgentSourceSnapshot } from '../../domain/agent_source_snapshot';
|
|
2
3
|
export type { AgentQueryOptions } from './agent_query_ports';
|
|
3
4
|
export interface FindingsQueryRequest extends AgentQueryRequest {
|
|
4
5
|
agentId: string;
|
|
6
|
+
readonly signal?: AbortSignal;
|
|
7
|
+
/** Host-selected immutable source for pre-branch SDD queries; never a cwd input. */
|
|
8
|
+
readonly sourceSnapshot?: AgentSourceSnapshot;
|
|
5
9
|
}
|
|
6
10
|
export interface FindingsQueryPort {
|
|
7
11
|
query(request: FindingsQueryRequest): Promise<AgentQueryResult>;
|
|
@@ -8,12 +8,13 @@ export interface BoundedBugbotRead<T> {
|
|
|
8
8
|
readonly coverage: BugbotSourceCoverage;
|
|
9
9
|
}
|
|
10
10
|
export interface BoundBugbotContextReadPorts {
|
|
11
|
+
getSourceBoundPullRequest?(pullRequestNumber: number): Promise<BugbotPullRequestIdentity>;
|
|
11
12
|
getPullRequest(pullRequestNumber: number): Promise<BugbotPullRequestIdentity>;
|
|
12
13
|
findOpenPullRequestsByExactHead(headOwner: string, headRef: string): Promise<readonly BugbotPullRequestIdentity[]>;
|
|
13
14
|
listIssueComments(issueNumber: number): Promise<BoundedBugbotRead<readonly BugbotIssueComment[]>>;
|
|
14
15
|
listPullRequestReviewComments(pullRequestNumber: number): Promise<BoundedBugbotRead<readonly PullRequestReviewComment[]>>;
|
|
15
16
|
listPullRequestReviewThreadStates(pullRequestNumber: number): Promise<BoundedBugbotRead<Readonly<Record<string, PullRequestReviewThreadState>>>>;
|
|
16
|
-
getReviewDiffSnapshot(pullRequestNumber: number): Promise<BoundedBugbotRead<PullRequestReviewDiffSnapshot>>;
|
|
17
|
+
getReviewDiffSnapshot(pullRequestNumber: number, expectedHeadSha?: string): Promise<BoundedBugbotRead<PullRequestReviewDiffSnapshot>>;
|
|
17
18
|
getPullRequestHeadSha(pullRequestNumber: number): Promise<string | undefined>;
|
|
18
19
|
getPullRequestReviewCommentBody(pullRequestNumber: number, commentId: number): Promise<string | null>;
|
|
19
20
|
loadRules(paths: readonly string[], revision?: string): ReturnType<BugbotRuleFileQueryPort['loadRules']>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { BugbotPullRequestIdentity } from '../../domain/bugbot/context';
|
|
2
|
+
import type { BugbotFramedReviewSource } from '../../domain/bugbot/framed_review';
|
|
3
|
+
import type { PullRequestReviewDiffSnapshot } from './bugbot_pull_request_read_ports';
|
|
4
|
+
/** Fixed, read-only host capability. No process, filesystem-write or credential authority escapes. */
|
|
5
|
+
export interface BugbotReviewSourcePort {
|
|
6
|
+
readCompleteSource(identity: BugbotPullRequestIdentity, snapshot: PullRequestReviewDiffSnapshot, enumerationComplete: boolean, ignorePatterns: readonly string[]): Promise<BugbotFramedReviewSource>;
|
|
7
|
+
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import type { BugbotReviewSourcePort } from './bugbot_review_source_ports';
|
|
1
2
|
import type { BugbotContextPorts } from './bugbot_context_ports';
|
|
2
3
|
import type { BugbotFindingPublicationPorts } from './bugbot_finding_publication_ports';
|
|
3
4
|
import type { BugbotFindingResolutionPorts } from './bugbot_finding_resolution_ports';
|
|
4
5
|
import type { BugbotPresentationMutationPorts, BugbotReconciliationSnapshotPorts } from './bugbot_reconciliation_ports';
|
|
5
6
|
/** Complete repository-bound SCM surface consumed by one Bugbot review. */
|
|
6
7
|
export interface BugbotScmPorts {
|
|
8
|
+
readonly reviewSource?: BugbotReviewSourcePort;
|
|
7
9
|
readonly context: BugbotContextPorts;
|
|
8
10
|
readonly publication: BugbotFindingPublicationPorts;
|
|
9
11
|
readonly resolution: BugbotFindingResolutionPorts;
|
|
@@ -37,6 +37,17 @@ export interface BugbotReviewTelemetrySnapshot {
|
|
|
37
37
|
readonly contextLogicalProviderReads: number;
|
|
38
38
|
readonly contextRawProviderRequests: number;
|
|
39
39
|
readonly contextConcurrencyLimit: 2;
|
|
40
|
+
readonly framedReview?: {
|
|
41
|
+
readonly profile: 'framed-v1';
|
|
42
|
+
readonly frames: number;
|
|
43
|
+
readonly completedFrames: number;
|
|
44
|
+
readonly manifestDigest: string;
|
|
45
|
+
readonly rawUtf16: number;
|
|
46
|
+
readonly renderedUtf16: number;
|
|
47
|
+
readonly promptBytes: number;
|
|
48
|
+
readonly responseBytes: number;
|
|
49
|
+
readonly source?: import('../../domain/bugbot/framed_review').BugbotFramedReviewSource['metrics'];
|
|
50
|
+
};
|
|
40
51
|
readonly analysisPartitions?: number;
|
|
41
52
|
readonly completedAnalysisPartitions?: number;
|
|
42
53
|
readonly analysisDiffFragments?: number;
|
|
@@ -1,15 +1,27 @@
|
|
|
1
|
+
import { type BranchSyncPublicationDiagnostic } from '../../domain/branch_sync_publication';
|
|
2
|
+
import { type BugbotReviewBlockFacts } from '../../domain/bugbot/framed_review';
|
|
3
|
+
import { type ProgressScopeCapacityFacts } from '../../domain/progress_response_diagnostic';
|
|
4
|
+
import { type ProgressCompletionDiagnostic } from '../../domain/progress_completion_diagnostic';
|
|
5
|
+
import { type ProgressInventoryDiagnostic } from '../../domain/progress_inventory_diagnostic';
|
|
6
|
+
import { type ProgressCapacityDiagnostic } from '../../domain/progress_capacity_diagnostic';
|
|
7
|
+
import { type ProgressResponseDiagnosticFacts } from '../../domain/progress_response_diagnostic';
|
|
8
|
+
import { type ProgressPartitionLengthDiagnostic } from '../../domain/progress_partition_length_failure';
|
|
1
9
|
import { type ProgressBinaryEvidenceFacts } from '../../domain/progress_binary_evidence_diagnostic';
|
|
2
10
|
import { type IssueWorkflowDiagnosticFacts } from '../../domain/issue_workflow_diagnostic';
|
|
3
11
|
import { type ChangeSizeReconciliationFacts } from '../../domain/change_size_reconciliation';
|
|
12
|
+
import { type IssueAssignmentDiagnostic } from '../../domain/issue_assignment_diagnostic';
|
|
4
13
|
import { type CopilotCommandValidationReason } from '../../domain/copilot_command_validation';
|
|
5
14
|
import type { CopilotCommandName } from '../../domain/copilot_command';
|
|
6
15
|
import { type ClosedIssueReconciliationFacts } from '../../domain/closed_issue_reconciliation';
|
|
7
16
|
import { type ApprovalEvidenceDiagnostic } from '../../domain/approval_evidence_diagnostic';
|
|
8
17
|
import { type BranchSyncValidationCode } from '../../domain/branch_sync_validation';
|
|
9
18
|
import { type BranchSyncVerificationFailure } from '../../domain/verification_failure';
|
|
19
|
+
import { type BranchSyncCatalogDiagnostic } from '../../domain/branch_sync_catalog_diagnostic';
|
|
20
|
+
import { type SddSourceContextDiagnostic } from '../../domain/agent_source_snapshot';
|
|
21
|
+
import { type SddDraftMinimumDiagnostic } from '../../domain/sdd_validation_diagnostic';
|
|
10
22
|
export type ApplicationErrorKind = 'configuration' | 'authorization' | 'provider' | 'agent' | 'validation' | 'workflow' | 'unknown';
|
|
11
23
|
export type ApplicationErrorCode = 'configuration.invalid' | 'configuration.unsupported' | 'authorization.denied' | 'authorization.credential-invalid' | 'provider.not-found' | 'provider.conflict' | 'provider.rate-limited' | 'provider.unavailable' | 'provider.contract-invalid' | 'agent.policy-rejected' | 'agent.failed' | 'locale.output-invalid' | 'locale.translation-failed' | 'validation.invalid-input' | 'validation.evidence-too-large' | 'validation.evidence-unavailable' | 'workflow.invalid-event' | 'workflow.stale' | 'workflow.cancelled' | 'workflow.failed' | 'workflow.presentation-pending' | 'timeout' | 'unexpected';
|
|
12
|
-
export declare const APPLICATION_ERROR_RECOVERY_IDS: readonly ["comment-command-length", "comment-command-name-missing", "comment-command-name-unknown", "comment-command-argument-count", "comment-command-arguments-unexpected", "comment-command-arguments-missing", "comment-command-finding-quoting", "comment-command-review-format", "comment-command-review-effort", "comment-command-review-boolean", "comment-command-review-option", "comment-command-sync-option", "comment-command-sync-parent", "pull-request-link-restored", "pull-request-link-base-retained", "pull-request-link-reference-retained", "pull-request-link-base-and-reference-retained", "managed-branch-enrichment-failed", "inactivity-explanation-failed", "bugbot-review-blocks-pending", "branch-sync-agent-disabled", "branch-sync-fixer-unavailable", "branch-sync-resolution-invalid", "branch-sync-verification-failed", "sdd-draft-size-exceeded", "sdd-catalog-unsupported-profile", "sdd-catalog-format-invalid", "sdd-draft-format-invalid", "sdd-draft-case-identity-invalid", "sdd-draft-case-budget-invalid", "sdd-draft-requirement-mapping-invalid", "sdd-draft-repository-path-invalid", "deployment-publication-context-missing", "workspace-changes-rejected", "closed-issue-reconciliation-failed", "approval-evidence-read-failed", "change-size-reconciliation-failed", "issue-workflow-admission-blocked", "progress-binary-evidence-unavailable", "stored-configuration-schema-missing", "stored-configuration-schema-unsupported", "stored-configuration-invalid"];
|
|
24
|
+
export declare const APPLICATION_ERROR_RECOVERY_IDS: readonly ["comment-command-length", "comment-command-name-missing", "comment-command-name-unknown", "comment-command-argument-count", "comment-command-arguments-unexpected", "comment-command-arguments-missing", "comment-command-finding-quoting", "comment-command-review-format", "comment-command-review-effort", "comment-command-review-boolean", "comment-command-review-option", "comment-command-sync-option", "comment-command-sync-parent", "pull-request-link-restored", "pull-request-link-base-retained", "pull-request-link-reference-retained", "pull-request-link-base-and-reference-retained", "managed-branch-enrichment-failed", "inactivity-explanation-failed", "bugbot-review-blocks-pending", "branch-sync-agent-disabled", "branch-sync-fixer-unavailable", "branch-sync-resolution-invalid", "branch-sync-verification-failed", "branch-sync-catalog-incompatible", "branch-sync-workflow-write-required", "branch-sync-publication-failed", "sdd-draft-size-exceeded", "sdd-draft-response-too-short", "sdd-catalog-unsupported-profile", "sdd-catalog-format-invalid", "sdd-catalog-missing-trusted-source", "sdd-source-context-unavailable", "sdd-draft-format-invalid", "sdd-draft-case-identity-invalid", "sdd-draft-case-budget-invalid", "sdd-draft-requirement-mapping-invalid", "sdd-draft-repository-path-invalid", "deployment-publication-context-missing", "workspace-changes-rejected", "closed-issue-reconciliation-failed", "approval-evidence-read-failed", "change-size-reconciliation-failed", "issue-assignment-failed", "issue-assignment-count-invalid", "issue-workflow-admission-blocked", "progress-binary-evidence-unavailable", "progress-inventory-incomplete", "progress-evidence-capacity-exceeded", "bugbot-review-incomplete", "progress-result-contract-invalid", "progress-partition-length-invalid", "progress-assessment-capacity-exceeded", "progress-scope-clause-limit", "progress-completion-recovery-exhausted", "stored-configuration-schema-missing", "stored-configuration-schema-unsupported", "stored-configuration-invalid"];
|
|
13
25
|
export type ApplicationErrorRecoveryId = typeof APPLICATION_ERROR_RECOVERY_IDS[number];
|
|
14
26
|
interface ApplicationErrorRecoveryVariables extends Readonly<Record<CopilotCommandValidationReason, Readonly<{
|
|
15
27
|
command: CopilotCommandName;
|
|
@@ -30,8 +42,18 @@ interface ApplicationErrorRecoveryVariables extends Readonly<Record<CopilotComma
|
|
|
30
42
|
readonly 'closed-issue-reconciliation-failed': ClosedIssueReconciliationFacts;
|
|
31
43
|
readonly 'approval-evidence-read-failed': ApprovalEvidenceDiagnostic;
|
|
32
44
|
readonly 'change-size-reconciliation-failed': ChangeSizeReconciliationFacts;
|
|
45
|
+
readonly 'issue-assignment-failed': IssueAssignmentDiagnostic;
|
|
46
|
+
readonly 'issue-assignment-count-invalid': Readonly<Record<string, never>>;
|
|
33
47
|
readonly 'issue-workflow-admission-blocked': IssueWorkflowDiagnosticFacts;
|
|
34
48
|
readonly 'progress-binary-evidence-unavailable': ProgressBinaryEvidenceFacts;
|
|
49
|
+
readonly 'progress-inventory-incomplete': ProgressInventoryDiagnostic;
|
|
50
|
+
readonly 'progress-evidence-capacity-exceeded': ProgressCapacityDiagnostic;
|
|
51
|
+
readonly 'bugbot-review-incomplete': BugbotReviewBlockFacts;
|
|
52
|
+
readonly 'progress-result-contract-invalid': ProgressResponseDiagnosticFacts;
|
|
53
|
+
readonly 'progress-partition-length-invalid': ProgressPartitionLengthDiagnostic;
|
|
54
|
+
readonly 'progress-assessment-capacity-exceeded': ProgressResponseDiagnosticFacts;
|
|
55
|
+
readonly 'progress-scope-clause-limit': ProgressScopeCapacityFacts;
|
|
56
|
+
readonly 'progress-completion-recovery-exhausted': ProgressCompletionDiagnostic;
|
|
35
57
|
readonly 'pull-request-link-restored': Readonly<Record<string, never>>;
|
|
36
58
|
readonly 'pull-request-link-base-retained': Readonly<Record<string, never>>;
|
|
37
59
|
readonly 'pull-request-link-reference-retained': Readonly<Record<string, never>>;
|
|
@@ -56,9 +78,17 @@ interface ApplicationErrorRecoveryVariables extends Readonly<Record<CopilotComma
|
|
|
56
78
|
command: '/copilot sync-branch';
|
|
57
79
|
}>;
|
|
58
80
|
readonly 'branch-sync-verification-failed': BranchSyncVerificationFailure;
|
|
81
|
+
readonly 'branch-sync-catalog-incompatible': BranchSyncCatalogDiagnostic & Readonly<{
|
|
82
|
+
abort: 'completed' | 'unverified';
|
|
83
|
+
}>;
|
|
84
|
+
readonly 'branch-sync-workflow-write-required': BranchSyncPublicationDiagnostic;
|
|
85
|
+
readonly 'branch-sync-publication-failed': BranchSyncPublicationDiagnostic;
|
|
59
86
|
readonly 'sdd-draft-size-exceeded': Readonly<Record<string, never>>;
|
|
87
|
+
readonly 'sdd-draft-response-too-short': SddDraftMinimumDiagnostic;
|
|
60
88
|
readonly 'sdd-catalog-unsupported-profile': Readonly<Record<string, never>>;
|
|
61
89
|
readonly 'sdd-catalog-format-invalid': Readonly<Record<string, never>>;
|
|
90
|
+
readonly 'sdd-catalog-missing-trusted-source': Readonly<Record<string, never>>;
|
|
91
|
+
readonly 'sdd-source-context-unavailable': SddSourceContextDiagnostic;
|
|
62
92
|
readonly 'sdd-draft-format-invalid': Readonly<Record<string, never>>;
|
|
63
93
|
readonly 'sdd-draft-case-identity-invalid': Readonly<Record<string, never>>;
|
|
64
94
|
readonly 'sdd-draft-case-budget-invalid': Readonly<Record<string, never>>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** SDK-owned source identity; never a user-selected workspace or provider option. */
|
|
2
|
+
export interface AgentSourceSnapshot {
|
|
3
|
+
readonly kind: 'pre-branch-sdd';
|
|
4
|
+
readonly phase: 'analysis' | 'draft';
|
|
5
|
+
readonly baseSha: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const SDD_SOURCE_CONTEXT_REASONS: readonly ["binding-invalid", "git-unavailable", "object-unavailable", "unsafe-entry", "entry-limit", "file-limit", "blob-limit", "byte-limit", "metadata-limit", "materialization-failed", "view-integrity"];
|
|
8
|
+
export type SddSourceContextReason = typeof SDD_SOURCE_CONTEXT_REASONS[number];
|
|
9
|
+
export interface SddSourceContextDiagnostic {
|
|
10
|
+
readonly sourceCommit: string;
|
|
11
|
+
readonly phase: AgentSourceSnapshot['phase'] | 'unknown';
|
|
12
|
+
readonly reason: SddSourceContextReason;
|
|
13
|
+
}
|
|
14
|
+
export declare function isSddSourceContextDiagnostic(value: unknown): value is SddSourceContextDiagnostic;
|
|
15
|
+
/** Also protects renderers called with untyped external records. */
|
|
16
|
+
export declare function sourceContextDiagnostic(value: unknown): SddSourceContextDiagnostic;
|
|
17
|
+
export declare function isSddSourceContextReason(value: unknown): value is SddSourceContextReason;
|
|
18
|
+
export declare function readAgentSourceSnapshot(value: unknown): AgentSourceSnapshot | undefined;
|
|
19
|
+
/** Closed host facts only. Git output, paths, credentials and producer text are discarded. */
|
|
20
|
+
export declare class SddSourceContextFailure extends Error {
|
|
21
|
+
readonly reason: SddSourceContextReason;
|
|
22
|
+
readonly source: AgentSourceSnapshot | undefined;
|
|
23
|
+
constructor(reason: SddSourceContextReason, source?: unknown);
|
|
24
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** Closed compatibility facts; catalog values never become public operands. */
|
|
2
|
+
export declare const BRANCH_SYNC_CATALOG_MAX_BYTES: number;
|
|
3
|
+
export declare const BRANCH_SYNC_CATALOG_PROFILES: readonly ["sdk-v1", "legacy-evidence", "native", "ambiguous", "unknown"];
|
|
4
|
+
export declare const BRANCH_SYNC_CATALOG_PHASES: readonly ["workspace-boundary", "catalog-file-boundary", "metadata-json", "metadata-conflict-markers", "metadata-shape", "profile-compatibility", "evidence-shape", "evidence-path-boundary", "catalog-contract", "index-output"];
|
|
5
|
+
export declare const SDK_CATALOG_PATH_FIELDS: readonly ["specs", "workflows", "entrypoints", "code", "tests", "documentation"];
|
|
6
|
+
export declare const BRANCH_SYNC_CATALOG_FIELDS: readonly ["catalog", "version", "capabilities", "$schema", "specs", "workflows", "entrypoints", "code", "tests", "documentation", "id", "title", "status", "scope", "owner", "lastVerified", "evidence", "specification"];
|
|
7
|
+
export type BranchSyncCatalogProfile = typeof BRANCH_SYNC_CATALOG_PROFILES[number];
|
|
8
|
+
export type BranchSyncCatalogPhase = typeof BRANCH_SYNC_CATALOG_PHASES[number];
|
|
9
|
+
export type BranchSyncCatalogField = typeof BRANCH_SYNC_CATALOG_FIELDS[number];
|
|
10
|
+
export interface BranchSyncCatalogDiagnostic {
|
|
11
|
+
readonly phase: BranchSyncCatalogPhase;
|
|
12
|
+
readonly profile: BranchSyncCatalogProfile;
|
|
13
|
+
readonly field: BranchSyncCatalogField;
|
|
14
|
+
/** Zero is document scope; positive positions identify one capability. */
|
|
15
|
+
readonly capabilityNumber: number;
|
|
16
|
+
}
|
|
17
|
+
export declare function isBranchSyncCatalogDiagnostic(value: unknown): value is BranchSyncCatalogDiagnostic;
|
|
18
|
+
export declare function catalogDiagnostic(phase: BranchSyncCatalogPhase, profile?: BranchSyncCatalogProfile, field?: BranchSyncCatalogField, capabilityNumber?: number): BranchSyncCatalogDiagnostic;
|
|
19
|
+
export declare class BranchSyncCatalogFailure extends Error {
|
|
20
|
+
readonly diagnostic: BranchSyncCatalogDiagnostic;
|
|
21
|
+
constructor(diagnostic: BranchSyncCatalogDiagnostic);
|
|
22
|
+
}
|
|
23
|
+
/** Classifies dialect/array shape only; the bundled validator still owns full SDK conformance. */
|
|
24
|
+
export declare function classifyBranchSyncCatalog(value: unknown): BranchSyncCatalogDiagnostic;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const BRANCH_SYNC_PUBLICATION_REASONS: readonly ["workflow-write-required", "push-failed", "candidate-unverified"];
|
|
2
|
+
export declare const BRANCH_SYNC_REMOTE_STATES: readonly ["unchanged", "published", "changed", "unverified"];
|
|
3
|
+
export interface BranchSyncPublicationDiagnostic {
|
|
4
|
+
readonly reason: typeof BRANCH_SYNC_PUBLICATION_REASONS[number];
|
|
5
|
+
readonly remoteState: typeof BRANCH_SYNC_REMOTE_STATES[number];
|
|
6
|
+
readonly originalSha: string;
|
|
7
|
+
readonly candidateSha: string;
|
|
8
|
+
readonly observedSha: string;
|
|
9
|
+
readonly pushAttempted: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare function isBranchSyncObjectId(value: unknown): value is string;
|
|
12
|
+
export declare function admittedBranchSyncObjectId(value: unknown): string;
|
|
13
|
+
export declare function isBranchSyncPublicationDiagnostic(value: unknown): value is BranchSyncPublicationDiagnostic;
|
|
14
|
+
/** A committed candidate is no longer an in-progress Git merge. */
|
|
15
|
+
export declare class BranchSyncPublicationFailure extends Error {
|
|
16
|
+
readonly diagnostic: BranchSyncPublicationDiagnostic;
|
|
17
|
+
constructor(diagnostic: BranchSyncPublicationDiagnostic);
|
|
18
|
+
}
|
|
@@ -11,7 +11,7 @@ export interface BugbotSourceCoverage {
|
|
|
11
11
|
/** Exact bounded provider identities of retained conversation items truncated by the prompt. */
|
|
12
12
|
readonly truncatedItemIds?: readonly string[];
|
|
13
13
|
readonly limitReached: boolean;
|
|
14
|
-
/** True when
|
|
14
|
+
/** True when the provider page cap prevents fetching additional records. */
|
|
15
15
|
readonly providerLimitReached?: boolean;
|
|
16
16
|
}
|
|
17
17
|
export interface BugbotContextCoverage {
|
|
@@ -38,6 +38,12 @@ export interface BugbotReviewTarget {
|
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
40
|
export interface BugbotPullRequestIdentity {
|
|
41
|
+
/** Required by source-bound framed reviews; supplied by canonical provider facts. */
|
|
42
|
+
readonly baseSha?: string;
|
|
43
|
+
/** Live target branch tip; PR base.sha may retain an earlier comparison revision. */
|
|
44
|
+
readonly baseRefSha?: string;
|
|
45
|
+
readonly baseRef?: string;
|
|
46
|
+
readonly changedFileCount?: number;
|
|
41
47
|
readonly number: number;
|
|
42
48
|
readonly state: "open" | "closed";
|
|
43
49
|
readonly draft: boolean;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/** Closed invocation-only review capacity. No caller-supplied limit can expand it. */
|
|
2
|
+
export declare const BUGBOT_FRAMED_LIMITS: Readonly<{
|
|
3
|
+
files: 1000;
|
|
4
|
+
fragments: 4096;
|
|
5
|
+
rawUtf16: 8192000;
|
|
6
|
+
normalizedUtf16: 8192000;
|
|
7
|
+
fragmentUtf16: 12000;
|
|
8
|
+
partitionUtf16: 64000;
|
|
9
|
+
renderedUtf16: 8192000;
|
|
10
|
+
partitions: 128;
|
|
11
|
+
frames: 2;
|
|
12
|
+
framePartitions: 64;
|
|
13
|
+
promptBytes: number;
|
|
14
|
+
promptTotalBytes: number;
|
|
15
|
+
responseBytes: number;
|
|
16
|
+
resultBytes: number;
|
|
17
|
+
findingsPerResponse: 200;
|
|
18
|
+
findings: 2000;
|
|
19
|
+
resolutions: 500;
|
|
20
|
+
recoveredFiles: 64;
|
|
21
|
+
recoveredPatchBytes: number;
|
|
22
|
+
recoveredPatchTotalBytes: number;
|
|
23
|
+
blobBytes: number;
|
|
24
|
+
blobTotalBytes: number;
|
|
25
|
+
gitReads: 256;
|
|
26
|
+
}>;
|
|
27
|
+
export type BugbotFramedResource = keyof typeof BUGBOT_FRAMED_LIMITS;
|
|
28
|
+
export type BugbotReviewBlockReason = BugbotFramedResource | 'source' | 'identity' | 'manifest' | 'coverage' | 'receipt' | 'capability';
|
|
29
|
+
export type BugbotReviewCountUnit = 'UTF-16 code units' | 'UTF-8 bytes' | 'items' | 'operations';
|
|
30
|
+
export interface BugbotReviewBlockFacts {
|
|
31
|
+
readonly profile: 'framed-v1';
|
|
32
|
+
readonly countKind: 'exact' | 'at-least';
|
|
33
|
+
readonly resource: BugbotReviewBlockReason;
|
|
34
|
+
readonly observed: number;
|
|
35
|
+
readonly limit: number;
|
|
36
|
+
readonly unit: BugbotReviewCountUnit;
|
|
37
|
+
}
|
|
38
|
+
/** Content-free deterministic failure, mapped to localized semantic errors by the application. */
|
|
39
|
+
export declare class BugbotReviewCompletenessError extends Error {
|
|
40
|
+
readonly facts: BugbotReviewBlockFacts;
|
|
41
|
+
constructor(resource: BugbotReviewBlockReason, observed?: number, limit?: number, unit?: BugbotReviewCountUnit, countKind?: 'exact' | 'at-least');
|
|
42
|
+
}
|
|
43
|
+
export declare function enforceBugbotFramedBudget(resource: BugbotFramedResource, observed: number): void;
|
|
44
|
+
export interface BugbotFramedReviewIdentity {
|
|
45
|
+
readonly owner: string;
|
|
46
|
+
readonly repository: string;
|
|
47
|
+
readonly repositoryId?: number;
|
|
48
|
+
readonly pullRequestNumber: number;
|
|
49
|
+
readonly baseRef: string;
|
|
50
|
+
readonly baseSha: string;
|
|
51
|
+
readonly headOwner: string;
|
|
52
|
+
readonly headRepository: string;
|
|
53
|
+
readonly headRef: string;
|
|
54
|
+
readonly headSha: string;
|
|
55
|
+
readonly mergeBaseSha: string;
|
|
56
|
+
}
|
|
57
|
+
export interface BugbotReviewGitEntry {
|
|
58
|
+
readonly mode: '100644' | '100755';
|
|
59
|
+
readonly oid: string;
|
|
60
|
+
}
|
|
61
|
+
export interface BugbotFramedChange {
|
|
62
|
+
readonly git?: {
|
|
63
|
+
readonly old?: BugbotReviewGitEntry;
|
|
64
|
+
readonly current?: BugbotReviewGitEntry;
|
|
65
|
+
};
|
|
66
|
+
readonly filename: string;
|
|
67
|
+
readonly previousFilename?: string;
|
|
68
|
+
readonly status: string;
|
|
69
|
+
readonly additions: number;
|
|
70
|
+
readonly deletions: number;
|
|
71
|
+
readonly patch: string;
|
|
72
|
+
readonly source: 'provider' | 'local-git';
|
|
73
|
+
}
|
|
74
|
+
export interface BugbotFramedReviewSource {
|
|
75
|
+
readonly identity: BugbotFramedReviewIdentity;
|
|
76
|
+
readonly changes: readonly BugbotFramedChange[];
|
|
77
|
+
readonly complete: boolean;
|
|
78
|
+
/** Content-free measured source work; never a substitute for immutable coverage proof. */
|
|
79
|
+
readonly metrics?: {
|
|
80
|
+
readonly gitReads: number;
|
|
81
|
+
readonly verifiedBlobs: number;
|
|
82
|
+
readonly verifiedBlobBytes: number;
|
|
83
|
+
readonly recoveredFiles: number;
|
|
84
|
+
readonly recoveredPatchBytes: number;
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
/** A receipt binds every fragment in one exact partition to its source and invocation. */
|
|
88
|
+
export interface BugbotFramedAssignment {
|
|
89
|
+
readonly profile: 'framed-v1';
|
|
90
|
+
readonly manifestDigest: string;
|
|
91
|
+
readonly frameId: string;
|
|
92
|
+
readonly frameOrdinal: number;
|
|
93
|
+
readonly frameTotal: number;
|
|
94
|
+
readonly baseSha: string;
|
|
95
|
+
readonly fragmentIds: readonly string[];
|
|
96
|
+
readonly coverageDigest: string;
|
|
97
|
+
}
|
|
98
|
+
export declare function isBugbotReviewBlockFacts(value: object): boolean;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const ASSIGNMENT_STAGES: readonly ["read-assignees", "lookup-members", "select-members", "assign-creator", "assign-members"];
|
|
2
|
+
export declare const ASSIGNMENT_OPERATIONS: readonly ["read-assignees", "list-teams", "list-team-members", "add-assignees", "initialize-client", "unavailable"];
|
|
3
|
+
export type AssignmentStage = typeof ASSIGNMENT_STAGES[number];
|
|
4
|
+
export type AssignmentOperation = typeof ASSIGNMENT_OPERATIONS[number];
|
|
5
|
+
/** Counts describe only this assignment attempt; other lifecycle results remain independent. */
|
|
6
|
+
export interface IssueAssignmentDiagnostic {
|
|
7
|
+
readonly targetNumber: number;
|
|
8
|
+
readonly desiredCount: number;
|
|
9
|
+
readonly stage: AssignmentStage;
|
|
10
|
+
readonly operation: AssignmentOperation;
|
|
11
|
+
readonly providerStatus: string;
|
|
12
|
+
readonly assigneeRead: 'verified' | 'unavailable';
|
|
13
|
+
readonly observedAssignees: number | 'unavailable';
|
|
14
|
+
readonly confirmedAssignments: number;
|
|
15
|
+
readonly remainingAssignments: number | 'unavailable';
|
|
16
|
+
readonly mutation: 'not-attempted' | 'unverified' | 'verified';
|
|
17
|
+
}
|
|
18
|
+
export declare function isAssignmentProviderStatus(value: unknown): value is string;
|
|
19
|
+
export declare function isIssueAssignmentDiagnostic(value: Readonly<Record<string, unknown>>): boolean;
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
export type ProgressCapacityPhase = 'input' | 'source' | 'scope' | 'partition' | 'aggregate' | 'assessment';
|
|
2
|
+
export type ProgressCapacityUnit = 'bytes' | 'parts' | 'lines' | 'code-points' | 'units';
|
|
3
|
+
export type ProgressCapacityBound = 'minimum' | 'maximum' | 'unavailable';
|
|
4
|
+
export type ProgressCapacityCount = number | 'unavailable';
|
|
5
|
+
export declare const PROGRESS_CAPACITY_DIMENSIONS: Readonly<{
|
|
6
|
+
'source-unit-bytes': Readonly<{
|
|
7
|
+
phases: readonly ProgressCapacityPhase[];
|
|
8
|
+
unit: ProgressCapacityUnit;
|
|
9
|
+
bounds: readonly ProgressCapacityBound[];
|
|
10
|
+
}>;
|
|
11
|
+
'source-part-bytes': Readonly<{
|
|
12
|
+
phases: readonly ProgressCapacityPhase[];
|
|
13
|
+
unit: ProgressCapacityUnit;
|
|
14
|
+
bounds: readonly ProgressCapacityBound[];
|
|
15
|
+
}>;
|
|
16
|
+
'source-part-count': Readonly<{
|
|
17
|
+
phases: readonly ProgressCapacityPhase[];
|
|
18
|
+
unit: ProgressCapacityUnit;
|
|
19
|
+
bounds: readonly ProgressCapacityBound[];
|
|
20
|
+
}>;
|
|
21
|
+
'source-unit-count': Readonly<{
|
|
22
|
+
phases: readonly ProgressCapacityPhase[];
|
|
23
|
+
unit: ProgressCapacityUnit;
|
|
24
|
+
bounds: readonly ProgressCapacityBound[];
|
|
25
|
+
}>;
|
|
26
|
+
'source-manifest-bytes': Readonly<{
|
|
27
|
+
phases: readonly ProgressCapacityPhase[];
|
|
28
|
+
unit: ProgressCapacityUnit;
|
|
29
|
+
bounds: readonly ProgressCapacityBound[];
|
|
30
|
+
}>;
|
|
31
|
+
'source-line-count': Readonly<{
|
|
32
|
+
phases: readonly ProgressCapacityPhase[];
|
|
33
|
+
unit: ProgressCapacityUnit;
|
|
34
|
+
bounds: readonly ProgressCapacityBound[];
|
|
35
|
+
}>;
|
|
36
|
+
'source-line-points': Readonly<{
|
|
37
|
+
phases: readonly ProgressCapacityPhase[];
|
|
38
|
+
unit: ProgressCapacityUnit;
|
|
39
|
+
bounds: readonly ProgressCapacityBound[];
|
|
40
|
+
}>;
|
|
41
|
+
'input-text-bytes': Readonly<{
|
|
42
|
+
phases: readonly ProgressCapacityPhase[];
|
|
43
|
+
unit: ProgressCapacityUnit;
|
|
44
|
+
bounds: readonly ProgressCapacityBound[];
|
|
45
|
+
}>;
|
|
46
|
+
'native-prompt-bytes': Readonly<{
|
|
47
|
+
phases: readonly ProgressCapacityPhase[];
|
|
48
|
+
unit: ProgressCapacityUnit;
|
|
49
|
+
bounds: readonly ProgressCapacityBound[];
|
|
50
|
+
}>;
|
|
51
|
+
'native-prompt-reserve-bytes': Readonly<{
|
|
52
|
+
phases: readonly ProgressCapacityPhase[];
|
|
53
|
+
unit: ProgressCapacityUnit;
|
|
54
|
+
bounds: readonly ProgressCapacityBound[];
|
|
55
|
+
}>;
|
|
56
|
+
'aggregate-reserve-bytes': Readonly<{
|
|
57
|
+
phases: readonly ProgressCapacityPhase[];
|
|
58
|
+
unit: ProgressCapacityUnit;
|
|
59
|
+
bounds: readonly ProgressCapacityBound[];
|
|
60
|
+
}>;
|
|
61
|
+
'aggregate-allocation-bytes': Readonly<{
|
|
62
|
+
phases: readonly ProgressCapacityPhase[];
|
|
63
|
+
unit: ProgressCapacityUnit;
|
|
64
|
+
bounds: readonly ProgressCapacityBound[];
|
|
65
|
+
}>;
|
|
66
|
+
'aggregate-envelope-bytes': Readonly<{
|
|
67
|
+
phases: readonly ProgressCapacityPhase[];
|
|
68
|
+
unit: ProgressCapacityUnit;
|
|
69
|
+
bounds: readonly ProgressCapacityBound[];
|
|
70
|
+
}>;
|
|
71
|
+
'minimum-fact-bytes': Readonly<{
|
|
72
|
+
phases: readonly ProgressCapacityPhase[];
|
|
73
|
+
unit: ProgressCapacityUnit;
|
|
74
|
+
bounds: readonly ProgressCapacityBound[];
|
|
75
|
+
}>;
|
|
76
|
+
'evidence-unit-count': Readonly<{
|
|
77
|
+
phases: readonly ProgressCapacityPhase[];
|
|
78
|
+
unit: ProgressCapacityUnit;
|
|
79
|
+
bounds: readonly ProgressCapacityBound[];
|
|
80
|
+
}>;
|
|
81
|
+
'aggregate-fact-bytes': Readonly<{
|
|
82
|
+
phases: readonly ProgressCapacityPhase[];
|
|
83
|
+
unit: ProgressCapacityUnit;
|
|
84
|
+
bounds: readonly ProgressCapacityBound[];
|
|
85
|
+
}>;
|
|
86
|
+
'invalid-allocation': Readonly<{
|
|
87
|
+
phases: readonly ProgressCapacityPhase[];
|
|
88
|
+
unit: ProgressCapacityUnit;
|
|
89
|
+
bounds: readonly ProgressCapacityBound[];
|
|
90
|
+
}>;
|
|
91
|
+
}>;
|
|
92
|
+
export type ProgressCapacityDimension = keyof typeof PROGRESS_CAPACITY_DIMENSIONS;
|
|
93
|
+
export type ProgressCapacityContext = Readonly<{
|
|
94
|
+
kind: 'unavailable';
|
|
95
|
+
}> | Readonly<{
|
|
96
|
+
kind: 'source-line';
|
|
97
|
+
sourceLineId: string;
|
|
98
|
+
}> | Readonly<{
|
|
99
|
+
kind: 'comparison';
|
|
100
|
+
baseSha: string;
|
|
101
|
+
headSha: string;
|
|
102
|
+
manifestDigest: string;
|
|
103
|
+
sourceLineId: string;
|
|
104
|
+
requiredPathsDigest: string;
|
|
105
|
+
reviewedPathsDigest: string;
|
|
106
|
+
uncoveredPathsDigest: string;
|
|
107
|
+
requiredPathCount: number;
|
|
108
|
+
reviewedPathCount: number;
|
|
109
|
+
uncoveredPathCount: number;
|
|
110
|
+
paths: readonly string[];
|
|
111
|
+
}>;
|
|
112
|
+
export interface ProgressCapacityDiagnostic {
|
|
113
|
+
readonly phase: ProgressCapacityPhase;
|
|
114
|
+
readonly dimension: ProgressCapacityDimension;
|
|
115
|
+
readonly unit: ProgressCapacityUnit;
|
|
116
|
+
readonly bound: ProgressCapacityBound;
|
|
117
|
+
readonly observedCount: ProgressCapacityCount;
|
|
118
|
+
readonly supportedLimit: ProgressCapacityCount;
|
|
119
|
+
readonly countKind: 'exact' | 'at-least' | 'unavailable';
|
|
120
|
+
readonly context: ProgressCapacityContext;
|
|
121
|
+
}
|
|
122
|
+
export interface ProgressCapacityInput {
|
|
123
|
+
readonly phase: ProgressCapacityPhase;
|
|
124
|
+
readonly dimension: ProgressCapacityDimension;
|
|
125
|
+
readonly observedCount: ProgressCapacityCount;
|
|
126
|
+
readonly supportedLimit: ProgressCapacityCount;
|
|
127
|
+
readonly bound?: ProgressCapacityBound;
|
|
128
|
+
readonly countKind?: ProgressCapacityDiagnostic['countKind'];
|
|
129
|
+
readonly context?: ProgressCapacityContext;
|
|
130
|
+
}
|
|
131
|
+
/** Shape validation does not certify a source; host call sites own attribution. */
|
|
132
|
+
export declare function normalizeProgressCapacityContext(value: unknown): ProgressCapacityContext;
|
|
133
|
+
/** Reject incoherent or arbitrary metadata and copy/freeze the complete public value. */
|
|
134
|
+
export declare function normalizeProgressCapacityDiagnostic(value: unknown): ProgressCapacityDiagnostic;
|
|
135
|
+
/** Unit/bound defaults are host policy, never text supplied by a model. */
|
|
136
|
+
export declare function progressCapacityDiagnostic(input: ProgressCapacityInput): ProgressCapacityDiagnostic;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Closed facts about a rejected model response, never execution or approval evidence. */
|
|
2
|
+
export type ProgressCompletionDiagnostic = Readonly<{
|
|
3
|
+
readonly reportedProgress: number;
|
|
4
|
+
readonly requirementCount: number;
|
|
5
|
+
readonly supportedCount: number;
|
|
6
|
+
readonly missingCount: number;
|
|
7
|
+
readonly unknownCount: number;
|
|
8
|
+
}>;
|
|
9
|
+
export declare function normalizeProgressCompletionDiagnostic(value: unknown): ProgressCompletionDiagnostic;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const PROGRESS_INVENTORY_REASONS: readonly ["inventory", "identity", "capability", "prefix", "source-moved", "binary", "file-count", "files", "bytes", "requests", "treeEntries", "frames", "blob-size", "units", "partition", "manifest", "facts"];
|
|
2
|
+
export type ProgressInventoryReason = typeof PROGRESS_INVENTORY_REASONS[number];
|
|
3
|
+
export interface ProgressInventoryDiagnostic {
|
|
4
|
+
readonly profile: 'immutable-tree-v1';
|
|
5
|
+
readonly reason: ProgressInventoryReason;
|
|
6
|
+
readonly observedCount: number;
|
|
7
|
+
readonly supportedLimit: number;
|
|
8
|
+
readonly countKind: 'exact' | 'at-least';
|
|
9
|
+
readonly paths: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function progressInventoryDiagnostic(reason: ProgressInventoryReason, observedCount: number, supportedLimit: number, paths: readonly string[], countKind?: 'exact' | 'at-least'): ProgressInventoryDiagnostic;
|
|
12
|
+
export declare function isProgressInventoryDiagnostic(value: object): boolean;
|
|
13
|
+
export declare function progressInventoryPresentation(facts: ProgressInventoryDiagnostic): Readonly<Record<string, string | number>>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ProgressResponseContractFailure, type ProgressResponseDiagnosticFacts } from './progress_response_diagnostic';
|
|
2
|
+
export type ProgressPartitionLengthDiagnostic = Readonly<{
|
|
3
|
+
readonly partitionId: string;
|
|
4
|
+
readonly filePath: string;
|
|
5
|
+
readonly unitId: string;
|
|
6
|
+
readonly field: string;
|
|
7
|
+
readonly maximum: number;
|
|
8
|
+
readonly observed: number;
|
|
9
|
+
}>;
|
|
10
|
+
export type ProgressPartitionLengthContext = ProgressPartitionLengthDiagnostic & Readonly<{
|
|
11
|
+
readonly outputLocale: string;
|
|
12
|
+
}>;
|
|
13
|
+
/** Completed output supplied these bounded scalars; application must still bind the identity. */
|
|
14
|
+
export declare class ProgressPartitionLengthFailure extends ProgressResponseContractFailure {
|
|
15
|
+
readonly details: ProgressPartitionLengthContext;
|
|
16
|
+
constructor(facts: ProgressResponseDiagnosticFacts, details: ProgressPartitionLengthContext);
|
|
17
|
+
}
|
|
18
|
+
/** Closed operator facts; string counts are code points, never raw prose or body bytes. */
|
|
19
|
+
export declare function isProgressPartitionLengthDiagnostic(value: unknown): value is ProgressPartitionLengthDiagnostic;
|
|
20
|
+
export declare function progressPartitionLengthPresentation(facts: ProgressPartitionLengthDiagnostic): Readonly<Record<string, string | number>>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export declare const PROGRESS_RESPONSE_PHASES: readonly ["scope", "partition", "assessment"];
|
|
2
|
+
export type ProgressResponsePhase = typeof PROGRESS_RESPONSE_PHASES[number];
|
|
3
|
+
export declare const PROGRESS_RESPONSE_REASONS: Readonly<{
|
|
4
|
+
scope: readonly ["json-invalid", "schema-type", "schema-enum", "schema-string-short", "schema-string-long", "schema-number-finite", "schema-number-min", "schema-number-max", "schema-array-short", "schema-array-long", "schema-required", "schema-additional", "response-not-object", "output-locale-missing", "output-locale-invalid", "output-locale-mismatch", "response-shape-invalid", "scope-incomplete", "scope-entry-invalid", "scope-source-id-invalid", "scope-source-id-duplicate", "scope-classification-invalid", "scope-clause-limit", "scope-no-requirements", "scope-budget"];
|
|
5
|
+
partition: readonly ["json-invalid", "schema-type", "schema-enum", "schema-string-short", "schema-string-long", "schema-number-finite", "schema-number-min", "schema-number-max", "schema-array-short", "schema-array-long", "schema-required", "schema-additional", "response-not-object", "output-locale-missing", "output-locale-invalid", "output-locale-mismatch", "response-shape-invalid", "partition-shape-invalid", "partition-id-invalid", "partition-files-incomplete", "partition-file-invalid", "partition-unit-invalid", "partition-facts-invalid"];
|
|
6
|
+
assessment: readonly ["json-invalid", "schema-type", "schema-enum", "schema-string-short", "schema-string-long", "schema-number-finite", "schema-number-min", "schema-number-max", "schema-array-short", "schema-array-long", "schema-required", "schema-additional", "response-not-object", "output-locale-missing", "output-locale-invalid", "output-locale-mismatch", "response-shape-invalid", "requirements-incomplete", "progress-invalid", "requirement-shape-invalid", "requirement-id-invalid", "requirement-id-duplicate", "scope-uncertain", "requirement-status-invalid", "requirement-evidence-invalid", "requirement-summary-invalid", "requirement-remaining-invalid", "requirement-evidence-mismatch", "progress-completion-mismatch", "assessment-text-limit"];
|
|
7
|
+
}>;
|
|
8
|
+
export type ProgressResponseReason = typeof PROGRESS_RESPONSE_REASONS[ProgressResponsePhase][number];
|
|
9
|
+
export type ProgressResponseDiagnosticFacts = Readonly<{
|
|
10
|
+
phase: ProgressResponsePhase;
|
|
11
|
+
reason: ProgressResponseReason;
|
|
12
|
+
field: string;
|
|
13
|
+
requirementId: string;
|
|
14
|
+
sourceLineId: string;
|
|
15
|
+
}>;
|
|
16
|
+
export declare const isProgressRequirementId: (value: unknown) => value is string;
|
|
17
|
+
export declare const isProgressSourceLineId: (value: unknown) => value is string;
|
|
18
|
+
export declare function isProgressResponseField(phase: ProgressResponsePhase, value: unknown): value is string;
|
|
19
|
+
/** Unknown model keys and oversized locations never become operator field names. */
|
|
20
|
+
export declare function safeProgressResponseField(phase: ProgressResponsePhase, value: unknown): string;
|
|
21
|
+
export declare function isProgressResponseDiagnosticFacts(value: unknown): value is ProgressResponseDiagnosticFacts;
|
|
22
|
+
/** Carries bounded completed-output facts, never a raw output or exception cause. */
|
|
23
|
+
export declare class ProgressResponseContractFailure extends Error {
|
|
24
|
+
readonly facts: ProgressResponseDiagnosticFacts;
|
|
25
|
+
constructor(facts: ProgressResponseDiagnosticFacts);
|
|
26
|
+
}
|
|
27
|
+
/** Exact counts after complete host-validated source classification; never raw model prose. */
|
|
28
|
+
export type ProgressScopeCapacityFacts = Readonly<{
|
|
29
|
+
clauseKind: 'required-or-uncertain' | 'excluded';
|
|
30
|
+
observed: number;
|
|
31
|
+
limit: 32;
|
|
32
|
+
sourceLineId: string;
|
|
33
|
+
}>;
|
|
34
|
+
export declare function isProgressScopeCapacityFacts(value: unknown): value is ProgressScopeCapacityFacts;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/** Public diagnostics contain only closed checks and bounded ordinal/count facts. */
|
|
2
|
+
export declare const SDD_DRAFT_FORMAT_REASONS: readonly ["required-heading", "test-budget", "case-identity", "case-budget", "requirement-mapping", "repository-path"];
|
|
3
|
+
export type SddDraftFormatReason = typeof SDD_DRAFT_FORMAT_REASONS[number];
|
|
4
|
+
export declare const SDD_VALIDATION_DETAILS: readonly ["validation-contract", "size-limit", "response-shape", "minimum-length", "required-heading", "numeric-budget", "section-count", "table-count", "table-separator", "table-columns", "table-empty-cell", "table-empty", "derived-slot-count", "derived-slot-placement", "identifier-list", "requirement-identity", "requirement-reserved", "case-identity", "case-reserved", "case-reference", "case-shorthand", "budget-area", "budget-integer", "budget-order", "budget-total", "budget-distribution", "requirement-reference", "requirement-coverage", "traceability-links", "traceability-membership", "traceability-requirement", "owner-path", "path-identity", "create-existing-path", "create-path-overlap", "create-path-parent", "path-operation", "path-reference", "path-link", "path-inline-reference", "path-prose-reference", "path-link-reference", "path-reference-unsafe", "path-reference-blocked", "path-reference-missing", "path-reference-directory"];
|
|
5
|
+
export type SddValidationDetail = typeof SDD_VALIDATION_DETAILS[number];
|
|
6
|
+
export interface SddValidationFact {
|
|
7
|
+
readonly detail: SddValidationDetail;
|
|
8
|
+
readonly section: 0 | 4 | 14 | 15 | 17;
|
|
9
|
+
readonly row?: number;
|
|
10
|
+
readonly expected?: number;
|
|
11
|
+
readonly observed?: number;
|
|
12
|
+
}
|
|
13
|
+
export interface SddValidationDiagnostic {
|
|
14
|
+
readonly reason: SddDraftFormatReason | 'size' | 'response-shape' | 'response-minimum';
|
|
15
|
+
readonly phase: 'response' | 'assembly' | 'validation';
|
|
16
|
+
readonly facts: readonly SddValidationFact[];
|
|
17
|
+
}
|
|
18
|
+
export interface SddDraftMinimumDiagnostic {
|
|
19
|
+
readonly minimum: number;
|
|
20
|
+
readonly observed: number | 'unavailable';
|
|
21
|
+
readonly attempts: 1 | 2;
|
|
22
|
+
}
|
|
23
|
+
/** Counts authorize no publication and never carry the rejected response. */
|
|
24
|
+
export declare function isSddDraftMinimumDiagnostic(input: unknown): input is SddDraftMinimumDiagnostic;
|
|
25
|
+
/** Fail closed on extra fields, arbitrary text, unbounded facts or invalid coordinates. */
|
|
26
|
+
export declare function normalizeSddValidationDiagnostic(input: SddValidationDiagnostic): SddValidationDiagnostic;
|