@open-everywhere/provider-notion 0.1.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/LICENSE +201 -0
- package/NOTICE +21 -0
- package/README.md +48 -0
- package/agent/channels/notion-acting-identity.ts +88 -0
- package/agent/channels/notion-ancestry-trust.ts +458 -0
- package/agent/channels/notion-api.ts +1290 -0
- package/agent/channels/notion-bot-user.ts +250 -0
- package/agent/channels/notion-catch-up.ts +339 -0
- package/agent/channels/notion-credentials.ts +417 -0
- package/agent/channels/notion-engagement.ts +372 -0
- package/agent/channels/notion-event-normalizer.ts +587 -0
- package/agent/channels/notion-identity.ts +271 -0
- package/agent/channels/notion-ingress-drain.ts +289 -0
- package/agent/channels/notion-ingress.ts +182 -0
- package/agent/channels/notion-message-ops.ts +140 -0
- package/agent/channels/notion-origin-codec.ts +38 -0
- package/agent/channels/notion-post-arm.ts +189 -0
- package/agent/channels/notion-question-return.ts +223 -0
- package/agent/channels/notion-read.ts +283 -0
- package/agent/channels/notion-scope.ts +560 -0
- package/agent/channels/notion-stop.ts +169 -0
- package/agent/channels/notion-supervisor.ts +856 -0
- package/agent/channels/notion-webhook-timing.ts +131 -0
- package/agent/channels/notion-webhook-verifier.ts +55 -0
- package/agent/channels/notion-webhook.ts +963 -0
- package/agent/channels/notion-work-search.ts +74 -0
- package/agent/channels/notion-work.ts +144 -0
- package/agent/channels/notion.ts +1242 -0
- package/agent/contributions.ts +39 -0
- package/agent/docs-generated.ts +15 -0
- package/agent/memory/blocks.ts +295 -0
- package/agent/memory/memory.ts +622 -0
- package/agent/provider-events.ts +198 -0
- package/agent/register.ts +144 -0
- package/agent/schedules/notion-ingress.ts +20 -0
- package/agent/surface-parity.ts +105 -0
- package/agent/tools/notion_search.ts +110 -0
- package/agent/tools/read_notion_comments.ts +250 -0
- package/agent/tools/read_notion_page.ts +351 -0
- package/dist/agent/channels/notion-acting-identity.d.ts +23 -0
- package/dist/agent/channels/notion-acting-identity.d.ts.map +1 -0
- package/dist/agent/channels/notion-acting-identity.js +85 -0
- package/dist/agent/channels/notion-acting-identity.js.map +1 -0
- package/dist/agent/channels/notion-ancestry-trust.d.ts +208 -0
- package/dist/agent/channels/notion-ancestry-trust.d.ts.map +1 -0
- package/dist/agent/channels/notion-ancestry-trust.js +331 -0
- package/dist/agent/channels/notion-ancestry-trust.js.map +1 -0
- package/dist/agent/channels/notion-api.d.ts +655 -0
- package/dist/agent/channels/notion-api.d.ts.map +1 -0
- package/dist/agent/channels/notion-api.js +938 -0
- package/dist/agent/channels/notion-api.js.map +1 -0
- package/dist/agent/channels/notion-bot-user.d.ts +107 -0
- package/dist/agent/channels/notion-bot-user.d.ts.map +1 -0
- package/dist/agent/channels/notion-bot-user.js +192 -0
- package/dist/agent/channels/notion-bot-user.js.map +1 -0
- package/dist/agent/channels/notion-catch-up.d.ts +64 -0
- package/dist/agent/channels/notion-catch-up.d.ts.map +1 -0
- package/dist/agent/channels/notion-catch-up.js +289 -0
- package/dist/agent/channels/notion-catch-up.js.map +1 -0
- package/dist/agent/channels/notion-credentials.d.ts +210 -0
- package/dist/agent/channels/notion-credentials.d.ts.map +1 -0
- package/dist/agent/channels/notion-credentials.js +360 -0
- package/dist/agent/channels/notion-credentials.js.map +1 -0
- package/dist/agent/channels/notion-engagement.d.ts +219 -0
- package/dist/agent/channels/notion-engagement.d.ts.map +1 -0
- package/dist/agent/channels/notion-engagement.js +283 -0
- package/dist/agent/channels/notion-engagement.js.map +1 -0
- package/dist/agent/channels/notion-event-normalizer.d.ts +194 -0
- package/dist/agent/channels/notion-event-normalizer.d.ts.map +1 -0
- package/dist/agent/channels/notion-event-normalizer.js +542 -0
- package/dist/agent/channels/notion-event-normalizer.js.map +1 -0
- package/dist/agent/channels/notion-identity.d.ts +119 -0
- package/dist/agent/channels/notion-identity.d.ts.map +1 -0
- package/dist/agent/channels/notion-identity.js +205 -0
- package/dist/agent/channels/notion-identity.js.map +1 -0
- package/dist/agent/channels/notion-ingress-drain.d.ts +66 -0
- package/dist/agent/channels/notion-ingress-drain.d.ts.map +1 -0
- package/dist/agent/channels/notion-ingress-drain.js +185 -0
- package/dist/agent/channels/notion-ingress-drain.js.map +1 -0
- package/dist/agent/channels/notion-ingress.d.ts +64 -0
- package/dist/agent/channels/notion-ingress.d.ts.map +1 -0
- package/dist/agent/channels/notion-ingress.js +130 -0
- package/dist/agent/channels/notion-ingress.js.map +1 -0
- package/dist/agent/channels/notion-message-ops.d.ts +3 -0
- package/dist/agent/channels/notion-message-ops.d.ts.map +1 -0
- package/dist/agent/channels/notion-message-ops.js +126 -0
- package/dist/agent/channels/notion-message-ops.js.map +1 -0
- package/dist/agent/channels/notion-origin-codec.d.ts +7 -0
- package/dist/agent/channels/notion-origin-codec.d.ts.map +1 -0
- package/dist/agent/channels/notion-origin-codec.js +32 -0
- package/dist/agent/channels/notion-origin-codec.js.map +1 -0
- package/dist/agent/channels/notion-post-arm.d.ts +3 -0
- package/dist/agent/channels/notion-post-arm.d.ts.map +1 -0
- package/dist/agent/channels/notion-post-arm.js +185 -0
- package/dist/agent/channels/notion-post-arm.js.map +1 -0
- package/dist/agent/channels/notion-question-return.d.ts +77 -0
- package/dist/agent/channels/notion-question-return.d.ts.map +1 -0
- package/dist/agent/channels/notion-question-return.js +183 -0
- package/dist/agent/channels/notion-question-return.js.map +1 -0
- package/dist/agent/channels/notion-read.d.ts +62 -0
- package/dist/agent/channels/notion-read.d.ts.map +1 -0
- package/dist/agent/channels/notion-read.js +257 -0
- package/dist/agent/channels/notion-read.js.map +1 -0
- package/dist/agent/channels/notion-scope.d.ts +188 -0
- package/dist/agent/channels/notion-scope.d.ts.map +1 -0
- package/dist/agent/channels/notion-scope.js +433 -0
- package/dist/agent/channels/notion-scope.js.map +1 -0
- package/dist/agent/channels/notion-stop.d.ts +48 -0
- package/dist/agent/channels/notion-stop.d.ts.map +1 -0
- package/dist/agent/channels/notion-stop.js +141 -0
- package/dist/agent/channels/notion-stop.js.map +1 -0
- package/dist/agent/channels/notion-supervisor.d.ts +462 -0
- package/dist/agent/channels/notion-supervisor.d.ts.map +1 -0
- package/dist/agent/channels/notion-supervisor.js +482 -0
- package/dist/agent/channels/notion-supervisor.js.map +1 -0
- package/dist/agent/channels/notion-webhook-timing.d.ts +35 -0
- package/dist/agent/channels/notion-webhook-timing.d.ts.map +1 -0
- package/dist/agent/channels/notion-webhook-timing.js +99 -0
- package/dist/agent/channels/notion-webhook-timing.js.map +1 -0
- package/dist/agent/channels/notion-webhook-verifier.d.ts +5 -0
- package/dist/agent/channels/notion-webhook-verifier.d.ts.map +1 -0
- package/dist/agent/channels/notion-webhook-verifier.js +53 -0
- package/dist/agent/channels/notion-webhook-verifier.js.map +1 -0
- package/dist/agent/channels/notion-webhook.d.ts +242 -0
- package/dist/agent/channels/notion-webhook.d.ts.map +1 -0
- package/dist/agent/channels/notion-webhook.js +675 -0
- package/dist/agent/channels/notion-webhook.js.map +1 -0
- package/dist/agent/channels/notion-work-search.d.ts +9 -0
- package/dist/agent/channels/notion-work-search.d.ts.map +1 -0
- package/dist/agent/channels/notion-work-search.js +69 -0
- package/dist/agent/channels/notion-work-search.js.map +1 -0
- package/dist/agent/channels/notion-work.d.ts +68 -0
- package/dist/agent/channels/notion-work.d.ts.map +1 -0
- package/dist/agent/channels/notion-work.js +126 -0
- package/dist/agent/channels/notion-work.js.map +1 -0
- package/dist/agent/channels/notion.d.ts +95 -0
- package/dist/agent/channels/notion.d.ts.map +1 -0
- package/dist/agent/channels/notion.js +1081 -0
- package/dist/agent/channels/notion.js.map +1 -0
- package/dist/agent/contributions.d.ts +32 -0
- package/dist/agent/contributions.d.ts.map +1 -0
- package/dist/agent/contributions.js +37 -0
- package/dist/agent/contributions.js.map +1 -0
- package/dist/agent/docs-generated.d.ts +3 -0
- package/dist/agent/docs-generated.d.ts.map +1 -0
- package/dist/agent/docs-generated.js +13 -0
- package/dist/agent/docs-generated.js.map +1 -0
- package/dist/agent/memory/blocks.d.ts +58 -0
- package/dist/agent/memory/blocks.d.ts.map +1 -0
- package/dist/agent/memory/blocks.js +264 -0
- package/dist/agent/memory/blocks.js.map +1 -0
- package/dist/agent/memory/memory.d.ts +157 -0
- package/dist/agent/memory/memory.d.ts.map +1 -0
- package/dist/agent/memory/memory.js +471 -0
- package/dist/agent/memory/memory.js.map +1 -0
- package/dist/agent/provider-events.d.ts +3 -0
- package/dist/agent/provider-events.d.ts.map +1 -0
- package/dist/agent/provider-events.js +196 -0
- package/dist/agent/provider-events.js.map +1 -0
- package/dist/agent/register.d.ts +5 -0
- package/dist/agent/register.d.ts.map +1 -0
- package/dist/agent/register.js +128 -0
- package/dist/agent/register.js.map +1 -0
- package/dist/agent/schedules/notion-ingress.d.ts +6 -0
- package/dist/agent/schedules/notion-ingress.d.ts.map +1 -0
- package/dist/agent/schedules/notion-ingress.js +16 -0
- package/dist/agent/schedules/notion-ingress.js.map +1 -0
- package/dist/agent/surface-parity.d.ts +3 -0
- package/dist/agent/surface-parity.d.ts.map +1 -0
- package/dist/agent/surface-parity.js +99 -0
- package/dist/agent/surface-parity.js.map +1 -0
- package/dist/agent/tools/notion_search.d.ts +56 -0
- package/dist/agent/tools/notion_search.d.ts.map +1 -0
- package/dist/agent/tools/notion_search.js +100 -0
- package/dist/agent/tools/notion_search.js.map +1 -0
- package/dist/agent/tools/read_notion_comments.d.ts +57 -0
- package/dist/agent/tools/read_notion_comments.d.ts.map +1 -0
- package/dist/agent/tools/read_notion_comments.js +236 -0
- package/dist/agent/tools/read_notion_comments.js.map +1 -0
- package/dist/agent/tools/read_notion_page.d.ts +53 -0
- package/dist/agent/tools/read_notion_page.d.ts.map +1 -0
- package/dist/agent/tools/read_notion_page.js +327 -0
- package/dist/agent/tools/read_notion_page.js.map +1 -0
- package/package.json +231 -0
- package/tsconfig.build.json +22 -0
- package/tsconfig.json +15 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notion-webhook.js","sourceRoot":"","sources":["../../../agent/channels/notion-webhook.ts"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,KAAK,QAAQ,CAAC;YACjD,OAAO;gBACL,IAAI,EAAE,MAAM,CAAC,CAAC,CAAE,MAAgB,CAAC,CAAC,CAAE,OAAiB;gBACrD,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE;gBACd,QAAQ,EAAE,MAAM,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ;gBACpD,MAAM,EAAE,CAAC,CAAC,YAAY,IAAI,EAAE;gBAC5B,IAAI,EAAE,mBAAmB,CAAC,CAAC,CAAC,SAAS,CAAC;aACvC,CAAC;QACJ,CAAC,CAAC;aACD,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACtC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type WorkSearchAdapter, type Domain } from "@open-everywhere/core/agent/adapter-api.js";
|
|
2
|
+
/** The canonical page ids this domain names OUTRIGHT — the EXACT `reach` entries shaped
|
|
3
|
+
* `notion/<workspace>/<pageId>`. Any workspace segment counts: an exact entry belongs to exactly
|
|
4
|
+
* one domain (config-load exclusivity), so no workspace cross-check is needed here the way
|
|
5
|
+
* `notionPageDomain`'s CALLER-vs-TARGET comparison needs one. */
|
|
6
|
+
export declare function domainOwnPageIds(domain: Domain): ReadonlySet<string>;
|
|
7
|
+
export declare const notionWorkSearchAdapter: WorkSearchAdapter;
|
|
8
|
+
export declare function registerNotionWorkSearch(): void;
|
|
9
|
+
//# sourceMappingURL=notion-work-search.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notion-work-search.d.ts","sourceRoot":"","sources":["../../../agent/channels/notion-work-search.ts"],"names":[],"mappings":"AAkBA,OAAO,EAEL,KAAK,iBAAiB,EAGtB,KAAK,MAAM,EACZ,MAAM,4CAA4C,CAAC;AAOpD;;;kEAGkE;AAClE,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,CAOpE;AAED,eAAO,MAAM,uBAAuB,EAAE,iBAyBrC,CAAC;AAEF,wBAAgB,wBAAwB,IAAI,IAAI,CAE/C"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
// Notion's WORK-SEARCH adapter (OPE-961) — wraps notion_search.ts's own `searchNotion` call behind
|
|
2
|
+
// the federating `search` tool's registry (@open-everywhere/core `channels/work-search.ts`).
|
|
3
|
+
//
|
|
4
|
+
// 🔴 NO RESULT FILTER AS A BOUNDARY, unconditionally — the ratified rule this bundle's
|
|
5
|
+
// `notion_search.ts` already states: Notion's own integration-share IS the reach, and OE never
|
|
6
|
+
// narrows it as enforcement. That rule governs the UNSCOPED call.
|
|
7
|
+
//
|
|
8
|
+
// `insideDomain: true` IS a real narrowing here, and it is legitimate for the reason OPE-961 exists
|
|
9
|
+
// at all: it is OPT-IN, documented as a convenience, and it can only ever DROP hits, never add one
|
|
10
|
+
// the credential could not already reach. It keeps only the pages this domain names outright —
|
|
11
|
+
// the EXACT `domain.reach` entries of the form `notion/<workspace>/<pageId>` (the same set
|
|
12
|
+
// `read_notion_page`'s fence reads, via `notionPageDomain` — see notion-scope.ts). A shared Notion
|
|
13
|
+
// integration used by several domains therefore lets each ask "just MY declared pages" without
|
|
14
|
+
// touching what the credential itself can see.
|
|
15
|
+
//
|
|
16
|
+
// Registered GATED (`registerWorkSearchAdapter`), mirroring `registerReadAdapter` — Notion is a
|
|
17
|
+
// provider bundle and participates in provider selection like every other bundle seam.
|
|
18
|
+
import { registerWorkSearchAdapter, } from "@open-everywhere/core/agent/adapter-api.js";
|
|
19
|
+
import { resolveNotionCredential, searchNotion } from "./notion-api.js";
|
|
20
|
+
import { notionWorkGrant } from "./notion-work.js";
|
|
21
|
+
import { assertNotionActingIdentity } from "./notion-acting-identity.js";
|
|
22
|
+
import { canonicalNotionId } from "./notion-scope.js";
|
|
23
|
+
import { domainRoster } from "@open-everywhere/core/agent/adapter-api.js";
|
|
24
|
+
/** The canonical page ids this domain names OUTRIGHT — the EXACT `reach` entries shaped
|
|
25
|
+
* `notion/<workspace>/<pageId>`. Any workspace segment counts: an exact entry belongs to exactly
|
|
26
|
+
* one domain (config-load exclusivity), so no workspace cross-check is needed here the way
|
|
27
|
+
* `notionPageDomain`'s CALLER-vs-TARGET comparison needs one. */
|
|
28
|
+
export function domainOwnPageIds(domain) {
|
|
29
|
+
const ids = new Set();
|
|
30
|
+
for (const key of domainRoster(domain)) {
|
|
31
|
+
const parts = key.split("/");
|
|
32
|
+
if (parts.length === 3 && parts[0] === "notion" && parts[2].length > 0)
|
|
33
|
+
ids.add(canonicalNotionId(parts[2]));
|
|
34
|
+
}
|
|
35
|
+
return ids;
|
|
36
|
+
}
|
|
37
|
+
export const notionWorkSearchAdapter = {
|
|
38
|
+
connector: "notion",
|
|
39
|
+
async search(ctx, domain, query, opts) {
|
|
40
|
+
// Notion's grant is a `Domain.credentials` declaration (never domain-free like GitHub's repo
|
|
41
|
+
// grant), so `domain` is undefined here only if the federator's grant-set derivation and this
|
|
42
|
+
// adapter ever disagreed about what grants Notion — a defensive backstop, not a reachable path.
|
|
43
|
+
if (!domain)
|
|
44
|
+
throw new Error("this domain holds no Notion work grant.");
|
|
45
|
+
const grant = notionWorkGrant(ctx, [domain]);
|
|
46
|
+
if (!grant)
|
|
47
|
+
throw new Error("this domain holds no Notion work grant.");
|
|
48
|
+
// 🔴 OPE-1525 — THE OWN-ACCOUNT GATE, on the line below's behalf. This is the federated `search`
|
|
49
|
+
// tool's Notion arm and it spends the same `install`-family work key `notion_search` does, so it
|
|
50
|
+
// takes the same gate. See channels/notion-acting-identity.ts.
|
|
51
|
+
await assertNotionActingIdentity(ctx, "notion_work_search");
|
|
52
|
+
const cred = await resolveNotionCredential(grant.credential);
|
|
53
|
+
if (!cred)
|
|
54
|
+
throw new Error(`no value stored for this domain's Notion work credential "${grant.credential}".`);
|
|
55
|
+
const hits = await searchNotion(query, { ...cred, pageSize: Math.min(Math.max(opts.limit, 1), 100) });
|
|
56
|
+
const ownIds = opts.insideDomain ? domainOwnPageIds(domain) : undefined;
|
|
57
|
+
const scoped = ownIds ? hits.filter((h) => ownIds.has(canonicalNotionId(h.id))) : hits;
|
|
58
|
+
return scoped.slice(0, opts.limit).map((h) => ({
|
|
59
|
+
connector: "notion",
|
|
60
|
+
id: h.id,
|
|
61
|
+
title: h.title || "(untitled)",
|
|
62
|
+
...(h.url ? { url: h.url } : {}),
|
|
63
|
+
}));
|
|
64
|
+
},
|
|
65
|
+
};
|
|
66
|
+
export function registerNotionWorkSearch() {
|
|
67
|
+
registerWorkSearchAdapter(notionWorkSearchAdapter);
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=notion-work-search.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notion-work-search.js","sourceRoot":"","sources":["../../../agent/channels/notion-work-search.ts"],"names":[],"mappings":"AAAA,mGAAmG;AACnG,6FAA6F;AAC7F,EAAE;AACF,uFAAuF;AACvF,+FAA+F;AAC/F,kEAAkE;AAClE,EAAE;AACF,oGAAoG;AACpG,mGAAmG;AACnG,+FAA+F;AAC/F,2FAA2F;AAC3F,mGAAmG;AACnG,+FAA+F;AAC/F,+CAA+C;AAC/C,EAAE;AACF,gGAAgG;AAChG,uFAAuF;AAEvF,OAAO,EACL,yBAAyB,GAK1B,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,4CAA4C,CAAC;AAE1E;;;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AY,CAAC,KAAK,EAAE,EAAE,GAAG,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;QACtG,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QACxE,MAAM,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QACvF,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YAC7C,SAAS,EAAE,QAAQ;YACnB,EAAE,EAAE,CAAC,CAAC,EAAE;YACR,KAAK,EAAE,CAAC,CAAC,KAAK,IAAI,YAAY;YAC9B,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACjC,CAAC,CAAC,CAAC;IACN,CAAC;CACF,CAAC;AAEF,MAAM,UAAU,wBAAwB;IACtC,yBAAyB,CAAC,uBAAuB,CAAC,CAAC;AACrD,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { type BindableContext, type Domain } from "@open-everywhere/core/agent/adapter-api.js";
|
|
2
|
+
/**
|
|
3
|
+
* The ORG-DEFAULT credential id that plays Notion's WORK role — the role a domain's
|
|
4
|
+
* `Domain.credentials` entry names to hold the work grant.
|
|
5
|
+
*
|
|
6
|
+
* It is `team-key` because that is what the credential catalogue already calls it, in those words:
|
|
7
|
+
* "This is the WORK-SURFACE credential ONLY … The COMMUNICATION-CHANNEL plumbing … is a DISTINCT
|
|
8
|
+
* credential — `channel-key`". The role split predates this module; what was missing was any path
|
|
9
|
+
* that read it as a GRANT.
|
|
10
|
+
*/
|
|
11
|
+
export declare const NOTION_WORK_CREDENTIAL = "team-key";
|
|
12
|
+
/** A resolved Notion work grant: the domain that holds it and the credential id it runs under. */
|
|
13
|
+
export interface NotionWorkGrant {
|
|
14
|
+
readonly domain: Domain;
|
|
15
|
+
/** The `ConnectorCredential.id` this domain's Notion work calls run under. */
|
|
16
|
+
readonly credential: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* The domain a CALLING SESSION belongs to, whatever surface it was woken on.
|
|
20
|
+
*
|
|
21
|
+
* Two resolvers, because a Notion page id is not compared the way every other surface key is:
|
|
22
|
+
* `notionPageDomain` canonicalises the UUID (dashes are cosmetic in Notion ids) and is
|
|
23
|
+
* workspace-blind on its roster leg, while `resolveDomainForChannel` compares whole keys verbatim.
|
|
24
|
+
* Sending a `notion/…` key through the verbatim comparison would miss a roster entry written with
|
|
25
|
+
* the other dash convention — a silent "no domain", i.e. a silent loss of the grant.
|
|
26
|
+
*
|
|
27
|
+
* Pure: `domains` is injected, like every other decision in this bundle.
|
|
28
|
+
*/
|
|
29
|
+
export declare function notionCallerDomain(surfaceKey: string, domains: readonly Domain[]): Domain | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* This session's Notion WORK grant, or `undefined` when its domain holds none.
|
|
32
|
+
*
|
|
33
|
+
* FAIL-SOFT ON AN UNRESOLVABLE CONTEXT, and that is the fail-CLOSED direction here: a synthetic or
|
|
34
|
+
* identity-less ctx has no partition, so it resolves no domain, so it holds no grant, so no work
|
|
35
|
+
* tool mounts. There is no arm in which an unreadable context widens the surface. Core's
|
|
36
|
+
* {@link callerWorkDomain} owns that chain and that fail direction for every provider (OPE-951);
|
|
37
|
+
* Notion passes {@link notionCallerDomain} as the resolver because of the UUID rule above. The guard
|
|
38
|
+
* now covers the RESOLVER too, not only the partition read: a throw out of the roster comparison
|
|
39
|
+
* also resolves to no grant, which is the same direction.
|
|
40
|
+
*/
|
|
41
|
+
export declare function notionWorkGrant(ctx: BindableContext, domains: readonly Domain[]): NotionWorkGrant | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* The MOUNT predicate for a Notion work tool — {@link notionWorkGrant} as a boolean, with `domains`
|
|
44
|
+
* as a LAZY thunk and every failure absorbed.
|
|
45
|
+
*
|
|
46
|
+
* Both properties matter at a `session.started` resolver. The thunk is the same dependency-injection
|
|
47
|
+
* shape `sourceScopedMount` uses, so a resolver that runs before the app registers its config does
|
|
48
|
+
* not throw on `getConfig()`. And an absorbed failure resolves FALSE: an unreadable config hides the
|
|
49
|
+
* work tools rather than mounting them, which is the fail-closed direction.
|
|
50
|
+
*/
|
|
51
|
+
export declare function notionWorkMount(ctx: BindableContext, domains: () => readonly Domain[]): boolean;
|
|
52
|
+
/** The credential id a work-granted domain's Notion calls run under, or undefined when it holds no
|
|
53
|
+
* grant. Never falls back to the org default — see the header. */
|
|
54
|
+
export declare function notionWorkCredential(domain: Domain | undefined): string | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* The Notion WORKSPACE ids a domain names for itself — every `notion/<workspace>/…` entry in its
|
|
57
|
+
* roster and its claims, de-duplicated.
|
|
58
|
+
*
|
|
59
|
+
* WHY A WORK READ NEEDS THIS. `notionPageDomain`'s CLAIM leg needs a workspace to build the key it
|
|
60
|
+
* matches; its roster leg does not. A Notion-woken caller supplies its own workspace from its
|
|
61
|
+
* surface key, but a Slack-woken worker has none — so without this, a work-granted domain that
|
|
62
|
+
* expresses its Notion membership as a CONTAINER would resolve nothing cross-surface, and the
|
|
63
|
+
* grant would silently work for pages the config names outright ONLY. Reading the candidates off the CALLER's
|
|
64
|
+
* OWN domain keeps that strictly inside what the domain already declares: it can never introduce a
|
|
65
|
+
* workspace nobody wrote down.
|
|
66
|
+
*/
|
|
67
|
+
export declare function notionWorkspacesOf(domain: Domain): readonly string[];
|
|
68
|
+
//# sourceMappingURL=notion-work.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notion-work.d.ts","sourceRoot":"","sources":["../../../agent/channels/notion-work.ts"],"names":[],"mappings":"AA6BA,OAAO,EAKL,KAAK,eAAe,EACpB,KAAK,MAAM,EACZ,MAAM,4CAA4C,CAAC;AAIpD;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB,aAAa,CAAC;AAEjD,kGAAkG;AAClG,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,8EAA8E;IAC9E,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS,CAMrG;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,eAAe,EAAE,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,eAAe,GAAG,SAAS,CAG7G;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,SAAS,MAAM,EAAE,GAAG,OAAO,CAM/F;AAUD;mEACmE;AACnE,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAEnF;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAOpE"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
// NOTION AS A WORK SURFACE (OPE-913) — the domain-granted half of the provider chat/work split.
|
|
2
|
+
//
|
|
3
|
+
// THE FINDING THIS EXISTS FOR. A soak run asked the agent to open a PR whose content came from a
|
|
4
|
+
// spec page on Notion. The seat delegated; the delegated worker reported that it had no authorized
|
|
5
|
+
// Notion connection and — correctly — refused to invent the spec. The seat had read that same page
|
|
6
|
+
// an hour earlier, from a NOTION wake. Nothing about the page had changed; the WAKE SURFACE had.
|
|
7
|
+
// Every Notion tool in this bundle is fenced to a Notion-origin turn (`assertTurnSurface`) and
|
|
8
|
+
// mounted on `notion ∈ sources`, so a Slack-woken worker in the same domain, holding the same
|
|
9
|
+
// credential, could not read it.
|
|
10
|
+
//
|
|
11
|
+
// THE RULE, Tommy 2026-08-21 (OPE-926 comment, generalized here): **capability derives from the
|
|
12
|
+
// DOMAIN's connectors, not from the wake surface.** A domain that binds a Notion work credential
|
|
13
|
+
// may read Notion from any of its surfaces; a domain that binds none may not, from any of them —
|
|
14
|
+
// including from Notion itself, where the CHAT plane still serves the wake container.
|
|
15
|
+
//
|
|
16
|
+
// THE TWO PLANES, and which credential each runs on:
|
|
17
|
+
//
|
|
18
|
+
// • CHAT plane — `read_notion_page` / `read_notion_comments` on a NOTION-origin turn, plus the
|
|
19
|
+
// reply arm. Credential: `channel-key` (notion-credentials.ts). Bounded to the wake container
|
|
20
|
+
// and its domain; unchanged by this module.
|
|
21
|
+
// • WORK plane — the same two reads from ANY surface in a work-granted domain, plus
|
|
22
|
+
// `notion_search`, the cross-container read. Credential: the domain's declared WORK credential
|
|
23
|
+
// ({@link notionWorkCredential}). Mounted only where {@link notionWorkGrant} resolves.
|
|
24
|
+
//
|
|
25
|
+
// 🔴 THE GRANT IS THE DECLARATION, AND ABSENCE IS A REFUSAL. `hasWorkGrant` (core
|
|
26
|
+
// access/work-grant.ts) reads `Domain.credentials` by the OPPOSITE rule to `domainCredentialId`:
|
|
27
|
+
// no entry for the work role ⇒ no grant ⇒ the work tools do not mount. Do not "fall back to the
|
|
28
|
+
// org default" anywhere in this file; that is the hole the split closes.
|
|
29
|
+
import { callerWorkDomain, hasWorkGrant, resolveDomainForChannel, workGrantCredential, } from "@open-everywhere/core/agent/adapter-api.js";
|
|
30
|
+
import { NOTION_PROVIDER } from "./notion-credentials.js";
|
|
31
|
+
import { notionPageDomain } from "./notion-scope.js";
|
|
32
|
+
/**
|
|
33
|
+
* The ORG-DEFAULT credential id that plays Notion's WORK role — the role a domain's
|
|
34
|
+
* `Domain.credentials` entry names to hold the work grant.
|
|
35
|
+
*
|
|
36
|
+
* It is `team-key` because that is what the credential catalogue already calls it, in those words:
|
|
37
|
+
* "This is the WORK-SURFACE credential ONLY … The COMMUNICATION-CHANNEL plumbing … is a DISTINCT
|
|
38
|
+
* credential — `channel-key`". The role split predates this module; what was missing was any path
|
|
39
|
+
* that read it as a GRANT.
|
|
40
|
+
*/
|
|
41
|
+
export const NOTION_WORK_CREDENTIAL = "team-key";
|
|
42
|
+
/**
|
|
43
|
+
* The domain a CALLING SESSION belongs to, whatever surface it was woken on.
|
|
44
|
+
*
|
|
45
|
+
* Two resolvers, because a Notion page id is not compared the way every other surface key is:
|
|
46
|
+
* `notionPageDomain` canonicalises the UUID (dashes are cosmetic in Notion ids) and is
|
|
47
|
+
* workspace-blind on its roster leg, while `resolveDomainForChannel` compares whole keys verbatim.
|
|
48
|
+
* Sending a `notion/…` key through the verbatim comparison would miss a roster entry written with
|
|
49
|
+
* the other dash convention — a silent "no domain", i.e. a silent loss of the grant.
|
|
50
|
+
*
|
|
51
|
+
* Pure: `domains` is injected, like every other decision in this bundle.
|
|
52
|
+
*/
|
|
53
|
+
export function notionCallerDomain(surfaceKey, domains) {
|
|
54
|
+
const parts = surfaceKey.split("/");
|
|
55
|
+
if (parts[0] === "notion" && parts.length === 3 && parts[2]) {
|
|
56
|
+
return notionPageDomain(parts[1] || undefined, parts[2], domains).domain;
|
|
57
|
+
}
|
|
58
|
+
return resolveDomainForChannel(surfaceKey, domains).domain;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* This session's Notion WORK grant, or `undefined` when its domain holds none.
|
|
62
|
+
*
|
|
63
|
+
* FAIL-SOFT ON AN UNRESOLVABLE CONTEXT, and that is the fail-CLOSED direction here: a synthetic or
|
|
64
|
+
* identity-less ctx has no partition, so it resolves no domain, so it holds no grant, so no work
|
|
65
|
+
* tool mounts. There is no arm in which an unreadable context widens the surface. Core's
|
|
66
|
+
* {@link callerWorkDomain} owns that chain and that fail direction for every provider (OPE-951);
|
|
67
|
+
* Notion passes {@link notionCallerDomain} as the resolver because of the UUID rule above. The guard
|
|
68
|
+
* now covers the RESOLVER too, not only the partition read: a throw out of the roster comparison
|
|
69
|
+
* also resolves to no grant, which is the same direction.
|
|
70
|
+
*/
|
|
71
|
+
export function notionWorkGrant(ctx, domains) {
|
|
72
|
+
const domain = callerWorkDomain(ctx, () => domains, notionCallerDomain);
|
|
73
|
+
return domain ? notionWorkGrantForDomain(domain) : undefined;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* The MOUNT predicate for a Notion work tool — {@link notionWorkGrant} as a boolean, with `domains`
|
|
77
|
+
* as a LAZY thunk and every failure absorbed.
|
|
78
|
+
*
|
|
79
|
+
* Both properties matter at a `session.started` resolver. The thunk is the same dependency-injection
|
|
80
|
+
* shape `sourceScopedMount` uses, so a resolver that runs before the app registers its config does
|
|
81
|
+
* not throw on `getConfig()`. And an absorbed failure resolves FALSE: an unreadable config hides the
|
|
82
|
+
* work tools rather than mounting them, which is the fail-closed direction.
|
|
83
|
+
*/
|
|
84
|
+
export function notionWorkMount(ctx, domains) {
|
|
85
|
+
try {
|
|
86
|
+
return notionWorkGrant(ctx, domains()) !== undefined;
|
|
87
|
+
}
|
|
88
|
+
catch {
|
|
89
|
+
return false;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
/** {@link notionWorkGrant} for a domain already in hand — the form {@link notionWorkGrant} and
|
|
93
|
+
* {@link notionWorkCredential} share, and the one place the (connector, role) pair is named. */
|
|
94
|
+
function notionWorkGrantForDomain(domain) {
|
|
95
|
+
if (!hasWorkGrant(domain, NOTION_PROVIDER, NOTION_WORK_CREDENTIAL))
|
|
96
|
+
return undefined;
|
|
97
|
+
const credential = workGrantCredential(domain, NOTION_PROVIDER, NOTION_WORK_CREDENTIAL);
|
|
98
|
+
return credential ? { domain, credential } : undefined;
|
|
99
|
+
}
|
|
100
|
+
/** The credential id a work-granted domain's Notion calls run under, or undefined when it holds no
|
|
101
|
+
* grant. Never falls back to the org default — see the header. */
|
|
102
|
+
export function notionWorkCredential(domain) {
|
|
103
|
+
return domain ? notionWorkGrantForDomain(domain)?.credential : undefined;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* The Notion WORKSPACE ids a domain names for itself — every `notion/<workspace>/…` entry in its
|
|
107
|
+
* roster and its claims, de-duplicated.
|
|
108
|
+
*
|
|
109
|
+
* WHY A WORK READ NEEDS THIS. `notionPageDomain`'s CLAIM leg needs a workspace to build the key it
|
|
110
|
+
* matches; its roster leg does not. A Notion-woken caller supplies its own workspace from its
|
|
111
|
+
* surface key, but a Slack-woken worker has none — so without this, a work-granted domain that
|
|
112
|
+
* expresses its Notion membership as a CONTAINER would resolve nothing cross-surface, and the
|
|
113
|
+
* grant would silently work for pages the config names outright ONLY. Reading the candidates off the CALLER's
|
|
114
|
+
* OWN domain keeps that strictly inside what the domain already declares: it can never introduce a
|
|
115
|
+
* workspace nobody wrote down.
|
|
116
|
+
*/
|
|
117
|
+
export function notionWorkspacesOf(domain) {
|
|
118
|
+
const out = new Set();
|
|
119
|
+
for (const key of domain.reach ?? []) {
|
|
120
|
+
const parts = key.split("/");
|
|
121
|
+
if (parts[0] === "notion" && parts.length >= 2 && parts[1])
|
|
122
|
+
out.add(parts[1]);
|
|
123
|
+
}
|
|
124
|
+
return [...out];
|
|
125
|
+
}
|
|
126
|
+
//# sourceMappingURL=notion-work.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notion-work.js","sourceRoot":"","sources":["../../../agent/channels/notion-work.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAChG,EAAE;AACF,iGA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,IAAI,KAAK,CAAC,CAAC,CAAC;YAAE,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAChF,CAAC;IACD,OAAO,CAAC,GAAG,GAAG,CAAC,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { type RouteHandlerArgs } from "eve/channels";
|
|
2
|
+
import { type SurfaceTrust } from "@open-everywhere/core/agent/adapter-api.js";
|
|
3
|
+
import { type NotionSessionState } from "./notion-webhook.js";
|
|
4
|
+
import { type NotionWebhookTimingRecorder } from "./notion-webhook-timing.js";
|
|
5
|
+
import { type NotionSupervisorDeps } from "./notion-supervisor.js";
|
|
6
|
+
/** Reset the cached bot users (tests only) — re-exported at its historical name. */
|
|
7
|
+
export { _resetNotionBotUserCache } from "./notion-bot-user.js";
|
|
8
|
+
/**
|
|
9
|
+
* The Notion arm of the SINGLE-WINDOW PRIVACY FLOOR — the one decision that admits a page into the
|
|
10
|
+
* shared cross-surface window. Pure and SYNCHRONOUS: every input is a fact the pipeline already
|
|
11
|
+
* resolved, so no network call enters this gate. It holds the same role as the Discord and Teams
|
|
12
|
+
* arms (discordSingleWindowPrivacyOk / teamsSingleWindowPrivacyOk) and is a unit-tested truth table
|
|
13
|
+
* the same way. It takes a `declared` resolver where those take a boolean `vouched` one, because
|
|
14
|
+
* this floor must tell a `public` DEMOTION apart from "nothing declared" — see below.
|
|
15
|
+
*
|
|
16
|
+
* THREE POSITIVE SIGNALS, and each one is an OPERATOR DECLARATION. None is an inference from a
|
|
17
|
+
* Notion API field: a page's `public_url` is null for the common guest-shared vector, so a floor
|
|
18
|
+
* that read it would leak private cross-surface context to an external guest.
|
|
19
|
+
* 1. `OE_TRUST=internal`, the blanket switch for an internal-only deployment;
|
|
20
|
+
* 2. the per-surface VOUCH (identity/trust.ts) — an `internal` declaration on the workspaceKey
|
|
21
|
+
* `notion/<ws>` or on the full surfaceKey `notion/<ws>/<page>`, most-specific-wins;
|
|
22
|
+
* 3. the ANCESTOR-TRUST verdict for this delivery (OPE-492): the page sits under a page the
|
|
23
|
+
* operator declared a TRUST ROOT.
|
|
24
|
+
*
|
|
25
|
+
* 🔴 SIGNAL 3 IS HANDED DOWN, NEVER RE-DERIVED (OPE-540). The webhook core walks the parent chain
|
|
26
|
+
* ONCE per delivery, under the credential that verified it, and the dispatch carries the verdict
|
|
27
|
+
* here — the same value the `notion.dispatched` audit row records. The floor only reads it, so the
|
|
28
|
+
* floor stays a synchronous predicate.
|
|
29
|
+
*
|
|
30
|
+
* 🔴 FAIL-CLOSED ON ABSENCE. `trust` is undefined on the `no-roots` verdict, because the webhook
|
|
31
|
+
* core omits the field there. `trusted` is false on every other refusal. Both read as "not
|
|
32
|
+
* internal": no throw, no pass.
|
|
33
|
+
*
|
|
34
|
+
* 🔴 A `public` DECLARATION DEMOTES ABOVE THE TRUST-ROOT VERDICT, as it does on the binding plane:
|
|
35
|
+
* identity/binding.ts orders `declaredExternal ?? raw.trust ?? … ?? vouched`, so `bindFrom` puts the
|
|
36
|
+
* operator's `public` carve-out above the walk's `internal`. A page declared `public` inside a
|
|
37
|
+
* trusted subtree keeps the shared org brain switched off, and this floor keeps it out of the shared
|
|
38
|
+
* window for the same reason.
|
|
39
|
+
*
|
|
40
|
+
* ⚠️ THE TWO PLANES STILL DIVERGE UNDER `OE_TRUST=internal`. The blanket switch is this floor's FIRST
|
|
41
|
+
* leg, above the demotion — exactly as on the Discord and Teams floors — while on the binding plane
|
|
42
|
+
* `local.trust` sits BELOW the demotion. So under the blanket, a `public`-declared page is admitted
|
|
43
|
+
* to the shared window while its org-brain binding stays external. Pre-existing admission-gate
|
|
44
|
+
* behaviour, kept deliberately for cross-platform consistency (docs/how-it-works/identity.md).
|
|
45
|
+
*/
|
|
46
|
+
export declare function notionSingleWindowPrivacyOk(input: {
|
|
47
|
+
/** `notion/<ws>` — a workspace-level declaration covers every page in the workspace. */
|
|
48
|
+
readonly workspaceKey: string;
|
|
49
|
+
/** `notion/<ws>/<page>` — a page-level declaration narrows to one page and beats the workspace. */
|
|
50
|
+
readonly surfaceKey: string;
|
|
51
|
+
/** The ancestor-walk verdict this delivery carries. Undefined ⇒ the operator declared no roots. */
|
|
52
|
+
readonly trust?: {
|
|
53
|
+
readonly trusted: boolean;
|
|
54
|
+
};
|
|
55
|
+
}, deps?: {
|
|
56
|
+
/** The declaration resolver, injected by tests. Returns the most-specific declared value, or
|
|
57
|
+
* undefined when the operator declared nothing for this page. */
|
|
58
|
+
readonly declared?: (workspaceKey: string, surfaceKey: string) => SurfaceTrust | undefined;
|
|
59
|
+
readonly trustEnv?: string | undefined;
|
|
60
|
+
}): boolean;
|
|
61
|
+
type NotionState = NotionSessionState;
|
|
62
|
+
/**
|
|
63
|
+
* Live supervisor deps (mirrors slack-events.ts liveSupervisorDeps): create-or-fetch / rotate /
|
|
64
|
+
* force-rotate over the (org, surfaceKey) channel_session registry with the reserved :oe-sup:g
|
|
65
|
+
* token, and a `wake` that continues the session under that token. org is the deployment org (a
|
|
66
|
+
* deployment fact — never crosses the eve-free core boundary). Rotation reuses shouldRotate AS-IS.
|
|
67
|
+
* A rotation carries the OUTGOING generation's recorded TAIL forward (OPE-794).
|
|
68
|
+
*/
|
|
69
|
+
export declare function liveNotionSupervisorDeps(send: SendFn, surfaceKey: string, to?: RouteHandlerArgs["to"], respond?: RespondFn, timing?: NotionWebhookTimingRecorder): NotionSupervisorDeps;
|
|
70
|
+
/** The channel `send` shape this route uses (structural — avoids importing eve's SendPayload, and
|
|
71
|
+
* since eve 0.31 there is no public `SendFn` to import at all: the address moved onto
|
|
72
|
+
* `from(address)` and `context` moved from the payload into the send options. {@link notionSendFrom}
|
|
73
|
+
* is the one adapter that bridges the two shapes). */
|
|
74
|
+
type SendFn = (payload: {
|
|
75
|
+
message: string;
|
|
76
|
+
context?: string[];
|
|
77
|
+
}, opts: {
|
|
78
|
+
auth: unknown;
|
|
79
|
+
continuationToken: string;
|
|
80
|
+
state: NotionState;
|
|
81
|
+
}) => Promise<void>;
|
|
82
|
+
/** The ANSWER delivery (OPE-1305) — `from(token).respond([{requestId, text}])`, the one primitive
|
|
83
|
+
* that reaches a delegated worker. Structural, for the same reason {@link SendFn} is: eve exports no
|
|
84
|
+
* public type for it. */
|
|
85
|
+
type RespondFn = (input: {
|
|
86
|
+
requestId: string;
|
|
87
|
+
text: string;
|
|
88
|
+
}, opts: {
|
|
89
|
+
auth: unknown;
|
|
90
|
+
continuationToken: string;
|
|
91
|
+
context?: readonly string[];
|
|
92
|
+
}) => Promise<void>;
|
|
93
|
+
declare const _default: import("eve/channels").Channel<NotionSessionState, Record<string, unknown>, Record<string, unknown>>;
|
|
94
|
+
export default _default;
|
|
95
|
+
//# sourceMappingURL=notion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notion.d.ts","sourceRoot":"","sources":["../../../agent/channels/notion.ts"],"names":[],"mappings":"AA4DA,OAAO,EAAuB,KAAK,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAC1E,OAAO,EAkCL,KAAK,YAAY,EAYlB,MAAM,4CAA4C,CAAC;AAapD,OAAO,EAA0G,KAAK,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAYtK,OAAO,EAKL,KAAK,2BAA2B,EACjC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAKL,KAAK,oBAAoB,EAG1B,MAAM,wBAAwB,CAAC;AAwBhC,oFAAoF;AACpF,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA2DhE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,wBAAgB,2BAA2B,CACzC,KAAK,EAAE;IACL,wFAAwF;IACxF,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,mGAAmG;IACnG,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,mGAAmG;IACnG,QAAQ,CAAC,KAAK,CAAC,EAAE;QAAE,QAAQ,CAAC,OAA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