@neat.is/types 0.10.5 → 0.10.6-dev.20261007
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/dist/index.cjs +32 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +44 -1
- package/dist/index.d.ts +44 -1
- package/dist/index.js +31 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -18854,4 +18854,47 @@ declare const DEFAULT_EXTRACTED_PRECISION_FLOOR = 0.7;
|
|
|
18854
18854
|
declare function extractedPrecisionFloor(): number;
|
|
18855
18855
|
declare function passesExtractedFloor(confidence: number): boolean;
|
|
18856
18856
|
|
|
18857
|
-
|
|
18857
|
+
declare const PrVerdictBodySchema: z.ZodEffects<z.ZodObject<{
|
|
18858
|
+
owner: z.ZodString;
|
|
18859
|
+
name: z.ZodString;
|
|
18860
|
+
baseSha: z.ZodString;
|
|
18861
|
+
headSha: z.ZodString;
|
|
18862
|
+
cloneUrl: z.ZodString;
|
|
18863
|
+
changedFiles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
18864
|
+
tone: z.ZodOptional<z.ZodEnum<["loud", "professional"]>>;
|
|
18865
|
+
}, "strip", z.ZodTypeAny, {
|
|
18866
|
+
name: string;
|
|
18867
|
+
owner: string;
|
|
18868
|
+
baseSha: string;
|
|
18869
|
+
headSha: string;
|
|
18870
|
+
cloneUrl: string;
|
|
18871
|
+
changedFiles?: string[] | undefined;
|
|
18872
|
+
tone?: "loud" | "professional" | undefined;
|
|
18873
|
+
}, {
|
|
18874
|
+
name: string;
|
|
18875
|
+
owner: string;
|
|
18876
|
+
baseSha: string;
|
|
18877
|
+
headSha: string;
|
|
18878
|
+
cloneUrl: string;
|
|
18879
|
+
changedFiles?: string[] | undefined;
|
|
18880
|
+
tone?: "loud" | "professional" | undefined;
|
|
18881
|
+
}>, {
|
|
18882
|
+
name: string;
|
|
18883
|
+
owner: string;
|
|
18884
|
+
baseSha: string;
|
|
18885
|
+
headSha: string;
|
|
18886
|
+
cloneUrl: string;
|
|
18887
|
+
changedFiles?: string[] | undefined;
|
|
18888
|
+
tone?: "loud" | "professional" | undefined;
|
|
18889
|
+
}, {
|
|
18890
|
+
name: string;
|
|
18891
|
+
owner: string;
|
|
18892
|
+
baseSha: string;
|
|
18893
|
+
headSha: string;
|
|
18894
|
+
cloneUrl: string;
|
|
18895
|
+
changedFiles?: string[] | undefined;
|
|
18896
|
+
tone?: "loud" | "professional" | undefined;
|
|
18897
|
+
}>;
|
|
18898
|
+
type PrVerdictBody = z.infer<typeof PrVerdictBodySchema>;
|
|
18899
|
+
|
|
18900
|
+
export { type ApplicablePoliciesResponse, ApplicablePoliciesResponseSchema, type ApplicablePolicy, ApplicablePolicySchema, type AskFact, AskFactSchema, type AskIntent, AskIntentSchema, type AskMatch, AskMatchSchema, type AskResult, AskResultSchema, type AskSection, AskSectionSchema, type BlastRadiusAffectedNode, BlastRadiusAffectedNodeSchema, type BlastRadiusResult, BlastRadiusResultSchema, type BlastRadiusRule, BlastRadiusRuleSchema, type CheckPoliciesScope, CheckPoliciesScopeSchema, type ColumnAttr, ColumnAttrSchema, type CompatRuleRef, CompatRuleRefSchema, type CompatViolationDivergence, CompatViolationDivergenceSchema, type CompatibilityRule, CompatibilityRuleSchema, type CompatibilityVerdict, CompatibilityVerdictSchema, type CompatibleDriver, CompatibleDriverSchema, type ConfigNode, ConfigNodeSchema, type ConnectorPollState, ConnectorPollStateSchema, type ConnectorPollState as ConnectorState, ConnectorPollStateSchema as ConnectorStateSchema, type ConnectorStatus, type ConnectorStatusEntry, ConnectorStatusEntrySchema, ConnectorStatusSchema, type ConnectorStatusEntry as ConnectorSummary, ConnectorStatusEntrySchema as ConnectorSummarySchema, type ConnectorsStatusResponse as ConnectorsResponse, ConnectorsStatusResponseSchema as ConnectorsResponseSchema, type ConnectorsStatusResponse, ConnectorsStatusResponseSchema, DEFAULT_EXTRACTED_PRECISION_FLOOR, type DaemonHealthResponse, DaemonHealthResponseSchema, type DatabaseNode, DatabaseNodeSchema, type DeployMismatchDivergence, DeployMismatchDivergenceSchema, type DeployMismatchKind, DeployMismatchKindSchema, type DiscoveredVia, DiscoveredViaSchema, type Divergence, type DivergenceResult, DivergenceResultSchema, DivergenceSchema, type DivergenceType, DivergenceTypeSchema, EMPTY_REGISTRY, EXTRACTED_CONFIDENCE, type EdgeAnomaly, EdgeAnomalySchema, type EdgeEvidence, EdgeEvidenceSchema, type EdgeSignal, EdgeSignalSchema, EdgeType, EdgeTypeSchema, type EdgeTypeValue, type ErrorEvent, ErrorEventSchema, type ExpandNeighbour, ExpandNeighbourSchema, type ExpandResult, ExpandResultSchema, type ExtractedConfidenceKind, type ExtractionCoverage, ExtractionCoverageSchema, type FieldGuardRule, FieldGuardRuleSchema, type FileNode, FileNodeSchema, type FrontierNode, FrontierNodeSchema, type GraphDiffResult, GraphDiffResultSchema, type GraphEdge, GraphEdgeSchema, type GraphEdgesResponse, GraphEdgesResponseSchema, type GraphNode, type GraphNodeResponse, GraphNodeResponseSchema, GraphNodeSchema, type GraphQLOperationNode, GraphQLOperationNodeSchema, type GrpcMethodNode, GrpcMethodNodeSchema, type HealthResponse, HealthResponseSchema, type HostMismatchDivergence, HostMismatchDivergenceSchema, type HypotheticalAction, HypotheticalActionSchema, type IncidentBlastRadius, IncidentBlastRadiusSchema, type IncidentCard, IncidentCardSchema, type IncidentChainHop, IncidentChainHopSchema, type IncidentDivergence, IncidentDivergenceSchema, type IncidentEventPayload, IncidentEventPayloadSchema, type IncidentKind, IncidentKindSchema, type IncidentLocus, IncidentLocusSchema, type IncidentPolicy, IncidentPolicySchema, type IncidentRootCause, IncidentRootCauseSchema, type IncidentsResponse, IncidentsResponseSchema, type InfraNode, InfraNodeSchema, type LatencyMs, LatencyMsSchema, type LogEntry, LogEntrySchema, type LogSource, LogSourceSchema, type LogsResponse, LogsResponseSchema, type MCPToolName, MCP_TOOL_NAMES, type MissingExtractedDivergence, MissingExtractedDivergenceSchema, type MissingObservedDivergence, MissingObservedDivergenceSchema, type NodeClassification, NodeClassificationSchema, type NodeContext, NodeContextSchema, NodeType, NodeTypeSchema, type NodeTypeValue, type ObservedDependenciesResult, ObservedDependenciesResultSchema, type ObservedFailingDivergence, ObservedFailingDivergenceSchema, type ObservedFailureKind, ObservedFailureKindSchema, type ObservedSymbolMismatchDivergence, ObservedSymbolMismatchDivergenceSchema, type OwnershipRule, OwnershipRuleSchema, PROV_RANK, type PoliciesCheckBody, PoliciesCheckBodySchema, type PoliciesViolationsResponse, PoliciesViolationsResponseSchema, type Policy, type PolicyAction, PolicyActionSchema, type PolicyFile, PolicyFileSchema, type PolicyRule, PolicyRuleSchema, PolicySchema, type PolicySeverity, PolicySeveritySchema, type PolicyViolation, PolicyViolationSchema, type PrVerdictBody, PrVerdictBodySchema, type ProjectListEntry, ProjectListEntrySchema, type ProjectServedBy, ProjectServedBySchema, Provenance, type ProvenanceRule, ProvenanceRuleSchema, ProvenanceSchema, type ProvenanceValue, type RegistryEntry, RegistryEntrySchema, type RegistryFile, RegistryFileSchema, type RegistryStatus, RegistryStatusSchema, type RelatePath, RelatePathSchema, type RelateResult, RelateResultSchema, type RootCauseCandidate, RootCauseCandidateSchema, type RootCauseResult, RootCauseResultSchema, type RouteNode, RouteNodeSchema, type SearchMatch, SearchMatchSchema, type SearchResponse, SearchResponseSchema, type SerializedGraph, SerializedGraphSchema, type ServerActionNode, ServerActionNodeSchema, type ServiceNode, ServiceNodeSchema, type SingleProjectResponse, SingleProjectResponseSchema, type SpanAttributes, SpanAttributesSchema, type StaleEvent, StaleEventSchema, type StaleEventsResponse, StaleEventsResponseSchema, type StructuralRule, StructuralRuleSchema, type SymbolKind, SymbolKindSchema, type SymbolMismatchKind, SymbolMismatchKindSchema, type SymbolNode, SymbolNodeSchema, type SymbolSpan, SymbolSpanSchema, type TransitiveDependenciesResult, TransitiveDependenciesResultSchema, type TransitiveDependency, TransitiveDependencySchema, type VersionMismatchDivergence, VersionMismatchDivergenceSchema, type WebSocketChannelNode, WebSocketChannelNodeSchema, confidenceForExtracted, confidenceForObservedSignal, configId, databaseId, extractedEdgeId, extractedPrecisionFloor, fileId, frontierEdgeId, frontierId, graphqlOperationId, grpcMethodId, incidentKindOf, inferredEdgeId, infraId, localDatabaseId, observedEdgeId, parseConfigId, parseDatabaseId, parseEdgeId, parseFileId, parseFrontierId, parseGraphqlOperationId, parseGrpcMethodId, parseInfraId, parseRouteId, parseServerActionId, parseServiceId, parseSymbolId, parseWebsocketChannelId, passesExtractedFloor, routeId, serverActionId, serviceId, symbolId, websocketChannelId };
|
package/dist/index.d.ts
CHANGED
|
@@ -18854,4 +18854,47 @@ declare const DEFAULT_EXTRACTED_PRECISION_FLOOR = 0.7;
|
|
|
18854
18854
|
declare function extractedPrecisionFloor(): number;
|
|
18855
18855
|
declare function passesExtractedFloor(confidence: number): boolean;
|
|
18856
18856
|
|
|
18857
|
-
|
|
18857
|
+
declare const PrVerdictBodySchema: z.ZodEffects<z.ZodObject<{
|
|
18858
|
+
owner: z.ZodString;
|
|
18859
|
+
name: z.ZodString;
|
|
18860
|
+
baseSha: z.ZodString;
|
|
18861
|
+
headSha: z.ZodString;
|
|
18862
|
+
cloneUrl: z.ZodString;
|
|
18863
|
+
changedFiles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
18864
|
+
tone: z.ZodOptional<z.ZodEnum<["loud", "professional"]>>;
|
|
18865
|
+
}, "strip", z.ZodTypeAny, {
|
|
18866
|
+
name: string;
|
|
18867
|
+
owner: string;
|
|
18868
|
+
baseSha: string;
|
|
18869
|
+
headSha: string;
|
|
18870
|
+
cloneUrl: string;
|
|
18871
|
+
changedFiles?: string[] | undefined;
|
|
18872
|
+
tone?: "loud" | "professional" | undefined;
|
|
18873
|
+
}, {
|
|
18874
|
+
name: string;
|
|
18875
|
+
owner: string;
|
|
18876
|
+
baseSha: string;
|
|
18877
|
+
headSha: string;
|
|
18878
|
+
cloneUrl: string;
|
|
18879
|
+
changedFiles?: string[] | undefined;
|
|
18880
|
+
tone?: "loud" | "professional" | undefined;
|
|
18881
|
+
}>, {
|
|
18882
|
+
name: string;
|
|
18883
|
+
owner: string;
|
|
18884
|
+
baseSha: string;
|
|
18885
|
+
headSha: string;
|
|
18886
|
+
cloneUrl: string;
|
|
18887
|
+
changedFiles?: string[] | undefined;
|
|
18888
|
+
tone?: "loud" | "professional" | undefined;
|
|
18889
|
+
}, {
|
|
18890
|
+
name: string;
|
|
18891
|
+
owner: string;
|
|
18892
|
+
baseSha: string;
|
|
18893
|
+
headSha: string;
|
|
18894
|
+
cloneUrl: string;
|
|
18895
|
+
changedFiles?: string[] | undefined;
|
|
18896
|
+
tone?: "loud" | "professional" | undefined;
|
|
18897
|
+
}>;
|
|
18898
|
+
type PrVerdictBody = z.infer<typeof PrVerdictBodySchema>;
|
|
18899
|
+
|
|
18900
|
+
export { type ApplicablePoliciesResponse, ApplicablePoliciesResponseSchema, type ApplicablePolicy, ApplicablePolicySchema, type AskFact, AskFactSchema, type AskIntent, AskIntentSchema, type AskMatch, AskMatchSchema, type AskResult, AskResultSchema, type AskSection, AskSectionSchema, type BlastRadiusAffectedNode, BlastRadiusAffectedNodeSchema, type BlastRadiusResult, BlastRadiusResultSchema, type BlastRadiusRule, BlastRadiusRuleSchema, type CheckPoliciesScope, CheckPoliciesScopeSchema, type ColumnAttr, ColumnAttrSchema, type CompatRuleRef, CompatRuleRefSchema, type CompatViolationDivergence, CompatViolationDivergenceSchema, type CompatibilityRule, CompatibilityRuleSchema, type CompatibilityVerdict, CompatibilityVerdictSchema, type CompatibleDriver, CompatibleDriverSchema, type ConfigNode, ConfigNodeSchema, type ConnectorPollState, ConnectorPollStateSchema, type ConnectorPollState as ConnectorState, ConnectorPollStateSchema as ConnectorStateSchema, type ConnectorStatus, type ConnectorStatusEntry, ConnectorStatusEntrySchema, ConnectorStatusSchema, type ConnectorStatusEntry as ConnectorSummary, ConnectorStatusEntrySchema as ConnectorSummarySchema, type ConnectorsStatusResponse as ConnectorsResponse, ConnectorsStatusResponseSchema as ConnectorsResponseSchema, type ConnectorsStatusResponse, ConnectorsStatusResponseSchema, DEFAULT_EXTRACTED_PRECISION_FLOOR, type DaemonHealthResponse, DaemonHealthResponseSchema, type DatabaseNode, DatabaseNodeSchema, type DeployMismatchDivergence, DeployMismatchDivergenceSchema, type DeployMismatchKind, DeployMismatchKindSchema, type DiscoveredVia, DiscoveredViaSchema, type Divergence, type DivergenceResult, DivergenceResultSchema, DivergenceSchema, type DivergenceType, DivergenceTypeSchema, EMPTY_REGISTRY, EXTRACTED_CONFIDENCE, type EdgeAnomaly, EdgeAnomalySchema, type EdgeEvidence, EdgeEvidenceSchema, type EdgeSignal, EdgeSignalSchema, EdgeType, EdgeTypeSchema, type EdgeTypeValue, type ErrorEvent, ErrorEventSchema, type ExpandNeighbour, ExpandNeighbourSchema, type ExpandResult, ExpandResultSchema, type ExtractedConfidenceKind, type ExtractionCoverage, ExtractionCoverageSchema, type FieldGuardRule, FieldGuardRuleSchema, type FileNode, FileNodeSchema, type FrontierNode, FrontierNodeSchema, type GraphDiffResult, GraphDiffResultSchema, type GraphEdge, GraphEdgeSchema, type GraphEdgesResponse, GraphEdgesResponseSchema, type GraphNode, type GraphNodeResponse, GraphNodeResponseSchema, GraphNodeSchema, type GraphQLOperationNode, GraphQLOperationNodeSchema, type GrpcMethodNode, GrpcMethodNodeSchema, type HealthResponse, HealthResponseSchema, type HostMismatchDivergence, HostMismatchDivergenceSchema, type HypotheticalAction, HypotheticalActionSchema, type IncidentBlastRadius, IncidentBlastRadiusSchema, type IncidentCard, IncidentCardSchema, type IncidentChainHop, IncidentChainHopSchema, type IncidentDivergence, IncidentDivergenceSchema, type IncidentEventPayload, IncidentEventPayloadSchema, type IncidentKind, IncidentKindSchema, type IncidentLocus, IncidentLocusSchema, type IncidentPolicy, IncidentPolicySchema, type IncidentRootCause, IncidentRootCauseSchema, type IncidentsResponse, IncidentsResponseSchema, type InfraNode, InfraNodeSchema, type LatencyMs, LatencyMsSchema, type LogEntry, LogEntrySchema, type LogSource, LogSourceSchema, type LogsResponse, LogsResponseSchema, type MCPToolName, MCP_TOOL_NAMES, type MissingExtractedDivergence, MissingExtractedDivergenceSchema, type MissingObservedDivergence, MissingObservedDivergenceSchema, type NodeClassification, NodeClassificationSchema, type NodeContext, NodeContextSchema, NodeType, NodeTypeSchema, type NodeTypeValue, type ObservedDependenciesResult, ObservedDependenciesResultSchema, type ObservedFailingDivergence, ObservedFailingDivergenceSchema, type ObservedFailureKind, ObservedFailureKindSchema, type ObservedSymbolMismatchDivergence, ObservedSymbolMismatchDivergenceSchema, type OwnershipRule, OwnershipRuleSchema, PROV_RANK, type PoliciesCheckBody, PoliciesCheckBodySchema, type PoliciesViolationsResponse, PoliciesViolationsResponseSchema, type Policy, type PolicyAction, PolicyActionSchema, type PolicyFile, PolicyFileSchema, type PolicyRule, PolicyRuleSchema, PolicySchema, type PolicySeverity, PolicySeveritySchema, type PolicyViolation, PolicyViolationSchema, type PrVerdictBody, PrVerdictBodySchema, type ProjectListEntry, ProjectListEntrySchema, type ProjectServedBy, ProjectServedBySchema, Provenance, type ProvenanceRule, ProvenanceRuleSchema, ProvenanceSchema, type ProvenanceValue, type RegistryEntry, RegistryEntrySchema, type RegistryFile, RegistryFileSchema, type RegistryStatus, RegistryStatusSchema, type RelatePath, RelatePathSchema, type RelateResult, RelateResultSchema, type RootCauseCandidate, RootCauseCandidateSchema, type RootCauseResult, RootCauseResultSchema, type RouteNode, RouteNodeSchema, type SearchMatch, SearchMatchSchema, type SearchResponse, SearchResponseSchema, type SerializedGraph, SerializedGraphSchema, type ServerActionNode, ServerActionNodeSchema, type ServiceNode, ServiceNodeSchema, type SingleProjectResponse, SingleProjectResponseSchema, type SpanAttributes, SpanAttributesSchema, type StaleEvent, StaleEventSchema, type StaleEventsResponse, StaleEventsResponseSchema, type StructuralRule, StructuralRuleSchema, type SymbolKind, SymbolKindSchema, type SymbolMismatchKind, SymbolMismatchKindSchema, type SymbolNode, SymbolNodeSchema, type SymbolSpan, SymbolSpanSchema, type TransitiveDependenciesResult, TransitiveDependenciesResultSchema, type TransitiveDependency, TransitiveDependencySchema, type VersionMismatchDivergence, VersionMismatchDivergenceSchema, type WebSocketChannelNode, WebSocketChannelNodeSchema, confidenceForExtracted, confidenceForObservedSignal, configId, databaseId, extractedEdgeId, extractedPrecisionFloor, fileId, frontierEdgeId, frontierId, graphqlOperationId, grpcMethodId, incidentKindOf, inferredEdgeId, infraId, localDatabaseId, observedEdgeId, parseConfigId, parseDatabaseId, parseEdgeId, parseFileId, parseFrontierId, parseGraphqlOperationId, parseGrpcMethodId, parseInfraId, parseRouteId, parseServerActionId, parseServiceId, parseSymbolId, parseWebsocketChannelId, passesExtractedFloor, routeId, serverActionId, serviceId, symbolId, websocketChannelId };
|
package/dist/index.js
CHANGED
|
@@ -1701,6 +1701,36 @@ function extractedPrecisionFloor() {
|
|
|
1701
1701
|
function passesExtractedFloor(confidence) {
|
|
1702
1702
|
return confidence >= extractedPrecisionFloor();
|
|
1703
1703
|
}
|
|
1704
|
+
|
|
1705
|
+
// src/pr-verdict.ts
|
|
1706
|
+
import { z as z11 } from "zod";
|
|
1707
|
+
var SHA = /^[0-9a-f]{40}$/;
|
|
1708
|
+
var SLUG = /^[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9_])?$/;
|
|
1709
|
+
var PrVerdictBodySchema = z11.object({
|
|
1710
|
+
owner: z11.string().regex(SLUG, "not a GitHub account name"),
|
|
1711
|
+
name: z11.string().regex(SLUG, "not a GitHub repository name"),
|
|
1712
|
+
baseSha: z11.string().regex(SHA, "must be a full 40-character lowercase commit SHA"),
|
|
1713
|
+
headSha: z11.string().regex(SHA, "must be a full 40-character lowercase commit SHA"),
|
|
1714
|
+
cloneUrl: z11.string().url(),
|
|
1715
|
+
// Repo-relative paths the PR changes. Optional; capped by the daemon.
|
|
1716
|
+
changedFiles: z11.array(z11.string()).optional(),
|
|
1717
|
+
tone: z11.enum(["loud", "professional"]).optional()
|
|
1718
|
+
}).superRefine((body, ctx) => {
|
|
1719
|
+
let url;
|
|
1720
|
+
try {
|
|
1721
|
+
url = new URL(body.cloneUrl);
|
|
1722
|
+
} catch {
|
|
1723
|
+
return;
|
|
1724
|
+
}
|
|
1725
|
+
if (url.protocol !== "https:" || url.hostname !== "github.com" || url.port !== "") {
|
|
1726
|
+
ctx.addIssue({ code: z11.ZodIssueCode.custom, path: ["cloneUrl"], message: "must be an https://github.com URL" });
|
|
1727
|
+
return;
|
|
1728
|
+
}
|
|
1729
|
+
const repoPath = url.pathname.replace(/\.git$/, "").replace(/\/+$/, "");
|
|
1730
|
+
if (repoPath.toLowerCase() !== `/${body.owner}/${body.name}`.toLowerCase()) {
|
|
1731
|
+
ctx.addIssue({ code: z11.ZodIssueCode.custom, path: ["cloneUrl"], message: "does not point at owner/name" });
|
|
1732
|
+
}
|
|
1733
|
+
});
|
|
1704
1734
|
export {
|
|
1705
1735
|
ApplicablePoliciesResponseSchema,
|
|
1706
1736
|
ApplicablePolicySchema,
|
|
@@ -1796,6 +1826,7 @@ export {
|
|
|
1796
1826
|
PolicySchema,
|
|
1797
1827
|
PolicySeveritySchema,
|
|
1798
1828
|
PolicyViolationSchema,
|
|
1829
|
+
PrVerdictBodySchema,
|
|
1799
1830
|
ProjectListEntrySchema,
|
|
1800
1831
|
ProjectServedBySchema,
|
|
1801
1832
|
Provenance,
|