@openai/codex-security 0.8.1 → 0.8.2
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/README.md +8 -2
- package/_bundled_plugin/mcp/native/THIRD_PARTY_NOTICES.txt +4 -4
- package/_bundled_plugin/mcp/native/darwin-arm64/unix.node +0 -0
- package/_bundled_plugin/mcp/native/darwin-x64/unix.node +0 -0
- package/_bundled_plugin/mcp/native/linux-arm64-gnu/unix.node +0 -0
- package/_bundled_plugin/mcp/native/linux-arm64-musl/unix.node +0 -0
- package/_bundled_plugin/mcp/native/linux-x64-gnu/unix.node +0 -0
- package/_bundled_plugin/mcp/native/linux-x64-musl/unix.node +0 -0
- package/_bundled_plugin/mcp/native/win32-arm64/windows.node +0 -0
- package/_bundled_plugin/mcp/native/win32-x64/windows.node +0 -0
- package/_bundled_plugin/mcp/server.mjs.br.part-000 +0 -0
- package/_bundled_plugin/mcp/server.mjs.br.part-001 +0 -0
- package/_bundled_plugin/mcp/server.mjs.br.part-002 +0 -0
- package/_bundled_plugin/scripts/workbench_coverage_receipts.py +0 -17
- package/_bundled_plugin/scripts/workbench_db.py +1 -3
- package/_bundled_plugin/scripts/workbench_saved_results.py +0 -66
- package/_bundled_plugin/scripts/workbench_target.py +0 -108
- package/_bundled_plugin/skills/publish-findings/SKILL.md +4 -0
- package/_bundled_plugin/skills/resolve-dependency-alert/SKILL.md +18 -0
- package/_bundled_plugin/skills/resolve-dependency-alert/agents/openai.yaml +4 -0
- package/_bundled_plugin/skills/threat-model-visualize/SKILL.md +83 -0
- package/_bundled_plugin/skills/threat-model-visualize/agents/openai.yaml +4 -0
- package/_bundled_plugin/skills/threat-model-visualize/assets/context-reference-overview.svg +366 -0
- package/_bundled_plugin/skills/threat-model-visualize/assets/context-reference-path.svg +558 -0
- package/_bundled_plugin/skills/threat-model-visualize/assets/control-effects.js +85 -0
- package/_bundled_plugin/skills/threat-model-visualize/assets/explorer.css +17 -0
- package/_bundled_plugin/skills/threat-model-visualize/assets/explorer.html +38 -0
- package/_bundled_plugin/skills/threat-model-visualize/assets/explorer.js +372 -0
- package/_bundled_plugin/skills/threat-model-visualize/assets/route-paths.js +71 -0
- package/_bundled_plugin/skills/threat-model-visualize/assets/source-roles.js +47 -0
- package/_bundled_plugin/skills/threat-model-visualize/assets/svg-layout.js +149 -0
- package/_bundled_plugin/skills/threat-model-visualize/references/context-explorer.md +21 -0
- package/_bundled_plugin/skills/threat-model-visualize/references/view-model.md +49 -0
- package/_bundled_plugin/skills/threat-model-visualize/scripts/build_explorer.py +563 -0
- package/dist/api.js +3 -3
- package/dist/api.js.map +1 -1
- package/dist/auth.js +1 -1
- package/dist/auth.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +27 -8
- package/dist/cli.js.map +1 -1
- package/dist/contract.d.ts.map +1 -1
- package/dist/contract.js +4 -4
- package/dist/contract.js.map +1 -1
- package/dist/custom-validation.js +2 -2
- package/dist/custom-validation.js.map +1 -1
- package/dist/deduplication/deduplication-reviewer.d.ts.map +1 -1
- package/dist/deduplication/deduplication-reviewer.js +1 -1
- package/dist/deduplication/deduplication-reviewer.js.map +1 -1
- package/dist/deduplication/records-protocol.d.ts.map +1 -1
- package/dist/deduplication/records-protocol.js +36 -22
- package/dist/deduplication/records-protocol.js.map +1 -1
- package/dist/deduplication/records.d.ts +3 -1
- package/dist/deduplication/records.d.ts.map +1 -1
- package/dist/deduplication/records.js +12 -8
- package/dist/deduplication/records.js.map +1 -1
- package/dist/endor-findings.d.ts.map +1 -1
- package/dist/endor-findings.js +46 -61
- package/dist/endor-findings.js.map +1 -1
- package/dist/external-findings-import.d.ts.map +1 -1
- package/dist/external-findings-import.js +8 -6
- package/dist/external-findings-import.js.map +1 -1
- package/dist/external-findings-local.d.ts +3 -1
- package/dist/external-findings-local.d.ts.map +1 -1
- package/dist/external-findings-local.js +117 -36
- package/dist/external-findings-local.js.map +1 -1
- package/dist/external-findings-publish.d.ts +3 -1
- package/dist/external-findings-publish.d.ts.map +1 -1
- package/dist/external-findings-publish.js +51 -27
- package/dist/external-findings-publish.js.map +1 -1
- package/dist/external-findings-read.d.ts +2 -0
- package/dist/external-findings-read.d.ts.map +1 -1
- package/dist/external-findings-read.js +9 -0
- package/dist/external-findings-read.js.map +1 -1
- package/dist/external-findings.d.ts +11 -0
- package/dist/external-findings.d.ts.map +1 -1
- package/dist/external-findings.js +13 -1
- package/dist/external-findings.js.map +1 -1
- package/dist/external-import-models.d.ts +1 -1
- package/dist/external-import-models.d.ts.map +1 -1
- package/dist/external-import-models.js.map +1 -1
- package/dist/host-protocol.d.ts +5 -0
- package/dist/host-protocol.d.ts.map +1 -1
- package/dist/host-protocol.js +27 -3
- package/dist/host-protocol.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/inspector-findings.d.ts +9 -0
- package/dist/inspector-findings.d.ts.map +1 -0
- package/dist/inspector-findings.js +517 -0
- package/dist/inspector-findings.js.map +1 -0
- package/dist/patch-tui.d.ts +1 -1
- package/dist/patch-tui.d.ts.map +1 -1
- package/dist/patch-tui.js +4 -1
- package/dist/patch-tui.js.map +1 -1
- package/dist/runtime.d.ts +3 -2
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +15 -5
- package/dist/runtime.js.map +1 -1
- package/dist/scan-dashboard.d.ts.map +1 -1
- package/dist/scan-dashboard.js +25 -15
- package/dist/scan-dashboard.js.map +1 -1
- package/dist/scanner-import.d.ts +6 -1
- package/dist/scanner-import.d.ts.map +1 -1
- package/dist/scanner-import.js +14 -5
- package/dist/scanner-import.js.map +1 -1
- package/dist/semgrep-findings.d.ts.map +1 -1
- package/dist/semgrep-findings.js +39 -49
- package/dist/semgrep-findings.js.map +1 -1
- package/dist/snyk-findings.d.ts.map +1 -1
- package/dist/snyk-findings.js +78 -88
- package/dist/snyk-findings.js.map +1 -1
- package/docs/cli.md +14 -8
- package/docs/dedupe-records.md +17 -4
- package/package.json +3 -3
- package/schemas/external-findings.schema.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ExternalPublicationOptions } from "./external-findings-publish.js";
|
|
1
2
|
import type { ExternalFindingEvidence } from "./external-import-models.js";
|
|
2
3
|
/** A provider occurrence and its evidence, independent of a Codex assessment. */
|
|
3
4
|
export interface ExternalFinding {
|
|
@@ -20,4 +21,14 @@ export interface ExternalFindings {
|
|
|
20
21
|
reason: string;
|
|
21
22
|
}[];
|
|
22
23
|
}
|
|
24
|
+
/** Capture the caller's import settings before reading an export or resolving its destination. */
|
|
25
|
+
export declare function snapshotImportOptions<P extends ExternalPublicationOptions["provider"]>({ repository, provider, sourceKey, sourceRepositoryUrl, inspectorProjectMap, }: ExternalPublicationOptions & {
|
|
26
|
+
provider: P;
|
|
27
|
+
}): {
|
|
28
|
+
repository: string;
|
|
29
|
+
provider: P;
|
|
30
|
+
sourceKey: string;
|
|
31
|
+
sourceRepositoryUrl: string | undefined;
|
|
32
|
+
inspectorProjectMap: Map<string, string> | undefined;
|
|
33
|
+
};
|
|
23
34
|
//# sourceMappingURL=external-findings.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"external-findings.d.ts","sourceRoot":"","sources":["../src/external-findings.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"external-findings.d.ts","sourceRoot":"","sources":["../src/external-findings.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AACjF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAE3E,iFAAiF;AACjF,MAAM,WAAW,eAAe;IAC9B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,QAAQ,EAAE,uBAAuB,CAAC;CACnC;AAED,iFAAiF;AACjF,MAAM,WAAW,wBAAwB;IACvC,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,6EAA6E;IAC7E,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,QAAQ,EAAE,eAAe,EAAE,CAAC;IAC5B,QAAQ,EAAE;QACR,QAAQ,EAAE,MAAM,CAAC;QACjB,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;QACjC,MAAM,EAAE,MAAM,CAAC;KAChB,EAAE,CAAC;CACL;AAUD,kGAAkG;AAClG,wBAAgB,qBAAqB,CACnC,CAAC,SAAS,0BAA0B,CAAC,UAAU,CAAC,EAChD,EACA,UAAU,EACV,QAAQ,EACR,SAAS,EACT,mBAAmB,EACnB,mBAAmB,GACpB,EAAE,0BAA0B,GAAG;IAAE,QAAQ,EAAE,CAAC,CAAA;CAAE;;;;;;EAY9C"}
|
|
@@ -1,2 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
import { CodexSecurityError } from "./errors.js";
|
|
2
|
+
/** Capture the caller's import settings before reading an export or resolving its destination. */
|
|
3
|
+
export function snapshotImportOptions({ repository, provider, sourceKey, sourceRepositoryUrl, inspectorProjectMap, }) {
|
|
4
|
+
if (inspectorProjectMap !== undefined && provider !== "inspector")
|
|
5
|
+
throw new CodexSecurityError("An Inspector project map requires the inspector provider.");
|
|
6
|
+
return {
|
|
7
|
+
repository,
|
|
8
|
+
provider,
|
|
9
|
+
sourceKey,
|
|
10
|
+
sourceRepositoryUrl,
|
|
11
|
+
inspectorProjectMap: inspectorProjectMap && new Map(inspectorProjectMap),
|
|
12
|
+
};
|
|
13
|
+
}
|
|
2
14
|
//# sourceMappingURL=external-findings.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"external-findings.js","sourceRoot":"","sources":["../src/external-findings.ts"],"names":[],"mappings":"","sourcesContent":["import type { ExternalFindingEvidence } from \"./external-import-models.js\";\n\n/** A provider occurrence and its evidence, independent of a Codex assessment. */\nexport interface ExternalFinding {\n source_finding_id: string;\n evidence: ExternalFindingEvidence;\n}\n\n/** Repository provenance retained by a reader outside the published evidence. */\nexport interface ExternalSourceRepository {\n url: string;\n platform?: \"github\";\n}\n\nexport interface ExternalFindings {\n read: number;\n /** Reader-retained run metadata, including diagnostics for empty reports. */\n report?: Record<string, unknown>;\n findings: ExternalFinding[];\n excluded: {\n position: number;\n source_finding_id: string | null;\n reason: string;\n }[];\n}\n\n/** @internal Keep earlier provider projections only for immutable request replay. */\nexport interface ExternalPublicationInput {\n current: ExternalFindings;\n legacy: ExternalFindings;\n currentIdentity: unknown;\n legacyIdentity: unknown;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"external-findings.js","sourceRoot":"","sources":["../src/external-findings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAoCjD,kGAAkG;AAClG,MAAM,UAAU,qBAAqB,CAEnC,EACA,UAAU,EACV,QAAQ,EACR,SAAS,EACT,mBAAmB,EACnB,mBAAmB,GAC0B;IAC7C,IAAI,mBAAmB,KAAK,SAAS,IAAI,QAAQ,KAAK,WAAW;QAC/D,MAAM,IAAI,kBAAkB,CAC1B,2DAA2D,CAC5D,CAAC;IACJ,OAAO;QACL,UAAU;QACV,QAAQ;QACR,SAAS;QACT,mBAAmB;QACnB,mBAAmB,EAAE,mBAAmB,IAAI,IAAI,GAAG,CAAC,mBAAmB,CAAC;KACzE,CAAC;AACJ,CAAC","sourcesContent":["import { CodexSecurityError } from \"./errors.js\";\nimport type { ExternalPublicationOptions } from \"./external-findings-publish.js\";\nimport type { ExternalFindingEvidence } from \"./external-import-models.js\";\n\n/** A provider occurrence and its evidence, independent of a Codex assessment. */\nexport interface ExternalFinding {\n source_finding_id: string;\n evidence: ExternalFindingEvidence;\n}\n\n/** Repository provenance retained by a reader outside the published evidence. */\nexport interface ExternalSourceRepository {\n url: string;\n platform?: \"github\";\n}\n\nexport interface ExternalFindings {\n read: number;\n /** Reader-retained run metadata, including diagnostics for empty reports. */\n report?: Record<string, unknown>;\n findings: ExternalFinding[];\n excluded: {\n position: number;\n source_finding_id: string | null;\n reason: string;\n }[];\n}\n\n/** @internal Keep earlier provider projections only for immutable request replay. */\nexport interface ExternalPublicationInput {\n current: ExternalFindings;\n legacy: ExternalFindings;\n currentIdentity: unknown;\n legacyIdentity: unknown;\n}\n\n/** Capture the caller's import settings before reading an export or resolving its destination. */\nexport function snapshotImportOptions<\n P extends ExternalPublicationOptions[\"provider\"],\n>({\n repository,\n provider,\n sourceKey,\n sourceRepositoryUrl,\n inspectorProjectMap,\n}: ExternalPublicationOptions & { provider: P }) {\n if (inspectorProjectMap !== undefined && provider !== \"inspector\")\n throw new CodexSecurityError(\n \"An Inspector project map requires the inspector provider.\",\n );\n return {\n repository,\n provider,\n sourceKey,\n sourceRepositoryUrl,\n inspectorProjectMap: inspectorProjectMap && new Map(inspectorProjectMap),\n };\n}\n"]}
|
|
@@ -3,7 +3,7 @@ export type Id = string;
|
|
|
3
3
|
export type RepoConnectorId = string;
|
|
4
4
|
export type EnvironmentId = string;
|
|
5
5
|
export type ResetMarker = string;
|
|
6
|
-
export type Provider = "wiz" | "endor" | "snyk" | "github" | "semgrep";
|
|
6
|
+
export type Provider = "wiz" | "endor" | "snyk" | "github" | "semgrep" | "inspector";
|
|
7
7
|
export type SourceKey = string;
|
|
8
8
|
export type ClientId = string;
|
|
9
9
|
export type SourceFindingId = string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"external-import-models.d.ts","sourceRoot":"","sources":["../src/external-import-models.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC;AAC/B,MAAM,MAAM,EAAE,GAAG,MAAM,CAAC;AACxB,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC;AACrC,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC;AACnC,MAAM,MAAM,WAAW,GAAG,MAA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ACvB;AACD,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AACD,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,GAAG,CAAC;IACR,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,UAAU,CAAC;CACxB;AACD,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,KAAK,CAAC;IACZ,QAAQ,EAAE,QAAQ,CAAC;IACnB,IAAI,EAAE,KAAK,CAAC;CACb;AACD,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,GAAG,CAAC;IACR,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,iBAAiB,EAAE,gBAAgB,CAAC;IACpC,cAAc,EAAE,cAAc,CAAC;IAC/B,oBAAoB,EAAE,mBAAmB,CAAC;IAC1C,MAAM,EAAE,YAAY,CAAC;IACrB,iBAAiB,EAAE,gBAAgB,CAAC;IACpC,cAAc,EAAE,cAAc,CAAC;IAC/B,OAAO,EAAE,QAAQ,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,SAAS,CAAC;IACpB,iBAAiB,EAAE,gBAAgB,CAAC;IACpC,UAAU,CAAC,EAAE,kBAAkB,CAAC;IAChC,UAAU,EAAE,UAAU,CAAC;IACvB,UAAU,EAAE,UAAU,CAAC;CACxB;AAED,MAAM,MAAM,uBAAuB,GAAG,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"external-import-models.d.ts","sourceRoot":"","sources":["../src/external-import-models.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC;AAC/B,MAAM,MAAM,EAAE,GAAG,MAAM,CAAC;AACxB,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC;AACrC,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC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AE,UAAU,CAAC;IACvB,UAAU,EAAE,SAAS,CAAC;CACvB;AACD,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AACD,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,GAAG,CAAC;IACR,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,UAAU,CAAC;CACxB;AACD,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,KAAK,CAAC;IACZ,QAAQ,EAAE,QAAQ,CAAC;IACnB,IAAI,EAAE,KAAK,CAAC;CACb;AACD,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,GAAG,CAAC;IACR,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,iBAAiB,EAAE,gBAAgB,CAAC;IACpC,cAAc,EAAE,cAAc,CAAC;IAC/B,oBAAoB,EAAE,mBAAmB,CAAC;IAC1C,MAAM,EAAE,YAAY,CAAC;IACrB,iBAAiB,EAAE,gBAAgB,CAAC;IACpC,cAAc,EAAE,cAAc,CAAC;IAC/B,OAAO,EAAE,QAAQ,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,SAAS,CAAC;IACpB,iBAAiB,EAAE,gBAAgB,CAAC;IACpC,UAAU,CAAC,EAAE,kBAAkB,CAAC;IAChC,UAAU,EAAE,UAAU,CAAC;IACvB,UAAU,EAAE,UAAU,CAAC;CACxB;AAED,MAAM,MAAM,uBAAuB,GAAG,uBAAuB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"external-import-models.js","sourceRoot":"","sources":["../src/external-import-models.ts"],"names":[],"mappings":"AAAA,qGAAqG","sourcesContent":["/* Generated from schemas/external-findings.schema.json. Run pnpm generate:external-import-models. */\n\nexport type RequestId = string;\nexport type Id = string;\nexport type RepoConnectorId = string;\nexport type EnvironmentId = string;\nexport type ResetMarker = string;\nexport type Provider = \"wiz\" | \"endor\" | \"snyk\" | \"github\" | \"semgrep\";\nexport type SourceKey = string;\nexport type ClientId = string;\nexport type SourceFindingId = string;\nexport type ExpectedVersion = number;\nexport type Title = string;\nexport type Severity =\n \"critical\" | \"high\" | \"medium\" | \"low\" | \"informational\" | \"unknown\";\nexport type Description = string | null;\nexport type Url = string | null;\n/**\n * @maxItems 100\n */\nexport type AdvisoryIds = string[];\nexport type Name = string;\nexport type Ecosystem = string | null;\nexport type InstalledVersion = string | null;\nexport type VulnerableVersionRange = string | null;\nexport type ManifestPath = string | null;\n/**\n * @maxItems 100\n */\nexport type FixedVersions = string[];\n/**\n * @maxItems 100\n */\nexport type Packages = ImportedPackage[];\nexport type Path = string;\nexport type Line = number | null;\n/**\n * @maxItems 100\n */\nexport type Locations = ImportedLocation[];\nexport type Branch = string | null;\nexport type CodeRevision = string | null;\nexport type SourceScanId = string | null;\n/**\n * @maxItems 100\n */\nexport type ImageDigests = string[];\nexport type SourceUpdatedAt = number | null;\nexport type Kind = \"sast\" | \"secret\" | \"iac\" | \"advisory\";\nexport type Url1 = string;\nexport type Id1 = string | null;\nexport type Name1 = string | null;\nexport type Source = \"repository\" | \"global\";\nexport type SourceStatus = string | null;\nexport type ScannerOrigin = string | null;\nexport type ScannerVerdict = string | null;\nexport type Id2 = string | null;\nexport type ShortId = string | null;\nexport type Name2 = string | null;\n/**\n * @maxItems 100\n */\nexport type WeaknessIds = string[];\nexport type RemediationInstructions = string | null;\nexport type EndLine = number | null;\nexport type Snippet = string | null;\nexport type Type = string | null;\nexport type ImportedSecretConfidence = string;\nexport type ValidationStatus = string | null;\nexport type IsEncrypted = boolean | null;\nexport type IsManaged = boolean | null;\nexport type IntroducedCommit = string | null;\nexport type Platform = string | null;\nexport type CloudPlatform = string | null;\nexport type Expected = string | null;\nexport type Actual = string | null;\nexport type FileUrl = string | null;\n/**\n * @minItems 1\n * @maxItems 100\n */\nexport type Items = FindingImportItem[];\nexport type Id3 = string;\nexport type Object = \"security.finding_import\";\nexport type Actor = string;\nexport type CreatedAt = number;\nexport type ItemCount = number;\nexport type Created = number;\nexport type Updated = number;\nexport type Unchanged = number;\nexport type Error = number;\nexport type ClientId1 = string;\nexport type Outcome = \"created\" | \"updated\" | \"unchanged\" | \"error\";\nexport type SourceReportId = string | null;\nexport type ObservationId = string | null;\nexport type CanonicalFindingId = string | null;\nexport type Version = number | null;\nexport type Code =\n \"version_conflict\" | \"scope_conflict\" | \"stale_source_snapshot\";\nexport type Message = string;\nexport type Results = FindingImportResult[];\nexport type Object1 = \"page\";\nexport type Id4 = string;\nexport type Object2 = \"security.repository\";\nexport type RepoConnectorId1 = string;\nexport type Url2 = string;\nexport type DefaultBranch = string | null;\nexport type ResetMarker1 = string;\nexport type ImportEnvironmentId = string | null;\nexport type Data = ImportRepository[];\nexport type HasMore = boolean;\nexport type Next = string | null;\nexport type Id5 = string;\nexport type Object3 = \"security.source_report\";\nexport type Origin = \"imported\";\nexport type RepoId = string;\nexport type RepoConnectorId2 = string;\nexport type EnvironmentId1 = string;\nexport type CanonicalFindingId1 = string;\nexport type SourceFindingId1 = string;\nexport type ObservationId1 = string;\nexport type Version1 = number;\nexport type State = \"not_assessed\";\nexport type Id6 = string;\nexport type Actor1 = string;\nexport type CreatedAt1 = number;\nexport type CreatedAt2 = number;\nexport type UpdatedAt = number;\nexport type Object4 = \"page\";\nexport type Id7 = string;\nexport type Object5 = \"security.source_report_summary\";\nexport type Origin1 = \"imported\";\nexport type RepoId1 = string;\nexport type RepoConnectorId3 = string;\nexport type EnvironmentId2 = string;\nexport type CanonicalFindingId2 = string;\nexport type SourceFindingId2 = string;\nexport type ObservationId2 = string;\nexport type Version2 = number;\nexport type Title1 = string;\nexport type Severity1 =\n \"critical\" | \"high\" | \"medium\" | \"low\" | \"informational\" | \"unknown\";\nexport type SourceUpdatedAt1 = number | null;\nexport type CreatedAt3 = number;\nexport type UpdatedAt1 = number;\nexport type Data1 = SourceReportSummary[];\nexport type HasMore1 = boolean;\nexport type Next1 = string | null;\n\n/**\n * Schema export root; transport endpoints return the individual models.\n */\nexport interface ExternalFindingContracts {\n request: FindingImportRequest;\n receipt: FindingImportReceipt;\n repositories: ImportRepositoryPage;\n source_report: SourceReport;\n source_reports: SourceReportPage;\n}\nexport interface FindingImportRequest {\n request_id: RequestId;\n repository: ImportDestination;\n source: ImportSource;\n items: Items;\n}\nexport interface ImportDestination {\n id: Id;\n repo_connector_id: RepoConnectorId;\n environment_id: EnvironmentId;\n reset_marker: ResetMarker;\n}\nexport interface ImportSource {\n provider: Provider;\n source_key: SourceKey;\n}\nexport interface FindingImportItem {\n client_id: ClientId;\n source_finding_id: SourceFindingId;\n expected_version: ExpectedVersion;\n evidence: ImportedFindingEvidence;\n}\nexport interface ImportedFindingEvidence {\n title: Title;\n severity: Severity;\n description?: Description;\n url?: Url;\n advisory_ids?: AdvisoryIds;\n packages?: Packages;\n locations?: Locations;\n branch?: Branch;\n code_revision?: CodeRevision;\n source_scan_id?: SourceScanId;\n image_digests?: ImageDigests;\n source_updated_at?: SourceUpdatedAt;\n source_data?: SourceData;\n details?: ImportedFindingDetails | null;\n}\nexport interface ImportedPackage {\n name: Name;\n ecosystem?: Ecosystem;\n installed_version?: InstalledVersion;\n vulnerable_version_range?: VulnerableVersionRange;\n manifest_path?: ManifestPath;\n fixed_versions?: FixedVersions;\n}\nexport interface ImportedLocation {\n path: Path;\n line?: Line;\n}\nexport interface SourceData {\n [k: string]: unknown;\n}\n/**\n * Typed repository evidence; vendor state is not a Codex assessment.\n */\nexport interface ImportedFindingDetails {\n kind: Kind;\n repository?: ImportedRepositoryReference | null;\n advisory?: ImportedAdvisoryContext | null;\n source_status?: SourceStatus;\n scanner_origin?: ScannerOrigin;\n scanner_verdict?: ScannerVerdict;\n rule?: ImportedFindingRule | null;\n weakness_ids?: WeaknessIds;\n remediation_instructions?: RemediationInstructions;\n code?: ImportedCodeContext | null;\n secret?: ImportedSecretDetails | null;\n configuration?: ImportedConfigurationDetails | null;\n file_url?: FileUrl;\n}\n/**\n * Vendor repository identity, resolved to the full source-control URL.\n */\nexport interface ImportedRepositoryReference {\n url: Url1;\n id?: Id1;\n name?: Name1;\n}\n/**\n * Where the advisory was read; applicability is assessed separately.\n */\nexport interface ImportedAdvisoryContext {\n source: Source;\n}\nexport interface ImportedFindingRule {\n id?: Id2;\n short_id?: ShortId;\n name?: Name2;\n}\n/**\n * Optional range and snippet for the evidence's first source location.\n */\nexport interface ImportedCodeContext {\n end_line?: EndLine;\n snippet?: Snippet;\n}\nexport interface ImportedSecretDetails {\n type?: Type;\n confidence?: ImportedSecretConfidence | null;\n validation_status?: ValidationStatus;\n is_encrypted?: IsEncrypted;\n is_managed?: IsManaged;\n introduced_commit?: IntroducedCommit;\n}\nexport interface ImportedConfigurationDetails {\n platform?: Platform;\n cloud_platform?: CloudPlatform;\n expected?: Expected;\n actual?: Actual;\n}\nexport interface FindingImportReceipt {\n id: Id3;\n object?: Object;\n repository: ImportDestination;\n source: ImportSource;\n actor: Actor;\n created_at: CreatedAt;\n item_count: ItemCount;\n counts: ImportCounts;\n results: Results;\n}\nexport interface ImportCounts {\n created?: Created;\n updated?: Updated;\n unchanged?: Unchanged;\n error?: Error;\n}\nexport interface FindingImportResult {\n client_id: ClientId1;\n outcome: Outcome;\n source_report_id?: SourceReportId;\n observation_id?: ObservationId;\n canonical_finding_id?: CanonicalFindingId;\n version?: Version;\n error?: ImportItemError | null;\n}\nexport interface ImportItemError {\n code: Code;\n message: Message;\n}\nexport interface ImportRepositoryPage {\n object?: Object1;\n data: Data;\n has_more: HasMore;\n next: Next;\n}\nexport interface ImportRepository {\n id: Id4;\n object?: Object2;\n repo_connector_id: RepoConnectorId1;\n url: Url2;\n default_branch?: DefaultBranch;\n reset_marker: ResetMarker1;\n import_environment_id?: ImportEnvironmentId;\n}\nexport interface SourceReport {\n id: Id5;\n object?: Object3;\n origin?: Origin;\n repo_id: RepoId;\n repo_connector_id: RepoConnectorId2;\n environment_id: EnvironmentId1;\n canonical_finding_id: CanonicalFindingId1;\n source: ImportSource;\n source_finding_id: SourceFindingId1;\n observation_id: ObservationId1;\n version: Version1;\n evidence: ImportedFindingEvidence;\n assessment?: ImportedAssessment;\n last_import?: LastImport | null;\n created_at: CreatedAt2;\n updated_at: UpdatedAt;\n}\nexport interface ImportedAssessment {\n state?: State;\n}\nexport interface LastImport {\n id: Id6;\n actor: Actor1;\n created_at: CreatedAt1;\n}\nexport interface SourceReportPage {\n object?: Object4;\n data: Data1;\n has_more: HasMore1;\n next: Next1;\n}\nexport interface SourceReportSummary {\n id: Id7;\n object?: Object5;\n origin?: Origin1;\n repo_id: RepoId1;\n repo_connector_id: RepoConnectorId3;\n environment_id: EnvironmentId2;\n canonical_finding_id: CanonicalFindingId2;\n source: ImportSource;\n source_finding_id: SourceFindingId2;\n observation_id: ObservationId2;\n version: Version2;\n title: Title1;\n severity: Severity1;\n source_updated_at: SourceUpdatedAt1;\n assessment?: ImportedAssessment;\n created_at: CreatedAt3;\n updated_at: UpdatedAt1;\n}\n\nexport type ExternalFindingEvidence = ImportedFindingEvidence;\n"]}
|
|
1
|
+
{"version":3,"file":"external-import-models.js","sourceRoot":"","sources":["../src/external-import-models.ts"],"names":[],"mappings":"AAAA,qGAAqG","sourcesContent":["/* Generated from schemas/external-findings.schema.json. Run pnpm generate:external-import-models. */\n\nexport type RequestId = string;\nexport type Id = string;\nexport type RepoConnectorId = string;\nexport type EnvironmentId = string;\nexport type ResetMarker = string;\nexport type Provider =\n \"wiz\" | \"endor\" | \"snyk\" | \"github\" | \"semgrep\" | \"inspector\";\nexport type SourceKey = string;\nexport type ClientId = string;\nexport type SourceFindingId = string;\nexport type ExpectedVersion = number;\nexport type Title = string;\nexport type Severity =\n \"critical\" | \"high\" | \"medium\" | \"low\" | \"informational\" | \"unknown\";\nexport type Description = string | null;\nexport type Url = string | null;\n/**\n * @maxItems 100\n */\nexport type AdvisoryIds = string[];\nexport type Name = string;\nexport type Ecosystem = string | null;\nexport type InstalledVersion = string | null;\nexport type VulnerableVersionRange = string | null;\nexport type ManifestPath = string | null;\n/**\n * @maxItems 100\n */\nexport type FixedVersions = string[];\n/**\n * @maxItems 100\n */\nexport type Packages = ImportedPackage[];\nexport type Path = string;\nexport type Line = number | null;\n/**\n * @maxItems 100\n */\nexport type Locations = ImportedLocation[];\nexport type Branch = string | null;\nexport type CodeRevision = string | null;\nexport type SourceScanId = string | null;\n/**\n * @maxItems 100\n */\nexport type ImageDigests = string[];\nexport type SourceUpdatedAt = number | null;\nexport type Kind = \"sast\" | \"secret\" | \"iac\" | \"advisory\";\nexport type Url1 = string;\nexport type Id1 = string | null;\nexport type Name1 = string | null;\nexport type Source = \"repository\" | \"global\";\nexport type SourceStatus = string | null;\nexport type ScannerOrigin = string | null;\nexport type ScannerVerdict = string | null;\nexport type Id2 = string | null;\nexport type ShortId = string | null;\nexport type Name2 = string | null;\n/**\n * @maxItems 100\n */\nexport type WeaknessIds = string[];\nexport type RemediationInstructions = string | null;\nexport type EndLine = number | null;\nexport type Snippet = string | null;\nexport type Type = string | null;\nexport type ImportedSecretConfidence = string;\nexport type ValidationStatus = string | null;\nexport type IsEncrypted = boolean | null;\nexport type IsManaged = boolean | null;\nexport type IntroducedCommit = string | null;\nexport type Platform = string | null;\nexport type CloudPlatform = string | null;\nexport type Expected = string | null;\nexport type Actual = string | null;\nexport type FileUrl = string | null;\n/**\n * @minItems 1\n * @maxItems 100\n */\nexport type Items = FindingImportItem[];\nexport type Id3 = string;\nexport type Object = \"security.finding_import\";\nexport type Actor = string;\nexport type CreatedAt = number;\nexport type ItemCount = number;\nexport type Created = number;\nexport type Updated = number;\nexport type Unchanged = number;\nexport type Error = number;\nexport type ClientId1 = string;\nexport type Outcome = \"created\" | \"updated\" | \"unchanged\" | \"error\";\nexport type SourceReportId = string | null;\nexport type ObservationId = string | null;\nexport type CanonicalFindingId = string | null;\nexport type Version = number | null;\nexport type Code =\n \"version_conflict\" | \"scope_conflict\" | \"stale_source_snapshot\";\nexport type Message = string;\nexport type Results = FindingImportResult[];\nexport type Object1 = \"page\";\nexport type Id4 = string;\nexport type Object2 = \"security.repository\";\nexport type RepoConnectorId1 = string;\nexport type Url2 = string;\nexport type DefaultBranch = string | null;\nexport type ResetMarker1 = string;\nexport type ImportEnvironmentId = string | null;\nexport type Data = ImportRepository[];\nexport type HasMore = boolean;\nexport type Next = string | null;\nexport type Id5 = string;\nexport type Object3 = \"security.source_report\";\nexport type Origin = \"imported\";\nexport type RepoId = string;\nexport type RepoConnectorId2 = string;\nexport type EnvironmentId1 = string;\nexport type CanonicalFindingId1 = string;\nexport type SourceFindingId1 = string;\nexport type ObservationId1 = string;\nexport type Version1 = number;\nexport type State = \"not_assessed\";\nexport type Id6 = string;\nexport type Actor1 = string;\nexport type CreatedAt1 = number;\nexport type CreatedAt2 = number;\nexport type UpdatedAt = number;\nexport type Object4 = \"page\";\nexport type Id7 = string;\nexport type Object5 = \"security.source_report_summary\";\nexport type Origin1 = \"imported\";\nexport type RepoId1 = string;\nexport type RepoConnectorId3 = string;\nexport type EnvironmentId2 = string;\nexport type CanonicalFindingId2 = string;\nexport type SourceFindingId2 = string;\nexport type ObservationId2 = string;\nexport type Version2 = number;\nexport type Title1 = string;\nexport type Severity1 =\n \"critical\" | \"high\" | \"medium\" | \"low\" | \"informational\" | \"unknown\";\nexport type SourceUpdatedAt1 = number | null;\nexport type CreatedAt3 = number;\nexport type UpdatedAt1 = number;\nexport type Data1 = SourceReportSummary[];\nexport type HasMore1 = boolean;\nexport type Next1 = string | null;\n\n/**\n * Schema export root; transport endpoints return the individual models.\n */\nexport interface ExternalFindingContracts {\n request: FindingImportRequest;\n receipt: FindingImportReceipt;\n repositories: ImportRepositoryPage;\n source_report: SourceReport;\n source_reports: SourceReportPage;\n}\nexport interface FindingImportRequest {\n request_id: RequestId;\n repository: ImportDestination;\n source: ImportSource;\n items: Items;\n}\nexport interface ImportDestination {\n id: Id;\n repo_connector_id: RepoConnectorId;\n environment_id: EnvironmentId;\n reset_marker: ResetMarker;\n}\nexport interface ImportSource {\n provider: Provider;\n source_key: SourceKey;\n}\nexport interface FindingImportItem {\n client_id: ClientId;\n source_finding_id: SourceFindingId;\n expected_version: ExpectedVersion;\n evidence: ImportedFindingEvidence;\n}\nexport interface ImportedFindingEvidence {\n title: Title;\n severity: Severity;\n description?: Description;\n url?: Url;\n advisory_ids?: AdvisoryIds;\n packages?: Packages;\n locations?: Locations;\n branch?: Branch;\n code_revision?: CodeRevision;\n source_scan_id?: SourceScanId;\n image_digests?: ImageDigests;\n source_updated_at?: SourceUpdatedAt;\n source_data?: SourceData;\n details?: ImportedFindingDetails | null;\n}\nexport interface ImportedPackage {\n name: Name;\n ecosystem?: Ecosystem;\n installed_version?: InstalledVersion;\n vulnerable_version_range?: VulnerableVersionRange;\n manifest_path?: ManifestPath;\n fixed_versions?: FixedVersions;\n}\nexport interface ImportedLocation {\n path: Path;\n line?: Line;\n}\nexport interface SourceData {\n [k: string]: unknown;\n}\n/**\n * Typed repository evidence; vendor state is not a Codex assessment.\n */\nexport interface ImportedFindingDetails {\n kind: Kind;\n repository?: ImportedRepositoryReference | null;\n advisory?: ImportedAdvisoryContext | null;\n source_status?: SourceStatus;\n scanner_origin?: ScannerOrigin;\n scanner_verdict?: ScannerVerdict;\n rule?: ImportedFindingRule | null;\n weakness_ids?: WeaknessIds;\n remediation_instructions?: RemediationInstructions;\n code?: ImportedCodeContext | null;\n secret?: ImportedSecretDetails | null;\n configuration?: ImportedConfigurationDetails | null;\n file_url?: FileUrl;\n}\n/**\n * Vendor repository identity, resolved to the full source-control URL.\n */\nexport interface ImportedRepositoryReference {\n url: Url1;\n id?: Id1;\n name?: Name1;\n}\n/**\n * Where the advisory was read; applicability is assessed separately.\n */\nexport interface ImportedAdvisoryContext {\n source: Source;\n}\nexport interface ImportedFindingRule {\n id?: Id2;\n short_id?: ShortId;\n name?: Name2;\n}\n/**\n * Optional range and snippet for the evidence's first source location.\n */\nexport interface ImportedCodeContext {\n end_line?: EndLine;\n snippet?: Snippet;\n}\nexport interface ImportedSecretDetails {\n type?: Type;\n confidence?: ImportedSecretConfidence | null;\n validation_status?: ValidationStatus;\n is_encrypted?: IsEncrypted;\n is_managed?: IsManaged;\n introduced_commit?: IntroducedCommit;\n}\nexport interface ImportedConfigurationDetails {\n platform?: Platform;\n cloud_platform?: CloudPlatform;\n expected?: Expected;\n actual?: Actual;\n}\nexport interface FindingImportReceipt {\n id: Id3;\n object?: Object;\n repository: ImportDestination;\n source: ImportSource;\n actor: Actor;\n created_at: CreatedAt;\n item_count: ItemCount;\n counts: ImportCounts;\n results: Results;\n}\nexport interface ImportCounts {\n created?: Created;\n updated?: Updated;\n unchanged?: Unchanged;\n error?: Error;\n}\nexport interface FindingImportResult {\n client_id: ClientId1;\n outcome: Outcome;\n source_report_id?: SourceReportId;\n observation_id?: ObservationId;\n canonical_finding_id?: CanonicalFindingId;\n version?: Version;\n error?: ImportItemError | null;\n}\nexport interface ImportItemError {\n code: Code;\n message: Message;\n}\nexport interface ImportRepositoryPage {\n object?: Object1;\n data: Data;\n has_more: HasMore;\n next: Next;\n}\nexport interface ImportRepository {\n id: Id4;\n object?: Object2;\n repo_connector_id: RepoConnectorId1;\n url: Url2;\n default_branch?: DefaultBranch;\n reset_marker: ResetMarker1;\n import_environment_id?: ImportEnvironmentId;\n}\nexport interface SourceReport {\n id: Id5;\n object?: Object3;\n origin?: Origin;\n repo_id: RepoId;\n repo_connector_id: RepoConnectorId2;\n environment_id: EnvironmentId1;\n canonical_finding_id: CanonicalFindingId1;\n source: ImportSource;\n source_finding_id: SourceFindingId1;\n observation_id: ObservationId1;\n version: Version1;\n evidence: ImportedFindingEvidence;\n assessment?: ImportedAssessment;\n last_import?: LastImport | null;\n created_at: CreatedAt2;\n updated_at: UpdatedAt;\n}\nexport interface ImportedAssessment {\n state?: State;\n}\nexport interface LastImport {\n id: Id6;\n actor: Actor1;\n created_at: CreatedAt1;\n}\nexport interface SourceReportPage {\n object?: Object4;\n data: Data1;\n has_more: HasMore1;\n next: Next1;\n}\nexport interface SourceReportSummary {\n id: Id7;\n object?: Object5;\n origin?: Origin1;\n repo_id: RepoId1;\n repo_connector_id: RepoConnectorId3;\n environment_id: EnvironmentId2;\n canonical_finding_id: CanonicalFindingId2;\n source: ImportSource;\n source_finding_id: SourceFindingId2;\n observation_id: ObservationId2;\n version: Version2;\n title: Title1;\n severity: Severity1;\n source_updated_at: SourceUpdatedAt1;\n assessment?: ImportedAssessment;\n created_at: CreatedAt3;\n updated_at: UpdatedAt1;\n}\n\nexport type ExternalFindingEvidence = ImportedFindingEvidence;\n"]}
|
package/dist/host-protocol.d.ts
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { type Readable } from "node:stream";
|
|
2
|
+
/** Only the host can mark the RPC envelope. Model-controlled results remain plain JSON. */
|
|
3
|
+
export declare class PendingReviewSubmission {
|
|
4
|
+
readonly submission: unknown;
|
|
5
|
+
constructor(submission: unknown);
|
|
6
|
+
}
|
|
2
7
|
type Output = Pick<NodeJS.WriteStream, "write"> & {
|
|
3
8
|
on?(event: "error", listener: (error: Error) => void): unknown;
|
|
4
9
|
off?(event: "error", listener: (error: Error) => void): unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"host-protocol.d.ts","sourceRoot":"","sources":["../src/host-protocol.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,QAAQ,EAAY,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"host-protocol.d.ts","sourceRoot":"","sources":["../src/host-protocol.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,QAAQ,EAAY,MAAM,aAAa,CAAC;AAkCtD,2FAA2F;AAC3F,qBAAa,uBAAuB;IACtB,QAAQ,CAAC,UAAU,EAAE,OAAO;IAAxC,YAAqB,UAAU,EAAE,OAAO,EAAI;CAC7C;AACD,KAAK,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,GAAG;IAChD,EAAE,CAAC,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,GAAG,OAAO,CAAC;IAC/D,GAAG,CAAC,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,GAAG,OAAO,CAAC;CACjE,CAAC;AACF,KAAK,OAAO,GAAG,CACb,EAAE,EAAE,MAAM,EACV,OAAO,EAAE,OAAO,EAChB,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,EACrC,MAAM,CAAC,EAAE,MAAM,KACZ,OAAO,CAAC,OAAO,CAAC,CAAC;AAEtB,+EAA+E;AAC/E,wBAAsB,eAAe,CACnC,KAAK,EAAE,QAAQ,EACf,MAAM,EAAE,MAAM,EACd,SAAS,EAAE;IACT,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,2EAA2E;IAC3E,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,MAAM,GAAG,SAAS,CAAC;IACnD,GAAG,CACD,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,WAAW,EACnB,UAAU,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,GACnC,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAChC,EACD,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,MAAM,CAAC,CA8QjB"}
|
package/dist/host-protocol.js
CHANGED
|
@@ -16,8 +16,13 @@ const progress = envelope.extend({
|
|
|
16
16
|
method: z.literal("execution.progress"),
|
|
17
17
|
params: z.strictObject({ requestId: z.string(), event: z.unknown() }),
|
|
18
18
|
});
|
|
19
|
+
const success = envelope.extend({ id: rpcId, result: z.unknown() });
|
|
20
|
+
const acceptsPendingReview = z.object({
|
|
21
|
+
supportsSubmissionValidation: z.literal(true),
|
|
22
|
+
});
|
|
19
23
|
const response = z.union([
|
|
20
|
-
|
|
24
|
+
success,
|
|
25
|
+
success.extend({ reviewPending: z.literal(true) }),
|
|
21
26
|
envelope.extend({
|
|
22
27
|
id: rpcId,
|
|
23
28
|
error: z.strictObject({
|
|
@@ -27,6 +32,13 @@ const response = z.union([
|
|
|
27
32
|
}),
|
|
28
33
|
}),
|
|
29
34
|
]);
|
|
35
|
+
/** Only the host can mark the RPC envelope. Model-controlled results remain plain JSON. */
|
|
36
|
+
export class PendingReviewSubmission {
|
|
37
|
+
submission;
|
|
38
|
+
constructor(submission) {
|
|
39
|
+
this.submission = submission;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
30
42
|
/** One bidirectional run, shared with dedupe. This transport never replays. */
|
|
31
43
|
export async function runHostProtocol(input, output, operation, signal) {
|
|
32
44
|
const controller = new AbortController();
|
|
@@ -189,7 +201,14 @@ export async function runHostProtocol(input, output, operation, signal) {
|
|
|
189
201
|
if (pending)
|
|
190
202
|
return Promise.reject(new Error("Execution is already pending."));
|
|
191
203
|
return new Promise((resolve, reject) => {
|
|
192
|
-
pending = {
|
|
204
|
+
pending = {
|
|
205
|
+
id,
|
|
206
|
+
resolve,
|
|
207
|
+
reject,
|
|
208
|
+
onProgress,
|
|
209
|
+
acceptsPendingReview: method === "review.run" &&
|
|
210
|
+
acceptsPendingReview.safeParse(params).success,
|
|
211
|
+
};
|
|
193
212
|
void send({
|
|
194
213
|
jsonrpc: "2.0",
|
|
195
214
|
id,
|
|
@@ -235,7 +254,10 @@ export async function runHostProtocol(input, output, operation, signal) {
|
|
|
235
254
|
return;
|
|
236
255
|
}
|
|
237
256
|
const reply = response.safeParse(message);
|
|
238
|
-
if (!reply.success ||
|
|
257
|
+
if (!reply.success ||
|
|
258
|
+
!pending ||
|
|
259
|
+
reply.data.id !== pending.id ||
|
|
260
|
+
("reviewPending" in reply.data && !pending.acceptsPendingReview)) {
|
|
239
261
|
fail(-32600, `Malformed, unexpected, or mismatched ${operation.requestMethod === "review.run" ? "review" : "execution"} response.`);
|
|
240
262
|
return;
|
|
241
263
|
}
|
|
@@ -243,6 +265,8 @@ export async function runHostProtocol(input, output, operation, signal) {
|
|
|
243
265
|
pending = undefined;
|
|
244
266
|
if ("error" in reply.data)
|
|
245
267
|
execution.reject(new Error(reply.data.error.message));
|
|
268
|
+
else if ("reviewPending" in reply.data)
|
|
269
|
+
execution.resolve(new PendingReviewSubmission(reply.data.result));
|
|
246
270
|
else
|
|
247
271
|
execution.resolve(reply.data.result);
|
|
248
272
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"host-protocol.js","sourceRoot":"","sources":["../src/host-protocol.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAiB,QAAQ,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;AACtD,MAAM,QAAQ,GAAG,CAAC,CAAC,YAAY,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;AAC/D,MAAM,OAAO,GAAG,QAAQ,CAAC,MAAM,CAAC;IAC9B,EAAE,EAAE,KAAK;IACT,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;IACxB,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE;CACpB,CAAC,CAAC;AACH,MAAM,YAAY,GAAG,QAAQ,CAAC,MAAM,CAAC;IACnC,MAAM,EAAE,C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;YAAS,CAAC;QACT,KAAK,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC;QACjC,KAAK,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;QAC5C,KAAK,CAAC,cAAc,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;QAC1C,KAAK,CAAC,KAAK,EAAE,CAAC;QACd,KAAK,CAAC,KAAK,EAAE,CAAC;QACd,KAAK,CAAC,cAAc,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;QAC1C,KAAK,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;QAC5C,IAAI,MAAM,YAAY,QAAQ;YAC5B,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;QAC/C,MAAM,CAAC,GAAG,EAAE,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;QACnC,MAAM,EAAE,mBAAmB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;IACpD,CAAC;AACH,CAAC","sourcesContent":["import { createInterface } from \"node:readline\";\nimport { type Readable, Writable } from \"node:stream\";\nimport { z } from \"zod\";\n\nconst rpcId = z.union([z.string(), z.number().int()]);\nconst envelope = z.strictObject({ jsonrpc: z.literal(\"2.0\") });\nconst request = envelope.extend({\n id: rpcId,\n method: z.literal(\"run\"),\n params: z.unknown(),\n});\nconst cancellation = envelope.extend({\n method: z.literal(\"cancel\"),\n params: z.strictObject({ id: rpcId }),\n});\nconst progress = envelope.extend({\n method: z.literal(\"execution.progress\"),\n params: z.strictObject({ requestId: z.string(), event: z.unknown() }),\n});\nconst response = z.union([\n envelope.extend({ id: rpcId, result: z.unknown() }),\n envelope.extend({\n id: rpcId,\n error: z.strictObject({\n code: z.number().int(),\n message: z.string(),\n data: z.unknown().optional(),\n }),\n }),\n]);\ntype Output = Pick<NodeJS.WriteStream, \"write\"> & {\n on?(event: \"error\", listener: (error: Error) => void): unknown;\n off?(event: \"error\", listener: (error: Error) => void): unknown;\n};\ntype Execute = (\n id: string,\n request: unknown,\n onProgress?: (event: unknown) => void,\n method?: string,\n) => Promise<unknown>;\n\n/** One bidirectional run, shared with dedupe. This transport never replays. */\nexport async function runHostProtocol(\n input: Readable,\n output: Output,\n operation: {\n label: string;\n requestMethod: string;\n progressMethod?: string;\n /** Scan cancellation must retain the host's eventual receipt and usage. */\n awaitCancellationReceipt?: boolean;\n errorData?: (error: unknown) => object | undefined;\n run(\n params: unknown,\n execute: Execute,\n signal: AbortSignal,\n onProgress: (event: unknown) => void,\n ): Promise<{ status: string }>;\n },\n signal?: AbortSignal,\n): Promise<number> {\n const controller = new AbortController();\n let runId: string | number | undefined;\n let terminalCode: number | undefined;\n let completed = false;\n let pending:\n | {\n id: string;\n resolve(value: unknown): void;\n reject(error: Error): void;\n onProgress?: (event: unknown) => void;\n }\n | undefined;\n const { promise: completion, resolve: resolveCompletion } =\n Promise.withResolvers<number>();\n const complete = (code: number) => {\n if (completed) return;\n completed = true;\n resolveCompletion(code);\n };\n const stopOutput = (code: number) => {\n if (completed) return;\n complete(code);\n if (output instanceof Writable) {\n // Native stdout can emit close repeatedly when destroy() is called from\n // its close listener. Detach before destroying, even before cleanup runs.\n output.off(\"close\", outputClosed);\n output.destroy();\n }\n };\n const lines = createInterface({\n input,\n crlfDelay: Infinity,\n terminal: false,\n });\n const send = async (message: object, onFlushed?: () => void) => {\n const line = `${JSON.stringify(message)}\\n`;\n if (output instanceof Writable) {\n if (output.destroyed) throw new Error(\"Host output is closed.\");\n await new Promise<void>((resolve, reject) => {\n let settled = false;\n const settle = (error?: Error | null) => {\n if (settled) return;\n settled = true;\n output.off(\"close\", closed);\n // Node can emit error/close before the rejected Promise is observed.\n // Record the failed write now, so the selected result cannot win.\n if (error) outputError(error);\n else onFlushed?.();\n error ? reject(error) : resolve();\n };\n const closed = () =>\n settle(new Error(\"Host output closed during write.\"));\n output.once(\"close\", closed);\n output.write(line, settle);\n });\n } else {\n output.write(line);\n onFlushed?.();\n }\n };\n const fail = (\n code: number,\n message: string,\n canWrite = true,\n data?: object,\n ) => {\n if (completed) return;\n if (terminalCode !== undefined) {\n if (!canWrite) stopOutput(2);\n return;\n }\n terminalCode = 2;\n controller.abort(new Error(message));\n pending?.reject(new Error(message));\n pending = undefined;\n // A peer that stopped reading cannot receive an error. Unblock both the\n // request write and completion instead of waiting for a write callback.\n if (\n !canWrite ||\n (output instanceof Writable &&\n (output.writableLength > 0 || output.writableNeedDrain))\n ) {\n stopOutput(2);\n return;\n }\n void send({\n jsonrpc: \"2.0\",\n id: runId ?? null,\n error: { code, message, ...(data === undefined ? {} : { data }) },\n })\n .catch(() => undefined)\n .then(() => complete(2));\n };\n const disconnected = () => {\n // Stdin EOF does not close stdout. If a terminal response is already being\n // written, its callback decides whether delivery succeeded.\n if (terminalCode === undefined)\n fail(-32000, \"Host disconnected before the run completed.\");\n };\n const inputError = (error: Error) => fail(-32000, error.message);\n const outputError = (error: Error) => fail(-32000, error.message, false);\n const outputClosed = () => outputError(new Error(\"Host output is closed.\"));\n const interrupted = () => {\n if (terminalCode !== undefined) stopOutput(2);\n else fail(-32800, `${operation.label} canceled.`);\n };\n const canceled = () => {\n if (\n !operation.awaitCancellationReceipt ||\n terminalCode !== undefined ||\n (output instanceof Writable &&\n (output.writableLength > 0 || output.writableNeedDrain))\n ) {\n interrupted();\n return;\n }\n if (controller.signal.aborted) return;\n controller.abort(new Error(`${operation.label} canceled.`));\n if (pending)\n void send({\n jsonrpc: \"2.0\",\n method: \"execution.cancel\",\n params: { requestId: pending.id },\n }).catch(outputError);\n };\n input.on(\"error\", inputError);\n input.on(\"close\", disconnected);\n if (output instanceof Writable) output.on(\"close\", outputClosed);\n lines.on(\"close\", disconnected);\n lines.on(\"error\", inputError);\n output.on?.(\"error\", outputError);\n signal?.addEventListener(\"abort\", interrupted, { once: true });\n lines.on(\"line\", (line) => {\n let message: unknown;\n try {\n message = JSON.parse(line);\n } catch {\n fail(-32700, \"Invalid JSON.\");\n return;\n }\n const cancel = cancellation.safeParse(message);\n if (cancel.success) {\n if (runId === undefined || cancel.data.params.id !== runId)\n fail(-32600, \"Cancellation does not match the active run.\");\n else canceled();\n return;\n }\n if (terminalCode !== undefined) return;\n const run = request.safeParse(message);\n if (run.success) {\n if (runId !== undefined) {\n fail(-32600, \"Only one run request is allowed.\");\n return;\n }\n runId = run.data.id;\n void operation\n .run(\n run.data.params,\n (id, params, onProgress, method = operation.requestMethod) => {\n if (terminalCode !== undefined || controller.signal.aborted)\n return Promise.reject(controller.signal.reason);\n if (pending)\n return Promise.reject(new Error(\"Execution is already pending.\"));\n return new Promise((resolve, reject) => {\n pending = { id, resolve, reject, onProgress };\n void send({\n jsonrpc: \"2.0\",\n id,\n method,\n params,\n }).catch(outputError);\n });\n },\n controller.signal,\n (event) => {\n if (terminalCode === undefined)\n void send({\n jsonrpc: \"2.0\",\n method: operation.progressMethod ?? \"scan.progress\",\n params: { id: runId, event },\n }).catch(outputError);\n },\n )\n .then(\n async (result) => {\n if (terminalCode !== undefined) return;\n const code = result.status === \"completed\" ? 0 : 1;\n terminalCode = code;\n try {\n await send({ jsonrpc: \"2.0\", id: runId, result }, () =>\n complete(code),\n );\n } catch {\n complete(2);\n }\n },\n (error: unknown) =>\n fail(\n -32602,\n error instanceof Error\n ? error.message\n : \"Invalid run parameters.\",\n true,\n operation.errorData?.(error),\n ),\n );\n return;\n }\n const event = progress.safeParse(message);\n if (\n event.success &&\n operation.awaitCancellationReceipt &&\n pending &&\n event.data.params.requestId === pending.id\n ) {\n // Optional progress must never interrupt execution, including bad events\n // or host observer exceptions. Correlation still rejects stale messages.\n try {\n pending.onProgress?.(event.data.params.event);\n } catch {}\n return;\n }\n const reply = response.safeParse(message);\n if (!reply.success || !pending || reply.data.id !== pending.id) {\n fail(\n -32600,\n `Malformed, unexpected, or mismatched ${operation.requestMethod === \"review.run\" ? \"review\" : \"execution\"} response.`,\n );\n return;\n }\n const execution = pending;\n pending = undefined;\n if (\"error\" in reply.data)\n execution.reject(new Error(reply.data.error.message));\n else execution.resolve(reply.data.result);\n });\n if (signal?.aborted) interrupted();\n if (input.readableEnded || input.destroyed) disconnected();\n try {\n return await completion;\n } finally {\n lines.removeAllListeners(\"line\");\n lines.removeListener(\"close\", disconnected);\n lines.removeListener(\"error\", inputError);\n lines.close();\n input.pause();\n input.removeListener(\"error\", inputError);\n input.removeListener(\"close\", disconnected);\n if (output instanceof Writable)\n output.removeListener(\"close\", outputClosed);\n output.off?.(\"error\", outputError);\n signal?.removeEventListener(\"abort\", interrupted);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"host-protocol.js","sourceRoot":"","sources":["../src/host-protocol.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAiB,QAAQ,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;AACtD,MAAM,QAAQ,GAAG,CAAC,CAAC,YAAY,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;AAC/D,MAAM,OAAO,GAAG,QAAQ,CAAC,MAAM,CAAC;IAC9B,EAAE,EAAE,KAAK;IACT,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;IACxB,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE;CACpB,CAAC,CAAC;AACH,MAAM,YAAY,GAAG,QAAQ,CAAC,MAAM,CAAC;IACnC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;IAC3B,MAAM,EAAE,CAAC,CAAC,YAAY,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC;CACtC,CAAC,CAAC;AACH,MAAM,QAAQ,GAAG,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M,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;aACnD,IAAI,eAAe,IAAI,KAAK,CAAC,IAAI;YACpC,SAAS,CAAC,OAAO,CAAC,IAAI,uBAAuB,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;;YAC/D,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC5C,CAAC,CAAC,CAAC;IACH,IAAI,MAAM,EAAE,OAAO;QAAE,WAAW,EAAE,CAAC;IACnC,IAAI,KAAK,CAAC,aAAa,IAAI,KAAK,CAAC,SAAS;QAAE,YAAY,EAAE,CAAC;IAC3D,IAAI,CAAC;QACH,OAAO,MAAM,UAAU,CAAC;IAC1B,CAAC;YAAS,CAAC;QACT,KAAK,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC;QACjC,KAAK,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;QAC5C,KAAK,CAAC,cAAc,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;QAC1C,KAAK,CAAC,KAAK,EAAE,CAAC;QACd,KAAK,CAAC,KAAK,EAAE,CAAC;QACd,KAAK,CAAC,cAAc,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;QAC1C,KAAK,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;QAC5C,IAAI,MAAM,YAAY,QAAQ;YAC5B,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;QAC/C,MAAM,CAAC,GAAG,EAAE,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;QACnC,MAAM,EAAE,mBAAmB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;IACpD,CAAC;AACH,CAAC","sourcesContent":["import { createInterface } from \"node:readline\";\nimport { type Readable, Writable } from \"node:stream\";\nimport { z } from \"zod\";\n\nconst rpcId = z.union([z.string(), z.number().int()]);\nconst envelope = z.strictObject({ jsonrpc: z.literal(\"2.0\") });\nconst request = envelope.extend({\n id: rpcId,\n method: z.literal(\"run\"),\n params: z.unknown(),\n});\nconst cancellation = envelope.extend({\n method: z.literal(\"cancel\"),\n params: z.strictObject({ id: rpcId }),\n});\nconst progress = envelope.extend({\n method: z.literal(\"execution.progress\"),\n params: z.strictObject({ requestId: z.string(), event: z.unknown() }),\n});\nconst success = envelope.extend({ id: rpcId, result: z.unknown() });\nconst acceptsPendingReview = z.object({\n supportsSubmissionValidation: z.literal(true),\n});\nconst response = z.union([\n success,\n success.extend({ reviewPending: z.literal(true) }),\n envelope.extend({\n id: rpcId,\n error: z.strictObject({\n code: z.number().int(),\n message: z.string(),\n data: z.unknown().optional(),\n }),\n }),\n]);\n/** Only the host can mark the RPC envelope. Model-controlled results remain plain JSON. */\nexport class PendingReviewSubmission {\n constructor(readonly submission: unknown) {}\n}\ntype Output = Pick<NodeJS.WriteStream, \"write\"> & {\n on?(event: \"error\", listener: (error: Error) => void): unknown;\n off?(event: \"error\", listener: (error: Error) => void): unknown;\n};\ntype Execute = (\n id: string,\n request: unknown,\n onProgress?: (event: unknown) => void,\n method?: string,\n) => Promise<unknown>;\n\n/** One bidirectional run, shared with dedupe. This transport never replays. */\nexport async function runHostProtocol(\n input: Readable,\n output: Output,\n operation: {\n label: string;\n requestMethod: string;\n progressMethod?: string;\n /** Scan cancellation must retain the host's eventual receipt and usage. */\n awaitCancellationReceipt?: boolean;\n errorData?: (error: unknown) => object | undefined;\n run(\n params: unknown,\n execute: Execute,\n signal: AbortSignal,\n onProgress: (event: unknown) => void,\n ): Promise<{ status: string }>;\n },\n signal?: AbortSignal,\n): Promise<number> {\n const controller = new AbortController();\n let runId: string | number | undefined;\n let terminalCode: number | undefined;\n let completed = false;\n let pending:\n | {\n id: string;\n acceptsPendingReview: boolean;\n resolve(value: unknown): void;\n reject(error: Error): void;\n onProgress?: (event: unknown) => void;\n }\n | undefined;\n const { promise: completion, resolve: resolveCompletion } =\n Promise.withResolvers<number>();\n const complete = (code: number) => {\n if (completed) return;\n completed = true;\n resolveCompletion(code);\n };\n const stopOutput = (code: number) => {\n if (completed) return;\n complete(code);\n if (output instanceof Writable) {\n // Native stdout can emit close repeatedly when destroy() is called from\n // its close listener. Detach before destroying, even before cleanup runs.\n output.off(\"close\", outputClosed);\n output.destroy();\n }\n };\n const lines = createInterface({\n input,\n crlfDelay: Infinity,\n terminal: false,\n });\n const send = async (message: object, onFlushed?: () => void) => {\n const line = `${JSON.stringify(message)}\\n`;\n if (output instanceof Writable) {\n if (output.destroyed) throw new Error(\"Host output is closed.\");\n await new Promise<void>((resolve, reject) => {\n let settled = false;\n const settle = (error?: Error | null) => {\n if (settled) return;\n settled = true;\n output.off(\"close\", closed);\n // Node can emit error/close before the rejected Promise is observed.\n // Record the failed write now, so the selected result cannot win.\n if (error) outputError(error);\n else onFlushed?.();\n error ? reject(error) : resolve();\n };\n const closed = () =>\n settle(new Error(\"Host output closed during write.\"));\n output.once(\"close\", closed);\n output.write(line, settle);\n });\n } else {\n output.write(line);\n onFlushed?.();\n }\n };\n const fail = (\n code: number,\n message: string,\n canWrite = true,\n data?: object,\n ) => {\n if (completed) return;\n if (terminalCode !== undefined) {\n if (!canWrite) stopOutput(2);\n return;\n }\n terminalCode = 2;\n controller.abort(new Error(message));\n pending?.reject(new Error(message));\n pending = undefined;\n // A peer that stopped reading cannot receive an error. Unblock both the\n // request write and completion instead of waiting for a write callback.\n if (\n !canWrite ||\n (output instanceof Writable &&\n (output.writableLength > 0 || output.writableNeedDrain))\n ) {\n stopOutput(2);\n return;\n }\n void send({\n jsonrpc: \"2.0\",\n id: runId ?? null,\n error: { code, message, ...(data === undefined ? {} : { data }) },\n })\n .catch(() => undefined)\n .then(() => complete(2));\n };\n const disconnected = () => {\n // Stdin EOF does not close stdout. If a terminal response is already being\n // written, its callback decides whether delivery succeeded.\n if (terminalCode === undefined)\n fail(-32000, \"Host disconnected before the run completed.\");\n };\n const inputError = (error: Error) => fail(-32000, error.message);\n const outputError = (error: Error) => fail(-32000, error.message, false);\n const outputClosed = () => outputError(new Error(\"Host output is closed.\"));\n const interrupted = () => {\n if (terminalCode !== undefined) stopOutput(2);\n else fail(-32800, `${operation.label} canceled.`);\n };\n const canceled = () => {\n if (\n !operation.awaitCancellationReceipt ||\n terminalCode !== undefined ||\n (output instanceof Writable &&\n (output.writableLength > 0 || output.writableNeedDrain))\n ) {\n interrupted();\n return;\n }\n if (controller.signal.aborted) return;\n controller.abort(new Error(`${operation.label} canceled.`));\n if (pending)\n void send({\n jsonrpc: \"2.0\",\n method: \"execution.cancel\",\n params: { requestId: pending.id },\n }).catch(outputError);\n };\n input.on(\"error\", inputError);\n input.on(\"close\", disconnected);\n if (output instanceof Writable) output.on(\"close\", outputClosed);\n lines.on(\"close\", disconnected);\n lines.on(\"error\", inputError);\n output.on?.(\"error\", outputError);\n signal?.addEventListener(\"abort\", interrupted, { once: true });\n lines.on(\"line\", (line) => {\n let message: unknown;\n try {\n message = JSON.parse(line);\n } catch {\n fail(-32700, \"Invalid JSON.\");\n return;\n }\n const cancel = cancellation.safeParse(message);\n if (cancel.success) {\n if (runId === undefined || cancel.data.params.id !== runId)\n fail(-32600, \"Cancellation does not match the active run.\");\n else canceled();\n return;\n }\n if (terminalCode !== undefined) return;\n const run = request.safeParse(message);\n if (run.success) {\n if (runId !== undefined) {\n fail(-32600, \"Only one run request is allowed.\");\n return;\n }\n runId = run.data.id;\n void operation\n .run(\n run.data.params,\n (id, params, onProgress, method = operation.requestMethod) => {\n if (terminalCode !== undefined || controller.signal.aborted)\n return Promise.reject(controller.signal.reason);\n if (pending)\n return Promise.reject(new Error(\"Execution is already pending.\"));\n return new Promise((resolve, reject) => {\n pending = {\n id,\n resolve,\n reject,\n onProgress,\n acceptsPendingReview:\n method === \"review.run\" &&\n acceptsPendingReview.safeParse(params).success,\n };\n void send({\n jsonrpc: \"2.0\",\n id,\n method,\n params,\n }).catch(outputError);\n });\n },\n controller.signal,\n (event) => {\n if (terminalCode === undefined)\n void send({\n jsonrpc: \"2.0\",\n method: operation.progressMethod ?? \"scan.progress\",\n params: { id: runId, event },\n }).catch(outputError);\n },\n )\n .then(\n async (result) => {\n if (terminalCode !== undefined) return;\n const code = result.status === \"completed\" ? 0 : 1;\n terminalCode = code;\n try {\n await send({ jsonrpc: \"2.0\", id: runId, result }, () =>\n complete(code),\n );\n } catch {\n complete(2);\n }\n },\n (error: unknown) =>\n fail(\n -32602,\n error instanceof Error\n ? error.message\n : \"Invalid run parameters.\",\n true,\n operation.errorData?.(error),\n ),\n );\n return;\n }\n const event = progress.safeParse(message);\n if (\n event.success &&\n operation.awaitCancellationReceipt &&\n pending &&\n event.data.params.requestId === pending.id\n ) {\n // Optional progress must never interrupt execution, including bad events\n // or host observer exceptions. Correlation still rejects stale messages.\n try {\n pending.onProgress?.(event.data.params.event);\n } catch {}\n return;\n }\n const reply = response.safeParse(message);\n if (\n !reply.success ||\n !pending ||\n reply.data.id !== pending.id ||\n (\"reviewPending\" in reply.data && !pending.acceptsPendingReview)\n ) {\n fail(\n -32600,\n `Malformed, unexpected, or mismatched ${operation.requestMethod === \"review.run\" ? \"review\" : \"execution\"} response.`,\n );\n return;\n }\n const execution = pending;\n pending = undefined;\n if (\"error\" in reply.data)\n execution.reject(new Error(reply.data.error.message));\n else if (\"reviewPending\" in reply.data)\n execution.resolve(new PendingReviewSubmission(reply.data.result));\n else execution.resolve(reply.data.result);\n });\n if (signal?.aborted) interrupted();\n if (input.readableEnded || input.destroyed) disconnected();\n try {\n return await completion;\n } finally {\n lines.removeAllListeners(\"line\");\n lines.removeListener(\"close\", disconnected);\n lines.removeListener(\"error\", inputError);\n lines.close();\n input.pause();\n input.removeListener(\"error\", inputError);\n input.removeListener(\"close\", disconnected);\n if (output instanceof Writable)\n output.removeListener(\"close\", outputClosed);\n output.off?.(\"error\", outputError);\n signal?.removeEventListener(\"abort\", interrupted);\n }\n}\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -82,6 +82,7 @@ export { validateRecords } from "./validation-records.js";
|
|
|
82
82
|
export type { ValidateRecordsInput, ValidateRecordsOptions, ValidationReviewRequest, } from "./validation-records.js";
|
|
83
83
|
export { prepareLocalExternalImport } from "./external-findings-import.js";
|
|
84
84
|
export { normalizeOpenGrepFindings, readOpenGrepFindings, type OpenGrepImportOptions, } from "./opengrep-findings.js";
|
|
85
|
+
export { normalizeInspectorFindings, readInspectorFindings, } from "./inspector-findings.js";
|
|
85
86
|
export { normalizeSnykFindingsExport, normalizeSnykJson, normalizeSnykSarif, readSnykFindings, } from "./snyk-findings.js";
|
|
86
87
|
export { normalizeSemgrepFindings, normalizeSemgrepSarif, readSemgrepFindings, type SemgrepImportOptions, } from "./semgrep-findings.js";
|
|
87
88
|
export { normalizeEndorFindings, normalizeEndorSarif, readEndorFindings, } from "./endor-findings.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,YAAY,EACV,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AACzD,OAAO,EACL,oBAAoB,EACpB,4BAA4B,EAC5B,iCAAiC,GAClC,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACV,sBAAsB,EACtB,wBAAwB,EACxB,uBAAuB,EACvB,mBAAmB,EACnB,2BAA2B,EAC3B,0BAA0B,EAC1B,yBAAyB,GAC1B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,4BAA4B,EAAE,MAAM,kCAAkC,CAAC;AAChF,YAAY,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC1E,OAAO,EACL,aAAa,EACb,qBAAqB,EACrB,0BA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AAmB,EACnB,kBAAkB,GACnB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,UAAU,EACV,mBAAmB,EACnB,eAAe,EACf,kBAAkB,EAClB,YAAY,GACb,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,gBAAgB,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC3E,YAAY,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE/D,OAAO,EACL,uBAAuB,EACvB,kCAAkC,GACnC,MAAM,gCAAgC,CAAC;AACxC,YAAY,EACV,4BAA4B,EAC5B,8BAA8B,EAC9B,6BAA6B,EAC7B,2BAA2B,EAC3B,mCAAmC,GACpC,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,YAAY,EACV,oBAAoB,EACpB,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,EACL,yBAAyB,EACzB,oBAAoB,EACpB,KAAK,qBAAqB,GAC3B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,0BAA0B,EAC1B,qBAAqB,GACtB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,2BAA2B,EAC3B,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,wBAAwB,EACxB,qBAAqB,EACrB,mBAAmB,EACnB,KAAK,oBAAoB,GAC1B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,qBAAqB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -34,6 +34,7 @@ export { classifySeverityRecords, classifySeverityRecordsInputSchema, } from "./
|
|
|
34
34
|
export { validateRecords } from "./validation-records.js";
|
|
35
35
|
export { prepareLocalExternalImport } from "./external-findings-import.js";
|
|
36
36
|
export { normalizeOpenGrepFindings, readOpenGrepFindings, } from "./opengrep-findings.js";
|
|
37
|
+
export { normalizeInspectorFindings, readInspectorFindings, } from "./inspector-findings.js";
|
|
37
38
|
export { normalizeSnykFindingsExport, normalizeSnykJson, normalizeSnykSarif, readSnykFindings, } from "./snyk-findings.js";
|
|
38
39
|
export { normalizeSemgrepFindings, normalizeSemgrepSarif, readSemgrepFindings, } from "./semgrep-findings.js";
|
|
39
40
|
export { normalizeEndorFindings, normalizeEndorSarif, readEndorFindings, } from "./endor-findings.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAKtD,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AACzD,OAAO,EACL,oBAAoB,EACpB,4BAA4B,EAC5B,iCAAiC,GAClC,MAAM,yBAAyB,CAAC;AAUjC,OAAO,EAAE,4BAA4B,EAAE,MAAM,kCAAkC,CAAC;AAEhF,OAAO,EACL,aAAa,EACb,qBAAqB,EACrB,0BAA0B,GAC3B,MAAM,kBAAkB,CAAC;AAY1B,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAU9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAe3E,OAAO,EACL,oBAAoB,EACpB,6BAA6B,GAC9B,MAAM,6BAA6B,CAAC;AAKrC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAQxD,OAAO,EAAE,sBAAsB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;A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AE,8BAA8B,EAAE,MAAM,aAAa,CAAC;AAY7D,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAMzC,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,0BAA0B,EAC1B,cAAc,EACd,WAAW,EACX,gBAAgB,EAChB,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,cAAc,CAAC;AAOtB,OAAO,EACL,UAAU,EACV,mBAAmB,EACnB,eAAe,EACf,kBAAkB,EAClB,YAAY,GACb,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,sBAAsB,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE/D,OAAO,EACL,uBAAuB,EACvB,kCAAkC,GACnC,MAAM,gCAAgC,CAAC;AAQxC,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAO1D,OAAO,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,EACL,yBAAyB,EACzB,oBAAoB,GAErB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,2BAA2B,EAC3B,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,wBAAwB,EACxB,qBAAqB,EACrB,mBAAmB,GAEpB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,qBAAqB,CAAC","sourcesContent":["export { exportArtifact } from \"./artifact-export.js\";\nexport type {\n ExportArtifactOptions,\n ArtifactExportResult,\n} from \"./artifact-export.js\";\nexport { CodexSecurity, createSecurity } from \"./api.js\";\nexport {\n runHostedRemediation,\n HostedRemediationInputSchema,\n HostedRemediationPreparationError,\n} from \"./hosted-remediation.js\";\nexport type {\n HostedRemediationInput,\n HostedRemediationOptions,\n HostedRemediationResult,\n RemediationExecutor,\n RemediationExecutionRequest,\n RemediationExecutionResult,\n RemediationExecutionEvent,\n} from \"./hosted-remediation.js\";\nexport { runHostedRemediationProtocol } from \"./hosted-remediation-protocol.js\";\nexport type { FindingPatch, FindingVerification } from \"./remediation.js\";\nexport {\n runHostedScan,\n HostedScanInputSchema,\n HostedScanPreparationError,\n} from \"./hosted-scan.js\";\nexport type {\n HostedScanInput,\n HostedScanOptions,\n HostedScanResult,\n} from \"./hosted-scan.js\";\nexport type {\n ScanExecutor,\n ScanExecutionRequest,\n ScanExecutionResult,\n ScanExecutionEvent,\n} from \"./scan-executor.js\";\nexport { loadProjectConfig, resolveProjectConfig } from \"./project-config.js\";\nexport type {\n ResolvedProjectConfig,\n ProjectConfigProvenance,\n} from \"./project-config.js\";\nexport type {\n ProjectConfigInput,\n ProjectScope,\n} from \"./project-config-schema.js\";\nexport type { ScanSettings } from \"./scan-settings.js\";\nexport { classifySeverity } from \"./classify-severity.js\";\nexport { suggestOwners, suggestOwnersFromScan } from \"./suggest-owners.js\";\nexport type {\n OwnerFinding,\n CodeownerIdentity,\n OwnerIdentity,\n OwnerSuggestion,\n OwnerSuggestions,\n SuggestOwnersOptions,\n} from \"./suggest-owners.js\";\nexport type {\n ClassifySeverityOptions,\n SeverityClassificationFinding,\n SeverityClassification,\n SeverityAssessment,\n} from \"./classify-severity.js\";\nexport {\n classifyScanSeverity,\n classifyScanDirectorySeverity,\n} from \"./classify-scan-severity.js\";\nexport type {\n ClassifyScanSeverityOptions,\n ScanSeverityClassification,\n} from \"./classify-scan-severity.js\";\nexport { runComponentScans } from \"./component-scan.js\";\nexport type {\n ComponentDeduplicationSummary,\n ComponentReceipt,\n ComponentScanOptions,\n ComponentScanEvent,\n ComponentScanResult,\n} from \"./component-scan.js\";\nexport { normalizeComponentPlan, planComponents } from \"./component-plan.js\";\nexport type {\n ComponentPlan,\n ComponentPlanningOptions,\n} from \"./component-plan.js\";\nexport { estimateScanCost } from \"./cost.js\";\nexport type {\n ScanAccountRateLimit,\n ScanAccountRateLimitWindow,\n ScanCost,\n ScanSessionEvent,\n ScanUsageObservation,\n ScanWorkerEvent,\n} from \"./cost.js\";\nexport type { ScanTokenUsage } from \"./cost-model.js\";\nexport type { DeepScanProgress } from \"./scan-progress.js\";\nexport type { CustomValidationResult } from \"./custom-validation.js\";\nexport type { ScanActivity, ScanActivityStatus } from \"./scan-activity.js\";\nexport { matchScanFindings } from \"./scan-comparison.js\";\nexport type {\n ScanComparisonInput,\n ScanComparisonOptions,\n ScanComparisonProgress,\n ScanComparisonResult,\n} from \"./scan-comparison.js\";\nexport type {\n CodexSecurityMetadata,\n DeepScanOptions,\n PatchOptions,\n PatchResult,\n ScanAuthMode,\n ScanAuthentication,\n ScanBudget,\n ScanOptions,\n ScanPreflight,\n ScanReconnectDetails,\n ScanTrustedAccessStatus,\n ScanWarningDetails,\n ValidationOptions,\n ValidationResult,\n} from \"./api.js\";\nexport type {\n ScanPhase,\n ScanProgress,\n ScanWorkerPhase,\n ScanWorkerStatus,\n} from \"./worker-progress.js\";\nexport { CodexLoginHandle } from \"./auth.js\";\nexport type { AccountStatus, LoginResult } from \"./auth.js\";\n\nexport {\n AuthenticationRequiredError,\n CodexSecurityError,\n ConfigurationError,\n ContractValidationError,\n DeduplicationReviewError,\n IncompleteScanError,\n InvalidTargetError,\n LocalPluginBootstrapError,\n OutputDirectoryError,\n OutputDirectoryNotEmptyError,\n OutputInsideProtectedRootError,\n PluginBootstrapError,\n PluginPythonUnavailableError,\n SandboxUnavailableError,\n ScanCostLimitExceededError,\n ScanInterruptedError,\n} from \"./errors.js\";\nexport type {\n DeduplicationReviewFailureCategory,\n DeduplicationReviewFailureMetadata,\n DeduplicationReviewStage,\n ProtectedScanPathKind,\n} from \"./errors.js\";\nexport {\n DEFAULT_CODEX_CONFIG,\n mergedCodexConfig,\n writeCodexConfig,\n} from \"./config.js\";\nexport type { CodexSecurityConfig, JsonObject, JsonValue } from \"./config.js\";\nexport { loadContract, requireScanFile } from \"./contract.js\";\nexport type { LoadedContract, ScanExpectation } from \"./contract.js\";\nexport type * from \"./models.js\";\nexport {\n resolveSecurityPolicyTarget,\n securityPolicyDiff,\n} from \"./security-policy.js\";\nexport type {\n SecurityPolicyDraft,\n SecurityPolicyOptions,\n SecurityPolicyPreflight,\n SecurityPolicyStage,\n SecurityPolicyTarget,\n} from \"./security-policy.js\";\nexport { checkScanPublication, publishScan } from \"./publish.js\";\nexport { publishScanToCustom } from \"./custom-publish.js\";\nexport type {\n PublishScanToCustomOptions,\n CustomPublicationResult,\n} from \"./custom-publish.js\";\nexport { deduplicateRecords } from \"./deduplication/records.js\";\nexport type {\n DeduplicateRecordsInput,\n DeduplicateRecordsOptions,\n DeduplicateRecordsResult,\n} from \"./deduplication/records.js\";\nexport type {\n DeduplicationReviewRequest,\n DeduplicationReviewAttribution,\n DeduplicationReviewRunner,\n} from \"./deduplication/review.js\";\nexport {\n deduplicateScan,\n deduplicateScanDirectory,\n} from \"./deduplication/scan.js\";\nexport type {\n DeduplicateScanDirectoryOptions,\n DeduplicateScanOptions,\n DeduplicateScanResult,\n} from \"./deduplication/scan.js\";\nexport type { DeduplicationRefusal } from \"./deduplication/deduplication.js\";\nexport type { FindingEmbeddingBinding } from \"./deduplication/local.js\";\nexport type {\n DeduplicationDiagnostic,\n DeduplicationDiagnosticObserver,\n} from \"./deduplication/diagnostics.js\";\nexport type { FindingEmbedder } from \"./server/embeddings.js\";\nexport {\n ExternalPublicationError,\n prepareExternalPublication,\n prepareNormalizedExternalPublication,\n} from \"./external-findings-publish.js\";\nexport type {\n ExternalPublicationOptions,\n NormalizedExternalPublicationOptions,\n ExternalPublicationDependencies,\n ExternalPublicationPreview,\n ExternalPublicationProgress,\n ExternalPublicationResult,\n PreparedExternalPublication,\n} from \"./external-findings-publish.js\";\nexport {\n prepareNormalizedLocalImport,\n listLocalExternalFindings,\n} from \"./external-findings-local.js\";\nexport type {\n StoredExternalFinding,\n NormalizedLocalImportOptions,\n LocalExternalImportDependencies,\n LocalExternalImportPreview,\n LocalExternalImportResult,\n PreparedLocalExternalImport,\n} from \"./external-findings-local.js\";\nexport type {\n ExternalFinding,\n ExternalFindings,\n ExternalSourceRepository,\n} from \"./external-findings.js\";\nexport type {\n ExternalFindingEvidence,\n FindingImportRequest,\n FindingImportReceipt,\n ImportRepository,\n SourceReport,\n} from \"./external-import-models.js\";\nexport {\n normalizeGitHubCodeScanningAlerts,\n normalizeGitHubAdvisories,\n readGitHubFindings,\n} from \"./github-findings.js\";\nexport { importGitHubAdvisories } from \"./github-advisories.js\";\nexport { normalizeGitHubDependabotAlerts } from \"./github-dependabot-findings.js\";\nexport type {\n GitHubAdvisoryImportOptions,\n ImportedGitHubAdvisory,\n} from \"./github-advisories.js\";\nexport { importGitHubCodeScanningAlerts } from \"./github.js\";\nexport type {\n GitHubCodeScanningImportOptions,\n ImportedGitHubCodeScanningAlert,\n} from \"./github.js\";\nexport type {\n CheckScanPublicationOptions,\n CheckScanPublicationResult,\n PublishScanOptions,\n PublishScanProgress,\n PublishScanResult,\n} from \"./publish.js\";\nexport { ScanResult } from \"./result.js\";\nexport type {\n RepositoryFinding,\n ScanResultOptions,\n TurnResultMetadata,\n} from \"./result.js\";\nexport {\n bootstrapPlugin,\n bundledPluginRoot,\n cleanupSdkDirectory,\n createIsolatedHome,\n createMarketplace,\n extractPluginZip,\n importAmbientAuth,\n MARKETPLACE_NAME,\n pluginExecutionEnvironment,\n pluginMetadata,\n PLUGIN_NAME,\n prepareOutputDir,\n resolveCodexCommand,\n resolvePluginPath,\n resolvePluginPython,\n validateOutputDir,\n} from \"./runtime.js\";\nexport type {\n CodexCommand,\n PluginInstall,\n PluginPythonOptions,\n ProcessEnvironment,\n} from \"./runtime.js\";\nexport {\n DiffTarget,\n normalizeRepository,\n normalizeTarget,\n repositoryRevision,\n validateMode,\n} from \"./targets.js\";\nexport type { NormalizedTarget, ScanMode, ScanTarget } from \"./targets.js\";\nexport type { AbsolutePath } from \"./config-path.js\";\nexport { BUNDLED_PLUGIN_VERSION, VERSION } from \"./version.js\";\n\nexport {\n classifySeverityRecords,\n classifySeverityRecordsInputSchema,\n} from \"./classify-severity-records.js\";\nexport type {\n ClassifySeverityRecordsInput,\n ClassifySeverityRecordsOptions,\n ClassifySeverityRecordsResult,\n CanonicalSeverityAssessment,\n SeverityClassificationReviewRequest,\n} from \"./classify-severity-records.js\";\nexport { validateRecords } from \"./validation-records.js\";\nexport type {\n ValidateRecordsInput,\n ValidateRecordsOptions,\n ValidationReviewRequest,\n} from \"./validation-records.js\";\n\nexport { prepareLocalExternalImport } from \"./external-findings-import.js\";\nexport {\n normalizeOpenGrepFindings,\n readOpenGrepFindings,\n type OpenGrepImportOptions,\n} from \"./opengrep-findings.js\";\nexport {\n normalizeSnykFindingsExport,\n normalizeSnykJson,\n normalizeSnykSarif,\n readSnykFindings,\n} from \"./snyk-findings.js\";\nexport {\n normalizeSemgrepFindings,\n normalizeSemgrepSarif,\n readSemgrepFindings,\n type SemgrepImportOptions,\n} from \"./semgrep-findings.js\";\nexport {\n normalizeEndorFindings,\n normalizeEndorSarif,\n readEndorFindings,\n} from \"./endor-findings.js\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAKtD,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AACzD,OAAO,EACL,oBAAoB,EACpB,4BAA4B,EAC5B,iCAAiC,GAClC,MAAM,yBAAyB,CAAC;AAUjC,OAAO,EAAE,4BAA4B,EAAE,MAAM,kCAAkC,CAAC;AAEhF,OAAO,EACL,aAAa,EACb,qBAAqB,EACrB,0BAA0B,GAC3B,MAAM,kBAAkB,CAAC;AAY1B,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAU9E,OAAO,EAAE,gBAA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qB,EACrB,mBAAmB,GAEpB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,qBAAqB,CAAC","sourcesContent":["export { exportArtifact } from \"./artifact-export.js\";\nexport type {\n ExportArtifactOptions,\n ArtifactExportResult,\n} from \"./artifact-export.js\";\nexport { CodexSecurity, createSecurity } from \"./api.js\";\nexport {\n runHostedRemediation,\n HostedRemediationInputSchema,\n HostedRemediationPreparationError,\n} from \"./hosted-remediation.js\";\nexport type {\n HostedRemediationInput,\n HostedRemediationOptions,\n HostedRemediationResult,\n RemediationExecutor,\n RemediationExecutionRequest,\n RemediationExecutionResult,\n RemediationExecutionEvent,\n} from \"./hosted-remediation.js\";\nexport { runHostedRemediationProtocol } from \"./hosted-remediation-protocol.js\";\nexport type { FindingPatch, FindingVerification } from \"./remediation.js\";\nexport {\n runHostedScan,\n HostedScanInputSchema,\n HostedScanPreparationError,\n} from \"./hosted-scan.js\";\nexport type {\n HostedScanInput,\n HostedScanOptions,\n HostedScanResult,\n} from \"./hosted-scan.js\";\nexport type {\n ScanExecutor,\n ScanExecutionRequest,\n ScanExecutionResult,\n ScanExecutionEvent,\n} from \"./scan-executor.js\";\nexport { loadProjectConfig, resolveProjectConfig } from \"./project-config.js\";\nexport type {\n ResolvedProjectConfig,\n ProjectConfigProvenance,\n} from \"./project-config.js\";\nexport type {\n ProjectConfigInput,\n ProjectScope,\n} from \"./project-config-schema.js\";\nexport type { ScanSettings } from \"./scan-settings.js\";\nexport { classifySeverity } from \"./classify-severity.js\";\nexport { suggestOwners, suggestOwnersFromScan } from \"./suggest-owners.js\";\nexport type {\n OwnerFinding,\n CodeownerIdentity,\n OwnerIdentity,\n OwnerSuggestion,\n OwnerSuggestions,\n SuggestOwnersOptions,\n} from \"./suggest-owners.js\";\nexport type {\n ClassifySeverityOptions,\n SeverityClassificationFinding,\n SeverityClassification,\n SeverityAssessment,\n} from \"./classify-severity.js\";\nexport {\n classifyScanSeverity,\n classifyScanDirectorySeverity,\n} from \"./classify-scan-severity.js\";\nexport type {\n ClassifyScanSeverityOptions,\n ScanSeverityClassification,\n} from \"./classify-scan-severity.js\";\nexport { runComponentScans } from \"./component-scan.js\";\nexport type {\n ComponentDeduplicationSummary,\n ComponentReceipt,\n ComponentScanOptions,\n ComponentScanEvent,\n ComponentScanResult,\n} from \"./component-scan.js\";\nexport { normalizeComponentPlan, planComponents } from \"./component-plan.js\";\nexport type {\n ComponentPlan,\n ComponentPlanningOptions,\n} from \"./component-plan.js\";\nexport { estimateScanCost } from \"./cost.js\";\nexport type {\n ScanAccountRateLimit,\n ScanAccountRateLimitWindow,\n ScanCost,\n ScanSessionEvent,\n ScanUsageObservation,\n ScanWorkerEvent,\n} from \"./cost.js\";\nexport type { ScanTokenUsage } from \"./cost-model.js\";\nexport type { DeepScanProgress } from \"./scan-progress.js\";\nexport type { CustomValidationResult } from \"./custom-validation.js\";\nexport type { ScanActivity, ScanActivityStatus } from \"./scan-activity.js\";\nexport { matchScanFindings } from \"./scan-comparison.js\";\nexport type {\n ScanComparisonInput,\n ScanComparisonOptions,\n ScanComparisonProgress,\n ScanComparisonResult,\n} from \"./scan-comparison.js\";\nexport type {\n CodexSecurityMetadata,\n DeepScanOptions,\n PatchOptions,\n PatchResult,\n ScanAuthMode,\n ScanAuthentication,\n ScanBudget,\n ScanOptions,\n ScanPreflight,\n ScanReconnectDetails,\n ScanTrustedAccessStatus,\n ScanWarningDetails,\n ValidationOptions,\n ValidationResult,\n} from \"./api.js\";\nexport type {\n ScanPhase,\n ScanProgress,\n ScanWorkerPhase,\n ScanWorkerStatus,\n} from \"./worker-progress.js\";\nexport { CodexLoginHandle } from \"./auth.js\";\nexport type { AccountStatus, LoginResult } from \"./auth.js\";\n\nexport {\n AuthenticationRequiredError,\n CodexSecurityError,\n ConfigurationError,\n ContractValidationError,\n DeduplicationReviewError,\n IncompleteScanError,\n InvalidTargetError,\n LocalPluginBootstrapError,\n OutputDirectoryError,\n OutputDirectoryNotEmptyError,\n OutputInsideProtectedRootError,\n PluginBootstrapError,\n PluginPythonUnavailableError,\n SandboxUnavailableError,\n ScanCostLimitExceededError,\n ScanInterruptedError,\n} from \"./errors.js\";\nexport type {\n DeduplicationReviewFailureCategory,\n DeduplicationReviewFailureMetadata,\n DeduplicationReviewStage,\n ProtectedScanPathKind,\n} from \"./errors.js\";\nexport {\n DEFAULT_CODEX_CONFIG,\n mergedCodexConfig,\n writeCodexConfig,\n} from \"./config.js\";\nexport type { CodexSecurityConfig, JsonObject, JsonValue } from \"./config.js\";\nexport { loadContract, requireScanFile } from \"./contract.js\";\nexport type { LoadedContract, ScanExpectation } from \"./contract.js\";\nexport type * from \"./models.js\";\nexport {\n resolveSecurityPolicyTarget,\n securityPolicyDiff,\n} from \"./security-policy.js\";\nexport type {\n SecurityPolicyDraft,\n SecurityPolicyOptions,\n SecurityPolicyPreflight,\n SecurityPolicyStage,\n SecurityPolicyTarget,\n} from \"./security-policy.js\";\nexport { checkScanPublication, publishScan } from \"./publish.js\";\nexport { publishScanToCustom } from \"./custom-publish.js\";\nexport type {\n PublishScanToCustomOptions,\n CustomPublicationResult,\n} from \"./custom-publish.js\";\nexport { deduplicateRecords } from \"./deduplication/records.js\";\nexport type {\n DeduplicateRecordsInput,\n DeduplicateRecordsOptions,\n DeduplicateRecordsResult,\n} from \"./deduplication/records.js\";\nexport type {\n DeduplicationReviewRequest,\n DeduplicationReviewAttribution,\n DeduplicationReviewRunner,\n} from \"./deduplication/review.js\";\nexport {\n deduplicateScan,\n deduplicateScanDirectory,\n} from \"./deduplication/scan.js\";\nexport type {\n DeduplicateScanDirectoryOptions,\n DeduplicateScanOptions,\n DeduplicateScanResult,\n} from \"./deduplication/scan.js\";\nexport type { DeduplicationRefusal } from \"./deduplication/deduplication.js\";\nexport type { FindingEmbeddingBinding } from \"./deduplication/local.js\";\nexport type {\n DeduplicationDiagnostic,\n DeduplicationDiagnosticObserver,\n} from \"./deduplication/diagnostics.js\";\nexport type { FindingEmbedder } from \"./server/embeddings.js\";\nexport {\n ExternalPublicationError,\n prepareExternalPublication,\n prepareNormalizedExternalPublication,\n} from \"./external-findings-publish.js\";\nexport type {\n ExternalPublicationOptions,\n NormalizedExternalPublicationOptions,\n ExternalPublicationDependencies,\n ExternalPublicationPreview,\n ExternalPublicationProgress,\n ExternalPublicationResult,\n PreparedExternalPublication,\n} from \"./external-findings-publish.js\";\nexport {\n prepareNormalizedLocalImport,\n listLocalExternalFindings,\n} from \"./external-findings-local.js\";\nexport type {\n StoredExternalFinding,\n NormalizedLocalImportOptions,\n LocalExternalImportDependencies,\n LocalExternalImportPreview,\n LocalExternalImportResult,\n PreparedLocalExternalImport,\n} from \"./external-findings-local.js\";\nexport type {\n ExternalFinding,\n ExternalFindings,\n ExternalSourceRepository,\n} from \"./external-findings.js\";\nexport type {\n ExternalFindingEvidence,\n FindingImportRequest,\n FindingImportReceipt,\n ImportRepository,\n SourceReport,\n} from \"./external-import-models.js\";\nexport {\n normalizeGitHubCodeScanningAlerts,\n normalizeGitHubAdvisories,\n readGitHubFindings,\n} from \"./github-findings.js\";\nexport { importGitHubAdvisories } from \"./github-advisories.js\";\nexport { normalizeGitHubDependabotAlerts } from \"./github-dependabot-findings.js\";\nexport type {\n GitHubAdvisoryImportOptions,\n ImportedGitHubAdvisory,\n} from \"./github-advisories.js\";\nexport { importGitHubCodeScanningAlerts } from \"./github.js\";\nexport type {\n GitHubCodeScanningImportOptions,\n ImportedGitHubCodeScanningAlert,\n} from \"./github.js\";\nexport type {\n CheckScanPublicationOptions,\n CheckScanPublicationResult,\n PublishScanOptions,\n PublishScanProgress,\n PublishScanResult,\n} from \"./publish.js\";\nexport { ScanResult } from \"./result.js\";\nexport type {\n RepositoryFinding,\n ScanResultOptions,\n TurnResultMetadata,\n} from \"./result.js\";\nexport {\n bootstrapPlugin,\n bundledPluginRoot,\n cleanupSdkDirectory,\n createIsolatedHome,\n createMarketplace,\n extractPluginZip,\n importAmbientAuth,\n MARKETPLACE_NAME,\n pluginExecutionEnvironment,\n pluginMetadata,\n PLUGIN_NAME,\n prepareOutputDir,\n resolveCodexCommand,\n resolvePluginPath,\n resolvePluginPython,\n validateOutputDir,\n} from \"./runtime.js\";\nexport type {\n CodexCommand,\n PluginInstall,\n PluginPythonOptions,\n ProcessEnvironment,\n} from \"./runtime.js\";\nexport {\n DiffTarget,\n normalizeRepository,\n normalizeTarget,\n repositoryRevision,\n validateMode,\n} from \"./targets.js\";\nexport type { NormalizedTarget, ScanMode, ScanTarget } from \"./targets.js\";\nexport type { AbsolutePath } from \"./config-path.js\";\nexport { BUNDLED_PLUGIN_VERSION, VERSION } from \"./version.js\";\n\nexport {\n classifySeverityRecords,\n classifySeverityRecordsInputSchema,\n} from \"./classify-severity-records.js\";\nexport type {\n ClassifySeverityRecordsInput,\n ClassifySeverityRecordsOptions,\n ClassifySeverityRecordsResult,\n CanonicalSeverityAssessment,\n SeverityClassificationReviewRequest,\n} from \"./classify-severity-records.js\";\nexport { validateRecords } from \"./validation-records.js\";\nexport type {\n ValidateRecordsInput,\n ValidateRecordsOptions,\n ValidationReviewRequest,\n} from \"./validation-records.js\";\n\nexport { prepareLocalExternalImport } from \"./external-findings-import.js\";\nexport {\n normalizeOpenGrepFindings,\n readOpenGrepFindings,\n type OpenGrepImportOptions,\n} from \"./opengrep-findings.js\";\nexport {\n normalizeInspectorFindings,\n readInspectorFindings,\n} from \"./inspector-findings.js\";\nexport {\n normalizeSnykFindingsExport,\n normalizeSnykJson,\n normalizeSnykSarif,\n readSnykFindings,\n} from \"./snyk-findings.js\";\nexport {\n normalizeSemgrepFindings,\n normalizeSemgrepSarif,\n readSemgrepFindings,\n type SemgrepImportOptions,\n} from \"./semgrep-findings.js\";\nexport {\n normalizeEndorFindings,\n normalizeEndorSarif,\n readEndorFindings,\n} from \"./endor-findings.js\";\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ExternalFinding, ExternalFindings, ExternalSourceRepository } from "./external-findings.js";
|
|
2
|
+
import { type ExternalImportTarget } from "./external-import-contract.js";
|
|
3
|
+
import type { Provider } from "./external-import-models.js";
|
|
4
|
+
export declare function inspectorReportRepository(provider: Provider, findings: readonly ExternalFinding[], target: ExternalImportTarget, projectMap?: ReadonlyMap<string, string>): (ExternalSourceRepository & {
|
|
5
|
+
findingId: string;
|
|
6
|
+
}) | undefined;
|
|
7
|
+
export declare function normalizeInspectorFindings(input: unknown, sourceRepositoryUrl: string, target?: ExternalImportTarget, projectMap?: ReadonlyMap<string, string>): ExternalFindings;
|
|
8
|
+
export declare function readInspectorFindings(path: string, sourceRepositoryUrl: string, target?: ExternalImportTarget, projectMap?: ReadonlyMap<string, string>): Promise<ExternalFindings>;
|
|
9
|
+
//# sourceMappingURL=inspector-findings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inspector-findings.d.ts","sourceRoot":"","sources":["../src/inspector-findings.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,eAAe,EACf,gBAAgB,EAChB,wBAAwB,EACzB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAIL,KAAK,oBAAoB,EAC1B,MAAM,+BAA+B,CAAC;AAGvC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AA6W5D,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,SAAS,eAAe,EAAE,EACpC,MAAM,EAAE,oBAAoB,EAC5B,UAAU,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,GACvC,CAAC,wBAAwB,GAAG;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC,GAAG,SAAS,CA0DhE;AAsND,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,OAAO,EACd,mBAAmB,EAAE,MAAM,EAC3B,MAAM,GAAE,oBAA8B,EACtC,UAAU,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,GACvC,gBAAgB,CA8ClB;AAED,wBAAsB,qBAAqB,CACzC,IAAI,EAAE,MAAM,EACZ,mBAAmB,EAAE,MAAM,EAC3B,MAAM,GAAE,oBAA8B,EACtC,UAAU,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,GACvC,OAAO,CAAC,gBAAgB,CAAC,CAQ3B"}
|