@grackle-ai/adapter-sdk 0.132.0 → 0.132.2
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/dist/adapter.d.ts +8 -0
- package/dist/adapter.d.ts.map +1 -1
- package/dist/adapter.js.map +1 -1
- package/dist/connect.d.ts.map +1 -1
- package/dist/connect.js +7 -1
- package/dist/connect.js.map +1 -1
- package/dist/grpc-host-transport.d.ts +77 -0
- package/dist/grpc-host-transport.d.ts.map +1 -0
- package/dist/grpc-host-transport.js +168 -0
- package/dist/grpc-host-transport.js.map +1 -0
- package/dist/host-transport.d.ts +184 -0
- package/dist/host-transport.d.ts.map +1 -0
- package/dist/host-transport.js +21 -0
- package/dist/host-transport.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
package/dist/adapter.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Client } from "@connectrpc/connect";
|
|
2
2
|
import type { powerline } from "@grackle-ai/common";
|
|
3
3
|
import type { AdapterLogger } from "./logger.js";
|
|
4
|
+
import type { IHostTransport } from "./host-transport.js";
|
|
4
5
|
/** Type-safe ConnectRPC client for the PowerLine gRPC service. */
|
|
5
6
|
export type PowerLineClient = Client<typeof powerline.GracklePowerLine>;
|
|
6
7
|
/** An active connection to a PowerLine, including the gRPC client and port info. */
|
|
@@ -8,6 +9,13 @@ export interface PowerLineConnection {
|
|
|
8
9
|
client: PowerLineClient;
|
|
9
10
|
environmentId: string;
|
|
10
11
|
port: number;
|
|
12
|
+
/**
|
|
13
|
+
* Transport-agnostic host interface (AHP HR8c). One instance per connection,
|
|
14
|
+
* constructed when the connection is established. Consumers use this
|
|
15
|
+
* instead of touching `client` directly so the HR8d wire-flip is a
|
|
16
|
+
* swap of one `IHostTransport` impl for another.
|
|
17
|
+
*/
|
|
18
|
+
transport: IHostTransport;
|
|
11
19
|
}
|
|
12
20
|
/** Progress event emitted during environment provisioning. */
|
|
13
21
|
export interface ProvisionEvent {
|
package/dist/adapter.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAGjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,kEAAkE;AAClE,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,OAAO,SAAS,CAAC,gBAAgB,CAAC,CAAC;AAExE,oFAAoF;AACpF,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,eAAe,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb;;;;;OAKG;IACH,SAAS,EAAE,cAAc,CAAC;CAC3B;AAED,8DAA8D;AAC9D,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,6DAA6D;AAC7D,MAAM,WAAW,qBAAqB;IACpC,2CAA2C;IAC3C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uCAAuC;IACvC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;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AAO,EACrB,KAAK,GAAE,OAAe,EACtB,MAAM,GAAE,aAA6B,GACpC,cAAc,CAAC,cAAc,CAAC,CAgBhC"}
|
package/dist/adapter.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.js","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"adapter.js","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAmErD;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,SAAS,CAAC,CAAC,oBAAoB,CACzC,aAAqB,EACrB,OAA2B,EAC3B,MAA+B,EAC/B,cAAsB,EACtB,YAAqB,EACrB,QAAiB,KAAK,EACtB,SAAwB,aAAa;IAErC,IAAI,WAAW,GAAG,KAAK,CAAC;IACxB,IAAI,CAAC,KAAK,IAAI,YAAY,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;QAChD,IAAI,CAAC;YACH,KAAK,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,aAAa,EAAE,MAAM,EAAE,cAAc,CAAC,CAAC;YAChE,WAAW,GAAG,IAAI,CAAC;QACrB,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,IAAI,GAAG,YAAY,iBAAiB,EAAE,CAAC;gBACrC,MAAM,GAAG,CAAC;YACZ,CAAC;YACD,MAAM,CAAC,IAAI,CAAC,EAAE,aAAa,EAAE,GAAG,EAAE,EAAE,kDAAkD,CAAC,CAAC;QAC1F,CAAC;IACH,CAAC;IACD,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,KAAK,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,aAAa,EAAE,MAAM,EAAE,cAAc,CAAC,CAAC;IAClE,CAAC;AACH,CAAC"}
|
package/dist/connect.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connect.d.ts","sourceRoot":"","sources":["../src/connect.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"connect.d.ts","sourceRoot":"","sources":["../src/connect.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAIzE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAmBjD;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,MAAM,EACf,cAAc,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,MAAM,GACf,eAAe,CAsBjB;AAID;;;GAGG;AACH,wBAAsB,oBAAoB,CACxC,aAAa,EAAE,MAAM,EACrB,SAAS,EAAE,MAAM,EACjB,cAAc,EAAE,MAAM,EACtB,MAAM,GAAE,aAA6B,EACrC,OAAO,CAAC,EAAE,MAAM,GACf,OAAO,CAAC,mBAAmB,CAAC,CA6B9B;AAID,oEAAoE;AACpE,MAAM,WAAW,UAAU;IACzB,uFAAuF;IACvF,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACtD;AAED,6DAA6D;AAC7D,eAAO,MAAM,eAAe,EAAE,UAc7B,CAAC;AAEF,4CAA4C;AAC5C,MAAM,WAAW,uBAAuB;IACtC,qDAAqD;IACrD,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,2DAA2D;IAC3D,KAAK,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACvC;AAED;;;GAGG;AACH,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,uBAAuB,GAChC,OAAO,CAAC,IAAI,CAAC,CAgBf"}
|
package/dist/connect.js
CHANGED
|
@@ -2,6 +2,7 @@ import { createClient } from "@connectrpc/connect";
|
|
|
2
2
|
import { createGrpcTransport } from "@connectrpc/connect-node";
|
|
3
3
|
import { powerline } from "@grackle-ai/common";
|
|
4
4
|
import { createConnection } from "node:net";
|
|
5
|
+
import { GrpcHostTransport } from "./grpc-host-transport.js";
|
|
5
6
|
import { closeTunnel } from "./tunnel-registry.js";
|
|
6
7
|
import { sleep } from "./utils.js";
|
|
7
8
|
import { defaultLogger } from "./logger.js";
|
|
@@ -51,7 +52,12 @@ export async function connectThroughTunnel(environmentId, localPort, powerlineTo
|
|
|
51
52
|
for (let attempt = 0; attempt < CONNECT_MAX_RETRIES; attempt++) {
|
|
52
53
|
try {
|
|
53
54
|
await client.ping({});
|
|
54
|
-
return {
|
|
55
|
+
return {
|
|
56
|
+
client,
|
|
57
|
+
environmentId,
|
|
58
|
+
port: localPort,
|
|
59
|
+
transport: new GrpcHostTransport(client),
|
|
60
|
+
};
|
|
55
61
|
}
|
|
56
62
|
catch (err) {
|
|
57
63
|
lastError = err;
|
package/dist/connect.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connect.js","sourceRoot":"","sources":["../src/connect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAoB,MAAM,qBAAqB,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5C,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,aAAa,EAAE,MAA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,IAAI,KAAK,CAAC;IAExC,KAAK,IAAI,OAAO,GAAG,CAAC,EAAE,OAAO,GAAG,6BAA6B,EAAE,OAAO,EAAE,EAAE,CAAC;QACzE,MAAM,SAAS,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;QAExD,IAAI,SAAS,EAAE,CAAC;YACd,OAAO;QACT,CAAC;QACD,MAAM,OAAO,CAAC,yBAAyB,CAAC,CAAC;IAC3C,CAAC;IAED,MAAM,IAAI,KAAK,CACb,cAAc,IAAI,mCAAmC,6BAA6B,WAAW,CAC9F,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* gRPC-backed implementation of {@link IHostTransport} (AHP HR8c).
|
|
3
|
+
*
|
|
4
|
+
* Wraps a {@link PowerLineClient} (ConnectRPC client) and folds each
|
|
5
|
+
* incoming `AgentEvent` through the {@link mapAgentEvent} mapper to produce
|
|
6
|
+
* AHP `StateAction[]`. Per-session {@link MapperContext} state is kept inside
|
|
7
|
+
* this instance so consumers don't need to thread it through their code.
|
|
8
|
+
*
|
|
9
|
+
* @module grpc-host-transport
|
|
10
|
+
*/
|
|
11
|
+
import type { PowerLineClient } from "./adapter.js";
|
|
12
|
+
import type { AuthenticateParams, CreateSessionParams, CreateSessionResult, HostSessionInfo, IHostTransport, ReanimateParams, ServerActionEnvelope } from "./host-transport.js";
|
|
13
|
+
/**
|
|
14
|
+
* gRPC-backed {@link IHostTransport} for a single environment.
|
|
15
|
+
*
|
|
16
|
+
* Lifecycle: one instance per `PowerLineConnection`. The mapper context map
|
|
17
|
+
* is keyed by session URI so multiple sessions on the same environment each
|
|
18
|
+
* get their own turn/tool tracking.
|
|
19
|
+
*/
|
|
20
|
+
export declare class GrpcHostTransport implements IHostTransport {
|
|
21
|
+
/** Underlying ConnectRPC client for the PowerLine gRPC service. */
|
|
22
|
+
private readonly client;
|
|
23
|
+
/**
|
|
24
|
+
* Per-session mapper context. Created lazily on first event per session;
|
|
25
|
+
* cleaned up when the session's stream completes or errors.
|
|
26
|
+
*/
|
|
27
|
+
private readonly mapperContexts;
|
|
28
|
+
/**
|
|
29
|
+
* Create a new gRPC-backed host transport.
|
|
30
|
+
*
|
|
31
|
+
* @param client - The ConnectRPC client to wrap. Typically obtained from
|
|
32
|
+
* {@link createPowerLineClient} or a `PowerLineConnection`.
|
|
33
|
+
*/
|
|
34
|
+
constructor(client: PowerLineClient);
|
|
35
|
+
/**
|
|
36
|
+
* Create a new session via PowerLine's `spawn` RPC.
|
|
37
|
+
*
|
|
38
|
+
* Returns the session URI plus a live stream of {@link ServerActionEnvelope}s.
|
|
39
|
+
* The stream is mapped from the underlying `AgentEvent` stream.
|
|
40
|
+
*/
|
|
41
|
+
createSession(params: CreateSessionParams): CreateSessionResult;
|
|
42
|
+
/**
|
|
43
|
+
* Reanimate a suspended session via PowerLine's `resume` RPC.
|
|
44
|
+
*
|
|
45
|
+
* Returns a live stream of envelopes for the reanimated session. Note that
|
|
46
|
+
* `resume` alone does NOT replay buffered events — call
|
|
47
|
+
* {@link IHostTransport.drainBuffered} first to replay the parked queue,
|
|
48
|
+
* then this method to start the live stream.
|
|
49
|
+
*/
|
|
50
|
+
reanimate(params: ReanimateParams): AsyncIterable<ServerActionEnvelope>;
|
|
51
|
+
/**
|
|
52
|
+
* Drain previously-parked buffered events for a session.
|
|
53
|
+
*
|
|
54
|
+
* Maps to the gRPC `drainBufferedEvents` RPC. The returned stream yields
|
|
55
|
+
* the buffered envelopes and then terminates — it does NOT continue into
|
|
56
|
+
* the live event stream. Callers compose `drainBuffered` + `reanimate`
|
|
57
|
+
* to do recovery.
|
|
58
|
+
*/
|
|
59
|
+
drainBuffered(sessionUri: string): AsyncIterable<ServerActionEnvelope>;
|
|
60
|
+
/** Send input text to a session via PowerLine's `sendInput` RPC. */
|
|
61
|
+
dispatchInput(sessionUri: string, text: string): Promise<void>;
|
|
62
|
+
/** Authenticate credentials via PowerLine's `authenticate` RPC. */
|
|
63
|
+
authenticate(params: AuthenticateParams): Promise<void>;
|
|
64
|
+
/** Dispose a session via PowerLine's `kill` RPC. */
|
|
65
|
+
dispose(sessionUri: string, reason?: string): Promise<void>;
|
|
66
|
+
/** List active sessions via PowerLine's `listSessions` RPC. */
|
|
67
|
+
listSessions(): Promise<HostSessionInfo[]>;
|
|
68
|
+
/**
|
|
69
|
+
* Fold a raw `AgentEvent` stream into `ServerActionEnvelope`s by running
|
|
70
|
+
* each event through the mapper. The per-session `MapperContext` is
|
|
71
|
+
* created/retrieved lazily and removed when the stream completes.
|
|
72
|
+
*/
|
|
73
|
+
private foldStream;
|
|
74
|
+
/** Get an existing or create a fresh `MapperContext` for a session. */
|
|
75
|
+
private getOrCreateContext;
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=grpc-host-transport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grpc-host-transport.d.ts","sourceRoot":"","sources":["../src/grpc-host-transport.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,KAAK,EACV,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,eAAe,EACf,oBAAoB,EACrB,MAAM,qBAAqB,CAAC;AAE7B;;;;;;GAMG;AACH,qBAAa,iBAAkB,YAAW,cAAc;IACtD,mEAAmE;IACnE,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAkB;IAEzC;;;OAGG;IACH,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAyC;IAExE;;;;;OAKG;gBACgB,MAAM,EAAE,eAAe;IAI1C;;;;;OAKG;IACI,aAAa,CAAC,MAAM,EAAE,mBAAmB,GAAG,mBAAmB;IA2BtE;;;;;;;OAOG;IACI,SAAS,CAAC,MAAM,EAAE,eAAe,GAAG,aAAa,CAAC,oBAAoB,CAAC;IAU9E;;;;;;;OAOG;IACW,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,aAAa,CAAC,oBAAoB,CAAC;IAQpF,oEAAoE;IACvD,aAAa,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAM3E,mEAAmE;IACtD,YAAY,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;IAiBpE,oDAAoD;IACvC,OAAO,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAOxE,+DAA+D;IAClD,YAAY,IAAI,OAAO,CAAC,eAAe,EAAE,CAAC;IASvD;;;;OAIG;YACY,UAAU;IAmBzB,uEAAuE;IACvE,OAAO,CAAC,kBAAkB;CAc3B"}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* gRPC-backed implementation of {@link IHostTransport} (AHP HR8c).
|
|
3
|
+
*
|
|
4
|
+
* Wraps a {@link PowerLineClient} (ConnectRPC client) and folds each
|
|
5
|
+
* incoming `AgentEvent` through the {@link mapAgentEvent} mapper to produce
|
|
6
|
+
* AHP `StateAction[]`. Per-session {@link MapperContext} state is kept inside
|
|
7
|
+
* this instance so consumers don't need to thread it through their code.
|
|
8
|
+
*
|
|
9
|
+
* @module grpc-host-transport
|
|
10
|
+
*/
|
|
11
|
+
import { create } from "@bufbuild/protobuf";
|
|
12
|
+
import { powerline, mapAgentEvent } from "@grackle-ai/common";
|
|
13
|
+
/**
|
|
14
|
+
* gRPC-backed {@link IHostTransport} for a single environment.
|
|
15
|
+
*
|
|
16
|
+
* Lifecycle: one instance per `PowerLineConnection`. The mapper context map
|
|
17
|
+
* is keyed by session URI so multiple sessions on the same environment each
|
|
18
|
+
* get their own turn/tool tracking.
|
|
19
|
+
*/
|
|
20
|
+
export class GrpcHostTransport {
|
|
21
|
+
/** Underlying ConnectRPC client for the PowerLine gRPC service. */
|
|
22
|
+
client;
|
|
23
|
+
/**
|
|
24
|
+
* Per-session mapper context. Created lazily on first event per session;
|
|
25
|
+
* cleaned up when the session's stream completes or errors.
|
|
26
|
+
*/
|
|
27
|
+
mapperContexts = new Map();
|
|
28
|
+
/**
|
|
29
|
+
* Create a new gRPC-backed host transport.
|
|
30
|
+
*
|
|
31
|
+
* @param client - The ConnectRPC client to wrap. Typically obtained from
|
|
32
|
+
* {@link createPowerLineClient} or a `PowerLineConnection`.
|
|
33
|
+
*/
|
|
34
|
+
constructor(client) {
|
|
35
|
+
this.client = client;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Create a new session via PowerLine's `spawn` RPC.
|
|
39
|
+
*
|
|
40
|
+
* Returns the session URI plus a live stream of {@link ServerActionEnvelope}s.
|
|
41
|
+
* The stream is mapped from the underlying `AgentEvent` stream.
|
|
42
|
+
*/
|
|
43
|
+
createSession(params) {
|
|
44
|
+
const spawnReq = create(powerline.SpawnRequestSchema, {
|
|
45
|
+
sessionId: params.sessionId,
|
|
46
|
+
runtime: params.runtime,
|
|
47
|
+
prompt: params.prompt,
|
|
48
|
+
model: params.model,
|
|
49
|
+
maxTurns: params.maxTurns,
|
|
50
|
+
branch: params.branch,
|
|
51
|
+
workingDirectory: params.workingDirectory,
|
|
52
|
+
systemContext: params.systemContext,
|
|
53
|
+
workspaceId: params.workspaceId,
|
|
54
|
+
taskId: params.taskId,
|
|
55
|
+
mcpServersJson: params.mcpServersJson,
|
|
56
|
+
mcpUrl: params.mcpUrl,
|
|
57
|
+
mcpToken: params.mcpToken,
|
|
58
|
+
useWorktrees: params.useWorktrees,
|
|
59
|
+
pipe: params.pipe ?? "",
|
|
60
|
+
scriptContent: params.scriptContent ?? "",
|
|
61
|
+
});
|
|
62
|
+
const grpcStream = this.client.spawn(spawnReq);
|
|
63
|
+
return {
|
|
64
|
+
sessionUri: params.sessionId,
|
|
65
|
+
stream: this.foldStream(params.sessionId, grpcStream),
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Reanimate a suspended session via PowerLine's `resume` RPC.
|
|
70
|
+
*
|
|
71
|
+
* Returns a live stream of envelopes for the reanimated session. Note that
|
|
72
|
+
* `resume` alone does NOT replay buffered events — call
|
|
73
|
+
* {@link IHostTransport.drainBuffered} first to replay the parked queue,
|
|
74
|
+
* then this method to start the live stream.
|
|
75
|
+
*/
|
|
76
|
+
reanimate(params) {
|
|
77
|
+
const resumeReq = create(powerline.ResumeRequestSchema, {
|
|
78
|
+
sessionId: params.sessionId,
|
|
79
|
+
runtimeSessionId: params.runtimeSessionId,
|
|
80
|
+
runtime: params.runtime,
|
|
81
|
+
});
|
|
82
|
+
const grpcStream = this.client.resume(resumeReq);
|
|
83
|
+
return this.foldStream(params.sessionId, grpcStream);
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Drain previously-parked buffered events for a session.
|
|
87
|
+
*
|
|
88
|
+
* Maps to the gRPC `drainBufferedEvents` RPC. The returned stream yields
|
|
89
|
+
* the buffered envelopes and then terminates — it does NOT continue into
|
|
90
|
+
* the live event stream. Callers compose `drainBuffered` + `reanimate`
|
|
91
|
+
* to do recovery.
|
|
92
|
+
*/
|
|
93
|
+
async *drainBuffered(sessionUri) {
|
|
94
|
+
const drainReq = create(powerline.DrainRequestSchema, {
|
|
95
|
+
sessionId: sessionUri,
|
|
96
|
+
});
|
|
97
|
+
const drainStream = this.client.drainBufferedEvents(drainReq);
|
|
98
|
+
yield* this.foldStream(sessionUri, drainStream);
|
|
99
|
+
}
|
|
100
|
+
/** Send input text to a session via PowerLine's `sendInput` RPC. */
|
|
101
|
+
async dispatchInput(sessionUri, text) {
|
|
102
|
+
await this.client.sendInput(create(powerline.InputMessageSchema, { sessionId: sessionUri, text }));
|
|
103
|
+
}
|
|
104
|
+
/** Authenticate credentials via PowerLine's `authenticate` RPC. */
|
|
105
|
+
async authenticate(params) {
|
|
106
|
+
await this.client.authenticate(create(powerline.AuthenticateRequestSchema, {
|
|
107
|
+
provider: params.provider,
|
|
108
|
+
tokens: params.tokens.map((t) => create(powerline.TokenItemSchema, {
|
|
109
|
+
name: t.name,
|
|
110
|
+
type: t.type,
|
|
111
|
+
envVar: t.envVar ?? "",
|
|
112
|
+
filePath: t.filePath ?? "",
|
|
113
|
+
value: t.value,
|
|
114
|
+
})),
|
|
115
|
+
}));
|
|
116
|
+
}
|
|
117
|
+
/** Dispose a session via PowerLine's `kill` RPC. */
|
|
118
|
+
async dispose(sessionUri, reason) {
|
|
119
|
+
await this.client.kill(create(powerline.KillRequestSchema, { id: sessionUri, reason: reason ?? "" }));
|
|
120
|
+
this.mapperContexts.delete(sessionUri);
|
|
121
|
+
}
|
|
122
|
+
/** List active sessions via PowerLine's `listSessions` RPC. */
|
|
123
|
+
async listSessions() {
|
|
124
|
+
const list = await this.client.listSessions({});
|
|
125
|
+
return list.sessions.map((s) => ({
|
|
126
|
+
sessionId: s.sessionId,
|
|
127
|
+
runtime: s.runtime,
|
|
128
|
+
status: s.status,
|
|
129
|
+
}));
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Fold a raw `AgentEvent` stream into `ServerActionEnvelope`s by running
|
|
133
|
+
* each event through the mapper. The per-session `MapperContext` is
|
|
134
|
+
* created/retrieved lazily and removed when the stream completes.
|
|
135
|
+
*/
|
|
136
|
+
async *foldStream(sessionUri, grpcStream) {
|
|
137
|
+
const context = this.getOrCreateContext(sessionUri);
|
|
138
|
+
try {
|
|
139
|
+
for await (const event of grpcStream) {
|
|
140
|
+
const idx = context.eventIndex++;
|
|
141
|
+
const { actions } = mapAgentEvent(event, idx, context);
|
|
142
|
+
yield { event, actions };
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
finally {
|
|
146
|
+
// Context lifetime tracks the stream; recover paths create a fresh one
|
|
147
|
+
// on the next drainBuffered/reanimate. Clearing here prevents memory
|
|
148
|
+
// growth for sessions that close cleanly.
|
|
149
|
+
this.mapperContexts.delete(sessionUri);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
/** Get an existing or create a fresh `MapperContext` for a session. */
|
|
153
|
+
getOrCreateContext(sessionUri) {
|
|
154
|
+
let ctx = this.mapperContexts.get(sessionUri);
|
|
155
|
+
if (!ctx) {
|
|
156
|
+
ctx = {
|
|
157
|
+
turnId: undefined,
|
|
158
|
+
openToolCalls: [],
|
|
159
|
+
partCounter: 0,
|
|
160
|
+
eventIndex: 0,
|
|
161
|
+
metaAccumulator: {},
|
|
162
|
+
};
|
|
163
|
+
this.mapperContexts.set(sessionUri, ctx);
|
|
164
|
+
}
|
|
165
|
+
return ctx;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
//# sourceMappingURL=grpc-host-transport.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grpc-host-transport.js","sourceRoot":"","sources":["../src/grpc-host-transport.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,aAAa,EAAsB,MAAM,oBAAoB,CAAC;AAYlF;;;;;;GAMG;AACH,MAAM,OAAO,iBAAiB;IAC5B,mEAAmE;IAClD,MAAM,CAAkB;IAEzC;;;OAGG;IACc,cAAc,GAA+B,IAAI,GAAG,EAAE,CAAC;IAExE;;;;;OAKG;IACH,YAAmB,MAAuB;QACxC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACI,aAAa,CAAC,MAA2B;QAC9C,MAAM,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC,kBAAkB,EAAE;YACpD,SAAS,EAAE,MAAM,CAAC,SAAS;YAC3B,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,MAAM,EAAE,MAAM,CAAC,MAAM;YACrB,KAAK,EAAE,MAAM,CAAC,KAAK;YACnB,QAAQ,EAAE,MAAM,CAAC,QAAQ;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gBACd,UAAU,EAAE,CAAC;gBACb,eAAe,EAAE,EAAE;aACpB,CAAC;YACF,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;QAC3C,CAAC;QACD,OAAO,GAAG,CAAC;IACb,CAAC;CACF"}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Transport-agnostic host interface (AHP HR8c).
|
|
3
|
+
*
|
|
4
|
+
* Wraps the PowerLine gRPC client behind an AHP-shaped API so consumers in
|
|
5
|
+
* `@grackle-ai/core` no longer need to import `powerline.*` proto types. HR8d
|
|
6
|
+
* will replace the gRPC implementation with a native AHP host without
|
|
7
|
+
* changing this interface.
|
|
8
|
+
*
|
|
9
|
+
* Each consumer call-site goes through one of these methods:
|
|
10
|
+
* - `createSession` ← `PowerLineClient.spawn`
|
|
11
|
+
* - `reanimate` ← `PowerLineClient.resume`
|
|
12
|
+
* - `drainBuffered` ← `PowerLineClient.drainBufferedEvents`
|
|
13
|
+
* - `dispatchInput` ← `PowerLineClient.sendInput`
|
|
14
|
+
* - `authenticate` ← `PowerLineClient.authenticate`
|
|
15
|
+
* - `dispose` ← `PowerLineClient.kill`
|
|
16
|
+
* - `listSessions` ← `PowerLineClient.listSessions`
|
|
17
|
+
*
|
|
18
|
+
* @module host-transport
|
|
19
|
+
*/
|
|
20
|
+
import type { AgentEventFields } from "@grackle-ai/common";
|
|
21
|
+
import type { StateAction } from "@grackle-ai/ahp";
|
|
22
|
+
/**
|
|
23
|
+
* A single event from a session stream, in HR8c transitional form.
|
|
24
|
+
*
|
|
25
|
+
* Carries both the source `AgentEvent` (so existing event-driven logic in
|
|
26
|
+
* `event-processor.ts` continues to work) and the AHP `StateAction[]`
|
|
27
|
+
* produced by the upstream mapper. HR8d removes `event`/`legacyEvent` once
|
|
28
|
+
* consumers fully consume AHP actions.
|
|
29
|
+
*/
|
|
30
|
+
export interface ServerActionEnvelope {
|
|
31
|
+
/**
|
|
32
|
+
* Source AgentEvent — transitional. Existing consumers in
|
|
33
|
+
* `@grackle-ai/core` drive status/usage/end-reason logic from this. HR8d
|
|
34
|
+
* removes the field; consumers must migrate to AHP actions by then.
|
|
35
|
+
*/
|
|
36
|
+
event: AgentEventFields;
|
|
37
|
+
/** AHP actions derived from the event (possibly empty for carried/dropped). */
|
|
38
|
+
actions: StateAction[];
|
|
39
|
+
}
|
|
40
|
+
/** Parameters for creating a new session via {@link IHostTransport.createSession}. */
|
|
41
|
+
export interface CreateSessionParams {
|
|
42
|
+
/** Server-assigned session ID (becomes the session URI). */
|
|
43
|
+
sessionId: string;
|
|
44
|
+
/** Runtime name (e.g. "claude-code", "copilot"). */
|
|
45
|
+
runtime: string;
|
|
46
|
+
/** User-visible prompt to deliver as the initial turn. */
|
|
47
|
+
prompt: string;
|
|
48
|
+
/** LLM model identifier. */
|
|
49
|
+
model: string;
|
|
50
|
+
/** Maximum agent turns before forced stop. */
|
|
51
|
+
maxTurns: number;
|
|
52
|
+
/** Git branch for worktree creation; empty string skips worktree. */
|
|
53
|
+
branch: string;
|
|
54
|
+
/** Working directory on the remote (defaults to "/workspace"). */
|
|
55
|
+
workingDirectory: string;
|
|
56
|
+
/** System prompt / context injected at session start. */
|
|
57
|
+
systemContext: string;
|
|
58
|
+
/** Workspace identifier (optional, for non-workspace sessions). */
|
|
59
|
+
workspaceId?: string;
|
|
60
|
+
/** Task identifier this session belongs to. */
|
|
61
|
+
taskId: string;
|
|
62
|
+
/** JSON-encoded MCP server configurations. */
|
|
63
|
+
mcpServersJson: string;
|
|
64
|
+
/** MCP broker URL the runtime should connect back to. */
|
|
65
|
+
mcpUrl: string;
|
|
66
|
+
/** Scoped token for the runtime to authenticate to the MCP broker. */
|
|
67
|
+
mcpToken: string;
|
|
68
|
+
/** Whether to use git worktrees. */
|
|
69
|
+
useWorktrees?: boolean;
|
|
70
|
+
/** IPC pipe mode ("sync", "async", "detach", or ""). */
|
|
71
|
+
pipe?: string;
|
|
72
|
+
/** Script content for script personas (optional). */
|
|
73
|
+
scriptContent?: string;
|
|
74
|
+
}
|
|
75
|
+
/** Parameters for reanimating a suspended session. */
|
|
76
|
+
export interface ReanimateParams {
|
|
77
|
+
/** Server session ID matching the prior spawn. */
|
|
78
|
+
sessionId: string;
|
|
79
|
+
/** Runtime-native session ID stored from the prior spawn's `runtime_session_id` event. */
|
|
80
|
+
runtimeSessionId: string;
|
|
81
|
+
/** Runtime name (must match the original spawn). */
|
|
82
|
+
runtime: string;
|
|
83
|
+
}
|
|
84
|
+
/** A single token item delivered via {@link IHostTransport.authenticate}. */
|
|
85
|
+
export interface AuthenticateTokenItem {
|
|
86
|
+
/** Logical name of the token (e.g. "github-token"). */
|
|
87
|
+
name: string;
|
|
88
|
+
/** Delivery kind ("env_var" or "file"). */
|
|
89
|
+
type: string;
|
|
90
|
+
/** Environment variable name (when `type === "env_var"`). */
|
|
91
|
+
envVar?: string;
|
|
92
|
+
/** Target file path on the remote (when `type === "file"`). */
|
|
93
|
+
filePath?: string;
|
|
94
|
+
/** The credential value. */
|
|
95
|
+
value: string;
|
|
96
|
+
}
|
|
97
|
+
/** Parameters for {@link IHostTransport.authenticate}. */
|
|
98
|
+
export interface AuthenticateParams {
|
|
99
|
+
/** Provider identifier (typically the runtime name) the credentials are scoped to. */
|
|
100
|
+
provider: string;
|
|
101
|
+
/** Token items to deliver. */
|
|
102
|
+
tokens: AuthenticateTokenItem[];
|
|
103
|
+
}
|
|
104
|
+
/** A single session entry returned by {@link IHostTransport.listSessions}. */
|
|
105
|
+
export interface HostSessionInfo {
|
|
106
|
+
/** Server session ID. */
|
|
107
|
+
sessionId: string;
|
|
108
|
+
/** Runtime the session is running under. */
|
|
109
|
+
runtime: string;
|
|
110
|
+
/** Current status (runtime-defined). */
|
|
111
|
+
status: string;
|
|
112
|
+
}
|
|
113
|
+
/** Result of {@link IHostTransport.createSession}: URI + live event stream. */
|
|
114
|
+
export interface CreateSessionResult {
|
|
115
|
+
/** Session URI (currently just the sessionId; AHP URI scheme reserved for HR8d). */
|
|
116
|
+
sessionUri: string;
|
|
117
|
+
/** Live stream of envelopes for this session. */
|
|
118
|
+
stream: AsyncIterable<ServerActionEnvelope>;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Transport-agnostic host interface (AHP HR8c).
|
|
122
|
+
*
|
|
123
|
+
* All `@grackle-ai/core` consumers obtain an implementation via
|
|
124
|
+
* `GrpcHostTransport(connection)` (this PR) or directly from the AHP host
|
|
125
|
+
* (HR8d). The interface shape stays stable across the swap.
|
|
126
|
+
*/
|
|
127
|
+
export interface IHostTransport {
|
|
128
|
+
/**
|
|
129
|
+
* Create a new session. Returns the session URI plus the live event stream.
|
|
130
|
+
*
|
|
131
|
+
* The stream is returned synchronously alongside the URI (matching gRPC's
|
|
132
|
+
* spawn behavior) to avoid event-buffer complexity. Consumers must begin
|
|
133
|
+
* iterating the stream promptly to avoid back-pressure on the wire.
|
|
134
|
+
*/
|
|
135
|
+
createSession(params: CreateSessionParams): CreateSessionResult;
|
|
136
|
+
/**
|
|
137
|
+
* Reanimate a suspended session, returning its live event stream.
|
|
138
|
+
*
|
|
139
|
+
* Maps directly to `resume`. For recovery flows that also need the
|
|
140
|
+
* previously-parked buffered events, call `drainBuffered` first, then
|
|
141
|
+
* call `reanimate` to start the live stream.
|
|
142
|
+
*/
|
|
143
|
+
reanimate(params: ReanimateParams): AsyncIterable<ServerActionEnvelope>;
|
|
144
|
+
/**
|
|
145
|
+
* Drain previously-parked buffered events for a session.
|
|
146
|
+
*
|
|
147
|
+
* Returns a finite stream of envelopes for events the host has been
|
|
148
|
+
* holding since the consumer disconnected; the stream terminates once
|
|
149
|
+
* the parked queue is exhausted. It does NOT continue into the live
|
|
150
|
+
* event stream — callers compose `drainBuffered` + `reanimate` to do
|
|
151
|
+
* recovery (see `session-recovery.ts`).
|
|
152
|
+
*
|
|
153
|
+
* Note: HR8d's AHP wire will add a true seq-cursor `subscribe` method
|
|
154
|
+
* for "resume from server seq N" semantics. That's intentionally a
|
|
155
|
+
* separate method on this interface; this one stays narrowly scoped to
|
|
156
|
+
* the parked-queue drain that gRPC supports today.
|
|
157
|
+
*/
|
|
158
|
+
drainBuffered(sessionUri: string): AsyncIterable<ServerActionEnvelope>;
|
|
159
|
+
/**
|
|
160
|
+
* Send input text to a session.
|
|
161
|
+
*
|
|
162
|
+
* Bypasses any IDLE guard — the runtime accepts input at any time and picks
|
|
163
|
+
* it up at the next turn boundary. Used by signal delivery and pipe
|
|
164
|
+
* delivery in `@grackle-ai/core`.
|
|
165
|
+
*/
|
|
166
|
+
dispatchInput(sessionUri: string, text: string): Promise<void>;
|
|
167
|
+
/**
|
|
168
|
+
* Authenticate credentials for the given runtime/provider.
|
|
169
|
+
*
|
|
170
|
+
* Throws on transport error. Callers in core treat failure as best-effort
|
|
171
|
+
* (log and continue).
|
|
172
|
+
*/
|
|
173
|
+
authenticate(params: AuthenticateParams): Promise<void>;
|
|
174
|
+
/**
|
|
175
|
+
* Dispose (terminate) a session.
|
|
176
|
+
*
|
|
177
|
+
* Maps to `kill`. The optional `reason` is currently ignored by the gRPC
|
|
178
|
+
* transport but reserved for future AHP-native disposition semantics.
|
|
179
|
+
*/
|
|
180
|
+
dispose(sessionUri: string, reason?: string): Promise<void>;
|
|
181
|
+
/** List active sessions on the host. */
|
|
182
|
+
listSessions(): Promise<HostSessionInfo[]>;
|
|
183
|
+
}
|
|
184
|
+
//# sourceMappingURL=host-transport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host-transport.d.ts","sourceRoot":"","sources":["../src/host-transport.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD;;;;;;;GAOG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;OAIG;IACH,KAAK,EA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xC,YAAY,IAAI,OAAO,CAAC,eAAe,EAAE,CAAC,CAAC;CAC5C"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Transport-agnostic host interface (AHP HR8c).
|
|
3
|
+
*
|
|
4
|
+
* Wraps the PowerLine gRPC client behind an AHP-shaped API so consumers in
|
|
5
|
+
* `@grackle-ai/core` no longer need to import `powerline.*` proto types. HR8d
|
|
6
|
+
* will replace the gRPC implementation with a native AHP host without
|
|
7
|
+
* changing this interface.
|
|
8
|
+
*
|
|
9
|
+
* Each consumer call-site goes through one of these methods:
|
|
10
|
+
* - `createSession` ← `PowerLineClient.spawn`
|
|
11
|
+
* - `reanimate` ← `PowerLineClient.resume`
|
|
12
|
+
* - `drainBuffered` ← `PowerLineClient.drainBufferedEvents`
|
|
13
|
+
* - `dispatchInput` ← `PowerLineClient.sendInput`
|
|
14
|
+
* - `authenticate` ← `PowerLineClient.authenticate`
|
|
15
|
+
* - `dispose` ← `PowerLineClient.kill`
|
|
16
|
+
* - `listSessions` ← `PowerLineClient.listSessions`
|
|
17
|
+
*
|
|
18
|
+
* @module host-transport
|
|
19
|
+
*/
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=host-transport.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host-transport.js","sourceRoot":"","sources":["../src/host-transport.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG"}
|
package/dist/index.d.ts
CHANGED
|
@@ -18,4 +18,7 @@ export type { ExecResult } from "./exec.js";
|
|
|
18
18
|
export { exec } from "./exec.js";
|
|
19
19
|
export type { ExecFunction, AdapterDependencies } from "./adapter-dependencies.js";
|
|
20
20
|
export { sleep, findFreePort, isDevMode, getPackageVersion, shellEscape, REMOTE_POWERLINE_DIRECTORY, SSH_CONNECTIVITY_TIMEOUT_MS, REMOTE_EXEC_DEFAULT_TIMEOUT_MS, } from "./utils.js";
|
|
21
|
+
export type { AgentEventFields } from "@grackle-ai/common";
|
|
22
|
+
export type { IHostTransport, ServerActionEnvelope, CreateSessionParams, CreateSessionResult, ReanimateParams, AuthenticateParams, AuthenticateTokenItem, HostSessionInfo, } from "./host-transport.js";
|
|
23
|
+
export { GrpcHostTransport } from "./grpc-host-transport.js";
|
|
21
24
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAGjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAG5C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG/C,YAAY,EACV,eAAe,EACf,mBAAmB,EACnB,cAAc,EACd,qBAAqB,EACrB,kBAAkB,GACnB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAGpD,YAAY,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAG3D,YAAY,EAAE,YAAY,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACvF,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,YAAY,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAG/F,YAAY,EAAE,UAAU,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AACxE,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,GAChB,MAAM,cAAc,CAAC;AAGtB,YAAY,EAAE,gBAAgB,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AACpF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BAAsB,CAAC;AAG/F,YAAY,EAAE,UAAU,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AACxE,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,GAChB,MAAM,cAAc,CAAC;AAGtB,YAAY,EAAE,gBAAgB,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AACpF,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAGtF,YAAY,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGjC,YAAY,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAGnF,OAAO,EACL,KAAK,EACL,YAAY,EACZ,SAAS,EACT,iBAAiB,EACjB,WAAW,EACX,0BAA0B,EAC1B,2BAA2B,EAC3B,8BAA8B,GAC/B,MAAM,YAAY,CAAC;AAMpB,YAAY,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,YAAY,EACV,cAAc,EACd,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,eAAe,EACf,kBAAkB,EAClB,qBAAqB,EACrB,eAAe,GAChB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -13,4 +13,5 @@ export { remoteStop, remoteDestroy, remoteHealthCheck } from "./shared-operation
|
|
|
13
13
|
export { exec } from "./exec.js";
|
|
14
14
|
// ─── Utilities ──────────────────────────────────────────────
|
|
15
15
|
export { sleep, findFreePort, isDevMode, getPackageVersion, shellEscape, REMOTE_POWERLINE_DIRECTORY, SSH_CONNECTIVITY_TIMEOUT_MS, REMOTE_EXEC_DEFAULT_TIMEOUT_MS, } from "./utils.js";
|
|
16
|
+
export { GrpcHostTransport } from "./grpc-host-transport.js";
|
|
16
17
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,gEAAgE;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,iEAAiE;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAU/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAOpD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAI/F,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,GAChB,MAAM,cAAc,CAAC;AAItB,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,gBAAgB,CAAC;AAExB,8DAA8D;AAC9D,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAItF,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAKjC,+DAA+D;AAC/D,OAAO,EACL,KAAK,EACL,YAAY,EACZ,SAAS,EACT,iBAAiB,EACjB,WAAW,EACX,0BAA0B,EAC1B,2BAA2B,EAC3B,8BAA8B,GAC/B,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,gEAAgE;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,iEAAiE;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAU/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAOpD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAI/F,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,GAChB,MAAM,cAAc,CAAC;AAItB,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,gBAAgB,CAAC;AAExB,8DAA8D;AAC9D,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAItF,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAKjC,+DAA+D;AAC/D,OAAO,EACL,KAAK,EACL,YAAY,EACZ,SAAS,EACT,iBAAiB,EACjB,WAAW,EACX,0BAA0B,EAC1B,2BAA2B,EAC3B,8BAA8B,GAC/B,MAAM,YAAY,CAAC;AAiBpB,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grackle-ai/adapter-sdk",
|
|
3
|
-
"version": "0.132.
|
|
3
|
+
"version": "0.132.2",
|
|
4
4
|
"description": "SDK for building Grackle environment adapters",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -31,7 +31,8 @@
|
|
|
31
31
|
"@bufbuild/protobuf": "^2.5.0",
|
|
32
32
|
"@connectrpc/connect": "^2.0.0",
|
|
33
33
|
"@connectrpc/connect-node": "^2.0.0",
|
|
34
|
-
"@grackle-ai/
|
|
34
|
+
"@grackle-ai/ahp": "0.132.2",
|
|
35
|
+
"@grackle-ai/common": "0.132.2"
|
|
35
36
|
},
|
|
36
37
|
"devDependencies": {
|
|
37
38
|
"@rushstack/heft": "1.2.7",
|