@elizaos/plugin-matrix 2.0.3-beta.6 → 2.0.3-beta.7

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.
@@ -0,0 +1,14 @@
1
+ import type { IAgentRuntime } from "@elizaos/core";
2
+ import type { MatrixSettings } from "./types.js";
3
+ export declare const DEFAULT_MATRIX_ACCOUNT_ID = "default";
4
+ export type MatrixAccountConfig = Partial<Omit<MatrixSettings, "rooms" | "accountId">> & {
5
+ accountId?: string;
6
+ id?: string;
7
+ rooms?: string[] | string;
8
+ };
9
+ export declare function normalizeMatrixAccountId(accountId?: unknown): string;
10
+ export declare function listMatrixAccountIds(runtime: IAgentRuntime): string[];
11
+ export declare function resolveDefaultMatrixAccountId(runtime: IAgentRuntime): string;
12
+ export declare function readMatrixAccountId(...sources: unknown[]): string | undefined;
13
+ export declare function resolveMatrixAccountSettings(runtime: IAgentRuntime, requestedAccountId?: string | null): MatrixSettings;
14
+ //# sourceMappingURL=accounts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accounts.d.ts","sourceRoot":"","sources":["../src/accounts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,eAAO,MAAM,yBAAyB,YAAY,CAAC;AAEnD,MAAM,MAAM,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,OAAO,GAAG,WAAW,CAAC,CAAC,GAAG;IACvF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;CAC3B,CAAC;AAqEF,wBAAgB,wBAAwB,CAAC,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,CAIpE;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,aAAa,GAAG,MAAM,EAAE,CAkBrE;AAED,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,aAAa,GAAG,MAAM,CAQ5E;AAED,wBAAgB,mBAAmB,CAAC,GAAG,OAAO,EAAE,OAAO,EAAE,GAAG,MAAM,GAAG,SAAS,CA6B7E;AAED,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,aAAa,EACtB,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,GACjC,cAAc,CAgEhB"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Matrix ConnectorAccountManager provider.
3
+ *
4
+ * Adapts the multi-account resolution helpers in `accounts.ts` to the
5
+ * `ConnectorAccountProvider` contract from
6
+ * `@elizaos/core/connectors/account-manager`.
7
+ *
8
+ * Source of truth for accounts is character settings (`character.settings.matrix`)
9
+ * + MATRIX_ACCOUNTS JSON env var + single-account env vars (MATRIX_HOMESERVER,
10
+ * MATRIX_USER_ID, MATRIX_ACCESS_TOKEN). AccountKey is `<homeserver>/<userId>`
11
+ * by convention. Role is derived from the account's `personal` flag: the agent's
12
+ * own Matrix identity is an `AGENT` account behind the `open` gate (acting as the
13
+ * bot is frictionless), while an account flagged `personal: true` — the human
14
+ * owner's account the agent acts THROUGH — is an `OWNER` account behind the
15
+ * `owner_binding` gate (acting as the user requires a verified binding). A Matrix
16
+ * access token authenticates a user either way; what differs is whose identity it
17
+ * is. E2EE keys are scoped per account by the matrix client and are NOT shared.
18
+ */
19
+ import type { ConnectorAccountProvider, IAgentRuntime } from "@elizaos/core";
20
+ export declare const MATRIX_PROVIDER_ID = "matrix";
21
+ export declare function createMatrixConnectorAccountProvider(runtime: IAgentRuntime): ConnectorAccountProvider;
22
+ //# sourceMappingURL=connector-account-provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connector-account-provider.d.ts","sourceRoot":"","sources":["../src/connector-account-provider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAIV,wBAAwB,EACxB,aAAa,EACd,MAAM,eAAe,CAAC;AASvB,eAAO,MAAM,kBAAkB,WAAW,CAAC;AAwC3C,wBAAgB,oCAAoC,CAClD,OAAO,EAAE,aAAa,GACrB,wBAAwB,CAmC1B"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Matrix messaging integration plugin for ElizaOS.
3
+ *
4
+ * This plugin provides Matrix protocol integration using matrix-js-sdk.
5
+ */
6
+ import type { Plugin } from "@elizaos/core";
7
+ export * from "./accounts.js";
8
+ export { MatrixService } from "./service.js";
9
+ export * from "./types.js";
10
+ /**
11
+ * Matrix plugin definition.
12
+ */
13
+ declare const matrixPlugin: Plugin;
14
+ export default matrixPlugin;
15
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAiB,MAAM,EAAE,MAAM,eAAe,CAAC;AAG3D,cAAc,eAAe,CAAC;AAE9B,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,cAAc,YAAY,CAAC;AAO3B;;GAEG;AACH,QAAA,MAAM,YAAY,EAAE,MAsFnB,CAAC;AAEF,eAAe,YAAY,CAAC"}