@loxtep/sdk 0.9.6 → 0.9.7

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 (115) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/README.md +4 -4
  3. package/dist/cli/commands/approvals-cmd.d.ts +39 -9
  4. package/dist/cli/commands/approvals-cmd.d.ts.map +1 -1
  5. package/dist/cli/commands/approvals-cmd.js +112 -48
  6. package/dist/cli/commands/approvals-cmd.js.map +1 -1
  7. package/dist/cli/commands/candidates-cmd.d.ts +24 -0
  8. package/dist/cli/commands/candidates-cmd.d.ts.map +1 -0
  9. package/dist/cli/commands/candidates-cmd.js +138 -0
  10. package/dist/cli/commands/candidates-cmd.js.map +1 -0
  11. package/dist/cli/commands/cdlc-cmd.d.ts +23 -0
  12. package/dist/cli/commands/cdlc-cmd.d.ts.map +1 -0
  13. package/dist/cli/commands/cdlc-cmd.js +110 -0
  14. package/dist/cli/commands/cdlc-cmd.js.map +1 -0
  15. package/dist/cli/commands/packs-cmd.d.ts +14 -0
  16. package/dist/cli/commands/packs-cmd.d.ts.map +1 -0
  17. package/dist/cli/commands/packs-cmd.js +86 -0
  18. package/dist/cli/commands/packs-cmd.js.map +1 -0
  19. package/dist/cli/help.d.ts.map +1 -1
  20. package/dist/cli/help.js +16 -2
  21. package/dist/cli/help.js.map +1 -1
  22. package/dist/cli/index.js +143 -10
  23. package/dist/cli/index.js.map +1 -1
  24. package/dist/client/agent-workspace-types.d.ts +74 -0
  25. package/dist/client/agent-workspace-types.d.ts.map +1 -0
  26. package/dist/client/agent-workspace-types.js +7 -0
  27. package/dist/client/agent-workspace-types.js.map +1 -0
  28. package/dist/client/agent-workspace.d.ts +45 -0
  29. package/dist/client/agent-workspace.d.ts.map +1 -0
  30. package/dist/client/agent-workspace.js +142 -0
  31. package/dist/client/agent-workspace.js.map +1 -0
  32. package/dist/client/approvals-types.d.ts +18 -0
  33. package/dist/client/approvals-types.d.ts.map +1 -1
  34. package/dist/client/approvals.d.ts +4 -4
  35. package/dist/client/approvals.d.ts.map +1 -1
  36. package/dist/client/approvals.js +31 -8
  37. package/dist/client/approvals.js.map +1 -1
  38. package/dist/client/cdlc-types.d.ts +147 -0
  39. package/dist/client/cdlc-types.d.ts.map +1 -0
  40. package/dist/client/cdlc-types.js +16 -0
  41. package/dist/client/cdlc-types.js.map +1 -0
  42. package/dist/client/cdlc.d.ts +27 -0
  43. package/dist/client/cdlc.d.ts.map +1 -0
  44. package/dist/client/cdlc.js +174 -0
  45. package/dist/client/cdlc.js.map +1 -0
  46. package/dist/client/context.d.ts +8 -1
  47. package/dist/client/context.d.ts.map +1 -1
  48. package/dist/client/context.js +4 -1
  49. package/dist/client/context.js.map +1 -1
  50. package/dist/client/index.d.ts +19 -3
  51. package/dist/client/index.d.ts.map +1 -1
  52. package/dist/client/index.js +2 -0
  53. package/dist/client/index.js.map +1 -1
  54. package/dist/client/loxtep-client.d.ts +2 -2
  55. package/dist/client/loxtep-client.d.ts.map +1 -1
  56. package/dist/client/loxtep-client.js +42 -5
  57. package/dist/client/loxtep-client.js.map +1 -1
  58. package/dist/client/meaning.d.ts +10 -1
  59. package/dist/client/meaning.d.ts.map +1 -1
  60. package/dist/client/meaning.js +4 -1
  61. package/dist/client/meaning.js.map +1 -1
  62. package/dist/client/mining-types.d.ts +81 -0
  63. package/dist/client/mining-types.d.ts.map +1 -0
  64. package/dist/client/mining-types.js +14 -0
  65. package/dist/client/mining-types.js.map +1 -0
  66. package/dist/client/mining.d.ts +17 -0
  67. package/dist/client/mining.d.ts.map +1 -0
  68. package/dist/client/mining.js +115 -0
  69. package/dist/client/mining.js.map +1 -0
  70. package/dist/client/ontology-types.d.ts +91 -0
  71. package/dist/client/ontology-types.d.ts.map +1 -0
  72. package/dist/client/ontology-types.js +6 -0
  73. package/dist/client/ontology-types.js.map +1 -0
  74. package/dist/client/ontology.d.ts +27 -0
  75. package/dist/client/ontology.d.ts.map +1 -0
  76. package/dist/client/ontology.js +146 -0
  77. package/dist/client/ontology.js.map +1 -0
  78. package/dist/client/packs-types.d.ts +48 -0
  79. package/dist/client/packs-types.d.ts.map +1 -0
  80. package/dist/client/packs-types.js +7 -0
  81. package/dist/client/packs-types.js.map +1 -0
  82. package/dist/client/packs.d.ts +27 -0
  83. package/dist/client/packs.d.ts.map +1 -0
  84. package/dist/client/packs.js +122 -0
  85. package/dist/client/packs.js.map +1 -0
  86. package/dist/client/procedures-types.d.ts +147 -6
  87. package/dist/client/procedures-types.d.ts.map +1 -1
  88. package/dist/client/procedures-types.js +3 -2
  89. package/dist/client/procedures-types.js.map +1 -1
  90. package/dist/client/procedures.d.ts +27 -13
  91. package/dist/client/procedures.d.ts.map +1 -1
  92. package/dist/client/procedures.js +180 -20
  93. package/dist/client/procedures.js.map +1 -1
  94. package/dist/client/process-intelligence-types.d.ts +94 -2
  95. package/dist/client/process-intelligence-types.d.ts.map +1 -1
  96. package/dist/client/process-intelligence-types.js +15 -3
  97. package/dist/client/process-intelligence-types.js.map +1 -1
  98. package/dist/client/process-intelligence.d.ts +18 -5
  99. package/dist/client/process-intelligence.d.ts.map +1 -1
  100. package/dist/client/process-intelligence.js +47 -5
  101. package/dist/client/process-intelligence.js.map +1 -1
  102. package/dist/client/review.d.ts +7 -1
  103. package/dist/client/review.d.ts.map +1 -1
  104. package/dist/client/review.js +3 -1
  105. package/dist/client/review.js.map +1 -1
  106. package/dist/client/semantic-layer-types.d.ts +65 -0
  107. package/dist/client/semantic-layer-types.d.ts.map +1 -0
  108. package/dist/client/semantic-layer-types.js +7 -0
  109. package/dist/client/semantic-layer-types.js.map +1 -0
  110. package/dist/client/semantic-layer.d.ts +25 -0
  111. package/dist/client/semantic-layer.d.ts.map +1 -0
  112. package/dist/client/semantic-layer.js +100 -0
  113. package/dist/client/semantic-layer.js.map +1 -0
  114. package/docs/sdk-mcp-mapping.md +157 -3
  115. package/package.json +1 -1
