@elizaos/plugin-eliza-classic 2.0.0-alpha.7 → 2.0.11-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.
Files changed (65) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +57 -0
  3. package/package.json +42 -50
  4. package/dist/actions/generateResponse.d.ts +0 -4
  5. package/dist/actions/generateResponse.d.ts.map +0 -1
  6. package/dist/actions/generateResponse.js +0 -50
  7. package/dist/actions/generateResponse.js.map +0 -1
  8. package/dist/actions/index.d.ts +0 -2
  9. package/dist/actions/index.d.ts.map +0 -1
  10. package/dist/actions/index.js +0 -2
  11. package/dist/actions/index.js.map +0 -1
  12. package/dist/browser/index.browser.js +0 -1382
  13. package/dist/browser/index.browser.js.map +0 -15
  14. package/dist/build.d.ts +0 -2
  15. package/dist/build.d.ts.map +0 -1
  16. package/dist/build.js +0 -60
  17. package/dist/build.js.map +0 -1
  18. package/dist/cjs/index.node.cjs +0 -1413
  19. package/dist/cjs/index.node.cjs.map +0 -15
  20. package/dist/generated/specs/spec-helpers.d.ts +0 -49
  21. package/dist/generated/specs/spec-helpers.d.ts.map +0 -1
  22. package/dist/generated/specs/spec-helpers.js +0 -79
  23. package/dist/generated/specs/spec-helpers.js.map +0 -1
  24. package/dist/generated/specs/specs.d.ts +0 -73
  25. package/dist/generated/specs/specs.d.ts.map +0 -1
  26. package/dist/generated/specs/specs.js +0 -61
  27. package/dist/generated/specs/specs.js.map +0 -1
  28. package/dist/index.browser.d.ts +0 -2
  29. package/dist/index.browser.d.ts.map +0 -1
  30. package/dist/index.browser.js +0 -2
  31. package/dist/index.browser.js.map +0 -1
  32. package/dist/index.d.ts +0 -5
  33. package/dist/index.d.ts.map +0 -1
  34. package/dist/index.js +0 -5
  35. package/dist/index.js.map +0 -1
  36. package/dist/index.node.d.ts +0 -2
  37. package/dist/index.node.d.ts.map +0 -1
  38. package/dist/index.node.js +0 -2
  39. package/dist/index.node.js.map +0 -1
  40. package/dist/models/index.d.ts +0 -2
  41. package/dist/models/index.d.ts.map +0 -1
  42. package/dist/models/index.js +0 -2
  43. package/dist/models/index.js.map +0 -1
  44. package/dist/models/text.d.ts +0 -8
  45. package/dist/models/text.d.ts.map +0 -1
  46. package/dist/models/text.js +0 -425
  47. package/dist/models/text.js.map +0 -1
  48. package/dist/node/index.node.js +0 -1382
  49. package/dist/node/index.node.js.map +0 -15
  50. package/dist/plugin.d.ts +0 -4
  51. package/dist/plugin.d.ts.map +0 -1
  52. package/dist/plugin.js +0 -91
  53. package/dist/plugin.js.map +0 -1
  54. package/dist/providers/elizaGreeting.d.ts +0 -4
  55. package/dist/providers/elizaGreeting.d.ts.map +0 -1
  56. package/dist/providers/elizaGreeting.js +0 -21
  57. package/dist/providers/elizaGreeting.js.map +0 -1
  58. package/dist/providers/index.d.ts +0 -2
  59. package/dist/providers/index.d.ts.map +0 -1
  60. package/dist/providers/index.js +0 -2
  61. package/dist/providers/index.js.map +0 -1
  62. package/dist/types/index.d.ts +0 -49
  63. package/dist/types/index.d.ts.map +0 -1
  64. package/dist/types/index.js +0 -6
  65. package/dist/types/index.js.map +0 -1
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Shaw Walters and elizaOS Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,57 @@
1
+ # @elizaos/plugin-eliza-classic
2
+
3
+ Deterministic ELIZA-style pattern-matching model handlers for [elizaOS](https://github.com/elizaos/eliza) agents. No LLM API key or network access required.
4
+
5
+ ## What it does
6
+
7
+ This plugin registers model handlers that intercept every text-inference call an Eliza agent makes and replies with keyword-pattern responses modelled after the 1966 ELIZA chatbot. It also provides a deterministic lexical embedding handler that returns a normalized 1536-dimensional hashing vector.
8
+
9
+ Use cases:
10
+
11
+ - Offline / zero-cost agent testing without a real LLM.
12
+ - CI pipelines that need an agent to produce responses without network calls.
13
+ - Demonstrating the elizaOS plugin model with a minimal, dependency-free example.
14
+
15
+ ## Capabilities
16
+
17
+ | Capability | Detail |
18
+ |---|---|
19
+ | Text generation | Pattern-matches the user turn using ~16 keyword regexes (mother, feel, think, want, I am, …) and returns a reflective question. Falls back to "Please go on." |
20
+ | Embeddings | Returns a deterministic normalized 1536-dim lexical hashing vector. Useful for offline smoke tests and rough lexical similarity; not a neural semantic embedding. |
21
+
22
+ Exported helpers:
23
+ - `generateElizaResponse(input: string): string` — run the pattern matcher directly.
24
+ - `getElizaGreeting(): string` — returns `"Hello. How are you feeling today?"`.
25
+
26
+ ## Installation
27
+
28
+ ```bash
29
+ bun add @elizaos/plugin-eliza-classic
30
+ ```
31
+
32
+ ## Enabling the plugin
33
+
34
+ Add it to your agent's plugin list:
35
+
36
+ ```ts
37
+ import elizaClassicPlugin from "@elizaos/plugin-eliza-classic";
38
+
39
+ const agent = new AgentRuntime({
40
+ plugins: [elizaClassicPlugin],
41
+ // ...
42
+ });
43
+ ```
44
+
45
+ The plugin declares `priority: 200`. If loaded alongside a real LLM plugin, it will win the model-handler election for all `ModelType` variants unless the other plugin declares a higher priority. To use it only as a fallback, load it before (lower index than) any real LLM plugin and ensure that plugin declares `priority > 200`.
46
+
47
+ ## Required configuration
48
+
49
+ None. No environment variables or API keys needed.
50
+
51
+ ## Building from source
52
+
53
+ ```bash
54
+ bun run --cwd plugins/plugin-eliza-classic build
55
+ ```
56
+
57
+ Output goes to `dist/`. Browser and Node ESM bundles are produced separately (`index.js` / `index.browser.js`).
package/package.json CHANGED
@@ -1,75 +1,67 @@
1
1
  {
2
2
  "name": "@elizaos/plugin-eliza-classic",
3
- "version": "2.0.0-alpha.7",
3
+ "version": "2.0.11-beta.7",
4
4
  "type": "module",
5
- "main": "dist/cjs/index.node.cjs",
6
- "module": "dist/node/index.node.js",
7
- "types": "dist/index.d.ts",
8
- "browser": "dist/browser/index.browser.js",
9
- "sideEffects": false,
10
- "repository": {
11
- "type": "git",
12
- "url": "git+https://github.com/elizaos-plugins/plugin-eliza-classic.git"
13
- },
5
+ "description": "Deterministic ELIZA-style pattern matching (browser + Node); ships compiled ESM in dist/.",
6
+ "main": "./dist/index.js",
7
+ "module": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "browser": "./dist/index.browser.js",
14
10
  "exports": {
15
11
  "./package.json": "./package.json",
16
12
  ".": {
17
13
  "types": "./dist/index.d.ts",
18
14
  "browser": {
19
- "types": "./dist/browser/index.d.ts",
20
- "import": "./dist/browser/index.browser.js",
21
- "default": "./dist/browser/index.browser.js"
15
+ "types": "./dist/index.browser.d.ts",
16
+ "import": "./dist/index.browser.js",
17
+ "default": "./dist/index.browser.js"
22
18
  },
23
19
  "node": {
24
- "types": "./dist/node/index.d.ts",
25
- "import": "./dist/node/index.node.js",
26
- "require": "./dist/cjs/index.node.cjs",
27
- "default": "./dist/node/index.node.js"
20
+ "types": "./dist/index.d.ts",
21
+ "import": "./dist/index.js",
22
+ "default": "./dist/index.js"
28
23
  },
29
- "default": "./dist/node/index.node.js"
24
+ "import": "./dist/index.js",
25
+ "default": "./dist/index.js"
26
+ },
27
+ "./*.css": "./dist/*.css",
28
+ "./*": {
29
+ "types": "./dist/*.d.ts",
30
+ "import": "./dist/*.js",
31
+ "default": "./dist/*.js"
30
32
  }
31
33
  },
34
+ "sideEffects": false,
32
35
  "files": [
33
- "dist",
34
- "rust"
36
+ "dist"
35
37
  ],
38
+ "scripts": {
39
+ "build": "bun run scripts/build.mjs",
40
+ "dev": "tsup --config tsup.config.ts --watch",
41
+ "clean": "rm -rf dist .turbo",
42
+ "typecheck": "tsgo --noEmit -p tsconfig.json",
43
+ "lint": "echo \"Lint skipped\"",
44
+ "lint:check": "bun run lint",
45
+ "test": "vitest run --config vitest.config.ts"
46
+ },
36
47
  "dependencies": {
37
- "@elizaos/core": "2.0.0-alpha.3"
48
+ "@elizaos/core": "2.0.11-beta.7"
38
49
  },
39
50
  "devDependencies": {
40
- "@biomejs/biome": "^2.3.11",
41
- "@types/node": "^25.0.3",
42
- "typescript": "^5.9.3"
51
+ "tsup": "8.5.1",
52
+ "typescript": "^6.0.3",
53
+ "vitest": "^4.0.18"
43
54
  },
44
- "scripts": {
45
- "build:ts": "bun run build.ts",
46
- "dev": "bun --hot build.ts",
47
- "lint": "bunx @biomejs/biome check --write --unsafe .",
48
- "lint:check": "bunx @biomejs/biome check .",
49
- "clean": "rm -rf dist .turbo node_modules",
50
- "format": "bunx @biomejs/biome format --write .",
51
- "format:check": "bunx @biomejs/biome format .",
52
- "typecheck": "tsc --noEmit",
53
- "test": "npx -y vitest@4.0.18 run --passWithNoTests",
54
- "test:ts": "vitest run",
55
- "build": "bun run build.ts"
55
+ "peerDependencies": {
56
+ "@elizaos/core": "2.0.11-beta.7"
56
57
  },
57
58
  "publishConfig": {
58
59
  "access": "public"
59
60
  },
60
- "agentConfig": {
61
- "pluginType": "elizaos:plugin:1.0.0",
62
- "pluginParameters": {}
61
+ "repository": {
62
+ "type": "git",
63
+ "url": "git+https://github.com/elizaos/eliza.git",
64
+ "directory": "plugins/plugin-eliza-classic"
63
65
  },
64
- "milady": {
65
- "platforms": [
66
- "browser",
67
- "node"
68
- ],
69
- "runtime": "both",
70
- "platformDetails": {
71
- "browser": "Browser-compatible build available via exports.browser",
72
- "node": "Node.js build available via exports.node"
73
- }
74
- }
66
+ "gitHead": "cdbc876f793d96073d7eb0d09715a031ce0cd32e"
75
67
  }
@@ -1,4 +0,0 @@
1
- import type { Action } from "@elizaos/core";
2
- export declare const generateResponseAction: Action;
3
- export default generateResponseAction;
4
- //# sourceMappingURL=generateResponse.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"generateResponse.d.ts","sourceRoot":"","sources":["../../actions/generateResponse.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,MAAM,EAQP,MAAM,eAAe,CAAC;AAMvB,eAAO,MAAM,sBAAsB,EAAE,MAwDpC,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
@@ -1,50 +0,0 @@
1
- import { ModelType } from "@elizaos/core";
2
- import { requireActionSpec } from "../generated/specs/spec-helpers";
3
- const spec = requireActionSpec("generate-response");
4
- export const generateResponseAction = {
5
- name: spec.name,
6
- similes: spec.similes ? [...spec.similes] : [],
7
- description: spec.description,
8
- validate: async (_runtime, _message, _state) => {
9
- return true;
10
- },
11
- handler: async (runtime, message, _state, _options, callback) => {
12
- const userInput = typeof message.content === "object" && message.content !== null
13
- ? message.content.text || ""
14
- : String(message.content || "");
15
- if (!userInput.trim()) {
16
- if (callback) {
17
- await callback({
18
- text: "I need something to respond to. What would you like to talk about?",
19
- source: message.content.source,
20
- });
21
- }
22
- return { success: false, error: "No user input provided" };
23
- }
24
- try {
25
- const response = await runtime.useModel(ModelType.TEXT_LARGE, {
26
- prompt: userInput,
27
- });
28
- if (callback) {
29
- await callback({
30
- text: response,
31
- source: message.content.source,
32
- });
33
- }
34
- return { success: true, text: response };
35
- }
36
- catch (error) {
37
- const errorMessage = error instanceof Error ? error.message : String(error);
38
- if (callback) {
39
- await callback({
40
- text: "I encountered an issue. Please try again.",
41
- source: message.content.source,
42
- });
43
- }
44
- return { success: false, error: errorMessage };
45
- }
46
- },
47
- examples: (spec.examples ?? []),
48
- };
49
- export default generateResponseAction;
50
- //# sourceMappingURL=generateResponse.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"generateResponse.js","sourceRoot":"","sources":["../../actions/generateResponse.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAEpE,MAAM,IAAI,GAAG,iBAAiB,CAAC,mBAAmB,CAAC,CAAC;AAEpD,MAAM,CAAC,MAAM,sBAAsB,GAAW;IAC5C,IAAI,EAAE,IAAI,CAAC,IAAI;IACf,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE;IAC9C,WAAW,EAAE,IAAI,CAAC,WAAW;IAC7B,QAAQ,EAAE,KAAK,EAAE,QAAuB,EAAE,QAAgB,EAAE,MAAc,EAAoB,EAAE;QAC9F,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,EAAE,KAAK,EACZ,OAAsB,EACtB,OAAe,EACf,MAAc,EACd,QAAyB,EACzB,QAA0B,EACS,EAAE;QACrC,MAAM,SAAS,GACb,OAAO,OAAO,CAAC,OAAO,KAAK,QAAQ,IAAI,OAAO,CAAC,OAAO,KAAK,IAAI;YAC7D,CAAC,CAAE,OAAO,CAAC,OAA6B,CAAC,IAAI,IAAI,EAAE;YACnD,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC;QAEpC,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,EAAE,CAAC;YACtB,IAAI,QAAQ,EAAE,CAAC;gBACb,MAAM,QAAQ,CAAC;oBACb,IAAI,EAAE,oEAAoE;oBAC1E,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,MAAM;iBAC/B,CAAC,CAAC;YACL,CAAC;YACD,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,wBAAwB,EAAE,CAAC;QAC7D,CAAC;QAED,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,UAAU,EAAE;gBAC5D,MAAM,EAAE,SAAS;aAClB,CAAC,CAAC;YAEH,IAAI,QAAQ,EAAE,CAAC;gBACb,MAAM,QAAQ,CAAC;oBACb,IAAI,EAAE,QAAQ;oBACd,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,MAAM;iBAC/B,CAAC,CAAC;YACL,CAAC;YAED,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;QAC3C,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,YAAY,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YAC5E,IAAI,QAAQ,EAAE,CAAC;gBACb,MAAM,QAAQ,CAAC;oBACb,IAAI,EAAE,2CAA2C;oBACjD,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,MAAM;iBAC/B,CAAC,CAAC;YACL,CAAC;YACD,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC;QACjD,CAAC;IACH,CAAC;IAED,QAAQ,EAAE,CAAC,IAAI,CAAC,QAAQ,IAAI,EAAE,CAAsB;CACrD,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
@@ -1,2 +0,0 @@
1
- export { generateResponseAction } from "./generateResponse";
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../actions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC"}
@@ -1,2 +0,0 @@
1
- export { generateResponseAction } from "./generateResponse";
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../actions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC"}