@pentatonic-ai/ai-agent-sdk 0.10.14 → 0.10.15

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/index.cjs CHANGED
@@ -878,7 +878,7 @@ function fireAndForgetEmit(clientConfig, sessionOpts, messages, result, model) {
878
878
  }
879
879
 
880
880
  // src/telemetry.js
881
- var VERSION = "0.10.14";
881
+ var VERSION = "0.10.15";
882
882
  var TELEMETRY_URL = "https://sdk-telemetry.philip-134.workers.dev";
883
883
  function machineId() {
884
884
  const raw = typeof process !== "undefined" ? `${process.env?.USER || process.env?.USERNAME || "u"}:${process.platform || "x"}:${process.arch || "x"}` : "browser";
package/dist/index.js CHANGED
@@ -847,7 +847,7 @@ function fireAndForgetEmit(clientConfig, sessionOpts, messages, result, model) {
847
847
  }
848
848
 
849
849
  // src/telemetry.js
850
- var VERSION = "0.10.14";
850
+ var VERSION = "0.10.15";
851
851
  var TELEMETRY_URL = "https://sdk-telemetry.philip-134.workers.dev";
852
852
  function machineId() {
853
853
  const raw = typeof process !== "undefined" ? `${process.env?.USER || process.env?.USERNAME || "u"}:${process.platform || "x"}:${process.arch || "x"}` : "browser";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pentatonic-ai/ai-agent-sdk",
3
- "version": "0.10.14",
3
+ "version": "0.10.15",
4
4
  "description": "TES SDK — LLM observability and lifecycle tracking via Pentatonic Thing Event System. Track token usage, tool calls, and conversations. Manage things through event-sourced lifecycle stages with AI enrichment and vector search.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -35,9 +35,26 @@ from typing import Any
35
35
  # Allowed-value enums. Moved here from worker.py (which now imports
36
36
  # them) so the schema pins to the SAME constants the KV prompt and
37
37
  # downstream normalisation use — change them in one place only.
38
+ #
39
+ # 2026-06-16 — ONTOLOGY ALIGNMENT (entity-ontology-the-spine.md). This enum is
40
+ # specifically the set of types the LLM extracts FROM PROSE as named entities.
41
+ # Removed the NLP byproducts that polluted ~28% of the graph and are not
42
+ # business entities:
43
+ # - `place`, `date` → ATTRIBUTES of real entities (a meeting's location/time),
44
+ # never standalone entities. The guided enum no longer admits them, so the
45
+ # model stops minting bare place/date nodes (the info still lands in facts).
46
+ # - `concept` → folds into `topic` (the model now emits `topic`).
47
+ # NOT added here (deliberately): meeting / document / thread / task / decision.
48
+ # Those are NOT LLM-prose entities — they are created by structured-event paths
49
+ # (meetings/actions/thread module projections; the sync extractor already emits
50
+ # `document`) or modelled as facts (`decision` category). Forcing the LLM to
51
+ # mint them from prose would create spurious nodes. They join the ontology via
52
+ # their own paths, not this enum.
53
+ # Forward-only: existing place/date/concept rows are untouched and demoted at
54
+ # READ time by the ontology ENGINE_TYPE_MAP (concept→topic, place/date→attribute,
55
+ # other→unresolved). No re-distill required for this change to take effect.
38
56
  ALLOWED_ENT_TYPES = {
39
- "person", "org", "product", "place", "project",
40
- "concept", "topic", "date", "other",
57
+ "person", "org", "product", "project", "topic", "other",
41
58
  }
42
59
  ALLOWED_FCT_CATEGORIES = {
43
60
  "decision", "commitment", "state", "mention",
@@ -61,6 +61,20 @@ def test_schema_enums_pin_to_shared_constants() -> None:
61
61
  assert fct_enum == sorted(fct_enum)
62
62
 
63
63
 
64
+ def test_entity_type_enum_is_ontology_aligned() -> None:
65
+ """Ontology alignment (entity-ontology-the-spine.md): the LLM-extracted
66
+ entity types are the genuine named-entity work types — NOT the NLP
67
+ byproducts. Pins the decision so a future edit can't silently re-admit
68
+ place/date/concept (which polluted ~28% of the graph). meeting/document/
69
+ thread/task/decision are deliberately NOT here — they come from
70
+ structured-event paths / are facts, not LLM prose."""
71
+ assert xs.ALLOWED_ENT_TYPES == {
72
+ "person", "org", "product", "project", "topic", "other",
73
+ }
74
+ for byproduct in ("place", "date", "concept"):
75
+ assert byproduct not in xs.ALLOWED_ENT_TYPES
76
+
77
+
64
78
  def test_schema_caps_mirror_prompt_hard_caps() -> None:
65
79
  """8 ENT / 6 FCT / 6 REL per event, statement <= 140 — what
66
80
  BATCH_SYSTEM_PROMPT requests, the schema enforces."""
@@ -222,7 +222,10 @@ RULES:
222
222
  matching the input index). NEVER skip an event — if an event has \
223
223
  nothing to extract, emit ONLY the header.
224
224
  - ENT lines have 3 or 4 fields: literal `ENT`, type, name, [email].
225
- type ∈ {person, org, product, place, project, concept, topic, date, other}
225
+ type ∈ {person, org, product, project, topic, other}
226
+ Do NOT emit a bare date or place as an entity — those are attributes of
227
+ other entities (a meeting's time/location), not entities themselves. An
228
+ abstract idea or theme is a `topic`. Use `other` only when nothing fits.
226
229
  email (OPTIONAL, person only): when the event body or attributes
227
230
  show an email address that unambiguously identifies the person,
228
231
  append it as the 4th field. This pairs the name+email forms so a
@@ -277,8 +280,10 @@ Each per-event object has:
277
280
  RULES:
278
281
  - NEVER skip an event — if an event has nothing to extract, emit its \
279
282
  object with "index" set and empty arrays.
280
- - entities: type ∈ {person, org, product, place, project, concept, \
281
- topic, date, other}.
283
+ - entities: type ∈ {person, org, product, project, topic, other}. \
284
+ Do NOT emit a bare date or place as an entity (those are attributes of other \
285
+ entities, not entities); an abstract idea or theme is a `topic`; use `other` \
286
+ only when nothing else fits.
282
287
  email (OPTIONAL, person only): when the event body or attributes
283
288
  show an email address that unambiguously identifies the person,
284
289
  include it. This pairs the name+email forms so a later event seeing