@olane/o-login 0.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/README.md +893 -0
  2. package/dist/src/agents.tool.d.ts +12 -0
  3. package/dist/src/agents.tool.d.ts.map +1 -0
  4. package/dist/src/agents.tool.js +20 -0
  5. package/dist/src/ai-agent.tool.d.ts +6 -0
  6. package/dist/src/ai-agent.tool.d.ts.map +1 -0
  7. package/dist/src/ai-agent.tool.js +10 -0
  8. package/dist/src/ai-login.tool.d.ts +6 -0
  9. package/dist/src/ai-login.tool.d.ts.map +1 -0
  10. package/dist/src/ai-login.tool.js +10 -0
  11. package/dist/src/base-agent.tool.d.ts +14 -0
  12. package/dist/src/base-agent.tool.d.ts.map +1 -0
  13. package/dist/src/base-agent.tool.js +38 -0
  14. package/dist/src/base-login.tool.d.ts +14 -0
  15. package/dist/src/base-login.tool.d.ts.map +1 -0
  16. package/dist/src/base-login.tool.js +38 -0
  17. package/dist/src/human-agent.tool.d.ts +6 -0
  18. package/dist/src/human-agent.tool.d.ts.map +1 -0
  19. package/dist/src/human-agent.tool.js +10 -0
  20. package/dist/src/human-login.tool.d.ts +6 -0
  21. package/dist/src/human-login.tool.d.ts.map +1 -0
  22. package/dist/src/human-login.tool.js +10 -0
  23. package/dist/src/index.d.ts +5 -0
  24. package/dist/src/index.d.ts.map +1 -0
  25. package/dist/src/index.js +4 -0
  26. package/dist/src/interfaces/agent.config.d.ts +7 -0
  27. package/dist/src/interfaces/agent.config.d.ts.map +1 -0
  28. package/dist/src/interfaces/agent.config.js +1 -0
  29. package/dist/src/interfaces/login.config.d.ts +7 -0
  30. package/dist/src/interfaces/login.config.d.ts.map +1 -0
  31. package/dist/src/interfaces/login.config.js +1 -0
  32. package/dist/src/login.tool.d.ts +12 -0
  33. package/dist/src/login.tool.d.ts.map +1 -0
  34. package/dist/src/login.tool.js +20 -0
  35. package/dist/src/methods/agent.methods.d.ts +5 -0
  36. package/dist/src/methods/agent.methods.d.ts.map +1 -0
  37. package/dist/src/methods/agent.methods.js +30 -0
  38. package/dist/src/methods/login.methods.d.ts +5 -0
  39. package/dist/src/methods/login.methods.d.ts.map +1 -0
  40. package/dist/src/methods/login.methods.js +30 -0
  41. package/dist/src/o-agent.d.ts +1 -0
  42. package/dist/src/o-agent.d.ts.map +1 -0
  43. package/dist/src/o-agent.js +1 -0
  44. package/dist/src/o-login.d.ts +1 -0
  45. package/dist/src/o-login.d.ts.map +1 -0
  46. package/dist/src/o-login.js +1 -0
  47. package/dist/test/ai.spec.d.ts +2 -0
  48. package/dist/test/ai.spec.d.ts.map +1 -0
  49. package/dist/test/ai.spec.js +19 -0
  50. package/package.json +69 -0
