@hasna/connectors 1.3.23 → 1.3.25
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/index.js +492 -153
- package/bin/mcp.js +1078 -595
- package/bin/serve.js +774 -436
- package/connectors/connect-cloudflare/bun.lock +32 -0
- package/connectors/connect-gmail/bin/index.js +7027 -0
- package/connectors/connect-googledrive/bin/index.js +5958 -0
- package/connectors/connect-imessage/bin/.gitkeep +2 -0
- package/connectors/connect-imessage/bin/index.js +3016 -0
- package/connectors/connect-imessage/bun.lock +32 -0
- package/connectors/connect-imessage/package.json +46 -0
- package/connectors/connect-imessage/src/api/client.ts +139 -0
- package/connectors/connect-imessage/src/api/conversations.ts +49 -0
- package/connectors/connect-imessage/src/api/health.ts +16 -0
- package/connectors/connect-imessage/src/api/index.ts +62 -0
- package/connectors/connect-imessage/src/api/messages.ts +119 -0
- package/connectors/connect-imessage/src/cli/index.ts +258 -0
- package/connectors/connect-imessage/src/index.ts +26 -0
- package/connectors/connect-imessage/src/types/index.ts +134 -0
- package/connectors/connect-imessage/src/utils/config.ts +219 -0
- package/connectors/connect-imessage/src/utils/output.ts +121 -0
- package/connectors/connect-imessage/tsconfig.json +16 -0
- package/dist/core/builtins.test.d.ts +1 -0
- package/dist/core/connectors/googledrive.d.ts +6 -0
- package/dist/core/connectors/internal-operations.test.d.ts +1 -0
- package/dist/core/connectors/internal-runtime.test.d.ts +1 -0
- package/dist/core/errors.test.d.ts +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +640 -86
- package/dist/lib/runner-auth.test.d.ts +1 -0
- package/dist/lib/runner.d.ts +31 -0
- package/dist/lib/test-endpoints.test.d.ts +1 -0
- package/dist/lib/workflow-runner.d.ts +7 -0
- package/dist/server/auth-exchange.test.d.ts +1 -0
- package/dist/server/auth-refresh.test.d.ts +1 -0
- package/dist/server/auth.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/lib/runner.d.ts
CHANGED
|
@@ -44,6 +44,28 @@ export interface RunResult {
|
|
|
44
44
|
exitCode: number;
|
|
45
45
|
success: boolean;
|
|
46
46
|
}
|
|
47
|
+
export interface RunConnectorOperationArgs {
|
|
48
|
+
connector: string;
|
|
49
|
+
operation: string;
|
|
50
|
+
input?: Record<string, unknown> & {
|
|
51
|
+
/**
|
|
52
|
+
* Positional arguments for legacy connector command surfaces.
|
|
53
|
+
*
|
|
54
|
+
* Example: { args: ["MESSAGE_ID"], body: true } becomes
|
|
55
|
+
* `messages read MESSAGE_ID --body --format json`.
|
|
56
|
+
*/
|
|
57
|
+
args?: Array<string | number | boolean>;
|
|
58
|
+
};
|
|
59
|
+
profile?: string;
|
|
60
|
+
timeoutMs?: number;
|
|
61
|
+
parseJson?: boolean;
|
|
62
|
+
}
|
|
63
|
+
export interface ConnectorOperationResult<T = unknown> extends RunResult {
|
|
64
|
+
connector: string;
|
|
65
|
+
operation: string;
|
|
66
|
+
profile?: string;
|
|
67
|
+
data?: T;
|
|
68
|
+
}
|
|
47
69
|
/**
|
|
48
70
|
* Run a connector CLI command as a subprocess.
|
|
49
71
|
*
|
|
@@ -52,6 +74,15 @@ export interface RunResult {
|
|
|
52
74
|
* @param timeoutMs - Max execution time (default 30s)
|
|
53
75
|
*/
|
|
54
76
|
export declare function runConnectorCommand(name: string, args: string[], timeoutMs?: number): Promise<RunResult>;
|
|
77
|
+
/**
|
|
78
|
+
* Run a connector operation through the one-product runtime.
|
|
79
|
+
*
|
|
80
|
+
* This is the stable SDK surface for consumers such as @hasna/files. It avoids
|
|
81
|
+
* importing individual connect-* packages while still supporting legacy
|
|
82
|
+
* connector CLIs during the migration to internal connector definitions.
|
|
83
|
+
*/
|
|
84
|
+
export declare function runConnectorOperation<T = unknown>(args: RunConnectorOperationArgs): Promise<ConnectorOperationResult<T>>;
|
|
85
|
+
export declare function buildConnectorOperationArgs(args: RunConnectorOperationArgs): string[];
|
|
55
86
|
/**
|
|
56
87
|
* Get the list of available operations for a connector by parsing its --help output.
|
|
57
88
|
* Returns structured command list.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -4,7 +4,13 @@
|
|
|
4
4
|
* Each step receives the previous step's output as additional context
|
|
5
5
|
* injected into its args as --input <previous_output>.
|
|
6
6
|
*/
|
|
7
|
+
import { spawn as nodeSpawn } from "child_process";
|
|
7
8
|
import type { ConnectorWorkflow } from "../db/workflows.js";
|
|
9
|
+
type SpawnFn = typeof nodeSpawn;
|
|
10
|
+
/** @internal Test hook for substituting process spawning. */
|
|
11
|
+
export declare function __setSpawnForTests(fn: SpawnFn): void;
|
|
12
|
+
/** @internal Restore default process spawning after tests. */
|
|
13
|
+
export declare function __resetSpawnForTests(): void;
|
|
8
14
|
export interface WorkflowStepResult {
|
|
9
15
|
step: number;
|
|
10
16
|
connector: string;
|
|
@@ -20,3 +26,4 @@ export interface WorkflowResult {
|
|
|
20
26
|
final_output: string;
|
|
21
27
|
}
|
|
22
28
|
export declare function runWorkflow(workflow: ConnectorWorkflow): Promise<WorkflowResult>;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/server/auth.d.ts
CHANGED