briyah 2.0.8 → 2.0.10

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.
@@ -3,6 +3,8 @@ export { BriyahConfigService, BriyahConfigOptions } from './briyah-config';
3
3
  export type { AppService, AgentCreationOptions, PdfMarkdownOptions, PdfMarkdownResult, DocumentMarkdownOptions, DocumentMarkdownResult, } from '../app.service';
4
4
  export { detectDocumentType, convertLocalDocument, UnsupportedDocumentError, } from '../documents/document-conversion';
5
5
  export type { DocumentFileType, DocumentTypeDetection, DocumentPage as ConvertedDocumentPage, LocalDocumentConversion, LocalConversionOptions, } from '../documents/document-conversion';
6
+ export { detectAttachmentMimeType, isAttachmentImage, ATTACHMENT_IMAGE_TYPES, MAX_ATTACHED_IMAGE_BYTES, } from '../ai/LLM/attachment-type';
7
+ export type { AttachmentImageType } from '../ai/LLM/attachment-type';
6
8
  export type { DocumentSource, DocumentSummary, DocumentSearchRequest, DocumentHit, DocumentPages, DocumentPage, DocumentText, PageRange, } from '../documents/library/document.types';
7
9
  export { registerDocumentSource, unregisterDocumentSource, listDocumentSources, } from '../documents/library/document-registry';
8
10
  export { buildDocumentGuideMarkdown } from '../documents/library/document-guide.builder';
