@usepipr/runtime 0.2.2 → 0.3.1
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 +4 -1
- package/dist/commands-4n3t4t5P.d.mts.map +1 -1
- package/dist/{commands-DpcTKXqz.mjs → commands-BNxl37V6.mjs} +77 -56
- package/dist/commands-BNxl37V6.mjs.map +1 -0
- package/dist/index.mjs +1 -1
- package/dist/internal/testing.d.mts +16 -2
- package/dist/internal/testing.d.mts.map +1 -0
- package/dist/internal/testing.mjs +2 -2
- package/package.json +2 -2
- package/dist/commands-DpcTKXqz.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -4,6 +4,9 @@
|
|
|
4
4
|
execution, Diff Manifest creation, Pi execution, review validation, and
|
|
5
5
|
publication planning.
|
|
6
6
|
|
|
7
|
+
Most users should interact with this package through the `pipr` CLI or the
|
|
8
|
+
GitHub Action. Repository configs should import from `@usepipr/sdk`.
|
|
9
|
+
|
|
7
10
|
## Technical Notes
|
|
8
11
|
|
|
9
12
|
- The package root exports command APIs for init, Action runs, dry runs,
|
|
@@ -25,7 +28,7 @@ publication planning.
|
|
|
25
28
|
| `src/review` | Task execution, agent prompts, validation, comments, and publication plans |
|
|
26
29
|
| `src/hosts` | Code host adapters for GitHub and local runs |
|
|
27
30
|
|
|
28
|
-
##
|
|
31
|
+
## Local Checks
|
|
29
32
|
|
|
30
33
|
```bash
|
|
31
34
|
bun run --cwd packages/runtime test:config-init
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commands-4n3t4t5P.d.mts","names":[],"sources":["../src/config/init.ts","../src/types.ts","../src/config/project.ts","../../sdk/src/types/manifest.ts","../src/review/prior-state.ts","../src/review/comment.ts","../src/review/publication-result.ts","../src/hosts/types.ts","../src/hosts/github/command.ts","../src/hosts/github/publication-client.ts","../src/shared/logging.ts","../src/pi/contract.ts","../src/review/task/task-output.ts","../src/review/task/task-runtime.ts","../src/action/types.ts","../src/action/commands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A;;;KC5KxC,kBAAA;EACV,MAAA;EACA,MAAA;EACA,MAAA;EACA,KAAA;EACA,MAAA,EAAQ,KAAA;IAAQ,IAAA;IAAc,OAAA;EAAA;EAC9B,QAAA,EAAU,KAAK;IAAG,OAAA;IAAiB,IAAA;IAAc,UAAA;EAAA;EACjD,KAAA;EACA,OAAA;AAAA;;;AFTF;AAAA,KGdY,UAAA;;;cCyBC,sBAAA,EAAsB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;KAQvB,gBAAA,GAAmB,CAAA,CAAE,KAAK,QAAQ,sBAAA;;;
|
|
1
|
+
{"version":3,"file":"commands-4n3t4t5P.d.mts","names":[],"sources":["../src/config/init.ts","../src/types.ts","../src/config/project.ts","../../sdk/src/types/manifest.ts","../src/review/prior-state.ts","../src/review/comment.ts","../src/review/publication-result.ts","../src/hosts/types.ts","../src/hosts/github/command.ts","../src/hosts/github/publication-client.ts","../src/shared/logging.ts","../src/pi/contract.ts","../src/review/task/task-output.ts","../src/review/task/task-runtime.ts","../src/action/types.ts","../src/action/commands.ts"],"mappings":";;;KAqBY,gCAAA;EACV,SAAA;EACA,OAAA;EACA,WAAA;AAAA;AAAA,cAGW,6BAAA;AAAA,KAED,mBAAA,WAA8B,6BAA6B;;;cCEjE,oBAAA,EAAoB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;cAyBpB,gBAAA,EAAgB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAehB,qBAAA,EAAqB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAMrB,kBAAA,EAAkB,CAAA,CAAA,SAAA;;;;cAKlB,mBAAA,EAAmB,CAAA,CAAA,SAAA;;;;cAanB,sBAAA,EAAsB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAWtB,+BAAA,EAA+B,CAAA,CAAA,SAAA;;;;;;;;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,yBAAA;EACP,YAAA;EACA,MAAA;AAAA;AAAA,KAuBM,qBAAA,GAAwB,eAAe;;;;iBCrF7B,cAAA,CACpB,OAAA,EAAS,kBAAA,GACR,OAAA,CAAQ,gCAAA;;iBAYW,kBAAA,CACpB,OAAA,EAAS,qBAAA,GACR,OAAA,CAAQ,qBAAA;;iBAUW,iBAAA,CACpB,OAAA,EAAS,qBAAA,GACR,OAAA,CAAQ,oBAAA;;iBAMW,gBAAA,CACpB,OAAA,EAAS,oBAAA,GACR,OAAA,CAAQ,mBAAA;;iBAmBW,qBAAA,CACpB,OAAA,EAAS,yBAAA,GACR,OAAA,CAAQ,wBAAA;Af3EX;AAAA,iBekJsB,gBAAA,CACpB,OAAA,EAAS,oBAAA,GACR,OAAA,CAAQ,mBAAA;AAAA,iBAIW,gCAAA,CACpB,OAAA,EAAS,8BAAA,GACR,OAAA,CAAQ,mBAAA"}
|
|
@@ -1804,8 +1804,8 @@ function isOfficialInitRecipeId(recipe) {
|
|
|
1804
1804
|
//#endregion
|
|
1805
1805
|
//#region src/config/init.ts
|
|
1806
1806
|
const supportedOfficialInitAdapters = ["github"];
|
|
1807
|
-
const defaultWorkflowActionRef = "somus/pipr@v0.
|
|
1808
|
-
const defaultSdkVersion = "0.
|
|
1807
|
+
const defaultWorkflowActionRef = "somus/pipr@v0.3.1";
|
|
1808
|
+
const defaultSdkVersion = "0.3.1";
|
|
1809
1809
|
const defaultTypesBunVersion = "1.3.14";
|
|
1810
1810
|
function resolveOfficialInitAdapters(adapters) {
|
|
1811
1811
|
if (adapters === void 0) return [...supportedOfficialInitAdapters];
|
|
@@ -3242,6 +3242,12 @@ function killProcessGroup(child, signal) {
|
|
|
3242
3242
|
}
|
|
3243
3243
|
}
|
|
3244
3244
|
//#endregion
|
|
3245
|
+
//#region src/shared/redaction.ts
|
|
3246
|
+
const secretLikeTokenPattern = /\b[A-Za-z0-9][A-Za-z0-9_.:/+=-]*(?:secret|token|api[_-]?key|apikey)[A-Za-z0-9_.:/+=-]{8,}\b/gi;
|
|
3247
|
+
function redactPotentialSecrets(value) {
|
|
3248
|
+
return value.replace(secretLikeTokenPattern, "[redacted secret]");
|
|
3249
|
+
}
|
|
3250
|
+
//#endregion
|
|
3245
3251
|
//#region src/shared/logging.ts
|
|
3246
3252
|
const sensitiveEnvNamePattern = /(TOKEN|SECRET|PASSWORD|PASS|KEY|AUTH|CREDENTIAL|COOKIE)/i;
|
|
3247
3253
|
function createRuntimeActionLog(options) {
|
|
@@ -3305,7 +3311,7 @@ function addSecret(secrets, value) {
|
|
|
3305
3311
|
function redact(message, secrets) {
|
|
3306
3312
|
let redacted = message;
|
|
3307
3313
|
for (const secret of secrets) redacted = redacted.split(secret).join("***");
|
|
3308
|
-
return redacted;
|
|
3314
|
+
return redactPotentialSecrets(redacted);
|
|
3309
3315
|
}
|
|
3310
3316
|
function compactFields(fields, secrets) {
|
|
3311
3317
|
const compact = {};
|
|
@@ -3455,6 +3461,7 @@ function outputPrompt(schema) {
|
|
|
3455
3461
|
schema.id === reviewResultSchemaId ? "GitHub applies `suggestedFix` to the selected `startLine` through `endLine`. Select the smallest contiguous line span that the replacement code should replace." : void 0,
|
|
3456
3462
|
schema.id === reviewResultSchemaId ? "If a fix changes only part of a line, select that whole line and put the full replacement line in `suggestedFix`. If a fix changes multiple lines, select exactly those original lines and put the full replacement block in `suggestedFix`." : void 0,
|
|
3457
3463
|
schema.id === reviewResultSchemaId ? "Do not select a larger enclosing block to replace a smaller statement, and do not select one line when the replacement is for a multi-line section. Omit `suggestedFix` if the exact replacement range is uncertain." : void 0,
|
|
3464
|
+
schema.id === reviewResultSchemaId ? "Omit `suggestedFix` for broad rewrites, generated docs/pages, uncertain ranges, or changes better described in prose." : void 0,
|
|
3458
3465
|
"Return exactly one JSON value matching the schema.",
|
|
3459
3466
|
"The first non-whitespace character must be { or [ and the last non-whitespace character must be } or ].",
|
|
3460
3467
|
"Do not include Markdown, code fences, prose, explanations, or leading/trailing text.",
|
|
@@ -3472,7 +3479,8 @@ function reviewPolicyPrompt(schema) {
|
|
|
3472
3479
|
"Use read tools when more context is needed. If evidence is insufficient, omit the finding.",
|
|
3473
3480
|
"Emit one inline finding per issue, anchored to the exact Diff Manifest commentable range.",
|
|
3474
3481
|
"`suggestedFix` must be exact replacement code for the selected range.",
|
|
3475
|
-
"For `suggestedFix`, choose the smallest contiguous `startLine` to `endLine` span that should be replaced. Do not select an enclosing function, block, or single line unless that exact span is the replacement target."
|
|
3482
|
+
"For `suggestedFix`, choose the smallest contiguous `startLine` to `endLine` span that should be replaced. Do not select an enclosing function, block, or single line unless that exact span is the replacement target.",
|
|
3483
|
+
"Omit `suggestedFix` for broad rewrites, generated docs/pages, uncertain ranges, or changes better described in prose."
|
|
3476
3484
|
].join("\n"));
|
|
3477
3485
|
}
|
|
3478
3486
|
function pathScopePrompt(paths) {
|
|
@@ -3861,8 +3869,10 @@ function parseAgentOutput(output, agent) {
|
|
|
3861
3869
|
}
|
|
3862
3870
|
function jsonPayloadCandidates(output) {
|
|
3863
3871
|
const trimmed = output.trim();
|
|
3864
|
-
const match = /^```(?:json)?[ \t]*\r?\n([\s\S]*?)\r?\n```$/i.exec(
|
|
3872
|
+
const match = /^```(?:json)?[ \t]*\r?\n([\s\S]*?)\r?\n```$/i.exec(trimmed);
|
|
3865
3873
|
if (match?.[1]) return [match[1].trim()];
|
|
3874
|
+
const embeddedMatches = [...trimmed.matchAll(/```(?:json)?[ \t]*\r?\n([\s\S]*?)\r?\n```/gi)];
|
|
3875
|
+
if (embeddedMatches.length === 1 && embeddedMatches[0]?.[1]) return [trimmed, embeddedMatches[0][1].trim()];
|
|
3866
3876
|
return [trimmed];
|
|
3867
3877
|
}
|
|
3868
3878
|
function buildRepairPrompt(options) {
|
|
@@ -3880,7 +3890,54 @@ function buildRepairPrompt(options) {
|
|
|
3880
3890
|
}
|
|
3881
3891
|
//#endregion
|
|
3882
3892
|
//#region package.json
|
|
3883
|
-
var version = "0.
|
|
3893
|
+
var version = "0.3.1";
|
|
3894
|
+
//#endregion
|
|
3895
|
+
//#region src/review/inline-publication-policy.ts
|
|
3896
|
+
const maxSuggestedFixSelectedLines = 12;
|
|
3897
|
+
const maxSuggestedFixReplacementLines = 20;
|
|
3898
|
+
function inlinePublicationDecision(options) {
|
|
3899
|
+
if (options.existing.markers.has(options.marker) || hasExistingInlinePublicationLocation(options.existing.locations, options.location)) return "skip";
|
|
3900
|
+
return "post";
|
|
3901
|
+
}
|
|
3902
|
+
function isPublishableSuggestedFixSelection(selection) {
|
|
3903
|
+
const suggestedLines = normalizedSuggestedFixLines(selection.suggestedFix);
|
|
3904
|
+
const selectedLineCount = selection.endLine - selection.startLine + 1;
|
|
3905
|
+
if (selection.side !== "RIGHT" || selection.kind === "deleted" || selectedLineCount > maxSuggestedFixSelectedLines || suggestedLines.length > maxSuggestedFixReplacementLines) return false;
|
|
3906
|
+
const originalLines = selectedPreviewLines(selection, selectedLineCount);
|
|
3907
|
+
return Boolean(originalLines && !hasUnchangedSelectionEdge(originalLines, suggestedLines) && !suggestionIncludesUnselectedContext(selection, selectedLineCount, suggestedLines));
|
|
3908
|
+
}
|
|
3909
|
+
function hasExistingInlinePublicationLocation(existing, location) {
|
|
3910
|
+
return existing.some((comment) => {
|
|
3911
|
+
if (comment.path !== location.path || comment.commitId !== location.commitId || comment.side !== location.side) return false;
|
|
3912
|
+
return comment.startLine <= location.endLine && location.startLine <= comment.endLine;
|
|
3913
|
+
});
|
|
3914
|
+
}
|
|
3915
|
+
function normalizedSuggestedFixLines(value) {
|
|
3916
|
+
const normalized = value.replace(/\r\n/g, "\n").replace(/\r/g, "\n");
|
|
3917
|
+
const withoutFinalNewline = normalized.endsWith("\n") ? normalized.slice(0, -1) : normalized;
|
|
3918
|
+
return withoutFinalNewline.length === 0 ? [] : withoutFinalNewline.split("\n");
|
|
3919
|
+
}
|
|
3920
|
+
function selectedPreviewLines(selection, selectedLineCount) {
|
|
3921
|
+
if (!selection.preview) return;
|
|
3922
|
+
const offset = selection.startLine - selection.rangeStartLine;
|
|
3923
|
+
if (offset < 0) return;
|
|
3924
|
+
const previewLines = selection.preview.replace(/\r\n/g, "\n").replace(/\r/g, "\n").split("\n");
|
|
3925
|
+
if (offset + selectedLineCount > previewLines.length) return;
|
|
3926
|
+
return previewLines.slice(offset, offset + selectedLineCount);
|
|
3927
|
+
}
|
|
3928
|
+
function suggestionIncludesUnselectedContext(selection, selectedLineCount, suggestedLines) {
|
|
3929
|
+
if (!selection.preview || suggestedLines.length <= selectedLineCount) return false;
|
|
3930
|
+
const offset = selection.startLine - selection.rangeStartLine;
|
|
3931
|
+
if (offset < 0) return false;
|
|
3932
|
+
const previewLines = selection.preview.replace(/\r\n/g, "\n").replace(/\r/g, "\n").split("\n");
|
|
3933
|
+
return [offset > 0 ? previewLines[offset - 1] : void 0, previewLines[offset + selectedLineCount]].filter((line) => Boolean(line?.trim())).some((line) => suggestedLines.includes(line));
|
|
3934
|
+
}
|
|
3935
|
+
function hasUnchangedSelectionEdge(originalLines, suggestedLines) {
|
|
3936
|
+
const firstLineUnchanged = originalLines[0] === suggestedLines[0];
|
|
3937
|
+
const lastLineUnchanged = originalLines.at(-1) === suggestedLines.at(-1);
|
|
3938
|
+
if (originalLines.length === suggestedLines.length || originalLines.length === 1) return firstLineUnchanged || lastLineUnchanged;
|
|
3939
|
+
return firstLineUnchanged && lastLineUnchanged;
|
|
3940
|
+
}
|
|
3884
3941
|
//#endregion
|
|
3885
3942
|
//#region src/review/prior-state.ts
|
|
3886
3943
|
const mainCommentMarker = "pipr:main-comment";
|
|
@@ -4208,7 +4265,6 @@ const publicationPlanSchema = z.strictObject({
|
|
|
4208
4265
|
});
|
|
4209
4266
|
const maxInlineFindingBodyCharacters = 700;
|
|
4210
4267
|
const maxInlineFindingBodyLines = 4;
|
|
4211
|
-
const secretLikeTokenPattern = /\b[A-Za-z0-9][A-Za-z0-9_.:/+=-]*(?:secret|token|api[_-]?key|apikey)[A-Za-z0-9_.:/+=-]{8,}\b/gi;
|
|
4212
4268
|
function buildPublicationPlan(options) {
|
|
4213
4269
|
const reviewState = options.reviewState ?? buildPriorReviewState({
|
|
4214
4270
|
findings: options.inlineItems.map((item) => item.finding),
|
|
@@ -4284,11 +4340,15 @@ function conciseInlineFindingBody(value) {
|
|
|
4284
4340
|
}
|
|
4285
4341
|
function findingWithPublishableSuggestedFix(finding, range) {
|
|
4286
4342
|
if (!finding.suggestedFix) return finding;
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
|
|
4291
|
-
|
|
4343
|
+
if (!isPublishableSuggestedFixSelection({
|
|
4344
|
+
side: range.side,
|
|
4345
|
+
kind: range.kind,
|
|
4346
|
+
rangeStartLine: range.startLine,
|
|
4347
|
+
startLine: finding.startLine,
|
|
4348
|
+
endLine: finding.endLine,
|
|
4349
|
+
preview: range.preview,
|
|
4350
|
+
suggestedFix: finding.suggestedFix
|
|
4351
|
+
})) return withoutSuggestedFix(finding);
|
|
4292
4352
|
return redactPotentialSecrets(finding.suggestedFix) === finding.suggestedFix ? finding : withoutSuggestedFix(finding);
|
|
4293
4353
|
}
|
|
4294
4354
|
function withoutSuggestedFix(finding) {
|
|
@@ -4296,32 +4356,6 @@ function withoutSuggestedFix(finding) {
|
|
|
4296
4356
|
delete next.suggestedFix;
|
|
4297
4357
|
return next;
|
|
4298
4358
|
}
|
|
4299
|
-
function splitSuggestedFixLines(value) {
|
|
4300
|
-
const normalized = value.replace(/\r\n/g, "\n").replace(/\r/g, "\n");
|
|
4301
|
-
const withoutFinalNewline = normalized.endsWith("\n") ? normalized.slice(0, -1) : normalized;
|
|
4302
|
-
return withoutFinalNewline.length === 0 ? [] : withoutFinalNewline.split("\n");
|
|
4303
|
-
}
|
|
4304
|
-
function selectedRangePreviewLines(finding, range, selectedLineCount) {
|
|
4305
|
-
if (!range.preview) return;
|
|
4306
|
-
const offset = finding.startLine - range.startLine;
|
|
4307
|
-
if (offset < 0) return;
|
|
4308
|
-
const previewLines = range.preview.replace(/\r\n/g, "\n").replace(/\r/g, "\n").split("\n");
|
|
4309
|
-
if (offset + selectedLineCount > previewLines.length) return;
|
|
4310
|
-
return previewLines.slice(offset, offset + selectedLineCount);
|
|
4311
|
-
}
|
|
4312
|
-
function suggestionIncludesUnselectedContext(finding, range, selectedLineCount, suggestedLines) {
|
|
4313
|
-
if (!range.preview || suggestedLines.length <= selectedLineCount) return false;
|
|
4314
|
-
const offset = finding.startLine - range.startLine;
|
|
4315
|
-
if (offset < 0) return false;
|
|
4316
|
-
const previewLines = range.preview.replace(/\r\n/g, "\n").replace(/\r/g, "\n").split("\n");
|
|
4317
|
-
return [offset > 0 ? previewLines[offset - 1] : void 0, previewLines[offset + selectedLineCount]].filter((line) => Boolean(line?.trim())).some((line) => suggestedLines.includes(line));
|
|
4318
|
-
}
|
|
4319
|
-
function hasUnchangedSelectionEdge(originalLines, suggestedLines) {
|
|
4320
|
-
const firstLineUnchanged = originalLines[0] === suggestedLines[0];
|
|
4321
|
-
const lastLineUnchanged = originalLines.at(-1) === suggestedLines.at(-1);
|
|
4322
|
-
if (originalLines.length === suggestedLines.length || originalLines.length === 1) return firstLineUnchanged || lastLineUnchanged;
|
|
4323
|
-
return firstLineUnchanged && lastLineUnchanged;
|
|
4324
|
-
}
|
|
4325
4359
|
function renderMainComment(options) {
|
|
4326
4360
|
return [
|
|
4327
4361
|
renderMainCommentMarker({
|
|
@@ -4350,9 +4384,6 @@ function renderSuggestedChange(suggestedFix) {
|
|
|
4350
4384
|
function longestBacktickRun(value) {
|
|
4351
4385
|
return Math.max(0, ...[...value.matchAll(/`+/g)].map((match) => match[0].length));
|
|
4352
4386
|
}
|
|
4353
|
-
function redactPotentialSecrets(value) {
|
|
4354
|
-
return value.replace(secretLikeTokenPattern, "[redacted secret]");
|
|
4355
|
-
}
|
|
4356
4387
|
//#endregion
|
|
4357
4388
|
//#region src/review/comment-publishing.ts
|
|
4358
4389
|
function buildCommentPublishingPlan(options) {
|
|
@@ -5836,18 +5867,6 @@ async function loadGitHubPriorMainComment(options) {
|
|
|
5836
5867
|
}), "pipr:main-comment", options.change.change.number, ownerLogin)?.body ?? void 0;
|
|
5837
5868
|
}
|
|
5838
5869
|
//#endregion
|
|
5839
|
-
//#region src/review/inline-publication-policy.ts
|
|
5840
|
-
function inlinePublicationDecision(options) {
|
|
5841
|
-
if (options.existing.markers.has(options.marker) || hasExistingInlinePublicationLocation(options.existing.locations, options.location)) return "skip";
|
|
5842
|
-
return "post";
|
|
5843
|
-
}
|
|
5844
|
-
function hasExistingInlinePublicationLocation(existing, location) {
|
|
5845
|
-
return existing.some((comment) => {
|
|
5846
|
-
if (comment.path !== location.path || comment.commitId !== location.commitId || comment.side !== location.side) return false;
|
|
5847
|
-
return comment.startLine <= location.endLine && location.startLine <= comment.endLine;
|
|
5848
|
-
});
|
|
5849
|
-
}
|
|
5850
|
-
//#endregion
|
|
5851
5870
|
//#region src/hosts/github/inline.ts
|
|
5852
5871
|
const githubReviewCommentLocationSchema = z.strictObject({
|
|
5853
5872
|
path: z.string().min(1),
|
|
@@ -6135,9 +6154,10 @@ async function publishInlineCommentItem(options) {
|
|
|
6135
6154
|
error: error instanceof Error ? error.message : String(error)
|
|
6136
6155
|
};
|
|
6137
6156
|
}
|
|
6157
|
+
const publicationLocation = inlinePublicationLocationFromGitHub(location);
|
|
6138
6158
|
if (inlinePublicationDecision({
|
|
6139
6159
|
marker: options.item.marker,
|
|
6140
|
-
location:
|
|
6160
|
+
location: publicationLocation,
|
|
6141
6161
|
existing: options.existing
|
|
6142
6162
|
}) === "skip") return { status: "skipped" };
|
|
6143
6163
|
try {
|
|
@@ -6148,6 +6168,7 @@ async function publishInlineCommentItem(options) {
|
|
|
6148
6168
|
...location
|
|
6149
6169
|
});
|
|
6150
6170
|
options.existing.markers.add(options.item.marker);
|
|
6171
|
+
options.existing.locations.push(publicationLocation);
|
|
6151
6172
|
return { status: "posted" };
|
|
6152
6173
|
} catch (error) {
|
|
6153
6174
|
return {
|
|
@@ -7353,6 +7374,6 @@ async function runActionCommandWithDependencies(options) {
|
|
|
7353
7374
|
});
|
|
7354
7375
|
}
|
|
7355
7376
|
//#endregion
|
|
7356
|
-
export { runInspectCommand as a, PublicationError as c,
|
|
7377
|
+
export { runInspectCommand as a, PublicationError as c, listOfficialInitRecipes as d, supportedOfficialInitRecipes as f, piThinkingLevels as g, piRequiredCliFlags as h, runInitCommand as i, isPublishableSuggestedFixSelection as l, piReadOnlyToolNames as m, runActionCommandWithDependencies as n, runLocalReviewCommand as o, piBuiltinToolNames as p, runDryRunCommand as r, runValidateCommand as s, runActionCommand as t, supportedOfficialInitAdapters as u };
|
|
7357
7378
|
|
|
7358
|
-
//# sourceMappingURL=commands-
|
|
7379
|
+
//# sourceMappingURL=commands-BNxl37V6.mjs.map
|