coaiajs 0.3.3 → 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 (44) hide show
  1. package/README.md +10 -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 +157 -96
  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 +4 -2
  20. package/dist/src/langfuse/index.d.ts.map +1 -1
  21. package/dist/src/langfuse/index.js +2 -1
  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/scores.d.ts +9 -3
  32. package/dist/src/langfuse/scores.d.ts.map +1 -1
  33. package/dist/src/langfuse/scores.js +33 -22
  34. package/dist/src/langfuse/scores.js.map +1 -1
  35. package/dist/src/langfuse/traces.d.ts +16 -5
  36. package/dist/src/langfuse/traces.d.ts.map +1 -1
  37. package/dist/src/langfuse/traces.js +112 -105
  38. package/dist/src/langfuse/traces.js.map +1 -1
  39. package/llms-full.txt +8 -5
  40. package/llms.txt +3 -3
  41. package/package.json +7 -2
  42. package/rispecs/03-langfuse-module.spec.md +5 -0
  43. package/rispecs/08-cli-interface.spec.md +8 -5
  44. 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 (53 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) |
@@ -132,6 +132,12 @@ npx coaia <command> # or: npm i -g coaiajs && coaia <command>
132
132
 
133
133
  `coaia fuse prompts get <name>` outputs Markdown by default (`--md` is available explicitly); use the global `--json` option for JSON.
134
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
+
135
141
  ---
136
142
 
137
143
  ## 3. MCP Server
@@ -140,11 +146,11 @@ npx coaia <command> # or: npm i -g coaiajs && coaia <command>
140
146
  npx coaiajs-mcp
141
147
  ```
142
148
 
143
- Serves **63 tools, 3 prompts, and 1 listable resource** over stdio.
149
+ Serves **62 tools, 3 prompts, and 1 listable resource** over stdio.
144
150
 
145
151
  | Group | Count | Examples |
146
152
  |---|---|---|
147
- | 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` |
148
154
  | Narrative / knowledge graph | 27 | `create_entities`, `read_graph`, `create_structural_tension_chart`, `perform_mmot_evaluation` |
149
155
  | PDE | 10 | `import_pde_decomposition`, `create_stc_from_pde`, `complete_session` |
150
156
  | Planning | 6 | `parse_plan_structural`, `plan_to_stc`, `sync_plan_to_chart`, `pde_to_plan` |
@@ -162,7 +168,7 @@ Set `COAIAJS_FEATURES` to control the exposed tool set (default `STANDARD`):
162
168
  | Level | Effect |
163
169
  |---|---|
164
170
  | `MINIMAL` | Core tash/fetch and essential graph tools |
165
- | `STANDARD` | Default — the 63 tools above |
171
+ | `STANDARD` | Default — the 62 tools above |
166
172
  | `OBSERVABILITY` | Same set as `STANDARD` |
167
173
  | `FULL` | Everything, including media tools |
168
174