@arcmira/langchain 0.1.0 → 0.1.1
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 +7 -8
- package/dist/index.d.ts +8 -0
- package/dist/index.js +9 -1
- package/dist/inputs.js +1 -1
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
# Arcmira: YouTube Transcript Search for LangChain
|
|
2
2
|
|
|
3
|
-
Native LangChain tools for searching indexed YouTube transcripts and resolving people, organizations, products, topics and channels with Arcmira.
|
|
3
|
+
Native LangChain tools for searching indexed YouTube and podcast transcripts and resolving people, organizations, products, topics and channels with Arcmira.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Add "use arcmira" to any question to send it to Arcmira first.
|
|
6
|
+
|
|
7
|
+
[Install @arcmira/langchain from npm](https://www.npmjs.com/package/@arcmira/langchain). Find Arcmira in the [LangChain JavaScript providers](https://docs.langchain.com/oss/javascript/integrations/providers/all_providers) and [tools catalog](https://docs.langchain.com/oss/javascript/integrations/tools).
|
|
6
8
|
|
|
7
9
|
[Arcmira](https://arcmira.com) · [API docs](https://arcmira.com/docs) · [Authentication](https://arcmira.com/docs/authentication) · [Usage and billing](https://arcmira.com/docs/usage-and-billing)
|
|
8
10
|
|
|
@@ -11,13 +13,10 @@ Check [release status](https://github.com/arcmira/integrations/blob/master/RELEA
|
|
|
11
13
|
Use Node.js 22 or later.
|
|
12
14
|
|
|
13
15
|
```sh
|
|
14
|
-
|
|
15
|
-
cd integrations/packages/langchain
|
|
16
|
-
npm ci --ignore-scripts
|
|
17
|
-
npm run build
|
|
16
|
+
npm install @arcmira/langchain @langchain/core@1 zod@4
|
|
18
17
|
export ARCMIRA_API_KEY='your-key'
|
|
19
18
|
node --input-type=module <<'JS'
|
|
20
|
-
import { createArcmiraTools } from "
|
|
19
|
+
import { createArcmiraTools } from "@arcmira/langchain";
|
|
21
20
|
|
|
22
21
|
const [search, resolve] = createArcmiraTools({
|
|
23
22
|
apiKey: process.env.ARCMIRA_API_KEY ?? "",
|
|
@@ -40,4 +39,4 @@ API errors propagate with their code, status and response body. The adapter make
|
|
|
40
39
|
|
|
41
40
|
## Local verification
|
|
42
41
|
|
|
43
|
-
|
|
42
|
+
`npm run build` checks the public TypeScript declarations. `npm test` runs a compiled LangGraph against synthetic HTTP fixtures, covering filters, evidence, entity ambiguity, refusal responses, input validation and cancellation. An earlier live check with SDK 0.4.3 executed search and entity resolution against Arcmira through a compiled LangGraph with existing smoke-test access. Both return source-backed data. No model inference is part of these checks. Production authentication rejection is also verified with an invalid key.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Search indexed YouTube and podcast transcripts for timestamped passages with LangChain.
|
|
3
|
+
* The first tool returned by `createArcmiraTools` searches transcripts and the second resolves names to IDs.
|
|
4
|
+
*
|
|
5
|
+
* @see {@link https://arcmira.com/docs | Arcmira API documentation}
|
|
6
|
+
* @see {@link https://arcmira.com/docs/authentication | API keys and sign-in}
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
1
9
|
import { type DynamicStructuredTool } from "@langchain/core/tools";
|
|
2
10
|
import { ArcmiraClient } from "arcmira";
|
|
3
11
|
import { z } from "zod";
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Search indexed YouTube and podcast transcripts for timestamped passages with LangChain.
|
|
3
|
+
* The first tool returned by `createArcmiraTools` searches transcripts and the second resolves names to IDs.
|
|
4
|
+
*
|
|
5
|
+
* @see {@link https://arcmira.com/docs | Arcmira API documentation}
|
|
6
|
+
* @see {@link https://arcmira.com/docs/authentication | API keys and sign-in}
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
1
9
|
import { tool } from "@langchain/core/tools";
|
|
2
10
|
import { ArcmiraClient } from "arcmira";
|
|
3
11
|
import { z } from "zod";
|
|
@@ -8,7 +16,7 @@ export function createArcmiraTools(options) {
|
|
|
8
16
|
return [
|
|
9
17
|
tool((input, config) => client.transcripts.search(input, { abortSignal: config.signal }), {
|
|
10
18
|
name: "arcmira_search",
|
|
11
|
-
description: "Search indexed YouTube transcripts for timestamped passages. Use one topic per call. Resolve names with arcmira_resolve before using ID filters. Preserve returned coverage notes and source links. Account access and speaker coverage vary. A paid read uses credits from your plan, then your on-demand budget. Do not silently widen refused filters or substitute another transcript source.",
|
|
19
|
+
description: "Search indexed YouTube and podcast transcripts for timestamped passages. Use one topic per call. Resolve names with arcmira_resolve before using ID filters. Preserve returned coverage notes and source links. Account access and speaker coverage vary. A paid read uses credits from your plan, then your on-demand budget. Do not silently widen refused filters or substitute another transcript source.",
|
|
12
20
|
schema: searchInput,
|
|
13
21
|
}),
|
|
14
22
|
tool((input, config) => client.entities.resolve(input, { abortSignal: config.signal }), {
|
package/dist/inputs.js
CHANGED
|
@@ -5,7 +5,7 @@ export const searchInput = z.object({
|
|
|
5
5
|
channel: z.string().optional().describe("Alias of channel_ids for code-mode clients; the union of both is the scope."),
|
|
6
6
|
entity_ids: z.string().optional().describe("Comma-separated entity ids (ent_{n}), at most 8. A person id filters to that person's appearances; a channel id widens channel_ids. Ids only: a name answers 400 id_required. Resolve names first with GET /v1/entities/resolve."),
|
|
7
7
|
about: z.string().optional().describe("Comma-separated entity ids (ent_{n}), at most 8. Only passages about these entities: excerpt pins, exact-name mentions and ad verdicts. Ids only: a name answers 400 id_required. Resolve names first with GET /v1/entities/resolve."),
|
|
8
|
-
by: z.string().optional().describe("Comma-separated person ids (ent_{n}), at most 8. Only passages where one of these people
|
|
8
|
+
by: z.string().optional().describe("Comma-separated person ids (ent_{n}), at most 8. Only passages where one of these people speaks the query words. A passage can include other speakers' lines; each line with a known speaker starts with that speaker's name. A non-person id is refused with invalid_query naming its type. Speaker labels cover a minority of shows; an empty result carries a note saying whether the person is labeled anywhere. Ids only: a name answers 400 id_required. Resolve names first with GET /v1/entities/resolve."),
|
|
9
9
|
kind: z.string().optional().describe("Comma-separated passage classes: sponsored, organic, mention. Combine with about to read what was said about a brand in ad reads or in organic talk."),
|
|
10
10
|
after: z.string().optional().describe("Only media published at or after this instant. An after later than your plan's freshness gate is refused with freshness_requires_paid rather than widened. An ISO 8601 date (2026-09-01) or datetime with offset (2026-09-01T00:00:00Z), read in UTC. The window is half-open: after is inclusive, before is exclusive."),
|
|
11
11
|
before: z.string().optional().describe("Only media published before this instant, so before=2026-09-02 includes all of 2026-09-01. An ISO 8601 date (2026-09-01) or datetime with offset (2026-09-01T00:00:00Z), read in UTC. The window is half-open: after is inclusive, before is exclusive."),
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcmira/langchain",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"description": "YouTube transcript search
|
|
5
|
+
"description": "YouTube transcript search for AI agents: the exact quote, often who said it, and a watch link cued to the second.",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
8
8
|
"exports": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"test": "node --test test/*.test.mjs"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"arcmira": "0.6.
|
|
24
|
+
"arcmira": "0.6.2"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"@langchain/core": "^1.2.13",
|
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
"youtube-transcript-search",
|
|
50
50
|
"youtube",
|
|
51
51
|
"transcript-search",
|
|
52
|
+
"podcast-transcript-search",
|
|
52
53
|
"arcmira",
|
|
53
54
|
"langchain",
|
|
54
55
|
"langgraph",
|