@aligndottech/cli 0.34.1 → 0.35.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/README.md +2 -0
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js +5 -0
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/decisions/index.d.ts.map +1 -1
- package/dist/commands/decisions/index.js +9 -1
- package/dist/commands/decisions/index.js.map +1 -1
- package/dist/commands/import/sessions.d.ts +16 -0
- package/dist/commands/import/sessions.d.ts.map +1 -0
- package/dist/commands/import/sessions.js +122 -0
- package/dist/commands/import/sessions.js.map +1 -0
- package/dist/commands/import.d.ts.map +1 -1
- package/dist/commands/import.js +2 -0
- package/dist/commands/import.js.map +1 -1
- package/dist/commands/push.d.ts +25 -0
- package/dist/commands/push.d.ts.map +1 -0
- package/dist/commands/push.js +98 -0
- package/dist/commands/push.js.map +1 -0
- package/dist/commands/ratify.d.ts +23 -0
- package/dist/commands/ratify.d.ts.map +1 -0
- package/dist/commands/ratify.js +51 -0
- package/dist/commands/ratify.js.map +1 -0
- package/dist/commands/why.d.ts.map +1 -1
- package/dist/commands/why.js +4 -1
- package/dist/commands/why.js.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/answer-render.d.ts +2 -0
- package/dist/lib/answer-render.d.ts.map +1 -0
- package/dist/lib/answer-render.js +24 -0
- package/dist/lib/answer-render.js.map +1 -0
- package/dist/lib/capture-sources.d.ts +4 -0
- package/dist/lib/capture-sources.d.ts.map +1 -1
- package/dist/lib/capture-sources.js +1 -0
- package/dist/lib/capture-sources.js.map +1 -1
- package/dist/lib/decider-kind.d.ts +37 -0
- package/dist/lib/decider-kind.d.ts.map +1 -0
- package/dist/lib/decider-kind.js +41 -0
- package/dist/lib/decider-kind.js.map +1 -0
- package/dist/lib/decisions-context.d.ts +7 -0
- package/dist/lib/decisions-context.d.ts.map +1 -1
- package/dist/lib/decisions-context.js +29 -6
- package/dist/lib/decisions-context.js.map +1 -1
- package/dist/lib/gateway-client.d.ts +32 -0
- package/dist/lib/gateway-client.d.ts.map +1 -1
- package/dist/lib/gateway-client.js +10 -0
- package/dist/lib/gateway-client.js.map +1 -1
- package/dist/lib/git.d.ts +18 -0
- package/dist/lib/git.d.ts.map +1 -1
- package/dist/lib/git.js +31 -0
- package/dist/lib/git.js.map +1 -1
- package/dist/lib/import-defaults.d.ts +1 -0
- package/dist/lib/import-defaults.d.ts.map +1 -1
- package/dist/lib/import-defaults.js +1 -0
- package/dist/lib/import-defaults.js.map +1 -1
- package/dist/lib/local-db.d.ts +56 -1
- package/dist/lib/local-db.d.ts.map +1 -1
- package/dist/lib/local-db.js +104 -7
- package/dist/lib/local-db.js.map +1 -1
- package/dist/lib/local-gateway-client.d.ts +50 -0
- package/dist/lib/local-gateway-client.d.ts.map +1 -1
- package/dist/lib/local-gateway-client.js +90 -4
- package/dist/lib/local-gateway-client.js.map +1 -1
- package/dist/lib/local-llm.d.ts.map +1 -1
- package/dist/lib/local-llm.js +2 -1
- package/dist/lib/local-llm.js.map +1 -1
- package/dist/lib/personal-import.d.ts +26 -0
- package/dist/lib/personal-import.d.ts.map +1 -1
- package/dist/lib/personal-import.js +43 -0
- package/dist/lib/personal-import.js.map +1 -1
- package/dist/lib/sessions/adapters/claude-code.d.ts +4 -0
- package/dist/lib/sessions/adapters/claude-code.d.ts.map +1 -0
- package/dist/lib/sessions/adapters/claude-code.js +93 -0
- package/dist/lib/sessions/adapters/claude-code.js.map +1 -0
- package/dist/lib/sessions/adapters/codex.d.ts +6 -0
- package/dist/lib/sessions/adapters/codex.d.ts.map +1 -0
- package/dist/lib/sessions/adapters/codex.js +91 -0
- package/dist/lib/sessions/adapters/codex.js.map +1 -0
- package/dist/lib/sessions/adapters/cursor.d.ts +17 -0
- package/dist/lib/sessions/adapters/cursor.d.ts.map +1 -0
- package/dist/lib/sessions/adapters/cursor.js +31 -0
- package/dist/lib/sessions/adapters/cursor.js.map +1 -0
- package/dist/lib/sessions/adapters/gemini-cli.d.ts +15 -0
- package/dist/lib/sessions/adapters/gemini-cli.d.ts.map +1 -0
- package/dist/lib/sessions/adapters/gemini-cli.js +29 -0
- package/dist/lib/sessions/adapters/gemini-cli.js.map +1 -0
- package/dist/lib/sessions/adapters/opencode.d.ts +4 -0
- package/dist/lib/sessions/adapters/opencode.d.ts.map +1 -0
- package/dist/lib/sessions/adapters/opencode.js +100 -0
- package/dist/lib/sessions/adapters/opencode.js.map +1 -0
- package/dist/lib/sessions/adapters/pi.d.ts +4 -0
- package/dist/lib/sessions/adapters/pi.d.ts.map +1 -0
- package/dist/lib/sessions/adapters/pi.js +102 -0
- package/dist/lib/sessions/adapters/pi.js.map +1 -0
- package/dist/lib/sessions/extract-structured.d.ts +21 -0
- package/dist/lib/sessions/extract-structured.d.ts.map +1 -0
- package/dist/lib/sessions/extract-structured.js +72 -0
- package/dist/lib/sessions/extract-structured.js.map +1 -0
- package/dist/lib/sessions/fs-scan.d.ts +10 -0
- package/dist/lib/sessions/fs-scan.d.ts.map +1 -0
- package/dist/lib/sessions/fs-scan.js +33 -0
- package/dist/lib/sessions/fs-scan.js.map +1 -0
- package/dist/lib/sessions/registry.d.ts +11 -0
- package/dist/lib/sessions/registry.d.ts.map +1 -0
- package/dist/lib/sessions/registry.js +22 -0
- package/dist/lib/sessions/registry.js.map +1 -0
- package/dist/lib/sessions/source-url.d.ts +10 -0
- package/dist/lib/sessions/source-url.d.ts.map +1 -0
- package/dist/lib/sessions/source-url.js +20 -0
- package/dist/lib/sessions/source-url.js.map +1 -0
- package/dist/lib/sessions/types.d.ts +62 -0
- package/dist/lib/sessions/types.d.ts.map +1 -0
- package/dist/lib/sessions/types.js +19 -0
- package/dist/lib/sessions/types.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fs-scan.js","sourceRoot":"","sources":["../../../src/lib/sessions/fs-scan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAAY,EAAE,OAAe;IAC9D,IAAI,OAAO,CAAC;IACZ,IAAI,CAAC;QACH,OAAO,GAAG,WAAW,CAAC,IAAI,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;IACvD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;QAC5B,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;QACpC,IAAI,KAAK,CAAC,WAAW,EAAE,EAAE,CAAC;YACxB,KAAK,CAAC,IAAI,CAAC,GAAG,kBAAkB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;QACnD,CAAC;aAAM,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;YAC9B,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACnB,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;wCACwC;AACxC,MAAM,UAAU,eAAe,CAAC,KAAe;IAC7C,OAAO,CAAC,GAAG,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;AAC9E,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { SessionAdapter } from './types.js';
|
|
2
|
+
export declare const ADAPTERS: SessionAdapter[];
|
|
3
|
+
export interface DetectedAgent {
|
|
4
|
+
adapter: SessionAdapter;
|
|
5
|
+
files: string[];
|
|
6
|
+
}
|
|
7
|
+
/** `align import sessions`' auto-detect: every agent that has actually left session data
|
|
8
|
+
* for this project. An agent with zero files is "never run here" - the normal case for
|
|
9
|
+
* five of six adapters on any one machine - so it is silently excluded, not reported. */
|
|
10
|
+
export declare function detectAgents(cwd: string, adapters?: SessionAdapter[]): DetectedAgent[];
|
|
11
|
+
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/lib/sessions/registry.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,eAAO,MAAM,QAAQ,EAAE,cAAc,EAEpC,CAAC;AAEF,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,cAAc,CAAC;IACxB,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED;;0FAE0F;AAC1F,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,GAAE,cAAc,EAAa,GAAG,aAAa,EAAE,CAOhG"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { claudeCodeAdapter } from './adapters/claude-code.js';
|
|
2
|
+
import { codexAdapter } from './adapters/codex.js';
|
|
3
|
+
import { cursorAdapter } from './adapters/cursor.js';
|
|
4
|
+
import { geminiCliAdapter } from './adapters/gemini-cli.js';
|
|
5
|
+
import { opencodeAdapter } from './adapters/opencode.js';
|
|
6
|
+
import { piAdapter } from './adapters/pi.js';
|
|
7
|
+
export const ADAPTERS = [
|
|
8
|
+
claudeCodeAdapter, codexAdapter, cursorAdapter, geminiCliAdapter, opencodeAdapter, piAdapter,
|
|
9
|
+
];
|
|
10
|
+
/** `align import sessions`' auto-detect: every agent that has actually left session data
|
|
11
|
+
* for this project. An agent with zero files is "never run here" - the normal case for
|
|
12
|
+
* five of six adapters on any one machine - so it is silently excluded, not reported. */
|
|
13
|
+
export function detectAgents(cwd, adapters = ADAPTERS) {
|
|
14
|
+
const found = [];
|
|
15
|
+
for (const adapter of adapters) {
|
|
16
|
+
const files = adapter.locateSessionFiles(cwd);
|
|
17
|
+
if (files.length > 0)
|
|
18
|
+
found.push({ adapter, files });
|
|
19
|
+
}
|
|
20
|
+
return found;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../src/lib/sessions/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAG7C,MAAM,CAAC,MAAM,QAAQ,GAAqB;IACxC,iBAAiB,EAAE,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,eAAe,EAAE,SAAS;CAC7F,CAAC;AAOF;;0FAE0F;AAC1F,MAAM,UAAU,YAAY,CAAC,GAAW,EAAE,WAA6B,QAAQ;IAC7E,MAAM,KAAK,GAAoB,EAAE,CAAC;IAClC,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,MAAM,KAAK,GAAG,OAAO,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC;QAC9C,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC;YAAE,KAAK,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;IACvD,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AgentName } from './types.js';
|
|
2
|
+
/** ALI-808 shared contract: the agent name lives in the scheme, `platform` stays the single
|
|
3
|
+
* value `agent-session` everywhere else. */
|
|
4
|
+
export declare function buildSessionSourceUrl(agent: AgentName, sessionId: string, messageId: string): string;
|
|
5
|
+
export declare function parseSessionSourceUrl(url: string): {
|
|
6
|
+
agent: AgentName;
|
|
7
|
+
sessionId: string;
|
|
8
|
+
messageId: string;
|
|
9
|
+
} | null;
|
|
10
|
+
//# sourceMappingURL=source-url.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source-url.d.ts","sourceRoot":"","sources":["../../../src/lib/sessions/source-url.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAI5C;6CAC6C;AAC7C,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAEpG;AAED,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,SAAS,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAWpH"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const AGENTS = ['claude-code', 'codex', 'cursor', 'gemini-cli', 'opencode', 'pi'];
|
|
2
|
+
/** ALI-808 shared contract: the agent name lives in the scheme, `platform` stays the single
|
|
3
|
+
* value `agent-session` everywhere else. */
|
|
4
|
+
export function buildSessionSourceUrl(agent, sessionId, messageId) {
|
|
5
|
+
return `${agent}-session://${sessionId}/${messageId}`;
|
|
6
|
+
}
|
|
7
|
+
export function parseSessionSourceUrl(url) {
|
|
8
|
+
for (const agent of AGENTS) {
|
|
9
|
+
const prefix = `${agent}-session://`;
|
|
10
|
+
if (url.startsWith(prefix)) {
|
|
11
|
+
const rest = url.slice(prefix.length);
|
|
12
|
+
const slash = rest.indexOf('/');
|
|
13
|
+
if (slash === -1)
|
|
14
|
+
return null;
|
|
15
|
+
return { agent, sessionId: rest.slice(0, slash), messageId: rest.slice(slash + 1) };
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=source-url.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source-url.js","sourceRoot":"","sources":["../../../src/lib/sessions/source-url.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,GAAyB,CAAC,aAAa,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,UAAU,EAAE,IAAI,CAAC,CAAC;AAExG;6CAC6C;AAC7C,MAAM,UAAU,qBAAqB,CAAC,KAAgB,EAAE,SAAiB,EAAE,SAAiB;IAC1F,OAAO,GAAG,KAAK,cAAc,SAAS,IAAI,SAAS,EAAE,CAAC;AACxD,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,GAAW;IAC/C,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,MAAM,MAAM,GAAG,GAAG,KAAK,aAAa,CAAC;QACrC,IAAI,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;YAC3B,MAAM,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YACtC,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;YAChC,IAAI,KAAK,KAAK,CAAC,CAAC;gBAAE,OAAO,IAAI,CAAC;YAC9B,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,EAAE,CAAC;QACtF,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ALI-808: the canonical shape every per-agent adapter parses into, so extraction (Pass A,
|
|
3
|
+
* and eventually ALI-809's Pass B) never learns which agent it is reading - the same
|
|
4
|
+
* `normalizeHookPayload` pattern used for the destructive-command guard (ALI-357/#1953) and
|
|
5
|
+
* the pre-edit conflict check (align-cli#86), both cited in the ALI-608 addendum.
|
|
6
|
+
*/
|
|
7
|
+
/** The six agents named in the ALI-808 shared contract. Not every adapter parses content yet
|
|
8
|
+
* (see `fixtureVerified` on SessionAdapter) - the name is reserved even where the reader
|
|
9
|
+
* is not, because it is also the scheme host in a session's source_url. */
|
|
10
|
+
export type AgentName = 'claude-code' | 'codex' | 'cursor' | 'gemini-cli' | 'opencode' | 'pi';
|
|
11
|
+
export interface SessionToolCall {
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
arguments: unknown;
|
|
15
|
+
}
|
|
16
|
+
export interface SessionTurn {
|
|
17
|
+
role: 'user' | 'assistant';
|
|
18
|
+
/** The turn's own text, own words - never a tool result or a system reminder. Empty
|
|
19
|
+
* string, not absent, when a turn is tool-calls-only (keeps every consumer's access
|
|
20
|
+
* uniform rather than optional-chaining everywhere). */
|
|
21
|
+
text: string;
|
|
22
|
+
toolCalls: SessionToolCall[];
|
|
23
|
+
/** Keyed by SessionToolCall.id, when the transcript records a result for it. A missing
|
|
24
|
+
* key means "no result recorded", not "empty result" - the two are different facts
|
|
25
|
+
* (a cancelled tool call vs. one that returned nothing). */
|
|
26
|
+
toolResults: Record<string, string>;
|
|
27
|
+
/** ISO-8601, or null when the source did not carry one for this turn. */
|
|
28
|
+
timestamp: string | null;
|
|
29
|
+
}
|
|
30
|
+
export interface CanonicalSession {
|
|
31
|
+
agent: AgentName;
|
|
32
|
+
sessionId: string;
|
|
33
|
+
/** The working directory the agent was running in, when the source records one. */
|
|
34
|
+
cwd: string | null;
|
|
35
|
+
turns: SessionTurn[];
|
|
36
|
+
}
|
|
37
|
+
export interface SessionAdapter {
|
|
38
|
+
agent: AgentName;
|
|
39
|
+
/** True only when a real captured session backs this adapter's fixture (the ALI-808
|
|
40
|
+
* shared-contract gate: "the gate is the fixture, not the agent name"). False means
|
|
41
|
+
* `parseSession` is intentionally unimplemented - see fixtures/sessions/README.md for
|
|
42
|
+
* which agents and why. */
|
|
43
|
+
fixtureVerified: boolean;
|
|
44
|
+
/** Session files for the given project directory, newest first. Never throws on a
|
|
45
|
+
* missing/unreadable agent data directory - that is "this agent has no local data
|
|
46
|
+
* here", not an error, and every caller (detectAgents, the import command) treats an
|
|
47
|
+
* empty array as the normal "not installed / never used here" case. */
|
|
48
|
+
locateSessionFiles(cwd: string): string[];
|
|
49
|
+
/** Parses one session file. Returns null for a file that does not belong to this agent's
|
|
50
|
+
* format (defensive - locateSessionFiles should not hand it one, but a caller passing an
|
|
51
|
+
* arbitrary path must get an honest null rather than a throw). Throws
|
|
52
|
+
* SessionFormatUnverifiedError for an adapter with fixtureVerified === false. */
|
|
53
|
+
parseSession(filePath: string): CanonicalSession | null;
|
|
54
|
+
}
|
|
55
|
+
/** Thrown by an unverified adapter's parseSession, instead of guessing at a format nobody
|
|
56
|
+
* has confirmed against a real session (verification.md: a plausible construction is not
|
|
57
|
+
* data). Naming the fixtures README in the message is deliberate - it is the one place
|
|
58
|
+
* that explains why and what unblocks it. */
|
|
59
|
+
export declare class SessionFormatUnverifiedError extends Error {
|
|
60
|
+
constructor(agent: AgentName);
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/sessions/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;4EAE4E;AAC5E,MAAM,MAAM,SAAS,GAAG,aAAa,GAAG,OAAO,GAAG,QAAQ,GAAG,YAAY,GAAG,UAAU,GAAG,IAAI,CAAC;AAE9F,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;IAC3B;;6DAEyD;IACzD,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,eAAe,EAAE,CAAC;IAC7B;;iEAE6D;IAC7D,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,yEAAyE;IACzE,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,SAAS,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,mFAAmF;IACnF,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,KAAK,EAAE,WAAW,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,SAAS,CAAC;IACjB;;;gCAG4B;IAC5B,eAAe,EAAE,OAAO,CAAC;IACzB;;;4EAGwE;IACxE,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC1C;;;sFAGkF;IAClF,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI,CAAC;CACzD;AAED;;;8CAG8C;AAC9C,qBAAa,4BAA6B,SAAQ,KAAK;gBACzC,KAAK,EAAE,SAAS;CAQ7B"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ALI-808: the canonical shape every per-agent adapter parses into, so extraction (Pass A,
|
|
3
|
+
* and eventually ALI-809's Pass B) never learns which agent it is reading - the same
|
|
4
|
+
* `normalizeHookPayload` pattern used for the destructive-command guard (ALI-357/#1953) and
|
|
5
|
+
* the pre-edit conflict check (align-cli#86), both cited in the ALI-608 addendum.
|
|
6
|
+
*/
|
|
7
|
+
/** Thrown by an unverified adapter's parseSession, instead of guessing at a format nobody
|
|
8
|
+
* has confirmed against a real session (verification.md: a plausible construction is not
|
|
9
|
+
* data). Naming the fixtures README in the message is deliberate - it is the one place
|
|
10
|
+
* that explains why and what unblocks it. */
|
|
11
|
+
export class SessionFormatUnverifiedError extends Error {
|
|
12
|
+
constructor(agent) {
|
|
13
|
+
super(`${agent}'s session format is not fixture-verified yet (no real captured session was ` +
|
|
14
|
+
`available - see src/__tests__/fixtures/sessions/README.md). Capture a real session and ` +
|
|
15
|
+
`add it as a fixture before parsing this agent's data.`);
|
|
16
|
+
this.name = 'SessionFormatUnverifiedError';
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/lib/sessions/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAuDH;;;8CAG8C;AAC9C,MAAM,OAAO,4BAA6B,SAAQ,KAAK;IACrD,YAAY,KAAgB;QAC1B,KAAK,CACH,GAAG,KAAK,8EAA8E;YACtF,yFAAyF;YACzF,uDAAuD,CACxD,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,8BAA8B,CAAC;IAC7C,CAAC;CACF"}
|