sirlero-catalog 0.0.0-stage → 1.0.0

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 CHANGED
@@ -1,3 +1,32 @@
1
- # Temporary Holding Version
1
+ # Sirlero integrations
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Search and read published pages from [Sirlero](https://sirlero.com/) with the [public API](https://sirlero.com/docs/), CLI, or MCP. No account or key is required.
4
+
5
+ ## CLI
6
+
7
+ Run `node bin/sirlero.mjs FinOps` using Node.js 20 or later. Results include titles, descriptions, and source URLs.
8
+
9
+ ## Agent skill
10
+
11
+ Read the [search-sirlero skill](skills/search-sirlero/SKILL.md). Install it with `npx skills add sirleroHQ/sirlero-integrations --skill search-sirlero`.
12
+
13
+ ## MCP
14
+
15
+ Connect a Streamable HTTP client to `https://sirlero.com/mcp`. Use `search_sirlero` to locate pages and `read_sirlero_page` to retrieve their Markdown. Cite the canonical URL from each search result.
16
+
17
+ ## JavaScript SDK
18
+
19
+ Install from the official repository with `npm install github:sirleroHQ/sirlero-integrations` using Node.js 20 or later. To search from the terminal, run `npx --no-install sirlero FinOps` after installation.
20
+
21
+ ```js
22
+ import {searchCatalog} from "sirlero-catalog";
23
+
24
+ const page = await searchCatalog("FinOps");
25
+ console.log(page.results);
26
+ if (page.next_cursor) {
27
+ const nextPage = await searchCatalog("FinOps", {cursor: page.next_cursor});
28
+ console.log(nextPage.results);
29
+ }
30
+ ```
31
+
32
+ Two additional skills cover [reading and citing a story](skills/read-sirlero-story/SKILL.md) and [connecting a catalog client](skills/connect-sirlero-catalog/SKILL.md). Select either directory name with the same `--skill` installation option.
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env node
2
+ import {searchCatalog} from "../index.mjs";
3
+ const query = process.argv.slice(2).join(" ").trim();
4
+ if (!query || query === "--help") {
5
+ console.log("Usage: sirlero <topic or writer name>");
6
+ } else {
7
+ try {
8
+ const {results,total} = await searchCatalog(query);
9
+ console.log(total + " matches");
10
+ for (const item of results) console.log(item.title + "\n" + item.url + "\n" + item.description + "\n");
11
+ } catch (error) {
12
+ console.error(error.message);
13
+ process.exitCode = 1;
14
+ }
15
+ }
package/index.mjs ADDED
@@ -0,0 +1,19 @@
1
+ /** Search public pages. Pass the same query and the previous next_cursor to continue. */
2
+ export async function searchCatalog(query, {cursor, signal} = {}) {
3
+ if (typeof query !== "string" || !query.trim() || query.length > 200) {
4
+ throw new TypeError("Supply a search query of 1 to 200 characters.");
5
+ }
6
+
7
+ const url = new URL("https://sirlero.com/api/v1/search");
8
+ url.searchParams.set("q", query);
9
+ if (cursor != null) url.searchParams.set("cursor", cursor);
10
+
11
+ const response = await fetch(url, {signal});
12
+ if (!response.ok) {
13
+ const error = new Error("Sirlero search returned HTTP " + response.status);
14
+ error.status = response.status;
15
+ error.retryAfter = response.headers.get("Retry-After");
16
+ throw error;
17
+ }
18
+ return response.json();
19
+ }
package/package.json CHANGED
@@ -1,6 +1,12 @@
1
1
  {
2
2
  "name": "sirlero-catalog",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.0.0",
4
+ "description": "Sirlero public catalog search SDK and CLI for Node.js",
5
+ "homepage": "https://sirlero.com/docs/catalog-client/",
6
+ "repository": {"type": "git", "url": "git+https://github.com/sirleroHQ/sirlero-integrations.git"},
7
+ "type": "module",
8
+ "exports": "./index.mjs",
9
+ "bin": {"sirlero": "./bin/sirlero.mjs"},
10
+ "files": ["index.mjs", "bin/sirlero.mjs"],
11
+ "engines": {"node": ">=20"}
12
+ }