@olane/o-core 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/README.md +199 -0
- package/dist/core/core.node.d.ts +61 -0
- package/dist/core/core.node.d.ts.map +1 -0
- package/dist/core/core.node.js +262 -0
- package/dist/core/core.node.js.map +1 -0
- package/dist/core/defaults/config.d.ts +4 -0
- package/dist/core/defaults/config.d.ts.map +1 -0
- package/dist/core/defaults/config.js +6 -0
- package/dist/core/defaults/config.js.map +1 -0
- package/dist/core/defaults/index.d.ts +2 -0
- package/dist/core/defaults/index.d.ts.map +1 -0
- package/dist/core/defaults/index.js +2 -0
- package/dist/core/defaults/index.js.map +1 -0
- package/dist/core/index.d.ts +10 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +10 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/interfaces/connection-manager.config.d.ts +7 -0
- package/dist/core/interfaces/connection-manager.config.d.ts.map +1 -0
- package/dist/core/interfaces/connection-manager.config.js +2 -0
- package/dist/core/interfaces/connection-manager.config.js.map +1 -0
- package/dist/core/interfaces/connection-send-params.interface.d.ts +7 -0
- package/dist/core/interfaces/connection-send-params.interface.d.ts.map +1 -0
- package/dist/core/interfaces/connection-send-params.interface.js +2 -0
- package/dist/core/interfaces/connection-send-params.interface.js.map +1 -0
- package/dist/core/interfaces/core-config.interface.d.ts +23 -0
- package/dist/core/interfaces/core-config.interface.d.ts.map +1 -0
- package/dist/core/interfaces/core-config.interface.js +2 -0
- package/dist/core/interfaces/core-config.interface.js.map +1 -0
- package/dist/core/interfaces/index.d.ts +6 -0
- package/dist/core/interfaces/index.d.ts.map +1 -0
- package/dist/core/interfaces/index.js +6 -0
- package/dist/core/interfaces/index.js.map +1 -0
- package/dist/core/interfaces/node-type.enum.d.ts +10 -0
- package/dist/core/interfaces/node-type.enum.d.ts.map +1 -0
- package/dist/core/interfaces/node-type.enum.js +11 -0
- package/dist/core/interfaces/node-type.enum.js.map +1 -0
- package/dist/core/interfaces/restricted-addresses.enum.d.ts +13 -0
- package/dist/core/interfaces/restricted-addresses.enum.d.ts.map +1 -0
- package/dist/core/interfaces/restricted-addresses.enum.js +19 -0
- package/dist/core/interfaces/restricted-addresses.enum.js.map +1 -0
- package/dist/core/interfaces/state.enum.d.ts +8 -0
- package/dist/core/interfaces/state.enum.d.ts.map +1 -0
- package/dist/core/interfaces/state.enum.js +9 -0
- package/dist/core/interfaces/state.enum.js.map +1 -0
- package/dist/core/interfaces/use-options.interface.d.ts +6 -0
- package/dist/core/interfaces/use-options.interface.d.ts.map +1 -0
- package/dist/core/interfaces/use-options.interface.js +2 -0
- package/dist/core/interfaces/use-options.interface.js.map +1 -0
- package/dist/core/lib/index.d.ts +8 -0
- package/dist/core/lib/index.d.ts.map +1 -0
- package/dist/core/lib/index.js +8 -0
- package/dist/core/lib/index.js.map +1 -0
- package/dist/core/lib/o-address-resolution.d.ts +9 -0
- package/dist/core/lib/o-address-resolution.d.ts.map +1 -0
- package/dist/core/lib/o-address-resolution.js +20 -0
- package/dist/core/lib/o-address-resolution.js.map +1 -0
- package/dist/core/lib/o-address-resolver.d.ts +17 -0
- package/dist/core/lib/o-address-resolver.d.ts.map +1 -0
- package/dist/core/lib/o-address-resolver.js +38 -0
- package/dist/core/lib/o-address-resolver.js.map +1 -0
- package/dist/core/lib/o-connection-manager.d.ts +17 -0
- package/dist/core/lib/o-connection-manager.d.ts.map +1 -0
- package/dist/core/lib/o-connection-manager.js +47 -0
- package/dist/core/lib/o-connection-manager.js.map +1 -0
- package/dist/core/lib/o-connection.d.ts +27 -0
- package/dist/core/lib/o-connection.d.ts.map +1 -0
- package/dist/core/lib/o-connection.js +74 -0
- package/dist/core/lib/o-connection.js.map +1 -0
- package/dist/core/lib/o-request.d.ts +17 -0
- package/dist/core/lib/o-request.d.ts.map +1 -0
- package/dist/core/lib/o-request.js +31 -0
- package/dist/core/lib/o-request.js.map +1 -0
- package/dist/core/lib/o-response.d.ts +12 -0
- package/dist/core/lib/o-response.d.ts.map +1 -0
- package/dist/core/lib/o-response.js +22 -0
- package/dist/core/lib/o-response.js.map +1 -0
- package/dist/core/lib/resolvers/anything.resolver.d.ts +8 -0
- package/dist/core/lib/resolvers/anything.resolver.d.ts.map +1 -0
- package/dist/core/lib/resolvers/anything.resolver.js +13 -0
- package/dist/core/lib/resolvers/anything.resolver.js.map +1 -0
- package/dist/core/lib/resolvers/index.d.ts +5 -0
- package/dist/core/lib/resolvers/index.d.ts.map +1 -0
- package/dist/core/lib/resolvers/index.js +5 -0
- package/dist/core/lib/resolvers/index.js.map +1 -0
- package/dist/core/lib/resolvers/method.resolver.d.ts +8 -0
- package/dist/core/lib/resolvers/method.resolver.d.ts.map +1 -0
- package/dist/core/lib/resolvers/method.resolver.js +19 -0
- package/dist/core/lib/resolvers/method.resolver.js.map +1 -0
- package/dist/core/lib/resolvers/next-hop.resolver.d.ts +10 -0
- package/dist/core/lib/resolvers/next-hop.resolver.d.ts.map +1 -0
- package/dist/core/lib/resolvers/next-hop.resolver.js +50 -0
- package/dist/core/lib/resolvers/next-hop.resolver.js.map +1 -0
- package/dist/core/lib/resolvers/storage.resolver.d.ts +6 -0
- package/dist/core/lib/resolvers/storage.resolver.d.ts.map +1 -0
- package/dist/core/lib/resolvers/storage.resolver.js +11 -0
- package/dist/core/lib/resolvers/storage.resolver.js.map +1 -0
- package/dist/core/o-address.d.ts +20 -0
- package/dist/core/o-address.d.ts.map +1 -0
- package/dist/core/o-address.js +50 -0
- package/dist/core/o-address.js.map +1 -0
- package/dist/core/o-dependency.d.ts +9 -0
- package/dist/core/o-dependency.d.ts.map +1 -0
- package/dist/core/o-dependency.js +18 -0
- package/dist/core/o-dependency.js.map +1 -0
- package/dist/core/o-parameter.d.ts +13 -0
- package/dist/core/o-parameter.d.ts.map +1 -0
- package/dist/core/o-parameter.js +28 -0
- package/dist/core/o-parameter.js.map +1 -0
- package/dist/core/utils/core.utils.d.ts +15 -0
- package/dist/core/utils/core.utils.d.ts.map +1 -0
- package/dist/core/utils/core.utils.js +52 -0
- package/dist/core/utils/core.utils.js.map +1 -0
- package/dist/core/utils/index.d.ts +4 -0
- package/dist/core/utils/index.d.ts.map +1 -0
- package/dist/core/utils/index.js +4 -0
- package/dist/core/utils/index.js.map +1 -0
- package/dist/core/utils/logger.d.ts +11 -0
- package/dist/core/utils/logger.d.ts.map +1 -0
- package/dist/core/utils/logger.js +26 -0
- package/dist/core/utils/logger.js.map +1 -0
- package/dist/core/utils/network.utils.d.ts +10 -0
- package/dist/core/utils/network.utils.d.ts.map +1 -0
- package/dist/core/utils/network.utils.js +31 -0
- package/dist/core/utils/network.utils.js.map +1 -0
- package/dist/error/enums/codes.error.d.ts +16 -0
- package/dist/error/enums/codes.error.d.ts.map +1 -0
- package/dist/error/enums/codes.error.js +17 -0
- package/dist/error/enums/codes.error.js.map +1 -0
- package/dist/error/index.d.ts +3 -0
- package/dist/error/index.d.ts.map +1 -0
- package/dist/error/index.js +3 -0
- package/dist/error/index.js.map +1 -0
- package/dist/error/tool.error.d.ts +17 -0
- package/dist/error/tool.error.d.ts.map +1 -0
- package/dist/error/tool.error.js +19 -0
- package/dist/error/tool.error.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/dist/node/index.d.ts +4 -0
- package/dist/node/index.d.ts.map +1 -0
- package/dist/node/index.js +4 -0
- package/dist/node/index.js.map +1 -0
- package/dist/node/lib/local-search.lib.d.ts +6 -0
- package/dist/node/lib/local-search.lib.d.ts.map +1 -0
- package/dist/node/lib/local-search.lib.js +7 -0
- package/dist/node/lib/local-search.lib.js.map +1 -0
- package/dist/node/lib/network-activity.lib.d.ts +12 -0
- package/dist/node/lib/network-activity.lib.d.ts.map +1 -0
- package/dist/node/lib/network-activity.lib.js +32 -0
- package/dist/node/lib/network-activity.lib.js.map +1 -0
- package/dist/node/node.d.ts +31 -0
- package/dist/node/node.d.ts.map +1 -0
- package/dist/node/node.js +233 -0
- package/dist/node/node.js.map +1 -0
- package/dist/node-host/host.node.d.ts +6 -0
- package/dist/node-host/host.node.d.ts.map +1 -0
- package/dist/node-host/host.node.js +16 -0
- package/dist/node-host/host.node.js.map +1 -0
- package/dist/node-host/index.d.ts +2 -0
- package/dist/node-host/index.d.ts.map +1 -0
- package/dist/node-host/index.js +2 -0
- package/dist/node-host/index.js.map +1 -0
- package/dist/node-virtual/index.d.ts +2 -0
- package/dist/node-virtual/index.d.ts.map +1 -0
- package/dist/node-virtual/index.js +2 -0
- package/dist/node-virtual/index.js.map +1 -0
- package/dist/node-virtual/virtual.node.d.ts +5 -0
- package/dist/node-virtual/virtual.node.d.ts.map +1 -0
- package/dist/node-virtual/virtual.node.js +8 -0
- package/dist/node-virtual/virtual.node.js.map +1 -0
- package/dist/plan/agent.plan.d.ts +16 -0
- package/dist/plan/agent.plan.d.ts.map +1 -0
- package/dist/plan/agent.plan.js +140 -0
- package/dist/plan/agent.plan.js.map +1 -0
- package/dist/plan/configure/configure.plan.d.ts +8 -0
- package/dist/plan/configure/configure.plan.d.ts.map +1 -0
- package/dist/plan/configure/configure.plan.js +13 -0
- package/dist/plan/configure/configure.plan.js.map +1 -0
- package/dist/plan/error/error.plan.d.ts +11 -0
- package/dist/plan/error/error.plan.d.ts.map +1 -0
- package/dist/plan/error/error.plan.js +22 -0
- package/dist/plan/error/error.plan.js.map +1 -0
- package/dist/plan/index.d.ts +5 -0
- package/dist/plan/index.d.ts.map +1 -0
- package/dist/plan/index.js +5 -0
- package/dist/plan/index.js.map +1 -0
- package/dist/plan/interfaces/plan-config.interface.d.ts +14 -0
- package/dist/plan/interfaces/plan-config.interface.d.ts.map +1 -0
- package/dist/plan/interfaces/plan-config.interface.js +2 -0
- package/dist/plan/interfaces/plan-config.interface.js.map +1 -0
- package/dist/plan/interfaces/plan-result.interface.d.ts +6 -0
- package/dist/plan/interfaces/plan-result.interface.d.ts.map +1 -0
- package/dist/plan/interfaces/plan-result.interface.js +2 -0
- package/dist/plan/interfaces/plan-result.interface.js.map +1 -0
- package/dist/plan/interfaces/plan-type.enum.d.ts +7 -0
- package/dist/plan/interfaces/plan-type.enum.d.ts.map +1 -0
- package/dist/plan/interfaces/plan-type.enum.js +8 -0
- package/dist/plan/interfaces/plan-type.enum.js.map +1 -0
- package/dist/plan/interfaces/plan.result.d.ts +15 -0
- package/dist/plan/interfaces/plan.result.d.ts.map +1 -0
- package/dist/plan/interfaces/plan.result.js +2 -0
- package/dist/plan/interfaces/plan.result.js.map +1 -0
- package/dist/plan/interfaces/query.config.d.ts +6 -0
- package/dist/plan/interfaces/query.config.d.ts.map +1 -0
- package/dist/plan/interfaces/query.config.js +2 -0
- package/dist/plan/interfaces/query.config.js.map +1 -0
- package/dist/plan/interfaces/task.config.d.ts +10 -0
- package/dist/plan/interfaces/task.config.d.ts.map +1 -0
- package/dist/plan/interfaces/task.config.js +2 -0
- package/dist/plan/interfaces/task.config.js.map +1 -0
- package/dist/plan/o-plan.d.ts +34 -0
- package/dist/plan/o-plan.d.ts.map +1 -0
- package/dist/plan/o-plan.js +182 -0
- package/dist/plan/o-plan.js.map +1 -0
- package/dist/plan/plan.context.d.ts +10 -0
- package/dist/plan/plan.context.d.ts.map +1 -0
- package/dist/plan/plan.context.js +29 -0
- package/dist/plan/plan.context.js.map +1 -0
- package/dist/plan/prompts/agent.prompt.d.ts +2 -0
- package/dist/plan/prompts/agent.prompt.d.ts.map +1 -0
- package/dist/plan/prompts/agent.prompt.js +95 -0
- package/dist/plan/prompts/agent.prompt.js.map +1 -0
- package/dist/plan/prompts/configure.prompt.d.ts +2 -0
- package/dist/plan/prompts/configure.prompt.d.ts.map +1 -0
- package/dist/plan/prompts/configure.prompt.js +56 -0
- package/dist/plan/prompts/configure.prompt.js.map +1 -0
- package/dist/plan/prompts/custom.prompt.d.ts +2 -0
- package/dist/plan/prompts/custom.prompt.d.ts.map +1 -0
- package/dist/plan/prompts/custom.prompt.js +56 -0
- package/dist/plan/prompts/custom.prompt.js.map +1 -0
- package/dist/plan/prompts/error.prompt.d.ts +2 -0
- package/dist/plan/prompts/error.prompt.d.ts.map +1 -0
- package/dist/plan/prompts/error.prompt.js +40 -0
- package/dist/plan/prompts/error.prompt.js.map +1 -0
- package/dist/plan/prompts/search.prompt.d.ts +2 -0
- package/dist/plan/prompts/search.prompt.d.ts.map +1 -0
- package/dist/plan/prompts/search.prompt.js +44 -0
- package/dist/plan/prompts/search.prompt.js.map +1 -0
- package/dist/plan/search/prompts/search-analysis.prompt.d.ts +2 -0
- package/dist/plan/search/prompts/search-analysis.prompt.d.ts.map +1 -0
- package/dist/plan/search/prompts/search-analysis.prompt.js +15 -0
- package/dist/plan/search/prompts/search-analysis.prompt.js.map +1 -0
- package/dist/plan/search/search.plan.d.ts +15 -0
- package/dist/plan/search/search.plan.d.ts.map +1 -0
- package/dist/plan/search/search.plan.js +36 -0
- package/dist/plan/search/search.plan.js.map +1 -0
- package/dist/plan/use/index.d.ts +2 -0
- package/dist/plan/use/index.d.ts.map +1 -0
- package/dist/plan/use/index.js +2 -0
- package/dist/plan/use/index.js.map +1 -0
- package/dist/plan/use/use.plan.d.ts +10 -0
- package/dist/plan/use/use.plan.d.ts.map +1 -0
- package/dist/plan/use/use.plan.js +58 -0
- package/dist/plan/use/use.plan.js.map +1 -0
- package/dist/src/core/core.node.d.ts +62 -0
- package/dist/src/core/core.node.d.ts.map +1 -0
- package/dist/src/core/core.node.js +262 -0
- package/dist/src/core/core.node.js.map +1 -0
- package/dist/src/core/index.d.ts +10 -0
- package/dist/src/core/index.d.ts.map +1 -0
- package/dist/src/core/interfaces/core-config.interface.d.ts +23 -0
- package/dist/src/core/interfaces/core-config.interface.d.ts.map +1 -0
- package/dist/src/core/interfaces/core-config.interface.js +2 -0
- package/dist/src/core/interfaces/core-config.interface.js.map +1 -0
- package/dist/src/core/interfaces/index.d.ts +6 -0
- package/dist/src/core/interfaces/index.d.ts.map +1 -0
- package/dist/src/core/lib/index.d.ts +8 -0
- package/dist/src/core/lib/index.d.ts.map +1 -0
- package/dist/src/core/lib/o-address-resolution.d.ts +9 -0
- package/dist/src/core/lib/o-address-resolution.d.ts.map +1 -0
- package/dist/src/core/lib/o-address-resolver.d.ts +17 -0
- package/dist/src/core/lib/o-address-resolver.d.ts.map +1 -0
- package/dist/src/core/lib/o-connection-manager.d.ts +17 -0
- package/dist/src/core/lib/o-connection-manager.d.ts.map +1 -0
- package/dist/src/core/lib/o-connection.d.ts +28 -0
- package/dist/src/core/lib/o-connection.d.ts.map +1 -0
- package/dist/src/core/lib/o-connection.js +86 -0
- package/dist/src/core/lib/o-connection.js.map +1 -0
- package/dist/src/core/lib/o-request.d.ts +17 -0
- package/dist/src/core/lib/o-request.d.ts.map +1 -0
- package/dist/src/core/lib/o-request.js +31 -0
- package/dist/src/core/lib/o-request.js.map +1 -0
- package/dist/src/core/lib/o-response.d.ts +12 -0
- package/dist/src/core/lib/o-response.d.ts.map +1 -0
- package/dist/src/core/lib/o-response.js +22 -0
- package/dist/src/core/lib/o-response.js.map +1 -0
- package/dist/src/core/lib/resolvers/anything.resolver.d.ts +8 -0
- package/dist/src/core/lib/resolvers/anything.resolver.d.ts.map +1 -0
- package/dist/src/core/lib/resolvers/index.d.ts +5 -0
- package/dist/src/core/lib/resolvers/index.d.ts.map +1 -0
- package/dist/src/core/lib/resolvers/method.resolver.d.ts +8 -0
- package/dist/src/core/lib/resolvers/method.resolver.d.ts.map +1 -0
- package/dist/src/core/lib/resolvers/next-hop.resolver.d.ts +10 -0
- package/dist/src/core/lib/resolvers/next-hop.resolver.d.ts.map +1 -0
- package/dist/src/core/lib/resolvers/storage.resolver.d.ts +6 -0
- package/dist/src/core/lib/resolvers/storage.resolver.d.ts.map +1 -0
- package/dist/src/core/o-address.d.ts +20 -0
- package/dist/src/core/o-address.d.ts.map +1 -0
- package/dist/src/core/o-dependency.d.ts +9 -0
- package/dist/src/core/o-dependency.d.ts.map +1 -0
- package/dist/src/core/o-dependency.js +18 -0
- package/dist/src/core/o-dependency.js.map +1 -0
- package/dist/src/core/o-parameter.d.ts +13 -0
- package/dist/src/core/o-parameter.d.ts.map +1 -0
- package/dist/src/core/o-parameter.js +28 -0
- package/dist/src/core/o-parameter.js.map +1 -0
- package/dist/src/core/utils/core.utils.d.ts +15 -0
- package/dist/src/core/utils/core.utils.d.ts.map +1 -0
- package/dist/src/core/utils/index.d.ts +4 -0
- package/dist/src/core/utils/index.d.ts.map +1 -0
- package/dist/src/core/utils/network.utils.d.ts +10 -0
- package/dist/src/core/utils/network.utils.d.ts.map +1 -0
- package/dist/src/index.d.ts +7 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/node/index.d.ts +4 -0
- package/dist/src/node/index.d.ts.map +1 -0
- package/dist/src/node/lib/local-search.lib.d.ts +6 -0
- package/dist/src/node/lib/local-search.lib.d.ts.map +1 -0
- package/dist/src/node/lib/network-activity.lib.d.ts +12 -0
- package/dist/src/node/lib/network-activity.lib.d.ts.map +1 -0
- package/dist/src/node/node.d.ts +28 -0
- package/dist/src/node/node.d.ts.map +1 -0
- package/dist/src/node-host/host.node.d.ts +6 -0
- package/dist/src/node-host/host.node.d.ts.map +1 -0
- package/dist/src/node-host/index.d.ts +2 -0
- package/dist/src/node-host/index.d.ts.map +1 -0
- package/dist/src/node-virtual/index.d.ts +2 -0
- package/dist/src/node-virtual/index.d.ts.map +1 -0
- package/dist/src/node-virtual/virtual.node.d.ts +5 -0
- package/dist/src/node-virtual/virtual.node.d.ts.map +1 -0
- package/dist/src/plan/agent.plan.d.ts +15 -0
- package/dist/src/plan/agent.plan.d.ts.map +1 -0
- package/dist/src/plan/error/error.plan.d.ts +11 -0
- package/dist/src/plan/error/error.plan.d.ts.map +1 -0
- package/dist/src/plan/index.d.ts +5 -0
- package/dist/src/plan/index.d.ts.map +1 -0
- package/dist/src/plan/interfaces/plan-config.interface.d.ts +14 -0
- package/dist/src/plan/interfaces/plan-config.interface.d.ts.map +1 -0
- package/dist/src/plan/interfaces/plan-result.interface.d.ts +6 -0
- package/dist/src/plan/interfaces/plan-result.interface.d.ts.map +1 -0
- package/dist/src/plan/o-plan.d.ts +33 -0
- package/dist/src/plan/o-plan.d.ts.map +1 -0
- package/dist/src/plan/search/search.plan.d.ts +11 -0
- package/dist/src/plan/search/search.plan.d.ts.map +1 -0
- package/dist/src/plan/use/index.d.ts +2 -0
- package/dist/src/plan/use/index.d.ts.map +1 -0
- package/dist/src/plan/use/use.plan.d.ts +10 -0
- package/dist/src/plan/use/use.plan.d.ts.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +84 -0
package/README.md
ADDED
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="/docs/assets/logo-white.png" width="120" alt="Olane Logo">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
## Olane — Superintelligent network infrastructure
|
|
6
|
+
|
|
7
|
+
*Try Self-hosted Version:*
|
|
8
|
+
Open-sourced with Apache 2.0 license *maintained by olane labs and the OSS community*
|
|
9
|
+
|
|
10
|
+
**Request Hosted Version:**
|
|
11
|
+
[Join waitlist](https://olane.com)
|
|
12
|
+
|
|
13
|
+
**Benefits of running everything on a personal and private superintelligent network**
|
|
14
|
+
|
|
15
|
+
- Infrastructure *that **thinks***
|
|
16
|
+
- Infrastructure *that **self-improves***
|
|
17
|
+
- Infrastructure *that **communicates with anything**
|
|
18
|
+
(Humans, AI agents, protocols like HTTP, TCP, A2A, MCP, APIs, Tools, etc.)*
|
|
19
|
+
- Infrastructure *that's **owned by you** and is **device & system agnostic***
|
|
20
|
+
- Infrastructure *that’s **zero trust, quantum-encrypted, with continuous MFA enabled***
|
|
21
|
+
|
|
22
|
+
## Olane Overview
|
|
23
|
+
|
|
24
|
+
**Olane** is a peer-to-peer, secure, hierarchical AI network designed to organize data, resources, tools, and intelligent processes.
|
|
25
|
+
|
|
26
|
+
Within an olane network, AI agents can perform long-running tasks using sensitive tooling inside a dedicated, private, and secure sandboxed environment.
|
|
27
|
+
|
|
28
|
+
**Key Concepts**
|
|
29
|
+
|
|
30
|
+
1. **o:// o-protocol**
|
|
31
|
+
|
|
32
|
+
The `o://` protocol enables seamless communication and coordination across agents, tools, and networks.
|
|
33
|
+
|
|
34
|
+
2. **o-networks**
|
|
35
|
+
|
|
36
|
+
Olane networks (`o-network`) transform every tool, data point, or intelligent action into a resolvable [o-address](https://github.com/olane-labs/o-protocol-private) — for example:
|
|
37
|
+
|
|
38
|
+
`o://my-o-network/mcp/send email to client`
|
|
39
|
+
|
|
40
|
+
More on [olane hierarchical organization](/docs/NETWORK_HIERARCHY.md) and why it is the [future of AI infrastructure](/docs/FUTURE_AI_INFRA.md).
|
|
41
|
+
|
|
42
|
+
3. **Interconnected Intelligence**
|
|
43
|
+
|
|
44
|
+
o-addresses can be shared across networks, enabling secure, intelligent communication and knowledge sharing between organizations or agents:
|
|
45
|
+
|
|
46
|
+
`o://share "o://my-network/mcp/send email" with my company's o-network`
|
|
47
|
+
|
|
48
|
+

|
|
49
|
+
|
|
50
|
+
## **Get started**
|
|
51
|
+
|
|
52
|
+
Building on olane is easy, this section will quickly teach you how to:
|
|
53
|
+
|
|
54
|
+
1. [Create your own network](#create-a-network)
|
|
55
|
+
2. [Use your own network](#use-your-network)
|
|
56
|
+
1. Build and Personalize
|
|
57
|
+
2. Monitor and Track
|
|
58
|
+
3. [Connect with other networks](#learning)
|
|
59
|
+
1. Access knowledge skills
|
|
60
|
+
2. Share knowledge skills
|
|
61
|
+
3. Communicate across bridges
|
|
62
|
+
4. Checkout out our [start building](/docs/START_BUILDING.md) page for more advanced topics and use cases
|
|
63
|
+
|
|
64
|
+
## **INSTALL 🎉**
|
|
65
|
+
|
|
66
|
+
**Create your intelligent network 🌐**
|
|
67
|
+
|
|
68
|
+
Follow these steps to create and start your olane network called `my-network`.
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
# install the cli tool
|
|
72
|
+
# clone the cli repo
|
|
73
|
+
git clone git@github.com:olane-labs/o-cli.git
|
|
74
|
+
cd o-cli
|
|
75
|
+
npm install
|
|
76
|
+
npm run build
|
|
77
|
+
chmod +x dist/index.js
|
|
78
|
+
npm install -g .
|
|
79
|
+
|
|
80
|
+
# create your first network
|
|
81
|
+
olane create -p 4444 my-network
|
|
82
|
+
|
|
83
|
+
# start your network
|
|
84
|
+
olane start -d my-network
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
*About your intelligent network:*
|
|
88
|
+
*Every network comes out of the box with [tools](https://github.com/olane-labs/o-network-private/blob/main)
|
|
89
|
+
|
|
90
|
+
>Network needs Node.js v20+ to run [update node.js tutorial](/docs/UPDATE_NODEJS.md)
|
|
91
|
+
|
|
92
|
+
> Congrats!!
|
|
93
|
+
Here’s what you just unlocked
|
|
94
|
+
Play Video
|
|
95
|
+
>
|
|
96
|
+
|
|
97
|
+
## RUN 🏃
|
|
98
|
+
|
|
99
|
+
**Use your intelligent network**
|
|
100
|
+
|
|
101
|
+
1. Join your network ➕
|
|
102
|
+
```bash
|
|
103
|
+
# join the network
|
|
104
|
+
olane join my-network
|
|
105
|
+
```
|
|
106
|
+
2. Talk to your network via "intent" (resolution) 🗣️
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
# a secure network connection is created
|
|
110
|
+
# Add new functionality like an MCP server
|
|
111
|
+
> Add linear to my network
|
|
112
|
+
.....Searching for linear context
|
|
113
|
+
.....OAuth access is required, continue to login? (You will need browser access)
|
|
114
|
+
.....Confirmed login success, creating a new node at location "o://my-network/mcp/linear"
|
|
115
|
+
.....44 New skills discovered through this node!
|
|
116
|
+
.....Intent success. Result: Network node added! Knowledge captured at o://plan/12345678910
|
|
117
|
+
.....Your network "my-network" will now analyze linear to understand more about it and how you use it.
|
|
118
|
+
|
|
119
|
+
# Assess your network's understanding of the data and tooling it contains
|
|
120
|
+
> Who am I?
|
|
121
|
+
.....Searching "my-network" for context
|
|
122
|
+
.....Analyzing "my-network" context
|
|
123
|
+
.....Summarizing
|
|
124
|
+
.....You are a software engineer with a passion for anime. Your daily routine revolves around a mixture of client projects....
|
|
125
|
+
|
|
126
|
+
# Assign jobs to your network (*coming soon)
|
|
127
|
+
> Update me on the S&P 500 through Warren Buffet's perspective every morning
|
|
128
|
+
when the markets open
|
|
129
|
+
|
|
130
|
+
-----teach your network with policies----
|
|
131
|
+
|
|
132
|
+
> Policy creation intent: "Whenever someone tries to join my network, ask me first"
|
|
133
|
+
....Confirmed, I will make sure to follow this policy (undo?)
|
|
134
|
+
> Policy creation intent: "When trying to send a message to someone, first check my contact list for their phone number"
|
|
135
|
+
> "Whenever I chat with Dillon, use slack and use the appropriate slack thread"
|
|
136
|
+
...Thinking, can you confirm which Dillon? (Dillon Morgan or Dillon Johnson)
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
**When running your intelligent network:**
|
|
140
|
+
- Your network self-heals and learns to become deterministic & stateful (read advance mode)
|
|
141
|
+
- Add policies to your network to customize (read policy to learn more)
|
|
142
|
+
- Pro tip: Visualize your network with the [cli tool](/docs/CLI.md)
|
|
143
|
+
|
|
144
|
+
> Magic moments we personally love
|
|
145
|
+
running on olane
|
|
146
|
+
Play video
|
|
147
|
+
>
|
|
148
|
+
|
|
149
|
+
## **NETWORK TO NETWORK 🛜**
|
|
150
|
+
|
|
151
|
+
**Connect to other intelligent networks 🧠**
|
|
152
|
+
|
|
153
|
+
1. Collaboration leads to super intelligence (think hive mind / AI-social network)
|
|
154
|
+
2. Simple share anything via “o-addresses” (think AI-telepathy)
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
# request to join network
|
|
158
|
+
# olane request to join public-intelligent-network
|
|
159
|
+
olane connect o://my-network --to=o://olane
|
|
160
|
+
....Connected!
|
|
161
|
+
....Discovered 232 skills, do you want to remember these?[y/n]
|
|
162
|
+
....Your network shares 31 o-addresses, would you like to collaborate with olane to help with intents involving these addresses in the future?
|
|
163
|
+
|
|
164
|
+
# network requests accepted
|
|
165
|
+
# Request or contribute knowledge to connected networks
|
|
166
|
+
# Share my knowledge of how to connect to MCPs
|
|
167
|
+
# Share my compute resources for projects that align with my personal beliefs
|
|
168
|
+
# Request knowledge for creating 3D DNA structures
|
|
169
|
+
|
|
170
|
+
# Collaborate with networks to solve challenging problems
|
|
171
|
+
> Create a non-hardware product that solves one key aspect of world hunger for
|
|
172
|
+
under $10
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
**When communicating with other intelligent networks:**
|
|
176
|
+
- Your networks are building shared intelligence
|
|
177
|
+
- How to register with olane to enable human readable network name
|
|
178
|
+
- If you want to connect directly to another network that is not verified with olane, simply share the transport with the other network [What is a transport](url)
|
|
179
|
+
|
|
180
|
+
> Does this feel like ASI to you?
|
|
181
|
+
We think so
|
|
182
|
+
Play video
|
|
183
|
+
>
|
|
184
|
+
|
|
185
|
+
> **P2P Network Connection**: to connect directly to another network via the p2p functionality, simply share the network leader node transport with your intended collaborator. To learn more, read about [direct networking](/docs/DIRECT_NETWORKING.md)
|
|
186
|
+
|
|
187
|
+
## Enjoy growing your AI network ❤️
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
**Stay connected**
|
|
192
|
+
|
|
193
|
+
1. **Shoutout Feed!**
|
|
194
|
+
2. Join our private olane groupchat
|
|
195
|
+
3. Subscribe to ASI newsletter & podcast
|
|
196
|
+
4. Follow the olane story
|
|
197
|
+
5. Join the team
|
|
198
|
+
6. Share olane with your friends (we greatly appreciate it!)
|
|
199
|
+
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { Libp2p, Libp2pConfig, Multiaddr, PeerId } from '@olane/o-config';
|
|
2
|
+
import { CoreConfig } from './interfaces/core-config.interface';
|
|
3
|
+
import { NodeState } from './interfaces/state.enum';
|
|
4
|
+
import { oAddress } from './o-address';
|
|
5
|
+
import { Logger } from './utils/logger';
|
|
6
|
+
import { NodeType } from './interfaces/node-type.enum';
|
|
7
|
+
import { oConnectionManager } from './lib/o-connection-manager';
|
|
8
|
+
import { oResponse } from './lib/o-response';
|
|
9
|
+
import { oConnection } from './lib/o-connection';
|
|
10
|
+
import { oMethod } from '@olane/o-protocol';
|
|
11
|
+
import { oAddressResolution } from './lib/o-address-resolution';
|
|
12
|
+
import { oDependency } from './o-dependency';
|
|
13
|
+
import { UseOptions } from './interfaces/use-options.interface';
|
|
14
|
+
export declare abstract class oCoreNode {
|
|
15
|
+
readonly config: CoreConfig;
|
|
16
|
+
p2pNode: Libp2p;
|
|
17
|
+
logger: Logger;
|
|
18
|
+
networkConfig: Libp2pConfig;
|
|
19
|
+
address: oAddress;
|
|
20
|
+
readonly staticAddress: oAddress;
|
|
21
|
+
peerId: PeerId;
|
|
22
|
+
state: NodeState;
|
|
23
|
+
errors: Error[];
|
|
24
|
+
connectionManager: oConnectionManager;
|
|
25
|
+
leaders: Multiaddr[];
|
|
26
|
+
addressResolution: oAddressResolution;
|
|
27
|
+
readonly description: string;
|
|
28
|
+
dependencies: oDependency[];
|
|
29
|
+
methods: {
|
|
30
|
+
[key: string]: oMethod;
|
|
31
|
+
};
|
|
32
|
+
successCount: number;
|
|
33
|
+
errorCount: number;
|
|
34
|
+
constructor(config: CoreConfig);
|
|
35
|
+
get type(): NodeType;
|
|
36
|
+
get transports(): string[];
|
|
37
|
+
initialize(): Promise<void>;
|
|
38
|
+
whoami(): Promise<any>;
|
|
39
|
+
get parent(): oAddress | null;
|
|
40
|
+
get parentTransports(): Multiaddr[];
|
|
41
|
+
getTransports(address: oAddress): Multiaddr[];
|
|
42
|
+
handleStaticAddressTranslation(addressInput: oAddress): Promise<oAddress>;
|
|
43
|
+
translateAddress(addressWithLeaderTransports: oAddress): Promise<{
|
|
44
|
+
nextHopAddress: oAddress;
|
|
45
|
+
targetAddress: oAddress;
|
|
46
|
+
}>;
|
|
47
|
+
use(addressWithLeaderTransports: oAddress, data: {
|
|
48
|
+
method?: string;
|
|
49
|
+
params?: {
|
|
50
|
+
[key: string]: any;
|
|
51
|
+
};
|
|
52
|
+
}, config?: UseOptions): Promise<oResponse>;
|
|
53
|
+
advertiseToNetwork(): Promise<void>;
|
|
54
|
+
connectToParent(): Promise<void>;
|
|
55
|
+
register(): Promise<void>;
|
|
56
|
+
connect(nextHopAddress: oAddress, targetAddress: oAddress): Promise<oConnection>;
|
|
57
|
+
teardown(): Promise<void>;
|
|
58
|
+
start(): Promise<void>;
|
|
59
|
+
stop(): Promise<void>;
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=core.node.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core.node.d.ts","sourceRoot":"","sources":["../../src/core/core.node.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,MAAM,EACN,YAAY,EACZ,SAAS,EAET,MAAM,EACP,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAEhE,8BAAsB,SAAS;IAmBjB,QAAQ,CAAC,MAAM,EAAE,UAAU;IAlBhC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,aAAa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Ae,GACtB,OAAO,CAAC,SAAS,CAAC;IAiBf,kBAAkB;IAsDlB,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC;IAkBhC,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAmCzB,OAAO,CACX,cAAc,EAAE,QAAQ,EACxB,aAAa,EAAE,QAAQ,GACtB,OAAO,CAAC,WAAW,CAAC;IA2BV,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAWzB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IA0BtB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAanC"}
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
import { defaultLibp2pConfig, multiaddr, } from '@olane/o-config';
|
|
2
|
+
import { NodeState } from './interfaces/state.enum';
|
|
3
|
+
import { oAddress } from './o-address';
|
|
4
|
+
import { Logger } from './utils/logger';
|
|
5
|
+
import { NodeType } from './interfaces/node-type.enum';
|
|
6
|
+
import { oAddressResolution } from './lib/o-address-resolution';
|
|
7
|
+
import { oDependency } from './o-dependency';
|
|
8
|
+
export class oCoreNode {
|
|
9
|
+
config;
|
|
10
|
+
p2pNode;
|
|
11
|
+
logger;
|
|
12
|
+
networkConfig;
|
|
13
|
+
address;
|
|
14
|
+
staticAddress;
|
|
15
|
+
peerId;
|
|
16
|
+
state = NodeState.STOPPED;
|
|
17
|
+
errors = [];
|
|
18
|
+
connectionManager;
|
|
19
|
+
leaders = [];
|
|
20
|
+
addressResolution;
|
|
21
|
+
description;
|
|
22
|
+
dependencies;
|
|
23
|
+
methods;
|
|
24
|
+
successCount = 0;
|
|
25
|
+
errorCount = 0;
|
|
26
|
+
constructor(config) {
|
|
27
|
+
this.config = config;
|
|
28
|
+
this.logger = new Logger(this.constructor.name +
|
|
29
|
+
(config.name ? `:${config.name}` : '') +
|
|
30
|
+
':' +
|
|
31
|
+
config.address.toString());
|
|
32
|
+
this.address = config.address || new oAddress('o://node');
|
|
33
|
+
this.networkConfig = config.network || defaultLibp2pConfig;
|
|
34
|
+
this.addressResolution = new oAddressResolution();
|
|
35
|
+
this.staticAddress = config.address;
|
|
36
|
+
this.description = config.description || '';
|
|
37
|
+
this.dependencies =
|
|
38
|
+
config.dependencies?.map((d) => new oDependency(d)) || [];
|
|
39
|
+
this.methods = config.methods || {};
|
|
40
|
+
}
|
|
41
|
+
get type() {
|
|
42
|
+
return this.config.type || NodeType.UNKNOWN;
|
|
43
|
+
}
|
|
44
|
+
get transports() {
|
|
45
|
+
return this.p2pNode
|
|
46
|
+
.getMultiaddrs()
|
|
47
|
+
.map((multiaddr) => multiaddr.toString());
|
|
48
|
+
}
|
|
49
|
+
async initialize() { }
|
|
50
|
+
async whoami() {
|
|
51
|
+
return {
|
|
52
|
+
address: this.address.toString(),
|
|
53
|
+
type: this.type,
|
|
54
|
+
description: this.description,
|
|
55
|
+
methods: this.methods,
|
|
56
|
+
successCount: this.successCount,
|
|
57
|
+
errorCount: this.errorCount,
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
get parent() {
|
|
61
|
+
return this.config.parent || null;
|
|
62
|
+
}
|
|
63
|
+
get parentTransports() {
|
|
64
|
+
return this.parent?.transports.map((t) => multiaddr(t)) || [];
|
|
65
|
+
}
|
|
66
|
+
getTransports(address) {
|
|
67
|
+
let leaderTransports = address.libp2pTransports;
|
|
68
|
+
if (leaderTransports.length > 0) {
|
|
69
|
+
return leaderTransports;
|
|
70
|
+
}
|
|
71
|
+
if (leaderTransports.length === 0) {
|
|
72
|
+
this.logger.debug('No leader transports provided, we are going to search within our own network');
|
|
73
|
+
if (!this.config.leader) {
|
|
74
|
+
if (this.type === NodeType.LEADER) {
|
|
75
|
+
this.logger.debug('Node is a leader, using own transports');
|
|
76
|
+
leaderTransports = this.transports.map((t) => multiaddr(t));
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
this.logger.warn('We are not within a network, cannot search for addressed node without leader.');
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
leaderTransports = this.config.leader.libp2pTransports;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
if (leaderTransports.length === 0) {
|
|
87
|
+
throw new Error('No leader transports provided, cannot search for leaders');
|
|
88
|
+
}
|
|
89
|
+
return leaderTransports;
|
|
90
|
+
}
|
|
91
|
+
async handleStaticAddressTranslation(addressInput) {
|
|
92
|
+
let result = addressInput;
|
|
93
|
+
if (result.value.indexOf('o://leader') === -1) {
|
|
94
|
+
const response = await this.use(new oAddress('o://leader/register', result.transports), {
|
|
95
|
+
method: 'search',
|
|
96
|
+
params: { staticAddress: result.root },
|
|
97
|
+
}, {
|
|
98
|
+
noIndex: true,
|
|
99
|
+
});
|
|
100
|
+
const searchResults = response.result.data;
|
|
101
|
+
if (searchResults.length > 0) {
|
|
102
|
+
const remainderPaths = result.paths.split('/').slice(1);
|
|
103
|
+
let resolvedAddress = searchResults[0].address +
|
|
104
|
+
(remainderPaths.length > 0 ? '/' + remainderPaths.join('/') : '');
|
|
105
|
+
result = new oAddress(resolvedAddress, result.transports);
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
this.logger.warn('Failed to translate static address');
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
return result;
|
|
112
|
+
}
|
|
113
|
+
async translateAddress(addressWithLeaderTransports) {
|
|
114
|
+
let targetAddress = addressWithLeaderTransports;
|
|
115
|
+
let nextHopAddress = addressWithLeaderTransports;
|
|
116
|
+
targetAddress = await this.handleStaticAddressTranslation(targetAddress);
|
|
117
|
+
nextHopAddress = await this.addressResolution.resolve(targetAddress);
|
|
118
|
+
const leaderTransports = this.getTransports(nextHopAddress);
|
|
119
|
+
nextHopAddress.setTransports(leaderTransports);
|
|
120
|
+
return {
|
|
121
|
+
nextHopAddress,
|
|
122
|
+
targetAddress: targetAddress,
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
async use(addressWithLeaderTransports, data, config = {}) {
|
|
126
|
+
const { nextHopAddress, targetAddress } = await this.translateAddress(addressWithLeaderTransports);
|
|
127
|
+
this.logger.debug('Using address: ', targetAddress.toString());
|
|
128
|
+
const connection = await this.connect(nextHopAddress, targetAddress);
|
|
129
|
+
const response = await connection.send({
|
|
130
|
+
address: targetAddress?.toString() || '',
|
|
131
|
+
payload: data,
|
|
132
|
+
});
|
|
133
|
+
return response;
|
|
134
|
+
}
|
|
135
|
+
async advertiseToNetwork() {
|
|
136
|
+
this.logger.debug('Advertising to network our static and absolute addresses...');
|
|
137
|
+
const absoluteAddressCid = await this.address.toCID();
|
|
138
|
+
this.logger.debug('Advertising absolute address: ', absoluteAddressCid);
|
|
139
|
+
try {
|
|
140
|
+
const providePromise = this.p2pNode.services.dht.provide(absoluteAddressCid);
|
|
141
|
+
const timeoutPromise = new Promise((_, reject) => setTimeout(() => reject(new Error('Advertise Content routing provide timeout')), 5000));
|
|
142
|
+
await Promise.race([providePromise, timeoutPromise]);
|
|
143
|
+
this.logger.debug('Successfully advertised absolute address', providePromise);
|
|
144
|
+
}
|
|
145
|
+
catch (error) {
|
|
146
|
+
this.logger.warn('Failed to advertise absolute address (this is normal for isolated nodes):', error.message);
|
|
147
|
+
}
|
|
148
|
+
const staticAddressCid = await this.staticAddress.toCID();
|
|
149
|
+
this.logger.debug('Advertising static address: ', staticAddressCid);
|
|
150
|
+
try {
|
|
151
|
+
const providePromise = this.p2pNode.services.dht.provide(staticAddressCid);
|
|
152
|
+
const timeoutPromise = new Promise((_, reject) => setTimeout(() => reject(new Error('Content routing provide timeout')), 5000));
|
|
153
|
+
await Promise.race([providePromise, timeoutPromise]);
|
|
154
|
+
this.logger.debug('Successfully advertised static address');
|
|
155
|
+
}
|
|
156
|
+
catch (error) {
|
|
157
|
+
this.logger.warn('Failed to advertise static address (this is normal for isolated nodes):', error.message);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
async connectToParent() {
|
|
161
|
+
if (this.parent) {
|
|
162
|
+
this.logger.debug('Connecting to parent: ' + this.parent.toString());
|
|
163
|
+
await this.connect(this.parent, this.parent);
|
|
164
|
+
this.logger.debug('Successfully connected to parent');
|
|
165
|
+
}
|
|
166
|
+
else {
|
|
167
|
+
this.logger.debug('Node not configured to connect to parent or has already connected to the parent');
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
async register() {
|
|
171
|
+
if (this.type === NodeType.LEADER) {
|
|
172
|
+
this.logger.debug('Skipping registration, node is leader');
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
this.logger.debug('Registering node...');
|
|
176
|
+
await this.connectToParent();
|
|
177
|
+
if (!this.config.leader) {
|
|
178
|
+
this.logger.warn('No leaders found, skipping registration');
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
const address = new oAddress('o://leader/register');
|
|
182
|
+
const params = {
|
|
183
|
+
method: 'commit',
|
|
184
|
+
params: {
|
|
185
|
+
peerId: this.peerId.toString(),
|
|
186
|
+
address: this.address.toString(),
|
|
187
|
+
protocols: this.p2pNode.getProtocols(),
|
|
188
|
+
transports: this.transports,
|
|
189
|
+
staticAddress: this.staticAddress.toString(),
|
|
190
|
+
},
|
|
191
|
+
};
|
|
192
|
+
await this.use(address, params, {
|
|
193
|
+
noIndex: true,
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
async connect(nextHopAddress, targetAddress) {
|
|
197
|
+
if (!this.connectionManager) {
|
|
198
|
+
this.logger.error('Connection manager not initialized');
|
|
199
|
+
throw new Error('Node is not ready to connect to other nodes');
|
|
200
|
+
}
|
|
201
|
+
const connection = await this.connectionManager
|
|
202
|
+
.connect({
|
|
203
|
+
address: targetAddress,
|
|
204
|
+
nextHopAddress,
|
|
205
|
+
callerAddress: this.address,
|
|
206
|
+
})
|
|
207
|
+
.catch((error) => {
|
|
208
|
+
if (error.message === 'Can not dial self') {
|
|
209
|
+
this.logger.error('Make sure you are entering the network not directly through the leader node.');
|
|
210
|
+
}
|
|
211
|
+
throw error;
|
|
212
|
+
});
|
|
213
|
+
this.logger.debug('Successfully connected to: ', nextHopAddress.toString());
|
|
214
|
+
if (!connection) {
|
|
215
|
+
throw new Error('Connection failed');
|
|
216
|
+
}
|
|
217
|
+
return connection;
|
|
218
|
+
}
|
|
219
|
+
async teardown() {
|
|
220
|
+
this.logger.debug('Tearing down node...');
|
|
221
|
+
if (this.p2pNode) {
|
|
222
|
+
await this.p2pNode.stop();
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
async start() {
|
|
226
|
+
if (this.state !== NodeState.STOPPED) {
|
|
227
|
+
this.logger.warn('Node is not stopped, skipping start');
|
|
228
|
+
return;
|
|
229
|
+
}
|
|
230
|
+
this.state = NodeState.STARTING;
|
|
231
|
+
this.p2pNode = this.p2pNode;
|
|
232
|
+
try {
|
|
233
|
+
await this.initialize();
|
|
234
|
+
this.logger.debug('Initializing connection manager...');
|
|
235
|
+
await this.register().catch((error) => {
|
|
236
|
+
this.logger.error('Failed to register node', error);
|
|
237
|
+
});
|
|
238
|
+
this.state = NodeState.RUNNING;
|
|
239
|
+
}
|
|
240
|
+
catch (error) {
|
|
241
|
+
this.logger.error('Failed to start node', error);
|
|
242
|
+
this.errors.push(error);
|
|
243
|
+
this.state = NodeState.ERROR;
|
|
244
|
+
await this.teardown();
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
async stop() {
|
|
248
|
+
this.logger.debug('Stop node called...');
|
|
249
|
+
this.state = NodeState.STOPPING;
|
|
250
|
+
try {
|
|
251
|
+
await this.teardown();
|
|
252
|
+
this.state = NodeState.STOPPED;
|
|
253
|
+
this.logger.debug('Node stopped!');
|
|
254
|
+
}
|
|
255
|
+
catch (error) {
|
|
256
|
+
this.errors.push(error);
|
|
257
|
+
this.state = NodeState.ERROR;
|
|
258
|
+
this.logger.error('Node failed to stop', error);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
//# sourceMappingURL=core.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core.node.js","sour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AAM,CAAC,KAAK,CAAC,qBAAqB,EAAE,KAAK,CAAC,CAAC;QAClD,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/core/defaults/config.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,mBAAmB,QAAoC,CAAC;AACrE,eAAO,MAAM,qBAAqB,QAA6C,CAAC;AAChF,eAAO,MAAM,mBAAmB,QAG/B,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import path from 'path';
|
|
2
|
+
import os from 'os';
|
|
3
|
+
export const DEFAULT_CONFIG_PATH = path.join(os.homedir(), '.olane');
|
|
4
|
+
export const DEFAULT_NETWORKS_PATH = path.join(DEFAULT_CONFIG_PATH, 'networks');
|
|
5
|
+
export const DEFAULT_CONFIG_FILE = path.join(DEFAULT_CONFIG_PATH, 'config.json');
|
|
6
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/core/defaults/config.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,IAAI,CAAC;AAEpB,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,QAAQ,CAAC,CAAC;AACrE,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,CAAC,IAAI,CAAC,mBAAmB,EAAE,UAAU,CAAC,CAAC;AAChF,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,CAAC,IAAI,CAC1C,mBAAmB,EACnB,aAAa,CACd,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/defaults/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/defaults/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './core.node';
|
|
2
|
+
export * from './utils/core.utils';
|
|
3
|
+
export * from './o-address';
|
|
4
|
+
export * from './interfaces';
|
|
5
|
+
export * from './o-dependency';
|
|
6
|
+
export * from './utils/logger';
|
|
7
|
+
export * from './lib';
|
|
8
|
+
export * from './o-parameter';
|
|
9
|
+
export * from './defaults';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,OAAO,CAAC;AACtB,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './core.node';
|
|
2
|
+
export * from './utils/core.utils';
|
|
3
|
+
export * from './o-address';
|
|
4
|
+
export * from './interfaces';
|
|
5
|
+
export * from './o-dependency';
|
|
6
|
+
export * from './utils/logger';
|
|
7
|
+
export * from './lib';
|
|
8
|
+
export * from './o-parameter';
|
|
9
|
+
export * from './defaults';
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,OAAO,CAAC;AACtB,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connection-manager.config.d.ts","sourceRoot":"","sources":["../../../src/core/interfaces/connection-manager.config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connection-manager.config.js","sourceRoot":"","sources":["../../../src/core/interfaces/connection-manager.config.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connection-send-params.interface.d.ts","sourceRoot":"","sources":["../../../src/core/interfaces/connection-send-params.interface.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE;QACP,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACxB,CAAC;CACH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connection-send-params.interface.js","sourceRoot":"","sources":["../../../src/core/interfaces/connection-send-params.interface.ts"],"names":[],"mappings":""}
|