@agentxjs/core 1.9.9-dev → 2.0.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.
Files changed (99) hide show
  1. package/README.md +342 -0
  2. package/dist/RpcClient-BcJ_zAGu.d.ts +304 -0
  3. package/dist/agent/engine/internal/index.d.ts +20 -15
  4. package/dist/agent/engine/internal/index.js +1 -2
  5. package/dist/agent/engine/mealy/index.js +0 -1
  6. package/dist/agent/index.d.ts +4 -4
  7. package/dist/agent/index.js +6 -6
  8. package/dist/agent/types/index.d.ts +4 -4
  9. package/dist/agent/types/index.js +1 -2
  10. package/dist/bash/index.d.ts +29 -0
  11. package/dist/bash/index.js +7 -0
  12. package/dist/{bus-uF1DM2ox.d.ts → bus-C9FLWIu8.d.ts} +3 -1
  13. package/dist/{chunk-K6WXQ2RW.js → chunk-23UUBQXR.js} +1 -2
  14. package/dist/chunk-23UUBQXR.js.map +1 -0
  15. package/dist/chunk-BHOD5PKR.js +55 -0
  16. package/dist/chunk-BHOD5PKR.js.map +1 -0
  17. package/dist/{chunk-I7GYR3MN.js → chunk-DEAR6N3O.js} +77 -91
  18. package/dist/chunk-DEAR6N3O.js.map +1 -0
  19. package/dist/chunk-FI7WQFGV.js +37 -0
  20. package/dist/chunk-FI7WQFGV.js.map +1 -0
  21. package/dist/{chunk-TBU7FFZT.js → chunk-JTKCV7IS.js} +4 -4
  22. package/dist/chunk-JTKCV7IS.js.map +1 -0
  23. package/dist/{chunk-E5FPOAPO.js → chunk-LTVNPHST.js} +1 -1
  24. package/dist/chunk-LTVNPHST.js.map +1 -0
  25. package/dist/chunk-SKS7S2RY.js +1 -0
  26. package/dist/common/logger/index.js +0 -2
  27. package/dist/common/logger/index.js.map +1 -1
  28. package/dist/container/index.d.ts +3 -4
  29. package/dist/container/index.js +0 -2
  30. package/dist/container/index.js.map +1 -1
  31. package/dist/driver/index.d.ts +2 -310
  32. package/dist/event/index.d.ts +4 -4
  33. package/dist/event/index.js +1 -2
  34. package/dist/event/types/index.d.ts +4 -10
  35. package/dist/event/types/index.js +1 -2
  36. package/dist/{event-CDuTzs__.d.ts → event-DNWOBSBO.d.ts} +3 -4
  37. package/dist/image/index.d.ts +9 -5
  38. package/dist/image/index.js +5 -2
  39. package/dist/image/index.js.map +1 -1
  40. package/dist/index-CuS1i5V-.d.ts +609 -0
  41. package/dist/index.d.ts +2 -2
  42. package/dist/index.js +6 -6
  43. package/dist/{message-BMrMm1pq.d.ts → message-03TJzvIX.d.ts} +10 -33
  44. package/dist/mq/index.js +0 -2
  45. package/dist/mq/index.js.map +1 -1
  46. package/dist/network/index.d.ts +3 -291
  47. package/dist/network/index.js +3 -14
  48. package/dist/network/index.js.map +1 -1
  49. package/dist/persistence/index.d.ts +2 -155
  50. package/dist/platform/index.d.ts +76 -0
  51. package/dist/platform/index.js.map +1 -0
  52. package/dist/runtime/index.d.ts +26 -59
  53. package/dist/runtime/index.js +117 -33
  54. package/dist/runtime/index.js.map +1 -1
  55. package/dist/session/index.d.ts +4 -52
  56. package/dist/session/index.js +4 -51
  57. package/dist/session/index.js.map +1 -1
  58. package/dist/types-aE74Eo6G.d.ts +90 -0
  59. package/package.json +10 -5
  60. package/src/agent/__tests__/engine/internal/messageAssemblerProcessor.test.ts +291 -87
  61. package/src/agent/__tests__/engine/internal/turnTrackerProcessor.test.ts +56 -75
  62. package/src/agent/engine/MealyMachine.ts +1 -1
  63. package/src/agent/engine/internal/messageAssemblerProcessor.ts +99 -114
  64. package/src/agent/engine/internal/turnTrackerProcessor.ts +23 -27
  65. package/src/agent/types/event.ts +0 -4
  66. package/src/agent/types/index.ts +1 -3
  67. package/src/agent/types/message.ts +9 -43
  68. package/src/bash/index.ts +21 -0
  69. package/src/bash/tool.ts +57 -0
  70. package/src/bash/types.ts +108 -0
  71. package/src/driver/index.ts +1 -0
  72. package/src/driver/types.ts +122 -4
  73. package/src/event/__tests__/EventBus.test.ts +1 -1
  74. package/src/event/types/agent.ts +0 -11
  75. package/src/event/types/command.ts +3 -1
  76. package/src/image/Image.ts +11 -1
  77. package/src/image/types.ts +8 -2
  78. package/src/network/RpcClient.ts +21 -20
  79. package/src/network/index.ts +1 -1
  80. package/src/persistence/types.ts +5 -2
  81. package/src/platform/index.ts +21 -0
  82. package/src/platform/types.ts +84 -0
  83. package/src/runtime/AgentXRuntime.ts +184 -57
  84. package/src/runtime/__tests__/AgentXRuntime.test.ts +343 -0
  85. package/src/runtime/index.ts +7 -19
  86. package/src/runtime/types.ts +10 -62
  87. package/dist/chunk-7D4SUZUM.js +0 -38
  88. package/dist/chunk-E5FPOAPO.js.map +0 -1
  89. package/dist/chunk-I7GYR3MN.js.map +0 -1
  90. package/dist/chunk-K6WXQ2RW.js.map +0 -1
  91. package/dist/chunk-TBU7FFZT.js.map +0 -1
  92. package/dist/workspace/index.d.ts +0 -111
  93. package/dist/wrapper-Y3UTVU2E.js +0 -3635
  94. package/dist/wrapper-Y3UTVU2E.js.map +0 -1
  95. package/src/workspace/index.ts +0 -27
  96. package/src/workspace/types.ts +0 -131
  97. /package/dist/{workspace → bash}/index.js.map +0 -0
  98. /package/dist/{chunk-7D4SUZUM.js.map → chunk-SKS7S2RY.js.map} +0 -0
  99. /package/dist/{workspace → platform}/index.js +0 -0