@@ -0,0 +1,12 @@
1
+ import { ToolResult } from '@olane/o-tool';
2
+ import { oRequest } from '@olane/o-core';
3
+ import { oLaneTool } from '@olane/o-lane';
4
+ import { oNodeConfig } from '@olane/o-node';
5
+ export declare class AgentsTool extends oLaneTool {
6
+ private roundRobinIndex;
7
+ constructor(config: oNodeConfig);
8
+ _tool_get_agents(request: oRequest): Promise<ToolResult>;
9
+ _tool_get_agent(request: oRequest): Promise<ToolResult>;
10
+ _tool_get_agent_by_id(request: oRequest): Promise<ToolResult>;
11
+ }
12
+ //# sourceMappingURL=agents.tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agents.tool.d.ts","sourceRoot":"","sources":["../../src/agents.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAY,QAAQ,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAgB,WAAW,EAAE,MAAM,eAAe,CAAC;AAE1D,qBAAa,UAAW,SAAQ,SAAS;IACvC,OAAO,CAAC,eAAe,CAAK;gBAEhB,MAAM,EAAE,WAAW;IAOzB,gBAAgB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IAIxD,eAAe,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IAIvD,qBAAqB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;CAGpE"}
@@ -0,0 +1,20 @@
1
+ import { oLaneTool } from '@olane/o-lane';
2
+ import { oNodeAddress } from '@olane/o-node';
3
+ export class AgentsTool extends oLaneTool {
4
+ constructor(config) {
5
+ super({
6
+ ...config,
7
+ address: new oNodeAddress('o://agents'),
8
+ });
9
+ this.roundRobinIndex = 0;
10
+ }
11
+ async _tool_get_agents(request) {
12
+ throw new Error('Not implemented');
13
+ }
14
+ async _tool_get_agent(request) {
15
+ throw new Error('Not implemented');
16
+ }
17
+ async _tool_get_agent_by_id(request) {
18
+ throw new Error('Not implemented');
19
+ }
20
+ }
@@ -0,0 +1,6 @@
1
+ import { oAgentTool } from './base-agent.tool.js';
2
+ import { oAgentConfig } from './interfaces/agent.config.js';
3
+ export declare class oAIAgentTool extends oAgentTool {
4
+ constructor(config: oAgentConfig);
5
+ }
6
+ //# sourceMappingURL=ai-agent.tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-agent.tool.d.ts","sourceRoot":"","sources":["../../src/ai-agent.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAG5D,qBAAa,YAAa,SAAQ,UAAU;gBAC9B,MAAM,EAAE,YAAY;CAMjC"}
@@ -0,0 +1,10 @@
1
+ import { oAgentTool } from './base-agent.tool.js';
2
+ import { oNodeAddress } from '@olane/o-node';
3
+ export class oAIAgentTool extends oAgentTool {
4
+ constructor(config) {
5
+ super({
6
+ ...config,
7
+ address: config.address || new oNodeAddress('o://ai'),
8
+ });
9
+ }
10
+ }
@@ -0,0 +1,6 @@
1
+ import { oLoginTool } from './base-login.tool.js';
2
+ import { oLoginConfig } from './interfaces/login.config.js';
3
+ export declare class oAILoginTool extends oLoginTool {
4
+ constructor(config: oLoginConfig);
5
+ }
6
+ //# sourceMappingURL=ai-login.tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-login.tool.d.ts","sourceRoot":"","sources":["../../src/ai-login.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAG5D,qBAAa,YAAa,SAAQ,UAAU;gBAC9B,MAAM,EAAE,YAAY;CAMjC"}
@@ -0,0 +1,10 @@
1
+ import { oLoginTool } from './base-login.tool.js';
2
+ import { oNodeAddress } from '@olane/o-node';
3
+ export class oAILoginTool extends oLoginTool {
4
+ constructor(config) {
5
+ super({
6
+ ...config,
7
+ address: config.address || new oNodeAddress('o://ai'),
8
+ });
9
+ }
10
+ }
@@ -0,0 +1,14 @@
1
+ import { ToolResult } from '@olane/o-tool';
2
+ import { oRequest } from '@olane/o-core';
3
+ import { oAgentConfig } from './interfaces/agent.config.js';
4
+ import { oLaneTool } from '@olane/o-lane';
5
+ export declare abstract class oAgentTool extends oLaneTool {
6
+ protected respond: (intent: string) => Promise<string>;
7
+ protected answer: (intent: string) => Promise<string>;
8
+ protected receiveStream: (data: any) => Promise<any>;
9
+ constructor(config: oAgentConfig);
10
+ _tool_intent(request: oRequest): Promise<ToolResult>;
11
+ _tool_question(request: oRequest): Promise<ToolResult>;
12
+ _tool_receive_stream(request: oRequest): Promise<ToolResult>;
13
+ }
14
+ //# sourceMappingURL=base-agent.tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-agent.tool.d.ts","sourceRoot":"","sources":["../../src/base-agent.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAY,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAG1C,8BAAsB,UAAW,SAAQ,SAAS;IAChD,SAAS,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACvD,SAAS,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACtD,SAAS,CAAC,aAAa,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;gBAEzC,MAAM,EAAE,YAAY;IAW1B,YAAY,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IAWpD,cAAc,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IAWtD,oBAAoB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;CASnE"}
@@ -0,0 +1,38 @@
1
+ import { AGENT_METHODS } from './methods/agent.methods.js';
2
+ import { oLaneTool } from '@olane/o-lane';
3
+ import { oNodeAddress } from '@olane/o-node';
4
+ export class oAgentTool extends oLaneTool {
5
+ constructor(config) {
6
+ super({
7
+ ...config,
8
+ address: config?.address || new oNodeAddress('o://agent'),
9
+ methods: AGENT_METHODS,
10
+ });
11
+ this.respond = config.respond;
12
+ this.answer = config.answer;
13
+ this.receiveStream = config.receiveStream;
14
+ }
15
+ async _tool_intent(request) {
16
+ const { intent, context } = request.params;
17
+ const response = await this.respond(intent);
18
+ return {
19
+ success: true,
20
+ resolution: response,
21
+ };
22
+ }
23
+ async _tool_question(request) {
24
+ const { question } = request.params;
25
+ const response = await this.answer(question);
26
+ return {
27
+ success: true,
28
+ answer: response,
29
+ };
30
+ }
31
+ async _tool_receive_stream(request) {
32
+ const { data } = request.params;
33
+ await this.receiveStream(data);
34
+ return {
35
+ success: true,
36
+ };
37
+ }
38
+ }
@@ -0,0 +1,14 @@
1
+ import { ToolResult } from '@olane/o-tool';
2
+ import { oRequest } from '@olane/o-core';
3
+ import { oLoginConfig } from './interfaces/login.config.js';
4
+ import { oLaneTool } from '@olane/o-lane';
5
+ export declare abstract class oLoginTool extends oLaneTool {
6
+ protected respond: (intent: string) => Promise<string>;
7
+ protected answer: (intent: string) => Promise<string>;
8
+ protected receiveStream: (data: any) => Promise<any>;
9
+ constructor(config: oLoginConfig);
10
+ _tool_intent(request: oRequest): Promise<ToolResult>;
11
+ _tool_question(request: oRequest): Promise<ToolResult>;
12
+ _tool_receive_stream(request: oRequest): Promise<ToolResult>;
13
+ }
14
+ //# sourceMappingURL=base-login.tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-login.tool.d.ts","sourceRoot":"","sources":["../../src/base-login.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAY,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAG1C,8BAAsB,UAAW,SAAQ,SAAS;IAChD,SAAS,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACvD,SAAS,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACtD,SAAS,CAAC,aAAa,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;gBAEzC,MAAM,EAAE,YAAY;IAW1B,YAAY,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IAWpD,cAAc,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IAWtD,oBAAoB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;CASnE"}
@@ -0,0 +1,38 @@
1
+ import { AGENT_METHODS } from './methods/login.methods.js';
2
+ import { oLaneTool } from '@olane/o-lane';
3
+ import { oNodeAddress } from '@olane/o-node';
4
+ export class oLoginTool extends oLaneTool {
5
+ constructor(config) {
6
+ super({
7
+ ...config,
8
+ address: config?.address || new oNodeAddress('o://login'),
9
+ methods: AGENT_METHODS,
10
+ });
11
+ this.respond = config.respond;
12
+ this.answer = config.answer;
13
+ this.receiveStream = config.receiveStream;
14
+ }
15
+ async _tool_intent(request) {
16
+ const { intent, context } = request.params;
17
+ const response = await this.respond(intent);
18
+ return {
19
+ success: true,
20
+ resolution: response,
21
+ };
22
+ }
23
+ async _tool_question(request) {
24
+ const { question } = request.params;
25
+ const response = await this.answer(question);
26
+ return {
27
+ success: true,
28
+ answer: response,
29
+ };
30
+ }
31
+ async _tool_receive_stream(request) {
32
+ const { data } = request.params;
33
+ await this.receiveStream(data);
34
+ return {
35
+ success: true,
36
+ };
37
+ }
38
+ }
@@ -0,0 +1,6 @@
1
+ import { oAgentTool } from './base-agent.tool.js';
2
+ import { oAgentConfig } from './interfaces/agent.config.js';
3
+ export declare class oHumanAgentTool extends oAgentTool {
4
+ constructor(config: oAgentConfig);
5
+ }
6
+ //# sourceMappingURL=human-agent.tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"human-agent.tool.d.ts","sourceRoot":"","sources":["../../src/human-agent.tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAG5D,qBAAa,eAAgB,SAAQ,UAAU;gBACjC,MAAM,EAAE,YAAY;CAMjC"}
@@ -0,0 +1,10 @@
1
+ import { oAgentTool } from './base-agent.tool.js';
2
+ import { oNodeAddress } from '@olane/o-node';
3
+ export class oHumanAgentTool extends oAgentTool {
4
+ constructor(config) {
5
+ super({
6
+ ...config,
7
+ address: config.address || new oNodeAddress('o://human'),
8
+ });
9
+ }
10
+ }
@@ -0,0 +1,6 @@
1
+ import { oLoginTool } from './base-login.tool.js';
2
+ import { oLoginConfig } from './interfaces/login.config.js';
3
+ export declare class oHumanLoginTool extends oLoginTool {
4
+ constructor(config: oLoginConfig);
5
+ }
6
+ //# sourceMappingURL=human-login.tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"human-login.tool.d.ts","sourceRoot":"","sources":["../../src/human-login.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAG5D,qBAAa,eAAgB,SAAQ,UAAU;gBACjC,MAAM,EAAE,YAAY;CAMjC"}
@@ -0,0 +1,10 @@
1
+ import { oLoginTool } from './base-login.tool.js';
2
+ import { oNodeAddress } from '@olane/o-node';
3
+ export class oHumanLoginTool extends oLoginTool {
4
+ constructor(config) {
5
+ super({
6
+ ...config,
7
+ address: config.address || new oNodeAddress('o://human'),
8
+ });
9
+ }
10
+ }
@@ -0,0 +1,5 @@
1
+ export * from './base-login.tool.js';
2
+ export * from './human-login.tool.js';
3
+ export * from './ai-login.tool.js';
4
+ export * from './login.tool.js';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from './base-login.tool.js';
2
+ export * from './human-login.tool.js';
3
+ export * from './ai-login.tool.js';
4
+ export * from './login.tool.js';
@@ -0,0 +1,7 @@
1
+ import { oNodeConfig } from '@olane/o-node';
2
+ export interface oAgentConfig extends oNodeConfig {
3
+ respond: (intent: string) => Promise<string>;
4
+ answer: (intent: string) => Promise<string>;
5
+ receiveStream: (data: any) => Promise<any>;
6
+ }
7
+ //# sourceMappingURL=agent.config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent.config.d.ts","sourceRoot":"","sources":["../../../src/interfaces/agent.config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,MAAM,WAAW,YAAa,SAAQ,WAAW;IAC/C,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAC7C,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAC5C,aAAa,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;CAC5C"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,7 @@
1
+ import { oNodeConfig } from '@olane/o-node';
2
+ export interface oLoginConfig extends oNodeConfig {
3
+ respond: (intent: string) => Promise<string>;
4
+ answer: (intent: string) => Promise<string>;
5
+ receiveStream: (data: any) => Promise<any>;
6
+ }
7
+ //# sourceMappingURL=login.config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"login.config.d.ts","sourceRoot":"","sources":["../../../src/interfaces/login.config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,MAAM,WAAW,YAAa,SAAQ,WAAW;IAC/C,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAC7C,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAC5C,aAAa,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;CAC5C"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,12 @@
1
+ import { ToolResult } from '@olane/o-tool';
2
+ import { oRequest } from '@olane/o-core';
3
+ import { oLaneTool } from '@olane/o-lane';
4
+ import { oNodeConfig } from '@olane/o-node';
5
+ export declare class AgentsTool extends oLaneTool {
6
+ private roundRobinIndex;
7
+ constructor(config: oNodeConfig);
8
+ _tool_get_agents(request: oRequest): Promise<ToolResult>;
9
+ _tool_get_agent(request: oRequest): Promise<ToolResult>;
10
+ _tool_get_agent_by_id(request: oRequest): Promise<ToolResult>;
11
+ }
12
+ //# sourceMappingURL=login.tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"login.tool.d.ts","sourceRoot":"","sources":["../../src/login.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAY,QAAQ,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAgB,WAAW,EAAE,MAAM,eAAe,CAAC;AAE1D,qBAAa,UAAW,SAAQ,SAAS;IACvC,OAAO,CAAC,eAAe,CAAK;gBAEhB,MAAM,EAAE,WAAW;IAOzB,gBAAgB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IAIxD,eAAe,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IAIvD,qBAAqB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;CAGpE"}
@@ -0,0 +1,20 @@
1
+ import { oLaneTool } from '@olane/o-lane';
2
+ import { oNodeAddress } from '@olane/o-node';
3
+ export class AgentsTool extends oLaneTool {
4
+ constructor(config) {
5
+ super({
6
+ ...config,
7
+ address: new oNodeAddress('o://agents'),
8
+ });
9
+ this.roundRobinIndex = 0;
10
+ }
11
+ async _tool_get_agents(request) {
12
+ throw new Error('Not implemented');
13
+ }
14
+ async _tool_get_agent(request) {
15
+ throw new Error('Not implemented');
16
+ }
17
+ async _tool_get_agent_by_id(request) {
18
+ throw new Error('Not implemented');
19
+ }
20
+ }
@@ -0,0 +1,5 @@
1
+ import { oMethod } from '@olane/o-protocol';
2
+ export declare const AGENT_METHODS: {
3
+ [key: string]: oMethod;
4
+ };
5
+ //# sourceMappingURL=agent.methods.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent.methods.d.ts","sourceRoot":"","sources":["../../../src/methods/agent.methods.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,eAAO,MAAM,aAAa,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CA6BnD,CAAC"}
@@ -0,0 +1,30 @@
1
+ export const AGENT_METHODS = {
2
+ intent: {
3
+ name: 'intent',
4
+ description: 'Agent handler for resolving an intent.',
5
+ parameters: [
6
+ {
7
+ name: 'intent',
8
+ type: 'string',
9
+ value: 'string',
10
+ description: 'The intent to resolve.',
11
+ required: true,
12
+ },
13
+ ],
14
+ dependencies: [],
15
+ },
16
+ question_answer: {
17
+ name: 'question_answer',
18
+ description: 'Agent handler for answering a question.',
19
+ parameters: [
20
+ {
21
+ name: 'question',
22
+ type: 'string',
23
+ value: 'string',
24
+ description: 'The question to answer.',
25
+ required: true,
26
+ },
27
+ ],
28
+ dependencies: [],
29
+ },
30
+ };
@@ -0,0 +1,5 @@
1
+ import { oMethod } from '@olane/o-protocol';
2
+ export declare const AGENT_METHODS: {
3
+ [key: string]: oMethod;
4
+ };
5
+ //# sourceMappingURL=login.methods.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"login.methods.d.ts","sourceRoot":"","sources":["../../../src/methods/login.methods.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,eAAO,MAAM,aAAa,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CA6BnD,CAAC"}
@@ -0,0 +1,30 @@
1
+ export const AGENT_METHODS = {
2
+ intent: {
3
+ name: 'intent',
4
+ description: 'Agent handler for resolving an intent.',
5
+ parameters: [
6
+ {
7
+ name: 'intent',
8
+ type: 'string',
9
+ value: 'string',
10
+ description: 'The intent to resolve.',
11
+ required: true,
12
+ },
13
+ ],
14
+ dependencies: [],
15
+ },
16
+ question_answer: {
17
+ name: 'question_answer',
18
+ description: 'Agent handler for answering a question.',
19
+ parameters: [
20
+ {
21
+ name: 'question',
22
+ type: 'string',
23
+ value: 'string',
24
+ description: 'The question to answer.',
25
+ required: true,
26
+ },
27
+ ],
28
+ dependencies: [],
29
+ },
30
+ };
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=o-agent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"o-agent.d.ts","sourceRoot":"","sources":["../../src/o-agent.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=o-login.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"o-login.d.ts","sourceRoot":"","sources":["../../src/o-login.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ai.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai.spec.d.ts","sourceRoot":"","sources":["../../test/ai.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,19 @@
1
+ import { NodeState, oAddress } from '@olane/o-core';
2
+ import { oLaneTool } from '@olane/o-lane';
3
+ import { expect } from 'chai';
4
+ describe('in-process @memory', () => {
5
+ it('should be able to start a single node with no leader', async () => {
6
+ const node = new oLaneTool({
7
+ address: new oAddress('o://test'),
8
+ leader: null,
9
+ parent: null,
10
+ });
11
+ await node.start();
12
+ expect(node.state).to.equal(NodeState.RUNNING);
13
+ const transports = node.transports;
14
+ // expect(transports.length).to.equal(1);
15
+ // expect(transports[0].toString()).to.contain('/memory');
16
+ await node.stop();
17
+ expect(node.state).to.equal(NodeState.STOPPED);
18
+ });
19
+ });
package/package.json ADDED
@@ -0,0 +1,69 @@
1
+ {
2
+ "name": "@olane/o-login",
3
+ "version": "0.7.3",
4
+ "type": "module",
5
+ "main": "dist/src/index.js",
6
+ "types": "dist/src/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/src/index.d.ts",
10
+ "default": "./dist/src/index.js"
11
+ }
12
+ },
13
+ "files": [
14
+ "dist/**/*",
15
+ "README.md",
16
+ "LICENSE"
17
+ ],
18
+ "scripts": {
19
+ "test": "aegir test",
20
+ "test:node": "aegir test -t node",
21
+ "test:browser": "aegir test -t browser",
22
+ "dev": "DEBUG=o-protocol:* npx tsx src/tests/index.ts",
23
+ "build": "tsc",
24
+ "deep:clean": "rm -rf node_modules && rm package-lock.json",
25
+ "start:prod": "node dist/index.js",
26
+ "prepublishOnly": "npm run build",
27
+ "update:lib": "npm install @olane/o-core@latest",
28
+ "update:peers": "npm install @olane/o-core@latest @olane/o-config@latest @olane/o-protocol@latest @olane/o-tool@latest --save-peer",
29
+ "lint": "eslint src/**/*.ts"
30
+ },
31
+ "repository": {
32
+ "type": "git",
33
+ "url": "git+https://github.com/olane-labs/olane.git"
34
+ },
35
+ "author": "oLane Inc.",
36
+ "license": "(MIT OR Apache-2.0)",
37
+ "description": "Olane interface for agents to login to olane OS",
38
+ "devDependencies": {
39
+ "@eslint/eslintrc": "^3.3.1",
40
+ "@eslint/js": "^9.29.0",
41
+ "@tsconfig/node20": "^20.1.6",
42
+ "@types/jest": "^30.0.0",
43
+ "@typescript-eslint/eslint-plugin": "^8.34.1",
44
+ "@typescript-eslint/parser": "^8.34.1",
45
+ "aegir": "^47.0.21",
46
+ "eslint": "^9.29.0",
47
+ "eslint-config-prettier": "^10.1.6",
48
+ "eslint-plugin-prettier": "^5.5.0",
49
+ "globals": "^16.2.0",
50
+ "jest": "^30.0.0",
51
+ "prettier": "^3.5.3",
52
+ "ts-jest": "^29.4.0",
53
+ "ts-node": "^10.9.2",
54
+ "tsconfig-paths": "^4.2.0",
55
+ "tsx": "^4.20.3",
56
+ "typescript": "5.4.5"
57
+ },
58
+ "peerDependencies": {
59
+ "@olane/o-config": "^0.7.2",
60
+ "@olane/o-core": "^0.7.2",
61
+ "@olane/o-lane": "^0.7.2",
62
+ "@olane/o-protocol": "^0.7.2",
63
+ "@olane/o-tool": "^0.7.2"
64
+ },
65
+ "dependencies": {
66
+ "debug": "^4.4.1",
67
+ "dotenv": "^16.5.0"
68
+ }
69
+ }