@codions/portta 0.0.0-develop.171.sha-d749180 → 0.0.0-develop.172.sha-10ce987
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/assets/skills/portta-workflows/SKILL.md +1 -1
- package/dist/assets/workflows/bake-off.workflow.js +6 -5
- package/dist/assets/workflows/code-review.workflow.js +4 -4
- package/dist/assets/workflows/deep-research.workflow.js +4 -3
- package/dist/assets/workflows/multi-provider-review.workflow.js +5 -4
- package/dist/assets/workflows/provider-debate.workflow.js +7 -6
- package/dist/assets/workflows/second-opinion.workflow.js +4 -3
- package/dist/cli.js +794 -847
- package/dist/documentation.json +1 -1
- package/dist/host.js +53 -93
- package/dist/runtime/.env.example +8 -17
- package/dist/runtime/VERSION +1 -1
- package/dist/runtime/docker/compose/features/panel-host.yaml +4 -5
- package/dist/runtime/templates/README.md +9 -6
- package/dist/runtime/templates/overlays/07-worktree.env +1 -1
- package/dist/runtime/templates/project/PORTTA.md +3 -3
- package/dist/supervisor.js +0 -1
- package/package.json +2 -5
- package/dist/runtime/config/traefik/dynamic/auth.example.yaml.disabled +0 -24
- package/dist/runtime/docker/images/README.md +0 -12
- package/dist/runtime/docker/images/sandbox/Dockerfile +0 -79
- package/dist/runtime/docker/images/sandbox/README.md +0 -109
- package/dist/runtime/docker/images/sandbox/VERSION +0 -1
- package/dist/runtime/docker/images/sandbox/agents/claude-code.sh +0 -18
- package/dist/runtime/docker/images/sandbox/agents/codex.sh +0 -4
- package/dist/runtime/docker/images/sandbox/agents/opencode.sh +0 -4
- package/dist/runtime/docker/images/sandbox/agents/pi.sh +0 -4
- package/dist/runtime/docker/images/sandbox/scripts/entrypoint.sh +0 -8
- package/dist/runtime/docker/images/sandbox/scripts/generate-manifest.mjs +0 -81
- package/dist/runtime/docker/images/sandbox/scripts/install-tools.sh +0 -46
- package/dist/runtime/docker/images/sandbox/scripts/verify-image.sh +0 -18
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
# Task Flow Sandbox
|
|
2
|
-
|
|
3
|
-
The official universal sandbox image is published as:
|
|
4
|
-
|
|
5
|
-
```text
|
|
6
|
-
ghcr.io/codions-labs/portta-sandbox
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
It contains the four agent providers supported by Task Flow workflows: Codex,
|
|
10
|
-
Claude Code, OpenCode, and Pi. It also includes GitHub CLI, AWS CLI,
|
|
11
|
-
Playwright/Chromium, Mermaid CLI, asciinema, Git, Node.js 24, and common build
|
|
12
|
-
utilities.
|
|
13
|
-
|
|
14
|
-
## Build locally
|
|
15
|
-
|
|
16
|
-
The build context is this directory. `TOOLS_REFRESH` invalidates the volatile
|
|
17
|
-
tool layer without invalidating the base OS/runtime layers.
|
|
18
|
-
|
|
19
|
-
```bash
|
|
20
|
-
docker buildx build \
|
|
21
|
-
--load \
|
|
22
|
-
--platform linux/arm64 \
|
|
23
|
-
--build-arg SANDBOX_VERSION="$(tr -d '[:space:]' < VERSION)" \
|
|
24
|
-
--build-arg TOOLS_REFRESH="$(date -u +%Y%m%dT%H%M%SZ)" \
|
|
25
|
-
--tag portta-sandbox:local \
|
|
26
|
-
.
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
Use `linux/amd64` on x86_64 hosts. Validate the result with:
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
docker run --rm --entrypoint /usr/local/lib/taskflow-sandbox/scripts/verify-image.sh portta-sandbox:local
|
|
33
|
-
docker run --rm --entrypoint cat portta-sandbox:local /etc/taskflow-sandbox/manifest.json
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
## Versions and tags
|
|
37
|
-
|
|
38
|
-
`VERSION` is the version of the sandbox architecture, not the versions of the
|
|
39
|
-
agents. A rebuild can keep the same sandbox version while resolving newer
|
|
40
|
-
stable agent releases.
|
|
41
|
-
|
|
42
|
-
- `rolling`: latest main-branch, scheduled, or manually refreshed build.
|
|
43
|
-
- `edge`: latest develop-branch build.
|
|
44
|
-
- `build-YYYYMMDD-<run-id>-<attempt>`: immutable build identity.
|
|
45
|
-
- `X.Y.Z`: immutable structural release.
|
|
46
|
-
- `X.Y`, `X`, and `latest`: aliases advanced only by a new structural release.
|
|
47
|
-
|
|
48
|
-
Publish a structural release by creating a GitHub Release whose tag is
|
|
49
|
-
`sandbox-vX.Y.Z`. The tag version must match `VERSION`. Re-running ordinary or
|
|
50
|
-
scheduled builds never overwrites `X.Y.Z` or `latest`; it advances `rolling`.
|
|
51
|
-
|
|
52
|
-
The exact versions in each architecture are stored at
|
|
53
|
-
`/etc/taskflow-sandbox/manifest.json`, uploaded as workflow artifacts, and
|
|
54
|
-
printed in the workflow summary. For strict rollback or reproduction, use the
|
|
55
|
-
image digest or an immutable `build-*` tag.
|
|
56
|
-
|
|
57
|
-
## Refresh and cache policy
|
|
58
|
-
|
|
59
|
-
The workflow supplies a unique `TOOLS_REFRESH` value for every run. Structural
|
|
60
|
-
layers remain cacheable, while signed APT repositories and npm stable tags are
|
|
61
|
-
resolved again for the volatile tools. No tool version edit or synthetic commit
|
|
62
|
-
is required: dispatch the workflow on `main` to refresh `rolling`.
|
|
63
|
-
|
|
64
|
-
A weekly Monday build refreshes the rolling image. Weekly, rather than daily,
|
|
65
|
-
limits two-architecture build minutes and immutable build-tag storage growth;
|
|
66
|
-
`workflow_dispatch` remains the fast path when an important agent release lands.
|
|
67
|
-
|
|
68
|
-
Claude Code is installed from Anthropic's signed stable APT channel. GitHub CLI
|
|
69
|
-
uses its signed stable APT repository. Codex, OpenCode, and Pi use the official
|
|
70
|
-
npm packages and their stable `latest` tags. A deliberate upstream regression
|
|
71
|
-
should be handled by temporarily pinning inside the affected agent installer,
|
|
72
|
-
then removing the pin after compatibility is restored.
|
|
73
|
-
|
|
74
|
-
## Image architecture
|
|
75
|
-
|
|
76
|
-
The first release uses one universal image:
|
|
77
|
-
|
|
78
|
-
| Strategy | Decision |
|
|
79
|
-
| --- | --- |
|
|
80
|
-
| Universal image | Selected. It gives local, CI, VPS, and ephemeral environments the same warm toolset with no provisioning delay. |
|
|
81
|
-
| Base plus agent variants | Deferred until image size or an agent incompatibility is measured; combinations would otherwise multiply tags and builds. |
|
|
82
|
-
| Minimal base plus dynamic installs | Rejected as the default because startup would depend on registry availability and would be harder to audit and cache. |
|
|
83
|
-
| Runtime plugin layers | Kept as a possible future distribution mechanism if independent agent release/security policies become necessary. |
|
|
84
|
-
|
|
85
|
-
Agent installers are isolated files even though the delivered image is universal,
|
|
86
|
-
so a future variant can reuse the same scripts and BuildKit layers instead of
|
|
87
|
-
forking Dockerfiles.
|
|
88
|
-
|
|
89
|
-
## Sandbox version policy
|
|
90
|
-
|
|
91
|
-
Tool-only refreshes do not change `VERSION`. Bump its patch component for a
|
|
92
|
-
backward-compatible image/configuration fix, its minor component for a new
|
|
93
|
-
sandbox capability or supported agent, and its major component for a breaking
|
|
94
|
-
runtime contract. A future reproducible-build mode can consume a saved manifest;
|
|
95
|
-
until then, the immutable image digest is the exact replay and rollback identity.
|
|
96
|
-
|
|
97
|
-
## Adding an agent
|
|
98
|
-
|
|
99
|
-
Add one installer under `agents/`, call it from `scripts/install-tools.sh`, and
|
|
100
|
-
add its version command to `scripts/generate-manifest.mjs` and
|
|
101
|
-
`scripts/verify-image.sh`. Keep a single universal image until an agent has a
|
|
102
|
-
demonstrated incompatibility or size requirement that justifies a variant.
|
|
103
|
-
|
|
104
|
-
## Registry setup
|
|
105
|
-
|
|
106
|
-
The publish job uses `GITHUB_TOKEN` and grants `packages: write` only to that
|
|
107
|
-
job. The organization must allow GitHub Actions to create packages. After the
|
|
108
|
-
first publication, make the `portta-sandbox` package public in the GHCR
|
|
109
|
-
package settings; package visibility cannot be changed by the build workflow.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
0.1.0
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
set -euo pipefail
|
|
3
|
-
|
|
4
|
-
key=/tmp/claude-code.asc
|
|
5
|
-
keyring=/etc/apt/keyrings/claude-code.asc
|
|
6
|
-
fingerprint=31DDDE24DDFAB679F42D7BD2BAA929FF1A7ECACE
|
|
7
|
-
|
|
8
|
-
install -d -m 0755 /etc/apt/keyrings
|
|
9
|
-
curl -fsSL https://downloads.claude.ai/keys/claude-code.asc -o "$key"
|
|
10
|
-
actual_fingerprint="$(gpg --show-keys --with-colons "$key" | awk -F: '$1 == "fpr" { print $10; exit }')"
|
|
11
|
-
test "$actual_fingerprint" = "$fingerprint"
|
|
12
|
-
install -m 0644 "$key" "$keyring"
|
|
13
|
-
echo "deb [signed-by=$keyring] https://downloads.claude.ai/claude-code/apt/stable stable main" \
|
|
14
|
-
> /etc/apt/sources.list.d/claude-code.list
|
|
15
|
-
apt-get update
|
|
16
|
-
apt-get install -y --no-install-recommends claude-code
|
|
17
|
-
rm -f "$key"
|
|
18
|
-
rm -rf /var/lib/apt/lists/*
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import { execFileSync, spawnSync } from 'node:child_process'
|
|
4
|
-
import { readFileSync, writeFileSync } from 'node:fs'
|
|
5
|
-
import { arch } from 'node:os'
|
|
6
|
-
|
|
7
|
-
function output(command, args) {
|
|
8
|
-
const result = spawnSync(command, args, { encoding: 'utf8' })
|
|
9
|
-
if (result.status !== 0) {
|
|
10
|
-
throw new Error(`${command} ${args.join(' ')} failed: ${result.stderr.trim()}`)
|
|
11
|
-
}
|
|
12
|
-
const value = `${result.stdout}\n${result.stderr}`
|
|
13
|
-
return value
|
|
14
|
-
.split('\n')
|
|
15
|
-
.map((line) => line.trim())
|
|
16
|
-
.find(Boolean)
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function osRelease() {
|
|
20
|
-
return Object.fromEntries(
|
|
21
|
-
readFileSync('/etc/os-release', 'utf8')
|
|
22
|
-
.split('\n')
|
|
23
|
-
.filter((line) => line.includes('='))
|
|
24
|
-
.map((line) => {
|
|
25
|
-
const index = line.indexOf('=')
|
|
26
|
-
return [line.slice(0, index), line.slice(index + 1).replace(/^"|"$/g, '')]
|
|
27
|
-
}),
|
|
28
|
-
)
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
const chromium = execFileSync(
|
|
32
|
-
'find',
|
|
33
|
-
[
|
|
34
|
-
process.env.PLAYWRIGHT_BROWSERS_PATH ?? '/ms-playwright',
|
|
35
|
-
'-type',
|
|
36
|
-
'f',
|
|
37
|
-
'(',
|
|
38
|
-
'-name',
|
|
39
|
-
'chrome-headless-shell',
|
|
40
|
-
'-o',
|
|
41
|
-
'-name',
|
|
42
|
-
'headless_shell',
|
|
43
|
-
')',
|
|
44
|
-
'-executable',
|
|
45
|
-
'-print',
|
|
46
|
-
'-quit',
|
|
47
|
-
],
|
|
48
|
-
{ encoding: 'utf8' },
|
|
49
|
-
).trim()
|
|
50
|
-
|
|
51
|
-
if (!chromium) throw new Error('Playwright Chromium executable was not found')
|
|
52
|
-
|
|
53
|
-
const os = osRelease()
|
|
54
|
-
const manifest = {
|
|
55
|
-
schemaVersion: 1,
|
|
56
|
-
sandbox: {
|
|
57
|
-
version: process.env.SANDBOX_VERSION ?? 'unknown',
|
|
58
|
-
builtAt: process.env.BUILD_DATE ?? 'unknown',
|
|
59
|
-
buildId: process.env.BUILD_ID ?? 'local',
|
|
60
|
-
gitRevision: process.env.VCS_REF ?? 'unknown',
|
|
61
|
-
platform: `linux/${arch() === 'x64' ? 'amd64' : arch()}`,
|
|
62
|
-
base: `${os.PRETTY_NAME ?? os.ID ?? 'Linux'}`,
|
|
63
|
-
},
|
|
64
|
-
tools: {
|
|
65
|
-
node: output('node', ['--version']),
|
|
66
|
-
npm: output('npm', ['--version']),
|
|
67
|
-
git: output('git', ['--version']),
|
|
68
|
-
gh: output('gh', ['--version']),
|
|
69
|
-
aws: output('aws', ['--version']),
|
|
70
|
-
codex: output('codex', ['--version']),
|
|
71
|
-
claude: output('claude', ['--version']),
|
|
72
|
-
opencode: output('opencode', ['--version']),
|
|
73
|
-
pi: output('pi', ['--version']),
|
|
74
|
-
playwright: output('playwright', ['--version']),
|
|
75
|
-
chromium: output(chromium, ['--version', '--no-sandbox']),
|
|
76
|
-
mermaid: output('mmdc', ['--version']),
|
|
77
|
-
asciinema: output('asciinema', ['--version']),
|
|
78
|
-
},
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
writeFileSync(process.argv[2] ?? '/etc/taskflow-sandbox/manifest.json', `${JSON.stringify(manifest, null, 2)}\n`)
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
set -euo pipefail
|
|
3
|
-
|
|
4
|
-
install_github_cli() {
|
|
5
|
-
install -d -m 0755 /etc/apt/keyrings
|
|
6
|
-
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg \
|
|
7
|
-
-o /etc/apt/keyrings/githubcli-archive-keyring.gpg
|
|
8
|
-
chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg
|
|
9
|
-
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" \
|
|
10
|
-
> /etc/apt/sources.list.d/github-cli.list
|
|
11
|
-
apt-get update
|
|
12
|
-
apt-get install -y --no-install-recommends gh
|
|
13
|
-
rm -rf /var/lib/apt/lists/*
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
install_aws_cli() {
|
|
17
|
-
case "${TARGETARCH:?TARGETARCH is required}" in
|
|
18
|
-
amd64|arm64) ;;
|
|
19
|
-
*) echo "Unsupported AWS CLI architecture: ${TARGETARCH}" >&2; return 1 ;;
|
|
20
|
-
esac
|
|
21
|
-
|
|
22
|
-
curl -fsSL https://awscli.amazonaws.com/v2/install.sh -o /tmp/aws-cli-install.sh
|
|
23
|
-
chmod 0755 /tmp/aws-cli-install.sh
|
|
24
|
-
/tmp/aws-cli-install.sh --system
|
|
25
|
-
rm -f /tmp/aws-cli-install.sh
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
install_node_tools() {
|
|
29
|
-
PUPPETEER_SKIP_DOWNLOAD=true \
|
|
30
|
-
npm install --global --no-audit --no-fund @playwright/test@latest @mermaid-js/mermaid-cli@latest
|
|
31
|
-
playwright install chromium --with-deps --only-shell
|
|
32
|
-
npm cache clean --force
|
|
33
|
-
|
|
34
|
-
chromium="$(find "$PLAYWRIGHT_BROWSERS_PATH" -type f \( -name chrome-headless-shell -o -name headless_shell \) -executable | head -n 1)"
|
|
35
|
-
test -n "$chromium"
|
|
36
|
-
printf '{"args":["--no-sandbox","--disable-setuid-sandbox"],"executablePath":"%s"}\n' "$chromium" \
|
|
37
|
-
> /root/.puppeteerrc.json
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
install_github_cli
|
|
41
|
-
install_aws_cli
|
|
42
|
-
/usr/local/lib/taskflow-sandbox/agents/claude-code.sh
|
|
43
|
-
/usr/local/lib/taskflow-sandbox/agents/codex.sh
|
|
44
|
-
/usr/local/lib/taskflow-sandbox/agents/opencode.sh
|
|
45
|
-
/usr/local/lib/taskflow-sandbox/agents/pi.sh
|
|
46
|
-
install_node_tools
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
set -euo pipefail
|
|
3
|
-
|
|
4
|
-
manifest="${PORTTA_FLOW_SANDBOX_MANIFEST:-/etc/taskflow-sandbox/manifest.json}"
|
|
5
|
-
test -s "$manifest"
|
|
6
|
-
|
|
7
|
-
for command in node npm git gh aws codex claude opencode pi playwright mmdc asciinema; do
|
|
8
|
-
command -v "$command" >/dev/null
|
|
9
|
-
done
|
|
10
|
-
|
|
11
|
-
jq -e '
|
|
12
|
-
. as $manifest |
|
|
13
|
-
$manifest.schemaVersion == 1 and
|
|
14
|
-
($manifest.sandbox.version | length > 0) and
|
|
15
|
-
($manifest.sandbox.platform | startswith("linux/")) and
|
|
16
|
-
(["node", "npm", "git", "gh", "aws", "codex", "claude", "opencode", "pi", "playwright", "chromium", "mermaid", "asciinema"] |
|
|
17
|
-
all(. as $tool | $manifest.tools[$tool] | type == "string" and length > 0))
|
|
18
|
-
' "$manifest" >/dev/null
|