alumnium 0.22.0 → 0.23.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 (75) hide show
  1. package/README.md +6 -6
  2. package/package.json +22 -19
  3. package/src/Env.d.ts +10 -3
  4. package/src/Model.d.ts +3 -0
  5. package/src/accessibility/AccessibilityElement.d.ts +1 -0
  6. package/src/accessibility/MaestroAccessibilityTree.d.ts +32 -0
  7. package/src/accessibility/index.d.ts +1 -0
  8. package/src/client/Alumni.d.ts +4 -4
  9. package/src/client/index.cjs +8352 -6809
  10. package/src/client/index.cjs.map +64 -57
  11. package/src/client/index.js +8180 -6522
  12. package/src/client/index.js.map +64 -57
  13. package/src/clients/ApiModels.d.ts +4 -2
  14. package/src/clients/Client.d.ts +2 -0
  15. package/src/clients/NativeClient.d.ts +2 -2
  16. package/src/drivers/AppiumDriver.d.ts +3 -10
  17. package/src/drivers/BaseDriver.d.ts +8 -3
  18. package/src/drivers/Driver.d.ts +20 -28
  19. package/src/drivers/MaestroDriver.d.ts +49 -0
  20. package/src/drivers/MaestroSession.d.ts +89 -0
  21. package/src/drivers/PageWaiter.d.ts +22 -0
  22. package/src/drivers/PlaywrightDriver.d.ts +13 -13
  23. package/src/drivers/SeleniumCdpConnection.d.ts +11 -0
  24. package/src/drivers/SeleniumDriver.d.ts +4 -2
  25. package/src/drivers/index.d.ts +2 -0
  26. package/src/drivers/scripts/bundledScripts.d.ts +1 -3
  27. package/src/llm/AiSdk.d.ts +34 -0
  28. package/src/llm/CodexLanguageModel.d.ts +42 -0
  29. package/src/llm/CursorLanguageModel.d.ts +27 -0
  30. package/src/llm/LanguageModel.d.ts +6 -0
  31. package/src/llm/__factories__/AiSdkFactory.d.ts +27 -0
  32. package/src/mcp/McpCommand.d.ts +3 -1
  33. package/src/mcp/McpMode.d.ts +6 -0
  34. package/src/mcp/McpServer.d.ts +7 -4
  35. package/src/mcp/McpState.d.ts +2 -0
  36. package/src/mcp/mcpDrivers.d.ts +64 -3
  37. package/src/mcp/tools/directMcpTools.d.ts +16 -0
  38. package/src/server/CacheFactory.d.ts +1 -6
  39. package/src/server/LlmFactory.d.ts +20 -29
  40. package/src/server/accessibility/ServerMaestroAccessibilityTree.d.ts +26 -0
  41. package/src/server/agents/ActorAgent.d.ts +7 -21
  42. package/src/server/agents/AreaAgent.d.ts +3 -14
  43. package/src/server/agents/BaseAgent.d.ts +19 -21
  44. package/src/server/agents/ChangesAnalyzerAgent.d.ts +3 -4
  45. package/src/server/agents/LocatorAgent.d.ts +3 -14
  46. package/src/server/agents/PlannerAgent.d.ts +3 -21
  47. package/src/server/agents/RetrieverAgent.d.ts +3 -14
  48. package/src/server/cache/CacheMiddleware.d.ts +5 -0
  49. package/src/server/cache/ChainedCache.d.ts +5 -8
  50. package/src/server/cache/ElementsCache/BaseAgentElementsCache.d.ts +3 -3
  51. package/src/server/cache/ElementsCache/ElementsCache.d.ts +7 -30
  52. package/src/server/cache/ElementsCache/ElementsCacheMask.d.ts +5 -5
  53. package/src/server/cache/ElementsCache/ElementsCacheToolCalls.d.ts +2 -2
  54. package/src/server/cache/ElementsCache/PlannerAgentElementsCache.d.ts +4 -1
  55. package/src/server/cache/NullCache.d.ts +5 -8
  56. package/src/server/cache/ResponseCache.d.ts +8 -29
  57. package/src/server/cache/ServerCache.d.ts +25 -30
  58. package/src/server/serverApp.d.ts +10 -3
  59. package/src/server/serverSchema.d.ts +14 -5
  60. package/src/server/session/Session.d.ts +13 -10
  61. package/src/server/session/SessionManager.d.ts +4 -3
  62. package/src/standalone/installCursorSdk.d.ts +1 -1
  63. package/src/telemetry/Logger.d.ts +5 -1
  64. package/src/telemetry/LoggerSchema.d.ts +10 -0
  65. package/src/telemetry/Tracer.d.ts +20 -3
  66. package/src/tools/ToolDefinition.d.ts +9 -0
  67. package/src/tools/index.d.ts +1 -0
  68. package/src/tools/toolToSchemaConverter.d.ts +1 -1
  69. package/src/tree/TreeFactory.d.ts +9 -0
  70. package/src/tree/dev/TreeDevDrill.d.ts +2 -0
  71. package/src/tree/dev/TreeDevDrillStore.d.ts +16 -4
  72. package/src/llm/Lchain.d.ts +0 -28
  73. package/src/llm/LchainSchema.d.ts +0 -3126
  74. package/src/llm/__factories__/LchainFactory.d.ts +0 -38
  75. package/src/server/LlmContext.d.ts +0 -18
