agent-relay 12.2.3 → 12.2.4
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/cli/bootstrap.d.ts.map +1 -1
- package/dist/cli/bootstrap.js +12 -5
- package/dist/cli/bootstrap.js.map +1 -1
- package/dist/cli/commands/cloud-v1-deprecations.d.ts +44 -0
- package/dist/cli/commands/cloud-v1-deprecations.d.ts.map +1 -0
- package/dist/cli/commands/cloud-v1-deprecations.js +108 -0
- package/dist/cli/commands/cloud-v1-deprecations.js.map +1 -0
- package/dist/cli/commands/cloud.d.ts.map +1 -1
- package/dist/cli/commands/cloud.js +3 -0
- package/dist/cli/commands/cloud.js.map +1 -1
- package/dist/cli/commands/local-workflow.d.ts.map +1 -1
- package/dist/cli/commands/local-workflow.js +3 -0
- package/dist/cli/commands/local-workflow.js.map +1 -1
- package/dist/cli/commands/product-surfaces.d.ts +67 -0
- package/dist/cli/commands/product-surfaces.d.ts.map +1 -0
- package/dist/cli/commands/product-surfaces.js +165 -0
- package/dist/cli/commands/product-surfaces.js.map +1 -0
- package/dist/cli/commands/session.d.ts +17 -0
- package/dist/cli/commands/session.d.ts.map +1 -1
- package/dist/cli/commands/session.js +65 -1
- package/dist/cli/commands/session.js.map +1 -1
- package/dist/cli/lib/deprecate-command.d.ts +74 -0
- package/dist/cli/lib/deprecate-command.d.ts.map +1 -0
- package/dist/cli/lib/deprecate-command.js +107 -0
- package/dist/cli/lib/deprecate-command.js.map +1 -0
- package/dist/cli/lib/relay-cli-surface.d.ts +93 -0
- package/dist/cli/lib/relay-cli-surface.d.ts.map +1 -0
- package/dist/cli/lib/relay-cli-surface.js +237 -0
- package/dist/cli/lib/relay-cli-surface.js.map +1 -0
- package/package.json +13 -9
- package/dist/cli/commands/reflex.d.ts +0 -18
- package/dist/cli/commands/reflex.d.ts.map +0 -1
- package/dist/cli/commands/reflex.js +0 -181
- package/dist/cli/commands/reflex.js.map +0 -1
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mount the Relay product CLIs as `agent-relay` command groups.
|
|
3
|
+
*
|
|
4
|
+
* `file` -> relayfile, `flows` -> relayflows, `sessions` -> relayhistory.
|
|
5
|
+
* Each product ships its own {@link RelayCliSurface}; this module only says
|
|
6
|
+
* which package backs which group. Command behaviour lives in the product
|
|
7
|
+
* repos, and `mountRelayCliSurface` does the generic wiring.
|
|
8
|
+
*/
|
|
9
|
+
import type { Command } from 'commander';
|
|
10
|
+
import { type RelayCliSurface } from '@agent-relay/cli-surface';
|
|
11
|
+
import { type RelayCliSurfaceDependencies } from '../lib/relay-cli-surface.js';
|
|
12
|
+
/** How one product group is mounted. */
|
|
13
|
+
export interface ProductSurfaceDefinition {
|
|
14
|
+
/** Group name under `agent-relay`. */
|
|
15
|
+
as: string;
|
|
16
|
+
/** One-line description for `agent-relay --help`. */
|
|
17
|
+
description: string;
|
|
18
|
+
/**
|
|
19
|
+
* Package subpath exporting `createRelayCliSurface`.
|
|
20
|
+
*
|
|
21
|
+
* Imported lazily, so an `agent-relay` invocation that never touches this
|
|
22
|
+
* group never pays to load the product SDK.
|
|
23
|
+
*/
|
|
24
|
+
specifier: string;
|
|
25
|
+
/** Additional group names reaching the same surface, hidden from help. */
|
|
26
|
+
hiddenAliases?: readonly string[];
|
|
27
|
+
/**
|
|
28
|
+
* Options handed to the product's `createRelayCliSurface`.
|
|
29
|
+
*
|
|
30
|
+
* `sessions` uses this to pass a Relayhistory cloud client, which makes the
|
|
31
|
+
* product's `cloud …` commands appear. Resolved lazily alongside the import,
|
|
32
|
+
* so building a client costs nothing until the group is used.
|
|
33
|
+
*/
|
|
34
|
+
createOptions?: () => unknown | Promise<unknown>;
|
|
35
|
+
/**
|
|
36
|
+
* Optionally widen the product surface before mounting.
|
|
37
|
+
*
|
|
38
|
+
* `sessions` uses this to compose relayhistory's local commands with its
|
|
39
|
+
* cloud client, so the user sees one tree rather than our package split.
|
|
40
|
+
*/
|
|
41
|
+
extend?: (base: RelayCliSurface) => Promise<RelayCliSurface> | RelayCliSurface;
|
|
42
|
+
}
|
|
43
|
+
/** Injectable import hook, so tests can mount fakes without publishing packages. */
|
|
44
|
+
export interface ProductSurfaceDependencies extends RelayCliSurfaceDependencies {
|
|
45
|
+
importModule: (specifier: string) => Promise<unknown>;
|
|
46
|
+
}
|
|
47
|
+
/** The product groups `agent-relay` mounts. */
|
|
48
|
+
export declare const PRODUCT_SURFACES: readonly ProductSurfaceDefinition[];
|
|
49
|
+
/**
|
|
50
|
+
* Import a product's surface and prepare it for mounting.
|
|
51
|
+
*
|
|
52
|
+
* @param definition - The group being loaded.
|
|
53
|
+
* @param deps - Import hook and output sink.
|
|
54
|
+
* @returns The surface, extended when the definition asks for it.
|
|
55
|
+
* @throws With an actionable message when the package is missing, too old, or
|
|
56
|
+
* does not export the expected factory.
|
|
57
|
+
*/
|
|
58
|
+
export declare function loadProductSurface(definition: ProductSurfaceDefinition, deps: ProductSurfaceDependencies): Promise<RelayCliSurface>;
|
|
59
|
+
/**
|
|
60
|
+
* Register every product group on the root program.
|
|
61
|
+
*
|
|
62
|
+
* @param program - The root commander program.
|
|
63
|
+
* @param overrides - Test seams for import, io, and exit.
|
|
64
|
+
* @param definitions - Groups to mount; defaults to {@link PRODUCT_SURFACES}.
|
|
65
|
+
*/
|
|
66
|
+
export declare function registerProductSurfaceCommands(program: Command, overrides?: Partial<ProductSurfaceDependencies>, definitions?: readonly ProductSurfaceDefinition[]): void;
|
|
67
|
+
//# sourceMappingURL=product-surfaces.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"product-surfaces.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/product-surfaces.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,EAAoC,KAAK,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAMlG,OAAO,EAAwB,KAAK,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAErG,wCAAwC;AACxC,MAAM,WAAW,wBAAwB;IACvC,sCAAsC;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,qDAAqD;IACrD,WAAW,EAAE,MAAM,CAAC;IACpB;;;;;OAKG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB,0EAA0E;IAC1E,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACjD;;;;;OAKG;IACH,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,eAAe,KAAK,OAAO,CAAC,eAAe,CAAC,GAAG,eAAe,CAAC;CAChF;AAOD,oFAAoF;AACpF,MAAM,WAAW,0BAA2B,SAAQ,2BAA2B;IAC7E,YAAY,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CACvD;AAqBD,+CAA+C;AAC/C,eAAO,MAAM,gBAAgB,EAAE,SAAS,wBAAwB,EAqB/D,CAAC;AA+EF;;;;;;;;GAQG;AACH,wBAAsB,kBAAkB,CACtC,UAAU,EAAE,wBAAwB,EACpC,IAAI,EAAE,0BAA0B,GAC/B,OAAO,CAAC,eAAe,CAAC,CAkB1B;AAED;;;;;;GAMG;AACH,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,OAAO,EAChB,SAAS,GAAE,OAAO,CAAC,0BAA0B,CAAM,EACnD,WAAW,GAAE,SAAS,wBAAwB,EAAqB,GAClE,IAAI,CAmBN"}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mount the Relay product CLIs as `agent-relay` command groups.
|
|
3
|
+
*
|
|
4
|
+
* `file` -> relayfile, `flows` -> relayflows, `sessions` -> relayhistory.
|
|
5
|
+
* Each product ships its own {@link RelayCliSurface}; this module only says
|
|
6
|
+
* which package backs which group. Command behaviour lives in the product
|
|
7
|
+
* repos, and `mountRelayCliSurface` does the generic wiring.
|
|
8
|
+
*/
|
|
9
|
+
import { composeSurfaces } from '@agent-relay/cli-surface';
|
|
10
|
+
import { describeError } from '../lib/describe-error.js';
|
|
11
|
+
import { redactCredentialValues } from '@agent-relay/cloud/redact';
|
|
12
|
+
import { defaultExit } from '../lib/exit.js';
|
|
13
|
+
import { mountRelayCliSurface } from '../lib/relay-cli-surface.js';
|
|
14
|
+
/**
|
|
15
|
+
* The real process streams, with credentials masked on stderr.
|
|
16
|
+
*
|
|
17
|
+
* Commander's own parse errors are already redacted, but a mounted product
|
|
18
|
+
* writes through the injected sink, so its diagnostics would bypass that and
|
|
19
|
+
* echo a credential a user put in argv. Only stderr is masked: stdout is the
|
|
20
|
+
* data the caller asked for, it can be binary (`file export --format tar
|
|
21
|
+
* --output -`), and rewriting it would corrupt the payload.
|
|
22
|
+
*/
|
|
23
|
+
function processIo() {
|
|
24
|
+
return {
|
|
25
|
+
stdout: (chunk) => process.stdout.write(chunk),
|
|
26
|
+
// Bytes pass through untouched — there is nothing to mask in a binary
|
|
27
|
+
// chunk, and decoding one to scan it would corrupt what gets written.
|
|
28
|
+
stderr: (chunk) => process.stderr.write(typeof chunk === 'string' ? redactCredentialValues(chunk) : chunk),
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
/** The product groups `agent-relay` mounts. */
|
|
32
|
+
export const PRODUCT_SURFACES = [
|
|
33
|
+
{
|
|
34
|
+
as: 'file',
|
|
35
|
+
description: 'relayfile — read and write provider files through a local mount',
|
|
36
|
+
specifier: '@relayfile/sdk/relay-cli',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
as: 'flows',
|
|
40
|
+
description: 'relayflows — author, check, run, and deploy agent workflows',
|
|
41
|
+
specifier: '@relayflows/sdk/relay-cli',
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
as: 'sessions',
|
|
45
|
+
description: 'Relay session history — search, replay, and export past sessions',
|
|
46
|
+
specifier: 'ai-hist/relay-cli',
|
|
47
|
+
// `agent-relay session replay` predates this group and still works; it is
|
|
48
|
+
// hidden so help shows one name for one thing.
|
|
49
|
+
hiddenAliases: ['session'],
|
|
50
|
+
createOptions: createSessionsSurfaceOptions,
|
|
51
|
+
extend: composeSessionReplay,
|
|
52
|
+
},
|
|
53
|
+
];
|
|
54
|
+
/**
|
|
55
|
+
* Specifier for the optional cloud client.
|
|
56
|
+
*
|
|
57
|
+
* Indirected through a variable on purpose. `@relayhistory/cloud-client` is an
|
|
58
|
+
* `optionalDependency`, but TypeScript still resolves a literal specifier
|
|
59
|
+
* inside `await import(...)` and fails the build with TS2307 wherever the
|
|
60
|
+
* package is absent — which is every CI runner until it is published. The
|
|
61
|
+
* try/catch already covers its runtime absence; this covers compile time.
|
|
62
|
+
*/
|
|
63
|
+
const RELAYHISTORY_CLOUD_CLIENT = '@relayhistory/cloud-client';
|
|
64
|
+
/**
|
|
65
|
+
* Build the Relayhistory cloud client that unlocks `sessions cloud …`.
|
|
66
|
+
*
|
|
67
|
+
* Returns no client when Relayhistory is not configured: ai-hist then drops
|
|
68
|
+
* those commands from its declared tree, so help never advertises something
|
|
69
|
+
* that cannot run.
|
|
70
|
+
*/
|
|
71
|
+
async function createSessionsSurfaceOptions() {
|
|
72
|
+
const { readStoredRelayhistoryAuth, resolveRelayhistoryConfig } = await import('./session.js');
|
|
73
|
+
const { baseUrl, token } = resolveRelayhistoryConfig(readStoredRelayhistoryAuth());
|
|
74
|
+
if (!baseUrl || !token)
|
|
75
|
+
return {};
|
|
76
|
+
try {
|
|
77
|
+
const module = (await import(RELAYHISTORY_CLOUD_CLIENT));
|
|
78
|
+
return { cloud: module.createRelayhistoryCloudClient({ baseUrl, token }) };
|
|
79
|
+
}
|
|
80
|
+
catch {
|
|
81
|
+
// The cloud client is optional: without it the local half still mounts,
|
|
82
|
+
// which is strictly better than failing the whole group.
|
|
83
|
+
return {};
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
/** Compose Relay's own `replay` into the session history tree. */
|
|
87
|
+
async function composeSessionReplay(base) {
|
|
88
|
+
const { createSessionReplaySurface } = await import('./session.js');
|
|
89
|
+
return composeSurfaces({
|
|
90
|
+
id: base.id,
|
|
91
|
+
version: base.version,
|
|
92
|
+
parts: [base, createSessionReplaySurface(base.version)],
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Explain an import failure in terms the operator can act on.
|
|
97
|
+
*
|
|
98
|
+
* A missing subpath export is the common case while a product is mid-upgrade,
|
|
99
|
+
* and the raw `ERR_PACKAGE_PATH_NOT_EXPORTED` text does not say which package
|
|
100
|
+
* to update.
|
|
101
|
+
*/
|
|
102
|
+
function describeLoadFailure(definition, error) {
|
|
103
|
+
const code = error?.code;
|
|
104
|
+
const packageName = definition.specifier
|
|
105
|
+
.split('/')
|
|
106
|
+
.slice(0, definition.specifier.startsWith('@') ? 2 : 1)
|
|
107
|
+
.join('/');
|
|
108
|
+
if (code === 'ERR_MODULE_NOT_FOUND' || code === 'MODULE_NOT_FOUND') {
|
|
109
|
+
return (`\`agent-relay ${definition.as}\` needs ${packageName}, which is not installed.\n` +
|
|
110
|
+
`Reinstall agent-relay, or install ${packageName} alongside it.`);
|
|
111
|
+
}
|
|
112
|
+
if (code === 'ERR_PACKAGE_PATH_NOT_EXPORTED') {
|
|
113
|
+
return (`The installed ${packageName} is too old for \`agent-relay ${definition.as}\`: ` +
|
|
114
|
+
`it does not export ${definition.specifier}.\nUpgrade ${packageName} and retry.`);
|
|
115
|
+
}
|
|
116
|
+
return `Could not load \`agent-relay ${definition.as}\` from ${definition.specifier}: ${describeError(error)}`;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Import a product's surface and prepare it for mounting.
|
|
120
|
+
*
|
|
121
|
+
* @param definition - The group being loaded.
|
|
122
|
+
* @param deps - Import hook and output sink.
|
|
123
|
+
* @returns The surface, extended when the definition asks for it.
|
|
124
|
+
* @throws With an actionable message when the package is missing, too old, or
|
|
125
|
+
* does not export the expected factory.
|
|
126
|
+
*/
|
|
127
|
+
export async function loadProductSurface(definition, deps) {
|
|
128
|
+
let module;
|
|
129
|
+
try {
|
|
130
|
+
module = (await deps.importModule(definition.specifier));
|
|
131
|
+
}
|
|
132
|
+
catch (error) {
|
|
133
|
+
throw new Error(describeLoadFailure(definition, error));
|
|
134
|
+
}
|
|
135
|
+
if (typeof module.createRelayCliSurface !== 'function') {
|
|
136
|
+
throw new Error(`${definition.specifier} does not export createRelayCliSurface(). ` +
|
|
137
|
+
`\`agent-relay ${definition.as}\` cannot be mounted.`);
|
|
138
|
+
}
|
|
139
|
+
const options = definition.createOptions ? await definition.createOptions() : undefined;
|
|
140
|
+
const base = module.createRelayCliSurface(options);
|
|
141
|
+
return definition.extend ? await definition.extend(base) : base;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Register every product group on the root program.
|
|
145
|
+
*
|
|
146
|
+
* @param program - The root commander program.
|
|
147
|
+
* @param overrides - Test seams for import, io, and exit.
|
|
148
|
+
* @param definitions - Groups to mount; defaults to {@link PRODUCT_SURFACES}.
|
|
149
|
+
*/
|
|
150
|
+
export function registerProductSurfaceCommands(program, overrides = {}, definitions = PRODUCT_SURFACES) {
|
|
151
|
+
const deps = {
|
|
152
|
+
importModule: overrides.importModule ?? ((specifier) => import(specifier)),
|
|
153
|
+
io: overrides.io ?? processIo(),
|
|
154
|
+
exit: overrides.exit ?? defaultExit,
|
|
155
|
+
};
|
|
156
|
+
for (const definition of definitions) {
|
|
157
|
+
mountRelayCliSurface(program, {
|
|
158
|
+
as: definition.as,
|
|
159
|
+
description: definition.description,
|
|
160
|
+
...(definition.hiddenAliases ? { hiddenAliases: definition.hiddenAliases } : {}),
|
|
161
|
+
load: () => loadProductSurface(definition, deps),
|
|
162
|
+
}, deps);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
//# sourceMappingURL=product-surfaces.js.map
|
|
@@ -0,0 +1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,CAAC;IACxF,MAAM,IAAI,GAAG,MAAM,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC;IACnD,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAClE,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,8BAA8B,CAC5C,OAAgB,EAChB,YAAiD,EAAE,EACnD,cAAmD,gBAAgB;IAEnE,MAAM,IAAI,GAA+B;QACvC,YAAY,EAAE,SAAS,CAAC,YAAY,IAAI,CAAC,CAAC,SAAiB,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QAClF,EAAE,EAAE,SAAS,CAAC,EAAE,IAAI,SAAS,EAAE;QAC/B,IAAI,EAAE,SAAS,CAAC,IAAI,IAAI,WAAW;KACpC,CAAC;IAEF,KAAK,MAAM,UAAU,IAAI,WAAW,EAAE,CAAC;QACrC,oBAAoB,CAClB,OAAO,EACP;YACE,EAAE,EAAE,UAAU,CAAC,EAAE;YACjB,WAAW,EAAE,UAAU,CAAC,WAAW;YACnC,GAAG,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,UAAU,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAChF,IAAI,EAAE,GAAG,EAAE,CAAC,kBAAkB,CAAC,UAAU,EAAE,IAAI,CAAC;SACjD,EACD,IAAI,CACL,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { RelayCliSurface } from '@agent-relay/cli-surface';
|
|
1
2
|
import { type ReplaySessionResult } from '@agent-relay/session';
|
|
2
3
|
import { Command } from 'commander';
|
|
3
4
|
export interface SessionReplayClient {
|
|
@@ -15,6 +16,8 @@ export interface SessionCommandDependencies {
|
|
|
15
16
|
error: (...args: unknown[]) => void;
|
|
16
17
|
exit: (code: number) => never;
|
|
17
18
|
}
|
|
19
|
+
/** Exported so the mounted `sessions` group can build a cloud client from the same credentials. */
|
|
20
|
+
export declare function readStoredRelayhistoryAuth(): StoredRelayhistoryAuth | null;
|
|
18
21
|
/** Exported for direct unit coverage of the local-vs-production host allowlist. */
|
|
19
22
|
export declare function trustedStoredBaseUrl(value: string): string | undefined;
|
|
20
23
|
/**
|
|
@@ -37,4 +40,18 @@ export declare function resolveRelaycastConfig(persistedWorkspaceKey?: string):
|
|
|
37
40
|
};
|
|
38
41
|
/** Register durable completed-session replay joined across Relayhistory and Relaycast. */
|
|
39
42
|
export declare function registerSessionCommands(program: Command, overrides?: Partial<SessionCommandDependencies>): void;
|
|
43
|
+
/**
|
|
44
|
+
* Session replay as a mountable surface part.
|
|
45
|
+
*
|
|
46
|
+
* `agent-relay sessions` is one tree spanning three owners: ai-hist's local
|
|
47
|
+
* history, its cloud client, and this — replay, which joins Relayhistory turns
|
|
48
|
+
* with Relaycast conversation. Replay stays in this repo because Relaycast is
|
|
49
|
+
* Relay's own surface, not something ai-hist should learn about; composing it
|
|
50
|
+
* keeps the package boundary out of the user's command line.
|
|
51
|
+
*
|
|
52
|
+
* @param version - Version to report, normally the surface it composes with.
|
|
53
|
+
* @param overrides - Same dependency seams as the commander registration.
|
|
54
|
+
* @returns A single-command surface providing `replay`.
|
|
55
|
+
*/
|
|
56
|
+
export declare function createSessionReplaySurface(version: string, overrides?: Partial<SessionCommandDependencies>): RelayCliSurface;
|
|
40
57
|
//# sourceMappingURL=session.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/session.ts"],"names":[],"mappings":"AAIA,OAAO,EAAiB,KAAK,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC/E,OAAO,EAAE,OAAO,EAAwB,MAAM,WAAW,CAAC;AAW1D,MAAM,WAAW,mBAAmB;IAClC,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,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EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;IAClC,KAAK,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;IACpC,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,KAAK,CAAC;CAC/B;AAED,mGAAmG;AACnG,wBAAgB,0BAA0B,IAAI,sBAAsB,GAAG,IAAI,CAgB1E;AAED,mFAAmF;AACnF,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CActE;AAUD;;;;;;;GAOG;AACH,yFAAyF;AACzF,wBAAgB,yBAAyB,CAAC,UAAU,EAAE,sBAAsB,GAAG,IAAI,GAAG;IACpF,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3B,CAKA;AAED,iGAAiG;AACjG,wBAAgB,sBAAsB,CAAC,qBAAqB,CAAC,EAAE,MAAM,GAAG;IACtE,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;CAClC,CAOA;AAiCD,0FAA0F;AAC1F,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,OAAO,EAChB,SAAS,GAAE,OAAO,CAAC,0BAA0B,CAAM,GAClD,IAAI,CA+BN;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,MAAM,EACf,SAAS,GAAE,OAAO,CAAC,0BAA0B,CAAM,GAClD,eAAe,CAwDjB"}
|
|
@@ -10,7 +10,8 @@ const SESSION_REF_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-
|
|
|
10
10
|
const ALLOWED_RELAYHISTORY_HOST = 'history.agentrelay.com';
|
|
11
11
|
/** Same fallback chain `@agent-relay/session`'s `SessionClient` resolves a token from. */
|
|
12
12
|
const RELAYHISTORY_TOKEN_ENV_VARS = ['RELAYHISTORY_TOKEN', 'RELAYHISTORY_ACCESS_TOKEN', 'RELAY_AGENT_TOKEN'];
|
|
13
|
-
|
|
13
|
+
/** Exported so the mounted `sessions` group can build a cloud client from the same credentials. */
|
|
14
|
+
export function readStoredRelayhistoryAuth() {
|
|
14
15
|
try {
|
|
15
16
|
const authDir = process.env.RELAYHISTORY_HOME ?? path.join(os.homedir(), '.agentworkforce', 'relayhistory');
|
|
16
17
|
const parsed = JSON.parse(fs.readFileSync(path.join(authDir, 'auth.json'), 'utf8'));
|
|
@@ -129,4 +130,67 @@ export function registerSessionCommands(program, overrides = {}) {
|
|
|
129
130
|
deps.log(replay.contextPrompt);
|
|
130
131
|
});
|
|
131
132
|
}
|
|
133
|
+
/**
|
|
134
|
+
* Session replay as a mountable surface part.
|
|
135
|
+
*
|
|
136
|
+
* `agent-relay sessions` is one tree spanning three owners: ai-hist's local
|
|
137
|
+
* history, its cloud client, and this — replay, which joins Relayhistory turns
|
|
138
|
+
* with Relaycast conversation. Replay stays in this repo because Relaycast is
|
|
139
|
+
* Relay's own surface, not something ai-hist should learn about; composing it
|
|
140
|
+
* keeps the package boundary out of the user's command line.
|
|
141
|
+
*
|
|
142
|
+
* @param version - Version to report, normally the surface it composes with.
|
|
143
|
+
* @param overrides - Same dependency seams as the commander registration.
|
|
144
|
+
* @returns A single-command surface providing `replay`.
|
|
145
|
+
*/
|
|
146
|
+
export function createSessionReplaySurface(version, overrides = {}) {
|
|
147
|
+
const deps = withDefaults(overrides);
|
|
148
|
+
return {
|
|
149
|
+
id: 'relay-session-replay',
|
|
150
|
+
version,
|
|
151
|
+
contract: 1,
|
|
152
|
+
commands: [
|
|
153
|
+
{
|
|
154
|
+
name: 'replay',
|
|
155
|
+
description: 'Reconstruct a completed Relay session from Relayhistory and Relaycast',
|
|
156
|
+
args: [{ name: 'id', description: 'Relay-emitted session UUID', required: true }],
|
|
157
|
+
},
|
|
158
|
+
],
|
|
159
|
+
async run(argv, io) {
|
|
160
|
+
const [, rawId, ...rest] = ['replay', ...argv.slice(1)];
|
|
161
|
+
if (rest.length > 0) {
|
|
162
|
+
io.stderr(`error: unexpected argument '${rest[0]}'\n`);
|
|
163
|
+
return 2;
|
|
164
|
+
}
|
|
165
|
+
if (!rawId) {
|
|
166
|
+
io.stderr("error: missing required argument 'id'\n");
|
|
167
|
+
return 2;
|
|
168
|
+
}
|
|
169
|
+
let sessionId;
|
|
170
|
+
try {
|
|
171
|
+
sessionId = parseSessionRef(rawId);
|
|
172
|
+
}
|
|
173
|
+
catch (error) {
|
|
174
|
+
io.stderr(`error: ${error instanceof Error ? error.message : String(error)}\n`);
|
|
175
|
+
return 2;
|
|
176
|
+
}
|
|
177
|
+
const storedAuth = deps.readStoredAuth();
|
|
178
|
+
const config = resolveRelayhistoryConfig(storedAuth);
|
|
179
|
+
if (!config.baseUrl) {
|
|
180
|
+
io.stderr('No Relayhistory endpoint is configured. Set RELAYHISTORY_URL, or sign in so ' +
|
|
181
|
+
'~/.agentworkforce/relayhistory/auth.json has a base_url.\n');
|
|
182
|
+
return 1;
|
|
183
|
+
}
|
|
184
|
+
if (!config.token) {
|
|
185
|
+
io.stderr('No Relayhistory credential is configured. Set RELAYHISTORY_TOKEN ' +
|
|
186
|
+
'(or RELAYHISTORY_ACCESS_TOKEN/RELAY_AGENT_TOKEN), or sign in so ' +
|
|
187
|
+
'~/.agentworkforce/relayhistory/auth.json has an access_token.\n');
|
|
188
|
+
return 1;
|
|
189
|
+
}
|
|
190
|
+
const replay = await deps.createClient(storedAuth).replaySession(sessionId);
|
|
191
|
+
io.stdout(`${replay.contextPrompt}\n`);
|
|
192
|
+
return 0;
|
|
193
|
+
},
|
|
194
|
+
};
|
|
195
|
+
}
|
|
132
196
|
//# sourceMappingURL=session.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.js","sourceRoot":"","sources":["../../../src/cli/commands/session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAA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,CAAC;YACD,IAAI,CAAC,KAAK,EAAE,CAAC;gBACX,EAAE,CAAC,MAAM,CAAC,yCAAyC,CAAC,CAAC;gBACrD,OAAO,CAAC,CAAC;YACX,CAAC;YAED,IAAI,SAAiB,CAAC;YACtB,IAAI,CAAC;gBACH,SAAS,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC;YACrC,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,EAAE,CAAC,MAAM,CAAC,UAAU,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;gBAChF,OAAO,CAAC,CAAC;YACX,CAAC;YAED,MAAM,UAAU,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;YACzC,MAAM,MAAM,GAAG,yBAAyB,CAAC,UAAU,CAAC,CAAC;YACrD,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;gBACpB,EAAE,CAAC,MAAM,CACP,8EAA8E;oBAC5E,4DAA4D,CAC/D,CAAC;gBACF,OAAO,CAAC,CAAC;YACX,CAAC;YACD,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;gBAClB,EAAE,CAAC,MAAM,CACP,mEAAmE;oBACjE,kEAAkE;oBAClE,iEAAiE,CACpE,CAAC;gBACF,OAAO,CAAC,CAAC;YACX,CAAC;YAED,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;YAC5E,EAAE,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,aAAa,IAAI,CAAC,CAAC;YACvC,OAAO,CAAC,CAAC;QACX,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mark existing commander commands as deprecated without changing what they do.
|
|
3
|
+
*
|
|
4
|
+
* Used for the v1 relayflows commands under `agent-relay cloud`, which are
|
|
5
|
+
* superseded by the v2 `agent-relay flows` surface. The agreed behaviour is
|
|
6
|
+
* "keep working, warn, hide": scripts that call them today keep passing, the
|
|
7
|
+
* operator is told what to move to, and new users never discover v1 from
|
|
8
|
+
* `--help`.
|
|
9
|
+
*
|
|
10
|
+
* Hiding goes through commander's public `configureHelp({ visibleCommands })`
|
|
11
|
+
* rather than the private `_hidden` field, so a commander upgrade cannot
|
|
12
|
+
* silently un-hide the v1 surface.
|
|
13
|
+
*/
|
|
14
|
+
import { type Command } from 'commander';
|
|
15
|
+
/** Where a deprecated command's callers should go instead. */
|
|
16
|
+
export interface DeprecationNotice {
|
|
17
|
+
/**
|
|
18
|
+
* Replacement invocation, e.g. `agent-relay flows run`.
|
|
19
|
+
*
|
|
20
|
+
* Omit when nothing replaces the command yet. Several v1 relayflows commands
|
|
21
|
+
* (schedule, logs, cancel) have no v2 equivalent, and inventing a pointer to
|
|
22
|
+
* a command that does not exist is worse than admitting the gap.
|
|
23
|
+
*/
|
|
24
|
+
replacement?: string;
|
|
25
|
+
/** Version the deprecation took effect. */
|
|
26
|
+
since: string;
|
|
27
|
+
/**
|
|
28
|
+
* Extra guidance appended to the warning.
|
|
29
|
+
*
|
|
30
|
+
* Set this when the replacement is not a drop-in — a v1 command whose v2
|
|
31
|
+
* equivalent takes different arguments needs to say so, or the pointer is
|
|
32
|
+
* worse than no pointer.
|
|
33
|
+
*/
|
|
34
|
+
note?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Keep the command listed in `--help` (default: hide it).
|
|
37
|
+
*
|
|
38
|
+
* Hiding is right for a command with a replacement. A command that is still
|
|
39
|
+
* the only way to do its job must stay discoverable even while deprecated,
|
|
40
|
+
* or we strand the people relying on it.
|
|
41
|
+
*/
|
|
42
|
+
keepVisible?: boolean;
|
|
43
|
+
}
|
|
44
|
+
/** Injectable warning sink; defaults to the real stderr. */
|
|
45
|
+
export interface DeprecationDependencies {
|
|
46
|
+
warn: (message: string) => void;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Render the stderr notice for a deprecated command.
|
|
50
|
+
*
|
|
51
|
+
* @param invocation - How the user reached the command, e.g. `agent-relay cloud run`.
|
|
52
|
+
* @param notice - Replacement and guidance.
|
|
53
|
+
* @returns The warning text, newline-terminated.
|
|
54
|
+
*/
|
|
55
|
+
export declare function formatDeprecationWarning(invocation: string, notice: DeprecationNotice): string;
|
|
56
|
+
/**
|
|
57
|
+
* Attach a deprecation warning to one command and hide it from its parent's help.
|
|
58
|
+
*
|
|
59
|
+
* The command's action is untouched: it still runs, and still returns whatever
|
|
60
|
+
* it returned before.
|
|
61
|
+
*
|
|
62
|
+
* @param command - The command to deprecate. Must already be attached to a parent.
|
|
63
|
+
* @param notice - Replacement and guidance.
|
|
64
|
+
* @param overrides - Test seam for the warning sink.
|
|
65
|
+
* @throws When the command has no parent, since there is then no help to hide it from.
|
|
66
|
+
*/
|
|
67
|
+
export declare function deprecateCommand(command: Command, notice: DeprecationNotice, overrides?: Partial<DeprecationDependencies>): void;
|
|
68
|
+
/**
|
|
69
|
+
* Read back the names hidden from a parent's help.
|
|
70
|
+
*
|
|
71
|
+
* Exported for tests; production code has no reason to ask.
|
|
72
|
+
*/
|
|
73
|
+
export declare function hiddenCommandNames(parent: Command): readonly string[];
|
|
74
|
+
//# sourceMappingURL=deprecate-command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deprecate-command.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/deprecate-command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAQ,KAAK,OAAO,EAAE,MAAM,WAAW,CAAC;AAE/C,8DAA8D;AAC9D,MAAM,WAAW,iBAAiB;IAChC;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,4DAA4D;AAC5D,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACjC;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,GAAG,MAAM,CAe9F;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,iBAAiB,EACzB,SAAS,GAAE,OAAO,CAAC,uBAAuB,CAAM,GAC/C,IAAI,CAoBN;AAwCD;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,OAAO,GAAG,SAAS,MAAM,EAAE,CAErE"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mark existing commander commands as deprecated without changing what they do.
|
|
3
|
+
*
|
|
4
|
+
* Used for the v1 relayflows commands under `agent-relay cloud`, which are
|
|
5
|
+
* superseded by the v2 `agent-relay flows` surface. The agreed behaviour is
|
|
6
|
+
* "keep working, warn, hide": scripts that call them today keep passing, the
|
|
7
|
+
* operator is told what to move to, and new users never discover v1 from
|
|
8
|
+
* `--help`.
|
|
9
|
+
*
|
|
10
|
+
* Hiding goes through commander's public `configureHelp({ visibleCommands })`
|
|
11
|
+
* rather than the private `_hidden` field, so a commander upgrade cannot
|
|
12
|
+
* silently un-hide the v1 surface.
|
|
13
|
+
*/
|
|
14
|
+
import { Help } from 'commander';
|
|
15
|
+
/**
|
|
16
|
+
* Render the stderr notice for a deprecated command.
|
|
17
|
+
*
|
|
18
|
+
* @param invocation - How the user reached the command, e.g. `agent-relay cloud run`.
|
|
19
|
+
* @param notice - Replacement and guidance.
|
|
20
|
+
* @returns The warning text, newline-terminated.
|
|
21
|
+
*/
|
|
22
|
+
export function formatDeprecationWarning(invocation, notice) {
|
|
23
|
+
const lines = [
|
|
24
|
+
`warning: \`${invocation}\` is deprecated since ${notice.since} and will be removed in a future release.`,
|
|
25
|
+
];
|
|
26
|
+
if (notice.replacement) {
|
|
27
|
+
lines.push(` Use \`${notice.replacement}\` instead.`);
|
|
28
|
+
if (notice.note)
|
|
29
|
+
lines.push(` ${notice.note}`);
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
// A specific note about why there is no replacement beats the generic
|
|
33
|
+
// line; printing both just says the same thing twice.
|
|
34
|
+
lines.push(` ${notice.note ?? 'No replacement is available yet; it remains supported until one ships.'}`);
|
|
35
|
+
}
|
|
36
|
+
return `${lines.join('\n')}\n`;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Attach a deprecation warning to one command and hide it from its parent's help.
|
|
40
|
+
*
|
|
41
|
+
* The command's action is untouched: it still runs, and still returns whatever
|
|
42
|
+
* it returned before.
|
|
43
|
+
*
|
|
44
|
+
* @param command - The command to deprecate. Must already be attached to a parent.
|
|
45
|
+
* @param notice - Replacement and guidance.
|
|
46
|
+
* @param overrides - Test seam for the warning sink.
|
|
47
|
+
* @throws When the command has no parent, since there is then no help to hide it from.
|
|
48
|
+
*/
|
|
49
|
+
export function deprecateCommand(command, notice, overrides = {}) {
|
|
50
|
+
const warn = overrides.warn ?? ((message) => process.stderr.write(message));
|
|
51
|
+
const parent = command.parent;
|
|
52
|
+
if (!parent) {
|
|
53
|
+
throw new Error(`cannot deprecate '${command.name()}': it is not attached to a parent command`);
|
|
54
|
+
}
|
|
55
|
+
// Keep the text accurate for anyone who reaches help another way (`--help`
|
|
56
|
+
// on the command itself still prints its own description).
|
|
57
|
+
command.description(notice.replacement
|
|
58
|
+
? `${command.description()} (deprecated — use \`${notice.replacement}\`)`
|
|
59
|
+
: `${command.description()} (deprecated)`);
|
|
60
|
+
command.hook('preAction', () => {
|
|
61
|
+
warn(formatDeprecationWarning(invocationPath(command), notice));
|
|
62
|
+
});
|
|
63
|
+
if (!notice.keepVisible)
|
|
64
|
+
hideFromParentHelp(parent, command.name());
|
|
65
|
+
}
|
|
66
|
+
/** Build the full invocation path for a command, e.g. `agent-relay cloud run`. */
|
|
67
|
+
function invocationPath(command) {
|
|
68
|
+
const names = [];
|
|
69
|
+
let cursor = command;
|
|
70
|
+
while (cursor) {
|
|
71
|
+
names.unshift(cursor.name());
|
|
72
|
+
cursor = cursor.parent;
|
|
73
|
+
}
|
|
74
|
+
return names.join(' ');
|
|
75
|
+
}
|
|
76
|
+
/** Command names hidden from each parent's help, keyed by the parent command. */
|
|
77
|
+
const hiddenByParent = new WeakMap();
|
|
78
|
+
/**
|
|
79
|
+
* Hide one subcommand name from a parent's help listing.
|
|
80
|
+
*
|
|
81
|
+
* Idempotent, and safe to call for several children of the same parent: the
|
|
82
|
+
* help override is installed once and consults a growing name set.
|
|
83
|
+
*/
|
|
84
|
+
function hideFromParentHelp(parent, name) {
|
|
85
|
+
const existing = hiddenByParent.get(parent);
|
|
86
|
+
if (existing) {
|
|
87
|
+
existing.add(name);
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
const hidden = new Set([name]);
|
|
91
|
+
hiddenByParent.set(parent, hidden);
|
|
92
|
+
// Delegate to commander's own visibility rules, then subtract. Reimplementing
|
|
93
|
+
// the filter would drop its handling of the built-in help command.
|
|
94
|
+
const base = new Help();
|
|
95
|
+
parent.configureHelp({
|
|
96
|
+
visibleCommands: (cmd) => base.visibleCommands(cmd).filter((child) => !hidden.has(child.name())),
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Read back the names hidden from a parent's help.
|
|
101
|
+
*
|
|
102
|
+
* Exported for tests; production code has no reason to ask.
|
|
103
|
+
*/
|
|
104
|
+
export function hiddenCommandNames(parent) {
|
|
105
|
+
return [...(hiddenByParent.get(parent) ?? [])];
|
|
106
|
+
}
|
|
107
|
+
//# sourceMappingURL=deprecate-command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1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