coaiajs 0.3.2 → 0.4.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.
Files changed (48) hide show
  1. package/README.md +12 -4
  2. package/agents/custom_gpt/ceremony.yml +3341 -0
  3. package/dist/mcp/config.d.ts.map +1 -1
  4. package/dist/mcp/config.js +0 -2
  5. package/dist/mcp/config.js.map +1 -1
  6. package/dist/mcp/server.js +3 -8
  7. package/dist/mcp/server.js.map +1 -1
  8. package/dist/mcp/tools/coaiapy-tools.d.ts.map +1 -1
  9. package/dist/mcp/tools/coaiapy-tools.js +3 -18
  10. package/dist/mcp/tools/coaiapy-tools.js.map +1 -1
  11. package/dist/src/cli.js +169 -98
  12. package/dist/src/cli.js.map +1 -1
  13. package/dist/src/langfuse/client.d.ts +44 -11
  14. package/dist/src/langfuse/client.d.ts.map +1 -1
  15. package/dist/src/langfuse/client.js +171 -8
  16. package/dist/src/langfuse/client.js.map +1 -1
  17. package/dist/src/langfuse/comments.js +2 -2
  18. package/dist/src/langfuse/comments.js.map +1 -1
  19. package/dist/src/langfuse/index.d.ts +5 -3
  20. package/dist/src/langfuse/index.d.ts.map +1 -1
  21. package/dist/src/langfuse/index.js +3 -2
  22. package/dist/src/langfuse/index.js.map +1 -1
  23. package/dist/src/langfuse/observations.d.ts +37 -2
  24. package/dist/src/langfuse/observations.d.ts.map +1 -1
  25. package/dist/src/langfuse/observations.js +132 -61
  26. package/dist/src/langfuse/observations.js.map +1 -1
  27. package/dist/src/langfuse/projects.d.ts +2 -0
  28. package/dist/src/langfuse/projects.d.ts.map +1 -0
  29. package/dist/src/langfuse/projects.js +8 -0
  30. package/dist/src/langfuse/projects.js.map +1 -0
  31. package/dist/src/langfuse/prompts.d.ts +1 -0
  32. package/dist/src/langfuse/prompts.d.ts.map +1 -1
  33. package/dist/src/langfuse/prompts.js +53 -0
  34. package/dist/src/langfuse/prompts.js.map +1 -1
  35. package/dist/src/langfuse/scores.d.ts +9 -3
  36. package/dist/src/langfuse/scores.d.ts.map +1 -1
  37. package/dist/src/langfuse/scores.js +33 -22
  38. package/dist/src/langfuse/scores.js.map +1 -1
  39. package/dist/src/langfuse/traces.d.ts +16 -5
  40. package/dist/src/langfuse/traces.d.ts.map +1 -1
  41. package/dist/src/langfuse/traces.js +112 -105
  42. package/dist/src/langfuse/traces.js.map +1 -1
  43. package/llms-full.txt +9 -6
  44. package/llms.txt +3 -3
  45. package/package.json +7 -2
  46. package/rispecs/03-langfuse-module.spec.md +5 -0
  47. package/rispecs/08-cli-interface.spec.md +8 -5
  48. package/rispecs/09-mcp-server.spec.md +2 -2
package/README.md CHANGED
@@ -50,7 +50,7 @@ Import from the root, or from a subpath to pull in only what you need. Every ent
50
50
  | `coaiajs/github` | `listIssues`, `getIssue`, `getIssueComments`, `resetClient` |
51
51
  | `coaiajs/environment` | `EnvironmentManager`, `createEnvironment`, `findEnvironment` |
52
52
  | `coaiajs/version` | `getPackageVersion` |