@@ -15,11 +15,25 @@ deprecation aliases.
15
15
  | `loxtep_workspace` | `client.workspace` | `.projects.*`, `.instances.*`, `.versions` (REST pending); planned MCP `get_project_workspace_status` → `ProjectWorkspaceStatus` ([docs](./project-workspace-status.md)) |
16
16
  | `loxtep_build` | `client.build` | `.workflows.*`, `.triggers.*`, `.data_products.*`, `.targets.*`, deploy writes, `.get_writer({ bot_id, queue })` escape hatch |
17
17
  | `loxtep_define` | `client.define` | `.schemas.*`, `.quality.*`, `.standards.*`, `.data_contracts.*`, `.domains.*` |
18
- | `loxtep_meaning` | `client.meaning` | `.thesaurus.*` (ontology/semantic REST split pending) |
19
- | `loxtep_review` | `client.review` | `.approvals.*`, `.improvements.*`, CDLC and context-mining REST (pending) |
18
+ | `loxtep_meaning` | `client.meaning` | `.thesaurus.*`, `.ontology.*`, `.packs.*`, `.semantic.*` (search/artifact/completeness) |
19
+ | `loxtep_review` | `client.review` | `.approvals.*`, `.improvements.*`, `.cdlc.*` (get/transition/propagate/lineage/deps + `list_review_queue`); `.mining.*` (`run_mining_pass`, `list_candidates`, `act_on_candidate`). CLI: `loxtep cdlc …`, `loxtep candidates list|act` |
20
20
  | `loxtep_query` | `client.query` | `.catalog.*`, `.discovery.*`, `.query()`, `.list_tables()`, `.search()` |
21
21
  | `loxtep_observe` | `client.observe` | `.status()`, `.stream_config()`, queue `.open_reader` / `.open_writer`, `.list_deployments()`, `.get_deployment()`, trust signals |
