Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
232 changes: 208 additions & 24 deletions build/api/index.js

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion build/api/src/data/model/application_error.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { type BugbotReviewBlockFacts } from '../../domain/bugbot/framed_review';
import { type ProgressScopeCapacityFacts } from '../../domain/progress_response_diagnostic';
import { type ProgressCompletionDiagnostic } from '../../domain/progress_completion_diagnostic';
import { type ProgressInventoryDiagnostic } from '../../domain/progress_inventory_diagnostic';
import { type ProgressCapacityDiagnostic } from '../../domain/progress_capacity_diagnostic';
import { type ProgressResponseDiagnosticFacts } from '../../domain/progress_response_diagnostic';
import { type ProgressPartitionLengthDiagnostic } from '../../domain/progress_partition_length_failure';
import { type ProgressBinaryEvidenceFacts } from '../../domain/progress_binary_evidence_diagnostic';
Expand All @@ -20,7 +21,7 @@ import { type SddSourceContextDiagnostic } from '../../domain/agent_source_snaps
import { type SddDraftMinimumDiagnostic } from '../../domain/sdd_validation_diagnostic';
export type ApplicationErrorKind = 'configuration' | 'authorization' | 'provider' | 'agent' | 'validation' | 'workflow' | 'unknown';
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';
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", "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"];
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"];
export type ApplicationErrorRecoveryId = typeof APPLICATION_ERROR_RECOVERY_IDS[number];
interface ApplicationErrorRecoveryVariables extends Readonly<Record<CopilotCommandValidationReason, Readonly<{
command: CopilotCommandName;
Expand All @@ -46,6 +47,7 @@ interface ApplicationErrorRecoveryVariables extends Readonly<Record<CopilotComma
readonly 'issue-workflow-admission-blocked': IssueWorkflowDiagnosticFacts;
readonly 'progress-binary-evidence-unavailable': ProgressBinaryEvidenceFacts;
readonly 'progress-inventory-incomplete': ProgressInventoryDiagnostic;
readonly 'progress-evidence-capacity-exceeded': ProgressCapacityDiagnostic;
readonly 'bugbot-review-incomplete': BugbotReviewBlockFacts;
readonly 'progress-result-contract-invalid': ProgressResponseDiagnosticFacts;
readonly 'progress-partition-length-invalid': ProgressPartitionLengthDiagnostic;
Expand Down
136 changes: 136 additions & 0 deletions build/api/src/domain/progress_capacity_diagnostic.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
export type ProgressCapacityPhase = 'input' | 'source' | 'scope' | 'partition' | 'aggregate' | 'assessment';
export type ProgressCapacityUnit = 'bytes' | 'parts' | 'lines' | 'code-points' | 'units';
export type ProgressCapacityBound = 'minimum' | 'maximum' | 'unavailable';
export type ProgressCapacityCount = number | 'unavailable';
export declare const PROGRESS_CAPACITY_DIMENSIONS: Readonly<{
'source-unit-bytes': Readonly<{
phases: readonly ProgressCapacityPhase[];
unit: ProgressCapacityUnit;
bounds: readonly ProgressCapacityBound[];
}>;
'source-part-bytes': Readonly<{
phases: readonly ProgressCapacityPhase[];
unit: ProgressCapacityUnit;
bounds: readonly ProgressCapacityBound[];
}>;
'source-part-count': Readonly<{
phases: readonly ProgressCapacityPhase[];
unit: ProgressCapacityUnit;
bounds: readonly ProgressCapacityBound[];
}>;
'source-unit-count': Readonly<{
phases: readonly ProgressCapacityPhase[];
unit: ProgressCapacityUnit;
bounds: readonly ProgressCapacityBound[];
}>;
'source-manifest-bytes': Readonly<{
phases: readonly ProgressCapacityPhase[];
unit: ProgressCapacityUnit;
bounds: readonly ProgressCapacityBound[];
}>;
'source-line-count': Readonly<{
phases: readonly ProgressCapacityPhase[];
unit: ProgressCapacityUnit;
bounds: readonly ProgressCapacityBound[];
}>;
'source-line-points': Readonly<{
phases: readonly ProgressCapacityPhase[];
unit: ProgressCapacityUnit;
bounds: readonly ProgressCapacityBound[];
}>;
'input-text-bytes': Readonly<{
phases: readonly ProgressCapacityPhase[];
unit: ProgressCapacityUnit;
bounds: readonly ProgressCapacityBound[];
}>;
'native-prompt-bytes': Readonly<{
phases: readonly ProgressCapacityPhase[];
unit: ProgressCapacityUnit;
bounds: readonly ProgressCapacityBound[];
}>;
'native-prompt-reserve-bytes': Readonly<{
phases: readonly ProgressCapacityPhase[];
unit: ProgressCapacityUnit;
bounds: readonly ProgressCapacityBound[];
}>;
'aggregate-reserve-bytes': Readonly<{
phases: readonly ProgressCapacityPhase[];
unit: ProgressCapacityUnit;
bounds: readonly ProgressCapacityBound[];
}>;
'aggregate-allocation-bytes': Readonly<{
phases: readonly ProgressCapacityPhase[];
unit: ProgressCapacityUnit;
bounds: readonly ProgressCapacityBound[];
}>;
'aggregate-envelope-bytes': Readonly<{
phases: readonly ProgressCapacityPhase[];
unit: ProgressCapacityUnit;
bounds: readonly ProgressCapacityBound[];
}>;
'minimum-fact-bytes': Readonly<{
phases: readonly ProgressCapacityPhase[];
unit: ProgressCapacityUnit;
bounds: readonly ProgressCapacityBound[];
}>;
'evidence-unit-count': Readonly<{
phases: readonly ProgressCapacityPhase[];
unit: ProgressCapacityUnit;
bounds: readonly ProgressCapacityBound[];
}>;
'aggregate-fact-bytes': Readonly<{
phases: readonly ProgressCapacityPhase[];
unit: ProgressCapacityUnit;
bounds: readonly ProgressCapacityBound[];
}>;
'invalid-allocation': Readonly<{
phases: readonly ProgressCapacityPhase[];
unit: ProgressCapacityUnit;
bounds: readonly ProgressCapacityBound[];
}>;
}>;
export type ProgressCapacityDimension = keyof typeof PROGRESS_CAPACITY_DIMENSIONS;
export type ProgressCapacityContext = Readonly<{
kind: 'unavailable';
}> | Readonly<{
kind: 'source-line';
sourceLineId: string;
}> | Readonly<{
kind: 'comparison';
baseSha: string;
headSha: string;
manifestDigest: string;
sourceLineId: string;
requiredPathsDigest: string;
reviewedPathsDigest: string;
uncoveredPathsDigest: string;
requiredPathCount: number;
reviewedPathCount: number;
uncoveredPathCount: number;
paths: readonly string[];
}>;
export interface ProgressCapacityDiagnostic {
readonly phase: ProgressCapacityPhase;
readonly dimension: ProgressCapacityDimension;
readonly unit: ProgressCapacityUnit;
readonly bound: ProgressCapacityBound;
readonly observedCount: ProgressCapacityCount;
readonly supportedLimit: ProgressCapacityCount;
readonly countKind: 'exact' | 'at-least' | 'unavailable';
readonly context: ProgressCapacityContext;
}
export interface ProgressCapacityInput {
readonly phase: ProgressCapacityPhase;
readonly dimension: ProgressCapacityDimension;
readonly observedCount: ProgressCapacityCount;
readonly supportedLimit: ProgressCapacityCount;
readonly bound?: ProgressCapacityBound;
readonly countKind?: ProgressCapacityDiagnostic['countKind'];
readonly context?: ProgressCapacityContext;
}
/** Shape validation does not certify a source; host call sites own attribution. */
export declare function normalizeProgressCapacityContext(value: unknown): ProgressCapacityContext;
/** Reject incoherent or arbitrary metadata and copy/freeze the complete public value. */
export declare function normalizeProgressCapacityDiagnostic(value: unknown): ProgressCapacityDiagnostic;
/** Unit/bound defaults are host policy, never text supplied by a model. */
export declare function progressCapacityDiagnostic(input: ProgressCapacityInput): ProgressCapacityDiagnostic;
Loading
Loading