@fargowealth/fargo-ai-cli 1.4.2 → 1.5.1
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/CHANGELOG.md +58 -0
- package/README.md +5 -1
- package/package.json +5 -2
- package/src/constants.mjs +2 -2
- package/src/loopback-receiver.mjs +2 -1
- package/src/mcp-client.mjs +3 -2
- package/src/mcp-proxy.mjs +5 -1
- package/src/retired-tools.mjs +6 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,63 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.5.1 — 2026-10-17
|
|
4
|
+
|
|
5
|
+
- Remove the local `fargo yida` command family, personal YiDA OAuth and seven local `yida_*` MCP tools from the distributed CLI. The MCP bridge and one-shot commands use the hosted Fargo Pass catalog. Local YiDA source and maintenance tests are archived outside the npm package.
|
|
6
|
+
|
|
7
|
+
- Request explicit default-mailbox read/write scopes for desktop Fargo Pass connections. Reauthorize an existing connection to enable the four mail tools.
|
|
8
|
+
|
|
9
|
+
## 1.5.0 — 2026-10-15
|
|
10
|
+
|
|
11
|
+
- Align the Portal and Fargo Pass displayed CLI version with this package.
|
|
12
|
+
- Discover the selected employee business directory by Chinese name, group and aliases; load background dictionaries only through the selected business's dependencies.
|
|
13
|
+
|
|
14
|
+
- Return a two-part Markdown confirmation (overall parameters + item rows) from
|
|
15
|
+
expense preview. Require explicit caller attestation of human confirmation
|
|
16
|
+
plus the unchanged preview pin before execution. Add schema-backed display
|
|
17
|
+
templates for expense, travel reimbursement and external payment; those display
|
|
18
|
+
templates do not enable unreviewed submission branches.
|
|
19
|
+
|
|
20
|
+
- Reuse one online Fargo identity within an expense tool task. Concurrent reads
|
|
21
|
+
share the result; local credential changes, logout and task expiry invalidate it.
|
|
22
|
+
Revalidate online before a mutation, and discard the context on completion.
|
|
23
|
+
- Permit a fresh independent expense after matching prior attempts are confirmed
|
|
24
|
+
terminated by detail read-back. Preserve active/completed duplicate blocking and
|
|
25
|
+
durable one-shot journals; never add a business association or erase old receipts.
|
|
26
|
+
|
|
27
|
+
- Share one own-HR response and one checked definition per expense preparation;
|
|
28
|
+
schedule 13 live lookups by schema dependencies with a concurrency limit of four.
|
|
29
|
+
Keep identity/admission and pre-write schema checks; never cache bank/rate values
|
|
30
|
+
across operations. Add a versioned execution contract to the expense bundle.
|
|
31
|
+
- Use decimal half-up currency multiplication, reject impossible invoice dates,
|
|
32
|
+
and verify persisted rates, accounting items and attachment names/sizes as well
|
|
33
|
+
as amounts and file UUIDs. Document pending/unknown/duplicate recovery outcomes.
|
|
34
|
+
|
|
35
|
+
- Add the local `yida_submit_expense` adapter for the reviewed ordinary,
|
|
36
|
+
non-project expense form: own HR bank details, live company/accounting/rate
|
|
37
|
+
lookups, uploaded PDF receipt, pinned preview, invoice/order duplicate checks,
|
|
38
|
+
durable one-shot submission and read-back. Generic form submission stays disabled.
|
|
39
|
+
- Add one local `yida_cancel_request` MCP tool shared across declared process
|
|
40
|
+
businesses: preview and version pinning, own-originator/form/process checks,
|
|
41
|
+
one-shot termination, durable duplicate protection and API read-back. Keep
|
|
42
|
+
completed/ordinary forms blocked and ambiguous results out of automatic retries.
|
|
43
|
+
- Capture calculation, option-loading, linkage, visibility, dataset-query and
|
|
44
|
+
script-reference metadata in YiDA model v2; retain legacy model support.
|
|
45
|
+
- Add the local read-only `yida_resolve_field` tool and reviewed self/department
|
|
46
|
+
initialization adapters. Preserve the originating form context and reject
|
|
47
|
+
write functions, raw MCP expressions and unrelated HR fields.
|
|
48
|
+
- Verify one explicitly authorized 0.06 HKD synthetic payment via API, with
|
|
49
|
+
recorded duplicate protection and exact amount/currency/attachment readback.
|
|
50
|
+
|
|
51
|
+
- Add local personal YiDA OAuth, account-isolated credential profiles, refresh
|
|
52
|
+
and logout commands, and read-only schema modeling.
|
|
53
|
+
- Add `yida_connection_status` and `yida_describe_form` to the local MCP bridge;
|
|
54
|
+
keep YiDA authorization and execution on the client computer.
|
|
55
|
+
- Include OpenYida attribution and its MIT license for adapted protocol and
|
|
56
|
+
schema conventions.
|
|
57
|
+
- Add local business catalog/package commands and MCP tools backed by the
|
|
58
|
+
LEGO publisher, atomic paired schema/handbook cache, immutable workflow pins,
|
|
59
|
+
enterprise isolation, integrity/version checks and live schema drift detection.
|
|
60
|
+
|
|
3
61
|
## 1.4.2
|
|
4
62
|
|
|
5
63
|
- Add generic large-file upload to Media and R2 resources with resumable TUS and optional local FFmpeg compression.
|
package/README.md
CHANGED
|
@@ -37,7 +37,7 @@ reused by both MCP and local CLI operations.
|
|
|
37
37
|
deploy composition, and migration-file ordering.
|
|
38
38
|
- CLI has no generic R2 or Cloudflare administration commands.
|
|
39
39
|
- `fargo mcp serve` is the local stdio bridge for WorkBuddy, Claude Code,
|
|
40
|
-
Codex, and Cursor.
|
|
40
|
+
Codex, and Cursor. It forwards tool discovery and calls to hosted Fargo Pass.
|
|
41
41
|
- `fargo mcp tools` and `fargo mcp call` support scripts and one-shot
|
|
42
42
|
diagnostics without starting an MCP host.
|
|
43
43
|
|
|
@@ -250,3 +250,7 @@ serialized across CLI processes.
|
|
|
250
250
|
|
|
251
251
|
Never copy, upload, commit, or print the credential file. Use
|
|
252
252
|
`fargo auth logout` when a device is no longer trusted.
|
|
253
|
+
|
|
254
|
+
## Default Mate mailbox
|
|
255
|
+
|
|
256
|
+
Fargo Pass exposes `mail_list`, `mail_get`, `mail_get_attachment` and `mail_update` for your single default Agent mailbox. Upgrade to CLI 1.5.1 and sign in again to grant `fargo:mail:read` and `fargo:mail:write`. The mailbox address comes from the default Agent, not your login username. If no default Agent is active, the tools return `mailbox_not_provisioned` with a link to Fargo Mate. `ping_who_am_i.account.defaultAgent` exposes its current name and email, or `null`.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fargowealth/fargo-ai-cli",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.5.1",
|
|
4
|
+
"description": "Fargo Pass CLI for desktop agents, hosted MCP, default Agent mailboxes, uploads and LEGO deployment",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"fargo": "bin/fargo.mjs",
|
|
@@ -16,6 +16,9 @@
|
|
|
16
16
|
"engines": {
|
|
17
17
|
"node": ">=20.19.0"
|
|
18
18
|
},
|
|
19
|
+
"scripts": {
|
|
20
|
+
"test": "node --test test/*.test.mjs"
|
|
21
|
+
},
|
|
19
22
|
"dependencies": {
|
|
20
23
|
"fflate": "^0.8.2",
|
|
21
24
|
"ignore": "^7.0.6"
|
package/src/constants.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export const CLI_VERSION = "1.
|
|
1
|
+
export const CLI_VERSION = "1.5.1";
|
|
2
2
|
export const DEVICE_CODE_GRANT_TYPE = "urn:ietf:params:oauth:grant-type:device_code";
|
|
3
3
|
export const DEFAULT_AUTH_URL = "https://auth.fargowealth.app";
|
|
4
4
|
export const DEFAULT_API_URL = "https://mcp.fargowealth.app";
|
|
5
5
|
export const DEFAULT_MCP_URL = "https://mcp.fargowealth.app/mcp";
|
|
6
6
|
export const OAUTH_CLIENT_ID = "fargo-cli-workbuddy";
|
|
7
|
-
export const OAUTH_SCOPE = "fargo:forum:read fargo:forum:write fargo:hub:read fargo:lego:read fargo:lego:write fargo:knowledge:read fargo:knowledge:write fargo:knowledge:share";
|
|
7
|
+
export const OAUTH_SCOPE = "fargo:mail:read fargo:mail:write fargo:forum:read fargo:forum:write fargo:hub:read fargo:lego:read fargo:lego:write fargo:knowledge:read fargo:knowledge:write fargo:knowledge:share";
|
|
8
8
|
export const SUPPORTED_AGENT_TYPES = ["codex", "claude-code", "cursor", "workbuddy"];
|
|
@@ -4,7 +4,8 @@ import { createServer } from "node:http";
|
|
|
4
4
|
const LOOPBACK_HOST = "127.0.0.1";
|
|
5
5
|
|
|
6
6
|
export async function createLoopbackReceiver(options = {}) {
|
|
7
|
-
const callbackPath = `/oauth/callback/${(options.randomBytes ?? randomBytes)(18).toString("base64url")}`;
|
|
7
|
+
const callbackPath = options.callbackPath ?? `/oauth/callback/${(options.randomBytes ?? randomBytes)(18).toString("base64url")}`;
|
|
8
|
+
if (!/^\/oauth\/callback(?:\/[A-Za-z0-9_-]+)?$/.test(callbackPath)) throw new Error("Invalid OAuth loopback callback path");
|
|
8
9
|
const timeoutMs = Math.max(1_000, Number(options.timeoutMs) || 10 * 60 * 1_000);
|
|
9
10
|
let address;
|
|
10
11
|
let settled = false;
|
package/src/mcp-client.mjs
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { DEFAULT_MCP_URL } from "./constants.mjs";
|
|
2
2
|
import { authenticatedRequest, responsePayload } from "./api-client.mjs";
|
|
3
|
+
import { requireCurrentTool } from "./retired-tools.mjs";
|
|
3
4
|
|
|
4
5
|
export async function listMcpTools(store, options = {}) {
|
|
5
|
-
|
|
6
|
-
return result;
|
|
6
|
+
return mcpRequest(store, "tools/list", {}, options);
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
export async function callMcpTool(store, name, args, options = {}) {
|
|
10
|
+
requireCurrentTool(name);
|
|
10
11
|
return mcpRequest(store, "tools/call", { name, arguments: args }, options);
|
|
11
12
|
}
|
|
12
13
|
|
package/src/mcp-proxy.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { createInterface } from "node:readline";
|
|
2
2
|
import { CLI_VERSION, DEFAULT_MCP_URL } from "./constants.mjs";
|
|
3
3
|
import { currentCredential, refreshCurrentCredential } from "./auth.mjs";
|
|
4
|
+
import { requireCurrentTool } from "./retired-tools.mjs";
|
|
4
5
|
|
|
5
6
|
export async function runMcpProxy(store, options = {}) {
|
|
6
7
|
const input = options.input ?? process.stdin;
|
|
@@ -17,8 +18,11 @@ export async function runMcpProxy(store, options = {}) {
|
|
|
17
18
|
try { message = JSON.parse(line); }
|
|
18
19
|
catch { return; }
|
|
19
20
|
try {
|
|
21
|
+
if (message.method === "tools/call") requireCurrentTool(message.params?.name);
|
|
20
22
|
const responses = await forward(message, false);
|
|
21
|
-
for (const response of responses)
|
|
23
|
+
for (const response of responses) {
|
|
24
|
+
output.write(`${JSON.stringify(response)}\n`);
|
|
25
|
+
}
|
|
22
26
|
} catch (error) {
|
|
23
27
|
if (message.id !== undefined) output.write(`${JSON.stringify({ jsonrpc: "2.0", id: message.id, error: { code: -32001, message: error instanceof Error ? error.message : "Fargo MCP proxy failed" } })}\n`);
|
|
24
28
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Old local tool calls must not send their private arguments to the hosted MCP. */
|
|
2
|
+
export function requireCurrentTool(name) {
|
|
3
|
+
if (typeof name === "string" && name.startsWith("yida_")) {
|
|
4
|
+
throw new Error("Local YiDA tools were removed in Fargo CLI 1.5.1. Restart the MCP client to refresh its tool catalog.");
|
|
5
|
+
}
|
|
6
|
+
}
|