@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
- return runClipboardStrategy(page, strategy);
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.1",
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
@@ -31,7 +31,7 @@ import {
31
31
  unlinkProjectSources,
32
32
  upsertSourceFromSpecFile,
33
33
  verifyCoverage
34
- } from "./chunk-TSTOA3Q6.js";
34
+ } from "./chunk-AIAE4E7V.js";
35
35
 
36
36
  // src/cli.ts
37
37
  import { Command, CommanderError as CommanderError2 } from "commander";
@@ -26,7 +26,7 @@ import {
26
26
  unlinkProjectSources,
27
27
  upsertSourceFromSpecFile,
28
28
  verifyCoverage
29
- } from "./chunk-TSTOA3Q6.js";
29
+ } from "./chunk-AIAE4E7V.js";
30
30
 
31
31
  // src/mcp-server.ts
32
32
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bodhi-ventures/aiocs",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "description": "Local-only documentation store, fetcher, and search CLI for AI agents.",
@@ -14,6 +14,8 @@ extract:
14
14
  interactions:
15
15
  - action: click
16
16
  selector: button[aria-label="Copy page"]
17
+ fallback:
18
+ strategy: readability
17
19
  normalize:
18
20
  prependSourceComment: true
19
21
  schedule: