@aexol/spectral 0.9.157 → 0.9.158
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/auth-helper.d.ts +3 -3
- package/dist/auth-helper.d.ts.map +1 -1
- package/dist/auth-helper.js +3 -3
- package/dist/commands/login.d.ts +1 -1
- package/dist/commands/login.js +6 -6
- package/dist/extensions/browser/index.d.ts +1 -1
- package/dist/extensions/browser/index.js +1 -1
- package/dist/extensions/image-generation/index.js +1 -1
- package/dist/memory/compaction.d.ts +0 -89
- package/dist/memory/compaction.d.ts.map +1 -1
- package/dist/memory/compaction.js +2 -759
- package/dist/memory/hooks/compaction-hook.d.ts.map +1 -1
- package/dist/memory/hooks/compaction-hook.js +9 -235
- package/dist/memory/prompts.d.ts +0 -4
- package/dist/memory/prompts.d.ts.map +1 -1
- package/dist/memory/prompts.js +0 -165
- package/dist/relay/auto-research.d.ts.map +1 -1
- package/dist/relay/auto-research.js +0 -1
- package/dist/sdk/ai/env-api-keys.d.ts.map +1 -1
- package/dist/sdk/ai/env-api-keys.js +0 -4
- package/dist/sdk/ai/models.generated.d.ts +0 -399
- package/dist/sdk/ai/models.generated.d.ts.map +1 -1
- package/dist/sdk/ai/models.generated.js +0 -395
- package/dist/sdk/ai/providers/register-builtins.d.ts +0 -4
- package/dist/sdk/ai/providers/register-builtins.d.ts.map +1 -1
- package/dist/sdk/ai/providers/register-builtins.js +0 -16
- package/dist/sdk/ai/types.d.ts +1 -1
- package/dist/sdk/ai/types.d.ts.map +1 -1
- package/dist/sdk/ai/utils/oauth/index.d.ts +0 -1
- package/dist/sdk/ai/utils/oauth/index.d.ts.map +1 -1
- package/dist/sdk/ai/utils/oauth/index.js +0 -3
- package/dist/sdk/coding-agent/core/agent-session.d.ts.map +1 -1
- package/dist/sdk/coding-agent/core/agent-session.js +4 -0
- package/dist/sdk/coding-agent/core/extensions/native-extensions.d.ts.map +1 -1
- package/dist/sdk/coding-agent/core/extensions/native-extensions.js +0 -10
- package/dist/sdk/coding-agent/core/model-resolver.d.ts.map +1 -1
- package/dist/sdk/coding-agent/core/model-resolver.js +0 -1
- package/dist/server/agent-bridge.d.ts.map +1 -1
- package/dist/server/agent-bridge.js +0 -2
- package/package.json +1 -1
- package/dist/extensions/kanban-bridge.d.ts +0 -24
- package/dist/extensions/kanban-bridge.d.ts.map +0 -1
- package/dist/extensions/kanban-bridge.js +0 -858
- package/dist/memory/unified-compaction.d.ts +0 -59
- package/dist/memory/unified-compaction.d.ts.map +0 -1
- package/dist/memory/unified-compaction.js +0 -332
- package/dist/sdk/ai/providers/anthropic.d.ts +0 -54
- package/dist/sdk/ai/providers/anthropic.d.ts.map +0 -1
- package/dist/sdk/ai/providers/anthropic.js +0 -921
- package/dist/sdk/ai/utils/oauth/anthropic.d.ts +0 -25
- package/dist/sdk/ai/utils/oauth/anthropic.d.ts.map +0 -1
- package/dist/sdk/ai/utils/oauth/anthropic.js +0 -334
package/dist/auth-helper.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* - `ensureAuthenticated()` — checks token validity, triggers OAuth re-login on 401/403
|
|
7
7
|
* - `isAuthError()` — checks if an error indicates auth failure
|
|
8
8
|
*
|
|
9
|
-
* Extensions (aexol-mcp,
|
|
9
|
+
* Extensions (aexol-mcp, image-generation) call ensureAuthenticated() when they
|
|
10
10
|
* detect an auth failure so the user can re-authenticate without dropping
|
|
11
11
|
* out to the terminal and running `spectral login` manually.
|
|
12
12
|
*/
|
|
@@ -33,8 +33,8 @@ export declare const OAUTH_REASON: {
|
|
|
33
33
|
readonly SERVE: "serve";
|
|
34
34
|
/** Background re-auth after a 401/403 from the backend. */
|
|
35
35
|
readonly REAUTH: "reauth";
|
|
36
|
-
/**
|
|
37
|
-
readonly
|
|
36
|
+
/** Aexol Studio authorization step. */
|
|
37
|
+
readonly STUDIO: "studio";
|
|
38
38
|
};
|
|
39
39
|
export type OAuthReason = (typeof OAUTH_REASON)[keyof typeof OAUTH_REASON];
|
|
40
40
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-helper.d.ts","sourceRoot":"","sources":["../src/auth-helper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAOH,OAAO,EAKL,KAAK,cAAc,EACpB,MAAM,aAAa,CAAC;AAOrB,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,OAAO,CAAC;IACZ,MAAM,EAAE,cAAc,GAAG,IAAI,CAAC;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,OAAO,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,eAAO,MAAM,YAAY;IACvB,4DAA4D;;IAE5D,6EAA6E;;IAE7E,2DAA2D;;IAE3D,
|
|
1
|
+
{"version":3,"file":"auth-helper.d.ts","sourceRoot":"","sources":["../src/auth-helper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAOH,OAAO,EAKL,KAAK,cAAc,EACpB,MAAM,aAAa,CAAC;AAOrB,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,OAAO,CAAC;IACZ,MAAM,EAAE,cAAc,GAAG,IAAI,CAAC;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,OAAO,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,eAAO,MAAM,YAAY;IACvB,4DAA4D;;IAE5D,6EAA6E;;IAE7E,2DAA2D;;IAE3D,uCAAuC;;CAE/B,CAAC;AACX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,OAAO,YAAY,CAAC,CAAC;AA8F3E;;;;;;;GAOG;AACH,wBAAsB,YAAY,CAChC,MAAM,CAAC,EAAE,MAAM,EACf,SAAS,GAAE,MAAyB,EACpC,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,WAAW,CAAC,CAmEtB;AAMD,0EAA0E;AAC1E,wBAAgB,WAAW,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAUjD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAgErE"}
|
package/dist/auth-helper.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* - `ensureAuthenticated()` — checks token validity, triggers OAuth re-login on 401/403
|
|
7
7
|
* - `isAuthError()` — checks if an error indicates auth failure
|
|
8
8
|
*
|
|
9
|
-
* Extensions (aexol-mcp,
|
|
9
|
+
* Extensions (aexol-mcp, image-generation) call ensureAuthenticated() when they
|
|
10
10
|
* detect an auth failure so the user can re-authenticate without dropping
|
|
11
11
|
* out to the terminal and running `spectral login` manually.
|
|
12
12
|
*/
|
|
@@ -27,8 +27,8 @@ export const OAUTH_REASON = {
|
|
|
27
27
|
SERVE: "serve",
|
|
28
28
|
/** Background re-auth after a 401/403 from the backend. */
|
|
29
29
|
REAUTH: "reauth",
|
|
30
|
-
/**
|
|
31
|
-
|
|
30
|
+
/** Aexol Studio authorization step. */
|
|
31
|
+
STUDIO: "studio",
|
|
32
32
|
};
|
|
33
33
|
// ---------------------------------------------------------------------------
|
|
34
34
|
// Constants
|
package/dist/commands/login.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* 2b. OAuth: open browser for Aexol Studio authorization.
|
|
10
10
|
* 3. Verify reachability + auth by calling tools/list against the URL.
|
|
11
11
|
* 4. On success: persist to ~/.spectral/config.json (mode 0600).
|
|
12
|
-
* 5. Chain OAuth to also obtain a user JWT for
|
|
12
|
+
* 5. Chain OAuth to also obtain a user JWT for Studio features.
|
|
13
13
|
*
|
|
14
14
|
* Exits non-zero on any failure so shell scripts can detect it.
|
|
15
15
|
*
|
package/dist/commands/login.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* 2b. OAuth: open browser for Aexol Studio authorization.
|
|
10
10
|
* 3. Verify reachability + auth by calling tools/list against the URL.
|
|
11
11
|
* 4. On success: persist to ~/.spectral/config.json (mode 0600).
|
|
12
|
-
* 5. Chain OAuth to also obtain a user JWT for
|
|
12
|
+
* 5. Chain OAuth to also obtain a user JWT for Studio features.
|
|
13
13
|
*
|
|
14
14
|
* Exits non-zero on any failure so shell scripts can detect it.
|
|
15
15
|
*
|
|
@@ -128,14 +128,14 @@ export async function runLogin() {
|
|
|
128
128
|
}
|
|
129
129
|
process.stdout.write(pc.green(`✓ Authenticated. Found ${result.toolCount} tools.\n`));
|
|
130
130
|
process.stdout.write(pc.dim(`Saved credentials to ${getConfigFile()}\n`));
|
|
131
|
-
// Chain OAuth for
|
|
132
|
-
process.stdout.write(pc.dim("\nAuthorizing for Aexol Studio features
|
|
133
|
-
const oauthResult = await runOAuthFlow(apiUrl, undefined, OAUTH_REASON.
|
|
131
|
+
// Chain OAuth for Studio features (non-fatal — MCP tools work without it)
|
|
132
|
+
process.stdout.write(pc.dim("\nAuthorizing for Aexol Studio features...\n"));
|
|
133
|
+
const oauthResult = await runOAuthFlow(apiUrl, undefined, OAUTH_REASON.STUDIO);
|
|
134
134
|
if (oauthResult.ok) {
|
|
135
|
-
process.stdout.write(pc.green("✓ CLI authorized for Studio
|
|
135
|
+
process.stdout.write(pc.green("✓ CLI authorized for Studio.\n"));
|
|
136
136
|
}
|
|
137
137
|
else {
|
|
138
|
-
process.stderr.write(pc.yellow(`⚠ OAuth authorization skipped (${oauthResult.reason}).
|
|
138
|
+
process.stderr.write(pc.yellow(`⚠ OAuth authorization skipped (${oauthResult.reason}). Studio features may not be available.\n`));
|
|
139
139
|
process.stderr.write(pc.dim(" Run `spectral login` and choose OAuth to set it up later.\n"));
|
|
140
140
|
}
|
|
141
141
|
}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*
|
|
12
12
|
* Architecture:
|
|
13
13
|
* - BrowserService (singleton) — one browser, one context, multiple pages
|
|
14
|
-
* - Tools register via ext.registerTool() — same pattern as
|
|
14
|
+
* - Tools register via ext.registerTool() — same pattern as aexol-mcp
|
|
15
15
|
* - Browser auto-closes on session_shutdown
|
|
16
16
|
*
|
|
17
17
|
* Registered tools (20):
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*
|
|
12
12
|
* Architecture:
|
|
13
13
|
* - BrowserService (singleton) — one browser, one context, multiple pages
|
|
14
|
-
* - Tools register via ext.registerTool() — same pattern as
|
|
14
|
+
* - Tools register via ext.registerTool() — same pattern as aexol-mcp
|
|
15
15
|
* - Browser auto-closes on session_shutdown
|
|
16
16
|
*
|
|
17
17
|
* Registered tools (20):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Type } from "typebox";
|
|
2
2
|
import { generateImages, getImageModel, getImageModels } from "../../sdk/ai/index.js";
|
|
3
|
-
// App-layer routing helpers (mirror
|
|
3
|
+
// App-layer routing helpers (mirror aexol-mcp.ts): obtain backendUrl +
|
|
4
4
|
// machineJwt the same way agent-bridge.ts gets them for text models, so image
|
|
5
5
|
// generation routes through the backend proxy (POST /image/generation) using
|
|
6
6
|
// the backend's own OPENROUTER_API_KEY instead of a local env key.
|
|
@@ -1,94 +1,6 @@
|
|
|
1
|
-
import { agentLoop } from "../sdk/agent-core/index.js";
|
|
2
|
-
import { type Model } from "../sdk/ai/index.js";
|
|
3
1
|
import type { MemoryReflection, ObservationRecord } from "./types.js";
|
|
4
|
-
export declare const REFLECTOR_MAX_PASSES = 1;
|
|
5
|
-
export declare const PRUNER_MAX_PASSES = 2;
|
|
6
2
|
export declare function observationPoolTokens(observations: ObservationRecord[]): number;
|
|
7
|
-
interface LlmArgs {
|
|
8
|
-
model: Model<any>;
|
|
9
|
-
apiKey: string;
|
|
10
|
-
headers?: Record<string, string>;
|
|
11
|
-
signal?: AbortSignal;
|
|
12
|
-
agentLoop?: typeof agentLoop;
|
|
13
|
-
onEvent?: (event: import("../sdk/agent-core/index.js").AgentEvent) => void;
|
|
14
|
-
maxTurns?: number;
|
|
15
|
-
}
|
|
16
|
-
export type ObservationCoverageTag = "uncited" | "cited" | "reinforced";
|
|
17
|
-
export interface CoverageTagCounts {
|
|
18
|
-
uncited: number;
|
|
19
|
-
cited: number;
|
|
20
|
-
reinforced: number;
|
|
21
|
-
}
|
|
22
|
-
export declare function deriveObservationCoverageTags(reflections: MemoryReflection[], observations: ObservationRecord[]): Map<string, ObservationCoverageTag>;
|
|
23
|
-
export declare function coverageTagCounts(reflections: MemoryReflection[], observations: ObservationRecord[]): CoverageTagCounts;
|
|
24
|
-
export declare function renderObservationsForPrunerPrompt(observations: ObservationRecord[], coverageTags: ReadonlyMap<string, ObservationCoverageTag>): string;
|
|
25
3
|
export declare function migrateLegacyReflections(reflections: MemoryReflection[]): MemoryReflection[];
|
|
26
|
-
export declare function normalizeSupportingObservationIds(supportingObservationIds: readonly string[] | undefined, allowedObservationIds: readonly string[]): string[] | undefined;
|
|
27
|
-
export interface ReflectorPassContext {
|
|
28
|
-
pass: number;
|
|
29
|
-
maxPasses: number;
|
|
30
|
-
minSupportingObservationIds: number;
|
|
31
|
-
}
|
|
32
|
-
export type ReflectionProposal = {
|
|
33
|
-
content: string;
|
|
34
|
-
supportingObservationIds?: readonly string[];
|
|
35
|
-
};
|
|
36
|
-
export interface ApplyReflectionProposalsResult {
|
|
37
|
-
reflections: MemoryReflection[];
|
|
38
|
-
accepted: number;
|
|
39
|
-
added: number;
|
|
40
|
-
merged: number;
|
|
41
|
-
promoted: number;
|
|
42
|
-
duplicates: number;
|
|
43
|
-
unsupported: number;
|
|
44
|
-
}
|
|
45
|
-
export interface ReflectorPassStats {
|
|
46
|
-
pass: number;
|
|
47
|
-
toolCalls: number;
|
|
48
|
-
accepted: number;
|
|
49
|
-
added: number;
|
|
50
|
-
merged: number;
|
|
51
|
-
promoted: number;
|
|
52
|
-
duplicates: number;
|
|
53
|
-
unsupported: number;
|
|
54
|
-
failed: boolean;
|
|
55
|
-
}
|
|
56
|
-
export interface ReflectorStats {
|
|
57
|
-
passes: ReflectorPassStats[];
|
|
58
|
-
toolCalls: number;
|
|
59
|
-
accepted: number;
|
|
60
|
-
added: number;
|
|
61
|
-
merged: number;
|
|
62
|
-
promoted: number;
|
|
63
|
-
duplicates: number;
|
|
64
|
-
unsupported: number;
|
|
65
|
-
failedPass?: number;
|
|
66
|
-
}
|
|
67
|
-
export interface ReflectorResult {
|
|
68
|
-
reflections: MemoryReflection[];
|
|
69
|
-
stats: ReflectorStats;
|
|
70
|
-
}
|
|
71
|
-
export declare function renderReflectionsForReflectorPrompt(reflections: MemoryReflection[]): string;
|
|
72
|
-
export declare function applyReflectionProposals(reflections: MemoryReflection[], proposals: readonly ReflectionProposal[], allowedObservationIds: readonly string[], passContext: Pick<ReflectorPassContext, "minSupportingObservationIds">): ApplyReflectionProposalsResult;
|
|
73
|
-
export declare function runReflector(args: LlmArgs, reflections: MemoryReflection[], observations: ObservationRecord[], onPassStart?: (pass: number, maxPasses: number) => void): Promise<ReflectorResult>;
|
|
74
|
-
export type PrunerStopReason = "empty" | "under_target" | "fell_back" | "zero_drops" | "max_passes";
|
|
75
|
-
export interface PrunerPassStats {
|
|
76
|
-
pass: number;
|
|
77
|
-
poolTokens: number;
|
|
78
|
-
targetTokens: number;
|
|
79
|
-
deltaTokens: number;
|
|
80
|
-
dropped: number;
|
|
81
|
-
remaining: number;
|
|
82
|
-
fellBack: boolean;
|
|
83
|
-
}
|
|
84
|
-
export interface PrunerResult {
|
|
85
|
-
observations: ObservationRecord[];
|
|
86
|
-
droppedIds: string[];
|
|
87
|
-
fellBack: boolean;
|
|
88
|
-
passes: PrunerPassStats[];
|
|
89
|
-
stopReason: PrunerStopReason;
|
|
90
|
-
}
|
|
91
|
-
export declare function runPruner(args: LlmArgs, reflections: MemoryReflection[], observations: ObservationRecord[], budgetTokens: number, onPassStart?: (pass: number, maxPasses: number) => void): Promise<PrunerResult>;
|
|
92
4
|
/**
|
|
93
5
|
* Format an observation for Markdown-safe display.
|
|
94
6
|
* Wraps the ID in backticks so it renders as inline code in Markdown
|
|
@@ -109,5 +21,4 @@ export declare function observationsToMarkdownList(observations: ObservationReco
|
|
|
109
21
|
*/
|
|
110
22
|
export declare function reflectionsToMarkdownList(reflections: MemoryReflection[]): string;
|
|
111
23
|
export declare function renderSummary(reflections: MemoryReflection[], observations: ObservationRecord[]): string;
|
|
112
|
-
export {};
|
|
113
24
|
//# sourceMappingURL=compaction.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compaction.d.ts","sourceRoot":"","sources":["../../src/memory/compaction.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"compaction.d.ts","sourceRoot":"","sources":["../../src/memory/compaction.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEtE,wBAAgB,qBAAqB,CAAC,YAAY,EAAE,iBAAiB,EAAE,GAAG,MAAM,CAE/E;AAED,wBAAgB,wBAAwB,CAAC,WAAW,EAAE,gBAAgB,EAAE,GAAG,gBAAgB,EAAE,CAsC5F;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,iBAAiB,GAAG,MAAM,CAEvE;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,gBAAgB,GAAG,MAAM,CAGzE;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,YAAY,EAAE,iBAAiB,EAAE,GAAG,MAAM,CAEpF;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,WAAW,EAAE,gBAAgB,EAAE,GAAG,MAAM,CAEjF;AAED,wBAAgB,aAAa,CAAC,WAAW,EAAE,gBAAgB,EAAE,EAAE,YAAY,EAAE,iBAAiB,EAAE,GAAG,MAAM,CAaxG"}
|