22
- | `loxtep_context` | `client.context` | `.process_intelligence.*`, `.procedures.*`, `.activity.*` |
22
+ | `loxtep_context` | `client.context` | `.process_intelligence.*`, `.procedures.*`, `.activity.*`, `.issues.*`, `.goals.*`, `.workstreams.*` |
23
+
24
+ ## Approvals fixture / env bootstrap
25
+
26
+ Happy-path **list_pending** + **resolve** (approve/reject) integration tests use the
27
+ CLI mock catalog — no live mcpdev required for the default suite:
28
+
29
+ | Mode | Bootstrap |
30
+ | --- | --- |
31
+ | **Fixtures (CI default)** | `src/cli/__tests__/mock-platform-api.ts` — routes under `/agent-orchestration/organizations/{org}/approval-requests`. Run: `pnpm exec jest src/client/approvals.http.integration.test.ts src/cli/cli-integration.test.ts src/cli/cli-integration-mutations.test.ts` |
32
+ | **Live staging/mcpdev (optional)** | `loxtep login` (writes credentials), set `api_url` / `organization_id` in config (or `LOXTEP_API_URL` / `LOXTEP_ORGANIZATION_ID`), then `LOXTEP_CLI_SMOKE=1 pnpm exec jest src/cli/cli-staging-smoke.test.ts` |
33
+
34
+ MCP mapping: `loxtep_review.list_pending` → `client.review.approvals.list_pending()`;
35
+ `loxtep_review.resolve` → `client.review.approvals.resolve(id, 'approve'\|'reject')`
36
+ (CLI: `loxtep approvals list|approve|reject`).
23
37
 
24
38
  ## Top-level stream I/O
25
39
 
@@ -42,4 +56,144 @@ probe uses `test_connector` / `loxtep connectors test <id>`; sample capture uses
42
56
  When unsure: **MCP for provisioning and agent tool calls**; **SDK for runtime**
43
57
  services running in your infrastructure or CI.
44
58
 
