@axhub/acp 0.1.1 → 0.1.2-beta.0

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.
Files changed (38) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +3 -3
  3. package/.next/fallback-build-manifest.json +3 -3
  4. package/.next/server/app/_global-error.html +1 -1
  5. package/.next/server/app/_global-error.rsc +1 -1
  6. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  7. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  8. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  9. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  10. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  11. package/.next/server/app/_not-found.html +1 -1
  12. package/.next/server/app/_not-found.rsc +1 -1
  13. package/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  14. package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  15. package/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  16. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  17. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  18. package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  19. package/.next/server/app/page_client-reference-manifest.js +1 -1
  20. package/.next/server/app/thread/[threadId]/page_client-reference-manifest.js +1 -1
  21. package/.next/server/chunks/[root-of-the-server]__0aovkxs._.js +1 -1
  22. package/.next/server/chunks/[root-of-the-server]__0gmxr~m._.js +1 -1
  23. package/.next/server/chunks/[root-of-the-server]__0o2epta._.js +1 -1
  24. package/.next/server/chunks/[root-of-the-server]__0os92l7._.js +1 -1
  25. package/.next/server/chunks/[root-of-the-server]__13xepwb._.js +1 -1
  26. package/.next/server/chunks/ssr/_03.pm1z._.js +1 -1
  27. package/.next/server/middleware-build-manifest.js +3 -3
  28. package/.next/server/pages/404.html +1 -1
  29. package/.next/server/pages/500.html +1 -1
  30. package/.next/static/chunks/{0btc2281yau9i.js → 0r125n-._y5ny.js} +1 -1
  31. package/bin/acp.mjs +0 -48
  32. package/dist/components/assistant-ui/acp-selectors.mjs +1 -3
  33. package/dist/lib/acp2aisdk/provider-registry.mjs +2 -5
  34. package/dist/lib/acp2aisdk/types.d.ts +0 -1
  35. package/package.json +5 -6
  36. /package/.next/static/{Kri5x_Y9TwyCw9FEY15ME → 0241KNhzDEg6VFWZ_e_qK}/_buildManifest.js +0 -0
  37. /package/.next/static/{Kri5x_Y9TwyCw9FEY15ME → 0241KNhzDEg6VFWZ_e_qK}/_clientMiddlewareManifest.js +0 -0
  38. /package/.next/static/{Kri5x_Y9TwyCw9FEY15ME → 0241KNhzDEg6VFWZ_e_qK}/_ssgManifest.js +0 -0
package/bin/acp.mjs CHANGED
@@ -92,10 +92,6 @@ function parseArgs(args) {
92
92
  return { help: false, options };
93
93
  }
94
94
 
