fix(acp-registry): offer Global MiniMax Code sign-in#23891
0 / 5 viewed5 files changedLine totals unavailable
scripts/fixtures/minimax-auth.mjs · Earlier revision 78e8df99 · right 9–10
Original diff
@@ -0,0 +1,44 @@
+import * as NodeFSP from "node:fs/promises";
+import * as NodeOS from "node:os";
+import * as NodePath from "node:path";
+
+const base = process.argv[2];
+if (!base) throw new Error("Usage: node scripts/fixtures/minimax-auth.mjs <isolated-t3-home>");
+await NodeFSP.mkdir(base, { recursive: true });
+const resolved = await NodeFSP.realpath(base);
+if (resolved === NodePath.join(NodeOS.homedir(), ".t3"))
+ throw new Error("Refusing the live T3 home");scripts/fixtures/minimax-auth.mjs · right 9–10
packages/provider-acp-registry/src/server/auth.ts · Earlier revision 78e8df99 · right 120–121
Original diff
@@ -116,7 +117,9 @@ export const makeAcpRegistryAuth = Effect.fn("makeAcpRegistryAuth")(function* (o
failure("methods", "Could not discover this agent's sign-in methods.", cause),
),
);
- const advertised = normalizeAcpRegistryAuthMethods(initialized.authMethods)
+ const advertised = normalizeAcpRegistryAuthMethods(
+ withMinimaxCodeRegions(initialized.authMethods),packages/provider-acp-registry/src/server/auth.ts · right 120–121
scripts/fixtures/minimax-auth.mjs · Earlier revision a85d44a8 · right 20
Original diff
@@ -0,0 +1,56 @@
+import * as NodeFSP from "node:fs/promises";
+import * as NodeOS from "node:os";
+import * as NodePath from "node:path";
+
+const base = process.argv[2];
+if (!base) throw new Error("Usage: node scripts/fixtures/minimax-auth.mjs <isolated-t3-home>");
+// Resolve symlinks through the deepest existing ancestor so neither a linked
+// live home nor a not-yet-created path can alias ~/.t3 before anything is written.
+const canonical = async (path) => {
+ const absolute = NodePath.resolve(path);
+ try {
+ return await NodeFSP.realpath(absolute);
+ } catch (error) {
+ const parent = NodePath.dirname(absolute);
+ if (error.code !== "ENOENT" || parent === absolute) throw error;
+ return NodePath.join(await canonical(parent), NodePath.basename(absolute));
+ }
+};
+const resolved = await canonical(base);
+if (resolved === (await canonical(NodePath.join(NodeOS.homedir(), ".t3"))))