@standardagents/cli 0.41.26 → 0.42.2
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.
- package/dist/index.js +20 -8
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -265,7 +265,7 @@ function getScaffoldStandardAgentsVersion() {
|
|
|
265
265
|
if (process.env.STANDARDAGENTS_WORKSPACE === "1") {
|
|
266
266
|
return "workspace:*";
|
|
267
267
|
}
|
|
268
|
-
return "0.
|
|
268
|
+
return "0.42.2";
|
|
269
269
|
}
|
|
270
270
|
function findViteConfig(cwd) {
|
|
271
271
|
const candidates = ["vite.config.ts", "vite.config.js", "vite.config.mts", "vite.config.mjs"];
|
|
@@ -1567,7 +1567,7 @@ async function ensurePlatformAuth(options, quietLogs = false, context = {}) {
|
|
|
1567
1567
|
return { connected: true, mode: "standardagents" };
|
|
1568
1568
|
}
|
|
1569
1569
|
function getCliVersion() {
|
|
1570
|
-
return "0.
|
|
1570
|
+
return "0.42.2";
|
|
1571
1571
|
}
|
|
1572
1572
|
function getSipVersion() {
|
|
1573
1573
|
return "1.0.1";
|
|
@@ -1824,7 +1824,8 @@ async function exchangeBootstrapCode(endpoint, code, fetchImpl = fetch) {
|
|
|
1824
1824
|
return {
|
|
1825
1825
|
session_cookie: sessionCookie,
|
|
1826
1826
|
user: parsed.user,
|
|
1827
|
-
account: parsed.account
|
|
1827
|
+
account: parsed.account,
|
|
1828
|
+
...typeof parsed.project?.id === "string" && parsed.project.id.trim() ? { project: { id: parsed.project.id.trim() } } : {}
|
|
1828
1829
|
};
|
|
1829
1830
|
}
|
|
1830
1831
|
async function prepareBootstrapSession(projectPath, options, fetchImpl = fetch) {
|
|
@@ -2154,9 +2155,7 @@ function writeStandardAgentsEnv(projectPath, params) {
|
|
|
2154
2155
|
appendGitignoreEntries(projectPath, "# Standard Agents local platform token", [".dev.vars"]);
|
|
2155
2156
|
return envPath;
|
|
2156
2157
|
}
|
|
2157
|
-
async function
|
|
2158
|
-
const consumed = await exchangeBootstrapCode(endpoint, code, fetchImpl);
|
|
2159
|
-
const cookie = consumed.session_cookie;
|
|
2158
|
+
async function findFirstProjectId(endpoint, cookie, fetchImpl) {
|
|
2160
2159
|
const listResponse = await fetchImpl(`${endpoint}/projects`, {
|
|
2161
2160
|
headers: { Accept: "application/json", Cookie: cookie }
|
|
2162
2161
|
});
|
|
@@ -2170,7 +2169,13 @@ async function resolveBootstrapProject(endpoint, code, fetchImpl = fetch) {
|
|
|
2170
2169
|
if (!projectId) {
|
|
2171
2170
|
throw new Error("No Standard Agents instance found for this account. Create one in the dashboard first.");
|
|
2172
2171
|
}
|
|
2173
|
-
|
|
2172
|
+
return projectId;
|
|
2173
|
+
}
|
|
2174
|
+
async function resolveBootstrapProject(endpoint, code, fetchImpl = fetch) {
|
|
2175
|
+
const consumed = await exchangeBootstrapCode(endpoint, code, fetchImpl);
|
|
2176
|
+
const cookie = consumed.session_cookie;
|
|
2177
|
+
const projectId = consumed.project?.id ?? await findFirstProjectId(endpoint, cookie, fetchImpl);
|
|
2178
|
+
const handoffResponse = await fetchImpl(`${endpoint}/projects/${encodeURIComponent(projectId)}/cli-handoff`, {
|
|
2174
2179
|
method: "POST",
|
|
2175
2180
|
headers: { Accept: "application/json", "Content-Type": "application/json", Cookie: cookie },
|
|
2176
2181
|
body: "{}"
|
|
@@ -4735,6 +4740,13 @@ var PROVIDER_DEFINITIONS = [
|
|
|
4735
4740
|
label: "OpenRouter",
|
|
4736
4741
|
envKeys: ["OPENROUTER_API_KEY"]
|
|
4737
4742
|
},
|
|
4743
|
+
{
|
|
4744
|
+
name: "typesafe",
|
|
4745
|
+
packageName: "@standardagents/typesafe",
|
|
4746
|
+
exportName: "typesafe",
|
|
4747
|
+
label: "TypeSafe AI",
|
|
4748
|
+
envKeys: ["TYPESAFE_AI_API_KEY"]
|
|
4749
|
+
},
|
|
4738
4750
|
{
|
|
4739
4751
|
name: "xai",
|
|
4740
4752
|
packageName: "@standardagents/xai",
|
|
@@ -5815,7 +5827,7 @@ async function settleStdinForInitHandoff(stdin = process.stdin) {
|
|
|
5815
5827
|
}
|
|
5816
5828
|
}
|
|
5817
5829
|
var program = new Command();
|
|
5818
|
-
program.name("agents").description("CLI tool for Standard Agents / AgentBuilder").version("0.
|
|
5830
|
+
program.name("agents").description("CLI tool for Standard Agents / AgentBuilder").version("0.42.2");
|
|
5819
5831
|
program.command("init [project-name]").description("Create a new Standard Agents project").option("-y, --yes", "Skip prompts and use defaults").option("--local", "Use local project scaffolding instead of browser platform onboarding").option("--cli", "Use classic line-by-line CLI prompts instead of the TUI wizard").option("--api-url <url>", "Standard Agents platform API URL").option("--endpoint <url>", "Platform API endpoint for auth/bootstrap exchange").option("--package-manager <manager>", "Package manager for generated project: npm, pnpm, yarn, or bun").option("--template <template>", "Vite template to use", "vanilla-ts").option("--workspace", "Install @standardagents packages as workspace:* (local pnpm workspace development)").option("--no-dev", "Clone and configure the project without starting the dev server").addOption(new Option("--bootstrap <code>", "Exchange a web onboarding bootstrap code")).action(init);
|
|
5820
5832
|
program.command("login").description("Authenticate this machine (or use --bootstrap for project bootstrap auth)").option("--bootstrap <code>", "Bootstrap code from web onboarding").option("--endpoint <url>", "Platform API endpoint (default: https://api.standardagents.ai)").option("--no-open", "Do not auto-open browser URL").action(login);
|
|
5821
5833
|
program.command("logout").description("Clear stored StandardAgents auth and local org-scoped project auth").option("--org <org-id-or-slug>", "Org ID or slug to logout (defaults to active org)").option("--endpoint <url>", "Platform API endpoint (default: https://api.standardagents.ai)").action(logout);
|