@actrun_ai/tastekit-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/adapter-interface.d.ts +69 -0
- package/dist/adapter-interface.d.ts.map +1 -0
- package/dist/adapter-interface.js +7 -0
- package/dist/adapter-interface.js.map +1 -0
- package/dist/autopilots/index.d.ts +16 -0
- package/dist/autopilots/index.d.ts.map +1 -0
- package/dist/autopilots/index.js +66 -0
- package/dist/autopilots/index.js.map +1 -0
- package/dist/claude-code/index.d.ts +18 -0
- package/dist/claude-code/index.d.ts.map +1 -0
- package/dist/claude-code/index.js +111 -0
- package/dist/claude-code/index.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/manus/index.d.ts +15 -0
- package/dist/manus/index.d.ts.map +1 -0
- package/dist/manus/index.js +66 -0
- package/dist/manus/index.js.map +1 -0
- package/dist/openclaw/index.d.ts +20 -0
- package/dist/openclaw/index.d.ts.map +1 -0
- package/dist/openclaw/index.js +189 -0
- package/dist/openclaw/index.js.map +1 -0
- package/package.json +45 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TasteKit Adapter Interface
|
|
3
|
+
*
|
|
4
|
+
* Common interface for all runtime adapters.
|
|
5
|
+
*/
|
|
6
|
+
import { MemoryV1 } from '@actrun_ai/tastekit-core';
|
|
7
|
+
export interface ExportOpts {
|
|
8
|
+
includeSkills?: boolean;
|
|
9
|
+
includePlaybooks?: boolean;
|
|
10
|
+
format?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface InstallOpts {
|
|
13
|
+
overwrite?: boolean;
|
|
14
|
+
validate?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface SimOpts {
|
|
17
|
+
noSideEffects?: boolean;
|
|
18
|
+
dryRun?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface SimResult {
|
|
21
|
+
success: boolean;
|
|
22
|
+
outputs: any;
|
|
23
|
+
trace: any[];
|
|
24
|
+
}
|
|
25
|
+
export interface MappedMemoryPolicy {
|
|
26
|
+
runtimeSpecific: any;
|
|
27
|
+
notes?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface TraceEvent {
|
|
30
|
+
timestamp: string;
|
|
31
|
+
type: string;
|
|
32
|
+
data: any;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* TasteKit Adapter Interface
|
|
36
|
+
*
|
|
37
|
+
* All adapters must implement this interface.
|
|
38
|
+
*/
|
|
39
|
+
export interface TasteKitAdapter {
|
|
40
|
+
/** Adapter identifier */
|
|
41
|
+
id: string;
|
|
42
|
+
/** Adapter version */
|
|
43
|
+
version: string;
|
|
44
|
+
/**
|
|
45
|
+
* Detect if this adapter can handle the target runtime
|
|
46
|
+
*/
|
|
47
|
+
detect(target: string): Promise<boolean>;
|
|
48
|
+
/**
|
|
49
|
+
* Export TasteKit artifacts to adapter format
|
|
50
|
+
*/
|
|
51
|
+
export(profilePath: string, outDir: string, opts: ExportOpts): Promise<void>;
|
|
52
|
+
/**
|
|
53
|
+
* Install adapter-specific configuration into target runtime
|
|
54
|
+
*/
|
|
55
|
+
install(outDir: string, target: string, opts: InstallOpts): Promise<void>;
|
|
56
|
+
/**
|
|
57
|
+
* Run simulation (optional)
|
|
58
|
+
*/
|
|
59
|
+
runSimulation?(skillId: string, opts: SimOpts): Promise<SimResult>;
|
|
60
|
+
/**
|
|
61
|
+
* Map memory policy to runtime-specific format (optional)
|
|
62
|
+
*/
|
|
63
|
+
mapMemoryPolicy?(policy: MemoryV1): Promise<MappedMemoryPolicy>;
|
|
64
|
+
/**
|
|
65
|
+
* Emit trace event (optional)
|
|
66
|
+
*/
|
|
67
|
+
emitTrace?(event: TraceEvent): Promise<void>;
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=adapter-interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|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,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE1E;;OAEG;IACH,aAAa,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;IAEnE;;OAEG;IACH,eAAe,CAAC,CAAC,MAAM,EAAE,QAAQ,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAEhE;;OAEG;IACH,SAAS,CAAC,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapter-interface.js","sourceRoot":"","sources":["../adapter-interface.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ActRun Autopilots Adapter
|
|
3
|
+
*
|
|
4
|
+
* Exports TasteKit artifacts to ActRun Autopilots format.
|
|
5
|
+
* Uses the Agent Skills standard (agentskills.io) for skills.
|
|
6
|
+
* Also generates autopilots.yaml for backward compatibility.
|
|
7
|
+
*/
|
|
8
|
+
import { TasteKitAdapter, ExportOpts, InstallOpts } from '../adapter-interface.js';
|
|
9
|
+
export declare class AutopilotsAdapter implements TasteKitAdapter {
|
|
10
|
+
id: string;
|
|
11
|
+
version: string;
|
|
12
|
+
detect(target: string): Promise<boolean>;
|
|
13
|
+
export(profilePath: string, outDir: string, opts: ExportOpts): Promise<void>;
|
|
14
|
+
install(outDir: string, target: string, _opts: InstallOpts): Promise<void>;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../autopilots/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAQnF,qBAAa,iBAAkB,YAAW,eAAe;IACvD,EAAE,SAAgB;IAClB,OAAO,SAAW;IAEZ,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAKxC,MAAM,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAwB5E,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAGjF"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ActRun Autopilots Adapter
|
|
3
|
+
*
|
|
4
|
+
* Exports TasteKit artifacts to ActRun Autopilots format.
|
|
5
|
+
* Uses the Agent Skills standard (agentskills.io) for skills.
|
|
6
|
+
* Also generates autopilots.yaml for backward compatibility.
|
|
7
|
+
*/
|
|
8
|
+
import { readFileSync, writeFileSync, existsSync, cpSync, mkdirSync } from 'fs';
|
|
9
|
+
import { join } from 'path';
|
|
10
|
+
import { createRequire } from 'node:module';
|
|
11
|
+
import { resolveArtifactPath, resolveSkillsPath } from '@actrun_ai/tastekit-core/utils';
|
|
12
|
+
const require = createRequire(import.meta.url);
|
|
13
|
+
export class AutopilotsAdapter {
|
|
14
|
+
id = 'autopilots';
|
|
15
|
+
version = '2.0.0';
|
|
16
|
+
async detect(target) {
|
|
17
|
+
return existsSync(join(target, 'autopilots.yaml')) ||
|
|
18
|
+
existsSync(join(target, '.agents', 'skills'));
|
|
19
|
+
}
|
|
20
|
+
async export(profilePath, outDir, opts) {
|
|
21
|
+
mkdirSync(outDir, { recursive: true });
|
|
22
|
+
const constitutionPath = resolveArtifactPath(profilePath, 'constitution');
|
|
23
|
+
if (!existsSync(constitutionPath)) {
|
|
24
|
+
throw new Error('Constitution not found. Run tastekit compile first.');
|
|
25
|
+
}
|
|
26
|
+
const constitution = JSON.parse(readFileSync(constitutionPath, 'utf-8'));
|
|
27
|
+
// 1. Generate autopilots.yaml (backward compatible)
|
|
28
|
+
writeFileSync(join(outDir, 'autopilots.yaml'), generateAutopilotsYAML(constitution));
|
|
29
|
+
// 2. Copy skills in Agent Skills format (.agents/skills/ convention)
|
|
30
|
+
if (opts.includeSkills) {
|
|
31
|
+
const skillsPath = resolveSkillsPath(profilePath);
|
|
32
|
+
if (existsSync(skillsPath)) {
|
|
33
|
+
const destSkills = join(outDir, '.agents', 'skills');
|
|
34
|
+
mkdirSync(destSkills, { recursive: true });
|
|
35
|
+
cpSync(skillsPath, destSkills, { recursive: true });
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
async install(outDir, target, _opts) {
|
|
40
|
+
cpSync(outDir, target, { recursive: true });
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
function generateAutopilotsYAML(constitution) {
|
|
44
|
+
return `# ActRun Autopilots Configuration (Generated by TasteKit)
|
|
45
|
+
# Skills are in .agents/skills/ (Agent Skills standard)
|
|
46
|
+
|
|
47
|
+
principles:
|
|
48
|
+
${(constitution.principles || []).map((p) => ` - id: ${p.id}
|
|
49
|
+
statement: "${(p.statement || '').replace(/"/g, '\\"')}"
|
|
50
|
+
priority: ${p.priority}`).join('\n')}
|
|
51
|
+
|
|
52
|
+
tone:
|
|
53
|
+
voice_keywords: [${(constitution.tone?.voice_keywords || []).map((k) => `"${k}"`).join(', ')}]
|
|
54
|
+
forbidden_phrases: [${(constitution.tone?.forbidden_phrases || []).map((p) => `"${p}"`).join(', ')}]
|
|
55
|
+
|
|
56
|
+
tradeoffs:
|
|
57
|
+
accuracy_vs_speed: ${constitution.tradeoffs?.accuracy_vs_speed ?? 0.5}
|
|
58
|
+
cost_sensitivity: ${constitution.tradeoffs?.cost_sensitivity ?? 0.5}
|
|
59
|
+
autonomy_level: ${constitution.tradeoffs?.autonomy_level ?? 0.5}
|
|
60
|
+
|
|
61
|
+
taboos:
|
|
62
|
+
never_do: [${(constitution.taboos?.never_do || []).map((t) => `"${t.replace(/"/g, '\\"')}"`).join(', ')}]
|
|
63
|
+
must_escalate: [${(constitution.taboos?.must_escalate || []).map((t) => `"${t.replace(/"/g, '\\"')}"`).join(', ')}]
|
|
64
|
+
`;
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../autopilots/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AAChF,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAExF,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAE/C,MAAM,OAAO,iBAAiB;IAC5B,EAAE,GAAG,YAAY,CAAC;IAClB,OAAO,GAAG,OAAO,CAAC;IAElB,KAAK,CAAC,MAAM,CAAC,MAAc;QACzB,OAAO,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;YAChD,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC;IAClD,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,WAAmB,EAAE,MAAc,EAAE,IAAgB;QAChE,SAAS,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAEvC,MAAM,gBAAgB,GAAG,mBAAmB,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC;QAC1E,IAAI,CAAC,UAAU,CAAC,gBA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;;qBAGnB,CAAC,YAAY,CAAC,IAAI,EAAE,cAAc,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAS,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;wBAC9E,CAAC,YAAY,CAAC,IAAI,EAAE,iBAAiB,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAS,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;;;uBAGrF,YAAY,CAAC,SAAS,EAAE,iBAAiB,IAAI,GAAG;sBACjD,YAAY,CAAC,SAAS,EAAE,gBAAgB,IAAI,GAAG;oBACjD,YAAY,CAAC,SAAS,EAAE,cAAc,IAAI,GAAG;;;eAGlD,CAAC,YAAY,CAAC,MAAM,EAAE,QAAQ,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAS,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;oBAC7F,CAAC,YAAY,CAAC,MAAM,EAAE,aAAa,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAS,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;CAC1H,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Claude Code Adapter
|
|
3
|
+
*
|
|
4
|
+
* Exports TasteKit artifacts to Claude Code format:
|
|
5
|
+
* - CLAUDE.md (compositional, from generator blocks)
|
|
6
|
+
* - Hook scripts (session lifecycle)
|
|
7
|
+
* - settings.local.json (hook configuration)
|
|
8
|
+
*/
|
|
9
|
+
import { TasteKitAdapter, ExportOpts, InstallOpts } from '../adapter-interface.js';
|
|
10
|
+
export declare class ClaudeCodeAdapter implements TasteKitAdapter {
|
|
11
|
+
id: string;
|
|
12
|
+
version: string;
|
|
13
|
+
detect(target: string): Promise<boolean>;
|
|
14
|
+
export(profilePath: string, outDir: string, opts: ExportOpts): Promise<void>;
|
|
15
|
+
install(outDir: string, target: string, _opts: InstallOpts): Promise<void>;
|
|
16
|
+
private buildContext;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../claude-code/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAuBnF,qBAAa,iBAAkB,YAAW,eAAe;IACvD,EAAE,SAAiB;IACnB,OAAO,SAAW;IAEZ,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAIxC,MAAM,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAsC5E,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAIhF,OAAO,CAAC,YAAY;CAkDrB"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Claude Code Adapter
|
|
3
|
+
*
|
|
4
|
+
* Exports TasteKit artifacts to Claude Code format:
|
|
5
|
+
* - CLAUDE.md (compositional, from generator blocks)
|
|
6
|
+
* - Hook scripts (session lifecycle)
|
|
7
|
+
* - settings.local.json (hook configuration)
|
|
8
|
+
*/
|
|
9
|
+
import { readFileSync, writeFileSync, cpSync, existsSync, mkdirSync, chmodSync } from 'fs';
|
|
10
|
+
import { join } from 'path';
|
|
11
|
+
import { createRequire } from 'node:module';
|
|
12
|
+
import { resolveArtifactPath, resolveBindingsPath, resolveSkillsPath } from '@actrun_ai/tastekit-core/utils';
|
|
13
|
+
import { generateClaudeMd, generateHooks } from '@actrun_ai/tastekit-core/generators';
|
|
14
|
+
const require = createRequire(import.meta.url);
|
|
15
|
+
function tryParseYamlOrJson(filePath) {
|
|
16
|
+
const content = readFileSync(filePath, 'utf-8');
|
|
17
|
+
// Try JSON first (faster, no dependency)
|
|
18
|
+
try {
|
|
19
|
+
return JSON.parse(content);
|
|
20
|
+
}
|
|
21
|
+
catch { /* not JSON */ }
|
|
22
|
+
// Try YAML via dynamic import fallback
|
|
23
|
+
try {
|
|
24
|
+
const YAML = require('yaml');
|
|
25
|
+
return YAML.parse(content);
|
|
26
|
+
}
|
|
27
|
+
catch { /* skip */ }
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
export class ClaudeCodeAdapter {
|
|
31
|
+
id = 'claude-code';
|
|
32
|
+
version = '2.0.0';
|
|
33
|
+
async detect(target) {
|
|
34
|
+
return existsSync(join(target, '.claude', 'config.json'));
|
|
35
|
+
}
|
|
36
|
+
async export(profilePath, outDir, opts) {
|
|
37
|
+
// Build generator context from compiled artifacts
|
|
38
|
+
const ctx = this.buildContext(profilePath);
|
|
39
|
+
// 1. Generate CLAUDE.md
|
|
40
|
+
const claudeMd = generateClaudeMd(ctx);
|
|
41
|
+
writeFileSync(join(outDir, 'CLAUDE.md'), claudeMd);
|
|
42
|
+
// 2. Generate hook scripts (context-aware for guardrail enforcement)
|
|
43
|
+
const { scripts, settings } = generateHooks(ctx);
|
|
44
|
+
const hooksDir = join(outDir, '.tastekit', 'hooks');
|
|
45
|
+
mkdirSync(hooksDir, { recursive: true });
|
|
46
|
+
for (const script of scripts) {
|
|
47
|
+
const scriptPath = join(hooksDir, script.filename);
|
|
48
|
+
writeFileSync(scriptPath, script.content);
|
|
49
|
+
if (script.executable) {
|
|
50
|
+
chmodSync(scriptPath, 0o755);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
// 3. Write settings.local.json with hooks + permissions + defaultMode
|
|
54
|
+
const claudeDir = join(outDir, '.claude');
|
|
55
|
+
mkdirSync(claudeDir, { recursive: true });
|
|
56
|
+
writeFileSync(join(claudeDir, 'settings.local.json'), JSON.stringify(settings, null, 2));
|
|
57
|
+
// 4. Copy skills if requested
|
|
58
|
+
if (opts.includeSkills) {
|
|
59
|
+
const skillsDir = resolveSkillsPath(profilePath);
|
|
60
|
+
if (existsSync(skillsDir)) {
|
|
61
|
+
cpSync(skillsDir, join(outDir, 'skills'), { recursive: true });
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
async install(outDir, target, _opts) {
|
|
66
|
+
cpSync(outDir, target, { recursive: true });
|
|
67
|
+
}
|
|
68
|
+
buildContext(profilePath) {
|
|
69
|
+
const ctx = {
|
|
70
|
+
generator_version: '0.5.0',
|
|
71
|
+
};
|
|
72
|
+
// Constitution
|
|
73
|
+
const constitutionPath = resolveArtifactPath(profilePath, 'constitution');
|
|
74
|
+
if (existsSync(constitutionPath)) {
|
|
75
|
+
ctx.constitution = tryParseYamlOrJson(constitutionPath);
|
|
76
|
+
}
|
|
77
|
+
// Guardrails
|
|
78
|
+
const guardrailsPath = resolveArtifactPath(profilePath, 'guardrails');
|
|
79
|
+
if (existsSync(guardrailsPath)) {
|
|
80
|
+
ctx.guardrails = tryParseYamlOrJson(guardrailsPath);
|
|
81
|
+
}
|
|
82
|
+
// Memory
|
|
83
|
+
const memoryPath = resolveArtifactPath(profilePath, 'memory');
|
|
84
|
+
if (existsSync(memoryPath)) {
|
|
85
|
+
ctx.memory = tryParseYamlOrJson(memoryPath);
|
|
86
|
+
}
|
|
87
|
+
// Skills manifest
|
|
88
|
+
const skillsDir = resolveSkillsPath(profilePath);
|
|
89
|
+
const manifestPath = join(skillsDir, 'manifest.v1.yaml');
|
|
90
|
+
if (existsSync(manifestPath)) {
|
|
91
|
+
ctx.skills = tryParseYamlOrJson(manifestPath);
|
|
92
|
+
}
|
|
93
|
+
// Bindings
|
|
94
|
+
const bindingsPath = resolveBindingsPath(profilePath);
|
|
95
|
+
if (existsSync(bindingsPath)) {
|
|
96
|
+
ctx.bindings = tryParseYamlOrJson(bindingsPath);
|
|
97
|
+
}
|
|
98
|
+
// Domain config (check tastekit.yaml for domain_id)
|
|
99
|
+
const configPath = join(profilePath, 'tastekit.yaml');
|
|
100
|
+
if (existsSync(configPath)) {
|
|
101
|
+
const config = tryParseYamlOrJson(configPath);
|
|
102
|
+
ctx.domain_id = config?.domain_id;
|
|
103
|
+
}
|
|
104
|
+
// Check for playbooks
|
|
105
|
+
const playbooksDir = join(profilePath, 'knowledge', 'playbooks');
|
|
106
|
+
const playbooksV1 = join(profilePath, 'playbooks');
|
|
107
|
+
ctx.has_playbooks = existsSync(playbooksDir) || existsSync(playbooksV1);
|
|
108
|
+
return ctx;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../claude-code/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AAC3F,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAC7G,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAyB,MAAM,qCAAqC,CAAC;AAE7G,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAE/C,SAAS,kBAAkB,CAAC,QAAgB;IAC1C,MAA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tB,MAAM,YAAY,GAAG,IAAI,CAAC,WAAW,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC;QACjE,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;QACnD,GAAG,CAAC,aAAa,GAAG,UAAU,CAAC,YAAY,CAAC,IAAI,UAAU,CAAC,WAAW,CAAC,CAAC;QAExE,OAAO,GAAG,CAAC;IACb,CAAC;CACF"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TasteKit Adapters
|
|
3
|
+
*/
|
|
4
|
+
export * from './adapter-interface.js';
|
|
5
|
+
export * from './claude-code/index.js';
|
|
6
|
+
export * from './manus/index.js';
|
|
7
|
+
export * from './openclaw/index.js';
|
|
8
|
+
export * from './autopilots/index.js';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TasteKit Adapters
|
|
3
|
+
*/
|
|
4
|
+
export * from './adapter-interface.js';
|
|
5
|
+
export * from './claude-code/index.js';
|
|
6
|
+
export * from './manus/index.js';
|
|
7
|
+
export * from './openclaw/index.js';
|
|
8
|
+
export * from './autopilots/index.js';
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Manus Adapter
|
|
3
|
+
*
|
|
4
|
+
* Exports TasteKit artifacts to Manus Skills format.
|
|
5
|
+
*/
|
|
6
|
+
import { TasteKitAdapter, ExportOpts, InstallOpts } from '../adapter-interface.js';
|
|
7
|
+
export declare class ManusAdapter implements TasteKitAdapter {
|
|
8
|
+
id: string;
|
|
9
|
+
version: string;
|
|
10
|
+
detect(target: string): Promise<boolean>;
|
|
11
|
+
export(profilePath: string, outDir: string, opts: ExportOpts): Promise<void>;
|
|
12
|
+
install(outDir: string, target: string, opts: InstallOpts): Promise<void>;
|
|
13
|
+
private generateManusReadme;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../manus/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAKnF,qBAAa,YAAa,YAAW,eAAe;IAClD,EAAE,SAAW;IACb,OAAO,SAAW;IAEZ,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAKxC,MAAM,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAuB5E,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAU/E,OAAO,CAAC,mBAAmB;CAuB5B"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Manus Adapter
|
|
3
|
+
*
|
|
4
|
+
* Exports TasteKit artifacts to Manus Skills format.
|
|
5
|
+
*/
|
|
6
|
+
import { readFileSync, writeFileSync, cpSync, existsSync } from 'fs';
|
|
7
|
+
import { join } from 'path';
|
|
8
|
+
import { resolveArtifactPath, resolveSkillsPath } from '@actrun_ai/tastekit-core/utils';
|
|
9
|
+
export class ManusAdapter {
|
|
10
|
+
id = 'manus';
|
|
11
|
+
version = '1.0.0';
|
|
12
|
+
async detect(target) {
|
|
13
|
+
// Check if target has Manus skills directory
|
|
14
|
+
return existsSync(join(target, 'skills'));
|
|
15
|
+
}
|
|
16
|
+
async export(profilePath, outDir, opts) {
|
|
17
|
+
// Manus primarily uses Skills format, which TasteKit already generates
|
|
18
|
+
const skillsPath = resolveSkillsPath(profilePath);
|
|
19
|
+
if (!existsSync(skillsPath)) {
|
|
20
|
+
throw new Error('Skills not found. Run tastekit compile first.');
|
|
21
|
+
}
|
|
22
|
+
// Copy skills directory
|
|
23
|
+
const outSkillsPath = join(outDir, 'skills');
|
|
24
|
+
cpSync(skillsPath, outSkillsPath, { recursive: true });
|
|
25
|
+
// Read constitution for context
|
|
26
|
+
const constitutionPath = resolveArtifactPath(profilePath, 'constitution');
|
|
27
|
+
if (existsSync(constitutionPath)) {
|
|
28
|
+
const constitution = JSON.parse(readFileSync(constitutionPath, 'utf-8'));
|
|
29
|
+
// Generate a README for Manus
|
|
30
|
+
const readme = this.generateManusReadme(constitution);
|
|
31
|
+
writeFileSync(join(outDir, 'README.md'), readme);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
async install(outDir, target, opts) {
|
|
35
|
+
// Copy skills to target
|
|
36
|
+
const skillsDir = join(outDir, 'skills');
|
|
37
|
+
const targetSkillsDir = join(target, 'skills');
|
|
38
|
+
if (existsSync(skillsDir)) {
|
|
39
|
+
cpSync(skillsDir, targetSkillsDir, { recursive: true });
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
generateManusReadme(constitution) {
|
|
43
|
+
return `# TasteKit Skills for Manus
|
|
44
|
+
|
|
45
|
+
This directory contains skills exported from TasteKit.
|
|
46
|
+
|
|
47
|
+
## Principles
|
|
48
|
+
|
|
49
|
+
${constitution.principles.map((p, i) => `${i + 1}. ${p.statement}`).join('\n')}
|
|
50
|
+
|
|
51
|
+
## Tone
|
|
52
|
+
|
|
53
|
+
Voice: ${constitution.tone.voice_keywords.join(', ')}
|
|
54
|
+
|
|
55
|
+
## Usage
|
|
56
|
+
|
|
57
|
+
These skills follow the Manus Skills format with progressive disclosure:
|
|
58
|
+
- **Minimal context**: Always loaded (top principles and tone)
|
|
59
|
+
- **On invoke**: Loaded when skill is invoked
|
|
60
|
+
- **On demand**: Loaded only when explicitly needed
|
|
61
|
+
|
|
62
|
+
Refer to individual SKILL.md files for detailed instructions.
|
|
63
|
+
`;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../manus/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AACrE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAExF,MAAM,OAAO,YAAY;IACvB,EAAE,GAAG,OAAO,CAAC;IACb,OAAO,GAAG,OAAO,CAAC;IAElB,KAAK,CAAC,MAAM,CAAC,MAAc;QACzB,6CAA6C;QAC7C,OAAO,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;IAC5C,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,WAAmB,EAAE,MAAc,EAAE,IAAgB;QAChE,uEAAuE;QACvE,MAAM,UAAU,GAAG,iBAAiB,CAAC,WAAW,CAAC,CAAC;QAElD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,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;;;;SAIlF,YAAY,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC;;;;;;;;;;CAUnD,CAAC;IACA,CAAC;CACF"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenClaw Adapter
|
|
3
|
+
*
|
|
4
|
+
* Exports TasteKit artifacts to a complete OpenClaw workspace:
|
|
5
|
+
* - SOUL.md (personality, values, tone)
|
|
6
|
+
* - IDENTITY.md (capabilities, role, domain)
|
|
7
|
+
* - AGENTS.md (operational behavior, guardrails, skills)
|
|
8
|
+
* - openclaw.config.json (structured config, backward compatible)
|
|
9
|
+
* - skills/ (AgentSkills-compatible skill directories)
|
|
10
|
+
*/
|
|
11
|
+
import { TasteKitAdapter, ExportOpts, InstallOpts } from '../adapter-interface.js';
|
|
12
|
+
export declare class OpenClawAdapter implements TasteKitAdapter {
|
|
13
|
+
id: string;
|
|
14
|
+
version: string;
|
|
15
|
+
detect(target: string): Promise<boolean>;
|
|
16
|
+
export(profilePath: string, outDir: string, opts: ExportOpts): Promise<void>;
|
|
17
|
+
install(outDir: string, target: string, _opts: InstallOpts): Promise<void>;
|
|
18
|
+
private buildContext;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../openclaw/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AASnF,qBAAa,eAAgB,YAAW,eAAe;IACrD,EAAE,SAAc;IAChB,OAAO,SAAW;IAEZ,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAKxC,MAAM,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAkC5E,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAIhF,OAAO,CAAC,YAAY;CA6CrB"}
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenClaw Adapter
|
|
3
|
+
*
|
|
4
|
+
* Exports TasteKit artifacts to a complete OpenClaw workspace:
|
|
5
|
+
* - SOUL.md (personality, values, tone)
|
|
6
|
+
* - IDENTITY.md (capabilities, role, domain)
|
|
7
|
+
* - AGENTS.md (operational behavior, guardrails, skills)
|
|
8
|
+
* - openclaw.config.json (structured config, backward compatible)
|
|
9
|
+
* - skills/ (AgentSkills-compatible skill directories)
|
|
10
|
+
*/
|
|
11
|
+
import { readFileSync, writeFileSync, cpSync, existsSync, mkdirSync } from 'fs';
|
|
12
|
+
import { join } from 'path';
|
|
13
|
+
import { createRequire } from 'node:module';
|
|
14
|
+
import { resolveArtifactPath, resolveSkillsPath, resolveBindingsPath } from '@actrun_ai/tastekit-core/utils';
|
|
15
|
+
import { generateSoulMd, generateAgentsMd } from '@actrun_ai/tastekit-core/generators';
|
|
16
|
+
const require = createRequire(import.meta.url);
|
|
17
|
+
export class OpenClawAdapter {
|
|
18
|
+
id = 'openclaw';
|
|
19
|
+
version = '2.0.0';
|
|
20
|
+
async detect(target) {
|
|
21
|
+
return existsSync(join(target, 'openclaw.config.json')) ||
|
|
22
|
+
existsSync(join(target, 'AGENTS.md'));
|
|
23
|
+
}
|
|
24
|
+
async export(profilePath, outDir, opts) {
|
|
25
|
+
mkdirSync(outDir, { recursive: true });
|
|
26
|
+
const ctx = this.buildContext(profilePath);
|
|
27
|
+
const constitution = ctx.constitution;
|
|
28
|
+
if (!constitution) {
|
|
29
|
+
throw new Error('Constitution not found. Run tastekit compile first.');
|
|
30
|
+
}
|
|
31
|
+
// 1. Generate SOUL.md (personality, values, tone)
|
|
32
|
+
writeFileSync(join(outDir, 'SOUL.md'), generateSoulMd(ctx));
|
|
33
|
+
// 2. Generate IDENTITY.md (capabilities, role, domain)
|
|
34
|
+
writeFileSync(join(outDir, 'IDENTITY.md'), generateIdentityMd(ctx));
|
|
35
|
+
// 3. Generate AGENTS.md (operational behavior, guardrails, skills)
|
|
36
|
+
writeFileSync(join(outDir, 'AGENTS.md'), generateAgentsMd(ctx));
|
|
37
|
+
// 4. Generate openclaw.config.json (structured, backward compatible)
|
|
38
|
+
writeFileSync(join(outDir, 'openclaw.config.json'), JSON.stringify(generateOpenClawConfig(constitution), null, 2));
|
|
39
|
+
// 5. Copy skills in AgentSkills-compatible format
|
|
40
|
+
if (opts.includeSkills) {
|
|
41
|
+
const skillsPath = resolveSkillsPath(profilePath);
|
|
42
|
+
if (existsSync(skillsPath)) {
|
|
43
|
+
cpSync(skillsPath, join(outDir, 'skills'), { recursive: true });
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
async install(outDir, target, _opts) {
|
|
48
|
+
cpSync(outDir, target, { recursive: true });
|
|
49
|
+
}
|
|
50
|
+
buildContext(profilePath) {
|
|
51
|
+
const ctx = {
|
|
52
|
+
generator_version: '1.0.0',
|
|
53
|
+
};
|
|
54
|
+
// Constitution
|
|
55
|
+
const constitutionPath = resolveArtifactPath(profilePath, 'constitution');
|
|
56
|
+
if (existsSync(constitutionPath)) {
|
|
57
|
+
ctx.constitution = tryParse(constitutionPath);
|
|
58
|
+
}
|
|
59
|
+
// Guardrails
|
|
60
|
+
const guardrailsPath = resolveArtifactPath(profilePath, 'guardrails');
|
|
61
|
+
if (existsSync(guardrailsPath)) {
|
|
62
|
+
ctx.guardrails = tryParse(guardrailsPath);
|
|
63
|
+
}
|
|
64
|
+
// Memory
|
|
65
|
+
const memoryPath = resolveArtifactPath(profilePath, 'memory');
|
|
66
|
+
if (existsSync(memoryPath)) {
|
|
67
|
+
ctx.memory = tryParse(memoryPath);
|
|
68
|
+
}
|
|
69
|
+
// Skills manifest
|
|
70
|
+
const skillsDir = resolveSkillsPath(profilePath);
|
|
71
|
+
const manifestPath = join(skillsDir, 'manifest.v1.yaml');
|
|
72
|
+
if (existsSync(manifestPath)) {
|
|
73
|
+
ctx.skills = tryParse(manifestPath);
|
|
74
|
+
}
|
|
75
|
+
// Bindings
|
|
76
|
+
const bindingsPath = resolveBindingsPath(profilePath);
|
|
77
|
+
if (existsSync(bindingsPath)) {
|
|
78
|
+
ctx.bindings = tryParse(bindingsPath);
|
|
79
|
+
}
|
|
80
|
+
// Domain config
|
|
81
|
+
const configPath = join(profilePath, 'tastekit.yaml');
|
|
82
|
+
if (existsSync(configPath)) {
|
|
83
|
+
const config = tryParse(configPath);
|
|
84
|
+
ctx.domain_id = config?.domain_id;
|
|
85
|
+
}
|
|
86
|
+
return ctx;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
// ---------------------------------------------------------------------------
|
|
90
|
+
// IDENTITY.md generator
|
|
91
|
+
// ---------------------------------------------------------------------------
|
|
92
|
+
function generateIdentityMd(ctx) {
|
|
93
|
+
const lines = [];
|
|
94
|
+
lines.push('# IDENTITY.md');
|
|
95
|
+
lines.push(`<!-- Generated by TasteKit v${ctx.generator_version}. Re-run \`tastekit export --target openclaw\` to regenerate. -->`);
|
|
96
|
+
lines.push('');
|
|
97
|
+
// Role and domain
|
|
98
|
+
lines.push('## Role');
|
|
99
|
+
lines.push('');
|
|
100
|
+
if (ctx.domain_id) {
|
|
101
|
+
const domainLabel = ctx.domain_id.replace(/-/g, ' ').replace(/\b\w/g, c => c.toUpperCase());
|
|
102
|
+
lines.push(`You are a **${domainLabel}** configured via TasteKit.`);
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
lines.push('You are an AI agent configured via TasteKit.');
|
|
106
|
+
}
|
|
107
|
+
lines.push('');
|
|
108
|
+
// Capabilities from skills
|
|
109
|
+
if (ctx.skills?.skills && ctx.skills.skills.length > 0) {
|
|
110
|
+
lines.push('## Capabilities');
|
|
111
|
+
lines.push('');
|
|
112
|
+
for (const skill of ctx.skills.skills) {
|
|
113
|
+
lines.push(`- **${skill.name}**: ${skill.description}`);
|
|
114
|
+
}
|
|
115
|
+
lines.push('');
|
|
116
|
+
}
|
|
117
|
+
// Tools from bindings
|
|
118
|
+
if (ctx.bindings?.servers && ctx.bindings.servers.length > 0) {
|
|
119
|
+
lines.push('## Tools');
|
|
120
|
+
lines.push('');
|
|
121
|
+
for (const server of ctx.bindings.servers) {
|
|
122
|
+
lines.push(`### ${server.name}`);
|
|
123
|
+
if (server.tools && server.tools.length > 0) {
|
|
124
|
+
for (const tool of server.tools) {
|
|
125
|
+
const risk = tool.risk_hints?.length ? ` (risk: ${tool.risk_hints.join(', ')})` : '';
|
|
126
|
+
lines.push(`- \`${tool.tool_ref}\`${risk}`);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
lines.push('');
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
// Autonomy level
|
|
133
|
+
if (ctx.constitution?.tradeoffs?.autonomy_level !== undefined) {
|
|
134
|
+
const level = ctx.constitution.tradeoffs.autonomy_level;
|
|
135
|
+
let description;
|
|
136
|
+
if (level < 0.3)
|
|
137
|
+
description = 'Conservative. Ask before most actions.';
|
|
138
|
+
else if (level < 0.7)
|
|
139
|
+
description = 'Balanced. Act on safe operations, ask for risky ones.';
|
|
140
|
+
else
|
|
141
|
+
description = 'High autonomy. Act independently, escalate only for destructive operations.';
|
|
142
|
+
lines.push('## Autonomy');
|
|
143
|
+
lines.push('');
|
|
144
|
+
lines.push(`Level: ${level} — ${description}`);
|
|
145
|
+
lines.push('');
|
|
146
|
+
}
|
|
147
|
+
lines.push('---');
|
|
148
|
+
lines.push(`*Generated by TasteKit v${ctx.generator_version} on ${new Date().toISOString().split('T')[0]}*`);
|
|
149
|
+
lines.push('');
|
|
150
|
+
return lines.join('\n');
|
|
151
|
+
}
|
|
152
|
+
// ---------------------------------------------------------------------------
|
|
153
|
+
// openclaw.config.json generator (backward compatible)
|
|
154
|
+
// ---------------------------------------------------------------------------
|
|
155
|
+
function generateOpenClawConfig(constitution) {
|
|
156
|
+
return {
|
|
157
|
+
version: '1.0',
|
|
158
|
+
profile: {
|
|
159
|
+
principles: constitution.principles,
|
|
160
|
+
tone: constitution.tone,
|
|
161
|
+
tradeoffs: constitution.tradeoffs,
|
|
162
|
+
},
|
|
163
|
+
behavior: {
|
|
164
|
+
autonomy_level: constitution.tradeoffs?.autonomy_level,
|
|
165
|
+
require_citations: constitution.evidence_policy?.require_citations_for,
|
|
166
|
+
},
|
|
167
|
+
safety: {
|
|
168
|
+
forbidden_phrases: constitution.tone?.forbidden_phrases,
|
|
169
|
+
taboos: constitution.taboos,
|
|
170
|
+
},
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
// ---------------------------------------------------------------------------
|
|
174
|
+
// Helpers
|
|
175
|
+
// ---------------------------------------------------------------------------
|
|
176
|
+
function tryParse(filePath) {
|
|
177
|
+
const content = readFileSync(filePath, 'utf-8');
|
|
178
|
+
try {
|
|
179
|
+
return JSON.parse(content);
|
|
180
|
+
}
|
|
181
|
+
catch { /* not JSON */ }
|
|
182
|
+
try {
|
|
183
|
+
const YAML = require('yaml');
|
|
184
|
+
return YAML.parse(content);
|
|
185
|
+
}
|
|
186
|
+
catch { /* skip */ }
|
|
187
|
+
return null;
|
|
188
|
+
}
|
|
189
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../openclaw/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AAChF,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAA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,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@actrun_ai/tastekit-adapters",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "TasteKit runtime adapters for Claude Code, Manus, OpenClaw, and Autopilots",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": "TasteKit Contributors",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/tastekit/tastekit.git",
|
|
11
|
+
"directory": "packages/adapters"
|
|
12
|
+
},
|
|
13
|
+
"publishConfig": {
|
|
14
|
+
"access": "public"
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist",
|
|
18
|
+
"README.md",
|
|
19
|
+
"LICENSE"
|
|
20
|
+
],
|
|
21
|
+
"main": "./dist/index.js",
|
|
22
|
+
"types": "./dist/index.d.ts",
|
|
23
|
+
"exports": {
|
|
24
|
+
".": "./dist/index.js",
|
|
25
|
+
"./adapter-interface": "./dist/adapter-interface.js",
|
|
26
|
+
"./claude-code": "./dist/claude-code/index.js",
|
|
27
|
+
"./manus": "./dist/manus/index.js",
|
|
28
|
+
"./openclaw": "./dist/openclaw/index.js",
|
|
29
|
+
"./autopilots": "./dist/autopilots/index.js"
|
|
30
|
+
},
|
|
31
|
+
"scripts": {
|
|
32
|
+
"build": "tsc",
|
|
33
|
+
"test": "vitest run",
|
|
34
|
+
"lint": "eslint --ignore-pattern dist/ --ignore-pattern __tests__/ .",
|
|
35
|
+
"clean": "rm -rf dist"
|
|
36
|
+
},
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"@actrun_ai/tastekit-core": "workspace:*"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@types/node": "^22.0.0",
|
|
42
|
+
"typescript": "^5.6.0",
|
|
43
|
+
"vitest": "^2.0.0"
|
|
44
|
+
}
|
|
45
|
+
}
|