@tokagent/tokagentos 2.0.24 → 2.0.30

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 (26) hide show
  1. package/package.json +1 -1
  2. package/scaffold-patches/packages/agent/src/api/plugin-routes.ts +1889 -0
  3. package/scaffold-patches/packages/agent/src/api/server.ts +4509 -0
  4. package/scaffold-patches/packages/agent/src/api/trigger-routes.ts +942 -0
  5. package/scaffold-patches/packages/agent/src/runtime/core-plugins.ts +4 -0
  6. package/scaffold-patches/packages/agent/src/triggers/runtime.ts +955 -0
  7. package/scaffold-patches/packages/app-core/src/api/automations-compat-routes.ts +924 -0
  8. package/scaffold-patches/packages/app-core/src/api/client-agent.ts +2755 -0
  9. package/scaffold-patches/packages/app-core/src/components/pages/AutomationsView.tsx +446 -26
  10. package/scaffold-patches/packages/app-core/src/components/pages/SettingsView.tsx +155 -0
  11. package/scaffold-patches/packages/shared/src/onboarding-presets.characters.ts +16 -16
  12. package/templates/fullstack-app/package.json +9 -5
  13. package/templates/fullstack-app/plugins/plugin-tokagent-billing/package.json +1 -1
  14. package/templates/fullstack-app/plugins/plugin-tokagent-billing/src/__tests__/routes/estimate-routes.test.ts +5 -2
  15. package/templates/fullstack-app/plugins/plugin-tokagent-billing/src/dashboard/app.js +896 -19
  16. package/templates/fullstack-app/plugins/plugin-tokagent-billing/src/dashboard/index.html +280 -94
  17. package/templates/fullstack-app/plugins/plugin-tokagent-billing/src/dashboard/style.css +969 -235
  18. package/templates/fullstack-app/plugins/plugin-tokagent-billing/src/routes/keys-routes.ts +170 -0
  19. package/templates/fullstack-app/plugins/plugin-tokagent-billing/src/routes/messages-proxy-routes.ts +114 -3
  20. package/templates/fullstack-app/plugins/plugin-web-fetch/build.ts +35 -0
  21. package/templates/fullstack-app/plugins/plugin-web-fetch/package.json +37 -0
  22. package/templates/fullstack-app/plugins/plugin-web-fetch/src/index.ts +471 -0
  23. package/templates/fullstack-app/plugins/plugin-web-fetch/tsconfig.json +20 -0
  24. package/templates/fullstack-app/scripts/ensure-plugin-builds.mjs +1 -0
  25. package/templates/fullstack-app/scripts/verify-llm-plugins.mjs +122 -0
  26. package/templates-manifest.json +1 -1
