@effect-x/ultimate-search 0.1.1 → 0.1.3

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@effect-x/ultimate-search",
3
- "version": "0.1.1",
4
- "description": "CLI-first web search and MCP server for agents, built with Effect.",
3
+ "version": "0.1.3",
4
+ "description": "CLI-first web search toolkit and read-only MCP server for agents.",
5
5
  "keywords": [
6
6
  "agent",
7
7
  "cli",
@@ -11,18 +11,18 @@
11
11
  "search",
12
12
  "tavily"
13
13
  ],
14
+ "homepage": "https://github.com/effect-anything/ultimate-search#readme",
15
+ "bugs": {
16
+ "url": "https://github.com/effect-anything/ultimate-search/issues"
17
+ },
14
18
  "license": "MIT",
15
- "repository": {
16
- "type": "git",
17
- "url": "https://github.com/effect-anything/ultimate-search"
18
- },
19
- "homepage": "https://github.com/effect-anything/ultimate-search#readme",
20
- "bugs": {
21
- "url": "https://github.com/effect-anything/ultimate-search/issues"
22
- },
23
19
  "contributors": [
24
20
  "xesrevinu"
25
21
  ],
22
+ "repository": {
23
+ "type": "git",
24
+ "url": "git+https://github.com/effect-anything/ultimate-search.git"
25
+ },
26
26
  "bin": {
27
27
  "ultimate-search": "dist/cli.js"
28
28
  },
@@ -34,37 +34,43 @@
34
34
  "SKILL.md"
35
35
  ],
36
36
  "type": "module",
37
+ "sideEffects": false,
37
38
  "publishConfig": {
38
39
  "access": "public",
39
40
  "provenance": true
40
41
  },
41
42
  "scripts": {
42
- "prepare": "effect-language-service patch && node ./tools/setup-husky.mjs",
43
- "test": "vitest --silent 'passed-only'",
44
- "madge": "madge --circular --ts-config ./tsconfig.json --no-color --no-spinner --extensions 'ts,tsx' ./src",
45
- "check": "concurrently \"oxlint\" \"tsgo --noEmit\" \"bun run test --watch false\" \"bun run madge\" \"effect-language-service diagnostics --project tsconfig.json\"",
46
- "fix": "concurrently \"oxlint --fix\" \"oxfmt\"",
47
- "build": "node ./tools/build-cli.mjs"
43
+ "prepare": "lefthook install",
44
+ "build": "tsdown",
45
+ "dev": "tsdown --watch",
46
+ "lint": "oxlint .",
47
+ "format": "oxfmt .",
48
+ "format:check": "oxfmt --check .",
49
+ "typecheck": "tsc --noEmit",
50
+ "test": "vitest run",
51
+ "check": "bun run lint && bun run format:check && bun run typecheck && bun run test && bun run build",
52
+ "changeset": "changeset",
53
+ "version-packages": "changeset version",
54
+ "release": "changeset publish --provenance",
55
+ "prepack": "bun run build"
48
56
  },
49
57
  "dependencies": {
50
- "@effect/platform-node": "4.0.0-beta.31"
58
+ "@effect/platform-node": "4.0.0-beta.31",
59
+ "effect": "4.0.0-beta.31"
51
60
  },
52
61
  "devDependencies": {
53
62
  "@changesets/cli": "^2.29.7",
54
- "@effect/language-service": "^0.79.0",
55
63
  "@effect/vitest": "4.0.0-beta.31",
56
64
  "@types/bun": "^1.3.10",
57
- "@typescript/native-preview": "7.0.0-dev.20260311.1",
58
- "concurrently": "^9.2.1",
59
- "effect": "4.0.0-beta.31",
60
- "husky": "^9.1.7",
61
- "lint-staged": "^16.3.3",
62
- "madge": "^8.0.0",
65
+ "lefthook": "^1.11.13",
63
66
  "oxfmt": "^0.38.0",
64
67
  "oxlint": "^1.53.0",
65
- "typescript": "^5.9.3"
68
+ "tsdown": "^0.15.5",
69
+ "typescript": "^5.9.3",
70
+ "vitest": "^4.1.0"
66
71
  },
