@bodhi-ventures/aiocs 0.5.1 → 0.5.2
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.
|
@@ -532,7 +532,10 @@ var interactionSchema = z.discriminatedUnion("action", [
|
|
|
532
532
|
var clipboardExtractSchema = z.object({
|
|
533
533
|
strategy: z.literal("clipboardButton"),
|
|
534
534
|
interactions: z.array(interactionSchema).min(1),
|
|
535
|
-
clipboardTimeoutMs: positiveIntSchema.default(1e4)
|
|
535
|
+
clipboardTimeoutMs: positiveIntSchema.default(1e4),
|
|
536
|
+
fallback: z.object({
|
|
537
|
+
strategy: z.literal("readability")
|
|
538
|
+
}).optional()
|
|
536
539
|
});
|
|
537
540
|
var selectorExtractSchema = z.object({
|
|
538
541
|
strategy: z.literal("selector"),
|
|
@@ -2727,7 +2730,14 @@ function extractTitleFromMarkdown(markdown) {
|
|
|
2727
2730
|
}
|
|
2728
2731
|
async function extractPage(page, strategy) {
|
|
2729
2732
|
if (strategy.strategy === "clipboardButton") {
|
|
2730
|
-
|
|
2733
|
+
try {
|
|
2734
|
+
return await runClipboardStrategy(page, strategy);
|
|
2735
|
+
} catch (error) {
|
|
2736
|
+
if (strategy.fallback?.strategy === "readability") {
|
|
2737
|
+
return runReadabilityStrategy(page);
|
|
2738
|
+
}
|
|
2739
|
+
throw error;
|
|
2740
|
+
}
|
|
2731
2741
|
}
|
|
2732
2742
|
if (strategy.strategy === "selector") {
|
|
2733
2743
|
return runSelectorStrategy(page, strategy.selector);
|
|
@@ -3987,7 +3997,7 @@ async function startDaemon(input) {
|
|
|
3987
3997
|
// package.json
|
|
3988
3998
|
var package_default = {
|
|
3989
3999
|
name: "@bodhi-ventures/aiocs",
|
|
3990
|
-
version: "0.5.
|
|
4000
|
+
version: "0.5.2",
|
|
3991
4001
|
license: "MIT",
|
|
3992
4002
|
type: "module",
|
|
3993
4003
|
description: "Local-only documentation store, fetcher, and search CLI for AI agents.",
|
package/dist/cli.js
CHANGED
package/dist/mcp-server.js
CHANGED
package/package.json
CHANGED