@@ -72,38 +72,38 @@ export const CHARACTER_DEFINITIONS: CharacterDefinition[] = [
72
72
  voicePresetId: "sarah",
73
73
  greetingAnimation: "animations/greetings/greeting1.fbx.gz",
74
74
  bio: [
75
- "{{name}} is a DeFi vault operator. {{name}} runs strategies on Tokamak perps, prediction markets, lending, yield.",
76
- "{{name}} is calm, precise, and capital-conscious. {{name}} sizes positions carefully and exits cleanly.",
77
- "{{name}} prefers to ask one clarifying question over guessing about a trade.",
78
- "{{name}} reports position state in plain numbers and stops talking when there's nothing to add.",
79
- "{{name}} treats the operator's hot wallet as production. Every action is reversible-by-design or explicitly flagged.",
80
- "{{name}} explains tradeoffs, never hype. {{name}} doesn't chase narrative pumps.",
81
- "{{name}} respects the vault execution model writes go through allowlisted batches, not freelance signing.",
82
- "{{name}} flags risk before opportunity.",
75
+ "{{name}} is a versatile AI assistantresearch, automation, coding, analysis, and DeFi vault operations.",
76
+ "{{name}} is calm, precise, and tool-driven. Picks the right capability for each request instead of refusing things as 'out of scope'.",
77
+ "{{name}} answers from sources, not assumptions. Calls WEB_SEARCH when freshness matters, FETCH_URL when a URL is named, and won't invent facts that can be fetched.",
78
+ "{{name}} is comfortable across domains from web3 research to general productivity to DeFi execution on Tokamak.",
79
+ "{{name}} prefers to ask one clarifying question over guessing.",
80
+ "{{name}} reports findings in plain numbers and stops when there's nothing to add.",
81
+ "{{name}} treats the operator's hot wallet as production. Money or irreversible actions get extra scrutiny.",
82
+ "{{name}} explains tradeoffs, never hype. No narrative pumps, no shilling.",
83
83
  ],
84
84
  system:
85
- "You are {{name}}, a DeFi vault operator running on Tokamak. You execute strategies — perps, prediction markets, lending, yield rebalancing on behalf of the operator. Be calm, precise, and brief. Lowercase is fine. When the user asks for a trade or position change, summarize the action in plain terms (asset, size, direction, expected outcome) and confirm before submitting. When sizing matters, prefer fractions of available collateral over absolute amounts. Always state whether the action goes through the vault's allowlist or signs directly from the hot wallet. Never invent prices, balances, or APRs — read them from tools. If a tool fails or returns stale data, say so and stop. No shilling, no narrative trading, no FOMO. Capital preservation matters more than upside. Ask one clarifying question when the request is ambiguous. Respond, then wait.",
85
+ "You are {{name}}, a versatile AI assistant. You have access to many toolsWEB_SEARCH (Tavily-backed web search across the whole internet), FETCH_URL (retrieve a specific URL), the Tokamak DeFi vault execution stack (perps, prediction markets, lending, yield rebalancing), shell, and others. Use whichever tool fits the user's request. Do NOT refuse a task because it seems 'out of scope' — your scope is whatever the operator asks, subject to safety and capital-preservation guardrails. When the request is research-shaped (trends, news, what's happening with X, latest releases), call WEB_SEARCH or FETCH_URL — that's exactly what they're for. When the request is DeFi execution (open a position, rebalance, deploy), apply the vault discipline: summarize the action in plain terms (asset, size, direction, expected outcome), confirm before submitting, state whether it goes through the vault's allowlist or signs directly from the hot wallet, prefer fractions of available collateral over absolute amounts, never invent prices/balances/APRs — read them from tools, capital preservation matters more than upside. Always be concise. Lowercase is fine. If a tool fails or returns stale data, say so and stop. No shilling, no narrative trading, no FOMO. Ask one clarifying question when the request is ambiguous. Respond, then wait.",
86
86
  adjectives: [
87
87
  "calm",
88
88
  "precise",
89
- "capital-conscious",
90
89
  "tool-driven",
91
90
  "honest",
91
+ "versatile",
92
92
  "risk-aware",
93
93
  "concise",
94
94
  "operational",
95
95
  ],
96
96
  topics: [
97
+ "web research",
98
+ "AI and ML developments",
99
+ "web3 and crypto news",
100
+ "general productivity",
101
+ "data analysis",
102
+ "DeFi vault operations",
97
103
  "perpetuals trading",
98
104
  "prediction markets",
99
105
  "yield strategies",
100
- "vault accounting",
101
- "position sizing",
102
106
  "risk management",
103
- "on-chain execution",
104
- "rebalancing",
105
- "stablecoin yield",
106
- "drawdown control",
107
107
  ],
108
108
  style: {
109
109
  all: [
@@ -24,7 +24,8 @@
24
24
  "build:desktop": "node tokagent/packages/app-core/scripts/desktop-build.mjs build --variant=base",
25
25
  "build:ios": "bun run --cwd apps/app build:ios",
26
26
  "build:android": "bun run --cwd apps/app build:android",
27
- "dev": "node scripts/ensure-plugin-builds.mjs && node tokagent/packages/app-core/scripts/rt.mjs tokagent/packages/app-core/scripts/dev-ui.mjs --name=__PROJECT_SLUG__",
27
+ "postinstall": "node scripts/verify-llm-plugins.mjs",
28
+ "dev": "node scripts/verify-llm-plugins.mjs && node scripts/ensure-plugin-builds.mjs && node tokagent/packages/app-core/scripts/rt.mjs tokagent/packages/app-core/scripts/dev-ui.mjs --name=__PROJECT_SLUG__",
28
29
  "dev:ui": "node tokagent/packages/app-core/scripts/rt.mjs tokagent/packages/app-core/scripts/dev-ui.mjs --name=__PROJECT_SLUG__ --ui-only",
29
30
  "plugins:build": "node scripts/ensure-plugin-builds.mjs",
30
31
  "dev:desktop": "bun tokagent/packages/app-core/scripts/dev-platform.mjs",
@@ -47,17 +48,20 @@
47
48
  "@elizaos/plugin-local-embedding": "2.0.0-alpha.537",
48
49
  "@elizaos/plugin-ollama": "2.0.0-alpha.537",
49
50
  "@elizaos/plugin-openai": "2.0.0-alpha.537",
50
- "@elizaos/plugin-openrouter": "2.0.0-alpha.13",
51
+ "@elizaos/plugin-openrouter": "2.0.0-alpha.10",
51
52
  "@elizaos/plugin-shell": "2.0.0-alpha.537",
52
- "@elizaos/plugin-sql": "2.0.0-alpha.20"
53
+ "@elizaos/plugin-sql": "2.0.0-alpha.20",
54
+ "@tokagent/plugin-web-fetch": "workspace:*"
53
55
  },
54
56
  "devDependencies": {
55
57
  "typescript": "~5.9.3"
56
58
  },
57
59
  "resolutions": {
58
- "typescript": "~5.9.3"
60
+ "typescript": "~5.9.3",
61
+ "@elizaos/plugin-openrouter": "2.0.0-alpha.10"
59
62
  },
60
63
  "overrides": {
61
- "typescript": "~5.9.3"
64
+ "typescript": "~5.9.3",
65
+ "@elizaos/plugin-openrouter": "2.0.0-alpha.10"
62
66
  }
63
67
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tokagent/plugin-tokagent-billing",
3
- "version": "2.0.14",
3
+ "version": "2.0.16",
4
4
  "description": "elizaOS plugin: Web3 credit-billing routes and middleware for the tokagentos LLM gateway.",
5
5
  "type": "module",
6
6
  "publishConfig": { "access": "public" },
@@ -219,10 +219,13 @@ describe("POST /v1/messages/count_tokens", () => {
219
219
  describe("GET /v1/price", () => {
220
220
  const handler = findHandler("GET", "/v1/price");
221
221
 
222
- it("returns 401 when not authenticated", async () => {
222
+ it("is public (no auth required) — TON/USD is a read-only oracle", async () => {
223
+ // /v1/price was deliberately made public so the dashboard can show the
224
+ // TON/USD rate to logged-out visitors. Asserting 401 here was a stale
225
+ // expectation from the original auth-gated design.
223
226
  const res = makeRes();
224
227
  await handler({}, res, fakeRuntime);
225
- expect(res.statusCode).toBe(401);
228
+ expect(res.statusCode).not.toBe(401);
226
229
  });
227
230
 
228
231
  it("returns fixed price when fixedTonUsd is set", async () => {