67
72
  "engines": {
73
+ "bun": ">=1.3.10",
68
74
  "node": ">=24"
69
75
  }
70
76
  }
@@ -2,10 +2,7 @@ import { Effect, Layer } from "effect";
2
2
  import { Command, Flag } from "effect/unstable/cli";
3
3
  import { UltimateSearchConfig } from "../config/settings";
4
4
  import { FirecrawlProviderClient } from "../providers/firecrawl/client";
5
- import {
6
- FetchContentFormatSchema,
7
- TavilyExtractDepthSchema,
8
- } from "../providers/tavily/schema";
5
+ import { FetchContentFormatSchema, TavilyExtractDepthSchema } from "../providers/tavily/schema";
9
6
  import { TavilyProviderClient } from "../providers/tavily/client";
10
7
  import { FirecrawlFetch } from "../services/firecrawl-fetch";
11
8
  import { TavilyExtract } from "../services/tavily-extract";
@@ -10,10 +10,7 @@ import {
10
10
  } from "../providers/tavily/schema";
11
11
  import { TavilyProviderClient } from "../providers/tavily/client";
12
12
  import { TavilyMap } from "../services/tavily-map";
13
- import {
14
- optionalIntegerFlagWithSchema,
15
- optionalTrimmedTextFlag,
16
- } from "../shared/cli-flags";
13
+ import { optionalIntegerFlagWithSchema, optionalTrimmedTextFlag } from "../shared/cli-flags";
17
14
  import { runCommandWithOutput } from "../shared/command-output";
18
15
  import { outputFlag } from "../shared/output";
19
16
  import { absoluteUrlStringSchema } from "../shared/schema";
@@ -24,10 +21,7 @@ const mapCommandLayer = TavilyMap.layer.pipe(
24
21
  );
25
22
 
