@adaptiqai/deepseek-harness 0.2.18 → 0.2.19

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.
@@ -0,0 +1,75 @@
1
+ /**
2
+ * A turn is told which collections its conversation reads, once and again
3
+ * when they change. Nothing else in a turn says a collection is in use, so an
4
+ * agent asked about an id in one searched the person's files instead.
5
+ *
6
+ * The note is a sourced user message the agent loop logs with the turn's
7
+ * first step, as the harness's own context producers add theirs: the model
8
+ * reads it in every later request, and the conversation view shows it as
9
+ * context, not as the person's words.
10
+ */
11
+ import type { Context } from '@deepseek-ai/cordis';
12
+ import { type ContextFormed, type UserMessage } from '@deepseek-ai/dsh-llm';
13
+ import { type TurnNotes, type Workspace } from '@adaptiqai/core';
14
+ /** Who produced the note, in the message's source. */
15
+ export declare const NOTE_KIND = "adaptiq-knowledge";
16
+ declare module '@deepseek-ai/dsh-llm' {
17
+ interface MessageSourceMap {
18
+ 'adaptiq-knowledge': {
19
+ kind: 'adaptiq-knowledge';
20
+ } & ContextFormed;
21
+ }
22
+ }
23
+ /** One logged event of a session, as far as the note reads it. */
24
+ interface LoggedEvent {
25
+ readonly type?: string;
26
+ readonly data?: {
27
+ readonly source?: {
28
+ readonly kind?: unknown;
29
+ };
30
+ readonly content?: readonly {
31
+ readonly type?: string;
32
+ readonly text?: unknown;
33
+ }[];
34
+ };
35
+ }
36
+ /** The agent proposing a step: its route and model, and its session's log. */
37
+ interface NoteAgent {
38
+ readonly options: {
39
+ readonly provider?: string;
40
+ readonly model?: string;
41
+ };
42
+ readonly session: {
43
+ readonly id: string;
44
+ readonly seq?: number;
45
+ eventAt?(seq: number): LoggedEvent | undefined;
46
+ };
47
+ }
48
+ interface PreStep {
49
+ readonly agent: NoteAgent;
50
+ readonly step: number;
51
+ readonly signal: AbortSignal;
52
+ }
53
+ /**
54
+ * The last note a session's log holds, so a conversation resumed after a
55
+ * restart is not told twice.
56
+ * @param agent - the agent whose session it is.
57
+ * @returns the note's text, or null.
58
+ */
59
+ export declare function loggedNote(agent: NoteAgent): string | null;
60
+ /**
61
+ * The note for a step: on the first step of a turn on AdaptiqAI, when there is news.
62
+ * @param notes - the turn notes.
63
+ * @param route - the AdaptiqAI route.
64
+ * @param payload - the proposed step.
65
+ * @returns the note's message, or null.
66
+ */
67
+ export declare function noteFor(notes: TurnNotes, route: string, payload: PreStep): Promise<UserMessage | null>;
68
+ /**
69
+ * Tell each turn on AdaptiqAI which collections its conversation reads.
70
+ * @param ctx - a context with the `agents` service.
71
+ * @param workspace - the workspace.
72
+ * @param route - the AdaptiqAI route.
73
+ */
74
+ export declare function registerKnowledgeNote(ctx: Context, workspace: Workspace, route: string): void;
75
+ export {};
@@ -103,6 +103,7 @@ export declare function userTexts(messages: readonly RequestMessage[]): string[]
103
103
  /**
104
104
  * What the person wrote in the request history, each message marked when it
105
105
  * answers the agent's offer to save knowledge (the agent asked right before).
106
+ * The offer is recognised in core, the same in every harness.
106
107
  * @param messages - the request history.
107
108
  * @returns the person's turns, oldest first.
108
109
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptiqai/deepseek-harness",
3
- "version": "0.2.18",
3
+ "version": "0.2.19",
4
4
  "description": "AdaptiqAI for DeepSeek Harness: models with 5M-token native memory and Knowledge. Sign up, get a model and work without leaving the harness",
5
5
  "keywords": [
6
6
  "dsh-plugin",
@@ -90,7 +90,7 @@
90
90
  "react-dom": "~18.3.1",
91
91
  "typescript": "~5.9.3",
92
92
  "vitest": "~3.2.7",
93
- "@adaptiqai/core": "0.2.14"
93
+ "@adaptiqai/core": "0.2.15"
94
94
  },
95
95
  "repository": {
96
96
  "type": "git",