95
- function quoteCommandArg(value) {
96
- return /[\s"']/u.test(value) ? `"${value.replace(/"/gu, '\\"')}"` : value;
97
- }
98
-
99
95
  function runtimeHostForUrl(hostname) {
100
96
  const normalized = String(hostname || "")
101
97
  .trim()
@@ -124,47 +120,6 @@ function buildServerRuntimeEnv(options) {
124
120
  };
125
121
  }
126
122
 
127
- function codexAcpCommandLine() {
128
- const codexAcpBin = require.resolve(
129
- "@zed-industries/codex-acp/bin/codex-acp.js",
130
- );
131
- return [process.execPath, codexAcpBin].map(quoteCommandArg).join(" ");
132
- }
133
-
134
- function isCodexProviderName(value) {
135
- const normalized = String(value || "")
136
- .trim()
137
- .toLowerCase();
138
- return normalized === "codex" || normalized === "openai";
139
- }
140
-
141
- function hasCodexCommandOverride(env) {
142
- if (env.ACP_CODEX_COMMAND?.trim()) return true;
143
-
144
- const rawJson =
145
- env.ACP_PROVIDER_COMMAND_OVERRIDES || env.AXHUB_ACP_COMMAND_OVERRIDES;
146
- if (!rawJson) return false;
147
-
148
- try {
149
- const parsed = JSON.parse(rawJson);
150
- if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
151
- return false;
152
- }
153
- for (const [providerName, value] of Object.entries(parsed)) {
154
- if (!isCodexProviderName(providerName)) continue;
155
- if (typeof value === "string") return Boolean(value.trim());
156
- if (!value || typeof value !== "object" || Array.isArray(value)) {
157
- continue;
158
- }
159
- return typeof value.command === "string" && Boolean(value.command.trim());
160
- }
161
- } catch {
162
- return false;
163
- }
164
-
165
- return false;
166
- }
167
-
168
123
  let parsed;
169
124
  try {
170
125
  parsed = parseArgs(process.argv.slice(2));
@@ -208,9 +163,6 @@ const child = spawn(process.execPath, [nextBin, ...nextArgs], {
208
163
  ACP_UI_DEFAULT_WORKSPACE_PATH:
209
164
  process.env.ACP_UI_DEFAULT_WORKSPACE_PATH || launchCwd,
210
165
  ...buildServerRuntimeEnv(parsed.options),
211
- ...(hasCodexCommandOverride(process.env)
212
- ? {}
213
- : { ACP_CODEX_COMMAND: codexAcpCommandLine() }),
214
166
  },
215
167
  stdio: "inherit",
216
168
  });
@@ -32,9 +32,7 @@ function getOptionLabel(options, value) {
32
32
  const PROVIDER_OPTIONS = ACP_PROVIDER_KEYS.map((provider, index) => ({
33
33
  value: provider,
34
34
  label: ACP_PROVIDER_REGISTRY[provider].label,
35
- description: ACP_PROVIDER_REGISTRY[provider].enabledInP0
36
- ? "已验证"
37
- : "需本地 CLI/登录",
35
+ description: "需先安装并登录",
38
36
  order: index,
39
37
  }));
40
38
  function capabilityOptions(snapshot, key) {
@@ -22,15 +22,14 @@ export const ACP_PROVIDER_REGISTRY = {
22
22
  defaultModel: "sonnet",
23
23
  defaultModeId: ACP_PROVIDER_DEFAULT_MODE_IDS.claude,
24
24
  supportsImages: true,
25
- enabledInP0: false,
26
25
  },
27
26
  codex: {
28
27
  provider: "codex",
29
28
  label: "Codex",
30
- command: "./node_modules/.bin/codex-acp",
29
+ command: "npx",
30
+ args: ["-y", "@zed-industries/codex-acp@^0.15.0"],
31
31
  defaultModeId: ACP_PROVIDER_DEFAULT_MODE_IDS.codex,
32
32
  supportsImages: true,
33
- enabledInP0: true,
34
33
  },
35
34
  gemini: {
36
35
  provider: "gemini",
@@ -40,7 +39,6 @@ export const ACP_PROVIDER_REGISTRY = {
40
39
  defaultModel: "gemini-3-pro-preview",
41
40
  defaultModeId: ACP_PROVIDER_DEFAULT_MODE_IDS.gemini,
42
41
  supportsImages: false,
43
- enabledInP0: false,
44
42
  },
45
43
  opencode: {
46
44
  provider: "opencode",
@@ -50,7 +48,6 @@ export const ACP_PROVIDER_REGISTRY = {
50
48
  defaultModel: "opencode/big-pickle",
51
49
  defaultModeId: ACP_PROVIDER_DEFAULT_MODE_IDS.opencode,
52
50
  supportsImages: false,
53
- enabledInP0: false,
54
51
  },
55
52
  };
56
53
  export function isAcpProviderKey(value) {
@@ -19,7 +19,6 @@ export type AcpProviderRegistryEntry = {
19
19
  defaultModel?: string | null;
20
20
  defaultModeId?: string | null;
21
21
  supportsImages: boolean;
22
- enabledInP0: boolean;
23
22
  };
24
23
  export type AcpProviderOverride = Partial<Pick<AcpProviderRegistryEntry, "command" | "args" | "authMethodId" | "sessionDelayMs" | "persistSession" | "defaultModel" | "defaultModeId">>;
25
24
  export type AcpChatRequest = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axhub/acp",
3
- "version": "0.1.1",
3
+ "version": "0.1.2-beta.0",
4
4
  "private": false,
5
5
  "engines": {
6
6
  "node": ">=20.9.0"
@@ -85,21 +85,20 @@
85
85
  "@radix-ui/react-dialog": "^1.1.15",
86
86
  "@radix-ui/react-slot": "^1.2.4",
87
87
  "@radix-ui/react-tooltip": "^1.2.8",
88
- "@zed-industries/codex-acp": "^0.15.0",
89
88
  "ai": "^6.0.188",
90
89
  "class-variance-authority": "^0.7.1",
91
90
  "clsx": "^2.1.1",
92
91
  "lucide-react": "^1.16.0",
93
92
  "next": "^16.2.6",
94
93
  "radix-ui": "^1.4.3",
95
- "react": "^19.2.6",
96
- "react-dom": "^19.2.6",
94
+ "react": ">=18.2.0 <20",
95
+ "react-dom": ">=18.2.0 <20",
97
96
  "remark-gfm": "^4.0.1",
98
97
  "tailwind-merge": "^3.6.0",
99
98
  "tw-animate-css": "^1.4.0",
100
99
  "tw-shimmer": "^0.4.11",
101
- "zustand": "^5.0.13",
102
- "zod": "^4.1.13"
100
+ "zod": "^4.1.13",
101
+ "zustand": "^5.0.13"
103
102
  },
104
103
  "peerDependencies": {
105
104
  "@assistant-ui/react": "^0.14.7",