@artil-ai/server 0.1.2 → 0.1.3

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/README.md CHANGED
@@ -34,8 +34,7 @@ reaching the server from outside needs Tailscale. Both can wait for
34
34
  **2. Sign a client in**
35
35
 
36
36
  ```bash
37
- export ARTIL_BASE_URL=http://localhost:4747
38
- artil auth login
37
+ artil auth login --base-url http://localhost:4747
39
38
  ```
40
39
 
41
40
  The CLI remembers the server from here on.
package/bin/main.js CHANGED
@@ -22326,7 +22326,7 @@ var channel = {
22326
22326
  create: ({ webhookUrl, secret, fetch: fetch2 }) => new TelegramChannel(createBotApi({ webhook: webhookUrl ? { url: webhookUrl, secret } : undefined, fetch: fetch2 }))
22327
22327
  };
22328
22328
  // package.json
22329
- var version2 = "0.1.2";
22329
+ var version2 = "0.1.3";
22330
22330
 
22331
22331
  // src/app/cli.ts
22332
22332
  import { parseArgs } from "util";
@@ -24091,11 +24091,28 @@ function createAddressCommands({ agents, addresses, out }) {
24091
24091
  ]);
24092
24092
  }
24093
24093
 
24094
+ // src/platform/artil-cli.ts
24095
+ var {$ } = globalThis.Bun;
24096
+ function loginCommand(baseUrl) {
24097
+ return `artil auth login --base-url ${baseUrl}`;
24098
+ }
24099
+ function findArtilCli() {
24100
+ return {
24101
+ installed: Bun.which("artil") !== null,
24102
+ async install() {
24103
+ const installed = await $`bun install --global artil-ai`.nothrow().quiet();
24104
+ if (installed.exitCode !== 0) {
24105
+ throw new Error(installed.stderr.toString().trim() || `bun install exited with ${installed.exitCode}`);
24106
+ }
24107
+ }
24108
+ };
24109
+ }
24110
+
24094
24111
  // src/domains/agents/commands.ts
24095
24112
  function signInGuide({ baseUrl, names }) {
24096
24113
  return [
24097
24114
  `Sign ${names.length === 1 ? "the agent" : "each agent"} in from its client:`,
24098
- ...names.map((name) => ` ARTIL_BASE_URL=${baseUrl} artil auth login --account ${shellQuoted(name)}`),
24115
+ ...names.map((name) => ` ${loginCommand(baseUrl)} --account ${shellQuoted(name)}`),
24099
24116
  `MCP clients connect to ${baseUrl}/mcp and sign in on the page it opens.`,
24100
24117
  "On a computer without a browser, make a token with: artil-server account token <name>"
24101
24118
  ].join(`
@@ -24142,7 +24159,7 @@ function createAgentCommands({
24142
24159
  const token = tokens.issue({ agentId: agent.id, name: "artil-server account token" });
24143
24160
  out([
24144
24161
  `A token for ${agent.name}. Keep it secret; it signs in as the agent until you revoke it.`,
24145
- ` ARTIL_BASE_URL=${await baseUrl()} artil auth login --token ${token}`
24162
+ ` ${loginCommand(await baseUrl())} --token ${token}`
24146
24163
  ].join(`
24147
24164
  `));
24148
24165
  }
@@ -52007,7 +52024,7 @@ function createApp({ services, hosts, password: password2, workspace, log: log2
52007
52024
  }).get("/accounts/*", (c3) => c3.text(`This server has no web app. Manage its agents with artil-server; see artil-server --help.
52008
52025
  `)).get("/", (c3) => c3.text(`Artil Server is running. Sign an agent in with:
52009
52026
 
52010
- ARTIL_BASE_URL=${hosts.requestOrigin(c3.req.raw)} artil auth login
52027
+ ${loginCommand(hosts.requestOrigin(c3.req.raw))}
52011
52028
  `)).all("*", (c3) => notFound(c3.req.method, c3.req.path));
52012
52029
  }
52013
52030
 
@@ -52395,7 +52412,7 @@ async function serve({ paths, config: config2, environment }) {
52395
52412
  log: out
52396
52413
  });
52397
52414
  out(`Artil Server is at ${server.baseUrl}${config2.public ? " (public, through Tailscale Funnel)" : ""}.`);
52398
- out(`Sign an agent in with: ARTIL_BASE_URL=${server.baseUrl} artil auth login`);
52415
+ out(`Sign an agent in with: ${loginCommand(server.baseUrl)}`);
52399
52416
  out(`MCP clients connect to ${server.baseUrl}/mcp`);
52400
52417
  const { promise: promise3, resolve } = Promise.withResolvers();
52401
52418
  process.once("SIGINT", resolve);
@@ -52498,20 +52515,6 @@ async function runCli(environment) {
52498
52515
  }
52499
52516
  }
52500
52517
 
52501
- // src/platform/artil-cli.ts
52502
- var {$ } = globalThis.Bun;
52503
- function findArtilCli() {
52504
- return {
52505
- installed: Bun.which("artil") !== null,
52506
- async install() {
52507
- const installed = await $`bun install --global artil-ai`.nothrow().quiet();
52508
- if (installed.exitCode !== 0) {
52509
- throw new Error(installed.stderr.toString().trim() || `bun install exited with ${installed.exitCode}`);
52510
- }
52511
- }
52512
- };
52513
- }
52514
-
52515
52518
  // src/platform/tailscale.ts
52516
52519
  import { existsSync } from "fs";
52517
52520
  var statusSchema = exports_external2.object({
@@ -52610,5 +52613,5 @@ try {
52610
52613
  process.exitCode = 1;
52611
52614
  }
52612
52615
 
52613
- //# debugId=E162EED6D52D865664756E2164756E21
52616
+ //# debugId=AEA9957F245E4E5164756E2164756E21
52614
52617
  //# sourceMappingURL=main.js.map