@fargowealth/fargo-ai-cli 1.4.1 → 1.5.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/CHANGELOG.md +57 -0
- package/README.md +235 -52
- package/THIRD_PARTY_NOTICES.md +28 -0
- package/package.json +6 -6
- package/src/cli.mjs +58 -7
- package/src/constants.mjs +1 -1
- package/src/loopback-receiver.mjs +2 -1
- package/src/mcp-client.mjs +3 -1
- package/src/mcp-proxy.mjs +15 -1
- package/src/upload-transfer.mjs +422 -0
- package/src/yida-auth.mjs +309 -0
- package/src/yida-bundle-format.mjs +77 -0
- package/src/yida-business.mjs +128 -0
- package/src/yida-cancellation.mjs +121 -0
- package/src/yida-cli.mjs +65 -0
- package/src/yida-confirmation.mjs +86 -0
- package/src/yida-expense-contract.mjs +86 -0
- package/src/yida-expense.mjs +261 -0
- package/src/yida-lookup-plan.mjs +59 -0
- package/src/yida-operation.mjs +64 -0
- package/src/yida-rules.mjs +101 -0
- package/src/yida-runtime.mjs +63 -0
- package/src/yida-schema.mjs +111 -0
- package/src/yida-task.mjs +38 -0
- package/src/yida-tools.mjs +91 -0
- package/src/yida-workflow-contract.mjs +18 -0
- package/node_modules/@fargowealth/website-connector-runtime/README.md +0 -15
- package/node_modules/@fargowealth/website-connector-runtime/package.json +0 -24
- package/node_modules/@fargowealth/website-connector-runtime/src/index.d.mts +0 -136
- package/node_modules/@fargowealth/website-connector-runtime/src/index.mjs +0 -825
- package/src/website-browser-profile.mjs +0 -389
- package/src/website-cli.mjs +0 -365
- package/src/website-connector-definition.d.mts +0 -1
- package/src/website-connector-definition.mjs +0 -1
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
export type WebsiteConnectorInputSchema = {
|
|
2
|
-
additionalProperties: false;
|
|
3
|
-
properties: Record<string, {
|
|
4
|
-
enum?: Array<string | number | boolean>;
|
|
5
|
-
maxLength?: number;
|
|
6
|
-
type: "string" | "number" | "integer" | "boolean";
|
|
7
|
-
}>;
|
|
8
|
-
required: string[];
|
|
9
|
-
type: "object";
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export type WebsiteConnectorAuth =
|
|
13
|
-
| { kind: "none" }
|
|
14
|
-
| {
|
|
15
|
-
kind: "browser_storage";
|
|
16
|
-
sendCookies: boolean;
|
|
17
|
-
headerSources: Array<{ keySuffix: string; name: string; origin: string; prefix?: string }>;
|
|
18
|
-
secretSources: Array<{ id: string; keySuffix: string; origin: string }>;
|
|
19
|
-
refresh?: {
|
|
20
|
-
kind: "aws_cognito";
|
|
21
|
-
accessTokenSource: { keySuffix: string; origin: string };
|
|
22
|
-
clientId: string;
|
|
23
|
-
idTokenSource: { keySuffix: string; origin: string };
|
|
24
|
-
leewaySeconds: number;
|
|
25
|
-
refreshTokenSource: string;
|
|
26
|
-
region: string;
|
|
27
|
-
userPoolId: string;
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export type WebsiteConnectorOperation = {
|
|
32
|
-
operationId: string;
|
|
33
|
-
description: string;
|
|
34
|
-
readOnly: boolean;
|
|
35
|
-
requiresConnection: boolean;
|
|
36
|
-
riskLevel: "low" | "medium" | "high" | "critical";
|
|
37
|
-
inputSchema: WebsiteConnectorInputSchema;
|
|
38
|
-
request: {
|
|
39
|
-
origin: string;
|
|
40
|
-
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
41
|
-
path: string;
|
|
42
|
-
query: Record<string, string>;
|
|
43
|
-
headers: Record<string, string>;
|
|
44
|
-
responseMode: "auto" | "json" | "text";
|
|
45
|
-
body?: unknown;
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
export type WebsiteConnectorDefinition = {
|
|
50
|
-
schemaVersion: "fargo.website-connector/v1";
|
|
51
|
-
connectorId: string;
|
|
52
|
-
displayName: string;
|
|
53
|
-
allowedOrigins: string[];
|
|
54
|
-
loginUrl?: string;
|
|
55
|
-
runtime?: {
|
|
56
|
-
minimumVersion: string;
|
|
57
|
-
requiredCapabilities: string[];
|
|
58
|
-
};
|
|
59
|
-
auth: WebsiteConnectorAuth;
|
|
60
|
-
operations: WebsiteConnectorOperation[];
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
export type WebsiteConnectorBrowserStorageState = {
|
|
64
|
-
cookies: Array<{
|
|
65
|
-
domain: string;
|
|
66
|
-
expires?: number;
|
|
67
|
-
httpOnly?: boolean;
|
|
68
|
-
name: string;
|
|
69
|
-
path: string;
|
|
70
|
-
sameSite?: "Strict" | "Lax" | "None";
|
|
71
|
-
secure?: boolean;
|
|
72
|
-
value: string;
|
|
73
|
-
}>;
|
|
74
|
-
origins: Array<{
|
|
75
|
-
localStorage: Array<{ name: string; value: string }>;
|
|
76
|
-
origin: string;
|
|
77
|
-
}>;
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
export type WebsiteConnectorRuntimeDescriptor = {
|
|
81
|
-
capabilities: string[];
|
|
82
|
-
runtimeVersion: string;
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
export const WEBSITE_CONNECTOR_SCHEMA_VERSION: "fargo.website-connector/v1";
|
|
86
|
-
export const WEBSITE_CONNECTOR_RUNTIME_VERSION: "1.1.0";
|
|
87
|
-
export const WEBSITE_CONNECTOR_RUNTIME_CAPABILITIES: readonly string[];
|
|
88
|
-
export class WebsiteConnectorDefinitionError extends Error {
|
|
89
|
-
code: string;
|
|
90
|
-
path: string;
|
|
91
|
-
}
|
|
92
|
-
export class WebsiteConnectorRuntimeError extends Error {
|
|
93
|
-
code: string;
|
|
94
|
-
details?: Record<string, unknown>;
|
|
95
|
-
status: number;
|
|
96
|
-
}
|
|
97
|
-
export function parseWebsiteConnectorDefinition(value: unknown): WebsiteConnectorDefinition;
|
|
98
|
-
export function connectorToolName(connectorId: string, operationId: string): string;
|
|
99
|
-
export function renderWebsiteOperation(definition: unknown, operationId: string, rawArguments: unknown): {
|
|
100
|
-
definition: WebsiteConnectorDefinition;
|
|
101
|
-
operation: WebsiteConnectorOperation;
|
|
102
|
-
request: { body?: unknown; headers: Record<string, string>; method: string; responseMode: "auto" | "json" | "text"; url: string };
|
|
103
|
-
};
|
|
104
|
-
export function websiteConnectorRuntimeDescriptor(): WebsiteConnectorRuntimeDescriptor;
|
|
105
|
-
export function requiredWebsiteConnectorCapabilities(definition: unknown): string[];
|
|
106
|
-
export function assertWebsiteConnectorRuntimeCompatibility(
|
|
107
|
-
definition: unknown,
|
|
108
|
-
descriptor?: WebsiteConnectorRuntimeDescriptor
|
|
109
|
-
): { definition: WebsiteConnectorDefinition; descriptor: WebsiteConnectorRuntimeDescriptor };
|
|
110
|
-
export function executeWebsiteConnectorOperation(
|
|
111
|
-
definition: unknown,
|
|
112
|
-
operationId: string,
|
|
113
|
-
args: unknown,
|
|
114
|
-
options?: {
|
|
115
|
-
fetchImpl?: typeof fetch;
|
|
116
|
-
readOnlyOnly?: boolean;
|
|
117
|
-
runtimeDescriptor?: WebsiteConnectorRuntimeDescriptor;
|
|
118
|
-
storageState?: WebsiteConnectorBrowserStorageState;
|
|
119
|
-
timeoutMs?: number;
|
|
120
|
-
}
|
|
121
|
-
): Promise<unknown>;
|
|
122
|
-
export function refreshWebsiteConnectorAuthentication(
|
|
123
|
-
definition: unknown,
|
|
124
|
-
storageState: WebsiteConnectorBrowserStorageState,
|
|
125
|
-
options?: {
|
|
126
|
-
fetchImpl?: typeof fetch;
|
|
127
|
-
now?: () => number;
|
|
128
|
-
timeoutMs?: number;
|
|
129
|
-
}
|
|
130
|
-
): Promise<{ refreshed: boolean; storageState: WebsiteConnectorBrowserStorageState }>;
|
|
131
|
-
export function browserStorageAuthenticated(
|
|
132
|
-
state: WebsiteConnectorBrowserStorageState,
|
|
133
|
-
auth: WebsiteConnectorAuth,
|
|
134
|
-
now?: number
|
|
135
|
-
): boolean;
|
|
136
|
-
export function sanitizeWebsiteConnectorOutput(value: unknown, storageState: WebsiteConnectorBrowserStorageState): unknown;
|