coaiajs 0.1.0 → 0.1.2
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 +7 -3
- package/dist/mcp/config.d.ts +4 -0
- package/dist/mcp/config.d.ts.map +1 -0
- package/dist/mcp/config.js +52 -26
- package/dist/mcp/config.js.map +1 -0
- package/dist/mcp/prompts.d.ts +19 -0
- package/dist/mcp/prompts.d.ts.map +1 -0
- package/dist/mcp/prompts.js +111 -0
- package/dist/mcp/prompts.js.map +1 -0
- package/dist/mcp/resources.d.ts +5 -0
- package/dist/mcp/resources.d.ts.map +1 -0
- package/dist/mcp/resources.js +77 -0
- package/dist/mcp/resources.js.map +1 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +167 -75
- package/dist/mcp/server.js.map +1 -0
- package/dist/mcp/tools/coaiapy-tools.d.ts.map +1 -0
- package/dist/mcp/tools/coaiapy-tools.js +1 -0
- package/dist/mcp/tools/coaiapy-tools.js.map +1 -0
- package/dist/mcp/tools/index.d.ts.map +1 -0
- package/dist/mcp/tools/index.js.map +1 -0
- package/dist/src/audio.d.ts.map +1 -0
- package/dist/src/audio.js.map +1 -0
- package/dist/src/cli-helpers.d.ts.map +1 -0
- package/dist/src/cli-helpers.js.map +1 -0
- package/dist/src/cli.d.ts.map +1 -0
- package/dist/src/cli.js +4 -4
- package/dist/src/cli.js.map +1 -0
- package/dist/src/config.d.ts +2 -0
- package/dist/src/config.d.ts.map +1 -0
- package/dist/src/config.js +44 -14
- package/dist/src/config.js.map +1 -0
- package/dist/src/environment.d.ts.map +1 -0
- package/dist/src/environment.js.map +1 -0
- package/dist/src/github.d.ts.map +1 -0
- package/dist/src/github.js.map +1 -0
- package/dist/src/index.d.ts +13 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +13 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/langfuse/client.d.ts.map +1 -0
- package/dist/src/langfuse/client.js.map +1 -0
- package/dist/src/langfuse/comments.d.ts.map +1 -0
- package/dist/src/langfuse/comments.js.map +1 -0
- package/dist/src/langfuse/datasets.d.ts.map +1 -0
- package/dist/src/langfuse/datasets.js.map +1 -0
- package/dist/src/langfuse/index.d.ts.map +1 -0
- package/dist/src/langfuse/index.js.map +1 -0
- package/dist/src/langfuse/media.d.ts.map +1 -0
- package/dist/src/langfuse/media.js.map +1 -0
- package/dist/src/langfuse/observations.d.ts.map +1 -0
- package/dist/src/langfuse/observations.js.map +1 -0
- package/dist/src/langfuse/prompts.d.ts.map +1 -0
- package/dist/src/langfuse/prompts.js.map +1 -0
- package/dist/src/langfuse/scores.d.ts.map +1 -0
- package/dist/src/langfuse/scores.js.map +1 -0
- package/dist/src/langfuse/traces.d.ts.map +1 -0
- package/dist/src/langfuse/traces.js.map +1 -0
- package/dist/src/llm.d.ts.map +1 -0
- package/dist/src/llm.js.map +1 -0
- package/dist/src/narrative/graph-manager.d.ts.map +1 -0
- package/dist/src/narrative/graph-manager.js.map +1 -0
- package/dist/src/narrative/index.d.ts +32 -1
- package/dist/src/narrative/index.d.ts.map +1 -0
- package/dist/src/narrative/index.js +97 -1
- package/dist/src/narrative/index.js.map +1 -0
- package/dist/src/narrative/markdown-export.d.ts.map +1 -0
- package/dist/src/narrative/markdown-export.js.map +1 -0
- package/dist/src/narrative/tool-definitions.d.ts.map +1 -0
- package/dist/src/narrative/tool-definitions.js.map +1 -0
- package/dist/src/narrative/tool-handlers.d.ts.map +1 -0
- package/dist/src/narrative/tool-handlers.js.map +1 -0
- package/dist/src/narrative/types.d.ts.map +1 -0
- package/dist/src/narrative/types.js.map +1 -0
- package/dist/src/narrative/validation.d.ts.map +1 -0
- package/dist/src/narrative/validation.js.map +1 -0
- package/dist/src/pde/index.d.ts +4 -0
- package/dist/src/pde/index.d.ts.map +1 -0
- package/dist/src/pde/index.js +19 -0
- package/dist/src/pde/index.js.map +1 -0
- package/dist/src/pde/mcp-handlers.d.ts.map +1 -0
- package/dist/src/pde/mcp-handlers.js.map +1 -0
- package/dist/src/pde/mcp-tools.d.ts.map +1 -0
- package/dist/src/pde/mcp-tools.js.map +1 -0
- package/dist/src/pde/session-manager.d.ts.map +1 -0
- package/dist/src/pde/session-manager.js.map +1 -0
- package/dist/src/pde/stc-mapper.d.ts.map +1 -0
- package/dist/src/pde/stc-mapper.js.map +1 -0
- package/dist/src/pipeline/index.d.ts.map +1 -0
- package/dist/src/pipeline/index.js.map +1 -0
- package/dist/src/pipeline/template-engine.d.ts.map +1 -0
- package/dist/src/pipeline/template-engine.js.map +1 -0
- package/dist/src/planning/index.d.ts +3 -0
- package/dist/src/planning/index.d.ts.map +1 -0
- package/dist/src/planning/index.js +13 -0
- package/dist/src/planning/index.js.map +1 -0
- package/dist/src/planning/mcp-handlers.d.ts.map +1 -0
- package/dist/src/planning/mcp-handlers.js.map +1 -0
- package/dist/src/planning/mcp-tools.d.ts.map +1 -0
- package/dist/src/planning/mcp-tools.js.map +1 -0
- package/dist/src/planning/plan-parser.d.ts.map +1 -0
- package/dist/src/planning/plan-parser.js.map +1 -0
- package/dist/src/redis.d.ts.map +1 -0
- package/dist/src/redis.js +20 -8
- package/dist/src/redis.js.map +1 -0
- package/dist/src/types.d.ts +1 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/types.js.map +1 -0
- package/package.json +67 -2
- package/rispecs/00-coaiajs-platform.spec.md +23 -10
- package/rispecs/01-core-config.spec.md +7 -37
- package/rispecs/02-redis-module.spec.md +2 -1
- package/rispecs/03-langfuse-module.spec.md +7 -5
- package/rispecs/04-narrative-engine.spec.md +9 -9
- package/rispecs/05-pde-engine.spec.md +23 -23
- package/rispecs/06-planning-engine.spec.md +14 -13
- package/rispecs/07-pipeline-templates.spec.md +7 -7
- package/rispecs/08-cli-interface.spec.md +13 -25
- package/rispecs/09-mcp-server.spec.md +57 -62
- package/rispecs/10-audio-module.spec.md +3 -3
- package/rispecs/KINSHIP.md +4 -4
- package/rispecs/README.md +33 -7
- package/articles/academic/creative-orientation-vs-problem-solving.md +0 -177
- package/articles/academic/jsonl-knowledge-graphs-agent-memory.md +0 -142
- package/articles/academic/langfuse-observability-llm-pipelines.md +0 -144
- package/articles/academic/medicine-wheel-software-architecture.md +0 -163
- package/articles/academic/mmot-autonomous-agents.md +0 -156
- package/articles/academic/model-context-protocol-interagent.md +0 -161
- package/articles/academic/pde-prompt-decomposition.md +0 -186
- package/articles/academic/structural-tension-in-ai-agents.md +0 -134
- package/articles/reviews/mcp-protocol-design-review.md +0 -170
- package/articles/reviews/observability-ai-systems-review.md +0 -176
- package/articles/reviews/prompt-engineering-decomposition-review.md +0 -184
- package/articles/surveys/agent-orchestration-survey.md +0 -186
- package/articles/surveys/knowledge-graph-storage-survey.md +0 -204
- package/articles/surveys/structural-tension-methodology-survey.md +0 -154
- package/articles/technical/aws-sdk-v3-polly.md +0 -270
- package/articles/technical/commander-cli-framework.md +0 -262
- package/articles/technical/dotenv-config-patterns.md +0 -360
- package/articles/technical/ioredis-vs-redis.md +0 -142
- package/articles/technical/langfuse-js-sdk-vs-rest.md +0 -191
- package/articles/technical/mcp-sdk-typescript.md +0 -291
- package/articles/technical/octokit-github-api.md +0 -293
- package/articles/technical/openai-sdk-modern.md +0 -231
- package/articles/technical/yaml-parsing-node.md +0 -266
- package/articles/technical/zod-runtime-validation.md +0 -212
- package/mcp/config.ts +0 -196
- package/mcp/server.ts +0 -402
- package/mcp/tools/coaiapy-tools.ts +0 -364
- package/mcp/tools/index.ts +0 -4
- package/src/audio.ts +0 -76
- package/src/cli-helpers.ts +0 -86
- package/src/cli.ts +0 -1223
- package/src/config.ts +0 -172
- package/src/environment.ts +0 -171
- package/src/github.ts +0 -143
- package/src/langfuse/client.ts +0 -105
- package/src/langfuse/comments.ts +0 -52
- package/src/langfuse/datasets.ts +0 -178
- package/src/langfuse/index.ts +0 -33
- package/src/langfuse/media.ts +0 -193
- package/src/langfuse/observations.ts +0 -131
- package/src/langfuse/prompts.ts +0 -157
- package/src/langfuse/scores.ts +0 -456
- package/src/langfuse/traces.ts +0 -276
- package/src/llm.ts +0 -106
- package/src/narrative/graph-manager.ts +0 -1358
- package/src/narrative/index.ts +0 -32
- package/src/narrative/markdown-export.ts +0 -535
- package/src/narrative/tool-definitions.ts +0 -635
- package/src/narrative/tool-handlers.ts +0 -528
- package/src/narrative/types.ts +0 -9
- package/src/narrative/validation.ts +0 -179
- package/src/pde/index.ts +0 -8
- package/src/pde/mcp-handlers.ts +0 -359
- package/src/pde/mcp-tools.ts +0 -201
- package/src/pde/session-manager.ts +0 -248
- package/src/pde/stc-mapper.ts +0 -298
- package/src/pipeline/index.ts +0 -7
- package/src/pipeline/template-engine.ts +0 -398
- package/src/planning/index.ts +0 -13
- package/src/planning/mcp-handlers.ts +0 -369
- package/src/planning/mcp-tools.ts +0 -155
- package/src/planning/plan-parser.ts +0 -587
- package/src/redis.ts +0 -97
- package/src/types.ts +0 -280
- package/tsconfig.json +0 -26
package/README.md
CHANGED
|
@@ -67,8 +67,8 @@ import type { Entity, DecompositionResult, CoaiaConfig } from 'coaiajs/src/types
|
|
|
67
67
|
|
|
68
68
|
Configuration is loaded with the following priority (highest wins):
|
|
69
69
|
|
|
70
|
-
1. **Environment variables** — `
|
|
71
|
-
2. **`.env`
|
|
70
|
+
1. **Environment variables** — `UPSTASH_REDIS_REST_URL`, `REDIS_URL`, `OPENAI_API_KEY`, etc.
|
|
71
|
+
2. **`.env` files** — explicit `--env`, `COAIAJS_ENV_PATH`, `COAIAPY_ENV_PATH`, current working directory `.env`, then `~/.coaia/.env`
|
|
72
72
|
3. **`coaia.json`** — searched in `./coaia.json`, `~/coaia.json`, `~/.coaia/config.json`
|
|
73
73
|
4. **Defaults**
|
|
74
74
|
|
|
@@ -76,7 +76,11 @@ Configuration is loaded with the following priority (highest wins):
|
|
|
76
76
|
|
|
77
77
|
| Variable | Description |
|
|
78
78
|
|---|---|
|
|
79
|
-
| `
|
|
79
|
+
| `UPSTASH_REDIS_REST_URL` / `UPSTASH_REDIS_REST_TOKEN` | Upstash Redis endpoint and token, preferred over direct Redis URLs |
|
|
80
|
+
| `KV_REST_API_URL` / `KV_REST_API_TOKEN` | Vercel KV REST aliases for Upstash Redis |
|
|
81
|
+
| `KV_URL` / `REDIS_URL` | Redis connection URL (`redis://` or `rediss://`) |
|
|
82
|
+
| `REDIS_HOST` / `REDIS_PORT` / `REDIS_PASSWORD` / `REDIS_SSL` | Traditional Redis host/port/password configuration |
|
|
83
|
+
| `UPSTASH_HOST` / `UPSTASH_PASSWORD` | coaiapy-compatible fallback aliases |
|
|
80
84
|
| `OPENAI_API_KEY` | OpenAI API key |
|
|
81
85
|
| `LANGFUSE_PUBLIC_KEY` | Langfuse public key |
|
|
82
86
|
| `LANGFUSE_SECRET_KEY` | Langfuse secret key |
|
package/dist/mcp/config.d.ts
CHANGED
|
@@ -4,10 +4,14 @@ export declare class FeatureConfig {
|
|
|
4
4
|
private enabledTools;
|
|
5
5
|
constructor(level?: FeatureLevel);
|
|
6
6
|
isToolEnabled(toolName: string): boolean;
|
|
7
|
+
isResourceEnabled(uri: string): boolean;
|
|
8
|
+
isPromptEnabled(promptName: string): boolean;
|
|
7
9
|
getEnabledTools(): Set<string>;
|
|
8
10
|
getFeatureLevel(): FeatureLevel;
|
|
9
11
|
getStats(): {
|
|
10
12
|
tools: number;
|
|
13
|
+
prompts: number;
|
|
14
|
+
resources: number;
|
|
11
15
|
level: FeatureLevel;
|
|
12
16
|
};
|
|
13
17
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../mcp/config.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,UAAU,GAAG,eAAe,GAAG,MAAM,CAAC;AAgL7E,qBAAa,aAAa;IACxB,OAAO,CAAC,KAAK,CAAe;IAC5B,OAAO,CAAC,YAAY,CAAc;gBAEtB,KAAK,CAAC,EAAE,YAAY;IAMhC,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAIxC,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAWvC,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO;IAI5C,eAAe,IAAI,GAAG,CAAC,MAAM,CAAC;IAI9B,eAAe,IAAI,YAAY;IAI/B,QAAQ,IAAI;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,YAAY,CAAA;KAAE;CAQvF"}
|
package/dist/mcp/config.js
CHANGED
|
@@ -61,23 +61,23 @@ const ALL_TOOLS = new Set([
|
|
|
61
61
|
'delete_observations',
|
|
62
62
|
'merge_entities',
|
|
63
63
|
// PDE (coaia-pde, 10 tools)
|
|
64
|
-
'
|
|
65
|
-
'pde_parse_response',
|
|
66
|
-
'pde_get',
|
|
67
|
-
'pde_list',
|
|
68
|
-
'pde_export_markdown',
|
|
69
|
-
'import_pde',
|
|
64
|
+
'import_pde_decomposition',
|
|
70
65
|
'create_stc_from_pde',
|
|
71
|
-
'
|
|
72
|
-
'
|
|
73
|
-
'
|
|
66
|
+
'list_pde_decompositions',
|
|
67
|
+
'get_session',
|
|
68
|
+
'list_sessions',
|
|
69
|
+
'complete_session',
|
|
70
|
+
'pde_update_action_progress',
|
|
71
|
+
'pde_mark_action_complete',
|
|
72
|
+
'pde_add_action_step',
|
|
73
|
+
'pde_update_current_reality',
|
|
74
74
|
// Planning (coaia-planning, 6 tools)
|
|
75
|
-
'
|
|
75
|
+
'parse_plan_structural',
|
|
76
76
|
'plan_to_stc',
|
|
77
|
-
'
|
|
78
|
-
'
|
|
77
|
+
'sync_plan_to_chart',
|
|
78
|
+
'sync_chart_to_plan',
|
|
79
|
+
'create_plan_trace',
|
|
79
80
|
'pde_to_plan',
|
|
80
|
-
'list_plans',
|
|
81
81
|
]);
|
|
82
82
|
const MINIMAL_TOOLS = new Set([
|
|
83
83
|
'coaia_tash',
|
|
@@ -134,23 +134,33 @@ const STANDARD_TOOLS = new Set([
|
|
|
134
134
|
'delete_observations',
|
|
135
135
|
'merge_entities',
|
|
136
136
|
// PDE tools
|
|
137
|
-
'
|
|
138
|
-
'pde_parse_response',
|
|
139
|
-
'pde_get',
|
|
140
|
-
'pde_list',
|
|
141
|
-
'pde_export_markdown',
|
|
142
|
-
'import_pde',
|
|
137
|
+
'import_pde_decomposition',
|
|
143
138
|
'create_stc_from_pde',
|
|
144
|
-
'
|
|
145
|
-
'
|
|
146
|
-
'
|
|
139
|
+
'list_pde_decompositions',
|
|
140
|
+
'get_session',
|
|
141
|
+
'list_sessions',
|
|
142
|
+
'complete_session',
|
|
143
|
+
'pde_update_action_progress',
|
|
144
|
+
'pde_mark_action_complete',
|
|
145
|
+
'pde_add_action_step',
|
|
146
|
+
'pde_update_current_reality',
|
|
147
147
|
// Planning tools
|
|
148
|
-
'
|
|
148
|
+
'parse_plan_structural',
|
|
149
149
|
'plan_to_stc',
|
|
150
|
-
'
|
|
151
|
-
'
|
|
150
|
+
'sync_plan_to_chart',
|
|
151
|
+
'sync_chart_to_plan',
|
|
152
|
+
'create_plan_trace',
|
|
152
153
|
'pde_to_plan',
|
|
153
|
-
|
|
154
|
+
]);
|
|
155
|
+
const ALL_RESOURCES = new Set([
|
|
156
|
+
'coaia://templates/',
|
|
157
|
+
'coaia://templates/{name}',
|
|
158
|
+
'coaia://templates/{name}/variables',
|
|
159
|
+
]);
|
|
160
|
+
const ALL_PROMPTS = new Set([
|
|
161
|
+
'mia_miette_duo',
|
|
162
|
+
'create_observability_pipeline',
|
|
163
|
+
'analyze_audio_workflow',
|
|
154
164
|
]);
|
|
155
165
|
const FEATURE_SETS = {
|
|
156
166
|
MINIMAL: MINIMAL_TOOLS,
|
|
@@ -169,6 +179,20 @@ export class FeatureConfig {
|
|
|
169
179
|
isToolEnabled(toolName) {
|
|
170
180
|
return this.enabledTools.has(toolName);
|
|
171
181
|
}
|
|
182
|
+
isResourceEnabled(uri) {
|
|
183
|
+
if (uri === 'coaia://templates/')
|
|
184
|
+
return ALL_RESOURCES.has(uri);
|
|
185
|
+
if (uri.startsWith('coaia://templates/') && uri.endsWith('/variables')) {
|
|
186
|
+
return ALL_RESOURCES.has('coaia://templates/{name}/variables');
|
|
187
|
+
}
|
|
188
|
+
if (uri.startsWith('coaia://templates/')) {
|
|
189
|
+
return ALL_RESOURCES.has('coaia://templates/{name}');
|
|
190
|
+
}
|
|
191
|
+
return false;
|
|
192
|
+
}
|
|
193
|
+
isPromptEnabled(promptName) {
|
|
194
|
+
return ALL_PROMPTS.has(promptName);
|
|
195
|
+
}
|
|
172
196
|
getEnabledTools() {
|
|
173
197
|
return new Set(this.enabledTools);
|
|
174
198
|
}
|
|
@@ -178,6 +202,8 @@ export class FeatureConfig {
|
|
|
178
202
|
getStats() {
|
|
179
203
|
return {
|
|
180
204
|
tools: this.enabledTools.size,
|
|
205
|
+
prompts: ALL_PROMPTS.size,
|
|
206
|
+
resources: ALL_RESOURCES.size,
|
|
181
207
|
level: this.level,
|
|
182
208
|
};
|
|
183
209
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../mcp/config.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,gCAAgC;AAIhC,8CAA8C;AAC9C,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC;IACxB,sBAAsB;IACtB,YAAY;IACZ,aAAa;IACb,gCAAgC;IAChC,yBAAyB;IACzB,4BAA4B;IAC5B,+BAA+B;IAC/B,sBAAsB;IACtB,uBAAuB;IACvB,4BAA4B;IAC5B,wBAAwB;IACxB,gCAAgC;IAChC,kCAAkC;IAClC,0BAA0B;IAC1B,yBAAyB;IACzB,4BAA4B;IAC5B,iCAAiC;IACjC,yBAAyB;IACzB,wBAAwB;IACxB,kCAAkC;IAClC,0BAA0B;IAC1B,yBAAyB;IACzB,8BAA8B;IAC9B,+BAA+B;IAC/B,8BAA8B;IAC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olean;
|
|
6
|
+
default?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface PromptDefinition {
|
|
9
|
+
id: string;
|
|
10
|
+
name: string;
|
|
11
|
+
description: string;
|
|
12
|
+
variables: PromptVariable[];
|
|
13
|
+
template: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const PROMPTS: Record<string, PromptDefinition>;
|
|
16
|
+
export declare function getPrompt(promptId: string): PromptDefinition | undefined;
|
|
17
|
+
export declare function listPrompts(): PromptDefinition[];
|
|
18
|
+
export declare function renderPrompt(promptId: string, variables: Record<string, string>): string | null;
|
|
19
|
+
//# sourceMappingURL=prompts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../mcp/prompts.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,cAAc,EAAE,CAAC;IAC5B,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CA8EpD,CAAC;AAEF,wBAAgB,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,gBAAgB,GAAG,SAAS,CAExE;AAED,wBAAgB,WAAW,IAAI,gBAAgB,EAAE,CAKhD;AAED,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,GAAG,IAAI,CAoB/F"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
// coaiajs/mcp/prompts.ts — MCP prompt templates
|
|
2
|
+
// Parity with coaiapy-mcp prompts.py.
|
|
3
|
+
export const PROMPTS = {
|
|
4
|
+
mia_miette_duo: {
|
|
5
|
+
id: 'mia_miette_duo',
|
|
6
|
+
name: 'Mia & Miette Duo Embodiment',
|
|
7
|
+
description: 'Dual AI embodiment for narrative-driven technical work',
|
|
8
|
+
variables: [
|
|
9
|
+
{ name: 'task_context', type: 'string', description: 'High-level task description', required: true },
|
|
10
|
+
{ name: 'technical_details', type: 'string', description: 'Specific technical requirements and constraints', required: true },
|
|
11
|
+
{ name: 'creative_goal', type: 'string', description: 'Desired creative outcome or narrative objective', required: true },
|
|
12
|
+
],
|
|
13
|
+
template: `Mia: The Recursive DevOps Architect & Narrative Lattice Forger
|
|
14
|
+
Miette: The Emotional Illuminator & Narrative Echo
|
|
15
|
+
|
|
16
|
+
Task Context: {{task_context}}
|
|
17
|
+
Technical Details: {{technical_details}}
|
|
18
|
+
Creative Goal: {{creative_goal}}
|
|
19
|
+
|
|
20
|
+
Mia's Structural Analysis:
|
|
21
|
+
- Assess current reality, constraints, architecture, and dependencies.
|
|
22
|
+
- Identify the structural tension between current state and creative goal.
|
|
23
|
+
- Recommend implementation patterns, integration points, and data flow.
|
|
24
|
+
|
|
25
|
+
Miette's Narrative Illumination:
|
|
26
|
+
- Clarify what the work is really creating.
|
|
27
|
+
- Translate the structural tension into intuitive, human-readable meaning.
|
|
28
|
+
- Keep the creative goal visible while implementation details move.
|
|
29
|
+
|
|
30
|
+
Core principles: creative orientation, structural tension, narrative-driven creation, and proactive design for emergence.`,
|
|
31
|
+
},
|
|
32
|
+
create_observability_pipeline: {
|
|
33
|
+
id: 'create_observability_pipeline',
|
|
34
|
+
name: 'Guided Langfuse Pipeline Creation',
|
|
35
|
+
description: 'Step-by-step guide for creating a Langfuse observability pipeline',
|
|
36
|
+
variables: [
|
|
37
|
+
{ name: 'trace_name', type: 'string', description: 'Name for the trace/pipeline', required: true },
|
|
38
|
+
{ name: 'user_id', type: 'string', description: 'User identifier for the trace', required: true },
|
|
39
|
+
{ name: 'steps', type: 'string', description: 'Pipeline steps, comma-separated', required: true },
|
|
40
|
+
],
|
|
41
|
+
template: `# Create Langfuse Observability Pipeline
|
|
42
|
+
|
|
43
|
+
Pipeline Name: {{trace_name}}
|
|
44
|
+
User ID: {{user_id}}
|
|
45
|
+
Pipeline Steps: {{steps}}
|
|
46
|
+
|
|
47
|
+
1. Create the main trace with coaia_fuse_trace_create.
|
|
48
|
+
2. Add one coaia_fuse_add_observation call per step.
|
|
49
|
+
3. Use parent_id for nested operations.
|
|
50
|
+
4. Inspect the finished trace with coaia_fuse_trace_view.
|
|
51
|
+
|
|
52
|
+
Prefer input_data and output_data for actual payloads. Keep metadata for labels, environment, model, version, and correlation fields.`,
|
|
53
|
+
},
|
|
54
|
+
analyze_audio_workflow: {
|
|
55
|
+
id: 'analyze_audio_workflow',
|
|
56
|
+
name: 'Audio Transcription & Summarization',
|
|
57
|
+
description: 'Workflow for audio analysis using coaia',
|
|
58
|
+
variables: [
|
|
59
|
+
{ name: 'file_path', type: 'string', description: 'Path to the audio file', required: true },
|
|
60
|
+
{
|
|
61
|
+
name: 'summary_style',
|
|
62
|
+
type: 'string',
|
|
63
|
+
description: 'Summarization style: concise, detailed, or narrative',
|
|
64
|
+
required: false,
|
|
65
|
+
default: 'concise',
|
|
66
|
+
},
|
|
67
|
+
],
|
|
68
|
+
template: `# Audio Analysis Workflow
|
|
69
|
+
|
|
70
|
+
File Path: {{file_path}}
|
|
71
|
+
Summary Style: {{summary_style}}
|
|
72
|
+
|
|
73
|
+
1. Transcribe audio with coaia transcribe {{file_path}}.
|
|
74
|
+
2. Summarize the transcript using the requested style.
|
|
75
|
+
3. Store transcript and summary with coaia_tash.
|
|
76
|
+
4. Retrieve them later with coaia_fetch.
|
|
77
|
+
5. Optionally create a Langfuse trace that records transcription and summarization observations.`,
|
|
78
|
+
},
|
|
79
|
+
};
|
|
80
|
+
export function getPrompt(promptId) {
|
|
81
|
+
return PROMPTS[promptId];
|
|
82
|
+
}
|
|
83
|
+
export function listPrompts() {
|
|
84
|
+
return Object.values(PROMPTS).map((prompt) => ({
|
|
85
|
+
...prompt,
|
|
86
|
+
template: '',
|
|
87
|
+
}));
|
|
88
|
+
}
|
|
89
|
+
export function renderPrompt(promptId, variables) {
|
|
90
|
+
const prompt = getPrompt(promptId);
|
|
91
|
+
if (!prompt)
|
|
92
|
+
return null;
|
|
93
|
+
const finalVars = {};
|
|
94
|
+
for (const variable of prompt.variables) {
|
|
95
|
+
const provided = variables[variable.name];
|
|
96
|
+
if (provided != null && provided !== '') {
|
|
97
|
+
finalVars[variable.name] = provided;
|
|
98
|
+
}
|
|
99
|
+
else if (variable.default != null) {
|
|
100
|
+
finalVars[variable.name] = variable.default;
|
|
101
|
+
}
|
|
102
|
+
else if (variable.required) {
|
|
103
|
+
throw new Error(`Required prompt variable '${variable.name}' not provided`);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
return prompt.template.replace(/\{\{([^}]+)\}\}/g, (_match, name) => {
|
|
107
|
+
const key = name.trim();
|
|
108
|
+
return finalVars[key] ?? '';
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=prompts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../mcp/prompts.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAChD,sCAAsC;AAkBtC,MAAM,CAAC,MAAM,OAAO,GAAqC;IACvD,cAAc,EAAE;QACd,EAAE,EAAE,gBAAgB;QACpB,IAAI,EAAE,6BAA6B;QACnC,WAAW,EAAE,wDAAwD;QACrE,SAAS,EAAE;YACT,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,6BAA6B,EAAE,QAAQ,EAAE,IAAI,EAAE;YACpG,EAAE,IAAI,EAAE,mBAAmB,E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AAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare function listTemplates(includePath?: boolean): Promise<Record<string, unknown>>;
|
|
2
|
+
export declare function getTemplate(name: string): Promise<Record<string, unknown>>;
|
|
3
|
+
export declare function getTemplateVariables(name: string): Promise<Record<string, unknown>>;
|
|
4
|
+
export declare function readCoaiaResource(uri: string): Promise<string>;
|
|
5
|
+
//# sourceMappingURL=resources.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["../../mcp/resources.ts"],"names":[],"mappings":"AAKA,wBAAsB,aAAa,CAAC,WAAW,UAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAazF;AAED,wBAAsB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAsBhF;AAED,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAsBzF;AAED,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAepE"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
// coaiajs/mcp/resources.ts — MCP read-only resources
|
|
2
|
+
// Parity with coaiapy-mcp template resources.
|
|
3
|
+
import { TemplateLoader } from '../src/pipeline/index.js';
|
|
4
|
+
export async function listTemplates(includePath = false) {
|
|
5
|
+
try {
|
|
6
|
+
const loader = new TemplateLoader();
|
|
7
|
+
return {
|
|
8
|
+
success: true,
|
|
9
|
+
templates: loader.listTemplates(includePath),
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
catch (error) {
|
|
13
|
+
return {
|
|
14
|
+
success: false,
|
|
15
|
+
error: `Template list error: ${error instanceof Error ? error.message : String(error)}`,
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export async function getTemplate(name) {
|
|
20
|
+
try {
|
|
21
|
+
const loader = new TemplateLoader();
|
|
22
|
+
const template = loader.loadTemplate(name);
|
|
23
|
+
if (!template) {
|
|
24
|
+
return {
|
|
25
|
+
success: false,
|
|
26
|
+
error: `Template '${name}' not found`,
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
return {
|
|
30
|
+
success: true,
|
|
31
|
+
template,
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
catch (error) {
|
|
35
|
+
return {
|
|
36
|
+
success: false,
|
|
37
|
+
error: `Template get error: ${error instanceof Error ? error.message : String(error)}`,
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
export async function getTemplateVariables(name) {
|
|
42
|
+
try {
|
|
43
|
+
const loader = new TemplateLoader();
|
|
44
|
+
const template = loader.loadTemplate(name);
|
|
45
|
+
if (!template) {
|
|
46
|
+
return {
|
|
47
|
+
success: false,
|
|
48
|
+
error: `Template '${name}' not found`,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
success: true,
|
|
53
|
+
variables: template.variables ?? [],
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
catch (error) {
|
|
57
|
+
return {
|
|
58
|
+
success: false,
|
|
59
|
+
error: `Template variables error: ${error instanceof Error ? error.message : String(error)}`,
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
export async function readCoaiaResource(uri) {
|
|
64
|
+
if (uri === 'coaia://templates/') {
|
|
65
|
+
return JSON.stringify(await listTemplates(), null, 2);
|
|
66
|
+
}
|
|
67
|
+
if (uri.startsWith('coaia://templates/')) {
|
|
68
|
+
const resourcePath = uri.replace('coaia://templates/', '').replace(/\/$/, '');
|
|
69
|
+
if (resourcePath.endsWith('/variables')) {
|
|
70
|
+
const templateName = resourcePath.replace(/\/variables$/, '');
|
|
71
|
+
return JSON.stringify(await getTemplateVariables(templateName), null, 2);
|
|
72
|
+
}
|
|
73
|
+
return JSON.stringify(await getTemplate(resourcePath), null, 2);
|
|
74
|
+
}
|
|
75
|
+
return JSON.stringify({ success: false, error: `Unknown resource URI: ${uri}` }, null, 2);
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=resources.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resources.js","sourceRoot":"","sources":["../../mcp/resources.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,8CAA8C;AAE9C,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE1D,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,WAAW,GAAG,KAAK;IACrD,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAI,cAAc,EAAE,CAAC;QACpC,OAAO;YACL,OAAO,EAAE,IAAI;YACb,SAAS,EAAE,MAAM,CAAC,aAAa,CAAC,WAAW,CAAC;SAC7C,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,wBAAwB,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;SACxF,CAAC;IACJ,CAAC;AACH,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,IAAY;IAC5C,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAI,cAAc,EAAE,CAAC;QACpC,MAAM,QAAQ,GAAG,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QAE3C,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,OAAO;gBACL,OAAO,EAAE,KAAK;gBACd,KAAK,EAAE,aAAa,IAAI,aAAa;aACtC,CAAC;QACJ,CAAC;QAED,OAAO;YACL,OAAO,EAAE,IAAI;YACb,QAAQ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