@agenttrail/cli 0.2.2 → 0.2.5
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/chunk-77RT6DZY.js +186 -0
- package/dist/cli/index.cjs +63 -50
- package/dist/cli/index.js +1 -1
- package/dist/cursor/capture-hook.mjs +5 -5
- package/dist/cursor/flush.mjs +13 -11
- package/dist/index.cjs +65 -52
- package/dist/index.d.cts +17 -2
- package/dist/index.d.ts +17 -2
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/plugin/.claude-plugin/marketplace.json +2 -2
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/dist/chunk-EFOSESFZ.js +0 -173
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Tier, ScrubbingConfig } from '@agenttrail/shared/types';
|
|
2
|
-
import { DeviceAuthTokenResponse, DeviceAuthStartRequest, DeviceAuthStartResponse } from '@agenttrail/shared/device-auth';
|
|
2
|
+
import { DeviceAuthDeviceFields, DeviceAuthTokenResponse, DeviceAuthStartRequest, DeviceAuthStartResponse } from '@agenttrail/shared/device-auth';
|
|
3
3
|
import { ResolvedScrubbers } from '@agenttrail/shared/scrubber';
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
|
|
@@ -46,9 +46,10 @@ interface PollOptions {
|
|
|
46
46
|
readonly expiresIn: number;
|
|
47
47
|
readonly now?: () => number;
|
|
48
48
|
readonly agent?: "claude" | "cursor" | "codex";
|
|
49
|
+
readonly deviceFields?: DeviceAuthDeviceFields;
|
|
49
50
|
}
|
|
50
51
|
declare function pollDeviceToken(apiEndpoint: string, deviceCode: string, opts: PollOptions): Promise<DeviceAuthTokenResponse>;
|
|
51
|
-
declare function refreshDeviceToken(apiEndpoint: string, refreshToken: string, fetchFn?: FetchFn$1): Promise<DeviceAuthTokenResponse>;
|
|
52
|
+
declare function refreshDeviceToken(apiEndpoint: string, refreshToken: string, fetchFn?: FetchFn$1, deviceFields?: DeviceAuthDeviceFields): Promise<DeviceAuthTokenResponse>;
|
|
52
53
|
declare function revokeDeviceToken(apiEndpoint: string, refreshToken: string, fetchFn?: FetchFn$1): Promise<void>;
|
|
53
54
|
|
|
54
55
|
declare const DEFAULT_LOCK_STALE_MS = 30000;
|
|
@@ -83,6 +84,19 @@ interface GitResult {
|
|
|
83
84
|
}
|
|
84
85
|
type GitRunner = (args: readonly string[], cwd: string) => GitResult;
|
|
85
86
|
|
|
87
|
+
interface DeviceIdentity {
|
|
88
|
+
fields(agent: AgentChoice, options?: {
|
|
89
|
+
thorough?: boolean;
|
|
90
|
+
exchange?: boolean;
|
|
91
|
+
}): DeviceAuthDeviceFields;
|
|
92
|
+
record(agent: AgentChoice, token: DeviceAuthTokenResponse, sent?: {
|
|
93
|
+
readonly typed: boolean;
|
|
94
|
+
}): void;
|
|
95
|
+
name(): string | undefined;
|
|
96
|
+
confirmedName(agent: AgentChoice): string | undefined;
|
|
97
|
+
forget(agent: AgentChoice): void;
|
|
98
|
+
}
|
|
99
|
+
|
|
86
100
|
declare const REFRESH_STALE_WINDOW_MS: number;
|
|
87
101
|
type RefreshOutcome = "no-op" | "rotated" | "not-logged-in";
|
|
88
102
|
|
|
@@ -110,6 +124,7 @@ interface LoginEnv {
|
|
|
110
124
|
readonly lockIO?: LockIO;
|
|
111
125
|
readonly git?: GitRunner;
|
|
112
126
|
readonly processEnv?: Readonly<Record<string, string | undefined>>;
|
|
127
|
+
readonly device?: DeviceIdentity;
|
|
113
128
|
readonly log: (msg: string) => void;
|
|
114
129
|
}
|
|
115
130
|
declare function runLogin(env: LoginEnv): Promise<DeviceCredentials>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Tier, ScrubbingConfig } from '@agenttrail/shared/types';
|
|
2
|
-
import { DeviceAuthTokenResponse, DeviceAuthStartRequest, DeviceAuthStartResponse } from '@agenttrail/shared/device-auth';
|
|
2
|
+
import { DeviceAuthDeviceFields, DeviceAuthTokenResponse, DeviceAuthStartRequest, DeviceAuthStartResponse } from '@agenttrail/shared/device-auth';
|
|
3
3
|
import { ResolvedScrubbers } from '@agenttrail/shared/scrubber';
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
|
|
@@ -46,9 +46,10 @@ interface PollOptions {
|
|
|
46
46
|
readonly expiresIn: number;
|
|
47
47
|
readonly now?: () => number;
|
|
48
48
|
readonly agent?: "claude" | "cursor" | "codex";
|
|
49
|
+
readonly deviceFields?: DeviceAuthDeviceFields;
|
|
49
50
|
}
|
|
50
51
|
declare function pollDeviceToken(apiEndpoint: string, deviceCode: string, opts: PollOptions): Promise<DeviceAuthTokenResponse>;
|
|
51
|
-
declare function refreshDeviceToken(apiEndpoint: string, refreshToken: string, fetchFn?: FetchFn$1): Promise<DeviceAuthTokenResponse>;
|
|
52
|
+
declare function refreshDeviceToken(apiEndpoint: string, refreshToken: string, fetchFn?: FetchFn$1, deviceFields?: DeviceAuthDeviceFields): Promise<DeviceAuthTokenResponse>;
|
|
52
53
|
declare function revokeDeviceToken(apiEndpoint: string, refreshToken: string, fetchFn?: FetchFn$1): Promise<void>;
|
|
53
54
|
|
|
54
55
|
declare const DEFAULT_LOCK_STALE_MS = 30000;
|
|
@@ -83,6 +84,19 @@ interface GitResult {
|
|
|
83
84
|
}
|
|
84
85
|
type GitRunner = (args: readonly string[], cwd: string) => GitResult;
|
|
85
86
|
|
|
87
|
+
interface DeviceIdentity {
|
|
88
|
+
fields(agent: AgentChoice, options?: {
|
|
89
|
+
thorough?: boolean;
|
|
90
|
+
exchange?: boolean;
|
|
91
|
+
}): DeviceAuthDeviceFields;
|
|
92
|
+
record(agent: AgentChoice, token: DeviceAuthTokenResponse, sent?: {
|
|
93
|
+
readonly typed: boolean;
|
|
94
|
+
}): void;
|
|
95
|
+
name(): string | undefined;
|
|
96
|
+
confirmedName(agent: AgentChoice): string | undefined;
|
|
97
|
+
forget(agent: AgentChoice): void;
|
|
98
|
+
}
|
|
99
|
+
|
|
86
100
|
declare const REFRESH_STALE_WINDOW_MS: number;
|
|
87
101
|
type RefreshOutcome = "no-op" | "rotated" | "not-logged-in";
|
|
88
102
|
|
|
@@ -110,6 +124,7 @@ interface LoginEnv {
|
|
|
110
124
|
readonly lockIO?: LockIO;
|
|
111
125
|
readonly git?: GitRunner;
|
|
112
126
|
readonly processEnv?: Readonly<Record<string, string | undefined>>;
|
|
127
|
+
readonly device?: DeviceIdentity;
|
|
113
128
|
readonly log: (msg: string) => void;
|
|
114
129
|
}
|
|
115
130
|
declare function runLogin(env: LoginEnv): Promise<DeviceCredentials>;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$,A as N,Aa as Ne,B as _,Ba as _e,C as x,Ca as xe,D as O,Da as Oe,E as h,F as G,G as k,H as v,I as D,J as U,K as F,L as b,M as j,N as B,O as M,P as w,Q as V,R as J,S as K,T as W,U as z,V as H,W as Q,X as q,Y as X,Z as Y,_ as Z,a as e,aa as ee,b as t,ba as te,c as o,ca as oe,d as r,da as re,e as n,ea as ne,f as p,fa as pe,g as i,ga as ie,h as s,ha as se,i as l,ia as le,j as a,ja as ae,k as u,ka as ue,l as c,la as ce,m as y,ma as ye,n as f,na as fe,o as S,oa as Se,p as d,pa as de,q as T,qa as Te,r as I,ra as Ie,s as m,sa as me,t as E,ta as Ee,u as R,ua as Re,v as C,va as Ce,w as g,wa as ge,x as A,xa as Ae,y as P,ya as Pe,z as L,za as Le}from"./chunk-
|
|
1
|
+
import{$,A as N,Aa as Ne,B as _,Ba as _e,C as x,Ca as xe,D as O,Da as Oe,E as h,F as G,G as k,H as v,I as D,J as U,K as F,L as b,M as j,N as B,O as M,P as w,Q as V,R as J,S as K,T as W,U as z,V as H,W as Q,X as q,Y as X,Z as Y,_ as Z,a as e,aa as ee,b as t,ba as te,c as o,ca as oe,d as r,da as re,e as n,ea as ne,f as p,fa as pe,g as i,ga as ie,h as s,ha as se,i as l,ia as le,j as a,ja as ae,k as u,ka as ue,l as c,la as ce,m as y,ma as ye,n as f,na as fe,o as S,oa as Se,p as d,pa as de,q as T,qa as Te,r as I,ra as Ie,s as m,sa as me,t as E,ta as Ee,u as R,ua as Re,v as C,va as Ce,w as g,wa as ge,x as A,xa as Ae,y as P,ya as Pe,z as L,za as Le}from"./chunk-77RT6DZY.js";export{t as AGENTTRAIL_AGENT_NS,d as AGENTTRAIL_API_ENDPOINT,o as AGENTTRAIL_INGEST_ENDPOINT,Se as AGENTTRAIL_MARKETPLACE_NAME,Te as AGENTTRAIL_PLUGIN_ID,de as AGENTTRAIL_PLUGIN_NAME,e as AGENTTRAIL_PROJECT_NS,n as CLAUDE_CODE_VENDOR_SLUG,p as CONTENT_FLAGS,Ee as ClaudeCliNotFoundError,R as DEFAULT_LOCK_STALE_MS,Ie as MIN_CLAUDE_VERSION,P as PROJECT_CONFIG_FILE,Ce as PluginCommandError,Re as PluginUnsupportedError,oe as QuarantineError,w as REFRESH_STALE_WINDOW_MS,g as agenttrailConfigSchema,$ as backfillSpanId,Z as backfillTraceId,ue as boundedPool,l as buildEnvBlock,s as buildResourceAttributes,ee as buildSpanTree,W as checkpointPath,S as clearCredentials,b as computeAgentId,F as computeProjectId,c as credentialsPath,me as defaultClaudeRunner,pe as defaultProjectsRoot,D as deriveProjectIdentity,U as deriveProjectSlug,i as encodeResourceValue,Pe as ensureClaudeSupportsPlugins,j as ensureGitignored,re as fileLineSource,_ as findGitRoot,N as findProjectConfig,L as globalConfigPath,Y as hashContent,X as hashFile,Ne as installAgentTrailPlugin,ie as isSessionInProject,Ae as isVersionAtLeast,r as normalizeEndpoint,A as parseAgentTrailConfig,ge as parseClaudeVersion,k as parseGitRemote,ne as parseSession,I as pollDeviceToken,y as readCredentials,v as readGitRemote,z as readState,m as refreshDeviceToken,h as resolveApiKey,O as resolveConfig,Le as resolvePluginScaffoldDir,x as resolveProjectRoot,E as revokeDeviceToken,Oe as run,fe as runImport,V as runLogin,K as runLogout,J as runRefresh,ce as runScan,xe as runSetup,ye as runStatus,se as scanTranscripts,te as sessionToResourceSpans,a as settingsPath,q as shouldProcess,G as slugify,T as startDeviceAuth,le as toOtlpJson,_e as uninstallAgentTrailPlugin,ae as uploadResourceSpans,Q as upsertSession,C as withRefreshLock,B as writeAgentTrailConfig,u as writeClaudeSettings,f as writeCredentials,M as writeGlobalConfig,H as writeState};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agenttrail/cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "The AgentTrail command-line tool: connects an AI coding agent's sessions to AgentTrail, with setup, sign-in, status and history import for the agent named by --agent.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
},
|
|
7
7
|
"metadata": {
|
|
8
8
|
"description": "AgentTrail's plugin marketplace — the enforcement plugin for agent governance.",
|
|
9
|
-
"version": "0.2.
|
|
9
|
+
"version": "0.2.5"
|
|
10
10
|
},
|
|
11
11
|
"plugins": [
|
|
12
12
|
{
|
|
13
13
|
"name": "agenttrail",
|
|
14
14
|
"source": "./",
|
|
15
15
|
"description": "AgentTrail enforcement plugin — PreToolUse governance hook (a fail-closed command shim).",
|
|
16
|
-
"version": "0.2.
|
|
16
|
+
"version": "0.2.5",
|
|
17
17
|
"author": {
|
|
18
18
|
"name": "AgentTrail"
|
|
19
19
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agenttrail",
|
|
3
3
|
"description": "AgentTrail enforcement plugin for Claude Code — carries the PreToolUse governance hook, a fail-closed command shim.",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.5",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "AgentTrail",
|
|
7
7
|
"url": "https://agenttrail.sh"
|