@@ -1,131 +0,0 @@
1
- /**
2
- * Workspace Types
3
- *
4
- * Workspace is an abstraction for isolated working environments.
5
- * Different platforms provide different implementations:
6
- * - Node.js: File system based (local directories)
7
- * - Cloudflare: R2/KV based (cloud storage)
8
- * - Browser: IndexedDB/Memory based
9
- *
10
- * Architecture:
11
- * ```
12
- * ┌─────────────────────────────────────────────────────────┐
13
- * │ core/workspace │
14
- * │ ┌─────────────────────────────────────────────────────┐│
15
- * │ │ Workspace (interface) ││
16
- * │ │ WorkspaceProvider (interface) ││
17
- * │ └─────────────────────────────────────────────────────┘│
18
- * └─────────────────────────────────────────────────────────┘
19
- * │
20
- * ┌────────────────┼────────────────┐
21
- * ▼ ▼ ▼
22
- * ┌──────────────┐ ┌──────────────┐ ┌──────────────┐
23
- * │ platform-node│ │platform-cf │ │platform-web │
24
- * │ FileWorkspace│ │ R2Workspace │ │ IDBWorkspace │
25
- * └──────────────┘ └──────────────┘ └──────────────┘
26
- * ```
27
- */
28
-
29
- // ============================================================================
30
- // Workspace Interface
31
- // ============================================================================
32
-
33
- /**
34
- * Workspace - Isolated working environment for an Agent
35
- *
36
- * Provides a location abstraction for Agent file operations.
37
- * The actual storage mechanism depends on platform implementation.
38
- */
39
- export interface Workspace {
40
- /**
41
- * Unique workspace identifier
42
- */
43
- readonly id: string;
44
-
45
- /**
46
- * Human-readable workspace name
47
- */
48
- readonly name: string;
49
-
50
- /**
51
- * Workspace path or URI
52
- *
53
- * Platform-specific:
54
- * - Node.js: Absolute file path (e.g., ~/.agentx/workspaces/xxx/)
55
- * - Cloudflare: R2 bucket prefix (e.g., workspaces/xxx/)
56
- * - Browser: IndexedDB store name
57
- */
58
- readonly path: string;
59
-
60
- /**
61
- * Initialize workspace (create if not exists)
62
- */
63
- initialize(): Promise<void>;
64
-
65
- /**
66
- * Check if workspace exists
67
- */
68
- exists(): Promise<boolean>;
69
-
70
- /**
71
- * Clean up workspace (optional, for temporary workspaces)
72
- */
73
- cleanup?(): Promise<void>;
74
- }
75
-
76
- // ============================================================================
77
- // Workspace Provider Interface
78
- // ============================================================================
79
-
80
- /**
81
- * Configuration for creating a workspace
82
- */
83
- export interface WorkspaceCreateConfig {
84
- /**
85
- * Associated container ID
86
- */
87
- containerId: string;
88
-
89
- /**
90
- * Associated image ID
91
- */
92
- imageId: string;
93
-
94
- /**
95
- * Optional custom workspace name
96
- */
97
- name?: string;
98
- }
99
-
100
- /**
101
- * WorkspaceProvider - Factory for creating workspaces
102
- *
103
- * Platform implementations provide this interface to create
104
- * platform-specific workspaces.
105
- */
106
- export interface WorkspaceProvider {
107
- /**
108
- * Provider name (e.g., "file", "r2", "indexeddb")
109
- */
110
- readonly type: string;
111
-
112
- /**
113
- * Create a new workspace
114
- */
115
- create(config: WorkspaceCreateConfig): Promise<Workspace>;
116
-
117
- /**
118
- * Get an existing workspace by ID
119
- */
120
- get(workspaceId: string): Promise<Workspace | null>;
121
-
122
- /**
123
- * List all workspaces for a container
124
- */
125
- listByContainer(containerId: string): Promise<Workspace[]>;
126
-
127
- /**
128
- * Delete a workspace
129
- */
130
- delete(workspaceId: string): Promise<void>;
131
- }
File without changes
File without changes