From bc910464006dc61966f769e6484834142ba48112 Mon Sep 17 00:00:00 2001 From: SaladDay <1203511142@qq.com> Date: Wed, 30 Sep 2026 09:09:22 +0000 Subject: [PATCH] Remove retired setting diagnostics and product-derived Web names --- CONTRIBUTING.md | 2 +- .../internal/cli/retired_configuration.go | 76 -------- .../cli/retired_configuration_test.go | 38 ---- apps/daemon/internal/cli/root.go | 3 - .../sessions/items/ApplyPatchDiffViewer.tsx | 26 +-- .../features/sessions/items/ItemRenderers.tsx | 4 +- .../sessions/items/apply-patch.test.tsx | 16 +- .../features/sessions/items/apply-patch.ts | 2 +- .../src/features/sessions/trace/TraceView.tsx | 4 +- apps/web/src/lib/vite-auth.test.ts | 8 - apps/web/src/lib/vite-config.test.ts | 7 - apps/web/src/lib/vite-settings.test.ts | 39 ---- apps/web/src/style.css | 64 +++---- apps/web/src/styles/system.css | 4 +- apps/web/vite-settings.ts | 26 --- apps/web/vite.config.ts | 2 - contracts/agents-api/sandbox-deployment.md | 25 +-- .../retired_provider_configuration_test.go | 32 ---- internal/obs/log/retired.go | 16 -- internal/obs/log/retired_test.go | 29 --- scripts/build-core-release.sh | 5 - scripts/name-allowlist.json | 180 ------------------ services/core/IMPLEMENTATION.md | 7 +- services/core/README.md | 13 +- services/core/cmd/sandbox-node/main.go | 4 - services/core/cmd/sandbox-node/main_test.go | 9 - services/core/cmd/server/managed_nodes.go | 3 - .../core/cmd/server/managed_setup_test.go | 8 - .../core/cmd/server/process_configuration.go | 44 ----- .../cmd/server/process_configuration_test.go | 71 ------- services/core/deploy/codex/README.md | 2 - services/core/deploy/microsandbox/README.md | 2 +- .../core/internal/api/installation_test.go | 4 +- .../internal/api/sandbox_deployment_setup.go | 20 -- .../api/sandbox_node_configuration.go | 5 - .../api/sandbox_node_configuration_test.go | 26 --- .../core/internal/databaseurl/databaseurl.go | 11 -- .../internal/databaseurl/databaseurl_test.go | 18 -- services/web/auth_test.go | 4 +- services/web/config.go | 29 --- services/web/config_test.go | 52 ----- 41 files changed, 70 insertions(+), 870 deletions(-) delete mode 100644 apps/daemon/internal/cli/retired_configuration.go delete mode 100644 apps/daemon/internal/cli/retired_configuration_test.go delete mode 100644 apps/web/src/lib/vite-settings.test.ts delete mode 100644 apps/web/vite-settings.ts delete mode 100644 internal/agentdaemon/gateway/retired_provider_configuration_test.go delete mode 100644 internal/obs/log/retired.go delete mode 100644 internal/obs/log/retired_test.go delete mode 100644 services/core/internal/api/sandbox_node_configuration_test.go diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9d0c8ed6b..c03c5baaa 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -150,7 +150,7 @@ Native adapter changes require their build/check targets and live provider accep | Provider ownership labels | `io.oac.*` | | E2B metadata | `oac_*` | -Provider bootstrap, Runtime images and Harness adapters must agree on these names. Daemon startup rejects renamed settings before any subcommand and reports replacements without values; the separate Parsar product integration settings remain unchanged. No old label is accepted as a fallback. +Provider bootstrap, Runtime images and Harness adapters must agree on these names. The separate Parsar product integration settings keep their own names. Historical Runtime and project-version upgrades are not supported. Do not ship retired installer conversion implementations; preserve rejection guards under the [installer lifecycle contract](deploy/install/README.md#versions-and-the-lock). Preserve older installations, Runtime files, provider resources and Session history; install the current release separately. Startup never verifies and rebinds historical allocations or accepts node deployments without a valid specification. Keep the original Core responsible for unresolved resources; see the [installation version policy](docs/getting-started/operations.md#installation-version-policy). Use this release's template builder for new E2B templates. Ordinary current-version database initialization uses the migration runner. diff --git a/apps/daemon/internal/cli/retired_configuration.go b/apps/daemon/internal/cli/retired_configuration.go deleted file mode 100644 index d5bbf5e97..000000000 --- a/apps/daemon/internal/cli/retired_configuration.go +++ /dev/null @@ -1,76 +0,0 @@ -package cli - -import ( - "fmt" - "os" - "sort" - "strings" -) - -// This table is local to the daemon because Runtime distributions are standalone. -var renamedRuntimeSettings = map[string]string{ - "PARSAR_CLAUDE_BIN": "OAC_RUNTIME_CLAUDE_BIN", - "PARSAR_CLAUDE_SDK_ENTRYPOINT": "OAC_RUNTIME_CLAUDE_SDK_ENTRYPOINT", - "PARSAR_CLAUDE_SDK_NODE": "OAC_RUNTIME_CLAUDE_SDK_NODE", - "PARSAR_CLAUDE_SDK_WORKSPACE": "OAC_RUNTIME_CLAUDE_SDK_WORKSPACE", - "PARSAR_CODEX_BIN": "OAC_RUNTIME_CODEX_BIN", - "PARSAR_CODEX_HARNESS_BIN": "OAC_RUNTIME_CODEX_HARNESS_BIN", - "PARSAR_CODEX_PERMISSION_PROFILE": "OAC_RUNTIME_CODEX_PERMISSION_PROFILE", - "PARSAR_DAEMON_BACKGROUND_CHILD": "OAC_RUNTIME_DAEMON_BACKGROUND_CHILD", - "PARSAR_DAEMON_CONNECT_DEVICE_NAME": "OAC_RUNTIME_DAEMON_CONNECT_DEVICE_NAME", - "PARSAR_DAEMON_CONNECT_TOKEN": "OAC_RUNTIME_DAEMON_CONNECT_TOKEN", - "PARSAR_DAEMON_CONNECT_URL": "OAC_RUNTIME_DAEMON_CONNECT_URL", - "PARSAR_DAEMON_SUSPEND_PID_FILE": "OAC_RUNTIME_DAEMON_SUSPEND_PID_FILE", - "PARSAR_DAEMON_SOCKET": "OAC_RUNTIME_DAEMON_SOCKET", - "PARSAR_HOME": "OAC_RUNTIME_HOME", - "PARSAR_MCODE_AGENTS_API": "OAC_RUNTIME_MCODE_AGENTS_API", - "PARSAR_MCODE_BIN": "OAC_RUNTIME_MCODE_BIN", - "PARSAR_MCODE_MAX_SUBAGENTS": "OAC_RUNTIME_MCODE_MAX_SUBAGENTS", - "PARSAR_MCODE_NODE": "OAC_RUNTIME_MCODE_NODE", - "PARSAR_MCODE_TOOL_POLICY": "OAC_RUNTIME_MCODE_TOOL_POLICY", - "PARSAR_MCODE_WORKSPACE": "OAC_RUNTIME_MCODE_WORKSPACE", - "PARSAR_MCODE_WORKSPACE_BRIDGE": "OAC_RUNTIME_MCODE_WORKSPACE_BRIDGE", - "PARSAR_OPENCODE_BIN": "OAC_RUNTIME_OPENCODE_BIN", - "PARSAR_PI_API_KEY": "OAC_RUNTIME_PI_API_KEY", - "PARSAR_PI_BIN": "OAC_RUNTIME_PI_BIN", - "PARSAR_RUNTIME_ALLOWED_DOMAINS": "OAC_RUNTIME_ALLOWED_DOMAINS", - "PARSAR_RUNTIME_ENVIRONMENT_ID": "OAC_RUNTIME_ENVIRONMENT_ID", - "PARSAR_RUNTIME_NETWORK_ACCESS": "OAC_RUNTIME_NETWORK_ACCESS", - "PARSAR_RUNTIME_SESSION_ID": "OAC_RUNTIME_SESSION_ID", - "PARSAR_RUNTIME_SYSTEM_PACKAGES": "OAC_RUNTIME_SYSTEM_PACKAGES", - "PARSAR_RUNTIME_TOOL_ENV": "OAC_RUNTIME_TOOL_ENV", - "PARSAR_RUNTIME_TOOL_SCRATCH": "OAC_RUNTIME_TOOL_SCRATCH", - "PARSAR_RUNTIME_WORKSPACE": "OAC_RUNTIME_WORKSPACE", - "PARSAR_LOG_LEVEL": "OAC_LOG_LEVEL", - "PARSAR_LOG_FORMAT": "OAC_LOG_FORMAT", - "PARSAR_LOG_ADD_SOURCE": "OAC_LOG_ADD_SOURCE", -} - -func validateRuntimeConfiguration() error { - var diagnostics []string - for _, entry := range os.Environ() { - name, _, _ := strings.Cut(entry, "=") - if !strings.HasPrefix(name, "PARSAR_") { - continue - } - // Separate-product integration names are not Runtime settings. - switch name { - case "PARSAR_CAPABILITY_UPLOAD_TOKEN", "PARSAR_SERVER_URL", "PARSAR_MASTER_KEY", "PARSAR_PROTOCOL_BASELINE_REVISION": - continue - } - replacement := renamedRuntimeSettings[name] - if strings.HasPrefix(name, "PARSAR_MCP_BEARER_") || strings.HasPrefix(name, "PARSAR_MCP_HEADER_") { - replacement = "OAC_RUNTIME_" + strings.TrimPrefix(name, "PARSAR_") - } - if replacement != "" { - diagnostics = append(diagnostics, fmt.Sprintf("%s was renamed to %s; this Runtime image or launcher sets the old name. Use a Runtime built by this release.", name, replacement)) - } else { - diagnostics = append(diagnostics, fmt.Sprintf("%s is not read by OpenAgentCore; OAC_RUNTIME_* replaced PARSAR_*. Remove it.", name)) - } - } - if len(diagnostics) == 0 { - return nil - } - sort.Strings(diagnostics) - return fmt.Errorf("%s", strings.Join(diagnostics, "\n")) -} diff --git a/apps/daemon/internal/cli/retired_configuration_test.go b/apps/daemon/internal/cli/retired_configuration_test.go deleted file mode 100644 index 8ba18fdc7..000000000 --- a/apps/daemon/internal/cli/retired_configuration_test.go +++ /dev/null @@ -1,38 +0,0 @@ -package cli - -import ( - "strings" - "testing" -) - -func TestRetiredRuntimeSettingsRejectBeforeEverySubcommand(t *testing.T) { - t.Setenv("PARSAR_HOME", "private-old-home") - t.Setenv("OAC_RUNTIME_HOME", t.TempDir()) - t.Setenv("PARSAR_UNKNOWN_RUNTIME_SETTING", "private-canary") - t.Setenv("PARSAR_CODEX_BIN", "") - t.Setenv("PARSAR_MCP_BEARER_EXAMPLE", "private-bearer") - for _, command := range []string{"version", "--help", "connect", "runtime-mcp-exec"} { - stdout, stderr, err := runArgv(t, command) - if err == nil || stdout != "" || stderr != "" { - t.Fatalf("%s ran before retirement validation: %q %q %v", command, stdout, stderr, err) - } - for _, wanted := range []string{"PARSAR_HOME was renamed to OAC_RUNTIME_HOME", "PARSAR_CODEX_BIN was renamed to OAC_RUNTIME_CODEX_BIN", "PARSAR_MCP_BEARER_EXAMPLE was renamed to OAC_RUNTIME_MCP_BEARER_EXAMPLE", "PARSAR_UNKNOWN_RUNTIME_SETTING is not read by OpenAgentCore"} { - if !strings.Contains(err.Error(), wanted) { - t.Fatalf("missing retirement diagnostic %q: %v", wanted, err) - } - } - if strings.Contains(err.Error(), "private-") { - t.Fatal("retirement diagnostic exposed a setting value") - } - } -} - -func TestProductSettingsRemainSeparateFromRuntimeRetirement(t *testing.T) { - for _, name := range []string{"PARSAR_CAPABILITY_UPLOAD_TOKEN", "PARSAR_SERVER_URL", "PARSAR_MASTER_KEY", "PARSAR_PROTOCOL_BASELINE_REVISION"} { - t.Setenv(name, "product-only") - } - stdout, _, err := runArgv(t, "version") - if err != nil || !strings.Contains(stdout, Version) { - t.Fatalf("product setting blocked daemon: %v", err) - } -} diff --git a/apps/daemon/internal/cli/root.go b/apps/daemon/internal/cli/root.go index c8189653a..18a94b421 100644 --- a/apps/daemon/internal/cli/root.go +++ b/apps/daemon/internal/cli/root.go @@ -55,9 +55,6 @@ func Execute(argv []string) error { func execute(ctx *runContext, argv []string) error { useInstalledNativeHome() - if err := validateRuntimeConfiguration(); err != nil { - return err - } if len(argv) == 0 || argv[0] == "-h" || argv[0] == "--help" || argv[0] == "help" { printRootHelp(ctx.stdout) if len(argv) == 0 { diff --git a/apps/web/src/features/sessions/items/ApplyPatchDiffViewer.tsx b/apps/web/src/features/sessions/items/ApplyPatchDiffViewer.tsx index 56b593acc..a5da23872 100644 --- a/apps/web/src/features/sessions/items/ApplyPatchDiffViewer.tsx +++ b/apps/web/src/features/sessions/items/ApplyPatchDiffViewer.tsx @@ -24,35 +24,35 @@ export function ApplyPatchDiffViewer({ item, patch, result }: { item: SessionIte }); return ( -
-
+
+
-
+
{patch.changes.map((change, index) => { const open = openFiles.has(index); return ( -
- {open ? ( -
-                  {change.lines.map((line, lineIndex) => {line.text || " "}{"\n"})}
+                
+                  {change.lines.map((line, lineIndex) => {line.text || " "}{"\n"})}
                 
) : null}
); })}
-
+
{t("items.rawArguments")}
{pretty(item.arguments)}
{t("items.rawResult")}
{result === undefined ? t("items.noResultYet") : pretty(result)}
diff --git a/apps/web/src/features/sessions/items/ItemRenderers.tsx b/apps/web/src/features/sessions/items/ItemRenderers.tsx index 38a4ea52f..434f60ef8 100644 --- a/apps/web/src/features/sessions/items/ItemRenderers.tsx +++ b/apps/web/src/features/sessions/items/ItemRenderers.tsx @@ -9,7 +9,7 @@ import { Shimmer } from "../../../components/atoms/Shimmer"; import { MessageMarkdown } from "../../../components/MessageMarkdown"; import { StatusIcon, type StatusKind } from "../../../components/StatusIcon"; import { ApplyPatchDiffViewer } from "./ApplyPatchDiffViewer"; -import { parseParsarApplyPatch } from "./apply-patch"; +import { parseApplyPatch } from "./apply-patch"; function textOf(item: SessionItem): string { return (item.content ?? []).map((content) => content.text).filter((value): value is string => Boolean(value)).join("\n"); @@ -106,7 +106,7 @@ function WorkStep({ item }: { item: SessionItem }) { const result = supported && (item.status !== "in_progress" || item.type === "command_execution") ? toolResult(item) : undefined; - const patch = supported && item.type === "function_call" && item.name === "apply_patch" ? parseParsarApplyPatch(item.arguments) : null; + const patch = supported && item.type === "function_call" && item.name === "apply_patch" ? parseApplyPatch(item.arguments) : null; const expandable = args !== undefined && args !== null || result !== undefined && result !== null; const row = <>