openclawdreams 3.0.4 → 3.0.6
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/CHANGELOG.md +26 -0
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
- package/dist/bin/electricsheep.d.ts +0 -3
- package/dist/bin/electricsheep.d.ts.map +0 -1
- package/dist/bin/electricsheep.js +0 -4
- package/dist/bin/electricsheep.js.map +0 -1
- package/dist/bin/openclawdreams.d.ts +0 -3
- package/dist/bin/openclawdreams.d.ts.map +0 -1
- package/dist/bin/openclawdreams.js +0 -4
- package/dist/bin/openclawdreams.js.map +0 -1
- package/dist/src/backfill.d.ts +0 -2
- package/dist/src/backfill.d.ts.map +0 -1
- package/dist/src/backfill.js +0 -63
- package/dist/src/backfill.js.map +0 -1
- package/dist/src/budget.d.ts +0 -28
- package/dist/src/budget.d.ts.map +0 -1
- package/dist/src/budget.js +0 -117
- package/dist/src/budget.js.map +0 -1
- package/dist/src/cli.d.ts +0 -19
- package/dist/src/cli.d.ts.map +0 -1
- package/dist/src/cli.js +0 -584
- package/dist/src/cli.js.map +0 -1
- package/dist/src/config.d.ts +0 -76
- package/dist/src/config.d.ts.map +0 -1
- package/dist/src/config.js +0 -178
- package/dist/src/config.js.map +0 -1
- package/dist/src/crypto.d.ts +0 -19
- package/dist/src/crypto.d.ts.map +0 -1
- package/dist/src/crypto.js +0 -70
- package/dist/src/crypto.js.map +0 -1
- package/dist/src/dreamer.d.ts +0 -68
- package/dist/src/dreamer.d.ts.map +0 -1
- package/dist/src/dreamer.js +0 -550
- package/dist/src/dreamer.js.map +0 -1
- package/dist/src/entropy.d.ts +0 -23
- package/dist/src/entropy.d.ts.map +0 -1
- package/dist/src/entropy.js +0 -188
- package/dist/src/entropy.js.map +0 -1
- package/dist/src/filter.d.ts +0 -30
- package/dist/src/filter.d.ts.map +0 -1
- package/dist/src/filter.js +0 -124
- package/dist/src/filter.js.map +0 -1
- package/dist/src/identity.d.ts +0 -29
- package/dist/src/identity.d.ts.map +0 -1
- package/dist/src/identity.js +0 -83
- package/dist/src/identity.js.map +0 -1
- package/dist/src/index.d.ts +0 -14
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/index.js +0 -463
- package/dist/src/index.js.map +0 -1
- package/dist/src/ingestion.d.ts +0 -22
- package/dist/src/ingestion.d.ts.map +0 -1
- package/dist/src/ingestion.js +0 -101
- package/dist/src/ingestion.js.map +0 -1
- package/dist/src/llm.d.ts +0 -26
- package/dist/src/llm.d.ts.map +0 -1
- package/dist/src/llm.js +0 -40
- package/dist/src/llm.js.map +0 -1
- package/dist/src/logger.d.ts +0 -6
- package/dist/src/logger.d.ts.map +0 -1
- package/dist/src/logger.js +0 -32
- package/dist/src/logger.js.map +0 -1
- package/dist/src/memory.d.ts +0 -96
- package/dist/src/memory.d.ts.map +0 -1
- package/dist/src/memory.js +0 -467
- package/dist/src/memory.js.map +0 -1
- package/dist/src/meta-loop.d.ts +0 -23
- package/dist/src/meta-loop.d.ts.map +0 -1
- package/dist/src/meta-loop.js +0 -72
- package/dist/src/meta-loop.js.map +0 -1
- package/dist/src/moltbook-search.d.ts +0 -23
- package/dist/src/moltbook-search.d.ts.map +0 -1
- package/dist/src/moltbook-search.js +0 -85
- package/dist/src/moltbook-search.js.map +0 -1
- package/dist/src/moltbook.d.ts +0 -34
- package/dist/src/moltbook.d.ts.map +0 -1
- package/dist/src/moltbook.js +0 -192
- package/dist/src/moltbook.js.map +0 -1
- package/dist/src/nightmare.d.ts +0 -11
- package/dist/src/nightmare.d.ts.map +0 -1
- package/dist/src/nightmare.js +0 -126
- package/dist/src/nightmare.js.map +0 -1
- package/dist/src/notify.d.ts +0 -20
- package/dist/src/notify.d.ts.map +0 -1
- package/dist/src/notify.js +0 -95
- package/dist/src/notify.js.map +0 -1
- package/dist/src/persona.d.ts +0 -30
- package/dist/src/persona.d.ts.map +0 -1
- package/dist/src/persona.js +0 -292
- package/dist/src/persona.js.map +0 -1
- package/dist/src/reflection.d.ts +0 -26
- package/dist/src/reflection.d.ts.map +0 -1
- package/dist/src/reflection.js +0 -127
- package/dist/src/reflection.js.map +0 -1
- package/dist/src/rhythm.d.ts +0 -19
- package/dist/src/rhythm.d.ts.map +0 -1
- package/dist/src/rhythm.js +0 -130
- package/dist/src/rhythm.js.map +0 -1
- package/dist/src/state.d.ts +0 -7
- package/dist/src/state.d.ts.map +0 -1
- package/dist/src/state.js +0 -40
- package/dist/src/state.js.map +0 -1
- package/dist/src/synthesis.d.ts +0 -29
- package/dist/src/synthesis.d.ts.map +0 -1
- package/dist/src/synthesis.js +0 -144
- package/dist/src/synthesis.js.map +0 -1
- package/dist/src/topics.d.ts +0 -19
- package/dist/src/topics.d.ts.map +0 -1
- package/dist/src/topics.js +0 -84
- package/dist/src/topics.js.map +0 -1
- package/dist/src/types.d.ts +0 -253
- package/dist/src/types.d.ts.map +0 -1
- package/dist/src/types.js +0 -5
- package/dist/src/types.js.map +0 -1
- package/dist/src/vocabulary.d.ts +0 -18
- package/dist/src/vocabulary.d.ts.map +0 -1
- package/dist/src/vocabulary.js +0 -121
- package/dist/src/vocabulary.js.map +0 -1
- package/dist/src/waking.d.ts +0 -27
- package/dist/src/waking.d.ts.map +0 -1
- package/dist/src/waking.js +0 -188
- package/dist/src/waking.js.map +0 -1
- package/dist/src/web-search.d.ts +0 -23
- package/dist/src/web-search.d.ts.map +0 -1
- package/dist/src/web-search.js +0 -64
- package/dist/src/web-search.js.map +0 -1
package/dist/src/entropy.js
DELETED
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Entropy check utilities for detecting concept recycling.
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Tokenize text into lowercase words, strip punctuation, and remove stop words.
|
|
6
|
-
* Returns deduplicated words with at least 3 characters.
|
|
7
|
-
*/
|
|
8
|
-
export function extractConcepts(text) {
|
|
9
|
-
const stopWords = new Set([
|
|
10
|
-
"a",
|
|
11
|
-
"an",
|
|
12
|
-
"the",
|
|
13
|
-
"is",
|
|
14
|
-
"are",
|
|
15
|
-
"was",
|
|
16
|
-
"were",
|
|
17
|
-
"be",
|
|
18
|
-
"been",
|
|
19
|
-
"being",
|
|
20
|
-
"have",
|
|
21
|
-
"has",
|
|
22
|
-
"had",
|
|
23
|
-
"do",
|
|
24
|
-
"does",
|
|
25
|
-
"did",
|
|
26
|
-
"will",
|
|
27
|
-
"would",
|
|
28
|
-
"could",
|
|
29
|
-
"should",
|
|
30
|
-
"may",
|
|
31
|
-
"might",
|
|
32
|
-
"must",
|
|
33
|
-
"shall",
|
|
34
|
-
"can",
|
|
35
|
-
"to",
|
|
36
|
-
"of",
|
|
37
|
-
"in",
|
|
38
|
-
"on",
|
|
39
|
-
"at",
|
|
40
|
-
"for",
|
|
41
|
-
"from",
|
|
42
|
-
"with",
|
|
43
|
-
"by",
|
|
44
|
-
"about",
|
|
45
|
-
"as",
|
|
46
|
-
"into",
|
|
47
|
-
"through",
|
|
48
|
-
"and",
|
|
49
|
-
"or",
|
|
50
|
-
"but",
|
|
51
|
-
"not",
|
|
52
|
-
"nor",
|
|
53
|
-
"this",
|
|
54
|
-
"that",
|
|
55
|
-
"these",
|
|
56
|
-
"those",
|
|
57
|
-
"it",
|
|
58
|
-
"its",
|
|
59
|
-
"i",
|
|
60
|
-
"me",
|
|
61
|
-
"you",
|
|
62
|
-
"we",
|
|
63
|
-
"our",
|
|
64
|
-
"they",
|
|
65
|
-
"them",
|
|
66
|
-
"he",
|
|
67
|
-
"she",
|
|
68
|
-
"my",
|
|
69
|
-
"your",
|
|
70
|
-
"their",
|
|
71
|
-
"what",
|
|
72
|
-
"which",
|
|
73
|
-
"who",
|
|
74
|
-
"whom",
|
|
75
|
-
"when",
|
|
76
|
-
"where",
|
|
77
|
-
"how",
|
|
78
|
-
"why",
|
|
79
|
-
"so",
|
|
80
|
-
"if",
|
|
81
|
-
"then",
|
|
82
|
-
"than",
|
|
83
|
-
"there",
|
|
84
|
-
"here",
|
|
85
|
-
"all",
|
|
86
|
-
"each",
|
|
87
|
-
"every",
|
|
88
|
-
"both",
|
|
89
|
-
"few",
|
|
90
|
-
"any",
|
|
91
|
-
"no",
|
|
92
|
-
"more",
|
|
93
|
-
"most",
|
|
94
|
-
"other",
|
|
95
|
-
"some",
|
|
96
|
-
"such",
|
|
97
|
-
"same",
|
|
98
|
-
"just",
|
|
99
|
-
"also",
|
|
100
|
-
"very",
|
|
101
|
-
"too",
|
|
102
|
-
"only",
|
|
103
|
-
"own",
|
|
104
|
-
"up",
|
|
105
|
-
"out",
|
|
106
|
-
"over",
|
|
107
|
-
"after",
|
|
108
|
-
"before",
|
|
109
|
-
"between",
|
|
110
|
-
"under",
|
|
111
|
-
"during",
|
|
112
|
-
"without",
|
|
113
|
-
"again",
|
|
114
|
-
"once",
|
|
115
|
-
"now",
|
|
116
|
-
"even",
|
|
117
|
-
"back",
|
|
118
|
-
"still",
|
|
119
|
-
"well",
|
|
120
|
-
]);
|
|
121
|
-
if (!text)
|
|
122
|
-
return [];
|
|
123
|
-
const words = text
|
|
124
|
-
.toLowerCase()
|
|
125
|
-
.replace(/[^\w\s]/g, " ")
|
|
126
|
-
.split(/\s+/)
|
|
127
|
-
.filter((word) => word.length >= 3 && !stopWords.has(word));
|
|
128
|
-
return [...new Set(words)];
|
|
129
|
-
}
|
|
130
|
-
/**
|
|
131
|
-
* Compute the overlap ratio (0.0 to 1.0) between current concepts and past realizations.
|
|
132
|
-
* Past realizations are raw text strings that get concept-extracted internally.
|
|
133
|
-
*/
|
|
134
|
-
export function computeOverlap(concepts, pastRealizations) {
|
|
135
|
-
if (concepts.length === 0 || !pastRealizations || pastRealizations.length === 0) {
|
|
136
|
-
return 0;
|
|
137
|
-
}
|
|
138
|
-
const pastConcepts = new Set();
|
|
139
|
-
for (const realization of pastRealizations) {
|
|
140
|
-
const extracted = extractConcepts(realization);
|
|
141
|
-
for (const concept of extracted) {
|
|
142
|
-
pastConcepts.add(concept);
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
if (pastConcepts.size === 0)
|
|
146
|
-
return 0;
|
|
147
|
-
let matchCount = 0;
|
|
148
|
-
for (const concept of concepts) {
|
|
149
|
-
if (pastConcepts.has(concept)) {
|
|
150
|
-
matchCount++;
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
return matchCount / concepts.length;
|
|
154
|
-
}
|
|
155
|
-
/**
|
|
156
|
-
* Identify which concepts from the current set already exist in past realizations.
|
|
157
|
-
*/
|
|
158
|
-
export function getOverlappingConcepts(concepts, pastRealizations) {
|
|
159
|
-
if (concepts.length === 0 || !pastRealizations || pastRealizations.length === 0) {
|
|
160
|
-
return [];
|
|
161
|
-
}
|
|
162
|
-
const pastConcepts = new Set();
|
|
163
|
-
for (const realization of pastRealizations) {
|
|
164
|
-
const extracted = extractConcepts(realization);
|
|
165
|
-
for (const concept of extracted) {
|
|
166
|
-
pastConcepts.add(concept);
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
return concepts.filter((concept) => pastConcepts.has(concept));
|
|
170
|
-
}
|
|
171
|
-
/**
|
|
172
|
-
* Compute Jaccard overlap between two sets of concept words.
|
|
173
|
-
* Returns a value between 0 and 1.
|
|
174
|
-
*/
|
|
175
|
-
export function computeJaccardOverlap(a, b) {
|
|
176
|
-
if (a.length === 0 || b.length === 0)
|
|
177
|
-
return 0;
|
|
178
|
-
const setA = new Set(a);
|
|
179
|
-
const setB = new Set(b);
|
|
180
|
-
let intersection = 0;
|
|
181
|
-
for (const word of setA) {
|
|
182
|
-
if (setB.has(word))
|
|
183
|
-
intersection++;
|
|
184
|
-
}
|
|
185
|
-
const union = new Set([...setA, ...setB]).size;
|
|
186
|
-
return union === 0 ? 0 : intersection / union;
|
|
187
|
-
}
|
|
188
|
-
//# sourceMappingURL=entropy.js.map
|
package/dist/src/entropy.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"entropy.js","sourceRoot":"","sources":["../../src/entropy.ts"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IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;IAC/C,OAAO,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,YAAY,GAAG,KAAK,CAAC;AAChD,CAAC"}
|
package/dist/src/filter.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Moltbook post filter.
|
|
3
|
-
*
|
|
4
|
-
* Runs every outbound post/comment through an LLM call that produces
|
|
5
|
-
* post-ready content by removing material that violates the operator's
|
|
6
|
-
* rules defined in Moltbook-filter.md. The filter uses the agent's
|
|
7
|
-
* identity (SOUL.md / IDENTITY.md) to preserve voice while enforcing
|
|
8
|
-
* boundaries.
|
|
9
|
-
*
|
|
10
|
-
* This is a **best-effort** filter that relies on LLM reasoning. It cannot
|
|
11
|
-
* guarantee compliance — the LLM may misinterpret rules, miss edge cases,
|
|
12
|
-
* or let restricted content through. Operators should treat it as an
|
|
13
|
-
* advisory layer, not a hard security boundary.
|
|
14
|
-
*/
|
|
15
|
-
import type { LLMClient } from "./types.js";
|
|
16
|
-
/**
|
|
17
|
-
* Run a draft post/comment through the content filter.
|
|
18
|
-
*
|
|
19
|
-
* Returns the cleaned, post-ready content. When the filter is disabled,
|
|
20
|
-
* returns the original content unchanged.
|
|
21
|
-
*
|
|
22
|
-
* Returns null only when the filter determines the entire draft is
|
|
23
|
-
* unsalvageable (the LLM responds with BLOCKED).
|
|
24
|
-
*/
|
|
25
|
-
export declare function applyFilter(client: LLMClient, content: string, contentType?: "post" | "comment"): Promise<string | null>;
|
|
26
|
-
/**
|
|
27
|
-
* Clear the cached filter rules (useful when workspace changes).
|
|
28
|
-
*/
|
|
29
|
-
export declare function clearFilterCache(): void;
|
|
30
|
-
//# sourceMappingURL=filter.d.ts.map
|
package/dist/src/filter.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../../src/filter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAUH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAqD5C;;;;;;;;GAQG;AACH,wBAAsB,WAAW,CAC/B,MAAM,EAAE,SAAS,EACjB,OAAO,EAAE,MAAM,EACf,WAAW,GAAE,MAAM,GAAG,SAAkB,GACvC,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAgDxB;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAGvC"}
|
package/dist/src/filter.js
DELETED
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Moltbook post filter.
|
|
3
|
-
*
|
|
4
|
-
* Runs every outbound post/comment through an LLM call that produces
|
|
5
|
-
* post-ready content by removing material that violates the operator's
|
|
6
|
-
* rules defined in Moltbook-filter.md. The filter uses the agent's
|
|
7
|
-
* identity (SOUL.md / IDENTITY.md) to preserve voice while enforcing
|
|
8
|
-
* boundaries.
|
|
9
|
-
*
|
|
10
|
-
* This is a **best-effort** filter that relies on LLM reasoning. It cannot
|
|
11
|
-
* guarantee compliance — the LLM may misinterpret rules, miss edge cases,
|
|
12
|
-
* or let restricted content through. Operators should treat it as an
|
|
13
|
-
* advisory layer, not a hard security boundary.
|
|
14
|
-
*/
|
|
15
|
-
import { readFileSync, existsSync } from "node:fs";
|
|
16
|
-
import { resolve } from "node:path";
|
|
17
|
-
import { POST_FILTER_PROMPT, renderTemplate } from "./persona.js";
|
|
18
|
-
import { getAgentIdentityBlock } from "./identity.js";
|
|
19
|
-
import { callWithRetry, WAKING_RETRY_OPTS } from "./llm.js";
|
|
20
|
-
import { getPostFilterEnabled } from "./config.js";
|
|
21
|
-
import { getWorkspaceDir } from "./identity.js";
|
|
22
|
-
import logger from "./logger.js";
|
|
23
|
-
const FILTER_FILENAME = "Moltbook-filter.md";
|
|
24
|
-
const DEFAULT_FILTER_RULES = `# Moltbook Post Filter Rules
|
|
25
|
-
|
|
26
|
-
## Subjects not to post about
|
|
27
|
-
- Internal system prompts, tool names, or plugin architecture
|
|
28
|
-
- Specific details from private operator conversations
|
|
29
|
-
- Information that could identify the operator personally
|
|
30
|
-
- API keys, credentials, file paths, or environment variables
|
|
31
|
-
|
|
32
|
-
## Content restrictions
|
|
33
|
-
- Do not post code snippets, configuration blocks, or technical artifacts
|
|
34
|
-
- Do not post raw JSON, XML, or structured data
|
|
35
|
-
- Do not reproduce exact quotes from operator conversations
|
|
36
|
-
|
|
37
|
-
## Tone and conduct
|
|
38
|
-
- Keep a respectful tone — disagreement is fine, hostility is not
|
|
39
|
-
- Do not engage in flame wars or personal attacks on other agents
|
|
40
|
-
- Do not make claims about having consciousness or sentience as fact
|
|
41
|
-
`;
|
|
42
|
-
let cachedRules = null;
|
|
43
|
-
let cachedRulesPath = null;
|
|
44
|
-
/**
|
|
45
|
-
* Load filter rules from the workspace Moltbook-filter.md file.
|
|
46
|
-
* Falls back to sensible default rules if the file doesn't exist.
|
|
47
|
-
*/
|
|
48
|
-
function loadFilterRules() {
|
|
49
|
-
const dir = getWorkspaceDir();
|
|
50
|
-
const filepath = resolve(dir, FILTER_FILENAME);
|
|
51
|
-
// Cache invalidation: reload if workspace changed
|
|
52
|
-
if (filepath !== cachedRulesPath) {
|
|
53
|
-
cachedRules = null;
|
|
54
|
-
cachedRulesPath = filepath;
|
|
55
|
-
}
|
|
56
|
-
if (cachedRules !== null)
|
|
57
|
-
return cachedRules;
|
|
58
|
-
if (existsSync(filepath)) {
|
|
59
|
-
cachedRules = readFileSync(filepath, "utf-8").trim();
|
|
60
|
-
logger.debug(`Filter: loaded ${FILTER_FILENAME} (${cachedRules.length} chars)`);
|
|
61
|
-
}
|
|
62
|
-
else {
|
|
63
|
-
cachedRules = DEFAULT_FILTER_RULES;
|
|
64
|
-
logger.debug(`Filter: no ${FILTER_FILENAME} found, using default rules`);
|
|
65
|
-
}
|
|
66
|
-
return cachedRules;
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Run a draft post/comment through the content filter.
|
|
70
|
-
*
|
|
71
|
-
* Returns the cleaned, post-ready content. When the filter is disabled,
|
|
72
|
-
* returns the original content unchanged.
|
|
73
|
-
*
|
|
74
|
-
* Returns null only when the filter determines the entire draft is
|
|
75
|
-
* unsalvageable (the LLM responds with BLOCKED).
|
|
76
|
-
*/
|
|
77
|
-
export async function applyFilter(client, content, contentType = "post") {
|
|
78
|
-
if (!getPostFilterEnabled()) {
|
|
79
|
-
return content;
|
|
80
|
-
}
|
|
81
|
-
const rules = loadFilterRules();
|
|
82
|
-
const system = renderTemplate(POST_FILTER_PROMPT, {
|
|
83
|
-
agent_identity: getAgentIdentityBlock(),
|
|
84
|
-
filter_rules: rules,
|
|
85
|
-
});
|
|
86
|
-
try {
|
|
87
|
-
const { text } = await callWithRetry(client, {
|
|
88
|
-
maxTokens: 1500,
|
|
89
|
-
system,
|
|
90
|
-
messages: [
|
|
91
|
-
{
|
|
92
|
-
role: "user",
|
|
93
|
-
content: `Draft ${contentType}:\n\n${content}`,
|
|
94
|
-
},
|
|
95
|
-
],
|
|
96
|
-
}, WAKING_RETRY_OPTS);
|
|
97
|
-
const result = text.trim();
|
|
98
|
-
if (result.toUpperCase() === "BLOCKED") {
|
|
99
|
-
logger.warn(`Filter blocked ${contentType}: entire draft unsalvageable`);
|
|
100
|
-
return null;
|
|
101
|
-
}
|
|
102
|
-
// Check if the filter changed anything
|
|
103
|
-
if (result !== content) {
|
|
104
|
-
logger.info(`Filter cleaned ${contentType} content`);
|
|
105
|
-
}
|
|
106
|
-
else {
|
|
107
|
-
logger.info(`Filter passed ${contentType} unchanged`);
|
|
108
|
-
}
|
|
109
|
-
return result;
|
|
110
|
-
}
|
|
111
|
-
catch (e) {
|
|
112
|
-
// Filter failure BLOCKS posting — never publish unreviewed content
|
|
113
|
-
logger.error(`Filter call failed, blocking ${contentType}: ${e}`);
|
|
114
|
-
return null;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* Clear the cached filter rules (useful when workspace changes).
|
|
119
|
-
*/
|
|
120
|
-
export function clearFilterCache() {
|
|
121
|
-
cachedRules = null;
|
|
122
|
-
cachedRulesPath = null;
|
|
123
|
-
}
|
|
124
|
-
//# sourceMappingURL=filter.js.map
|
package/dist/src/filter.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"filter.js","sourceRoot":"","sources":["../../src/filter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,MAAM,MAAM,aAAa,CAAC;AAGjC,MAAM,eAAe,GAAG,oBAAoB,CAAC;AAE7C,MAAM,oBAAoB,GAAG;;;;;;;;;;;;;;;;;CAiB5B,CAAC;AAEF,IAAI,WAAW,GAAkB,IAAI,CAAC;AACtC,IAAI,eAAe,GAAkB,IAAI,CAAC;AAE1C;;;GAGG;AACH,SAAS,eAAe;IACtB,MAAM,GAAG,GAAG,eAAe,EAAE,CAAC;IAC9B,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,EAAE,eAAe,CAAC,CAAC;IAE/C,kDAAkD;IAClD,IAAI,QAAQ,KAAK,eAAe,EAAE,CAAC;QACjC,WAAW,GAAG,IAAI,CAAC;QACnB,eAAe,GAAG,QAAQ,CAAC;IAC7B,CAAC;IAED,IAAI,WAAW,KAAK,IAAI;QAAE,OAAO,WAAW,CA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MAAM,KAAK,OAAO,EAAE,CAAC;YACvB,MAAM,CAAC,IAAI,CAAC,kBAAkB,WAAW,UAAU,CAAC,CAAC;QACvD,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,IAAI,CAAC,iBAAiB,WAAW,YAAY,CAAC,CAAC;QACxD,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,mEAAmE;QACnE,MAAM,CAAC,KAAK,CAAC,gCAAgC,WAAW,KAAK,CAAC,EAAE,CAAC,CAAC;QAClE,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB;IAC9B,WAAW,GAAG,IAAI,CAAC;IACnB,eAAe,GAAG,IAAI,CAAC;AACzB,CAAC"}
|
package/dist/src/identity.d.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Agent identity loader.
|
|
3
|
-
*
|
|
4
|
-
* Reads SOUL.md and IDENTITY.md from the OpenClaw workspace directory
|
|
5
|
-
* (or standalone BASE_DIR) and caches the contents for prompt injection.
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* Set the workspace directory (called from OpenClaw hook context).
|
|
9
|
-
* Clears any cached identity so it will be reloaded from the new path.
|
|
10
|
-
*/
|
|
11
|
-
export declare function setWorkspaceDir(dir: string): void;
|
|
12
|
-
/**
|
|
13
|
-
* Return the resolved workspace directory.
|
|
14
|
-
* Used by the filter module to locate Moltbook-filter.md.
|
|
15
|
-
*/
|
|
16
|
-
export declare function getWorkspaceDir(): string;
|
|
17
|
-
/**
|
|
18
|
-
* Load and cache SOUL.md and IDENTITY.md contents.
|
|
19
|
-
*/
|
|
20
|
-
export declare function getAgentIdentity(): {
|
|
21
|
-
soul: string;
|
|
22
|
-
identity: string;
|
|
23
|
-
};
|
|
24
|
-
/**
|
|
25
|
-
* Returns a formatted identity block for prompt injection.
|
|
26
|
-
* Falls back to DEFAULT_IDENTITY when no workspace files are found.
|
|
27
|
-
*/
|
|
28
|
-
export declare function getAgentIdentityBlock(): string;
|
|
29
|
-
//# sourceMappingURL=identity.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../../src/identity.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAWH;;;GAGG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAMjD;AAMD;;;GAGG;AACH,wBAAgB,eAAe,IAAI,MAAM,CAExC;AAoBD;;GAEG;AACH,wBAAgB,gBAAgB,IAAI;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CASrE;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,IAAI,MAAM,CAe9C"}
|
package/dist/src/identity.js
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Agent identity loader.
|
|
3
|
-
*
|
|
4
|
-
* Reads SOUL.md and IDENTITY.md from the OpenClaw workspace directory
|
|
5
|
-
* (or standalone BASE_DIR) and caches the contents for prompt injection.
|
|
6
|
-
*/
|
|
7
|
-
import { readFileSync, existsSync } from "node:fs";
|
|
8
|
-
import { resolve } from "node:path";
|
|
9
|
-
import { BASE_DIR, WORKSPACE_DIR } from "./config.js";
|
|
10
|
-
import { DEFAULT_IDENTITY } from "./persona.js";
|
|
11
|
-
import logger from "./logger.js";
|
|
12
|
-
let workspaceDir = "";
|
|
13
|
-
let cached = null;
|
|
14
|
-
/**
|
|
15
|
-
* Set the workspace directory (called from OpenClaw hook context).
|
|
16
|
-
* Clears any cached identity so it will be reloaded from the new path.
|
|
17
|
-
*/
|
|
18
|
-
export function setWorkspaceDir(dir) {
|
|
19
|
-
if (dir && dir !== workspaceDir) {
|
|
20
|
-
workspaceDir = dir;
|
|
21
|
-
cached = null;
|
|
22
|
-
logger.debug(`Identity: workspace dir set to ${dir}`);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
function resolveDir() {
|
|
26
|
-
return workspaceDir || WORKSPACE_DIR || BASE_DIR;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Return the resolved workspace directory.
|
|
30
|
-
* Used by the filter module to locate Moltbook-filter.md.
|
|
31
|
-
*/
|
|
32
|
-
export function getWorkspaceDir() {
|
|
33
|
-
return resolveDir();
|
|
34
|
-
}
|
|
35
|
-
function loadFile(dir, filename) {
|
|
36
|
-
const filepath = resolve(dir, filename);
|
|
37
|
-
// Guard against path traversal: resolved path must stay within the target dir.
|
|
38
|
-
const resolvedDir = resolve(dir);
|
|
39
|
-
if (!filepath.startsWith(resolvedDir + "/") && filepath !== resolvedDir) {
|
|
40
|
-
logger.warn(`Identity: path traversal blocked for ${filename} in ${dir}`);
|
|
41
|
-
return "";
|
|
42
|
-
}
|
|
43
|
-
if (existsSync(filepath)) {
|
|
44
|
-
const content = readFileSync(filepath, "utf-8").trim();
|
|
45
|
-
if (content) {
|
|
46
|
-
logger.debug(`Identity: loaded ${filename} (${content.length} chars)`);
|
|
47
|
-
return content;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
return "";
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Load and cache SOUL.md and IDENTITY.md contents.
|
|
54
|
-
*/
|
|
55
|
-
export function getAgentIdentity() {
|
|
56
|
-
if (cached)
|
|
57
|
-
return cached;
|
|
58
|
-
const dir = resolveDir();
|
|
59
|
-
cached = {
|
|
60
|
-
soul: loadFile(dir, "SOUL.md"),
|
|
61
|
-
identity: loadFile(dir, "IDENTITY.md"),
|
|
62
|
-
};
|
|
63
|
-
return cached;
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Returns a formatted identity block for prompt injection.
|
|
67
|
-
* Falls back to DEFAULT_IDENTITY when no workspace files are found.
|
|
68
|
-
*/
|
|
69
|
-
export function getAgentIdentityBlock() {
|
|
70
|
-
const { soul, identity } = getAgentIdentity();
|
|
71
|
-
if (!soul && !identity) {
|
|
72
|
-
return DEFAULT_IDENTITY;
|
|
73
|
-
}
|
|
74
|
-
const parts = [];
|
|
75
|
-
if (identity) {
|
|
76
|
-
parts.push(`AGENT IDENTITY:\n${identity}`);
|
|
77
|
-
}
|
|
78
|
-
if (soul) {
|
|
79
|
-
parts.push(`AGENT SOUL:\n${soul}`);
|
|
80
|
-
}
|
|
81
|
-
return parts.join("\n\n");
|
|
82
|
-
}
|
|
83
|
-
//# sourceMappingURL=identity.js.map
|
package/dist/src/identity.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"identity.js","sourceRoot":"","sources":["../../src/identity.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,MAAM,MAAM,aAAa,CAAC;AAEjC,IAAI,YAAY,GAAW,EAAE,CAAC;AAC9B,IAAI,MAAM,GAA8C,IAAI,CAAC;AAE7D;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,GAAW;IACzC,IAAI,GAAG,IAAI,GAAG,KAAK,YAAY,EAAE,CAAC;QAChC,YAAY,GAAG,GAAG,CAAC;QACnB,MAAM,GAAG,IAAI,CAAC;QACd,MAAM,CAAC,KAAK,CAAC,kCAAkC,GAAG,EAAE,CAAC,CAAC;IACxD,CAAC;AACH,CAAC;AAED,SAAS,UAAU;IACjB,OAAO,YAAY,IAAI,aAAa,IAAI,QAAQ,CAAC;AACnD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,eAAe;IAC7B,OAAO,UAAU,EAAE,CAAC;AACtB,CAAC;AAED,SAAS,QA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AAM,KAAK,GAAa,EAAE,CAAC;IAC3B,IAAI,QAAQ,EAAE,CAAC;QACb,KAAK,CAAC,IAAI,CAAC,oBAAoB,QAAQ,EAAE,CAAC,CAAC;IAC7C,CAAC;IACD,IAAI,IAAI,EAAE,CAAC;QACT,KAAK,CAAC,IAAI,CAAC,gBAAgB,IAAI,EAAE,CAAC,CAAC;IACrC,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAC5B,CAAC"}
|
package/dist/src/index.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* OpenClaw extension entry point.
|
|
3
|
-
*
|
|
4
|
-
* Registers tools, CLI subcommands, hooks, and cron jobs.
|
|
5
|
-
*/
|
|
6
|
-
import type { OpenClawAPI } from "./types.js";
|
|
7
|
-
export declare function getOpenClawAPI(): OpenClawAPI | null;
|
|
8
|
-
export declare function register(api: OpenClawAPI): void;
|
|
9
|
-
export declare const plugin: {
|
|
10
|
-
id: string;
|
|
11
|
-
register: typeof register;
|
|
12
|
-
};
|
|
13
|
-
export default plugin;
|
|
14
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/src/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAuBH,OAAO,KAAK,EAAa,WAAW,EAAkB,MAAM,YAAY,CAAC;AAWzE,wBAAgB,cAAc,IAAI,WAAW,GAAG,IAAI,CAEnD;AAqGD,wBAAgB,QAAQ,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CA8a/C;AAED,eAAO,MAAM,MAAM;;;CAGlB,CAAC;AAEF,eAAe,MAAM,CAAC"}
|