@agentage/cli 0.60.0 → 0.62.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.
@@ -1,4 +1,5 @@
1
1
  import { type Disposable } from '../../extension.js';
2
2
  export declare const DISPOSE_TIMEOUT_MS = 5000;
3
+ export declare const messageOf: (err: unknown) => string;
3
4
  export declare const disposeAll: (id: string, subscriptions: Disposable[]) => Promise<void>;
4
5
  export declare const holdSignals: (dispose: () => Promise<void>) => (() => void);
@@ -2,7 +2,7 @@ import {} from '../../extension.js';
2
2
  import { extensionLog } from './log.js';
3
3
  import { withTimeout } from './timeout.js';
4
4
  export const DISPOSE_TIMEOUT_MS = 5_000;
5
- const messageOf = (err) => (err instanceof Error ? err.message : String(err));
5
+ export const messageOf = (err) => err instanceof Error ? err.message : String(err);
6
6
  // Each subscription gets its 5 s at once; one that hangs is abandoned, and every result is logged.
7
7
  export const disposeAll = async (id, subscriptions) => {
8
8
  const log = extensionLog(id);
@@ -1,6 +1,6 @@
1
1
  import { Command } from 'commander';
2
2
  import {} from './discover.js';
3
- import { disposeAll, holdSignals } from './dispose.js';
3
+ import { disposeAll, holdSignals, messageOf } from './dispose.js';
4
4
  import { loadOrder } from './order.js';
5
5
  import { registerExtension, registerTimeoutMs } from './register.js';
6
6
  import { writeRunState } from './state.js';
@@ -12,7 +12,6 @@ const blockedBy = (ext, outcomes) => {
12
12
  const peer = required.find((name) => outcomes.get(name)?.state !== 'ok');
13
13
  return peer === undefined ? null : `peer ${peer} is ${outcomes.get(peer)?.state ?? 'not loaded'}`;
14
14
  };
15
- const messageOf = (err) => (err instanceof Error ? err.message : String(err));
16
15
  // The kit imports the entry, so its top-level code counts toward the same timeout as register.
17
16
  const checkKit = async (ext, check) => {
18
17
  if (ext.entry === null)
@@ -4,7 +4,7 @@ import {} from '../../extension.js';
4
4
  import { isRecord } from '../../lib/fs/json-file.js';
5
5
  import { createContext } from './ctx.js';
6
6
  import {} from './discover.js';
7
- import { disposeAll } from './dispose.js';
7
+ import { disposeAll, messageOf } from './dispose.js';
8
8
  import { withTimeout } from './timeout.js';
9
9
  import { facadeOf } from './use.js';
10
10
  export const DEFAULT_REGISTER_TIMEOUT_MS = 10_000;
@@ -13,7 +13,6 @@ export const registerTimeoutMs = () => {
13
13
  const raw = process.env['AGENTAGE_REGISTER_TIMEOUT_MS'] ?? '';
14
14
  return /^[1-9]\d{0,8}$/.test(raw) ? Number(raw) : DEFAULT_REGISTER_TIMEOUT_MS;
15
15
  };
16
- const messageOf = (err) => (err instanceof Error ? err.message : String(err));
17
16
  const isRegister = (value) => typeof value === 'function';
18
17
  const importAndRegister = async (entry, ctx) => {
19
18
  const exported = await import(pathToFileURL(entry).href);
@@ -6,4 +6,4 @@ export declare const updateSession: (clientId: string, change: (current: AuthSta
6
6
  export declare const refreshOrThrow: (auth: AuthState, links: Links) => Promise<void>;
7
7
  export declare const authedFetch: (auth: AuthState, links: Links, url: string, init?: CliRequestInit, opts?: CliFetchOptions) => Promise<Response>;
8
8
  export declare const authedJson: <T>(auth: AuthState, links: Links, url: string, init?: CliRequestInit) => Promise<T>;
9
- export { introspectToken, type TokenSession } from './introspect.js';
9
+ export { introspectToken } from './introspect.js';
@@ -9,5 +9,4 @@ export declare const assertPatShape: (value: string) => string;
9
9
  export declare const rawPatToken: (opts?: PatOptions) => string | undefined;
10
10
  export declare const patAuthState: (token: string, fqdn?: string) => AuthState;
11
11
  export declare const jwtPatExpiry: (token: string) => string | null;
12
- export declare const isPatAuth: (auth: AuthState | null) => boolean;
13
12
  export declare const resolveAuth: (opts?: PatOptions, read?: () => AuthState | null) => AuthState | null;
@@ -49,7 +49,6 @@ export const jwtPatExpiry = (token) => {
49
49
  return null;
50
50
  }
51
51
  };
52
- export const isPatAuth = (auth) => auth?.kind === 'pat';
53
52
  // Resolve the active credential with precedence flag > env PAT > stored OAuth. When a PAT is
54
53
  // present the OAuth/DCR flow is skipped entirely and the PAT is the bearer; otherwise fall back to
55
54
  // the stored OAuth session on disk (null when signed out).
@@ -1,5 +1,4 @@
1
1
  import { type Platform } from '../net/discovery.js';
2
2
  type Call = (url: string) => Promise<Response>;
3
- export declare const forgetMachinesBases: () => void;
4
3
  export declare const machinesCall: (platform: Platform, path: string, call: Call) => Promise<Response>;
5
4
  export {};
@@ -1,7 +1,6 @@
1
1
  import { isRecord } from '../fs/json-file.js';
2
2
  import {} from '../net/discovery.js';
3
- import { forgetRouteBases, routeCall } from '../net/route-base.js';
4
- export const forgetMachinesBases = forgetRouteBases;
3
+ import { routeCall } from '../net/route-base.js';
5
4
  // The machines route's own 404 is MACHINE_NOT_FOUND; any other 404 is a host without the route.
6
5
  const missingRoute = async (res) => {
7
6
  if (res.status !== 404)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentage/cli",
3
- "version": "0.60.0",
3
+ "version": "0.62.0",
4
4
  "description": "The agentage CLI - connect this machine to agentage from the terminal",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -54,7 +54,7 @@
54
54
  "prepublishOnly": "npm run verify"
55
55
  },
56
56
  "dependencies": {
57
- "@agentage/extension": "0.18.2",
57
+ "@agentage/extension": "0.18.5",
58
58
  "@electric-sql/pglite": "^0.5.16",
59
59
  "@tailwindcss/postcss": "^4.3.5",
60
60
  "chalk": "^6.0.0",