59
+ ## Meaning: ontology concepts (LOX-1241)
60
+
61
+ MCP `loxtep_meaning` ontology ops map to `client.meaning.ontology`:
62
+
63
+ | MCP operation | SDK |
64
+ | --- | --- |
65
+ | `list_ontology_concepts` | `client.meaning.ontology.list_concepts()` |
66
+ | `get_ontology_concept` | `client.meaning.ontology.get_concept(concept_id)` |
67
+ | `create_ontology_concept` | `client.meaning.ontology.create_concept({ name, namespace, node_type, … })` |
68
+ | `update_ontology_concept` | `client.meaning.ontology.update_concept(concept_id, { … })` |
69
+ | `delete_ontology_concept` | `client.meaning.ontology.delete_concept(concept_id)` |
70
+ | `create_ontology_relationship` | `client.meaning.ontology.create_relationship({ source_entity_type, target_entity_type, relation_type, … })` |
71
+ | `get_ontology_relationships` | `client.meaning.ontology.get_relationships({ … })` (alias: `list_relationships`) |
72
+
73
+ REST: `/graph/organizations/{org}/ontology/concepts` and `…/relationships`.
74
+
75
+ ## Meaning: vocabulary packs (LOX-1242)
76
+
77
+ These ops live under MCP **`loxtep_meaning`** / semantic-layer (not `loxtep_define`).
78
+ SDK surface: `client.meaning.packs`. CLI: `loxtep packs …`.
79
+
80
+ | MCP operation | SDK | REST |
81
+ | --- | --- | --- |
82
+ | `list_available_packs` | `client.meaning.packs.list_available()` (alias `list_available_packs`) | `GET /graph/admin/vocabulary-packs/recommend` |
83
+ | `activate_vocabulary_pack` | `client.meaning.packs.activate({ pack_id, organization_id? })` (alias `activate_vocabulary_pack`) | `POST /graph/admin/vocabulary-packs/{pack_id}/enable` body `{ organization_id }` |
84
+ | `get_pack_activation_status` | `client.meaning.packs.get_activation_status()` (alias `get_pack_activation_status`) | `GET /graph/semantic-layer/activation-state` |
85
+
86
+ CLI verbs:
87
+
88
+ | CLI | SDK |
89
+ | --- | --- |
90
+ | `loxtep packs list` | `list_available()` |
91
+ | `loxtep packs activate <pack_id> [--organization-id]` | `activate({ pack_id, organization_id })` |
92
+ | `loxtep packs status` | `get_activation_status()` |
93
+
94
+ Notes:
95
+
96
+ - Activation status is normalized to snake_case (`activation_state`, `active_pack_id`, …) whether the graph handler returns camelCase or snake_case.
97
+ - `list_available` follows the MCP/recommend path (same as hosted tools). Admin inventory `GET /graph/admin/vocabulary-packs` is a sibling route; if recommend is unavailable, callers may see errors from that path specifically.
98
+ - Requires `catalog:read` for list/status and `admin:vocabulary` for activate (platform RBAC).
99
+
100
+ ## Meaning: semantic search / completeness (LOX-1243)
101
+
102
+ MCP `loxtep_meaning` semantic-layer read ops map to `client.meaning.semantic`:
103
+
104
+ | MCP operation | SDK | REST |
105
+ | --- | --- | --- |
106
+ | `search_semantic_layer` | `client.meaning.semantic.search({ query, … })` (alias `search_semantic_layer`; string query shorthand OK) | `POST /semantic-layer/search` |
107
+ | `get_semantic_artifact` | `client.meaning.semantic.get_artifact({ artifact_type, id })` (alias `get_semantic_artifact`; `artifact_id` accepted) | `GET /semantic-layer/{segment}/{id}` |
108
+ | `get_semantic_completeness` | `client.meaning.semantic.get_completeness({ domain_id? })` (alias `get_semantic_completeness`) | `GET /semantic-layer/completeness` |
109
+
110
+ Artifact path segments (MCP parity): `entity`→`entities`, `glossary_term`→`glossary`, `process_map`→`process-maps`; other types use the raw `artifact_type` string.
111
+
112
+ Notes:
113
+
114
+ - Requires `catalog:read` (platform RBAC).
115
+ - SDK calls the semantic-layer MS REST routes directly. MCP-only enrichments (empty-search / completeness `metadata.activation_state` from pack activation) are not duplicated — use `client.meaning.packs.get_activation_status()` when needed.
116
+ - Pack lifecycle remains under `client.meaning.packs` (see vocabulary packs section above).
117
+
118
+ ## Review: CDLC + context mining (LOX-1244…1247)
119
+
120
+ MCP `loxtep_review` CDLC / mining ops map to `client.review.cdlc` and
121
+ `client.review.mining`:
122
+
123
+ | MCP operation | SDK | REST |
124
+ | --- | --- | --- |
125
+ | `get_artifact_lifecycle` | `client.review.cdlc.get_artifact_lifecycle({ artifact_ref })` | `GET /graph/organizations/{org}/cdlc/artifacts/{artifact_ref}` |
126
+ | `transition_lifecycle` | `.transition_lifecycle({ artifact_ref, from_state, to_state, … })` | `POST …/cdlc/artifacts/{artifact_ref}/transition` |
127
+ | `propagate_change` | `.propagate_change({ … })` | `POST …/cdlc/propagate` |
128
+ | `list_propagation_lineage` | `.list_propagation_lineage({ … })` | `GET …/cdlc/propagation-lineage` |
129
+ | `list_context_dependencies` | `.list_context_dependencies({ … })` | `GET …/cdlc/dependencies` |
130
+ | `list_review_queue` | `.list_review_queue({ … })` | `GET …/cdlc/review-queue` |
131
+ | `run_mining_pass` | `client.review.mining.run_mining_pass({ … })` | `POST …/mining/run` |
132
+ | `list_candidates` | `.list_candidates({ … })` | `GET …/mining/candidates` |
133
+ | `act_on_candidate` | `.act_on_candidate(candidate_id, { action, … })` | `POST …/mining/candidates/{id}/act` |
134
+
135
+ CLI: `loxtep cdlc transition`, `loxtep cdlc review-queue`,
136
+ `loxtep candidates list`, `loxtep candidates act`.
137
+
138
+ ## Context: decision traces causal / similar (LOX-1248)
139
+
140
+ MCP `loxtep_context` process-intelligence decision-trace ops map to
141
+ `client.context.process_intelligence.decisionTraces`:
142
+
143
+ | MCP / REST concern | SDK | REST |
144
+ | --- | --- | --- |
145
+ | list decision traces | `.decisionTraces.list(org, { … })` | `GET …/decision-traces` |
146
+ | create (optional links / precedent) | `.decisionTraces.create(org, { … })` | `POST …/decision-traces` |
147
+ | causal chain | `.decisionTraces.getChain(org, trace_id, { … })` | `GET …/decision-traces/{id}/chain` |
148
+ | similar decisions | `.decisionTraces.getSimilar(org, trace_id, { … })` | `GET …/decision-traces/{id}/similar` |
149
+
150
+ Also: `client.context.process_intelligence.getEntityContext(org, { entity_type, entity_id })`.
151
+
152
+ ## Context: procedures CRUD / import-export (LOX-1249)
153
+
154
+ MCP `loxtep_context` procedure ops map to `client.context.procedures` (graph
155
+ authored process maps — not process-intelligence discovery):
156
+
157
+ | MCP operation | SDK | REST | Status |
158
+ | --- | --- | --- | --- |
159
+ | `list_procedures` | `client.context.procedures.list({ … })` (alias `list_procedures`) | `GET /graph/organizations/{org}/procedures` | shipped |
160
+ | `get_procedure` | `.get(procedure_id)` (alias `get_procedure`) | `GET /graph/procedures/{procedure_id}` | shipped |
161
+ | `create_procedure` | `.create({ name, … })` (alias `create_procedure`) | `POST /graph/organizations/{org}/procedures` | shipped |
162
+ | `update_procedure` | `.update(procedure_id, { … })` (alias `update_procedure`) | `PUT /graph/procedures/{procedure_id}` | shipped |
163
+ | `delete_procedure` | `.delete(procedure_id)` (alias `delete_procedure`) | `DELETE /graph/procedures/{procedure_id}` | shipped |
164
+ | `import_process_graph` | `.import_process_graph({ graph \| s3_reference, … })` | `POST /graph/organizations/{org}/procedures/import` | shipped |
165
+ | `export_process_graph` | `.export_process_graph({ procedure_id, format?, preserve_namespaces? })` | `GET /graph/procedures/{procedure_id}/export` | shipped |
166
+
167
+ Notes:
168
+
169
+ - `organization_id` comes from the client constructor or per-call override for
170
+ org-scoped routes (`list` / `create` / `import_process_graph`).
171
+ - Import requires exactly one of `graph` (inline JSON-LD) or `s3_reference`.
172
+ - Export `format`: `jsonld` (default) \| `yaml` \| `summary`.
173
+ - Out of this ticket's acceptance set (still MCP-only): `get_procedure_dependencies`.
174
+
175
+ ## Context: agent workspace issues / goals / workstreams (LOX-1250)
176
+
177
+ MCP `loxtep_context` agent-orchestration **reads** map to
178
+ `client.context.issues` / `.goals` / `.workstreams`:
179
+
180
+ | MCP operation | SDK | REST | Status |
181
+ | --- | --- | --- | --- |
182
+ | `list_issues` | `client.context.issues.list({ … })` (alias `list_issues`) | `GET /agent-orchestration/organizations/{org}/issues` | shipped |
183
+ | `get_issue` | `.get(issue_id)` (alias `get_issue`) | `GET /agent-orchestration/issues/{issue_id}` | shipped |
184
+ | `list_goals` | `client.context.goals.list({ … })` (alias `list_goals`) | `GET /agent-orchestration/organizations/{org}/goals` | shipped |
185
+ | `get_goal` | `.get(goal_id)` (alias `get_goal`) | `GET /agent-orchestration/goals/{goal_id}` | shipped |
186
+ | `list_workstreams` | `client.context.workstreams.list({ … })` (alias `list_workstreams`) | `GET /agent-orchestration/organizations/{org}/workstreams` | shipped |
187
+ | `get_workstream` | `.get(workstream_id)` (alias `get_workstream`) | `GET /agent-orchestration/workstreams/{workstream_id}` | shipped |
188
+
189
+ **Writes deferred** (still MCP-only): `create_issue`, `update_issue`,
190
+ `add_issue_comment`, `create_goal`, `create_workstream`, `update_workstream`.
191
+ Also out of this ticket: `list_agents` / `get_agent`.
192
+
193
+ Notes:
194
+
195
+ - `organization_id` from the client constructor or per-call override on list routes.
196
+ - Issue list filters: `workstream_id`, `goal_id`, `status`, `assignee_agent_id`,
197
+ `page`, `page_size`. Goals/workstreams lists accept `page` / `page_size`.
198
+
45
199
  Full MCP operation tables: [loxtep-plugins-skills AGENTS.md](https://github.com/LoxtepInc/loxtep-plugins-skills/blob/main/AGENTS.md).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loxtep/sdk",
3
- "version": "0.9.6",
3
+ "version": "0.9.7",
4
4
  "description": "Loxtep SDK for Node.js — the Enterprise Context Layer: data products, workflows, projects, queues, and machine-usable context for AI",
5
5
  "author": "Loxtep <engineering@loxtep.io>",
6
6
  "homepage": "https://loxtep.io",