53
- | `coaiajs/langfuse` | `LangfuseClient`, `LangfuseApiError`, traces/observations/prompts/datasets/scores/comments/media operations and formatters (52 exports) |
53
+ | `coaiajs/langfuse` | Langfuse JS SDK v5/OpenTelemetry tracing plus v4 observations, prompts, datasets, scores, comments, media, projects, and formatters (55 exports) |
54
54
  | `coaiajs/narrative` | `KnowledgeGraphManager`, chart operations, markdown export, tool definitions (29 exports) |
55
55
  | `coaiajs/pde` | `SessionManager`, `StcMapper`, `handlePdeTool`, `PDE_MCP_TOOLS` (10 exports) |
56
56
  | `coaiajs/planning` | `parsePlan`, `planToSTC`, `syncToChart`, `syncToPlan`, `handlePlanningTool` (10 exports) |
@@ -130,6 +130,14 @@ npx coaia <command> # or: npm i -g coaiajs && coaia <command>
130
130
 
131
131
  `coaia tash` follows coaiapy semantics: `-F/--file` reads the value from a file, `-T/--ttl` is in **minutes**, default TTL `5555`.
132
132
 
133
+ `coaia fuse prompts get <name>` outputs Markdown by default (`--md` is available explicitly); use the global `--json` option for JSON.
134
+
135
+ ### Langfuse v4 compatibility
136
+
137
+ `coaia fuse` uses the current scoped Langfuse JS SDK v5. Trace writes are exported as immutable OpenTelemetry spans to `POST /api/public/otel/v1/traces` with ingestion version 4. Trace, observation, and session reads use Observations API v2; score reads use Scores API v3. The removed v4 concepts are reflected in the CLI: sessions are reconstructed from observations, and legacy trace-output patching is no longer exposed. Langfuse Cloud sunsets the legacy APIs on **November 16, 2026**.
138
+
139
+ Migration references: [Langfuse v4](https://langfuse.com/docs/v4) · [versions and compatibility](https://langfuse.com/docs/compatibility) · [deprecated API mapping](https://langfuse.com/faq/all/deprecated-api-migration) · [custom ingestion migration](https://langfuse.com/integrations/native/opentelemetry/migration-to-v4) · [current OpenAPI reference](https://cloud.langfuse.com/generated/api/openapi.yml).
140
+
133
141
  ---
134
142
 
135
143
  ## 3. MCP Server
@@ -138,11 +146,11 @@ npx coaia <command> # or: npm i -g coaiajs && coaia <command>
138
146
  npx coaiajs-mcp
139
147
  ```
140
148
 
141
- Serves **63 tools, 3 prompts, and 1 listable resource** over stdio.
149
+ Serves **62 tools, 3 prompts, and 1 listable resource** over stdio.
142
150
 
143
151
  | Group | Count | Examples |
144
152
  |---|---|---|
145
- | coaiapy + Langfuse | 20 | `coaia_tash`, `coaia_fetch`, `coaia_fuse_trace_create`, `coaia_fuse_traces_list` |
153
+ | coaiapy + Langfuse | 19 | `coaia_tash`, `coaia_fetch`, `coaia_fuse_trace_create`, `coaia_fuse_traces_list` |
146
154
  | Narrative / knowledge graph | 27 | `create_entities`, `read_graph`, `create_structural_tension_chart`, `perform_mmot_evaluation` |
147
155
  | PDE | 10 | `import_pde_decomposition`, `create_stc_from_pde`, `complete_session` |
148
156
  | Planning | 6 | `parse_plan_structural`, `plan_to_stc`, `sync_plan_to_chart`, `pde_to_plan` |
@@ -160,7 +168,7 @@ Set `COAIAJS_FEATURES` to control the exposed tool set (default `STANDARD`):
160
168
  | Level | Effect |
161
169
  |---|---|
162
170
  | `MINIMAL` | Core tash/fetch and essential graph tools |
163
- | `STANDARD` | Default — the 63 tools above |
171
+ | `STANDARD` | Default — the 62 tools above |
164
172
  | `OBSERVABILITY` | Same set as `STANDARD` |
165
173
  | `FULL` | Everything, including media tools |
166
174