@hraness/wordcell 0.21.3 → 0.22.1
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 +170 -64
- package/dist/authoring.js +5 -3
- package/dist/{authority-4sp9d552.js → authority-06eqhqam.js} +57 -12
- package/dist/benchmark.js +4 -4
- package/dist/capture.js +6 -5
- package/dist/cli.js +39 -33
- 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 +20 -19
- package/dist/evaluation-kb.js +16 -15
- package/dist/graph-authority.js +5 -5
- package/dist/graph-percolation.js +7 -7
- package/dist/graph.js +1 -1
- package/dist/{index-pbr6rv47.js → index-1k595z6v.js} +6 -6
- package/dist/{index-0k2x4nn9.js → index-233z9wmn.js} +17 -5
- package/dist/index-3agn8scn.js +306 -0
- package/dist/index-4knsp9qj.js +34 -0
- package/dist/index-66pshdtx.js +341 -0
- package/dist/{index-59ssmqqm.js → index-76dbn6pe.js} +1 -1
- package/dist/{index-0rfcqab6.js → index-810nfzdj.js} +617 -66
- package/dist/index-9rf81m0p.js +368 -0
- package/dist/{index-51bap0mq.js → index-bqtqeak3.js} +10 -10
- package/dist/{index-9zcpdbjg.js → index-de2w8crk.js} +13 -13
- package/dist/{index-bgfzwt4h.js → index-djrcc1yf.js} +6 -6
- package/dist/{index-6sw24nvv.js → index-ecqpgr5y.js} +53 -2
- package/dist/{index-van48n3g.js → index-fc4dr114.js} +4 -2
- package/dist/{index-jzcws0zn.js → index-g5vsqmdy.js} +27 -57
- package/dist/index-hmw17zaa.js +1985 -0
- package/dist/index-j70m75wd.js +217 -0
- package/dist/{index-nd6nynv2.js → index-jk1sgx36.js} +1 -1
- package/dist/{index-3ehtt59c.js → index-n386evxj.js} +1 -1
- package/dist/{index-vdw5yjfa.js → index-q7tbg07z.js} +110 -20
- package/dist/{index-ekpwvbra.js → index-qbssx940.js} +1 -2
- package/dist/{index-115b07ap.js → index-rr9kzq4n.js} +5 -5
- package/dist/{index-11621h23.js → index-tf4wzjew.js} +1 -1
- package/dist/{index-why54q5p.js → index-vnybgywh.js} +4 -4
- package/dist/{index-bcfn9xah.js → index-xv80vzfp.js} +7 -7
- package/dist/index.js +289 -95
- package/dist/percolate.js +2 -2
- package/dist/portfolio.js +16 -15
- 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 +16 -13
- package/dist/search.js +3 -3
- package/dist/semantic.js +5 -5
- package/dist/{support-vm4mkw0k.js → support-1rh2d7mt.js} +38 -32
- package/dist/workflows/decision-context.js +15 -14
- package/dist/workflows/index.js +15 -14
- package/package.json +65 -6
- package/skills/wordcell/AGENTS.md +1 -0
- package/skills/wordcell/SKILL.md +2 -1
- package/skills/wordcell/agents/openai.yaml +1 -1
- package/skills/wordcell/references/publish.md +127 -0
- package/skills/wordcell/references/query.md +22 -0
- package/skills/wordcell/references/refresh.md +14 -0
- package/src/authoring-model.ts +29 -0
- package/src/authoring-program.ts +38 -3
- package/src/authoring.ts +17 -3
- package/src/cli-program.ts +441 -12
- package/src/graph.ts +1 -1
- 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/vault.ts +23 -9
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-n386evxj.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-1k595z6v.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-q7tbg07z.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-
|
|
70
|
+
} from "./index-rr9kzq4n.js";
|
|
71
|
+
import"./index-4j3tt0c3.js";
|
|
60
72
|
import {
|
|
61
|
-
|
|
62
|
-
|
|
73
|
+
MAX_RERANK_CANDIDATES,
|
|
74
|
+
MAX_RERANK_SNIPPET_BYTES,
|
|
75
|
+
MAX_RERANK_STATE_BYTES,
|
|
76
|
+
applyRerank
|
|
77
|
+
} from "./index-j70m75wd.js";
|
|
63
78
|
import {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
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-djrcc1yf.js";
|
|
86
98
|
import {
|
|
87
99
|
DEFAULT_PERCOLATION_LIMIT,
|
|
88
100
|
DEFAULT_PERCOLATION_MIN_SUPPORT,
|
|
@@ -103,7 +115,19 @@ import {
|
|
|
103
115
|
parsePercolationResultV1,
|
|
104
116
|
parsePercolationResultV2,
|
|
105
117
|
percolateVault
|
|
106
|
-
} from "./index-
|
|
118
|
+
} from "./index-jk1sgx36.js";
|
|
119
|
+
import {
|
|
120
|
+
createGraphSnapshot,
|
|
121
|
+
openGraphAuthority,
|
|
122
|
+
queryGraph,
|
|
123
|
+
rebuildGraph,
|
|
124
|
+
verifyGraph
|
|
125
|
+
} from "./index-xv80vzfp.js";
|
|
126
|
+
import {
|
|
127
|
+
GRAPH_LIMITS,
|
|
128
|
+
GraphAuthorityError,
|
|
129
|
+
validateGraphQueryRequest
|
|
130
|
+
} from "./index-tf4wzjew.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-vnybgywh.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-hmw17zaa.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-233z9wmn.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,32 @@ 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
|
+
updateNoteBody
|
|
298
|
+
} from "./index-ecqpgr5y.js";
|
|
299
|
+
import"./index-3rm7cz6h.js";
|
|
255
300
|
import {
|
|
256
301
|
MAX_ANALYZED_NOTES,
|
|
257
302
|
MAX_CONNECTION_OBSERVATIONS,
|
|
@@ -271,13 +316,124 @@ import {
|
|
|
271
316
|
replaceCatalog,
|
|
272
317
|
searchableMarkdown,
|
|
273
318
|
wikiLinks
|
|
274
|
-
} from "./index-
|
|
275
|
-
import"./index-1xxnjn0d.js";
|
|
319
|
+
} from "./index-qbssx940.js";
|
|
276
320
|
import"./index-z1w83f81.js";
|
|
277
321
|
// src/oh-adoption.ts
|
|
278
322
|
import { createHash } from "crypto";
|
|
279
323
|
import { posix } from "path";
|
|
280
|
-
import { canonicalJson, canonicalSha256 } from "@hraness/oh";
|
|
324
|
+
import { canonicalJson as canonicalJson2, canonicalSha256 } from "@hraness/oh";
|
|
325
|
+
|
|
326
|
+
// src/oh/canonical-rust.ts
|
|
327
|
+
import { canonicalJson } from "@hraness/oh";
|
|
328
|
+
import {
|
|
329
|
+
OH_CANONICAL_RAW_WASM_BASE64,
|
|
330
|
+
OH_CANONICAL_RAW_WASM_SHA256
|
|
331
|
+
} from "@hraness/oh/canonical-rust/artifact";
|
|
332
|
+
import { emitOhRustFallback } from "@hraness/oh/rust-fallback";
|
|
333
|
+
var BASE64_ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
334
|
+
function decodeBase64(text) {
|
|
335
|
+
const clean = text.replace(/=+$/u, "");
|
|
336
|
+
const bytes = new Uint8Array(Math.floor(clean.length * 3 / 4));
|
|
337
|
+
let bits = 0;
|
|
338
|
+
let bitCount = 0;
|
|
339
|
+
let offset = 0;
|
|
340
|
+
for (const character of clean) {
|
|
341
|
+
const value = BASE64_ALPHABET.indexOf(character);
|
|
342
|
+
if (value < 0)
|
|
343
|
+
throw new Error("invalid base64 artifact");
|
|
344
|
+
bits = bits << 6 | value;
|
|
345
|
+
bitCount += 6;
|
|
346
|
+
if (bitCount >= 8) {
|
|
347
|
+
bitCount -= 8;
|
|
348
|
+
bytes[offset] = bits >> bitCount & 255;
|
|
349
|
+
offset += 1;
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
if (offset !== bytes.length)
|
|
353
|
+
throw new Error("base64 artifact length mismatch");
|
|
354
|
+
return bytes;
|
|
355
|
+
}
|
|
356
|
+
var cached;
|
|
357
|
+
function engine() {
|
|
358
|
+
if (cached !== undefined)
|
|
359
|
+
return cached;
|
|
360
|
+
try {
|
|
361
|
+
const bytes = decodeBase64(OH_CANONICAL_RAW_WASM_BASE64);
|
|
362
|
+
const instance = new WebAssembly.Instance(new WebAssembly.Module(bytes.buffer));
|
|
363
|
+
cached = instance.exports;
|
|
364
|
+
} catch {
|
|
365
|
+
cached = null;
|
|
366
|
+
}
|
|
367
|
+
return cached;
|
|
368
|
+
}
|
|
369
|
+
var encoder = new TextEncoder;
|
|
370
|
+
var decoder = new TextDecoder;
|
|
371
|
+
function runEngine(text, call) {
|
|
372
|
+
const exports = engine();
|
|
373
|
+
if (exports === null)
|
|
374
|
+
return null;
|
|
375
|
+
const input = encoder.encode(text);
|
|
376
|
+
if (input.length === 0)
|
|
377
|
+
return null;
|
|
378
|
+
const inputPtr = exports.oh_canonical_alloc(input.length);
|
|
379
|
+
if (inputPtr === 0)
|
|
380
|
+
return null;
|
|
381
|
+
let resultPtr = 0;
|
|
382
|
+
let resultCapacity = 0;
|
|
383
|
+
try {
|
|
384
|
+
new Uint8Array(exports.memory.buffer, inputPtr, input.length).set(input);
|
|
385
|
+
resultPtr = call(exports, inputPtr, input.length);
|
|
386
|
+
if (resultPtr === 0)
|
|
387
|
+
return null;
|
|
388
|
+
const memoryLength = exports.memory.buffer.byteLength;
|
|
389
|
+
if (resultPtr > memoryLength - 12)
|
|
390
|
+
return null;
|
|
391
|
+
const view = new DataView(exports.memory.buffer, resultPtr, 12);
|
|
392
|
+
const capacity = view.getUint32(0, true);
|
|
393
|
+
const status = view.getUint32(4, true);
|
|
394
|
+
const payloadLength = view.getUint32(8, true);
|
|
395
|
+
if (capacity < 12 || capacity > memoryLength - resultPtr || payloadLength > capacity - 12)
|
|
396
|
+
return null;
|
|
397
|
+
resultCapacity = capacity;
|
|
398
|
+
if (status !== 0 || payloadLength === 0)
|
|
399
|
+
return null;
|
|
400
|
+
return decoder.decode(new Uint8Array(exports.memory.buffer, resultPtr + 12, payloadLength));
|
|
401
|
+
} catch {
|
|
402
|
+
return null;
|
|
403
|
+
} finally {
|
|
404
|
+
if (resultPtr !== 0 && resultCapacity > 0)
|
|
405
|
+
exports.oh_canonical_free(resultPtr, resultCapacity);
|
|
406
|
+
exports.oh_canonical_free(inputPtr, input.length);
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
function canonicalJsonRust(value) {
|
|
410
|
+
const json = JSON.stringify(value);
|
|
411
|
+
if (json === undefined)
|
|
412
|
+
return null;
|
|
413
|
+
const rust = runEngine(json, (exports, ptr, len) => exports.oh_canonical_json(ptr, len));
|
|
414
|
+
if (rust === null)
|
|
415
|
+
return null;
|
|
416
|
+
try {
|
|
417
|
+
if (rust !== canonicalJson(value))
|
|
418
|
+
return null;
|
|
419
|
+
} catch {
|
|
420
|
+
return null;
|
|
421
|
+
}
|
|
422
|
+
return rust;
|
|
423
|
+
}
|
|
424
|
+
function canonicalSha256Rust(value) {
|
|
425
|
+
if (canonicalJsonRust(value) === null)
|
|
426
|
+
return null;
|
|
427
|
+
const json = JSON.stringify(value);
|
|
428
|
+
if (json === undefined)
|
|
429
|
+
return null;
|
|
430
|
+
return runEngine(json, (exports, ptr, len) => exports.oh_canonical_sha256(ptr, len));
|
|
431
|
+
}
|
|
432
|
+
function emitCanonicalRustFallback(reason, inputClass) {
|
|
433
|
+
emitOhRustFallback({ tag: "oh-canonical-rust-fallback", reason, inputClass });
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
// src/oh-adoption.ts
|
|
281
437
|
import {
|
|
282
438
|
parseOhHeadV1,
|
|
283
439
|
parseOhStoreBindingV1,
|
|
@@ -451,7 +607,7 @@ function parseHostPolicy(value) {
|
|
|
451
607
|
}
|
|
452
608
|
function verifyCapsule(value, expectedSource) {
|
|
453
609
|
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(
|
|
610
|
+
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
611
|
return null;
|
|
456
612
|
const verified = verifyOhDependencyClosureAgainstV1(value, {
|
|
457
613
|
binding: expectedSource.binding,
|
|
@@ -563,7 +719,11 @@ function prepareWithPolicy(value, policy) {
|
|
|
563
719
|
transformations,
|
|
564
720
|
v: 1
|
|
565
721
|
};
|
|
566
|
-
const
|
|
722
|
+
const rustSha256 = canonicalSha256Rust(manifest);
|
|
723
|
+
if (rustSha256 === null) {
|
|
724
|
+
emitCanonicalRustFallback("canonicalSha256Rust", "object");
|
|
725
|
+
}
|
|
726
|
+
const candidateSha256 = rustSha256 ?? canonicalSha256(manifest);
|
|
567
727
|
const markdown = renderMarkdown(manifest, candidateSha256);
|
|
568
728
|
if (Buffer.byteLength(markdown, "utf8") > MAX_CAPSULE_BYTES) {
|
|
569
729
|
throw new RangeError("The adoption candidate exceeds its Markdown byte limit.");
|
|
@@ -597,14 +757,17 @@ export {
|
|
|
597
757
|
validateGitHistoryForNotesRequest,
|
|
598
758
|
validateGitHistoryForNotesOptions,
|
|
599
759
|
validateAttachmentReferences,
|
|
760
|
+
updateNoteBody,
|
|
600
761
|
terminalPlanStatuses,
|
|
601
762
|
sourceInbox,
|
|
602
763
|
sha256EmbeddingModelFile,
|
|
764
|
+
serializeSiteFile,
|
|
603
765
|
semanticDatabasePath,
|
|
604
766
|
searchableMarkdown,
|
|
605
767
|
searchSemanticVault,
|
|
606
768
|
searchGitHistory,
|
|
607
769
|
searchExactVault,
|
|
770
|
+
searchEvidenceRank,
|
|
608
771
|
scanVault,
|
|
609
772
|
runWorkflow,
|
|
610
773
|
runRetrievalEvaluation,
|
|
@@ -613,6 +776,7 @@ export {
|
|
|
613
776
|
repositoryScopeMatchesPath,
|
|
614
777
|
repositoryMemoryGroupKeys,
|
|
615
778
|
replaceCatalog,
|
|
779
|
+
renderPublishReportText,
|
|
616
780
|
renderCatalog,
|
|
617
781
|
removeNoteRelation,
|
|
618
782
|
refreshVault,
|
|
@@ -623,9 +787,18 @@ export {
|
|
|
623
787
|
queryVault,
|
|
624
788
|
queryGraph,
|
|
625
789
|
qmdIndexerVersion,
|
|
790
|
+
publishVault,
|
|
791
|
+
projectVault,
|
|
626
792
|
planStatuses,
|
|
627
793
|
percolateWithGraph,
|
|
628
794
|
percolateVault,
|
|
795
|
+
parseSiteTermsV1,
|
|
796
|
+
parseSitePostingsV1,
|
|
797
|
+
parseSiteNoteV1,
|
|
798
|
+
parseSiteManifestV1,
|
|
799
|
+
parseSiteGraphV1,
|
|
800
|
+
parseSiteDocsV1,
|
|
801
|
+
parseSiteCatalogV1,
|
|
629
802
|
parseRetrievalEvaluationCorpus,
|
|
630
803
|
parsePercolationResultV2,
|
|
631
804
|
parsePercolationResultV1,
|
|
@@ -678,6 +851,7 @@ export {
|
|
|
678
851
|
defaultAgentGuideIgnoredDirectories,
|
|
679
852
|
deepestRepositoryScopeMatch,
|
|
680
853
|
createVerifiedEmbeddingModelLease,
|
|
854
|
+
createTypeSafeReranker,
|
|
681
855
|
createSyntheticRankFusionFixture,
|
|
682
856
|
createRepresentativeRetrievalFixture,
|
|
683
857
|
createOhAdoptionPreparerV1,
|
|
@@ -700,6 +874,7 @@ export {
|
|
|
700
874
|
auditAgentGuideSource,
|
|
701
875
|
auditAgentGuideRepository,
|
|
702
876
|
attestSemanticWarmCache,
|
|
877
|
+
applyRerank,
|
|
703
878
|
analyzeVault,
|
|
704
879
|
analyzeAuthoredRepositoryScopes,
|
|
705
880
|
analyzeAgentContexts,
|
|
@@ -714,6 +889,15 @@ export {
|
|
|
714
889
|
addNoteRelation,
|
|
715
890
|
activePlanStatuses,
|
|
716
891
|
WorkflowRunError,
|
|
892
|
+
WORDCELL_SITE_TERMS_FORMAT_V1,
|
|
893
|
+
WORDCELL_SITE_POSTINGS_FORMAT_V1,
|
|
894
|
+
WORDCELL_SITE_NOTE_FORMAT_V1,
|
|
895
|
+
WORDCELL_SITE_LIMITS_V1,
|
|
896
|
+
WORDCELL_SITE_GRAPH_FORMAT_V1,
|
|
897
|
+
WORDCELL_SITE_FORMAT_V1,
|
|
898
|
+
WORDCELL_SITE_DOCS_FORMAT_V1,
|
|
899
|
+
WORDCELL_SITE_CATALOG_FORMAT_V1,
|
|
900
|
+
WORDCELL_PUBLISH_GENERATOR,
|
|
717
901
|
VaultScanBudgetError,
|
|
718
902
|
VaultAnalysisBudgetError,
|
|
719
903
|
RepositoryScopesError,
|
|
@@ -735,6 +919,7 @@ export {
|
|
|
735
919
|
MAX_SOURCE_INBOX_NOTES,
|
|
736
920
|
MAX_SOURCE_INBOX_CONNECTIONS,
|
|
737
921
|
MAX_SOURCE_DISPOSITION_EVIDENCE,
|
|
922
|
+
MAX_SITE_BYTES,
|
|
738
923
|
MAX_SEMANTIC_DATABASE_IDENTITY_BYTES,
|
|
739
924
|
MAX_SEARCH_RESULTS,
|
|
740
925
|
MAX_SEARCH_RELATED_SEEDS,
|
|
@@ -744,6 +929,9 @@ export {
|
|
|
744
929
|
MAX_SEARCH_CANDIDATES,
|
|
745
930
|
MAX_SCOPED_PERCOLATION_MENTION_PAIRS,
|
|
746
931
|
MAX_SCANNED_NOTES,
|
|
932
|
+
MAX_RERANK_STATE_BYTES,
|
|
933
|
+
MAX_RERANK_SNIPPET_BYTES,
|
|
934
|
+
MAX_RERANK_CANDIDATES,
|
|
747
935
|
MAX_REPOSITORY_SCOPE_UTF8_BYTES,
|
|
748
936
|
MAX_REPOSITORY_SCOPES_UTF8_BYTES,
|
|
749
937
|
MAX_REPOSITORY_SCOPES,
|
|
@@ -758,6 +946,9 @@ export {
|
|
|
758
946
|
MAX_QUERY_METADATA_PATH_SEGMENTS,
|
|
759
947
|
MAX_QUERY_FILTER_VALUES,
|
|
760
948
|
MAX_QUERY_FILTERS,
|
|
949
|
+
MAX_PUBLISH_PATH_COMPONENT_BYTES,
|
|
950
|
+
MAX_PUBLISH_LIST_LIMIT,
|
|
951
|
+
MAX_PUBLISH_LIST_BYTES,
|
|
761
952
|
MAX_PERCOLATION_TEXT_UTF8_BYTES,
|
|
762
953
|
MAX_PERCOLATION_RESULT_UTF8_BYTES,
|
|
763
954
|
MAX_PERCOLATION_RESULT_NODES,
|
|
@@ -802,9 +993,12 @@ export {
|
|
|
802
993
|
GRAPH_LIMITS,
|
|
803
994
|
FrozenEvaluationSnapshotError,
|
|
804
995
|
DEFAULT_WORKFLOW_OUTPUT_BYTES,
|
|
996
|
+
DEFAULT_SYSTEMONE_MODEL,
|
|
997
|
+
DEFAULT_SYSTEMONE_ENDPOINT,
|
|
805
998
|
DEFAULT_SEARCH_RESULTS,
|
|
806
999
|
DEFAULT_REPOSITORY_MEMORY_GROUP_LIMIT,
|
|
807
1000
|
DEFAULT_REPOSITORY_MEMORY_DETAIL_LIMIT,
|
|
1001
|
+
DEFAULT_PUBLISH_LIST_LIMIT,
|
|
808
1002
|
DEFAULT_PERCOLATION_MIN_SUPPORT,
|
|
809
1003
|
DEFAULT_PERCOLATION_LIMIT,
|
|
810
1004
|
AgentContextRepositoryPathError
|
package/dist/percolate.js
CHANGED
|
@@ -19,8 +19,8 @@ import {
|
|
|
19
19
|
parsePercolationResultV1,
|
|
20
20
|
parsePercolationResultV2,
|
|
21
21
|
percolateVault
|
|
22
|
-
} from "./index-
|
|
23
|
-
import"./index-
|
|
22
|
+
} from "./index-jk1sgx36.js";
|
|
23
|
+
import"./index-qbssx940.js";
|
|
24
24
|
import"./index-z1w83f81.js";
|
|
25
25
|
export {
|
|
26
26
|
percolateVault,
|
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-bqtqeak3.js";
|
|
24
|
+
import"./index-q7tbg07z.js";
|
|
26
25
|
import"./index-adx6khj5.js";
|
|
27
|
-
import"./index-
|
|
28
|
-
import"./index-
|
|
29
|
-
import"./index-
|
|
30
|
-
import"./index-
|
|
31
|
-
import"./index-
|
|
32
|
-
import"./index-
|
|
26
|
+
import"./index-rr9kzq4n.js";
|
|
27
|
+
import"./index-4j3tt0c3.js";
|
|
28
|
+
import"./index-j70m75wd.js";
|
|
29
|
+
import"./index-djrcc1yf.js";
|
|
30
|
+
import"./index-jk1sgx36.js";
|
|
31
|
+
import"./index-xv80vzfp.js";
|
|
32
|
+
import"./index-tf4wzjew.js";
|
|
33
33
|
import"./index-1gwbassd.js";
|
|
34
|
-
import"./index-
|
|
35
|
-
import"./index-
|
|
36
|
-
import"./index-
|
|
34
|
+
import"./index-vnybgywh.js";
|
|
35
|
+
import"./index-1xxnjn0d.js";
|
|
36
|
+
import"./index-233z9wmn.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,
|
|
@@ -48,8 +50,7 @@ import {
|
|
|
48
50
|
parseVaultKey,
|
|
49
51
|
portfolioDocumentIdentity,
|
|
50
52
|
portfolioVaultIdentity
|
|
51
|
-
} from "./index-
|
|
52
|
-
import"./index-1xxnjn0d.js";
|
|
53
|
+
} from "./index-qbssx940.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
|
+
};
|