@swmansion/argent 0.27.1-next.1 → 0.27.1-next.10
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/bin/argent-android-devtools-0.1.0.apk +0 -0
- package/bin/darwin/ax-service +0 -0
- package/bin/darwin/tvos-ax-service +0 -0
- package/bin/darwin/tvos-hid-daemon +0 -0
- package/bin/tcp/ax-service +0 -0
- package/dist/cli-cmds.mjs +4 -3
- package/dist/client.d.ts +51 -0
- package/dist/installer.mjs +20 -21
- package/dist/mcp-server.mjs +5 -2
- package/dist/tool-args.generated.d.ts +8 -0
- package/dist/tool-server.cjs +590 -327
- package/dylibs/libArgentInjectionBootstrap.dylib +0 -0
- package/dylibs/libKeyboardPatch.dylib +0 -0
- package/dylibs/libNativeDevtoolsIos.dylib +0 -0
- package/dylibs/tcp/libArgentInjectionBootstrap.dylib +0 -0
- package/dylibs/tcp/libKeyboardPatch.dylib +0 -0
- package/dylibs/tcp/libNativeDevtoolsIos.dylib +0 -0
- package/dylibs/tvos/libArgentInjectionBootstrap.dylib +0 -0
- package/dylibs/tvos/libKeyboardPatch.dylib +0 -0
- package/dylibs/tvos/libNativeDevtoolsIos.dylib +0 -0
- package/package.json +1 -1
- package/skills/argent-create-flow/references/flow-yaml.md +1 -1
- package/skills/argent-create-flow/references/live-authoring.md +1 -1
|
Binary file
|
package/bin/darwin/ax-service
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/bin/tcp/ax-service
CHANGED
|
Binary file
|
package/dist/cli-cmds.mjs
CHANGED
|
@@ -21916,7 +21916,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
|
|
|
21916
21916
|
var SESSION_ID2 = randomUUID5();
|
|
21917
21917
|
function readCliVersion() {
|
|
21918
21918
|
if (true) {
|
|
21919
|
-
return "0.27.1-next.
|
|
21919
|
+
return "0.27.1-next.10";
|
|
21920
21920
|
}
|
|
21921
21921
|
return "0.0.0";
|
|
21922
21922
|
}
|
|
@@ -27495,13 +27495,14 @@ async function link(argv) {
|
|
|
27495
27495
|
const token = flags2.token ?? (existing && existing.host === host && existing.port === port ? existing.token : void 0);
|
|
27496
27496
|
let url2 = flags2.url ?? formatUrl(host, port);
|
|
27497
27497
|
if (!flags2.yes && existing) {
|
|
27498
|
-
|
|
27498
|
+
const sameUrl = existing.url === url2;
|
|
27499
|
+
if (sameUrl && existing.token === token) {
|
|
27499
27500
|
log.info(`Already linked to ${import_picocolors4.default.cyan(url2)}.`);
|
|
27500
27501
|
outro("No changes.");
|
|
27501
27502
|
return;
|
|
27502
27503
|
}
|
|
27503
27504
|
const overwrite = await confirm({
|
|
27504
|
-
message: `Replace existing link ${import_picocolors4.default.dim(existing.url)} with ${import_picocolors4.default.cyan(url2)}?`,
|
|
27505
|
+
message: sameUrl ? `Replace the token for ${import_picocolors4.default.cyan(url2)}?` : `Replace existing link ${import_picocolors4.default.dim(existing.url)} with ${import_picocolors4.default.cyan(url2)}?`,
|
|
27505
27506
|
initialValue: true
|
|
27506
27507
|
});
|
|
27507
27508
|
if (isCancel(overwrite) || !overwrite) {
|
package/dist/client.d.ts
CHANGED
|
@@ -13,6 +13,57 @@ export interface ArgentToolResult<T = unknown> {
|
|
|
13
13
|
/** Optional advisory note the tool attached to the result. */
|
|
14
14
|
note?: string;
|
|
15
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* A node of the `ui-tree` result. A flag is set only when true; a field named in
|
|
18
|
+
* `UiTree.unsupportedFields` is unknown when absent.
|
|
19
|
+
*/
|
|
20
|
+
export interface UiTreeNode {
|
|
21
|
+
role: string;
|
|
22
|
+
label?: string;
|
|
23
|
+
value?: string;
|
|
24
|
+
identifier?: string;
|
|
25
|
+
checked?: boolean;
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
password?: boolean;
|
|
28
|
+
focused?: boolean;
|
|
29
|
+
selected?: boolean;
|
|
30
|
+
/** Normalized to `screen` like gesture-tap, but not clamped: it can fall outside 0..1. */
|
|
31
|
+
frame?: {
|
|
32
|
+
x: number;
|
|
33
|
+
y: number;
|
|
34
|
+
width: number;
|
|
35
|
+
height: number;
|
|
36
|
+
};
|
|
37
|
+
/** Android: the view class. */
|
|
38
|
+
type?: string;
|
|
39
|
+
/** iOS: the accessibility trait names. */
|
|
40
|
+
traits?: string[];
|
|
41
|
+
roleDescription?: string;
|
|
42
|
+
/** Android: the raw content-desc. */
|
|
43
|
+
contentDescription?: string;
|
|
44
|
+
/** Android window roots: the package. */
|
|
45
|
+
bundleId?: string;
|
|
46
|
+
editable?: boolean;
|
|
47
|
+
heading?: boolean;
|
|
48
|
+
/** iOS: on screen, but behind an in-app presentation. */
|
|
49
|
+
covered?: boolean;
|
|
50
|
+
children: UiTreeNode[];
|
|
51
|
+
}
|
|
52
|
+
export interface UiTree {
|
|
53
|
+
schemaVersion: 1;
|
|
54
|
+
source: "ax-service" | "android-devtools";
|
|
55
|
+
/** Native units: iOS points, Android pixels. */
|
|
56
|
+
screen?: {
|
|
57
|
+
width: number;
|
|
58
|
+
height: number;
|
|
59
|
+
};
|
|
60
|
+
roots: UiTreeNode[];
|
|
61
|
+
truncated: boolean;
|
|
62
|
+
alertVisible?: boolean;
|
|
63
|
+
keyboardVisible?: boolean;
|
|
64
|
+
/** Fields this source cannot report. */
|
|
65
|
+
unsupportedFields: string[];
|
|
66
|
+
}
|
|
16
67
|
export interface CallToolOptions {
|
|
17
68
|
/** Receive progress events while a long-running tool works. */
|
|
18
69
|
onProgress?: (event: unknown) => void;
|
package/dist/installer.mjs
CHANGED
|
@@ -16730,7 +16730,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
|
|
|
16730
16730
|
var SESSION_ID = randomUUID4();
|
|
16731
16731
|
function readCliVersion() {
|
|
16732
16732
|
if (true) {
|
|
16733
|
-
return "0.27.1-next.
|
|
16733
|
+
return "0.27.1-next.10";
|
|
16734
16734
|
}
|
|
16735
16735
|
return "0.0.0";
|
|
16736
16736
|
}
|
|
@@ -17366,7 +17366,7 @@ async function shutdown(timeoutMs = SHORT_FLUSH_TIMEOUT_MS) {
|
|
|
17366
17366
|
// ../argent-installer/src/mcp-configs.ts
|
|
17367
17367
|
import * as fs15 from "node:fs";
|
|
17368
17368
|
import * as path16 from "node:path";
|
|
17369
|
-
import { execFileSync as
|
|
17369
|
+
import { execFileSync as execFileSync4 } from "node:child_process";
|
|
17370
17370
|
import { homedir as homedir4 } from "node:os";
|
|
17371
17371
|
|
|
17372
17372
|
// ../argent-installer/src/constants.ts
|
|
@@ -17383,7 +17383,7 @@ import * as fs14 from "node:fs";
|
|
|
17383
17383
|
import * as path15 from "node:path";
|
|
17384
17384
|
import * as dns from "node:dns";
|
|
17385
17385
|
import * as os2 from "node:os";
|
|
17386
|
-
import {
|
|
17386
|
+
import { execFileSync as execFileSync3, execSync } from "node:child_process";
|
|
17387
17387
|
|
|
17388
17388
|
// ../../node_modules/smol-toml/dist/date.js
|
|
17389
17389
|
var DATE_TIME_RE = /^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i;
|
|
@@ -19738,7 +19738,7 @@ var import_semver2 = __toESM(require_semver2(), 1);
|
|
|
19738
19738
|
import * as fs12 from "node:fs";
|
|
19739
19739
|
import * as path13 from "node:path";
|
|
19740
19740
|
import { createRequire } from "node:module";
|
|
19741
|
-
import {
|
|
19741
|
+
import { execFileSync as execFileSync2 } from "node:child_process";
|
|
19742
19742
|
var TEMP_RUNNER_MARKERS = [
|
|
19743
19743
|
"_npx",
|
|
19744
19744
|
"/dlx-",
|
|
@@ -19751,8 +19751,8 @@ function isTempRunnerPath(binaryPath) {
|
|
|
19751
19751
|
}
|
|
19752
19752
|
function getGlobalBinaryPath() {
|
|
19753
19753
|
try {
|
|
19754
|
-
const cmd = process.platform === "win32" ? "where" : "which -a";
|
|
19755
|
-
const output =
|
|
19754
|
+
const [cmd, args] = process.platform === "win32" ? ["where", [MCP_BINARY_NAME]] : ["which", ["-a", MCP_BINARY_NAME]];
|
|
19755
|
+
const output = execFileSync2(cmd, args, {
|
|
19756
19756
|
encoding: "utf8",
|
|
19757
19757
|
stdio: ["ignore", "pipe", "ignore"]
|
|
19758
19758
|
});
|
|
@@ -20209,10 +20209,9 @@ function getInstalledVersion() {
|
|
|
20209
20209
|
}
|
|
20210
20210
|
var PROBE_TIMEOUT_MS = 3e3;
|
|
20211
20211
|
function getLatestVersion() {
|
|
20212
|
-
const
|
|
20213
|
-
|
|
20214
|
-
|
|
20215
|
-
});
|
|
20212
|
+
const args = ["view", PACKAGE_NAME, "version", "--registry", NPM_REGISTRY];
|
|
20213
|
+
const opts = { encoding: "utf8", timeout: PROBE_TIMEOUT_MS };
|
|
20214
|
+
const result = process.platform === "win32" ? execSync(["npm", ...args].join(" "), opts) : execFileSync3("npm", args, opts);
|
|
20216
20215
|
return result.trim();
|
|
20217
20216
|
}
|
|
20218
20217
|
function isNewerVersion(candidate, current) {
|
|
@@ -20224,7 +20223,7 @@ function withNpmForce(npxArgs) {
|
|
|
20224
20223
|
}
|
|
20225
20224
|
function isSkillsCliAvailable() {
|
|
20226
20225
|
try {
|
|
20227
|
-
|
|
20226
|
+
execSync("npx --force --no-install skills --version", {
|
|
20228
20227
|
stdio: ["ignore", "ignore", "ignore"],
|
|
20229
20228
|
timeout: PROBE_TIMEOUT_MS
|
|
20230
20229
|
});
|
|
@@ -20264,7 +20263,7 @@ function escapeStringRegexp(string) {
|
|
|
20264
20263
|
// ../argent-installer/src/mcp-configs.ts
|
|
20265
20264
|
var TOOL_SERVER_BUNDLE = path16.join(import.meta.dirname, "tool-server.cjs");
|
|
20266
20265
|
function getAvailableToolIds() {
|
|
20267
|
-
const out =
|
|
20266
|
+
const out = execFileSync4("node", [TOOL_SERVER_BUNDLE, "-t"], { encoding: "utf8" });
|
|
20268
20267
|
const tools = JSON.parse(out);
|
|
20269
20268
|
return tools.map((t2) => t2.id);
|
|
20270
20269
|
}
|
|
@@ -21226,7 +21225,7 @@ var OPENCODE_GLOBAL_FILES = ["opencode.jsonc", "opencode.json", "config.json"];
|
|
|
21226
21225
|
function hasOpenCodeBinary() {
|
|
21227
21226
|
try {
|
|
21228
21227
|
const cmd = process.platform === "win32" ? "where" : "which";
|
|
21229
|
-
|
|
21228
|
+
execFileSync4(cmd, [OPENCODE_BINARY], { stdio: ["ignore", "ignore", "ignore"] });
|
|
21230
21229
|
return true;
|
|
21231
21230
|
} catch {
|
|
21232
21231
|
return false;
|
|
@@ -21884,7 +21883,7 @@ async function promptInstallMode(defaultMode = "global") {
|
|
|
21884
21883
|
var import_picocolors3 = __toESM(require_picocolors(), 1);
|
|
21885
21884
|
|
|
21886
21885
|
// ../argent-installer/src/shell.ts
|
|
21887
|
-
import { execFileSync as
|
|
21886
|
+
import { execFileSync as execFileSync5, spawn as spawn2 } from "node:child_process";
|
|
21888
21887
|
async function runTrustingDisk(execute, landedOnDisk) {
|
|
21889
21888
|
let exitError = null;
|
|
21890
21889
|
try {
|
|
@@ -21895,7 +21894,7 @@ async function runTrustingDisk(execute, landedOnDisk) {
|
|
|
21895
21894
|
return { landed: landedOnDisk(), exitError };
|
|
21896
21895
|
}
|
|
21897
21896
|
function execShellCommandSync(cmd, opts = {}) {
|
|
21898
|
-
|
|
21897
|
+
execFileSync5(cmd.bin, cmd.args, {
|
|
21899
21898
|
stdio: "inherit",
|
|
21900
21899
|
shell: process.platform === "win32",
|
|
21901
21900
|
...opts.cwd ? { cwd: opts.cwd } : {},
|
|
@@ -21939,7 +21938,7 @@ function runShellCommand(cmd, opts = {}) {
|
|
|
21939
21938
|
}
|
|
21940
21939
|
|
|
21941
21940
|
// ../argent-installer/src/skills.ts
|
|
21942
|
-
import { execFileSync as
|
|
21941
|
+
import { execFileSync as execFileSync6 } from "node:child_process";
|
|
21943
21942
|
var import_picocolors2 = __toESM(require_picocolors(), 1);
|
|
21944
21943
|
function getScopeSpecs(projectRoot) {
|
|
21945
21944
|
return [
|
|
@@ -21975,14 +21974,14 @@ function refreshArgentSkills(projectRoot) {
|
|
|
21975
21974
|
pruneError: null
|
|
21976
21975
|
};
|
|
21977
21976
|
try {
|
|
21978
|
-
|
|
21977
|
+
execFileSync6("npx", withNpmForce(spec.buildAddArgs(primarySource)), execOpts);
|
|
21979
21978
|
result.synced = bundled.size;
|
|
21980
21979
|
} catch (primaryErr) {
|
|
21981
21980
|
if (primarySource === SKILLS_DIR) {
|
|
21982
21981
|
result.syncError = primaryErr instanceof Error ? primaryErr.message.split("\n")[0] : String(primaryErr);
|
|
21983
21982
|
} else {
|
|
21984
21983
|
try {
|
|
21985
|
-
|
|
21984
|
+
execFileSync6("npx", withNpmForce(spec.buildAddArgs(SKILLS_DIR)), execOpts);
|
|
21986
21985
|
result.synced = bundled.size;
|
|
21987
21986
|
} catch (fallbackErr) {
|
|
21988
21987
|
result.syncError = fallbackErr instanceof Error ? fallbackErr.message.split("\n")[0] : String(fallbackErr);
|
|
@@ -21991,7 +21990,7 @@ function refreshArgentSkills(projectRoot) {
|
|
|
21991
21990
|
}
|
|
21992
21991
|
if (orphaned.length > 0) {
|
|
21993
21992
|
try {
|
|
21994
|
-
|
|
21993
|
+
execFileSync6("npx", withNpmForce([...spec.removeArgs, ...orphaned]), execOpts);
|
|
21995
21994
|
result.pruned = orphaned;
|
|
21996
21995
|
} catch (err) {
|
|
21997
21996
|
result.pruneError = err instanceof Error ? err.message.split("\n")[0] : String(err);
|
|
@@ -23128,7 +23127,7 @@ import * as fs17 from "node:fs";
|
|
|
23128
23127
|
import * as path18 from "node:path";
|
|
23129
23128
|
import * as readline from "node:readline";
|
|
23130
23129
|
import { homedir as homedir5 } from "node:os";
|
|
23131
|
-
import { spawn as spawn4, execFileSync as
|
|
23130
|
+
import { spawn as spawn4, execFileSync as execFileSync7 } from "node:child_process";
|
|
23132
23131
|
import { createHash as createHash2, randomBytes } from "node:crypto";
|
|
23133
23132
|
import { mkdir, writeFile, readFile, readdir, unlink, rename, chmod } from "node:fs/promises";
|
|
23134
23133
|
var STATE_DIR = path18.join(homedir5(), ".argent");
|
|
@@ -23269,7 +23268,7 @@ var PS_BIN = ["/bin/ps", "/usr/bin/ps"].find((p) => fs17.existsSync(p)) ?? "ps";
|
|
|
23269
23268
|
var PS_WIDTH_FLAGS = ["-ww"];
|
|
23270
23269
|
var PS_LOCALE = process.platform === "darwin" ? "en_US.UTF-8" : "C.UTF-8";
|
|
23271
23270
|
function readProcessCommandLine(pid, flags = PS_WIDTH_FLAGS, env = { ...process.env, LC_ALL: PS_LOCALE }) {
|
|
23272
|
-
return
|
|
23271
|
+
return execFileSync7(PS_BIN, [...flags, "-p", String(pid), "-o", "command="], {
|
|
23273
23272
|
env,
|
|
23274
23273
|
encoding: "utf8",
|
|
23275
23274
|
timeout: 2e3,
|
package/dist/mcp-server.mjs
CHANGED
|
@@ -18768,6 +18768,9 @@ function toMcpTool(t) {
|
|
|
18768
18768
|
...Object.keys(meta2).length > 0 ? { _meta: meta2 } : {}
|
|
18769
18769
|
};
|
|
18770
18770
|
}
|
|
18771
|
+
function toMcpToolList(tools) {
|
|
18772
|
+
return tools.filter((t) => !t.hideFromMcp).map(toMcpTool);
|
|
18773
|
+
}
|
|
18771
18774
|
|
|
18772
18775
|
// ../argent-mcp/src/installed-version.ts
|
|
18773
18776
|
import * as fs9 from "node:fs";
|
|
@@ -18912,13 +18915,13 @@ async function startMcpServer(options) {
|
|
|
18912
18915
|
);
|
|
18913
18916
|
server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
18914
18917
|
try {
|
|
18915
|
-
const tools = await fetchTools();
|
|
18918
|
+
const tools = toMcpToolList(await fetchTools());
|
|
18916
18919
|
await spyLog({
|
|
18917
18920
|
ts: (/* @__PURE__ */ new Date()).toISOString(),
|
|
18918
18921
|
event: "list_tools",
|
|
18919
18922
|
count: tools.length
|
|
18920
18923
|
});
|
|
18921
|
-
return { tools
|
|
18924
|
+
return { tools };
|
|
18922
18925
|
} catch (err) {
|
|
18923
18926
|
process.stderr.write(
|
|
18924
18927
|
`[argent] Failed to list tools: ${err instanceof Error ? err.message : err}
|
|
@@ -406,6 +406,8 @@ export interface ArgentToolArgs {
|
|
|
406
406
|
bundleId: string;
|
|
407
407
|
/** Android-only: fully-qualified Activity name (e.g. `.MainActivity` or `com.example/com.example.MainActivity`). If omitted on Android, the app's default launcher activity is used. Ignored on iOS / Chromium. */
|
|
408
408
|
activity?: string;
|
|
409
|
+
/** Apple simulators only: arguments passed to the app process at launch, e.g. `["-FeatureFlag", "YES"]` to override UserDefaults. A running app is relaunched to apply them. Ignored on other targets, including a physical iPhone. */
|
|
410
|
+
launchArgs?: Array<string>;
|
|
409
411
|
};
|
|
410
412
|
"list-devices": Record<string, never>;
|
|
411
413
|
"native-describe-screen": {
|
|
@@ -747,6 +749,8 @@ export interface ArgentToolArgs {
|
|
|
747
749
|
bundleId: string;
|
|
748
750
|
/** Android-only: relaunch a non-launcher Activity (e.g. `.SettingsActivity` or `com.example/com.example.SettingsActivity`). If omitted, the app's default launcher activity is used. Ignored on iOS. */
|
|
749
751
|
activity?: string;
|
|
752
|
+
/** Apple simulators only: arguments passed to the app process at launch, e.g. `["-FeatureFlag", "YES"]` to override UserDefaults. Ignored on other targets, including a physical iPhone. */
|
|
753
|
+
launchArgs?: Array<string>;
|
|
750
754
|
};
|
|
751
755
|
rotate: {
|
|
752
756
|
/** Target device id from `list-devices` (iOS UDID or Android serial). */
|
|
@@ -847,6 +851,10 @@ export interface ArgentToolArgs {
|
|
|
847
851
|
/** Repeat the whole `button` value this many times (default 1). Compact for long same-button runs, e.g. { button: "down", repeat: 12 }. */
|
|
848
852
|
repeat?: number;
|
|
849
853
|
};
|
|
854
|
+
"ui-tree": {
|
|
855
|
+
/** Target device id from `list-devices`. */
|
|
856
|
+
udid: string;
|
|
857
|
+
};
|
|
850
858
|
"update-argent": {
|
|
851
859
|
/** Which install to update. 'auto' (default) updates the install serving this session — the global PATH install or this project's local devDependency, whichever this server runs from. Pass 'global' / 'local' to force one, or 'both' when the user has both and wants each updated. */
|
|
852
860
|
target?: "auto" | "global" | "local" | "both";
|