pinecall 0.1.0
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 +202 -0
- package/README.md +134 -0
- package/dist/agent/accepts.d.ts +32 -0
- package/dist/agent/accepts.d.ts.map +1 -0
- package/dist/agent/accepts.js +28 -0
- package/dist/agent/accepts.js.map +1 -0
- package/dist/agent/agent.d.ts +189 -0
- package/dist/agent/agent.d.ts.map +1 -0
- package/dist/agent/agent.js +262 -0
- package/dist/agent/agent.js.map +1 -0
- package/dist/agent/authors.d.ts +12 -0
- package/dist/agent/authors.d.ts.map +1 -0
- package/dist/agent/authors.js +28 -0
- package/dist/agent/authors.js.map +1 -0
- package/dist/agent/decorators.d.ts +22 -0
- package/dist/agent/decorators.d.ts.map +1 -0
- package/dist/agent/decorators.js +49 -0
- package/dist/agent/decorators.js.map +1 -0
- package/dist/agent/docstrings.d.ts +43 -0
- package/dist/agent/docstrings.d.ts.map +1 -0
- package/dist/agent/docstrings.js +311 -0
- package/dist/agent/docstrings.js.map +1 -0
- package/dist/agent/lifecycle.d.ts +29 -0
- package/dist/agent/lifecycle.d.ts.map +1 -0
- package/dist/agent/lifecycle.js +11 -0
- package/dist/agent/lifecycle.js.map +1 -0
- package/dist/agent/stages.d.ts +28 -0
- package/dist/agent/stages.d.ts.map +1 -0
- package/dist/agent/stages.js +32 -0
- package/dist/agent/stages.js.map +1 -0
- package/dist/agent/state.d.ts +43 -0
- package/dist/agent/state.d.ts.map +1 -0
- package/dist/agent/state.js +104 -0
- package/dist/agent/state.js.map +1 -0
- package/dist/agent/tools.d.ts +66 -0
- package/dist/agent/tools.d.ts.map +1 -0
- package/dist/agent/tools.js +148 -0
- package/dist/agent/tools.js.map +1 -0
- package/dist/agent/visibility.d.ts +40 -0
- package/dist/agent/visibility.d.ts.map +1 -0
- package/dist/agent/visibility.js +89 -0
- package/dist/agent/visibility.js.map +1 -0
- package/dist/call/call.d.ts +55 -0
- package/dist/call/call.d.ts.map +1 -0
- package/dist/call/call.js +108 -0
- package/dist/call/call.js.map +1 -0
- package/dist/call/history.d.ts +34 -0
- package/dist/call/history.d.ts.map +1 -0
- package/dist/call/history.js +38 -0
- package/dist/call/history.js.map +1 -0
- package/dist/call/room.d.ts +58 -0
- package/dist/call/room.d.ts.map +1 -0
- package/dist/call/room.js +68 -0
- package/dist/call/room.js.map +1 -0
- package/dist/cli/browser.d.ts +8 -0
- package/dist/cli/browser.d.ts.map +1 -0
- package/dist/cli/browser.js +27 -0
- package/dist/cli/browser.js.map +1 -0
- package/dist/cli/callbacks.d.ts +26 -0
- package/dist/cli/callbacks.d.ts.map +1 -0
- package/dist/cli/callbacks.js +68 -0
- package/dist/cli/callbacks.js.map +1 -0
- package/dist/cli/chat.d.ts +21 -0
- package/dist/cli/chat.d.ts.map +1 -0
- package/dist/cli/chat.js +214 -0
- package/dist/cli/chat.js.map +1 -0
- package/dist/cli/config.d.ts +16 -0
- package/dist/cli/config.d.ts.map +1 -0
- package/dist/cli/config.js +94 -0
- package/dist/cli/config.js.map +1 -0
- package/dist/cli/connected.d.ts +30 -0
- package/dist/cli/connected.d.ts.map +1 -0
- package/dist/cli/connected.js +32 -0
- package/dist/cli/connected.js.map +1 -0
- package/dist/cli/credentials.d.ts +41 -0
- package/dist/cli/credentials.d.ts.map +1 -0
- package/dist/cli/credentials.js +98 -0
- package/dist/cli/credentials.js.map +1 -0
- package/dist/cli/ear.d.ts +3 -0
- package/dist/cli/ear.d.ts.map +1 -0
- package/dist/cli/ear.js +59 -0
- package/dist/cli/ear.js.map +1 -0
- package/dist/cli/env.d.ts +40 -0
- package/dist/cli/env.d.ts.map +1 -0
- package/dist/cli/env.js +45 -0
- package/dist/cli/env.js.map +1 -0
- package/dist/cli/eval.d.ts +37 -0
- package/dist/cli/eval.d.ts.map +1 -0
- package/dist/cli/eval.js +83 -0
- package/dist/cli/eval.js.map +1 -0
- package/dist/cli/groups.d.ts +17 -0
- package/dist/cli/groups.d.ts.map +1 -0
- package/dist/cli/groups.js +38 -0
- package/dist/cli/groups.js.map +1 -0
- package/dist/cli/index.d.ts +16 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +169 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/keys.d.ts +28 -0
- package/dist/cli/keys.d.ts.map +1 -0
- package/dist/cli/keys.js +137 -0
- package/dist/cli/keys.js.map +1 -0
- package/dist/cli/knowledge.d.ts +35 -0
- package/dist/cli/knowledge.d.ts.map +1 -0
- package/dist/cli/knowledge.js +174 -0
- package/dist/cli/knowledge.js.map +1 -0
- package/dist/cli/line.d.ts +33 -0
- package/dist/cli/line.d.ts.map +1 -0
- package/dist/cli/line.js +134 -0
- package/dist/cli/line.js.map +1 -0
- package/dist/cli/listening.d.ts +38 -0
- package/dist/cli/listening.d.ts.map +1 -0
- package/dist/cli/listening.js +124 -0
- package/dist/cli/listening.js.map +1 -0
- package/dist/cli/load.d.ts +38 -0
- package/dist/cli/load.d.ts.map +1 -0
- package/dist/cli/load.js +99 -0
- package/dist/cli/load.js.map +1 -0
- package/dist/cli/login.d.ts +30 -0
- package/dist/cli/login.d.ts.map +1 -0
- package/dist/cli/login.js +158 -0
- package/dist/cli/login.js.map +1 -0
- package/dist/cli/machine.d.ts +8 -0
- package/dist/cli/machine.d.ts.map +1 -0
- package/dist/cli/machine.js +41 -0
- package/dist/cli/machine.js.map +1 -0
- package/dist/cli/memory.d.ts +26 -0
- package/dist/cli/memory.d.ts.map +1 -0
- package/dist/cli/memory.js +148 -0
- package/dist/cli/memory.js.map +1 -0
- package/dist/cli/numbers.d.ts +25 -0
- package/dist/cli/numbers.d.ts.map +1 -0
- package/dist/cli/numbers.js +132 -0
- package/dist/cli/numbers.js.map +1 -0
- package/dist/cli/personas.d.ts +5 -0
- package/dist/cli/personas.d.ts.map +1 -0
- package/dist/cli/personas.js +94 -0
- package/dist/cli/personas.js.map +1 -0
- package/dist/cli/pipeline.d.ts +52 -0
- package/dist/cli/pipeline.d.ts.map +1 -0
- package/dist/cli/pipeline.js +184 -0
- package/dist/cli/pipeline.js.map +1 -0
- package/dist/cli/profiles.d.ts +70 -0
- package/dist/cli/profiles.d.ts.map +1 -0
- package/dist/cli/profiles.js +210 -0
- package/dist/cli/profiles.js.map +1 -0
- package/dist/cli/prompt.d.ts +20 -0
- package/dist/cli/prompt.d.ts.map +1 -0
- package/dist/cli/prompt.js +58 -0
- package/dist/cli/prompt.js.map +1 -0
- package/dist/cli/providers.d.ts +14 -0
- package/dist/cli/providers.d.ts.map +1 -0
- package/dist/cli/providers.js +116 -0
- package/dist/cli/providers.js.map +1 -0
- package/dist/cli/remember.d.ts +29 -0
- package/dist/cli/remember.d.ts.map +1 -0
- package/dist/cli/remember.js +112 -0
- package/dist/cli/remember.js.map +1 -0
- package/dist/cli/run.d.ts +20 -0
- package/dist/cli/run.d.ts.map +1 -0
- package/dist/cli/run.js +347 -0
- package/dist/cli/run.js.map +1 -0
- package/dist/cli/runs/candidate.d.ts +51 -0
- package/dist/cli/runs/candidate.d.ts.map +1 -0
- package/dist/cli/runs/candidate.js +127 -0
- package/dist/cli/runs/candidate.js.map +1 -0
- package/dist/cli/runs/drift.d.ts +75 -0
- package/dist/cli/runs/drift.d.ts.map +1 -0
- package/dist/cli/runs/drift.js +151 -0
- package/dist/cli/runs/drift.js.map +1 -0
- package/dist/cli/runs/index.d.ts +5 -0
- package/dist/cli/runs/index.d.ts.map +1 -0
- package/dist/cli/runs/index.js +99 -0
- package/dist/cli/runs/index.js.map +1 -0
- package/dist/cli/runs/suites.d.ts +16 -0
- package/dist/cli/runs/suites.d.ts.map +1 -0
- package/dist/cli/runs/suites.js +63 -0
- package/dist/cli/runs/suites.js.map +1 -0
- package/dist/cli/secret.d.ts +18 -0
- package/dist/cli/secret.d.ts.map +1 -0
- package/dist/cli/secret.js +41 -0
- package/dist/cli/secret.js.map +1 -0
- package/dist/cli/sessions.d.ts +21 -0
- package/dist/cli/sessions.d.ts.map +1 -0
- package/dist/cli/sessions.js +174 -0
- package/dist/cli/sessions.js.map +1 -0
- package/dist/cli/signup.d.ts +25 -0
- package/dist/cli/signup.d.ts.map +1 -0
- package/dist/cli/signup.js +122 -0
- package/dist/cli/signup.js.map +1 -0
- package/dist/cli/simulate.d.ts +45 -0
- package/dist/cli/simulate.d.ts.map +1 -0
- package/dist/cli/simulate.js +320 -0
- package/dist/cli/simulate.js.map +1 -0
- package/dist/cli/supervise.d.ts +18 -0
- package/dist/cli/supervise.d.ts.map +1 -0
- package/dist/cli/supervise.js +134 -0
- package/dist/cli/supervise.js.map +1 -0
- package/dist/cli/test.d.ts +12 -0
- package/dist/cli/test.d.ts.map +1 -0
- package/dist/cli/test.js +128 -0
- package/dist/cli/test.js.map +1 -0
- package/dist/cli/testing/caller.d.ts +28 -0
- package/dist/cli/testing/caller.d.ts.map +1 -0
- package/dist/cli/testing/caller.js +30 -0
- package/dist/cli/testing/caller.js.map +1 -0
- package/dist/cli/testing/gateway.d.ts +172 -0
- package/dist/cli/testing/gateway.d.ts.map +1 -0
- package/dist/cli/testing/gateway.js +96 -0
- package/dist/cli/testing/gateway.js.map +1 -0
- package/dist/cli/testing/goldens.d.ts +61 -0
- package/dist/cli/testing/goldens.d.ts.map +1 -0
- package/dist/cli/testing/goldens.js +54 -0
- package/dist/cli/testing/goldens.js.map +1 -0
- package/dist/cli/testing/latency.d.ts +15 -0
- package/dist/cli/testing/latency.d.ts.map +1 -0
- package/dist/cli/testing/latency.js +44 -0
- package/dist/cli/testing/latency.js.map +1 -0
- package/dist/cli/testing/matrix.d.ts +12 -0
- package/dist/cli/testing/matrix.d.ts.map +1 -0
- package/dist/cli/testing/matrix.js +103 -0
- package/dist/cli/testing/matrix.js.map +1 -0
- package/dist/cli/testing/progress.d.ts +26 -0
- package/dist/cli/testing/progress.d.ts.map +1 -0
- package/dist/cli/testing/progress.js +185 -0
- package/dist/cli/testing/progress.js.map +1 -0
- package/dist/cli/testing/reproduction.d.ts +19 -0
- package/dist/cli/testing/reproduction.d.ts.map +1 -0
- package/dist/cli/testing/reproduction.js +65 -0
- package/dist/cli/testing/reproduction.js.map +1 -0
- package/dist/cli/testing/score.d.ts +11 -0
- package/dist/cli/testing/score.d.ts.map +1 -0
- package/dist/cli/testing/score.js +54 -0
- package/dist/cli/testing/score.js.map +1 -0
- package/dist/cli/testing/seeding.d.ts +32 -0
- package/dist/cli/testing/seeding.d.ts.map +1 -0
- package/dist/cli/testing/seeding.js +44 -0
- package/dist/cli/testing/seeding.js.map +1 -0
- package/dist/cli/testing/suite.d.ts +40 -0
- package/dist/cli/testing/suite.d.ts.map +1 -0
- package/dist/cli/testing/suite.js +103 -0
- package/dist/cli/testing/suite.js.map +1 -0
- package/dist/cli/testing/voice.d.ts +37 -0
- package/dist/cli/testing/voice.d.ts.map +1 -0
- package/dist/cli/testing/voice.js +53 -0
- package/dist/cli/testing/voice.js.map +1 -0
- package/dist/cli/ui/admin/assets/index-C3WMXdfL.css +1 -0
- package/dist/cli/ui/admin/assets/index-DR1mxoAh.js +58 -0
- package/dist/cli/ui/admin/index.html +20 -0
- package/dist/cli/ui/asked.d.ts +16 -0
- package/dist/cli/ui/asked.d.ts.map +1 -0
- package/dist/cli/ui/asked.js +53 -0
- package/dist/cli/ui/asked.js.map +1 -0
- package/dist/cli/ui/browser.d.ts +10 -0
- package/dist/cli/ui/browser.d.ts.map +1 -0
- package/dist/cli/ui/browser.js +30 -0
- package/dist/cli/ui/browser.js.map +1 -0
- package/dist/cli/ui/chatting.d.ts +62 -0
- package/dist/cli/ui/chatting.d.ts.map +1 -0
- package/dist/cli/ui/chatting.js +171 -0
- package/dist/cli/ui/chatting.js.map +1 -0
- package/dist/cli/ui/console/assets/index-DCTnou52.css +1 -0
- package/dist/cli/ui/console/assets/index-dOcE4usU.js +99 -0
- package/dist/cli/ui/console/index.html +20 -0
- package/dist/cli/ui/console/logo-mark.png +0 -0
- package/dist/cli/ui/doors.d.ts +37 -0
- package/dist/cli/ui/doors.d.ts.map +1 -0
- package/dist/cli/ui/doors.js +70 -0
- package/dist/cli/ui/doors.js.map +1 -0
- package/dist/cli/ui/drifting.d.ts +23 -0
- package/dist/cli/ui/drifting.d.ts.map +1 -0
- package/dist/cli/ui/drifting.js +33 -0
- package/dist/cli/ui/drifting.js.map +1 -0
- package/dist/cli/ui/index.d.ts +15 -0
- package/dist/cli/ui/index.d.ts.map +1 -0
- package/dist/cli/ui/index.js +117 -0
- package/dist/cli/ui/index.js.map +1 -0
- package/dist/cli/ui/knowing.d.ts +36 -0
- package/dist/cli/ui/knowing.d.ts.map +1 -0
- package/dist/cli/ui/knowing.js +86 -0
- package/dist/cli/ui/knowing.js.map +1 -0
- package/dist/cli/ui/promoting.d.ts +26 -0
- package/dist/cli/ui/promoting.d.ts.map +1 -0
- package/dist/cli/ui/promoting.js +44 -0
- package/dist/cli/ui/promoting.js.map +1 -0
- package/dist/cli/ui/refusal.d.ts +18 -0
- package/dist/cli/ui/refusal.d.ts.map +1 -0
- package/dist/cli/ui/refusal.js +26 -0
- package/dist/cli/ui/refusal.js.map +1 -0
- package/dist/cli/ui/refused.d.ts +8 -0
- package/dist/cli/ui/refused.d.ts.map +1 -0
- package/dist/cli/ui/refused.js +11 -0
- package/dist/cli/ui/refused.js.map +1 -0
- package/dist/cli/ui/remembering.d.ts +38 -0
- package/dist/cli/ui/remembering.d.ts.map +1 -0
- package/dist/cli/ui/remembering.js +87 -0
- package/dist/cli/ui/remembering.js.map +1 -0
- package/dist/cli/ui/reproducing.d.ts +23 -0
- package/dist/cli/ui/reproducing.d.ts.map +1 -0
- package/dist/cli/ui/reproducing.js +52 -0
- package/dist/cli/ui/reproducing.js.map +1 -0
- package/dist/cli/ui/server.d.ts +22 -0
- package/dist/cli/ui/server.d.ts.map +1 -0
- package/dist/cli/ui/server.js +211 -0
- package/dist/cli/ui/server.js.map +1 -0
- package/dist/cli/ui/simulating.d.ts +47 -0
- package/dist/cli/ui/simulating.d.ts.map +1 -0
- package/dist/cli/ui/simulating.js +86 -0
- package/dist/cli/ui/simulating.js.map +1 -0
- package/dist/cli/ui/testing.d.ts +49 -0
- package/dist/cli/ui/testing.d.ts.map +1 -0
- package/dist/cli/ui/testing.js +104 -0
- package/dist/cli/ui/testing.js.map +1 -0
- package/dist/cli/view.d.ts +43 -0
- package/dist/cli/view.d.ts.map +1 -0
- package/dist/cli/view.js +137 -0
- package/dist/cli/view.js.map +1 -0
- package/dist/cli/whoami.d.ts +37 -0
- package/dist/cli/whoami.d.ts.map +1 -0
- package/dist/cli/whoami.js +78 -0
- package/dist/cli/whoami.js.map +1 -0
- package/dist/cli/world.d.ts +33 -0
- package/dist/cli/world.d.ts.map +1 -0
- package/dist/cli/world.js +48 -0
- package/dist/cli/world.js.map +1 -0
- package/dist/client/agent.d.ts +87 -0
- package/dist/client/agent.d.ts.map +1 -0
- package/dist/client/agent.js +209 -0
- package/dist/client/agent.js.map +1 -0
- package/dist/client/calls.d.ts +77 -0
- package/dist/client/calls.d.ts.map +1 -0
- package/dist/client/calls.js +153 -0
- package/dist/client/calls.js.map +1 -0
- package/dist/client/client.d.ts +58 -0
- package/dist/client/client.d.ts.map +1 -0
- package/dist/client/client.js +146 -0
- package/dist/client/client.js.map +1 -0
- package/dist/client/connection.d.ts +47 -0
- package/dist/client/connection.d.ts.map +1 -0
- package/dist/client/connection.js +141 -0
- package/dist/client/connection.js.map +1 -0
- package/dist/client/endpoints.d.ts +7 -0
- package/dist/client/endpoints.d.ts.map +1 -0
- package/dist/client/endpoints.js +21 -0
- package/dist/client/endpoints.js.map +1 -0
- package/dist/client/frames.d.ts +24 -0
- package/dist/client/frames.d.ts.map +1 -0
- package/dist/client/frames.js +49 -0
- package/dist/client/frames.js.map +1 -0
- package/dist/client/index.d.ts +15 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +14 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/listeners.d.ts +36 -0
- package/dist/client/listeners.d.ts.map +1 -0
- package/dist/client/listeners.js +61 -0
- package/dist/client/listeners.js.map +1 -0
- package/dist/client/observe.d.ts +44 -0
- package/dist/client/observe.d.ts.map +1 -0
- package/dist/client/observe.js +122 -0
- package/dist/client/observe.js.map +1 -0
- package/dist/client/testing/gateway.d.ts +39 -0
- package/dist/client/testing/gateway.d.ts.map +1 -0
- package/dist/client/testing/gateway.js +129 -0
- package/dist/client/testing/gateway.js.map +1 -0
- package/dist/client/testing/index.d.ts +4 -0
- package/dist/client/testing/index.d.ts.map +1 -0
- package/dist/client/testing/index.js +4 -0
- package/dist/client/testing/index.js.map +1 -0
- package/dist/client/testing/log.d.ts +26 -0
- package/dist/client/testing/log.d.ts.map +1 -0
- package/dist/client/testing/log.js +111 -0
- package/dist/client/testing/log.js.map +1 -0
- package/dist/client/testing/loopback.d.ts +3 -0
- package/dist/client/testing/loopback.d.ts.map +1 -0
- package/dist/client/testing/loopback.js +3 -0
- package/dist/client/testing/loopback.js.map +1 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +35 -0
- package/dist/index.js.map +1 -0
- package/dist/runtime/channels.d.ts +16 -0
- package/dist/runtime/channels.d.ts.map +1 -0
- package/dist/runtime/channels.js +30 -0
- package/dist/runtime/channels.js.map +1 -0
- package/dist/runtime/connect.d.ts +51 -0
- package/dist/runtime/connect.d.ts.map +1 -0
- package/dist/runtime/connect.js +284 -0
- package/dist/runtime/connect.js.map +1 -0
- package/dist/runtime/dispatch.d.ts +37 -0
- package/dist/runtime/dispatch.d.ts.map +1 -0
- package/dist/runtime/dispatch.js +52 -0
- package/dist/runtime/dispatch.js.map +1 -0
- package/dist/runtime/grounding.d.ts +15 -0
- package/dist/runtime/grounding.d.ts.map +1 -0
- package/dist/runtime/grounding.js +72 -0
- package/dist/runtime/grounding.js.map +1 -0
- package/dist/runtime/recall.d.ts +10 -0
- package/dist/runtime/recall.d.ts.map +1 -0
- package/dist/runtime/recall.js +13 -0
- package/dist/runtime/recall.js.map +1 -0
- package/dist/runtime/run-tool.d.ts +26 -0
- package/dist/runtime/run-tool.d.ts.map +1 -0
- package/dist/runtime/run-tool.js +82 -0
- package/dist/runtime/run-tool.js.map +1 -0
- package/dist/views/components.d.ts +17 -0
- package/dist/views/components.d.ts.map +1 -0
- package/dist/views/components.js +33 -0
- package/dist/views/components.js.map +1 -0
- package/dist/views/jsx-dev-runtime.d.ts +3 -0
- package/dist/views/jsx-dev-runtime.d.ts.map +1 -0
- package/dist/views/jsx-dev-runtime.js +5 -0
- package/dist/views/jsx-dev-runtime.js.map +1 -0
- package/dist/views/jsx-runtime.d.ts +49 -0
- package/dist/views/jsx-runtime.d.ts.map +1 -0
- package/dist/views/jsx-runtime.js +67 -0
- package/dist/views/jsx-runtime.js.map +1 -0
- package/dist/views/lang.d.ts +17 -0
- package/dist/views/lang.d.ts.map +1 -0
- package/dist/views/lang.js +46 -0
- package/dist/views/lang.js.map +1 -0
- package/dist/views/layout.d.ts +19 -0
- package/dist/views/layout.d.ts.map +1 -0
- package/dist/views/layout.js +62 -0
- package/dist/views/layout.js.map +1 -0
- package/dist/views/render.d.ts +19 -0
- package/dist/views/render.d.ts.map +1 -0
- package/dist/views/render.js +26 -0
- package/dist/views/render.js.map +1 -0
- package/package.json +76 -0
- package/tsconfig.tenant.json +24 -0
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
/** The Agent base class: its fields are the state, and every assignment is a change with an author. */
|
|
2
|
+
import { currentAuthor, UnauthoredWrite } from "./authors.js";
|
|
3
|
+
import { docOf, toolsOf, visibleToolsOf } from "./tools.js";
|
|
4
|
+
import { declaredStateOf } from "./visibility.js";
|
|
5
|
+
import { collapse, restore, snapshot } from "./state.js";
|
|
6
|
+
// The names an app uses to configure the agent rather than to remember something about the
|
|
7
|
+
// caller. They live on the instance like any other field, but they are never state: they do not
|
|
8
|
+
// change during a call, they are not diffed, and no snapshot carries them.
|
|
9
|
+
export const CONFIG_FIELDS = [
|
|
10
|
+
"phone",
|
|
11
|
+
"whatsapp",
|
|
12
|
+
"web",
|
|
13
|
+
"voice",
|
|
14
|
+
"greeting",
|
|
15
|
+
"says",
|
|
16
|
+
"hears",
|
|
17
|
+
"llm",
|
|
18
|
+
"language",
|
|
19
|
+
"knowledge",
|
|
20
|
+
"docs",
|
|
21
|
+
"memory",
|
|
22
|
+
"hangup",
|
|
23
|
+
];
|
|
24
|
+
// The list is the array; the Set is how this module asks about it on every assignment. state.ts
|
|
25
|
+
// derives `ConfigName` from the same array, so a name added here is a name the snapshot drops.
|
|
26
|
+
const CONFIG = new Set(CONFIG_FIELDS);
|
|
27
|
+
const internals = new WeakMap();
|
|
28
|
+
/**
|
|
29
|
+
* The base every app agent extends. The constructor hands back a Proxy, so a plain
|
|
30
|
+
* `this.patient = row` inside a tool is the whole state API: one change, one author, one seq.
|
|
31
|
+
*/
|
|
32
|
+
export class Agent {
|
|
33
|
+
constructor() {
|
|
34
|
+
// Which fields this class said are its state, read once: every `@state` of a class has run by
|
|
35
|
+
// the time one of it exists. null means it decorated none, and then every own field is state.
|
|
36
|
+
const stateFields = declaredStateOf(this.constructor);
|
|
37
|
+
const own = {
|
|
38
|
+
changes: [],
|
|
39
|
+
log: [],
|
|
40
|
+
logListeners: new Set(),
|
|
41
|
+
listeners: new Set(),
|
|
42
|
+
eventListeners: new Set(),
|
|
43
|
+
seq: 0,
|
|
44
|
+
sealed: false,
|
|
45
|
+
target: this,
|
|
46
|
+
call: null,
|
|
47
|
+
last: null,
|
|
48
|
+
recalled: [],
|
|
49
|
+
};
|
|
50
|
+
const proxy = new Proxy(this, {
|
|
51
|
+
set(target, key, next, receiver) {
|
|
52
|
+
// Config is not state, and neither is a field a class that declares its state left out:
|
|
53
|
+
// that one is the tenant's own scratch space and nothing here records it, sends it or
|
|
54
|
+
// asks it for an author.
|
|
55
|
+
if (typeof key !== "string" || CONFIG.has(key) || (stateFields !== null && !stateFields.has(key))) {
|
|
56
|
+
return Reflect.set(target, key, next, target);
|
|
57
|
+
}
|
|
58
|
+
const prev = Reflect.get(target, key, target);
|
|
59
|
+
const ok = Reflect.set(target, key, next, target);
|
|
60
|
+
if (!ok || !own.sealed)
|
|
61
|
+
return ok;
|
|
62
|
+
const author = currentAuthor();
|
|
63
|
+
// The declaration is written before the agent is sealed, so only a live write can be
|
|
64
|
+
// unauthored — and a live unauthored write is never an accident worth keeping.
|
|
65
|
+
if (author === null)
|
|
66
|
+
throw new UnauthoredWrite(key);
|
|
67
|
+
if (Object.is(prev, next))
|
|
68
|
+
return true;
|
|
69
|
+
const change = { seq: ++own.seq, field: key, prev, next, author, at: Date.now() };
|
|
70
|
+
own.changes.push(change);
|
|
71
|
+
for (const listener of own.listeners)
|
|
72
|
+
listener(change);
|
|
73
|
+
return true;
|
|
74
|
+
},
|
|
75
|
+
});
|
|
76
|
+
internals.set(this, own);
|
|
77
|
+
internals.set(proxy, own);
|
|
78
|
+
return proxy;
|
|
79
|
+
}
|
|
80
|
+
/** The class docstring, when the app prefers to say it out loud instead of in a JSDoc. */
|
|
81
|
+
static doc;
|
|
82
|
+
/** The outside facts this class accepts, and from whom: `static events = {...}`. */
|
|
83
|
+
static events;
|
|
84
|
+
/** Who may see a field, for a class that would rather write a map than a `@state`. */
|
|
85
|
+
static visibility;
|
|
86
|
+
/** What this agent is, as the model reads it: the class's own docstring. */
|
|
87
|
+
doc() {
|
|
88
|
+
return docOf(this);
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* The prompt as a function of the state: what to do about THIS turn, in the class's own words.
|
|
92
|
+
* It is the whole dynamic region and the last thing the model reads. The base renders nothing,
|
|
93
|
+
* so a class that says nothing about the turn sends an empty block.
|
|
94
|
+
*/
|
|
95
|
+
render() {
|
|
96
|
+
return null;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Whether memory has already told this call something about the caller under those words — the
|
|
100
|
+
* word a fact was filed under, or the fact itself. The runtime supplies the facts; before it has
|
|
101
|
+
* recalled anything this answers false, which is exactly what a caller nobody has met looks like.
|
|
102
|
+
*/
|
|
103
|
+
remembers(text) {
|
|
104
|
+
const wanted = text.trim().toLowerCase();
|
|
105
|
+
if (wanted === "")
|
|
106
|
+
return false;
|
|
107
|
+
return internalsOf(this).recalled.some((known) => known.includes(wanted));
|
|
108
|
+
}
|
|
109
|
+
/** Every tool this agent declares, whether or not the current state shows it. */
|
|
110
|
+
tools() {
|
|
111
|
+
return toolsOf(this).map((declared) => declared.spec);
|
|
112
|
+
}
|
|
113
|
+
/** The tools a model may call right now: the ones whose `when(state)` holds. */
|
|
114
|
+
visibleTools() {
|
|
115
|
+
return visibleToolsOf(this).map((declared) => declared.spec);
|
|
116
|
+
}
|
|
117
|
+
/** Drop the change log and keep one sentence in its place; the state itself stays. */
|
|
118
|
+
collapse(summary) {
|
|
119
|
+
collapse(this, summary);
|
|
120
|
+
}
|
|
121
|
+
/** Put the agent back to a snapshot — the move `onCall` makes when a caller comes back. */
|
|
122
|
+
restore(state) {
|
|
123
|
+
restore(this, state);
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Start the agent in the state a case describes: the fields it names, written over the ones the
|
|
127
|
+
* agent already has — on a fresh instance, the ones the class gave itself. A goldens case names
|
|
128
|
+
* what it is about and nothing else, so `restore` is the wrong door for it: a snapshot is a
|
|
129
|
+
* WHOLE state, and restoring one clears every field it leaves out.
|
|
130
|
+
*/
|
|
131
|
+
startIn(state) {
|
|
132
|
+
restore(this, { ...snapshot(this), ...state });
|
|
133
|
+
}
|
|
134
|
+
/** What this contact left behind last time. Wired per mount: `mount(Class, { pc, last })`. */
|
|
135
|
+
last(contact) {
|
|
136
|
+
const source = internalsOf(this).last;
|
|
137
|
+
if (source === null) {
|
|
138
|
+
return Promise.reject(new Error("last(contact) needs a store: mount the agent with { last } to give it one"));
|
|
139
|
+
}
|
|
140
|
+
return source(contact);
|
|
141
|
+
}
|
|
142
|
+
/** Put a named fact in the call's log, for the console and for whatever reads it after. */
|
|
143
|
+
log(name, data) {
|
|
144
|
+
const own = internalsOf(this);
|
|
145
|
+
const entry = { seq: ++own.seq, name, at: Date.now() };
|
|
146
|
+
if (data !== undefined)
|
|
147
|
+
entry.data = data;
|
|
148
|
+
own.log.push(entry);
|
|
149
|
+
for (const listener of own.logListeners)
|
|
150
|
+
listener(entry);
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* The call being served right now. It is a getter on the base class, not a field, so it never
|
|
154
|
+
* looks like state and never reaches a snapshot; a class that declares its own `call` field is
|
|
155
|
+
* refused at the first write, because there is only one thing that name can mean here.
|
|
156
|
+
*/
|
|
157
|
+
get call() {
|
|
158
|
+
const serving = internalsOf(this).call;
|
|
159
|
+
if (serving === null) {
|
|
160
|
+
throw new Error("this.call is only there while a call is being served: the bridge sets it at start(), " +
|
|
161
|
+
"and a test that renders gives one with setCall(agent, new CallWorld(line, () => {}))");
|
|
162
|
+
}
|
|
163
|
+
return serving;
|
|
164
|
+
}
|
|
165
|
+
/** Say this, word for word, now. Resolves true when the turn it lands as arrived. */
|
|
166
|
+
say(text, options = {}) {
|
|
167
|
+
return this.call.say(text, options);
|
|
168
|
+
}
|
|
169
|
+
/** Make the model speak now, guided by words the caller never hears. Resolves like `say`. */
|
|
170
|
+
reply(instructions, options = {}) {
|
|
171
|
+
return this.call.reply(instructions, options);
|
|
172
|
+
}
|
|
173
|
+
on(type, listener) {
|
|
174
|
+
if (type === "state")
|
|
175
|
+
return onChange(this, listener);
|
|
176
|
+
const own = internalsOf(this);
|
|
177
|
+
own.eventListeners.add(listener);
|
|
178
|
+
return () => own.eventListeners.delete(listener);
|
|
179
|
+
}
|
|
180
|
+
/** An outside fact the class declared arrived. Override it; writes here are authored by it. */
|
|
181
|
+
onEvent(_name, _data, _meta) {
|
|
182
|
+
return undefined;
|
|
183
|
+
}
|
|
184
|
+
/** A call started. Override it; assigning state here is authored by the hook, not by nobody. */
|
|
185
|
+
onCall(_call) {
|
|
186
|
+
return undefined;
|
|
187
|
+
}
|
|
188
|
+
/** The call ended. Override it to write anything the call is worth writing. */
|
|
189
|
+
onEnd(_call) {
|
|
190
|
+
return undefined;
|
|
191
|
+
}
|
|
192
|
+
/** Memory was written. Override it to send the ops wherever the tenant keeps them. */
|
|
193
|
+
onMemory(_ops, _call) {
|
|
194
|
+
return undefined;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
/** The framework's bookkeeping for one agent, or a clear error if this is not an agent. */
|
|
198
|
+
export function internalsOf(agent) {
|
|
199
|
+
const own = internals.get(agent);
|
|
200
|
+
if (!own)
|
|
201
|
+
throw new TypeError("not a Pinecall agent: its constructor never ran through Agent");
|
|
202
|
+
return own;
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Close the declaration and start recording. Everything assigned before this — the field
|
|
206
|
+
* initializers that give the state its shape — is the baseline, not a change.
|
|
207
|
+
*/
|
|
208
|
+
export function seal(agent) {
|
|
209
|
+
internalsOf(agent).sealed = true;
|
|
210
|
+
return agent;
|
|
211
|
+
}
|
|
212
|
+
/** Every change this agent has recorded, oldest first. */
|
|
213
|
+
export function changes(agent) {
|
|
214
|
+
return internalsOf(agent).changes;
|
|
215
|
+
}
|
|
216
|
+
/** Hear every field assignment as it happens; the returned function stops listening. */
|
|
217
|
+
export function onChange(agent, listener) {
|
|
218
|
+
const own = internalsOf(agent);
|
|
219
|
+
own.listeners.add(listener);
|
|
220
|
+
return () => own.listeners.delete(listener);
|
|
221
|
+
}
|
|
222
|
+
/** Everything this agent logged, oldest first. */
|
|
223
|
+
export function logOf(agent) {
|
|
224
|
+
return internalsOf(agent).log;
|
|
225
|
+
}
|
|
226
|
+
/** Hear every logged fact as it happens; the returned function stops listening. */
|
|
227
|
+
export function onLog(agent, listener) {
|
|
228
|
+
const own = internalsOf(agent);
|
|
229
|
+
own.logListeners.add(listener);
|
|
230
|
+
return () => own.logListeners.delete(listener);
|
|
231
|
+
}
|
|
232
|
+
/** Whether a name is one of CONFIG_FIELDS rather than a piece of state. */
|
|
233
|
+
export function isConfigField(name) {
|
|
234
|
+
return CONFIG.has(name);
|
|
235
|
+
}
|
|
236
|
+
/** Hand this instance the store its `last(contact)` reads. The bridge does this at start(). */
|
|
237
|
+
export function setLast(agent, source) {
|
|
238
|
+
internalsOf(agent).last = source;
|
|
239
|
+
}
|
|
240
|
+
/** Hand this instance the call it is serving. The bridge does this once, at start(). */
|
|
241
|
+
export function setCall(agent, call) {
|
|
242
|
+
internalsOf(agent).call = call;
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Hand this instance what memory has recalled about the caller: every fact, and the word it was
|
|
246
|
+
* filed under. The bridge does this from the call's own `memory.ops` entries, so `remembers(text)`
|
|
247
|
+
* answers with what the runtime actually found and never with a guess.
|
|
248
|
+
*/
|
|
249
|
+
export function recalled(agent, words) {
|
|
250
|
+
const own = internalsOf(agent);
|
|
251
|
+
for (const word of words) {
|
|
252
|
+
const known = word.trim().toLowerCase();
|
|
253
|
+
if (known !== "" && !own.recalled.includes(known))
|
|
254
|
+
own.recalled.push(known);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
/** Tell the in-process observers about an event the hook has just been given. */
|
|
258
|
+
export function emitEvent(agent, heard) {
|
|
259
|
+
for (const listener of internalsOf(agent).eventListeners)
|
|
260
|
+
listener(heard);
|
|
261
|
+
}
|
|
262
|
+
//# sourceMappingURL=agent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent.js","sourceRoot":"","sources":["../../src/agent/agent.ts"],"names":[],"mappings":"AAAA,uGAAuG;AAMvG,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,EAAiB,MAAM,YAAY,CAAC;AAI3E,OAAO,EAAE,eAAe,EAAmB,MAAM,iBAAiB,CAAC;AAEnE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAgC,MAAM,YAAY,CAAC;AAEvF,2FAA2F;AAC3F,gGAAgG;AAChG,2EAA2E;AAC3E,MAAM,CAAC,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,CAAC,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC;YAAE,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC9E,CAAC;AACH,CAAC;AAED,iFAAiF;AACjF,MAAM,UAAU,SAAS,CAAC,KAAa,EAAE,KAAiB;IACxD,KAAK,MAAM,QAAQ,IAAI,WAAW,CAAC,KAAK,CAAC,CAAC,cAAc;QAAE,QAAQ,CAAC,KAAK,CAAC,CAAC;AAC5E,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Who is writing the state right now: the author every change carries, and the write that has none. */
|
|
2
|
+
/** The name of whoever is writing state right now, or null when nobody claimed the write. */
|
|
3
|
+
export declare function currentAuthor(): string | null;
|
|
4
|
+
/** Run `body` with every state write inside it attributed to `author`. */
|
|
5
|
+
export declare function withAuthor<T>(name: string, body: () => T): T;
|
|
6
|
+
/** Like withAuthor, for a tool or a hook that returns a promise: the awaits inside keep the name. */
|
|
7
|
+
export declare function withAuthorAsync<T>(name: string, body: () => Promise<T> | T): Promise<T>;
|
|
8
|
+
/** A field assigned with no tool and no hook running: the framework refuses it by design. */
|
|
9
|
+
export declare class UnauthoredWrite extends Error {
|
|
10
|
+
constructor(field: string);
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=authors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authors.d.ts","sourceRoot":"","sources":["../../src/agent/authors.ts"],"names":[],"mappings":"AAAA,wGAAwG;AAUxG,6FAA6F;AAC7F,wBAAgB,aAAa,IAAI,MAAM,GAAG,IAAI,CAE7C;AAED,0EAA0E;AAC1E,wBAAgB,UAAU,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,GAAG,CAAC,CAE5D;AAED,qGAAqG;AACrG,wBAAgB,eAAe,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAEvF;AAED,6FAA6F;AAC7F,qBAAa,eAAgB,SAAQ,KAAK;IACxC,YAAY,KAAK,EAAE,MAAM,EAMxB;CACF"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/** Who is writing the state right now: the author every change carries, and the write that has none. */
|
|
2
|
+
import { AsyncLocalStorage } from "node:async_hooks";
|
|
3
|
+
// Who is writing right now, carried by the async context and not by a module-level stack: one
|
|
4
|
+
// process runs many calls at once, and a tool that awaits its agenda while another tool runs would
|
|
5
|
+
// otherwise read the other tool's name off the top of a shared stack. AsyncLocalStorage follows
|
|
6
|
+
// each tool's own chain of awaits, so a write inside it is authored by it and by nothing else.
|
|
7
|
+
const author = new AsyncLocalStorage();
|
|
8
|
+
/** The name of whoever is writing state right now, or null when nobody claimed the write. */
|
|
9
|
+
export function currentAuthor() {
|
|
10
|
+
return author.getStore() ?? null;
|
|
11
|
+
}
|
|
12
|
+
/** Run `body` with every state write inside it attributed to `author`. */
|
|
13
|
+
export function withAuthor(name, body) {
|
|
14
|
+
return author.run(name, body);
|
|
15
|
+
}
|
|
16
|
+
/** Like withAuthor, for a tool or a hook that returns a promise: the awaits inside keep the name. */
|
|
17
|
+
export function withAuthorAsync(name, body) {
|
|
18
|
+
return author.run(name, async () => await body());
|
|
19
|
+
}
|
|
20
|
+
/** A field assigned with no tool and no hook running: the framework refuses it by design. */
|
|
21
|
+
export class UnauthoredWrite extends Error {
|
|
22
|
+
constructor(field) {
|
|
23
|
+
super(`state field ${field} was assigned outside a tool and outside a lifecycle hook; ` +
|
|
24
|
+
`tools are the only writers of state`);
|
|
25
|
+
this.name = "UnauthoredWrite";
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=authors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authors.js","sourceRoot":"","sources":["../../src/agent/authors.ts"],"names":[],"mappings":"AAAA,wGAAwG;AAExG,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErD,8FAA8F;AAC9F,mGAAmG;AACnG,gGAAgG;AAChG,+FAA+F;AAC/F,MAAM,MAAM,GAAG,IAAI,iBAAiB,EAAU,CAAC;AAE/C,6FAA6F;AAC7F,MAAM,UAAU,aAAa;IAC3B,OAAO,MAAM,CAAC,QAAQ,EAAE,IAAI,IAAI,CAAC;AACnC,CAAC;AAED,0EAA0E;AAC1E,MAAM,UAAU,UAAU,CAAI,IAAY,EAAE,IAAa;IACvD,OAAO,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AAChC,CAAC;AAED,qGAAqG;AACrG,MAAM,UAAU,eAAe,CAAI,IAAY,EAAE,IAA0B;IACzE,OAAO,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,IAAI,EAAE,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC;AACpD,CAAC;AAED,6FAA6F;AAC7F,MAAM,OAAO,eAAgB,SAAQ,KAAK;IACxC,YAAY,KAAa;QACvB,KAAK,CACH,eAAe,KAAK,6DAA6D;YAC/E,qCAAqC,CACxC,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;IAChC,CAAC;CACF"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** The two decorators a class wears: `@tool({...})` on a method, and `@render(Prompt)` on the class. */
|
|
2
|
+
import { type ToolOptions } from "./tools.js";
|
|
3
|
+
import type { Child } from "../views/jsx-runtime.js";
|
|
4
|
+
/**
|
|
5
|
+
* Declare a method as a tool. The docstring above it is the prompt; the signature is the schema;
|
|
6
|
+
* `when(state)` is the only visibility there is, and `stage` is lowered to one here, at
|
|
7
|
+
* declaration time. Every write the method makes is authored by it.
|
|
8
|
+
*/
|
|
9
|
+
export declare function tool<T extends object>(options?: ToolOptions<T>): (prototype: T, name: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
|
10
|
+
/**
|
|
11
|
+
* The prompt as a function of the agent: the props ARE the instance, so a prompt written for
|
|
12
|
+
* `Support` destructures `{ stage, customer }` and stays typed with no generic machinery.
|
|
13
|
+
*/
|
|
14
|
+
export type Prompt<T> = (agent: T) => Child;
|
|
15
|
+
/**
|
|
16
|
+
* The class's prompt, as a function beside it instead of a `render()` method — the spelling a
|
|
17
|
+
* prompt that has grown deserves. `@render(SupportPrompt)` is exactly
|
|
18
|
+
* `render() { return SupportPrompt(this); }`, byte for byte, and the instance is handed over
|
|
19
|
+
* whole: a spread would leave the getters and `remembers()` behind.
|
|
20
|
+
*/
|
|
21
|
+
export declare function render<T extends object>(prompt: Prompt<T>): (ctor: new (...args: never[]) => T) => void;
|
|
22
|
+
//# sourceMappingURL=decorators.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decorators.d.ts","sourceRoot":"","sources":["../../src/agent/decorators.ts"],"names":[],"mappings":"AAAA,wGAAwG;AAIxG,OAAO,EAAgC,KAAK,WAAW,EAAE,MAAM,YAAY,CAAC;AAC5E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAErD;;;;GAIG;AACH,wBAAgB,IAAI,CAAC,CAAC,SAAS,MAAM,EAAE,OAAO,GAAE,WAAW,CAAC,CAAC,CAAM,eAEpD,CAAC,QACN,MAAM,cACA,kBAAkB,KAC7B,kBAAkB,CAatB;AAED;;;GAGG;AACH,MAAM,MAAM,MAAM,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,KAAK,CAAC;AAE5C;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,CAAC,SAAS,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,UACzB,KAAK,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,KAAG,IAAI,CAkBlE"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/** The two decorators a class wears: `@tool({...})` on a method, and `@render(Prompt)` on the class. */
|
|
2
|
+
import { withAuthorAsync } from "./authors.js";
|
|
3
|
+
import { lowerStage } from "./stages.js";
|
|
4
|
+
import { DeclarationRefused, register } from "./tools.js";
|
|
5
|
+
/**
|
|
6
|
+
* Declare a method as a tool. The docstring above it is the prompt; the signature is the schema;
|
|
7
|
+
* `when(state)` is the only visibility there is, and `stage` is lowered to one here, at
|
|
8
|
+
* declaration time. Every write the method makes is authored by it.
|
|
9
|
+
*/
|
|
10
|
+
export function tool(options = {}) {
|
|
11
|
+
return function decorate(prototype, name, descriptor) {
|
|
12
|
+
const method = descriptor.value;
|
|
13
|
+
if (typeof method !== "function") {
|
|
14
|
+
throw new TypeError(`@tool goes on a method; ${name} is not one`);
|
|
15
|
+
}
|
|
16
|
+
// The wrapper is what makes `this.patient = row` inside the method carry an author: the tool's
|
|
17
|
+
// own name, for the whole time it runs, awaited included.
|
|
18
|
+
descriptor.value = function running(...args) {
|
|
19
|
+
return withAuthorAsync(name, () => method.apply(this, args));
|
|
20
|
+
};
|
|
21
|
+
register(prototype, { name, options: lowerStage(options), method });
|
|
22
|
+
return descriptor;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* The class's prompt, as a function beside it instead of a `render()` method — the spelling a
|
|
27
|
+
* prompt that has grown deserves. `@render(SupportPrompt)` is exactly
|
|
28
|
+
* `render() { return SupportPrompt(this); }`, byte for byte, and the instance is handed over
|
|
29
|
+
* whole: a spread would leave the getters and `remembers()` behind.
|
|
30
|
+
*/
|
|
31
|
+
export function render(prompt) {
|
|
32
|
+
return function decorate(ctor) {
|
|
33
|
+
// The class's own `render()` is on its prototype by the time a class decorator runs, so this
|
|
34
|
+
// is the one moment both spellings are visible at once. Two ways to answer one question is
|
|
35
|
+
// the bug: whichever the reader trusts, the other one is dead and says something else.
|
|
36
|
+
if (Object.getOwnPropertyDescriptor(ctor.prototype, "render") !== undefined) {
|
|
37
|
+
throw new DeclarationRefused(`${ctor.name} declares both @render(${prompt.name || "a prompt"}) and a render() method; ` +
|
|
38
|
+
`two ways to answer one question — keep one`);
|
|
39
|
+
}
|
|
40
|
+
Object.defineProperty(ctor.prototype, "render", {
|
|
41
|
+
value: function render() {
|
|
42
|
+
return prompt(this);
|
|
43
|
+
},
|
|
44
|
+
writable: true,
|
|
45
|
+
configurable: true,
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=decorators.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decorators.js","sourceRoot":"","sources":["../../src/agent/decorators.ts"],"names":[],"mappings":"AAAA,wGAAwG;AAExG,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,QAAQ,EAAoB,MAAM,YAAY,CAAC;AAG5E;;;;GAIG;AACH,MAAM,UAAU,IAAI,CAAmB,OAAO,GAAmB,EAAE;IACjE,OAAO,SAAS,QAAQ,CACtB,SAAY,EACZ,IAAY,EACZ,UAA8B;QAE9B,MAAM,MAAM,GAAG,UAAU,CAAC,KAAwC,CAAC;QACnE,IAAI,OAAO,MAAM,KAAK,UAAU,EAAE,CAAC;YACjC,MAAM,IAAI,SAAS,CAAC,2BAA2B,IAAI,aAAa,CAAC,CAAC;QACpE,CAAC;QACD,+FAA+F;QAC/F,0DAA0D;QAC1D,UAAU,CAAC,KAAK,GAAG,SAAS,OAAO,CAAe,GAAG,IAAe;YAClE,OAAO,eAAe,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAY,CAAC,CAAC;QAC1E,CAAC,CAAC;QACF,QAAQ,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;QACpE,OAAO,UAAU,CAAC;IACpB,CAAC,CAAC;AACJ,CAAC;AAQD;;;;;GAKG;AACH,MAAM,UAAU,MAAM,CAAmB,MAAiB;IACxD,OAAO,SAAS,QAAQ,CAAC,IAAiC;QACxD,6FAA6F;QAC7F,2FAA2F;QAC3F,uFAAuF;QACvF,IAAI,MAAM,CAAC,wBAAwB,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,KAAK,SAAS,EAAE,CAAC;YAC5E,MAAM,IAAI,kBAAkB,CAC1B,GAAG,IAAI,CAAC,IAAI,0BAA0B,MAAM,CAAC,IAAI,IAAI,UAAU,2BAA2B;gBACxF,4CAA4C,CAC/C,CAAC;QACJ,CAAC;QACD,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,EAAE;YAC9C,KAAK,EAAE,SAAS,MAAM;gBACpB,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC;YACtB,CAAC;YACD,QAAQ,EAAE,IAAI;YACd,YAAY,EAAE,IAAI;SACnB,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/** Docstrings at runtime: a class's own source, read by oxc's parser for its JSDoc and its parameters. */
|
|
2
|
+
/** One parameter of a tool method, as the source declares it. */
|
|
3
|
+
export interface ParamDoc {
|
|
4
|
+
name: string;
|
|
5
|
+
type?: string;
|
|
6
|
+
optional: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* The JSON Schema only the file could give: an interface or a type literal expanded into its
|
|
9
|
+
* properties. Left unset when the type text says it all — `string`, `number[]`, a callback.
|
|
10
|
+
*/
|
|
11
|
+
schema?: Record<string, unknown>;
|
|
12
|
+
}
|
|
13
|
+
/** What a class says about itself and its methods. */
|
|
14
|
+
export interface ClassDocs {
|
|
15
|
+
doc?: string;
|
|
16
|
+
methods: Map<string, {
|
|
17
|
+
doc?: string;
|
|
18
|
+
params: ParamDoc[];
|
|
19
|
+
}>;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Read a class's JSDoc and method signatures out of source text. Works on the real file (types and
|
|
23
|
+
* the class's own docstring included) and on `Ctor.toString()` (the class body alone).
|
|
24
|
+
*
|
|
25
|
+
* `file` is the name that source came from, and it is not decoration: the parser reads the dialect
|
|
26
|
+
* off the extension. A class with a `render()` lives in `agent.tsx` and its JSX is a syntax error
|
|
27
|
+
* as .ts, while a class that writes `<Slot>row` as a cast is a syntax error as .tsx — so the name
|
|
28
|
+
* of the file is the one thing that can tell the two apart, and it travels from whoever read it.
|
|
29
|
+
*/
|
|
30
|
+
export declare function parseClassSource(text: string, file?: string): ClassDocs;
|
|
31
|
+
/** How many times a class has been handed its own source; a cache invalidator, nothing more. */
|
|
32
|
+
export declare function docsVersion(): number;
|
|
33
|
+
/** Hand a class its own source, so its docstrings and parameter types are readable at runtime. */
|
|
34
|
+
export declare function describe(ctor: Function, source: string, file?: string): ClassDocs;
|
|
35
|
+
/** What this class documents about itself: what describe() was given, or its own body. */
|
|
36
|
+
export declare function docsOf(ctor: Function): ClassDocs;
|
|
37
|
+
/** The class docstring, read from its source or from an explicit `static doc`. */
|
|
38
|
+
export declare function classDoc(ctor: Function): string | undefined;
|
|
39
|
+
/** The docstring of one method, looked up along the prototype chain. */
|
|
40
|
+
export declare function methodDoc(ctor: Function, name: string): string | undefined;
|
|
41
|
+
/** The parameters of one method, looked up along the prototype chain. */
|
|
42
|
+
export declare function methodParams(ctor: Function, name: string): ParamDoc[];
|
|
43
|
+
//# sourceMappingURL=docstrings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docstrings.d.ts","sourceRoot":"","sources":["../../src/agent/docstrings.ts"],"names":[],"mappings":"AAAA,0GAA0G;AA8B1G,iEAAiE;AACjE,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH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