terok-executor 0.3.0__tar.gz → 0.3.1__tar.gz
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.
- {terok_executor-0.3.0 → terok_executor-0.3.1}/PKG-INFO +2 -2
- {terok_executor-0.3.0 → terok_executor-0.3.1}/pyproject.toml +4 -4
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/__init__.py +1 -1
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/commands.py +2 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/container/env.py +39 -2
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/scripts/init-ssh-and-repo.sh +22 -18
- {terok_executor-0.3.0 → terok_executor-0.3.1}/LICENSE +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/LICENSES/Apache-2.0.txt +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/README.md +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/_tree.py +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/_util/__init__.py +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/_util/_timezone.py +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/acp/__init__.py +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/acp/cache.py +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/acp/daemon.py +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/acp/endpoint.py +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/acp/model_options.py +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/acp/probe.py +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/acp/proxy.py +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/acp/roster.py +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/cli.py +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/config.py +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/config_schema.py +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/container/__init__.py +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/container/build.py +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/container/cache.py +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/container/inject.py +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/container/runner.py +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/credentials/__init__.py +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/credentials/auth.py +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/credentials/extractors.py +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/credentials/vault_commands.py +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/credentials/vault_config.py +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/credentials/vendor_files.py +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/doctor.py +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/integrations/__init__.py +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/integrations/sandbox.py +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/krun.py +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/paths.py +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/preflight.py +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/provider/__init__.py +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/provider/agents.py +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/provider/instructions.py +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/provider/providers.py +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/provider/wrappers.py +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/py.typed +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/__init__.py +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/agents/__init__.py +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/agents/caddy.yaml +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/agents/claude.yaml +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/agents/coderabbit.yaml +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/agents/codex.yaml +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/agents/copilot.yaml +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/agents/gh.yaml +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/agents/glab.yaml +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/agents/opencode.yaml +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/agents/pi.yaml +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/agents/sonar.yaml +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/agents/toad.yaml +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/agents/vibe.yaml +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/instructions/__init__.py +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/instructions/default.md +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/providers/anthropic.yaml +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/providers/blablador.yaml +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/providers/coderabbit.yaml +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/providers/github.yaml +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/providers/gitlab.yaml +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/providers/kisski.yaml +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/providers/mistral.yaml +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/providers/openai.yaml +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/providers/openrouter.yaml +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/providers/sonarcloud.yaml +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/scripts/Caddyfile +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/scripts/__init__.py +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/scripts/allthethings.sh +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/scripts/hilfe +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/scripts/mistral-model-sync.py +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/scripts/opencode-provider +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/scripts/opencode-provider-acp +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/scripts/opencode-session-plugin.mjs +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/scripts/opencode-toad +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/scripts/pi-env.sh +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/scripts/pi-git-identity.ts +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/scripts/pi-provider +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/scripts/pi-vault-routes.ts +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/scripts/providers +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/scripts/setup-codex-auth.sh +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/scripts/terok-acp-env.sh +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/scripts/terok-agents.py +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/scripts/terok-bash-banner.sh +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/scripts/terok-claude-acp +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/scripts/terok-codex-acp +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/scripts/terok-copilot-acp +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/scripts/terok-env-git-identity.sh +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/scripts/terok-env.sh +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/scripts/terok-native-provider +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/scripts/terok-opencode-acp +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/scripts/terok-toad-entry +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/scripts/terok-trust-workspace.py +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/scripts/terok-vibe-acp +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/scripts/toad +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/scripts/update-all-the-things +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/scripts/vibe-model-sync.sh +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/templates/__init__.py +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/templates/agent-wrappers.sh.j2 +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/templates/l0.dev.Dockerfile.template +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/templates/l1.agent-cli.Dockerfile.template +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/templates/l1.sidecar.Dockerfile.template +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/tmux/__init__.py +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/tmux/container-tmux.conf +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/toad-agents/__init__.py +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/toad-agents/blablador.helmholtz.de.toml +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/toad-agents/kisski.academiccloud.de.toml +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/roster/__init__.py +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/roster/loader.py +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/roster/schema.py +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/roster/types.py +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/sandbox.py +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/storage.py +0 -0
- {terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/vault_addr.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: terok-executor
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.1
|
|
4
4
|
Summary: Single-agent task runner for hardened Podman containers
|
|
5
5
|
License-Expression: Apache-2.0
|
|
6
6
|
License-File: LICENSE
|
|
@@ -29,7 +29,7 @@ Requires-Dist: prompt-toolkit (>=3.0,<4.0)
|
|
|
29
29
|
Requires-Dist: pydantic (>=2.13,<3.0)
|
|
30
30
|
Requires-Dist: rich (>=15.0,<16.0)
|
|
31
31
|
Requires-Dist: ruamel.yaml (==0.19.1)
|
|
32
|
-
Requires-Dist: terok-sandbox (>=0.4.
|
|
32
|
+
Requires-Dist: terok-sandbox (>=0.4.1,<0.5.0)
|
|
33
33
|
Requires-Dist: terok-util (>=0.2.1,<0.3.0)
|
|
34
34
|
Requires-Dist: tomli-w (>=1.2,<2.0)
|
|
35
35
|
Project-URL: Changelog, https://github.com/terok-ai/terok-executor/blob/master/CHANGELOG.md
|
|
@@ -19,7 +19,7 @@ dynamic = ["classifiers"]
|
|
|
19
19
|
# Dependency pins follow the policy in AGENTS.md ("Dependency Pinning &
|
|
20
20
|
# pyproject.toml Hygiene"). Keep the dependency list comment-free.
|
|
21
21
|
dependencies = [
|
|
22
|
-
"terok-sandbox>=0.4.
|
|
22
|
+
"terok-sandbox>=0.4.1,<0.5.0",
|
|
23
23
|
"terok-util>=0.2.1,<0.3.0",
|
|
24
24
|
"ruamel.yaml==0.19.1",
|
|
25
25
|
"Jinja2~=3.1",
|
|
@@ -29,7 +29,7 @@ dependencies = [
|
|
|
29
29
|
"rich~=15.0",
|
|
30
30
|
"agent-client-protocol==0.10.1",
|
|
31
31
|
]
|
|
32
|
-
version = "0.3.
|
|
32
|
+
version = "0.3.1"
|
|
33
33
|
|
|
34
34
|
[project.urls]
|
|
35
35
|
Homepage = "https://terok-ai.github.io/terok-executor/"
|
|
@@ -63,12 +63,12 @@ pre-commit = ">=4.0"
|
|
|
63
63
|
ruff = ">=0.15.20"
|
|
64
64
|
bandit = ">=1.7"
|
|
65
65
|
docstr-coverage = "^2.3.2"
|
|
66
|
-
complexipy = ">=6.0.
|
|
66
|
+
complexipy = ">=6.0.1"
|
|
67
67
|
vulture = ">=2.12"
|
|
68
68
|
reuse = "^6.2.0"
|
|
69
69
|
tach = "^0.35.0"
|
|
70
70
|
mypy = ">=2.1.0,<3.0"
|
|
71
|
-
import-linter = ">=2.
|
|
71
|
+
import-linter = ">=2.13"
|
|
72
72
|
|
|
73
73
|
[tool.poetry.group.test.dependencies]
|
|
74
74
|
pytest = ">=9.1.1"
|
|
@@ -20,7 +20,7 @@ in their submodules; reach into ``terok_executor.<sub>`` when you
|
|
|
20
20
|
need them.
|
|
21
21
|
"""
|
|
22
22
|
|
|
23
|
-
__version__: str = "0.3.
|
|
23
|
+
__version__: str = "0.3.1" # placeholder; replaced at build time
|
|
24
24
|
|
|
25
25
|
from importlib.metadata import PackageNotFoundError, version as _meta_version
|
|
26
26
|
|
|
@@ -505,6 +505,8 @@ def _handle_list() -> None:
|
|
|
505
505
|
|
|
506
506
|
runtime = PodmanRuntime()
|
|
507
507
|
states = runtime.container_states("terok-executor")
|
|
508
|
+
if states is None:
|
|
509
|
+
raise SystemExit("Container runtime unavailable — cannot query container states.")
|
|
508
510
|
run_root = container_state_root()
|
|
509
511
|
named = (p.name for p in run_root.iterdir() if p.is_dir()) if run_root.is_dir() else ()
|
|
510
512
|
for name in named:
|
|
@@ -23,6 +23,8 @@ Usage::
|
|
|
23
23
|
from __future__ import annotations
|
|
24
24
|
|
|
25
25
|
import logging
|
|
26
|
+
import os
|
|
27
|
+
import stat
|
|
26
28
|
from dataclasses import dataclass
|
|
27
29
|
from pathlib import Path
|
|
28
30
|
from typing import TYPE_CHECKING, Literal
|
|
@@ -438,6 +440,8 @@ def _shared_config_mounts(
|
|
|
438
440
|
materialises the destination inside the container's userns as root
|
|
439
441
|
with mode 0700, leaving the file unreadable to the agent (and breaking
|
|
440
442
|
e.g. ``gh`` whose ``hosts.yml`` is normally absent on fresh installs).
|
|
443
|
+
Credential files are created — and pre-existing ones re-clamped —
|
|
444
|
+
owner-only, because glab aborts on a ``config.yml`` looser than 0600.
|
|
441
445
|
|
|
442
446
|
Providers in *expose_credential_providers* keep the writable mount —
|
|
443
447
|
used by terok's experimental ``expose_oauth_token`` mode where the
|
|
@@ -454,13 +458,18 @@ def _shared_config_mounts(
|
|
|
454
458
|
host_dir.mkdir(parents=True, exist_ok=True)
|
|
455
459
|
specs.append(VolumeSpec(host_dir, m.container_path))
|
|
456
460
|
|
|
457
|
-
if not m.credential_file
|
|
461
|
+
if not m.credential_file:
|
|
458
462
|
continue
|
|
459
463
|
|
|
460
464
|
host_file = host_dir / m.credential_file
|
|
465
|
+
_clamp_credential_mode(host_file)
|
|
466
|
+
|
|
467
|
+
if m.writable or m.provider in expose_credential_providers:
|
|
468
|
+
continue
|
|
469
|
+
|
|
461
470
|
host_file.parent.mkdir(parents=True, exist_ok=True)
|
|
462
471
|
if not host_file.exists():
|
|
463
|
-
host_file.touch()
|
|
472
|
+
host_file.touch(mode=0o600)
|
|
464
473
|
|
|
465
474
|
container_file = f"{m.container_path}/{m.credential_file}"
|
|
466
475
|
specs.append(VolumeSpec(host_file, container_file, read_only=True))
|
|
@@ -468,6 +477,34 @@ def _shared_config_mounts(
|
|
|
468
477
|
return specs
|
|
469
478
|
|
|
470
479
|
|
|
480
|
+
def _clamp_credential_mode(host_file: Path) -> None:
|
|
481
|
+
"""Strip group/other permission bits from an existing credential file.
|
|
482
|
+
|
|
483
|
+
Releases up to 0.2.x ``touch()``-ed credential files with the umask
|
|
484
|
+
default (0644), and those files persist in the shared mounts across
|
|
485
|
+
upgrades. glab refuses to start when its ``config.yml`` is looser
|
|
486
|
+
than 0600, so every launch re-clamps to owner-only — idempotent, and
|
|
487
|
+
never *adds* bits (a deliberately read-only 0400 file stays 0400).
|
|
488
|
+
|
|
489
|
+
Opens with ``O_NOFOLLOW`` + ``fchmod`` so a symlink planted in the
|
|
490
|
+
container-writable shared dir cannot redirect the chmod to an
|
|
491
|
+
arbitrary operator-owned file (CWE-59). The clamp is best-effort:
|
|
492
|
+
any open failure (missing file, planted symlink, permissions) leaves
|
|
493
|
+
the file as-is rather than aborting container assembly — a file we
|
|
494
|
+
cannot even open is not one the old ``touch()`` created loose.
|
|
495
|
+
"""
|
|
496
|
+
try:
|
|
497
|
+
fd = os.open(host_file, os.O_RDONLY | getattr(os, "O_NOFOLLOW", 0))
|
|
498
|
+
except OSError:
|
|
499
|
+
return
|
|
500
|
+
try:
|
|
501
|
+
st = os.fstat(fd)
|
|
502
|
+
if stat.S_ISREG(st.st_mode) and stat.S_IMODE(st.st_mode) & 0o077:
|
|
503
|
+
os.fchmod(fd, stat.S_IMODE(st.st_mode) & ~0o077)
|
|
504
|
+
finally:
|
|
505
|
+
os.close(fd)
|
|
506
|
+
|
|
507
|
+
|
|
471
508
|
def _set_provider_handle(
|
|
472
509
|
env: dict[str, str],
|
|
473
510
|
provider: str,
|
|
@@ -198,6 +198,21 @@ if [[ -n "${REPO_ROOT:-}" && -n "${CODE_REPO:-}" ]]; then
|
|
|
198
198
|
fi
|
|
199
199
|
fi
|
|
200
200
|
|
|
201
|
+
# Terok-managed origin must match the launch env, not whatever a previous
|
|
202
|
+
# container generation persisted into .git/config: gate URLs embed a
|
|
203
|
+
# per-task auth token, so a stale origin breaks every fetch with 403.
|
|
204
|
+
# In both security modes the invariant is the same — origin is CODE_REPO
|
|
205
|
+
# (the gate in gatekeeping mode, upstream in online mode) — and it must
|
|
206
|
+
# hold BEFORE the first fetch below.
|
|
207
|
+
if [[ -d "${REPO_ROOT}/.git" ]]; then
|
|
208
|
+
CURRENT_ORIGIN=$(git -C "${REPO_ROOT}" remote get-url origin 2>/dev/null || echo "")
|
|
209
|
+
if [[ -n "${CURRENT_ORIGIN}" && "${CURRENT_ORIGIN}" != "${CODE_REPO}" ]]; then
|
|
210
|
+
echo ">> fixing origin remote (was: $(redact_url "${CURRENT_ORIGIN}"))"
|
|
211
|
+
git -C "${REPO_ROOT}" remote set-url origin "${CODE_REPO}" || true
|
|
212
|
+
git -C "${REPO_ROOT}" remote set-url --push origin "${CODE_REPO}" || true
|
|
213
|
+
fi
|
|
214
|
+
fi
|
|
215
|
+
|
|
201
216
|
if [[ ! -d "${REPO_ROOT}/.git" ]]; then
|
|
202
217
|
# No .git directory - perform initial clone
|
|
203
218
|
# Remove marker first so the directory is empty for git clone
|
|
@@ -245,7 +260,7 @@ if [[ -n "${REPO_ROOT:-}" && -n "${CODE_REPO:-}" ]]; then
|
|
|
245
260
|
git -C "${REPO_ROOT}" remote set-url origin "${CODE_REPO}" || true
|
|
246
261
|
git -C "${REPO_ROOT}" remote set-url --push origin "${CODE_REPO}" || true
|
|
247
262
|
# Fetch latest from upstream to ensure we have all refs
|
|
248
|
-
git -C "${REPO_ROOT}" fetch
|
|
263
|
+
git -C "${REPO_ROOT}" fetch origin --prune || true
|
|
249
264
|
# After repointing, checkout the target branch from the new origin if specified
|
|
250
265
|
if [[ -n "${TARGET_BRANCH}" ]]; then
|
|
251
266
|
if git -C "${REPO_ROOT}" rev-parse --verify "origin/${TARGET_BRANCH}" >/dev/null 2>&1; then
|
|
@@ -270,7 +285,10 @@ if [[ -n "${REPO_ROOT:-}" && -n "${CODE_REPO:-}" ]]; then
|
|
|
270
285
|
# .git exists and this is a new task (marker present).
|
|
271
286
|
# Normal fast path when clone cache pre-populated the workspace.
|
|
272
287
|
echo ">> new task — updating cached workspace to latest HEAD"
|
|
273
|
-
|
|
288
|
+
# Fetch origin only: the "external" remote is unreachable by design
|
|
289
|
+
# (gatekeeping blocks egress) and the "gate" remote is re-added with a
|
|
290
|
+
# fresh URL further down — ``--all`` would fetch both and fail.
|
|
291
|
+
git -C "${REPO_ROOT}" fetch origin --prune
|
|
274
292
|
TARGET_BRANCH="${GIT_BRANCH:-}"
|
|
275
293
|
|
|
276
294
|
# Checkout and reset to the target branch. Use checkout -B to create/reset
|
|
@@ -301,7 +319,8 @@ if [[ -n "${REPO_ROOT:-}" && -n "${CODE_REPO:-}" ]]; then
|
|
|
301
319
|
# .git exists and no marker - this is a restarted task
|
|
302
320
|
# Only fetch updates, preserve local changes
|
|
303
321
|
echo ">> restarted task - fetching updates (preserving local changes)"
|
|
304
|
-
|
|
322
|
+
# origin only — see the new-task fetch above for why not ``--all``.
|
|
323
|
+
git -C "${REPO_ROOT}" fetch origin --prune
|
|
305
324
|
# Only reset if explicitly requested via GIT_RESET_MODE
|
|
306
325
|
if [[ -n "${GIT_BRANCH:-}" && "${GIT_RESET_MODE}" != "none" ]]; then
|
|
307
326
|
echo ">> git reset (${GIT_RESET_MODE}) to origin/${GIT_BRANCH}"
|
|
@@ -316,21 +335,6 @@ if [[ -n "${REPO_ROOT:-}" && -n "${CODE_REPO:-}" ]]; then
|
|
|
316
335
|
fi
|
|
317
336
|
fi
|
|
318
337
|
|
|
319
|
-
# Gatekeeping mode: Ensure origin remote is set to the git-gate (CODE_REPO).
|
|
320
|
-
# This is necessary because:
|
|
321
|
-
# 1. Existing workspaces might have origin pointing to the real upstream
|
|
322
|
-
# (e.g., from a previous online mode run or misconfigured setup)
|
|
323
|
-
# 2. In gatekeeping mode, origin should ALWAYS be the local git-gate
|
|
324
|
-
# We detect gatekeeping mode by checking if CODE_REPO is a local file path.
|
|
325
|
-
if [[ "${CODE_REPO}" == file://* ]]; then
|
|
326
|
-
CURRENT_ORIGIN=$(git -C "${REPO_ROOT}" remote get-url origin 2>/dev/null || echo "")
|
|
327
|
-
if [[ "${CURRENT_ORIGIN}" != "${CODE_REPO}" ]]; then
|
|
328
|
-
echo ">> gatekeeping mode: fixing origin remote (was: $(redact_url "${CURRENT_ORIGIN}"))"
|
|
329
|
-
git -C "${REPO_ROOT}" remote set-url origin "${CODE_REPO}" || true
|
|
330
|
-
git -C "${REPO_ROOT}" remote set-url --push origin "${CODE_REPO}" || true
|
|
331
|
-
fi
|
|
332
|
-
fi
|
|
333
|
-
|
|
334
338
|
# In gatekeeping mode, optionally add an "external" remote pointing to the
|
|
335
339
|
# real upstream. This is informational only - the container cannot actually
|
|
336
340
|
# reach this URL. Useful for IDEs on the host side that want to know the
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/credentials/vault_commands.py
RENAMED
|
File without changes
|
{terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/credentials/vault_config.py
RENAMED
|
File without changes
|
{terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/credentials/vendor_files.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/agents/__init__.py
RENAMED
|
File without changes
|
{terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/agents/caddy.yaml
RENAMED
|
File without changes
|
{terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/agents/claude.yaml
RENAMED
|
File without changes
|
{terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/agents/coderabbit.yaml
RENAMED
|
File without changes
|
{terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/agents/codex.yaml
RENAMED
|
File without changes
|
{terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/agents/copilot.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/agents/opencode.yaml
RENAMED
|
File without changes
|
|
File without changes
|
{terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/agents/sonar.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/instructions/__init__.py
RENAMED
|
File without changes
|
{terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/instructions/default.md
RENAMED
|
File without changes
|
{terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/providers/anthropic.yaml
RENAMED
|
File without changes
|
{terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/providers/blablador.yaml
RENAMED
|
File without changes
|
{terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/providers/coderabbit.yaml
RENAMED
|
File without changes
|
{terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/providers/github.yaml
RENAMED
|
File without changes
|
{terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/providers/gitlab.yaml
RENAMED
|
File without changes
|
{terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/providers/kisski.yaml
RENAMED
|
File without changes
|
{terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/providers/mistral.yaml
RENAMED
|
File without changes
|
{terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/providers/openai.yaml
RENAMED
|
File without changes
|
{terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/providers/openrouter.yaml
RENAMED
|
File without changes
|
{terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/providers/sonarcloud.yaml
RENAMED
|
File without changes
|
{terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/scripts/Caddyfile
RENAMED
|
File without changes
|
{terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/scripts/__init__.py
RENAMED
|
File without changes
|
{terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/scripts/allthethings.sh
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/scripts/opencode-provider
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/scripts/opencode-toad
RENAMED
|
File without changes
|
{terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/scripts/pi-env.sh
RENAMED
|
File without changes
|
|
File without changes
|
{terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/scripts/pi-provider
RENAMED
|
File without changes
|
|
File without changes
|
{terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/scripts/providers
RENAMED
|
File without changes
|
|
File without changes
|
{terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/scripts/terok-acp-env.sh
RENAMED
|
File without changes
|
{terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/scripts/terok-agents.py
RENAMED
|
File without changes
|
|
File without changes
|
{terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/scripts/terok-claude-acp
RENAMED
|
File without changes
|
{terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/scripts/terok-codex-acp
RENAMED
|
File without changes
|
{terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/scripts/terok-copilot-acp
RENAMED
|
File without changes
|
|
File without changes
|
{terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/scripts/terok-env.sh
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/scripts/terok-toad-entry
RENAMED
|
File without changes
|
|
File without changes
|
{terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/scripts/terok-vibe-acp
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/templates/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/tmux/container-tmux.conf
RENAMED
|
File without changes
|
{terok_executor-0.3.0 → terok_executor-0.3.1}/src/terok_executor/resources/toad-agents/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|