@specverse/engines 5.1.0 → 6.0.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/assets/prompts/core/standard/default/analyse.prompt.yaml +5 -5
- package/assets/prompts/core/standard/default/app-demo.prompt.yaml +21 -1
- package/assets/prompts/core/standard/default/behavior.prompt.yaml +157 -0
- package/assets/prompts/core/standard/default/create.prompt.yaml +3 -3
- package/assets/prompts/core/standard/default/materialise.prompt.yaml +804 -774
- package/assets/prompts/core/standard/default/realize.prompt.yaml +581 -544
- package/assets/prompts/core/standard/v9/analyse.prompt.yaml +5 -5
- package/assets/prompts/core/standard/v9/app-demo.prompt.yaml +233 -0
- package/assets/prompts/core/standard/v9/behavior.prompt.yaml +70 -39
- package/assets/prompts/core/standard/v9/create.prompt.yaml +3 -3
- package/assets/prompts/core/standard/v9/materialise.prompt.yaml +804 -774
- package/assets/prompts/core/standard/v9/realize.prompt.yaml +581 -544
- package/dist/ai/behavior-ai-service.d.ts +35 -28
- package/dist/ai/behavior-ai-service.d.ts.map +1 -1
- package/dist/ai/behavior-ai-service.js +95 -128
- package/dist/ai/behavior-ai-service.js.map +1 -1
- package/dist/ai/index.d.ts +26 -26
- package/dist/ai/index.d.ts.map +1 -1
- package/dist/ai/index.js +40 -29
- package/dist/ai/index.js.map +1 -1
- package/dist/ai/model-resolver.d.ts +13 -0
- package/dist/ai/model-resolver.d.ts.map +1 -0
- package/dist/ai/model-resolver.js +87 -0
- package/dist/ai/model-resolver.js.map +1 -0
- package/dist/ai/providers/claude-cli.d.ts +25 -0
- package/dist/ai/providers/claude-cli.d.ts.map +1 -0
- package/dist/ai/providers/claude-cli.js +185 -0
- package/dist/ai/providers/claude-cli.js.map +1 -0
- package/dist/ai/providers/index.d.ts +8 -5
- package/dist/ai/providers/index.d.ts.map +1 -1
- package/dist/ai/providers/index.js +7 -5
- package/dist/ai/providers/index.js.map +1 -1
- package/dist/ai/providers/stub.d.ts +15 -0
- package/dist/ai/providers/stub.d.ts.map +1 -0
- package/dist/ai/providers/stub.js +64 -0
- package/dist/ai/providers/stub.js.map +1 -0
- package/dist/ai/skill-detection.d.ts +5 -0
- package/dist/ai/skill-detection.d.ts.map +1 -0
- package/dist/ai/skill-detection.js +27 -0
- package/dist/ai/skill-detection.js.map +1 -0
- package/dist/libs/instance-factories/cli/templates/commander/command-generator.js +184 -0
- package/dist/libs/instance-factories/tools/templates/mcp/mcp-server-generator.js +289 -15
- package/libs/instance-factories/cli/templates/commander/command-generator.ts +184 -0
- package/libs/instance-factories/tools/templates/mcp/mcp-server-generator.ts +322 -16
- package/package.json +8 -3
- package/assets/prompts/core/CHANGELOG.md +0 -158
- package/assets/prompts/core/MIGRATION-v6-to-v7.md +0 -379
- package/assets/prompts/core/base-terminal-prompt.md +0 -201
- package/assets/prompts/core/examples/example-usage.ts +0 -140
- package/assets/prompts/core/schemas/prompt.schema.json +0 -309
- package/assets/prompts/core/schemas/prompt.schema.yaml +0 -229
- package/assets/prompts/core/standard/archive/v1/analyse.prompt.yaml +0 -259
- package/assets/prompts/core/standard/archive/v1/create.prompt.yaml +0 -302
- package/assets/prompts/core/standard/archive/v1/materialise.prompt.yaml +0 -328
- package/assets/prompts/core/standard/archive/v1/realize.prompt.yaml +0 -606
- package/assets/prompts/core/standard/archive/v2/README.md +0 -110
- package/assets/prompts/core/standard/archive/v2/analyse.prompt.yaml +0 -151
- package/assets/prompts/core/standard/archive/v2/create.prompt.yaml +0 -151
- package/assets/prompts/core/standard/archive/v2/materialise.prompt.yaml +0 -132
- package/assets/prompts/core/standard/archive/v2/realize.prompt.yaml +0 -147
- package/assets/prompts/core/standard/archive/v3/README.md +0 -279
- package/assets/prompts/core/standard/archive/v3/analyse.prompt.yaml +0 -309
- package/assets/prompts/core/standard/archive/v3/create.prompt.yaml +0 -351
- package/assets/prompts/core/standard/archive/v3/materialise.prompt.yaml +0 -247
- package/assets/prompts/core/standard/archive/v3/realize.prompt.yaml +0 -344
- package/assets/prompts/core/standard/archive/v4/README.md +0 -79
- package/assets/prompts/core/standard/archive/v4/analyse.prompt.yaml +0 -204
- package/assets/prompts/core/standard/archive/v4/create.prompt.yaml +0 -185
- package/assets/prompts/core/standard/archive/v5/README.md +0 -224
- package/assets/prompts/core/standard/archive/v5/analyse.prompt.yaml +0 -209
- package/assets/prompts/core/standard/archive/v5/create.prompt.yaml +0 -225
- package/assets/prompts/core/standard/archive/v5/materialise.prompt.yaml +0 -242
- package/assets/prompts/core/standard/archive/v5/realize.prompt.yaml +0 -336
- package/assets/prompts/core/standard/archive/v6/README.md +0 -187
- package/assets/prompts/core/standard/archive/v6/analyse.prompt.yaml +0 -219
- package/assets/prompts/core/standard/archive/v6/create.prompt.yaml +0 -180
- package/assets/prompts/core/standard/archive/v6/materialise.prompt.yaml +0 -203
- package/assets/prompts/core/standard/archive/v6/realize.prompt.yaml +0 -215
- package/assets/prompts/core/standard/archive/v7/analyse.prompt.nick.yaml +0 -144
- package/assets/prompts/core/standard/archive/v7/analyse.prompt.old.yaml +0 -146
- package/assets/prompts/core/standard/archive/v7/analyse.prompt.yaml +0 -129
- package/assets/prompts/core/standard/archive/v7/create.prompt.yaml +0 -146
- package/assets/prompts/core/standard/archive/v7/materialise.prompt.yaml +0 -297
- package/assets/prompts/core/standard/archive/v7/realize.prompt.yaml +0 -294
- package/assets/prompts/core/standard/archive/v8/README.md +0 -400
- package/assets/prompts/core/standard/archive/v8/analyse.prompt.yaml +0 -185
- package/assets/prompts/core/standard/archive/v8/create.prompt.yaml +0 -203
- package/assets/prompts/core/standard/archive/v8/materialise.prompt.yaml +0 -297
- package/assets/prompts/core/standard/archive/v8/realize.prompt.yaml +0 -294
- package/assets/prompts/templates/api-orchestrator-template.yaml +0 -188
- package/assets/prompts/templates/claude-integration-template.md +0 -121
- package/assets/prompts/templates/terminal-prompt-template.md +0 -97
|
@@ -1,19 +1,28 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Behavior AI Service —
|
|
3
|
-
*
|
|
2
|
+
* Behavior AI Service — generates pure TypeScript function bodies for
|
|
3
|
+
* behavior steps that weren't matched by the realize engine's convention
|
|
4
|
+
* patterns.
|
|
4
5
|
*
|
|
5
|
-
* Architecture (
|
|
6
|
-
* -
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
6
|
+
* Architecture (post AI-SDK replatform, 2026-04):
|
|
7
|
+
* - Delegates to the Vercel AI SDK via the model resolver. Provider choice
|
|
8
|
+
* is driven by SPECVERSE_AI_PROVIDER (claude-cli | anthropic |
|
|
9
|
+
* openai-compatible | stub) with sensible defaults per environment.
|
|
10
|
+
* - Claude-CLI provider preserves the Max-subscription zero-cost path
|
|
11
|
+
* (spawn claude --print --session-id/--resume). API provider uses
|
|
12
|
+
* Anthropic prompt caching for equivalent savings.
|
|
13
|
+
* - When claude-cli is active AND the SpecVerse skill is installed,
|
|
14
|
+
* Claude Code auto-loads the skill — we skip the fullContext block
|
|
15
|
+
* (saves ~2K tokens per session init).
|
|
16
|
+
* - For providers that don't have skill auto-load (anthropic, openai-
|
|
17
|
+
* compatible), we include the fullContext block in the system prompt
|
|
18
|
+
* so the model has the same grounding.
|
|
11
19
|
*
|
|
12
20
|
* Used by ai-behaviors-generator at realize time.
|
|
13
21
|
*/
|
|
14
22
|
export interface BehaviorAIServiceOptions {
|
|
15
|
-
|
|
23
|
+
/** Model override. Passed through to the resolver; interpretation is provider-specific. */
|
|
16
24
|
model?: string;
|
|
25
|
+
/** Per-call timeout (ms). Default 120_000. Only honoured by the claude-cli provider. */
|
|
17
26
|
timeout?: number;
|
|
18
27
|
}
|
|
19
28
|
export interface BehaviorGenerateContext {
|
|
@@ -28,36 +37,34 @@ export interface BehaviorGenerateContext {
|
|
|
28
37
|
returnType?: string;
|
|
29
38
|
}
|
|
30
39
|
/**
|
|
31
|
-
*
|
|
40
|
+
* Service class kept for API compatibility with ai-behaviors-generator.
|
|
41
|
+
* Internally delegates to the AI SDK via the model resolver.
|
|
32
42
|
*/
|
|
33
43
|
export declare class BehaviorAIService {
|
|
34
|
-
private claudePath;
|
|
35
44
|
private model;
|
|
45
|
+
private providerId;
|
|
46
|
+
private prompt;
|
|
47
|
+
private system;
|
|
36
48
|
private timeout;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
private currentProcess;
|
|
40
|
-
private systemPrompt;
|
|
41
|
-
private userTemplate;
|
|
49
|
+
/** Non-null after generateBehavior() succeeds once. */
|
|
50
|
+
get isAvailable(): boolean;
|
|
42
51
|
constructor(options?: BehaviorAIServiceOptions);
|
|
43
|
-
private detectClaudePath;
|
|
44
52
|
/**
|
|
45
|
-
*
|
|
53
|
+
* Build the system prompt. When the active provider can auto-load the
|
|
54
|
+
* SpecVerse skill (claude-cli + installed skill), we emit role +
|
|
55
|
+
* minimalContext only. Otherwise we include fullContext for grounding.
|
|
46
56
|
*/
|
|
47
|
-
|
|
57
|
+
private assembleSystemPrompt;
|
|
48
58
|
/**
|
|
49
|
-
* Start a new session for a controller.
|
|
50
|
-
*
|
|
59
|
+
* Start a new session for a controller. Session semantics are now owned
|
|
60
|
+
* by the provider — for claude-cli that's the spawn-with-session-id
|
|
61
|
+
* mechanism; for anthropic API it's the prompt-cache marker. We just
|
|
62
|
+
* record a no-op for callers that expect a session id to log.
|
|
51
63
|
*/
|
|
52
64
|
startSession(controllerName: string): string;
|
|
53
|
-
/**
|
|
54
|
-
* Generate a function body for a behavior step.
|
|
55
|
-
* First call creates the session with system prompt; subsequent calls resume.
|
|
56
|
-
*/
|
|
65
|
+
/** Generate a function body for a behavior step. */
|
|
57
66
|
generateBehavior(ctx: BehaviorGenerateContext): Promise<string | null>;
|
|
58
|
-
/**
|
|
59
|
-
* End the current session.
|
|
60
|
-
*/
|
|
67
|
+
/** End the current session — no-op now that session state lives in the provider. */
|
|
61
68
|
endSession(): void;
|
|
62
69
|
private buildUserPrompt;
|
|
63
70
|
private extractCode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"behavior-ai-service.d.ts","sourceRoot":"","sources":["../../src/ai/behavior-ai-service.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"behavior-ai-service.d.ts","sourceRoot":"","sources":["../../src/ai/behavior-ai-service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAUH,MAAM,WAAW,wBAAwB;IACvC,2FAA2F;IAC3F,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wFAAwF;IACxF,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,8DAA8D;IAC9D,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAwCD;;;GAGG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,KAAK,CAAC;IACd,OAAO,CAAC,UAAU,CAAC;IACnB,OAAO,CAAC,MAAM,CAAC;IACf,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,OAAO,CAAS;IAExB,uDAAuD;IACvD,IAAI,WAAW,IAAI,OAAO,CAEzB;gBAEW,OAAO,GAAE,wBAA6B;IAQlD;;;;OAIG;IACH,OAAO,CAAC,oBAAoB;IAY5B;;;;;OAKG;IACH,YAAY,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM;IAI5C,oDAAoD;IAC9C,gBAAgB,CAAC,GAAG,EAAE,uBAAuB,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IA0B5E,oFAAoF;IACpF,UAAU,IAAI,IAAI;IAIlB,OAAO,CAAC,eAAe;IAqBvB,OAAO,CAAC,WAAW;CAQpB"}
|
|
@@ -1,184 +1,143 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Behavior AI Service —
|
|
3
|
-
*
|
|
2
|
+
* Behavior AI Service — generates pure TypeScript function bodies for
|
|
3
|
+
* behavior steps that weren't matched by the realize engine's convention
|
|
4
|
+
* patterns.
|
|
4
5
|
*
|
|
5
|
-
* Architecture (
|
|
6
|
-
* -
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
6
|
+
* Architecture (post AI-SDK replatform, 2026-04):
|
|
7
|
+
* - Delegates to the Vercel AI SDK via the model resolver. Provider choice
|
|
8
|
+
* is driven by SPECVERSE_AI_PROVIDER (claude-cli | anthropic |
|
|
9
|
+
* openai-compatible | stub) with sensible defaults per environment.
|
|
10
|
+
* - Claude-CLI provider preserves the Max-subscription zero-cost path
|
|
11
|
+
* (spawn claude --print --session-id/--resume). API provider uses
|
|
12
|
+
* Anthropic prompt caching for equivalent savings.
|
|
13
|
+
* - When claude-cli is active AND the SpecVerse skill is installed,
|
|
14
|
+
* Claude Code auto-loads the skill — we skip the fullContext block
|
|
15
|
+
* (saves ~2K tokens per session init).
|
|
16
|
+
* - For providers that don't have skill auto-load (anthropic, openai-
|
|
17
|
+
* compatible), we include the fullContext block in the system prompt
|
|
18
|
+
* so the model has the same grounding.
|
|
11
19
|
*
|
|
12
20
|
* Used by ai-behaviors-generator at realize time.
|
|
13
21
|
*/
|
|
14
|
-
import {
|
|
15
|
-
import
|
|
22
|
+
import { generateText } from 'ai';
|
|
23
|
+
import yaml from 'js-yaml';
|
|
16
24
|
import { existsSync, readFileSync } from 'fs';
|
|
17
|
-
import {
|
|
25
|
+
import { dirname, join } from 'path';
|
|
18
26
|
import { fileURLToPath } from 'url';
|
|
19
|
-
import
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
*/
|
|
27
|
+
import { resolveModel, resolveProviderId } from './model-resolver.js';
|
|
28
|
+
import { detectInstalledSkill } from './skill-detection.js';
|
|
29
|
+
/** Load the structured behavior prompt from engines/assets/prompts/. */
|
|
23
30
|
function loadBehaviorPrompt() {
|
|
24
31
|
try {
|
|
25
|
-
// Find the engines package root by walking up from this file
|
|
26
32
|
const __filename = fileURLToPath(import.meta.url);
|
|
27
33
|
const __dirname = dirname(__filename);
|
|
28
|
-
// dist/ai/
|
|
29
|
-
// Walk up to find assets/prompts
|
|
34
|
+
// Walk two or three levels up from dist/ai/ or src/ai/ to find assets/prompts
|
|
30
35
|
const candidates = [
|
|
31
36
|
join(__dirname, '..', '..', 'assets', 'prompts', 'core', 'standard', 'v9', 'behavior.prompt.yaml'),
|
|
32
37
|
join(__dirname, '..', '..', '..', 'assets', 'prompts', 'core', 'standard', 'v9', 'behavior.prompt.yaml'),
|
|
33
38
|
];
|
|
34
39
|
for (const path of candidates) {
|
|
35
40
|
if (existsSync(path)) {
|
|
36
|
-
const
|
|
37
|
-
const role = content?.system?.role || '';
|
|
38
|
-
const context = content?.system?.context || '';
|
|
39
|
-
const userTemplate = content?.user?.template || '';
|
|
41
|
+
const doc = yaml.load(readFileSync(path, 'utf8'));
|
|
40
42
|
return {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
+
role: (doc?.system?.role ?? '').trim(),
|
|
44
|
+
minimalContext: (doc?.system?.minimalContext ?? '').trim(),
|
|
45
|
+
fullContext: (doc?.system?.fullContext ?? '').trim(),
|
|
46
|
+
userTemplate: (doc?.user?.template ?? '').trim(),
|
|
43
47
|
};
|
|
44
48
|
}
|
|
45
49
|
}
|
|
46
50
|
}
|
|
47
51
|
catch {
|
|
48
|
-
|
|
52
|
+
/* fall through to null — caller provides sensible defaults */
|
|
49
53
|
}
|
|
50
54
|
return null;
|
|
51
55
|
}
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
Use the global \`prisma\` client. Output only the function body, no fences, no explanation.`;
|
|
55
|
-
const DEFAULT_USER_TEMPLATE = `Generate a TypeScript function body for: "{{step}}"
|
|
56
|
-
Context: {{modelName}}.{{operationName}}, parameters: {{parameterNames}}
|
|
57
|
-
Output ONLY the function body code.`;
|
|
56
|
+
const DEFAULT_ROLE = 'You are a SpecVerse behavior code generator. Produce pure TypeScript function bodies.';
|
|
57
|
+
const DEFAULT_MINIMAL_CONTEXT = 'Output ONLY the function body. No imports, no database access, no event publishing. Return a plain value. Throw Error("...") on failure.';
|
|
58
58
|
/**
|
|
59
|
-
*
|
|
59
|
+
* Service class kept for API compatibility with ai-behaviors-generator.
|
|
60
|
+
* Internally delegates to the AI SDK via the model resolver.
|
|
60
61
|
*/
|
|
61
62
|
export class BehaviorAIService {
|
|
62
|
-
claudePath;
|
|
63
63
|
model;
|
|
64
|
+
providerId;
|
|
65
|
+
prompt;
|
|
66
|
+
system;
|
|
64
67
|
timeout;
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
systemPrompt;
|
|
69
|
-
userTemplate;
|
|
70
|
-
constructor(options = {}) {
|
|
71
|
-
this.claudePath = options.claudePath || this.detectClaudePath();
|
|
72
|
-
this.model = options.model || null;
|
|
73
|
-
this.timeout = options.timeout || 60000;
|
|
74
|
-
const prompt = loadBehaviorPrompt();
|
|
75
|
-
this.systemPrompt = prompt?.system || DEFAULT_SYSTEM_PROMPT;
|
|
76
|
-
this.userTemplate = prompt?.userTemplate || DEFAULT_USER_TEMPLATE;
|
|
68
|
+
/** Non-null after generateBehavior() succeeds once. */
|
|
69
|
+
get isAvailable() {
|
|
70
|
+
return this.providerId !== 'stub';
|
|
77
71
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
for (const candidate of candidates) {
|
|
85
|
-
if (candidate === 'claude')
|
|
86
|
-
return candidate;
|
|
87
|
-
if (existsSync(candidate))
|
|
88
|
-
return candidate;
|
|
89
|
-
}
|
|
90
|
-
return 'claude';
|
|
72
|
+
constructor(options = {}) {
|
|
73
|
+
this.model = resolveModel({ model: options.model });
|
|
74
|
+
this.providerId = resolveProviderId();
|
|
75
|
+
this.prompt = loadBehaviorPrompt();
|
|
76
|
+
this.timeout = options.timeout ?? 120_000;
|
|
77
|
+
this.system = this.assembleSystemPrompt();
|
|
91
78
|
}
|
|
92
79
|
/**
|
|
93
|
-
*
|
|
80
|
+
* Build the system prompt. When the active provider can auto-load the
|
|
81
|
+
* SpecVerse skill (claude-cli + installed skill), we emit role +
|
|
82
|
+
* minimalContext only. Otherwise we include fullContext for grounding.
|
|
94
83
|
*/
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
return
|
|
84
|
+
assembleSystemPrompt() {
|
|
85
|
+
const role = this.prompt?.role || DEFAULT_ROLE;
|
|
86
|
+
const minimal = this.prompt?.minimalContext || DEFAULT_MINIMAL_CONTEXT;
|
|
87
|
+
const full = this.prompt?.fullContext || '';
|
|
88
|
+
const skillAutoLoaded = this.providerId === 'claude-cli' && detectInstalledSkill().found;
|
|
89
|
+
if (skillAutoLoaded) {
|
|
90
|
+
return `${role}\n\n${minimal}`;
|
|
102
91
|
}
|
|
92
|
+
return full ? `${role}\n\n${minimal}\n\n${full}` : `${role}\n\n${minimal}`;
|
|
103
93
|
}
|
|
104
94
|
/**
|
|
105
|
-
* Start a new session for a controller.
|
|
106
|
-
*
|
|
95
|
+
* Start a new session for a controller. Session semantics are now owned
|
|
96
|
+
* by the provider — for claude-cli that's the spawn-with-session-id
|
|
97
|
+
* mechanism; for anthropic API it's the prompt-cache marker. We just
|
|
98
|
+
* record a no-op for callers that expect a session id to log.
|
|
107
99
|
*/
|
|
108
100
|
startSession(controllerName) {
|
|
109
|
-
|
|
110
|
-
this.initialized = false;
|
|
111
|
-
return this.sessionId;
|
|
101
|
+
return `${controllerName}-${Date.now()}`;
|
|
112
102
|
}
|
|
113
|
-
/**
|
|
114
|
-
* Generate a function body for a behavior step.
|
|
115
|
-
* First call creates the session with system prompt; subsequent calls resume.
|
|
116
|
-
*/
|
|
103
|
+
/** Generate a function body for a behavior step. */
|
|
117
104
|
async generateBehavior(ctx) {
|
|
118
|
-
if (!this.sessionId) {
|
|
119
|
-
this.startSession(ctx.modelName);
|
|
120
|
-
}
|
|
121
105
|
if (!this.isAvailable)
|
|
122
106
|
return null;
|
|
123
107
|
const userPrompt = this.buildUserPrompt(ctx);
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
108
|
+
try {
|
|
109
|
+
const result = await generateText({
|
|
110
|
+
model: this.model,
|
|
111
|
+
system: this.system,
|
|
112
|
+
prompt: userPrompt,
|
|
113
|
+
abortSignal: AbortSignal.timeout(this.timeout),
|
|
114
|
+
// Anthropic prompt caching: mark the system message as cacheable
|
|
115
|
+
// so subsequent calls within a cache window get the 90% discount.
|
|
116
|
+
// Other providers ignore this.
|
|
117
|
+
providerOptions: {
|
|
118
|
+
anthropic: {
|
|
119
|
+
cacheControl: { type: 'ephemeral' },
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
});
|
|
123
|
+
return this.extractCode(result.text);
|
|
128
124
|
}
|
|
129
|
-
|
|
130
|
-
|
|
125
|
+
catch {
|
|
126
|
+
return null;
|
|
131
127
|
}
|
|
132
|
-
if (this.model)
|
|
133
|
-
args.push('--model', this.model);
|
|
134
|
-
args.push('-p', userPrompt);
|
|
135
|
-
return new Promise((resolve) => {
|
|
136
|
-
const proc = spawn(this.claudePath, args, {
|
|
137
|
-
stdio: ['ignore', 'pipe', 'pipe'],
|
|
138
|
-
env: { ...process.env },
|
|
139
|
-
});
|
|
140
|
-
this.currentProcess = proc;
|
|
141
|
-
let output = '';
|
|
142
|
-
const timer = setTimeout(() => {
|
|
143
|
-
proc.kill();
|
|
144
|
-
resolve(null);
|
|
145
|
-
}, this.timeout);
|
|
146
|
-
proc.stdout?.on('data', (data) => { output += data.toString(); });
|
|
147
|
-
proc.on('close', (code) => {
|
|
148
|
-
clearTimeout(timer);
|
|
149
|
-
this.currentProcess = null;
|
|
150
|
-
if (code !== 0) {
|
|
151
|
-
resolve(null);
|
|
152
|
-
return;
|
|
153
|
-
}
|
|
154
|
-
this.initialized = true;
|
|
155
|
-
resolve(this.extractCode(output));
|
|
156
|
-
});
|
|
157
|
-
proc.on('error', () => {
|
|
158
|
-
clearTimeout(timer);
|
|
159
|
-
this.currentProcess = null;
|
|
160
|
-
resolve(null);
|
|
161
|
-
});
|
|
162
|
-
});
|
|
163
128
|
}
|
|
164
|
-
/**
|
|
165
|
-
* End the current session.
|
|
166
|
-
*/
|
|
129
|
+
/** End the current session — no-op now that session state lives in the provider. */
|
|
167
130
|
endSession() {
|
|
168
|
-
|
|
169
|
-
this.currentProcess.kill();
|
|
170
|
-
this.currentProcess = null;
|
|
171
|
-
}
|
|
172
|
-
this.sessionId = null;
|
|
173
|
-
this.initialized = false;
|
|
131
|
+
/* nothing to do — provider manages its own lifecycle */
|
|
174
132
|
}
|
|
175
133
|
buildUserPrompt(ctx) {
|
|
134
|
+
const template = this.prompt?.userTemplate || DEFAULT_USER_TEMPLATE;
|
|
176
135
|
const inputVars = ctx.parameterNames.length > 0 ? ctx.parameterNames.join(', ') : 'none';
|
|
177
136
|
const inputSignature = ctx.parameterNames.length > 0
|
|
178
|
-
? `{ ${ctx.parameterNames.map(n => `${n}: any`).join('; ')} }`
|
|
137
|
+
? `{ ${ctx.parameterNames.map((n) => `${n}: any`).join('; ')} }`
|
|
179
138
|
: 'Record<string, never>';
|
|
180
139
|
const returnType = ctx.returnType || 'any';
|
|
181
|
-
return
|
|
140
|
+
return template
|
|
182
141
|
.replace(/\{\{step\}\}/g, ctx.step)
|
|
183
142
|
.replace(/\{\{modelName\}\}/g, ctx.modelName)
|
|
184
143
|
.replace(/\{\{operationName\}\}/g, ctx.operationName)
|
|
@@ -191,15 +150,23 @@ export class BehaviorAIService {
|
|
|
191
150
|
}
|
|
192
151
|
extractCode(output) {
|
|
193
152
|
let code = output.trim();
|
|
194
|
-
// Strip markdown fences
|
|
195
153
|
const codeBlock = code.match(/```(?:typescript|ts|javascript|js)?\n([\s\S]*?)```/);
|
|
196
154
|
if (codeBlock)
|
|
197
155
|
code = codeBlock[1].trim();
|
|
198
|
-
// Strip "function ... { ... }" wrapper if model included it
|
|
199
156
|
const funcMatch = code.match(/^(?:export\s+)?(?:async\s+)?function\s+\w+\([^)]*\)[^{]*\{([\s\S]*)\}\s*$/);
|
|
200
157
|
if (funcMatch)
|
|
201
158
|
code = funcMatch[1].trim();
|
|
202
159
|
return code || null;
|
|
203
160
|
}
|
|
204
161
|
}
|
|
162
|
+
const DEFAULT_USER_TEMPLATE = `Generate a PURE TypeScript function body for this SpecVerse behavior step.
|
|
163
|
+
|
|
164
|
+
Step: "{{step}}"
|
|
165
|
+
|
|
166
|
+
Function: async function {{functionName}}(input: {{inputSignature}}): Promise<{{returnType}}>
|
|
167
|
+
|
|
168
|
+
Available: {{inputVars}}
|
|
169
|
+
Available Prisma models (types only): {{availableModels}}
|
|
170
|
+
|
|
171
|
+
Output ONLY the function body (between { and }). No markdown fences.`;
|
|
205
172
|
//# sourceMappingURL=behavior-ai-service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"behavior-ai-service.js","sourceRoot":"","sources":["../../src/ai/behavior-ai-service.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"behavior-ai-service.js","sourceRoot":"","sources":["../../src/ai/behavior-ai-service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAClC,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,o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,MAAM,qBAAqB,GAAG;;;;;;;;;qEASuC,CAAC"}
|
package/dist/ai/index.d.ts
CHANGED
|
@@ -1,27 +1,37 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* SpecVerse AI Module
|
|
3
|
-
*
|
|
2
|
+
* SpecVerse AI Module — public surface.
|
|
3
|
+
*
|
|
4
|
+
* Post AI-SDK replatform (2026-04, engines 6.0):
|
|
5
|
+
* - Provider abstraction is Vercel AI SDK (`ai` + `@ai-sdk/*`).
|
|
6
|
+
* - SpecVerse-specific: model-resolver picks claude-cli | anthropic |
|
|
7
|
+
* openai-compatible | stub based on SPECVERSE_AI_PROVIDER.
|
|
8
|
+
* - Behaviour generation at realize time delegates to generateText()
|
|
9
|
+
* through the resolved model; skill-aware system-prompt assembly.
|
|
10
|
+
*
|
|
11
|
+
* What was removed in 6.0:
|
|
12
|
+
* - LLMProvider, LLMProviderRegistry, ProviderFactory
|
|
13
|
+
* - OpenAIProvider, AnthropicProvider, InteractiveProvider
|
|
14
|
+
* - SpecVerseOrchestrator, InteractiveWorkflow (dead code, no consumers)
|
|
15
|
+
* - ConfigLoader / SpecVerseConfig (consumed only by the orchestrator)
|
|
16
|
+
* - config-loader.ts (no consumers)
|
|
17
|
+
* Consumers on those APIs should migrate to resolveModel() + generateText()
|
|
18
|
+
* from 'ai'. See docs/guides/SPECVERSE-AI.md.
|
|
4
19
|
*/
|
|
5
20
|
export * from './commands/index.js';
|
|
6
21
|
export * from './core/ecosystem-prompt-manager.js';
|
|
7
22
|
export * from './types/index.js';
|
|
8
|
-
export * from './config-loader.js';
|
|
9
23
|
export { SessionManager } from './session/session-manager.js';
|
|
10
|
-
export type { SessionInfo, JobRequest, JobStatus, CreateSessionOptions } from './session/types.js';
|
|
24
|
+
export type { SessionInfo, JobRequest, JobStatus, CreateSessionOptions, } from './session/types.js';
|
|
11
25
|
export { BehaviorAIService } from './behavior-ai-service.js';
|
|
12
26
|
export type { BehaviorAIServiceOptions, BehaviorGenerateContext } from './behavior-ai-service.js';
|
|
13
27
|
export { regenerateBehavior } from './behavior-regenerate.js';
|
|
14
28
|
export type { RegenerateBehaviorOptions, RegenerateBehaviorResult } from './behavior-regenerate.js';
|
|
15
|
-
export {
|
|
16
|
-
export type {
|
|
17
|
-
export {
|
|
18
|
-
export {
|
|
19
|
-
export {
|
|
20
|
-
export {
|
|
21
|
-
export { SpecVerseOrchestrator } from './orchestrator/specverse-orchestrator.js';
|
|
22
|
-
export { InteractiveWorkflow } from './orchestrator/interactive-workflow.js';
|
|
23
|
-
export { ConfigLoader, configLoader } from './config/index.js';
|
|
24
|
-
export type { SpecVerseConfig } from './config/index.js';
|
|
29
|
+
export { resolveModel, resolveProviderId, describeActiveProvider } from './model-resolver.js';
|
|
30
|
+
export type { ProviderId, ResolveModelOptions } from './model-resolver.js';
|
|
31
|
+
export { claudeCli, isClaudeCliAvailable, detectClaudePath } from './providers/claude-cli.js';
|
|
32
|
+
export type { ClaudeCliOptions } from './providers/claude-cli.js';
|
|
33
|
+
export { stubModel } from './providers/stub.js';
|
|
34
|
+
export { detectInstalledSkill } from './skill-detection.js';
|
|
25
35
|
import type { SpecVerseEngine, EngineInfo } from '@specverse/types';
|
|
26
36
|
export interface AIEngine extends SpecVerseEngine {
|
|
27
37
|
generatePrompt(spec: any, options?: any): Promise<string>;
|
|
@@ -31,17 +41,11 @@ export interface AIEngine extends SpecVerseEngine {
|
|
|
31
41
|
generateBehavior(step: string, context: BehaviorGenContext): Promise<string | null>;
|
|
32
42
|
}
|
|
33
43
|
export interface BehaviorGenContext {
|
|
34
|
-
/** The model name (e.g., "Order") */
|
|
35
44
|
modelName: string;
|
|
36
|
-
/** The operation/action name (e.g., "processOrder") */
|
|
37
45
|
operationName: string;
|
|
38
|
-
/** Function name to generate (e.g., "applyDiscountBasedOnLoyaltyTier") */
|
|
39
46
|
functionName: string;
|
|
40
|
-
/** Parameter names from the action (e.g., ['orderId', 'customerId']) */
|
|
41
47
|
parameterNames: string[];
|
|
42
|
-
/** Available models in the spec for context */
|
|
43
48
|
availableModels?: string[];
|
|
44
|
-
/** The full spec for context */
|
|
45
49
|
spec?: any;
|
|
46
50
|
}
|
|
47
51
|
declare class SpecVerseAIEngine implements AIEngine {
|
|
@@ -51,18 +55,14 @@ declare class SpecVerseAIEngine implements AIEngine {
|
|
|
51
55
|
private manager;
|
|
52
56
|
initialize(config?: {
|
|
53
57
|
catalogPath?: string;
|
|
54
|
-
provider?: string;
|
|
55
58
|
}): Promise<void>;
|
|
56
59
|
getInfo(): EngineInfo;
|
|
57
60
|
generatePrompt(spec: any, _options?: any): Promise<string>;
|
|
58
61
|
suggest(spec: any, _context?: string): Promise<any[]>;
|
|
59
62
|
/**
|
|
60
63
|
* Generate a TypeScript function body for an unmatched behavior step.
|
|
61
|
-
* Delegates to BehaviorAIService which
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
* For best results, callers should reuse the same BehaviorAIService instance
|
|
65
|
-
* across multiple steps in a controller — the conversation accumulates context.
|
|
64
|
+
* Delegates to BehaviorAIService which resolves the active provider
|
|
65
|
+
* (claude-cli / anthropic / openai-compatible / stub) based on env.
|
|
66
66
|
*/
|
|
67
67
|
generateBehavior(step: string, context: BehaviorGenContext): Promise<string | null>;
|
|
68
68
|
template(operation: string, options?: any): Promise<string>;
|
package/dist/ai/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ai/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ai/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,cAAc,qBAAqB,CAAC;AAIpC,cAAc,oCAAoC,CAAC;AAGnD,cAAc,kBAAkB,CAAC;AAGjC,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,YAAY,EACV,WAAW,EACX,UAAU,EACV,SAAS,EACT,oBAAoB,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