@fungi.computer/veil 0.4.0 → 0.6.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 +48 -54
- package/dist/best-effort-cleanup.d.ts +1 -1
- package/dist/connections/cleanup.d.ts +21 -0
- package/dist/connections/cleanup.js +66 -0
- package/dist/connections/contract.d.ts +192 -7
- package/dist/connections/contract.js +44 -2
- package/dist/connections/core.d.ts +58 -5
- package/dist/connections/core.js +438 -111
- package/dist/connections/discover.d.ts +3 -0
- package/dist/connections/discover.js +23 -0
- package/dist/connections/egress.js +3 -2
- package/dist/connections/index.d.ts +1 -0
- package/dist/connections/index.js +1 -0
- package/dist/connections/internal.d.ts +78 -0
- package/dist/connections/internal.js +66 -0
- package/dist/connections/mcp-agent.d.ts +37 -0
- package/dist/connections/mcp-agent.js +75 -0
- package/dist/connections/nango.d.ts +30 -0
- package/dist/connections/nango.js +179 -0
- package/dist/connections/oauth-flow.d.ts +83 -0
- package/dist/connections/oauth-flow.js +330 -0
- package/dist/connections/oauth-provider.d.ts +31 -0
- package/dist/connections/oauth-provider.js +96 -0
- package/dist/connections/oauth.d.ts +93 -0
- package/dist/connections/oauth.js +239 -0
- package/dist/connections/openapi.d.ts +36 -0
- package/dist/connections/openapi.js +120 -0
- package/dist/connections/sealed.js +23 -4
- package/dist/connections/source.d.ts +17 -0
- package/dist/connections/source.js +111 -0
- package/dist/connections/update.d.ts +41 -0
- package/dist/connections/update.js +81 -0
- package/dist/gatekeeper.d.ts +43 -85
- package/dist/gatekeeper.js +138 -95
- package/dist/github-app.d.ts +44 -0
- package/dist/github-app.js +93 -0
- package/dist/index.d.ts +0 -241
- package/dist/index.js +0 -256
- package/dist/nango.d.ts +40 -15
- package/dist/nango.js +7 -242
- package/package.json +15 -9
- package/dist/nango-git.d.ts +0 -19
- package/dist/nango-git.js +0 -125
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import * as Effect from "effect/Effect";
|
|
2
|
-
import { ConnectionsError, type ConnectionDraft, type GrantInput, type ConnectionsOptions, type EgressRef, type NarrowFetch, type SurfaceView } from "./contract.js";
|
|
2
|
+
import { ConnectionsError, type CallInput, type ConnectionDraft, type Tools, type GrantInput, type ConnectionsOptions, type EgressRef, type NarrowFetch, type SurfaceView } from "./contract.js";
|
|
3
3
|
/** One owner's connections: attempts, connections, grants, receipts and cleanup in its SQLite. */
|
|
4
4
|
export declare function createConnections(options: ConnectionsOptions): {
|
|
5
5
|
begin: (actor: string, input: ConnectionDraft) => Effect.Effect<{
|
|
6
6
|
connectionId: string;
|
|
7
|
-
authorizeUrl: null;
|
|
7
|
+
authorizeUrl: string | null;
|
|
8
|
+
attemptId: string | null;
|
|
9
|
+
}, ConnectionsError, never>;
|
|
10
|
+
complete: (actor: string, input: import("./contract.js").CompleteInput) => Effect.Effect<{
|
|
11
|
+
connectionId: string;
|
|
12
|
+
}, ConnectionsError, never>;
|
|
13
|
+
completeCustody: (input: import("./contract.js").CustodyCompletion) => Effect.Effect<{
|
|
14
|
+
connectionId: string;
|
|
8
15
|
}, ConnectionsError, never>;
|
|
9
16
|
grant: (actor: string, input: GrantInput) => Effect.Effect<{
|
|
10
17
|
grantVersion: number;
|
|
@@ -22,7 +29,10 @@ export declare function createConnections(options: ConnectionsOptions): {
|
|
|
22
29
|
connectionId: string;
|
|
23
30
|
name: string;
|
|
24
31
|
surface: SurfaceView;
|
|
25
|
-
tools: readonly string[] | "all"
|
|
32
|
+
tools: readonly string[] | "all" | {
|
|
33
|
+
readonly effect: "read";
|
|
34
|
+
};
|
|
35
|
+
version: number;
|
|
26
36
|
authorityVersion: number;
|
|
27
37
|
grantVersion: number;
|
|
28
38
|
}[];
|
|
@@ -30,19 +40,62 @@ export declare function createConnections(options: ConnectionsOptions): {
|
|
|
30
40
|
list: (actor: string) => Effect.Effect<Readonly<{
|
|
31
41
|
connectionId: string;
|
|
32
42
|
name: string;
|
|
43
|
+
label: string;
|
|
33
44
|
surface: Readonly<{
|
|
34
45
|
kind: "mcp" | "openapi";
|
|
35
46
|
origin: string;
|
|
47
|
+
url: string;
|
|
48
|
+
digest: string | null;
|
|
36
49
|
}>;
|
|
37
50
|
credentialKind: import("./contract.js").Credential["kind"];
|
|
38
|
-
|
|
51
|
+
credential: import("./contract.js").Credential;
|
|
52
|
+
state: "pending" | "active" | "reconnect_required" | "revoked";
|
|
53
|
+
version: number;
|
|
39
54
|
authorityVersion: number;
|
|
40
55
|
grants: readonly Readonly<{
|
|
41
56
|
agentId: string;
|
|
42
|
-
tools:
|
|
57
|
+
tools: Tools;
|
|
43
58
|
version: number;
|
|
59
|
+
grantor: string;
|
|
44
60
|
}>[];
|
|
45
61
|
}>[], ConnectionsError, never>;
|
|
46
62
|
egress: (agentId: string, input: EgressRef) => NarrowFetch;
|
|
63
|
+
call: (agentId: string, input: EgressRef, raw: CallInput) => Effect.Effect<import("zod").JSONType, ConnectionsError, never>;
|
|
64
|
+
ownerCall: (actor: string, at: Readonly<{
|
|
65
|
+
connectionId: string;
|
|
66
|
+
expectedVersion: number;
|
|
67
|
+
}>, raw: CallInput) => Effect.Effect<import("zod").JSONType, ConnectionsError, never>;
|
|
68
|
+
tools: (actor: string, connectionId: string) => Effect.Effect<readonly string[], ConnectionsError, never>;
|
|
69
|
+
operations: (actor: string, id: string) => Effect.Effect<{
|
|
70
|
+
operations: {
|
|
71
|
+
status: "supported";
|
|
72
|
+
name: string;
|
|
73
|
+
method: "GET" | "HEAD" | "OPTIONS" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
74
|
+
path: string;
|
|
75
|
+
effect: "write" | "read";
|
|
76
|
+
description: string & import("zod").$brand<"ThirdPartyText">;
|
|
77
|
+
textSource: "third_party";
|
|
78
|
+
tags: (string & import("zod").$brand<"ThirdPartyText">)[];
|
|
79
|
+
parameters: {
|
|
80
|
+
name: string;
|
|
81
|
+
in: "header" | "path" | "query";
|
|
82
|
+
required: boolean;
|
|
83
|
+
schema: boolean | Record<string, import("zod").JSONType>;
|
|
84
|
+
style?: string | undefined;
|
|
85
|
+
explode?: boolean | undefined;
|
|
86
|
+
allowReserved?: boolean | undefined;
|
|
87
|
+
}[];
|
|
88
|
+
input: boolean | Record<string, import("zod").JSONType>;
|
|
89
|
+
output: boolean | Record<string, import("zod").JSONType>;
|
|
90
|
+
}[];
|
|
91
|
+
digest: string;
|
|
92
|
+
}, ConnectionsError, never>;
|
|
93
|
+
update: (actor: string, raw: import("./contract.js").UpdateInput) => Effect.Effect<{
|
|
94
|
+
connectionId: string;
|
|
95
|
+
version: number;
|
|
96
|
+
}, ConnectionsError, never>;
|
|
47
97
|
sweep: () => Effect.Effect<void, ConnectionsError, never>;
|
|
98
|
+
cleanupPending: () => number;
|
|
99
|
+
reconcilePending: () => Effect.Effect<string[], ConnectionsError, never>;
|
|
100
|
+
awaitingCustody: () => number;
|
|
48
101
|
};
|