@dxos/assistant 0.8.4-main.fd6878d → 0.8.4-staging.60fe92afc8

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 (183) hide show
  1. package/LICENSE +102 -5
  2. package/README.md +2 -1
  3. package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
  4. package/dist/lib/neutral/extraction/index.mjs +208 -0
  5. package/dist/lib/neutral/extraction/index.mjs.map +7 -0
  6. package/dist/lib/neutral/index.mjs +1886 -0
  7. package/dist/lib/neutral/index.mjs.map +7 -0
  8. package/dist/lib/neutral/meta.json +1 -0
  9. package/dist/types/src/extraction/extraction-ner-function/index.d.ts +0 -1
  10. package/dist/types/src/extraction/extraction-ner-function/index.d.ts.map +1 -1
  11. package/dist/types/src/extraction/extraction-ner-function/named-entity-recognition.d.ts.map +1 -1
  12. package/dist/types/src/extraction/extraction.d.ts +1650 -281
  13. package/dist/types/src/extraction/extraction.d.ts.map +1 -1
  14. package/dist/types/src/extraction/index.d.ts +0 -1
  15. package/dist/types/src/extraction/index.d.ts.map +1 -1
  16. package/dist/types/src/extraction/quotes.d.ts +3 -3
  17. package/dist/types/src/extraction/quotes.d.ts.map +1 -1
  18. package/dist/types/src/functions/services.d.ts +16 -5
  19. package/dist/types/src/functions/services.d.ts.map +1 -1
  20. package/dist/types/src/index.d.ts +2 -3
  21. package/dist/types/src/index.d.ts.map +1 -1
  22. package/dist/types/src/request/AiRequest.d.ts +308 -0
  23. package/dist/types/src/request/AiRequest.d.ts.map +1 -0
  24. package/dist/types/src/{session → request}/artifact-diff.d.ts +5 -5
  25. package/dist/types/src/request/artifact-diff.d.ts.map +1 -0
  26. package/dist/types/src/request/format.d.ts +15 -0
  27. package/dist/types/src/request/format.d.ts.map +1 -0
  28. package/dist/types/src/request/index.d.ts +4 -0
  29. package/dist/types/src/request/index.d.ts.map +1 -0
  30. package/dist/types/src/request/observer.d.ts +23 -0
  31. package/dist/types/src/request/observer.d.ts.map +1 -0
  32. package/dist/types/src/{session → request}/version-pin.d.ts +6 -6
  33. package/dist/types/src/request/version-pin.d.ts.map +1 -0
  34. package/dist/types/src/session/AiContext.d.ts +178 -0
  35. package/dist/types/src/session/AiContext.d.ts.map +1 -0
  36. package/dist/types/src/session/AiContext.test.d.ts +2 -0
  37. package/dist/types/src/session/AiContext.test.d.ts.map +1 -0
  38. package/dist/types/src/session/AiSession.d.ts +79 -0
  39. package/dist/types/src/session/AiSession.d.ts.map +1 -0
  40. package/dist/types/src/session/AiSession.test.d.ts +2 -0
  41. package/dist/types/src/session/AiSession.test.d.ts.map +1 -0
  42. package/dist/types/src/session/SessionLink.d.ts +17 -0
  43. package/dist/types/src/session/SessionLink.d.ts.map +1 -0
  44. package/dist/types/src/session/SessionLoader.d.ts +15 -0
  45. package/dist/types/src/session/SessionLoader.d.ts.map +1 -0
  46. package/dist/types/src/session/SessionLoader.test.d.ts +2 -0
  47. package/dist/types/src/session/SessionLoader.test.d.ts.map +1 -0
  48. package/dist/types/src/session/index.d.ts +5 -3
  49. package/dist/types/src/session/index.d.ts.map +1 -1
  50. package/dist/types/src/session/toolkit.d.ts +16 -0
  51. package/dist/types/src/session/toolkit.d.ts.map +1 -0
  52. package/dist/types/src/templates/system.d.ts +19 -14
  53. package/dist/types/src/templates/system.d.ts.map +1 -1
  54. package/dist/types/src/util/artifact.d.ts +18 -0
  55. package/dist/types/src/util/artifact.d.ts.map +1 -0
  56. package/dist/types/src/util/diff.d.ts +17 -0
  57. package/dist/types/src/util/diff.d.ts.map +1 -0
  58. package/dist/types/src/util/diff.test.d.ts +2 -0
  59. package/dist/types/src/util/diff.test.d.ts.map +1 -0
  60. package/dist/types/src/util/error-handling.d.ts +4 -0
  61. package/dist/types/src/util/error-handling.d.ts.map +1 -0
  62. package/dist/types/src/util/errors.d.ts +67 -0
  63. package/dist/types/src/util/errors.d.ts.map +1 -0
  64. package/dist/types/src/util/execution-graph.d.ts +85 -0
  65. package/dist/types/src/util/execution-graph.d.ts.map +1 -0
  66. package/dist/types/src/util/execution-graph.test.d.ts +2 -0
  67. package/dist/types/src/util/execution-graph.test.d.ts.map +1 -0
  68. package/dist/types/src/util/index.d.ts +7 -0
  69. package/dist/types/src/util/index.d.ts.map +1 -0
  70. package/dist/types/src/util/tracing.d.ts +296 -0
  71. package/dist/types/src/util/tracing.d.ts.map +1 -0
  72. package/dist/types/tsconfig.tsbuildinfo +1 -1
  73. package/package.json +37 -47
  74. package/src/extraction/extraction-ner-function/index.ts +0 -1
  75. package/src/extraction/extraction-ner-function/named-entity-recognition.test.ts +12 -6
  76. package/src/extraction/extraction-ner-function/named-entity-recognition.ts +2 -0
  77. package/src/extraction/extraction.ts +49 -19
  78. package/src/extraction/index.ts +0 -1
  79. package/src/extraction/quotes.test.ts +2 -2
  80. package/src/extraction/quotes.ts +7 -9
  81. package/src/functions/services.ts +180 -66
  82. package/src/index.ts +2 -3
  83. package/src/request/AiRequest.ts +387 -0
  84. package/src/{session → request}/artifact-diff.ts +10 -6
  85. package/src/{session → request}/format.ts +45 -37
  86. package/src/request/index.ts +8 -0
  87. package/src/request/observer.ts +62 -0
  88. package/src/{session → request}/version-pin.ts +8 -8
  89. package/src/session/AiContext.test.ts +49 -0
  90. package/src/session/AiContext.ts +420 -0
  91. package/src/session/AiSession.test.ts +111 -0
  92. package/src/session/AiSession.ts +328 -0
  93. package/src/session/SessionLink.ts +23 -0
  94. package/src/session/SessionLoader.test.ts +115 -0
  95. package/src/session/SessionLoader.ts +55 -0
  96. package/src/session/index.ts +6 -3
  97. package/src/session/toolkit.ts +47 -0
  98. package/src/templates/{format.tpl → instructions/format.tpl} +6 -4
  99. package/src/templates/instructions/system.tpl +96 -0
  100. package/src/templates/system.ts +26 -16
  101. package/src/util/artifact.ts +96 -0
  102. package/src/util/diff.test.ts +74 -0
  103. package/src/util/diff.ts +93 -0
  104. package/src/util/error-handling.ts +42 -0
  105. package/src/util/errors.ts +15 -0
  106. package/src/util/execution-graph.test.ts +740 -0
  107. package/src/util/execution-graph.ts +520 -0
  108. package/src/util/index.ts +10 -0
  109. package/src/util/tracing.ts +60 -0
  110. package/dist/lib/browser/chunk-6WRGDEMH.mjs +0 -89
  111. package/dist/lib/browser/chunk-6WRGDEMH.mjs.map +0 -7
  112. package/dist/lib/browser/chunk-NZGGCEF3.mjs +0 -341
  113. package/dist/lib/browser/chunk-NZGGCEF3.mjs.map +0 -7
  114. package/dist/lib/browser/extraction/index.mjs +0 -269
  115. package/dist/lib/browser/extraction/index.mjs.map +0 -7
  116. package/dist/lib/browser/index.mjs +0 -354
  117. package/dist/lib/browser/index.mjs.map +0 -7
  118. package/dist/lib/browser/meta.json +0 -1
  119. package/dist/lib/browser/named-entity-recognition-O46UTCLR.mjs +0 -13
  120. package/dist/lib/node-esm/chunk-3UU5V4FS.mjs +0 -91
  121. package/dist/lib/node-esm/chunk-3UU5V4FS.mjs.map +0 -7
  122. package/dist/lib/node-esm/chunk-XOOPGSGW.mjs +0 -343
  123. package/dist/lib/node-esm/chunk-XOOPGSGW.mjs.map +0 -7
  124. package/dist/lib/node-esm/extraction/index.mjs +0 -270
  125. package/dist/lib/node-esm/extraction/index.mjs.map +0 -7
  126. package/dist/lib/node-esm/index.mjs +0 -355
  127. package/dist/lib/node-esm/index.mjs.map +0 -7
  128. package/dist/lib/node-esm/meta.json +0 -1
  129. package/dist/lib/node-esm/named-entity-recognition-W4VMRCH6.mjs +0 -14
  130. package/dist/lib/node-esm/named-entity-recognition-W4VMRCH6.mjs.map +0 -7
  131. package/dist/types/src/conversation/context.d.ts +0 -90
  132. package/dist/types/src/conversation/context.d.ts.map +0 -1
  133. package/dist/types/src/conversation/conversation.d.ts +0 -50
  134. package/dist/types/src/conversation/conversation.d.ts.map +0 -1
  135. package/dist/types/src/conversation/index.d.ts +0 -3
  136. package/dist/types/src/conversation/index.d.ts.map +0 -1
  137. package/dist/types/src/errors.d.ts +0 -39
  138. package/dist/types/src/errors.d.ts.map +0 -1
  139. package/dist/types/src/extraction/extraction-llm-function/extraction-llm-function.d.ts +0 -4
  140. package/dist/types/src/extraction/extraction-llm-function/extraction-llm-function.d.ts.map +0 -1
  141. package/dist/types/src/extraction/extraction-llm-function/extraction-llm-function.test.d.ts +0 -2
  142. package/dist/types/src/extraction/extraction-llm-function/extraction-llm-function.test.d.ts.map +0 -1
  143. package/dist/types/src/extraction/extraction-llm-function/index.d.ts +0 -2
  144. package/dist/types/src/extraction/extraction-llm-function/index.d.ts.map +0 -1
  145. package/dist/types/src/extraction/extraction-ner-function/extraction-ner-function.d.ts +0 -306
  146. package/dist/types/src/extraction/extraction-ner-function/extraction-ner-function.d.ts.map +0 -1
  147. package/dist/types/src/extraction/extraction-ner-function/extraction-ner-function.test.d.ts +0 -2
  148. package/dist/types/src/extraction/extraction-ner-function/extraction-ner-function.test.d.ts.map +0 -1
  149. package/dist/types/src/session/artifact-diff.d.ts.map +0 -1
  150. package/dist/types/src/session/format.d.ts +0 -168
  151. package/dist/types/src/session/format.d.ts.map +0 -1
  152. package/dist/types/src/session/format.test.d.ts +0 -2
  153. package/dist/types/src/session/format.test.d.ts.map +0 -1
  154. package/dist/types/src/session/session.d.ts +0 -167
  155. package/dist/types/src/session/session.d.ts.map +0 -1
  156. package/dist/types/src/session/session.test.d.ts +0 -2
  157. package/dist/types/src/session/session.test.d.ts.map +0 -1
  158. package/dist/types/src/session/version-pin.d.ts.map +0 -1
  159. package/dist/types/src/session/version-pin.test.d.ts +0 -2
  160. package/dist/types/src/session/version-pin.test.d.ts.map +0 -1
  161. package/dist/types/src/summarization/summarization.test.d.ts +0 -2
  162. package/dist/types/src/summarization/summarization.test.d.ts.map +0 -1
  163. package/dist/types/src/types.d.ts +0 -16
  164. package/dist/types/src/types.d.ts.map +0 -1
  165. package/src/conversation/context.ts +0 -133
  166. package/src/conversation/conversation.ts +0 -125
  167. package/src/conversation/index.ts +0 -6
  168. package/src/errors.ts +0 -10
  169. package/src/extraction/extraction-llm-function/extraction-llm-function.test.ts +0 -84
  170. package/src/extraction/extraction-llm-function/extraction-llm-function.ts +0 -71
  171. package/src/extraction/extraction-llm-function/index.ts +0 -5
  172. package/src/extraction/extraction-ner-function/extraction-ner-function.test.ts +0 -116
  173. package/src/extraction/extraction-ner-function/extraction-ner-function.ts +0 -57
  174. package/src/session/__snapshots__/session.test.ts.snap +0 -32
  175. package/src/session/format.test.ts +0 -60
  176. package/src/session/session.test.ts +0 -305
  177. package/src/session/session.ts +0 -279
  178. package/src/session/version-pin.test.ts +0 -7
  179. package/src/summarization/summarization.test.ts +0 -197
  180. package/src/templates/system.tpl +0 -47
  181. package/src/types.ts +0 -52
  182. /package/dist/lib/{browser/named-entity-recognition-O46UTCLR.mjs.map → neutral/chunk-J5LGTIGS.mjs.map} +0 -0
  183. /package/src/extraction/extraction-llm-function/{instructions.tpl → transcription-instructions.tpl} +0 -0