@@ -19,10 +21,11 @@ export type { NativeToolDefinition, ToolHelpers, ToolContext, ToolCaller, ToolAr
19
21
  export { dnd5eTools } from '../tools/packs/dnd5e';
20
22
  export { installToolPacks, registerToolPacks, availableToolPacks } from '../tools/packs';
21
23
  export { NativeToolRegistry } from '../tools/native-tool-registry.service';
22
- export type { DataSource, DataSet, DataField, DataFieldType, DataAggregateFn, DataFilter, DataFilterOp, DataMetric, DataOrder, DataQuery, DataRow, DataResult, } from '../data/data.types';
24
+ export type { DataSource, DataSet, DataField, DataFieldType, DataAggregateFn, DataFilter, DataFilterOp, DataHaving, DataMetric, DataOrder, DataQuery, DataRow, DataResult, } from '../data/data.types';
23
25
  export { DEFAULT_ROW_LIMIT, MAX_ROW_LIMIT } from '../data/data.types';
24
26
  export { registerDataSource, unregisterDataSource, listDataSources, listDatasets, } from '../data/data-registry';
25
27
  export { buildDataGuideMarkdown } from '../data/data-guide.builder';
28
+ export { queryRows } from '../data/row-executor';
26
29
  export { PackService } from '../packs/pack.service';
27
30
  export type { PackView } from '../packs/pack.service';
28
31
  export { PackInstantiationService } from '../packs/pack-instantiation.service';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RoomMessage = exports.Room = exports.Agent = exports.PackInstantiationService = exports.PackService = exports.buildDataGuideMarkdown = exports.listDatasets = exports.listDataSources = exports.unregisterDataSource = exports.registerDataSource = exports.MAX_ROW_LIMIT = exports.DEFAULT_ROW_LIMIT = exports.NativeToolRegistry = exports.availableToolPacks = exports.registerToolPacks = exports.installToolPacks = exports.dnd5eTools = exports.buildMarkdown = exports.pageMarker = exports.stripWrappingFence = exports.splitMarkdownIntoPages = exports.libraryDocumentIdOf = exports.isLibraryAttachment = exports.libraryAttachmentName = exports.DEFAULT_EMBEDDING_MODEL = exports.EMBEDDING_DIMENSIONS = exports.embedTexts = exports.DEFAULT_CHUNK_OVERLAP_CHARS = exports.DEFAULT_CHUNK_MAX_CHARS = exports.embeddingInput = exports.chunkPages = exports.buildDocumentGuideMarkdown = exports.listDocumentSources = exports.unregisterDocumentSource = exports.registerDocumentSource = exports.UnsupportedDocumentError = exports.convertLocalDocument = exports.detectDocumentType = exports.BriyahConfigService = exports.Briyah = void 0;
3
+ exports.RoomMessage = exports.Room = exports.Agent = exports.PackInstantiationService = exports.PackService = exports.queryRows = exports.buildDataGuideMarkdown = exports.listDatasets = exports.listDataSources = exports.unregisterDataSource = exports.registerDataSource = exports.MAX_ROW_LIMIT = exports.DEFAULT_ROW_LIMIT = exports.NativeToolRegistry = exports.availableToolPacks = exports.registerToolPacks = exports.installToolPacks = exports.dnd5eTools = exports.buildMarkdown = exports.pageMarker = exports.stripWrappingFence = exports.splitMarkdownIntoPages = exports.libraryDocumentIdOf = exports.isLibraryAttachment = exports.libraryAttachmentName = exports.DEFAULT_EMBEDDING_MODEL = exports.EMBEDDING_DIMENSIONS = exports.embedTexts = exports.DEFAULT_CHUNK_OVERLAP_CHARS = exports.DEFAULT_CHUNK_MAX_CHARS = exports.embeddingInput = exports.chunkPages = exports.buildDocumentGuideMarkdown = exports.listDocumentSources = exports.unregisterDocumentSource = exports.registerDocumentSource = exports.MAX_ATTACHED_IMAGE_BYTES = exports.ATTACHMENT_IMAGE_TYPES = exports.isAttachmentImage = exports.detectAttachmentMimeType = exports.UnsupportedDocumentError = exports.convertLocalDocument = exports.detectDocumentType = exports.BriyahConfigService = exports.Briyah = void 0;
4
4
  // Main SDK exports
5
5
  var briyah_1 = require("./briyah");
6
6
  Object.defineProperty(exports, "Briyah", { enumerable: true, get: function () { return briyah_1.Briyah; } });
@@ -13,6 +13,13 @@ var document_conversion_1 = require("../documents/document-conversion");
13
13
  Object.defineProperty(exports, "detectDocumentType", { enumerable: true, get: function () { return document_conversion_1.detectDocumentType; } });
14
14
  Object.defineProperty(exports, "convertLocalDocument", { enumerable: true, get: function () { return document_conversion_1.convertLocalDocument; } });
15
15
  Object.defineProperty(exports, "UnsupportedDocumentError", { enumerable: true, get: function () { return document_conversion_1.UnsupportedDocumentError; } });
16
+ // What agent.attachDocument() will send a file as (a PDF, an image or text), for a
17
+ // host that wants to check an upload, or shrink a photo, before attaching it.
18
+ var attachment_type_1 = require("../ai/LLM/attachment-type");
19
+ Object.defineProperty(exports, "detectAttachmentMimeType", { enumerable: true, get: function () { return attachment_type_1.detectAttachmentMimeType; } });
20
+ Object.defineProperty(exports, "isAttachmentImage", { enumerable: true, get: function () { return attachment_type_1.isAttachmentImage; } });
21
+ Object.defineProperty(exports, "ATTACHMENT_IMAGE_TYPES", { enumerable: true, get: function () { return attachment_type_1.ATTACHMENT_IMAGE_TYPES; } });
22
+ Object.defineProperty(exports, "MAX_ATTACHED_IMAGE_BYTES", { enumerable: true, get: function () { return attachment_type_1.MAX_ATTACHED_IMAGE_BYTES; } });
16
23
  var document_registry_1 = require("../documents/library/document-registry");
17
24
  Object.defineProperty(exports, "registerDocumentSource", { enumerable: true, get: function () { return document_registry_1.registerDocumentSource; } });
18
25
  Object.defineProperty(exports, "unregisterDocumentSource", { enumerable: true, get: function () { return document_registry_1.unregisterDocumentSource; } });
@@ -69,6 +76,13 @@ Object.defineProperty(exports, "listDataSources", { enumerable: true, get: funct
69
76
  Object.defineProperty(exports, "listDatasets", { enumerable: true, get: function () { return data_registry_1.listDatasets; } });
70
77
  var data_guide_builder_1 = require("../data/data-guide.builder");
71
78
  Object.defineProperty(exports, "buildDataGuideMarkdown", { enumerable: true, get: function () { return data_guide_builder_1.buildDataGuideMarkdown; } });
79
+ // For a dataset the host serves from rows it built itself — assembled from
80
+ // several tables, a code registry or another service, or small enough not to
81
+ // need a statement: the host's execute() builds the rows and returns
82
+ // queryRows(query, set, rows), getting the same filter, grouping, having and
83
+ // ordering semantics as every other host.
84
+ var row_executor_1 = require("../data/row-executor");
85
+ Object.defineProperty(exports, "queryRows", { enumerable: true, get: function () { return row_executor_1.queryRows; } });
72
86
  // Packs: a domain's prompt folders, documents, tools and templates, installed for
73
87
  // everyone and enabled per user.
74
88
  //
@@ -80,6 +80,8 @@ exports.queryDataTool = {
80
80
  QUERY_EXAMPLE +
81
81
  ' — listing example: ' +
82
82
  LIST_EXAMPLE +
83
+ ' To keep only some groups, add "having": conditions on the query\'s own metrics by ' +
84
+ 'their "as", e.g. "having": [{"field": "sum_incurred", "op": "gt", "value": 100000}].' +
83
85
  ' Only the datasets and fields in your data guide exist; if a question needs ' +
84
86
  'something that is not there, say so rather than substituting a field that looks close.',
85
87
  parameters: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "briyah",
3
- "version": "2.0.8",
3
+ "version": "2.0.10",
4
4
  "description": "SDK for AI agents, multi-agent rooms, interactive stories, and role-playing games with per-user data isolation and cost tracking",
5
5
  "private": false,
6
6
  "license": "Apache-2.0",