@hraness/wordcell 0.21.2 → 0.22.0
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 +196 -66
- package/dist/{authority-4sp9d552.js → authority-1pgftmwq.js} +55 -10
- package/dist/benchmark.js +3 -3
- package/dist/capture.js +6 -5
- package/dist/cli.js +61 -3800
- package/dist/clip/acquire.js +3 -2
- package/dist/clip/cli.js +6 -5
- package/dist/clip/doctor.js +4 -3
- package/dist/clip/jobs.js +3 -3
- package/dist/clip/refresh.js +1 -1
- package/dist/evaluation-builder.js +18 -17
- package/dist/evaluation-kb.js +14 -13
- package/dist/graph-authority.js +3 -3
- package/dist/graph-percolation.js +5 -5
- package/dist/index-0dqfnrz9.js +1985 -0
- package/dist/{index-0k2x4nn9.js → index-1tm7bgx7.js} +16 -4
- package/dist/{index-vdw5yjfa.js → index-2hf27mws.js} +108 -18
- package/dist/index-3agn8scn.js +306 -0
- package/dist/index-4ag64rc1.js +4299 -0
- package/dist/index-4knsp9qj.js +34 -0
- package/dist/index-66pshdtx.js +341 -0
- package/dist/index-9rf81m0p.js +368 -0
- package/dist/{index-59ssmqqm.js → index-a6kbv718.js} +1 -1
- package/dist/{index-51bap0mq.js → index-avbce90h.js} +9 -9
- package/dist/{index-180zbkkt.js → index-de2w8crk.js} +14 -13
- package/dist/{index-pbr6rv47.js → index-e6p9e926.js} +6 -6
- package/dist/{index-bcfn9xah.js → index-famy7fhs.js} +5 -5
- package/dist/{index-by0pbant.js → index-fc4dr114.js} +5 -2
- package/dist/{index-x6m57nfc.js → index-g5vsqmdy.js} +28 -57
- package/dist/{index-115b07ap.js → index-hcw140eb.js} +5 -5
- package/dist/index-j70m75wd.js +217 -0
- package/dist/{index-3ehtt59c.js → index-qwgsmtsz.js} +1 -1
- package/dist/{index-bgfzwt4h.js → index-t2bs9xdr.js} +4 -4
- package/dist/index.js +285 -93
- package/dist/portfolio.js +14 -13
- package/dist/publish-model.js +36 -0
- package/dist/publish-reader/reader.css +1042 -0
- package/dist/publish-reader/reader.js +1534 -0
- package/dist/publish-reader/theme.js +92 -0
- package/dist/publish-search.js +52 -0
- package/dist/publish.js +36 -0
- package/dist/rerank-typesafe.js +13 -0
- package/dist/rerank.js +14 -0
- package/dist/sdk.js +14 -11
- package/dist/search.js +2 -2
- package/dist/semantic.js +4 -4
- package/dist/support-mywv1em0.js +140 -0
- package/dist/workflows/decision-context.js +13 -12
- package/dist/workflows/index.js +13 -12
- package/package.json +68 -7
- package/skills/wordcell/AGENTS.md +1 -0
- package/skills/wordcell/SKILL.md +21 -1
- package/skills/wordcell/agents/openai.yaml +1 -1
- package/skills/wordcell/references/publish.md +93 -0
- package/skills/wordcell/references/query.md +22 -0
- package/src/cli-program.ts +353 -9
- package/src/cli.ts +12 -1
- package/src/clip/acquire.ts +2 -0
- package/src/clip/doctor.ts +2 -0
- package/src/clip/media.ts +2 -0
- package/src/index.ts +4 -0
- package/src/oh/authority.ts +14 -5
- package/src/oh/canonical-rust.ts +127 -0
- package/src/oh/projection-rust.ts +63 -0
- package/src/oh-adoption.ts +7 -1
- package/src/publish-graph.ts +0 -0
- package/src/publish-index.ts +195 -0
- package/src/publish-markdown.ts +617 -0
- package/src/publish-model.ts +599 -0
- package/src/publish-nav.ts +204 -0
- package/src/publish-pages.ts +382 -0
- package/src/publish-reader/reader.css +1042 -0
- package/src/publish-reader/reader.ts +1017 -0
- package/src/publish-reader/theme.ts +97 -0
- package/src/publish-search.ts +418 -0
- package/src/publish-select.ts +419 -0
- package/src/publish-theme.ts +106 -0
- package/src/publish.ts +904 -0
- package/src/rerank-credentials.ts +56 -0
- package/src/rerank-typesafe.ts +472 -0
- package/src/rerank.ts +389 -0
- package/src/sdk.ts +157 -6
- package/src/serve.ts +180 -0
- package/src/support-profile.ts +7 -0
- package/src/support.ts +73 -0
- package/src/vault.ts +23 -9
- package/dist/{index-why54q5p.js → index-gm9t95d9.js} +3 -3
package/dist/index.js
CHANGED
|
@@ -10,6 +10,12 @@ import {
|
|
|
10
10
|
runWorkflow,
|
|
11
11
|
workflowFromUnknown
|
|
12
12
|
} from "./index-h170byqw.js";
|
|
13
|
+
import {
|
|
14
|
+
createRepresentativeRetrievalFixture,
|
|
15
|
+
createSyntheticRankFusionFixture,
|
|
16
|
+
evaluateRanking,
|
|
17
|
+
evaluateRetrievalBenchmark
|
|
18
|
+
} from "./index-qwgsmtsz.js";
|
|
13
19
|
import {
|
|
14
20
|
initVault
|
|
15
21
|
} from "./index-23z4zxgg.js";
|
|
@@ -21,12 +27,17 @@ import {
|
|
|
21
27
|
MAX_SOURCE_INBOX_RESULTS,
|
|
22
28
|
sourceInbox
|
|
23
29
|
} from "./index-pj501bh1.js";
|
|
30
|
+
import {
|
|
31
|
+
DEFAULT_SYSTEMONE_ENDPOINT,
|
|
32
|
+
DEFAULT_SYSTEMONE_MODEL,
|
|
33
|
+
createTypeSafeReranker
|
|
34
|
+
} from "./index-9rf81m0p.js";
|
|
24
35
|
import {
|
|
25
36
|
FrozenEvaluationSnapshotError,
|
|
26
37
|
knowledgeBaseEvaluationRetrieverIds,
|
|
27
38
|
openKnowledgeBaseEvaluation,
|
|
28
39
|
verifyFrozenEvaluationSnapshot
|
|
29
|
-
} from "./index-
|
|
40
|
+
} from "./index-e6p9e926.js";
|
|
30
41
|
import {
|
|
31
42
|
DEFAULT_SEARCH_RESULTS,
|
|
32
43
|
MAX_SEARCH_CANDIDATES,
|
|
@@ -37,9 +48,9 @@ import {
|
|
|
37
48
|
openKnowledgeBase,
|
|
38
49
|
packSearchContext,
|
|
39
50
|
packUntrustedSearchContext,
|
|
51
|
+
searchEvidenceRank,
|
|
40
52
|
validateKnowledgeBaseSearchHistory
|
|
41
|
-
} from "./index-
|
|
42
|
-
import"./index-4j3tt0c3.js";
|
|
53
|
+
} from "./index-2hf27mws.js";
|
|
43
54
|
import"./index-adx6khj5.js";
|
|
44
55
|
import {
|
|
45
56
|
MAX_EMBEDDING_MODEL_BYTES,
|
|
@@ -56,33 +67,34 @@ import {
|
|
|
56
67
|
searchSemanticVault,
|
|
57
68
|
semanticDatabasePath,
|
|
58
69
|
sha256EmbeddingModelFile
|
|
59
|
-
} from "./index-
|
|
60
|
-
import
|
|
61
|
-
percolateWithGraph
|
|
62
|
-
} from "./index-bgfzwt4h.js";
|
|
70
|
+
} from "./index-hcw140eb.js";
|
|
71
|
+
import"./index-4j3tt0c3.js";
|
|
63
72
|
import {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
} from "./index-bcfn9xah.js";
|
|
73
|
+
MAX_RERANK_CANDIDATES,
|
|
74
|
+
MAX_RERANK_SNIPPET_BYTES,
|
|
75
|
+
MAX_RERANK_STATE_BYTES,
|
|
76
|
+
applyRerank
|
|
77
|
+
} from "./index-j70m75wd.js";
|
|
70
78
|
import {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
79
|
+
MAX_BOOTSTRAP_RESAMPLES,
|
|
80
|
+
MAX_EVALUATION_DIAGNOSTICS,
|
|
81
|
+
MAX_EVALUATION_EVIDENCE_BYTES,
|
|
82
|
+
MAX_EVALUATION_QRELS_PER_QUERY,
|
|
83
|
+
MAX_EVALUATION_QUERIES,
|
|
84
|
+
MAX_EVALUATION_RESULTS_PER_QUERY,
|
|
85
|
+
MAX_EVALUATION_RETRIEVERS,
|
|
86
|
+
MAX_EVALUATION_TEXT_BYTES,
|
|
87
|
+
MAX_EVALUATION_TIMEOUT_MS,
|
|
88
|
+
RETRIEVAL_EVALUATION_REPORT_VERSION,
|
|
89
|
+
RETRIEVAL_EVALUATION_SCHEMA_VERSION,
|
|
90
|
+
buildRetrievalEvaluationReport,
|
|
91
|
+
pairedBootstrapConfidenceInterval,
|
|
92
|
+
parseRetrievalEvaluationCorpus,
|
|
93
|
+
runRetrievalEvaluation
|
|
94
|
+
} from "./index-b88v3vtm.js";
|
|
75
95
|
import {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
MAX_VAULT_UTF8_BYTES,
|
|
79
|
-
VaultScanBudgetError,
|
|
80
|
-
defaultIgnoredDirectories,
|
|
81
|
-
markdownFiles,
|
|
82
|
-
readVaultNotes,
|
|
83
|
-
refreshVault,
|
|
84
|
-
scanVault
|
|
85
|
-
} from "./index-0k2x4nn9.js";
|
|
96
|
+
percolateWithGraph
|
|
97
|
+
} from "./index-t2bs9xdr.js";
|
|
86
98
|
import {
|
|
87
99
|
DEFAULT_PERCOLATION_LIMIT,
|
|
88
100
|
DEFAULT_PERCOLATION_MIN_SUPPORT,
|
|
@@ -104,6 +116,18 @@ import {
|
|
|
104
116
|
parsePercolationResultV2,
|
|
105
117
|
percolateVault
|
|
106
118
|
} from "./index-nd6nynv2.js";
|
|
119
|
+
import {
|
|
120
|
+
createGraphSnapshot,
|
|
121
|
+
openGraphAuthority,
|
|
122
|
+
queryGraph,
|
|
123
|
+
rebuildGraph,
|
|
124
|
+
verifyGraph
|
|
125
|
+
} from "./index-famy7fhs.js";
|
|
126
|
+
import {
|
|
127
|
+
GRAPH_LIMITS,
|
|
128
|
+
GraphAuthorityError,
|
|
129
|
+
validateGraphQueryRequest
|
|
130
|
+
} from "./index-11621h23.js";
|
|
107
131
|
import {
|
|
108
132
|
GitHistoryError,
|
|
109
133
|
MAX_GIT_HISTORY_COMMITS,
|
|
@@ -123,62 +147,6 @@ import {
|
|
|
123
147
|
validateGitHistoryForNotesRequest,
|
|
124
148
|
validateSearchGitHistoryOptions
|
|
125
149
|
} from "./index-1gwbassd.js";
|
|
126
|
-
import {
|
|
127
|
-
MAX_BOOTSTRAP_RESAMPLES,
|
|
128
|
-
MAX_EVALUATION_DIAGNOSTICS,
|
|
129
|
-
MAX_EVALUATION_EVIDENCE_BYTES,
|
|
130
|
-
MAX_EVALUATION_QRELS_PER_QUERY,
|
|
131
|
-
MAX_EVALUATION_QUERIES,
|
|
132
|
-
MAX_EVALUATION_RESULTS_PER_QUERY,
|
|
133
|
-
MAX_EVALUATION_RETRIEVERS,
|
|
134
|
-
MAX_EVALUATION_TEXT_BYTES,
|
|
135
|
-
MAX_EVALUATION_TIMEOUT_MS,
|
|
136
|
-
RETRIEVAL_EVALUATION_REPORT_VERSION,
|
|
137
|
-
RETRIEVAL_EVALUATION_SCHEMA_VERSION,
|
|
138
|
-
buildRetrievalEvaluationReport,
|
|
139
|
-
pairedBootstrapConfidenceInterval,
|
|
140
|
-
parseRetrievalEvaluationCorpus,
|
|
141
|
-
runRetrievalEvaluation
|
|
142
|
-
} from "./index-b88v3vtm.js";
|
|
143
|
-
import {
|
|
144
|
-
auditAgentGuideRepository,
|
|
145
|
-
auditAgentGuideSource,
|
|
146
|
-
auditAgentGuides,
|
|
147
|
-
compareAgentGuideAudits,
|
|
148
|
-
defaultAgentGuideIgnoredDirectories,
|
|
149
|
-
discoverAgentGuides
|
|
150
|
-
} from "./index-hya40gb2.js";
|
|
151
|
-
import {
|
|
152
|
-
MAX_ATTACHMENT_PATH_BYTES,
|
|
153
|
-
MAX_ATTACHMENT_REFERENCES,
|
|
154
|
-
MAX_ATTACHMENT_SCAN_ENTRIES,
|
|
155
|
-
MAX_ATTACHMENT_SOURCE_BYTES,
|
|
156
|
-
parseLocalAttachmentReferences,
|
|
157
|
-
validateAttachmentReferences,
|
|
158
|
-
validateMarkdownAttachments
|
|
159
|
-
} from "./index-x3fthpsc.js";
|
|
160
|
-
import {
|
|
161
|
-
InvalidCanonicalNoteIdError,
|
|
162
|
-
NoteAlreadyExistsError,
|
|
163
|
-
NoteRecoveryRequiredError,
|
|
164
|
-
NoteRevisionConflictError,
|
|
165
|
-
addNoteRelation,
|
|
166
|
-
canonicalNoteId,
|
|
167
|
-
canonicalRelationTarget,
|
|
168
|
-
createConceptNote,
|
|
169
|
-
createNote,
|
|
170
|
-
listNoteRelations,
|
|
171
|
-
normalizeRelationPredicate,
|
|
172
|
-
noteRevision,
|
|
173
|
-
removeNoteRelation
|
|
174
|
-
} from "./index-6sw24nvv.js";
|
|
175
|
-
import"./index-3rm7cz6h.js";
|
|
176
|
-
import {
|
|
177
|
-
createRepresentativeRetrievalFixture,
|
|
178
|
-
createSyntheticRankFusionFixture,
|
|
179
|
-
evaluateRanking,
|
|
180
|
-
evaluateRetrievalBenchmark
|
|
181
|
-
} from "./index-3ehtt59c.js";
|
|
182
150
|
import {
|
|
183
151
|
MAX_SEARCH_QUERY_BYTES,
|
|
184
152
|
MAX_SEARCH_QUERY_TERMS,
|
|
@@ -186,7 +154,37 @@ import {
|
|
|
186
154
|
fuseRankedCandidates,
|
|
187
155
|
searchExactVault,
|
|
188
156
|
validateSearchQuery
|
|
189
|
-
} from "./index-
|
|
157
|
+
} from "./index-gm9t95d9.js";
|
|
158
|
+
import"./index-1xxnjn0d.js";
|
|
159
|
+
import {
|
|
160
|
+
DEFAULT_PUBLISH_LIST_LIMIT,
|
|
161
|
+
MAX_PUBLISH_LIST_BYTES,
|
|
162
|
+
MAX_PUBLISH_LIST_LIMIT,
|
|
163
|
+
MAX_PUBLISH_PATH_COMPONENT_BYTES,
|
|
164
|
+
MAX_SITE_BYTES,
|
|
165
|
+
WORDCELL_PUBLISH_GENERATOR,
|
|
166
|
+
projectVault,
|
|
167
|
+
publishVault,
|
|
168
|
+
renderPublishReportText,
|
|
169
|
+
serializeSiteFile
|
|
170
|
+
} from "./index-0dqfnrz9.js";
|
|
171
|
+
import {
|
|
172
|
+
MAX_NOTE_UTF8_BYTES,
|
|
173
|
+
MAX_SCANNED_NOTES,
|
|
174
|
+
MAX_VAULT_UTF8_BYTES,
|
|
175
|
+
VaultScanBudgetError,
|
|
176
|
+
defaultIgnoredDirectories,
|
|
177
|
+
markdownFiles,
|
|
178
|
+
readVaultNotes,
|
|
179
|
+
refreshVault,
|
|
180
|
+
scanVault
|
|
181
|
+
} from "./index-1tm7bgx7.js";
|
|
182
|
+
import {
|
|
183
|
+
MAX_NAVIGATION_INDEXED_CONNECTIONS,
|
|
184
|
+
MAX_NAVIGATION_RETURNED_CONNECTIONS,
|
|
185
|
+
NavigationBudgetError,
|
|
186
|
+
navigateLinks
|
|
187
|
+
} from "./index-d13v9ckt.js";
|
|
190
188
|
import {
|
|
191
189
|
MAX_QUERY_FILTERS,
|
|
192
190
|
MAX_QUERY_FILTER_VALUES,
|
|
@@ -229,12 +227,33 @@ import {
|
|
|
229
227
|
terminalPlanStatuses,
|
|
230
228
|
validateRepositoryScopeSelection
|
|
231
229
|
} from "./index-06c9ctr6.js";
|
|
230
|
+
import"./index-4knsp9qj.js";
|
|
232
231
|
import {
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
232
|
+
WORDCELL_SITE_CATALOG_FORMAT_V1,
|
|
233
|
+
WORDCELL_SITE_DOCS_FORMAT_V1,
|
|
234
|
+
WORDCELL_SITE_FORMAT_V1,
|
|
235
|
+
WORDCELL_SITE_GRAPH_FORMAT_V1,
|
|
236
|
+
WORDCELL_SITE_LIMITS_V1,
|
|
237
|
+
WORDCELL_SITE_NOTE_FORMAT_V1,
|
|
238
|
+
WORDCELL_SITE_POSTINGS_FORMAT_V1,
|
|
239
|
+
WORDCELL_SITE_TERMS_FORMAT_V1,
|
|
240
|
+
parseSiteCatalogV1,
|
|
241
|
+
parseSiteDocsV1,
|
|
242
|
+
parseSiteGraphV1,
|
|
243
|
+
parseSiteManifestV1,
|
|
244
|
+
parseSiteNoteV1,
|
|
245
|
+
parseSitePostingsV1,
|
|
246
|
+
parseSiteTermsV1
|
|
247
|
+
} from "./index-66pshdtx.js";
|
|
248
|
+
import"./index-3agn8scn.js";
|
|
249
|
+
import {
|
|
250
|
+
auditAgentGuideRepository,
|
|
251
|
+
auditAgentGuideSource,
|
|
252
|
+
auditAgentGuides,
|
|
253
|
+
compareAgentGuideAudits,
|
|
254
|
+
defaultAgentGuideIgnoredDirectories,
|
|
255
|
+
discoverAgentGuides
|
|
256
|
+
} from "./index-hya40gb2.js";
|
|
238
257
|
import {
|
|
239
258
|
AgentContextRepositoryPathError,
|
|
240
259
|
RepositoryScopeError,
|
|
@@ -252,6 +271,31 @@ import {
|
|
|
252
271
|
normalizeRepositoryScope,
|
|
253
272
|
parseAgentContextMarker
|
|
254
273
|
} from "./index-5vwpzb5a.js";
|
|
274
|
+
import {
|
|
275
|
+
MAX_ATTACHMENT_PATH_BYTES,
|
|
276
|
+
MAX_ATTACHMENT_REFERENCES,
|
|
277
|
+
MAX_ATTACHMENT_SCAN_ENTRIES,
|
|
278
|
+
MAX_ATTACHMENT_SOURCE_BYTES,
|
|
279
|
+
parseLocalAttachmentReferences,
|
|
280
|
+
validateAttachmentReferences,
|
|
281
|
+
validateMarkdownAttachments
|
|
282
|
+
} from "./index-x3fthpsc.js";
|
|
283
|
+
import {
|
|
284
|
+
InvalidCanonicalNoteIdError,
|
|
285
|
+
NoteAlreadyExistsError,
|
|
286
|
+
NoteRecoveryRequiredError,
|
|
287
|
+
NoteRevisionConflictError,
|
|
288
|
+
addNoteRelation,
|
|
289
|
+
canonicalNoteId,
|
|
290
|
+
canonicalRelationTarget,
|
|
291
|
+
createConceptNote,
|
|
292
|
+
createNote,
|
|
293
|
+
listNoteRelations,
|
|
294
|
+
normalizeRelationPredicate,
|
|
295
|
+
noteRevision,
|
|
296
|
+
removeNoteRelation
|
|
297
|
+
} from "./index-6sw24nvv.js";
|
|
298
|
+
import"./index-3rm7cz6h.js";
|
|
255
299
|
import {
|
|
256
300
|
MAX_ANALYZED_NOTES,
|
|
257
301
|
MAX_CONNECTION_OBSERVATIONS,
|
|
@@ -272,12 +316,123 @@ import {
|
|
|
272
316
|
searchableMarkdown,
|
|
273
317
|
wikiLinks
|
|
274
318
|
} from "./index-ekpwvbra.js";
|
|
275
|
-
import"./index-1xxnjn0d.js";
|
|
276
319
|
import"./index-z1w83f81.js";
|
|
277
320
|
// src/oh-adoption.ts
|
|
278
321
|
import { createHash } from "crypto";
|
|
279
322
|
import { posix } from "path";
|
|
280
|
-
import { canonicalJson, canonicalSha256 } from "@hraness/oh";
|
|
323
|
+
import { canonicalJson as canonicalJson2, canonicalSha256 } from "@hraness/oh";
|
|
324
|
+
|
|
325
|
+
// src/oh/canonical-rust.ts
|
|
326
|
+
import { canonicalJson } from "@hraness/oh";
|
|
327
|
+
import {
|
|
328
|
+
OH_CANONICAL_RAW_WASM_BASE64,
|
|
329
|
+
OH_CANONICAL_RAW_WASM_SHA256
|
|
330
|
+
} from "@hraness/oh/canonical-rust/artifact";
|
|
331
|
+
import { emitOhRustFallback } from "@hraness/oh/rust-fallback";
|
|
332
|
+
var BASE64_ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
333
|
+
function decodeBase64(text) {
|
|
334
|
+
const clean = text.replace(/=+$/u, "");
|
|
335
|
+
const bytes = new Uint8Array(Math.floor(clean.length * 3 / 4));
|
|
336
|
+
let bits = 0;
|
|
337
|
+
let bitCount = 0;
|
|
338
|
+
let offset = 0;
|
|
339
|
+
for (const character of clean) {
|
|
340
|
+
const value = BASE64_ALPHABET.indexOf(character);
|
|
341
|
+
if (value < 0)
|
|
342
|
+
throw new Error("invalid base64 artifact");
|
|
343
|
+
bits = bits << 6 | value;
|
|
344
|
+
bitCount += 6;
|
|
345
|
+
if (bitCount >= 8) {
|
|
346
|
+
bitCount -= 8;
|
|
347
|
+
bytes[offset] = bits >> bitCount & 255;
|
|
348
|
+
offset += 1;
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
if (offset !== bytes.length)
|
|
352
|
+
throw new Error("base64 artifact length mismatch");
|
|
353
|
+
return bytes;
|
|
354
|
+
}
|
|
355
|
+
var cached;
|
|
356
|
+
function engine() {
|
|
357
|
+
if (cached !== undefined)
|
|
358
|
+
return cached;
|
|
359
|
+
try {
|
|
360
|
+
const bytes = decodeBase64(OH_CANONICAL_RAW_WASM_BASE64);
|
|
361
|
+
const instance = new WebAssembly.Instance(new WebAssembly.Module(bytes.buffer));
|
|
362
|
+
cached = instance.exports;
|
|
363
|
+
} catch {
|
|
364
|
+
cached = null;
|
|
365
|
+
}
|
|
366
|
+
return cached;
|
|
367
|
+
}
|
|
368
|
+
var encoder = new TextEncoder;
|
|
369
|
+
var decoder = new TextDecoder;
|
|
370
|
+
function runEngine(text, call) {
|
|
371
|
+
const exports = engine();
|
|
372
|
+
if (exports === null)
|
|
373
|
+
return null;
|
|
374
|
+
const input = encoder.encode(text);
|
|
375
|
+
if (input.length === 0)
|
|
376
|
+
return null;
|
|
377
|
+
const inputPtr = exports.oh_canonical_alloc(input.length);
|
|
378
|
+
if (inputPtr === 0)
|
|
379
|
+
return null;
|
|
380
|
+
let resultPtr = 0;
|
|
381
|
+
let resultCapacity = 0;
|
|
382
|
+
try {
|
|
383
|
+
new Uint8Array(exports.memory.buffer, inputPtr, input.length).set(input);
|
|
384
|
+
resultPtr = call(exports, inputPtr, input.length);
|
|
385
|
+
if (resultPtr === 0)
|
|
386
|
+
return null;
|
|
387
|
+
const memoryLength = exports.memory.buffer.byteLength;
|
|
388
|
+
if (resultPtr > memoryLength - 12)
|
|
389
|
+
return null;
|
|
390
|
+
const view = new DataView(exports.memory.buffer, resultPtr, 12);
|
|
391
|
+
const capacity = view.getUint32(0, true);
|
|
392
|
+
const status = view.getUint32(4, true);
|
|
393
|
+
const payloadLength = view.getUint32(8, true);
|
|
394
|
+
if (capacity < 12 || capacity > memoryLength - resultPtr || payloadLength > capacity - 12)
|
|
395
|
+
return null;
|
|
396
|
+
resultCapacity = capacity;
|
|
397
|
+
if (status !== 0 || payloadLength === 0)
|
|
398
|
+
return null;
|
|
399
|
+
return decoder.decode(new Uint8Array(exports.memory.buffer, resultPtr + 12, payloadLength));
|
|
400
|
+
} catch {
|
|
401
|
+
return null;
|
|
402
|
+
} finally {
|
|
403
|
+
if (resultPtr !== 0 && resultCapacity > 0)
|
|
404
|
+
exports.oh_canonical_free(resultPtr, resultCapacity);
|
|
405
|
+
exports.oh_canonical_free(inputPtr, input.length);
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
function canonicalJsonRust(value) {
|
|
409
|
+
const json = JSON.stringify(value);
|
|
410
|
+
if (json === undefined)
|
|
411
|
+
return null;
|
|
412
|
+
const rust = runEngine(json, (exports, ptr, len) => exports.oh_canonical_json(ptr, len));
|
|
413
|
+
if (rust === null)
|
|
414
|
+
return null;
|
|
415
|
+
try {
|
|
416
|
+
if (rust !== canonicalJson(value))
|
|
417
|
+
return null;
|
|
418
|
+
} catch {
|
|
419
|
+
return null;
|
|
420
|
+
}
|
|
421
|
+
return rust;
|
|
422
|
+
}
|
|
423
|
+
function canonicalSha256Rust(value) {
|
|
424
|
+
if (canonicalJsonRust(value) === null)
|
|
425
|
+
return null;
|
|
426
|
+
const json = JSON.stringify(value);
|
|
427
|
+
if (json === undefined)
|
|
428
|
+
return null;
|
|
429
|
+
return runEngine(json, (exports, ptr, len) => exports.oh_canonical_sha256(ptr, len));
|
|
430
|
+
}
|
|
431
|
+
function emitCanonicalRustFallback(reason, inputClass) {
|
|
432
|
+
emitOhRustFallback({ tag: "oh-canonical-rust-fallback", reason, inputClass });
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
// src/oh-adoption.ts
|
|
281
436
|
import {
|
|
282
437
|
parseOhHeadV1,
|
|
283
438
|
parseOhStoreBindingV1,
|
|
@@ -451,7 +606,7 @@ function parseHostPolicy(value) {
|
|
|
451
606
|
}
|
|
452
607
|
function verifyCapsule(value, expectedSource) {
|
|
453
608
|
try {
|
|
454
|
-
if (!structurallyBounded(value) || !isRecord(value) || !exactKeys(value, ["binding", "closureSha256", "head", "records", "roots", "v"]) || value.v !== 1 || !Array.isArray(value.records) || !Array.isArray(value.roots) || value.records.length < 1 || value.records.length > MAX_RECORDS || value.roots.length < 1 || value.roots.length > MAX_ROOTS || Buffer.byteLength(
|
|
609
|
+
if (!structurallyBounded(value) || !isRecord(value) || !exactKeys(value, ["binding", "closureSha256", "head", "records", "roots", "v"]) || value.v !== 1 || !Array.isArray(value.records) || !Array.isArray(value.roots) || value.records.length < 1 || value.records.length > MAX_RECORDS || value.roots.length < 1 || value.roots.length > MAX_ROOTS || Buffer.byteLength(canonicalJson2(value), "utf8") > MAX_CAPSULE_BYTES)
|
|
455
610
|
return null;
|
|
456
611
|
const verified = verifyOhDependencyClosureAgainstV1(value, {
|
|
457
612
|
binding: expectedSource.binding,
|
|
@@ -563,7 +718,11 @@ function prepareWithPolicy(value, policy) {
|
|
|
563
718
|
transformations,
|
|
564
719
|
v: 1
|
|
565
720
|
};
|
|
566
|
-
const
|
|
721
|
+
const rustSha256 = canonicalSha256Rust(manifest);
|
|
722
|
+
if (rustSha256 === null) {
|
|
723
|
+
emitCanonicalRustFallback("canonicalSha256Rust", "object");
|
|
724
|
+
}
|
|
725
|
+
const candidateSha256 = rustSha256 ?? canonicalSha256(manifest);
|
|
567
726
|
const markdown = renderMarkdown(manifest, candidateSha256);
|
|
568
727
|
if (Buffer.byteLength(markdown, "utf8") > MAX_CAPSULE_BYTES) {
|
|
569
728
|
throw new RangeError("The adoption candidate exceeds its Markdown byte limit.");
|
|
@@ -600,11 +759,13 @@ export {
|
|
|
600
759
|
terminalPlanStatuses,
|
|
601
760
|
sourceInbox,
|
|
602
761
|
sha256EmbeddingModelFile,
|
|
762
|
+
serializeSiteFile,
|
|
603
763
|
semanticDatabasePath,
|
|
604
764
|
searchableMarkdown,
|
|
605
765
|
searchSemanticVault,
|
|
606
766
|
searchGitHistory,
|
|
607
767
|
searchExactVault,
|
|
768
|
+
searchEvidenceRank,
|
|
608
769
|
scanVault,
|
|
609
770
|
runWorkflow,
|
|
610
771
|
runRetrievalEvaluation,
|
|
@@ -613,6 +774,7 @@ export {
|
|
|
613
774
|
repositoryScopeMatchesPath,
|
|
614
775
|
repositoryMemoryGroupKeys,
|
|
615
776
|
replaceCatalog,
|
|
777
|
+
renderPublishReportText,
|
|
616
778
|
renderCatalog,
|
|
617
779
|
removeNoteRelation,
|
|
618
780
|
refreshVault,
|
|
@@ -623,9 +785,18 @@ export {
|
|
|
623
785
|
queryVault,
|
|
624
786
|
queryGraph,
|
|
625
787
|
qmdIndexerVersion,
|
|
788
|
+
publishVault,
|
|
789
|
+
projectVault,
|
|
626
790
|
planStatuses,
|
|
627
791
|
percolateWithGraph,
|
|
628
792
|
percolateVault,
|
|
793
|
+
parseSiteTermsV1,
|
|
794
|
+
parseSitePostingsV1,
|
|
795
|
+
parseSiteNoteV1,
|
|
796
|
+
parseSiteManifestV1,
|
|
797
|
+
parseSiteGraphV1,
|
|
798
|
+
parseSiteDocsV1,
|
|
799
|
+
parseSiteCatalogV1,
|
|
629
800
|
parseRetrievalEvaluationCorpus,
|
|
630
801
|
parsePercolationResultV2,
|
|
631
802
|
parsePercolationResultV1,
|
|
@@ -678,6 +849,7 @@ export {
|
|
|
678
849
|
defaultAgentGuideIgnoredDirectories,
|
|
679
850
|
deepestRepositoryScopeMatch,
|
|
680
851
|
createVerifiedEmbeddingModelLease,
|
|
852
|
+
createTypeSafeReranker,
|
|
681
853
|
createSyntheticRankFusionFixture,
|
|
682
854
|
createRepresentativeRetrievalFixture,
|
|
683
855
|
createOhAdoptionPreparerV1,
|
|
@@ -700,6 +872,7 @@ export {
|
|
|
700
872
|
auditAgentGuideSource,
|
|
701
873
|
auditAgentGuideRepository,
|
|
702
874
|
attestSemanticWarmCache,
|
|
875
|
+
applyRerank,
|
|
703
876
|
analyzeVault,
|
|
704
877
|
analyzeAuthoredRepositoryScopes,
|
|
705
878
|
analyzeAgentContexts,
|
|
@@ -714,6 +887,15 @@ export {
|
|
|
714
887
|
addNoteRelation,
|
|
715
888
|
activePlanStatuses,
|
|
716
889
|
WorkflowRunError,
|
|
890
|
+
WORDCELL_SITE_TERMS_FORMAT_V1,
|
|
891
|
+
WORDCELL_SITE_POSTINGS_FORMAT_V1,
|
|
892
|
+
WORDCELL_SITE_NOTE_FORMAT_V1,
|
|
893
|
+
WORDCELL_SITE_LIMITS_V1,
|
|
894
|
+
WORDCELL_SITE_GRAPH_FORMAT_V1,
|
|
895
|
+
WORDCELL_SITE_FORMAT_V1,
|
|
896
|
+
WORDCELL_SITE_DOCS_FORMAT_V1,
|
|
897
|
+
WORDCELL_SITE_CATALOG_FORMAT_V1,
|
|
898
|
+
WORDCELL_PUBLISH_GENERATOR,
|
|
717
899
|
VaultScanBudgetError,
|
|
718
900
|
VaultAnalysisBudgetError,
|
|
719
901
|
RepositoryScopesError,
|
|
@@ -735,6 +917,7 @@ export {
|
|
|
735
917
|
MAX_SOURCE_INBOX_NOTES,
|
|
736
918
|
MAX_SOURCE_INBOX_CONNECTIONS,
|
|
737
919
|
MAX_SOURCE_DISPOSITION_EVIDENCE,
|
|
920
|
+
MAX_SITE_BYTES,
|
|
738
921
|
MAX_SEMANTIC_DATABASE_IDENTITY_BYTES,
|
|
739
922
|
MAX_SEARCH_RESULTS,
|
|
740
923
|
MAX_SEARCH_RELATED_SEEDS,
|
|
@@ -744,6 +927,9 @@ export {
|
|
|
744
927
|
MAX_SEARCH_CANDIDATES,
|
|
745
928
|
MAX_SCOPED_PERCOLATION_MENTION_PAIRS,
|
|
746
929
|
MAX_SCANNED_NOTES,
|
|
930
|
+
MAX_RERANK_STATE_BYTES,
|
|
931
|
+
MAX_RERANK_SNIPPET_BYTES,
|
|
932
|
+
MAX_RERANK_CANDIDATES,
|
|
747
933
|
MAX_REPOSITORY_SCOPE_UTF8_BYTES,
|
|
748
934
|
MAX_REPOSITORY_SCOPES_UTF8_BYTES,
|
|
749
935
|
MAX_REPOSITORY_SCOPES,
|
|
@@ -758,6 +944,9 @@ export {
|
|
|
758
944
|
MAX_QUERY_METADATA_PATH_SEGMENTS,
|
|
759
945
|
MAX_QUERY_FILTER_VALUES,
|
|
760
946
|
MAX_QUERY_FILTERS,
|
|
947
|
+
MAX_PUBLISH_PATH_COMPONENT_BYTES,
|
|
948
|
+
MAX_PUBLISH_LIST_LIMIT,
|
|
949
|
+
MAX_PUBLISH_LIST_BYTES,
|
|
761
950
|
MAX_PERCOLATION_TEXT_UTF8_BYTES,
|
|
762
951
|
MAX_PERCOLATION_RESULT_UTF8_BYTES,
|
|
763
952
|
MAX_PERCOLATION_RESULT_NODES,
|
|
@@ -802,9 +991,12 @@ export {
|
|
|
802
991
|
GRAPH_LIMITS,
|
|
803
992
|
FrozenEvaluationSnapshotError,
|
|
804
993
|
DEFAULT_WORKFLOW_OUTPUT_BYTES,
|
|
994
|
+
DEFAULT_SYSTEMONE_MODEL,
|
|
995
|
+
DEFAULT_SYSTEMONE_ENDPOINT,
|
|
805
996
|
DEFAULT_SEARCH_RESULTS,
|
|
806
997
|
DEFAULT_REPOSITORY_MEMORY_GROUP_LIMIT,
|
|
807
998
|
DEFAULT_REPOSITORY_MEMORY_DETAIL_LIMIT,
|
|
999
|
+
DEFAULT_PUBLISH_LIST_LIMIT,
|
|
808
1000
|
DEFAULT_PERCOLATION_MIN_SUPPORT,
|
|
809
1001
|
DEFAULT_PERCOLATION_LIMIT,
|
|
810
1002
|
AgentContextRepositoryPathError
|
package/dist/portfolio.js
CHANGED
|
@@ -20,24 +20,26 @@ import {
|
|
|
20
20
|
selectAuthorizedVaults,
|
|
21
21
|
snapshotPortfolioRegistry,
|
|
22
22
|
validateResolvedPortfolioVaults
|
|
23
|
-
} from "./index-
|
|
24
|
-
import"./index-
|
|
25
|
-
import"./index-4j3tt0c3.js";
|
|
23
|
+
} from "./index-avbce90h.js";
|
|
24
|
+
import"./index-2hf27mws.js";
|
|
26
25
|
import"./index-adx6khj5.js";
|
|
27
|
-
import"./index-
|
|
28
|
-
import"./index-
|
|
29
|
-
import"./index-
|
|
30
|
-
import"./index-
|
|
31
|
-
import"./index-0k2x4nn9.js";
|
|
26
|
+
import"./index-hcw140eb.js";
|
|
27
|
+
import"./index-4j3tt0c3.js";
|
|
28
|
+
import"./index-j70m75wd.js";
|
|
29
|
+
import"./index-t2bs9xdr.js";
|
|
32
30
|
import"./index-nd6nynv2.js";
|
|
31
|
+
import"./index-famy7fhs.js";
|
|
32
|
+
import"./index-11621h23.js";
|
|
33
33
|
import"./index-1gwbassd.js";
|
|
34
|
-
import"./index-
|
|
35
|
-
import"./index-
|
|
36
|
-
import"./index-
|
|
34
|
+
import"./index-gm9t95d9.js";
|
|
35
|
+
import"./index-1xxnjn0d.js";
|
|
36
|
+
import"./index-1tm7bgx7.js";
|
|
37
|
+
import"./index-d13v9ckt.js";
|
|
37
38
|
import"./index-48pz4jpc.js";
|
|
38
39
|
import"./index-06c9ctr6.js";
|
|
39
|
-
import"./index-d13v9ckt.js";
|
|
40
40
|
import"./index-5vwpzb5a.js";
|
|
41
|
+
import"./index-x3fthpsc.js";
|
|
42
|
+
import"./index-3rm7cz6h.js";
|
|
41
43
|
import {
|
|
42
44
|
MAX_DOCUMENT_ID_BYTES,
|
|
43
45
|
MAX_PORTFOLIO_NAME_BYTES,
|
|
@@ -49,7 +51,6 @@ import {
|
|
|
49
51
|
portfolioDocumentIdentity,
|
|
50
52
|
portfolioVaultIdentity
|
|
51
53
|
} from "./index-ekpwvbra.js";
|
|
52
|
-
import"./index-1xxnjn0d.js";
|
|
53
54
|
import"./index-z1w83f81.js";
|
|
54
55
|
export {
|
|
55
56
|
validateResolvedPortfolioVaults,
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
WORDCELL_SITE_CATALOG_FORMAT_V1,
|
|
4
|
+
WORDCELL_SITE_DOCS_FORMAT_V1,
|
|
5
|
+
WORDCELL_SITE_FORMAT_V1,
|
|
6
|
+
WORDCELL_SITE_GRAPH_FORMAT_V1,
|
|
7
|
+
WORDCELL_SITE_LIMITS_V1,
|
|
8
|
+
WORDCELL_SITE_NOTE_FORMAT_V1,
|
|
9
|
+
WORDCELL_SITE_POSTINGS_FORMAT_V1,
|
|
10
|
+
WORDCELL_SITE_TERMS_FORMAT_V1,
|
|
11
|
+
parseSiteCatalogV1,
|
|
12
|
+
parseSiteDocsV1,
|
|
13
|
+
parseSiteGraphV1,
|
|
14
|
+
parseSiteManifestV1,
|
|
15
|
+
parseSiteNoteV1,
|
|
16
|
+
parseSitePostingsV1,
|
|
17
|
+
parseSiteTermsV1
|
|
18
|
+
} from "./index-66pshdtx.js";
|
|
19
|
+
import"./index-z1w83f81.js";
|
|
20
|
+
export {
|
|
21
|
+
parseSiteTermsV1,
|
|
22
|
+
parseSitePostingsV1,
|
|
23
|
+
parseSiteNoteV1,
|
|
24
|
+
parseSiteManifestV1,
|
|
25
|
+
parseSiteGraphV1,
|
|
26
|
+
parseSiteDocsV1,
|
|
27
|
+
parseSiteCatalogV1,
|
|
28
|
+
WORDCELL_SITE_TERMS_FORMAT_V1,
|
|
29
|
+
WORDCELL_SITE_POSTINGS_FORMAT_V1,
|
|
30
|
+
WORDCELL_SITE_NOTE_FORMAT_V1,
|
|
31
|
+
WORDCELL_SITE_LIMITS_V1,
|
|
32
|
+
WORDCELL_SITE_GRAPH_FORMAT_V1,
|
|
33
|
+
WORDCELL_SITE_FORMAT_V1,
|
|
34
|
+
WORDCELL_SITE_DOCS_FORMAT_V1,
|
|
35
|
+
WORDCELL_SITE_CATALOG_FORMAT_V1
|
|
36
|
+
};
|