@agent-relay/config 0.1.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.
- package/dist/agent-config.d.ts +47 -0
- package/dist/agent-config.d.ts.map +1 -0
- package/dist/agent-config.js +119 -0
- package/dist/agent-config.js.map +1 -0
- package/dist/bridge-config.d.ts +52 -0
- package/dist/bridge-config.d.ts.map +1 -0
- package/dist/bridge-config.js +143 -0
- package/dist/bridge-config.js.map +1 -0
- package/dist/bridge-utils.d.ts +30 -0
- package/dist/bridge-utils.d.ts.map +1 -0
- package/dist/bridge-utils.js +54 -0
- package/dist/bridge-utils.js.map +1 -0
- package/dist/cli-auth-config.d.ts +110 -0
- package/dist/cli-auth-config.d.ts.map +1 -0
- package/dist/cli-auth-config.js +391 -0
- package/dist/cli-auth-config.js.map +1 -0
- package/dist/cloud-config.d.ts +75 -0
- package/dist/cloud-config.d.ts.map +1 -0
- package/dist/cloud-config.js +109 -0
- package/dist/cloud-config.js.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -0
- package/dist/project-namespace.d.ts +73 -0
- package/dist/project-namespace.d.ts.map +1 -0
- package/dist/project-namespace.js +280 -0
- package/dist/project-namespace.js.map +1 -0
- package/dist/relay-config.d.ts +25 -0
- package/dist/relay-config.d.ts.map +1 -0
- package/dist/relay-config.js +25 -0
- package/dist/relay-config.js.map +1 -0
- package/dist/relay-file-writer.d.ts +200 -0
- package/dist/relay-file-writer.d.ts.map +1 -0
- package/dist/relay-file-writer.js +407 -0
- package/dist/relay-file-writer.js.map +1 -0
- package/dist/schemas.d.ts +672 -0
- package/dist/schemas.d.ts.map +1 -0
- package/dist/schemas.js +180 -0
- package/dist/schemas.js.map +1 -0
- package/dist/shadow-config.d.ts +87 -0
- package/dist/shadow-config.d.ts.map +1 -0
- package/dist/shadow-config.js +134 -0
- package/dist/shadow-config.js.map +1 -0
- package/dist/teams-config.d.ts +47 -0
- package/dist/teams-config.d.ts.map +1 -0
- package/dist/teams-config.js +100 -0
- package/dist/teams-config.js.map +1 -0
- package/dist/trajectory-config.d.ts +102 -0
- package/dist/trajectory-config.d.ts.map +1 -0
- package/dist/trajectory-config.js +185 -0
- package/dist/trajectory-config.js.map +1 -0
- package/package.json +98 -0
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Trajectory Configuration
|
|
3
|
+
*
|
|
4
|
+
* Manages centralized relay configuration for trajectory storage settings.
|
|
5
|
+
* Config is stored in a central location (not per-repo) and applies to all projects.
|
|
6
|
+
*
|
|
7
|
+
* ARCHITECTURE:
|
|
8
|
+
* 1. Config location: Centralized, not repo-specific
|
|
9
|
+
* - Primary: AGENT_RELAY_CONFIG_DIR/relay.json (if env var set)
|
|
10
|
+
* - Default: ~/.config/agent-relay/relay.json
|
|
11
|
+
* - Reasoning: Single config applies to all projects; survives repo deletion
|
|
12
|
+
*
|
|
13
|
+
* 2. Default behavior: trajectories are OPT-OUT (stored in user home)
|
|
14
|
+
* - Location: ~/.config/agent-relay/trajectories/<project-hash>/
|
|
15
|
+
* - Users can opt-in via central config: storeInRepo: true
|
|
16
|
+
*
|
|
17
|
+
* 3. Opt-in storage: .trajectories/ directory in repo root
|
|
18
|
+
* - Applied when: User sets storeInRepo: true in central relay.json
|
|
19
|
+
* - Users should add .trajectories/ to .gitignore if private
|
|
20
|
+
*
|
|
21
|
+
* 4. Initialization: When users initialize relay in a repo, prompt to opt-in
|
|
22
|
+
* - Creates entry in ~/.config/agent-relay/relay.json
|
|
23
|
+
* - Does NOT create repo-specific config
|
|
24
|
+
*/
|
|
25
|
+
/**
|
|
26
|
+
* Relay config structure
|
|
27
|
+
*/
|
|
28
|
+
export interface RelayConfig {
|
|
29
|
+
/** Trajectory settings */
|
|
30
|
+
trajectories?: {
|
|
31
|
+
/**
|
|
32
|
+
* Whether to store trajectories in the repo (.trajectories/)
|
|
33
|
+
* Default: false (stored in ~/.config/agent-relay/trajectories/)
|
|
34
|
+
*
|
|
35
|
+
* NOTE: When true, this project will track trajectories in git.
|
|
36
|
+
* Users should add .trajectories/ to .gitignore if they prefer
|
|
37
|
+
* not to track trajectories for privacy reasons.
|
|
38
|
+
*/
|
|
39
|
+
storeInRepo?: boolean;
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Get the relay config file path
|
|
44
|
+
*
|
|
45
|
+
* Returns the central relay configuration file, not repo-specific.
|
|
46
|
+
* This config is shared across all projects and stored in:
|
|
47
|
+
* - AGENT_RELAY_CONFIG_DIR/relay.json (if AGENT_RELAY_CONFIG_DIR is set)
|
|
48
|
+
* - ~/.config/agent-relay/relay.json (default)
|
|
49
|
+
*
|
|
50
|
+
* NOTE: projectRoot parameter is kept for backwards compatibility but ignored.
|
|
51
|
+
* Config is always loaded from the central location.
|
|
52
|
+
*/
|
|
53
|
+
export declare function getRelayConfigPath(_projectRoot?: string): string;
|
|
54
|
+
/**
|
|
55
|
+
* Read the relay config from the central location
|
|
56
|
+
* Config is shared across all projects
|
|
57
|
+
*/
|
|
58
|
+
export declare function readRelayConfig(projectRoot?: string): RelayConfig;
|
|
59
|
+
/**
|
|
60
|
+
* Check if trajectories should be stored in the repo
|
|
61
|
+
*/
|
|
62
|
+
export declare function shouldStoreInRepo(projectRoot?: string): boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Get a hash of the project path for user-level storage isolation
|
|
65
|
+
*/
|
|
66
|
+
export declare function getProjectHash(projectRoot?: string): string;
|
|
67
|
+
/**
|
|
68
|
+
* Get the user-level trajectories directory
|
|
69
|
+
*/
|
|
70
|
+
export declare function getUserTrajectoriesDir(projectRoot?: string): string;
|
|
71
|
+
/**
|
|
72
|
+
* Get the repo-level trajectories directory
|
|
73
|
+
*/
|
|
74
|
+
export declare function getRepoTrajectoriesDir(projectRoot?: string): string;
|
|
75
|
+
/**
|
|
76
|
+
* Get the primary trajectories directory based on config
|
|
77
|
+
* This is where new trajectories will be written
|
|
78
|
+
*/
|
|
79
|
+
export declare function getPrimaryTrajectoriesDir(projectRoot?: string): string;
|
|
80
|
+
/**
|
|
81
|
+
* Get all trajectories directories (for reading)
|
|
82
|
+
* Returns both repo and user-level if they exist
|
|
83
|
+
*/
|
|
84
|
+
export declare function getAllTrajectoriesDirs(projectRoot?: string): string[];
|
|
85
|
+
/**
|
|
86
|
+
* Ensure the primary trajectories directory exists
|
|
87
|
+
*/
|
|
88
|
+
export declare function ensureTrajectoriesDir(projectRoot?: string): string;
|
|
89
|
+
/**
|
|
90
|
+
* Get trajectory environment variables for trail CLI
|
|
91
|
+
* Sets TRAJECTORIES_DATA_DIR to the appropriate location
|
|
92
|
+
*/
|
|
93
|
+
export declare function getTrajectoryEnvVars(projectRoot?: string): Record<string, string>;
|
|
94
|
+
/**
|
|
95
|
+
* Check if project has opted into repo-level trajectory storage
|
|
96
|
+
*/
|
|
97
|
+
export declare function isTrajectoryOptedIn(projectRoot?: string): boolean;
|
|
98
|
+
/**
|
|
99
|
+
* Get a human-readable description of where trajectories are stored
|
|
100
|
+
*/
|
|
101
|
+
export declare function getTrajectoriesStorageDescription(projectRoot?: string): string;
|
|
102
|
+
//# sourceMappingURL=trajectory-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trajectory-config.d.ts","sourceRoot":"","sources":["../src/trajectory-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAkBH;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,0BAA0B;IAC1B,YAAY,CAAC,EAAE;QACb;;;;;;;WAOG;QACH,WAAW,CAAC,EAAE,OAAO,CAAC;KACvB,CAAC;CACH;AAOD;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAEhE;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,WAAW,CAoCjE;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAI/D;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAG3D;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAInE;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAGnE;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAKtE;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAcrE;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAIlE;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAKjF;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAEjE;AAED;;GAEG;AACH,wBAAgB,iCAAiC,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAK9E"}
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Trajectory Configuration
|
|
3
|
+
*
|
|
4
|
+
* Manages centralized relay configuration for trajectory storage settings.
|
|
5
|
+
* Config is stored in a central location (not per-repo) and applies to all projects.
|
|
6
|
+
*
|
|
7
|
+
* ARCHITECTURE:
|
|
8
|
+
* 1. Config location: Centralized, not repo-specific
|
|
9
|
+
* - Primary: AGENT_RELAY_CONFIG_DIR/relay.json (if env var set)
|
|
10
|
+
* - Default: ~/.config/agent-relay/relay.json
|
|
11
|
+
* - Reasoning: Single config applies to all projects; survives repo deletion
|
|
12
|
+
*
|
|
13
|
+
* 2. Default behavior: trajectories are OPT-OUT (stored in user home)
|
|
14
|
+
* - Location: ~/.config/agent-relay/trajectories/<project-hash>/
|
|
15
|
+
* - Users can opt-in via central config: storeInRepo: true
|
|
16
|
+
*
|
|
17
|
+
* 3. Opt-in storage: .trajectories/ directory in repo root
|
|
18
|
+
* - Applied when: User sets storeInRepo: true in central relay.json
|
|
19
|
+
* - Users should add .trajectories/ to .gitignore if private
|
|
20
|
+
*
|
|
21
|
+
* 4. Initialization: When users initialize relay in a repo, prompt to opt-in
|
|
22
|
+
* - Creates entry in ~/.config/agent-relay/relay.json
|
|
23
|
+
* - Does NOT create repo-specific config
|
|
24
|
+
*/
|
|
25
|
+
import { existsSync, readFileSync, mkdirSync, statSync } from 'node:fs';
|
|
26
|
+
import { join } from 'node:path';
|
|
27
|
+
import { homedir } from 'node:os';
|
|
28
|
+
import { createHash } from 'node:crypto';
|
|
29
|
+
import { getProjectPaths } from './project-namespace.js';
|
|
30
|
+
/**
|
|
31
|
+
* Get the central agent-relay config directory
|
|
32
|
+
* Uses AGENT_RELAY_CONFIG_DIR environment variable if set,
|
|
33
|
+
* otherwise defaults to ~/.config/agent-relay
|
|
34
|
+
*/
|
|
35
|
+
function getAgentRelayConfigDir() {
|
|
36
|
+
return process.env.AGENT_RELAY_CONFIG_DIR ??
|
|
37
|
+
join(homedir(), '.config', 'agent-relay');
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Cache for config to avoid repeated file reads
|
|
41
|
+
*/
|
|
42
|
+
let configCache = null;
|
|
43
|
+
/**
|
|
44
|
+
* Get the relay config file path
|
|
45
|
+
*
|
|
46
|
+
* Returns the central relay configuration file, not repo-specific.
|
|
47
|
+
* This config is shared across all projects and stored in:
|
|
48
|
+
* - AGENT_RELAY_CONFIG_DIR/relay.json (if AGENT_RELAY_CONFIG_DIR is set)
|
|
49
|
+
* - ~/.config/agent-relay/relay.json (default)
|
|
50
|
+
*
|
|
51
|
+
* NOTE: projectRoot parameter is kept for backwards compatibility but ignored.
|
|
52
|
+
* Config is always loaded from the central location.
|
|
53
|
+
*/
|
|
54
|
+
export function getRelayConfigPath(_projectRoot) {
|
|
55
|
+
return join(getAgentRelayConfigDir(), 'relay.json');
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Read the relay config from the central location
|
|
59
|
+
* Config is shared across all projects
|
|
60
|
+
*/
|
|
61
|
+
export function readRelayConfig(projectRoot) {
|
|
62
|
+
const configPath = getRelayConfigPath(projectRoot);
|
|
63
|
+
// Check cache
|
|
64
|
+
if (configCache && configCache.path === configPath) {
|
|
65
|
+
try {
|
|
66
|
+
const stat = statSync(configPath);
|
|
67
|
+
if (stat.mtimeMs === configCache.mtime) {
|
|
68
|
+
return configCache.config;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
catch {
|
|
72
|
+
// File may not exist or be readable
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
try {
|
|
76
|
+
if (!existsSync(configPath)) {
|
|
77
|
+
return {};
|
|
78
|
+
}
|
|
79
|
+
const content = readFileSync(configPath, 'utf-8');
|
|
80
|
+
const config = JSON.parse(content);
|
|
81
|
+
// Update cache
|
|
82
|
+
try {
|
|
83
|
+
const stat = statSync(configPath);
|
|
84
|
+
configCache = { path: configPath, config, mtime: stat.mtimeMs };
|
|
85
|
+
}
|
|
86
|
+
catch {
|
|
87
|
+
// Ignore cache update failures
|
|
88
|
+
}
|
|
89
|
+
return config;
|
|
90
|
+
}
|
|
91
|
+
catch (err) {
|
|
92
|
+
console.warn('[trajectory-config] Failed to read config:', err);
|
|
93
|
+
return {};
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Check if trajectories should be stored in the repo
|
|
98
|
+
*/
|
|
99
|
+
export function shouldStoreInRepo(projectRoot) {
|
|
100
|
+
const config = readRelayConfig(projectRoot);
|
|
101
|
+
// Default to false - trajectories are stored outside repo by default
|
|
102
|
+
return config.trajectories?.storeInRepo === true;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Get a hash of the project path for user-level storage isolation
|
|
106
|
+
*/
|
|
107
|
+
export function getProjectHash(projectRoot) {
|
|
108
|
+
const root = projectRoot ?? getProjectPaths().projectRoot;
|
|
109
|
+
return createHash('sha256').update(root).digest('hex').slice(0, 16);
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Get the user-level trajectories directory
|
|
113
|
+
*/
|
|
114
|
+
export function getUserTrajectoriesDir(projectRoot) {
|
|
115
|
+
const projectHash = getProjectHash(projectRoot);
|
|
116
|
+
const configDir = process.env.XDG_CONFIG_HOME || join(homedir(), '.config');
|
|
117
|
+
return join(configDir, 'agent-relay', 'trajectories', projectHash);
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Get the repo-level trajectories directory
|
|
121
|
+
*/
|
|
122
|
+
export function getRepoTrajectoriesDir(projectRoot) {
|
|
123
|
+
const root = projectRoot ?? getProjectPaths().projectRoot;
|
|
124
|
+
return join(root, '.trajectories');
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Get the primary trajectories directory based on config
|
|
128
|
+
* This is where new trajectories will be written
|
|
129
|
+
*/
|
|
130
|
+
export function getPrimaryTrajectoriesDir(projectRoot) {
|
|
131
|
+
if (shouldStoreInRepo(projectRoot)) {
|
|
132
|
+
return getRepoTrajectoriesDir(projectRoot);
|
|
133
|
+
}
|
|
134
|
+
return getUserTrajectoriesDir(projectRoot);
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Get all trajectories directories (for reading)
|
|
138
|
+
* Returns both repo and user-level if they exist
|
|
139
|
+
*/
|
|
140
|
+
export function getAllTrajectoriesDirs(projectRoot) {
|
|
141
|
+
const dirs = [];
|
|
142
|
+
const repoDir = getRepoTrajectoriesDir(projectRoot);
|
|
143
|
+
if (existsSync(repoDir)) {
|
|
144
|
+
dirs.push(repoDir);
|
|
145
|
+
}
|
|
146
|
+
const userDir = getUserTrajectoriesDir(projectRoot);
|
|
147
|
+
if (existsSync(userDir)) {
|
|
148
|
+
dirs.push(userDir);
|
|
149
|
+
}
|
|
150
|
+
return dirs;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Ensure the primary trajectories directory exists
|
|
154
|
+
*/
|
|
155
|
+
export function ensureTrajectoriesDir(projectRoot) {
|
|
156
|
+
const dir = getPrimaryTrajectoriesDir(projectRoot);
|
|
157
|
+
mkdirSync(dir, { recursive: true });
|
|
158
|
+
return dir;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Get trajectory environment variables for trail CLI
|
|
162
|
+
* Sets TRAJECTORIES_DATA_DIR to the appropriate location
|
|
163
|
+
*/
|
|
164
|
+
export function getTrajectoryEnvVars(projectRoot) {
|
|
165
|
+
const dataDir = getPrimaryTrajectoriesDir(projectRoot);
|
|
166
|
+
return {
|
|
167
|
+
TRAJECTORIES_DATA_DIR: dataDir,
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Check if project has opted into repo-level trajectory storage
|
|
172
|
+
*/
|
|
173
|
+
export function isTrajectoryOptedIn(projectRoot) {
|
|
174
|
+
return shouldStoreInRepo(projectRoot);
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Get a human-readable description of where trajectories are stored
|
|
178
|
+
*/
|
|
179
|
+
export function getTrajectoriesStorageDescription(projectRoot) {
|
|
180
|
+
if (shouldStoreInRepo(projectRoot)) {
|
|
181
|
+
return `repo (.trajectories/)`;
|
|
182
|
+
}
|
|
183
|
+
return `user (~/.config/agent-relay/trajectories/)`;
|
|
184
|
+
}
|
|
185
|
+
//# sourceMappingURL=trajectory-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trajectory-config.js","sourceRoot":"","sources":["../src/trajectory-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;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OAAO;QACL,qBAAqB,EAAE,OAAO;KAC/B,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAAC,WAAoB;IACtD,OAAO,iBAAiB,CAAC,WAAW,CAAC,CAAC;AACxC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,iCAAiC,CAAC,WAAoB;IACpE,IAAI,iBAAiB,CAAC,WAAW,CAAC,EAAE,CAAC;QACnC,OAAO,uBAAuB,CAAC;IACjC,CAAC;IACD,OAAO,4CAA4C,CAAC;AACtD,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@agent-relay/config",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Shared configuration schemas and loaders for Agent Relay",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js",
|
|
12
|
+
"default": "./dist/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./relay-config": {
|
|
15
|
+
"types": "./dist/relay-config.d.ts",
|
|
16
|
+
"import": "./dist/relay-config.js",
|
|
17
|
+
"default": "./dist/relay-config.js"
|
|
18
|
+
},
|
|
19
|
+
"./bridge-config": {
|
|
20
|
+
"types": "./dist/bridge-config.d.ts",
|
|
21
|
+
"import": "./dist/bridge-config.js",
|
|
22
|
+
"default": "./dist/bridge-config.js"
|
|
23
|
+
},
|
|
24
|
+
"./teams-config": {
|
|
25
|
+
"types": "./dist/teams-config.d.ts",
|
|
26
|
+
"import": "./dist/teams-config.js",
|
|
27
|
+
"default": "./dist/teams-config.js"
|
|
28
|
+
},
|
|
29
|
+
"./shadow-config": {
|
|
30
|
+
"types": "./dist/shadow-config.d.ts",
|
|
31
|
+
"import": "./dist/shadow-config.js",
|
|
32
|
+
"default": "./dist/shadow-config.js"
|
|
33
|
+
},
|
|
34
|
+
"./trajectory-config": {
|
|
35
|
+
"types": "./dist/trajectory-config.d.ts",
|
|
36
|
+
"import": "./dist/trajectory-config.js",
|
|
37
|
+
"default": "./dist/trajectory-config.js"
|
|
38
|
+
},
|
|
39
|
+
"./agent-config": {
|
|
40
|
+
"types": "./dist/agent-config.d.ts",
|
|
41
|
+
"import": "./dist/agent-config.js",
|
|
42
|
+
"default": "./dist/agent-config.js"
|
|
43
|
+
},
|
|
44
|
+
"./cli-auth-config": {
|
|
45
|
+
"types": "./dist/cli-auth-config.d.ts",
|
|
46
|
+
"import": "./dist/cli-auth-config.js",
|
|
47
|
+
"default": "./dist/cli-auth-config.js"
|
|
48
|
+
},
|
|
49
|
+
"./cloud-config": {
|
|
50
|
+
"types": "./dist/cloud-config.d.ts",
|
|
51
|
+
"import": "./dist/cloud-config.js",
|
|
52
|
+
"default": "./dist/cloud-config.js"
|
|
53
|
+
},
|
|
54
|
+
"./project-namespace": {
|
|
55
|
+
"types": "./dist/project-namespace.d.ts",
|
|
56
|
+
"import": "./dist/project-namespace.js",
|
|
57
|
+
"default": "./dist/project-namespace.js"
|
|
58
|
+
},
|
|
59
|
+
"./schemas": {
|
|
60
|
+
"types": "./dist/schemas.d.ts",
|
|
61
|
+
"import": "./dist/schemas.js",
|
|
62
|
+
"default": "./dist/schemas.js"
|
|
63
|
+
},
|
|
64
|
+
"./bridge-utils": {
|
|
65
|
+
"types": "./dist/bridge-utils.d.ts",
|
|
66
|
+
"import": "./dist/bridge-utils.js",
|
|
67
|
+
"default": "./dist/bridge-utils.js"
|
|
68
|
+
},
|
|
69
|
+
"./relay-file-writer": {
|
|
70
|
+
"types": "./dist/relay-file-writer.d.ts",
|
|
71
|
+
"import": "./dist/relay-file-writer.js",
|
|
72
|
+
"default": "./dist/relay-file-writer.js"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"files": [
|
|
76
|
+
"dist",
|
|
77
|
+
"README.md"
|
|
78
|
+
],
|
|
79
|
+
"scripts": {
|
|
80
|
+
"build": "tsc",
|
|
81
|
+
"clean": "rm -rf dist",
|
|
82
|
+
"test": "vitest run",
|
|
83
|
+
"test:watch": "vitest"
|
|
84
|
+
},
|
|
85
|
+
"dependencies": {
|
|
86
|
+
"@agent-relay/protocol": "^0.1.2",
|
|
87
|
+
"zod": "^3.23.8",
|
|
88
|
+
"zod-to-json-schema": "^3.23.1"
|
|
89
|
+
},
|
|
90
|
+
"devDependencies": {
|
|
91
|
+
"@types/node": "^22.19.3",
|
|
92
|
+
"typescript": "^5.9.3",
|
|
93
|
+
"vitest": "^3.0.0"
|
|
94
|
+
},
|
|
95
|
+
"publishConfig": {
|
|
96
|
+
"access": "public"
|
|
97
|
+
}
|
|
98
|
+
}
|