@pourkit/cli 0.0.0-next-20260617195445 → 0.0.0-next-20260617223106
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.sandcastle/Dockerfile +61 -0
- package/dist/cli.js +70 -25
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
FROM node:22-trixie
|
|
2
|
+
|
|
3
|
+
# Install system dependencies
|
|
4
|
+
RUN apt-get update && apt-get install -y \
|
|
5
|
+
git \
|
|
6
|
+
curl \
|
|
7
|
+
jq \
|
|
8
|
+
ca-certificates \
|
|
9
|
+
python3 \
|
|
10
|
+
python3-venv \
|
|
11
|
+
build-essential \
|
|
12
|
+
ripgrep \
|
|
13
|
+
&& rm -rf /var/lib/apt/lists/*
|
|
14
|
+
|
|
15
|
+
# Install GitHub CLI
|
|
16
|
+
RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg \
|
|
17
|
+
| dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
|
|
18
|
+
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" \
|
|
19
|
+
| tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
|
|
20
|
+
&& apt-get update && apt-get install -y gh \
|
|
21
|
+
&& rm -rf /var/lib/apt/lists/*
|
|
22
|
+
|
|
23
|
+
# Rename the base image's "node" user (UID 1000) to "agent".
|
|
24
|
+
# This keeps UID 1000 so that --userns=keep-id (Podman) and
|
|
25
|
+
# --user 1000:1000 (Docker) map to the correct home directory owner.
|
|
26
|
+
RUN usermod -d /home/agent -m -l agent node
|
|
27
|
+
|
|
28
|
+
# Install OpenCode CLI (run as root before USER agent)
|
|
29
|
+
RUN npm install -g opencode-ai@latest
|
|
30
|
+
|
|
31
|
+
# Install Pourkit CLI for agent-executed validation/verification
|
|
32
|
+
RUN npm install -g @pourkit/cli@next
|
|
33
|
+
|
|
34
|
+
# Install opensrc so agents can inspect dependency source code
|
|
35
|
+
RUN npm install -g opensrc
|
|
36
|
+
|
|
37
|
+
# Pre-create writable XDG directories so bind mounts do not leave
|
|
38
|
+
# parent paths root-owned inside the container.
|
|
39
|
+
RUN mkdir -p \
|
|
40
|
+
/home/agent/.local/bin \
|
|
41
|
+
/home/agent/.local/share \
|
|
42
|
+
/home/agent/.local/state \
|
|
43
|
+
/home/agent/.config \
|
|
44
|
+
/home/agent/.cache \
|
|
45
|
+
&& chown -R agent:node /home/agent/.local /home/agent/.config /home/agent/.cache
|
|
46
|
+
|
|
47
|
+
USER agent
|
|
48
|
+
|
|
49
|
+
WORKDIR /home/agent
|
|
50
|
+
|
|
51
|
+
ENV PATH="/home/agent/.local/bin:${PATH}"
|
|
52
|
+
|
|
53
|
+
# Install RTK
|
|
54
|
+
RUN curl -fsSL https://raw.githubusercontent.com/rtk-ai/rtk/refs/heads/master/install.sh | sh
|
|
55
|
+
RUN rtk init -g --opencode
|
|
56
|
+
|
|
57
|
+
# Install Vera CLI
|
|
58
|
+
# In worktree sandbox mode, Sandcastle bind-mounts the git worktree at ${SANDBOX_REPO_DIR}
|
|
59
|
+
# and overrides the working directory to ${SANDBOX_REPO_DIR} at container start.
|
|
60
|
+
# Structure your Dockerfile so that ${SANDBOX_REPO_DIR} can serve as the project root.
|
|
61
|
+
ENTRYPOINT ["sleep", "infinity"]
|
package/dist/cli.js
CHANGED
|
@@ -12089,7 +12089,15 @@ function getWorkflowPackCatalog() {
|
|
|
12089
12089
|
function buildOpenCodeSkillProjectionContent(managedSourcePath, sourceContent) {
|
|
12090
12090
|
const generatedNotice = `Generated from ${managedSourcePath}. Do not edit directly.`;
|
|
12091
12091
|
if (managedSourcePath.endsWith(".md") || managedSourcePath.endsWith(".mdx")) {
|
|
12092
|
-
|
|
12092
|
+
const comment = `<!-- ${generatedNotice} -->`;
|
|
12093
|
+
const frontmatter = sourceContent.match(
|
|
12094
|
+
/^---\r?\n[\s\S]*?\r?\n---[ \t]*(?:\r?\n|$)/
|
|
12095
|
+
);
|
|
12096
|
+
if (frontmatter) {
|
|
12097
|
+
return `${frontmatter[0]}${comment}
|
|
12098
|
+
${sourceContent.slice(frontmatter[0].length)}`;
|
|
12099
|
+
}
|
|
12100
|
+
return `${comment}
|
|
12093
12101
|
${sourceContent}`;
|
|
12094
12102
|
}
|
|
12095
12103
|
if (managedSourcePath.endsWith(".sh") || managedSourcePath.endsWith(".bash") || managedSourcePath.endsWith(".zsh") || managedSourcePath.endsWith(".py") || managedSourcePath.endsWith(".rb") || managedSourcePath.endsWith(".yml") || managedSourcePath.endsWith(".yaml") || managedSourcePath.endsWith(".toml")) {
|
|
@@ -12132,8 +12140,13 @@ function resolvePackagedSourceRoot() {
|
|
|
12132
12140
|
return path5.resolve(__dirname2, "..");
|
|
12133
12141
|
}
|
|
12134
12142
|
function resolveSourceAssetPath(sourceRoot, ...segments) {
|
|
12135
|
-
const
|
|
12136
|
-
|
|
12143
|
+
const candidatePaths = [
|
|
12144
|
+
path5.join(sourceRoot, ...segments),
|
|
12145
|
+
path5.join(sourceRoot, "dist", ...segments)
|
|
12146
|
+
];
|
|
12147
|
+
for (const candidatePath of candidatePaths) {
|
|
12148
|
+
if (existsSync18(candidatePath)) return candidatePath;
|
|
12149
|
+
}
|
|
12137
12150
|
return path5.join(sourceRoot, "pourkit", ...segments);
|
|
12138
12151
|
}
|
|
12139
12152
|
var BASELINE_SKILL_NAMES = [
|
|
@@ -12516,14 +12529,31 @@ Use \`fd\` for file discovery, \`rg\` for text search, and direct file reads for
|
|
|
12516
12529
|
|
|
12517
12530
|
Follow the project's domain docs and conventions documented in \`.pourkit/managed/docs/agents/*\`.
|
|
12518
12531
|
|
|
12519
|
-
|
|
12532
|
+
## Pourkit Workflow Routes
|
|
12533
|
+
|
|
12534
|
+
### Issue Tracker
|
|
12535
|
+
|
|
12536
|
+
When using Pourkit issue workflows, see \`.pourkit/managed/docs/agents/issue-tracker.md\`.
|
|
12537
|
+
|
|
12538
|
+
### Triage Labels
|
|
12539
|
+
|
|
12540
|
+
Pourkit workflows use the default triage labels described in \`.pourkit/managed/docs/agents/triage-labels.md\`.
|
|
12541
|
+
|
|
12542
|
+
### Domain Docs
|
|
12543
|
+
|
|
12544
|
+
Follow the repository domain-documentation layout in \`.pourkit/managed/docs/agents/domain.md\`.
|
|
12545
|
+
|
|
12546
|
+
### Issue Naming
|
|
12547
|
+
|
|
12548
|
+
PRDs and child issues must follow the naming convention in \`.pourkit/managed/docs/agents/naming.md\`.
|
|
12549
|
+
|
|
12550
|
+
### Git Workflow
|
|
12520
12551
|
|
|
12521
|
-
|
|
12522
|
-
|
|
12523
|
-
|
|
12524
|
-
|
|
12525
|
-
- \`.pourkit/managed/docs/agents/commit-style.md
|
|
12526
|
-
- \`.pourkit/managed/docs/agents/domain.md\`
|
|
12552
|
+
Branch naming and PR creation guidance lives in \`.pourkit/managed/docs/agents/git-workflow.md\`.
|
|
12553
|
+
|
|
12554
|
+
### Commit Style
|
|
12555
|
+
|
|
12556
|
+
Agents must write readable conventional commits with bullet-list bodies for non-trivial changes. See \`.pourkit/managed/docs/agents/commit-style.md\`.
|
|
12527
12557
|
|
|
12528
12558
|
### Project-owned context
|
|
12529
12559
|
|
|
@@ -13306,7 +13336,7 @@ Do not edit this file.
|
|
|
13306
13336
|
});
|
|
13307
13337
|
}
|
|
13308
13338
|
}
|
|
13309
|
-
const srcSandboxDockerfile =
|
|
13339
|
+
const srcSandboxDockerfile = resolveSourceAssetPath(
|
|
13310
13340
|
sourceRoot,
|
|
13311
13341
|
".sandcastle",
|
|
13312
13342
|
"Dockerfile"
|
|
@@ -14279,11 +14309,11 @@ async function runInitCommand(options) {
|
|
|
14279
14309
|
};
|
|
14280
14310
|
promptLabels = promptResult.labels;
|
|
14281
14311
|
}
|
|
14282
|
-
const conflictPolicy =
|
|
14312
|
+
const conflictPolicy = {
|
|
14283
14313
|
docsMigration: options.docsMigration ?? "copy",
|
|
14284
14314
|
agentFile: options.agentFile ?? "both",
|
|
14285
14315
|
yes: options.yes ?? false
|
|
14286
|
-
}
|
|
14316
|
+
};
|
|
14287
14317
|
const planLabels = isInteractive ? promptLabels ?? DEFAULT_RUNNER_LABELS : DEFAULT_RUNNER_LABELS;
|
|
14288
14318
|
const plan = await planInit({
|
|
14289
14319
|
targetRoot,
|
|
@@ -15312,16 +15342,31 @@ function generateManagedBlockContent() {
|
|
|
15312
15342
|
return [
|
|
15313
15343
|
"This repository uses Pourkit.",
|
|
15314
15344
|
"",
|
|
15315
|
-
"##
|
|
15345
|
+
"## Pourkit Workflow Routes",
|
|
15346
|
+
"",
|
|
15347
|
+
"### Issue Tracker",
|
|
15348
|
+
"",
|
|
15349
|
+
"When using Pourkit issue workflows, see `.pourkit/managed/docs/agents/issue-tracker.md`.",
|
|
15350
|
+
"",
|
|
15351
|
+
"### Triage Labels",
|
|
15352
|
+
"",
|
|
15353
|
+
"Pourkit workflows use the default triage labels described in `.pourkit/managed/docs/agents/triage-labels.md`.",
|
|
15354
|
+
"",
|
|
15355
|
+
"### Domain Docs",
|
|
15356
|
+
"",
|
|
15357
|
+
"Follow the repository domain-documentation layout in `.pourkit/managed/docs/agents/domain.md`.",
|
|
15358
|
+
"",
|
|
15359
|
+
"### Issue Naming",
|
|
15360
|
+
"",
|
|
15361
|
+
"PRDs and child issues must follow the naming convention in `.pourkit/managed/docs/agents/naming.md`.",
|
|
15362
|
+
"",
|
|
15363
|
+
"### Git Workflow",
|
|
15364
|
+
"",
|
|
15365
|
+
"Branch naming and PR creation guidance lives in `.pourkit/managed/docs/agents/git-workflow.md`.",
|
|
15316
15366
|
"",
|
|
15317
|
-
"
|
|
15367
|
+
"### Commit Style",
|
|
15318
15368
|
"",
|
|
15319
|
-
"- `.pourkit/managed/docs/agents/
|
|
15320
|
-
"- `.pourkit/managed/docs/agents/triage-labels.md`",
|
|
15321
|
-
"- `.pourkit/managed/docs/agents/naming.md`",
|
|
15322
|
-
"- `.pourkit/managed/docs/agents/git-workflow.md`",
|
|
15323
|
-
"- `.pourkit/managed/docs/agents/commit-style.md`",
|
|
15324
|
-
"- `.pourkit/managed/docs/agents/domain.md`",
|
|
15369
|
+
"Agents must write readable conventional commits with bullet-list bodies for non-trivial changes. See `.pourkit/managed/docs/agents/commit-style.md`.",
|
|
15325
15370
|
"",
|
|
15326
15371
|
"### Project-owned context",
|
|
15327
15372
|
"",
|
|
@@ -17386,11 +17431,11 @@ function createCliProgram(version) {
|
|
|
17386
17431
|
return program;
|
|
17387
17432
|
}
|
|
17388
17433
|
async function resolveCliVersion() {
|
|
17389
|
-
if (isPackageVersion("0.0.0-next-
|
|
17390
|
-
return "0.0.0-next-
|
|
17434
|
+
if (isPackageVersion("0.0.0-next-20260617223106")) {
|
|
17435
|
+
return "0.0.0-next-20260617223106";
|
|
17391
17436
|
}
|
|
17392
|
-
if (isReleaseVersion("0.0.0-next-
|
|
17393
|
-
return "0.0.0-next-
|
|
17437
|
+
if (isReleaseVersion("0.0.0-next-20260617223106")) {
|
|
17438
|
+
return "0.0.0-next-20260617223106";
|
|
17394
17439
|
}
|
|
17395
17440
|
try {
|
|
17396
17441
|
const root = repoRoot();
|