@orcareplay/adapters 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/claude-code.d.ts +37 -0
- package/dist/claude-code.d.ts.map +1 -0
- package/dist/claude-code.js +103 -0
- package/dist/claude-code.js.map +1 -0
- package/dist/codex.d.ts +36 -0
- package/dist/codex.d.ts.map +1 -0
- package/dist/codex.js +128 -0
- package/dist/codex.js.map +1 -0
- package/dist/contract.d.ts +41 -0
- package/dist/contract.d.ts.map +1 -0
- package/dist/contract.js +373 -0
- package/dist/contract.js.map +1 -0
- package/dist/detect.d.ts +47 -0
- package/dist/detect.d.ts.map +1 -0
- package/dist/detect.js +123 -0
- package/dist/detect.js.map +1 -0
- package/dist/env.d.ts +31 -0
- package/dist/env.d.ts.map +1 -0
- package/dist/env.js +54 -0
- package/dist/env.js.map +1 -0
- package/dist/generic-openai.d.ts +8 -0
- package/dist/generic-openai.d.ts.map +1 -0
- package/dist/generic-openai.js +31 -0
- package/dist/generic-openai.js.map +1 -0
- package/dist/grok.d.ts +23 -0
- package/dist/grok.d.ts.map +1 -0
- package/dist/grok.js +50 -0
- package/dist/grok.js.map +1 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp-config.d.ts +17 -0
- package/dist/mcp-config.d.ts.map +1 -0
- package/dist/mcp-config.js +62 -0
- package/dist/mcp-config.js.map +1 -0
- package/dist/node.d.ts +20 -0
- package/dist/node.d.ts.map +1 -0
- package/dist/node.js +60 -0
- package/dist/node.js.map +1 -0
- package/dist/openclaw.d.ts +19 -0
- package/dist/openclaw.d.ts.map +1 -0
- package/dist/openclaw.js +43 -0
- package/dist/openclaw.js.map +1 -0
- package/dist/opencode.d.ts +9 -0
- package/dist/opencode.d.ts.map +1 -0
- package/dist/opencode.js +52 -0
- package/dist/opencode.js.map +1 -0
- package/dist/registry.d.ts +19 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +82 -0
- package/dist/registry.js.map +1 -0
- package/dist/scaffold.d.ts +26 -0
- package/dist/scaffold.d.ts.map +1 -0
- package/dist/scaffold.js +125 -0
- package/dist/scaffold.js.map +1 -0
- package/dist/session.d.ts +47 -0
- package/dist/session.d.ts.map +1 -0
- package/dist/session.js +112 -0
- package/dist/session.js.map +1 -0
- package/package.json +18 -0
package/dist/registry.js
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { claudeCodeAdapter } from './claude-code.js';
|
|
2
|
+
import { codexAdapter } from './codex.js';
|
|
3
|
+
import { genericOpenAiAdapter } from './generic-openai.js';
|
|
4
|
+
import { grokAdapter } from './grok.js';
|
|
5
|
+
import { openClawAdapter } from './openclaw.js';
|
|
6
|
+
import { nodeAdapter } from './node.js';
|
|
7
|
+
import { openCodeAdapter } from './opencode.js';
|
|
8
|
+
export class AdapterRegistry {
|
|
9
|
+
#adapters = new Map();
|
|
10
|
+
/** Alias → canonical id. Kept apart from #adapters so `ids()` stays the canonical id space. */
|
|
11
|
+
#aliases = new Map();
|
|
12
|
+
register(adapter) {
|
|
13
|
+
const existing = this.#adapters.get(adapter.id);
|
|
14
|
+
if (existing && existing !== adapter) {
|
|
15
|
+
throw new Error(`adapter id '${adapter.id}' is already registered; two adapters cannot share an id — ` +
|
|
16
|
+
'rename one of them');
|
|
17
|
+
}
|
|
18
|
+
for (const alias of adapter.aliases ?? []) {
|
|
19
|
+
// An alias that shadows a real id, or one already claimed, would make `orca record <name>`
|
|
20
|
+
// silently launch a different harness than the name says. Fail at registration instead.
|
|
21
|
+
const clash = this.#adapters.get(alias) ?? this.#adapters.get(this.#aliases.get(alias) ?? '');
|
|
22
|
+
if (clash && clash !== adapter) {
|
|
23
|
+
throw new Error(`adapter '${adapter.id}' claims the alias '${alias}', which already resolves to ` +
|
|
24
|
+
`'${clash.id}' — an alias cannot point at two harnesses`);
|
|
25
|
+
}
|
|
26
|
+
this.#aliases.set(alias, adapter.id);
|
|
27
|
+
}
|
|
28
|
+
this.#adapters.set(adapter.id, adapter);
|
|
29
|
+
}
|
|
30
|
+
get(id) {
|
|
31
|
+
const adapter = this.#adapters.get(id) ?? this.#adapters.get(this.#aliases.get(id) ?? '');
|
|
32
|
+
if (!adapter) {
|
|
33
|
+
throw new Error(`unknown adapter '${id}'. Known adapters: ${this.names().join(', ')}. ` +
|
|
34
|
+
"If your agent is not listed, run it under 'generic-openai' and pass the command after " +
|
|
35
|
+
'--, e.g. orca record generic-openai -- my-agent --task ...');
|
|
36
|
+
}
|
|
37
|
+
return adapter;
|
|
38
|
+
}
|
|
39
|
+
/** Canonical ids. This is the id space a manifest is written in. */
|
|
40
|
+
ids() {
|
|
41
|
+
return [...this.#adapters.keys()];
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Everything a user may type, canonical ids with their aliases attached.
|
|
45
|
+
*
|
|
46
|
+
* Error messages and help text use this rather than `ids()`: someone who just typed `claude`
|
|
47
|
+
* needs to see that `claude` is spelled `claude`, not be shown a list that omits it.
|
|
48
|
+
*/
|
|
49
|
+
names() {
|
|
50
|
+
return this.ids().map((id) => {
|
|
51
|
+
const aliases = [...this.#aliases.entries()]
|
|
52
|
+
.filter(([, target]) => target === id)
|
|
53
|
+
.map(([alias]) => alias);
|
|
54
|
+
return aliases.length === 0 ? id : `${id} (or ${aliases.join(', ')})`;
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
/** First adapter that claims the workspace. A detector that throws is treated as "no". */
|
|
58
|
+
async detect(cwd) {
|
|
59
|
+
for (const adapter of this.#adapters.values()) {
|
|
60
|
+
try {
|
|
61
|
+
if (await adapter.detect(cwd))
|
|
62
|
+
return adapter;
|
|
63
|
+
}
|
|
64
|
+
catch {
|
|
65
|
+
continue;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return undefined;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
export function defaultAdapters() {
|
|
72
|
+
const registry = new AdapterRegistry();
|
|
73
|
+
registry.register(claudeCodeAdapter);
|
|
74
|
+
registry.register(codexAdapter);
|
|
75
|
+
registry.register(openCodeAdapter);
|
|
76
|
+
registry.register(grokAdapter);
|
|
77
|
+
registry.register(openClawAdapter);
|
|
78
|
+
registry.register(nodeAdapter);
|
|
79
|
+
registry.register(genericOpenAiAdapter);
|
|
80
|
+
return registry;
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,MAAM,OAAO,eAAe;IACjB,SAAS,GAAG,IAAI,GAAG,EAAmB,CAAC;IAChD,+FAA+F;IACtF,QAAQ,GAAG,IAAI,GAAG,EAAkB,CAAC;IAE9C,QAAQ,CAAC,OAAgB;QACvB,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QAChD,IAAI,QAAQ,IAAI,QAAQ,KAAK,OAAO,EAAE,CAAC;YACrC,MAAM,IAAI,KAAK,CACb,eAAe,OAAO,CAAC,EAAE,6DAA6D;gBACpF,oBAAoB,CACvB,CAAC;QACJ,CAAC;QACD,KAAK,MAAM,KAAK,IAAI,OAAO,CAAC,OAAO,IAAI,EAAE,EAAE,CAAC;YAC1C,2FAA2F;Y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C,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adapters are the growth loop: they are how OrcaReplay reaches harnesses its maintainers have
|
|
3
|
+
* never run. This returns file *contents* rather than writing them — the CLI owns the filesystem,
|
|
4
|
+
* and data comes back testable, so the generated code is held to the same contract as the shipped
|
|
5
|
+
* adapters instead of being hoped about.
|
|
6
|
+
*/
|
|
7
|
+
export interface ScaffoldFile {
|
|
8
|
+
/** Path relative to packages/adapters, where a contributor would add the file. */
|
|
9
|
+
path: string;
|
|
10
|
+
contents: string;
|
|
11
|
+
}
|
|
12
|
+
export interface ScaffoldResult {
|
|
13
|
+
files: ScaffoldFile[];
|
|
14
|
+
}
|
|
15
|
+
export interface ScaffoldOptions {
|
|
16
|
+
/** Binary that launches the harness. Defaults to the adapter id. */
|
|
17
|
+
command?: string;
|
|
18
|
+
/** Variable the harness reads for its API origin. One of MODEL_BASE_URL_VARS. */
|
|
19
|
+
baseUrlVar?: string;
|
|
20
|
+
/** Credential the harness reads. Defaults to the base-url variable's provider. */
|
|
21
|
+
apiKeyVar?: string;
|
|
22
|
+
/** Path appended to the proxy url — OpenAI SDK clients want the version segment, others do not. */
|
|
23
|
+
basePath?: string;
|
|
24
|
+
}
|
|
25
|
+
export declare function scaffoldAdapter(name: string, opts?: ScaffoldOptions): ScaffoldResult;
|
|
26
|
+
//# sourceMappingURL=scaffold.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scaffold.d.ts","sourceRoot":"","sources":["../src/scaffold.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH,MAAM,WAAW,YAAY;IAC3B,kFAAkF;IAClF,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,YAAY,EAAE,CAAC;CACvB;AAED,MAAM,WAAW,eAAe;IAC9B,oEAAoE;IACpE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iFAAiF;IACjF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kFAAkF;IAClF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mGAAmG;IACnG,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE,eAAoB,GAAG,cAAc,CA+BxF"}
|
package/dist/scaffold.js
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { MODEL_BASE_URL_VARS } from './contract.js';
|
|
2
|
+
export function scaffoldAdapter(name, opts = {}) {
|
|
3
|
+
const id = toId(name);
|
|
4
|
+
if (id === '') {
|
|
5
|
+
throw new Error(`adapter name '${name}' has no usable characters; ids are lowercase kebab-case, e.g. 'my-agent'`);
|
|
6
|
+
}
|
|
7
|
+
const baseUrlVar = opts.baseUrlVar ?? 'OPENAI_BASE_URL';
|
|
8
|
+
if (!MODEL_BASE_URL_VARS.includes(baseUrlVar)) {
|
|
9
|
+
throw new Error(`${baseUrlVar} is not a variable the proxy speaks. Use one of ${MODEL_BASE_URL_VARS.join(', ')} — the proxy serves the Anthropic and OpenAI wire protocols, and a harness-specific variable is something you add alongside one of these, never instead of it`);
|
|
10
|
+
}
|
|
11
|
+
const provider = baseUrlVar.split('_')[0] ?? 'OPENAI';
|
|
12
|
+
const command = opts.command ?? id;
|
|
13
|
+
const apiKeyVar = opts.apiKeyVar ?? `${provider}_API_KEY`;
|
|
14
|
+
const basePath = opts.basePath ?? (provider === 'OPENAI' ? 'v1' : '');
|
|
15
|
+
const constName = exportName(id);
|
|
16
|
+
return {
|
|
17
|
+
files: [
|
|
18
|
+
{
|
|
19
|
+
path: `src/${id}.ts`,
|
|
20
|
+
contents: adapterSource({ id, constName, command, baseUrlVar, apiKeyVar, basePath }),
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
path: `test/${id}.test.ts`,
|
|
24
|
+
contents: testSource({ id, constName, command, baseUrlVar, apiKeyVar, basePath }),
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
function adapterSource(n) {
|
|
30
|
+
return `import type { Adapter, Launch, RecordContext } from '@orcareplay/plugin-api';
|
|
31
|
+
import { hasBinary } from './detect.js';
|
|
32
|
+
import { passKey, proxyBase } from './env.js';
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* TODO: confirm that ${n.command} really reads ${n.baseUrlVar} for its API origin, then record
|
|
36
|
+
* what you verified in fixtures/harness/${n.id}.json. If the harness reads some other variable,
|
|
37
|
+
* this adapter captures nothing and every run still looks exactly like it worked.
|
|
38
|
+
*/
|
|
39
|
+
export const ${n.constName}: Adapter = {
|
|
40
|
+
id: '${n.id}',
|
|
41
|
+
// harnessVersions: '>=1.0.0', // the range you actually tested against, once you have one
|
|
42
|
+
|
|
43
|
+
async detect(_cwd: string): Promise<boolean> {
|
|
44
|
+
return hasBinary('${n.command}');
|
|
45
|
+
},
|
|
46
|
+
|
|
47
|
+
async prepare(ctx: RecordContext): Promise<Launch> {
|
|
48
|
+
const env: Record<string, string> = { ${n.baseUrlVar}: ${proxyCall(n.basePath)} };
|
|
49
|
+
passKey(env, ctx.env, '${n.apiKeyVar}');
|
|
50
|
+
return { command: '${n.command}', args: [...ctx.userArgs], env };
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
`;
|
|
54
|
+
}
|
|
55
|
+
function testSource(n) {
|
|
56
|
+
return `import type { RecordContext } from '@orcareplay/plugin-api';
|
|
57
|
+
import { describe, expect, it } from 'vitest';
|
|
58
|
+
import { checkAdapterContract } from '../src/contract.js';
|
|
59
|
+
import { ${n.constName} } from '../src/${n.id}.js';
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Register the adapter in src/index.ts and src/registry.ts and record its wire contract in
|
|
63
|
+
* fixtures/harness/${n.id}.json; test/contract.test.ts and test/harness-versions.test.ts then
|
|
64
|
+
* cover it with no further opt-in. This file is for what only you can assert — the flags and
|
|
65
|
+
* environment this particular harness needs.
|
|
66
|
+
*/
|
|
67
|
+
|
|
68
|
+
function ctx(over: Partial<RecordContext> = {}): RecordContext {
|
|
69
|
+
return {
|
|
70
|
+
runId: 'run_scaffold',
|
|
71
|
+
cwd: '/work',
|
|
72
|
+
proxyUrl: 'http://127.0.0.1:51733',
|
|
73
|
+
runDir: '/work/.orca/runs/run_scaffold',
|
|
74
|
+
userArgs: [],
|
|
75
|
+
env: {},
|
|
76
|
+
...over,
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
describe('${n.constName}', () => {
|
|
81
|
+
it('satisfies the adapter contract', async () => {
|
|
82
|
+
const result = await checkAdapterContract(${n.constName});
|
|
83
|
+
expect(result.failed).toEqual([]);
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
it('points ${n.command} at the recording proxy', async () => {
|
|
87
|
+
const launch = await ${n.constName}.prepare(ctx());
|
|
88
|
+
expect(launch.command).toBe('${n.command}');
|
|
89
|
+
expect(launch.env.${n.baseUrlVar}).toBe('${expectedBaseUrl(n.basePath)}');
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
it('passes a real key through, and substitutes a placeholder when there is none', async () => {
|
|
93
|
+
const real = await ${n.constName}.prepare(ctx({ env: { ${n.apiKeyVar}: 'sk-real' } }));
|
|
94
|
+
expect(real.env.${n.apiKeyVar}).toBe('sk-real');
|
|
95
|
+
const none = await ${n.constName}.prepare(ctx());
|
|
96
|
+
expect(none.env.${n.apiKeyVar}).toBe('orca-recorded');
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
it('resolves detect() rather than throwing, even for a path that does not exist', async () => {
|
|
100
|
+
await expect(${n.constName}.detect('/nope/does/not/exist')).resolves.toBe(false);
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
`;
|
|
104
|
+
}
|
|
105
|
+
function proxyCall(basePath) {
|
|
106
|
+
return basePath === '' ? 'proxyBase(ctx.proxyUrl)' : `proxyBase(ctx.proxyUrl, '${basePath}')`;
|
|
107
|
+
}
|
|
108
|
+
function expectedBaseUrl(basePath) {
|
|
109
|
+
return basePath === '' ? 'http://127.0.0.1:51733' : `http://127.0.0.1:51733/${basePath}`;
|
|
110
|
+
}
|
|
111
|
+
function toId(name) {
|
|
112
|
+
return name
|
|
113
|
+
.trim()
|
|
114
|
+
.toLowerCase()
|
|
115
|
+
.replace(/[^a-z0-9]+/g, '-')
|
|
116
|
+
.replace(/^-+|-+$/g, '');
|
|
117
|
+
}
|
|
118
|
+
function exportName(id) {
|
|
119
|
+
const camel = id.replace(/-([a-z0-9])/g, (_, char) => char.toUpperCase());
|
|
120
|
+
// An identifier cannot start with a digit, and a scaffold that emits code which will not parse
|
|
121
|
+
// is worse than one that renames.
|
|
122
|
+
const safe = /^[0-9]/.test(camel) ? `agent${camel[0]?.toUpperCase()}${camel.slice(1)}` : camel;
|
|
123
|
+
return `${safe}Adapter`;
|
|
124
|
+
}
|
|
125
|
+
//# sourceMappingURL=scaffold.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scaffold.js","sourceRoot":"","sources":["../src/scaffold.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AA8BpD,MAAM,UAAU,eAAe,CAAC,IAAY,EAAE,OAAwB,EAAE;IACtE,MAAM,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC;IACtB,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CACb,iBAAiB,IAAI,2EAA2E,CACjG,CAAC;IACJ,CAAC;IACD,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,IAAI,iBAAiB,CAAC;IACxD,IAAI,CAAE,mBAAyC,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC;QACrE,MAAM,IAAI,KAAK,CACb,GAAG,UAAU,mDAAmD,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AG,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;IAC/F,OAAO,GAAG,IAAI,SAAS,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { SessionSupport } from '@orcareplay/plugin-api';
|
|
2
|
+
export type { SessionSupport };
|
|
3
|
+
/**
|
|
4
|
+
* Capturing what the harness itself wrote about the session.
|
|
5
|
+
*
|
|
6
|
+
* Orca's own capture layers record the *effects* of a run — model calls, tool calls, file writes,
|
|
7
|
+
* shell commands. None of them record the *stimulus*: what the person typed. A run started as
|
|
8
|
+
* `orca record claude` and driven by hand therefore replays into an agent with nothing to make it
|
|
9
|
+
* ask anything, which is why an interactive recording came back blank while an `-p` one replayed
|
|
10
|
+
* perfectly.
|
|
11
|
+
*
|
|
12
|
+
* Both harnesses already write that missing half to disk themselves, in their own transcript, and
|
|
13
|
+
* both can be pointed back at a session by id. So orca does not need to intercept a terminal: it
|
|
14
|
+
* needs to notice which file the harness just wrote, keep a copy, and read the prompts back out.
|
|
15
|
+
*/
|
|
16
|
+
/** What a harness recorded about one session, in the two forms orca needs. */
|
|
17
|
+
export interface SessionCapture {
|
|
18
|
+
/** Harness session id, where the harness has one. This is what `--resume` takes. */
|
|
19
|
+
id?: string;
|
|
20
|
+
/** Path of the transcript relative to the harness session directory. */
|
|
21
|
+
relPath: string;
|
|
22
|
+
/** The harness's own file, verbatim. Restoring it is what makes a native fork possible. */
|
|
23
|
+
bytes: Uint8Array;
|
|
24
|
+
/** The user's turns, in order — the stimulus orca could not otherwise reconstruct. */
|
|
25
|
+
prompts: string[];
|
|
26
|
+
}
|
|
27
|
+
/** A directory listing keyed by path, so a second listing can be diffed against it. */
|
|
28
|
+
export type DirSnapshot = Map<string, number>;
|
|
29
|
+
/**
|
|
30
|
+
* List every file under `dir` with its mtime.
|
|
31
|
+
*
|
|
32
|
+
* Never throws. A harness that has never run has no directory, a sandbox may deny it, and neither
|
|
33
|
+
* is a reason to fail a recording that is otherwise fine.
|
|
34
|
+
*/
|
|
35
|
+
export declare function snapshotDir(dir: string | undefined): Promise<DirSnapshot>;
|
|
36
|
+
/**
|
|
37
|
+
* The transcript this run produced: the newest file that is new, or whose mtime moved.
|
|
38
|
+
*
|
|
39
|
+
* Newest rather than only-new because a harness resumed into an existing session appends to the
|
|
40
|
+
* file it already had, and that session is still the one this run belongs to.
|
|
41
|
+
*/
|
|
42
|
+
export declare function captureSession(support: SessionSupport, cwd: string, env: Record<string, string | undefined>, before: DirSnapshot): Promise<SessionCapture | undefined>;
|
|
43
|
+
/** Read a JSONL transcript into objects, skipping anything that does not parse. */
|
|
44
|
+
export declare function parseJsonl(bytes: Uint8Array): Record<string, unknown>[];
|
|
45
|
+
/** Flatten the several shapes a harness uses for message content into plain text. */
|
|
46
|
+
export declare function contentText(content: unknown): string;
|
|
47
|
+
//# sourceMappingURL=session.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../src/session.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAE7D,YAAY,EAAE,cAAc,EAAE,CAAC;AAE/B;;;;;;;;;;;;GAYG;AAEH,8EAA8E;AAC9E,MAAM,WAAW,cAAc;IAC7B,oFAAoF;IACpF,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,wEAAwE;IACxE,OAAO,EAAE,MAAM,CAAC;IAChB,2FAA2F;IAC3F,KAAK,EAAE,UAAU,CAAC;IAClB,sFAAsF;IACtF,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,uFAAuF;AACvF,MAAM,MAAM,WAAW,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAE9C;;;;;GAKG;AACH,wBAAsB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC,CA0B/E;AAED;;;;;GAKG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,cAAc,EACvB,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,EACvC,MAAM,EAAE,WAAW,GAClB,OAAO,CAAC,cAAc,GAAG,SAAS,CAAC,CA2BrC;AAED,mFAAmF;AACnF,wBAAgB,UAAU,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAYvE;AAED,qFAAqF;AACrF,wBAAgB,WAAW,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAYpD"}
|
package/dist/session.js
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { readdir, readFile, stat } from 'node:fs/promises';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
/**
|
|
4
|
+
* List every file under `dir` with its mtime.
|
|
5
|
+
*
|
|
6
|
+
* Never throws. A harness that has never run has no directory, a sandbox may deny it, and neither
|
|
7
|
+
* is a reason to fail a recording that is otherwise fine.
|
|
8
|
+
*/
|
|
9
|
+
export async function snapshotDir(dir) {
|
|
10
|
+
const seen = new Map();
|
|
11
|
+
if (dir === undefined)
|
|
12
|
+
return seen;
|
|
13
|
+
async function walk(current, prefix) {
|
|
14
|
+
let entries;
|
|
15
|
+
try {
|
|
16
|
+
entries = await readdir(current, { withFileTypes: true });
|
|
17
|
+
}
|
|
18
|
+
catch {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
for (const entry of entries) {
|
|
22
|
+
const rel = prefix === '' ? entry.name : `${prefix}/${entry.name}`;
|
|
23
|
+
const full = join(current, entry.name);
|
|
24
|
+
if (entry.isDirectory()) {
|
|
25
|
+
await walk(full, rel);
|
|
26
|
+
}
|
|
27
|
+
else if (entry.isFile()) {
|
|
28
|
+
try {
|
|
29
|
+
seen.set(rel, (await stat(full)).mtimeMs);
|
|
30
|
+
}
|
|
31
|
+
catch {
|
|
32
|
+
// Vanished between listing and stat — a rotating transcript, and not ours to mind.
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
await walk(dir, '');
|
|
38
|
+
return seen;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* The transcript this run produced: the newest file that is new, or whose mtime moved.
|
|
42
|
+
*
|
|
43
|
+
* Newest rather than only-new because a harness resumed into an existing session appends to the
|
|
44
|
+
* file it already had, and that session is still the one this run belongs to.
|
|
45
|
+
*/
|
|
46
|
+
export async function captureSession(support, cwd, env, before) {
|
|
47
|
+
const dir = support.dir(cwd, env);
|
|
48
|
+
if (dir === undefined)
|
|
49
|
+
return undefined;
|
|
50
|
+
const after = await snapshotDir(dir);
|
|
51
|
+
let best;
|
|
52
|
+
for (const [relPath, mtime] of after) {
|
|
53
|
+
if (before.get(relPath) === mtime)
|
|
54
|
+
continue;
|
|
55
|
+
if (best === undefined || mtime > best.mtime)
|
|
56
|
+
best = { relPath, mtime };
|
|
57
|
+
}
|
|
58
|
+
if (best === undefined)
|
|
59
|
+
return undefined;
|
|
60
|
+
let bytes;
|
|
61
|
+
try {
|
|
62
|
+
bytes = await readFile(join(dir, best.relPath));
|
|
63
|
+
}
|
|
64
|
+
catch {
|
|
65
|
+
return undefined;
|
|
66
|
+
}
|
|
67
|
+
let parsed = { prompts: [] };
|
|
68
|
+
try {
|
|
69
|
+
parsed = support.parse(bytes);
|
|
70
|
+
}
|
|
71
|
+
catch {
|
|
72
|
+
// A format orca does not recognise still has value as bytes a human can read; losing the
|
|
73
|
+
// prompts is a degraded capture, not a failed one.
|
|
74
|
+
}
|
|
75
|
+
return { id: parsed.id, relPath: best.relPath, bytes, prompts: parsed.prompts };
|
|
76
|
+
}
|
|
77
|
+
/** Read a JSONL transcript into objects, skipping anything that does not parse. */
|
|
78
|
+
export function parseJsonl(bytes) {
|
|
79
|
+
const out = [];
|
|
80
|
+
for (const line of new TextDecoder().decode(bytes).split(/\r?\n/)) {
|
|
81
|
+
if (line.trim() === '')
|
|
82
|
+
continue;
|
|
83
|
+
try {
|
|
84
|
+
const value = JSON.parse(line);
|
|
85
|
+
if (value !== null && typeof value === 'object')
|
|
86
|
+
out.push(value);
|
|
87
|
+
}
|
|
88
|
+
catch {
|
|
89
|
+
// A half-written final line is normal for a transcript captured while the harness exits.
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
return out;
|
|
93
|
+
}
|
|
94
|
+
/** Flatten the several shapes a harness uses for message content into plain text. */
|
|
95
|
+
export function contentText(content) {
|
|
96
|
+
if (typeof content === 'string')
|
|
97
|
+
return content;
|
|
98
|
+
if (!Array.isArray(content))
|
|
99
|
+
return '';
|
|
100
|
+
const parts = [];
|
|
101
|
+
for (const block of content) {
|
|
102
|
+
if (typeof block === 'string')
|
|
103
|
+
parts.push(block);
|
|
104
|
+
else if (block !== null && typeof block === 'object' && 'text' in block) {
|
|
105
|
+
const text = block.text;
|
|
106
|
+
if (typeof text === 'string')
|
|
107
|
+
parts.push(text);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return parts.join('');
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=session.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.js","sourceRoot":"","sources":["../src/session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAkCjC;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,GAAuB;IACvD,MAAM,IAAI,GAAgB,IAAI,GAAG,EAAE,CAAC;IACpC,IAAI,GAAG,KAAK,SAAS;QAAE,OAAO,I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AE;YAAE,SAAS;QACjC,IAAI,CAAC;YACH,MAAM,KAAK,GAAY,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YACxC,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ;gBAAE,GAAG,CAAC,IAAI,CAAC,KAAgC,CAAC,CAAC;QAC9F,CAAC;QAAC,MAAM,CAAC;YACP,yFAAyF;QAC3F,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,qFAAqF;AACrF,MAAM,UAAU,WAAW,CAAC,OAAgB;IAC1C,IAAI,OAAO,OAAO,KAAK,QAAQ;QAAE,OAAO,OAAO,CAAC;IAChD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC;QAAE,OAAO,EAAE,CAAC;IACvC,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;QAC5B,IAAI,OAAO,KAAK,KAAK,QAAQ;YAAE,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aAC5C,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,IAAI,KAAK,EAAE,CAAC;YACxE,MAAM,IAAI,GAAI,KAA4B,CAAC,IAAI,CAAC;YAChD,IAAI,OAAO,IAAI,KAAK,QAAQ;gBAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjD,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACxB,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@orcareplay/adapters",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": "./dist/index.js"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"dist"
|
|
13
|
+
],
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"@orcareplay/node-instrument": "0.1.0",
|
|
16
|
+
"@orcareplay/plugin-api": "0.1.0"
|
|
17
|
+
}
|
|
18
|
+
}
|