26
23
  const renderHumanMapResult = (result: TavilyMapResponse) => {
27
- const lines = [
28
- `Base URL: ${result.base_url}`,
29
- `Discovered URLs: ${result.results.length}`,
30
- ];
24
+ const lines = [`Base URL: ${result.base_url}`, `Discovered URLs: ${result.results.length}`];
31
25
 
32
26
  if (result.response_time !== undefined) {
33
27
  lines.push(`Response time: ${result.response_time}s`);
@@ -45,10 +45,7 @@ export const commandSearchDual = Command.make(
45
45
  TavilySearchDepthSchema.literals,
46
46
  "Optional Tavily search depth.",
47
47
  ),
48
- maxResults: optionalIntegerFlag(
49
- "max-results",
50
- "Optional number of Tavily results to return.",
51
- ),
48
+ maxResults: optionalIntegerFlag("max-results", "Optional number of Tavily results to return."),
52
49
  topic: optionalChoiceFlag(
53
50
  "topic",
54
51
  TavilySearchTopicSchema.literals,
@@ -56,10 +56,7 @@ export const commandSearchTavily = Command.make(
56
56
  TavilySearchDepthSchema.literals,
57
57
  "Optional Tavily search depth.",
58
58
  ),
59
- maxResults: optionalIntegerFlag(
60
- "max-results",
61
- "Optional number of Tavily results to return.",
62
- ),
59
+ maxResults: optionalIntegerFlag("max-results", "Optional number of Tavily results to return."),
63
60
  topic: optionalChoiceFlag(
64
61
  "topic",
65
62
  TavilySearchTopicSchema.literals,
@@ -22,8 +22,7 @@ export const GrokChatCompletionRequestSchema = Schema.Struct({
22
22
  messages: Schema.NonEmptyArray(GrokMessageSchema),
23
23
  });
24
24
 
25
- export type GrokChatCompletionRequest =
26
- typeof GrokChatCompletionRequestSchema.Type;
25
+ export type GrokChatCompletionRequest = typeof GrokChatCompletionRequestSchema.Type;
27
26
 
28
27
  export const GrokChatCompletionResponseSchema = Schema.Struct({
29
28
  model: Schema.String,
@@ -35,15 +34,14 @@ export const GrokChatCompletionResponseSchema = Schema.Struct({
35
34
  usage: GrokUsageSchema,
36
35
  });
37
36
 
38
- export type GrokChatCompletionResponse =
39
- typeof GrokChatCompletionResponseSchema.Type;
37
+ export type GrokChatCompletionResponse = typeof GrokChatCompletionResponseSchema.Type;
40
38
 
41
39
  export class GrokSearchInput extends Schema.Class<GrokSearchInput>("GrokSearchInput")({
42
40
  query: trimmedNonEmptyStringSchema("query must be a non-empty string"),
43
41
  platform: Schema.Option(Schema.NonEmptyString),
44
42
  model: Schema.Option(Schema.NonEmptyString),
45
43
  }) {
46
- static decodeEffect = Schema.decodeUnknownEffect(GrokSearchInput)
44
+ static decodeEffect = Schema.decodeUnknownEffect(GrokSearchInput);
47
45
  }
48
46
 
49
47
  export interface GrokSearchResult {
@@ -5,10 +5,7 @@ import { ProviderContentError, type UltimateSearchError } from "../shared/errors
5
5
  import type { ServicesReturns } from "../shared/effect";
6
6
  import type { FetchedPage, WebFetchInput } from "./web-fetch-schema";
7
7
 
8
- const normalizeContent = (
9
- response: FirecrawlScrapeResponse,
10
- format: WebFetchInput["format"],
11
- ) => {
8
+ const normalizeContent = (response: FirecrawlScrapeResponse, format: WebFetchInput["format"]) => {
12
9
  const data = response.data;
13
10
 
14
11
  if (data == null) {
@@ -1,10 +1,7 @@
1
1
  import { Effect, Layer, Option, Schema } from "effect";
2
2
  import { McpServer, Tool, Toolkit } from "effect/unstable/ai";
3
3
  import { UltimateSearchConfig } from "../config/settings";
4
- import {
5
- GrokSearchInput,
6
- GrokSearchResultSchema,
7
- } from "../providers/grok/schema";
4
+ import { GrokSearchInput, GrokSearchResultSchema } from "../providers/grok/schema";
8
5
  import { GrokProviderClient } from "../providers/grok/client";
9
6
  import {
10
7
  FetchContentFormatSchema,
@@ -12,9 +12,7 @@ export const FetchBackendSchema = Schema.Literals(["tavily", "firecrawl"] as con
12
12
  export type FetchBackend = typeof FetchBackendSchema.Type;
13
13
 
14
14
  export class WebFetchInput extends Schema.Class<WebFetchInput>("WebFetchInput")({
15
- urls: Schema.NonEmptyArray(
16
- absoluteUrlStringSchema("url must be an absolute URL"),
17
- ),
15
+ urls: Schema.NonEmptyArray(absoluteUrlStringSchema("url must be an absolute URL")),
18
16
  depth: TavilyExtractDepthSchema,
19
17
  format: FetchContentFormatSchema,
20
18
  }) {
@@ -9,11 +9,7 @@ import {
9
9
  } from "../shared/errors";
10
10
  import type { ServicesReturns } from "../shared/effect";
11
11
  import { FirecrawlFetch } from "./firecrawl-fetch";
12
- import type {
13
- FallbackReason,
14
- WebFetchInput,
15
- WebFetchResult,
16
- } from "./web-fetch-schema";
12
+ import type { FallbackReason, WebFetchInput, WebFetchResult } from "./web-fetch-schema";
17
13
  import { TavilyExtract } from "./tavily-extract";
18
14
 
19
15
  const summarizeFallbackReason = (error: UltimateSearchError): FallbackReason => {
@@ -42,8 +38,7 @@ const resolveDoubleFailure = (
42
38
  primary: UltimateSearchError,
43
39
  fallback: UltimateSearchError,
44
40
  ): UltimateSearchError =>
45
- fallback instanceof ConfigValidationError &&
46
- !(primary instanceof ConfigValidationError)
41
+ fallback instanceof ConfigValidationError && !(primary instanceof ConfigValidationError)
47
42
  ? primary
48
43
  : fallback;
49
44