@fieldwork-ai/cli 0.27.0 → 0.28.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 +2 -2
- package/dist/commands/tool.d.ts +2 -0
- package/dist/commands/tool.js +9 -1
- package/dist/config.js +1 -1
- package/package.json +7 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Fieldwork CLI (`@fieldwork-ai/cli`)
|
|
2
2
|
|
|
3
|
-
The Fieldwork CLI: drive your organization's [Fieldwork](https://app.
|
|
3
|
+
The Fieldwork CLI: drive your organization's [Fieldwork](https://app.fieldwork.ai) assets and tools from a terminal, a script, or an agent harness like Claude Code.
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
6
|
npm install -g @fieldwork-ai/cli
|
|
@@ -54,7 +54,7 @@ Credential resolution order: the injected container file (`~/.fieldwork/credenti
|
|
|
54
54
|
Prefer a native tool surface in an MCP-capable harness? Fieldwork is also a remote MCP server:
|
|
55
55
|
|
|
56
56
|
```bash
|
|
57
|
-
claude mcp add --transport http fieldwork https://app.
|
|
57
|
+
claude mcp add --transport http fieldwork https://app.fieldwork.ai/mcp
|
|
58
58
|
```
|
|
59
59
|
|
|
60
60
|
## Exit codes
|
package/dist/commands/tool.d.ts
CHANGED
|
@@ -10,3 +10,5 @@ export declare function buildToolArgs(argsOption: string | undefined, argEntries
|
|
|
10
10
|
export declare function applyArgEntries(base: Record<string, unknown>, entries: string[], flag: string): Record<string, unknown>;
|
|
11
11
|
export declare function readStdin(): Promise<string | null>;
|
|
12
12
|
export declare function registerToolCommands(program: Command): void;
|
|
13
|
+
/** A deprecated tool says so in its result; a script's author should see it on stderr, not only in the data. */
|
|
14
|
+
export declare function deprecationWarning(name: string, result: unknown): string | null;
|
package/dist/commands/tool.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { apiJson, getContext } from "../http.js";
|
|
2
|
-
import { EXIT, fail, printData } from "../output.js";
|
|
2
|
+
import { EXIT, fail, note, printData } from "../output.js";
|
|
3
3
|
/**
|
|
4
4
|
* `fieldwork tool run <name>` argument assembly (the httpie convention):
|
|
5
5
|
* --args takes a JSON object ('-' reads stdin); repeated --arg entries merge
|
|
@@ -100,7 +100,15 @@ export function registerToolCommands(program) {
|
|
|
100
100
|
method: "POST",
|
|
101
101
|
body: JSON.stringify({ name, args }),
|
|
102
102
|
});
|
|
103
|
+
const warning = deprecationWarning(name, body.result);
|
|
104
|
+
if (warning)
|
|
105
|
+
note(warning);
|
|
103
106
|
// Tool-error strings are data (chat semantics): printed, exit 0.
|
|
104
107
|
printData(body.result, json);
|
|
105
108
|
});
|
|
106
109
|
}
|
|
110
|
+
/** A deprecated tool says so in its result; a script's author should see it on stderr, not only in the data. */
|
|
111
|
+
export function deprecationWarning(name, result) {
|
|
112
|
+
const deprecated = result !== null && typeof result === "object" ? result.deprecated : undefined;
|
|
113
|
+
return typeof deprecated === "string" ? `warning: ${name} is deprecated. ${deprecated}` : null;
|
|
114
|
+
}
|
package/dist/config.js
CHANGED
|
@@ -64,7 +64,7 @@ export function resolveConfig(flags) {
|
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
66
|
return {
|
|
67
|
-
apiUrl: flagUrl ?? process.env.FIELDWORK_API_URL ?? "https://app.
|
|
67
|
+
apiUrl: flagUrl ?? process.env.FIELDWORK_API_URL ?? "https://app.fieldwork.ai",
|
|
68
68
|
token: flagToken ?? null,
|
|
69
69
|
source: flagToken ? "flags" : "none",
|
|
70
70
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fieldwork-ai/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.28.0",
|
|
4
|
+
"packageManager": "pnpm@10.28.0",
|
|
4
5
|
"description": "Fieldwork asset-management CLI",
|
|
5
6
|
"license": "UNLICENSED",
|
|
6
7
|
"type": "module",
|
|
@@ -36,5 +37,10 @@
|
|
|
36
37
|
"exports": {
|
|
37
38
|
"./package.json": "./package.json",
|
|
38
39
|
"./*": "./dist/*.js"
|
|
40
|
+
},
|
|
41
|
+
"pnpm": {
|
|
42
|
+
"overrides": {
|
|
43
|
+
"source-map-js@<1.2.2": "^1.2.2"
|
|
44
|
+
}
|
|
39
45
|
}
|
|
40
46
|
}
|