package/README.md CHANGED
@@ -15,7 +15,7 @@
15
15
  <a href="https://alumnium.ai/docs/">Documentation</a>
16
16
  </p>
17
17
 
18
- Alumnium is an AI-native library and MCP for end-to-end testing. It builds upon the existing test automation ecosystem and simplifies interactions with applications, providing more robust mechanisms for verifying assertions. It works with Appium, Playwright, or Selenium and gives you [state-of-the-art][7] capabilities.
18
+ Alumnium is an AI-native library and MCP for end-to-end testing. It builds upon the existing test automation ecosystem and simplifies interactions with applications, providing more robust mechanisms for verifying assertions. It works with Appium, Maestro, Playwright, or Selenium and gives you [state-of-the-art][7] capabilities.
19
19
 
20
20
  https://github.com/user-attachments/assets/461050ba-f219-4ae2-bf5c-65faeb12b77e
21
21
 
@@ -69,12 +69,12 @@ import org.openqa.selenium.chrome.ChromeDriver;
69
69
  class AlumniumTest {
70
70
  public static void main(String...args) {
71
71
  ChromeDriver driver = new ChromeDriver();
72
- Alumni alumni = new Alumni(driver);
72
+ Alumni al = new Alumni(driver);
73
73
  driver.get("https://search.brave.com");
74
- alumni.act("type 'selenium' into the search field, then press 'Enter'");
75
- alumni.check("page title contains selenium");
76
- alumni.check("search results contain selenium.dev");
77
- alumni.quit();
74
+ al.act("type 'selenium' into the search field, then press 'Enter'");
75
+ al.check("page title contains selenium");
76
+ al.check("search results contain selenium.dev");
77
+ al.quit();
78
78
  }
79
79
  }
80
80
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "alumnium",
3
- "version": "0.22.0",
3
+ "version": "0.23.0",
4
4
  "description": "Pave the way towards AI-powered test automation",
5
5
  "keywords": [
6
6
  "ai",
@@ -62,26 +62,29 @@
62
62
  "optionalDependencies": {}
63
63
  },
