@vellumai/credential-executor 0.10.2-dev.202606250318.5e7cfb0 → 0.10.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.
@@ -6,7 +6,6 @@
6
6
  "type": "module",
7
7
  "exports": {
8
8
  ".": "./src/index.ts",
9
- "./channels": "./src/channels.ts",
10
9
  "./credential-rpc": "./src/credential-rpc.ts",
11
10
  "./ingress": "./src/ingress.ts",
12
11
  "./twilio-ingress": "./src/twilio-ingress.ts",
@@ -18,7 +18,6 @@
18
18
  * module so that both sides can depend on it without circular references.
19
19
  */
20
20
 
21
- export * from "./channels.js";
22
21
  export * from "./transport.js";
23
22
  export * from "./error.js";
24
23
  export * from "./handles.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vellumai/credential-executor",
3
- "version": "0.10.2-dev.202606250318.5e7cfb0",
3
+ "version": "0.10.2",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "exports": {
@@ -1,28 +0,0 @@
1
- import { describe, expect, test } from "bun:test";
2
-
3
- import { CHANNEL_IDS, isChannelId } from "../channels.js";
4
-
5
- describe("isChannelId", () => {
6
- test("accepts every canonical channel id", () => {
7
- for (const id of CHANNEL_IDS) {
8
- expect(isChannelId(id)).toBe(true);
9
- }
10
- });
11
-
12
- test("includes the internal channels no external surface ingresses", () => {
13
- // `platform` (control plane) and `vellum` (native app) are part of the
14
- // canonical vocabulary even though the gateway never ingresses them. The
15
- // gateway's narrower list is a compile-time-asserted subset of this set,
16
- // so these must remain canonical for that assertion to mean anything.
17
- expect(isChannelId("platform")).toBe(true);
18
- expect(isChannelId("vellum")).toBe(true);
19
- });
20
-
21
- test("rejects unknown strings and non-string values", () => {
22
- expect(isChannelId("discord")).toBe(false);
23
- expect(isChannelId("")).toBe(false);
24
- expect(isChannelId(undefined)).toBe(false);
25
- expect(isChannelId(null)).toBe(false);
26
- expect(isChannelId(42)).toBe(false);
27
- });
28
- });
@@ -1,41 +0,0 @@
1
- /**
2
- * Canonical channel-id vocabulary shared between the assistant daemon and the
3
- * gateway.
4
- *
5
- * A "channel" is an external messaging surface an actor can reach the
6
- * assistant through (Slack, Telegram, WhatsApp, phone, …) plus a couple of
7
- * internal ids (`vellum` for native app conversations, `platform` for the
8
- * internal control plane). This is the single source of truth for that set:
9
- * the assistant adopts it wholesale as its `ChannelId`, and the gateway
10
- * asserts its own (narrower) inbound list is a subset of it so the two sides
11
- * cannot silently drift.
12
- *
13
- * Both packages depend on `@vellumai/service-contracts`, so hoisting the set
14
- * here (rather than maintaining a copy on each side) means adding or renaming
15
- * a channel happens in exactly one place.
16
- *
17
- * Note that a consumer may legitimately handle only a *subset* of these — the
18
- * gateway, for example, never ingresses `platform`. Use a local list guarded
19
- * by `satisfies readonly ChannelId[]` for those cases rather than redefining
20
- * the union.
21
- */
22
-
23
- export const CHANNEL_IDS = [
24
- "telegram",
25
- "phone",
26
- "vellum",
27
- "whatsapp",
28
- "slack",
29
- "email",
30
- "platform",
31
- "a2a",
32
- ] as const;
33
-
34
- export type ChannelId = (typeof CHANNEL_IDS)[number];
35
-
36
- export function isChannelId(value: unknown): value is ChannelId {
37
- return (
38
- typeof value === "string" &&
39
- (CHANNEL_IDS as readonly string[]).includes(value)
40
- );
41
- }