@bodhi-ventures/aiocs 0.5.0 → 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.0",
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-6CY4TABN.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-6CY4TABN.js";
29
+ } from "./chunk-AIAE4E7V.js";
30
30
 
31
31
  // src/mcp-server.ts
32
32
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
@@ -65,7 +65,7 @@ Once those symlinks exist, Codex can load `aiocs` for normal local-doc lookup an
65
65
  ## Subagent options
66
66
 
67
67
  The repo ships a ready-to-copy specialist definition at
68
- [`agents/aiocs-docs-specialist.toml`](../agents/aiocs-docs-specialist.toml).
68
+ [`agents/aiocs-specialist.toml`](../agents/aiocs-specialist.toml).
69
69
 
70
70
  It points at the globally installed `aiocs-mcp` binary so Codex uses the published package by default.
71
71
 
@@ -74,7 +74,7 @@ To expose that agent to Codex:
74
74
  ```bash
75
75
  AIOCS_REPO=/absolute/path/to/your/aiocs/checkout
76
76
  mkdir -p ~/.codex/agents
77
- ln -sfn "$AIOCS_REPO/agents/aiocs-docs-specialist.toml" ~/.codex/agents/aiocs-docs-specialist.toml
77
+ ln -sfn "$AIOCS_REPO/agents/aiocs-specialist.toml" ~/.codex/agents/aiocs-specialist.toml
78
78
  ```
79
79
 
80
80
  ## Suggested Codex flows
@@ -86,7 +86,7 @@ aiocs --json doctor
86
86
  aiocs --json init --no-fetch
87
87
  ```
88
88
 
89
- Local docs lookup:
89
+ Local aiocs lookup:
90
90
 
91
91
  ```bash
92
92
  aiocs --json source list
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bodhi-ventures/aiocs",
3
- "version": "0.5.0",
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.",
@@ -33,7 +33,7 @@ Use this skill when you need authoritative local documentation lookup through th
33
33
  1. Prefer `aiocs-mcp` when an MCP client can use it directly.
34
34
  2. Otherwise use the CLI with the root `--json` flag.
35
35
  3. Avoid parsing human-formatted CLI output unless there is no alternative.
36
- 4. Assume `docs` and `aiocs-mcp` come from the globally installed `@bodhi-ventures/aiocs` package unless the user explicitly asks for a checkout-local development build.
36
+ 4. Assume `aiocs` and `aiocs-mcp` come from the globally installed `@bodhi-ventures/aiocs` package unless the user explicitly asks for a checkout-local development build.
37
37
  5. Use `npx -y -p @bodhi-ventures/aiocs ...` only as a fallback when the global install is unavailable.
38
38
 
39
39
  ## Search defaults for agents
@@ -30,7 +30,7 @@ Use this skill when you need to add, refresh, repair, or otherwise mutate `aiocs
30
30
 
31
31
  1. Prefer `aiocs-mcp` when an MCP client can use it directly.
32
32
  2. Otherwise use the CLI with the root `--json` flag.
33
- 3. Assume `docs` and `aiocs-mcp` come from the globally installed `@bodhi-ventures/aiocs` package unless the user explicitly asks for a checkout-local development build.
33
+ 3. Assume `aiocs` and `aiocs-mcp` come from the globally installed `@bodhi-ventures/aiocs` package unless the user explicitly asks for a checkout-local development build.
34
34
  4. Use `npx -y -p @bodhi-ventures/aiocs ...` only as a fallback when the global install is unavailable.
35
35
 
36
36
  ## User-managed sources
@@ -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: