[WIP] Expose independently versioned Squad modules and adapters #52
+480
-20
@@ -9,23 +9,251 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
GOPROXY: https://goproxy.cn,direct
|
||||
GOTOOLCHAIN: local
|
||||
GOWORK: "off"
|
||||
GOPRIVATE: git-ssh.u1680832.nyat.app/weichen
|
||||
steps:
|
||||
- name: Checkout
|
||||
env:
|
||||
TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
SUBMODULE_TOKEN: ${{ secrets.SUBMODULE_TOKEN }}
|
||||
run: |
|
||||
run: &trusted_acquisition_1 |
|
||||
set -euo pipefail
|
||||
git init -q
|
||||
git remote add origin "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git"
|
||||
git -c http.extraheader="AUTHORIZATION: token ${TOKEN}" fetch --depth=1 origin "${GITHUB_SHA}"
|
||||
git checkout -q --detach FETCH_HEAD
|
||||
if [ -z "${SUBMODULE_TOKEN}" ]; then
|
||||
echo "SUBMODULE_TOKEN is not configured" >&2
|
||||
exit 1
|
||||
fi
|
||||
git config --global url."https://weichen:${SUBMODULE_TOKEN}@git-home.u1680832.nyat.app:30319/".insteadOf "ssh://git@git-ssh.u1680832.nyat.app:31411/"
|
||||
git -c fetch.recurseSubmodules=false submodule update --init --recursive
|
||||
python3 - <<'PY_TRUSTED'
|
||||
# Trusted workflow code only: never import or execute checkout scripts here.
|
||||
# Token scopes, workflow provenance and runner isolation are platform NOT_RUN.
|
||||
import json
|
||||
import os
|
||||
from pathlib import Path
|
||||
import re
|
||||
import shlex
|
||||
import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
from urllib.parse import urlsplit
|
||||
|
||||
SERVER = os.environ.get("GITHUB_SERVER_URL", "").rstrip("/")
|
||||
parsed = urlsplit(SERVER)
|
||||
if (parsed.scheme not in {"http", "https"} or not parsed.netloc or
|
||||
parsed.username or parsed.password or parsed.query or parsed.fragment):
|
||||
sys.exit("Acquisition requires the platform-injected http(s) server")
|
||||
SSH = "ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/"
|
||||
GO_PREFIX = "git-ssh.u1680832.nyat.app/weichen/"
|
||||
REPOS = {"Agent-System-Dev", "Logging-System", "Error-Code-System", "Agent-System-Core", "Agent-Native",
|
||||
"Agent-Intent", "Agent-Command", "Agent-Squad", "Agent-System-Backend",
|
||||
"Agent-System-Frontend", "Agent-System-UI", "Agent-System-RDM",
|
||||
"Development-Guidelines", "Agent-System-Documents"}
|
||||
LEGACY = {
|
||||
"modules/core": "Agent-System-Core", "modules/backend": "Agent-System-Backend",
|
||||
"modules/frontend": "Agent-System-Frontend", "modules/ui": "Agent-System-UI",
|
||||
"modules/documents": "Agent-System-Documents", "deps/agent-system-core": "Agent-System-Core",
|
||||
"deps/development-guidelines": "Development-Guidelines", "deps/agent-native": "Agent-Native",
|
||||
"deps/agent-squad": "Agent-Squad", "deps/agent-intent": "Agent-Intent",
|
||||
"deps/agent-command": "Agent-Command", "deps/error-code-system": "Error-Code-System",
|
||||
"deps/logging-system": "Logging-System", "pins/agent-system-backend": "Agent-System-Backend",
|
||||
"pins/agent-system-core": "Agent-System-Core", "pins/agent-system-frontend": "Agent-System-Frontend",
|
||||
"pins/agent-system-ui": "Agent-System-UI",
|
||||
}
|
||||
GO_REPOS = REPOS - {"Agent-System-Dev", "Agent-System-UI", "Agent-System-Frontend", "Development-Guidelines", "Agent-System-Documents"}
|
||||
GO_MODULES = {GO_PREFIX + repo + ".git" for repo in GO_REPOS}
|
||||
GO_MODULES |= {GO_PREFIX + "Agent-Squad.git/" + suffix for suffix in
|
||||
("adapters/native", "adapters/intent", "adapters/sqlite", "adapters/a2a", "cmd/agent-squad")}
|
||||
root_token = os.environ.pop("TOKEN", "")
|
||||
component_token = os.environ.pop("SUBMODULE_TOKEN", "")
|
||||
# Go environment files and inherited Git tracing/config must not change acquisition.
|
||||
clean = {k: v for k, v in os.environ.items()
|
||||
if not k.startswith(("GIT_", "NPM_CONFIG_", "npm_config_")) and
|
||||
not any(word in k.upper() for word in ("TOKEN", "PASSWORD", "SECRET"))}
|
||||
clean.update(GIT_CONFIG_NOSYSTEM="1", GIT_CONFIG_SYSTEM="/dev/null", GIT_CONFIG_GLOBAL="/dev/null",
|
||||
GIT_TERMINAL_PROMPT="0", GOENV="off", GOTOOLCHAIN="local", GOWORK="off", GOFLAGS="-mod=readonly",
|
||||
GOPRIVATE=GO_PREFIX.rstrip("/"), GONOPROXY=GO_PREFIX.rstrip("/"), GONOSUMDB=GO_PREFIX.rstrip("/"))
|
||||
if os.environ.get("npm_config_cache"):
|
||||
clean["npm_config_cache"] = os.environ["npm_config_cache"]
|
||||
config = {"core.hooksPath": "/dev/null", "core.fsmonitor": "false", "init.templateDir": "",
|
||||
"credential.helper": "", "fetch.recurseSubmodules": "false", "submodule.recurse": "false",
|
||||
"http.followRedirects": "false", "protocol.allow": "never", "protocol." + parsed.scheme + ".allow": "always"}
|
||||
root = Path.cwd()
|
||||
mirrors = root / ".ci-mirrors"
|
||||
|
||||
def process_env(values):
|
||||
env = clean | {"GIT_CONFIG_COUNT": str(len(values))}
|
||||
for index, (key, value) in enumerate(values.items()):
|
||||
env[f"GIT_CONFIG_KEY_{index}"] = key
|
||||
env[f"GIT_CONFIG_VALUE_{index}"] = value
|
||||
return env
|
||||
|
||||
def git(directory, *args, token="", repo=""):
|
||||
values = config.copy()
|
||||
if token:
|
||||
if repo not in REPOS:
|
||||
raise ValueError("Credential destination is outside the reviewed repository allowlist")
|
||||
values[f"http.{SERVER}/weichen/{repo}.git.extraheader"] = "AUTHORIZATION: token " + token
|
||||
result = subprocess.run(["git", "-C", str(directory), *args], env=process_env(values),
|
||||
check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
return result.stdout
|
||||
|
||||
def fixed_sha(value):
|
||||
if not isinstance(value, str) or not re.fullmatch(r"[0-9a-fA-F]{40}", value):
|
||||
raise ValueError("Source acquisition requires a fixed commit SHA")
|
||||
return value.lower()
|
||||
|
||||
def mirror(repo, sha, token):
|
||||
sha = fixed_sha(sha)
|
||||
destination = mirrors / (repo + ".git")
|
||||
if destination.is_symlink() or mirrors.is_symlink():
|
||||
raise ValueError("Mirror directory cannot be a symlink")
|
||||
mirrors.mkdir(exist_ok=True)
|
||||
if not destination.exists():
|
||||
destination.mkdir()
|
||||
git(destination, "init", "--bare", "-q")
|
||||
url = f"{SERVER}/weichen/{repo}.git"
|
||||
try:
|
||||
git(destination, "cat-file", "-e", sha + "^{commit}")
|
||||
except subprocess.CalledProcessError:
|
||||
git(destination, "fetch", "--depth=200", url, sha, token=token, repo=repo)
|
||||
git(destination, "update-ref", "refs/heads/main", sha)
|
||||
git(destination, "symbolic-ref", "HEAD", "refs/heads/main")
|
||||
git(destination, "update-ref", "refs/ci/" + sha, sha)
|
||||
return destination
|
||||
|
||||
def mirror_env():
|
||||
values = {"protocol.file.allow": "always", "core.hooksPath": "/dev/null", "credential.helper": ""}
|
||||
# Distinct keys use repeated .insteadOf values, represented as a sequence below.
|
||||
pairs = list(values.items())
|
||||
for repo in sorted(REPOS):
|
||||
destination = mirrors / (repo + ".git")
|
||||
if not destination.exists():
|
||||
continue
|
||||
key = "url." + destination.as_uri() + ".insteadOf"
|
||||
pairs.extend((key, url) for url in (SSH + repo + ".git", "https://" + GO_PREFIX + repo + ".git",
|
||||
SERVER + "/weichen/" + repo + ".git", "https://" + GO_PREFIX + repo))
|
||||
env = clean | {"CI_DEPENDENCY_MIRRORS": str(mirrors), "GIT_CONFIG_COUNT": str(len(pairs))}
|
||||
for index, (key, value) in enumerate(pairs):
|
||||
env[f"GIT_CONFIG_KEY_{index}"] = key
|
||||
env[f"GIT_CONFIG_VALUE_{index}"] = value
|
||||
exports = {k: v for k, v in env.items() if k.startswith("GIT_CONFIG_") or k == "CI_DEPENDENCY_MIRRORS"}
|
||||
(root / ".ci-mirrors.env").write_text("".join("export " + k + "=" + shlex.quote(v) + "\n" for k, v in exports.items()))
|
||||
return env
|
||||
|
||||
def materialize_legacy(directory, depth=0):
|
||||
if depth > 16:
|
||||
raise ValueError("Historical submodule depth exceeds the checkout limit")
|
||||
links = {}
|
||||
for entry in git(directory, "ls-tree", "-rz", "HEAD").split(b"\0"):
|
||||
if entry:
|
||||
metadata, path = entry.split(b"\t", 1)
|
||||
mode, kind, commit = metadata.decode().split()
|
||||
if mode == "160000":
|
||||
links[path.decode()] = commit
|
||||
if not links:
|
||||
return
|
||||
raw = git(directory, "config", "--no-includes", "--blob", "HEAD:.gitmodules", "--null", "--list")
|
||||
entries = {}
|
||||
for item in raw.split(b"\0"):
|
||||
if not item:
|
||||
continue
|
||||
key, value = item.decode().split("\n", 1)
|
||||
match = re.fullmatch(r"submodule\.(.+)\.(path|url)", key)
|
||||
if not match:
|
||||
raise ValueError("Unsupported candidate .gitmodules setting")
|
||||
name, field = match.groups()
|
||||
if field in entries.setdefault(name, {}):
|
||||
raise ValueError("Duplicate candidate .gitmodules setting")
|
||||
entries[name][field] = value
|
||||
if set(entries) != set(links):
|
||||
raise ValueError("Submodule names must match fixed gitlink paths")
|
||||
for name, fields in entries.items():
|
||||
repo = LEGACY.get(name)
|
||||
if not repo or fields.get("path") != name or fields.get("url") not in {
|
||||
SSH + repo + ".git", f"{SERVER}/weichen/{repo}.git"}:
|
||||
raise ValueError("Historical submodule source is outside the reviewed allowlist")
|
||||
for name in entries:
|
||||
repo = LEGACY[name]
|
||||
sha = links[name]
|
||||
url = f"{SERVER}/weichen/{repo}.git"
|
||||
git(directory, "config", f"submodule.{name}.url", url)
|
||||
# Trusted explicit checkout prevents candidate update commands from running.
|
||||
git(directory, "submodule", "update", "--init", "--checkout", "--", name, token=component_token, repo=repo)
|
||||
child = directory / name
|
||||
if git(child, "rev-parse", "HEAD").decode().strip() != sha:
|
||||
raise ValueError("Historical submodule does not match its fixed SHA")
|
||||
mirror(repo, sha, component_token)
|
||||
materialize_legacy(child, depth + 1)
|
||||
|
||||
def materialize_manifest(directory):
|
||||
manifest = directory / "components.json"
|
||||
lock = directory / "components.lock.json"
|
||||
if not manifest.exists() and not lock.exists():
|
||||
materialize_legacy(directory)
|
||||
return
|
||||
data = json.loads(manifest.read_text())
|
||||
locked = json.loads(lock.read_text())
|
||||
if data.get("schema") != 1 or locked.get("schema") != 1:
|
||||
raise ValueError("Unsupported source manifest schema")
|
||||
entries = {}
|
||||
for item in data["components"]:
|
||||
repo = item["id"]
|
||||
path = ".workspace/" + repo
|
||||
if (repo not in REPOS or repo in entries or item["path"] != path or
|
||||
item["repo"] not in {SSH + repo + ".git", f"{SERVER}/weichen/{repo}.git"} or
|
||||
item.get("role") not in {"go-library", "npm-library", "application", "guidelines", "documentation"}):
|
||||
raise ValueError("Candidate source manifest is outside the reviewed allowlist")
|
||||
for module in item.get("modules", []):
|
||||
if module.get("path") not in GO_MODULES or not module["path"].startswith(GO_PREFIX + repo + ".git"):
|
||||
raise ValueError("Candidate module mapping is outside the reviewed allowlist")
|
||||
entries[repo] = item
|
||||
selected = locked["components"]
|
||||
if set(selected) - set(entries):
|
||||
raise ValueError("Source lock refers to an unregistered repository")
|
||||
for repo, item in entries.items():
|
||||
if item["role"] in {"application", "guidelines", "documentation"} and repo not in selected:
|
||||
raise ValueError("Application and documentation source needs a fixed lock")
|
||||
for repo, pin in selected.items():
|
||||
fixed_sha(pin["commit"])
|
||||
destination = directory / entries[repo]["path"]
|
||||
if destination.exists() or destination.is_symlink() or destination.parent.is_symlink():
|
||||
raise ValueError("Source materialization requires a fresh destination")
|
||||
# Validate the complete lock before any authenticated component fetch.
|
||||
for repo, pin in selected.items():
|
||||
sha = fixed_sha(pin["commit"])
|
||||
destination = directory / entries[repo]["path"]
|
||||
destination.mkdir(parents=True)
|
||||
url = f"{SERVER}/weichen/{repo}.git"
|
||||
git(destination, "init", "-q")
|
||||
git(destination, "remote", "add", "origin", url)
|
||||
git(destination, "fetch", "--depth=1", "origin", sha, token=component_token, repo=repo)
|
||||
git(destination, "checkout", "-q", "--detach", "FETCH_HEAD")
|
||||
if git(destination, "rev-parse", "HEAD").decode().strip() != sha:
|
||||
raise ValueError("Materialized source differs from the fixed lock")
|
||||
# Persist the registered identity; process config chooses the transport.
|
||||
git(destination, "remote", "set-url", "origin", entries[repo]["repo"])
|
||||
mirror(repo, sha, component_token)
|
||||
materialize_legacy(destination)
|
||||
|
||||
try:
|
||||
if os.environ.get("GITHUB_REPOSITORY") != "weichen/Agent-Squad":
|
||||
raise ValueError("Checkout repository is outside the reviewed allowlist")
|
||||
sha = fixed_sha(os.environ.get("GITHUB_SHA", ""))
|
||||
if not root_token:
|
||||
raise ValueError("Checkout requires TOKEN")
|
||||
if (root / ".git").exists():
|
||||
raise ValueError("Checkout requires a fresh workspace")
|
||||
git(root, "init", "-q")
|
||||
git(root, "remote", "add", "origin", SERVER + "/weichen/Agent-Squad.git")
|
||||
git(root, "fetch", "--depth=1", "origin", sha, token=root_token, repo="Agent-Squad")
|
||||
git(root, "checkout", "-q", "--detach", "FETCH_HEAD")
|
||||
if git(root, "rev-parse", "HEAD").decode().strip() != sha:
|
||||
raise ValueError("Checked-out commit differs from the platform commit")
|
||||
if (root / ".ci-mirrors").exists() or (root / ".ci-mirrors.env").exists():
|
||||
raise ValueError("Candidate cannot provide trusted prefetch state")
|
||||
materialize_manifest(root)
|
||||
mirror_env()
|
||||
except (ValueError, KeyError, OSError, subprocess.CalledProcessError) as error:
|
||||
# Do not print child stderr or environment: a failed credential fetch stays redacted.
|
||||
sys.exit("Checkout refused: " + str(error))
|
||||
print("Fixed source checkout complete; credentials were not persisted")
|
||||
PY_TRUSTED
|
||||
unset TOKEN SUBMODULE_TOKEN
|
||||
- name: Install Go 1.27.1
|
||||
run: |
|
||||
set -euo pipefail
|
||||
@@ -33,21 +261,253 @@ jobs:
|
||||
tar -C /usr/local -xzf "$RUNNER_TEMP/go.tgz"
|
||||
ln -sfn /usr/local/go/bin/go /usr/local/bin/go
|
||||
ln -sfn /usr/local/go/bin/gofmt /usr/local/bin/gofmt
|
||||
- name: Prefetch Go modules without executing candidate code
|
||||
env:
|
||||
SUBMODULE_TOKEN: ${{ secrets.SUBMODULE_TOKEN }}
|
||||
run: &trusted_acquisition_2 |
|
||||
set -euo pipefail
|
||||
python3 - <<'PY_TRUSTED'
|
||||
# Trusted workflow code only: never import or execute checkout scripts here.
|
||||
# Token scopes, workflow provenance and runner isolation are platform NOT_RUN.
|
||||
import json
|
||||
import os
|
||||
from pathlib import Path
|
||||
import re
|
||||
import shlex
|
||||
import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
from urllib.parse import urlsplit
|
||||
|
||||
SERVER = os.environ.get("GITHUB_SERVER_URL", "").rstrip("/")
|
||||
parsed = urlsplit(SERVER)
|
||||
if (parsed.scheme not in {"http", "https"} or not parsed.netloc or
|
||||
parsed.username or parsed.password or parsed.query or parsed.fragment):
|
||||
sys.exit("Acquisition requires the platform-injected http(s) server")
|
||||
SSH = "ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/"
|
||||
GO_PREFIX = "git-ssh.u1680832.nyat.app/weichen/"
|
||||
REPOS = {"Agent-System-Dev", "Logging-System", "Error-Code-System", "Agent-System-Core", "Agent-Native",
|
||||
"Agent-Intent", "Agent-Command", "Agent-Squad", "Agent-System-Backend",
|
||||
"Agent-System-Frontend", "Agent-System-UI", "Agent-System-RDM",
|
||||
"Development-Guidelines", "Agent-System-Documents"}
|
||||
LEGACY = {
|
||||
"modules/core": "Agent-System-Core", "modules/backend": "Agent-System-Backend",
|
||||
"modules/frontend": "Agent-System-Frontend", "modules/ui": "Agent-System-UI",
|
||||
"modules/documents": "Agent-System-Documents", "deps/agent-system-core": "Agent-System-Core",
|
||||
"deps/development-guidelines": "Development-Guidelines", "deps/agent-native": "Agent-Native",
|
||||
"deps/agent-squad": "Agent-Squad", "deps/agent-intent": "Agent-Intent",
|
||||
"deps/agent-command": "Agent-Command", "deps/error-code-system": "Error-Code-System",
|
||||
"deps/logging-system": "Logging-System", "pins/agent-system-backend": "Agent-System-Backend",
|
||||
"pins/agent-system-core": "Agent-System-Core", "pins/agent-system-frontend": "Agent-System-Frontend",
|
||||
"pins/agent-system-ui": "Agent-System-UI",
|
||||
}
|
||||
GO_REPOS = REPOS - {"Agent-System-Dev", "Agent-System-UI", "Agent-System-Frontend", "Development-Guidelines", "Agent-System-Documents"}
|
||||
GO_MODULES = {GO_PREFIX + repo + ".git" for repo in GO_REPOS}
|
||||
GO_MODULES |= {GO_PREFIX + "Agent-Squad.git/" + suffix for suffix in
|
||||
("adapters/native", "adapters/intent", "adapters/sqlite", "adapters/a2a", "cmd/agent-squad")}
|
||||
root_token = os.environ.pop("TOKEN", "")
|
||||
component_token = os.environ.pop("SUBMODULE_TOKEN", "")
|
||||
# Go environment files and inherited Git tracing/config must not change acquisition.
|
||||
clean = {k: v for k, v in os.environ.items()
|
||||
if not k.startswith(("GIT_", "NPM_CONFIG_", "npm_config_")) and
|
||||
not any(word in k.upper() for word in ("TOKEN", "PASSWORD", "SECRET"))}
|
||||
clean.update(GIT_CONFIG_NOSYSTEM="1", GIT_CONFIG_SYSTEM="/dev/null", GIT_CONFIG_GLOBAL="/dev/null",
|
||||
GIT_TERMINAL_PROMPT="0", GOENV="off", GOTOOLCHAIN="local", GOWORK="off", GOFLAGS="-mod=readonly",
|
||||
GOPRIVATE=GO_PREFIX.rstrip("/"), GONOPROXY=GO_PREFIX.rstrip("/"), GONOSUMDB=GO_PREFIX.rstrip("/"))
|
||||
if os.environ.get("npm_config_cache"):
|
||||
clean["npm_config_cache"] = os.environ["npm_config_cache"]
|
||||
config = {"core.hooksPath": "/dev/null", "core.fsmonitor": "false", "init.templateDir": "",
|
||||
"credential.helper": "", "fetch.recurseSubmodules": "false", "submodule.recurse": "false",
|
||||
"http.followRedirects": "false", "protocol.allow": "never", "protocol." + parsed.scheme + ".allow": "always"}
|
||||
root = Path.cwd()
|
||||
mirrors = root / ".ci-mirrors"
|
||||
|
||||
def process_env(values):
|
||||
env = clean | {"GIT_CONFIG_COUNT": str(len(values))}
|
||||
for index, (key, value) in enumerate(values.items()):
|
||||
env[f"GIT_CONFIG_KEY_{index}"] = key
|
||||
env[f"GIT_CONFIG_VALUE_{index}"] = value
|
||||
return env
|
||||
|
||||
def git(directory, *args, token="", repo=""):
|
||||
values = config.copy()
|
||||
if token:
|
||||
if repo not in REPOS:
|
||||
raise ValueError("Credential destination is outside the reviewed repository allowlist")
|
||||
values[f"http.{SERVER}/weichen/{repo}.git.extraheader"] = "AUTHORIZATION: token " + token
|
||||
result = subprocess.run(["git", "-C", str(directory), *args], env=process_env(values),
|
||||
check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
return result.stdout
|
||||
|
||||
def fixed_sha(value):
|
||||
if not isinstance(value, str) or not re.fullmatch(r"[0-9a-fA-F]{40}", value):
|
||||
raise ValueError("Source acquisition requires a fixed commit SHA")
|
||||
return value.lower()
|
||||
|
||||
def mirror(repo, sha, token):
|
||||
sha = fixed_sha(sha)
|
||||
destination = mirrors / (repo + ".git")
|
||||
if destination.is_symlink() or mirrors.is_symlink():
|
||||
raise ValueError("Mirror directory cannot be a symlink")
|
||||
mirrors.mkdir(exist_ok=True)
|
||||
if not destination.exists():
|
||||
destination.mkdir()
|
||||
git(destination, "init", "--bare", "-q")
|
||||
url = f"{SERVER}/weichen/{repo}.git"
|
||||
try:
|
||||
git(destination, "cat-file", "-e", sha + "^{commit}")
|
||||
except subprocess.CalledProcessError:
|
||||
git(destination, "fetch", "--depth=200", url, sha, token=token, repo=repo)
|
||||
git(destination, "update-ref", "refs/heads/main", sha)
|
||||
git(destination, "symbolic-ref", "HEAD", "refs/heads/main")
|
||||
git(destination, "update-ref", "refs/ci/" + sha, sha)
|
||||
return destination
|
||||
|
||||
def mirror_env():
|
||||
values = {"protocol.file.allow": "always", "core.hooksPath": "/dev/null", "credential.helper": ""}
|
||||
# Distinct keys use repeated .insteadOf values, represented as a sequence below.
|
||||
pairs = list(values.items())
|
||||
for repo in sorted(REPOS):
|
||||
destination = mirrors / (repo + ".git")
|
||||
if not destination.exists():
|
||||
continue
|
||||
key = "url." + destination.as_uri() + ".insteadOf"
|
||||
pairs.extend((key, url) for url in (SSH + repo + ".git", "https://" + GO_PREFIX + repo + ".git",
|
||||
SERVER + "/weichen/" + repo + ".git", "https://" + GO_PREFIX + repo))
|
||||
env = clean | {"CI_DEPENDENCY_MIRRORS": str(mirrors), "GIT_CONFIG_COUNT": str(len(pairs))}
|
||||
for index, (key, value) in enumerate(pairs):
|
||||
env[f"GIT_CONFIG_KEY_{index}"] = key
|
||||
env[f"GIT_CONFIG_VALUE_{index}"] = value
|
||||
exports = {k: v for k, v in env.items() if k.startswith("GIT_CONFIG_") or k == "CI_DEPENDENCY_MIRRORS"}
|
||||
(root / ".ci-mirrors.env").write_text("".join("export " + k + "=" + shlex.quote(v) + "\n" for k, v in exports.items()))
|
||||
return env
|
||||
|
||||
def source_roots():
|
||||
bases = [root]
|
||||
composition = root / ".ci-composition-dev"
|
||||
if composition.is_dir() and not composition.is_symlink():
|
||||
bases.append(composition)
|
||||
paths = []
|
||||
for base in bases:
|
||||
paths += [base, base / "rdm"] + [base / path for path in LEGACY] + [base / ".workspace" / repo for repo in sorted(REPOS)]
|
||||
return [path for path in paths if path.is_dir() and not path.is_symlink()]
|
||||
try:
|
||||
targets = []
|
||||
for source in source_roots():
|
||||
for suffix in (".", "examples/trace", "adapters/native", "adapters/intent", "adapters/sqlite", "adapters/a2a", "cmd/agent-squad"):
|
||||
directory = source / suffix
|
||||
if (directory / "go.mod").is_file() and directory.resolve() not in targets:
|
||||
targets.append(directory.resolve())
|
||||
# Parse using the installed local Go tool without credentials or candidate execution.
|
||||
original_files = {}
|
||||
for directory in targets:
|
||||
parsed_mod = json.loads(subprocess.check_output(["go", "mod", "edit", "-json"], cwd=directory, env=clean))
|
||||
canonical = parsed_mod["Module"]["Path"].startswith(GO_PREFIX)
|
||||
for name in ("go.mod", "go.sum"):
|
||||
dependency_file = directory / name
|
||||
if dependency_file.is_file():
|
||||
original_files[(directory, name)] = dependency_file.read_bytes()
|
||||
elif canonical and name == "go.sum":
|
||||
original_files[(directory, name)] = None
|
||||
for dep in (parsed_mod.get("Require") or []):
|
||||
path = dep["Path"]
|
||||
if path.startswith(GO_PREFIX) and path not in GO_MODULES:
|
||||
raise ValueError("Go dependency is outside the reviewed module mapping")
|
||||
for replacement in (parsed_mod.get("Replace") or []):
|
||||
path = replacement["New"]["Path"]
|
||||
if canonical and not replacement["New"].get("Version"):
|
||||
raise ValueError("Canonical module cannot acquire a local path replacement")
|
||||
if path.startswith(GO_PREFIX) and path not in GO_MODULES:
|
||||
raise ValueError("Go replacement is outside the reviewed module mapping")
|
||||
auth = config.copy()
|
||||
for repo in sorted(GO_REPOS):
|
||||
url = f"{SERVER}/weichen/{repo}.git"
|
||||
auth[f"url.{url}.insteadOf"] = "https://" + GO_PREFIX + repo
|
||||
auth[f"http.{url}.extraheader"] = "AUTHORIZATION: token " + component_token
|
||||
def objects(output):
|
||||
decoder = json.JSONDecoder()
|
||||
remaining = output.strip()
|
||||
while remaining:
|
||||
item, end = decoder.raw_decode(remaining)
|
||||
remaining = remaining[end:].lstrip()
|
||||
yield item
|
||||
def unchanged():
|
||||
for (owner, name), contents in original_files.items():
|
||||
dependency_file = owner / name
|
||||
current = dependency_file.read_bytes() if dependency_file.exists() else None
|
||||
if current != contents:
|
||||
raise ValueError("Go acquisition modified a committed Go dependency file: " + str(dependency_file))
|
||||
for directory in targets:
|
||||
# Resolve private go.mod metadata only through exact repository headers;
|
||||
# validate the complete selected graph before acquiring module zip files.
|
||||
graph = subprocess.run(["go", "list", "-mod=readonly", "-m", "-json", "all"], cwd=directory,
|
||||
env=process_env(auth), capture_output=True, text=True)
|
||||
if graph.returncode:
|
||||
raise ValueError("Go selected graph resolution failed: " + graph.stderr.strip())
|
||||
for item in objects(graph.stdout):
|
||||
if item.get("Main"):
|
||||
continue
|
||||
selected = item.get("Replace") or item
|
||||
for path in (item.get("Path", ""), selected.get("Path", "")):
|
||||
if path.startswith(GO_PREFIX) and path not in GO_MODULES:
|
||||
raise ValueError("Selected Go module is outside the reviewed mapping")
|
||||
unchanged()
|
||||
# Go 1.27 can prune go.sum even under -mod=readonly for this
|
||||
# metadata-only command. Use a disposable copy, then validate actual
|
||||
# package loading against the unchanged committed source locks.
|
||||
local_replacements = json.loads(subprocess.check_output(
|
||||
["go", "mod", "edit", "-json"], cwd=directory, env=clean)).get("Replace") or []
|
||||
downloaded = ""
|
||||
if not any(not item["New"].get("Version") for item in local_replacements):
|
||||
with tempfile.TemporaryDirectory(prefix="ci-go-prefetch-") as temporary:
|
||||
download_root = Path(temporary)
|
||||
for name in ("go.mod", "go.sum"):
|
||||
if (directory / name).is_file():
|
||||
(download_root / name).write_bytes((directory / name).read_bytes())
|
||||
result = subprocess.run(["go", "mod", "download", "-json"], cwd=download_root,
|
||||
env=process_env(auth), capture_output=True, text=True)
|
||||
if result.returncode:
|
||||
raise ValueError("Go module acquisition failed: " + result.stderr.strip())
|
||||
downloaded = result.stdout
|
||||
unchanged()
|
||||
for item in objects(downloaded):
|
||||
path = item.get("Path", "")
|
||||
if path.startswith(GO_PREFIX):
|
||||
if path not in GO_MODULES:
|
||||
raise ValueError("Resolved Go module is outside the reviewed mapping")
|
||||
repo = path[len(GO_PREFIX):].split(".git", 1)[0]
|
||||
origin = item.get("Origin") or json.loads(Path(item["Info"]).read_text()).get("Origin") or {}
|
||||
mirror(repo, fixed_sha(origin.get("Hash")), component_token)
|
||||
# Package metadata loads actual test/build dependencies without running
|
||||
# vet, compilers, package init functions or candidate tests. No CGO tools.
|
||||
packages = subprocess.run(["go", "list", "-mod=readonly", "-deps", "-test", "./..."], cwd=directory,
|
||||
env=process_env(auth) | {"CGO_ENABLED": "0"}, capture_output=True, text=True)
|
||||
if packages.returncode:
|
||||
raise ValueError("Go test/build dependency acquisition failed: " + packages.stderr.strip())
|
||||
unchanged()
|
||||
mirror_env()
|
||||
except (ValueError, OSError, subprocess.CalledProcessError) as error:
|
||||
sys.exit("Go prefetch refused: " + str(error))
|
||||
print("Go modules cached with GOTOOLCHAIN=local; no candidate code executed")
|
||||
PY_TRUSTED
|
||||
unset TOKEN SUBMODULE_TOKEN
|
||||
- name: Vet, test, and race
|
||||
run: GOWORK=off go vet ./... && GOWORK=off go test -count=1 ./... && GOWORK=off go test -count=1 -race ./...
|
||||
run: |
|
||||
set -euo pipefail
|
||||
source .ci-mirrors.env
|
||||
for module in . adapters/native adapters/intent adapters/sqlite adapters/a2a cmd/agent-squad; do
|
||||
test -f "$module/go.mod"
|
||||
(cd "$module" && go vet -mod=readonly ./... && go test -mod=readonly -count=1 ./... && go test -mod=readonly -count=1 -race ./...)
|
||||
done
|
||||
docker-checkout-hostgateway:
|
||||
runs-on: ubuntu-latest
|
||||
options: --add-host gitea:host-gateway
|
||||
env:
|
||||
GITHUB_SERVER_URL: http://gitea:3000
|
||||
steps:
|
||||
- name: Checkout without GitHub actions
|
||||
- name: Checkout
|
||||
env:
|
||||
TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
git init -q
|
||||
git remote add origin "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git"
|
||||
git -c http.extraheader="AUTHORIZATION: token ${TOKEN}" fetch --depth=1 origin "${GITHUB_SHA}"
|
||||
git checkout -q --detach FETCH_HEAD
|
||||
test -f go.mod && echo "docker-mode checkout via host-gateway OK"
|
||||
SUBMODULE_TOKEN: ${{ secrets.SUBMODULE_TOKEN }}
|
||||
run: *trusted_acquisition_1
|
||||
- run: test -f go.mod && echo "docker-mode checkout via host-gateway OK"
|
||||
|
||||
-15
@@ -1,15 +0,0 @@
|
||||
[submodule "deps/agent-native"]
|
||||
path = deps/agent-native
|
||||
url = ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-Native.git
|
||||
[submodule "deps/development-guidelines"]
|
||||
path = deps/development-guidelines
|
||||
url = ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Development-Guidelines.git
|
||||
[submodule "deps/error-code-system"]
|
||||
path = deps/error-code-system
|
||||
url = ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Error-Code-System.git
|
||||
[submodule "deps/logging-system"]
|
||||
path = deps/logging-system
|
||||
url = ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Logging-System.git
|
||||
[submodule "deps/agent-intent"]
|
||||
path = deps/agent-intent
|
||||
url = ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-Intent.git
|
||||
@@ -1,6 +1,6 @@
|
||||
# Agent 工作说明(Agent-Squad)
|
||||
|
||||
本仓开发遵循 Development-Guidelines(Dev 仓 `deps/development-guidelines`,gitlink 固定版本):
|
||||
本仓开发遵循 Development-Guidelines(由 Dev 固定规范来源;新布局见 Dev components.lock.json,规则目录 .workspace/Development-Guidelines;历史布局仍读原 gitlink):
|
||||
核心规则见其 `core/`,按任务触发阅读 `standards/` 专题;日常交付走 `workflows/delivery.md`。
|
||||
|
||||
## 任务启动门禁
|
||||
@@ -15,7 +15,7 @@
|
||||
## 仓内规则
|
||||
|
||||
- 模块边界、公开契约与隔离档位见 `policy/modules/`(如有)与 PROJECT.md。
|
||||
- 跨仓 gitlink 变更须经组合验证后在 Dev 仓推进;受保护分支经 PR 合入。
|
||||
- 跨仓语言依赖/应用源码锁变更须经固定组合验证后在消费方推进;源码提交到所属仓;受保护分支经 PR 合入。
|
||||
- 验证命令见 PROJECT.md「验证」节;完成声明须附实际命令输出证据。
|
||||
|
||||
## Gitea 与 Git 访问事实(2026-09-30 实测)
|
||||
|
||||
+12
-12
@@ -5,10 +5,10 @@
|
||||
## 仓库与操作
|
||||
|
||||
- 目标/产品边界:通用智能体小队编排底座。角色、蓝图、规划、执行引擎、黑板、HITL 与 HTTP/CLI 组合根。不含预设医疗器械角色或任务模板。不实现 Agent。
|
||||
- 源码、资产、文档、机器契约位置:Go 模块路径 `agent-squad`。包为 `squad`、`store`、`server`、`cli`、`textextract`、`conformance`。人类文档在根 `README.md`、`policy/`;过程记录在 `docs/records/`。对外 HTTP 错误合同以错误码库信封为准。
|
||||
- 源码、资产、文档、机器契约位置:Go 模块路径 `git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git`,adapters 与 cmd 目录各有独立模块。包为 `squad`、`store`、`server`、`cli`、`textextract`、`conformance`。人类文档在根 `README.md`、`policy/`;过程记录在 `docs/records/`。对外 HTTP 错误合同以错误码库信封为准。
|
||||
- 权威远端、集成基线、受保护分支:`ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-Squad.git`,集成基线 `main`。
|
||||
- 并行共同基线记录位置、合入通知/主动检查方式:Gitea Issue/PR。跨仓共同起点是本仓提交加上它锁定的 Agent-Native、错误码库、日志库与规范库 SHA。
|
||||
- 发布线与批准版本/实际制品查询入口:无独立制品库。可执行文件由 `go build` 从固定 gitlink 组合产出。
|
||||
- 并行共同基线记录位置、合入通知/主动检查方式:Gitea Issue/PR。跨仓共同起点是本仓提交加上各模块 `go.mod` / `go.sum` 锁定的依赖版本与规范库 SHA。
|
||||
- 发布线与批准版本/实际制品查询入口:无独立制品库。可执行文件由 `GOWORK=off go build` 从固定模块版本组合产出。
|
||||
- 提交/审核/合并/发布身份与权限:仓库所有者 weichen。
|
||||
- 任务唯一来源:Gitea `weichen/Agent-Squad` 的 Issue 与 Pull Request。
|
||||
- 规范性文档目录:`policy/`。
|
||||
@@ -20,21 +20,20 @@
|
||||
|
||||
| 逻辑 ID | 路径 | 角色 |
|
||||
|---|---|---|
|
||||
| agent-native | `deps/agent-native` | build-required |
|
||||
| agent-intent | `deps/agent-intent` | build-required,可选意图闸门(`squadintent` 适配器;未配置意图时行为与原实现一致) |
|
||||
| development-guidelines | `deps/development-guidelines` | development-only |
|
||||
| error-code-system | `deps/error-code-system` | build-required |
|
||||
| logging-system | `deps/logging-system` | build-required |
|
||||
| agent-native | `go.mod` / `go.sum` | build-required |
|
||||
| agent-intent | `go.mod` / `go.sum` | build-required,可选意图闸门(`squadintent` 适配器;未配置意图时行为与原实现一致) |
|
||||
| development-guidelines | Dev `.workspace/Development-Guidelines`(源码锁固定) | development-only |
|
||||
| error-code-system | `go.mod` / `go.sum` | build-required |
|
||||
| logging-system | `go.mod` / `go.sum` | build-required |
|
||||
|
||||
`go.mod` 的 `replace` 都指向 `./deps/`。嵌套在 `deps/agent-native/deps/`、`deps/agent-intent/deps/` 里的同名副本不参与本仓编译,提交必须与本仓 gitlink 一致(`scripts/submodule-consistency.sh`)。
|
||||
根模块及 `adapters/{native,intent,a2a,sqlite}`、`cmd/agent-squad` 分别固定真实模块版本,正式消费使用 `GOWORK=off` 且没有本地目录 `replace`。旧提交保留其 gitlinks 供历史组合和在途分支重建;本提交已移除已替代指针;本版本不消费其 Go 源码。
|
||||
|
||||
同一 run 的临界区在 unix 上额外持有 `runs/<id>/.lock` 的 flock,拿不到锁时返回 `ErrRunBusy`。非 unix 平台没有这把文件锁,只保留进程内互斥。
|
||||
|
||||
克隆:
|
||||
|
||||
```bash
|
||||
git clone --recurse-submodules ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-Squad.git
|
||||
# 已克隆时:git submodule update --init --recursive
|
||||
git clone ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-Squad.git
|
||||
```
|
||||
|
||||
## 验证命令
|
||||
@@ -42,7 +41,8 @@ git clone --recurse-submodules ssh://git@git-ssh.u1680832.nyat.app:31411/weichen
|
||||
| 影响 | 工作目录与真实命令/CI | 前提与不覆盖范围 |
|
||||
|---|---|---|
|
||||
| 文档 | 人工核对入口与相对链接 | 不证明运行时行为 |
|
||||
| 模块/接口 | 仓库根:`GOWORK=off go vet ./... && GOWORK=off go test -count=1 ./...` | 需要已初始化的 Agent-Native 子模块;默认 stub,不调用真实模型 |
|
||||
| 模块/接口 | 仓库根:`GOWORK=off go vet ./... && GOWORK=off go test -count=1 ./...` | 需要已配置私有模块传输;默认 stub,不调用真实模型 |
|
||||
| 嵌套模块 | 各 `adapters/*` 与 `cmd/agent-squad`:`GOWORK=off go vet ./... && GOWORK=off go test -count=1 ./... && GOWORK=off go build ./...` | 根目录 `./...` 不覆盖嵌套模块 |
|
||||
| 数据/权限/恢复 | conformance 与 store 测试覆盖运行落盘、HITL 恢复 | 无共享数据库 |
|
||||
| UI/执行后端 | `GOWORK=off go test -count=1 ./server/... ./conformance/...` | 不覆盖浏览器;SSE 由测试客户端验证 |
|
||||
|
||||
|
||||
@@ -7,31 +7,26 @@
|
||||
设计参考 Multica 的 agent orchestration 理念与 Agent-System `internal/squad`
|
||||
的成熟机制(黑板/沙箱工作区/顺序并行混合调度/动态调整),按"空表起步"通用化重写。
|
||||
|
||||
本仓库是该模块的源码位置。Go 模块路径为 `agent-squad`。依赖都在 `deps/`,由本仓 gitlink 固定,不随上游分支浮动:
|
||||
本仓库是该模块的源码位置。根 Go 模块路径为 `git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git`,核心编排不依赖 Agent-Native 或产品类型。执行、意图、A2A、SQLite 和 CLI 组合分别位于独立嵌套模块:
|
||||
|
||||
| 路径 | 作用 |
|
||||
| 模块后缀 | 作用 |
|
||||
|---|---|
|
||||
| `deps/agent-native` | 智能体执行。`replace agent-native => ./deps/agent-native` |
|
||||
| `deps/error-code-system` | HTTP 错误信封与规范码 |
|
||||
| `deps/logging-system` | 组合根日志。`trace_id` 来自 `X-Trace-Id`,`run_id` 标识一次编排 |
|
||||
| `deps/development-guidelines` | 开发规范,不参与编译 |
|
||||
| 根模块 | 核心编排、契约、文件存储、HTTP 与行为验收;依赖错误码库 |
|
||||
| `/adapters/native` | Agent-Native 执行与模型规划器接入 |
|
||||
| `/adapters/intent` | Agent-Intent 意图闸门 |
|
||||
| `/adapters/a2a` | A2A 适配 |
|
||||
| `/adapters/sqlite` | SQLite 存储适配 |
|
||||
| `/cmd/agent-squad` | CLI 组合根,消费上述需要的适配模块 |
|
||||
|
||||
Agent-Native 自己的 `deps/` 里还有一份错误码库、日志库和规范。本仓编译只使用本仓 `go.mod` 的 `replace`,嵌套目录里的 `replace` 不生效。`scripts/submodule-consistency.sh` 要求两侧 gitlink 相同,避免两份副本锁到不同提交。
|
||||
各模块的 `go.mod` / `go.sum` 固定可从远端获取的提交版本;正式消费使用 `GOWORK=off`,没有本地目录 `replace`。私有获取通过 Dev 的进程级传输配置接入,不修改全局 Git 配置。
|
||||
|
||||
克隆时带上子模块,否则无法编译。已有克隆若仍留着根目录 `Agent-Native`,先删掉该残留目录再初始化:
|
||||
|
||||
```bash
|
||||
git clone --recurse-submodules ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-Squad.git
|
||||
# 已克隆时:
|
||||
git submodule sync --recursive
|
||||
git submodule update --init --recursive
|
||||
```
|
||||
旧提交保留其 gitlinks 供历史组合和在途分支重建;本提交已移除已替代指针;本版本 Go 编译不消费其中源码。开发规范由 Dev components.lock.json 固定。本地源码联调通过 Dev 的显式组件链接管理;迁移在途分支时只改 import 与模块前缀,不改后端名、运行记录或协议标识。
|
||||
|
||||
## 与周边仓库的关系
|
||||
|
||||
| 仓库/模块 | 关系 |
|
||||
|---|---|
|
||||
| Agent-Native(本仓 submodule `deps/agent-native`) | **智能体执行的唯一来源**:角色执行经 agent-native `adapters/native`(自研内核 runtime 循环 + 工作区工具)或产品注册的其他 agent-native 后端(如 pi-agent);LLM 规划器复用 `runtime/llm` 客户端做编排决策。本库不实现任何 Agent——只做编排与任务拆解。依赖方向 agent-squad → agent-native,反向无依赖 |
|
||||
| Agent-Native(版本依赖,由 `/adapters/native` 接入) | **智能体执行的唯一来源**:角色执行经 agent-native `adapters/native`(自研内核 runtime 循环 + 工作区工具)或产品注册的其他 agent-native 后端(如 pi-agent);LLM 规划器复用 `runtime/llm` 客户端做编排决策。本库不实现任何 Agent——只做编排与任务拆解。依赖方向 agent-squad → agent-native,反向无依赖 |
|
||||
| `agent-system-multi/modules/squad`(U4 产品小队暂存仓) | **不在本仓**,互不依赖。产品小队含医疗器械预设角色与任务键,属产品层;后续产品仓接入本底座时,预设角色/任务模板改为向本底座注册(独立一期) |
|
||||
| 主仓 `internal/squad` | 机制语义(工作流驱动/黑板/子工作区/防篡改清单)的权威来源;本底座为通用化重写,不做逐行同步 |
|
||||
|
||||
@@ -39,7 +34,7 @@ git submodule update --init --recursive
|
||||
|
||||
| 包 | 职责 | 依赖边界 |
|
||||
|---|---|---|
|
||||
| squad | 核心库:契约(模型/HITL)、角色注册表、蓝图注册表、规划器(rule/llm/mock)、执行引擎、黑板、沙箱工作区、事件 | 依赖 agent-native(exec + runtime/llm);不依赖任何产品类型/DB |
|
||||
| squad | 核心库:契约(模型/HITL)、角色注册表、蓝图注册表、规划器、执行引擎、黑板、沙箱工作区、事件 | 执行与模型端口由宿主/适配器注入;不依赖 Agent-Native、产品类型或 DB |
|
||||
| store | 文件持久化:roles.d/*.json、blueprints.d/*.json | 只依赖 squad 契约;无 DB |
|
||||
| server | HTTP API(REST + SSE) | 组合根之一,可独立 serve |
|
||||
| cli | CLI:serve / role / blueprint / run / runs / demo | 组合根之一 |
|
||||
@@ -188,10 +183,11 @@ LLM 配置走环境变量:`AGENT_SQUAD_LLM_BASE_URL` / `AGENT_SQUAD_LLM_API_KE
|
||||
|
||||
## 快速开始
|
||||
|
||||
在仓库根目录(需已初始化 `deps/` 下的子模块):
|
||||
在独立 cmd/agent-squad 模块(使用远端固定依赖):
|
||||
|
||||
```bash
|
||||
go build -o agent-squad .
|
||||
cd cmd/agent-squad
|
||||
GOWORK=off go build -mod=readonly -o agent-squad .
|
||||
./agent-squad demo # ① 离线全链路演示
|
||||
./agent-squad role add --role researcher --backend stub --keywords "调研,市场"
|
||||
./agent-squad run "调研 X 并产出报告" # ② 终端交互式 HITL(stub 后端)
|
||||
@@ -206,7 +202,9 @@ go build -o agent-squad .
|
||||
|
||||
```bash
|
||||
GOWORK=off go vet ./... && GOWORK=off go test -count=1 ./...
|
||||
./scripts/submodule-consistency.sh
|
||||
for dir in . adapters/native adapters/intent adapters/a2a adapters/sqlite cmd/agent-squad; do
|
||||
(cd "$dir" && GOWORK=off go test -mod=readonly ./...) || exit
|
||||
done
|
||||
```
|
||||
|
||||
当前全绿(conformance 全链路 + HITL 各挂起点 + server + store + textextract)。
|
||||
结果以当前提交的实际命令和 CI 输出为准;根模块检查不包含嵌套模块。
|
||||
|
||||
@@ -19,7 +19,7 @@ import (
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"agent-squad/squad"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git/squad"
|
||||
)
|
||||
|
||||
// ProtocolVersion 对齐的 A2A 协议版本。
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"agent-squad/squad"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git/squad"
|
||||
)
|
||||
|
||||
// conformance_test.go — Q3 WP4 验收:双向 conformance(本地假 A2A 服务端)。
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"agent-squad/squad"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git/squad"
|
||||
)
|
||||
|
||||
// executor.go — 远端智能体 Executor 客户端(A2A 任务状态机对齐 ExecResult)。
|
||||
|
||||
+3
-7
@@ -1,11 +1,7 @@
|
||||
module agent-squad/adapters/a2a
|
||||
module git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git/adapters/a2a
|
||||
|
||||
go 1.27
|
||||
|
||||
require agent-squad v0.0.0
|
||||
require git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git v0.0.0-20261013153617-d2fea7e17310
|
||||
|
||||
require error-code-system v0.0.0 // indirect
|
||||
|
||||
replace agent-squad => ../..
|
||||
|
||||
replace error-code-system => ../../deps/error-code-system
|
||||
require git-ssh.u1680832.nyat.app/weichen/Error-Code-System.git v0.0.0-20261013150648-28d2d5074347 // indirect
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git v0.0.0-20261013153617-d2fea7e17310 h1:EGf61S8qt8pw8NNQceeVfzJZ9soyGjnVFEv+jbBHuog=
|
||||
git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git v0.0.0-20261013153617-d2fea7e17310/go.mod h1:WRNAbaAaumPt7pe0Wg/2SxajcUc6IVZoBd7VJEe0tqk=
|
||||
git-ssh.u1680832.nyat.app/weichen/Error-Code-System.git v0.0.0-20261013150648-28d2d5074347 h1:mESnwe9ZpZqpLoGPzLyCWEmXDHKm7ouKC8qpF8EztEQ=
|
||||
git-ssh.u1680832.nyat.app/weichen/Error-Code-System.git v0.0.0-20261013150648-28d2d5074347/go.mod h1:b8CDy31Xo3uRzAhA3HldwcgNnk0x5Lb02osIb9ewJ3A=
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"agent-squad/squad"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git/squad"
|
||||
)
|
||||
|
||||
// Catalog 把识别快照渲染为 squad 的能力目录数据视图(规划者提示词 + 计划校验用)。
|
||||
|
||||
@@ -6,8 +6,8 @@ import (
|
||||
"testing"
|
||||
"testing/fstest"
|
||||
|
||||
"agent-intent/intent"
|
||||
"agent-squad/squad"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Agent-Intent.git/intent"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git/squad"
|
||||
)
|
||||
|
||||
// catalogFS:带槽位(label/question/enum)的可调用能力 + 守卫。
|
||||
|
||||
@@ -16,8 +16,8 @@ import (
|
||||
"context"
|
||||
"io/fs"
|
||||
|
||||
"agent-intent/intent"
|
||||
"agent-squad/squad"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Agent-Intent.git/intent"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git/squad"
|
||||
)
|
||||
|
||||
// Options 闸门构造选项。
|
||||
|
||||
@@ -6,8 +6,8 @@ import (
|
||||
"testing"
|
||||
"testing/fstest"
|
||||
|
||||
"agent-intent/intent"
|
||||
"agent-squad/squad"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Agent-Intent.git/intent"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git/squad"
|
||||
)
|
||||
|
||||
func gateOptions() Options {
|
||||
|
||||
+5
-13
@@ -1,22 +1,14 @@
|
||||
module agent-squad/adapters/intent
|
||||
module git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git/adapters/intent
|
||||
|
||||
go 1.27
|
||||
|
||||
require (
|
||||
agent-intent v0.0.0
|
||||
agent-squad v0.0.0
|
||||
git-ssh.u1680832.nyat.app/weichen/Agent-Intent.git v0.0.0-20261013153611-3a8468c83a80
|
||||
git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git v0.0.0-20261013153617-d2fea7e17310
|
||||
)
|
||||
|
||||
require (
|
||||
error-code-system v0.0.0 // indirect
|
||||
git-ssh.u1680832.nyat.app/weichen/Error-Code-System.git v0.0.0-20261013150648-28d2d5074347 // indirect
|
||||
git-ssh.u1680832.nyat.app/weichen/Logging-System.git v0.0.0-20261013150647-9c5442f06d05 // indirect
|
||||
golang.org/x/text v0.29.0 // indirect
|
||||
logging-system v0.0.0 // indirect
|
||||
)
|
||||
|
||||
replace agent-intent => ../../deps/agent-intent
|
||||
|
||||
replace agent-squad => ../..
|
||||
|
||||
replace error-code-system => ../../deps/error-code-system
|
||||
|
||||
replace logging-system => ../../deps/logging-system
|
||||
|
||||
@@ -1,2 +1,10 @@
|
||||
git-ssh.u1680832.nyat.app/weichen/Agent-Intent.git v0.0.0-20261013153611-3a8468c83a80 h1:MMYfIibHvQFqINaM9Hy0SQKivb3ofzyfUo2wMpacWIg=
|
||||
git-ssh.u1680832.nyat.app/weichen/Agent-Intent.git v0.0.0-20261013153611-3a8468c83a80/go.mod h1:idJ6YUupl8JapXrwk4x5hVaqemp7c7x6f2Qf2ezCpz0=
|
||||
git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git v0.0.0-20261013153617-d2fea7e17310 h1:EGf61S8qt8pw8NNQceeVfzJZ9soyGjnVFEv+jbBHuog=
|
||||
git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git v0.0.0-20261013153617-d2fea7e17310/go.mod h1:WRNAbaAaumPt7pe0Wg/2SxajcUc6IVZoBd7VJEe0tqk=
|
||||
git-ssh.u1680832.nyat.app/weichen/Error-Code-System.git v0.0.0-20261013150648-28d2d5074347 h1:mESnwe9ZpZqpLoGPzLyCWEmXDHKm7ouKC8qpF8EztEQ=
|
||||
git-ssh.u1680832.nyat.app/weichen/Error-Code-System.git v0.0.0-20261013150648-28d2d5074347/go.mod h1:b8CDy31Xo3uRzAhA3HldwcgNnk0x5Lb02osIb9ewJ3A=
|
||||
git-ssh.u1680832.nyat.app/weichen/Logging-System.git v0.0.0-20261013150647-9c5442f06d05 h1:gtFuWlGr7GlpEkuoIfIw6f/uXHUlYXlHU2qgLWAV46Y=
|
||||
git-ssh.u1680832.nyat.app/weichen/Logging-System.git v0.0.0-20261013150647-9c5442f06d05/go.mod h1:Jg/bDRsd1/g5YjIoEUYkCsTgJOrTolYccfyb/tc57Dk=
|
||||
golang.org/x/text v0.29.0 h1:1neNs90w9YzJ9BocxfsQNHKuAT4pkghyXc4nhZ6sJvk=
|
||||
golang.org/x/text v0.29.0/go.mod h1:7MhJOA9CD2qZyOKYazxdYMF85OwPdEr9jTtBpO7ydH4=
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"agent-squad/squad"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git/squad"
|
||||
)
|
||||
|
||||
// integrationScriptBackend 脚本回放后端(与 squad 测试同构,走 agent-native exec 端口)。
|
||||
|
||||
+5
-13
@@ -1,21 +1,13 @@
|
||||
module agent-squad/adapters/native
|
||||
module git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git/adapters/native
|
||||
|
||||
go 1.27
|
||||
|
||||
require (
|
||||
agent-native v0.0.0
|
||||
agent-squad v0.0.0
|
||||
git-ssh.u1680832.nyat.app/weichen/Agent-Native.git v0.0.0-20261013153610-6ddd3da8df5c
|
||||
git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git v0.0.0-20261013153617-d2fea7e17310
|
||||
)
|
||||
|
||||
require (
|
||||
error-code-system v0.0.0 // indirect
|
||||
logging-system v0.0.0 // indirect
|
||||
git-ssh.u1680832.nyat.app/weichen/Error-Code-System.git v0.0.0-20261013150648-28d2d5074347 // indirect
|
||||
git-ssh.u1680832.nyat.app/weichen/Logging-System.git v0.0.0-20261013150647-9c5442f06d05 // indirect
|
||||
)
|
||||
|
||||
replace agent-native => ../../deps/agent-native
|
||||
|
||||
replace agent-squad => ../..
|
||||
|
||||
replace error-code-system => ../../deps/error-code-system
|
||||
|
||||
replace logging-system => ../../deps/logging-system
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
git-ssh.u1680832.nyat.app/weichen/Agent-Native.git v0.0.0-20261013153610-6ddd3da8df5c h1:9FwMbsjF1qdnH/JANKZSYDXyHBd6H2tEo1z2cdPldds=
|
||||
git-ssh.u1680832.nyat.app/weichen/Agent-Native.git v0.0.0-20261013153610-6ddd3da8df5c/go.mod h1:hONk3TC2TIn8Us+AcvoDCkBnIDAh1Aj/nevo9tJcZv4=
|
||||
git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git v0.0.0-20261013153617-d2fea7e17310 h1:EGf61S8qt8pw8NNQceeVfzJZ9soyGjnVFEv+jbBHuog=
|
||||
git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git v0.0.0-20261013153617-d2fea7e17310/go.mod h1:WRNAbaAaumPt7pe0Wg/2SxajcUc6IVZoBd7VJEe0tqk=
|
||||
git-ssh.u1680832.nyat.app/weichen/Error-Code-System.git v0.0.0-20261013150648-28d2d5074347 h1:mESnwe9ZpZqpLoGPzLyCWEmXDHKm7ouKC8qpF8EztEQ=
|
||||
git-ssh.u1680832.nyat.app/weichen/Error-Code-System.git v0.0.0-20261013150648-28d2d5074347/go.mod h1:b8CDy31Xo3uRzAhA3HldwcgNnk0x5Lb02osIb9ewJ3A=
|
||||
git-ssh.u1680832.nyat.app/weichen/Logging-System.git v0.0.0-20261013150647-9c5442f06d05 h1:gtFuWlGr7GlpEkuoIfIw6f/uXHUlYXlHU2qgLWAV46Y=
|
||||
git-ssh.u1680832.nyat.app/weichen/Logging-System.git v0.0.0-20261013150647-9c5442f06d05/go.mod h1:Jg/bDRsd1/g5YjIoEUYkCsTgJOrTolYccfyb/tc57Dk=
|
||||
+10
-10
@@ -7,16 +7,16 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
nativexec "agent-native/adapters/native"
|
||||
"agent-native/exec"
|
||||
"agent-native/runtime"
|
||||
"agent-native/runtime/checkpoint"
|
||||
"agent-native/runtime/hooks"
|
||||
"agent-native/runtime/llm"
|
||||
"agent-native/runtime/mcp"
|
||||
"agent-native/runtime/subagent"
|
||||
"agent-native/runtime/tools"
|
||||
"agent-squad/squad"
|
||||
nativexec "git-ssh.u1680832.nyat.app/weichen/Agent-Native.git/adapters/native"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Agent-Native.git/exec"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Agent-Native.git/runtime"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Agent-Native.git/runtime/checkpoint"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Agent-Native.git/runtime/hooks"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Agent-Native.git/runtime/llm"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Agent-Native.git/runtime/mcp"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Agent-Native.git/runtime/subagent"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Agent-Native.git/runtime/tools"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git/squad"
|
||||
)
|
||||
|
||||
// Config 是组合根交给 agent-native 后端的装配。零值只做模型执行。
|
||||
|
||||
@@ -4,9 +4,9 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"agent-native/runtime/llm"
|
||||
"agent-native/runtime/tools"
|
||||
"agent-squad/squad"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Agent-Native.git/runtime/llm"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Agent-Native.git/runtime/tools"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git/squad"
|
||||
)
|
||||
|
||||
func TestBuildOptionsBashPermissionGating(t *testing.T) {
|
||||
|
||||
+3
-13
@@ -1,15 +1,14 @@
|
||||
module agent-squad/adapters/sqlite
|
||||
module git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git/adapters/sqlite
|
||||
|
||||
go 1.27
|
||||
|
||||
require (
|
||||
agent-native v0.0.0
|
||||
agent-squad v0.0.0
|
||||
git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git v0.0.0-20261013153617-d2fea7e17310
|
||||
modernc.org/sqlite v1.37.0
|
||||
)
|
||||
|
||||
require (
|
||||
error-code-system v0.0.0 // indirect
|
||||
git-ssh.u1680832.nyat.app/weichen/Error-Code-System.git v0.0.0-20261013150648-28d2d5074347 // indirect
|
||||
github.com/dustin/go-humanize v1.0.1 // indirect
|
||||
github.com/google/uuid v1.6.0 // indirect
|
||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||
@@ -17,16 +16,7 @@ require (
|
||||
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
|
||||
golang.org/x/exp v0.0.0-20250305212735-054e65f0b394 // indirect
|
||||
golang.org/x/sys v0.31.0 // indirect
|
||||
logging-system v0.0.0 // indirect
|
||||
modernc.org/libc v1.62.1 // indirect
|
||||
modernc.org/mathutil v1.7.1 // indirect
|
||||
modernc.org/memory v1.9.1 // indirect
|
||||
)
|
||||
|
||||
replace agent-native => ../../deps/agent-native
|
||||
|
||||
replace agent-squad => ../..
|
||||
|
||||
replace error-code-system => ../../deps/error-code-system
|
||||
|
||||
replace logging-system => ../../deps/logging-system
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git v0.0.0-20261013153617-d2fea7e17310 h1:EGf61S8qt8pw8NNQceeVfzJZ9soyGjnVFEv+jbBHuog=
|
||||
git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git v0.0.0-20261013153617-d2fea7e17310/go.mod h1:WRNAbaAaumPt7pe0Wg/2SxajcUc6IVZoBd7VJEe0tqk=
|
||||
git-ssh.u1680832.nyat.app/weichen/Error-Code-System.git v0.0.0-20261013150648-28d2d5074347 h1:mESnwe9ZpZqpLoGPzLyCWEmXDHKm7ouKC8qpF8EztEQ=
|
||||
git-ssh.u1680832.nyat.app/weichen/Error-Code-System.git v0.0.0-20261013150648-28d2d5074347/go.mod h1:b8CDy31Xo3uRzAhA3HldwcgNnk0x5Lb02osIb9ewJ3A=
|
||||
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
|
||||
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
|
||||
github.com/google/pprof v0.0.0-20250317173921-a4b03ec1a45e h1:ijClszYn+mADRFY17kjQEVQ1XRhq2/JR1M3sGqeJoxs=
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
agentsquad "agent-squad/squad"
|
||||
agentsquad "git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git/squad"
|
||||
)
|
||||
|
||||
func TestOrchestrationFlow(t *testing.T) {
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"agent-squad/squad"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git/squad"
|
||||
)
|
||||
|
||||
// SQLiteStore 把 squad 的 Store 端口落到本库(Q1 WP5):run/gate/checkpoint/leader
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"agent-squad/squad"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git/squad"
|
||||
)
|
||||
|
||||
func newTestRunState(wsDir string) *squad.RunState {
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"agent-squad/squad"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git/squad"
|
||||
)
|
||||
|
||||
// CLICommands are the external tools a daemon probes, in order.
|
||||
|
||||
@@ -3,7 +3,7 @@ package platform
|
||||
import (
|
||||
"context"
|
||||
|
||||
"agent-squad/squad"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git/squad"
|
||||
)
|
||||
|
||||
// stubExecutor 是测试用的 squad.Executor(X6 后调用方经端口注入)。
|
||||
|
||||
@@ -15,16 +15,16 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"agent-native/runtime/llm"
|
||||
squadintent "agent-squad/adapters/intent"
|
||||
nativeadp "agent-squad/adapters/native"
|
||||
platform "agent-squad/adapters/sqlite"
|
||||
"agent-squad/cmd/agent-squad/server"
|
||||
"agent-squad/squad"
|
||||
"agent-squad/store"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Agent-Native.git/runtime/llm"
|
||||
squadintent "git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git/adapters/intent"
|
||||
nativeadp "git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git/adapters/native"
|
||||
platform "git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git/adapters/sqlite"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git/cmd/agent-squad/server"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git/squad"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git/store"
|
||||
|
||||
"logging-system/config"
|
||||
"logging-system/logsys"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Logging-System.git/config"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Logging-System.git/logsys"
|
||||
)
|
||||
|
||||
// Main CLI 入口;返回进程退出码。
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"agent-squad/squad"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git/squad"
|
||||
)
|
||||
|
||||
// demoBackend 脚本化后端:按子工作区目录名回放预设产出(离线演示/测试)。
|
||||
|
||||
@@ -9,8 +9,8 @@ import (
|
||||
"path/filepath"
|
||||
"time"
|
||||
|
||||
platform "agent-squad/adapters/sqlite"
|
||||
"agent-squad/squad"
|
||||
platform "git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git/adapters/sqlite"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git/squad"
|
||||
)
|
||||
|
||||
func cmdPlatform(args []string) int {
|
||||
|
||||
@@ -11,8 +11,8 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"agent-squad/squad"
|
||||
"agent-squad/store"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git/squad"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git/store"
|
||||
)
|
||||
|
||||
// replayBackend 按"子目录名→target→内容"回放产出。
|
||||
|
||||
+9
-25
@@ -1,19 +1,19 @@
|
||||
module agent-squad/cmd/agent-squad
|
||||
module git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git/cmd/agent-squad
|
||||
|
||||
go 1.27
|
||||
|
||||
require (
|
||||
agent-native v0.0.0
|
||||
agent-squad v0.0.0
|
||||
agent-squad/adapters/intent v0.0.0
|
||||
agent-squad/adapters/native v0.0.0
|
||||
agent-squad/adapters/sqlite v0.0.0
|
||||
error-code-system v0.0.0
|
||||
logging-system v0.0.0
|
||||
git-ssh.u1680832.nyat.app/weichen/Agent-Native.git v0.0.0-20261013153610-6ddd3da8df5c
|
||||
git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git v0.0.0-20261013154230-ed0952e08fd7
|
||||
git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git/adapters/intent v0.0.0-20261013154230-ed0952e08fd7
|
||||
git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git/adapters/native v0.0.0-20261013154230-ed0952e08fd7
|
||||
git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git/adapters/sqlite v0.0.0-20261013154230-ed0952e08fd7
|
||||
git-ssh.u1680832.nyat.app/weichen/Error-Code-System.git v0.0.0-20261013150648-28d2d5074347
|
||||
git-ssh.u1680832.nyat.app/weichen/Logging-System.git v0.0.0-20261013150647-9c5442f06d05
|
||||
)
|
||||
|
||||
require (
|
||||
agent-intent v0.0.0 // indirect
|
||||
git-ssh.u1680832.nyat.app/weichen/Agent-Intent.git v0.0.0-20261013153611-3a8468c83a80 // indirect
|
||||
github.com/dustin/go-humanize v1.0.1 // indirect
|
||||
github.com/google/uuid v1.6.0 // indirect
|
||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||
@@ -27,19 +27,3 @@ require (
|
||||
modernc.org/memory v1.9.1 // indirect
|
||||
modernc.org/sqlite v1.37.0 // indirect
|
||||
)
|
||||
|
||||
replace agent-intent => ../../deps/agent-intent
|
||||
|
||||
replace agent-native => ../../deps/agent-native
|
||||
|
||||
replace agent-squad => ../..
|
||||
|
||||
replace agent-squad/adapters/intent => ../../adapters/intent
|
||||
|
||||
replace agent-squad/adapters/native => ../../adapters/native
|
||||
|
||||
replace agent-squad/adapters/sqlite => ../../adapters/sqlite
|
||||
|
||||
replace error-code-system => ../../deps/error-code-system
|
||||
|
||||
replace logging-system => ../../deps/logging-system
|
||||
|
||||
@@ -1,3 +1,19 @@
|
||||
git-ssh.u1680832.nyat.app/weichen/Agent-Intent.git v0.0.0-20261013153611-3a8468c83a80 h1:MMYfIibHvQFqINaM9Hy0SQKivb3ofzyfUo2wMpacWIg=
|
||||
git-ssh.u1680832.nyat.app/weichen/Agent-Intent.git v0.0.0-20261013153611-3a8468c83a80/go.mod h1:idJ6YUupl8JapXrwk4x5hVaqemp7c7x6f2Qf2ezCpz0=
|
||||
git-ssh.u1680832.nyat.app/weichen/Agent-Native.git v0.0.0-20261013153610-6ddd3da8df5c h1:9FwMbsjF1qdnH/JANKZSYDXyHBd6H2tEo1z2cdPldds=
|
||||
git-ssh.u1680832.nyat.app/weichen/Agent-Native.git v0.0.0-20261013153610-6ddd3da8df5c/go.mod h1:hONk3TC2TIn8Us+AcvoDCkBnIDAh1Aj/nevo9tJcZv4=
|
||||
git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git v0.0.0-20261013154230-ed0952e08fd7 h1:V0WHk7KWxUIF3nzYhQmlx72WhSZ1IjQuhALDgh4MTgE=
|
||||
git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git v0.0.0-20261013154230-ed0952e08fd7/go.mod h1:WRNAbaAaumPt7pe0Wg/2SxajcUc6IVZoBd7VJEe0tqk=
|
||||
git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git/adapters/intent v0.0.0-20261013154230-ed0952e08fd7 h1:YzC2Rj4xUFUqJ8ULk9sXNYm1EaJH25odSqLtu1upiok=
|
||||
git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git/adapters/intent v0.0.0-20261013154230-ed0952e08fd7/go.mod h1:0SfcOgGFywzSSUtxBah+tUM5Pq3WsYmoNlgcW9KP++I=
|
||||
git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git/adapters/native v0.0.0-20261013154230-ed0952e08fd7 h1:l5ZotXZWDje0uBlQhOA+VSieCCGC5fkS5XPqulX7inw=
|
||||
git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git/adapters/native v0.0.0-20261013154230-ed0952e08fd7/go.mod h1:+MOrRWwFOPs1F5LCAPR3pW5yqPoLKJtB6sWHsN54VN4=
|
||||
git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git/adapters/sqlite v0.0.0-20261013154230-ed0952e08fd7 h1:NPh8C0CHXgroZNJoDtF0lTVZYoNK+S+XLhL5Hwxdl3c=
|
||||
git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git/adapters/sqlite v0.0.0-20261013154230-ed0952e08fd7/go.mod h1:kd9PIXYo9FQo9ZWMdR+JbguEZzcyNE36kxqR7XcblKw=
|
||||
git-ssh.u1680832.nyat.app/weichen/Error-Code-System.git v0.0.0-20261013150648-28d2d5074347 h1:mESnwe9ZpZqpLoGPzLyCWEmXDHKm7ouKC8qpF8EztEQ=
|
||||
git-ssh.u1680832.nyat.app/weichen/Error-Code-System.git v0.0.0-20261013150648-28d2d5074347/go.mod h1:b8CDy31Xo3uRzAhA3HldwcgNnk0x5Lb02osIb9ewJ3A=
|
||||
git-ssh.u1680832.nyat.app/weichen/Logging-System.git v0.0.0-20261013150647-9c5442f06d05 h1:gtFuWlGr7GlpEkuoIfIw6f/uXHUlYXlHU2qgLWAV46Y=
|
||||
git-ssh.u1680832.nyat.app/weichen/Logging-System.git v0.0.0-20261013150647-9c5442f06d05/go.mod h1:Jg/bDRsd1/g5YjIoEUYkCsTgJOrTolYccfyb/tc57Dk=
|
||||
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
|
||||
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
|
||||
github.com/google/pprof v0.0.0-20250317173921-a4b03ec1a45e h1:ijClszYn+mADRFY17kjQEVQ1XRhq2/JR1M3sGqeJoxs=
|
||||
|
||||
@@ -4,7 +4,7 @@ package main
|
||||
import (
|
||||
"os"
|
||||
|
||||
"agent-squad/cmd/agent-squad/cli"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git/cmd/agent-squad/cli"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
@@ -6,8 +6,8 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"agent-squad/squad"
|
||||
"agent-squad/store"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git/squad"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git/store"
|
||||
)
|
||||
|
||||
func TestMissingTokenIsUnauthorized(t *testing.T) {
|
||||
|
||||
@@ -15,16 +15,16 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
platform "agent-squad/adapters/sqlite"
|
||||
"agent-squad/squad"
|
||||
"agent-squad/store"
|
||||
platform "git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git/adapters/sqlite"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git/squad"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git/store"
|
||||
|
||||
"error-code-system/errcode"
|
||||
"error-code-system/httpx"
|
||||
"logging-system/logsys"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Error-Code-System.git/errcode"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Error-Code-System.git/httpx"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Logging-System.git/logsys"
|
||||
|
||||
// 导入 domains 才会把种子码填进 errcode.Default。
|
||||
_ "error-code-system/domains"
|
||||
_ "git-ssh.u1680832.nyat.app/weichen/Error-Code-System.git/domains"
|
||||
)
|
||||
|
||||
// Server HTTP 服务。
|
||||
|
||||
@@ -13,11 +13,11 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"agent-squad/squad"
|
||||
"agent-squad/store"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git/squad"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git/store"
|
||||
|
||||
"error-code-system/httpx"
|
||||
"logging-system/logsys"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Error-Code-System.git/httpx"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Logging-System.git/logsys"
|
||||
)
|
||||
|
||||
type scriptBackend struct{ script map[string]map[string]string }
|
||||
|
||||
Vendored
-1
Submodule deps/agent-intent deleted from 343b1e6d9a
Vendored
-1
Submodule deps/agent-native deleted from c348441691
Vendored
-1
Submodule deps/development-guidelines deleted from 26b562d2e3
Vendored
-1
Submodule deps/error-code-system deleted from a3ee67bba2
Vendored
-1
Submodule deps/logging-system deleted from 49b5d8be60
@@ -1,7 +1,5 @@
|
||||
module agent-squad
|
||||
module git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git
|
||||
|
||||
go 1.27
|
||||
|
||||
require error-code-system v0.0.0
|
||||
|
||||
replace error-code-system => ./deps/error-code-system
|
||||
require git-ssh.u1680832.nyat.app/weichen/Error-Code-System.git v0.0.0-20261013150648-28d2d5074347
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
git-ssh.u1680832.nyat.app/weichen/Error-Code-System.git v0.0.0-20261013150648-28d2d5074347 h1:mESnwe9ZpZqpLoGPzLyCWEmXDHKm7ouKC8qpF8EztEQ=
|
||||
git-ssh.u1680832.nyat.app/weichen/Error-Code-System.git v0.0.0-20261013150648-28d2d5074347/go.mod h1:b8CDy31Xo3uRzAhA3HldwcgNnk0x5Lb02osIb9ewJ3A=
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"agent-squad/squad"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git/squad"
|
||||
)
|
||||
|
||||
func TestSamplesRoundTrip(t *testing.T) {
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"sync"
|
||||
|
||||
"error-code-system/errcode"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Error-Code-System.git/errcode"
|
||||
)
|
||||
|
||||
// BackendFactory 按角色构造后端:角色级 Model/ToolProfile 在工厂闭包层绑定
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"error-code-system/errcode"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Error-Code-System.git/errcode"
|
||||
)
|
||||
|
||||
// Options 引擎组装选项(组合根装配;库内零产品依赖)。
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"error-code-system/errcode"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Error-Code-System.git/errcode"
|
||||
)
|
||||
|
||||
// flowDriver 工作流驱动器:推进 RunState 直到终态或 HITL 挂起边界。
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"agent-squad/textextract"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git/textextract"
|
||||
)
|
||||
|
||||
// WorkspaceEngine 任务级沙箱工作区引擎。布局与产品 squad 工作区兼容:
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"agent-squad/squad"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git/squad"
|
||||
)
|
||||
|
||||
// FileEventSink 事件持久化装饰器:把引擎事件按行追加到
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"agent-squad/squad"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git/squad"
|
||||
)
|
||||
|
||||
func TestFileEventSinkPersistAndRedact(t *testing.T) {
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
"agent-squad/squad"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git/squad"
|
||||
)
|
||||
|
||||
func TestR2EventSeqContinuesAfterRestart(t *testing.T) {
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ import (
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"agent-squad/squad"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git/squad"
|
||||
)
|
||||
|
||||
// FileStore 数据目录级文件存储。
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ import (
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
"agent-squad/squad"
|
||||
"git-ssh.u1680832.nyat.app/weichen/Agent-Squad.git/squad"
|
||||
)
|
||||
|
||||
func TestRolesPersistAcrossReload(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user