@fathippo/fathippo-context-engine 0.1.2 → 0.1.4
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/README.md +48 -49
- package/dist/api/client.d.ts +1 -74
- package/dist/api/client.d.ts.map +1 -1
- package/dist/api/client.js +1 -175
- package/dist/api/client.js.map +1 -1
- package/dist/engine.d.ts +9 -24
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +237 -409
- package/dist/engine.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +6 -0
- package/dist/types.d.ts.map +1 -1
- package/openclaw.plugin.json +21 -4
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -1,17 +1,37 @@
|
|
|
1
1
|
# @fathippo/fathippo-context-engine
|
|
2
2
|
|
|
3
|
-
FatHippo Context Engine for OpenClaw
|
|
3
|
+
FatHippo Context Engine for OpenClaw.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
Hosted:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npx @fathippo/connect openclaw
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Local:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npx @fathippo/connect openclaw --local
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
The one-command installer installs the plugin, configures OpenClaw, and uses a browser-link login flow for hosted mode.
|
|
20
|
+
|
|
21
|
+
## Manual fallback
|
|
6
22
|
|
|
7
23
|
```bash
|
|
8
24
|
openclaw plugins install @fathippo/fathippo-context-engine
|
|
25
|
+
openclaw config set plugins.slots.contextEngine fathippo-context-engine
|
|
26
|
+
openclaw config set plugins.entries.fathippo-context-engine.config.mode hosted
|
|
27
|
+
openclaw config set plugins.entries.fathippo-context-engine.config.apiKey mem_xxx
|
|
28
|
+
openclaw config set plugins.entries.fathippo-context-engine.config.baseUrl https://fathippo.ai/api
|
|
29
|
+
openclaw gateway restart
|
|
9
30
|
```
|
|
10
31
|
|
|
11
32
|
## Configuration
|
|
12
33
|
|
|
13
34
|
```yaml
|
|
14
|
-
# ~/.openclaw/config.yaml
|
|
15
35
|
plugins:
|
|
16
36
|
slots:
|
|
17
37
|
contextEngine: "fathippo-context-engine"
|
|
@@ -19,58 +39,37 @@ plugins:
|
|
|
19
39
|
fathippo-context-engine:
|
|
20
40
|
enabled: true
|
|
21
41
|
config:
|
|
22
|
-
mode: hosted
|
|
23
|
-
apiKey: "${FATHIPPO_API_KEY}"
|
|
42
|
+
mode: hosted
|
|
43
|
+
apiKey: "${FATHIPPO_API_KEY}"
|
|
24
44
|
baseUrl: "https://fathippo.ai/api"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
dreamCycleOnCompact: true
|
|
45
|
+
namespace: "my-project"
|
|
46
|
+
installationId: "oc_machine_01"
|
|
47
|
+
injectCritical: true
|
|
48
|
+
injectLimit: 20
|
|
49
|
+
dreamCycleOnCompact: true
|
|
30
50
|
```
|
|
31
51
|
|
|
32
|
-
|
|
52
|
+
`captureUserOnly: true` is still supported as a legacy escape hatch, but full-turn capture is now the default.
|
|
33
53
|
|
|
34
|
-
|
|
54
|
+
## Runtime behavior
|
|
35
55
|
|
|
36
|
-
| Hook |
|
|
37
|
-
|
|
38
|
-
|
|
|
39
|
-
|
|
|
40
|
-
|
|
|
41
|
-
|
|
|
42
|
-
|
|
|
43
|
-
|
|
|
44
|
-
| **onSubagentEnded** | Absorbs learnings from completed subagents |
|
|
56
|
+
| Hook | Behavior |
|
|
57
|
+
| --- | --- |
|
|
58
|
+
| `bootstrap` | Starts a hosted FatHippo session or initializes local workspace memory |
|
|
59
|
+
| `assemble` | Builds memory context before every non-trivial reply |
|
|
60
|
+
| `afterTurn` | Records the completed exchange, stores durable memories, and captures learning signals |
|
|
61
|
+
| `compact` | Runs Dream Cycle in hosted mode when enabled |
|
|
62
|
+
| `prepareSubagentSpawn` | Reuses the same memory scope for spawned agents |
|
|
63
|
+
| `onSubagentEnded` | Best-effort closes hosted child sessions |
|
|
45
64
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
- **Hosted mode** — Full FatHippo retrieval, cognition, sync, and receipts
|
|
49
|
-
- **Local mode** — Private on-device memory plus lightweight local workflow/fix learning
|
|
50
|
-
- **Semantic search** — Hosted hybrid search or local memory ranking
|
|
51
|
-
- **Dream Cycle** — Automatic synthesis, decay, and cleanup in hosted mode
|
|
52
|
-
- **Cross-device** — Hosted mode follows your account across devices
|
|
53
|
-
|
|
54
|
-
## API Key
|
|
65
|
+
Hosted mode uses the runtime session APIs (`startSession`, `buildContext`, `recordTurn`, `endSession`) instead of direct one-off memory calls.
|
|
55
66
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
## OpenClaw CLI Setup
|
|
59
|
-
|
|
60
|
-
```bash
|
|
61
|
-
openclaw plugins install @fathippo/fathippo-context-engine
|
|
62
|
-
openclaw config set plugins.slots.contextEngine=fathippo-context-engine
|
|
63
|
-
openclaw config set plugins.entries.fathippo-context-engine.config.mode=hosted
|
|
64
|
-
openclaw config set plugins.entries.fathippo-context-engine.config.apiKey=mem_xxx
|
|
65
|
-
openclaw config set plugins.entries.fathippo-context-engine.config.baseUrl=https://fathippo.ai/api
|
|
66
|
-
openclaw config set plugins.entries.fathippo-context-engine.config.injectCritical=true
|
|
67
|
-
openclaw gateway restart
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
If you previously installed `@fathippo/context-engine`, reinstall from `@fathippo/fathippo-context-engine` so OpenClaw discovers a matching package name and plugin id.
|
|
67
|
+
## Features
|
|
71
68
|
|
|
72
|
-
|
|
69
|
+
- Hosted mode with account-backed retrieval, cognition, and dashboard receipts
|
|
70
|
+
- Local mode with on-device memory and lightweight local workflow learning
|
|
71
|
+
- Per-turn context recall before replies
|
|
72
|
+
- Full-turn capture after replies
|
|
73
|
+
- Dream Cycle compaction in hosted mode
|
|
73
74
|
|
|
74
|
-
-
|
|
75
|
-
- [OpenClaw Plugins](https://docs.openclaw.ai/tools/plugin)
|
|
76
|
-
- [GitHub](https://github.com/jscianna/fathippo)
|
|
75
|
+
If you previously installed `@fathippo/context-engine`, reinstall from `@fathippo/fathippo-context-engine` so OpenClaw discovers the matching package name and plugin id cleanly.
|
package/dist/api/client.d.ts
CHANGED
|
@@ -1,75 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
* FatHippo API Client
|
|
3
|
-
*/
|
|
4
|
-
import type { FatHippoConfig, Memory, SearchResult, CriticalMemoriesResponse, RememberParams, SearchParams, DreamCycleParams, IndexedMemory, IndexedMemoriesResponse } from "../types.js";
|
|
5
|
-
export declare class FatHippoClient {
|
|
6
|
-
private apiKey;
|
|
7
|
-
private baseUrl;
|
|
8
|
-
private pluginHeaders;
|
|
9
|
-
constructor(config: FatHippoConfig);
|
|
10
|
-
private request;
|
|
11
|
-
/**
|
|
12
|
-
* Store a memory
|
|
13
|
-
*/
|
|
14
|
-
remember(params: RememberParams): Promise<Memory>;
|
|
15
|
-
/**
|
|
16
|
-
* Search memories
|
|
17
|
-
*/
|
|
18
|
-
search(params: SearchParams): Promise<SearchResult[]>;
|
|
19
|
-
/**
|
|
20
|
-
* Get critical-tier memories (for injection)
|
|
21
|
-
*/
|
|
22
|
-
getCriticalMemories(options?: {
|
|
23
|
-
limit?: number;
|
|
24
|
-
excludeAbsorbed?: boolean;
|
|
25
|
-
}): Promise<CriticalMemoriesResponse>;
|
|
26
|
-
/**
|
|
27
|
-
* Get recent memories (for context)
|
|
28
|
-
*/
|
|
29
|
-
getRecentMemories(options?: {
|
|
30
|
-
hours?: number;
|
|
31
|
-
limit?: number;
|
|
32
|
-
}): Promise<Memory[]>;
|
|
33
|
-
/**
|
|
34
|
-
* Run Dream Cycle (synthesis, decay, cleanup)
|
|
35
|
-
*/
|
|
36
|
-
runDreamCycle(params?: DreamCycleParams): Promise<{
|
|
37
|
-
ok: boolean;
|
|
38
|
-
synthesized?: number;
|
|
39
|
-
decayed?: number;
|
|
40
|
-
}>;
|
|
41
|
-
/**
|
|
42
|
-
* Get context for injection (optimized endpoint)
|
|
43
|
-
*/
|
|
44
|
-
getContext(query?: string): Promise<{
|
|
45
|
-
memories: Memory[];
|
|
46
|
-
syntheses?: Array<{
|
|
47
|
-
id: string;
|
|
48
|
-
title: string;
|
|
49
|
-
content: string;
|
|
50
|
-
}>;
|
|
51
|
-
tokenEstimate?: number;
|
|
52
|
-
}>;
|
|
53
|
-
/**
|
|
54
|
-
* Get indexed memory summaries (compact, for agent context)
|
|
55
|
-
*/
|
|
56
|
-
getIndexedSummaries(): Promise<IndexedMemoriesResponse>;
|
|
57
|
-
/**
|
|
58
|
-
* Dereference an indexed memory to get full content
|
|
59
|
-
*/
|
|
60
|
-
dereferenceIndex(indexKey: string): Promise<IndexedMemory>;
|
|
61
|
-
/**
|
|
62
|
-
* Store an indexed memory
|
|
63
|
-
*/
|
|
64
|
-
storeIndexed(params: {
|
|
65
|
-
index: string;
|
|
66
|
-
summary: string;
|
|
67
|
-
content: string;
|
|
68
|
-
contentType?: string;
|
|
69
|
-
metadata?: Record<string, unknown>;
|
|
70
|
-
}): Promise<{
|
|
71
|
-
stored: boolean;
|
|
72
|
-
index: string;
|
|
73
|
-
}>;
|
|
74
|
-
}
|
|
1
|
+
export { FatHippoClient, type CriticalMemoriesResponse, type DreamCycleParams, type FatHippoClientOptions, type IndexedMemoriesResponse, type IndexedMemory, type Memory, type RememberParams, type SearchParams, type SearchResult, type SynthesizedMemory, } from "@fathippo/hosted";
|
|
75
2
|
//# sourceMappingURL=client.d.ts.map
|
package/dist/api/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/api/client.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/api/client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,KAAK,wBAAwB,EAC7B,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,aAAa,EAClB,KAAK,MAAM,EACX,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,iBAAiB,GACvB,MAAM,kBAAkB,CAAC"}
|
package/dist/api/client.js
CHANGED
|
@@ -1,176 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
* FatHippo API Client
|
|
3
|
-
*/
|
|
4
|
-
const DEFAULT_BASE_URL = "https://fathippo.ai/api";
|
|
5
|
-
function mapMemoryRecord(record) {
|
|
6
|
-
return {
|
|
7
|
-
id: record.id,
|
|
8
|
-
title: record.title,
|
|
9
|
-
content: record.text,
|
|
10
|
-
userId: record.userId ?? "",
|
|
11
|
-
memoryType: record.memoryType ?? record.type,
|
|
12
|
-
importanceTier: record.importanceTier ??
|
|
13
|
-
record.tier ??
|
|
14
|
-
"normal",
|
|
15
|
-
createdAt: record.createdAt,
|
|
16
|
-
updatedAt: record.createdAt,
|
|
17
|
-
accessCount: record.accessCount,
|
|
18
|
-
absorbed: record.absorbed,
|
|
19
|
-
absorbedIntoSynthesisId: record.absorbedIntoSynthesisId,
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
export class FatHippoClient {
|
|
23
|
-
apiKey;
|
|
24
|
-
baseUrl;
|
|
25
|
-
pluginHeaders;
|
|
26
|
-
constructor(config) {
|
|
27
|
-
this.apiKey = config.apiKey ?? "";
|
|
28
|
-
this.baseUrl = config.baseUrl || DEFAULT_BASE_URL;
|
|
29
|
-
this.pluginHeaders = {
|
|
30
|
-
"X-Fathippo-Plugin-Id": config.pluginId ?? "fathippo-context-engine",
|
|
31
|
-
"X-Fathippo-Plugin-Version": config.pluginVersion ?? "unknown",
|
|
32
|
-
"X-Fathippo-Plugin-Mode": config.mode === "local" ? "local" : "hosted",
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
async request(path, options = {}) {
|
|
36
|
-
const url = `${this.baseUrl}${path}`;
|
|
37
|
-
const headers = {
|
|
38
|
-
Authorization: `Bearer ${this.apiKey}`,
|
|
39
|
-
"Content-Type": "application/json",
|
|
40
|
-
...this.pluginHeaders,
|
|
41
|
-
...options.headers,
|
|
42
|
-
};
|
|
43
|
-
const response = await fetch(url, {
|
|
44
|
-
...options,
|
|
45
|
-
headers,
|
|
46
|
-
});
|
|
47
|
-
if (!response.ok) {
|
|
48
|
-
const error = await response.text().catch(() => "Unknown error");
|
|
49
|
-
throw new Error(`FatHippo API error: ${response.status} - ${error}`);
|
|
50
|
-
}
|
|
51
|
-
return response.json();
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Store a memory
|
|
55
|
-
*/
|
|
56
|
-
async remember(params) {
|
|
57
|
-
const response = await this.request("/v1/memories", {
|
|
58
|
-
method: "POST",
|
|
59
|
-
body: JSON.stringify(params),
|
|
60
|
-
});
|
|
61
|
-
return mapMemoryRecord(response.memory);
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Search memories
|
|
65
|
-
*/
|
|
66
|
-
async search(params) {
|
|
67
|
-
const response = await this.request("/v1/search", {
|
|
68
|
-
method: "POST",
|
|
69
|
-
body: JSON.stringify(params),
|
|
70
|
-
});
|
|
71
|
-
return response.map((result) => ({
|
|
72
|
-
memory: mapMemoryRecord(result.memory),
|
|
73
|
-
score: result.score,
|
|
74
|
-
matchType: result.vectorScore && result.bm25Score
|
|
75
|
-
? "hybrid"
|
|
76
|
-
: result.vectorScore
|
|
77
|
-
? "vector"
|
|
78
|
-
: "bm25",
|
|
79
|
-
}));
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Get critical-tier memories (for injection)
|
|
83
|
-
*/
|
|
84
|
-
async getCriticalMemories(options) {
|
|
85
|
-
const response = await this.request("/v1/context", {
|
|
86
|
-
method: "POST",
|
|
87
|
-
body: JSON.stringify({
|
|
88
|
-
message: "",
|
|
89
|
-
includeHigh: false,
|
|
90
|
-
highLimit: 0,
|
|
91
|
-
}),
|
|
92
|
-
});
|
|
93
|
-
const memories = response.critical
|
|
94
|
-
.map(mapMemoryRecord)
|
|
95
|
-
.filter((memory) => (options?.excludeAbsorbed ? !memory.absorbed : true))
|
|
96
|
-
.slice(0, options?.limit ?? 30);
|
|
97
|
-
const syntheses = response.working.slice(0, options?.limit ?? 30).map((item) => ({
|
|
98
|
-
id: item.id,
|
|
99
|
-
userId: "",
|
|
100
|
-
title: item.title,
|
|
101
|
-
content: item.text,
|
|
102
|
-
sourceMemoryIds: item.synthesizedFrom ?? [],
|
|
103
|
-
createdAt: new Date().toISOString(),
|
|
104
|
-
}));
|
|
105
|
-
return { memories, syntheses };
|
|
106
|
-
}
|
|
107
|
-
/**
|
|
108
|
-
* Get recent memories (for context)
|
|
109
|
-
*/
|
|
110
|
-
async getRecentMemories(options) {
|
|
111
|
-
const params = new URLSearchParams();
|
|
112
|
-
if (options?.limit)
|
|
113
|
-
params.set("limit", String(options.limit));
|
|
114
|
-
const response = await this.request(`/v1/memories?${params}`);
|
|
115
|
-
let memories = response.memories.map(mapMemoryRecord);
|
|
116
|
-
if (options?.hours) {
|
|
117
|
-
const cutoff = Date.now() - options.hours * 60 * 60 * 1000;
|
|
118
|
-
memories = memories.filter((memory) => Date.parse(memory.createdAt) >= cutoff);
|
|
119
|
-
}
|
|
120
|
-
return memories;
|
|
121
|
-
}
|
|
122
|
-
/**
|
|
123
|
-
* Run Dream Cycle (synthesis, decay, cleanup)
|
|
124
|
-
*/
|
|
125
|
-
async runDreamCycle(params) {
|
|
126
|
-
const response = await this.request("/v1/lifecycle", {
|
|
127
|
-
method: "POST",
|
|
128
|
-
body: JSON.stringify(params || {}),
|
|
129
|
-
});
|
|
130
|
-
return {
|
|
131
|
-
ok: true,
|
|
132
|
-
synthesized: 0,
|
|
133
|
-
decayed: (response.maintenance?.archived ?? 0) + (response.maintenance?.deleted ?? 0),
|
|
134
|
-
};
|
|
135
|
-
}
|
|
136
|
-
/**
|
|
137
|
-
* Get context for injection (optimized endpoint)
|
|
138
|
-
*/
|
|
139
|
-
async getContext(query) {
|
|
140
|
-
const response = await this.request("/v1/context", {
|
|
141
|
-
method: "POST",
|
|
142
|
-
body: JSON.stringify({ message: query || "" }),
|
|
143
|
-
});
|
|
144
|
-
return {
|
|
145
|
-
memories: [...response.critical, ...response.high].map(mapMemoryRecord),
|
|
146
|
-
syntheses: response.working?.map((item) => ({
|
|
147
|
-
id: item.id,
|
|
148
|
-
title: item.title,
|
|
149
|
-
content: item.text,
|
|
150
|
-
})),
|
|
151
|
-
tokenEstimate: response.stats?.totalTokensEstimate,
|
|
152
|
-
};
|
|
153
|
-
}
|
|
154
|
-
/**
|
|
155
|
-
* Get indexed memory summaries (compact, for agent context)
|
|
156
|
-
*/
|
|
157
|
-
async getIndexedSummaries() {
|
|
158
|
-
return this.request("/v1/indexed");
|
|
159
|
-
}
|
|
160
|
-
/**
|
|
161
|
-
* Dereference an indexed memory to get full content
|
|
162
|
-
*/
|
|
163
|
-
async dereferenceIndex(indexKey) {
|
|
164
|
-
return this.request(`/v1/indexed/${encodeURIComponent(indexKey)}`);
|
|
165
|
-
}
|
|
166
|
-
/**
|
|
167
|
-
* Store an indexed memory
|
|
168
|
-
*/
|
|
169
|
-
async storeIndexed(params) {
|
|
170
|
-
return this.request("/v1/indexed", {
|
|
171
|
-
method: "POST",
|
|
172
|
-
body: JSON.stringify(params),
|
|
173
|
-
});
|
|
174
|
-
}
|
|
175
|
-
}
|
|
1
|
+
export { FatHippoClient, } from "@fathippo/hosted";
|
|
176
2
|
//# sourceMappingURL=client.js.map
|
package/dist/api/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/api/client.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/api/client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,GAWf,MAAM,kBAAkB,CAAC"}
|
package/dist/engine.d.ts
CHANGED
|
@@ -12,18 +12,16 @@ import type { FatHippoConfig } from "./types.js";
|
|
|
12
12
|
export declare class FatHippoContextEngine implements ContextEngine {
|
|
13
13
|
readonly info: ContextEngineInfo;
|
|
14
14
|
private client;
|
|
15
|
+
private runtimeClient;
|
|
15
16
|
private config;
|
|
16
17
|
private mode;
|
|
17
18
|
private localStore;
|
|
18
|
-
private
|
|
19
|
+
private hostedSessions;
|
|
19
20
|
private sessionStartTimes;
|
|
20
|
-
private sessionApplicationIds;
|
|
21
21
|
private sessionLocalProfiles;
|
|
22
22
|
private sessionHippoNodState;
|
|
23
23
|
private cognitiveEnabled;
|
|
24
24
|
private static readonly TRIVIAL_ACKS;
|
|
25
|
-
private static readonly MIN_VECTOR_SIMILARITY;
|
|
26
|
-
private static readonly MIN_CRITICAL_RELEVANCE;
|
|
27
25
|
private static readonly HIPPO_NOD_COOLDOWN_MS;
|
|
28
26
|
private static readonly HIPPO_NOD_MIN_MESSAGE_GAP;
|
|
29
27
|
constructor(config: FatHippoConfig);
|
|
@@ -74,23 +72,6 @@ export declare class FatHippoContextEngine implements ContextEngine {
|
|
|
74
72
|
}): Promise<AssembleResult>;
|
|
75
73
|
private assembleLocalContext;
|
|
76
74
|
private buildRuntimeAwarenessInstruction;
|
|
77
|
-
/**
|
|
78
|
-
* Check if query looks like a coding task
|
|
79
|
-
*/
|
|
80
|
-
private looksLikeCodingQuery;
|
|
81
|
-
/**
|
|
82
|
-
* Fetch active constraints (always injected)
|
|
83
|
-
*/
|
|
84
|
-
private fetchConstraints;
|
|
85
|
-
/**
|
|
86
|
-
* Auto-detect and store constraints from user message
|
|
87
|
-
*/
|
|
88
|
-
private maybeStoreConstraint;
|
|
89
|
-
/**
|
|
90
|
-
* Fetch relevant traces and patterns from cognitive API
|
|
91
|
-
*/
|
|
92
|
-
private fetchCognitiveContext;
|
|
93
|
-
private captureStructuredTrace;
|
|
94
75
|
private runCognitiveHeartbeat;
|
|
95
76
|
private detectFilesModified;
|
|
96
77
|
private detectWorkspaceRoot;
|
|
@@ -100,8 +81,6 @@ export declare class FatHippoContextEngine implements ContextEngine {
|
|
|
100
81
|
private mapLocalMemory;
|
|
101
82
|
private toLocalToolSignals;
|
|
102
83
|
private captureLocalTrace;
|
|
103
|
-
private getApiBaseUrl;
|
|
104
|
-
private getHostedHeaders;
|
|
105
84
|
private buildHippoNodInstruction;
|
|
106
85
|
private isHighUrgencyOrFormalMoment;
|
|
107
86
|
/**
|
|
@@ -128,7 +107,7 @@ export declare class FatHippoContextEngine implements ContextEngine {
|
|
|
128
107
|
/**
|
|
129
108
|
* Handle subagent completion
|
|
130
109
|
*/
|
|
131
|
-
onSubagentEnded(
|
|
110
|
+
onSubagentEnded(params: {
|
|
132
111
|
childSessionKey: string;
|
|
133
112
|
reason: SubagentEndReason;
|
|
134
113
|
}): Promise<void>;
|
|
@@ -137,6 +116,12 @@ export declare class FatHippoContextEngine implements ContextEngine {
|
|
|
137
116
|
*/
|
|
138
117
|
dispose(): Promise<void>;
|
|
139
118
|
private extractContent;
|
|
119
|
+
private buildHostedRuntimeMetadata;
|
|
120
|
+
private toRuntimeMessages;
|
|
121
|
+
private extractTurnMessages;
|
|
122
|
+
private captureLocalTurnMemories;
|
|
123
|
+
private mapHostedOutcomeFromReason;
|
|
124
|
+
private endHostedSession;
|
|
140
125
|
private findLastUserMessage;
|
|
141
126
|
private isTrivialQuery;
|
|
142
127
|
private isRoleMessage;
|
package/dist/engine.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../src/engine.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../src/engine.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAsBH,OAAO,KAAK,EACV,cAAc,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