64
64
  "dependencies": {
65
- "@alumnium/langchain-codex": "^0.1.0",
65
+ "@ai-sdk/amazon-bedrock": "^5.0.61",
66
+ "@ai-sdk/anthropic": "^4.0.41",
67
+ "@ai-sdk/azure": "^4.0.48",
68
+ "@ai-sdk/deepseek": "^3.0.31",
69
+ "@ai-sdk/google": "^4.0.50",
70
+ "@ai-sdk/mistral": "^4.0.32",
71
+ "@ai-sdk/openai": "^4.0.46",
72
+ "@ai-sdk/provider": "^4.0.7",
73
+ "@ai-sdk/xai": "^4.0.43",
74
+ "@cursor/sdk": "1.0.30",
66
75
  "@js-fns/canon": "^0.2.0",
67
76
  "@js-fns/xxhash": "^0.1.0",
68
- "@langchain/anthropic": "^1.3.20",
69
- "@langchain/aws": "^1.2.5",
70
- "@langchain/core": "^1.1.41",
71
- "@langchain/deepseek": "^1.0.14",
72
- "@langchain/google": "^0.1.10",
73
- "@langchain/mistralai": "^1.0.5",
74
- "@langchain/ollama": "^1.2.4",
75
- "@langchain/openai": "^1.2.10",
76
- "@langchain/xai": "^1.3.6",
77
77
  "@logtape/file": "^2.0.2",
78
78
  "@logtape/logtape": "^2.0.2",
79
79
  "@logtape/otel": "^2.0.5",
80
+ "@modelcontextprotocol/sdk": "^1.29.0",
81
+ "@openrouter/ai-sdk-provider": "^3.0.0",
80
82
  "@opentelemetry/api": "^1.9.1",
81
83
  "@opentelemetry/exporter-trace-otlp-http": "^0.215.0",
82
84
  "@opentelemetry/resources": "^2.7.0",
83
85
  "@opentelemetry/sdk-trace-base": "^2.7.0",
84
86
  "@opentelemetry/sdk-trace-node": "^2.7.0",
87
+ "ai": "^7.0.78",
85
88
  "alwaysly": "^0.4.0",
86
89
  "cac": "^7.0.0",
87
90
  "case-anything": "^3.1.2",
@@ -92,8 +95,9 @@
92
95
  "entities": "^8.0.0",
93
96
  "filenamify": "^7.0.1",
94
97
  "htmlparser2": "^11.0.0",
95
- "langchain-cursor": "^0.1.0",
96
98
  "nanoid": "^5.1.9",
99
+ "ollama-ai-provider-v2": "^4.0.1",
100
+ "openai-oauth": "1.0.2",
97
101
  "picocolors": "^1.1.1",
98
102
  "playwright-core": "^1.60.0",
99
103
  "selenium-webdriver": "^4.41.0",
@@ -104,7 +108,6 @@
104
108
  "devDependencies": {
105
109
  "@babel/plugin-proposal-decorators": "^7.29.0",
106
110
  "@elysiajs/cors": "^1.4.1",
107
- "@modelcontextprotocol/sdk": "^1.29.0",
108
111
  "@rolldown/plugin-babel": "^0.2.3",
109
112
  "@smithy/types": "^4.13.0",
110
113
  "@types/bun": "^1.3.14",
@@ -126,11 +129,11 @@
126
129
  "vitest": "^4.1.5"
127
130
  },
128
131
  "optionalDependencies": {
129
- "@alumnium/cli-darwin-arm64": "0.22.0",
130
- "@alumnium/cli-darwin-x64": "0.22.0",
131
- "@alumnium/cli-linux-arm64": "0.22.0",
132
- "@alumnium/cli-linux-x64": "0.22.0",
133
- "@alumnium/cli-windows-arm64": "0.22.0",
134
- "@alumnium/cli-windows-x64": "0.22.0"
132
+ "@alumnium/cli-darwin-arm64": "0.23.0",
133
+ "@alumnium/cli-darwin-x64": "0.23.0",
134
+ "@alumnium/cli-linux-arm64": "0.23.0",
135
+ "@alumnium/cli-linux-x64": "0.23.0",
136
+ "@alumnium/cli-windows-arm64": "0.23.0",
137
+ "@alumnium/cli-windows-x64": "0.23.0"
135
138
  }
136
139
  }
