@elizaos/agent 0.25.9 → 2.0.0-alpha.151
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 +1 -1
- package/apps/app-companion/src/actions/emote.d.ts +10 -0
- package/apps/app-companion/src/actions/emote.d.ts.map +1 -0
- package/apps/app-companion/src/actions/emote.js +79 -0
- package/apps/app-companion/src/emotes/catalog.d.ts +31 -0
- package/apps/app-companion/src/emotes/catalog.d.ts.map +1 -0
- package/apps/app-companion/src/emotes/catalog.js +402 -0
- package/apps/app-companion/src/plugin.d.ts +9 -0
- package/apps/app-companion/src/plugin.d.ts.map +1 -0
- package/apps/app-companion/src/plugin.js +15 -0
- package/apps/app-knowledge/src/routes.d.ts +23 -0
- package/apps/app-knowledge/src/routes.d.ts.map +1 -0
- package/apps/app-knowledge/src/routes.js +956 -0
- package/apps/app-knowledge/src/service-loader.d.ts +51 -0
- package/apps/app-knowledge/src/service-loader.d.ts.map +1 -0
- package/apps/app-knowledge/src/service-loader.js +34 -0
- package/apps/app-lifeops/src/action.d.ts +3 -0
- package/apps/app-lifeops/src/action.d.ts.map +1 -0
- package/apps/app-lifeops/src/action.js +332 -0
- package/apps/app-lifeops/src/actions/calendar.d.ts +19 -0
- package/apps/app-lifeops/src/actions/calendar.d.ts.map +1 -0
- package/apps/app-lifeops/src/actions/calendar.js +3143 -0
- package/apps/app-lifeops/src/actions/gmail.d.ts +33 -0
- package/apps/app-lifeops/src/actions/gmail.d.ts.map +1 -0
- package/apps/app-lifeops/src/actions/gmail.js +1734 -0
- package/apps/app-lifeops/src/actions/inbox-digest.d.ts +2 -0
- package/apps/app-lifeops/src/actions/inbox-digest.d.ts.map +1 -0
- package/apps/app-lifeops/src/actions/inbox-digest.js +1 -0
- package/apps/app-lifeops/src/actions/inbox-respond.d.ts +2 -0
- package/apps/app-lifeops/src/actions/inbox-respond.d.ts.map +1 -0
- package/apps/app-lifeops/src/actions/inbox-respond.js +1 -0
- package/apps/app-lifeops/src/actions/inbox-triage.d.ts +2 -0
- package/apps/app-lifeops/src/actions/inbox-triage.d.ts.map +1 -0
- package/apps/app-lifeops/src/actions/inbox-triage.js +1 -0
- package/apps/app-lifeops/src/actions/inbox.d.ts +3 -0
- package/apps/app-lifeops/src/actions/inbox.d.ts.map +1 -0
- package/apps/app-lifeops/src/actions/inbox.js +856 -0
- package/apps/app-lifeops/src/actions/life-goal-extractor.d.ts +69 -0
- package/apps/app-lifeops/src/actions/life-goal-extractor.d.ts.map +1 -0
- package/apps/app-lifeops/src/actions/life-goal-extractor.js +354 -0
- package/apps/app-lifeops/src/actions/life-param-extractor.d.ts +78 -0
- package/apps/app-lifeops/src/actions/life-param-extractor.d.ts.map +1 -0
- package/apps/app-lifeops/src/actions/life-param-extractor.js +423 -0
- package/apps/app-lifeops/src/actions/life-recent-context.d.ts +9 -0
- package/apps/app-lifeops/src/actions/life-recent-context.d.ts.map +1 -0
- package/apps/app-lifeops/src/actions/life-recent-context.js +84 -0
- package/apps/app-lifeops/src/actions/life-update-extractor.d.ts +27 -0
- package/apps/app-lifeops/src/actions/life-update-extractor.d.ts.map +1 -0
- package/apps/app-lifeops/src/actions/life-update-extractor.js +195 -0
- package/apps/app-lifeops/src/actions/life.d.ts +9 -0
- package/apps/app-lifeops/src/actions/life.d.ts.map +1 -0
- package/apps/app-lifeops/src/actions/life.extractor.d.ts +18 -0
- package/apps/app-lifeops/src/actions/life.extractor.d.ts.map +1 -0
- package/apps/app-lifeops/src/actions/life.extractor.js +264 -0
- package/apps/app-lifeops/src/actions/life.js +3379 -0
- package/apps/app-lifeops/src/actions/lifeops-extraction-config.d.ts +16 -0
- package/apps/app-lifeops/src/actions/lifeops-extraction-config.d.ts.map +1 -0
- package/apps/app-lifeops/src/actions/lifeops-extraction-config.js +25 -0
- package/apps/app-lifeops/src/actions/lifeops-google-helpers.d.ts +62 -0
- package/apps/app-lifeops/src/actions/lifeops-google-helpers.d.ts.map +1 -0
- package/apps/app-lifeops/src/actions/lifeops-google-helpers.js +607 -0
- package/apps/app-lifeops/src/actions/timezone-normalization.d.ts +3 -0
- package/apps/app-lifeops/src/actions/timezone-normalization.d.ts.map +1 -0
- package/apps/app-lifeops/src/actions/timezone-normalization.js +105 -0
- package/apps/app-lifeops/src/actions/update-owner-profile.d.ts +3 -0
- package/apps/app-lifeops/src/actions/update-owner-profile.d.ts.map +1 -0
- package/apps/app-lifeops/src/actions/update-owner-profile.js +131 -0
- package/apps/app-lifeops/src/inbox/channel-deep-links.d.ts +20 -0
- package/apps/app-lifeops/src/inbox/channel-deep-links.d.ts.map +1 -0
- package/apps/app-lifeops/src/inbox/channel-deep-links.js +185 -0
- package/apps/app-lifeops/src/inbox/config.d.ts +7 -0
- package/apps/app-lifeops/src/inbox/config.d.ts.map +1 -0
- package/apps/app-lifeops/src/inbox/config.js +59 -0
- package/apps/app-lifeops/src/inbox/message-fetcher.d.ts +33 -0
- package/apps/app-lifeops/src/inbox/message-fetcher.d.ts.map +1 -0
- package/apps/app-lifeops/src/inbox/message-fetcher.js +252 -0
- package/apps/app-lifeops/src/inbox/reflection.d.ts +45 -0
- package/apps/app-lifeops/src/inbox/reflection.d.ts.map +1 -0
- package/apps/app-lifeops/src/inbox/reflection.js +157 -0
- package/apps/app-lifeops/src/inbox/repository.d.ts +53 -0
- package/apps/app-lifeops/src/inbox/repository.d.ts.map +1 -0
- package/apps/app-lifeops/src/inbox/repository.js +362 -0
- package/apps/app-lifeops/src/inbox/triage-classifier.d.ts +17 -0
- package/apps/app-lifeops/src/inbox/triage-classifier.d.ts.map +1 -0
- package/apps/app-lifeops/src/inbox/triage-classifier.js +209 -0
- package/apps/app-lifeops/src/inbox/types.d.ts +130 -0
- package/apps/app-lifeops/src/inbox/types.d.ts.map +1 -0
- package/apps/app-lifeops/src/inbox/types.js +1 -0
- package/apps/app-lifeops/src/lifeops/app-state.d.ts +11 -0
- package/apps/app-lifeops/src/lifeops/app-state.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/app-state.js +32 -0
- package/apps/app-lifeops/src/lifeops/apple-reminders.d.ts +58 -0
- package/apps/app-lifeops/src/lifeops/apple-reminders.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/apple-reminders.js +325 -0
- package/apps/app-lifeops/src/lifeops/defaults.d.ts +24 -0
- package/apps/app-lifeops/src/lifeops/defaults.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/defaults.js +205 -0
- package/apps/app-lifeops/src/lifeops/engine.d.ts +8 -0
- package/apps/app-lifeops/src/lifeops/engine.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/engine.js +389 -0
- package/apps/app-lifeops/src/lifeops/goal-grounding.d.ts +54 -0
- package/apps/app-lifeops/src/lifeops/goal-grounding.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/goal-grounding.js +147 -0
- package/apps/app-lifeops/src/lifeops/goal-semantic-evaluator.d.ts +12 -0
- package/apps/app-lifeops/src/lifeops/goal-semantic-evaluator.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/goal-semantic-evaluator.js +154 -0
- package/apps/app-lifeops/src/lifeops/google-api-error.d.ts +7 -0
- package/apps/app-lifeops/src/lifeops/google-api-error.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/google-api-error.js +35 -0
- package/apps/app-lifeops/src/lifeops/google-calendar.d.ts +53 -0
- package/apps/app-lifeops/src/lifeops/google-calendar.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/google-calendar.js +268 -0
- package/apps/app-lifeops/src/lifeops/google-connector-gateway.d.ts +19 -0
- package/apps/app-lifeops/src/lifeops/google-connector-gateway.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/google-connector-gateway.js +65 -0
- package/apps/app-lifeops/src/lifeops/google-fetch.d.ts +11 -0
- package/apps/app-lifeops/src/lifeops/google-fetch.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/google-fetch.js +85 -0
- package/apps/app-lifeops/src/lifeops/google-gmail.d.ts +54 -0
- package/apps/app-lifeops/src/lifeops/google-gmail.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/google-gmail.js +471 -0
- package/apps/app-lifeops/src/lifeops/google-managed-client.d.ts +127 -0
- package/apps/app-lifeops/src/lifeops/google-managed-client.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/google-managed-client.js +294 -0
- package/apps/app-lifeops/src/lifeops/google-oauth.d.ts +61 -0
- package/apps/app-lifeops/src/lifeops/google-oauth.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/google-oauth.js +491 -0
- package/apps/app-lifeops/src/lifeops/google-scopes.d.ts +13 -0
- package/apps/app-lifeops/src/lifeops/google-scopes.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/google-scopes.js +96 -0
- package/apps/app-lifeops/src/lifeops/index.d.ts +25 -0
- package/apps/app-lifeops/src/lifeops/index.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/index.js +24 -0
- package/apps/app-lifeops/src/lifeops/owner-profile.d.ts +15 -0
- package/apps/app-lifeops/src/lifeops/owner-profile.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/owner-profile.js +194 -0
- package/apps/app-lifeops/src/lifeops/repository.d.ts +209 -0
- package/apps/app-lifeops/src/lifeops/repository.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/repository.js +3187 -0
- package/apps/app-lifeops/src/lifeops/runtime.d.ts +14 -0
- package/apps/app-lifeops/src/lifeops/runtime.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/runtime.js +120 -0
- package/apps/app-lifeops/src/lifeops/screen-context.d.ts +52 -0
- package/apps/app-lifeops/src/lifeops/screen-context.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/screen-context.js +332 -0
- package/apps/app-lifeops/src/lifeops/seed-routines.d.ts +20 -0
- package/apps/app-lifeops/src/lifeops/seed-routines.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/seed-routines.js +111 -0
- package/apps/app-lifeops/src/lifeops/service.d.ts +275 -0
- package/apps/app-lifeops/src/lifeops/service.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/service.js +9260 -0
- package/apps/app-lifeops/src/lifeops/sql.d.ts +31 -0
- package/apps/app-lifeops/src/lifeops/sql.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/sql.js +247 -0
- package/apps/app-lifeops/src/lifeops/time.d.ts +17 -0
- package/apps/app-lifeops/src/lifeops/time.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/time.js +132 -0
- package/apps/app-lifeops/src/lifeops/twilio.d.ts +25 -0
- package/apps/app-lifeops/src/lifeops/twilio.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/twilio.js +157 -0
- package/apps/app-lifeops/src/lifeops/x-poster.d.ts +19 -0
- package/apps/app-lifeops/src/lifeops/x-poster.d.ts.map +1 -0
- package/apps/app-lifeops/src/lifeops/x-poster.js +148 -0
- package/apps/app-lifeops/src/plugin.d.ts +22 -0
- package/apps/app-lifeops/src/plugin.d.ts.map +1 -0
- package/apps/app-lifeops/src/plugin.js +92 -0
- package/apps/app-lifeops/src/provider.d.ts +3 -0
- package/apps/app-lifeops/src/provider.d.ts.map +1 -0
- package/apps/app-lifeops/src/provider.js +75 -0
- package/apps/app-lifeops/src/providers/inbox-triage.d.ts +3 -0
- package/apps/app-lifeops/src/providers/inbox-triage.d.ts.map +1 -0
- package/apps/app-lifeops/src/providers/inbox-triage.js +89 -0
- package/apps/app-lifeops/src/providers/lifeops.d.ts +3 -0
- package/apps/app-lifeops/src/providers/lifeops.d.ts.map +1 -0
- package/apps/app-lifeops/src/providers/lifeops.js +157 -0
- package/apps/app-lifeops/src/routes/lifeops-browser-packaging.d.ts +16 -0
- package/apps/app-lifeops/src/routes/lifeops-browser-packaging.d.ts.map +1 -0
- package/apps/app-lifeops/src/routes/lifeops-browser-packaging.js +305 -0
- package/apps/app-lifeops/src/routes/lifeops-routes.d.ts +20 -0
- package/apps/app-lifeops/src/routes/lifeops-routes.d.ts.map +1 -0
- package/apps/app-lifeops/src/routes/lifeops-routes.js +1173 -0
- package/apps/app-lifeops/src/routes/website-blocker-routes.d.ts +7 -0
- package/apps/app-lifeops/src/routes/website-blocker-routes.d.ts.map +1 -0
- package/apps/app-lifeops/src/routes/website-blocker-routes.js +175 -0
- package/apps/app-lifeops/src/selfcontrol/access.d.ts +8 -0
- package/apps/app-lifeops/src/selfcontrol/access.d.ts.map +1 -0
- package/apps/app-lifeops/src/selfcontrol/access.js +16 -0
- package/apps/app-lifeops/src/selfcontrol/action.d.ts +10 -0
- package/apps/app-lifeops/src/selfcontrol/action.d.ts.map +1 -0
- package/apps/app-lifeops/src/selfcontrol/action.js +506 -0
- package/apps/app-lifeops/src/selfcontrol/index.d.ts +13 -0
- package/apps/app-lifeops/src/selfcontrol/index.d.ts.map +1 -0
- package/apps/app-lifeops/src/selfcontrol/index.js +10 -0
- package/apps/app-lifeops/src/selfcontrol/permissions.d.ts +9 -0
- package/apps/app-lifeops/src/selfcontrol/permissions.d.ts.map +1 -0
- package/apps/app-lifeops/src/selfcontrol/permissions.js +1 -0
- package/apps/app-lifeops/src/selfcontrol/provider.d.ts +4 -0
- package/apps/app-lifeops/src/selfcontrol/provider.d.ts.map +1 -0
- package/apps/app-lifeops/src/selfcontrol/provider.js +116 -0
- package/apps/app-lifeops/src/selfcontrol/roles.d.ts +13 -0
- package/apps/app-lifeops/src/selfcontrol/roles.d.ts.map +1 -0
- package/apps/app-lifeops/src/selfcontrol/roles.js +228 -0
- package/apps/app-lifeops/src/selfcontrol/selfcontrol.d.ts +97 -0
- package/apps/app-lifeops/src/selfcontrol/selfcontrol.d.ts.map +1 -0
- package/apps/app-lifeops/src/selfcontrol/selfcontrol.js +949 -0
- package/apps/app-lifeops/src/selfcontrol/service.d.ts +21 -0
- package/apps/app-lifeops/src/selfcontrol/service.d.ts.map +1 -0
- package/apps/app-lifeops/src/selfcontrol/service.js +268 -0
- package/apps/app-lifeops/src/service.d.ts +8 -0
- package/apps/app-lifeops/src/service.d.ts.map +1 -0
- package/apps/app-lifeops/src/service.js +11 -0
- package/apps/app-steward/src/api/wallet-capability.d.ts +28 -0
- package/apps/app-steward/src/api/wallet-capability.d.ts.map +1 -0
- package/apps/app-steward/src/api/wallet-capability.js +94 -0
- package/apps/app-steward/src/api/wallet-dex-prices.d.ts +43 -0
- package/apps/app-steward/src/api/wallet-dex-prices.d.ts.map +1 -0
- package/apps/app-steward/src/api/wallet-dex-prices.js +149 -0
- package/apps/app-steward/src/api/wallet-evm-balance.d.ts +66 -0
- package/apps/app-steward/src/api/wallet-evm-balance.d.ts.map +1 -0
- package/apps/app-steward/src/api/wallet-evm-balance.js +666 -0
- package/apps/app-steward/src/api/wallet-routes.d.ts +35 -0
- package/apps/app-steward/src/api/wallet-routes.d.ts.map +1 -0
- package/apps/app-steward/src/api/wallet-routes.js +470 -0
- package/apps/app-steward/src/api/wallet-rpc.d.ts +67 -0
- package/apps/app-steward/src/api/wallet-rpc.d.ts.map +1 -0
- package/apps/app-steward/src/api/wallet-rpc.js +453 -0
- package/apps/app-steward/src/api/wallet.d.ts +60 -0
- package/apps/app-steward/src/api/wallet.d.ts.map +1 -0
- package/apps/app-steward/src/api/wallet.js +639 -0
- package/apps/app-steward/src/routes/server-wallet-trade.d.ts +27 -0
- package/apps/app-steward/src/routes/server-wallet-trade.d.ts.map +1 -0
- package/apps/app-steward/src/routes/server-wallet-trade.js +69 -0
- package/apps/app-steward/src/routes/wallet-core-routes.d.ts +16 -0
- package/apps/app-steward/src/routes/wallet-core-routes.d.ts.map +1 -0
- package/apps/app-steward/src/routes/wallet-core-routes.js +46 -0
- package/apps/app-steward/src/routes/wallet-export-guard.d.ts +51 -0
- package/apps/app-steward/src/routes/wallet-export-guard.d.ts.map +1 -0
- package/apps/app-steward/src/routes/wallet-export-guard.js +248 -0
- package/apps/app-steward/src/services/steward-evm-account.d.ts +58 -0
- package/apps/app-steward/src/services/steward-evm-account.d.ts.map +1 -0
- package/apps/app-steward/src/services/steward-evm-account.js +302 -0
- package/apps/app-steward/src/services/steward-evm-bridge.d.ts +35 -0
- package/apps/app-steward/src/services/steward-evm-bridge.d.ts.map +1 -0
- package/apps/app-steward/src/services/steward-evm-bridge.js +99 -0
- package/apps/app-training/src/services/index.d.ts +3 -0
- package/apps/app-training/src/services/index.d.ts.map +1 -0
- package/apps/app-training/src/services/index.js +1 -0
- package/apps/app-training/src/services/training-backend-check.d.ts +8 -0
- package/apps/app-training/src/services/training-backend-check.d.ts.map +1 -0
- package/apps/app-training/src/services/training-backend-check.js +28 -0
- package/apps/app-training/src/services/training-service-like.d.ts +38 -0
- package/apps/app-training/src/services/training-service-like.d.ts.map +1 -0
- package/apps/app-training/src/services/training-service-like.js +1 -0
- package/package.json +491 -34
- package/packages/agent/src/actions/app-control.d.ts +17 -0
- package/packages/agent/src/actions/app-control.d.ts.map +1 -0
- package/packages/agent/src/actions/app-control.js +212 -0
- package/packages/agent/src/actions/calendar.d.ts +2 -0
- package/packages/agent/src/actions/calendar.d.ts.map +1 -0
- package/packages/agent/src/actions/calendar.js +1 -0
- package/packages/agent/src/actions/check-balance.d.ts +17 -0
- package/packages/agent/src/actions/check-balance.d.ts.map +1 -0
- package/packages/agent/src/actions/check-balance.js +167 -0
- package/packages/agent/src/actions/connector-resolver.d.ts +75 -0
- package/packages/agent/src/actions/connector-resolver.d.ts.map +1 -0
- package/packages/agent/src/actions/connector-resolver.js +245 -0
- package/packages/agent/src/actions/context-signal-lexicon.d.ts +17 -0
- package/packages/agent/src/actions/context-signal-lexicon.d.ts.map +1 -0
- package/packages/agent/src/actions/context-signal-lexicon.js +207 -0
- package/packages/agent/src/actions/context-signal.d.ts +46 -0
- package/packages/agent/src/actions/context-signal.d.ts.map +1 -0
- package/packages/agent/src/actions/context-signal.js +134 -0
- package/packages/agent/src/actions/eject-plugin.d.ts +3 -0
- package/packages/agent/src/actions/eject-plugin.d.ts.map +1 -0
- package/packages/agent/src/actions/eject-plugin.js +48 -0
- package/packages/agent/src/actions/entity-actions.d.ts +4 -0
- package/packages/agent/src/actions/entity-actions.d.ts.map +1 -0
- package/packages/agent/src/actions/entity-actions.js +344 -0
- package/packages/agent/src/actions/execute-trade.d.ts +17 -0
- package/packages/agent/src/actions/execute-trade.d.ts.map +1 -0
- package/packages/agent/src/actions/execute-trade.js +299 -0
- package/packages/agent/src/actions/get-self-status.d.ts +13 -0
- package/packages/agent/src/actions/get-self-status.d.ts.map +1 -0
- package/packages/agent/src/actions/get-self-status.js +66 -0
- package/packages/agent/src/actions/gmail.d.ts +2 -0
- package/packages/agent/src/actions/gmail.d.ts.map +1 -0
- package/packages/agent/src/actions/gmail.js +1 -0
- package/packages/agent/src/actions/grounded-action-reply.d.ts +22 -0
- package/packages/agent/src/actions/grounded-action-reply.d.ts.map +1 -0
- package/packages/agent/src/actions/grounded-action-reply.js +309 -0
- package/packages/agent/src/actions/inbox-digest.d.ts +2 -0
- package/packages/agent/src/actions/inbox-digest.d.ts.map +1 -0
- package/packages/agent/src/actions/inbox-digest.js +1 -0
- package/packages/agent/src/actions/inbox-respond.d.ts +2 -0
- package/packages/agent/src/actions/inbox-respond.d.ts.map +1 -0
- package/packages/agent/src/actions/inbox-respond.js +1 -0
- package/packages/agent/src/actions/inbox-triage.d.ts +2 -0
- package/packages/agent/src/actions/inbox-triage.d.ts.map +1 -0
- package/packages/agent/src/actions/inbox-triage.js +1 -0
- package/packages/agent/src/actions/inbox.d.ts +2 -0
- package/packages/agent/src/actions/inbox.d.ts.map +1 -0
- package/packages/agent/src/actions/inbox.js +1 -0
- package/packages/agent/src/actions/index.d.ts +24 -0
- package/packages/agent/src/actions/index.d.ts.map +1 -0
- package/packages/agent/src/actions/index.js +23 -0
- package/packages/agent/src/actions/install-plugin.d.ts +3 -0
- package/packages/agent/src/actions/install-plugin.d.ts.map +1 -0
- package/packages/agent/src/actions/install-plugin.js +65 -0
- package/packages/agent/src/actions/life-goal-extractor.d.ts +2 -0
- package/packages/agent/src/actions/life-goal-extractor.d.ts.map +1 -0
- package/packages/agent/src/actions/life-goal-extractor.js +1 -0
- package/packages/agent/src/actions/life-param-extractor.d.ts +2 -0
- package/packages/agent/src/actions/life-param-extractor.d.ts.map +1 -0
- package/packages/agent/src/actions/life-param-extractor.js +1 -0
- package/packages/agent/src/actions/life-recent-context.d.ts +2 -0
- package/packages/agent/src/actions/life-recent-context.d.ts.map +1 -0
- package/packages/agent/src/actions/life-recent-context.js +1 -0
- package/packages/agent/src/actions/life-update-extractor.d.ts +2 -0
- package/packages/agent/src/actions/life-update-extractor.d.ts.map +1 -0
- package/packages/agent/src/actions/life-update-extractor.js +1 -0
- package/packages/agent/src/actions/life.d.ts +2 -0
- package/packages/agent/src/actions/life.d.ts.map +1 -0
- package/packages/agent/src/actions/life.extractor.d.ts +2 -0
- package/packages/agent/src/actions/life.extractor.d.ts.map +1 -0
- package/packages/agent/src/actions/life.extractor.js +1 -0
- package/packages/agent/src/actions/life.js +1 -0
- package/packages/agent/src/actions/lifeops-extraction-config.d.ts +2 -0
- package/packages/agent/src/actions/lifeops-extraction-config.d.ts.map +1 -0
- package/packages/agent/src/actions/lifeops-extraction-config.js +1 -0
- package/packages/agent/src/actions/lifeops-google-helpers.d.ts +2 -0
- package/packages/agent/src/actions/lifeops-google-helpers.d.ts.map +1 -0
- package/packages/agent/src/actions/lifeops-google-helpers.js +1 -0
- package/packages/agent/src/actions/list-ejected.d.ts +3 -0
- package/packages/agent/src/actions/list-ejected.d.ts.map +1 -0
- package/packages/agent/src/actions/list-ejected.js +35 -0
- package/packages/agent/src/actions/log-level.d.ts +3 -0
- package/packages/agent/src/actions/log-level.d.ts.map +1 -0
- package/packages/agent/src/actions/log-level.js +125 -0
- package/packages/agent/src/actions/manage-tasks.d.ts +8 -0
- package/packages/agent/src/actions/manage-tasks.d.ts.map +1 -0
- package/packages/agent/src/actions/manage-tasks.js +289 -0
- package/packages/agent/src/actions/media.d.ts +21 -0
- package/packages/agent/src/actions/media.d.ts.map +1 -0
- package/packages/agent/src/actions/media.js +384 -0
- package/packages/agent/src/actions/read-channel.d.ts +3 -0
- package/packages/agent/src/actions/read-channel.d.ts.map +1 -0
- package/packages/agent/src/actions/read-channel.js +224 -0
- package/packages/agent/src/actions/read-messages.d.ts +14 -0
- package/packages/agent/src/actions/read-messages.d.ts.map +1 -0
- package/packages/agent/src/actions/read-messages.js +228 -0
- package/packages/agent/src/actions/reinject-plugin.d.ts +3 -0
- package/packages/agent/src/actions/reinject-plugin.d.ts.map +1 -0
- package/packages/agent/src/actions/reinject-plugin.js +47 -0
- package/packages/agent/src/actions/restart.d.ts +19 -0
- package/packages/agent/src/actions/restart.d.ts.map +1 -0
- package/packages/agent/src/actions/restart.js +109 -0
- package/packages/agent/src/actions/search-conversations.d.ts +3 -0
- package/packages/agent/src/actions/search-conversations.d.ts.map +1 -0
- package/packages/agent/src/actions/search-conversations.js +181 -0
- package/packages/agent/src/actions/send-admin-message.d.ts +3 -0
- package/packages/agent/src/actions/send-admin-message.d.ts.map +1 -0
- package/packages/agent/src/actions/send-admin-message.js +106 -0
- package/packages/agent/src/actions/send-message.d.ts +4 -0
- package/packages/agent/src/actions/send-message.d.ts.map +1 -0
- package/packages/agent/src/actions/send-message.js +364 -0
- package/packages/agent/src/actions/set-user-name.d.ts +13 -0
- package/packages/agent/src/actions/set-user-name.d.ts.map +1 -0
- package/packages/agent/src/actions/set-user-name.js +82 -0
- package/packages/agent/src/actions/skill-command.d.ts +20 -0
- package/packages/agent/src/actions/skill-command.d.ts.map +1 -0
- package/packages/agent/src/actions/skill-command.js +141 -0
- package/packages/agent/src/actions/stream-control.d.ts +11 -0
- package/packages/agent/src/actions/stream-control.d.ts.map +1 -0
- package/packages/agent/src/actions/stream-control.js +112 -0
- package/packages/agent/src/actions/sync-plugin.d.ts +3 -0
- package/packages/agent/src/actions/sync-plugin.d.ts.map +1 -0
- package/packages/agent/src/actions/sync-plugin.js +47 -0
- package/packages/agent/src/actions/terminal.d.ts +15 -0
- package/packages/agent/src/actions/terminal.d.ts.map +1 -0
- package/packages/agent/src/actions/terminal.js +453 -0
- package/packages/agent/src/actions/timezone-normalization.d.ts +2 -0
- package/packages/agent/src/actions/timezone-normalization.d.ts.map +1 -0
- package/packages/agent/src/actions/timezone-normalization.js +1 -0
- package/packages/agent/src/actions/transfer-token.d.ts +17 -0
- package/packages/agent/src/actions/transfer-token.d.ts.map +1 -0
- package/packages/agent/src/actions/transfer-token.js +470 -0
- package/packages/agent/src/actions/update-owner-profile.d.ts +2 -0
- package/packages/agent/src/actions/update-owner-profile.d.ts.map +1 -0
- package/packages/agent/src/actions/update-owner-profile.js +1 -0
- package/packages/agent/src/actions/wallet-action-shared.d.ts +15 -0
- package/packages/agent/src/actions/wallet-action-shared.d.ts.map +1 -0
- package/packages/agent/src/actions/wallet-action-shared.js +24 -0
- package/packages/agent/src/actions/web-search.d.ts +16 -0
- package/packages/agent/src/actions/web-search.d.ts.map +1 -0
- package/packages/agent/src/actions/web-search.js +196 -0
- package/packages/agent/src/activity-profile/analyzer.d.ts +23 -0
- package/packages/agent/src/activity-profile/analyzer.d.ts.map +1 -0
- package/packages/agent/src/activity-profile/analyzer.js +531 -0
- package/packages/agent/src/activity-profile/proactive-planner.d.ts +49 -0
- package/packages/agent/src/activity-profile/proactive-planner.d.ts.map +1 -0
- package/packages/agent/src/activity-profile/proactive-planner.js +455 -0
- package/packages/agent/src/activity-profile/proactive-worker.d.ts +32 -0
- package/packages/agent/src/activity-profile/proactive-worker.d.ts.map +1 -0
- package/packages/agent/src/activity-profile/proactive-worker.js +523 -0
- package/packages/agent/src/activity-profile/profile-metadata.d.ts +10 -0
- package/packages/agent/src/activity-profile/profile-metadata.d.ts.map +1 -0
- package/packages/agent/src/activity-profile/profile-metadata.js +25 -0
- package/packages/agent/src/activity-profile/service.d.ts +11 -0
- package/packages/agent/src/activity-profile/service.d.ts.map +1 -0
- package/packages/agent/src/activity-profile/service.js +226 -0
- package/packages/agent/src/activity-profile/types.d.ts +89 -0
- package/packages/agent/src/activity-profile/types.d.ts.map +1 -0
- package/packages/agent/src/activity-profile/types.js +29 -0
- package/packages/agent/src/api/agent-admin-routes.d.ts +39 -0
- package/packages/agent/src/api/agent-admin-routes.d.ts.map +1 -0
- package/packages/agent/src/api/agent-admin-routes.js +155 -0
- package/packages/agent/src/api/agent-lifecycle-routes.d.ts +16 -0
- package/packages/agent/src/api/agent-lifecycle-routes.d.ts.map +1 -0
- package/packages/agent/src/api/agent-lifecycle-routes.js +94 -0
- package/packages/agent/src/api/agent-model.d.ts +5 -0
- package/packages/agent/src/api/agent-model.d.ts.map +1 -0
- package/packages/agent/src/api/agent-model.js +154 -0
- package/packages/agent/src/api/agent-status-routes.d.ts +96 -0
- package/packages/agent/src/api/agent-status-routes.d.ts.map +1 -0
- package/packages/agent/src/api/agent-status-routes.js +274 -0
- package/packages/agent/src/api/agent-transfer-routes.d.ts +16 -0
- package/packages/agent/src/api/agent-transfer-routes.d.ts.map +1 -0
- package/packages/agent/src/api/agent-transfer-routes.js +124 -0
- package/packages/agent/src/api/app-package-routes.d.ts +7 -0
- package/packages/agent/src/api/app-package-routes.d.ts.map +1 -0
- package/packages/agent/src/api/app-package-routes.js +59 -0
- package/packages/agent/src/api/apps-routes.d.ts +24 -0
- package/packages/agent/src/api/apps-routes.d.ts.map +1 -0
- package/packages/agent/src/api/apps-routes.js +477 -0
- package/packages/agent/src/api/auth-routes.d.ts +11 -0
- package/packages/agent/src/api/auth-routes.d.ts.map +1 -0
- package/packages/agent/src/api/auth-routes.js +74 -0
- package/packages/agent/src/api/avatar-routes.d.ts +11 -0
- package/packages/agent/src/api/avatar-routes.d.ts.map +1 -0
- package/packages/agent/src/api/avatar-routes.js +205 -0
- package/packages/agent/src/api/binance-skill-helpers.d.ts +26 -0
- package/packages/agent/src/api/binance-skill-helpers.d.ts.map +1 -0
- package/packages/agent/src/api/binance-skill-helpers.js +781 -0
- package/packages/agent/src/api/bluebubbles-routes.d.ts +10 -0
- package/packages/agent/src/api/bluebubbles-routes.d.ts.map +1 -0
- package/packages/agent/src/api/bluebubbles-routes.js +129 -0
- package/packages/agent/src/api/browser-workspace-routes.d.ts +5 -0
- package/packages/agent/src/api/browser-workspace-routes.d.ts.map +1 -0
- package/packages/agent/src/api/browser-workspace-routes.js +100 -0
- package/packages/agent/src/api/bsc-trade.d.ts +40 -0
- package/packages/agent/src/api/bsc-trade.d.ts.map +1 -0
- package/packages/agent/src/api/bsc-trade.js +786 -0
- package/packages/agent/src/api/bug-report-routes.d.ts +10 -0
- package/packages/agent/src/api/bug-report-routes.d.ts.map +1 -0
- package/packages/agent/src/api/bug-report-routes.js +264 -0
- package/packages/agent/src/api/character-routes.d.ts +51 -0
- package/packages/agent/src/api/character-routes.d.ts.map +1 -0
- package/packages/agent/src/api/character-routes.js +367 -0
- package/packages/agent/src/api/chat-augmentation.d.ts +89 -0
- package/packages/agent/src/api/chat-augmentation.d.ts.map +1 -0
- package/packages/agent/src/api/chat-augmentation.js +396 -0
- package/packages/agent/src/api/chat-routes.d.ts +106 -0
- package/packages/agent/src/api/chat-routes.d.ts.map +1 -0
- package/packages/agent/src/api/chat-routes.js +1500 -0
- package/packages/agent/src/api/chat-text-helpers.d.ts +11 -0
- package/packages/agent/src/api/chat-text-helpers.d.ts.map +1 -0
- package/packages/agent/src/api/chat-text-helpers.js +183 -0
- package/packages/agent/src/api/cloud-billing-routes.d.ts +9 -0
- package/packages/agent/src/api/cloud-billing-routes.d.ts.map +1 -0
- package/packages/agent/src/api/cloud-billing-routes.js +388 -0
- package/packages/agent/src/api/cloud-compat-routes.d.ts +10 -0
- package/packages/agent/src/api/cloud-compat-routes.d.ts.map +1 -0
- package/packages/agent/src/api/cloud-compat-routes.js +212 -0
- package/packages/agent/src/api/cloud-provisioning.d.ts +14 -0
- package/packages/agent/src/api/cloud-provisioning.d.ts.map +1 -0
- package/packages/agent/src/api/cloud-provisioning.js +30 -0
- package/packages/agent/src/api/cloud-relay-routes.d.ts +22 -0
- package/packages/agent/src/api/cloud-relay-routes.d.ts.map +1 -0
- package/packages/agent/src/api/cloud-relay-routes.js +52 -0
- package/packages/agent/src/api/cloud-routes.d.ts +80 -0
- package/packages/agent/src/api/cloud-routes.d.ts.map +1 -0
- package/packages/agent/src/api/cloud-routes.js +582 -0
- package/packages/agent/src/api/cloud-status-routes.d.ts +15 -0
- package/packages/agent/src/api/cloud-status-routes.d.ts.map +1 -0
- package/packages/agent/src/api/cloud-status-routes.js +143 -0
- package/packages/agent/src/api/coding-agents-auth-sanitize.d.ts +2 -0
- package/packages/agent/src/api/coding-agents-auth-sanitize.d.ts.map +1 -0
- package/packages/agent/src/api/coding-agents-auth-sanitize.js +1 -0
- package/packages/agent/src/api/coding-agents-preflight-normalize.d.ts +2 -0
- package/packages/agent/src/api/coding-agents-preflight-normalize.d.ts.map +1 -0
- package/packages/agent/src/api/coding-agents-preflight-normalize.js +1 -0
- package/packages/agent/src/api/compat-utils.d.ts +49 -0
- package/packages/agent/src/api/compat-utils.d.ts.map +1 -0
- package/packages/agent/src/api/compat-utils.js +126 -0
- package/packages/agent/src/api/config-env.d.ts +43 -0
- package/packages/agent/src/api/config-env.d.ts.map +1 -0
- package/packages/agent/src/api/config-env.js +284 -0
- package/packages/agent/src/api/config-routes.d.ts +33 -0
- package/packages/agent/src/api/config-routes.d.ts.map +1 -0
- package/packages/agent/src/api/config-routes.js +253 -0
- package/packages/agent/src/api/connector-health.d.ts +42 -0
- package/packages/agent/src/api/connector-health.d.ts.map +1 -0
- package/packages/agent/src/api/connector-health.js +132 -0
- package/packages/agent/src/api/connector-routes.d.ts +21 -0
- package/packages/agent/src/api/connector-routes.d.ts.map +1 -0
- package/packages/agent/src/api/connector-routes.js +79 -0
- package/packages/agent/src/api/conversation-routes.d.ts +42 -0
- package/packages/agent/src/api/conversation-routes.d.ts.map +1 -0
- package/packages/agent/src/api/conversation-routes.js +1128 -0
- package/packages/agent/src/api/coordinator-types.d.ts +2 -0
- package/packages/agent/src/api/coordinator-types.d.ts.map +1 -0
- package/packages/agent/src/api/coordinator-types.js +1 -0
- package/packages/agent/src/api/coordinator-wiring.d.ts +2 -0
- package/packages/agent/src/api/coordinator-wiring.d.ts.map +1 -0
- package/packages/agent/src/api/coordinator-wiring.js +1 -0
- package/packages/agent/src/api/credit-detection.d.ts +9 -0
- package/packages/agent/src/api/credit-detection.d.ts.map +1 -0
- package/packages/agent/src/api/credit-detection.js +41 -0
- package/packages/agent/src/api/database.d.ts +33 -0
- package/packages/agent/src/api/database.d.ts.map +1 -0
- package/packages/agent/src/api/database.js +1020 -0
- package/packages/agent/src/api/diagnostics-routes.d.ts +53 -0
- package/packages/agent/src/api/diagnostics-routes.d.ts.map +1 -0
- package/packages/agent/src/api/diagnostics-routes.js +250 -0
- package/packages/agent/src/api/discord-avatar-cache.d.ts +10 -0
- package/packages/agent/src/api/discord-avatar-cache.d.ts.map +1 -0
- package/packages/agent/src/api/discord-avatar-cache.js +149 -0
- package/packages/agent/src/api/discord-local-routes.d.ts +12 -0
- package/packages/agent/src/api/discord-local-routes.d.ts.map +1 -0
- package/packages/agent/src/api/discord-local-routes.js +145 -0
- package/packages/agent/src/api/discord-profiles.d.ts +26 -0
- package/packages/agent/src/api/discord-profiles.d.ts.map +1 -0
- package/packages/agent/src/api/discord-profiles.js +282 -0
- package/packages/agent/src/api/drop-routes.d.ts +22 -0
- package/packages/agent/src/api/drop-routes.d.ts.map +1 -0
- package/packages/agent/src/api/drop-routes.js +155 -0
- package/packages/agent/src/api/drop-service.d.ts +26 -0
- package/packages/agent/src/api/drop-service.d.ts.map +1 -0
- package/packages/agent/src/api/drop-service.js +134 -0
- package/packages/agent/src/api/early-logs.d.ts +29 -0
- package/packages/agent/src/api/early-logs.d.ts.map +1 -0
- package/packages/agent/src/api/early-logs.js +96 -0
- package/packages/agent/src/api/health-routes.d.ts +44 -0
- package/packages/agent/src/api/health-routes.d.ts.map +1 -0
- package/packages/agent/src/api/health-routes.js +449 -0
- package/packages/agent/src/api/http-helpers.d.ts +50 -0
- package/packages/agent/src/api/http-helpers.d.ts.map +1 -0
- package/packages/agent/src/api/http-helpers.js +148 -0
- package/packages/agent/src/api/imessage-routes.d.ts +55 -0
- package/packages/agent/src/api/imessage-routes.d.ts.map +1 -0
- package/packages/agent/src/api/imessage-routes.js +231 -0
- package/packages/agent/src/api/inbox-routes.d.ts +48 -0
- package/packages/agent/src/api/inbox-routes.d.ts.map +1 -0
- package/packages/agent/src/api/inbox-routes.js +1547 -0
- package/packages/agent/src/api/index.d.ts +63 -0
- package/packages/agent/src/api/index.d.ts.map +1 -0
- package/packages/agent/src/api/index.js +62 -0
- package/packages/agent/src/api/knowledge-routes.d.ts +2 -0
- package/packages/agent/src/api/knowledge-routes.d.ts.map +1 -0
- package/packages/agent/src/api/knowledge-routes.js +2 -0
- package/packages/agent/src/api/knowledge-service-loader.d.ts +2 -0
- package/packages/agent/src/api/knowledge-service-loader.d.ts.map +1 -0
- package/packages/agent/src/api/knowledge-service-loader.js +2 -0
- package/packages/agent/src/api/lifeops-browser-packaging.d.ts +2 -0
- package/packages/agent/src/api/lifeops-browser-packaging.d.ts.map +1 -0
- package/packages/agent/src/api/lifeops-browser-packaging.js +1 -0
- package/packages/agent/src/api/lifeops-routes.d.ts +2 -0
- package/packages/agent/src/api/lifeops-routes.d.ts.map +1 -0
- package/packages/agent/src/api/lifeops-routes.js +1 -0
- package/packages/agent/src/api/mcp-routes.d.ts +33 -0
- package/packages/agent/src/api/mcp-routes.d.ts.map +1 -0
- package/packages/agent/src/api/mcp-routes.js +186 -0
- package/packages/agent/src/api/memory-bounds.d.ts +51 -0
- package/packages/agent/src/api/memory-bounds.d.ts.map +1 -0
- package/packages/agent/src/api/memory-bounds.js +81 -0
- package/packages/agent/src/api/memory-routes.d.ts +9 -0
- package/packages/agent/src/api/memory-routes.d.ts.map +1 -0
- package/packages/agent/src/api/memory-routes.js +420 -0
- package/packages/agent/src/api/merkle-tree.d.ts +90 -0
- package/packages/agent/src/api/merkle-tree.d.ts.map +1 -0
- package/packages/agent/src/api/merkle-tree.js +174 -0
- package/packages/agent/src/api/misc-routes.d.ts +64 -0
- package/packages/agent/src/api/misc-routes.d.ts.map +1 -0
- package/packages/agent/src/api/misc-routes.js +557 -0
- package/packages/agent/src/api/model-provider-helpers.d.ts +84 -0
- package/packages/agent/src/api/model-provider-helpers.d.ts.map +1 -0
- package/packages/agent/src/api/model-provider-helpers.js +588 -0
- package/packages/agent/src/api/models-routes.d.ts +14 -0
- package/packages/agent/src/api/models-routes.d.ts.map +1 -0
- package/packages/agent/src/api/models-routes.js +37 -0
- package/packages/agent/src/api/music-player-route-fallback.d.ts +16 -0
- package/packages/agent/src/api/music-player-route-fallback.d.ts.map +1 -0
- package/packages/agent/src/api/music-player-route-fallback.js +65 -0
- package/packages/agent/src/api/nfa-routes.d.ts +5 -0
- package/packages/agent/src/api/nfa-routes.d.ts.map +1 -0
- package/packages/agent/src/api/nfa-routes.js +133 -0
- package/packages/agent/src/api/nft-verify.d.ts +16 -0
- package/packages/agent/src/api/nft-verify.d.ts.map +1 -0
- package/packages/agent/src/api/nft-verify.js +81 -0
- package/packages/agent/src/api/og-tracker.d.ts +28 -0
- package/packages/agent/src/api/og-tracker.d.ts.map +1 -0
- package/packages/agent/src/api/og-tracker.js +60 -0
- package/packages/agent/src/api/onboarding-routes.d.ts +50 -0
- package/packages/agent/src/api/onboarding-routes.d.ts.map +1 -0
- package/packages/agent/src/api/onboarding-routes.js +561 -0
- package/packages/agent/src/api/owner-contact-helpers.d.ts +39 -0
- package/packages/agent/src/api/owner-contact-helpers.d.ts.map +1 -0
- package/packages/agent/src/api/owner-contact-helpers.js +47 -0
- package/packages/agent/src/api/parse-action-block.d.ts +35 -0
- package/packages/agent/src/api/parse-action-block.d.ts.map +1 -0
- package/packages/agent/src/api/parse-action-block.js +110 -0
- package/packages/agent/src/api/permissions-routes-extra.d.ts +30 -0
- package/packages/agent/src/api/permissions-routes-extra.d.ts.map +1 -0
- package/packages/agent/src/api/permissions-routes-extra.js +78 -0
- package/packages/agent/src/api/permissions-routes.d.ts +28 -0
- package/packages/agent/src/api/permissions-routes.d.ts.map +1 -0
- package/packages/agent/src/api/permissions-routes.js +180 -0
- package/packages/agent/src/api/plugin-discovery-helpers.d.ts +147 -0
- package/packages/agent/src/api/plugin-discovery-helpers.d.ts.map +1 -0
- package/packages/agent/src/api/plugin-discovery-helpers.js +1015 -0
- package/packages/agent/src/api/plugin-routes.d.ts +127 -0
- package/packages/agent/src/api/plugin-routes.d.ts.map +1 -0
- package/packages/agent/src/api/plugin-routes.js +1140 -0
- package/packages/agent/src/api/plugin-runtime-apply.d.ts +31 -0
- package/packages/agent/src/api/plugin-runtime-apply.d.ts.map +1 -0
- package/packages/agent/src/api/plugin-runtime-apply.js +217 -0
- package/packages/agent/src/api/plugin-validation.d.ts +86 -0
- package/packages/agent/src/api/plugin-validation.d.ts.map +1 -0
- package/packages/agent/src/api/plugin-validation.js +259 -0
- package/packages/agent/src/api/provider-switch-config.d.ts +60 -0
- package/packages/agent/src/api/provider-switch-config.d.ts.map +1 -0
- package/packages/agent/src/api/provider-switch-config.js +718 -0
- package/packages/agent/src/api/provider-switch-routes.d.ts +22 -0
- package/packages/agent/src/api/provider-switch-routes.d.ts.map +1 -0
- package/packages/agent/src/api/provider-switch-routes.js +92 -0
- package/packages/agent/src/api/rate-limiter.d.ts +29 -0
- package/packages/agent/src/api/rate-limiter.d.ts.map +1 -0
- package/packages/agent/src/api/rate-limiter.js +54 -0
- package/packages/agent/src/api/registry-routes.d.ts +29 -0
- package/packages/agent/src/api/registry-routes.d.ts.map +1 -0
- package/packages/agent/src/api/registry-routes.js +98 -0
- package/packages/agent/src/api/registry-service.d.ts +77 -0
- package/packages/agent/src/api/registry-service.d.ts.map +1 -0
- package/packages/agent/src/api/registry-service.js +190 -0
- package/packages/agent/src/api/relationships-routes.d.ts +7 -0
- package/packages/agent/src/api/relationships-routes.d.ts.map +1 -0
- package/packages/agent/src/api/relationships-routes.js +181 -0
- package/packages/agent/src/api/route-helpers.d.ts +16 -0
- package/packages/agent/src/api/route-helpers.d.ts.map +1 -0
- package/packages/agent/src/api/route-helpers.js +1 -0
- package/packages/agent/src/api/runtime-plugin-routes.d.ts +21 -0
- package/packages/agent/src/api/runtime-plugin-routes.d.ts.map +1 -0
- package/packages/agent/src/api/runtime-plugin-routes.js +132 -0
- package/packages/agent/src/api/sandbox-routes.d.ts +12 -0
- package/packages/agent/src/api/sandbox-routes.d.ts.map +1 -0
- package/packages/agent/src/api/sandbox-routes.js +1334 -0
- package/packages/agent/src/api/server-auth.d.ts +52 -0
- package/packages/agent/src/api/server-auth.d.ts.map +1 -0
- package/packages/agent/src/api/server-auth.js +332 -0
- package/packages/agent/src/api/server-helpers.d.ts +95 -0
- package/packages/agent/src/api/server-helpers.d.ts.map +1 -0
- package/packages/agent/src/api/server-helpers.js +708 -0
- package/packages/agent/src/api/server-startup.d.ts +16 -0
- package/packages/agent/src/api/server-startup.d.ts.map +1 -0
- package/packages/agent/src/api/server-startup.js +14 -0
- package/packages/agent/src/api/server-types.d.ts +216 -0
- package/packages/agent/src/api/server-types.d.ts.map +1 -0
- package/packages/agent/src/api/server-types.js +6 -0
- package/packages/agent/src/api/server.d.ts +144 -0
- package/packages/agent/src/api/server.d.ts.map +1 -0
- package/packages/agent/src/api/server.js +5304 -0
- package/packages/agent/src/api/signal-routes.d.ts +42 -0
- package/packages/agent/src/api/signal-routes.d.ts.map +1 -0
- package/packages/agent/src/api/signal-routes.js +232 -0
- package/packages/agent/src/api/skill-discovery-helpers.d.ts +80 -0
- package/packages/agent/src/api/skill-discovery-helpers.d.ts.map +1 -0
- package/packages/agent/src/api/skill-discovery-helpers.js +381 -0
- package/packages/agent/src/api/skills-routes.d.ts +32 -0
- package/packages/agent/src/api/skills-routes.d.ts.map +1 -0
- package/packages/agent/src/api/skills-routes.js +947 -0
- package/packages/agent/src/api/static-file-server.d.ts +19 -0
- package/packages/agent/src/api/static-file-server.d.ts.map +1 -0
- package/packages/agent/src/api/static-file-server.js +233 -0
- package/packages/agent/src/api/stream-persistence.d.ts +64 -0
- package/packages/agent/src/api/stream-persistence.d.ts.map +1 -0
- package/packages/agent/src/api/stream-persistence.js +231 -0
- package/packages/agent/src/api/stream-route-state.d.ts +56 -0
- package/packages/agent/src/api/stream-route-state.d.ts.map +1 -0
- package/packages/agent/src/api/stream-route-state.js +1 -0
- package/packages/agent/src/api/stream-routes.d.ts +43 -0
- package/packages/agent/src/api/stream-routes.d.ts.map +1 -0
- package/packages/agent/src/api/stream-routes.js +728 -0
- package/packages/agent/src/api/streaming-text.d.ts +9 -0
- package/packages/agent/src/api/streaming-text.d.ts.map +1 -0
- package/packages/agent/src/api/streaming-text.js +85 -0
- package/packages/agent/src/api/streaming-types.d.ts +30 -0
- package/packages/agent/src/api/streaming-types.d.ts.map +1 -0
- package/packages/agent/src/api/streaming-types.js +1 -0
- package/packages/agent/src/api/subscription-routes.d.ts +20 -0
- package/packages/agent/src/api/subscription-routes.d.ts.map +1 -0
- package/packages/agent/src/api/subscription-routes.js +213 -0
- package/packages/agent/src/api/task-agent-message-routing.d.ts +2 -0
- package/packages/agent/src/api/task-agent-message-routing.d.ts.map +1 -0
- package/packages/agent/src/api/task-agent-message-routing.js +1 -0
- package/packages/agent/src/api/telegram-account-routes.d.ts +26 -0
- package/packages/agent/src/api/telegram-account-routes.d.ts.map +1 -0
- package/packages/agent/src/api/telegram-account-routes.js +229 -0
- package/packages/agent/src/api/telegram-setup-routes.d.ts +27 -0
- package/packages/agent/src/api/telegram-setup-routes.d.ts.map +1 -0
- package/packages/agent/src/api/telegram-setup-routes.js +125 -0
- package/packages/agent/src/api/terminal-run-limits.d.ts +5 -0
- package/packages/agent/src/api/terminal-run-limits.d.ts.map +1 -0
- package/packages/agent/src/api/terminal-run-limits.js +22 -0
- package/packages/agent/src/api/trade-safety.d.ts +39 -0
- package/packages/agent/src/api/trade-safety.d.ts.map +1 -0
- package/packages/agent/src/api/trade-safety.js +66 -0
- package/packages/agent/src/api/training-backend-check.d.ts +2 -0
- package/packages/agent/src/api/training-backend-check.d.ts.map +1 -0
- package/packages/agent/src/api/training-backend-check.js +2 -0
- package/packages/agent/src/api/training-routes.d.ts +2 -0
- package/packages/agent/src/api/training-routes.d.ts.map +1 -0
- package/packages/agent/src/api/training-routes.js +2 -0
- package/packages/agent/src/api/training-service-like.d.ts +2 -0
- package/packages/agent/src/api/training-service-like.d.ts.map +1 -0
- package/packages/agent/src/api/training-service-like.js +1 -0
- package/packages/agent/src/api/trajectory-routes.d.ts +3 -0
- package/packages/agent/src/api/trajectory-routes.d.ts.map +1 -0
- package/packages/agent/src/api/trajectory-routes.js +2 -0
- package/packages/agent/src/api/trigger-routes.d.ts +73 -0
- package/packages/agent/src/api/trigger-routes.d.ts.map +1 -0
- package/packages/agent/src/api/trigger-routes.js +308 -0
- package/packages/agent/src/api/tts-routes.d.ts +24 -0
- package/packages/agent/src/api/tts-routes.d.ts.map +1 -0
- package/packages/agent/src/api/tts-routes.js +200 -0
- package/packages/agent/src/api/twitter-verify.d.ts +25 -0
- package/packages/agent/src/api/twitter-verify.d.ts.map +1 -0
- package/packages/agent/src/api/twitter-verify.js +168 -0
- package/packages/agent/src/api/tx-service.d.ts +51 -0
- package/packages/agent/src/api/tx-service.d.ts.map +1 -0
- package/packages/agent/src/api/tx-service.js +160 -0
- package/packages/agent/src/api/update-routes.d.ts +19 -0
- package/packages/agent/src/api/update-routes.d.ts.map +1 -0
- package/packages/agent/src/api/update-routes.js +54 -0
- package/packages/agent/src/api/wallet-bsc-routes.d.ts +67 -0
- package/packages/agent/src/api/wallet-bsc-routes.d.ts.map +1 -0
- package/packages/agent/src/api/wallet-bsc-routes.js +322 -0
- package/packages/agent/src/api/wallet-capability.d.ts +33 -0
- package/packages/agent/src/api/wallet-capability.d.ts.map +1 -0
- package/packages/agent/src/api/wallet-capability.js +124 -0
- package/packages/agent/src/api/wallet-dex-prices.d.ts +43 -0
- package/packages/agent/src/api/wallet-dex-prices.d.ts.map +1 -0
- package/packages/agent/src/api/wallet-dex-prices.js +153 -0
- package/packages/agent/src/api/wallet-env-sync.d.ts +2 -0
- package/packages/agent/src/api/wallet-env-sync.d.ts.map +1 -0
- package/packages/agent/src/api/wallet-env-sync.js +104 -0
- package/packages/agent/src/api/wallet-evm-balance.d.ts +66 -0
- package/packages/agent/src/api/wallet-evm-balance.d.ts.map +1 -0
- package/packages/agent/src/api/wallet-evm-balance.js +667 -0
- package/packages/agent/src/api/wallet-routes.d.ts +55 -0
- package/packages/agent/src/api/wallet-routes.d.ts.map +1 -0
- package/packages/agent/src/api/wallet-routes.js +833 -0
- package/packages/agent/src/api/wallet-rpc.d.ts +78 -0
- package/packages/agent/src/api/wallet-rpc.d.ts.map +1 -0
- package/packages/agent/src/api/wallet-rpc.js +476 -0
- package/packages/agent/src/api/wallet-trade-routes.d.ts +110 -0
- package/packages/agent/src/api/wallet-trade-routes.d.ts.map +1 -0
- package/packages/agent/src/api/wallet-trade-routes.js +353 -0
- package/packages/agent/src/api/wallet-trading-profile.d.ts +56 -0
- package/packages/agent/src/api/wallet-trading-profile.d.ts.map +1 -0
- package/packages/agent/src/api/wallet-trading-profile.js +565 -0
- package/packages/agent/src/api/wallet.d.ts +64 -0
- package/packages/agent/src/api/wallet.d.ts.map +1 -0
- package/packages/agent/src/api/wallet.js +674 -0
- package/packages/agent/src/api/website-blocker-routes.d.ts +2 -0
- package/packages/agent/src/api/website-blocker-routes.d.ts.map +1 -0
- package/packages/agent/src/api/website-blocker-routes.js +1 -0
- package/packages/agent/src/api/whatsapp-routes.d.ts +39 -0
- package/packages/agent/src/api/whatsapp-routes.d.ts.map +1 -0
- package/packages/agent/src/api/whatsapp-routes.js +226 -0
- package/packages/agent/src/api/workbench-helpers.d.ts +39 -0
- package/packages/agent/src/api/workbench-helpers.d.ts.map +1 -0
- package/packages/agent/src/api/workbench-helpers.js +133 -0
- package/packages/agent/src/api/workbench-routes.d.ts +53 -0
- package/packages/agent/src/api/workbench-routes.d.ts.map +1 -0
- package/packages/agent/src/api/workbench-routes.js +405 -0
- package/packages/agent/src/api/zip-utils.d.ts +8 -0
- package/packages/agent/src/api/zip-utils.d.ts.map +1 -0
- package/packages/agent/src/api/zip-utils.js +115 -0
- package/packages/agent/src/auth/anthropic.d.ts +29 -0
- package/packages/agent/src/auth/anthropic.d.ts.map +1 -0
- package/packages/agent/src/auth/anthropic.js +43 -0
- package/packages/agent/src/auth/claude-code-stealth.d.ts +2 -0
- package/packages/agent/src/auth/claude-code-stealth.d.ts.map +1 -0
- package/packages/agent/src/auth/claude-code-stealth.js +114 -0
- package/packages/agent/src/auth/credentials.d.ts +74 -0
- package/packages/agent/src/auth/credentials.d.ts.map +1 -0
- package/packages/agent/src/auth/credentials.js +379 -0
- package/packages/agent/src/auth/index.d.ts +6 -0
- package/packages/agent/src/auth/index.d.ts.map +1 -0
- package/packages/agent/src/auth/index.js +5 -0
- package/packages/agent/src/auth/openai-codex.d.ts +32 -0
- package/packages/agent/src/auth/openai-codex.d.ts.map +1 -0
- package/packages/agent/src/auth/openai-codex.js +81 -0
- package/packages/agent/src/auth/types.d.ts +18 -0
- package/packages/agent/src/auth/types.d.ts.map +1 -0
- package/packages/agent/src/auth/types.js +8 -0
- package/packages/agent/src/auth/vendor/pi-oauth/anthropic-login.d.ts +16 -0
- package/packages/agent/src/auth/vendor/pi-oauth/anthropic-login.d.ts.map +1 -0
- package/packages/agent/src/auth/vendor/pi-oauth/anthropic-login.js +78 -0
- package/packages/agent/src/auth/vendor/pi-oauth/openai-codex-login.d.ts +26 -0
- package/packages/agent/src/auth/vendor/pi-oauth/openai-codex-login.d.ts.map +1 -0
- package/packages/agent/src/auth/vendor/pi-oauth/openai-codex-login.js +342 -0
- package/packages/agent/src/auth/vendor/pi-oauth/pkce.d.ts +9 -0
- package/packages/agent/src/auth/vendor/pi-oauth/pkce.d.ts.map +1 -0
- package/packages/agent/src/auth/vendor/pi-oauth/pkce.js +21 -0
- package/packages/agent/src/autonomy/index.d.ts +48 -0
- package/packages/agent/src/autonomy/index.d.ts.map +1 -0
- package/packages/agent/src/autonomy/index.js +330 -0
- package/packages/agent/src/awareness/index.d.ts +2 -0
- package/packages/agent/src/awareness/index.d.ts.map +1 -0
- package/packages/agent/src/awareness/index.js +1 -0
- package/packages/agent/src/awareness/registry.d.ts +27 -0
- package/packages/agent/src/awareness/registry.d.ts.map +1 -0
- package/packages/agent/src/awareness/registry.js +161 -0
- package/packages/agent/src/bin.d.ts +3 -0
- package/packages/agent/src/bin.d.ts.map +1 -0
- package/packages/agent/src/bin.js +6 -0
- package/packages/agent/src/cli/benchmark.d.ts +10 -0
- package/packages/agent/src/cli/benchmark.d.ts.map +1 -0
- package/packages/agent/src/cli/benchmark.js +293 -0
- package/packages/agent/src/cli/index.d.ts +2 -0
- package/packages/agent/src/cli/index.d.ts.map +1 -0
- package/packages/agent/src/cli/index.js +70 -0
- package/packages/agent/src/cli/parse-duration.d.ts +5 -0
- package/packages/agent/src/cli/parse-duration.d.ts.map +1 -0
- package/packages/agent/src/cli/parse-duration.js +27 -0
- package/packages/agent/src/cloud/auth.d.ts +19 -0
- package/packages/agent/src/cloud/auth.d.ts.map +1 -0
- package/packages/agent/src/cloud/auth.js +110 -0
- package/packages/agent/src/cloud/backup.d.ts +18 -0
- package/packages/agent/src/cloud/backup.d.ts.map +1 -0
- package/packages/agent/src/cloud/backup.js +42 -0
- package/packages/agent/src/cloud/base-url.d.ts +3 -0
- package/packages/agent/src/cloud/base-url.d.ts.map +1 -0
- package/packages/agent/src/cloud/base-url.js +52 -0
- package/packages/agent/src/cloud/bridge-client.d.ts +126 -0
- package/packages/agent/src/cloud/bridge-client.d.ts.map +1 -0
- package/packages/agent/src/cloud/bridge-client.js +380 -0
- package/packages/agent/src/cloud/cloud-manager.d.ts +32 -0
- package/packages/agent/src/cloud/cloud-manager.d.ts.map +1 -0
- package/packages/agent/src/cloud/cloud-manager.js +121 -0
- package/packages/agent/src/cloud/cloud-proxy.d.ts +20 -0
- package/packages/agent/src/cloud/cloud-proxy.d.ts.map +1 -0
- package/packages/agent/src/cloud/cloud-proxy.js +34 -0
- package/packages/agent/src/cloud/cloud-wallet.d.ts +94 -0
- package/packages/agent/src/cloud/cloud-wallet.d.ts.map +1 -0
- package/packages/agent/src/cloud/cloud-wallet.js +199 -0
- package/packages/agent/src/cloud/index.d.ts +7 -0
- package/packages/agent/src/cloud/index.d.ts.map +1 -0
- package/packages/agent/src/cloud/index.js +6 -0
- package/packages/agent/src/cloud/reconnect.d.ts +26 -0
- package/packages/agent/src/cloud/reconnect.d.ts.map +1 -0
- package/packages/agent/src/cloud/reconnect.js +89 -0
- package/packages/agent/src/cloud/validate-url.d.ts +2 -0
- package/packages/agent/src/cloud/validate-url.d.ts.map +1 -0
- package/packages/agent/src/cloud/validate-url.js +162 -0
- package/packages/agent/src/config/character-schema.d.ts +25 -0
- package/packages/agent/src/config/character-schema.d.ts.map +1 -0
- package/packages/agent/src/config/character-schema.js +39 -0
- package/packages/agent/src/config/config.d.ts +6 -0
- package/packages/agent/src/config/config.d.ts.map +1 -0
- package/packages/agent/src/config/config.js +277 -0
- package/packages/agent/src/config/env-vars.d.ts +9 -0
- package/packages/agent/src/config/env-vars.d.ts.map +1 -0
- package/packages/agent/src/config/env-vars.js +282 -0
- package/packages/agent/src/config/feature-flags.d.ts +17 -0
- package/packages/agent/src/config/feature-flags.d.ts.map +1 -0
- package/packages/agent/src/config/feature-flags.js +37 -0
- package/packages/agent/src/config/includes.d.ts +26 -0
- package/packages/agent/src/config/includes.d.ts.map +1 -0
- package/packages/agent/src/config/includes.js +148 -0
- package/packages/agent/src/config/index.d.ts +19 -0
- package/packages/agent/src/config/index.d.ts.map +1 -0
- package/packages/agent/src/config/index.js +18 -0
- package/packages/agent/src/config/object-utils.d.ts +2 -0
- package/packages/agent/src/config/object-utils.d.ts.map +1 -0
- package/packages/agent/src/config/object-utils.js +6 -0
- package/packages/agent/src/config/owner-contacts.d.ts +42 -0
- package/packages/agent/src/config/owner-contacts.d.ts.map +1 -0
- package/packages/agent/src/config/owner-contacts.js +223 -0
- package/packages/agent/src/config/paths.d.ts +13 -0
- package/packages/agent/src/config/paths.d.ts.map +1 -0
- package/packages/agent/src/config/paths.js +106 -0
- package/packages/agent/src/config/plugin-auto-enable.d.ts +36 -0
- package/packages/agent/src/config/plugin-auto-enable.d.ts.map +1 -0
- package/packages/agent/src/config/plugin-auto-enable.js +519 -0
- package/packages/agent/src/config/plugin-widgets.d.ts +29 -0
- package/packages/agent/src/config/plugin-widgets.d.ts.map +1 -0
- package/packages/agent/src/config/plugin-widgets.js +70 -0
- package/packages/agent/src/config/runtime-env.d.ts +2 -0
- package/packages/agent/src/config/runtime-env.d.ts.map +1 -0
- package/packages/agent/src/config/runtime-env.js +1 -0
- package/packages/agent/src/config/schema.d.ts +87 -0
- package/packages/agent/src/config/schema.d.ts.map +1 -0
- package/packages/agent/src/config/schema.js +922 -0
- package/packages/agent/src/config/telegram-custom-commands.d.ts +25 -0
- package/packages/agent/src/config/telegram-custom-commands.d.ts.map +1 -0
- package/packages/agent/src/config/telegram-custom-commands.js +71 -0
- package/packages/agent/src/config/types.agent-defaults.d.ts +362 -0
- package/packages/agent/src/config/types.agent-defaults.d.ts.map +1 -0
- package/packages/agent/src/config/types.agent-defaults.js +1 -0
- package/packages/agent/src/config/types.agents.d.ts +114 -0
- package/packages/agent/src/config/types.agents.d.ts.map +1 -0
- package/packages/agent/src/config/types.agents.js +1 -0
- package/packages/agent/src/config/types.d.ts +8 -0
- package/packages/agent/src/config/types.d.ts.map +1 -0
- package/packages/agent/src/config/types.eliza.d.ts +670 -0
- package/packages/agent/src/config/types.eliza.d.ts.map +1 -0
- package/packages/agent/src/config/types.eliza.js +1 -0
- package/packages/agent/src/config/types.gateway.d.ts +216 -0
- package/packages/agent/src/config/types.gateway.d.ts.map +1 -0
- package/packages/agent/src/config/types.gateway.js +1 -0
- package/packages/agent/src/config/types.hooks.d.ts +107 -0
- package/packages/agent/src/config/types.hooks.d.ts.map +1 -0
- package/packages/agent/src/config/types.hooks.js +1 -0
- package/packages/agent/src/config/types.js +7 -0
- package/packages/agent/src/config/types.messages.d.ts +176 -0
- package/packages/agent/src/config/types.messages.d.ts.map +1 -0
- package/packages/agent/src/config/types.messages.js +1 -0
- package/packages/agent/src/config/types.tools.d.ts +400 -0
- package/packages/agent/src/config/types.tools.d.ts.map +1 -0
- package/packages/agent/src/config/types.tools.js +1 -0
- package/packages/agent/src/config/zod-schema.agent-runtime.d.ts +1137 -0
- package/packages/agent/src/config/zod-schema.agent-runtime.d.ts.map +1 -0
- package/packages/agent/src/config/zod-schema.agent-runtime.js +782 -0
- package/packages/agent/src/config/zod-schema.core.d.ts +1021 -0
- package/packages/agent/src/config/zod-schema.core.d.ts.map +1 -0
- package/packages/agent/src/config/zod-schema.core.js +694 -0
- package/packages/agent/src/config/zod-schema.d.ts +3185 -0
- package/packages/agent/src/config/zod-schema.d.ts.map +1 -0
- package/packages/agent/src/config/zod-schema.hooks.d.ts +88 -0
- package/packages/agent/src/config/zod-schema.hooks.d.ts.map +1 -0
- package/packages/agent/src/config/zod-schema.hooks.js +133 -0
- package/packages/agent/src/config/zod-schema.js +850 -0
- package/packages/agent/src/config/zod-schema.providers-core.d.ts +2746 -0
- package/packages/agent/src/config/zod-schema.providers-core.d.ts.map +1 -0
- package/packages/agent/src/config/zod-schema.providers-core.js +961 -0
- package/packages/agent/src/config/zod-schema.session.d.ts +183 -0
- package/packages/agent/src/config/zod-schema.session.d.ts.map +1 -0
- package/packages/agent/src/config/zod-schema.session.js +86 -0
- package/packages/agent/src/contracts/apps.d.ts +2 -0
- package/packages/agent/src/contracts/apps.d.ts.map +1 -0
- package/packages/agent/src/contracts/apps.js +1 -0
- package/packages/agent/src/contracts/awareness.d.ts +38 -0
- package/packages/agent/src/contracts/awareness.d.ts.map +1 -0
- package/packages/agent/src/contracts/awareness.js +7 -0
- package/packages/agent/src/contracts/config.d.ts +148 -0
- package/packages/agent/src/contracts/config.d.ts.map +1 -0
- package/packages/agent/src/contracts/config.js +4 -0
- package/packages/agent/src/contracts/drop.d.ts +2 -0
- package/packages/agent/src/contracts/drop.d.ts.map +1 -0
- package/packages/agent/src/contracts/drop.js +1 -0
- package/packages/agent/src/contracts/index.d.ts +11 -0
- package/packages/agent/src/contracts/index.d.ts.map +1 -0
- package/packages/agent/src/contracts/index.js +10 -0
- package/packages/agent/src/contracts/lifeops.d.ts +2 -0
- package/packages/agent/src/contracts/lifeops.d.ts.map +1 -0
- package/packages/agent/src/contracts/lifeops.js +1 -0
- package/packages/agent/src/contracts/onboarding.d.ts +2 -0
- package/packages/agent/src/contracts/onboarding.d.ts.map +1 -0
- package/packages/agent/src/contracts/onboarding.js +1 -0
- package/packages/agent/src/contracts/permissions.d.ts +2 -0
- package/packages/agent/src/contracts/permissions.d.ts.map +1 -0
- package/packages/agent/src/contracts/permissions.js +1 -0
- package/packages/agent/src/contracts/service-routing.d.ts +2 -0
- package/packages/agent/src/contracts/service-routing.d.ts.map +1 -0
- package/packages/agent/src/contracts/service-routing.js +1 -0
- package/packages/agent/src/contracts/verification.d.ts +2 -0
- package/packages/agent/src/contracts/verification.d.ts.map +1 -0
- package/packages/agent/src/contracts/verification.js +1 -0
- package/packages/agent/src/contracts/wallet.d.ts +2 -0
- package/packages/agent/src/contracts/wallet.d.ts.map +1 -0
- package/packages/agent/src/contracts/wallet.js +1 -0
- package/packages/agent/src/diagnostics/index.d.ts +2 -0
- package/packages/agent/src/diagnostics/index.d.ts.map +1 -0
- package/packages/agent/src/diagnostics/index.js +1 -0
- package/packages/agent/src/diagnostics/integration-observability.d.ts +40 -0
- package/packages/agent/src/diagnostics/integration-observability.d.ts.map +1 -0
- package/packages/agent/src/diagnostics/integration-observability.js +75 -0
- package/packages/agent/src/evals/coordinator-eval-client.d.ts +2 -0
- package/packages/agent/src/evals/coordinator-eval-client.d.ts.map +1 -0
- package/packages/agent/src/evals/coordinator-eval-client.js +1 -0
- package/packages/agent/src/evals/coordinator-live-runner.d.ts +2 -0
- package/packages/agent/src/evals/coordinator-live-runner.d.ts.map +1 -0
- package/packages/agent/src/evals/coordinator-live-runner.js +1 -0
- package/packages/agent/src/evals/coordinator-preflight.d.ts +2 -0
- package/packages/agent/src/evals/coordinator-preflight.d.ts.map +1 -0
- package/packages/agent/src/evals/coordinator-preflight.js +1 -0
- package/packages/agent/src/evals/coordinator-scenarios.d.ts +2 -0
- package/packages/agent/src/evals/coordinator-scenarios.d.ts.map +1 -0
- package/packages/agent/src/evals/coordinator-scenarios.js +1 -0
- package/packages/agent/src/evaluators/late-join-whitelist.d.ts +16 -0
- package/packages/agent/src/evaluators/late-join-whitelist.d.ts.map +1 -0
- package/packages/agent/src/evaluators/late-join-whitelist.js +67 -0
- package/packages/agent/src/hooks/discovery.d.ts +13 -0
- package/packages/agent/src/hooks/discovery.d.ts.map +1 -0
- package/packages/agent/src/hooks/discovery.js +191 -0
- package/packages/agent/src/hooks/eligibility.d.ts +12 -0
- package/packages/agent/src/hooks/eligibility.d.ts.map +1 -0
- package/packages/agent/src/hooks/eligibility.js +105 -0
- package/packages/agent/src/hooks/index.d.ts +3 -0
- package/packages/agent/src/hooks/index.d.ts.map +1 -0
- package/packages/agent/src/hooks/index.js +2 -0
- package/packages/agent/src/hooks/loader.d.ts +34 -0
- package/packages/agent/src/hooks/loader.d.ts.map +1 -0
- package/packages/agent/src/hooks/loader.js +214 -0
- package/packages/agent/src/hooks/registry.d.ts +11 -0
- package/packages/agent/src/hooks/registry.d.ts.map +1 -0
- package/packages/agent/src/hooks/registry.js +58 -0
- package/packages/agent/src/hooks/types.d.ts +104 -0
- package/packages/agent/src/hooks/types.d.ts.map +1 -0
- package/packages/agent/src/hooks/types.js +8 -0
- package/packages/agent/src/index.d.ts +22 -0
- package/packages/agent/src/index.d.ts.map +1 -0
- package/packages/agent/src/index.js +20 -0
- package/packages/agent/src/lifeops/app-state.d.ts +2 -0
- package/packages/agent/src/lifeops/app-state.d.ts.map +1 -0
- package/packages/agent/src/lifeops/app-state.js +1 -0
- package/packages/agent/src/lifeops/apple-reminders.d.ts +2 -0
- package/packages/agent/src/lifeops/apple-reminders.d.ts.map +1 -0
- package/packages/agent/src/lifeops/apple-reminders.js +1 -0
- package/packages/agent/src/lifeops/defaults.d.ts +2 -0
- package/packages/agent/src/lifeops/defaults.d.ts.map +1 -0
- package/packages/agent/src/lifeops/defaults.js +1 -0
- package/packages/agent/src/lifeops/engine.d.ts +2 -0
- package/packages/agent/src/lifeops/engine.d.ts.map +1 -0
- package/packages/agent/src/lifeops/engine.js +1 -0
- package/packages/agent/src/lifeops/goal-grounding.d.ts +2 -0
- package/packages/agent/src/lifeops/goal-grounding.d.ts.map +1 -0
- package/packages/agent/src/lifeops/goal-grounding.js +1 -0
- package/packages/agent/src/lifeops/goal-semantic-evaluator.d.ts +2 -0
- package/packages/agent/src/lifeops/goal-semantic-evaluator.d.ts.map +1 -0
- package/packages/agent/src/lifeops/goal-semantic-evaluator.js +1 -0
- package/packages/agent/src/lifeops/google-api-error.d.ts +2 -0
- package/packages/agent/src/lifeops/google-api-error.d.ts.map +1 -0
- package/packages/agent/src/lifeops/google-api-error.js +1 -0
- package/packages/agent/src/lifeops/google-calendar.d.ts +2 -0
- package/packages/agent/src/lifeops/google-calendar.d.ts.map +1 -0
- package/packages/agent/src/lifeops/google-calendar.js +1 -0
- package/packages/agent/src/lifeops/google-connector-gateway.d.ts +2 -0
- package/packages/agent/src/lifeops/google-connector-gateway.d.ts.map +1 -0
- package/packages/agent/src/lifeops/google-connector-gateway.js +1 -0
- package/packages/agent/src/lifeops/google-fetch.d.ts +2 -0
- package/packages/agent/src/lifeops/google-fetch.d.ts.map +1 -0
- package/packages/agent/src/lifeops/google-fetch.js +1 -0
- package/packages/agent/src/lifeops/google-gmail.d.ts +2 -0
- package/packages/agent/src/lifeops/google-gmail.d.ts.map +1 -0
- package/packages/agent/src/lifeops/google-gmail.js +1 -0
- package/packages/agent/src/lifeops/google-managed-client.d.ts +2 -0
- package/packages/agent/src/lifeops/google-managed-client.d.ts.map +1 -0
- package/packages/agent/src/lifeops/google-managed-client.js +1 -0
- package/packages/agent/src/lifeops/google-oauth.d.ts +2 -0
- package/packages/agent/src/lifeops/google-oauth.d.ts.map +1 -0
- package/packages/agent/src/lifeops/google-oauth.js +1 -0
- package/packages/agent/src/lifeops/google-scopes.d.ts +2 -0
- package/packages/agent/src/lifeops/google-scopes.d.ts.map +1 -0
- package/packages/agent/src/lifeops/google-scopes.js +1 -0
- package/packages/agent/src/lifeops/index.d.ts +2 -0
- package/packages/agent/src/lifeops/index.d.ts.map +1 -0
- package/packages/agent/src/lifeops/index.js +1 -0
- package/packages/agent/src/lifeops/owner-profile.d.ts +2 -0
- package/packages/agent/src/lifeops/owner-profile.d.ts.map +1 -0
- package/packages/agent/src/lifeops/owner-profile.js +1 -0
- package/packages/agent/src/lifeops/repository.d.ts +2 -0
- package/packages/agent/src/lifeops/repository.d.ts.map +1 -0
- package/packages/agent/src/lifeops/repository.js +1 -0
- package/packages/agent/src/lifeops/runtime.d.ts +2 -0
- package/packages/agent/src/lifeops/runtime.d.ts.map +1 -0
- package/packages/agent/src/lifeops/runtime.js +1 -0
- package/packages/agent/src/lifeops/screen-context.d.ts +2 -0
- package/packages/agent/src/lifeops/screen-context.d.ts.map +1 -0
- package/packages/agent/src/lifeops/screen-context.js +1 -0
- package/packages/agent/src/lifeops/seed-routines.d.ts +2 -0
- package/packages/agent/src/lifeops/seed-routines.d.ts.map +1 -0
- package/packages/agent/src/lifeops/seed-routines.js +1 -0
- package/packages/agent/src/lifeops/service.d.ts +2 -0
- package/packages/agent/src/lifeops/service.d.ts.map +1 -0
- package/packages/agent/src/lifeops/service.js +1 -0
- package/packages/agent/src/lifeops/sql.d.ts +2 -0
- package/packages/agent/src/lifeops/sql.d.ts.map +1 -0
- package/packages/agent/src/lifeops/sql.js +1 -0
- package/packages/agent/src/lifeops/time.d.ts +2 -0
- package/packages/agent/src/lifeops/time.d.ts.map +1 -0
- package/packages/agent/src/lifeops/time.js +1 -0
- package/packages/agent/src/lifeops/twilio.d.ts +2 -0
- package/packages/agent/src/lifeops/twilio.d.ts.map +1 -0
- package/packages/agent/src/lifeops/twilio.js +1 -0
- package/packages/agent/src/lifeops/x-poster.d.ts +2 -0
- package/packages/agent/src/lifeops/x-poster.d.ts.map +1 -0
- package/packages/agent/src/lifeops/x-poster.js +1 -0
- package/packages/agent/src/onboarding-presets.d.ts +2 -0
- package/packages/agent/src/onboarding-presets.d.ts.map +1 -0
- package/packages/agent/src/onboarding-presets.js +1 -0
- package/packages/agent/src/plugins/custom-rtmp/index.d.ts +12 -0
- package/packages/agent/src/plugins/custom-rtmp/index.d.ts.map +1 -0
- package/packages/agent/src/plugins/custom-rtmp/index.js +26 -0
- package/packages/agent/src/plugins/discord-voice-capability.d.ts +35 -0
- package/packages/agent/src/plugins/discord-voice-capability.d.ts.map +1 -0
- package/packages/agent/src/plugins/discord-voice-capability.js +97 -0
- package/packages/agent/src/providers/activity-profile.d.ts +3 -0
- package/packages/agent/src/providers/activity-profile.d.ts.map +1 -0
- package/packages/agent/src/providers/activity-profile.js +140 -0
- package/packages/agent/src/providers/admin-panel.d.ts +4 -0
- package/packages/agent/src/providers/admin-panel.d.ts.map +1 -0
- package/packages/agent/src/providers/admin-panel.js +83 -0
- package/packages/agent/src/providers/admin-trust.d.ts +4 -0
- package/packages/agent/src/providers/admin-trust.d.ts.map +1 -0
- package/packages/agent/src/providers/admin-trust.js +34 -0
- package/packages/agent/src/providers/conversation-utils.d.ts +11 -0
- package/packages/agent/src/providers/conversation-utils.d.ts.map +1 -0
- package/packages/agent/src/providers/conversation-utils.js +79 -0
- package/packages/agent/src/providers/escalation-trigger.d.ts +15 -0
- package/packages/agent/src/providers/escalation-trigger.d.ts.map +1 -0
- package/packages/agent/src/providers/escalation-trigger.js +165 -0
- package/packages/agent/src/providers/inbox-triage.d.ts +2 -0
- package/packages/agent/src/providers/inbox-triage.d.ts.map +1 -0
- package/packages/agent/src/providers/inbox-triage.js +1 -0
- package/packages/agent/src/providers/index.d.ts +18 -0
- package/packages/agent/src/providers/index.d.ts.map +1 -0
- package/packages/agent/src/providers/index.js +17 -0
- package/packages/agent/src/providers/lifeops.d.ts +2 -0
- package/packages/agent/src/providers/lifeops.d.ts.map +1 -0
- package/packages/agent/src/providers/lifeops.js +1 -0
- package/packages/agent/src/providers/local-models.d.ts +118 -0
- package/packages/agent/src/providers/local-models.d.ts.map +1 -0
- package/packages/agent/src/providers/local-models.js +427 -0
- package/packages/agent/src/providers/media-provider.d.ts +192 -0
- package/packages/agent/src/providers/media-provider.d.ts.map +1 -0
- package/packages/agent/src/providers/media-provider.js +1088 -0
- package/packages/agent/src/providers/recent-conversations.d.ts +3 -0
- package/packages/agent/src/providers/recent-conversations.d.ts.map +1 -0
- package/packages/agent/src/providers/recent-conversations.js +87 -0
- package/packages/agent/src/providers/relevant-conversations.d.ts +3 -0
- package/packages/agent/src/providers/relevant-conversations.d.ts.map +1 -0
- package/packages/agent/src/providers/relevant-conversations.js +88 -0
- package/packages/agent/src/providers/role-backfill.d.ts +18 -0
- package/packages/agent/src/providers/role-backfill.d.ts.map +1 -0
- package/packages/agent/src/providers/role-backfill.js +84 -0
- package/packages/agent/src/providers/rolodex.d.ts +3 -0
- package/packages/agent/src/providers/rolodex.d.ts.map +1 -0
- package/packages/agent/src/providers/rolodex.js +77 -0
- package/packages/agent/src/providers/self-status.d.ts +4 -0
- package/packages/agent/src/providers/self-status.d.ts.map +1 -0
- package/packages/agent/src/providers/self-status.js +12 -0
- package/packages/agent/src/providers/session-bridge.d.ts +24 -0
- package/packages/agent/src/providers/session-bridge.d.ts.map +1 -0
- package/packages/agent/src/providers/session-bridge.js +85 -0
- package/packages/agent/src/providers/session-utils.d.ts +20 -0
- package/packages/agent/src/providers/session-utils.d.ts.map +1 -0
- package/packages/agent/src/providers/session-utils.js +33 -0
- package/packages/agent/src/providers/simple-mode.d.ts +4 -0
- package/packages/agent/src/providers/simple-mode.d.ts.map +1 -0
- package/packages/agent/src/providers/simple-mode.js +85 -0
- package/packages/agent/src/providers/skill-provider.d.ts +16 -0
- package/packages/agent/src/providers/skill-provider.d.ts.map +1 -0
- package/packages/agent/src/providers/skill-provider.js +336 -0
- package/packages/agent/src/providers/tasks.d.ts +9 -0
- package/packages/agent/src/providers/tasks.d.ts.map +1 -0
- package/packages/agent/src/providers/tasks.js +113 -0
- package/packages/agent/src/providers/ui-catalog.d.ts +3 -0
- package/packages/agent/src/providers/ui-catalog.d.ts.map +1 -0
- package/packages/agent/src/providers/ui-catalog.js +95 -0
- package/packages/agent/src/providers/user-name.d.ts +11 -0
- package/packages/agent/src/providers/user-name.d.ts.map +1 -0
- package/packages/agent/src/providers/user-name.js +40 -0
- package/packages/agent/src/providers/workspace-provider.d.ts +22 -0
- package/packages/agent/src/providers/workspace-provider.d.ts.map +1 -0
- package/packages/agent/src/providers/workspace-provider.js +177 -0
- package/packages/agent/src/providers/workspace.d.ts +54 -0
- package/packages/agent/src/providers/workspace.d.ts.map +1 -0
- package/packages/agent/src/providers/workspace.js +481 -0
- package/packages/agent/src/runtime/agent-event-service.d.ts +35 -0
- package/packages/agent/src/runtime/agent-event-service.d.ts.map +1 -0
- package/packages/agent/src/runtime/agent-event-service.js +16 -0
- package/packages/agent/src/runtime/cloud-onboarding.d.ts +35 -0
- package/packages/agent/src/runtime/cloud-onboarding.d.ts.map +1 -0
- package/packages/agent/src/runtime/cloud-onboarding.js +279 -0
- package/packages/agent/src/runtime/core-plugins.d.ts +19 -0
- package/packages/agent/src/runtime/core-plugins.d.ts.map +1 -0
- package/packages/agent/src/runtime/core-plugins.js +62 -0
- package/packages/agent/src/runtime/custom-actions.d.ts +43 -0
- package/packages/agent/src/runtime/custom-actions.d.ts.map +1 -0
- package/packages/agent/src/runtime/custom-actions.js +507 -0
- package/packages/agent/src/runtime/default-knowledge.d.ts +20 -0
- package/packages/agent/src/runtime/default-knowledge.d.ts.map +1 -0
- package/packages/agent/src/runtime/default-knowledge.js +256 -0
- package/packages/agent/src/runtime/discord-local-plugin.d.ts +86 -0
- package/packages/agent/src/runtime/discord-local-plugin.d.ts.map +1 -0
- package/packages/agent/src/runtime/discord-local-plugin.js +884 -0
- package/packages/agent/src/runtime/eliza-plugin.d.ts +16 -0
- package/packages/agent/src/runtime/eliza-plugin.d.ts.map +1 -0
- package/packages/agent/src/runtime/eliza-plugin.js +212 -0
- package/packages/agent/src/runtime/eliza.d.ts +181 -0
- package/packages/agent/src/runtime/eliza.d.ts.map +1 -0
- package/packages/agent/src/runtime/eliza.js +3286 -0
- package/packages/agent/src/runtime/embedding-presets.d.ts +19 -0
- package/packages/agent/src/runtime/embedding-presets.d.ts.map +1 -0
- package/packages/agent/src/runtime/embedding-presets.js +60 -0
- package/packages/agent/src/runtime/first-time-setup.d.ts +25 -0
- package/packages/agent/src/runtime/first-time-setup.d.ts.map +1 -0
- package/packages/agent/src/runtime/first-time-setup.js +697 -0
- package/packages/agent/src/runtime/index.d.ts +13 -0
- package/packages/agent/src/runtime/index.d.ts.map +1 -0
- package/packages/agent/src/runtime/index.js +12 -0
- package/packages/agent/src/runtime/native-runtime-features.d.ts +4 -0
- package/packages/agent/src/runtime/native-runtime-features.d.ts.map +1 -0
- package/packages/agent/src/runtime/native-runtime-features.js +10 -0
- package/packages/agent/src/runtime/onboarding-names.d.ts +11 -0
- package/packages/agent/src/runtime/onboarding-names.d.ts.map +1 -0
- package/packages/agent/src/runtime/onboarding-names.js +74 -0
- package/packages/agent/src/runtime/owner-entity.d.ts +4 -0
- package/packages/agent/src/runtime/owner-entity.d.ts.map +1 -0
- package/packages/agent/src/runtime/owner-entity.js +30 -0
- package/packages/agent/src/runtime/pglite-error-compat.d.ts +28 -0
- package/packages/agent/src/runtime/pglite-error-compat.d.ts.map +1 -0
- package/packages/agent/src/runtime/pglite-error-compat.js +54 -0
- package/packages/agent/src/runtime/plugin-collector.d.ts +38 -0
- package/packages/agent/src/runtime/plugin-collector.d.ts.map +1 -0
- package/packages/agent/src/runtime/plugin-collector.js +397 -0
- package/packages/agent/src/runtime/plugin-lifecycle.d.ts +44 -0
- package/packages/agent/src/runtime/plugin-lifecycle.d.ts.map +1 -0
- package/packages/agent/src/runtime/plugin-lifecycle.js +574 -0
- package/packages/agent/src/runtime/plugin-resolver.d.ts +31 -0
- package/packages/agent/src/runtime/plugin-resolver.d.ts.map +1 -0
- package/packages/agent/src/runtime/plugin-resolver.js +828 -0
- package/packages/agent/src/runtime/plugin-role-gating.d.ts +34 -0
- package/packages/agent/src/runtime/plugin-role-gating.d.ts.map +1 -0
- package/packages/agent/src/runtime/plugin-role-gating.js +232 -0
- package/packages/agent/src/runtime/plugin-types.d.ts +71 -0
- package/packages/agent/src/runtime/plugin-types.d.ts.map +1 -0
- package/packages/agent/src/runtime/plugin-types.js +318 -0
- package/packages/agent/src/runtime/prompt-compaction.d.ts +80 -0
- package/packages/agent/src/runtime/prompt-compaction.d.ts.map +1 -0
- package/packages/agent/src/runtime/prompt-compaction.js +307 -0
- package/packages/agent/src/runtime/prompt-optimization.d.ts +11 -0
- package/packages/agent/src/runtime/prompt-optimization.d.ts.map +1 -0
- package/packages/agent/src/runtime/prompt-optimization.js +421 -0
- package/packages/agent/src/runtime/release-plugin-policy.d.ts +20 -0
- package/packages/agent/src/runtime/release-plugin-policy.d.ts.map +1 -0
- package/packages/agent/src/runtime/release-plugin-policy.js +85 -0
- package/packages/agent/src/runtime/restart.d.ts +45 -0
- package/packages/agent/src/runtime/restart.d.ts.map +1 -0
- package/packages/agent/src/runtime/restart.js +45 -0
- package/packages/agent/src/runtime/roles/src/action.d.ts +11 -0
- package/packages/agent/src/runtime/roles/src/action.d.ts.map +1 -0
- package/packages/agent/src/runtime/roles/src/action.js +676 -0
- package/packages/agent/src/runtime/roles/src/index.d.ts +24 -0
- package/packages/agent/src/runtime/roles/src/index.d.ts.map +1 -0
- package/packages/agent/src/runtime/roles/src/index.js +243 -0
- package/packages/agent/src/runtime/roles/src/intent.d.ts +18 -0
- package/packages/agent/src/runtime/roles/src/intent.d.ts.map +1 -0
- package/packages/agent/src/runtime/roles/src/intent.js +299 -0
- package/packages/agent/src/runtime/roles/src/provider.d.ts +7 -0
- package/packages/agent/src/runtime/roles/src/provider.d.ts.map +1 -0
- package/packages/agent/src/runtime/roles/src/provider.js +133 -0
- package/packages/agent/src/runtime/roles/src/types.d.ts +3 -0
- package/packages/agent/src/runtime/roles/src/types.d.ts.map +1 -0
- package/packages/agent/src/runtime/roles/src/types.js +1 -0
- package/packages/agent/src/runtime/roles/src/utils.d.ts +2 -0
- package/packages/agent/src/runtime/roles/src/utils.d.ts.map +1 -0
- package/packages/agent/src/runtime/roles/src/utils.js +1 -0
- package/packages/agent/src/runtime/roles.d.ts +3 -0
- package/packages/agent/src/runtime/roles.d.ts.map +1 -0
- package/packages/agent/src/runtime/roles.js +5 -0
- package/packages/agent/src/runtime/trajectory-export.d.ts +8 -0
- package/packages/agent/src/runtime/trajectory-export.d.ts.map +1 -0
- package/packages/agent/src/runtime/trajectory-export.js +7 -0
- package/packages/agent/src/runtime/trajectory-internals.d.ts +217 -0
- package/packages/agent/src/runtime/trajectory-internals.d.ts.map +1 -0
- package/packages/agent/src/runtime/trajectory-internals.js +1296 -0
- package/packages/agent/src/runtime/trajectory-persistence.d.ts +15 -0
- package/packages/agent/src/runtime/trajectory-persistence.d.ts.map +1 -0
- package/packages/agent/src/runtime/trajectory-persistence.js +29 -0
- package/packages/agent/src/runtime/trajectory-query.d.ts +8 -0
- package/packages/agent/src/runtime/trajectory-query.d.ts.map +1 -0
- package/packages/agent/src/runtime/trajectory-query.js +27 -0
- package/packages/agent/src/runtime/trajectory-storage.d.ts +65 -0
- package/packages/agent/src/runtime/trajectory-storage.d.ts.map +1 -0
- package/packages/agent/src/runtime/trajectory-storage.js +1026 -0
- package/packages/agent/src/runtime/version.d.ts +2 -0
- package/packages/agent/src/runtime/version.d.ts.map +1 -0
- package/packages/agent/src/runtime/version.js +5 -0
- package/packages/agent/src/runtime/web-search-tools.d.ts +22 -0
- package/packages/agent/src/runtime/web-search-tools.d.ts.map +1 -0
- package/packages/agent/src/runtime/web-search-tools.js +149 -0
- package/packages/agent/src/security/access.d.ts +17 -0
- package/packages/agent/src/security/access.d.ts.map +1 -0
- package/packages/agent/src/security/access.js +149 -0
- package/packages/agent/src/security/audit-log.d.ts +49 -0
- package/packages/agent/src/security/audit-log.d.ts.map +1 -0
- package/packages/agent/src/security/audit-log.js +161 -0
- package/packages/agent/src/security/index.d.ts +3 -0
- package/packages/agent/src/security/index.d.ts.map +1 -0
- package/packages/agent/src/security/index.js +2 -0
- package/packages/agent/src/security/network-policy.d.ts +6 -0
- package/packages/agent/src/security/network-policy.d.ts.map +1 -0
- package/packages/agent/src/security/network-policy.js +85 -0
- package/packages/agent/src/server/index.d.ts +3 -0
- package/packages/agent/src/server/index.d.ts.map +1 -0
- package/packages/agent/src/server/index.js +1 -0
- package/packages/agent/src/services/agent-export.d.ts +100 -0
- package/packages/agent/src/services/agent-export.d.ts.map +1 -0
- package/packages/agent/src/services/agent-export.js +729 -0
- package/packages/agent/src/services/app-manager.d.ts +56 -0
- package/packages/agent/src/services/app-manager.d.ts.map +1 -0
- package/packages/agent/src/services/app-manager.js +2019 -0
- package/packages/agent/src/services/app-package-modules.d.ts +30 -0
- package/packages/agent/src/services/app-package-modules.d.ts.map +1 -0
- package/packages/agent/src/services/app-package-modules.js +348 -0
- package/packages/agent/src/services/app-run-store.d.ts +6 -0
- package/packages/agent/src/services/app-run-store.d.ts.map +1 -0
- package/packages/agent/src/services/app-run-store.js +490 -0
- package/packages/agent/src/services/app-session-gate.d.ts +15 -0
- package/packages/agent/src/services/app-session-gate.d.ts.map +1 -0
- package/packages/agent/src/services/app-session-gate.js +71 -0
- package/packages/agent/src/services/browser-capture.d.ts +41 -0
- package/packages/agent/src/services/browser-capture.d.ts.map +1 -0
- package/packages/agent/src/services/browser-capture.js +173 -0
- package/packages/agent/src/services/browser-workspace.d.ts +179 -0
- package/packages/agent/src/services/browser-workspace.d.ts.map +1 -0
- package/packages/agent/src/services/browser-workspace.js +4589 -0
- package/packages/agent/src/services/built-in-app-routes/2004scape.d.ts +28 -0
- package/packages/agent/src/services/built-in-app-routes/2004scape.d.ts.map +1 -0
- package/packages/agent/src/services/built-in-app-routes/2004scape.js +1343 -0
- package/packages/agent/src/services/built-in-app-routes/hyperscape.d.ts +5 -0
- package/packages/agent/src/services/built-in-app-routes/hyperscape.d.ts.map +1 -0
- package/packages/agent/src/services/built-in-app-routes/hyperscape.js +189 -0
- package/packages/agent/src/services/character-persistence.d.ts +39 -0
- package/packages/agent/src/services/character-persistence.d.ts.map +1 -0
- package/packages/agent/src/services/character-persistence.js +159 -0
- package/packages/agent/src/services/client-chat-sender.d.ts +19 -0
- package/packages/agent/src/services/client-chat-sender.d.ts.map +1 -0
- package/packages/agent/src/services/client-chat-sender.js +88 -0
- package/packages/agent/src/services/coding-agent-context.d.ts +310 -0
- package/packages/agent/src/services/coding-agent-context.d.ts.map +1 -0
- package/packages/agent/src/services/coding-agent-context.js +281 -0
- package/packages/agent/src/services/coding-task-executor.d.ts +20 -0
- package/packages/agent/src/services/coding-task-executor.d.ts.map +1 -0
- package/packages/agent/src/services/coding-task-executor.js +141 -0
- package/packages/agent/src/services/config-plugin-manager.d.ts +6 -0
- package/packages/agent/src/services/config-plugin-manager.d.ts.map +1 -0
- package/packages/agent/src/services/config-plugin-manager.js +53 -0
- package/packages/agent/src/services/connector-setup-service.d.ts +48 -0
- package/packages/agent/src/services/connector-setup-service.d.ts.map +1 -0
- package/packages/agent/src/services/connector-setup-service.js +60 -0
- package/packages/agent/src/services/conversation-proximity.d.ts +27 -0
- package/packages/agent/src/services/conversation-proximity.d.ts.map +1 -0
- package/packages/agent/src/services/conversation-proximity.js +124 -0
- package/packages/agent/src/services/credential-words.d.ts +26 -0
- package/packages/agent/src/services/credential-words.d.ts.map +1 -0
- package/packages/agent/src/services/credential-words.js +116 -0
- package/packages/agent/src/services/escalation.d.ts +46 -0
- package/packages/agent/src/services/escalation.d.ts.map +1 -0
- package/packages/agent/src/services/escalation.js +415 -0
- package/packages/agent/src/services/executor-registry.d.ts +4 -0
- package/packages/agent/src/services/executor-registry.d.ts.map +1 -0
- package/packages/agent/src/services/executor-registry.js +10 -0
- package/packages/agent/src/services/index.d.ts +25 -0
- package/packages/agent/src/services/index.d.ts.map +1 -0
- package/packages/agent/src/services/index.js +24 -0
- package/packages/agent/src/services/mcp-marketplace.d.ts +89 -0
- package/packages/agent/src/services/mcp-marketplace.d.ts.map +1 -0
- package/packages/agent/src/services/mcp-marketplace.js +200 -0
- package/packages/agent/src/services/overlay-app-presence.d.ts +9 -0
- package/packages/agent/src/services/overlay-app-presence.d.ts.map +1 -0
- package/packages/agent/src/services/overlay-app-presence.js +18 -0
- package/packages/agent/src/services/plugin-manager-types.d.ts +113 -0
- package/packages/agent/src/services/plugin-manager-types.d.ts.map +1 -0
- package/packages/agent/src/services/plugin-manager-types.js +18 -0
- package/packages/agent/src/services/privy-wallets.d.ts +23 -0
- package/packages/agent/src/services/privy-wallets.d.ts.map +1 -0
- package/packages/agent/src/services/privy-wallets.js +230 -0
- package/packages/agent/src/services/registry-client-app-meta.d.ts +6 -0
- package/packages/agent/src/services/registry-client-app-meta.d.ts.map +1 -0
- package/packages/agent/src/services/registry-client-app-meta.js +225 -0
- package/packages/agent/src/services/registry-client-endpoints.d.ts +7 -0
- package/packages/agent/src/services/registry-client-endpoints.d.ts.map +1 -0
- package/packages/agent/src/services/registry-client-endpoints.js +190 -0
- package/packages/agent/src/services/registry-client-local.d.ts +4 -0
- package/packages/agent/src/services/registry-client-local.d.ts.map +1 -0
- package/packages/agent/src/services/registry-client-local.js +545 -0
- package/packages/agent/src/services/registry-client-network.d.ts +9 -0
- package/packages/agent/src/services/registry-client-network.d.ts.map +1 -0
- package/packages/agent/src/services/registry-client-network.js +119 -0
- package/packages/agent/src/services/registry-client-queries.d.ts +15 -0
- package/packages/agent/src/services/registry-client-queries.d.ts.map +1 -0
- package/packages/agent/src/services/registry-client-queries.js +172 -0
- package/packages/agent/src/services/registry-client-types.d.ts +125 -0
- package/packages/agent/src/services/registry-client-types.d.ts.map +1 -0
- package/packages/agent/src/services/registry-client-types.js +1 -0
- package/packages/agent/src/services/registry-client.d.ts +39 -0
- package/packages/agent/src/services/registry-client.d.ts.map +1 -0
- package/packages/agent/src/services/registry-client.js +332 -0
- package/packages/agent/src/services/relationships-graph.d.ts +134 -0
- package/packages/agent/src/services/relationships-graph.d.ts.map +1 -0
- package/packages/agent/src/services/relationships-graph.js +1332 -0
- package/packages/agent/src/services/remote-signing-service.d.ts +58 -0
- package/packages/agent/src/services/remote-signing-service.d.ts.map +1 -0
- package/packages/agent/src/services/remote-signing-service.js +185 -0
- package/packages/agent/src/services/research-task-executor.d.ts +14 -0
- package/packages/agent/src/services/research-task-executor.d.ts.map +1 -0
- package/packages/agent/src/services/research-task-executor.js +136 -0
- package/packages/agent/src/services/sandbox-engine.d.ts +96 -0
- package/packages/agent/src/services/sandbox-engine.d.ts.map +1 -0
- package/packages/agent/src/services/sandbox-engine.js +604 -0
- package/packages/agent/src/services/sandbox-manager.d.ts +106 -0
- package/packages/agent/src/services/sandbox-manager.d.ts.map +1 -0
- package/packages/agent/src/services/sandbox-manager.js +380 -0
- package/packages/agent/src/services/self-updater.d.ts +21 -0
- package/packages/agent/src/services/self-updater.d.ts.map +1 -0
- package/packages/agent/src/services/self-updater.js +162 -0
- package/packages/agent/src/services/send-handler-availability.d.ts +5 -0
- package/packages/agent/src/services/send-handler-availability.d.ts.map +1 -0
- package/packages/agent/src/services/send-handler-availability.js +20 -0
- package/packages/agent/src/services/signal-pairing.d.ts +57 -0
- package/packages/agent/src/services/signal-pairing.d.ts.map +1 -0
- package/packages/agent/src/services/signal-pairing.js +393 -0
- package/packages/agent/src/services/signing-policy.d.ts +44 -0
- package/packages/agent/src/services/signing-policy.d.ts.map +1 -0
- package/packages/agent/src/services/signing-policy.js +165 -0
- package/packages/agent/src/services/skill-catalog-client.d.ts +47 -0
- package/packages/agent/src/services/skill-catalog-client.d.ts.map +1 -0
- package/packages/agent/src/services/skill-catalog-client.js +130 -0
- package/packages/agent/src/services/skill-marketplace.d.ts +42 -0
- package/packages/agent/src/services/skill-marketplace.d.ts.map +1 -0
- package/packages/agent/src/services/skill-marketplace.js +689 -0
- package/packages/agent/src/services/steward-evm-account.d.ts +62 -0
- package/packages/agent/src/services/steward-evm-account.d.ts.map +1 -0
- package/packages/agent/src/services/steward-evm-account.js +308 -0
- package/packages/agent/src/services/steward-evm-bridge.d.ts +39 -0
- package/packages/agent/src/services/steward-evm-bridge.d.ts.map +1 -0
- package/packages/agent/src/services/steward-evm-bridge.js +103 -0
- package/packages/agent/src/services/steward-wallet.d.ts +30 -0
- package/packages/agent/src/services/steward-wallet.d.ts.map +1 -0
- package/packages/agent/src/services/steward-wallet.js +334 -0
- package/packages/agent/src/services/stream-manager.d.ts +121 -0
- package/packages/agent/src/services/stream-manager.d.ts.map +1 -0
- package/packages/agent/src/services/stream-manager.js +609 -0
- package/packages/agent/src/services/task-executor.d.ts +47 -0
- package/packages/agent/src/services/task-executor.d.ts.map +1 -0
- package/packages/agent/src/services/task-executor.js +31 -0
- package/packages/agent/src/services/telegram-account-auth.d.ts +99 -0
- package/packages/agent/src/services/telegram-account-auth.d.ts.map +1 -0
- package/packages/agent/src/services/telegram-account-auth.js +611 -0
- package/packages/agent/src/services/tts-stream-bridge.d.ts +83 -0
- package/packages/agent/src/services/tts-stream-bridge.d.ts.map +1 -0
- package/packages/agent/src/services/tts-stream-bridge.js +360 -0
- package/packages/agent/src/services/update-checker.d.ts +29 -0
- package/packages/agent/src/services/update-checker.d.ts.map +1 -0
- package/packages/agent/src/services/update-checker.js +134 -0
- package/packages/agent/src/services/version-compat.d.ts +99 -0
- package/packages/agent/src/services/version-compat.d.ts.map +1 -0
- package/packages/agent/src/services/version-compat.js +203 -0
- package/packages/agent/src/services/whatsapp-pairing.d.ts +41 -0
- package/packages/agent/src/services/whatsapp-pairing.d.ts.map +1 -0
- package/packages/agent/src/services/whatsapp-pairing.js +209 -0
- package/packages/agent/src/shared/index.d.ts +2 -0
- package/packages/agent/src/shared/index.d.ts.map +1 -0
- package/packages/agent/src/shared/index.js +1 -0
- package/packages/agent/src/shared/ui-catalog-prompt.d.ts +52 -0
- package/packages/agent/src/shared/ui-catalog-prompt.d.ts.map +1 -0
- package/packages/agent/src/shared/ui-catalog-prompt.js +1028 -0
- package/packages/agent/src/test-support/index.d.ts +4 -0
- package/packages/agent/src/test-support/index.d.ts.map +1 -0
- package/packages/agent/src/test-support/index.js +3 -0
- package/packages/agent/src/test-support/process-helpers.d.ts +13 -0
- package/packages/agent/src/test-support/process-helpers.d.ts.map +1 -0
- package/packages/agent/src/test-support/process-helpers.js +23 -0
- package/packages/agent/src/test-support/route-test-helpers.d.ts +37 -0
- package/packages/agent/src/test-support/route-test-helpers.d.ts.map +1 -0
- package/packages/agent/src/test-support/route-test-helpers.js +54 -0
- package/packages/agent/src/test-support/test-helpers.d.ts +77 -0
- package/packages/agent/src/test-support/test-helpers.d.ts.map +1 -0
- package/packages/agent/src/test-support/test-helpers.js +217 -0
- package/packages/agent/src/test-utils/sqlite-compat.d.ts +17 -0
- package/packages/agent/src/test-utils/sqlite-compat.d.ts.map +1 -0
- package/packages/agent/src/test-utils/sqlite-compat.js +48 -0
- package/packages/agent/src/testing/index.d.ts +4 -0
- package/packages/agent/src/testing/index.d.ts.map +1 -0
- package/packages/agent/src/testing/index.js +3 -0
- package/packages/agent/src/triggers/action.d.ts +4 -0
- package/packages/agent/src/triggers/action.d.ts.map +1 -0
- package/packages/agent/src/triggers/action.js +316 -0
- package/packages/agent/src/triggers/index.d.ts +5 -0
- package/packages/agent/src/triggers/index.d.ts.map +1 -0
- package/packages/agent/src/triggers/index.js +4 -0
- package/packages/agent/src/triggers/runtime.d.ts +25 -0
- package/packages/agent/src/triggers/runtime.d.ts.map +1 -0
- package/packages/agent/src/triggers/runtime.js +456 -0
- package/packages/agent/src/triggers/scheduling.d.ts +71 -0
- package/packages/agent/src/triggers/scheduling.d.ts.map +1 -0
- package/packages/agent/src/triggers/scheduling.js +355 -0
- package/packages/agent/src/triggers/types.d.ts +115 -0
- package/packages/agent/src/triggers/types.d.ts.map +1 -0
- package/packages/agent/src/triggers/types.js +1 -0
- package/packages/agent/src/types/agent-skills.d.ts +19 -0
- package/packages/agent/src/types/agent-skills.d.ts.map +1 -0
- package/packages/agent/src/types/agent-skills.js +7 -0
- package/packages/agent/src/types/config-like.d.ts +17 -0
- package/packages/agent/src/types/config-like.d.ts.map +1 -0
- package/packages/agent/src/types/config-like.js +7 -0
- package/packages/agent/src/types/trajectory.d.ts +106 -0
- package/packages/agent/src/types/trajectory.d.ts.map +1 -0
- package/packages/agent/src/types/trajectory.js +7 -0
- package/packages/agent/src/utils/exec-safety.d.ts +2 -0
- package/packages/agent/src/utils/exec-safety.d.ts.map +1 -0
- package/packages/agent/src/utils/exec-safety.js +21 -0
- package/packages/agent/src/utils/index.d.ts +3 -0
- package/packages/agent/src/utils/index.d.ts.map +1 -0
- package/packages/agent/src/utils/index.js +2 -0
- package/packages/agent/src/utils/number-parsing.d.ts +26 -0
- package/packages/agent/src/utils/number-parsing.d.ts.map +1 -0
- package/packages/agent/src/utils/number-parsing.js +52 -0
- package/packages/agent/src/utils/spoken-text.d.ts +2 -0
- package/packages/agent/src/utils/spoken-text.d.ts.map +1 -0
- package/packages/agent/src/utils/spoken-text.js +1 -0
- package/packages/agent/src/version-resolver.d.ts +2 -0
- package/packages/agent/src/version-resolver.d.ts.map +1 -0
- package/packages/agent/src/version-resolver.js +50 -0
- package/packages/app-core/src/api/cloud-secrets.d.ts +23 -0
- package/packages/app-core/src/api/cloud-secrets.d.ts.map +1 -0
- package/packages/app-core/src/api/cloud-secrets.js +50 -0
- package/packages/app-core/src/api/compat-route-shared.d.ts +16 -0
- package/packages/app-core/src/api/compat-route-shared.d.ts.map +1 -0
- package/packages/app-core/src/api/compat-route-shared.js +99 -0
- package/packages/app-core/src/api/response.d.ts +12 -0
- package/packages/app-core/src/api/response.d.ts.map +1 -0
- package/packages/app-core/src/api/response.js +18 -0
- package/packages/app-core/src/api/server-cloud-tts.d.ts +41 -0
- package/packages/app-core/src/api/server-cloud-tts.d.ts.map +1 -0
- package/packages/app-core/src/api/server-cloud-tts.js +469 -0
- package/packages/app-core/src/config/boot-config-store.d.ts +117 -0
- package/packages/app-core/src/config/boot-config-store.d.ts.map +1 -0
- package/packages/app-core/src/config/boot-config-store.js +135 -0
- package/packages/app-core/src/config/boot-config.d.ts +6 -0
- package/packages/app-core/src/config/boot-config.d.ts.map +1 -0
- package/packages/app-core/src/config/boot-config.js +5 -0
- package/packages/app-core/src/config/branding.d.ts +55 -0
- package/packages/app-core/src/config/branding.d.ts.map +1 -0
- package/packages/app-core/src/config/branding.js +23 -0
- package/packages/app-core/src/config/config.d.ts +12 -0
- package/packages/app-core/src/config/config.d.ts.map +1 -0
- package/packages/app-core/src/config/config.js +23 -0
- package/packages/app-core/src/navigation/index.d.ts +52 -0
- package/packages/app-core/src/navigation/index.d.ts.map +1 -0
- package/packages/app-core/src/navigation/index.js +354 -0
- package/packages/app-core/src/state/action-notice.d.ts +7 -0
- package/packages/app-core/src/state/action-notice.d.ts.map +1 -0
- package/packages/app-core/src/state/action-notice.js +1 -0
- package/packages/app-core/src/types/index.d.ts +649 -0
- package/packages/app-core/src/types/index.d.ts.map +1 -0
- package/packages/app-core/src/types/index.js +1 -0
- package/packages/app-core/src/types/lifeops-ui.d.ts +10 -0
- package/packages/app-core/src/types/lifeops-ui.d.ts.map +1 -0
- package/packages/app-core/src/types/lifeops-ui.js +1 -0
- package/packages/app-core/src/utils/env.d.ts +31 -0
- package/packages/app-core/src/utils/env.d.ts.map +1 -0
- package/packages/app-core/src/utils/env.js +51 -0
- package/packages/app-core/src/utils/tts-debug.d.ts +9 -0
- package/packages/app-core/src/utils/tts-debug.d.ts.map +1 -0
- package/packages/app-core/src/utils/tts-debug.js +68 -0
- package/packages/shared/src/awareness/index.d.ts +2 -0
- package/packages/shared/src/awareness/index.d.ts.map +1 -0
- package/packages/shared/src/awareness/index.js +1 -0
- package/packages/shared/src/awareness/registry.d.ts +27 -0
- package/packages/shared/src/awareness/registry.d.ts.map +1 -0
- package/packages/shared/src/awareness/registry.js +161 -0
- package/packages/shared/src/connectors.d.ts +13 -0
- package/packages/shared/src/connectors.d.ts.map +1 -0
- package/packages/shared/src/connectors.js +91 -0
- package/packages/shared/src/contracts/apps.d.ts +204 -0
- package/packages/shared/src/contracts/apps.d.ts.map +1 -0
- package/packages/shared/src/contracts/apps.js +188 -0
- package/packages/shared/src/contracts/awareness.d.ts +38 -0
- package/packages/shared/src/contracts/awareness.d.ts.map +1 -0
- package/packages/shared/src/contracts/awareness.js +7 -0
- package/packages/shared/src/contracts/cloud-topology.d.ts +13 -0
- package/packages/shared/src/contracts/cloud-topology.d.ts.map +1 -0
- package/packages/shared/src/contracts/cloud-topology.js +73 -0
- package/packages/shared/src/contracts/config.d.ts +146 -0
- package/packages/shared/src/contracts/config.d.ts.map +1 -0
- package/packages/shared/src/contracts/config.js +4 -0
- package/packages/shared/src/contracts/content-pack.d.ts +131 -0
- package/packages/shared/src/contracts/content-pack.d.ts.map +1 -0
- package/packages/shared/src/contracts/content-pack.js +102 -0
- package/packages/shared/src/contracts/drop.d.ts +20 -0
- package/packages/shared/src/contracts/drop.d.ts.map +1 -0
- package/packages/shared/src/contracts/drop.js +4 -0
- package/packages/shared/src/contracts/index.d.ts +13 -0
- package/packages/shared/src/contracts/index.d.ts.map +1 -0
- package/packages/shared/src/contracts/index.js +12 -0
- package/packages/shared/src/contracts/lifeops.d.ts +1337 -0
- package/packages/shared/src/contracts/lifeops.d.ts.map +1 -0
- package/packages/shared/src/contracts/lifeops.js +278 -0
- package/packages/shared/src/contracts/onboarding.d.ts +443 -0
- package/packages/shared/src/contracts/onboarding.d.ts.map +1 -0
- package/packages/shared/src/contracts/onboarding.js +1020 -0
- package/packages/shared/src/contracts/permissions.d.ts +38 -0
- package/packages/shared/src/contracts/permissions.d.ts.map +1 -0
- package/packages/shared/src/contracts/permissions.js +4 -0
- package/packages/shared/src/contracts/service-routing.d.ts +77 -0
- package/packages/shared/src/contracts/service-routing.d.ts.map +1 -0
- package/packages/shared/src/contracts/service-routing.js +227 -0
- package/packages/shared/src/contracts/theme.d.ts +136 -0
- package/packages/shared/src/contracts/theme.d.ts.map +1 -0
- package/packages/shared/src/contracts/theme.js +133 -0
- package/packages/shared/src/contracts/verification.d.ts +9 -0
- package/packages/shared/src/contracts/verification.d.ts.map +1 -0
- package/packages/shared/src/contracts/verification.js +4 -0
- package/packages/shared/src/contracts/wallet.d.ts +626 -0
- package/packages/shared/src/contracts/wallet.d.ts.map +1 -0
- package/packages/shared/src/contracts/wallet.js +60 -0
- package/packages/shared/src/env-utils.d.ts +5 -0
- package/packages/shared/src/env-utils.d.ts.map +1 -0
- package/packages/shared/src/env-utils.impl.d.ts +2 -0
- package/packages/shared/src/env-utils.impl.d.ts.map +1 -0
- package/packages/shared/src/env-utils.impl.js +16 -0
- package/packages/shared/src/env-utils.js +4 -0
- package/packages/shared/src/i18n/generated/validation-keyword-data.d.ts +1054 -0
- package/packages/shared/src/i18n/generated/validation-keyword-data.d.ts.map +1 -0
- package/packages/shared/src/i18n/generated/validation-keyword-data.js +1057 -0
- package/packages/shared/src/i18n/keyword-matching.d.ts +23 -0
- package/packages/shared/src/i18n/keyword-matching.d.ts.map +1 -0
- package/packages/shared/src/i18n/keyword-matching.js +112 -0
- package/packages/shared/src/i18n/validation-keywords.d.ts +13 -0
- package/packages/shared/src/i18n/validation-keywords.d.ts.map +1 -0
- package/packages/shared/src/i18n/validation-keywords.js +12 -0
- package/packages/shared/src/index.d.ts +13 -0
- package/packages/shared/src/index.d.ts.map +1 -0
- package/packages/shared/src/index.js +12 -0
- package/packages/shared/src/onboarding-presets.characters.d.ts +22 -0
- package/packages/shared/src/onboarding-presets.characters.d.ts.map +1 -0
- package/packages/shared/src/onboarding-presets.characters.js +2606 -0
- package/packages/shared/src/onboarding-presets.d.ts +40 -0
- package/packages/shared/src/onboarding-presets.d.ts.map +1 -0
- package/packages/shared/src/onboarding-presets.js +176 -0
- package/packages/shared/src/onboarding-presets.shared.d.ts +2 -0
- package/packages/shared/src/onboarding-presets.shared.d.ts.map +1 -0
- package/packages/shared/src/onboarding-presets.shared.js +7 -0
- package/packages/shared/src/restart.d.ts +27 -0
- package/packages/shared/src/restart.d.ts.map +1 -0
- package/packages/shared/src/restart.js +28 -0
- package/packages/shared/src/runtime-env.d.ts +82 -0
- package/packages/shared/src/runtime-env.d.ts.map +1 -0
- package/packages/shared/src/runtime-env.js +246 -0
- package/packages/shared/src/settings-debug.d.ts +20 -0
- package/packages/shared/src/settings-debug.d.ts.map +1 -0
- package/packages/shared/src/settings-debug.js +116 -0
- package/packages/shared/src/spoken-text.d.ts +2 -0
- package/packages/shared/src/spoken-text.d.ts.map +1 -0
- package/packages/shared/src/spoken-text.js +56 -0
- package/packages/shared/src/types.d.ts +27 -0
- package/packages/shared/src/types.d.ts.map +1 -0
- package/packages/shared/src/types.js +1 -0
- package/packages/shared/src/validation-keywords.d.ts +2 -0
- package/packages/shared/src/validation-keywords.d.ts.map +1 -0
- package/packages/shared/src/validation-keywords.js +1 -0
- package/packages/typescript/src/action-docs.d.ts +22 -0
- package/packages/typescript/src/action-docs.d.ts.map +1 -0
- package/packages/typescript/src/action-docs.js +93 -0
- package/packages/typescript/src/actions.d.ts +29 -0
- package/packages/typescript/src/actions.d.ts.map +1 -0
- package/packages/typescript/src/actions.js +456 -0
- package/packages/typescript/src/advanced-capabilities/clipboard/actions/append.d.ts +4 -0
- package/packages/typescript/src/advanced-capabilities/clipboard/actions/append.d.ts.map +1 -0
- package/packages/typescript/src/advanced-capabilities/clipboard/actions/append.js +150 -0
- package/packages/typescript/src/advanced-capabilities/clipboard/actions/delete.d.ts +4 -0
- package/packages/typescript/src/advanced-capabilities/clipboard/actions/delete.d.ts.map +1 -0
- package/packages/typescript/src/advanced-capabilities/clipboard/actions/delete.js +136 -0
- package/packages/typescript/src/advanced-capabilities/clipboard/actions/list.d.ts +4 -0
- package/packages/typescript/src/advanced-capabilities/clipboard/actions/list.d.ts.map +1 -0
- package/packages/typescript/src/advanced-capabilities/clipboard/actions/list.js +84 -0
- package/packages/typescript/src/advanced-capabilities/clipboard/actions/read-attachment.d.ts +4 -0
- package/packages/typescript/src/advanced-capabilities/clipboard/actions/read-attachment.d.ts.map +1 -0
- package/packages/typescript/src/advanced-capabilities/clipboard/actions/read-attachment.js +107 -0
- package/packages/typescript/src/advanced-capabilities/clipboard/actions/read-file.d.ts +16 -0
- package/packages/typescript/src/advanced-capabilities/clipboard/actions/read-file.d.ts.map +1 -0
- package/packages/typescript/src/advanced-capabilities/clipboard/actions/read-file.js +187 -0
- package/packages/typescript/src/advanced-capabilities/clipboard/actions/read.d.ts +4 -0
- package/packages/typescript/src/advanced-capabilities/clipboard/actions/read.d.ts.map +1 -0
- package/packages/typescript/src/advanced-capabilities/clipboard/actions/read.js +138 -0
- package/packages/typescript/src/advanced-capabilities/clipboard/actions/remove-from-clipboard.d.ts +4 -0
- package/packages/typescript/src/advanced-capabilities/clipboard/actions/remove-from-clipboard.d.ts.map +1 -0
- package/packages/typescript/src/advanced-capabilities/clipboard/actions/remove-from-clipboard.js +96 -0
- package/packages/typescript/src/advanced-capabilities/clipboard/actions/search.d.ts +4 -0
- package/packages/typescript/src/advanced-capabilities/clipboard/actions/search.d.ts.map +1 -0
- package/packages/typescript/src/advanced-capabilities/clipboard/actions/search.js +139 -0
- package/packages/typescript/src/advanced-capabilities/clipboard/actions/write.d.ts +4 -0
- package/packages/typescript/src/advanced-capabilities/clipboard/actions/write.d.ts.map +1 -0
- package/packages/typescript/src/advanced-capabilities/clipboard/actions/write.js +138 -0
- package/packages/typescript/src/advanced-capabilities/clipboard/index.d.ts +39 -0
- package/packages/typescript/src/advanced-capabilities/clipboard/index.d.ts.map +1 -0
- package/packages/typescript/src/advanced-capabilities/clipboard/index.js +78 -0
- package/packages/typescript/src/advanced-capabilities/clipboard/providers/clipboard.d.ts +4 -0
- package/packages/typescript/src/advanced-capabilities/clipboard/providers/clipboard.d.ts.map +1 -0
- package/packages/typescript/src/advanced-capabilities/clipboard/providers/clipboard.js +62 -0
- package/packages/typescript/src/advanced-capabilities/clipboard/services/attachmentContext.d.ts +16 -0
- package/packages/typescript/src/advanced-capabilities/clipboard/services/attachmentContext.d.ts.map +1 -0
- package/packages/typescript/src/advanced-capabilities/clipboard/services/attachmentContext.js +162 -0
- package/packages/typescript/src/advanced-capabilities/clipboard/services/clipboardService.d.ts +65 -0
- package/packages/typescript/src/advanced-capabilities/clipboard/services/clipboardService.d.ts.map +1 -0
- package/packages/typescript/src/advanced-capabilities/clipboard/services/clipboardService.js +352 -0
- package/packages/typescript/src/advanced-capabilities/clipboard/services/taskClipboardPersistence.d.ts +24 -0
- package/packages/typescript/src/advanced-capabilities/clipboard/services/taskClipboardPersistence.d.ts.map +1 -0
- package/packages/typescript/src/advanced-capabilities/clipboard/services/taskClipboardPersistence.js +63 -0
- package/packages/typescript/src/advanced-capabilities/clipboard/services/taskClipboardService.d.ts +29 -0
- package/packages/typescript/src/advanced-capabilities/clipboard/services/taskClipboardService.d.ts.map +1 -0
- package/packages/typescript/src/advanced-capabilities/clipboard/services/taskClipboardService.js +195 -0
- package/packages/typescript/src/advanced-capabilities/clipboard/specs.d.ts +15 -0
- package/packages/typescript/src/advanced-capabilities/clipboard/specs.d.ts.map +1 -0
- package/packages/typescript/src/advanced-capabilities/clipboard/specs.js +164 -0
- package/packages/typescript/src/advanced-capabilities/clipboard/types.d.ts +92 -0
- package/packages/typescript/src/advanced-capabilities/clipboard/types.d.ts.map +1 -0
- package/packages/typescript/src/advanced-capabilities/clipboard/types.js +4 -0
- package/packages/typescript/src/character-utils.d.ts +138 -0
- package/packages/typescript/src/character-utils.d.ts.map +1 -0
- package/packages/typescript/src/character-utils.js +271 -0
- package/packages/typescript/src/character.d.ts +68 -0
- package/packages/typescript/src/character.d.ts.map +1 -0
- package/packages/typescript/src/character.js +155 -0
- package/packages/typescript/src/connection.d.ts +45 -0
- package/packages/typescript/src/connection.d.ts.map +1 -0
- package/packages/typescript/src/connection.js +149 -0
- package/packages/typescript/src/constants/index.d.ts +7 -0
- package/packages/typescript/src/constants/index.d.ts.map +1 -0
- package/packages/typescript/src/constants/index.js +6 -0
- package/packages/typescript/src/constants/secrets.d.ts +99 -0
- package/packages/typescript/src/constants/secrets.d.ts.map +1 -0
- package/packages/typescript/src/constants/secrets.js +239 -0
- package/packages/typescript/src/database/inMemoryAdapter.d.ts +285 -0
- package/packages/typescript/src/database/inMemoryAdapter.d.ts.map +1 -0
- package/packages/typescript/src/database/inMemoryAdapter.js +1149 -0
- package/packages/typescript/src/database.d.ts +426 -0
- package/packages/typescript/src/database.d.ts.map +1 -0
- package/packages/typescript/src/database.js +24 -0
- package/packages/typescript/src/entities.d.ts +11 -0
- package/packages/typescript/src/entities.d.ts.map +1 -0
- package/packages/typescript/src/entities.js +437 -0
- package/packages/typescript/src/features/advanced-capabilities/actions/addContact.d.ts +3 -0
- package/packages/typescript/src/features/advanced-capabilities/actions/addContact.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/actions/addContact.js +142 -0
- package/packages/typescript/src/features/advanced-capabilities/actions/followRoom.d.ts +3 -0
- package/packages/typescript/src/features/advanced-capabilities/actions/followRoom.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/actions/followRoom.js +183 -0
- package/packages/typescript/src/features/advanced-capabilities/actions/imageGeneration.d.ts +3 -0
- package/packages/typescript/src/features/advanced-capabilities/actions/imageGeneration.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/actions/imageGeneration.js +148 -0
- package/packages/typescript/src/features/advanced-capabilities/actions/index.d.ts +21 -0
- package/packages/typescript/src/features/advanced-capabilities/actions/index.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/actions/index.js +20 -0
- package/packages/typescript/src/features/advanced-capabilities/actions/muteRoom.d.ts +3 -0
- package/packages/typescript/src/features/advanced-capabilities/actions/muteRoom.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/actions/muteRoom.js +181 -0
- package/packages/typescript/src/features/advanced-capabilities/actions/removeContact.d.ts +3 -0
- package/packages/typescript/src/features/advanced-capabilities/actions/removeContact.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/actions/removeContact.js +102 -0
- package/packages/typescript/src/features/advanced-capabilities/actions/roles.d.ts +13 -0
- package/packages/typescript/src/features/advanced-capabilities/actions/roles.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/actions/roles.js +317 -0
- package/packages/typescript/src/features/advanced-capabilities/actions/scheduleFollowUp.d.ts +3 -0
- package/packages/typescript/src/features/advanced-capabilities/actions/scheduleFollowUp.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/actions/scheduleFollowUp.js +129 -0
- package/packages/typescript/src/features/advanced-capabilities/actions/searchContacts.d.ts +3 -0
- package/packages/typescript/src/features/advanced-capabilities/actions/searchContacts.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/actions/searchContacts.js +176 -0
- package/packages/typescript/src/features/advanced-capabilities/actions/sendMessage.d.ts +15 -0
- package/packages/typescript/src/features/advanced-capabilities/actions/sendMessage.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/actions/sendMessage.js +476 -0
- package/packages/typescript/src/features/advanced-capabilities/actions/settings.d.ts +22 -0
- package/packages/typescript/src/features/advanced-capabilities/actions/settings.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/actions/settings.js +823 -0
- package/packages/typescript/src/features/advanced-capabilities/actions/think.d.ts +3 -0
- package/packages/typescript/src/features/advanced-capabilities/actions/think.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/actions/think.js +84 -0
- package/packages/typescript/src/features/advanced-capabilities/actions/unfollowRoom.d.ts +3 -0
- package/packages/typescript/src/features/advanced-capabilities/actions/unfollowRoom.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/actions/unfollowRoom.js +134 -0
- package/packages/typescript/src/features/advanced-capabilities/actions/unmuteRoom.d.ts +3 -0
- package/packages/typescript/src/features/advanced-capabilities/actions/unmuteRoom.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/actions/unmuteRoom.js +193 -0
- package/packages/typescript/src/features/advanced-capabilities/actions/updateContact.d.ts +3 -0
- package/packages/typescript/src/features/advanced-capabilities/actions/updateContact.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/actions/updateContact.js +199 -0
- package/packages/typescript/src/features/advanced-capabilities/actions/updateEntity.d.ts +43 -0
- package/packages/typescript/src/features/advanced-capabilities/actions/updateEntity.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/actions/updateEntity.js +372 -0
- package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/append.d.ts +4 -0
- package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/append.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/append.js +150 -0
- package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/delete.d.ts +4 -0
- package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/delete.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/delete.js +136 -0
- package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/list.d.ts +4 -0
- package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/list.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/list.js +84 -0
- package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/read-attachment.d.ts +4 -0
- package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/read-attachment.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/read-attachment.js +112 -0
- package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/read-file.d.ts +16 -0
- package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/read-file.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/read-file.js +192 -0
- package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/read.d.ts +4 -0
- package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/read.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/read.js +138 -0
- package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/remove-from-clipboard.d.ts +4 -0
- package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/remove-from-clipboard.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/remove-from-clipboard.js +96 -0
- package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/search.d.ts +4 -0
- package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/search.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/search.js +139 -0
- package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/write.d.ts +4 -0
- package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/write.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/clipboard/actions/write.js +138 -0
- package/packages/typescript/src/features/advanced-capabilities/clipboard/index.d.ts +39 -0
- package/packages/typescript/src/features/advanced-capabilities/clipboard/index.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/clipboard/index.js +78 -0
- package/packages/typescript/src/features/advanced-capabilities/clipboard/providers/clipboard.d.ts +4 -0
- package/packages/typescript/src/features/advanced-capabilities/clipboard/providers/clipboard.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/clipboard/providers/clipboard.js +62 -0
- package/packages/typescript/src/features/advanced-capabilities/clipboard/services/attachmentContext.d.ts +16 -0
- package/packages/typescript/src/features/advanced-capabilities/clipboard/services/attachmentContext.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/clipboard/services/attachmentContext.js +162 -0
- package/packages/typescript/src/features/advanced-capabilities/clipboard/services/clipboardService.d.ts +65 -0
- package/packages/typescript/src/features/advanced-capabilities/clipboard/services/clipboardService.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/clipboard/services/clipboardService.js +352 -0
- package/packages/typescript/src/features/advanced-capabilities/clipboard/services/taskClipboardPersistence.d.ts +24 -0
- package/packages/typescript/src/features/advanced-capabilities/clipboard/services/taskClipboardPersistence.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/clipboard/services/taskClipboardPersistence.js +63 -0
- package/packages/typescript/src/features/advanced-capabilities/clipboard/services/taskClipboardService.d.ts +29 -0
- package/packages/typescript/src/features/advanced-capabilities/clipboard/services/taskClipboardService.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/clipboard/services/taskClipboardService.js +195 -0
- package/packages/typescript/src/features/advanced-capabilities/clipboard/specs.d.ts +15 -0
- package/packages/typescript/src/features/advanced-capabilities/clipboard/specs.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/clipboard/specs.js +164 -0
- package/packages/typescript/src/features/advanced-capabilities/clipboard/types.d.ts +92 -0
- package/packages/typescript/src/features/advanced-capabilities/clipboard/types.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/clipboard/types.js +4 -0
- package/packages/typescript/src/features/advanced-capabilities/evaluators/index.d.ts +8 -0
- package/packages/typescript/src/features/advanced-capabilities/evaluators/index.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/evaluators/index.js +7 -0
- package/packages/typescript/src/features/advanced-capabilities/evaluators/reflection.d.ts +3 -0
- package/packages/typescript/src/features/advanced-capabilities/evaluators/reflection.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/evaluators/reflection.js +633 -0
- package/packages/typescript/src/features/advanced-capabilities/evaluators/relationshipExtraction.d.ts +3 -0
- package/packages/typescript/src/features/advanced-capabilities/evaluators/relationshipExtraction.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/evaluators/relationshipExtraction.js +619 -0
- package/packages/typescript/src/features/advanced-capabilities/evaluators/task-completion.d.ts +12 -0
- package/packages/typescript/src/features/advanced-capabilities/evaluators/task-completion.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/evaluators/task-completion.js +14 -0
- package/packages/typescript/src/features/advanced-capabilities/experience/actions/record-experience.d.ts +3 -0
- package/packages/typescript/src/features/advanced-capabilities/experience/actions/record-experience.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/experience/actions/record-experience.js +70 -0
- package/packages/typescript/src/features/advanced-capabilities/experience/evaluators/experienceEvaluator.d.ts +3 -0
- package/packages/typescript/src/features/advanced-capabilities/experience/evaluators/experienceEvaluator.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/experience/evaluators/experienceEvaluator.js +256 -0
- package/packages/typescript/src/features/advanced-capabilities/experience/generated/prompts/typescript/prompts.d.ts +12 -0
- package/packages/typescript/src/features/advanced-capabilities/experience/generated/prompts/typescript/prompts.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/experience/generated/prompts/typescript/prompts.js +41 -0
- package/packages/typescript/src/features/advanced-capabilities/experience/generated/specs/spec-helpers.d.ts +49 -0
- package/packages/typescript/src/features/advanced-capabilities/experience/generated/specs/spec-helpers.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/experience/generated/specs/spec-helpers.js +78 -0
- package/packages/typescript/src/features/advanced-capabilities/experience/generated/specs/specs.d.ts +159 -0
- package/packages/typescript/src/features/advanced-capabilities/experience/generated/specs/specs.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/experience/generated/specs/specs.js +192 -0
- package/packages/typescript/src/features/advanced-capabilities/experience/index.d.ts +10 -0
- package/packages/typescript/src/features/advanced-capabilities/experience/index.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/experience/index.js +8 -0
- package/packages/typescript/src/features/advanced-capabilities/experience/providers/experienceProvider.d.ts +3 -0
- package/packages/typescript/src/features/advanced-capabilities/experience/providers/experienceProvider.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/experience/providers/experienceProvider.js +51 -0
- package/packages/typescript/src/features/advanced-capabilities/experience/service.d.ts +46 -0
- package/packages/typescript/src/features/advanced-capabilities/experience/service.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/experience/service.js +569 -0
- package/packages/typescript/src/features/advanced-capabilities/experience/types.d.ts +95 -0
- package/packages/typescript/src/features/advanced-capabilities/experience/types.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/experience/types.js +22 -0
- package/packages/typescript/src/features/advanced-capabilities/experience/utils/confidenceDecay.d.ts +34 -0
- package/packages/typescript/src/features/advanced-capabilities/experience/utils/confidenceDecay.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/experience/utils/confidenceDecay.js +106 -0
- package/packages/typescript/src/features/advanced-capabilities/experience/utils/experienceRelationships.d.ts +25 -0
- package/packages/typescript/src/features/advanced-capabilities/experience/utils/experienceRelationships.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/experience/utils/experienceRelationships.js +116 -0
- package/packages/typescript/src/features/advanced-capabilities/form/actions/restore.d.ts +13 -0
- package/packages/typescript/src/features/advanced-capabilities/form/actions/restore.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/form/actions/restore.js +152 -0
- package/packages/typescript/src/features/advanced-capabilities/form/builder.d.ts +101 -0
- package/packages/typescript/src/features/advanced-capabilities/form/builder.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/form/builder.js +362 -0
- package/packages/typescript/src/features/advanced-capabilities/form/builtins.d.ts +16 -0
- package/packages/typescript/src/features/advanced-capabilities/form/builtins.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/form/builtins.js +245 -0
- package/packages/typescript/src/features/advanced-capabilities/form/defaults.d.ts +32 -0
- package/packages/typescript/src/features/advanced-capabilities/form/defaults.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/form/defaults.js +98 -0
- package/packages/typescript/src/features/advanced-capabilities/form/evaluators/extractor.d.ts +12 -0
- package/packages/typescript/src/features/advanced-capabilities/form/evaluators/extractor.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/form/evaluators/extractor.js +231 -0
- package/packages/typescript/src/features/advanced-capabilities/form/extraction.d.ts +24 -0
- package/packages/typescript/src/features/advanced-capabilities/form/extraction.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/form/extraction.js +319 -0
- package/packages/typescript/src/features/advanced-capabilities/form/index.d.ts +22 -0
- package/packages/typescript/src/features/advanced-capabilities/form/index.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/form/index.js +52 -0
- package/packages/typescript/src/features/advanced-capabilities/form/intent.d.ts +41 -0
- package/packages/typescript/src/features/advanced-capabilities/form/intent.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/form/intent.js +119 -0
- package/packages/typescript/src/features/advanced-capabilities/form/providers/context.d.ts +11 -0
- package/packages/typescript/src/features/advanced-capabilities/form/providers/context.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/form/providers/context.js +166 -0
- package/packages/typescript/src/features/advanced-capabilities/form/service.d.ts +70 -0
- package/packages/typescript/src/features/advanced-capabilities/form/service.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/form/service.js +924 -0
- package/packages/typescript/src/features/advanced-capabilities/form/storage.d.ts +26 -0
- package/packages/typescript/src/features/advanced-capabilities/form/storage.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/form/storage.js +228 -0
- package/packages/typescript/src/features/advanced-capabilities/form/template.d.ts +10 -0
- package/packages/typescript/src/features/advanced-capabilities/form/template.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/form/template.js +56 -0
- package/packages/typescript/src/features/advanced-capabilities/form/ttl.d.ts +40 -0
- package/packages/typescript/src/features/advanced-capabilities/form/ttl.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/form/ttl.js +107 -0
- package/packages/typescript/src/features/advanced-capabilities/form/types.d.ts +588 -0
- package/packages/typescript/src/features/advanced-capabilities/form/types.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/form/types.js +71 -0
- package/packages/typescript/src/features/advanced-capabilities/form/validation.d.ts +24 -0
- package/packages/typescript/src/features/advanced-capabilities/form/validation.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/form/validation.js +311 -0
- package/packages/typescript/src/features/advanced-capabilities/index.d.ts +47 -0
- package/packages/typescript/src/features/advanced-capabilities/index.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/index.js +114 -0
- package/packages/typescript/src/features/advanced-capabilities/personality/actions/modify-character.d.ts +7 -0
- package/packages/typescript/src/features/advanced-capabilities/personality/actions/modify-character.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/personality/actions/modify-character.js +1299 -0
- package/packages/typescript/src/features/advanced-capabilities/personality/evaluators/character-evolution.d.ts +53 -0
- package/packages/typescript/src/features/advanced-capabilities/personality/evaluators/character-evolution.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/personality/evaluators/character-evolution.js +429 -0
- package/packages/typescript/src/features/advanced-capabilities/personality/index.d.ts +10 -0
- package/packages/typescript/src/features/advanced-capabilities/personality/index.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/personality/index.js +8 -0
- package/packages/typescript/src/features/advanced-capabilities/personality/providers/user-personality.d.ts +8 -0
- package/packages/typescript/src/features/advanced-capabilities/personality/providers/user-personality.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/personality/providers/user-personality.js +57 -0
- package/packages/typescript/src/features/advanced-capabilities/personality/services/character-file-manager.d.ts +71 -0
- package/packages/typescript/src/features/advanced-capabilities/personality/services/character-file-manager.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/personality/services/character-file-manager.js +498 -0
- package/packages/typescript/src/features/advanced-capabilities/personality/types.d.ts +18 -0
- package/packages/typescript/src/features/advanced-capabilities/personality/types.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/personality/types.js +8 -0
- package/packages/typescript/src/features/advanced-capabilities/providers/contacts.d.ts +3 -0
- package/packages/typescript/src/features/advanced-capabilities/providers/contacts.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/providers/contacts.js +77 -0
- package/packages/typescript/src/features/advanced-capabilities/providers/facts.d.ts +11 -0
- package/packages/typescript/src/features/advanced-capabilities/providers/facts.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/providers/facts.js +108 -0
- package/packages/typescript/src/features/advanced-capabilities/providers/followUps.d.ts +3 -0
- package/packages/typescript/src/features/advanced-capabilities/providers/followUps.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/providers/followUps.js +112 -0
- package/packages/typescript/src/features/advanced-capabilities/providers/index.d.ts +13 -0
- package/packages/typescript/src/features/advanced-capabilities/providers/index.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/providers/index.js +12 -0
- package/packages/typescript/src/features/advanced-capabilities/providers/knowledge.d.ts +9 -0
- package/packages/typescript/src/features/advanced-capabilities/providers/knowledge.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/providers/knowledge.js +83 -0
- package/packages/typescript/src/features/advanced-capabilities/providers/relationships.d.ts +15 -0
- package/packages/typescript/src/features/advanced-capabilities/providers/relationships.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/providers/relationships.js +125 -0
- package/packages/typescript/src/features/advanced-capabilities/providers/roles.d.ts +19 -0
- package/packages/typescript/src/features/advanced-capabilities/providers/roles.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/providers/roles.js +180 -0
- package/packages/typescript/src/features/advanced-capabilities/providers/settings.d.ts +7 -0
- package/packages/typescript/src/features/advanced-capabilities/providers/settings.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-capabilities/providers/settings.js +286 -0
- package/packages/typescript/src/features/advanced-memory/evaluators/index.d.ts +3 -0
- package/packages/typescript/src/features/advanced-memory/evaluators/index.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-memory/evaluators/index.js +2 -0
- package/packages/typescript/src/features/advanced-memory/evaluators/long-term-extraction.d.ts +3 -0
- package/packages/typescript/src/features/advanced-memory/evaluators/long-term-extraction.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-memory/evaluators/long-term-extraction.js +198 -0
- package/packages/typescript/src/features/advanced-memory/evaluators/summarization.d.ts +3 -0
- package/packages/typescript/src/features/advanced-memory/evaluators/summarization.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-memory/evaluators/summarization.js +240 -0
- package/packages/typescript/src/features/advanced-memory/index.d.ts +16 -0
- package/packages/typescript/src/features/advanced-memory/index.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-memory/index.js +26 -0
- package/packages/typescript/src/features/advanced-memory/prompts.d.ts +2 -0
- package/packages/typescript/src/features/advanced-memory/prompts.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-memory/prompts.js +1 -0
- package/packages/typescript/src/features/advanced-memory/providers/context-summary.d.ts +3 -0
- package/packages/typescript/src/features/advanced-memory/providers/context-summary.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-memory/providers/context-summary.js +85 -0
- package/packages/typescript/src/features/advanced-memory/providers/index.d.ts +3 -0
- package/packages/typescript/src/features/advanced-memory/providers/index.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-memory/providers/index.js +2 -0
- package/packages/typescript/src/features/advanced-memory/providers/long-term-memory.d.ts +3 -0
- package/packages/typescript/src/features/advanced-memory/providers/long-term-memory.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-memory/providers/long-term-memory.js +92 -0
- package/packages/typescript/src/features/advanced-memory/schemas/index.d.ts +5 -0
- package/packages/typescript/src/features/advanced-memory/schemas/index.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-memory/schemas/index.js +3 -0
- package/packages/typescript/src/features/advanced-memory/schemas/long-term-memories.d.ts +10 -0
- package/packages/typescript/src/features/advanced-memory/schemas/long-term-memories.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-memory/schemas/long-term-memories.js +65 -0
- package/packages/typescript/src/features/advanced-memory/schemas/memory-access-logs.d.ts +10 -0
- package/packages/typescript/src/features/advanced-memory/schemas/memory-access-logs.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-memory/schemas/memory-access-logs.js +45 -0
- package/packages/typescript/src/features/advanced-memory/schemas/session-summaries.d.ts +10 -0
- package/packages/typescript/src/features/advanced-memory/schemas/session-summaries.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-memory/schemas/session-summaries.js +66 -0
- package/packages/typescript/src/features/advanced-memory/services/memory-service.d.ts +37 -0
- package/packages/typescript/src/features/advanced-memory/services/memory-service.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-memory/services/memory-service.js +347 -0
- package/packages/typescript/src/features/advanced-memory/trajectory.d.ts +10 -0
- package/packages/typescript/src/features/advanced-memory/trajectory.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-memory/trajectory.js +33 -0
- package/packages/typescript/src/features/advanced-memory/types.d.ts +68 -0
- package/packages/typescript/src/features/advanced-memory/types.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-memory/types.js +6 -0
- package/packages/typescript/src/features/advanced-planning/actions/chain-example.d.ts +6 -0
- package/packages/typescript/src/features/advanced-planning/actions/chain-example.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-planning/actions/chain-example.js +181 -0
- package/packages/typescript/src/features/advanced-planning/index.d.ts +5 -0
- package/packages/typescript/src/features/advanced-planning/index.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-planning/index.js +20 -0
- package/packages/typescript/src/features/advanced-planning/providers/message-classifier.d.ts +3 -0
- package/packages/typescript/src/features/advanced-planning/providers/message-classifier.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-planning/providers/message-classifier.js +105 -0
- package/packages/typescript/src/features/advanced-planning/services/planning-service.d.ts +77 -0
- package/packages/typescript/src/features/advanced-planning/services/planning-service.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-planning/services/planning-service.js +875 -0
- package/packages/typescript/src/features/advanced-planning/types.d.ts +78 -0
- package/packages/typescript/src/features/advanced-planning/types.d.ts.map +1 -0
- package/packages/typescript/src/features/advanced-planning/types.js +1 -0
- package/packages/typescript/src/features/autonomy/action.d.ts +14 -0
- package/packages/typescript/src/features/autonomy/action.d.ts.map +1 -0
- package/packages/typescript/src/features/autonomy/action.js +177 -0
- package/packages/typescript/src/features/autonomy/execution-facade.d.ts +22 -0
- package/packages/typescript/src/features/autonomy/execution-facade.d.ts.map +1 -0
- package/packages/typescript/src/features/autonomy/execution-facade.js +132 -0
- package/packages/typescript/src/features/autonomy/index.d.ts +11 -0
- package/packages/typescript/src/features/autonomy/index.d.ts.map +1 -0
- package/packages/typescript/src/features/autonomy/index.js +13 -0
- package/packages/typescript/src/features/autonomy/providers.d.ts +21 -0
- package/packages/typescript/src/features/autonomy/providers.d.ts.map +1 -0
- package/packages/typescript/src/features/autonomy/providers.js +154 -0
- package/packages/typescript/src/features/autonomy/routes.d.ts +11 -0
- package/packages/typescript/src/features/autonomy/routes.d.ts.map +1 -0
- package/packages/typescript/src/features/autonomy/routes.js +158 -0
- package/packages/typescript/src/features/autonomy/service.d.ts +138 -0
- package/packages/typescript/src/features/autonomy/service.d.ts.map +1 -0
- package/packages/typescript/src/features/autonomy/service.js +813 -0
- package/packages/typescript/src/features/autonomy/types.d.ts +31 -0
- package/packages/typescript/src/features/autonomy/types.d.ts.map +1 -0
- package/packages/typescript/src/features/autonomy/types.js +6 -0
- package/packages/typescript/src/features/basic-capabilities/actions/choice.d.ts +4 -0
- package/packages/typescript/src/features/basic-capabilities/actions/choice.d.ts.map +1 -0
- package/packages/typescript/src/features/basic-capabilities/actions/choice.js +278 -0
- package/packages/typescript/src/features/basic-capabilities/actions/ignore.d.ts +3 -0
- package/packages/typescript/src/features/basic-capabilities/actions/ignore.d.ts.map +1 -0
- package/packages/typescript/src/features/basic-capabilities/actions/ignore.js +23 -0
- package/packages/typescript/src/features/basic-capabilities/actions/index.d.ts +10 -0
- package/packages/typescript/src/features/basic-capabilities/actions/index.d.ts.map +1 -0
- package/packages/typescript/src/features/basic-capabilities/actions/index.js +9 -0
- package/packages/typescript/src/features/basic-capabilities/actions/none.d.ts +3 -0
- package/packages/typescript/src/features/basic-capabilities/actions/none.d.ts.map +1 -0
- package/packages/typescript/src/features/basic-capabilities/actions/none.js +26 -0
- package/packages/typescript/src/features/basic-capabilities/actions/reply.d.ts +3 -0
- package/packages/typescript/src/features/basic-capabilities/actions/reply.d.ts.map +1 -0
- package/packages/typescript/src/features/basic-capabilities/actions/reply.js +80 -0
- package/packages/typescript/src/features/basic-capabilities/index.d.ts +108 -0
- package/packages/typescript/src/features/basic-capabilities/index.d.ts.map +1 -0
- package/packages/typescript/src/features/basic-capabilities/index.js +1020 -0
- package/packages/typescript/src/features/basic-capabilities/providers/actionState.d.ts +7 -0
- package/packages/typescript/src/features/basic-capabilities/providers/actionState.d.ts.map +1 -0
- package/packages/typescript/src/features/basic-capabilities/providers/actionState.js +232 -0
- package/packages/typescript/src/features/basic-capabilities/providers/actions.d.ts +35 -0
- package/packages/typescript/src/features/basic-capabilities/providers/actions.d.ts.map +1 -0
- package/packages/typescript/src/features/basic-capabilities/providers/actions.js +82 -0
- package/packages/typescript/src/features/basic-capabilities/providers/attachments.d.ts +20 -0
- package/packages/typescript/src/features/basic-capabilities/providers/attachments.d.ts.map +1 -0
- package/packages/typescript/src/features/basic-capabilities/providers/attachments.js +94 -0
- package/packages/typescript/src/features/basic-capabilities/providers/character.d.ts +17 -0
- package/packages/typescript/src/features/basic-capabilities/providers/character.d.ts.map +1 -0
- package/packages/typescript/src/features/basic-capabilities/providers/character.js +190 -0
- package/packages/typescript/src/features/basic-capabilities/providers/choice.d.ts +11 -0
- package/packages/typescript/src/features/basic-capabilities/providers/choice.d.ts.map +1 -0
- package/packages/typescript/src/features/basic-capabilities/providers/choice.js +86 -0
- package/packages/typescript/src/features/basic-capabilities/providers/contextBench.d.ts +12 -0
- package/packages/typescript/src/features/basic-capabilities/providers/contextBench.d.ts.map +1 -0
- package/packages/typescript/src/features/basic-capabilities/providers/contextBench.js +50 -0
- package/packages/typescript/src/features/basic-capabilities/providers/currentTime.d.ts +11 -0
- package/packages/typescript/src/features/basic-capabilities/providers/currentTime.d.ts.map +1 -0
- package/packages/typescript/src/features/basic-capabilities/providers/currentTime.js +56 -0
- package/packages/typescript/src/features/basic-capabilities/providers/entities.d.ts +7 -0
- package/packages/typescript/src/features/basic-capabilities/providers/entities.d.ts.map +1 -0
- package/packages/typescript/src/features/basic-capabilities/providers/entities.js +39 -0
- package/packages/typescript/src/features/basic-capabilities/providers/evaluators.d.ts +27 -0
- package/packages/typescript/src/features/basic-capabilities/providers/evaluators.d.ts.map +1 -0
- package/packages/typescript/src/features/basic-capabilities/providers/evaluators.js +107 -0
- package/packages/typescript/src/features/basic-capabilities/providers/index.d.ts +19 -0
- package/packages/typescript/src/features/basic-capabilities/providers/index.d.ts.map +1 -0
- package/packages/typescript/src/features/basic-capabilities/providers/index.js +18 -0
- package/packages/typescript/src/features/basic-capabilities/providers/providers.d.ts +18 -0
- package/packages/typescript/src/features/basic-capabilities/providers/providers.d.ts.map +1 -0
- package/packages/typescript/src/features/basic-capabilities/providers/providers.js +70 -0
- package/packages/typescript/src/features/basic-capabilities/providers/recentMessages.d.ts +14 -0
- package/packages/typescript/src/features/basic-capabilities/providers/recentMessages.d.ts.map +1 -0
- package/packages/typescript/src/features/basic-capabilities/providers/recentMessages.js +323 -0
- package/packages/typescript/src/features/basic-capabilities/providers/time.d.ts +12 -0
- package/packages/typescript/src/features/basic-capabilities/providers/time.d.ts.map +1 -0
- package/packages/typescript/src/features/basic-capabilities/providers/time.js +36 -0
- package/packages/typescript/src/features/basic-capabilities/providers/world.d.ts +8 -0
- package/packages/typescript/src/features/basic-capabilities/providers/world.d.ts.map +1 -0
- package/packages/typescript/src/features/basic-capabilities/providers/world.js +212 -0
- package/packages/typescript/src/features/index.d.ts +58 -0
- package/packages/typescript/src/features/index.d.ts.map +1 -0
- package/packages/typescript/src/features/index.js +155 -0
- package/packages/typescript/src/features/knowledge/actions.d.ts +5 -0
- package/packages/typescript/src/features/knowledge/actions.d.ts.map +1 -0
- package/packages/typescript/src/features/knowledge/actions.js +269 -0
- package/packages/typescript/src/features/knowledge/config.d.ts +5 -0
- package/packages/typescript/src/features/knowledge/config.d.ts.map +1 -0
- package/packages/typescript/src/features/knowledge/config.js +147 -0
- package/packages/typescript/src/features/knowledge/ctx-embeddings.d.ts +53 -0
- package/packages/typescript/src/features/knowledge/ctx-embeddings.d.ts.map +1 -0
- package/packages/typescript/src/features/knowledge/ctx-embeddings.js +412 -0
- package/packages/typescript/src/features/knowledge/docs-loader.d.ts +9 -0
- package/packages/typescript/src/features/knowledge/docs-loader.d.ts.map +1 -0
- package/packages/typescript/src/features/knowledge/docs-loader.js +202 -0
- package/packages/typescript/src/features/knowledge/document-processor.d.ts +26 -0
- package/packages/typescript/src/features/knowledge/document-processor.d.ts.map +1 -0
- package/packages/typescript/src/features/knowledge/document-processor.js +618 -0
- package/packages/typescript/src/features/knowledge/documents-provider.d.ts +3 -0
- package/packages/typescript/src/features/knowledge/documents-provider.d.ts.map +1 -0
- package/packages/typescript/src/features/knowledge/documents-provider.js +106 -0
- package/packages/typescript/src/features/knowledge/index.d.ts +16 -0
- package/packages/typescript/src/features/knowledge/index.d.ts.map +1 -0
- package/packages/typescript/src/features/knowledge/index.js +29 -0
- package/packages/typescript/src/features/knowledge/llm.d.ts +27 -0
- package/packages/typescript/src/features/knowledge/llm.d.ts.map +1 -0
- package/packages/typescript/src/features/knowledge/llm.js +444 -0
- package/packages/typescript/src/features/knowledge/provider.d.ts +3 -0
- package/packages/typescript/src/features/knowledge/provider.d.ts.map +1 -0
- package/packages/typescript/src/features/knowledge/provider.js +62 -0
- package/packages/typescript/src/features/knowledge/service.d.ts +76 -0
- package/packages/typescript/src/features/knowledge/service.d.ts.map +1 -0
- package/packages/typescript/src/features/knowledge/service.js +511 -0
- package/packages/typescript/src/features/knowledge/types.d.ts +144 -0
- package/packages/typescript/src/features/knowledge/types.d.ts.map +1 -0
- package/packages/typescript/src/features/knowledge/types.js +57 -0
- package/packages/typescript/src/features/knowledge/utils.d.ts +17 -0
- package/packages/typescript/src/features/knowledge/utils.d.ts.map +1 -0
- package/packages/typescript/src/features/knowledge/utils.js +313 -0
- package/packages/typescript/src/features/plugin-manager/actions/coreStatusAction.d.ts +3 -0
- package/packages/typescript/src/features/plugin-manager/actions/coreStatusAction.d.ts.map +1 -0
- package/packages/typescript/src/features/plugin-manager/actions/coreStatusAction.js +65 -0
- package/packages/typescript/src/features/plugin-manager/actions/listEjectedPluginsAction.d.ts +3 -0
- package/packages/typescript/src/features/plugin-manager/actions/listEjectedPluginsAction.d.ts.map +1 -0
- package/packages/typescript/src/features/plugin-manager/actions/listEjectedPluginsAction.js +63 -0
- package/packages/typescript/src/features/plugin-manager/actions/searchPluginAction.d.ts +4 -0
- package/packages/typescript/src/features/plugin-manager/actions/searchPluginAction.d.ts.map +1 -0
- package/packages/typescript/src/features/plugin-manager/actions/searchPluginAction.js +232 -0
- package/packages/typescript/src/features/plugin-manager/coreExtensions.d.ts +35 -0
- package/packages/typescript/src/features/plugin-manager/coreExtensions.d.ts.map +1 -0
- package/packages/typescript/src/features/plugin-manager/coreExtensions.js +77 -0
- package/packages/typescript/src/features/plugin-manager/index.d.ts +25 -0
- package/packages/typescript/src/features/plugin-manager/index.d.ts.map +1 -0
- package/packages/typescript/src/features/plugin-manager/index.js +53 -0
- package/packages/typescript/src/features/plugin-manager/providers/pluginConfigurationStatus.d.ts +5 -0
- package/packages/typescript/src/features/plugin-manager/providers/pluginConfigurationStatus.d.ts.map +1 -0
- package/packages/typescript/src/features/plugin-manager/providers/pluginConfigurationStatus.js +104 -0
- package/packages/typescript/src/features/plugin-manager/providers/pluginStateProvider.d.ts +5 -0
- package/packages/typescript/src/features/plugin-manager/providers/pluginStateProvider.d.ts.map +1 -0
- package/packages/typescript/src/features/plugin-manager/providers/pluginStateProvider.js +105 -0
- package/packages/typescript/src/features/plugin-manager/providers/registryPluginsProvider.d.ts +5 -0
- package/packages/typescript/src/features/plugin-manager/providers/registryPluginsProvider.d.ts.map +1 -0
- package/packages/typescript/src/features/plugin-manager/providers/registryPluginsProvider.js +93 -0
- package/packages/typescript/src/features/plugin-manager/providers/relevance.d.ts +9 -0
- package/packages/typescript/src/features/plugin-manager/providers/relevance.d.ts.map +1 -0
- package/packages/typescript/src/features/plugin-manager/providers/relevance.js +226 -0
- package/packages/typescript/src/features/plugin-manager/services/coreManagerService.d.ts +76 -0
- package/packages/typescript/src/features/plugin-manager/services/coreManagerService.d.ts.map +1 -0
- package/packages/typescript/src/features/plugin-manager/services/coreManagerService.js +479 -0
- package/packages/typescript/src/features/plugin-manager/services/pluginConfigurationService.d.ts +31 -0
- package/packages/typescript/src/features/plugin-manager/services/pluginConfigurationService.d.ts.map +1 -0
- package/packages/typescript/src/features/plugin-manager/services/pluginConfigurationService.js +57 -0
- package/packages/typescript/src/features/plugin-manager/services/pluginManagerService.d.ts +68 -0
- package/packages/typescript/src/features/plugin-manager/services/pluginManagerService.d.ts.map +1 -0
- package/packages/typescript/src/features/plugin-manager/services/pluginManagerService.js +1007 -0
- package/packages/typescript/src/features/plugin-manager/services/pluginRegistryService.d.ts +84 -0
- package/packages/typescript/src/features/plugin-manager/services/pluginRegistryService.d.ts.map +1 -0
- package/packages/typescript/src/features/plugin-manager/services/pluginRegistryService.js +402 -0
- package/packages/typescript/src/features/plugin-manager/types.d.ts +142 -0
- package/packages/typescript/src/features/plugin-manager/types.d.ts.map +1 -0
- package/packages/typescript/src/features/plugin-manager/types.js +13 -0
- package/packages/typescript/src/features/plugin-manager/utils/paths.d.ts +4 -0
- package/packages/typescript/src/features/plugin-manager/utils/paths.d.ts.map +1 -0
- package/packages/typescript/src/features/plugin-manager/utils/paths.js +32 -0
- package/packages/typescript/src/features/secrets/actions/index.d.ts +7 -0
- package/packages/typescript/src/features/secrets/actions/index.d.ts.map +1 -0
- package/packages/typescript/src/features/secrets/actions/index.js +6 -0
- package/packages/typescript/src/features/secrets/actions/manage-secret.d.ts +12 -0
- package/packages/typescript/src/features/secrets/actions/manage-secret.d.ts.map +1 -0
- package/packages/typescript/src/features/secrets/actions/manage-secret.js +278 -0
- package/packages/typescript/src/features/secrets/actions/request-secret.d.ts +3 -0
- package/packages/typescript/src/features/secrets/actions/request-secret.d.ts.map +1 -0
- package/packages/typescript/src/features/secrets/actions/request-secret.js +105 -0
- package/packages/typescript/src/features/secrets/actions/set-secret.d.ts +12 -0
- package/packages/typescript/src/features/secrets/actions/set-secret.d.ts.map +1 -0
- package/packages/typescript/src/features/secrets/actions/set-secret.js +223 -0
- package/packages/typescript/src/features/secrets/crypto/encryption.d.ts +184 -0
- package/packages/typescript/src/features/secrets/crypto/encryption.d.ts.map +1 -0
- package/packages/typescript/src/features/secrets/crypto/encryption.js +373 -0
- package/packages/typescript/src/features/secrets/crypto/index.d.ts +5 -0
- package/packages/typescript/src/features/secrets/crypto/index.d.ts.map +1 -0
- package/packages/typescript/src/features/secrets/crypto/index.js +16 -0
- package/packages/typescript/src/features/secrets/onboarding/action.d.ts +12 -0
- package/packages/typescript/src/features/secrets/onboarding/action.d.ts.map +1 -0
- package/packages/typescript/src/features/secrets/onboarding/action.js +337 -0
- package/packages/typescript/src/features/secrets/onboarding/config.d.ts +99 -0
- package/packages/typescript/src/features/secrets/onboarding/config.d.ts.map +1 -0
- package/packages/typescript/src/features/secrets/onboarding/config.js +240 -0
- package/packages/typescript/src/features/secrets/onboarding/index.d.ts +13 -0
- package/packages/typescript/src/features/secrets/onboarding/index.d.ts.map +1 -0
- package/packages/typescript/src/features/secrets/onboarding/index.js +12 -0
- package/packages/typescript/src/features/secrets/onboarding/provider.d.ts +16 -0
- package/packages/typescript/src/features/secrets/onboarding/provider.d.ts.map +1 -0
- package/packages/typescript/src/features/secrets/onboarding/provider.js +231 -0
- package/packages/typescript/src/features/secrets/onboarding/service.d.ts +134 -0
- package/packages/typescript/src/features/secrets/onboarding/service.d.ts.map +1 -0
- package/packages/typescript/src/features/secrets/onboarding/service.js +436 -0
- package/packages/typescript/src/features/secrets/providers/index.d.ts +5 -0
- package/packages/typescript/src/features/secrets/providers/index.d.ts.map +1 -0
- package/packages/typescript/src/features/secrets/providers/index.js +4 -0
- package/packages/typescript/src/features/secrets/providers/secrets-status.d.ts +22 -0
- package/packages/typescript/src/features/secrets/providers/secrets-status.d.ts.map +1 -0
- package/packages/typescript/src/features/secrets/providers/secrets-status.js +160 -0
- package/packages/typescript/src/features/secrets/services/plugin-activator.d.ts +182 -0
- package/packages/typescript/src/features/secrets/services/plugin-activator.d.ts.map +1 -0
- package/packages/typescript/src/features/secrets/services/plugin-activator.js +617 -0
- package/packages/typescript/src/features/secrets/services/secrets.d.ts +183 -0
- package/packages/typescript/src/features/secrets/services/secrets.d.ts.map +1 -0
- package/packages/typescript/src/features/secrets/services/secrets.js +566 -0
- package/packages/typescript/src/features/secrets/storage/character-store.d.ts +63 -0
- package/packages/typescript/src/features/secrets/storage/character-store.d.ts.map +1 -0
- package/packages/typescript/src/features/secrets/storage/character-store.js +265 -0
- package/packages/typescript/src/features/secrets/storage/component-store.d.ts +47 -0
- package/packages/typescript/src/features/secrets/storage/component-store.d.ts.map +1 -0
- package/packages/typescript/src/features/secrets/storage/component-store.js +264 -0
- package/packages/typescript/src/features/secrets/storage/index.d.ts +10 -0
- package/packages/typescript/src/features/secrets/storage/index.d.ts.map +1 -0
- package/packages/typescript/src/features/secrets/storage/index.js +8 -0
- package/packages/typescript/src/features/secrets/storage/interface.d.ts +52 -0
- package/packages/typescript/src/features/secrets/storage/interface.d.ts.map +1 -0
- package/packages/typescript/src/features/secrets/storage/interface.js +92 -0
- package/packages/typescript/src/features/secrets/storage/memory-store.d.ts +44 -0
- package/packages/typescript/src/features/secrets/storage/memory-store.d.ts.map +1 -0
- package/packages/typescript/src/features/secrets/storage/memory-store.js +142 -0
- package/packages/typescript/src/features/secrets/storage/world-store.d.ts +52 -0
- package/packages/typescript/src/features/secrets/storage/world-store.d.ts.map +1 -0
- package/packages/typescript/src/features/secrets/storage/world-store.js +292 -0
- package/packages/typescript/src/features/secrets/types.d.ts +438 -0
- package/packages/typescript/src/features/secrets/types.d.ts.map +1 -0
- package/packages/typescript/src/features/secrets/types.js +57 -0
- package/packages/typescript/src/features/secrets/validation.d.ts +33 -0
- package/packages/typescript/src/features/secrets/validation.d.ts.map +1 -0
- package/packages/typescript/src/features/secrets/validation.js +389 -0
- package/packages/typescript/src/features/trajectories/TrajectoriesService.d.ts +275 -0
- package/packages/typescript/src/features/trajectories/TrajectoriesService.d.ts.map +1 -0
- package/packages/typescript/src/features/trajectories/TrajectoriesService.js +1401 -0
- package/packages/typescript/src/features/trajectories/action-interceptor.d.ts +23 -0
- package/packages/typescript/src/features/trajectories/action-interceptor.d.ts.map +1 -0
- package/packages/typescript/src/features/trajectories/action-interceptor.js +178 -0
- package/packages/typescript/src/features/trajectories/art-format.d.ts +32 -0
- package/packages/typescript/src/features/trajectories/art-format.d.ts.map +1 -0
- package/packages/typescript/src/features/trajectories/art-format.js +221 -0
- package/packages/typescript/src/features/trajectories/export.d.ts +40 -0
- package/packages/typescript/src/features/trajectories/export.d.ts.map +1 -0
- package/packages/typescript/src/features/trajectories/export.js +99 -0
- package/packages/typescript/src/features/trajectories/game-rewards.d.ts +14 -0
- package/packages/typescript/src/features/trajectories/game-rewards.d.ts.map +1 -0
- package/packages/typescript/src/features/trajectories/game-rewards.js +20 -0
- package/packages/typescript/src/features/trajectories/index.d.ts +24 -0
- package/packages/typescript/src/features/trajectories/index.d.ts.map +1 -0
- package/packages/typescript/src/features/trajectories/index.js +253 -0
- package/packages/typescript/src/features/trajectories/integration.d.ts +59 -0
- package/packages/typescript/src/features/trajectories/integration.d.ts.map +1 -0
- package/packages/typescript/src/features/trajectories/integration.js +83 -0
- package/packages/typescript/src/features/trajectories/reward-service.d.ts +24 -0
- package/packages/typescript/src/features/trajectories/reward-service.d.ts.map +1 -0
- package/packages/typescript/src/features/trajectories/reward-service.js +89 -0
- package/packages/typescript/src/features/trajectories/types.d.ts +243 -0
- package/packages/typescript/src/features/trajectories/types.d.ts.map +1 -0
- package/packages/typescript/src/features/trajectories/types.js +1 -0
- package/packages/typescript/src/features/trust/actions/evaluateTrust.d.ts +3 -0
- package/packages/typescript/src/features/trust/actions/evaluateTrust.d.ts.map +1 -0
- package/packages/typescript/src/features/trust/actions/evaluateTrust.js +225 -0
- package/packages/typescript/src/features/trust/actions/hasTrustEngine.d.ts +3 -0
- package/packages/typescript/src/features/trust/actions/hasTrustEngine.d.ts.map +1 -0
- package/packages/typescript/src/features/trust/actions/hasTrustEngine.js +3 -0
- package/packages/typescript/src/features/trust/actions/index.d.ts +6 -0
- package/packages/typescript/src/features/trust/actions/index.d.ts.map +1 -0
- package/packages/typescript/src/features/trust/actions/index.js +5 -0
- package/packages/typescript/src/features/trust/actions/recordTrustInteraction.d.ts +3 -0
- package/packages/typescript/src/features/trust/actions/recordTrustInteraction.d.ts.map +1 -0
- package/packages/typescript/src/features/trust/actions/recordTrustInteraction.js +189 -0
- package/packages/typescript/src/features/trust/actions/requestElevation.d.ts +3 -0
- package/packages/typescript/src/features/trust/actions/requestElevation.d.ts.map +1 -0
- package/packages/typescript/src/features/trust/actions/requestElevation.js +165 -0
- package/packages/typescript/src/features/trust/actions/roles.d.ts +3 -0
- package/packages/typescript/src/features/trust/actions/roles.d.ts.map +1 -0
- package/packages/typescript/src/features/trust/actions/roles.js +295 -0
- package/packages/typescript/src/features/trust/actions/settings.d.ts +5 -0
- package/packages/typescript/src/features/trust/actions/settings.d.ts.map +1 -0
- package/packages/typescript/src/features/trust/actions/settings.js +603 -0
- package/packages/typescript/src/features/trust/evaluators/index.d.ts +4 -0
- package/packages/typescript/src/features/trust/evaluators/index.d.ts.map +1 -0
- package/packages/typescript/src/features/trust/evaluators/index.js +3 -0
- package/packages/typescript/src/features/trust/evaluators/reflection.d.ts +3 -0
- package/packages/typescript/src/features/trust/evaluators/reflection.d.ts.map +1 -0
- package/packages/typescript/src/features/trust/evaluators/reflection.js +290 -0
- package/packages/typescript/src/features/trust/evaluators/securityEvaluator.d.ts +3 -0
- package/packages/typescript/src/features/trust/evaluators/securityEvaluator.d.ts.map +1 -0
- package/packages/typescript/src/features/trust/evaluators/securityEvaluator.js +270 -0
- package/packages/typescript/src/features/trust/evaluators/trustChangeEvaluator.d.ts +3 -0
- package/packages/typescript/src/features/trust/evaluators/trustChangeEvaluator.d.ts.map +1 -0
- package/packages/typescript/src/features/trust/evaluators/trustChangeEvaluator.js +201 -0
- package/packages/typescript/src/features/trust/index.d.ts +72 -0
- package/packages/typescript/src/features/trust/index.d.ts.map +1 -0
- package/packages/typescript/src/features/trust/index.js +213 -0
- package/packages/typescript/src/features/trust/providers/adminTrust.d.ts +3 -0
- package/packages/typescript/src/features/trust/providers/adminTrust.d.ts.map +1 -0
- package/packages/typescript/src/features/trust/providers/adminTrust.js +49 -0
- package/packages/typescript/src/features/trust/providers/index.d.ts +6 -0
- package/packages/typescript/src/features/trust/providers/index.d.ts.map +1 -0
- package/packages/typescript/src/features/trust/providers/index.js +5 -0
- package/packages/typescript/src/features/trust/providers/roles.d.ts +4 -0
- package/packages/typescript/src/features/trust/providers/roles.d.ts.map +1 -0
- package/packages/typescript/src/features/trust/providers/roles.js +142 -0
- package/packages/typescript/src/features/trust/providers/securityStatus.d.ts +3 -0
- package/packages/typescript/src/features/trust/providers/securityStatus.d.ts.map +1 -0
- package/packages/typescript/src/features/trust/providers/securityStatus.js +110 -0
- package/packages/typescript/src/features/trust/providers/settings.d.ts +3 -0
- package/packages/typescript/src/features/trust/providers/settings.d.ts.map +1 -0
- package/packages/typescript/src/features/trust/providers/settings.js +212 -0
- package/packages/typescript/src/features/trust/providers/trustProfile.d.ts +3 -0
- package/packages/typescript/src/features/trust/providers/trustProfile.d.ts.map +1 -0
- package/packages/typescript/src/features/trust/providers/trustProfile.js +68 -0
- package/packages/typescript/src/features/trust/schema.d.ts +1170 -0
- package/packages/typescript/src/features/trust/schema.d.ts.map +1 -0
- package/packages/typescript/src/features/trust/schema.js +108 -0
- package/packages/typescript/src/features/trust/services/ContextualPermissionSystem.d.ts +40 -0
- package/packages/typescript/src/features/trust/services/ContextualPermissionSystem.d.ts.map +1 -0
- package/packages/typescript/src/features/trust/services/ContextualPermissionSystem.js +317 -0
- package/packages/typescript/src/features/trust/services/CredentialProtector.d.ts +62 -0
- package/packages/typescript/src/features/trust/services/CredentialProtector.d.ts.map +1 -0
- package/packages/typescript/src/features/trust/services/CredentialProtector.js +417 -0
- package/packages/typescript/src/features/trust/services/SecurityModule.d.ts +142 -0
- package/packages/typescript/src/features/trust/services/SecurityModule.d.ts.map +1 -0
- package/packages/typescript/src/features/trust/services/SecurityModule.js +1057 -0
- package/packages/typescript/src/features/trust/services/SecurityStore.d.ts +53 -0
- package/packages/typescript/src/features/trust/services/SecurityStore.d.ts.map +1 -0
- package/packages/typescript/src/features/trust/services/SecurityStore.js +123 -0
- package/packages/typescript/src/features/trust/services/TrustEngine.d.ts +81 -0
- package/packages/typescript/src/features/trust/services/TrustEngine.d.ts.map +1 -0
- package/packages/typescript/src/features/trust/services/TrustEngine.js +621 -0
- package/packages/typescript/src/features/trust/services/adminContext.d.ts +3 -0
- package/packages/typescript/src/features/trust/services/adminContext.d.ts.map +1 -0
- package/packages/typescript/src/features/trust/services/adminContext.js +32 -0
- package/packages/typescript/src/features/trust/services/db.d.ts +12 -0
- package/packages/typescript/src/features/trust/services/db.d.ts.map +1 -0
- package/packages/typescript/src/features/trust/services/db.js +10 -0
- package/packages/typescript/src/features/trust/types/permissions.d.ts +185 -0
- package/packages/typescript/src/features/trust/types/permissions.d.ts.map +1 -0
- package/packages/typescript/src/features/trust/types/permissions.js +58 -0
- package/packages/typescript/src/features/trust/types/security.d.ts +114 -0
- package/packages/typescript/src/features/trust/types/security.d.ts.map +1 -0
- package/packages/typescript/src/features/trust/types/security.js +15 -0
- package/packages/typescript/src/features/trust/types/trust.d.ts +179 -0
- package/packages/typescript/src/features/trust/types/trust.d.ts.map +1 -0
- package/packages/typescript/src/features/trust/types/trust.js +25 -0
- package/packages/typescript/src/generated/action-docs.d.ts +2605 -0
- package/packages/typescript/src/generated/action-docs.d.ts.map +1 -0
- package/packages/typescript/src/generated/action-docs.js +3786 -0
- package/packages/typescript/src/generated/spec-helpers.d.ts +49 -0
- package/packages/typescript/src/generated/spec-helpers.d.ts.map +1 -0
- package/packages/typescript/src/generated/spec-helpers.js +78 -0
- package/packages/typescript/src/i18n/generated/validation-keyword-data.d.ts +1056 -0
- package/packages/typescript/src/i18n/generated/validation-keyword-data.d.ts.map +1 -0
- package/packages/typescript/src/i18n/generated/validation-keyword-data.js +1056 -0
- package/packages/typescript/src/i18n/validation-keywords.d.ts +25 -0
- package/packages/typescript/src/i18n/validation-keywords.d.ts.map +1 -0
- package/packages/typescript/src/i18n/validation-keywords.js +112 -0
- package/packages/typescript/src/index.d.ts +12 -0
- package/packages/typescript/src/index.d.ts.map +1 -0
- package/packages/typescript/src/index.js +13 -0
- package/packages/typescript/src/index.node.d.ts +78 -0
- package/packages/typescript/src/index.node.d.ts.map +1 -0
- package/packages/typescript/src/index.node.js +107 -0
- package/packages/typescript/src/logger.d.ts +121 -0
- package/packages/typescript/src/logger.d.ts.map +1 -0
- package/packages/typescript/src/logger.js +1023 -0
- package/packages/typescript/src/markdown/chunk.d.ts +50 -0
- package/packages/typescript/src/markdown/chunk.d.ts.map +1 -0
- package/packages/typescript/src/markdown/chunk.js +268 -0
- package/packages/typescript/src/markdown/code-spans.d.ts +42 -0
- package/packages/typescript/src/markdown/code-spans.d.ts.map +1 -0
- package/packages/typescript/src/markdown/code-spans.js +89 -0
- package/packages/typescript/src/markdown/fences.d.ts +50 -0
- package/packages/typescript/src/markdown/fences.d.ts.map +1 -0
- package/packages/typescript/src/markdown/fences.js +90 -0
- package/packages/typescript/src/markdown/frontmatter.d.ts +24 -0
- package/packages/typescript/src/markdown/frontmatter.d.ts.map +1 -0
- package/packages/typescript/src/markdown/frontmatter.js +151 -0
- package/packages/typescript/src/markdown/index.d.ts +18 -0
- package/packages/typescript/src/markdown/index.d.ts.map +1 -0
- package/packages/typescript/src/markdown/index.js +17 -0
- package/packages/typescript/src/markdown/ir.d.ts +101 -0
- package/packages/typescript/src/markdown/ir.d.ts.map +1 -0
- package/packages/typescript/src/markdown/ir.js +789 -0
- package/packages/typescript/src/media/fetch.d.ts +39 -0
- package/packages/typescript/src/media/fetch.d.ts.map +1 -0
- package/packages/typescript/src/media/fetch.js +205 -0
- package/packages/typescript/src/media/index.d.ts +8 -0
- package/packages/typescript/src/media/index.d.ts.map +1 -0
- package/packages/typescript/src/media/index.js +7 -0
- package/packages/typescript/src/media/mime.d.ts +51 -0
- package/packages/typescript/src/media/mime.d.ts.map +1 -0
- package/packages/typescript/src/media/mime.js +225 -0
- package/packages/typescript/src/memory.d.ts +40 -0
- package/packages/typescript/src/memory.d.ts.map +1 -0
- package/packages/typescript/src/memory.js +58 -0
- package/packages/typescript/src/network/fetch-guard.d.ts +34 -0
- package/packages/typescript/src/network/fetch-guard.d.ts.map +1 -0
- package/packages/typescript/src/network/fetch-guard.js +136 -0
- package/packages/typescript/src/network/index.d.ts +11 -0
- package/packages/typescript/src/network/index.d.ts.map +1 -0
- package/packages/typescript/src/network/index.js +10 -0
- package/packages/typescript/src/network/ssrf.d.ts +58 -0
- package/packages/typescript/src/network/ssrf.d.ts.map +1 -0
- package/packages/typescript/src/network/ssrf.js +252 -0
- package/packages/typescript/src/plugin-lifecycle.d.ts +16 -0
- package/packages/typescript/src/plugin-lifecycle.d.ts.map +1 -0
- package/packages/typescript/src/plugin-lifecycle.js +590 -0
- package/packages/typescript/src/plugin.d.ts +13 -0
- package/packages/typescript/src/plugin.d.ts.map +1 -0
- package/packages/typescript/src/plugin.js +334 -0
- package/packages/typescript/src/plugins/index.d.ts +9 -0
- package/packages/typescript/src/plugins/index.d.ts.map +1 -0
- package/packages/typescript/src/plugins/index.js +8 -0
- package/packages/typescript/src/plugins/native-features.d.ts +14 -0
- package/packages/typescript/src/plugins/native-features.d.ts.map +1 -0
- package/packages/typescript/src/plugins/native-features.js +59 -0
- package/packages/typescript/src/prompts.d.ts +88 -0
- package/packages/typescript/src/prompts.d.ts.map +1 -0
- package/packages/typescript/src/prompts.js +1123 -0
- package/packages/typescript/src/providers/onboarding-progress.d.ts +19 -0
- package/packages/typescript/src/providers/onboarding-progress.d.ts.map +1 -0
- package/packages/typescript/src/providers/onboarding-progress.js +268 -0
- package/packages/typescript/src/providers/skill-eligibility.d.ts +28 -0
- package/packages/typescript/src/providers/skill-eligibility.d.ts.map +1 -0
- package/packages/typescript/src/providers/skill-eligibility.js +179 -0
- package/packages/typescript/src/provisioning.d.ts +54 -0
- package/packages/typescript/src/provisioning.d.ts.map +1 -0
- package/packages/typescript/src/provisioning.js +209 -0
- package/packages/typescript/src/roles.d.ts +70 -0
- package/packages/typescript/src/roles.d.ts.map +1 -0
- package/packages/typescript/src/roles.js +544 -0
- package/packages/typescript/src/runtime-composition.d.ts +129 -0
- package/packages/typescript/src/runtime-composition.d.ts.map +1 -0
- package/packages/typescript/src/runtime-composition.js +335 -0
- package/packages/typescript/src/runtime.d.ts +877 -0
- package/packages/typescript/src/runtime.d.ts.map +1 -0
- package/packages/typescript/src/runtime.js +5277 -0
- package/packages/typescript/src/schemas/agent.d.ts +7 -0
- package/packages/typescript/src/schemas/agent.d.ts.map +1 -0
- package/packages/typescript/src/schemas/agent.js +112 -0
- package/packages/typescript/src/schemas/cache.d.ts +7 -0
- package/packages/typescript/src/schemas/cache.d.ts.map +1 -0
- package/packages/typescript/src/schemas/cache.js +55 -0
- package/packages/typescript/src/schemas/channel-participant.d.ts +7 -0
- package/packages/typescript/src/schemas/channel-participant.d.ts.map +1 -0
- package/packages/typescript/src/schemas/channel-participant.js +49 -0
- package/packages/typescript/src/schemas/channel.d.ts +7 -0
- package/packages/typescript/src/schemas/channel.d.ts.map +1 -0
- package/packages/typescript/src/schemas/channel.js +94 -0
- package/packages/typescript/src/schemas/character.d.ts +445 -0
- package/packages/typescript/src/schemas/character.d.ts.map +1 -0
- package/packages/typescript/src/schemas/character.js +309 -0
- package/packages/typescript/src/schemas/component.d.ts +7 -0
- package/packages/typescript/src/schemas/component.d.ts.map +1 -0
- package/packages/typescript/src/schemas/component.js +156 -0
- package/packages/typescript/src/schemas/embedding.d.ts +7 -0
- package/packages/typescript/src/schemas/embedding.d.ts.map +1 -0
- package/packages/typescript/src/schemas/embedding.js +89 -0
- package/packages/typescript/src/schemas/entity.d.ts +7 -0
- package/packages/typescript/src/schemas/entity.d.ts.map +1 -0
- package/packages/typescript/src/schemas/entity.js +69 -0
- package/packages/typescript/src/schemas/index.d.ts +75 -0
- package/packages/typescript/src/schemas/index.d.ts.map +1 -0
- package/packages/typescript/src/schemas/index.js +74 -0
- package/packages/typescript/src/schemas/log.d.ts +6 -0
- package/packages/typescript/src/schemas/log.d.ts.map +1 -0
- package/packages/typescript/src/schemas/log.js +93 -0
- package/packages/typescript/src/schemas/memory.d.ts +7 -0
- package/packages/typescript/src/schemas/memory.d.ts.map +1 -0
- package/packages/typescript/src/schemas/memory.js +167 -0
- package/packages/typescript/src/schemas/message-server-agent.d.ts +7 -0
- package/packages/typescript/src/schemas/message-server-agent.d.ts.map +1 -0
- package/packages/typescript/src/schemas/message-server-agent.js +58 -0
- package/packages/typescript/src/schemas/message-server.d.ts +6 -0
- package/packages/typescript/src/schemas/message-server.d.ts.map +1 -0
- package/packages/typescript/src/schemas/message-server.js +62 -0
- package/packages/typescript/src/schemas/message.d.ts +7 -0
- package/packages/typescript/src/schemas/message.d.ts.map +1 -0
- package/packages/typescript/src/schemas/message.js +106 -0
- package/packages/typescript/src/schemas/pairing-allowlist.d.ts +7 -0
- package/packages/typescript/src/schemas/pairing-allowlist.d.ts.map +1 -0
- package/packages/typescript/src/schemas/pairing-allowlist.js +76 -0
- package/packages/typescript/src/schemas/pairing-request.d.ts +7 -0
- package/packages/typescript/src/schemas/pairing-request.d.ts.map +1 -0
- package/packages/typescript/src/schemas/pairing-request.js +96 -0
- package/packages/typescript/src/schemas/participant.d.ts +6 -0
- package/packages/typescript/src/schemas/participant.d.ts.map +1 -0
- package/packages/typescript/src/schemas/participant.js +91 -0
- package/packages/typescript/src/schemas/relationship.d.ts +7 -0
- package/packages/typescript/src/schemas/relationship.d.ts.map +1 -0
- package/packages/typescript/src/schemas/relationship.js +102 -0
- package/packages/typescript/src/schemas/room.d.ts +6 -0
- package/packages/typescript/src/schemas/room.d.ts.map +1 -0
- package/packages/typescript/src/schemas/room.js +86 -0
- package/packages/typescript/src/schemas/server.d.ts +7 -0
- package/packages/typescript/src/schemas/server.d.ts.map +1 -0
- package/packages/typescript/src/schemas/server.js +33 -0
- package/packages/typescript/src/schemas/task.d.ts +6 -0
- package/packages/typescript/src/schemas/task.d.ts.map +1 -0
- package/packages/typescript/src/schemas/task.js +95 -0
- package/packages/typescript/src/schemas/world.d.ts +6 -0
- package/packages/typescript/src/schemas/world.d.ts.map +1 -0
- package/packages/typescript/src/schemas/world.js +64 -0
- package/packages/typescript/src/search.d.ts +381 -0
- package/packages/typescript/src/search.d.ts.map +1 -0
- package/packages/typescript/src/search.js +1580 -0
- package/packages/typescript/src/secrets.d.ts +6 -0
- package/packages/typescript/src/secrets.d.ts.map +1 -0
- package/packages/typescript/src/secrets.js +28 -0
- package/packages/typescript/src/security/external-content.d.ts +96 -0
- package/packages/typescript/src/security/external-content.d.ts.map +1 -0
- package/packages/typescript/src/security/external-content.js +252 -0
- package/packages/typescript/src/security/index.d.ts +12 -0
- package/packages/typescript/src/security/index.d.ts.map +1 -0
- package/packages/typescript/src/security/index.js +13 -0
- package/packages/typescript/src/security/redact.d.ts +111 -0
- package/packages/typescript/src/security/redact.d.ts.map +1 -0
- package/packages/typescript/src/security/redact.js +254 -0
- package/packages/typescript/src/services/agentEvent.d.ts +297 -0
- package/packages/typescript/src/services/agentEvent.d.ts.map +1 -0
- package/packages/typescript/src/services/agentEvent.js +422 -0
- package/packages/typescript/src/services/approval.d.ts +169 -0
- package/packages/typescript/src/services/approval.d.ts.map +1 -0
- package/packages/typescript/src/services/approval.js +399 -0
- package/packages/typescript/src/services/embedding.d.ts +29 -0
- package/packages/typescript/src/services/embedding.d.ts.map +1 -0
- package/packages/typescript/src/services/embedding.js +211 -0
- package/packages/typescript/src/services/followUp.d.ts +48 -0
- package/packages/typescript/src/services/followUp.d.ts.map +1 -0
- package/packages/typescript/src/services/followUp.js +333 -0
- package/packages/typescript/src/services/hook.d.ts +85 -0
- package/packages/typescript/src/services/hook.d.ts.map +1 -0
- package/packages/typescript/src/services/hook.js +396 -0
- package/packages/typescript/src/services/message.d.ts +93 -0
- package/packages/typescript/src/services/message.d.ts.map +1 -0
- package/packages/typescript/src/services/message.js +3163 -0
- package/packages/typescript/src/services/onboarding-cli.d.ts +240 -0
- package/packages/typescript/src/services/onboarding-cli.d.ts.map +1 -0
- package/packages/typescript/src/services/onboarding-cli.js +688 -0
- package/packages/typescript/src/services/onboarding-rpc.d.ts +225 -0
- package/packages/typescript/src/services/onboarding-rpc.d.ts.map +1 -0
- package/packages/typescript/src/services/onboarding-rpc.js +318 -0
- package/packages/typescript/src/services/onboarding-state.d.ts +155 -0
- package/packages/typescript/src/services/onboarding-state.d.ts.map +1 -0
- package/packages/typescript/src/services/onboarding-state.js +706 -0
- package/packages/typescript/src/services/pairing-integration.d.ts +96 -0
- package/packages/typescript/src/services/pairing-integration.d.ts.map +1 -0
- package/packages/typescript/src/services/pairing-integration.js +145 -0
- package/packages/typescript/src/services/pairing-migration.d.ts +105 -0
- package/packages/typescript/src/services/pairing-migration.d.ts.map +1 -0
- package/packages/typescript/src/services/pairing-migration.js +283 -0
- package/packages/typescript/src/services/pairing.d.ts +80 -0
- package/packages/typescript/src/services/pairing.d.ts.map +1 -0
- package/packages/typescript/src/services/pairing.js +253 -0
- package/packages/typescript/src/services/plugin-hooks.d.ts +112 -0
- package/packages/typescript/src/services/plugin-hooks.d.ts.map +1 -0
- package/packages/typescript/src/services/plugin-hooks.js +163 -0
- package/packages/typescript/src/services/relationships.d.ts +125 -0
- package/packages/typescript/src/services/relationships.d.ts.map +1 -0
- package/packages/typescript/src/services/relationships.js +637 -0
- package/packages/typescript/src/services/task-scheduler.d.ts +28 -0
- package/packages/typescript/src/services/task-scheduler.d.ts.map +1 -0
- package/packages/typescript/src/services/task-scheduler.js +89 -0
- package/packages/typescript/src/services/task.d.ts +130 -0
- package/packages/typescript/src/services/task.d.ts.map +1 -0
- package/packages/typescript/src/services/task.js +536 -0
- package/packages/typescript/src/services/tool-policy.d.ts +186 -0
- package/packages/typescript/src/services/tool-policy.d.ts.map +1 -0
- package/packages/typescript/src/services/tool-policy.js +332 -0
- package/packages/typescript/src/services/trajectories.d.ts +25 -0
- package/packages/typescript/src/services/trajectories.d.ts.map +1 -0
- package/packages/typescript/src/services/trajectories.js +1 -0
- package/packages/typescript/src/services.d.ts +61 -0
- package/packages/typescript/src/services.d.ts.map +1 -0
- package/packages/typescript/src/services.js +99 -0
- package/packages/typescript/src/sessions/index.d.ts +17 -0
- package/packages/typescript/src/sessions/index.d.ts.map +1 -0
- package/packages/typescript/src/sessions/index.js +29 -0
- package/packages/typescript/src/sessions/provider.d.ts +71 -0
- package/packages/typescript/src/sessions/provider.d.ts.map +1 -0
- package/packages/typescript/src/sessions/provider.js +243 -0
- package/packages/typescript/src/sessions/session-key.d.ts +201 -0
- package/packages/typescript/src/sessions/session-key.d.ts.map +1 -0
- package/packages/typescript/src/sessions/session-key.js +396 -0
- package/packages/typescript/src/sessions/types.d.ts +197 -0
- package/packages/typescript/src/sessions/types.d.ts.map +1 -0
- package/packages/typescript/src/sessions/types.js +68 -0
- package/packages/typescript/src/settings.d.ts +99 -0
- package/packages/typescript/src/settings.d.ts.map +1 -0
- package/packages/typescript/src/settings.js +409 -0
- package/packages/typescript/src/should-respond.d.ts +2 -0
- package/packages/typescript/src/should-respond.d.ts.map +1 -0
- package/packages/typescript/src/should-respond.js +16 -0
- package/packages/typescript/src/streaming-context.d.ts +79 -0
- package/packages/typescript/src/streaming-context.d.ts.map +1 -0
- package/packages/typescript/src/streaming-context.js +115 -0
- package/packages/typescript/src/trajectory-context.d.ts +26 -0
- package/packages/typescript/src/trajectory-context.d.ts.map +1 -0
- package/packages/typescript/src/trajectory-context.js +85 -0
- package/packages/typescript/src/trajectory-utils.d.ts +49 -0
- package/packages/typescript/src/trajectory-utils.d.ts.map +1 -0
- package/packages/typescript/src/trajectory-utils.js +105 -0
- package/packages/typescript/src/types/agent.d.ts +62 -0
- package/packages/typescript/src/types/agent.d.ts.map +1 -0
- package/packages/typescript/src/types/agent.js +5 -0
- package/packages/typescript/src/types/agentEvent.d.ts +258 -0
- package/packages/typescript/src/types/agentEvent.d.ts.map +1 -0
- package/packages/typescript/src/types/agentEvent.js +11 -0
- package/packages/typescript/src/types/channel-config.d.ts +167 -0
- package/packages/typescript/src/types/channel-config.d.ts.map +1 -0
- package/packages/typescript/src/types/channel-config.js +7 -0
- package/packages/typescript/src/types/components.d.ts +346 -0
- package/packages/typescript/src/types/components.d.ts.map +1 -0
- package/packages/typescript/src/types/components.js +1 -0
- package/packages/typescript/src/types/database.d.ts +1079 -0
- package/packages/typescript/src/types/database.d.ts.map +1 -0
- package/packages/typescript/src/types/database.js +9 -0
- package/packages/typescript/src/types/environment.d.ts +73 -0
- package/packages/typescript/src/types/environment.d.ts.map +1 -0
- package/packages/typescript/src/types/environment.js +16 -0
- package/packages/typescript/src/types/events.d.ts +386 -0
- package/packages/typescript/src/types/events.d.ts.map +1 -0
- package/packages/typescript/src/types/events.js +83 -0
- package/packages/typescript/src/types/generated/eliza/v1/agent_pb.d.ts +400 -0
- package/packages/typescript/src/types/generated/eliza/v1/agent_pb.d.ts.map +1 -0
- package/packages/typescript/src/types/generated/eliza/v1/agent_pb.js +72 -0
- package/packages/typescript/src/types/generated/eliza/v1/components_pb.d.ts +364 -0
- package/packages/typescript/src/types/generated/eliza/v1/components_pb.d.ts.map +1 -0
- package/packages/typescript/src/types/generated/eliza/v1/components_pb.js +68 -0
- package/packages/typescript/src/types/generated/eliza/v1/database_pb.d.ts +694 -0
- package/packages/typescript/src/types/generated/eliza/v1/database_pb.d.ts.map +1 -0
- package/packages/typescript/src/types/generated/eliza/v1/database_pb.js +172 -0
- package/packages/typescript/src/types/generated/eliza/v1/environment_pb.d.ts +299 -0
- package/packages/typescript/src/types/generated/eliza/v1/environment_pb.d.ts.map +1 -0
- package/packages/typescript/src/types/generated/eliza/v1/environment_pb.js +52 -0
- package/packages/typescript/src/types/generated/eliza/v1/events_pb.d.ts +746 -0
- package/packages/typescript/src/types/generated/eliza/v1/events_pb.d.ts.map +1 -0
- package/packages/typescript/src/types/generated/eliza/v1/events_pb.js +357 -0
- package/packages/typescript/src/types/generated/eliza/v1/ipc_pb.d.ts +799 -0
- package/packages/typescript/src/types/generated/eliza/v1/ipc_pb.d.ts.map +1 -0
- package/packages/typescript/src/types/generated/eliza/v1/ipc_pb.js +172 -0
- package/packages/typescript/src/types/generated/eliza/v1/knowledge_pb.d.ts +63 -0
- package/packages/typescript/src/types/generated/eliza/v1/knowledge_pb.d.ts.map +1 -0
- package/packages/typescript/src/types/generated/eliza/v1/knowledge_pb.js +18 -0
- package/packages/typescript/src/types/generated/eliza/v1/memory_pb.d.ts +290 -0
- package/packages/typescript/src/types/generated/eliza/v1/memory_pb.d.ts.map +1 -0
- package/packages/typescript/src/types/generated/eliza/v1/memory_pb.js +53 -0
- package/packages/typescript/src/types/generated/eliza/v1/message_service_pb.d.ts +160 -0
- package/packages/typescript/src/types/generated/eliza/v1/message_service_pb.d.ts.map +1 -0
- package/packages/typescript/src/types/generated/eliza/v1/message_service_pb.js +88 -0
- package/packages/typescript/src/types/generated/eliza/v1/messaging_pb.d.ts +214 -0
- package/packages/typescript/src/types/generated/eliza/v1/messaging_pb.d.ts.map +1 -0
- package/packages/typescript/src/types/generated/eliza/v1/messaging_pb.js +78 -0
- package/packages/typescript/src/types/generated/eliza/v1/model_pb.d.ts +653 -0
- package/packages/typescript/src/types/generated/eliza/v1/model_pb.d.ts.map +1 -0
- package/packages/typescript/src/types/generated/eliza/v1/model_pb.js +237 -0
- package/packages/typescript/src/types/generated/eliza/v1/payment_pb.d.ts +147 -0
- package/packages/typescript/src/types/generated/eliza/v1/payment_pb.d.ts.map +1 -0
- package/packages/typescript/src/types/generated/eliza/v1/payment_pb.js +27 -0
- package/packages/typescript/src/types/generated/eliza/v1/plugin_pb.d.ts +286 -0
- package/packages/typescript/src/types/generated/eliza/v1/plugin_pb.d.ts.map +1 -0
- package/packages/typescript/src/types/generated/eliza/v1/plugin_pb.js +86 -0
- package/packages/typescript/src/types/generated/eliza/v1/primitives_pb.d.ts +263 -0
- package/packages/typescript/src/types/generated/eliza/v1/primitives_pb.d.ts.map +1 -0
- package/packages/typescript/src/types/generated/eliza/v1/primitives_pb.js +38 -0
- package/packages/typescript/src/types/generated/eliza/v1/prompts_pb.d.ts +137 -0
- package/packages/typescript/src/types/generated/eliza/v1/prompts_pb.d.ts.map +1 -0
- package/packages/typescript/src/types/generated/eliza/v1/prompts_pb.js +27 -0
- package/packages/typescript/src/types/generated/eliza/v1/service_interfaces_pb.d.ts +2687 -0
- package/packages/typescript/src/types/generated/eliza/v1/service_interfaces_pb.d.ts.map +1 -0
- package/packages/typescript/src/types/generated/eliza/v1/service_interfaces_pb.js +392 -0
- package/packages/typescript/src/types/generated/eliza/v1/service_pb.d.ts +144 -0
- package/packages/typescript/src/types/generated/eliza/v1/service_pb.d.ts.map +1 -0
- package/packages/typescript/src/types/generated/eliza/v1/service_pb.js +99 -0
- package/packages/typescript/src/types/generated/eliza/v1/settings_pb.d.ts +146 -0
- package/packages/typescript/src/types/generated/eliza/v1/settings_pb.d.ts.map +1 -0
- package/packages/typescript/src/types/generated/eliza/v1/settings_pb.js +32 -0
- package/packages/typescript/src/types/generated/eliza/v1/state_pb.d.ts +259 -0
- package/packages/typescript/src/types/generated/eliza/v1/state_pb.d.ts.map +1 -0
- package/packages/typescript/src/types/generated/eliza/v1/state_pb.js +44 -0
- package/packages/typescript/src/types/generated/eliza/v1/task_pb.d.ts +120 -0
- package/packages/typescript/src/types/generated/eliza/v1/task_pb.d.ts.map +1 -0
- package/packages/typescript/src/types/generated/eliza/v1/task_pb.js +53 -0
- package/packages/typescript/src/types/generated/eliza/v1/tee_pb.d.ts +205 -0
- package/packages/typescript/src/types/generated/eliza/v1/tee_pb.d.ts.map +1 -0
- package/packages/typescript/src/types/generated/eliza/v1/tee_pb.js +89 -0
- package/packages/typescript/src/types/generated/eliza/v1/testing_pb.d.ts +47 -0
- package/packages/typescript/src/types/generated/eliza/v1/testing_pb.d.ts.map +1 -0
- package/packages/typescript/src/types/generated/eliza/v1/testing_pb.js +16 -0
- package/packages/typescript/src/types/hook.d.ts +338 -0
- package/packages/typescript/src/types/hook.d.ts.map +1 -0
- package/packages/typescript/src/types/hook.js +73 -0
- package/packages/typescript/src/types/index.d.ts +38 -0
- package/packages/typescript/src/types/index.d.ts.map +1 -0
- package/packages/typescript/src/types/index.js +46 -0
- package/packages/typescript/src/types/knowledge.d.ts +49 -0
- package/packages/typescript/src/types/knowledge.d.ts.map +1 -0
- package/packages/typescript/src/types/knowledge.js +1 -0
- package/packages/typescript/src/types/memory-storage.d.ts +28 -0
- package/packages/typescript/src/types/memory-storage.d.ts.map +1 -0
- package/packages/typescript/src/types/memory-storage.js +13 -0
- package/packages/typescript/src/types/memory.d.ts +438 -0
- package/packages/typescript/src/types/memory.d.ts.map +1 -0
- package/packages/typescript/src/types/memory.js +16 -0
- package/packages/typescript/src/types/message-service.d.ts +169 -0
- package/packages/typescript/src/types/message-service.d.ts.map +1 -0
- package/packages/typescript/src/types/message-service.js +1 -0
- package/packages/typescript/src/types/messaging.d.ts +358 -0
- package/packages/typescript/src/types/messaging.d.ts.map +1 -0
- package/packages/typescript/src/types/messaging.js +27 -0
- package/packages/typescript/src/types/model.d.ts +697 -0
- package/packages/typescript/src/types/model.d.ts.map +1 -0
- package/packages/typescript/src/types/model.js +247 -0
- package/packages/typescript/src/types/onboarding.d.ts +319 -0
- package/packages/typescript/src/types/onboarding.d.ts.map +1 -0
- package/packages/typescript/src/types/onboarding.js +97 -0
- package/packages/typescript/src/types/pairing.d.ts +124 -0
- package/packages/typescript/src/types/pairing.d.ts.map +1 -0
- package/packages/typescript/src/types/pairing.js +32 -0
- package/packages/typescript/src/types/payment.d.ts +45 -0
- package/packages/typescript/src/types/payment.d.ts.map +1 -0
- package/packages/typescript/src/types/payment.js +1 -0
- package/packages/typescript/src/types/plugin-manifest.d.ts +381 -0
- package/packages/typescript/src/types/plugin-manifest.d.ts.map +1 -0
- package/packages/typescript/src/types/plugin-manifest.js +10 -0
- package/packages/typescript/src/types/plugin-store.d.ts +173 -0
- package/packages/typescript/src/types/plugin-store.d.ts.map +1 -0
- package/packages/typescript/src/types/plugin-store.js +1 -0
- package/packages/typescript/src/types/plugin.d.ts +325 -0
- package/packages/typescript/src/types/plugin.d.ts.map +1 -0
- package/packages/typescript/src/types/plugin.js +1 -0
- package/packages/typescript/src/types/primitives.d.ts +176 -0
- package/packages/typescript/src/types/primitives.d.ts.map +1 -0
- package/packages/typescript/src/types/primitives.js +41 -0
- package/packages/typescript/src/types/prompt-batcher.d.ts +126 -0
- package/packages/typescript/src/types/prompt-batcher.d.ts.map +1 -0
- package/packages/typescript/src/types/prompt-batcher.js +6 -0
- package/packages/typescript/src/types/prompts.d.ts +39 -0
- package/packages/typescript/src/types/prompts.d.ts.map +1 -0
- package/packages/typescript/src/types/prompts.js +7 -0
- package/packages/typescript/src/types/proto.d.ts +60 -0
- package/packages/typescript/src/types/proto.d.ts.map +1 -0
- package/packages/typescript/src/types/proto.js +53 -0
- package/packages/typescript/src/types/runtime.d.ts +394 -0
- package/packages/typescript/src/types/runtime.d.ts.map +1 -0
- package/packages/typescript/src/types/runtime.js +1 -0
- package/packages/typescript/src/types/schema-builder.d.ts +43 -0
- package/packages/typescript/src/types/schema-builder.d.ts.map +1 -0
- package/packages/typescript/src/types/schema-builder.js +16 -0
- package/packages/typescript/src/types/schema.d.ts +99 -0
- package/packages/typescript/src/types/schema.d.ts.map +1 -0
- package/packages/typescript/src/types/schema.js +11 -0
- package/packages/typescript/src/types/service-interfaces.d.ts +1200 -0
- package/packages/typescript/src/types/service-interfaces.d.ts.map +1 -0
- package/packages/typescript/src/types/service-interfaces.js +81 -0
- package/packages/typescript/src/types/service.d.ts +173 -0
- package/packages/typescript/src/types/service.d.ts.map +1 -0
- package/packages/typescript/src/types/service.js +78 -0
- package/packages/typescript/src/types/settings.d.ts +36 -0
- package/packages/typescript/src/types/settings.d.ts.map +1 -0
- package/packages/typescript/src/types/settings.js +1 -0
- package/packages/typescript/src/types/state.d.ts +251 -0
- package/packages/typescript/src/types/state.d.ts.map +1 -0
- package/packages/typescript/src/types/state.js +1 -0
- package/packages/typescript/src/types/streaming.d.ts +93 -0
- package/packages/typescript/src/types/streaming.d.ts.map +1 -0
- package/packages/typescript/src/types/streaming.js +21 -0
- package/packages/typescript/src/types/task.d.ts +122 -0
- package/packages/typescript/src/types/task.d.ts.map +1 -0
- package/packages/typescript/src/types/task.js +1 -0
- package/packages/typescript/src/types/tee.d.ts +3 -0
- package/packages/typescript/src/types/tee.d.ts.map +1 -0
- package/packages/typescript/src/types/tee.js +1 -0
- package/packages/typescript/src/types/testing.d.ts +15 -0
- package/packages/typescript/src/types/testing.d.ts.map +1 -0
- package/packages/typescript/src/types/testing.js +1 -0
- package/packages/typescript/src/types/tools.d.ts +166 -0
- package/packages/typescript/src/types/tools.d.ts.map +1 -0
- package/packages/typescript/src/types/tools.js +380 -0
- package/packages/typescript/src/types/trigger.d.ts +38 -0
- package/packages/typescript/src/types/trigger.d.ts.map +1 -0
- package/packages/typescript/src/types/trigger.js +1 -0
- package/packages/typescript/src/utils/batch-queue/batch-processor.d.ts +53 -0
- package/packages/typescript/src/utils/batch-queue/batch-processor.d.ts.map +1 -0
- package/packages/typescript/src/utils/batch-queue/batch-processor.js +129 -0
- package/packages/typescript/src/utils/batch-queue/index.d.ts +97 -0
- package/packages/typescript/src/utils/batch-queue/index.d.ts.map +1 -0
- package/packages/typescript/src/utils/batch-queue/index.js +175 -0
- package/packages/typescript/src/utils/batch-queue/priority-queue.d.ts +53 -0
- package/packages/typescript/src/utils/batch-queue/priority-queue.d.ts.map +1 -0
- package/packages/typescript/src/utils/batch-queue/priority-queue.js +128 -0
- package/packages/typescript/src/utils/batch-queue/semaphore.d.ts +18 -0
- package/packages/typescript/src/utils/batch-queue/semaphore.d.ts.map +1 -0
- package/packages/typescript/src/utils/batch-queue/semaphore.js +34 -0
- package/packages/typescript/src/utils/batch-queue/task-drain.d.ts +57 -0
- package/packages/typescript/src/utils/batch-queue/task-drain.d.ts.map +1 -0
- package/packages/typescript/src/utils/batch-queue/task-drain.js +150 -0
- package/packages/typescript/src/utils/batch-queue.d.ts +20 -0
- package/packages/typescript/src/utils/batch-queue.d.ts.map +1 -0
- package/packages/typescript/src/utils/batch-queue.js +19 -0
- package/packages/typescript/src/utils/boolean.d.ts +50 -0
- package/packages/typescript/src/utils/boolean.d.ts.map +1 -0
- package/packages/typescript/src/utils/boolean.js +73 -0
- package/packages/typescript/src/utils/buffer.d.ts +107 -0
- package/packages/typescript/src/utils/buffer.d.ts.map +1 -0
- package/packages/typescript/src/utils/buffer.js +229 -0
- package/packages/typescript/src/utils/channel-utils.d.ts +274 -0
- package/packages/typescript/src/utils/channel-utils.d.ts.map +1 -0
- package/packages/typescript/src/utils/channel-utils.js +337 -0
- package/packages/typescript/src/utils/context-catalog.d.ts +6 -0
- package/packages/typescript/src/utils/context-catalog.d.ts.map +1 -0
- package/packages/typescript/src/utils/context-catalog.js +126 -0
- package/packages/typescript/src/utils/context-routing.d.ts +25 -0
- package/packages/typescript/src/utils/context-routing.d.ts.map +1 -0
- package/packages/typescript/src/utils/context-routing.js +160 -0
- package/packages/typescript/src/utils/crypto-compat.d.ts +83 -0
- package/packages/typescript/src/utils/crypto-compat.d.ts.map +1 -0
- package/packages/typescript/src/utils/crypto-compat.js +368 -0
- package/packages/typescript/src/utils/deterministic.d.ts +9 -0
- package/packages/typescript/src/utils/deterministic.d.ts.map +1 -0
- package/packages/typescript/src/utils/deterministic.js +70 -0
- package/packages/typescript/src/utils/environment.d.ts +125 -0
- package/packages/typescript/src/utils/environment.d.ts.map +1 -0
- package/packages/typescript/src/utils/environment.js +290 -0
- package/packages/typescript/src/utils/example-names.d.ts +3 -0
- package/packages/typescript/src/utils/example-names.d.ts.map +1 -0
- package/packages/typescript/src/utils/example-names.js +30 -0
- package/packages/typescript/src/utils/json-llm.d.ts +17 -0
- package/packages/typescript/src/utils/json-llm.d.ts.map +1 -0
- package/packages/typescript/src/utils/json-llm.js +32 -0
- package/packages/typescript/src/utils/model-errors.d.ts +3 -0
- package/packages/typescript/src/utils/model-errors.d.ts.map +1 -0
- package/packages/typescript/src/utils/model-errors.js +23 -0
- package/packages/typescript/src/utils/node.d.ts +8 -0
- package/packages/typescript/src/utils/node.d.ts.map +1 -0
- package/packages/typescript/src/utils/node.js +12 -0
- package/packages/typescript/src/utils/paths.d.ts +97 -0
- package/packages/typescript/src/utils/paths.d.ts.map +1 -0
- package/packages/typescript/src/utils/paths.js +204 -0
- package/packages/typescript/src/utils/prompt-batcher/batcher.d.ts +163 -0
- package/packages/typescript/src/utils/prompt-batcher/batcher.d.ts.map +1 -0
- package/packages/typescript/src/utils/prompt-batcher/batcher.js +896 -0
- package/packages/typescript/src/utils/prompt-batcher/dispatcher.d.ts +15 -0
- package/packages/typescript/src/utils/prompt-batcher/dispatcher.d.ts.map +1 -0
- package/packages/typescript/src/utils/prompt-batcher/dispatcher.js +230 -0
- package/packages/typescript/src/utils/prompt-batcher/shared.d.ts +66 -0
- package/packages/typescript/src/utils/prompt-batcher/shared.d.ts.map +1 -0
- package/packages/typescript/src/utils/prompt-batcher/shared.js +101 -0
- package/packages/typescript/src/utils/prompt-batcher.d.ts +5 -0
- package/packages/typescript/src/utils/prompt-batcher.d.ts.map +1 -0
- package/packages/typescript/src/utils/prompt-batcher.js +4 -0
- package/packages/typescript/src/utils/retry.d.ts +128 -0
- package/packages/typescript/src/utils/retry.d.ts.map +1 -0
- package/packages/typescript/src/utils/retry.js +190 -0
- package/packages/typescript/src/utils/server-health.d.ts +35 -0
- package/packages/typescript/src/utils/server-health.d.ts.map +1 -0
- package/packages/typescript/src/utils/server-health.js +76 -0
- package/packages/typescript/src/utils/slice-to-fit-budget.d.ts +12 -0
- package/packages/typescript/src/utils/slice-to-fit-budget.d.ts.map +1 -0
- package/packages/typescript/src/utils/slice-to-fit-budget.js +36 -0
- package/packages/typescript/src/utils/streaming.d.ts +275 -0
- package/packages/typescript/src/utils/streaming.d.ts.map +1 -0
- package/packages/typescript/src/utils/streaming.js +774 -0
- package/packages/typescript/src/utils/text-normalize.d.ts +23 -0
- package/packages/typescript/src/utils/text-normalize.d.ts.map +1 -0
- package/packages/typescript/src/utils/text-normalize.js +42 -0
- package/packages/typescript/src/utils/text-splitting.d.ts +14 -0
- package/packages/typescript/src/utils/text-splitting.d.ts.map +1 -0
- package/packages/typescript/src/utils/text-splitting.js +66 -0
- package/packages/typescript/src/utils/toon.d.ts +8 -0
- package/packages/typescript/src/utils/toon.d.ts.map +1 -0
- package/packages/typescript/src/utils/toon.js +325 -0
- package/packages/typescript/src/utils/type-guards.d.ts +25 -0
- package/packages/typescript/src/utils/type-guards.d.ts.map +1 -0
- package/packages/typescript/src/utils/type-guards.js +73 -0
- package/packages/typescript/src/utils.d.ts +190 -0
- package/packages/typescript/src/utils.d.ts.map +1 -0
- package/packages/typescript/src/utils.js +1115 -0
- package/packages/typescript/src/validation/index.d.ts +8 -0
- package/packages/typescript/src/validation/index.d.ts.map +1 -0
- package/packages/typescript/src/validation/index.js +7 -0
- package/packages/typescript/src/validation/keywords.d.ts +26 -0
- package/packages/typescript/src/validation/keywords.d.ts.map +1 -0
- package/packages/typescript/src/validation/keywords.js +76 -0
- package/packages/typescript/src/validation/secrets.d.ts +94 -0
- package/packages/typescript/src/validation/secrets.d.ts.map +1 -0
- package/packages/typescript/src/validation/secrets.js +399 -0
- package/jest.config.js +0 -17
- package/src/__tests__/client-type-identification.test.ts +0 -59
- package/src/defaultCharacter.ts +0 -530
- package/src/index.ts +0 -911
- package/tsconfig.json +0 -16
|
@@ -0,0 +1,3163 @@
|
|
|
1
|
+
import { v4 } from "uuid";
|
|
2
|
+
import { parseActionParams } from "../actions";
|
|
3
|
+
import { createUniqueUuid } from "../entities";
|
|
4
|
+
import { formatTaskCompletionStatus, getTaskCompletionCacheKey, } from "../features/advanced-capabilities/evaluators/task-completion";
|
|
5
|
+
import { logger } from "../logger";
|
|
6
|
+
import { imageDescriptionTemplate, messageHandlerTemplate, multiStepDecisionTemplate, multiStepSummaryTemplate, postActionDecisionTemplate, shouldRespondTemplate, } from "../prompts";
|
|
7
|
+
import { isExplicitSelfModificationRequest } from "../should-respond";
|
|
8
|
+
import { runWithStreamingContext } from "../streaming-context";
|
|
9
|
+
import { runWithTrajectoryContext, setTrajectoryPurpose, } from "../trajectory-context";
|
|
10
|
+
import { EventType } from "../types/events";
|
|
11
|
+
import { ModelType } from "../types/model";
|
|
12
|
+
import { asUUID, ChannelType, ContentType } from "../types/primitives";
|
|
13
|
+
import { composePromptFromState, getLocalServerUrl, parseBooleanFromText, parseKeyValueXml, truncateToCompleteSentence, } from "../utils";
|
|
14
|
+
import { AVAILABLE_CONTEXTS_STATE_KEY, attachAvailableContexts, CONTEXT_ROUTING_STATE_KEY, mergeContextRouting, parseContextRoutingMetadata, setContextRoutingMetadata, } from "../utils/context-routing";
|
|
15
|
+
import { createStreamingContext, MarkableExtractor, ResponseStreamExtractor, } from "../utils/streaming";
|
|
16
|
+
import { extractFirstSentence, hasFirstSentence, } from "../utils/text-splitting";
|
|
17
|
+
/**
|
|
18
|
+
* Reserved XML response keys that are NOT action names.
|
|
19
|
+
* Used when scanning parsedXml for standalone action param blocks.
|
|
20
|
+
*/
|
|
21
|
+
export const RESERVED_XML_KEYS = new Set([
|
|
22
|
+
"actions",
|
|
23
|
+
"thought",
|
|
24
|
+
"text",
|
|
25
|
+
"simple",
|
|
26
|
+
"providers",
|
|
27
|
+
]);
|
|
28
|
+
function escapeRegex(value) {
|
|
29
|
+
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
30
|
+
}
|
|
31
|
+
function textContainsAgentName(text, names) {
|
|
32
|
+
if (!text) {
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
return names.some((name) => {
|
|
36
|
+
const candidate = name?.trim();
|
|
37
|
+
if (!candidate) {
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
const pattern = new RegExp(`(^|[^\\p{L}\\p{N}])${escapeRegex(candidate)}(?=$|[^\\p{L}\\p{N}])`, "iu");
|
|
41
|
+
return pattern.test(text);
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
function textContainsUserTag(text) {
|
|
45
|
+
if (!text) {
|
|
46
|
+
return false;
|
|
47
|
+
}
|
|
48
|
+
return /<@!?[^>]+>|@\w+/u.test(text);
|
|
49
|
+
}
|
|
50
|
+
const DEFAULT_DUAL_PRESSURE_THRESHOLD = 20;
|
|
51
|
+
const ALLOWED_CLASSIFIER_ACTIONS = new Set([
|
|
52
|
+
"REPLY",
|
|
53
|
+
"RESPOND",
|
|
54
|
+
"IGNORE",
|
|
55
|
+
"STOP",
|
|
56
|
+
]);
|
|
57
|
+
function resolveDualPressureThreshold(runtime) {
|
|
58
|
+
const raw = runtime.getSetting("DUAL_PRESSURE_THRESHOLD");
|
|
59
|
+
const value = Number.parseInt(String(raw ?? ""), 10);
|
|
60
|
+
if (Number.isFinite(value) && value >= 1 && value <= 100) {
|
|
61
|
+
return value;
|
|
62
|
+
}
|
|
63
|
+
return DEFAULT_DUAL_PRESSURE_THRESHOLD;
|
|
64
|
+
}
|
|
65
|
+
function parseOptionalPressureInt(value) {
|
|
66
|
+
if (typeof value === "number" && Number.isInteger(value)) {
|
|
67
|
+
return value >= 0 && value <= 100 ? value : null;
|
|
68
|
+
}
|
|
69
|
+
if (typeof value === "string" && value.trim() !== "") {
|
|
70
|
+
const parsed = Number.parseInt(value, 10);
|
|
71
|
+
return Number.isFinite(parsed) && parsed >= 0 && parsed <= 100
|
|
72
|
+
? parsed
|
|
73
|
+
: null;
|
|
74
|
+
}
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
function applyDualPressureToClassifierAction(runtime, responseObject, rawAction) {
|
|
78
|
+
const threshold = resolveDualPressureThreshold(runtime);
|
|
79
|
+
const actionUpper = rawAction.trim().toUpperCase();
|
|
80
|
+
const speakRaw = responseObject?.speak_up ?? responseObject?.speakUp;
|
|
81
|
+
const holdRaw = responseObject?.hold_back ?? responseObject?.holdBack;
|
|
82
|
+
const speakUp = parseOptionalPressureInt(speakRaw);
|
|
83
|
+
const holdBack = parseOptionalPressureInt(holdRaw);
|
|
84
|
+
if (speakUp === null || holdBack === null) {
|
|
85
|
+
runtime.logger.warn({
|
|
86
|
+
src: "service:message",
|
|
87
|
+
action: actionUpper,
|
|
88
|
+
speakUp: speakRaw,
|
|
89
|
+
holdBack: holdRaw,
|
|
90
|
+
}, "Classifier response missing valid dual-pressure scores; treating as IGNORE");
|
|
91
|
+
return { pressure: null, finalActionUpper: "IGNORE" };
|
|
92
|
+
}
|
|
93
|
+
const net = speakUp - holdBack;
|
|
94
|
+
const pressure = { speakUp, holdBack, net };
|
|
95
|
+
if (actionUpper === "STOP") {
|
|
96
|
+
return { pressure, finalActionUpper: "STOP" };
|
|
97
|
+
}
|
|
98
|
+
const isEngage = actionUpper === "REPLY" || actionUpper === "RESPOND";
|
|
99
|
+
if (net <= -threshold && isEngage) {
|
|
100
|
+
runtime.logger.warn({
|
|
101
|
+
src: "service:message",
|
|
102
|
+
net,
|
|
103
|
+
threshold,
|
|
104
|
+
originalAction: actionUpper,
|
|
105
|
+
speakUp,
|
|
106
|
+
holdBack,
|
|
107
|
+
}, "Dual pressure: net below threshold but model chose engage; clamping to IGNORE");
|
|
108
|
+
return { pressure, finalActionUpper: "IGNORE" };
|
|
109
|
+
}
|
|
110
|
+
if (net >= threshold && actionUpper === "IGNORE") {
|
|
111
|
+
runtime.logger.warn({
|
|
112
|
+
src: "service:message",
|
|
113
|
+
net,
|
|
114
|
+
threshold,
|
|
115
|
+
speakUp,
|
|
116
|
+
holdBack,
|
|
117
|
+
}, "Dual pressure: high net but IGNORE chosen; allowing model decision");
|
|
118
|
+
}
|
|
119
|
+
return { pressure, finalActionUpper: actionUpper };
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Extract action params from standalone XML blocks in a parsedXml object.
|
|
123
|
+
*
|
|
124
|
+
* When the LLM outputs `<actions>REPLY,START_CODING_TASK</actions>` alongside
|
|
125
|
+
* `<START_CODING_TASK><repo>...</repo></START_CODING_TASK>`, the XML parser
|
|
126
|
+
* puts the action block as a top-level key on parsedXml. This function finds
|
|
127
|
+
* those keys and assembles them into the legacy flat params format that
|
|
128
|
+
* `parseActionParams` consumes.
|
|
129
|
+
*
|
|
130
|
+
* Returns the assembled params string, or empty string if none found.
|
|
131
|
+
*/
|
|
132
|
+
export function extractStandaloneActionParams(actionNames, parsedXml) {
|
|
133
|
+
const fragments = [];
|
|
134
|
+
for (const actionName of actionNames) {
|
|
135
|
+
const upperName = actionName.toUpperCase();
|
|
136
|
+
const matchingKey = Object.keys(parsedXml).find((k) => k.toUpperCase() === upperName);
|
|
137
|
+
if (matchingKey &&
|
|
138
|
+
!RESERVED_XML_KEYS.has(matchingKey.toLowerCase()) &&
|
|
139
|
+
typeof parsedXml[matchingKey] === "string" &&
|
|
140
|
+
parsedXml[matchingKey].includes("<")) {
|
|
141
|
+
fragments.push(`<${upperName}>${parsedXml[matchingKey]}</${upperName}>`);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
return fragments.join("\n");
|
|
145
|
+
}
|
|
146
|
+
function normalizePlannerActions(parsedXml, runtime) {
|
|
147
|
+
const normalizedActions = (() => {
|
|
148
|
+
if (typeof parsedXml.actions === "string") {
|
|
149
|
+
const actionsXml = parsedXml.actions;
|
|
150
|
+
if (actionsXml.includes("<action>") || actionsXml.includes("<action ")) {
|
|
151
|
+
const actionEntries = [];
|
|
152
|
+
for (const match of actionsXml.matchAll(/<action>([\s\S]*?)<\/action>/g)) {
|
|
153
|
+
const inner = match[1];
|
|
154
|
+
const nameMatch = inner.match(/<name>([\s\S]*?)<\/name>/);
|
|
155
|
+
const paramsMatch = inner.match(/<params>([\s\S]*?)<\/params>/);
|
|
156
|
+
if (nameMatch) {
|
|
157
|
+
const name = nameMatch[1].trim();
|
|
158
|
+
const paramsXml = paramsMatch ? paramsMatch[1].trim() : undefined;
|
|
159
|
+
if (name)
|
|
160
|
+
actionEntries.push({ name, paramsXml });
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
if (actionEntries.length > 0) {
|
|
164
|
+
const inlineParamsXml = actionEntries
|
|
165
|
+
.filter((entry) => entry.paramsXml)
|
|
166
|
+
.map((entry) => `<${entry.name.toUpperCase()}>${entry.paramsXml}</${entry.name.toUpperCase()}>`)
|
|
167
|
+
.join("\n");
|
|
168
|
+
if (inlineParamsXml &&
|
|
169
|
+
(!parsedXml.params || parsedXml.params === "")) {
|
|
170
|
+
parsedXml.params = inlineParamsXml;
|
|
171
|
+
}
|
|
172
|
+
return actionEntries.map((entry) => entry.name);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
const commaSplitActions = actionsXml
|
|
176
|
+
.split(",")
|
|
177
|
+
.map((action) => String(action).trim())
|
|
178
|
+
.filter((action) => action.length > 0);
|
|
179
|
+
if (!parsedXml.params || parsedXml.params === "") {
|
|
180
|
+
const assembled = extractStandaloneActionParams(commaSplitActions, parsedXml);
|
|
181
|
+
if (assembled) {
|
|
182
|
+
parsedXml.params = assembled;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
return commaSplitActions;
|
|
186
|
+
}
|
|
187
|
+
if (Array.isArray(parsedXml.actions)) {
|
|
188
|
+
return parsedXml.actions
|
|
189
|
+
.map((action) => String(action).trim())
|
|
190
|
+
.filter((action) => action.length > 0);
|
|
191
|
+
}
|
|
192
|
+
return [];
|
|
193
|
+
})();
|
|
194
|
+
const finalActions = !runtime.isActionPlanningEnabled() && normalizedActions.length > 1
|
|
195
|
+
? [normalizedActions[0]]
|
|
196
|
+
: normalizedActions;
|
|
197
|
+
if (finalActions.length > 0) {
|
|
198
|
+
return finalActions;
|
|
199
|
+
}
|
|
200
|
+
const replyText = typeof parsedXml.text === "string" ? parsedXml.text.trim() : "";
|
|
201
|
+
return replyText.length > 0 ? ["REPLY"] : ["IGNORE"];
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Escape Handlebars syntax in a string to prevent template injection.
|
|
205
|
+
*
|
|
206
|
+
* WHY: When embedding LLM-generated text into continuation prompts, the text
|
|
207
|
+
* goes through Handlebars.compile(). If the LLM output contains {{variable}},
|
|
208
|
+
* Handlebars will try to substitute it with state values, corrupting the prompt.
|
|
209
|
+
*
|
|
210
|
+
* This function escapes {{ to \\{{ so Handlebars outputs literal {{.
|
|
211
|
+
*
|
|
212
|
+
* @param text - Text that may contain Handlebars-like syntax
|
|
213
|
+
* @returns Text with {{ escaped to prevent interpretation
|
|
214
|
+
*/
|
|
215
|
+
function escapeHandlebars(text) {
|
|
216
|
+
// Single-pass replacement to avoid double-escaping triple braces.
|
|
217
|
+
return text.replace(/\{\{\{|\{\{/g, (match) => `\\${match}`);
|
|
218
|
+
}
|
|
219
|
+
function sanitizeAttachmentsForStorage(attachments) {
|
|
220
|
+
if (!attachments?.length) {
|
|
221
|
+
return attachments;
|
|
222
|
+
}
|
|
223
|
+
return attachments.map((attachment) => {
|
|
224
|
+
const { _data: _discardData, _mimeType: _discardMimeType, ...rest } = attachment;
|
|
225
|
+
return rest;
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
function resolvePromptAttachments(attachments) {
|
|
229
|
+
if (!attachments?.length) {
|
|
230
|
+
return undefined;
|
|
231
|
+
}
|
|
232
|
+
const resolved = attachments.flatMap((attachment) => {
|
|
233
|
+
const withInlineData = attachment;
|
|
234
|
+
if (typeof withInlineData._data === "string" &&
|
|
235
|
+
withInlineData._data.trim() &&
|
|
236
|
+
typeof withInlineData._mimeType === "string" &&
|
|
237
|
+
withInlineData._mimeType.trim()) {
|
|
238
|
+
return [
|
|
239
|
+
{
|
|
240
|
+
data: withInlineData._data,
|
|
241
|
+
mediaType: withInlineData._mimeType,
|
|
242
|
+
filename: attachment.title,
|
|
243
|
+
},
|
|
244
|
+
];
|
|
245
|
+
}
|
|
246
|
+
const dataUrlMatch = attachment.url.match(/^data:([^;,]+);base64,(.+)$/i);
|
|
247
|
+
if (dataUrlMatch) {
|
|
248
|
+
return [
|
|
249
|
+
{
|
|
250
|
+
data: dataUrlMatch[2],
|
|
251
|
+
mediaType: dataUrlMatch[1],
|
|
252
|
+
filename: attachment.title,
|
|
253
|
+
},
|
|
254
|
+
];
|
|
255
|
+
}
|
|
256
|
+
return [];
|
|
257
|
+
});
|
|
258
|
+
return resolved.length > 0 ? resolved : undefined;
|
|
259
|
+
}
|
|
260
|
+
function normalizeShouldRespondModelType(value) {
|
|
261
|
+
if (typeof value !== "string") {
|
|
262
|
+
return "response-handler";
|
|
263
|
+
}
|
|
264
|
+
const normalized = value.trim().toLowerCase();
|
|
265
|
+
switch (normalized) {
|
|
266
|
+
case "nano":
|
|
267
|
+
case "text_nano":
|
|
268
|
+
return "nano";
|
|
269
|
+
case "small":
|
|
270
|
+
case "text_small":
|
|
271
|
+
return "small";
|
|
272
|
+
case "large":
|
|
273
|
+
case "text_large":
|
|
274
|
+
return "large";
|
|
275
|
+
case "mega":
|
|
276
|
+
case "text_mega":
|
|
277
|
+
return "mega";
|
|
278
|
+
case "response-handler":
|
|
279
|
+
case "response_handler":
|
|
280
|
+
case "responsehandler":
|
|
281
|
+
return "response-handler";
|
|
282
|
+
case "response_handler_model":
|
|
283
|
+
return "response-handler";
|
|
284
|
+
default:
|
|
285
|
+
return "response-handler";
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
function resolveShouldRespondModelType(model) {
|
|
289
|
+
switch (normalizeShouldRespondModelType(model)) {
|
|
290
|
+
case "nano":
|
|
291
|
+
return ModelType.TEXT_NANO;
|
|
292
|
+
case "small":
|
|
293
|
+
return ModelType.TEXT_SMALL;
|
|
294
|
+
case "large":
|
|
295
|
+
return ModelType.TEXT_LARGE;
|
|
296
|
+
case "mega":
|
|
297
|
+
return ModelType.TEXT_MEGA;
|
|
298
|
+
default:
|
|
299
|
+
return ModelType.RESPONSE_HANDLER;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* Tracks the latest response ID per agent+room to handle message superseding
|
|
304
|
+
*/
|
|
305
|
+
const latestResponseIds = new Map();
|
|
306
|
+
function clearLatestResponseId(agentId, roomId, responseId) {
|
|
307
|
+
const agentMap = latestResponseIds.get(agentId);
|
|
308
|
+
if (!agentMap) {
|
|
309
|
+
return;
|
|
310
|
+
}
|
|
311
|
+
if (agentMap.get(roomId) !== responseId) {
|
|
312
|
+
return;
|
|
313
|
+
}
|
|
314
|
+
agentMap.delete(roomId);
|
|
315
|
+
if (agentMap.size === 0) {
|
|
316
|
+
latestResponseIds.delete(agentId);
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
export function isSimpleReplyResponse(responseContent) {
|
|
320
|
+
return !!(responseContent?.actions &&
|
|
321
|
+
responseContent.actions.length === 1 &&
|
|
322
|
+
typeof responseContent.actions[0] === "string" &&
|
|
323
|
+
responseContent.actions[0].toUpperCase() === "REPLY");
|
|
324
|
+
}
|
|
325
|
+
function isStopResponse(responseContent) {
|
|
326
|
+
return !!(responseContent?.actions &&
|
|
327
|
+
responseContent.actions.length === 1 &&
|
|
328
|
+
typeof responseContent.actions[0] === "string" &&
|
|
329
|
+
responseContent.actions[0].toUpperCase() === "STOP");
|
|
330
|
+
}
|
|
331
|
+
function normalizeActionIdentifier(actionName) {
|
|
332
|
+
return actionName.trim().toUpperCase().replace(/_/g, "");
|
|
333
|
+
}
|
|
334
|
+
function buildRuntimeActionLookup(runtime) {
|
|
335
|
+
const actionMap = new Map();
|
|
336
|
+
for (const action of runtime.actions ?? []) {
|
|
337
|
+
const identifiers = [action.name, ...(action.similes ?? [])];
|
|
338
|
+
for (const identifier of identifiers) {
|
|
339
|
+
const normalized = normalizeActionIdentifier(identifier);
|
|
340
|
+
if (!normalized || actionMap.has(normalized)) {
|
|
341
|
+
continue;
|
|
342
|
+
}
|
|
343
|
+
actionMap.set(normalized, action);
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
return actionMap;
|
|
347
|
+
}
|
|
348
|
+
function resolveRuntimeAction(actionLookup, actionName) {
|
|
349
|
+
const normalized = normalizeActionIdentifier(actionName);
|
|
350
|
+
if (!normalized) {
|
|
351
|
+
return undefined;
|
|
352
|
+
}
|
|
353
|
+
return actionLookup.get(normalized);
|
|
354
|
+
}
|
|
355
|
+
const TERMINAL_ACTION_IDENTIFIERS = new Set([
|
|
356
|
+
"REPLY",
|
|
357
|
+
"IGNORE",
|
|
358
|
+
"STOP",
|
|
359
|
+
"CREATE_TASK",
|
|
360
|
+
"START_CODING_TASK",
|
|
361
|
+
"CODE_TASK",
|
|
362
|
+
"SPAWN_AGENT",
|
|
363
|
+
"SPAWN_CODING_AGENT",
|
|
364
|
+
].map(normalizeActionIdentifier));
|
|
365
|
+
function shouldContinueAfterActions(runtime, responseContent) {
|
|
366
|
+
// Async background/task actions handle their own follow-up and should not
|
|
367
|
+
// trigger an immediate continuation loop from the main message service.
|
|
368
|
+
const actionLookup = buildRuntimeActionLookup(runtime);
|
|
369
|
+
return !!responseContent?.actions?.some((action) => {
|
|
370
|
+
if (typeof action !== "string")
|
|
371
|
+
return false;
|
|
372
|
+
const resolvedAction = resolveRuntimeAction(actionLookup, action);
|
|
373
|
+
if (resolvedAction?.suppressPostActionContinuation) {
|
|
374
|
+
return false;
|
|
375
|
+
}
|
|
376
|
+
const canonicalAction = resolvedAction?.name ?? action;
|
|
377
|
+
return !TERMINAL_ACTION_IDENTIFIERS.has(normalizeActionIdentifier(canonicalAction));
|
|
378
|
+
});
|
|
379
|
+
}
|
|
380
|
+
function suppressesPostActionContinuation(runtime, responseContent) {
|
|
381
|
+
if (!responseContent?.actions?.length) {
|
|
382
|
+
return false;
|
|
383
|
+
}
|
|
384
|
+
const actionLookup = buildRuntimeActionLookup(runtime);
|
|
385
|
+
return responseContent.actions.some((action) => {
|
|
386
|
+
if (typeof action !== "string")
|
|
387
|
+
return false;
|
|
388
|
+
return (resolveRuntimeAction(actionLookup, action)
|
|
389
|
+
?.suppressPostActionContinuation === true);
|
|
390
|
+
});
|
|
391
|
+
}
|
|
392
|
+
function stripPlannerReplyForSuppressiveActions(runtime, responseContent) {
|
|
393
|
+
if (!responseContent?.actions?.length) {
|
|
394
|
+
return;
|
|
395
|
+
}
|
|
396
|
+
if (!suppressesPostActionContinuation(runtime, responseContent)) {
|
|
397
|
+
return;
|
|
398
|
+
}
|
|
399
|
+
const actionLookup = buildRuntimeActionLookup(runtime);
|
|
400
|
+
const filteredActions = responseContent.actions.filter((action) => {
|
|
401
|
+
if (typeof action !== "string")
|
|
402
|
+
return true;
|
|
403
|
+
const canonicalAction = resolveRuntimeAction(actionLookup, action)?.name ?? action;
|
|
404
|
+
return (normalizeActionIdentifier(canonicalAction) !==
|
|
405
|
+
normalizeActionIdentifier("REPLY"));
|
|
406
|
+
});
|
|
407
|
+
if (filteredActions.length > 0) {
|
|
408
|
+
responseContent.actions = filteredActions;
|
|
409
|
+
}
|
|
410
|
+
if (typeof responseContent.text === "string" && responseContent.text.trim()) {
|
|
411
|
+
responseContent.text = "";
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
function callbackTextPreview(content) {
|
|
415
|
+
if (!content || typeof content !== "object") {
|
|
416
|
+
return "";
|
|
417
|
+
}
|
|
418
|
+
const text = typeof content.text === "string" ? content.text.trim() : "";
|
|
419
|
+
if (!text) {
|
|
420
|
+
return "";
|
|
421
|
+
}
|
|
422
|
+
return text.replace(/\s+/g, " ").slice(0, 200);
|
|
423
|
+
}
|
|
424
|
+
function summarizeAttachmentKeyPart(url) {
|
|
425
|
+
const trimmed = url.trim();
|
|
426
|
+
if (trimmed.length <= 256) {
|
|
427
|
+
return trimmed;
|
|
428
|
+
}
|
|
429
|
+
return `${trimmed.slice(0, 128)}...(${trimmed.length})`;
|
|
430
|
+
}
|
|
431
|
+
function callbackDeliveryKey(content) {
|
|
432
|
+
if (!content || typeof content !== "object") {
|
|
433
|
+
return "";
|
|
434
|
+
}
|
|
435
|
+
const text = typeof content.text === "string"
|
|
436
|
+
? content.text.replace(/\s+/g, " ").trim()
|
|
437
|
+
: "";
|
|
438
|
+
const attachmentKeys = Array.isArray(content.attachments)
|
|
439
|
+
? content.attachments
|
|
440
|
+
.map((attachment) => {
|
|
441
|
+
if (!attachment || typeof attachment !== "object") {
|
|
442
|
+
return "";
|
|
443
|
+
}
|
|
444
|
+
const url = typeof attachment.url === "string"
|
|
445
|
+
? summarizeAttachmentKeyPart(attachment.url)
|
|
446
|
+
: "";
|
|
447
|
+
const title = typeof attachment.title === "string" ? attachment.title.trim() : "";
|
|
448
|
+
const contentType = typeof attachment.contentType === "string"
|
|
449
|
+
? attachment.contentType
|
|
450
|
+
: "";
|
|
451
|
+
if (!url && !title && !contentType) {
|
|
452
|
+
return "";
|
|
453
|
+
}
|
|
454
|
+
return `${contentType}:${title}:${url}`;
|
|
455
|
+
})
|
|
456
|
+
.filter((key) => key.length > 0)
|
|
457
|
+
.sort()
|
|
458
|
+
: [];
|
|
459
|
+
if (!text && attachmentKeys.length === 0) {
|
|
460
|
+
return "";
|
|
461
|
+
}
|
|
462
|
+
return JSON.stringify({
|
|
463
|
+
text,
|
|
464
|
+
attachments: attachmentKeys,
|
|
465
|
+
});
|
|
466
|
+
}
|
|
467
|
+
function getLatestVisibleReplyText(responseContent, actionResults) {
|
|
468
|
+
for (let index = actionResults.length - 1; index >= 0; index--) {
|
|
469
|
+
const result = actionResults[index];
|
|
470
|
+
const actionName = typeof result?.data?.actionName === "string"
|
|
471
|
+
? result.data.actionName
|
|
472
|
+
: "";
|
|
473
|
+
if (normalizeActionIdentifier(actionName) !== "REPLY") {
|
|
474
|
+
continue;
|
|
475
|
+
}
|
|
476
|
+
if (typeof result.text === "string" && result.text.trim().length > 0) {
|
|
477
|
+
return result.text.trim();
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
const responseText = typeof responseContent?.text === "string"
|
|
481
|
+
? responseContent.text.trim()
|
|
482
|
+
: "";
|
|
483
|
+
return responseText;
|
|
484
|
+
}
|
|
485
|
+
function isLikelyClarifyingQuestion(text) {
|
|
486
|
+
const normalized = text.trim();
|
|
487
|
+
if (!normalized) {
|
|
488
|
+
return false;
|
|
489
|
+
}
|
|
490
|
+
if (/[?؟]\s*$/.test(normalized)) {
|
|
491
|
+
return true;
|
|
492
|
+
}
|
|
493
|
+
const firstSentence = extractFirstSentence(normalized)
|
|
494
|
+
.first.trim()
|
|
495
|
+
.toLowerCase();
|
|
496
|
+
return /^(what|which|when|where|who|whom|whose|why|how|can you|could you|would you|will you|do you|did you|are you|is it|should i|should we)\b/.test(firstSentence);
|
|
497
|
+
}
|
|
498
|
+
function shouldWaitForUserAfterIncompleteReflection(responseContent, actionResults) {
|
|
499
|
+
const latestVisibleReply = getLatestVisibleReplyText(responseContent, actionResults);
|
|
500
|
+
if (!isLikelyClarifyingQuestion(latestVisibleReply)) {
|
|
501
|
+
return false;
|
|
502
|
+
}
|
|
503
|
+
if (actionResults.length === 0) {
|
|
504
|
+
return isSimpleReplyResponse(responseContent);
|
|
505
|
+
}
|
|
506
|
+
return actionResults.every((result) => {
|
|
507
|
+
const actionName = typeof result?.data?.actionName === "string"
|
|
508
|
+
? result.data.actionName
|
|
509
|
+
: "";
|
|
510
|
+
return normalizeActionIdentifier(actionName) === "REPLY";
|
|
511
|
+
});
|
|
512
|
+
}
|
|
513
|
+
function formatActionResultsForPrompt(actionResults) {
|
|
514
|
+
if (actionResults.length === 0) {
|
|
515
|
+
return "No action results available.";
|
|
516
|
+
}
|
|
517
|
+
return [
|
|
518
|
+
"# Action Results",
|
|
519
|
+
...actionResults.map((result, index) => {
|
|
520
|
+
const actionNameValue = result.data?.actionName;
|
|
521
|
+
const actionName = typeof actionNameValue === "string"
|
|
522
|
+
? actionNameValue
|
|
523
|
+
: "Unknown Action";
|
|
524
|
+
const lines = [
|
|
525
|
+
`${index + 1}. ${actionName} - ${result.success === false ? "failed" : "succeeded"}`,
|
|
526
|
+
];
|
|
527
|
+
if (typeof result.text === "string" && result.text.trim()) {
|
|
528
|
+
lines.push(`Output: ${result.text.trim().slice(0, 2000)}`);
|
|
529
|
+
}
|
|
530
|
+
if (result.error) {
|
|
531
|
+
const errorText = result.error instanceof Error
|
|
532
|
+
? result.error.message
|
|
533
|
+
: String(result.error);
|
|
534
|
+
lines.push(`Error: ${errorText.slice(0, 1000)}`);
|
|
535
|
+
}
|
|
536
|
+
return lines.join("\n");
|
|
537
|
+
}),
|
|
538
|
+
].join("\n\n");
|
|
539
|
+
}
|
|
540
|
+
function withActionResults(state, actionResults) {
|
|
541
|
+
return {
|
|
542
|
+
...state,
|
|
543
|
+
values: {
|
|
544
|
+
...state.values,
|
|
545
|
+
actionResults: formatActionResultsForPrompt(actionResults),
|
|
546
|
+
},
|
|
547
|
+
data: {
|
|
548
|
+
...state.data,
|
|
549
|
+
actionResults,
|
|
550
|
+
},
|
|
551
|
+
};
|
|
552
|
+
}
|
|
553
|
+
function withTaskCompletion(state, taskCompletion) {
|
|
554
|
+
if (!taskCompletion) {
|
|
555
|
+
return state;
|
|
556
|
+
}
|
|
557
|
+
return {
|
|
558
|
+
...state,
|
|
559
|
+
values: {
|
|
560
|
+
...state.values,
|
|
561
|
+
taskCompletionStatus: formatTaskCompletionStatus(taskCompletion),
|
|
562
|
+
taskCompleted: taskCompletion.completed,
|
|
563
|
+
taskCompletionAssessed: taskCompletion.assessed,
|
|
564
|
+
taskCompletionReason: taskCompletion.reason,
|
|
565
|
+
},
|
|
566
|
+
data: {
|
|
567
|
+
...state.data,
|
|
568
|
+
taskCompletion,
|
|
569
|
+
},
|
|
570
|
+
};
|
|
571
|
+
}
|
|
572
|
+
function getStructuredOutputFailure(state) {
|
|
573
|
+
const candidate = state.data?.structuredOutputFailure;
|
|
574
|
+
if (!candidate || typeof candidate !== "object") {
|
|
575
|
+
return null;
|
|
576
|
+
}
|
|
577
|
+
return candidate;
|
|
578
|
+
}
|
|
579
|
+
function summarizeStructuredOutputFailure(failure) {
|
|
580
|
+
if (!failure) {
|
|
581
|
+
return "Structured output parsing failed, but no additional diagnostics were recorded.";
|
|
582
|
+
}
|
|
583
|
+
const parts = [
|
|
584
|
+
`Kind: ${failure.kind}`,
|
|
585
|
+
`Model: ${failure.model}`,
|
|
586
|
+
`Format: ${failure.format}`,
|
|
587
|
+
`Attempts: ${failure.attempts}/${failure.maxRetries + 1}`,
|
|
588
|
+
];
|
|
589
|
+
if (failure.key) {
|
|
590
|
+
parts.push(`Key: ${failure.key}`);
|
|
591
|
+
}
|
|
592
|
+
if (failure.parseError) {
|
|
593
|
+
parts.push(`Error: ${failure.parseError}`);
|
|
594
|
+
}
|
|
595
|
+
if (failure.issues && failure.issues.length > 0) {
|
|
596
|
+
parts.push(`Issues: ${failure.issues.join(" | ")}`);
|
|
597
|
+
}
|
|
598
|
+
if (failure.responsePreview) {
|
|
599
|
+
parts.push(`Response Preview:\n${failure.responsePreview}`);
|
|
600
|
+
}
|
|
601
|
+
return parts.join("\n");
|
|
602
|
+
}
|
|
603
|
+
function summarizeActionResultsForUser(actionResults) {
|
|
604
|
+
if (actionResults.length === 0) {
|
|
605
|
+
return "";
|
|
606
|
+
}
|
|
607
|
+
const summary = actionResults
|
|
608
|
+
.slice(-3)
|
|
609
|
+
.map((result) => {
|
|
610
|
+
const actionName = typeof result.data?.actionName === "string"
|
|
611
|
+
? result.data.actionName
|
|
612
|
+
: "unknown action";
|
|
613
|
+
return `${actionName} (${result.success === false ? "failed" : "succeeded"})`;
|
|
614
|
+
})
|
|
615
|
+
.join(", ");
|
|
616
|
+
return `Completed action state before the error: ${summary}.`;
|
|
617
|
+
}
|
|
618
|
+
function withContextRoutingValues(state, contextRoutingStateValues) {
|
|
619
|
+
if (!contextRoutingStateValues) {
|
|
620
|
+
return state;
|
|
621
|
+
}
|
|
622
|
+
const mergedStateValues = {
|
|
623
|
+
...state.values,
|
|
624
|
+
};
|
|
625
|
+
if (contextRoutingStateValues[AVAILABLE_CONTEXTS_STATE_KEY] !== undefined) {
|
|
626
|
+
mergedStateValues[AVAILABLE_CONTEXTS_STATE_KEY] = contextRoutingStateValues[AVAILABLE_CONTEXTS_STATE_KEY];
|
|
627
|
+
}
|
|
628
|
+
if (contextRoutingStateValues[CONTEXT_ROUTING_STATE_KEY] !== undefined) {
|
|
629
|
+
mergedStateValues[CONTEXT_ROUTING_STATE_KEY] = contextRoutingStateValues[CONTEXT_ROUTING_STATE_KEY];
|
|
630
|
+
}
|
|
631
|
+
return {
|
|
632
|
+
...state,
|
|
633
|
+
values: mergedStateValues,
|
|
634
|
+
};
|
|
635
|
+
}
|
|
636
|
+
async function composeContinuationDecisionState(runtime, message, contextRoutingStateValues) {
|
|
637
|
+
// Continuation prompts run after the runtime has already persisted an
|
|
638
|
+
// assistant reply and/or action_result memories. Refresh RECENT_MESSAGES so
|
|
639
|
+
// the follow-up planner does not reuse stale conversation history cached on
|
|
640
|
+
// the original user turn.
|
|
641
|
+
return withContextRoutingValues(await runtime.composeState(message, ["RECENT_MESSAGES", "ACTIONS"], false, false), contextRoutingStateValues);
|
|
642
|
+
}
|
|
643
|
+
function withoutProviders(state, providerNamesToOmit) {
|
|
644
|
+
if (providerNamesToOmit.length === 0) {
|
|
645
|
+
return state;
|
|
646
|
+
}
|
|
647
|
+
const omittedProviderNames = new Set(providerNamesToOmit.map((providerName) => providerName.trim().toUpperCase()));
|
|
648
|
+
const providerResults = typeof state.data?.providers === "object" && state.data?.providers !== null
|
|
649
|
+
? state.data.providers
|
|
650
|
+
: {};
|
|
651
|
+
const providerOrder = Array.isArray(state.data?.providerOrder)
|
|
652
|
+
? state.data.providerOrder
|
|
653
|
+
: Object.keys(providerResults);
|
|
654
|
+
const filteredProviderOrder = providerOrder.filter((providerName) => !omittedProviderNames.has(providerName.toUpperCase()));
|
|
655
|
+
const filteredProviderResults = Object.fromEntries(Object.entries(providerResults).filter(([providerName]) => !omittedProviderNames.has(providerName.trim().toUpperCase())));
|
|
656
|
+
const filteredProvidersText = filteredProviderOrder
|
|
657
|
+
.map((providerName) => filteredProviderResults[providerName]?.text)
|
|
658
|
+
.filter((text) => typeof text === "string" && text.trim() !== "")
|
|
659
|
+
.join("\n");
|
|
660
|
+
return {
|
|
661
|
+
...state,
|
|
662
|
+
values: {
|
|
663
|
+
...state.values,
|
|
664
|
+
providers: filteredProvidersText,
|
|
665
|
+
},
|
|
666
|
+
data: {
|
|
667
|
+
...state.data,
|
|
668
|
+
providerOrder: filteredProviderOrder,
|
|
669
|
+
providers: filteredProviderResults,
|
|
670
|
+
},
|
|
671
|
+
text: filteredProvidersText,
|
|
672
|
+
};
|
|
673
|
+
}
|
|
674
|
+
function buildShouldRespondCharacterText(providerResult) {
|
|
675
|
+
if (!providerResult) {
|
|
676
|
+
return "";
|
|
677
|
+
}
|
|
678
|
+
const values = typeof providerResult.values === "object" && providerResult.values !== null
|
|
679
|
+
? providerResult.values
|
|
680
|
+
: {};
|
|
681
|
+
const bio = typeof values.bio === "string" ? values.bio : "";
|
|
682
|
+
const directions = typeof values.directions === "string" ? values.directions : "";
|
|
683
|
+
const system = typeof values.system === "string" ? values.system : "";
|
|
684
|
+
const classifierText = [bio, directions, system]
|
|
685
|
+
.filter((section) => section.trim().length > 0)
|
|
686
|
+
.join("\n\n");
|
|
687
|
+
return (classifierText ||
|
|
688
|
+
(typeof providerResult.text === "string" ? providerResult.text : ""));
|
|
689
|
+
}
|
|
690
|
+
function prepareShouldRespondState(state) {
|
|
691
|
+
const stateWithoutActions = withoutProviders(state, ["ACTIONS"]);
|
|
692
|
+
const providerResults = typeof stateWithoutActions.data?.providers === "object" &&
|
|
693
|
+
stateWithoutActions.data?.providers !== null
|
|
694
|
+
? {
|
|
695
|
+
...stateWithoutActions.data.providers,
|
|
696
|
+
}
|
|
697
|
+
: null;
|
|
698
|
+
if (!providerResults?.CHARACTER) {
|
|
699
|
+
return stateWithoutActions;
|
|
700
|
+
}
|
|
701
|
+
providerResults.CHARACTER = {
|
|
702
|
+
...providerResults.CHARACTER,
|
|
703
|
+
text: buildShouldRespondCharacterText(providerResults.CHARACTER),
|
|
704
|
+
};
|
|
705
|
+
const providerOrder = Array.isArray(stateWithoutActions.data?.providerOrder)
|
|
706
|
+
? stateWithoutActions.data.providerOrder
|
|
707
|
+
: Object.keys(providerResults);
|
|
708
|
+
const providersText = providerOrder
|
|
709
|
+
.map((providerName) => providerResults[providerName]?.text)
|
|
710
|
+
.filter((text) => typeof text === "string" && text.trim() !== "")
|
|
711
|
+
.join("\n");
|
|
712
|
+
return {
|
|
713
|
+
...stateWithoutActions,
|
|
714
|
+
values: {
|
|
715
|
+
...stateWithoutActions.values,
|
|
716
|
+
providers: providersText,
|
|
717
|
+
},
|
|
718
|
+
data: {
|
|
719
|
+
...stateWithoutActions.data,
|
|
720
|
+
providers: providerResults,
|
|
721
|
+
},
|
|
722
|
+
text: providersText,
|
|
723
|
+
};
|
|
724
|
+
}
|
|
725
|
+
/**
|
|
726
|
+
* Default implementation of the MessageService interface.
|
|
727
|
+
* This service handles the complete message processing pipeline including:
|
|
728
|
+
* - Message validation and memory creation
|
|
729
|
+
* - Smart response decision (shouldRespond)
|
|
730
|
+
* - Single-shot or multi-step processing strategies
|
|
731
|
+
* - Action execution and evaluation
|
|
732
|
+
* - Attachment processing
|
|
733
|
+
* - Message deletion and channel clearing
|
|
734
|
+
*
|
|
735
|
+
* This is the standard message handler used by elizaOS and can be replaced
|
|
736
|
+
* with custom implementations via the IMessageService interface.
|
|
737
|
+
*/
|
|
738
|
+
export class DefaultMessageService {
|
|
739
|
+
/**
|
|
740
|
+
* Main message handling entry point
|
|
741
|
+
*/
|
|
742
|
+
async handleMessage(runtime, message, callback, options) {
|
|
743
|
+
const source = typeof message.content?.source === "string" &&
|
|
744
|
+
message.content.source.trim() !== ""
|
|
745
|
+
? message.content.source
|
|
746
|
+
: "messageService";
|
|
747
|
+
let trajectoryStepId = typeof message.metadata === "object" &&
|
|
748
|
+
message.metadata !== null &&
|
|
749
|
+
"trajectoryStepId" in message.metadata
|
|
750
|
+
? message.metadata.trajectoryStepId
|
|
751
|
+
: undefined;
|
|
752
|
+
if (!(typeof trajectoryStepId === "string" && trajectoryStepId.trim() !== "")) {
|
|
753
|
+
try {
|
|
754
|
+
await runtime.emitEvent(EventType.MESSAGE_RECEIVED, {
|
|
755
|
+
runtime,
|
|
756
|
+
message,
|
|
757
|
+
callback,
|
|
758
|
+
source,
|
|
759
|
+
});
|
|
760
|
+
}
|
|
761
|
+
catch (error) {
|
|
762
|
+
runtime.logger.warn({
|
|
763
|
+
src: "service:message",
|
|
764
|
+
agentId: runtime.agentId,
|
|
765
|
+
entityId: message.entityId,
|
|
766
|
+
roomId: message.roomId,
|
|
767
|
+
error: error instanceof Error ? error.message : String(error),
|
|
768
|
+
}, "Failed to emit MESSAGE_RECEIVED before handling message");
|
|
769
|
+
}
|
|
770
|
+
trajectoryStepId =
|
|
771
|
+
typeof message.metadata === "object" &&
|
|
772
|
+
message.metadata !== null &&
|
|
773
|
+
"trajectoryStepId" in message.metadata
|
|
774
|
+
? message.metadata.trajectoryStepId
|
|
775
|
+
: undefined;
|
|
776
|
+
}
|
|
777
|
+
return await runWithTrajectoryContext(typeof trajectoryStepId === "string" && trajectoryStepId.trim() !== ""
|
|
778
|
+
? { trajectoryStepId: trajectoryStepId.trim() }
|
|
779
|
+
: undefined, async () => {
|
|
780
|
+
// Determine shouldRespondModel from options or runtime settings
|
|
781
|
+
const shouldRespondModelSetting = runtime.getSetting("SHOULD_RESPOND_MODEL");
|
|
782
|
+
const resolvedShouldRespondModel = normalizeShouldRespondModelType(options?.shouldRespondModel ?? shouldRespondModelSetting);
|
|
783
|
+
// WHY voice detection wraps onStreamChunk here instead of using a
|
|
784
|
+
// separate ResponseStreamExtractor + AsyncLocalStorage context:
|
|
785
|
+
//
|
|
786
|
+
// Previously handleMessage created a second XML extractor
|
|
787
|
+
// (ResponseStreamExtractor) and injected it via runWithStreamingContext.
|
|
788
|
+
// Both extractors received the same raw LLM tokens in useModel and
|
|
789
|
+
// emitted independently, causing the dual-extractor garbling bug —
|
|
790
|
+
// consumers saw overlapping deltas that produced unintelligible TTS.
|
|
791
|
+
//
|
|
792
|
+
// The fix: a single extractor (ValidationStreamExtractor in
|
|
793
|
+
// dynamicPromptExecFromState) now provides `accumulated` — the full
|
|
794
|
+
// extracted text — via the third StreamChunkCallback argument. Voice
|
|
795
|
+
// detection wraps the caller's callback to intercept accumulated text
|
|
796
|
+
// for first-sentence detection, then forwards to the original. This
|
|
797
|
+
// keeps voice logic in handleMessage (encapsulation) without adding a
|
|
798
|
+
// second extraction pipeline.
|
|
799
|
+
//
|
|
800
|
+
// The `streamTextFallback` path exists for action handlers or other
|
|
801
|
+
// call sites that don't provide `accumulated` (raw token streams).
|
|
802
|
+
let firstSentenceSent = false;
|
|
803
|
+
let streamTextFallback = "";
|
|
804
|
+
const userOnStreamChunk = options?.onStreamChunk;
|
|
805
|
+
const wrappedOnStreamChunk = userOnStreamChunk
|
|
806
|
+
? async (chunk, messageId, accumulated) => {
|
|
807
|
+
let streamText;
|
|
808
|
+
// If we have accumulated text, also sync streamTextFallback so the
|
|
809
|
+
// fallback path has accurate state if the stream source later changes.
|
|
810
|
+
if (accumulated !== undefined) {
|
|
811
|
+
streamTextFallback = accumulated;
|
|
812
|
+
streamText = accumulated;
|
|
813
|
+
}
|
|
814
|
+
else {
|
|
815
|
+
streamTextFallback += chunk;
|
|
816
|
+
streamText = streamTextFallback;
|
|
817
|
+
}
|
|
818
|
+
// Only run first-sentence TTS detection when `accumulated` is present.
|
|
819
|
+
// Raw-token streams (no accumulated) may contain XML markup or partial
|
|
820
|
+
// structured output that would garble hasFirstSentence() and TTS.
|
|
821
|
+
if (!firstSentenceSent &&
|
|
822
|
+
accumulated !== undefined &&
|
|
823
|
+
hasFirstSentence(streamText)) {
|
|
824
|
+
const { first } = extractFirstSentence(streamText);
|
|
825
|
+
if (first.length > 5) {
|
|
826
|
+
firstSentenceSent = true;
|
|
827
|
+
(async () => {
|
|
828
|
+
try {
|
|
829
|
+
const voiceSettings = runtime.character.settings
|
|
830
|
+
?.voice;
|
|
831
|
+
const model = voiceSettings?.model || "en_US-male-medium";
|
|
832
|
+
const voiceId = voiceSettings?.url ||
|
|
833
|
+
voiceSettings?.voiceId ||
|
|
834
|
+
"nova";
|
|
835
|
+
let audioBuffer = null;
|
|
836
|
+
const params = {
|
|
837
|
+
text: first,
|
|
838
|
+
voice: voiceId,
|
|
839
|
+
model: model,
|
|
840
|
+
};
|
|
841
|
+
const result = runtime.getModel(ModelType.TEXT_TO_SPEECH)
|
|
842
|
+
? await runtime.useModel(ModelType.TEXT_TO_SPEECH, params)
|
|
843
|
+
: undefined;
|
|
844
|
+
if (result instanceof ArrayBuffer ||
|
|
845
|
+
Object.prototype.toString.call(result) ===
|
|
846
|
+
"[object ArrayBuffer]") {
|
|
847
|
+
audioBuffer = Buffer.from(result);
|
|
848
|
+
}
|
|
849
|
+
else if (Buffer.isBuffer(result)) {
|
|
850
|
+
audioBuffer = result;
|
|
851
|
+
}
|
|
852
|
+
else if (result instanceof Uint8Array) {
|
|
853
|
+
audioBuffer = Buffer.from(result);
|
|
854
|
+
}
|
|
855
|
+
if (audioBuffer && callback) {
|
|
856
|
+
const audioBase64 = audioBuffer.toString("base64");
|
|
857
|
+
await callback({
|
|
858
|
+
text: "",
|
|
859
|
+
attachments: [
|
|
860
|
+
{
|
|
861
|
+
id: v4(),
|
|
862
|
+
url: `data:audio/wav;base64,${audioBase64}`,
|
|
863
|
+
title: "Voice Response",
|
|
864
|
+
source: "voice-cache",
|
|
865
|
+
description: "Voice response for first sentence",
|
|
866
|
+
text: first,
|
|
867
|
+
contentType: ContentType.AUDIO,
|
|
868
|
+
},
|
|
869
|
+
],
|
|
870
|
+
source: "voice",
|
|
871
|
+
});
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
catch (error) {
|
|
875
|
+
runtime.logger.error({ error }, "Error generating voice for first sentence");
|
|
876
|
+
}
|
|
877
|
+
})();
|
|
878
|
+
}
|
|
879
|
+
}
|
|
880
|
+
await userOnStreamChunk(chunk, messageId, accumulated);
|
|
881
|
+
}
|
|
882
|
+
: undefined;
|
|
883
|
+
const opts = {
|
|
884
|
+
maxRetries: options?.maxRetries ?? 3,
|
|
885
|
+
timeoutDuration: options?.timeoutDuration ?? 60 * 60 * 1000, // 1 hour
|
|
886
|
+
useMultiStep: options?.useMultiStep ??
|
|
887
|
+
parseBooleanFromText(String(runtime.getSetting("USE_MULTI_STEP") ?? "")),
|
|
888
|
+
maxMultiStepIterations: options?.maxMultiStepIterations ??
|
|
889
|
+
parseInt(String(runtime.getSetting("MAX_MULTISTEP_ITERATIONS") ?? "6"), 10),
|
|
890
|
+
continueAfterActions: options?.continueAfterActions ??
|
|
891
|
+
parseBooleanFromText(String(runtime.getSetting("CONTINUE_AFTER_ACTIONS") ?? "true")),
|
|
892
|
+
onStreamChunk: wrappedOnStreamChunk,
|
|
893
|
+
keepExistingResponses: options?.keepExistingResponses ??
|
|
894
|
+
parseBooleanFromText(String(runtime.getSetting("BASIC_CAPABILITIES_KEEP_RESP") ?? "")),
|
|
895
|
+
shouldRespondModel: resolvedShouldRespondModel,
|
|
896
|
+
};
|
|
897
|
+
let visibleCallbackCount = 0;
|
|
898
|
+
let firstVisibleCallbackPreview = "";
|
|
899
|
+
const deliveredCallbackKeys = new Set();
|
|
900
|
+
const instrumentedCallback = callback
|
|
901
|
+
? async (content, actionName) => {
|
|
902
|
+
const deliveryKey = callbackDeliveryKey(content);
|
|
903
|
+
const preview = callbackTextPreview(content);
|
|
904
|
+
if (deliveryKey && deliveredCallbackKeys.has(deliveryKey)) {
|
|
905
|
+
runtime.logger.warn({
|
|
906
|
+
src: "service:message",
|
|
907
|
+
agentId: runtime.agentId,
|
|
908
|
+
messageId: message.id,
|
|
909
|
+
roomId: message.roomId,
|
|
910
|
+
action: typeof content?.action ===
|
|
911
|
+
"string"
|
|
912
|
+
? String(content.action)
|
|
913
|
+
: actionName,
|
|
914
|
+
source: typeof content.source === "string"
|
|
915
|
+
? content.source
|
|
916
|
+
: undefined,
|
|
917
|
+
preview: preview ||
|
|
918
|
+
(Array.isArray(content.attachments) &&
|
|
919
|
+
content.attachments.length > 0
|
|
920
|
+
? `[attachments:${content.attachments.length}]`
|
|
921
|
+
: ""),
|
|
922
|
+
}, "Suppressing duplicate visible callback reply emitted for a single turn");
|
|
923
|
+
return [];
|
|
924
|
+
}
|
|
925
|
+
if (deliveryKey) {
|
|
926
|
+
deliveredCallbackKeys.add(deliveryKey);
|
|
927
|
+
}
|
|
928
|
+
if (preview) {
|
|
929
|
+
visibleCallbackCount += 1;
|
|
930
|
+
if (visibleCallbackCount === 1) {
|
|
931
|
+
firstVisibleCallbackPreview = preview;
|
|
932
|
+
}
|
|
933
|
+
else {
|
|
934
|
+
runtime.logger.warn({
|
|
935
|
+
src: "service:message",
|
|
936
|
+
agentId: runtime.agentId,
|
|
937
|
+
messageId: message.id,
|
|
938
|
+
roomId: message.roomId,
|
|
939
|
+
callbackCount: visibleCallbackCount,
|
|
940
|
+
action: typeof content?.action ===
|
|
941
|
+
"string"
|
|
942
|
+
? String(content.action)
|
|
943
|
+
: actionName,
|
|
944
|
+
source: typeof content.source === "string"
|
|
945
|
+
? content.source
|
|
946
|
+
: undefined,
|
|
947
|
+
firstPreview: firstVisibleCallbackPreview,
|
|
948
|
+
currentPreview: preview,
|
|
949
|
+
}, "Multiple visible callback replies emitted for a single turn");
|
|
950
|
+
}
|
|
951
|
+
}
|
|
952
|
+
return actionName === undefined
|
|
953
|
+
? callback(content)
|
|
954
|
+
: callback(content, actionName);
|
|
955
|
+
}
|
|
956
|
+
: undefined;
|
|
957
|
+
// Set up timeout monitoring
|
|
958
|
+
let timeoutId;
|
|
959
|
+
// Single ID used for tracking, streaming, and the final message
|
|
960
|
+
const responseId = asUUID(v4());
|
|
961
|
+
try {
|
|
962
|
+
runtime.logger.info({
|
|
963
|
+
src: "service:message",
|
|
964
|
+
agentId: runtime.agentId,
|
|
965
|
+
entityId: message.entityId,
|
|
966
|
+
roomId: message.roomId,
|
|
967
|
+
}, "Message received");
|
|
968
|
+
// Track this response ID - ensure map exists for this agent
|
|
969
|
+
let agentResponses = latestResponseIds.get(runtime.agentId);
|
|
970
|
+
if (!agentResponses) {
|
|
971
|
+
agentResponses = new Map();
|
|
972
|
+
latestResponseIds.set(runtime.agentId, agentResponses);
|
|
973
|
+
}
|
|
974
|
+
const previousResponseId = agentResponses.get(message.roomId);
|
|
975
|
+
if (previousResponseId) {
|
|
976
|
+
logger.debug({
|
|
977
|
+
src: "service:message",
|
|
978
|
+
roomId: message.roomId,
|
|
979
|
+
previousResponseId,
|
|
980
|
+
responseId,
|
|
981
|
+
}, "Updating response ID");
|
|
982
|
+
}
|
|
983
|
+
agentResponses.set(message.roomId, responseId);
|
|
984
|
+
// Start run tracking with roomId for proper log association
|
|
985
|
+
const runId = runtime.startRun(message.roomId);
|
|
986
|
+
if (!runId) {
|
|
987
|
+
runtime.logger.error("Failed to start run tracking");
|
|
988
|
+
return {
|
|
989
|
+
didRespond: false,
|
|
990
|
+
responseContent: null,
|
|
991
|
+
responseMessages: [],
|
|
992
|
+
state: { values: {}, data: {}, text: "" },
|
|
993
|
+
mode: "none",
|
|
994
|
+
};
|
|
995
|
+
}
|
|
996
|
+
const startTime = Date.now();
|
|
997
|
+
// Emit run started event
|
|
998
|
+
await runtime.emitEvent(EventType.RUN_STARTED, {
|
|
999
|
+
runtime,
|
|
1000
|
+
source: "messageHandler",
|
|
1001
|
+
runId,
|
|
1002
|
+
messageId: message.id,
|
|
1003
|
+
roomId: message.roomId,
|
|
1004
|
+
entityId: message.entityId,
|
|
1005
|
+
startTime,
|
|
1006
|
+
status: "started",
|
|
1007
|
+
});
|
|
1008
|
+
const timeoutPromise = new Promise((_, reject) => {
|
|
1009
|
+
timeoutId = setTimeout(async () => {
|
|
1010
|
+
await runtime.emitEvent(EventType.RUN_TIMEOUT, {
|
|
1011
|
+
runtime,
|
|
1012
|
+
source: "messageHandler",
|
|
1013
|
+
runId,
|
|
1014
|
+
messageId: message.id,
|
|
1015
|
+
roomId: message.roomId,
|
|
1016
|
+
entityId: message.entityId,
|
|
1017
|
+
startTime,
|
|
1018
|
+
status: "timeout",
|
|
1019
|
+
endTime: Date.now(),
|
|
1020
|
+
duration: Date.now() - startTime,
|
|
1021
|
+
error: "Run exceeded timeout",
|
|
1022
|
+
});
|
|
1023
|
+
reject(new Error("Run exceeded timeout"));
|
|
1024
|
+
}, opts.timeoutDuration);
|
|
1025
|
+
});
|
|
1026
|
+
// Wrap processing with streaming context for automatic streaming in useModel calls
|
|
1027
|
+
// Use ResponseStreamExtractor to filter XML and only stream <text> (if REPLY) or <message>
|
|
1028
|
+
let streamingContext;
|
|
1029
|
+
// Voice handling state
|
|
1030
|
+
let firstSentenceSent = false;
|
|
1031
|
+
let firstSentenceText = "";
|
|
1032
|
+
if (opts.onStreamChunk) {
|
|
1033
|
+
const extractor = new ResponseStreamExtractor();
|
|
1034
|
+
const onStreamChunk = opts.onStreamChunk;
|
|
1035
|
+
let streamText = "";
|
|
1036
|
+
streamingContext = {
|
|
1037
|
+
onStreamChunk: async (chunk, msgId) => {
|
|
1038
|
+
if (extractor.done)
|
|
1039
|
+
return;
|
|
1040
|
+
const textToStream = extractor.push(chunk);
|
|
1041
|
+
if (textToStream) {
|
|
1042
|
+
streamText += textToStream;
|
|
1043
|
+
// Check for first sentence to send to voice
|
|
1044
|
+
if (!firstSentenceSent && hasFirstSentence(streamText)) {
|
|
1045
|
+
const { first } = extractFirstSentence(streamText);
|
|
1046
|
+
firstSentenceText = first;
|
|
1047
|
+
if (first.length > 5) {
|
|
1048
|
+
// Minimal length check
|
|
1049
|
+
firstSentenceSent = true;
|
|
1050
|
+
// Process voice in background
|
|
1051
|
+
(async () => {
|
|
1052
|
+
try {
|
|
1053
|
+
const voiceSettings = runtime.character.settings
|
|
1054
|
+
?.voice;
|
|
1055
|
+
const model = voiceSettings?.model || "en_US-male-medium";
|
|
1056
|
+
const voiceId = voiceSettings?.url ||
|
|
1057
|
+
voiceSettings?.voiceId ||
|
|
1058
|
+
"nova";
|
|
1059
|
+
let audioBuffer = null;
|
|
1060
|
+
const params = {
|
|
1061
|
+
text: first,
|
|
1062
|
+
voice: voiceId,
|
|
1063
|
+
model: model,
|
|
1064
|
+
};
|
|
1065
|
+
const result = runtime.getModel(ModelType.TEXT_TO_SPEECH)
|
|
1066
|
+
? await runtime.useModel(ModelType.TEXT_TO_SPEECH, params)
|
|
1067
|
+
: undefined;
|
|
1068
|
+
if (result instanceof ArrayBuffer ||
|
|
1069
|
+
Object.prototype.toString.call(result) ===
|
|
1070
|
+
"[object ArrayBuffer]") {
|
|
1071
|
+
audioBuffer = Buffer.from(result);
|
|
1072
|
+
}
|
|
1073
|
+
else if (Buffer.isBuffer(result)) {
|
|
1074
|
+
audioBuffer = result;
|
|
1075
|
+
}
|
|
1076
|
+
else if (result instanceof Uint8Array) {
|
|
1077
|
+
audioBuffer = Buffer.from(result);
|
|
1078
|
+
}
|
|
1079
|
+
if (audioBuffer && instrumentedCallback) {
|
|
1080
|
+
const audioBase64 = audioBuffer.toString("base64");
|
|
1081
|
+
await instrumentedCallback({
|
|
1082
|
+
text: "",
|
|
1083
|
+
attachments: [
|
|
1084
|
+
{
|
|
1085
|
+
id: v4(),
|
|
1086
|
+
url: `data:audio/wav;base64,${audioBase64}`,
|
|
1087
|
+
title: "Voice Response",
|
|
1088
|
+
source: "voice-cache",
|
|
1089
|
+
description: "Voice response for first sentence",
|
|
1090
|
+
text: first,
|
|
1091
|
+
contentType: ContentType.AUDIO,
|
|
1092
|
+
},
|
|
1093
|
+
],
|
|
1094
|
+
source: "voice",
|
|
1095
|
+
});
|
|
1096
|
+
}
|
|
1097
|
+
}
|
|
1098
|
+
catch (error) {
|
|
1099
|
+
runtime.logger.error({ error }, "Error generating voice for first sentence");
|
|
1100
|
+
}
|
|
1101
|
+
})();
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
1104
|
+
await onStreamChunk(textToStream, msgId);
|
|
1105
|
+
}
|
|
1106
|
+
},
|
|
1107
|
+
messageId: responseId,
|
|
1108
|
+
};
|
|
1109
|
+
}
|
|
1110
|
+
const processingPromise = runWithStreamingContext(streamingContext, () => this.processMessage(runtime, message, instrumentedCallback, responseId, runId, startTime, opts));
|
|
1111
|
+
const result = await Promise.race([
|
|
1112
|
+
processingPromise,
|
|
1113
|
+
timeoutPromise,
|
|
1114
|
+
]);
|
|
1115
|
+
// Clean up timeout
|
|
1116
|
+
clearTimeout(timeoutId);
|
|
1117
|
+
// Voice: Handle the rest of the message
|
|
1118
|
+
if (firstSentenceSent && result.responseContent?.text) {
|
|
1119
|
+
const fullText = result.responseContent.text;
|
|
1120
|
+
const rest = fullText.replace(firstSentenceText, "").trim();
|
|
1121
|
+
if (rest.length > 0) {
|
|
1122
|
+
// Generate voice for rest
|
|
1123
|
+
// (Async immediately)
|
|
1124
|
+
(async () => {
|
|
1125
|
+
try {
|
|
1126
|
+
const voiceSettings = runtime.character.settings?.voice;
|
|
1127
|
+
const model = voiceSettings?.model || "en_US-male-medium";
|
|
1128
|
+
const voiceId = voiceSettings?.url || voiceSettings?.voiceId || "nova";
|
|
1129
|
+
let audioBuffer = null;
|
|
1130
|
+
const params = {
|
|
1131
|
+
text: rest,
|
|
1132
|
+
voice: voiceId,
|
|
1133
|
+
model: model,
|
|
1134
|
+
};
|
|
1135
|
+
const result = runtime.getModel(ModelType.TEXT_TO_SPEECH)
|
|
1136
|
+
? await runtime.useModel(ModelType.TEXT_TO_SPEECH, params)
|
|
1137
|
+
: undefined;
|
|
1138
|
+
if (result instanceof ArrayBuffer ||
|
|
1139
|
+
Object.prototype.toString.call(result) ===
|
|
1140
|
+
"[object ArrayBuffer]") {
|
|
1141
|
+
audioBuffer = Buffer.from(result);
|
|
1142
|
+
}
|
|
1143
|
+
else if (Buffer.isBuffer(result)) {
|
|
1144
|
+
audioBuffer = result;
|
|
1145
|
+
}
|
|
1146
|
+
else if (result instanceof Uint8Array) {
|
|
1147
|
+
audioBuffer = Buffer.from(result);
|
|
1148
|
+
}
|
|
1149
|
+
if (audioBuffer && instrumentedCallback) {
|
|
1150
|
+
const audioBase64 = audioBuffer.toString("base64");
|
|
1151
|
+
await instrumentedCallback({
|
|
1152
|
+
text: "",
|
|
1153
|
+
attachments: [
|
|
1154
|
+
{
|
|
1155
|
+
id: v4(),
|
|
1156
|
+
url: `data:audio/wav;base64,${audioBase64}`,
|
|
1157
|
+
title: "Voice Response",
|
|
1158
|
+
source: "voice",
|
|
1159
|
+
description: "Voice response for remaining text",
|
|
1160
|
+
text: rest,
|
|
1161
|
+
contentType: ContentType.AUDIO,
|
|
1162
|
+
},
|
|
1163
|
+
],
|
|
1164
|
+
source: "voice",
|
|
1165
|
+
});
|
|
1166
|
+
}
|
|
1167
|
+
}
|
|
1168
|
+
catch (error) {
|
|
1169
|
+
runtime.logger.error({ error }, "Error generating voice for remaining text");
|
|
1170
|
+
}
|
|
1171
|
+
})();
|
|
1172
|
+
}
|
|
1173
|
+
}
|
|
1174
|
+
return result;
|
|
1175
|
+
}
|
|
1176
|
+
finally {
|
|
1177
|
+
clearTimeout(timeoutId);
|
|
1178
|
+
// Ensure latestResponseIds is cleaned up even if processMessage
|
|
1179
|
+
// threw before reaching its own cleanup at the end of the method.
|
|
1180
|
+
clearLatestResponseId(runtime.agentId, message.roomId, responseId);
|
|
1181
|
+
}
|
|
1182
|
+
});
|
|
1183
|
+
}
|
|
1184
|
+
/**
|
|
1185
|
+
* Internal message processing implementation
|
|
1186
|
+
*/
|
|
1187
|
+
async processMessage(runtime, message, callback, responseId, runId, startTime, opts) {
|
|
1188
|
+
const agentResponses = latestResponseIds.get(runtime.agentId);
|
|
1189
|
+
if (!agentResponses)
|
|
1190
|
+
throw new Error("Agent responses map not found");
|
|
1191
|
+
// Skip messages from self (unless it's an autonomous message)
|
|
1192
|
+
const isAutonomousMessage = message.content?.metadata &&
|
|
1193
|
+
typeof message.content.metadata === "object" &&
|
|
1194
|
+
message.content.metadata.isAutonomous ===
|
|
1195
|
+
true;
|
|
1196
|
+
if (message.entityId === runtime.agentId && !isAutonomousMessage) {
|
|
1197
|
+
runtime.logger.debug({ src: "service:message", agentId: runtime.agentId }, "Skipping message from self");
|
|
1198
|
+
await this.emitRunEnded(runtime, runId, message, startTime, "self");
|
|
1199
|
+
return {
|
|
1200
|
+
didRespond: false,
|
|
1201
|
+
responseContent: null,
|
|
1202
|
+
responseMessages: [],
|
|
1203
|
+
state: { values: {}, data: {}, text: "" },
|
|
1204
|
+
mode: "none",
|
|
1205
|
+
};
|
|
1206
|
+
}
|
|
1207
|
+
runtime.logger.debug({
|
|
1208
|
+
src: "service:message",
|
|
1209
|
+
messagePreview: truncateToCompleteSentence(message.content.text || "", 50),
|
|
1210
|
+
}, "Processing message");
|
|
1211
|
+
// ── Save the incoming message to memory ────────────────────────────
|
|
1212
|
+
runtime.logger.debug({ src: "service:message" }, "Saving message to memory");
|
|
1213
|
+
let memoryToQueue;
|
|
1214
|
+
if (message.id) {
|
|
1215
|
+
const existingMemory = await runtime.getMemoryById(message.id);
|
|
1216
|
+
if (existingMemory) {
|
|
1217
|
+
runtime.logger.debug({ src: "service:message" }, "Memory already exists, skipping creation");
|
|
1218
|
+
memoryToQueue = existingMemory;
|
|
1219
|
+
}
|
|
1220
|
+
else {
|
|
1221
|
+
const createdMemoryId = await runtime.createMemory(message, "messages");
|
|
1222
|
+
memoryToQueue = { ...message, id: createdMemoryId };
|
|
1223
|
+
}
|
|
1224
|
+
await runtime.queueEmbeddingGeneration(memoryToQueue, "high");
|
|
1225
|
+
}
|
|
1226
|
+
else {
|
|
1227
|
+
const memoryId = await runtime.createMemory(message, "messages");
|
|
1228
|
+
message.id = memoryId;
|
|
1229
|
+
memoryToQueue = { ...message, id: memoryId };
|
|
1230
|
+
await runtime.queueEmbeddingGeneration(memoryToQueue, "normal");
|
|
1231
|
+
}
|
|
1232
|
+
// Check if LLM is off by default
|
|
1233
|
+
const agentUserState = await runtime.getParticipantUserState(message.roomId, runtime.agentId);
|
|
1234
|
+
const defLllmOff = parseBooleanFromText(String(runtime.getSetting("BASIC_CAPABILITIES_DEFLLMOFF") || ""));
|
|
1235
|
+
if (defLllmOff && agentUserState === null) {
|
|
1236
|
+
runtime.logger.debug({ src: "service:message" }, "LLM is off by default");
|
|
1237
|
+
await this.emitRunEnded(runtime, runId, message, startTime, "off");
|
|
1238
|
+
return {
|
|
1239
|
+
didRespond: false,
|
|
1240
|
+
responseContent: null,
|
|
1241
|
+
responseMessages: [],
|
|
1242
|
+
state: { values: {}, data: {}, text: "" },
|
|
1243
|
+
mode: "none",
|
|
1244
|
+
};
|
|
1245
|
+
}
|
|
1246
|
+
// Check if room is muted
|
|
1247
|
+
const agentName = runtime.character.name ?? "agent";
|
|
1248
|
+
const mentionContext = message.content.mentionContext;
|
|
1249
|
+
const explicitlyAddressesAgent = mentionContext?.isMention === true ||
|
|
1250
|
+
mentionContext?.isReply === true ||
|
|
1251
|
+
textContainsAgentName(message.content.text, [
|
|
1252
|
+
runtime.character.name,
|
|
1253
|
+
runtime.character.username,
|
|
1254
|
+
]);
|
|
1255
|
+
if (agentUserState === "MUTED" &&
|
|
1256
|
+
message.content.text &&
|
|
1257
|
+
!explicitlyAddressesAgent &&
|
|
1258
|
+
!message.content.text.toLowerCase().includes(agentName.toLowerCase())) {
|
|
1259
|
+
runtime.logger.debug({ src: "service:message", roomId: message.roomId }, "Ignoring muted room");
|
|
1260
|
+
await this.emitRunEnded(runtime, runId, message, startTime, "muted");
|
|
1261
|
+
return {
|
|
1262
|
+
didRespond: false,
|
|
1263
|
+
responseContent: null,
|
|
1264
|
+
responseMessages: [],
|
|
1265
|
+
state: { values: {}, data: {}, text: "" },
|
|
1266
|
+
mode: "none",
|
|
1267
|
+
};
|
|
1268
|
+
}
|
|
1269
|
+
// Compose initial state
|
|
1270
|
+
let state = await runtime.composeState(message, ["ENTITIES", "CHARACTER", "RECENT_MESSAGES", "ACTIONS"], true, false);
|
|
1271
|
+
state = attachAvailableContexts(state, runtime);
|
|
1272
|
+
// Get room and mention context
|
|
1273
|
+
const room = await runtime.getRoom(message.roomId);
|
|
1274
|
+
// Process attachments before deciding to respond
|
|
1275
|
+
if (message.content.attachments && message.content.attachments.length > 0) {
|
|
1276
|
+
message.content.attachments = await this.processAttachments(runtime, message.content.attachments);
|
|
1277
|
+
if (message.id) {
|
|
1278
|
+
await runtime.updateMemory({
|
|
1279
|
+
id: message.id,
|
|
1280
|
+
content: {
|
|
1281
|
+
...message.content,
|
|
1282
|
+
attachments: sanitizeAttachmentsForStorage(message.content.attachments),
|
|
1283
|
+
},
|
|
1284
|
+
});
|
|
1285
|
+
}
|
|
1286
|
+
}
|
|
1287
|
+
const promptAttachments = resolvePromptAttachments(message.content.attachments);
|
|
1288
|
+
let shouldRespondToMessage = true;
|
|
1289
|
+
let terminalDecision = null;
|
|
1290
|
+
let routedDecision = null;
|
|
1291
|
+
let dualPressureLog = null;
|
|
1292
|
+
let shouldRespondClassifierAction = null;
|
|
1293
|
+
const metadata = typeof message.content.metadata === "object" &&
|
|
1294
|
+
message.content.metadata !== null
|
|
1295
|
+
? message.content.metadata
|
|
1296
|
+
: null;
|
|
1297
|
+
const isAutonomous = metadata?.isAutonomous === true;
|
|
1298
|
+
const autonomyMode = typeof metadata?.autonomyMode === "string" ? metadata.autonomyMode : null;
|
|
1299
|
+
if (isAutonomous) {
|
|
1300
|
+
runtime.logger.debug({ src: "service:message", autonomyMode }, "Autonomy message bypassing shouldRespond checks");
|
|
1301
|
+
shouldRespondToMessage = true;
|
|
1302
|
+
}
|
|
1303
|
+
else {
|
|
1304
|
+
// Check if shouldRespond evaluation is enabled
|
|
1305
|
+
const checkShouldRespondEnabled = runtime.isCheckShouldRespondEnabled();
|
|
1306
|
+
// Determine if we should respond
|
|
1307
|
+
const responseDecision = this.shouldRespond(runtime, message, room ?? undefined, mentionContext);
|
|
1308
|
+
runtime.logger.debug({ src: "service:message", responseDecision, checkShouldRespondEnabled }, "Response decision");
|
|
1309
|
+
// If checkShouldRespond is disabled, always respond (ChatGPT mode)
|
|
1310
|
+
if (!checkShouldRespondEnabled) {
|
|
1311
|
+
runtime.logger.debug({ src: "service:message" }, "checkShouldRespond disabled, always responding (ChatGPT mode)");
|
|
1312
|
+
shouldRespondToMessage = true;
|
|
1313
|
+
}
|
|
1314
|
+
else if (responseDecision.skipEvaluation) {
|
|
1315
|
+
// If we can skip the evaluation, use the decision directly
|
|
1316
|
+
runtime.logger.debug({
|
|
1317
|
+
src: "service:message",
|
|
1318
|
+
agentName: runtime.character.name ?? "Agent",
|
|
1319
|
+
reason: responseDecision.reason,
|
|
1320
|
+
}, "Skipping LLM evaluation");
|
|
1321
|
+
routedDecision = parseContextRoutingMetadata(responseDecision);
|
|
1322
|
+
setContextRoutingMetadata(message, routedDecision);
|
|
1323
|
+
shouldRespondToMessage = responseDecision.shouldRespond;
|
|
1324
|
+
}
|
|
1325
|
+
else {
|
|
1326
|
+
state = {
|
|
1327
|
+
...state,
|
|
1328
|
+
values: {
|
|
1329
|
+
...state.values,
|
|
1330
|
+
dualPressureThreshold: resolveDualPressureThreshold(runtime),
|
|
1331
|
+
},
|
|
1332
|
+
};
|
|
1333
|
+
const shouldRespondState = prepareShouldRespondState(state);
|
|
1334
|
+
// Need LLM evaluation for ambiguous case
|
|
1335
|
+
const _shouldRespondPrompt = composePromptFromState({
|
|
1336
|
+
state: shouldRespondState,
|
|
1337
|
+
template: runtime.character.templates?.shouldRespondTemplate ||
|
|
1338
|
+
shouldRespondTemplate,
|
|
1339
|
+
});
|
|
1340
|
+
runtime.logger.debug({
|
|
1341
|
+
src: "service:message",
|
|
1342
|
+
agentName: runtime.character.name ?? "Agent",
|
|
1343
|
+
reason: responseDecision.reason,
|
|
1344
|
+
model: opts.shouldRespondModel,
|
|
1345
|
+
}, "Using LLM evaluation");
|
|
1346
|
+
// Use dynamicPromptExecFromState for structured output with validation
|
|
1347
|
+
setTrajectoryPurpose("should_respond");
|
|
1348
|
+
const responseObject = await runtime.dynamicPromptExecFromState({
|
|
1349
|
+
state: shouldRespondState,
|
|
1350
|
+
params: {
|
|
1351
|
+
prompt: runtime.character.templates?.shouldRespondTemplate ||
|
|
1352
|
+
shouldRespondTemplate,
|
|
1353
|
+
...(promptAttachments ? { attachments: promptAttachments } : {}),
|
|
1354
|
+
},
|
|
1355
|
+
schema: [
|
|
1356
|
+
// Decision schema - no streaming, no per-field validation needed
|
|
1357
|
+
// WHY: This is internal decision-making, not user-facing output
|
|
1358
|
+
{
|
|
1359
|
+
field: "name",
|
|
1360
|
+
description: "The name of the agent responding",
|
|
1361
|
+
validateField: false,
|
|
1362
|
+
streamField: false,
|
|
1363
|
+
},
|
|
1364
|
+
{
|
|
1365
|
+
field: "reasoning",
|
|
1366
|
+
description: "Your reasoning for this decision",
|
|
1367
|
+
validateField: false,
|
|
1368
|
+
streamField: false,
|
|
1369
|
+
},
|
|
1370
|
+
{
|
|
1371
|
+
field: "speak_up",
|
|
1372
|
+
description: "Integer 0-100 pressure TO engage",
|
|
1373
|
+
validateField: false,
|
|
1374
|
+
streamField: false,
|
|
1375
|
+
},
|
|
1376
|
+
{
|
|
1377
|
+
field: "hold_back",
|
|
1378
|
+
description: "Integer 0-100 pressure to STAY QUIET",
|
|
1379
|
+
validateField: false,
|
|
1380
|
+
streamField: false,
|
|
1381
|
+
},
|
|
1382
|
+
{
|
|
1383
|
+
field: "action",
|
|
1384
|
+
description: "REPLY | RESPOND | IGNORE | STOP (REPLY and RESPOND both mean engage)",
|
|
1385
|
+
validateField: false,
|
|
1386
|
+
streamField: false,
|
|
1387
|
+
},
|
|
1388
|
+
{
|
|
1389
|
+
field: "primaryContext",
|
|
1390
|
+
description: "Primary domain context from available_contexts (e.g., wallet, knowledge)",
|
|
1391
|
+
validateField: false,
|
|
1392
|
+
streamField: false,
|
|
1393
|
+
},
|
|
1394
|
+
{
|
|
1395
|
+
field: "secondaryContexts",
|
|
1396
|
+
description: "Optional comma-separated additional domain contexts",
|
|
1397
|
+
validateField: false,
|
|
1398
|
+
streamField: false,
|
|
1399
|
+
},
|
|
1400
|
+
{
|
|
1401
|
+
field: "evidenceTurnIds",
|
|
1402
|
+
description: "Optional comma-separated message IDs that influenced this decision",
|
|
1403
|
+
validateField: false,
|
|
1404
|
+
streamField: false,
|
|
1405
|
+
},
|
|
1406
|
+
],
|
|
1407
|
+
options: {
|
|
1408
|
+
contextCheckLevel: 0, // Set to 0 for now
|
|
1409
|
+
// Classifier failures are usually transient provider hiccups;
|
|
1410
|
+
// give this internal decision one short retry window.
|
|
1411
|
+
maxRetries: Math.max(1, Math.min(opts.maxRetries, 2)),
|
|
1412
|
+
retryBackoff: {
|
|
1413
|
+
initialMs: 500,
|
|
1414
|
+
multiplier: 2,
|
|
1415
|
+
maxMs: 2000,
|
|
1416
|
+
},
|
|
1417
|
+
modelType: resolveShouldRespondModelType(opts.shouldRespondModel),
|
|
1418
|
+
preferredEncapsulation: "toon",
|
|
1419
|
+
},
|
|
1420
|
+
});
|
|
1421
|
+
runtime.logger.debug({ src: "service:message", responseObject }, "Parsed evaluation result");
|
|
1422
|
+
const rawAction = typeof responseObject?.action === "string"
|
|
1423
|
+
? responseObject.action
|
|
1424
|
+
: "";
|
|
1425
|
+
const actionUpper = rawAction.trim().toUpperCase();
|
|
1426
|
+
const hasValidClassifierAction = actionUpper.length > 0 && ALLOWED_CLASSIFIER_ACTIONS.has(actionUpper);
|
|
1427
|
+
routedDecision = parseContextRoutingMetadata(responseObject);
|
|
1428
|
+
setContextRoutingMetadata(message, routedDecision);
|
|
1429
|
+
if (!hasValidClassifierAction) {
|
|
1430
|
+
runtime.logger.warn({
|
|
1431
|
+
src: "service:message",
|
|
1432
|
+
action: responseObject?.action,
|
|
1433
|
+
}, "Classifier response missing valid action; treating as IGNORE");
|
|
1434
|
+
terminalDecision = "IGNORE";
|
|
1435
|
+
shouldRespondToMessage = false;
|
|
1436
|
+
}
|
|
1437
|
+
else {
|
|
1438
|
+
const dual = applyDualPressureToClassifierAction(runtime, responseObject, rawAction);
|
|
1439
|
+
dualPressureLog = dual.pressure;
|
|
1440
|
+
shouldRespondClassifierAction = dual.finalActionUpper;
|
|
1441
|
+
if (dual.finalActionUpper === "IGNORE" ||
|
|
1442
|
+
dual.finalActionUpper === "STOP") {
|
|
1443
|
+
terminalDecision = dual.finalActionUpper;
|
|
1444
|
+
}
|
|
1445
|
+
shouldRespondToMessage =
|
|
1446
|
+
dual.finalActionUpper === "REPLY" ||
|
|
1447
|
+
dual.finalActionUpper === "RESPOND";
|
|
1448
|
+
}
|
|
1449
|
+
}
|
|
1450
|
+
}
|
|
1451
|
+
let responseContent = null;
|
|
1452
|
+
let responseMessages = [];
|
|
1453
|
+
let mode = "none";
|
|
1454
|
+
// Holds a deferred simple-mode reply that will be flushed after
|
|
1455
|
+
// evaluators + reflection have had a chance to override it. Declared
|
|
1456
|
+
// out here so the post-evaluation flush at the bottom of handleMessage
|
|
1457
|
+
// can see the same variable that the simple-mode branch sets.
|
|
1458
|
+
let pendingSimpleEmit = null;
|
|
1459
|
+
// Track memory IDs created for the simple-mode reply so we can clean
|
|
1460
|
+
// them up if reflection overrides the deferred emit (Greptile P1 fix).
|
|
1461
|
+
let pendingSimpleMemoryIds = [];
|
|
1462
|
+
if (shouldRespondToMessage) {
|
|
1463
|
+
const resolvedRouting = mergeContextRouting(state, message);
|
|
1464
|
+
let executionState = state;
|
|
1465
|
+
if (routedDecision) {
|
|
1466
|
+
executionState = withContextRoutingValues(await runtime.composeState(message, ["ACTIONS", "PROVIDERS"], false, false), {
|
|
1467
|
+
[AVAILABLE_CONTEXTS_STATE_KEY]: state.values?.[AVAILABLE_CONTEXTS_STATE_KEY],
|
|
1468
|
+
[CONTEXT_ROUTING_STATE_KEY]: resolvedRouting,
|
|
1469
|
+
});
|
|
1470
|
+
}
|
|
1471
|
+
const result = opts.useMultiStep
|
|
1472
|
+
? await this.runMultiStepCore(runtime, message, executionState, callback, opts, responseId, promptAttachments, {
|
|
1473
|
+
precomposedState: executionState,
|
|
1474
|
+
})
|
|
1475
|
+
: await this.runSingleShotCore(runtime, message, executionState, opts, responseId, promptAttachments, {
|
|
1476
|
+
precomposedState: executionState,
|
|
1477
|
+
});
|
|
1478
|
+
responseContent = result.responseContent;
|
|
1479
|
+
responseMessages = result.responseMessages;
|
|
1480
|
+
state = result.state;
|
|
1481
|
+
mode = result.mode;
|
|
1482
|
+
// Race check before we send anything
|
|
1483
|
+
const currentResponseId = agentResponses.get(message.roomId);
|
|
1484
|
+
if (currentResponseId !== responseId && !opts.keepExistingResponses) {
|
|
1485
|
+
runtime.logger.info({
|
|
1486
|
+
src: "service:message",
|
|
1487
|
+
agentId: runtime.agentId,
|
|
1488
|
+
roomId: message.roomId,
|
|
1489
|
+
}, "Response discarded - newer message being processed");
|
|
1490
|
+
return {
|
|
1491
|
+
didRespond: false,
|
|
1492
|
+
responseContent: null,
|
|
1493
|
+
responseMessages: [],
|
|
1494
|
+
state,
|
|
1495
|
+
mode: "none",
|
|
1496
|
+
};
|
|
1497
|
+
}
|
|
1498
|
+
if (responseContent && message.id) {
|
|
1499
|
+
responseContent.inReplyTo = createUniqueUuid(runtime, message.id);
|
|
1500
|
+
}
|
|
1501
|
+
if (responseContent?.providers && responseContent.providers.length > 0) {
|
|
1502
|
+
state = await runtime.composeState(message, responseContent.providers, false, false);
|
|
1503
|
+
}
|
|
1504
|
+
// Save response memory to database
|
|
1505
|
+
if (responseMessages.length > 0) {
|
|
1506
|
+
for (const responseMemory of responseMessages) {
|
|
1507
|
+
// Update the content in case inReplyTo was added
|
|
1508
|
+
if (responseContent) {
|
|
1509
|
+
responseMemory.content = responseContent;
|
|
1510
|
+
}
|
|
1511
|
+
runtime.logger.debug({ src: "service:message", memoryId: responseMemory.id }, "Saving response to memory");
|
|
1512
|
+
await runtime.createMemory(responseMemory, "messages");
|
|
1513
|
+
await this.emitMessageSent(runtime, responseMemory, message.content.source ?? "messageHandler");
|
|
1514
|
+
// Track IDs for simple-mode so we can delete orphaned
|
|
1515
|
+
// memories if reflection overrides the deferred emit.
|
|
1516
|
+
if (mode === "simple" && responseMemory.id) {
|
|
1517
|
+
pendingSimpleMemoryIds.push(responseMemory.id);
|
|
1518
|
+
}
|
|
1519
|
+
}
|
|
1520
|
+
}
|
|
1521
|
+
if (responseContent) {
|
|
1522
|
+
if (mode === "simple") {
|
|
1523
|
+
// Log provider usage for simple responses
|
|
1524
|
+
if (responseContent.providers &&
|
|
1525
|
+
responseContent.providers.length > 0) {
|
|
1526
|
+
runtime.logger.debug({
|
|
1527
|
+
src: "service:message",
|
|
1528
|
+
providers: responseContent.providers,
|
|
1529
|
+
}, "Simple response used providers");
|
|
1530
|
+
}
|
|
1531
|
+
// Defer the callback until after reflection has had a
|
|
1532
|
+
// chance to override. Redact secrets now so the content
|
|
1533
|
+
// is ready to flush at the bottom of handleMessage.
|
|
1534
|
+
if (responseContent.text) {
|
|
1535
|
+
responseContent.text = runtime.redactSecrets(responseContent.text);
|
|
1536
|
+
}
|
|
1537
|
+
pendingSimpleEmit = responseContent;
|
|
1538
|
+
}
|
|
1539
|
+
else if (mode === "actions") {
|
|
1540
|
+
// Pass onStreamChunk to processActions so each action can manage its own streaming context
|
|
1541
|
+
await runtime.processActions(message, responseMessages, state, async (content) => {
|
|
1542
|
+
runtime.logger.debug({ src: "service:message", content }, "Action callback");
|
|
1543
|
+
if (responseContent) {
|
|
1544
|
+
responseContent.actionCallbacks = content;
|
|
1545
|
+
}
|
|
1546
|
+
if (callback) {
|
|
1547
|
+
return callback(content);
|
|
1548
|
+
}
|
|
1549
|
+
return [];
|
|
1550
|
+
}, { onStreamChunk: opts.onStreamChunk });
|
|
1551
|
+
if (opts.continueAfterActions &&
|
|
1552
|
+
message.id &&
|
|
1553
|
+
shouldContinueAfterActions(runtime, responseContent) &&
|
|
1554
|
+
!suppressesPostActionContinuation(runtime, responseContent)) {
|
|
1555
|
+
const continuation = await this.runPostActionContinuation(runtime, message, state, callback, opts, runtime.getActionResults(message.id));
|
|
1556
|
+
if (continuation.responseMessages.length > 0) {
|
|
1557
|
+
responseMessages = [
|
|
1558
|
+
...responseMessages,
|
|
1559
|
+
...continuation.responseMessages,
|
|
1560
|
+
];
|
|
1561
|
+
}
|
|
1562
|
+
if (continuation.responseContent) {
|
|
1563
|
+
responseContent = continuation.responseContent;
|
|
1564
|
+
mode = continuation.mode;
|
|
1565
|
+
}
|
|
1566
|
+
state = continuation.state;
|
|
1567
|
+
}
|
|
1568
|
+
}
|
|
1569
|
+
}
|
|
1570
|
+
}
|
|
1571
|
+
else {
|
|
1572
|
+
// Agent decided not to respond
|
|
1573
|
+
runtime.logger.debug({ src: "service:message" }, "Agent decided not to respond");
|
|
1574
|
+
// Check if we still have the latest response ID
|
|
1575
|
+
const currentResponseId = agentResponses.get(message.roomId);
|
|
1576
|
+
if (currentResponseId !== responseId && !opts.keepExistingResponses) {
|
|
1577
|
+
runtime.logger.info({
|
|
1578
|
+
src: "service:message",
|
|
1579
|
+
agentId: runtime.agentId,
|
|
1580
|
+
roomId: message.roomId,
|
|
1581
|
+
}, "Ignore response discarded - newer message being processed");
|
|
1582
|
+
await this.emitRunEnded(runtime, runId, message, startTime, "replaced");
|
|
1583
|
+
return {
|
|
1584
|
+
didRespond: false,
|
|
1585
|
+
responseContent: null,
|
|
1586
|
+
responseMessages: [],
|
|
1587
|
+
state,
|
|
1588
|
+
mode: "none",
|
|
1589
|
+
};
|
|
1590
|
+
}
|
|
1591
|
+
if (!message.id) {
|
|
1592
|
+
runtime.logger.error({ src: "service:message", agentId: runtime.agentId }, "Message ID is missing, cannot create ignore response");
|
|
1593
|
+
await this.emitRunEnded(runtime, runId, message, startTime, "noMessageId");
|
|
1594
|
+
return {
|
|
1595
|
+
didRespond: false,
|
|
1596
|
+
responseContent: null,
|
|
1597
|
+
responseMessages: [],
|
|
1598
|
+
state,
|
|
1599
|
+
mode: "none",
|
|
1600
|
+
};
|
|
1601
|
+
}
|
|
1602
|
+
// Construct a minimal content object indicating the terminal decision
|
|
1603
|
+
const terminalAction = terminalDecision ?? "IGNORE";
|
|
1604
|
+
const terminalContent = {
|
|
1605
|
+
thought: terminalAction === "STOP"
|
|
1606
|
+
? "Agent decided to stop and end the run."
|
|
1607
|
+
: "Agent decided not to respond to this message.",
|
|
1608
|
+
actions: [terminalAction],
|
|
1609
|
+
simple: true,
|
|
1610
|
+
inReplyTo: createUniqueUuid(runtime, message.id),
|
|
1611
|
+
};
|
|
1612
|
+
// Call the callback with the terminal content
|
|
1613
|
+
if (callback) {
|
|
1614
|
+
await callback(terminalContent);
|
|
1615
|
+
}
|
|
1616
|
+
// Save this terminal action/thought to memory
|
|
1617
|
+
const terminalMemory = {
|
|
1618
|
+
id: asUUID(v4()),
|
|
1619
|
+
entityId: runtime.agentId,
|
|
1620
|
+
agentId: runtime.agentId,
|
|
1621
|
+
content: terminalContent,
|
|
1622
|
+
roomId: message.roomId,
|
|
1623
|
+
createdAt: Date.now(),
|
|
1624
|
+
};
|
|
1625
|
+
await runtime.createMemory(terminalMemory, "messages");
|
|
1626
|
+
await this.emitMessageSent(runtime, terminalMemory, message.content.source ?? "messageHandler");
|
|
1627
|
+
runtime.logger.debug({ src: "service:message", memoryId: terminalMemory.id }, "Saved terminal response to memory");
|
|
1628
|
+
}
|
|
1629
|
+
// Clean up the response ID
|
|
1630
|
+
clearLatestResponseId(runtime.agentId, message.roomId, responseId);
|
|
1631
|
+
// Run evaluators before ending the turn because reflection can now mark
|
|
1632
|
+
// the task incomplete and trigger another continuation/action pass.
|
|
1633
|
+
const runEvaluate = () => runtime.evaluate(message, state, shouldRespondToMessage && !isStopResponse(responseContent), async (content) => {
|
|
1634
|
+
runtime.logger.debug({ src: "service:message", content }, "Evaluate callback");
|
|
1635
|
+
if (responseContent) {
|
|
1636
|
+
responseContent.evalCallbacks = content;
|
|
1637
|
+
}
|
|
1638
|
+
if (callback) {
|
|
1639
|
+
if (content.text) {
|
|
1640
|
+
content.text = runtime.redactSecrets(content.text);
|
|
1641
|
+
}
|
|
1642
|
+
return callback(content);
|
|
1643
|
+
}
|
|
1644
|
+
return [];
|
|
1645
|
+
}, responseMessages);
|
|
1646
|
+
await runEvaluate();
|
|
1647
|
+
if (opts.continueAfterActions && message.id) {
|
|
1648
|
+
const taskCompletion = await runtime.getCache(getTaskCompletionCacheKey(message.id));
|
|
1649
|
+
await runtime.deleteCache(getTaskCompletionCacheKey(message.id));
|
|
1650
|
+
if (taskCompletion?.assessed &&
|
|
1651
|
+
!taskCompletion.completed &&
|
|
1652
|
+
// Honor `suppressPostActionContinuation` here too. The flag's
|
|
1653
|
+
// contract per Action.suppressPostActionContinuation is "stop after
|
|
1654
|
+
// this action — don't run any continuation LLM turn." Without this
|
|
1655
|
+
// guard, an action that already emitted a complete user-facing
|
|
1656
|
+
// reply (e.g. CALENDAR_ACTION) will get a second visible callback
|
|
1657
|
+
// when the reflection evaluator marks the task as incomplete and
|
|
1658
|
+
// triggers another LLM/processActions pass.
|
|
1659
|
+
!suppressesPostActionContinuation(runtime, responseContent)) {
|
|
1660
|
+
const directReplyText = typeof responseContent?.text === "string"
|
|
1661
|
+
? responseContent.text.trim()
|
|
1662
|
+
: "";
|
|
1663
|
+
let latestActionResults = [];
|
|
1664
|
+
const shouldWaitForUser = isSimpleReplyResponse(responseContent) && directReplyText.length > 0
|
|
1665
|
+
? isLikelyClarifyingQuestion(directReplyText)
|
|
1666
|
+
: (() => {
|
|
1667
|
+
latestActionResults = runtime.getActionResults(message.id);
|
|
1668
|
+
return shouldWaitForUserAfterIncompleteReflection(responseContent, latestActionResults);
|
|
1669
|
+
})();
|
|
1670
|
+
if (shouldWaitForUser) {
|
|
1671
|
+
runtime.logger.debug({
|
|
1672
|
+
src: "service:message",
|
|
1673
|
+
messageId: message.id,
|
|
1674
|
+
taskCompletionReason: taskCompletion.reason,
|
|
1675
|
+
replyPreview: getLatestVisibleReplyText(responseContent, latestActionResults).slice(0, 200),
|
|
1676
|
+
}, "Skipping reflection continuation because the agent is waiting for user input");
|
|
1677
|
+
}
|
|
1678
|
+
else {
|
|
1679
|
+
const continuation = await this.runReflectionTaskContinuation(runtime, message, state, callback, opts, taskCompletion);
|
|
1680
|
+
if (continuation.responseMessages.length > 0) {
|
|
1681
|
+
responseMessages = [
|
|
1682
|
+
...responseMessages,
|
|
1683
|
+
...continuation.responseMessages,
|
|
1684
|
+
];
|
|
1685
|
+
}
|
|
1686
|
+
if (continuation.responseContent) {
|
|
1687
|
+
responseContent = continuation.responseContent;
|
|
1688
|
+
mode = continuation.mode;
|
|
1689
|
+
}
|
|
1690
|
+
// Reflection produced a continuation (may or may not have
|
|
1691
|
+
// responseContent — e.g. actions that set results but the
|
|
1692
|
+
// helper returned early). Drop the deferred chatty REPLY
|
|
1693
|
+
// either way: emitting both would show two contradictory
|
|
1694
|
+
// messages, and even when responseContent is null the
|
|
1695
|
+
// continuation's action callbacks already went to the user.
|
|
1696
|
+
if (pendingSimpleEmit &&
|
|
1697
|
+
(continuation.responseContent ||
|
|
1698
|
+
continuation.responseMessages.length > 0)) {
|
|
1699
|
+
// Clean up orphaned memories that were persisted before
|
|
1700
|
+
// we knew reflection would override (Greptile P1 fix).
|
|
1701
|
+
for (const memId of pendingSimpleMemoryIds) {
|
|
1702
|
+
await runtime.deleteMemory(memId);
|
|
1703
|
+
}
|
|
1704
|
+
pendingSimpleMemoryIds = [];
|
|
1705
|
+
pendingSimpleEmit = null;
|
|
1706
|
+
}
|
|
1707
|
+
state = continuation.state;
|
|
1708
|
+
}
|
|
1709
|
+
}
|
|
1710
|
+
}
|
|
1711
|
+
// Flush the deferred simple-mode reply now that reflection has had its
|
|
1712
|
+
// chance to override. If reflection produced its own response, this is
|
|
1713
|
+
// already null and the original chatty REPLY is dropped.
|
|
1714
|
+
if (pendingSimpleEmit && callback) {
|
|
1715
|
+
await callback(pendingSimpleEmit);
|
|
1716
|
+
}
|
|
1717
|
+
const didRespond = responseMessages.length > 0 && !isStopResponse(responseContent);
|
|
1718
|
+
// Collect metadata for logging
|
|
1719
|
+
let entityName = "noname";
|
|
1720
|
+
if (message.metadata &&
|
|
1721
|
+
"entityName" in message.metadata &&
|
|
1722
|
+
typeof message.metadata.entityName === "string") {
|
|
1723
|
+
entityName = message.metadata.entityName;
|
|
1724
|
+
}
|
|
1725
|
+
const isDM = message.content && message.content.channelType === ChannelType.DM;
|
|
1726
|
+
let roomName = entityName;
|
|
1727
|
+
if (!isDM) {
|
|
1728
|
+
const roomDatas = await runtime.getRoomsByIds([message.roomId]);
|
|
1729
|
+
if (roomDatas?.length) {
|
|
1730
|
+
const roomData = roomDatas[0];
|
|
1731
|
+
if (roomData.name) {
|
|
1732
|
+
roomName = roomData.name;
|
|
1733
|
+
}
|
|
1734
|
+
if (roomData.worldId) {
|
|
1735
|
+
const worldData = await runtime.getWorld(roomData.worldId);
|
|
1736
|
+
if (worldData) {
|
|
1737
|
+
roomName = `${worldData.name}-${roomName}`;
|
|
1738
|
+
}
|
|
1739
|
+
}
|
|
1740
|
+
}
|
|
1741
|
+
}
|
|
1742
|
+
const date = new Date();
|
|
1743
|
+
// Extract available actions from provider data
|
|
1744
|
+
const stateData = state.data;
|
|
1745
|
+
const stateDataProviders = stateData?.providers;
|
|
1746
|
+
const actionsProvider = stateDataProviders?.ACTIONS;
|
|
1747
|
+
const actionsProviderData = actionsProvider?.data;
|
|
1748
|
+
const actionsData = actionsProviderData && "actionsData" in actionsProviderData
|
|
1749
|
+
? actionsProviderData.actionsData
|
|
1750
|
+
: undefined;
|
|
1751
|
+
const availableActions = actionsData?.map((a) => a.name) ?? [];
|
|
1752
|
+
const _logData = {
|
|
1753
|
+
at: date.toString(),
|
|
1754
|
+
timestamp: Math.floor(date.getTime() / 1000),
|
|
1755
|
+
messageId: message.id,
|
|
1756
|
+
userEntityId: message.entityId,
|
|
1757
|
+
input: message.content.text,
|
|
1758
|
+
thought: responseContent?.thought,
|
|
1759
|
+
simple: responseContent?.simple,
|
|
1760
|
+
availableActions,
|
|
1761
|
+
actions: responseContent?.actions,
|
|
1762
|
+
providers: responseContent?.providers,
|
|
1763
|
+
irt: responseContent?.inReplyTo,
|
|
1764
|
+
output: responseContent?.text,
|
|
1765
|
+
entityName,
|
|
1766
|
+
source: message.content.source,
|
|
1767
|
+
channelType: message.content.channelType,
|
|
1768
|
+
roomName,
|
|
1769
|
+
};
|
|
1770
|
+
// Emit run ended event
|
|
1771
|
+
await runtime.emitEvent(EventType.RUN_ENDED, {
|
|
1772
|
+
runtime,
|
|
1773
|
+
source: "messageHandler",
|
|
1774
|
+
runId,
|
|
1775
|
+
messageId: message.id,
|
|
1776
|
+
roomId: message.roomId,
|
|
1777
|
+
entityId: message.entityId,
|
|
1778
|
+
startTime,
|
|
1779
|
+
status: "completed",
|
|
1780
|
+
endTime: Date.now(),
|
|
1781
|
+
duration: Date.now() - startTime,
|
|
1782
|
+
});
|
|
1783
|
+
return {
|
|
1784
|
+
didRespond,
|
|
1785
|
+
responseContent,
|
|
1786
|
+
responseMessages,
|
|
1787
|
+
state,
|
|
1788
|
+
mode,
|
|
1789
|
+
...(dualPressureLog !== null || shouldRespondClassifierAction !== null
|
|
1790
|
+
? {
|
|
1791
|
+
dualPressure: dualPressureLog,
|
|
1792
|
+
shouldRespondClassifierAction,
|
|
1793
|
+
}
|
|
1794
|
+
: {}),
|
|
1795
|
+
};
|
|
1796
|
+
}
|
|
1797
|
+
/**
|
|
1798
|
+
* Determines whether the agent should respond to a message.
|
|
1799
|
+
* Uses simple rules for obvious cases (DM, mentions) and defers to LLM for ambiguous cases.
|
|
1800
|
+
*/
|
|
1801
|
+
shouldRespond(runtime, message, room, mentionContext) {
|
|
1802
|
+
if (!room) {
|
|
1803
|
+
return {
|
|
1804
|
+
shouldRespond: false,
|
|
1805
|
+
skipEvaluation: true,
|
|
1806
|
+
reason: "no room context",
|
|
1807
|
+
primaryContext: "general",
|
|
1808
|
+
};
|
|
1809
|
+
}
|
|
1810
|
+
function normalizeEnvList(value) {
|
|
1811
|
+
if (!value || typeof value !== "string")
|
|
1812
|
+
return [];
|
|
1813
|
+
const cleaned = value.trim().replace(/^\[|\]$/g, "");
|
|
1814
|
+
return cleaned
|
|
1815
|
+
.split(",")
|
|
1816
|
+
.map((v) => v.trim())
|
|
1817
|
+
.filter(Boolean);
|
|
1818
|
+
}
|
|
1819
|
+
// Channel types that always trigger a response (private channels)
|
|
1820
|
+
const alwaysRespondChannels = [
|
|
1821
|
+
ChannelType.DM,
|
|
1822
|
+
ChannelType.VOICE_DM,
|
|
1823
|
+
ChannelType.SELF,
|
|
1824
|
+
ChannelType.API,
|
|
1825
|
+
];
|
|
1826
|
+
// Sources that always trigger a response
|
|
1827
|
+
const alwaysRespondSources = ["client_chat"];
|
|
1828
|
+
// Support runtime-configurable overrides via env settings
|
|
1829
|
+
const customChannels = normalizeEnvList(runtime.getSetting("ALWAYS_RESPOND_CHANNELS") ??
|
|
1830
|
+
runtime.getSetting("SHOULD_RESPOND_BYPASS_TYPES"));
|
|
1831
|
+
const customSources = normalizeEnvList(runtime.getSetting("ALWAYS_RESPOND_SOURCES") ??
|
|
1832
|
+
runtime.getSetting("SHOULD_RESPOND_BYPASS_SOURCES"));
|
|
1833
|
+
const respondChannels = new Set([
|
|
1834
|
+
...alwaysRespondChannels.map((t) => t.toString()),
|
|
1835
|
+
...customChannels,
|
|
1836
|
+
].map((s) => s.trim().toLowerCase()));
|
|
1837
|
+
const respondSources = [...alwaysRespondSources, ...customSources].map((s) => s.trim().toLowerCase());
|
|
1838
|
+
const roomType = room.type?.toString().toLowerCase();
|
|
1839
|
+
const sourceStr = message.content.source?.toLowerCase() || "";
|
|
1840
|
+
const textMentionsAgentByName = textContainsAgentName(message.content.text, [runtime.character.name, runtime.character.username]);
|
|
1841
|
+
const textMentionsTaggedParticipants = textContainsUserTag(message.content.text);
|
|
1842
|
+
// 1. DM/VOICE_DM/API channels: always respond (private channels)
|
|
1843
|
+
if (respondChannels.has(roomType)) {
|
|
1844
|
+
return {
|
|
1845
|
+
shouldRespond: true,
|
|
1846
|
+
skipEvaluation: true,
|
|
1847
|
+
reason: `private channel: ${roomType}`,
|
|
1848
|
+
primaryContext: "general",
|
|
1849
|
+
};
|
|
1850
|
+
}
|
|
1851
|
+
// 2. Specific sources (e.g., client_chat): always respond
|
|
1852
|
+
if (respondSources.some((pattern) => sourceStr.includes(pattern))) {
|
|
1853
|
+
return {
|
|
1854
|
+
shouldRespond: true,
|
|
1855
|
+
skipEvaluation: true,
|
|
1856
|
+
reason: `whitelisted source: ${sourceStr}`,
|
|
1857
|
+
primaryContext: "general",
|
|
1858
|
+
};
|
|
1859
|
+
}
|
|
1860
|
+
// 3. Platform mentions and replies: always respond
|
|
1861
|
+
const hasPlatformMention = !!(mentionContext?.isMention || mentionContext?.isReply);
|
|
1862
|
+
if (hasPlatformMention) {
|
|
1863
|
+
const mentionType = mentionContext?.isMention ? "mention" : "reply";
|
|
1864
|
+
return {
|
|
1865
|
+
shouldRespond: true,
|
|
1866
|
+
skipEvaluation: true,
|
|
1867
|
+
reason: `platform ${mentionType}`,
|
|
1868
|
+
primaryContext: "general",
|
|
1869
|
+
};
|
|
1870
|
+
}
|
|
1871
|
+
// 4. Mixed-address messages should still reach the agent when the text
|
|
1872
|
+
// explicitly names it alongside other tagged participants.
|
|
1873
|
+
if (textMentionsTaggedParticipants && textMentionsAgentByName) {
|
|
1874
|
+
return {
|
|
1875
|
+
shouldRespond: true,
|
|
1876
|
+
skipEvaluation: true,
|
|
1877
|
+
reason: "text address with tagged participants",
|
|
1878
|
+
primaryContext: "general",
|
|
1879
|
+
};
|
|
1880
|
+
}
|
|
1881
|
+
// 5. Clear self-modification requests should bypass the ignore-biased
|
|
1882
|
+
// classifier even in group chat, but only for narrow personality/style
|
|
1883
|
+
// update phrasing to avoid broad false positives.
|
|
1884
|
+
if (isExplicitSelfModificationRequest(message.content.text || "")) {
|
|
1885
|
+
return {
|
|
1886
|
+
shouldRespond: true,
|
|
1887
|
+
skipEvaluation: true,
|
|
1888
|
+
reason: "explicit self-modification request",
|
|
1889
|
+
primaryContext: "social",
|
|
1890
|
+
secondaryContexts: ["system"],
|
|
1891
|
+
};
|
|
1892
|
+
}
|
|
1893
|
+
// 6. All other cases are ambiguous enough to need the classifier.
|
|
1894
|
+
// Lack of a platform mention is not proof the message isn't directed
|
|
1895
|
+
// at the agent in a fast-moving group conversation.
|
|
1896
|
+
return {
|
|
1897
|
+
shouldRespond: false,
|
|
1898
|
+
skipEvaluation: false,
|
|
1899
|
+
reason: textMentionsAgentByName
|
|
1900
|
+
? "agent named in text requires LLM evaluation"
|
|
1901
|
+
: "needs LLM evaluation",
|
|
1902
|
+
primaryContext: "general",
|
|
1903
|
+
};
|
|
1904
|
+
}
|
|
1905
|
+
/**
|
|
1906
|
+
* Processes attachments by generating descriptions for supported media types.
|
|
1907
|
+
*/
|
|
1908
|
+
async processAttachments(runtime, attachments) {
|
|
1909
|
+
if (!attachments || attachments.length === 0) {
|
|
1910
|
+
return [];
|
|
1911
|
+
}
|
|
1912
|
+
runtime.logger.debug({ src: "service:message", count: attachments.length }, "Processing attachments");
|
|
1913
|
+
const processedAttachments = await Promise.all(attachments.map(async (attachment) => {
|
|
1914
|
+
const processedAttachment = { ...attachment };
|
|
1915
|
+
const isRemote = /^(http|https):\/\//.test(attachment.url);
|
|
1916
|
+
const url = isRemote
|
|
1917
|
+
? attachment.url
|
|
1918
|
+
: getLocalServerUrl(attachment.url);
|
|
1919
|
+
// Only process images that don't already have descriptions
|
|
1920
|
+
if (attachment.contentType === ContentType.IMAGE &&
|
|
1921
|
+
!attachment.description) {
|
|
1922
|
+
// Skip image analysis when vision / image-description is explicitly
|
|
1923
|
+
// disabled (e.g. the user toggled the Vision capability off).
|
|
1924
|
+
const disableImageDesc = runtime.getSetting("DISABLE_IMAGE_DESCRIPTION");
|
|
1925
|
+
if (disableImageDesc === true || disableImageDesc === "true") {
|
|
1926
|
+
return processedAttachment;
|
|
1927
|
+
}
|
|
1928
|
+
runtime.logger.debug({ src: "service:message", imageUrl: attachment.url }, "Generating image description");
|
|
1929
|
+
let imageUrl = url;
|
|
1930
|
+
const runtimeFetch = runtime.fetch ?? globalThis.fetch;
|
|
1931
|
+
const inlineData = attachment;
|
|
1932
|
+
if (typeof inlineData._data === "string" &&
|
|
1933
|
+
inlineData._data.trim() &&
|
|
1934
|
+
typeof inlineData._mimeType === "string" &&
|
|
1935
|
+
inlineData._mimeType.trim()) {
|
|
1936
|
+
imageUrl = `data:${inlineData._mimeType};base64,${inlineData._data}`;
|
|
1937
|
+
}
|
|
1938
|
+
else if (!isRemote) {
|
|
1939
|
+
// Convert local/internal media to base64
|
|
1940
|
+
const res = await runtimeFetch(url);
|
|
1941
|
+
if (!res.ok)
|
|
1942
|
+
throw new Error(`Failed to fetch image: ${res.statusText}`);
|
|
1943
|
+
const arrayBuffer = await res.arrayBuffer();
|
|
1944
|
+
const buffer = Buffer.from(arrayBuffer);
|
|
1945
|
+
const contentType = res.headers.get("content-type") || "application/octet-stream";
|
|
1946
|
+
imageUrl = `data:${contentType};base64,${buffer.toString("base64")}`;
|
|
1947
|
+
}
|
|
1948
|
+
const response = await runtime.useModel(ModelType.IMAGE_DESCRIPTION, {
|
|
1949
|
+
prompt: imageDescriptionTemplate,
|
|
1950
|
+
imageUrl,
|
|
1951
|
+
});
|
|
1952
|
+
if (typeof response === "string") {
|
|
1953
|
+
const parsedXml = parseKeyValueXml(response);
|
|
1954
|
+
if (parsedXml && (parsedXml.description || parsedXml.text)) {
|
|
1955
|
+
processedAttachment.description =
|
|
1956
|
+
(typeof parsedXml.description === "string"
|
|
1957
|
+
? parsedXml.description
|
|
1958
|
+
: "") || "";
|
|
1959
|
+
processedAttachment.title =
|
|
1960
|
+
(typeof parsedXml.title === "string"
|
|
1961
|
+
? parsedXml.title
|
|
1962
|
+
: "Image") || "Image";
|
|
1963
|
+
processedAttachment.text =
|
|
1964
|
+
(typeof parsedXml.text === "string" ? parsedXml.text : "") ||
|
|
1965
|
+
(typeof parsedXml.description === "string"
|
|
1966
|
+
? parsedXml.description
|
|
1967
|
+
: "") ||
|
|
1968
|
+
"";
|
|
1969
|
+
runtime.logger.debug({
|
|
1970
|
+
src: "service:message",
|
|
1971
|
+
descriptionPreview: processedAttachment.description?.substring(0, 100),
|
|
1972
|
+
}, "Generated image description");
|
|
1973
|
+
}
|
|
1974
|
+
else {
|
|
1975
|
+
// Fallback: Try simple regex parsing
|
|
1976
|
+
const responseStr = response;
|
|
1977
|
+
const titleMatch = responseStr.match(/<title>([^<]+)<\/title>/);
|
|
1978
|
+
const descMatch = responseStr.match(/<description>([^<]+)<\/description>/);
|
|
1979
|
+
const textMatch = responseStr.match(/<text>([^<]+)<\/text>/);
|
|
1980
|
+
if (titleMatch || descMatch || textMatch) {
|
|
1981
|
+
processedAttachment.title = titleMatch?.[1] || "Image";
|
|
1982
|
+
processedAttachment.description = descMatch?.[1] || "";
|
|
1983
|
+
processedAttachment.text =
|
|
1984
|
+
textMatch?.[1] || descMatch?.[1] || "";
|
|
1985
|
+
runtime.logger.debug({
|
|
1986
|
+
src: "service:message",
|
|
1987
|
+
descriptionPreview: processedAttachment.description?.substring(0, 100),
|
|
1988
|
+
}, "Used fallback XML parsing for description");
|
|
1989
|
+
}
|
|
1990
|
+
else {
|
|
1991
|
+
runtime.logger.warn({ src: "service:message" }, "Failed to parse XML response for image description");
|
|
1992
|
+
}
|
|
1993
|
+
}
|
|
1994
|
+
}
|
|
1995
|
+
else if (response &&
|
|
1996
|
+
typeof response === "object" &&
|
|
1997
|
+
"description" in response) {
|
|
1998
|
+
// Handle object responses for backwards compatibility
|
|
1999
|
+
const objResponse = response;
|
|
2000
|
+
processedAttachment.description = objResponse.description;
|
|
2001
|
+
processedAttachment.title = objResponse.title || "Image";
|
|
2002
|
+
processedAttachment.text = objResponse.description;
|
|
2003
|
+
runtime.logger.debug({
|
|
2004
|
+
src: "service:message",
|
|
2005
|
+
descriptionPreview: processedAttachment.description?.substring(0, 100),
|
|
2006
|
+
}, "Generated image description");
|
|
2007
|
+
}
|
|
2008
|
+
else {
|
|
2009
|
+
runtime.logger.warn({ src: "service:message" }, "Unexpected response format for image description");
|
|
2010
|
+
}
|
|
2011
|
+
}
|
|
2012
|
+
else if (attachment.contentType === ContentType.DOCUMENT &&
|
|
2013
|
+
!attachment.text) {
|
|
2014
|
+
const docFetch = runtime.fetch ?? globalThis.fetch;
|
|
2015
|
+
const res = await docFetch(url);
|
|
2016
|
+
if (!res.ok)
|
|
2017
|
+
throw new Error(`Failed to fetch document: ${res.statusText}`);
|
|
2018
|
+
const contentType = res.headers.get("content-type") || "";
|
|
2019
|
+
const isPlainText = contentType.startsWith("text/plain");
|
|
2020
|
+
if (isPlainText) {
|
|
2021
|
+
runtime.logger.debug({ src: "service:message", documentUrl: attachment.url }, "Processing plain text document");
|
|
2022
|
+
const textContent = await res.text();
|
|
2023
|
+
processedAttachment.text = textContent;
|
|
2024
|
+
processedAttachment.title =
|
|
2025
|
+
processedAttachment.title || "Text File";
|
|
2026
|
+
runtime.logger.debug({
|
|
2027
|
+
src: "service:message",
|
|
2028
|
+
textPreview: processedAttachment.text?.substring(0, 100),
|
|
2029
|
+
}, "Extracted text content");
|
|
2030
|
+
}
|
|
2031
|
+
else {
|
|
2032
|
+
runtime.logger.warn({ src: "service:message", contentType }, "Skipping non-plain-text document");
|
|
2033
|
+
}
|
|
2034
|
+
}
|
|
2035
|
+
else if (attachment.contentType === ContentType.AUDIO &&
|
|
2036
|
+
!attachment.text) {
|
|
2037
|
+
runtime.logger.debug({ src: "service:message", audioUrl: attachment.url }, "Transcribing audio attachment");
|
|
2038
|
+
try {
|
|
2039
|
+
let transcriptionInput = url;
|
|
2040
|
+
const audioFetch = runtime.fetch ?? globalThis.fetch;
|
|
2041
|
+
// For local/internal URLs, fetch the audio as a buffer
|
|
2042
|
+
if (!isRemote) {
|
|
2043
|
+
const res = await audioFetch(url);
|
|
2044
|
+
if (!res.ok)
|
|
2045
|
+
throw new Error(`Failed to fetch audio: ${res.statusText}`);
|
|
2046
|
+
const arrayBuffer = await res.arrayBuffer();
|
|
2047
|
+
transcriptionInput = Buffer.from(arrayBuffer);
|
|
2048
|
+
}
|
|
2049
|
+
const transcript = await runtime.useModel(ModelType.TRANSCRIPTION, transcriptionInput);
|
|
2050
|
+
if (typeof transcript === "string" && transcript.trim()) {
|
|
2051
|
+
processedAttachment.text = transcript.trim();
|
|
2052
|
+
processedAttachment.title = processedAttachment.title || "Audio";
|
|
2053
|
+
processedAttachment.description = `Transcript: ${transcript.trim()}`;
|
|
2054
|
+
runtime.logger.debug({
|
|
2055
|
+
src: "service:message",
|
|
2056
|
+
transcriptPreview: processedAttachment.text?.substring(0, 100),
|
|
2057
|
+
}, "Transcribed audio attachment");
|
|
2058
|
+
}
|
|
2059
|
+
}
|
|
2060
|
+
catch (err) {
|
|
2061
|
+
runtime.logger.warn({ src: "service:message", err }, "Audio transcription failed, continuing without transcript");
|
|
2062
|
+
}
|
|
2063
|
+
}
|
|
2064
|
+
else if (attachment.contentType === ContentType.VIDEO &&
|
|
2065
|
+
!attachment.text) {
|
|
2066
|
+
runtime.logger.debug({ src: "service:message", videoUrl: attachment.url }, "Transcribing video attachment");
|
|
2067
|
+
try {
|
|
2068
|
+
let transcriptionInput = url;
|
|
2069
|
+
const videoFetch = runtime.fetch ?? globalThis.fetch;
|
|
2070
|
+
// For local/internal URLs, fetch the video as a buffer
|
|
2071
|
+
if (!isRemote) {
|
|
2072
|
+
const res = await videoFetch(url);
|
|
2073
|
+
if (!res.ok)
|
|
2074
|
+
throw new Error(`Failed to fetch video: ${res.statusText}`);
|
|
2075
|
+
const arrayBuffer = await res.arrayBuffer();
|
|
2076
|
+
transcriptionInput = Buffer.from(arrayBuffer);
|
|
2077
|
+
}
|
|
2078
|
+
const transcript = await runtime.useModel(ModelType.TRANSCRIPTION, transcriptionInput);
|
|
2079
|
+
if (typeof transcript === "string" && transcript.trim()) {
|
|
2080
|
+
processedAttachment.text = transcript.trim();
|
|
2081
|
+
processedAttachment.title = processedAttachment.title || "Video";
|
|
2082
|
+
processedAttachment.description = `Transcript: ${transcript.trim()}`;
|
|
2083
|
+
runtime.logger.debug({
|
|
2084
|
+
src: "service:message",
|
|
2085
|
+
transcriptPreview: processedAttachment.text?.substring(0, 100),
|
|
2086
|
+
}, "Transcribed video attachment");
|
|
2087
|
+
}
|
|
2088
|
+
}
|
|
2089
|
+
catch (err) {
|
|
2090
|
+
runtime.logger.warn({ src: "service:message", err }, "Video transcription failed, continuing without transcript");
|
|
2091
|
+
}
|
|
2092
|
+
}
|
|
2093
|
+
return processedAttachment;
|
|
2094
|
+
}));
|
|
2095
|
+
return processedAttachments;
|
|
2096
|
+
}
|
|
2097
|
+
async runPostActionContinuation(runtime, message, state, callback, opts, initialActionResults) {
|
|
2098
|
+
const contextRoutingStateValues = {
|
|
2099
|
+
[AVAILABLE_CONTEXTS_STATE_KEY]: state.values?.[AVAILABLE_CONTEXTS_STATE_KEY],
|
|
2100
|
+
[CONTEXT_ROUTING_STATE_KEY]: state.values?.[CONTEXT_ROUTING_STATE_KEY],
|
|
2101
|
+
};
|
|
2102
|
+
const taskCompletion = state.data?.taskCompletion;
|
|
2103
|
+
if (!message.id || initialActionResults.length === 0) {
|
|
2104
|
+
return {
|
|
2105
|
+
responseContent: null,
|
|
2106
|
+
responseMessages: [],
|
|
2107
|
+
state,
|
|
2108
|
+
mode: "none",
|
|
2109
|
+
};
|
|
2110
|
+
}
|
|
2111
|
+
const traceActionResults = [...initialActionResults];
|
|
2112
|
+
const responseMessages = [];
|
|
2113
|
+
let accumulatedState = state;
|
|
2114
|
+
let responseContent = null;
|
|
2115
|
+
for (let iterationCount = 0; iterationCount < opts.maxMultiStepIterations; iterationCount++) {
|
|
2116
|
+
accumulatedState = withTaskCompletion(withActionResults(await composeContinuationDecisionState(runtime, message, contextRoutingStateValues), traceActionResults), taskCompletion);
|
|
2117
|
+
const continuation = await this.runSingleShotCore(runtime, message, accumulatedState, opts, asUUID(v4()), resolvePromptAttachments(message.content.attachments), {
|
|
2118
|
+
prompt: runtime.character.templates?.postActionDecisionTemplate ||
|
|
2119
|
+
postActionDecisionTemplate,
|
|
2120
|
+
precomposedState: accumulatedState,
|
|
2121
|
+
failureStage: "preparing the follow-up reply after actions",
|
|
2122
|
+
});
|
|
2123
|
+
if (!continuation.responseContent) {
|
|
2124
|
+
runtime.logger.debug({ src: "service:message", iteration: iterationCount + 1 }, "Post-action continuation produced no response");
|
|
2125
|
+
break;
|
|
2126
|
+
}
|
|
2127
|
+
responseContent = continuation.responseContent;
|
|
2128
|
+
if (message.id) {
|
|
2129
|
+
responseContent.inReplyTo = createUniqueUuid(runtime, message.id);
|
|
2130
|
+
}
|
|
2131
|
+
if (responseContent.providers && responseContent.providers.length > 0) {
|
|
2132
|
+
accumulatedState = withActionResults(withContextRoutingValues(await runtime.composeState(message, responseContent.providers, false, false), contextRoutingStateValues), traceActionResults);
|
|
2133
|
+
}
|
|
2134
|
+
else {
|
|
2135
|
+
accumulatedState = withActionResults(continuation.state, traceActionResults);
|
|
2136
|
+
}
|
|
2137
|
+
accumulatedState = withTaskCompletion(accumulatedState, taskCompletion);
|
|
2138
|
+
if (continuation.responseMessages.length > 0) {
|
|
2139
|
+
for (const responseMemory of continuation.responseMessages) {
|
|
2140
|
+
responseMemory.content = responseContent;
|
|
2141
|
+
await runtime.createMemory(responseMemory, "messages");
|
|
2142
|
+
await this.emitMessageSent(runtime, responseMemory, message.content.source ?? "messageHandler");
|
|
2143
|
+
}
|
|
2144
|
+
responseMessages.push(...continuation.responseMessages);
|
|
2145
|
+
}
|
|
2146
|
+
if (continuation.mode === "simple") {
|
|
2147
|
+
if (callback) {
|
|
2148
|
+
if (responseContent.text) {
|
|
2149
|
+
responseContent.text = runtime.redactSecrets(responseContent.text);
|
|
2150
|
+
}
|
|
2151
|
+
await callback(responseContent);
|
|
2152
|
+
}
|
|
2153
|
+
break;
|
|
2154
|
+
}
|
|
2155
|
+
if (continuation.mode !== "actions") {
|
|
2156
|
+
break;
|
|
2157
|
+
}
|
|
2158
|
+
await runtime.processActions(message, continuation.responseMessages, accumulatedState, async (content) => {
|
|
2159
|
+
runtime.logger.debug({ src: "service:message", content }, "Post-action callback");
|
|
2160
|
+
if (responseContent) {
|
|
2161
|
+
responseContent.actionCallbacks = content;
|
|
2162
|
+
}
|
|
2163
|
+
if (callback) {
|
|
2164
|
+
return callback(content);
|
|
2165
|
+
}
|
|
2166
|
+
return [];
|
|
2167
|
+
}, { onStreamChunk: opts.onStreamChunk });
|
|
2168
|
+
if (!shouldContinueAfterActions(runtime, responseContent) ||
|
|
2169
|
+
suppressesPostActionContinuation(runtime, responseContent)) {
|
|
2170
|
+
break;
|
|
2171
|
+
}
|
|
2172
|
+
const latestActionResults = runtime.getActionResults(message.id);
|
|
2173
|
+
if (latestActionResults.length === 0) {
|
|
2174
|
+
runtime.logger.warn({ src: "service:message", iteration: iterationCount + 1 }, "Post-action continuation produced no new action results");
|
|
2175
|
+
break;
|
|
2176
|
+
}
|
|
2177
|
+
traceActionResults.push(...latestActionResults);
|
|
2178
|
+
}
|
|
2179
|
+
accumulatedState = withTaskCompletion(withActionResults(accumulatedState, traceActionResults), taskCompletion);
|
|
2180
|
+
return {
|
|
2181
|
+
responseContent,
|
|
2182
|
+
responseMessages,
|
|
2183
|
+
state: accumulatedState,
|
|
2184
|
+
mode: responseContent ? "simple" : "none",
|
|
2185
|
+
};
|
|
2186
|
+
}
|
|
2187
|
+
async runReflectionTaskContinuation(runtime, message, state, callback, opts, taskCompletion) {
|
|
2188
|
+
const contextRoutingStateValues = {
|
|
2189
|
+
[AVAILABLE_CONTEXTS_STATE_KEY]: state.values?.[AVAILABLE_CONTEXTS_STATE_KEY],
|
|
2190
|
+
[CONTEXT_ROUTING_STATE_KEY]: state.values?.[CONTEXT_ROUTING_STATE_KEY],
|
|
2191
|
+
};
|
|
2192
|
+
const initialActionResults = message.id
|
|
2193
|
+
? runtime.getActionResults(message.id)
|
|
2194
|
+
: [];
|
|
2195
|
+
let accumulatedState = withTaskCompletion(withActionResults(await composeContinuationDecisionState(runtime, message, contextRoutingStateValues), initialActionResults), taskCompletion);
|
|
2196
|
+
const continuation = await this.runSingleShotCore(runtime, message, accumulatedState, opts, asUUID(v4()), resolvePromptAttachments(message.content.attachments), {
|
|
2197
|
+
prompt: runtime.character.templates?.postActionDecisionTemplate ||
|
|
2198
|
+
postActionDecisionTemplate,
|
|
2199
|
+
precomposedState: accumulatedState,
|
|
2200
|
+
failureStage: "continuing after reflection marked the task incomplete",
|
|
2201
|
+
});
|
|
2202
|
+
if (!continuation.responseContent) {
|
|
2203
|
+
return {
|
|
2204
|
+
responseContent: null,
|
|
2205
|
+
responseMessages: [],
|
|
2206
|
+
state: accumulatedState,
|
|
2207
|
+
mode: "none",
|
|
2208
|
+
};
|
|
2209
|
+
}
|
|
2210
|
+
const responseMessages = [];
|
|
2211
|
+
const responseContent = continuation.responseContent;
|
|
2212
|
+
if (message.id) {
|
|
2213
|
+
responseContent.inReplyTo = createUniqueUuid(runtime, message.id);
|
|
2214
|
+
}
|
|
2215
|
+
if (responseContent.providers && responseContent.providers.length > 0) {
|
|
2216
|
+
accumulatedState = withTaskCompletion(withActionResults(withContextRoutingValues(await runtime.composeState(message, responseContent.providers, false, false), contextRoutingStateValues), initialActionResults), taskCompletion);
|
|
2217
|
+
}
|
|
2218
|
+
else {
|
|
2219
|
+
accumulatedState = withTaskCompletion(withActionResults(continuation.state, initialActionResults), taskCompletion);
|
|
2220
|
+
}
|
|
2221
|
+
if (continuation.responseMessages.length > 0) {
|
|
2222
|
+
for (const responseMemory of continuation.responseMessages) {
|
|
2223
|
+
responseMemory.content = responseContent;
|
|
2224
|
+
await runtime.createMemory(responseMemory, "messages");
|
|
2225
|
+
await this.emitMessageSent(runtime, responseMemory, message.content.source ?? "messageHandler");
|
|
2226
|
+
}
|
|
2227
|
+
responseMessages.push(...continuation.responseMessages);
|
|
2228
|
+
}
|
|
2229
|
+
if (continuation.mode === "simple") {
|
|
2230
|
+
if (callback) {
|
|
2231
|
+
if (responseContent.text) {
|
|
2232
|
+
responseContent.text = runtime.redactSecrets(responseContent.text);
|
|
2233
|
+
}
|
|
2234
|
+
await callback(responseContent);
|
|
2235
|
+
}
|
|
2236
|
+
return {
|
|
2237
|
+
responseContent,
|
|
2238
|
+
responseMessages,
|
|
2239
|
+
state: accumulatedState,
|
|
2240
|
+
mode: "simple",
|
|
2241
|
+
};
|
|
2242
|
+
}
|
|
2243
|
+
if (continuation.mode !== "actions") {
|
|
2244
|
+
return {
|
|
2245
|
+
responseContent,
|
|
2246
|
+
responseMessages,
|
|
2247
|
+
state: accumulatedState,
|
|
2248
|
+
mode: continuation.mode,
|
|
2249
|
+
};
|
|
2250
|
+
}
|
|
2251
|
+
await runtime.processActions(message, continuation.responseMessages, accumulatedState, async (content) => {
|
|
2252
|
+
runtime.logger.debug({ src: "service:message", content }, "Reflection continuation callback");
|
|
2253
|
+
responseContent.actionCallbacks = content;
|
|
2254
|
+
if (callback) {
|
|
2255
|
+
return callback(content);
|
|
2256
|
+
}
|
|
2257
|
+
return [];
|
|
2258
|
+
}, { onStreamChunk: opts.onStreamChunk });
|
|
2259
|
+
const latestActionResults = message.id
|
|
2260
|
+
? runtime.getActionResults(message.id)
|
|
2261
|
+
: [];
|
|
2262
|
+
accumulatedState = withTaskCompletion(withActionResults(accumulatedState, latestActionResults.length > 0
|
|
2263
|
+
? latestActionResults
|
|
2264
|
+
: initialActionResults), taskCompletion);
|
|
2265
|
+
if (latestActionResults.length > 0 &&
|
|
2266
|
+
shouldContinueAfterActions(runtime, responseContent) &&
|
|
2267
|
+
!suppressesPostActionContinuation(runtime, responseContent)) {
|
|
2268
|
+
return await this.runPostActionContinuation(runtime, message, accumulatedState, callback, opts, latestActionResults);
|
|
2269
|
+
}
|
|
2270
|
+
return {
|
|
2271
|
+
responseContent,
|
|
2272
|
+
responseMessages,
|
|
2273
|
+
state: accumulatedState,
|
|
2274
|
+
mode: "actions",
|
|
2275
|
+
};
|
|
2276
|
+
}
|
|
2277
|
+
/**
|
|
2278
|
+
* Single-shot strategy: one LLM call to generate response
|
|
2279
|
+
* Uses dynamicPromptExecFromState for validation-aware structured output
|
|
2280
|
+
*/
|
|
2281
|
+
async runSingleShotCore(runtime, message, state, opts, responseId, promptAttachments, overrides) {
|
|
2282
|
+
state =
|
|
2283
|
+
overrides?.precomposedState ??
|
|
2284
|
+
(await runtime.composeState(message, ["ACTIONS"], false, false));
|
|
2285
|
+
if (!state.values?.actionNames) {
|
|
2286
|
+
runtime.logger.warn({ src: "service:message" }, "actionNames data missing from state");
|
|
2287
|
+
}
|
|
2288
|
+
// Self-modification requests already have a deterministic action path.
|
|
2289
|
+
// Skip the planner so group-chat style updates reliably hit MODIFY_CHARACTER.
|
|
2290
|
+
if (isExplicitSelfModificationRequest(message.content.text || "")) {
|
|
2291
|
+
const modifyCharacterAction = runtime.actions.find((action) => action.name === "MODIFY_CHARACTER");
|
|
2292
|
+
const canHandleSelfModification = await modifyCharacterAction?.validate?.(runtime, message, state);
|
|
2293
|
+
if (canHandleSelfModification) {
|
|
2294
|
+
const responseContent = {
|
|
2295
|
+
thought: "Directly route explicit self-modification request to MODIFY_CHARACTER.",
|
|
2296
|
+
actions: ["MODIFY_CHARACTER"],
|
|
2297
|
+
providers: [],
|
|
2298
|
+
text: "",
|
|
2299
|
+
simple: false,
|
|
2300
|
+
responseId,
|
|
2301
|
+
};
|
|
2302
|
+
const responseMessages = [
|
|
2303
|
+
{
|
|
2304
|
+
id: responseId,
|
|
2305
|
+
entityId: runtime.agentId,
|
|
2306
|
+
agentId: runtime.agentId,
|
|
2307
|
+
content: responseContent,
|
|
2308
|
+
roomId: message.roomId,
|
|
2309
|
+
createdAt: Date.now(),
|
|
2310
|
+
},
|
|
2311
|
+
];
|
|
2312
|
+
return {
|
|
2313
|
+
responseContent,
|
|
2314
|
+
responseMessages,
|
|
2315
|
+
state,
|
|
2316
|
+
mode: "actions",
|
|
2317
|
+
};
|
|
2318
|
+
}
|
|
2319
|
+
}
|
|
2320
|
+
let responseContent = null;
|
|
2321
|
+
// Create streaming context for retry state tracking
|
|
2322
|
+
const streamingExtractor = opts.onStreamChunk
|
|
2323
|
+
? new MarkableExtractor()
|
|
2324
|
+
: undefined;
|
|
2325
|
+
const streamingCtx = streamingExtractor && opts.onStreamChunk
|
|
2326
|
+
? createStreamingContext(streamingExtractor, opts.onStreamChunk, responseId)
|
|
2327
|
+
: undefined;
|
|
2328
|
+
// Resolve the template prompt once so it's available for both the primary
|
|
2329
|
+
// call and any follow-up repair prompts (e.g. parameter repair).
|
|
2330
|
+
const prompt = overrides?.prompt ||
|
|
2331
|
+
runtime.character.templates?.messageHandlerTemplate ||
|
|
2332
|
+
messageHandlerTemplate;
|
|
2333
|
+
// Use dynamicPromptExecFromState for structured output with validation
|
|
2334
|
+
setTrajectoryPurpose("response");
|
|
2335
|
+
const parsedXml = await runtime.dynamicPromptExecFromState({
|
|
2336
|
+
state,
|
|
2337
|
+
params: {
|
|
2338
|
+
prompt,
|
|
2339
|
+
...(promptAttachments ? { attachments: promptAttachments } : {}),
|
|
2340
|
+
},
|
|
2341
|
+
schema: [
|
|
2342
|
+
// WHY validateField: false on non-streamed fields?
|
|
2343
|
+
// At validation level 1, each field gets validation codes by default.
|
|
2344
|
+
// If a non-streamed field's code is corrupted, we'd retry unnecessarily.
|
|
2345
|
+
// By opting out, we reduce token overhead AND avoid false failures.
|
|
2346
|
+
{
|
|
2347
|
+
field: "thought",
|
|
2348
|
+
description: "Your internal reasoning about the message and what to do",
|
|
2349
|
+
validateField: false,
|
|
2350
|
+
streamField: false,
|
|
2351
|
+
},
|
|
2352
|
+
{
|
|
2353
|
+
field: "actions",
|
|
2354
|
+
description: "Ordered action entries. For XML, use one or more <action><name>ACTION_NAME</name><params>...</params></action> blocks inside <actions>.",
|
|
2355
|
+
required: false,
|
|
2356
|
+
validateField: false,
|
|
2357
|
+
streamField: false,
|
|
2358
|
+
},
|
|
2359
|
+
// WHY streamField: true? This is the user-facing output - stream it!
|
|
2360
|
+
// WHY validateField default? At level 1, we want to validate text integrity
|
|
2361
|
+
{
|
|
2362
|
+
field: "text",
|
|
2363
|
+
description: "The text response to send to the user",
|
|
2364
|
+
streamField: true,
|
|
2365
|
+
},
|
|
2366
|
+
{
|
|
2367
|
+
field: "simple",
|
|
2368
|
+
description: "Whether this is a simple response (true/false)",
|
|
2369
|
+
validateField: false,
|
|
2370
|
+
streamField: false,
|
|
2371
|
+
},
|
|
2372
|
+
],
|
|
2373
|
+
options: {
|
|
2374
|
+
modelType: ModelType.ACTION_PLANNER,
|
|
2375
|
+
preferredEncapsulation: "xml",
|
|
2376
|
+
maxRetries: opts.maxRetries,
|
|
2377
|
+
// Stream through the filtered context callback for real-time output
|
|
2378
|
+
onStreamChunk: streamingCtx?.onStreamChunk,
|
|
2379
|
+
},
|
|
2380
|
+
});
|
|
2381
|
+
runtime.logger.debug({ src: "service:message", parsedXml }, "Parsed Response Content");
|
|
2382
|
+
if (parsedXml) {
|
|
2383
|
+
// Mark streaming as complete now that we have a valid response
|
|
2384
|
+
streamingExtractor?.markComplete();
|
|
2385
|
+
const finalActions = normalizePlannerActions(parsedXml, runtime);
|
|
2386
|
+
responseContent = {
|
|
2387
|
+
...parsedXml,
|
|
2388
|
+
thought: String(parsedXml.thought || ""),
|
|
2389
|
+
actions: finalActions,
|
|
2390
|
+
providers: [],
|
|
2391
|
+
text: String(parsedXml.text || ""),
|
|
2392
|
+
simple: parsedXml.simple === true || parsedXml.simple === "true",
|
|
2393
|
+
};
|
|
2394
|
+
}
|
|
2395
|
+
else {
|
|
2396
|
+
// dynamicPromptExecFromState returned null - use streamed text if available
|
|
2397
|
+
const streamedText = streamingCtx?.getStreamedText?.() || "";
|
|
2398
|
+
const isTextComplete = streamingCtx?.isComplete?.() ?? false;
|
|
2399
|
+
if (isTextComplete && streamedText) {
|
|
2400
|
+
runtime.logger.info({
|
|
2401
|
+
src: "service:message",
|
|
2402
|
+
streamedTextLength: streamedText.length,
|
|
2403
|
+
streamedTextPreview: streamedText.substring(0, 100),
|
|
2404
|
+
}, "Text extraction complete - using streamed text");
|
|
2405
|
+
responseContent = {
|
|
2406
|
+
thought: "Response generated via streaming",
|
|
2407
|
+
actions: ["REPLY"],
|
|
2408
|
+
providers: [],
|
|
2409
|
+
text: streamedText,
|
|
2410
|
+
simple: true,
|
|
2411
|
+
};
|
|
2412
|
+
}
|
|
2413
|
+
else if (streamedText && !isTextComplete) {
|
|
2414
|
+
// Text was cut mid-stream - attempt continuation
|
|
2415
|
+
runtime.logger.debug({
|
|
2416
|
+
src: "service:message",
|
|
2417
|
+
streamedTextLength: streamedText.length,
|
|
2418
|
+
streamedTextPreview: streamedText.substring(0, 100),
|
|
2419
|
+
}, "Text cut mid-stream - attempting continuation");
|
|
2420
|
+
// Reset extractor for fresh streaming of continuation
|
|
2421
|
+
streamingCtx?.reset?.();
|
|
2422
|
+
// Build continuation prompt with full context (reuses `prompt` from outer scope)
|
|
2423
|
+
const escapedStreamedText = escapeHandlebars(streamedText);
|
|
2424
|
+
const continuationPrompt = `${prompt}
|
|
2425
|
+
|
|
2426
|
+
[CONTINUATION REQUIRED]
|
|
2427
|
+
Your previous response was cut off. The user already received this text:
|
|
2428
|
+
"${escapedStreamedText}"
|
|
2429
|
+
|
|
2430
|
+
Continue EXACTLY from where you left off. Do NOT repeat what was already said.
|
|
2431
|
+
Output ONLY the continuation, starting immediately after the last character above.`;
|
|
2432
|
+
const continuationParsed = await runtime.dynamicPromptExecFromState({
|
|
2433
|
+
state,
|
|
2434
|
+
params: {
|
|
2435
|
+
prompt: continuationPrompt,
|
|
2436
|
+
...(promptAttachments ? { attachments: promptAttachments } : {}),
|
|
2437
|
+
},
|
|
2438
|
+
schema: [
|
|
2439
|
+
{
|
|
2440
|
+
field: "text",
|
|
2441
|
+
description: "Continuation of response",
|
|
2442
|
+
required: true,
|
|
2443
|
+
streamField: true,
|
|
2444
|
+
},
|
|
2445
|
+
],
|
|
2446
|
+
options: {
|
|
2447
|
+
modelType: ModelType.ACTION_PLANNER,
|
|
2448
|
+
preferredEncapsulation: "xml",
|
|
2449
|
+
contextCheckLevel: 0, // Fast mode for continuations - we trust the model
|
|
2450
|
+
onStreamChunk: streamingCtx?.onStreamChunk,
|
|
2451
|
+
},
|
|
2452
|
+
});
|
|
2453
|
+
const continuationText = String(continuationParsed?.text || "");
|
|
2454
|
+
const fullText = streamedText + continuationText;
|
|
2455
|
+
responseContent = {
|
|
2456
|
+
thought: "Response completed via continuation",
|
|
2457
|
+
actions: ["REPLY"],
|
|
2458
|
+
providers: [],
|
|
2459
|
+
text: fullText,
|
|
2460
|
+
simple: true,
|
|
2461
|
+
};
|
|
2462
|
+
}
|
|
2463
|
+
else {
|
|
2464
|
+
runtime.logger.warn({ src: "service:message" }, "dynamicPromptExecFromState returned null");
|
|
2465
|
+
return await this.buildStructuredFailureReply(runtime, message, state, responseId, overrides?.failureStage ?? "preparing the reply");
|
|
2466
|
+
}
|
|
2467
|
+
}
|
|
2468
|
+
if (!responseContent) {
|
|
2469
|
+
return {
|
|
2470
|
+
responseContent: null,
|
|
2471
|
+
responseMessages: [],
|
|
2472
|
+
state,
|
|
2473
|
+
mode: "none",
|
|
2474
|
+
};
|
|
2475
|
+
}
|
|
2476
|
+
// Action parameter repair (Python parity):
|
|
2477
|
+
// If the model selected actions with required parameters but omitted <params>,
|
|
2478
|
+
// do a second pass asking for ONLY a <params> block.
|
|
2479
|
+
const requiredByAction = new Map();
|
|
2480
|
+
const actionByName = new Map();
|
|
2481
|
+
for (const action of runtime.actions) {
|
|
2482
|
+
const normalizedName = action.name.trim().toUpperCase();
|
|
2483
|
+
if (normalizedName) {
|
|
2484
|
+
actionByName.set(normalizedName, action);
|
|
2485
|
+
}
|
|
2486
|
+
}
|
|
2487
|
+
for (const a of responseContent.actions ?? []) {
|
|
2488
|
+
const actionName = typeof a === "string" ? a.trim().toUpperCase() : "";
|
|
2489
|
+
if (!actionName)
|
|
2490
|
+
continue;
|
|
2491
|
+
const actionDef = actionByName.get(actionName);
|
|
2492
|
+
const required = actionDef?.parameters?.filter((p) => p.required).map((p) => p.name) ??
|
|
2493
|
+
[];
|
|
2494
|
+
if (required.length > 0) {
|
|
2495
|
+
requiredByAction.set(actionName, required);
|
|
2496
|
+
}
|
|
2497
|
+
}
|
|
2498
|
+
const existingParams = parseActionParams(responseContent.params);
|
|
2499
|
+
const missingRequiredParams = () => {
|
|
2500
|
+
for (const [actionName, required] of requiredByAction) {
|
|
2501
|
+
const params = existingParams.get(actionName);
|
|
2502
|
+
if (!params)
|
|
2503
|
+
return true;
|
|
2504
|
+
for (const key of required) {
|
|
2505
|
+
if (!(key in params))
|
|
2506
|
+
return true;
|
|
2507
|
+
}
|
|
2508
|
+
}
|
|
2509
|
+
return false;
|
|
2510
|
+
};
|
|
2511
|
+
if (requiredByAction.size > 0 && missingRequiredParams()) {
|
|
2512
|
+
const requirementLines = Array.from(requiredByAction.entries())
|
|
2513
|
+
.map(([a, req]) => `- ${a}: ${req.join(", ")}`)
|
|
2514
|
+
.join("\n");
|
|
2515
|
+
const repairPrompt = [
|
|
2516
|
+
prompt,
|
|
2517
|
+
"",
|
|
2518
|
+
"# Parameter Repair",
|
|
2519
|
+
"You selected actions that require parameters but did not include a complete params object.",
|
|
2520
|
+
"Return ONLY XML with a top-level <params> field.",
|
|
2521
|
+
"Example:",
|
|
2522
|
+
"<response>",
|
|
2523
|
+
" <params>",
|
|
2524
|
+
" <SEND_MESSAGE>",
|
|
2525
|
+
" <target>room-or-channel-id</target>",
|
|
2526
|
+
" <text>message body</text>",
|
|
2527
|
+
" </SEND_MESSAGE>",
|
|
2528
|
+
" </params>",
|
|
2529
|
+
"</response>",
|
|
2530
|
+
"",
|
|
2531
|
+
"Required parameters by action:",
|
|
2532
|
+
requirementLines,
|
|
2533
|
+
"",
|
|
2534
|
+
"Do not include thought, actions, providers, text, or any other fields.",
|
|
2535
|
+
].join("\n");
|
|
2536
|
+
const repairResponse = await runtime.useModel(ModelType.TEXT_LARGE, {
|
|
2537
|
+
prompt: repairPrompt,
|
|
2538
|
+
});
|
|
2539
|
+
const repairParsed = parseKeyValueXml(repairResponse);
|
|
2540
|
+
if (repairParsed?.params) {
|
|
2541
|
+
responseContent.params = repairParsed.params;
|
|
2542
|
+
}
|
|
2543
|
+
}
|
|
2544
|
+
// Benchmark mode (Python parity): force action-based loop when benchmark context is present.
|
|
2545
|
+
const benchmarkMode = state.values.benchmark_has_context === true;
|
|
2546
|
+
if (benchmarkMode) {
|
|
2547
|
+
if (!responseContent.actions || responseContent.actions.length === 0) {
|
|
2548
|
+
responseContent.actions = ["REPLY"];
|
|
2549
|
+
}
|
|
2550
|
+
if (!responseContent.providers ||
|
|
2551
|
+
responseContent.providers.length === 0) {
|
|
2552
|
+
responseContent.providers = ["CONTEXT_BENCH"];
|
|
2553
|
+
}
|
|
2554
|
+
// Suppress any direct planner answer; the REPLY action should generate final output.
|
|
2555
|
+
if (responseContent.actions.some((a) => a.toUpperCase() === "REPLY")) {
|
|
2556
|
+
responseContent.text = "";
|
|
2557
|
+
}
|
|
2558
|
+
}
|
|
2559
|
+
// LLM terminal-control ambiguity handling
|
|
2560
|
+
if (responseContent.actions && responseContent.actions.length > 1) {
|
|
2561
|
+
const isIgnore = (a) => typeof a === "string" && a.toUpperCase() === "IGNORE";
|
|
2562
|
+
const isStop = (a) => typeof a === "string" && a.toUpperCase() === "STOP";
|
|
2563
|
+
const hasIgnore = responseContent.actions.some(isIgnore);
|
|
2564
|
+
const hasStop = responseContent.actions.some(isStop);
|
|
2565
|
+
if (hasIgnore) {
|
|
2566
|
+
if (!responseContent.text || responseContent.text.trim() === "") {
|
|
2567
|
+
responseContent.actions = ["IGNORE"];
|
|
2568
|
+
}
|
|
2569
|
+
else {
|
|
2570
|
+
const filtered = responseContent.actions.filter((a) => !isIgnore(a));
|
|
2571
|
+
responseContent.actions = filtered.length ? filtered : ["REPLY"];
|
|
2572
|
+
}
|
|
2573
|
+
}
|
|
2574
|
+
if (hasStop) {
|
|
2575
|
+
const filtered = responseContent.actions.filter((a) => !isStop(a));
|
|
2576
|
+
responseContent.actions = filtered.length ? filtered : ["STOP"];
|
|
2577
|
+
}
|
|
2578
|
+
}
|
|
2579
|
+
// Some actions are intended to provide the only grounded user-facing answer.
|
|
2580
|
+
// If the planner emits both REPLY/text and one of those actions, drop the
|
|
2581
|
+
// speculative planner text before persisting/sending the initial assistant turn.
|
|
2582
|
+
stripPlannerReplyForSuppressiveActions(runtime, responseContent);
|
|
2583
|
+
// Automatically determine if response is simple
|
|
2584
|
+
const isSimple = isSimpleReplyResponse(responseContent);
|
|
2585
|
+
const isStop = isStopResponse(responseContent);
|
|
2586
|
+
responseContent.simple = isSimple;
|
|
2587
|
+
// Include message ID for streaming coordination (so broadcast uses same ID)
|
|
2588
|
+
responseContent.responseId = responseId;
|
|
2589
|
+
const responseMessages = [
|
|
2590
|
+
{
|
|
2591
|
+
id: responseId,
|
|
2592
|
+
entityId: runtime.agentId,
|
|
2593
|
+
agentId: runtime.agentId,
|
|
2594
|
+
content: responseContent,
|
|
2595
|
+
roomId: message.roomId,
|
|
2596
|
+
createdAt: Date.now(),
|
|
2597
|
+
},
|
|
2598
|
+
];
|
|
2599
|
+
return {
|
|
2600
|
+
responseContent,
|
|
2601
|
+
responseMessages,
|
|
2602
|
+
state,
|
|
2603
|
+
mode: isStop
|
|
2604
|
+
? "none"
|
|
2605
|
+
: isSimple && responseContent.text
|
|
2606
|
+
? "simple"
|
|
2607
|
+
: "actions",
|
|
2608
|
+
};
|
|
2609
|
+
}
|
|
2610
|
+
async buildStructuredFailureReply(runtime, message, state, responseId, stage) {
|
|
2611
|
+
const failure = getStructuredOutputFailure(state);
|
|
2612
|
+
const recentMessages = typeof state.values?.recentMessages === "string" &&
|
|
2613
|
+
state.values.recentMessages.trim().length > 0
|
|
2614
|
+
? state.values.recentMessages
|
|
2615
|
+
: typeof state.text === "string" && state.text.trim().length > 0
|
|
2616
|
+
? state.text
|
|
2617
|
+
: typeof message.content.text === "string"
|
|
2618
|
+
? message.content.text
|
|
2619
|
+
: "(unavailable)";
|
|
2620
|
+
const actionResults = Array.isArray(state.data?.actionResults)
|
|
2621
|
+
? state.data.actionResults
|
|
2622
|
+
: [];
|
|
2623
|
+
const failurePrompt = [
|
|
2624
|
+
"You are recovering from an internal structured-output failure while responding to a user.",
|
|
2625
|
+
"Write the next user-facing reply in plain language.",
|
|
2626
|
+
"",
|
|
2627
|
+
"Rules:",
|
|
2628
|
+
"- Explain what failed and why using only the diagnostics below.",
|
|
2629
|
+
"- Mention any completed or failed actions if action results are available.",
|
|
2630
|
+
"- Be transparent, concise, and avoid inventing causes.",
|
|
2631
|
+
"- If the model returned malformed XML, TOON, or JSON, say that clearly.",
|
|
2632
|
+
"- Suggest the most useful next step for the user.",
|
|
2633
|
+
"- Return only the reply text. No XML, JSON, TOON, bullet labels, or <think>.",
|
|
2634
|
+
"",
|
|
2635
|
+
`Failure Stage: ${stage}`,
|
|
2636
|
+
"",
|
|
2637
|
+
"Structured Failure Diagnostics:",
|
|
2638
|
+
summarizeStructuredOutputFailure(failure),
|
|
2639
|
+
"",
|
|
2640
|
+
"Recent Conversation:",
|
|
2641
|
+
recentMessages,
|
|
2642
|
+
"",
|
|
2643
|
+
"Action Results So Far:",
|
|
2644
|
+
typeof state.values?.actionResults === "string" &&
|
|
2645
|
+
state.values.actionResults.trim().length > 0
|
|
2646
|
+
? state.values.actionResults
|
|
2647
|
+
: "No action results available.",
|
|
2648
|
+
"",
|
|
2649
|
+
"Reply:",
|
|
2650
|
+
].join("\n");
|
|
2651
|
+
let replyText = "";
|
|
2652
|
+
for (const modelType of [
|
|
2653
|
+
ModelType.TEXT_LARGE,
|
|
2654
|
+
ModelType.RESPONSE_HANDLER,
|
|
2655
|
+
ModelType.TEXT_SMALL,
|
|
2656
|
+
ModelType.TEXT_NANO,
|
|
2657
|
+
]) {
|
|
2658
|
+
try {
|
|
2659
|
+
const response = await runtime.useModel(modelType, {
|
|
2660
|
+
prompt: failurePrompt,
|
|
2661
|
+
});
|
|
2662
|
+
if (typeof response !== "string") {
|
|
2663
|
+
continue;
|
|
2664
|
+
}
|
|
2665
|
+
const cleaned = response
|
|
2666
|
+
.replace(/<think>[\s\S]*?<\/think>/g, "")
|
|
2667
|
+
.trim();
|
|
2668
|
+
const looksStructuredReply = cleaned.startsWith("<") ||
|
|
2669
|
+
/^TOON\b/i.test(cleaned) ||
|
|
2670
|
+
/^(thought|text)\s*:/i.test(cleaned);
|
|
2671
|
+
const parsed = looksStructuredReply
|
|
2672
|
+
? parseKeyValueXml(cleaned)
|
|
2673
|
+
: null;
|
|
2674
|
+
replyText =
|
|
2675
|
+
typeof parsed?.text === "string" && parsed.text.trim().length > 0
|
|
2676
|
+
? parsed.text.trim()
|
|
2677
|
+
: cleaned;
|
|
2678
|
+
if (replyText) {
|
|
2679
|
+
break;
|
|
2680
|
+
}
|
|
2681
|
+
}
|
|
2682
|
+
catch (error) {
|
|
2683
|
+
runtime.logger.warn({
|
|
2684
|
+
src: "service:message",
|
|
2685
|
+
stage,
|
|
2686
|
+
modelType,
|
|
2687
|
+
error: error instanceof Error ? error.message : String(error),
|
|
2688
|
+
}, "Structured failure reply generation failed for model");
|
|
2689
|
+
}
|
|
2690
|
+
}
|
|
2691
|
+
if (!replyText) {
|
|
2692
|
+
const failureReason = failure?.parseError ??
|
|
2693
|
+
failure?.issues?.[0] ??
|
|
2694
|
+
"the model returned output that did not match the required format";
|
|
2695
|
+
replyText = [
|
|
2696
|
+
`I hit an internal parsing error while ${stage}.`,
|
|
2697
|
+
`Reason: ${failureReason}.`,
|
|
2698
|
+
summarizeActionResultsForUser(actionResults),
|
|
2699
|
+
"Please try again or ask me to retry the last step.",
|
|
2700
|
+
]
|
|
2701
|
+
.filter(Boolean)
|
|
2702
|
+
.join(" ");
|
|
2703
|
+
}
|
|
2704
|
+
replyText = runtime.redactSecrets(truncateToCompleteSentence(replyText.trim(), 2000));
|
|
2705
|
+
const responseContent = {
|
|
2706
|
+
thought: `Explain the structured-output failure during ${stage}.`,
|
|
2707
|
+
actions: ["REPLY"],
|
|
2708
|
+
providers: [],
|
|
2709
|
+
text: replyText,
|
|
2710
|
+
simple: true,
|
|
2711
|
+
responseId,
|
|
2712
|
+
};
|
|
2713
|
+
const responseMessages = [
|
|
2714
|
+
{
|
|
2715
|
+
id: responseId,
|
|
2716
|
+
entityId: runtime.agentId,
|
|
2717
|
+
agentId: runtime.agentId,
|
|
2718
|
+
content: responseContent,
|
|
2719
|
+
roomId: message.roomId,
|
|
2720
|
+
createdAt: Date.now(),
|
|
2721
|
+
},
|
|
2722
|
+
];
|
|
2723
|
+
return {
|
|
2724
|
+
responseContent,
|
|
2725
|
+
responseMessages,
|
|
2726
|
+
state,
|
|
2727
|
+
mode: "simple",
|
|
2728
|
+
};
|
|
2729
|
+
}
|
|
2730
|
+
/**
|
|
2731
|
+
* Multi-step strategy: iterative action execution with final summary
|
|
2732
|
+
*/
|
|
2733
|
+
async runMultiStepCore(runtime, message, state, callback, opts, responseId, promptAttachments, overrides) {
|
|
2734
|
+
const contextRoutingStateValues = {
|
|
2735
|
+
[AVAILABLE_CONTEXTS_STATE_KEY]: overrides?.precomposedState?.values?.[AVAILABLE_CONTEXTS_STATE_KEY],
|
|
2736
|
+
[CONTEXT_ROUTING_STATE_KEY]: overrides?.precomposedState?.values?.[CONTEXT_ROUTING_STATE_KEY],
|
|
2737
|
+
};
|
|
2738
|
+
const traceActionResult = [];
|
|
2739
|
+
let accumulatedState = state;
|
|
2740
|
+
let iterationCount = 0;
|
|
2741
|
+
while (iterationCount < opts.maxMultiStepIterations) {
|
|
2742
|
+
iterationCount++;
|
|
2743
|
+
runtime.logger.debug({
|
|
2744
|
+
src: "service:message",
|
|
2745
|
+
iteration: iterationCount,
|
|
2746
|
+
maxIterations: opts.maxMultiStepIterations,
|
|
2747
|
+
}, "Starting multi-step iteration");
|
|
2748
|
+
accumulatedState = withContextRoutingValues((await runtime.composeState(message, ["RECENT_MESSAGES", "ACTION_STATE", "PROVIDERS"], false, false)), contextRoutingStateValues);
|
|
2749
|
+
accumulatedState.data.actionResults = traceActionResult;
|
|
2750
|
+
// Use dynamicPromptExecFromState for structured decision output
|
|
2751
|
+
const parsedStep = await runtime.dynamicPromptExecFromState({
|
|
2752
|
+
state: accumulatedState,
|
|
2753
|
+
params: {
|
|
2754
|
+
prompt: runtime.character.templates?.multiStepDecisionTemplate ||
|
|
2755
|
+
multiStepDecisionTemplate,
|
|
2756
|
+
...(promptAttachments ? { attachments: promptAttachments } : {}),
|
|
2757
|
+
},
|
|
2758
|
+
schema: [
|
|
2759
|
+
// Multi-step decision loop - internal reasoning, no streaming needed
|
|
2760
|
+
// WHY: This is orchestration logic, not user-facing output
|
|
2761
|
+
{
|
|
2762
|
+
field: "thought",
|
|
2763
|
+
description: "Your reasoning for the selected providers and/or action, and how this step contributes to resolving the user's request",
|
|
2764
|
+
validateField: false,
|
|
2765
|
+
streamField: false,
|
|
2766
|
+
},
|
|
2767
|
+
{
|
|
2768
|
+
field: "providers",
|
|
2769
|
+
description: "Comma-separated list of providers to call to gather necessary data",
|
|
2770
|
+
validateField: false,
|
|
2771
|
+
streamField: false,
|
|
2772
|
+
},
|
|
2773
|
+
{
|
|
2774
|
+
field: "action",
|
|
2775
|
+
description: "Name of the action to execute after providers return (can be empty if no action is needed)",
|
|
2776
|
+
validateField: false,
|
|
2777
|
+
streamField: false,
|
|
2778
|
+
},
|
|
2779
|
+
// WHY parameters: Actions need input data. Without this field in the schema,
|
|
2780
|
+
// the LLM won't be instructed to output parameters, breaking action execution.
|
|
2781
|
+
{
|
|
2782
|
+
field: "params",
|
|
2783
|
+
description: "Optional TOON parameters for the selected action. Use a `params` object keyed by action name when the action needs input.",
|
|
2784
|
+
validateField: false,
|
|
2785
|
+
streamField: false,
|
|
2786
|
+
},
|
|
2787
|
+
{
|
|
2788
|
+
field: "isFinish",
|
|
2789
|
+
description: "true if the task is fully resolved and no further steps are needed, false otherwise",
|
|
2790
|
+
validateField: false,
|
|
2791
|
+
streamField: false,
|
|
2792
|
+
},
|
|
2793
|
+
],
|
|
2794
|
+
options: {
|
|
2795
|
+
modelType: ModelType.ACTION_PLANNER,
|
|
2796
|
+
preferredEncapsulation: "toon",
|
|
2797
|
+
},
|
|
2798
|
+
});
|
|
2799
|
+
if (!parsedStep) {
|
|
2800
|
+
runtime.logger.warn({ src: "service:message", iteration: iterationCount }, "Failed to parse multi-step result");
|
|
2801
|
+
traceActionResult.push({
|
|
2802
|
+
data: { actionName: "parse_error" },
|
|
2803
|
+
success: false,
|
|
2804
|
+
error: "Failed to parse step result",
|
|
2805
|
+
});
|
|
2806
|
+
return await this.buildStructuredFailureReply(runtime, message, withActionResults(accumulatedState, traceActionResult), responseId, "planning the next multi-step action");
|
|
2807
|
+
}
|
|
2808
|
+
const thought = typeof parsedStep.thought === "string" ? parsedStep.thought : undefined;
|
|
2809
|
+
// Handle providers as comma-separated string or array
|
|
2810
|
+
let providers = [];
|
|
2811
|
+
if (Array.isArray(parsedStep.providers)) {
|
|
2812
|
+
providers = parsedStep.providers;
|
|
2813
|
+
}
|
|
2814
|
+
else if (typeof parsedStep.providers === "string") {
|
|
2815
|
+
providers = parsedStep.providers
|
|
2816
|
+
.split(",")
|
|
2817
|
+
.map((p) => p.trim())
|
|
2818
|
+
.filter((p) => p.length > 0);
|
|
2819
|
+
}
|
|
2820
|
+
const action = typeof parsedStep.action === "string" ? parsedStep.action : undefined;
|
|
2821
|
+
const isFinish = parsedStep.isFinish;
|
|
2822
|
+
// Check for completion condition
|
|
2823
|
+
if (isFinish === "true" || isFinish === true) {
|
|
2824
|
+
runtime.logger.info({
|
|
2825
|
+
src: "service:message",
|
|
2826
|
+
agentId: runtime.agentId,
|
|
2827
|
+
iteration: iterationCount,
|
|
2828
|
+
}, "Multi-step task completed");
|
|
2829
|
+
if (callback) {
|
|
2830
|
+
await callback({
|
|
2831
|
+
text: "",
|
|
2832
|
+
thought: typeof thought === "string" ? thought : "",
|
|
2833
|
+
});
|
|
2834
|
+
}
|
|
2835
|
+
break;
|
|
2836
|
+
}
|
|
2837
|
+
// Validate that we have something to do
|
|
2838
|
+
const providersArray = Array.isArray(providers) ? providers : [];
|
|
2839
|
+
if ((!providersArray || providersArray.length === 0) && !action) {
|
|
2840
|
+
runtime.logger.warn({ src: "service:message", iteration: iterationCount }, "No providers or action specified, forcing completion");
|
|
2841
|
+
break;
|
|
2842
|
+
}
|
|
2843
|
+
// Total timeout for all providers running in parallel (configurable via PROVIDERS_TOTAL_TIMEOUT_MS env var)
|
|
2844
|
+
// Since providers run in parallel, this is the max wall-clock time allowed
|
|
2845
|
+
const PROVIDERS_TOTAL_TIMEOUT_MS = parseInt(String(runtime.getSetting("PROVIDERS_TOTAL_TIMEOUT_MS") || "1000"), 10);
|
|
2846
|
+
// Track which providers have completed (for timeout diagnostics)
|
|
2847
|
+
const completedProviders = new Set();
|
|
2848
|
+
const providerByName = new Map(runtime.providers.map((provider) => [provider.name, provider]));
|
|
2849
|
+
const providerPromises = [];
|
|
2850
|
+
for (const name of providersArray) {
|
|
2851
|
+
if (typeof name !== "string")
|
|
2852
|
+
continue;
|
|
2853
|
+
providerPromises.push((async (providerName) => {
|
|
2854
|
+
const provider = providerByName.get(providerName);
|
|
2855
|
+
if (!provider) {
|
|
2856
|
+
runtime.logger.warn({ src: "service:message", providerName }, "Provider not found");
|
|
2857
|
+
completedProviders.add(providerName);
|
|
2858
|
+
return {
|
|
2859
|
+
providerName,
|
|
2860
|
+
success: false,
|
|
2861
|
+
error: `Provider not found: ${providerName}`,
|
|
2862
|
+
};
|
|
2863
|
+
}
|
|
2864
|
+
try {
|
|
2865
|
+
const providerResult = await provider.get(runtime, message, state);
|
|
2866
|
+
completedProviders.add(providerName);
|
|
2867
|
+
if (!providerResult) {
|
|
2868
|
+
runtime.logger.warn({ src: "service:message", providerName }, "Provider returned no result");
|
|
2869
|
+
return {
|
|
2870
|
+
providerName,
|
|
2871
|
+
success: false,
|
|
2872
|
+
error: "Provider returned no result",
|
|
2873
|
+
};
|
|
2874
|
+
}
|
|
2875
|
+
const success = !!providerResult.text;
|
|
2876
|
+
return {
|
|
2877
|
+
providerName,
|
|
2878
|
+
success,
|
|
2879
|
+
text: success ? providerResult.text : undefined,
|
|
2880
|
+
error: success ? undefined : "Provider returned no result",
|
|
2881
|
+
};
|
|
2882
|
+
}
|
|
2883
|
+
catch (err) {
|
|
2884
|
+
completedProviders.add(providerName);
|
|
2885
|
+
const errorMsg = err instanceof Error ? err.message : String(err);
|
|
2886
|
+
runtime.logger.error({ src: "service:message", providerName, error: errorMsg }, "Provider execution failed");
|
|
2887
|
+
return { providerName, success: false, error: errorMsg };
|
|
2888
|
+
}
|
|
2889
|
+
})(name));
|
|
2890
|
+
}
|
|
2891
|
+
// Create timeout promise for provider execution (with cleanup)
|
|
2892
|
+
let timeoutId;
|
|
2893
|
+
const timeoutPromise = new Promise((resolve) => {
|
|
2894
|
+
timeoutId = setTimeout(() => resolve("timeout"), PROVIDERS_TOTAL_TIMEOUT_MS);
|
|
2895
|
+
});
|
|
2896
|
+
// Race between all providers completing and timeout
|
|
2897
|
+
const allProvidersPromise = Promise.allSettled(providerPromises);
|
|
2898
|
+
const raceResult = await Promise.race([
|
|
2899
|
+
allProvidersPromise,
|
|
2900
|
+
timeoutPromise,
|
|
2901
|
+
]);
|
|
2902
|
+
// Clear timeout if providers completed first
|
|
2903
|
+
if (timeoutId !== undefined) {
|
|
2904
|
+
clearTimeout(timeoutId);
|
|
2905
|
+
}
|
|
2906
|
+
// Check if providers took too long - abort pipeline and notify user
|
|
2907
|
+
if (raceResult === "timeout") {
|
|
2908
|
+
// Identify which providers were still pending when timeout hit
|
|
2909
|
+
const allProviderNames = providersArray.filter((name) => typeof name === "string");
|
|
2910
|
+
const pendingProviders = allProviderNames.filter((name) => !completedProviders.has(name));
|
|
2911
|
+
runtime.logger.error({
|
|
2912
|
+
src: "service:message",
|
|
2913
|
+
timeoutMs: PROVIDERS_TOTAL_TIMEOUT_MS,
|
|
2914
|
+
pendingProviders,
|
|
2915
|
+
completedProviders: Array.from(completedProviders),
|
|
2916
|
+
}, `Providers took too long (>${PROVIDERS_TOTAL_TIMEOUT_MS}ms) - slow providers: ${pendingProviders.join(", ")}`);
|
|
2917
|
+
if (callback) {
|
|
2918
|
+
await callback({
|
|
2919
|
+
text: "Providers took too long to respond. Please optimize your providers or use caching.",
|
|
2920
|
+
actions: [],
|
|
2921
|
+
thought: "Provider timeout - pipeline aborted",
|
|
2922
|
+
});
|
|
2923
|
+
}
|
|
2924
|
+
return {
|
|
2925
|
+
responseContent: null,
|
|
2926
|
+
responseMessages: [],
|
|
2927
|
+
state,
|
|
2928
|
+
mode: "none",
|
|
2929
|
+
};
|
|
2930
|
+
}
|
|
2931
|
+
// Providers completed in time
|
|
2932
|
+
const providerResults = raceResult;
|
|
2933
|
+
// Process results and notify via callback
|
|
2934
|
+
for (const result of providerResults) {
|
|
2935
|
+
if (result.status === "fulfilled") {
|
|
2936
|
+
const { providerName, success, text, error } = result.value;
|
|
2937
|
+
traceActionResult.push({
|
|
2938
|
+
data: { actionName: providerName },
|
|
2939
|
+
success,
|
|
2940
|
+
text,
|
|
2941
|
+
error,
|
|
2942
|
+
});
|
|
2943
|
+
if (callback) {
|
|
2944
|
+
await callback({
|
|
2945
|
+
text: `🔎 Provider executed: ${providerName}`,
|
|
2946
|
+
actions: [providerName],
|
|
2947
|
+
thought: typeof thought === "string" ? thought : "",
|
|
2948
|
+
});
|
|
2949
|
+
}
|
|
2950
|
+
}
|
|
2951
|
+
else {
|
|
2952
|
+
runtime.logger.error({
|
|
2953
|
+
src: "service:message",
|
|
2954
|
+
error: result.reason || "Unknown provider failure",
|
|
2955
|
+
}, "Unexpected provider promise rejection");
|
|
2956
|
+
}
|
|
2957
|
+
}
|
|
2958
|
+
if (action) {
|
|
2959
|
+
const actionContent = {
|
|
2960
|
+
text: `🔎 Executing action: ${action}`,
|
|
2961
|
+
actions: [action],
|
|
2962
|
+
thought: thought || "",
|
|
2963
|
+
};
|
|
2964
|
+
if (parsedStep && typeof parsedStep.params === "string") {
|
|
2965
|
+
actionContent.params = parsedStep.params;
|
|
2966
|
+
}
|
|
2967
|
+
await runtime.processActions(message, [
|
|
2968
|
+
{
|
|
2969
|
+
id: v4(),
|
|
2970
|
+
entityId: runtime.agentId,
|
|
2971
|
+
roomId: message.roomId,
|
|
2972
|
+
createdAt: Date.now(),
|
|
2973
|
+
content: actionContent,
|
|
2974
|
+
},
|
|
2975
|
+
], state, async () => {
|
|
2976
|
+
return [];
|
|
2977
|
+
});
|
|
2978
|
+
// Get cached action results from runtime
|
|
2979
|
+
const cachedState = runtime.stateCache.get(`${message.id}_action_results`);
|
|
2980
|
+
const cachedStateValues = cachedState?.values;
|
|
2981
|
+
const rawActionResults = cachedStateValues?.actionResults;
|
|
2982
|
+
const actionResults = Array.isArray(rawActionResults)
|
|
2983
|
+
? rawActionResults
|
|
2984
|
+
: [];
|
|
2985
|
+
const result = actionResults.length > 0 ? actionResults[0] : null;
|
|
2986
|
+
const success = result?.success ?? false;
|
|
2987
|
+
traceActionResult.push({
|
|
2988
|
+
data: { actionName: typeof action === "string" ? action : "unknown" },
|
|
2989
|
+
success,
|
|
2990
|
+
text: result && "text" in result && typeof result.text === "string"
|
|
2991
|
+
? result.text
|
|
2992
|
+
: undefined,
|
|
2993
|
+
values: result &&
|
|
2994
|
+
"values" in result &&
|
|
2995
|
+
typeof result.values === "object" &&
|
|
2996
|
+
result.values !== null
|
|
2997
|
+
? result.values
|
|
2998
|
+
: undefined,
|
|
2999
|
+
error: success
|
|
3000
|
+
? undefined
|
|
3001
|
+
: result && "text" in result && typeof result.text === "string"
|
|
3002
|
+
? result.text
|
|
3003
|
+
: undefined,
|
|
3004
|
+
});
|
|
3005
|
+
}
|
|
3006
|
+
}
|
|
3007
|
+
if (iterationCount >= opts.maxMultiStepIterations) {
|
|
3008
|
+
runtime.logger.warn({ src: "service:message", maxIterations: opts.maxMultiStepIterations }, "Reached maximum iterations, forcing completion");
|
|
3009
|
+
}
|
|
3010
|
+
accumulatedState = withContextRoutingValues((await runtime.composeState(message, ["RECENT_MESSAGES", "ACTION_STATE"], false, false)), contextRoutingStateValues);
|
|
3011
|
+
// Use dynamicPromptExecFromState for final summary generation
|
|
3012
|
+
// Stream the final summary for better UX
|
|
3013
|
+
const summary = await runtime.dynamicPromptExecFromState({
|
|
3014
|
+
state: accumulatedState,
|
|
3015
|
+
params: {
|
|
3016
|
+
prompt: runtime.character.templates?.multiStepSummaryTemplate ||
|
|
3017
|
+
multiStepSummaryTemplate,
|
|
3018
|
+
...(promptAttachments ? { attachments: promptAttachments } : {}),
|
|
3019
|
+
},
|
|
3020
|
+
schema: [
|
|
3021
|
+
{
|
|
3022
|
+
field: "thought",
|
|
3023
|
+
description: "Your internal reasoning about the summary",
|
|
3024
|
+
validateField: false,
|
|
3025
|
+
streamField: false,
|
|
3026
|
+
},
|
|
3027
|
+
// WHY streamField: true? This is the final user-facing output
|
|
3028
|
+
{
|
|
3029
|
+
field: "text",
|
|
3030
|
+
description: "The final summary message to send to the user",
|
|
3031
|
+
required: true,
|
|
3032
|
+
streamField: true,
|
|
3033
|
+
},
|
|
3034
|
+
],
|
|
3035
|
+
options: {
|
|
3036
|
+
modelSize: "large",
|
|
3037
|
+
preferredEncapsulation: opts.onStreamChunk ? "xml" : "toon",
|
|
3038
|
+
requiredFields: ["text"],
|
|
3039
|
+
// Stream the final summary to the user
|
|
3040
|
+
onStreamChunk: opts.onStreamChunk,
|
|
3041
|
+
},
|
|
3042
|
+
});
|
|
3043
|
+
let responseContent = null;
|
|
3044
|
+
const summaryText = summary?.text;
|
|
3045
|
+
if (typeof summaryText === "string" && summaryText) {
|
|
3046
|
+
responseContent = {
|
|
3047
|
+
actions: ["MULTI_STEP_SUMMARY"],
|
|
3048
|
+
text: summaryText,
|
|
3049
|
+
thought: (typeof summary?.thought === "string"
|
|
3050
|
+
? summary.thought
|
|
3051
|
+
: "Final user-facing message after task completion.") ||
|
|
3052
|
+
"Final user-facing message after task completion.",
|
|
3053
|
+
simple: true,
|
|
3054
|
+
responseId,
|
|
3055
|
+
};
|
|
3056
|
+
}
|
|
3057
|
+
else {
|
|
3058
|
+
return await this.buildStructuredFailureReply(runtime, message, withActionResults(accumulatedState, traceActionResult), responseId, "writing the final summary");
|
|
3059
|
+
}
|
|
3060
|
+
const responseMessages = responseContent
|
|
3061
|
+
? [
|
|
3062
|
+
{
|
|
3063
|
+
id: responseId,
|
|
3064
|
+
entityId: runtime.agentId,
|
|
3065
|
+
agentId: runtime.agentId,
|
|
3066
|
+
content: responseContent,
|
|
3067
|
+
roomId: message.roomId,
|
|
3068
|
+
createdAt: Date.now(),
|
|
3069
|
+
},
|
|
3070
|
+
]
|
|
3071
|
+
: [];
|
|
3072
|
+
return {
|
|
3073
|
+
responseContent,
|
|
3074
|
+
responseMessages,
|
|
3075
|
+
state: accumulatedState,
|
|
3076
|
+
mode: responseContent ? "simple" : "none",
|
|
3077
|
+
};
|
|
3078
|
+
}
|
|
3079
|
+
/**
|
|
3080
|
+
* Helper to emit run ended events
|
|
3081
|
+
*/
|
|
3082
|
+
async emitRunEnded(runtime, runId, message, startTime, status) {
|
|
3083
|
+
await runtime.emitEvent(EventType.RUN_ENDED, {
|
|
3084
|
+
runtime,
|
|
3085
|
+
source: "messageHandler",
|
|
3086
|
+
runId,
|
|
3087
|
+
messageId: message.id,
|
|
3088
|
+
roomId: message.roomId,
|
|
3089
|
+
entityId: message.entityId,
|
|
3090
|
+
startTime,
|
|
3091
|
+
status: status,
|
|
3092
|
+
endTime: Date.now(),
|
|
3093
|
+
duration: Date.now() - startTime,
|
|
3094
|
+
});
|
|
3095
|
+
}
|
|
3096
|
+
async emitMessageSent(runtime, message, source) {
|
|
3097
|
+
await runtime.emitEvent(EventType.MESSAGE_SENT, {
|
|
3098
|
+
runtime,
|
|
3099
|
+
message,
|
|
3100
|
+
source,
|
|
3101
|
+
});
|
|
3102
|
+
}
|
|
3103
|
+
/**
|
|
3104
|
+
* Deletes a message from the agent's memory.
|
|
3105
|
+
* This method handles the actual deletion logic that was previously in event handlers.
|
|
3106
|
+
*
|
|
3107
|
+
* @param runtime - The agent runtime instance
|
|
3108
|
+
* @param message - The message memory to delete
|
|
3109
|
+
* @returns Promise resolving when deletion is complete
|
|
3110
|
+
*/
|
|
3111
|
+
async deleteMessage(runtime, message) {
|
|
3112
|
+
if (!message.id) {
|
|
3113
|
+
runtime.logger.error({ src: "service:message", agentId: runtime.agentId }, "Cannot delete memory: message ID is missing");
|
|
3114
|
+
return;
|
|
3115
|
+
}
|
|
3116
|
+
runtime.logger.info({
|
|
3117
|
+
src: "service:message",
|
|
3118
|
+
agentId: runtime.agentId,
|
|
3119
|
+
messageId: message.id,
|
|
3120
|
+
roomId: message.roomId,
|
|
3121
|
+
}, "Deleting memory");
|
|
3122
|
+
await runtime.deleteMemory(message.id);
|
|
3123
|
+
runtime.logger.debug({ src: "service:message", messageId: message.id }, "Successfully deleted memory");
|
|
3124
|
+
}
|
|
3125
|
+
/**
|
|
3126
|
+
* Clears all messages from a channel/room.
|
|
3127
|
+
* This method handles bulk deletion of all message memories in a room.
|
|
3128
|
+
*
|
|
3129
|
+
* @param runtime - The agent runtime instance
|
|
3130
|
+
* @param roomId - The room ID to clear messages from
|
|
3131
|
+
* @param channelId - The original channel ID (for logging)
|
|
3132
|
+
* @returns Promise resolving when channel is cleared
|
|
3133
|
+
*/
|
|
3134
|
+
async clearChannel(runtime, roomId, channelId) {
|
|
3135
|
+
runtime.logger.info({ src: "service:message", agentId: runtime.agentId, channelId, roomId }, "Clearing message memories from channel");
|
|
3136
|
+
// Get all message memories for this room
|
|
3137
|
+
const memories = await runtime.getMemoriesByRoomIds({
|
|
3138
|
+
tableName: "messages",
|
|
3139
|
+
roomIds: [roomId],
|
|
3140
|
+
});
|
|
3141
|
+
runtime.logger.debug({ src: "service:message", channelId, count: memories.length }, "Found message memories to delete");
|
|
3142
|
+
// Delete each message memory
|
|
3143
|
+
let deletedCount = 0;
|
|
3144
|
+
for (const memory of memories) {
|
|
3145
|
+
if (memory.id) {
|
|
3146
|
+
try {
|
|
3147
|
+
await runtime.deleteMemory(memory.id);
|
|
3148
|
+
deletedCount++;
|
|
3149
|
+
}
|
|
3150
|
+
catch (error) {
|
|
3151
|
+
runtime.logger.warn({ src: "service:message", error, memoryId: memory.id }, "Failed to delete message memory");
|
|
3152
|
+
}
|
|
3153
|
+
}
|
|
3154
|
+
}
|
|
3155
|
+
runtime.logger.info({
|
|
3156
|
+
src: "service:message",
|
|
3157
|
+
agentId: runtime.agentId,
|
|
3158
|
+
channelId,
|
|
3159
|
+
deletedCount,
|
|
3160
|
+
totalCount: memories.length,
|
|
3161
|
+
}, "Cleared message memories from channel");
|
|
3162
|
+
}
|
|
3163
|
+
}
|