@usepipr/runtime 0.4.0 → 0.4.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 CHANGED
@@ -7,7 +7,7 @@ publication planning.
7
7
  Most users should interact with this package through the `pipr` CLI or a code
8
8
  host integration. Repository configs should import from `@usepipr/sdk`.
9
9
 
10
- ## Technical Notes
10
+ ## Technical notes
11
11
 
12
12
  - The package root exports command APIs for init, hosted runs, dry runs,
13
13
  config checks, plan inspection, and local review.
@@ -19,7 +19,7 @@ host integration. Repository configs should import from `@usepipr/sdk`.
19
19
  eval package review scoring.
20
20
  - The build emits ESM and declaration files to `dist`.
21
21
 
22
- ## Source Map
22
+ ## Source map
23
23
 
24
24
  | Path | Responsibility |
25
25
  | --- | --- |
@@ -30,7 +30,7 @@ host integration. Repository configs should import from `@usepipr/sdk`.
30
30
  | `src/review` | Task execution, agent prompts, validation, comments, and publication plans |
31
31
  | `src/hosts` | Code host adapters and local-run integration |
32
32
 
33
- ## Local Checks
33
+ ## Local checks
34
34
 
35
35
  ```bash
36
36
  bun run --cwd packages/runtime test:config-init
@@ -41,7 +41,7 @@ bun run --cwd packages/runtime check
41
41
 
42
42
  ## Docs
43
43
 
44
- - [Runtime Guide](https://pipr.run/docs/guide/runtime)
45
- - [Comments and Findings](https://pipr.run/docs/guide/comments)
44
+ - [Runtime flow](https://pipr.run/docs/concepts/runtime)
45
+ - [Comments and findings](https://pipr.run/docs/concepts/comments)
46
46
  - [Architecture](https://pipr.run/docs/reference/architecture)
47
- - [Trust and Security](https://pipr.run/docs/guide/trust-security)
47
+ - [Trust and security](https://pipr.run/docs/concepts/trust-security)
@@ -1,6 +1,6 @@
1
+ import "@usepipr/sdk/internal";
1
2
  import { z } from "zod";
2
3
  import { CommentableRange, DiffManifest, ReviewFinding, ReviewResult, ReviewSide } from "@usepipr/sdk";
3
- import "@usepipr/sdk/internal";
4
4
  //#region src/config/init.d.ts
5
5
  type InitOfficialMinimalProjectResult = {
6
6
  configDir: string;
@@ -43,6 +43,7 @@ declare const piprConfigSchema: z.ZodObject<{
43
43
  }, z.core.$strict>>;
44
44
  publication: z.ZodObject<{
45
45
  maxInlineComments: z.ZodOptional<z.ZodNumber>;
46
+ maxStoredFindings: z.ZodDefault<z.ZodNumber>;
46
47
  autoResolve: z.ZodObject<{
47
48
  enabled: z.ZodBoolean;
48
49
  model: z.ZodOptional<z.ZodString>;
@@ -93,6 +94,7 @@ declare const runtimeSettingsSchema: z.ZodObject<{
93
94
  }, z.core.$strict>>;
94
95
  publication: z.ZodObject<{
95
96
  maxInlineComments: z.ZodOptional<z.ZodNumber>;
97
+ maxStoredFindings: z.ZodDefault<z.ZodNumber>;
96
98
  autoResolve: z.ZodObject<{
97
99
  enabled: z.ZodBoolean;
98
100
  model: z.ZodOptional<z.ZodString>;
@@ -297,13 +299,15 @@ declare const priorReviewStateSchema: z.ZodObject<{
297
299
  selectedTasks: z.ZodArray<z.ZodString>;
298
300
  findings: z.ZodArray<z.ZodObject<{
299
301
  id: z.ZodString;
302
+ anchorFingerprint: z.ZodOptional<z.ZodString>;
303
+ issueFingerprint: z.ZodOptional<z.ZodString>;
300
304
  status: z.ZodEnum<{
301
305
  open: "open";
302
306
  resolved: "resolved";
303
307
  }>;
304
308
  path: z.ZodString;
305
309
  rangeId: z.ZodString;
306
- side: z.ZodType<ReviewSide, unknown, z.core.$ZodTypeInternals<ReviewSide, unknown>>;
310
+ side: z.ZodType<import("@usepipr/sdk").ReviewSide, unknown, z.core.$ZodTypeInternals<import("@usepipr/sdk").ReviewSide, unknown>>;
307
311
  startLine: z.ZodNumber;
308
312
  endLine: z.ZodNumber;
309
313
  firstSeenHeadSha: z.ZodString;
@@ -431,6 +435,8 @@ declare const publicationPlanSchema: z.ZodObject<{
431
435
  selectedTasks: z.ZodArray<z.ZodString>;
432
436
  findings: z.ZodArray<z.ZodObject<{
433
437
  id: z.ZodString;
438
+ anchorFingerprint: z.ZodOptional<z.ZodString>;
439
+ issueFingerprint: z.ZodOptional<z.ZodString>;
434
440
  status: z.ZodEnum<{
435
441
  open: "open";
436
442
  resolved: "resolved";
@@ -671,6 +677,16 @@ type RuntimeLogRecord = {
671
677
  type RuntimeLogRecordFields = Record<string, string | number | boolean | readonly string[]>;
672
678
  type LogLevel = "info" | "notice" | "warning" | "error" | "debug";
673
679
  //#endregion
680
+ //#region src/shared/secret-redaction.d.ts
681
+ type SecretRedactionResult = {
682
+ value: string;
683
+ detected: boolean;
684
+ };
685
+ type SecretRedactor = {
686
+ addSecret(value: string | undefined): void;
687
+ redact(value: string): SecretRedactionResult;
688
+ };
689
+ //#endregion
674
690
  //#region src/pi/contract.d.ts
675
691
  declare const piThinkingLevels: readonly ["off", "minimal", "low", "medium", "high", "xhigh"];
676
692
  declare const piBuiltinToolNames: readonly ["read", "bash", "edit", "write", "grep", "find", "ls"];
@@ -750,6 +766,7 @@ type HostRunCommandOptions = RuntimeCommandOptions & {
750
766
  type HostRunCommandDependencyOptions = HostRunCommandOptions & {
751
767
  piExecutable?: string;
752
768
  hostAdapter?: CodeHostAdapter;
769
+ secretRedactor?: SecretRedactor;
753
770
  };
754
771
  type LocalReviewTaskLog = {
755
772
  info(message: string): void;
@@ -830,5 +847,5 @@ declare function runLocalReviewCommand(options: LocalReviewCommandOptions): Prom
830
847
  declare function runHostRunCommand(options: HostRunCommandOptions): Promise<HostRunCommandResult>;
831
848
  declare function runHostRunCommandWithDependencies(options: HostRunCommandDependencyOptions): Promise<HostRunCommandResult>;
832
849
  //#endregion
833
- export { PiprConfig as A, CodeHostAdapter as C, ChangeRequestEventContext as D, PublicationResult as E, OfficialInitAdapter as F, supportedOfficialInitAdapters as I, ProviderConfig as M, RepositoryRef as N, ChangeRequestRef as O, RuntimeSettings as P, RuntimeLogSink as S, PublicationError as T, piBuiltinToolNames as _, runInspectCommand as a, piThinkingLevels as b, DryRunCommandOptions as c, HostRunCommandResult as d, InitCommandOptions as f, RuntimeCommandOptions as g, LocalReviewCommandResult as h, runInitCommand as i, PlatformInfo as j, DiffManifest as k, DryRunCommandResult as l, LocalReviewCommandOptions as m, runHostRunCommand as n, runLocalReviewCommand as o, InspectCommandResult as p, runHostRunCommandWithDependencies as r, runValidateCommand as s, runDryRunCommand as t, HostRunCommandOptions as u, piReadOnlyToolNames as v, RepositoryPermission as w, RuntimeLogRecord as x, piRequiredCliFlags as y };
834
- //# sourceMappingURL=commands-YFjB3wx8.d.mts.map
850
+ export { DiffManifest as A, RuntimeLogSink as C, PublicationResult as D, PublicationError as E, RuntimeSettings as F, OfficialInitAdapter as I, supportedOfficialInitAdapters as L, PlatformInfo as M, ProviderConfig as N, ChangeRequestEventContext as O, RepositoryRef as P, RuntimeLogRecord as S, RepositoryPermission as T, piBuiltinToolNames as _, runInspectCommand as a, piThinkingLevels as b, DryRunCommandOptions as c, HostRunCommandResult as d, InitCommandOptions as f, RuntimeCommandOptions as g, LocalReviewCommandResult as h, runInitCommand as i, PiprConfig as j, ChangeRequestRef as k, DryRunCommandResult as l, LocalReviewCommandOptions as m, runHostRunCommand as n, runLocalReviewCommand as o, InspectCommandResult as p, runHostRunCommandWithDependencies as r, runValidateCommand as s, runDryRunCommand as t, HostRunCommandOptions as u, piReadOnlyToolNames as v, CodeHostAdapter as w, SecretRedactor as x, piRequiredCliFlags as y };
851
+ //# sourceMappingURL=commands-DtdTtej_.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commands-DtdTtej_.d.mts","names":[],"sources":["../src/config/init.ts","../src/types.ts","../src/config/project.ts","../src/review/prior-state.ts","../src/review/comment.ts","../src/review/publication-result.ts","../src/hosts/types.ts","../src/shared/logging.ts","../src/shared/secret-redaction.ts","../src/pi/contract.ts","../src/review/task/task-output.ts","../src/review/task/task-runtime.ts","../src/host-run/types.ts","../src/host-run/commands.ts"],"mappings":";;;;KAuBY;EACV;EACA;EACA;;cAGW;KAOD,8BAA8B;;;cCJpC,sBAAoB,EAAA;;;;;;;;;;;;;;cAyBpB,kBAAgB,EA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