package/src/Env.d.ts CHANGED
@@ -30,10 +30,10 @@ export declare const Env: {
30
30
  readonly ALUMNIUM_LOG_PATH: string | undefined;
31
31
  readonly ALUMNIUM_LOG_FILENAME: string | undefined;
32
32
  readonly ALUMNIUM_LOG_DEBUG_EXTRA: (
33
+ | "ai-sdk"
33
34
  | "all"
34
35
  | "env"
35
36
  | "http"
36
- | "langchain"
37
37
  | "reasoning"
38
38
  | "scenarios"
39
39
  | "tree"
@@ -47,10 +47,16 @@ export declare const Env: {
47
47
  readonly ALUMNIUM_DRIVER:
48
48
  | "appium-android"
49
49
  | "appium-ios"
50
+ | "maestro"
50
51
  | "playwright"
51
52
  | "selenium";
52
53
  readonly ALUMNIUM_APPIUM_SERVER: string;
54
+ readonly ALUMNIUM_MAESTRO_PATH: string | undefined;
55
+ readonly ALUMNIUM_MAESTRO_OS: "android" | "ios";
56
+ readonly ANDROID_HOME: string | undefined;
57
+ readonly ANDROID_SDK_ROOT: string | undefined;
53
58
  readonly ALUMNIUM_MODEL: Model;
59
+ readonly ALUMNIUM_MCP_MODE: "agentic" | "direct";
54
60
  readonly ALUMNIUM_MCP_RECORD_VIDEOS: boolean;
55
61
  readonly ALUMNIUM_MCP_ARTIFACTS_DIR: string | undefined;
56
62
  readonly ALUMNIUM_MCP_PROFILES_DIR: string | undefined;
@@ -60,6 +66,7 @@ export declare const Env: {
60
66
  readonly ALUMNIUM_MODEL_RETRIES: number;
61
67
  readonly ALUMNIUM_MODEL_TIMEOUT: number;
62
68
  readonly ALUMNIUM_OLLAMA_URL: string | undefined;
69
+ readonly LANGCHAIN_CODEX_LITTERBOX_UPLOAD: boolean;
63
70
  readonly ALUMNIUM_PLANNER: boolean;
64
71
  readonly ALUMNIUM_RETRIES: number;
65
72
  readonly ALUMNIUM_NO_RETRY: boolean;
@@ -85,10 +92,8 @@ export declare const Env: {
85
92
  readonly AWS_REGION_NAME: string;
86
93
  readonly AWS_SECRET_KEY: string | undefined;
87
94
  readonly AZURE_FOUNDRY_API_KEY: string | undefined;
88
- readonly AZURE_FOUNDRY_API_VERSION: string | undefined;
89
95
  readonly AZURE_FOUNDRY_TARGET_URI: string | undefined;
90
96
  readonly AZURE_OPENAI_API_KEY: string | undefined;
91
- readonly AZURE_OPENAI_API_VERSION: string | undefined;
92
97
  readonly AZURE_OPENAI_DEFAULT_HEADERS: Record<string, string> | undefined;
93
98
  readonly AZURE_OPENAI_ENDPOINT: string | undefined;
94
99
  readonly CURSOR_API_KEY: string | undefined;
@@ -99,6 +104,7 @@ export declare const Env: {
99
104
  readonly OPENAI_API_KEY: string | undefined;
100
105
  readonly OPENAI_CUSTOM_URL: string | undefined;
101
106
  readonly OPENAI_DEFAULT_HEADERS: Record<string, string> | undefined;
107
+ readonly OPENROUTER_API_KEY: string | undefined;
102
108
  readonly XAI_API_KEY: string | undefined;
103
109
  readonly LT_USERNAME: string | undefined;
104
110
  readonly LT_ACCESS_KEY: string | undefined;
@@ -107,4 +113,5 @@ export declare const Env: {
107
113
  readonly VITEST_WORKER_ID: number | undefined;
108
114
  reset(): void;
109
115
  init(logger: LoggerSchema.Like): Env.InspectResult;
116
+ log: boolean;
110
117
  };
package/src/Model.d.ts CHANGED
@@ -20,6 +20,7 @@ declare const ModelProvider: z.ZodEnum<{
20
20
  mistralai: "mistralai";
21
21
  ollama: "ollama";
22
22
  openai: "openai";
23
+ openrouter: "openrouter";
23
24
  xai: "xai";
24
25
  }>;
25
26
  declare const ModelDev: z.ZodEnum<{
@@ -32,6 +33,7 @@ declare const ModelDev: z.ZodEnum<{
32
33
  openai: "openai";
33
34
  xai: "xai";
34
35
  }>;
36
+ export declare const defaultModelProvider: Model.Provider;
35
37
  export declare const Model: {
36
38
  Provider: z.ZodEnum<{
37
39
  anthropic: "anthropic";
@@ -46,6 +48,7 @@ export declare const Model: {
46
48
  mistralai: "mistralai";
47
49
  ollama: "ollama";
48
50
  openai: "openai";
51
+ openrouter: "openrouter";
49
52
  xai: "xai";
50
53
  }>;
51
54
  Dev: z.ZodEnum<{
@@ -10,6 +10,7 @@ export interface AccessibilityElement {
10
10
  androidText?: string | undefined;
11
11
  androidContentDesc?: string | undefined;
12
12
  androidBounds?: string | undefined;
13
+ maestroBounds?: string | undefined;
13
14
  frame?: object | undefined;
14
15
  frameChain?: number[] | undefined;
15
16
  }
@@ -0,0 +1,32 @@
1
+ import type { MaestroSession } from "../drivers/MaestroSession.ts";
2
+ import type { AccessibilityElement } from "./AccessibilityElement.ts";
3
+ import { BaseAccessibilityTree } from "./BaseAccessibilityTree.ts";
4
+ export declare namespace MaestroAccessibilityTree {
5
+ /** Role names inferred from the attributes Maestro provides. */
6
+ type Role = "TextField" | "CheckBox" | "Button" | "Text" | "View";
7
+ }
8
+ /**
9
+ * Maestro's view hierarchy, rendered as XML with `raw_id` markers.
10
+ *
11
+ * Maestro normalizes iOS and Android into one flat shape of `{attributes, children}`, which means
12
+ * it drops the platform element type — there is no `XCUIElementTypeButton` or
13
+ * `android.widget.TextView` to key off. Roles are therefore inferred from the attributes that do
14
+ * survive, and most nodes end up as the generic `View` that the server tree collapses away.
15
+ */
16
+ export declare class MaestroAccessibilityTree extends BaseAccessibilityTree<MaestroSession.Hierarchy> {
17
+ #private;
18
+ protected get kind(): string;
19
+ constructor(hierarchy: MaestroSession.Hierarchy);
20
+ /** Renders the hierarchy as XML, stamping `raw_id` on every node. */
21
+ toStr(): string;
22
+ /** True when any node in the hierarchy carries the given `resource-id`. */
23
+ hasResourceId(resourceId: string): boolean;
24
+ elementById(rawId: number): AccessibilityElement;
25
+ /** Scopes the tree to the subtree rooted at `rawId`. */
26
+ scopeToArea(rawId: number): MaestroAccessibilityTree;
27
+ /** Parses the centre point of a Maestro `[x1,y1][x2,y2]` bounds string. */
28
+ static centreOf(bounds: string): {
29
+ x: number;
30
+ y: number;
31
+ };
32
+ }
@@ -1,5 +1,6 @@
1
1
  export * from "./AccessibilityElement.ts";
2
2
  export * from "./BaseAccessibilityTree.ts";
3
3
  export * from "./ChromiumAccessibilityTree.ts";
4
+ export * from "./MaestroAccessibilityTree.ts";
4
5
  export * from "./UIAutomator2AccessibilityTree.ts";
5
6
  export * from "./XCUITestAccessibilityTree.ts";
@@ -1,11 +1,11 @@
1
- import type { BaseChatModel } from "@langchain/core/language_models/chat_models";
2
1
  import type { Page } from "playwright-core";
3
2
  import { WebDriver } from "selenium-webdriver";
4
3
  import type { Browser } from "webdriverio";
5
4
  import { Client } from "../clients/Client.ts";
6
5
  import type { Data } from "../clients/typecasting.ts";
7
- import { BaseDriver, type Element } from "../drivers/index.ts";
6
+ import { BaseDriver, type Element, MaestroSession } from "../drivers/index.ts";
8
7
  import { LlmUsageStats } from "../llm/llmSchema.ts";
8
+ import type { LanguageModel } from "../llm/LanguageModel.ts";
9
9
  import { Model } from "../Model.ts";
10
10
  import { NavigationPolicy } from "../NavigationPolicy.ts";
11
11
  import { type ToolClass } from "../tools/BaseTool.ts";
@@ -21,11 +21,11 @@ export type AlumniOptions = Alumni.Options;
21
21
  */
22
22
  export type VisionOptions = Alumni.VisionOptions;
23
23
  export declare namespace Alumni {
24
- type Driver = WebDriver | Page | Browser;
24
+ type Driver = WebDriver | Page | Browser | MaestroSession;
25
25
  interface Options {
26
26
  url?: string | undefined;
27
27
  model?: Model | undefined;
28
- llm?: BaseChatModel | undefined;
28
+ llm?: LanguageModel | undefined;
29
29
  extraTools?: ToolClass[];
30
30
  planner?: boolean | undefined;
31
31
  changeAnalysis?: boolean | undefined;