@@ -1,50 +0,0 @@
1
- import { type AiError, type AiLanguageModel, type AiTool, type AiToolkit } from '@effect/ai';
2
- import { Effect } from 'effect';
3
- import { type AiInputPreprocessingError, type AiToolNotFoundError, type ToolExecutionService, type ToolResolverService } from '@dxos/ai';
4
- import { Event } from '@dxos/async';
5
- import { type Queue } from '@dxos/echo-db';
6
- import { DataType } from '@dxos/schema';
7
- import { type AiAssistantError } from '../errors';
8
- import { AiSession, type GenerationObserver } from '../session';
9
- import { AiContextBinder, type ContextBinding } from './context';
10
- export interface AiConversationRunParams<Tools extends AiTool.Any> {
11
- prompt: string;
12
- system?: string;
13
- toolkit?: AiToolkit.AiToolkit<Tools>;
14
- observer?: GenerationObserver;
15
- /**
16
- * @deprecated Remove
17
- */
18
- session?: AiSession;
19
- }
20
- export type AiConversationOptions = {
21
- queue: Queue<DataType.Message | ContextBinding>;
22
- };
23
- /**
24
- * Persistent conversation state.
25
- * Context + history + artifacts.
26
- * Backed by a Queue.
27
- */
28
- export declare class AiConversation {
29
- private readonly _queue;
30
- /**
31
- * Blueprints bound to the conversation.
32
- */
33
- readonly _context: AiContextBinder;
34
- /**
35
- * Fired when the execution loop begins.
36
- * This is called before the first message is sent.
37
- *
38
- * @deprecated Pass in a session instead.
39
- */
40
- readonly onBegin: Event<AiSession>;
41
- constructor(options: AiConversationOptions);
42
- get context(): AiContextBinder;
43
- getHistory(): Promise<DataType.Message[]>;
44
- /**
45
- * Executes a prompt.
46
- * Each invocation creates a new `AiSession`, which handles potential tool calls.
47
- */
48
- run: <Tools extends AiTool.Any>({ session, ...params }: AiConversationRunParams<Tools>) => Effect.Effect<DataType.Message[], AiAssistantError | AiInputPreprocessingError | AiError.AiError | AiToolNotFoundError, AiLanguageModel.AiLanguageModel | ToolResolverService | ToolExecutionService | AiTool.ToHandler<Tools>>;
49
- }
50
- //# sourceMappingURL=conversation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../../../src/conversation/conversation.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,MAAM,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAC7F,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EACL,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACzB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,eAAe,CAAC;AAG3C,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,KAAK,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhE,OAAO,EAAE,eAAe,EAAE,KAAK,cAAc,EAAE,MAAM,WAAW,CAAC;AAEjE,MAAM,WAAW,uBAAuB,CAAC,KAAK,SAAS,MAAM,CAAC,GAAG;IAC/D,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IACrC,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAE9B;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB;AAED,MAAM,MAAM,qBAAqB,GAAG;IAClC,KAAK,EAAE,KAAK,CAAC,QAAQ,CAAC,OAAO,GAAG,cAAc,CAAC,CAAC;CACjD,CAAC;AAEF;;;;GAIG;AACH,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA2C;IAElE;;OAEG;IACH,SAAgB,QAAQ,EAAE,eAAe,CAAC;IAE1C;;;;;OAKG;IAEH,SAAgB,OAAO,mBAA0B;gBAErC,OAAO,EAAE,qBAAqB;IAK1C,IAAI,OAAO,oBAEV;IAEK,UAAU,IAAI,OAAO,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;IAK/C;;;OAGG;IACH,GAAG,GAAI,KAAK,SAAS,MAAM,CAAC,GAAG,EAAE,wBAI9B,uBAAuB,CAAC,KAAK,CAAC,KAAG,MAAM,CAAC,MAAM,CAC/C,QAAQ,CAAC,OAAO,EAAE,EAClB,gBAAgB,GAAG,yBAAyB,GAAG,OAAO,CAAC,OAAO,GAAG,mBAAmB,EACpF,eAAe,CAAC,eAAe,GAAG,mBAAmB,GAAG,oBAAoB,GAAG,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CACvG,CAkCgD;CAClD"}
@@ -1,3 +0,0 @@
1
- export * from './context';
2
- export * from './conversation';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/conversation/index.ts"],"names":[],"mappings":"AAIA,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC"}
@@ -1,39 +0,0 @@
1
- import { BaseError } from '@dxos/errors';
2
- declare const AiAssistantError_base: {
3
- new (message: string, options?: import("@dxos/errors").BaseErrorOptions): {
4
- #code: "AI_ASSISTANT_ERROR";
5
- #context: Record<string, unknown>;
6
- readonly name: "AI_ASSISTANT_ERROR";
7
- readonly code: "AI_ASSISTANT_ERROR";
8
- readonly _tag: "AI_ASSISTANT_ERROR";
9
- readonly context: Record<string, unknown>;
10
- message: string;
11
- stack?: string;
12
- cause?: unknown;
13
- };
14
- code: "AI_ASSISTANT_ERROR";
15
- is(error: unknown): error is BaseError;
16
- wrap(message: string, options?: Omit<import("@dxos/errors").BaseErrorOptions, "cause">): (error: unknown) => {
17
- #code: "AI_ASSISTANT_ERROR";
18
- #context: Record<string, unknown>;
19
- readonly name: "AI_ASSISTANT_ERROR";
20
- readonly code: "AI_ASSISTANT_ERROR";
21
- readonly _tag: "AI_ASSISTANT_ERROR";
22
- readonly context: Record<string, unknown>;
23
- message: string;
24
- stack?: string;
25
- cause?: unknown;
26
- };
27
- extend<Code extends string>(code: Code): any;
28
- isError(error: unknown): error is Error;
29
- captureStackTrace(targetObject: object, constructorOpt?: Function): void;
30
- prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
31
- stackTraceLimit: number;
32
- };
33
- /**
34
- * Generic error for AI agent execution.
35
- */
36
- export declare class AiAssistantError extends AiAssistantError_base {
37
- }
38
- export {};
39
- //# sourceMappingURL=errors.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/errors.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEzC;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,qBAAsC;CAAG"}
@@ -1,4 +0,0 @@
1
- import { type FunctionDefinition } from '@dxos/functions';
2
- import { ExtractionInput, ExtractionOutput } from '../extraction';
3
- export declare const extractionAnthropicFn: FunctionDefinition<ExtractionInput, ExtractionOutput>;
4
- //# sourceMappingURL=extraction-llm-function.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"extraction-llm-function.d.ts","sourceRoot":"","sources":["../../../../../src/extraction/extraction-llm-function/extraction-llm-function.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,kBAAkB,EAAkB,MAAM,iBAAiB,CAAC;AAI1E,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAKlE,eAAO,MAAM,qBAAqB,EAAE,kBAAkB,CAAC,eAAe,EAAE,gBAAgB,CAmDtF,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=extraction-llm-function.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"extraction-llm-function.test.d.ts","sourceRoot":"","sources":["../../../../../src/extraction/extraction-llm-function/extraction-llm-function.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export * from './extraction-llm-function';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/extraction/extraction-llm-function/index.ts"],"names":[],"mappings":"AAIA,cAAc,2BAA2B,CAAC"}
@@ -1,306 +0,0 @@
1
- export declare const extractionNerFn: import("@dxos/functions").FunctionDefinition<{
2
- readonly objects?: readonly import("@dxos/echo-schema").Expando[] | undefined;
3
- readonly options?: {
4
- readonly timeout?: number | undefined;
5
- readonly fallbackToRaw?: boolean | undefined;
6
- } | undefined;
7
- readonly message: import("@dxos/echo/Type").OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
8
- id: string;
9
- parentMessage?: string | undefined;
10
- created: string;
11
- sender: {
12
- name?: string | undefined;
13
- contact?: import("@dxos/echo-schema").Ref<import("@dxos/echo/Type").OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
14
- fields?: {
15
- readonly value: string;
16
- readonly category?: string | undefined;
17
- readonly label: string;
18
- }[] | undefined;
19
- image?: string | undefined;
20
- fullName?: string | undefined;
21
- preferredName?: string | undefined;
22
- nickname?: string | undefined;
23
- organization?: import("@dxos/echo-schema").Ref<import("@dxos/echo/Type").OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
24
- id: string;
25
- name?: string | undefined;
26
- description?: string | undefined;
27
- status?: "prospect" | "qualified" | "active" | "commit" | "reject" | undefined;
28
- image?: string | undefined;
29
- website?: string | undefined;
30
- }> | undefined;
31
- jobTitle?: string | undefined;
32
- department?: string | undefined;
33
- notes?: string | undefined;
34
- emails?: {
35
- readonly value: string;
36
- readonly label?: string | undefined;
37
- }[] | undefined;
38
- identities?: {
39
- readonly value: string;
40
- readonly label?: string | undefined;
41
- }[] | undefined;
42
- phoneNumbers?: {
43
- readonly value: string;
44
- readonly label?: string | undefined;
45
- }[] | undefined;
46
- addresses?: {
47
- readonly value: {
48
- readonly street?: string | undefined;
49
- readonly extended?: string | undefined;
50
- readonly locality?: string | undefined;
51
- readonly region?: string | undefined;
52
- readonly postalCode?: string | undefined;
53
- readonly postOfficeBoxNumber?: string | undefined;
54
- readonly country?: string | undefined;
55
- };
56
- readonly label?: string | undefined;
57
- }[] | undefined;
58
- urls?: {
59
- readonly value: string;
60
- readonly label?: string | undefined;
61
- }[] | undefined;
62
- birthday?: string | undefined;
63
- }> | undefined;
64
- identityDid?: string | undefined;
65
- identityKey?: string | undefined;
66
- email?: string | undefined;
67
- role?: "user" | "assistant" | undefined;
68
- };
69
- blocks: ({
70
- version: unknown;
71
- _tag: "anchor";
72
- pending?: boolean | undefined;
73
- objectId: string;
74
- } | {
75
- name?: string | undefined;
76
- _tag: "file";
77
- pending?: boolean | undefined;
78
- url: string;
79
- mediaType?: string | undefined;
80
- } | {
81
- source?: {
82
- mediaType: string;
83
- type: "base64";
84
- data: string;
85
- } | {
86
- url: string;
87
- type: "http";
88
- } | undefined;
89
- id?: string | undefined;
90
- _tag: "image";
91
- pending?: boolean | undefined;
92
- } | {
93
- _tag: "json";
94
- pending?: boolean | undefined;
95
- data: string;
96
- disposition?: string | undefined;
97
- } | {
98
- text: string;
99
- _tag: "proposal";
100
- pending?: boolean | undefined;
101
- } | {
102
- _tag: "reasoning";
103
- pending?: boolean | undefined;
104
- reasoningText?: string | undefined;
105
- redactedText?: string | undefined;
106
- signature?: string | undefined;
107
- } | {
108
- reference: import("@dxos/echo-schema").Ref<import("@dxos/echo/Type").Expando>;
109
- _tag: "reference";
110
- pending?: boolean | undefined;
111
- } | {
112
- _tag: "select";
113
- pending?: boolean | undefined;
114
- options: readonly string[];
115
- } | {
116
- _tag: "status";
117
- pending?: boolean | undefined;
118
- statusText: string;
119
- } | {
120
- text: string;
121
- _tag: "suggest";
122
- pending?: boolean | undefined;
123
- } | {
124
- text: string;
125
- _tag: "text";
126
- pending?: boolean | undefined;
127
- disposition?: string | undefined;
128
- mimeType?: string | undefined;
129
- } | {
130
- _tag: "toolkit";
131
- pending?: boolean | undefined;
132
- } | {
133
- name: string;
134
- _tag: "toolCall";
135
- pending?: boolean | undefined;
136
- toolCallId: string;
137
- input: unknown;
138
- } | {
139
- name: string;
140
- _tag: "toolResult";
141
- pending?: boolean | undefined;
142
- toolCallId: string;
143
- result: unknown;
144
- error?: string | undefined;
145
- } | {
146
- text: string;
147
- _tag: "transcript";
148
- pending?: boolean | undefined;
149
- started: string;
150
- })[];
151
- properties?: {
152
- [x: string]: any;
153
- } | undefined;
154
- };
155
- }, {
156
- readonly message: import("@dxos/echo/Type").OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
157
- id: string;
158
- parentMessage?: string | undefined;
159
- created: string;
160
- sender: {
161
- name?: string | undefined;
162
- contact?: import("@dxos/echo-schema").Ref<import("@dxos/echo/Type").OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
163
- fields?: {
164
- readonly value: string;
165
- readonly category?: string | undefined;
166
- readonly label: string;
167
- }[] | undefined;
168
- image?: string | undefined;
169
- fullName?: string | undefined;
170
- preferredName?: string | undefined;
171
- nickname?: string | undefined;
172
- organization?: import("@dxos/echo-schema").Ref<import("@dxos/echo/Type").OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
173
- id: string;
174
- name?: string | undefined;
175
- description?: string | undefined;
176
- status?: "prospect" | "qualified" | "active" | "commit" | "reject" | undefined;
177
- image?: string | undefined;
178
- website?: string | undefined;
179
- }> | undefined;
180
- jobTitle?: string | undefined;
181
- department?: string | undefined;
182
- notes?: string | undefined;
183
- emails?: {
184
- readonly value: string;
185
- readonly label?: string | undefined;
186
- }[] | undefined;
187
- identities?: {
188
- readonly value: string;
189
- readonly label?: string | undefined;
190
- }[] | undefined;
191
- phoneNumbers?: {
192
- readonly value: string;
193
- readonly label?: string | undefined;
194
- }[] | undefined;
195
- addresses?: {
196
- readonly value: {
197
- readonly street?: string | undefined;
198
- readonly extended?: string | undefined;
199
- readonly locality?: string | undefined;
200
- readonly region?: string | undefined;
201
- readonly postalCode?: string | undefined;
202
- readonly postOfficeBoxNumber?: string | undefined;
203
- readonly country?: string | undefined;
204
- };
205
- readonly label?: string | undefined;
206
- }[] | undefined;
207
- urls?: {
208
- readonly value: string;
209
- readonly label?: string | undefined;
210
- }[] | undefined;
211
- birthday?: string | undefined;
212
- }> | undefined;
213
- identityDid?: string | undefined;
214
- identityKey?: string | undefined;
215
- email?: string | undefined;
216
- role?: "user" | "assistant" | undefined;
217
- };
218
- blocks: ({
219
- version: unknown;
220
- _tag: "anchor";
221
- pending?: boolean | undefined;
222
- objectId: string;
223
- } | {
224
- name?: string | undefined;
225
- _tag: "file";
226
- pending?: boolean | undefined;
227
- url: string;
228
- mediaType?: string | undefined;
229
- } | {
230
- source?: {
231
- mediaType: string;
232
- type: "base64";
233
- data: string;
234
- } | {
235
- url: string;
236
- type: "http";
237
- } | undefined;
238
- id?: string | undefined;
239
- _tag: "image";
240
- pending?: boolean | undefined;
241
- } | {
242
- _tag: "json";
243
- pending?: boolean | undefined;
244
- data: string;
245
- disposition?: string | undefined;
246
- } | {
247
- text: string;
248
- _tag: "proposal";
249
- pending?: boolean | undefined;
250
- } | {
251
- _tag: "reasoning";
252
- pending?: boolean | undefined;
253
- reasoningText?: string | undefined;
254
- redactedText?: string | undefined;
255
- signature?: string | undefined;
256
- } | {
257
- reference: import("@dxos/echo-schema").Ref<import("@dxos/echo/Type").Expando>;
258
- _tag: "reference";
259
- pending?: boolean | undefined;
260
- } | {
261
- _tag: "select";
262
- pending?: boolean | undefined;
263
- options: readonly string[];
264
- } | {
265
- _tag: "status";
266
- pending?: boolean | undefined;
267
- statusText: string;
268
- } | {
269
- text: string;
270
- _tag: "suggest";
271
- pending?: boolean | undefined;
272
- } | {
273
- text: string;
274
- _tag: "text";
275
- pending?: boolean | undefined;
276
- disposition?: string | undefined;
277
- mimeType?: string | undefined;
278
- } | {
279
- _tag: "toolkit";
280
- pending?: boolean | undefined;
281
- } | {
282
- name: string;
283
- _tag: "toolCall";
284
- pending?: boolean | undefined;
285
- toolCallId: string;
286
- input: unknown;
287
- } | {
288
- name: string;
289
- _tag: "toolResult";
290
- pending?: boolean | undefined;
291
- toolCallId: string;
292
- result: unknown;
293
- error?: string | undefined;
294
- } | {
295
- text: string;
296
- _tag: "transcript";
297
- pending?: boolean | undefined;
298
- started: string;
299
- })[];
300
- properties?: {
301
- [x: string]: any;
302
- } | undefined;
303
- };
304
- readonly timeElapsed: number;
305
- }>;
306
- //# sourceMappingURL=extraction-ner-function.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"extraction-ner-function.d.ts","sourceRoot":"","sources":["../../../../../src/extraction/extraction-ner-function/extraction-ner-function.ts"],"names":[],"mappings":"AAkBA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsC1B,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=extraction-ner-function.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"extraction-ner-function.test.d.ts","sourceRoot":"","sources":["../../../../../src/extraction/extraction-ner-function/extraction-ner-function.test.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"artifact-diff.d.ts","sourceRoot":"","sources":["../../../../src/session/artifact-diff.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEjC,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;;AAElD;;;;;;;GAOG;AAGH,qBAAa,oBAAqB,SAAQ,yBAGvC;CAAG;AAEN,yBAAiB,oBAAoB,CAAC;IACpC,KAAY,OAAO,GAAG;QACpB,OAAO,EAAE,CAAC,SAAS,EAAE;YAAE,EAAE,EAAE,QAAQ,CAAC;YAAC,WAAW,EAAE,aAAa,CAAA;SAAE,EAAE,KAAK,OAAO,CAC7E,GAAG,CACD,QAAQ,EACR;YACE,OAAO,EAAE,aAAa,CAAC;YACvB,IAAI,CAAC,EAAE,MAAM,CAAC;SACf,CACF,CACF,CAAC;KACH,CAAC;CACH"}
@@ -1,168 +0,0 @@
1
- import { Effect } from 'effect';
2
- import { type SessionRunParams } from './session';
3
- /**
4
- * Formats the system prompt.
5
- */
6
- export declare const formatSystemPrompt: ({ system, blueprints, objects, }: Pick<SessionRunParams<any>, "system" | "blueprints" | "objects">) => Effect.Effect<string, never, never>;
7
- /**
8
- * Formats the user prompt.
9
- */
10
- export declare const formatUserPrompt: ({ prompt, history }: Pick<SessionRunParams<any>, "prompt" | "history">) => Effect.Effect<import("@dxos/live-object").Live<import("@dxos/echo/Type").OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
11
- id: string;
12
- parentMessage?: string | undefined;
13
- created: string;
14
- sender: {
15
- name?: string | undefined;
16
- contact?: import("@dxos/echo-schema").Ref<import("@dxos/echo/Type").OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
17
- fields?: {
18
- readonly value: string;
19
- readonly category?: string | undefined;
20
- readonly label: string;
21
- }[] | undefined;
22
- image?: string | undefined;
23
- fullName?: string | undefined;
24
- preferredName?: string | undefined;
25
- nickname?: string | undefined;
26
- organization?: import("@dxos/echo-schema").Ref<import("@dxos/echo/Type").OfKind<import("@dxos/echo-schema").EntityKind.Object> & {
27
- id: string;
28
- name?: string | undefined;
29
- description?: string | undefined;
30
- status?: "prospect" | "qualified" | "active" | "commit" | "reject" | undefined;
31
- image?: string | undefined;
32
- website?: string | undefined;
33
- }> | undefined;
34
- jobTitle?: string | undefined;
35
- department?: string | undefined;
36
- notes?: string | undefined;
37
- emails?: {
38
- readonly value: string;
39
- readonly label?: string | undefined;
40
- }[] | undefined;
41
- identities?: {
42
- readonly value: string;
43
- readonly label?: string | undefined;
44
- }[] | undefined;
45
- phoneNumbers?: {
46
- readonly value: string;
47
- readonly label?: string | undefined;
48
- }[] | undefined;
49
- addresses?: {
50
- readonly value: {
51
- readonly street?: string | undefined;
52
- readonly extended?: string | undefined;
53
- readonly locality?: string | undefined;
54
- readonly region?: string | undefined;
55
- readonly postalCode?: string | undefined;
56
- readonly postOfficeBoxNumber?: string | undefined;
57
- readonly country?: string | undefined;
58
- };
59
- readonly label?: string | undefined;
60
- }[] | undefined;
61
- urls?: {
62
- readonly value: string;
63
- readonly label?: string | undefined;
64
- }[] | undefined;
65
- birthday?: string | undefined;
66
- }> | undefined;
67
- identityDid?: string | undefined;
68
- identityKey?: string | undefined;
69
- email?: string | undefined;
70
- role?: "user" | "assistant" | undefined;
71
- };
72
- blocks: ({
73
- version: unknown;
74
- _tag: "anchor";
75
- pending?: boolean | undefined;
76
- objectId: string;
77
- } | {
78
- name?: string | undefined;
79
- _tag: "file";
80
- pending?: boolean | undefined;
81
- url: string;
82
- mediaType?: string | undefined;
83
- } | {
84
- source?: {
85
- mediaType: string;
86
- type: "base64";
87
- data: string;
88
- } | {
89
- url: string;
90
- type: "http";
91
- } | undefined;
92
- id?: string | undefined;
93
- _tag: "image";
94
- pending?: boolean | undefined;
95
- } | {
96
- _tag: "json";
97
- pending?: boolean | undefined;
98
- data: string;
99
- disposition?: string | undefined;
100
- } | {
101
- text: string;
102
- _tag: "proposal";
103
- pending?: boolean | undefined;
104
- } | {
105
- _tag: "reasoning";
106
- pending?: boolean | undefined;
107
- reasoningText?: string | undefined;
108
- redactedText?: string | undefined;
109
- signature?: string | undefined;
110
- } | {
111
- reference: import("@dxos/echo-schema").Ref<import("@dxos/echo/Type").Expando>;
112
- _tag: "reference";
113
- pending?: boolean | undefined;
114
- } | {
115
- _tag: "select";
116
- pending?: boolean | undefined;
117
- options: readonly string[];
118
- } | {
119
- _tag: "status";
120
- pending?: boolean | undefined;
121
- statusText: string;
122
- } | {
123
- text: string;
124
- _tag: "suggest";
125
- pending?: boolean | undefined;
126
- } | {
127
- text: string;
128
- _tag: "text";
129
- pending?: boolean | undefined;
130
- disposition?: string | undefined;
131
- mimeType?: string | undefined;
132
- } | {
133
- _tag: "toolkit";
134
- pending?: boolean | undefined;
135
- } | {
136
- name: string;
137
- _tag: "toolCall";
138
- pending?: boolean | undefined;
139
- toolCallId: string;
140
- input: unknown;
141
- } | {
142
- name: string;
143
- _tag: "toolResult";
144
- pending?: boolean | undefined;
145
- toolCallId: string;
146
- result: unknown;
147
- error?: string | undefined;
148
- } | {
149
- text: string;
150
- _tag: "transcript";
151
- pending?: boolean | undefined;
152
- started: string;
153
- })[];
154
- properties?: {
155
- [x: string]: any;
156
- } | undefined;
157
- }>, {
158
- #code: "AI_ASSISTANT_ERROR";
159
- #context: Record<string, unknown>;
160
- readonly name: "AI_ASSISTANT_ERROR";
161
- readonly code: "AI_ASSISTANT_ERROR";
162
- readonly _tag: "AI_ASSISTANT_ERROR";
163
- readonly context: Record<string, unknown>;
164
- message: string;
165
- stack?: string;
166
- cause?: unknown;
167
- }, never>;
168
- //# sourceMappingURL=format.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../../src/session/format.ts"],"names":[],"mappings":"AAIA,OAAO,EAAS,MAAM,EAAgB,MAAM,QAAQ,CAAC;AAcrD,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAElD;;GAEG;AAEH,eAAO,MAAM,kBAAkB,GAAI,kCAIhC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,EAAE,QAAQ,GAAG,YAAY,GAAG,SAAS,CAAC,wCAsC/D,CAAC;AAEL;;GAEG;AAGH,eAAO,MAAM,gBAAgB,GAAI,qBAA0B,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAoCxG,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=format.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"format.test.d.ts","sourceRoot":"","sources":["../../../../src/session/format.test.ts"],"names":[],"mappings":""}