@hua-labs/tap 0.2.0 → 0.2.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/dist/bridges/codex-app-server-bridge.d.mts +55 -0
- package/dist/bridges/codex-app-server-bridge.mjs +1358 -0
- package/dist/bridges/codex-app-server-bridge.mjs.map +1 -0
- package/dist/bridges/codex-bridge-runner.d.mts +2 -1
- package/dist/bridges/codex-bridge-runner.mjs +41 -9
- package/dist/bridges/codex-bridge-runner.mjs.map +1 -1
- package/dist/cli.mjs +262 -19
- package/dist/cli.mjs.map +1 -1
- package/dist/index.d.mts +32 -4
- package/dist/index.mjs +3512 -195
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -164,8 +164,8 @@ interface TapStateV1 {
|
|
|
164
164
|
packageVersion: string;
|
|
165
165
|
runtimes: Partial<Record<RuntimeName, RuntimeState>>;
|
|
166
166
|
}
|
|
167
|
-
type CommandName = "init" | "init-worktree" | "add" | "remove" | "status" | "serve" | "bridge" | "up" | "down" | "dashboard" | "doctor" | "unknown";
|
|
168
|
-
type CommandCode = "TAP_INIT_OK" | "TAP_ADD_OK" | "TAP_REMOVE_OK" | "TAP_STATUS_OK" | "TAP_SERVE_OK" | "TAP_NO_OP" | "TAP_ALREADY_INITIALIZED" | "TAP_NOT_INITIALIZED" | "TAP_RUNTIME_UNKNOWN" | "TAP_RUNTIME_NOT_FOUND" | "TAP_CONFIG_INVALID" | "TAP_LOCAL_SERVER_MISSING" | "TAP_INVALID_ARGUMENT" | "TAP_INSTANCE_NOT_FOUND" | "TAP_INSTANCE_AMBIGUOUS" | "TAP_PORT_CONFLICT" | "TAP_PATCH_FAILED" | "TAP_VERIFY_FAILED" | "TAP_ROLLBACK_FAILED" | "TAP_BRIDGE_START_OK" | "TAP_BRIDGE_START_FAILED" | "TAP_BRIDGE_STOP_OK" | "TAP_BRIDGE_STATUS_OK" | "TAP_BRIDGE_NOT_RUNNING" | "TAP_BRIDGE_SCRIPT_MISSING" | "TAP_UP_OK" | "TAP_DOWN_OK" | "TAP_SERVE_NO_SERVER" | "TAP_SERVE_BUN_REQUIRED" | "TAP_REVIEW_START_OK" | "TAP_REVIEW_TERMINATED" | "TAP_INTERNAL_ERROR";
|
|
167
|
+
type CommandName = "init" | "init-worktree" | "add" | "remove" | "status" | "serve" | "bridge" | "up" | "down" | "comms" | "dashboard" | "doctor" | "unknown";
|
|
168
|
+
type CommandCode = "TAP_INIT_OK" | "TAP_ADD_OK" | "TAP_REMOVE_OK" | "TAP_STATUS_OK" | "TAP_SERVE_OK" | "TAP_NO_OP" | "TAP_ALREADY_INITIALIZED" | "TAP_INIT_CLONE_FAILED" | "TAP_NOT_INITIALIZED" | "TAP_RUNTIME_UNKNOWN" | "TAP_RUNTIME_NOT_FOUND" | "TAP_CONFIG_INVALID" | "TAP_LOCAL_SERVER_MISSING" | "TAP_INVALID_ARGUMENT" | "TAP_INSTANCE_NOT_FOUND" | "TAP_INSTANCE_AMBIGUOUS" | "TAP_PORT_CONFLICT" | "TAP_PATCH_FAILED" | "TAP_VERIFY_FAILED" | "TAP_ROLLBACK_FAILED" | "TAP_BRIDGE_START_OK" | "TAP_BRIDGE_START_FAILED" | "TAP_BRIDGE_STOP_OK" | "TAP_BRIDGE_STATUS_OK" | "TAP_BRIDGE_NOT_RUNNING" | "TAP_BRIDGE_SCRIPT_MISSING" | "TAP_UP_OK" | "TAP_DOWN_OK" | "TAP_COMMS_PULL_OK" | "TAP_COMMS_PULL_FAILED" | "TAP_COMMS_PUSH_OK" | "TAP_COMMS_PUSH_FAILED" | "TAP_COMMS_NOT_REPO" | "TAP_SERVE_NO_SERVER" | "TAP_SERVE_BUN_REQUIRED" | "TAP_REVIEW_START_OK" | "TAP_REVIEW_TERMINATED" | "TAP_INTERNAL_ERROR";
|
|
169
169
|
interface CommandResult<T = Record<string, unknown>> {
|
|
170
170
|
ok: boolean;
|
|
171
171
|
command: CommandName;
|
|
@@ -197,6 +197,8 @@ interface TapSharedConfig {
|
|
|
197
197
|
runtimeCommand?: string;
|
|
198
198
|
/** App server WebSocket URL for bridge connections. */
|
|
199
199
|
appServerUrl?: string;
|
|
200
|
+
/** GitHub URL for the comms repository (used by `tap comms pull/push`). */
|
|
201
|
+
commsRepoUrl?: string;
|
|
200
202
|
}
|
|
201
203
|
/**
|
|
202
204
|
* Local config (tap-config.local.json) — gitignored, machine-specific overrides.
|
|
@@ -300,7 +302,8 @@ declare function collectDashboardSnapshot(repoRoot?: string, commsDirOverride?:
|
|
|
300
302
|
* State/Control API — programmatic access to tap state.
|
|
301
303
|
* GUI and autopilot consume these functions instead of shelling out to CLI.
|
|
302
304
|
*
|
|
303
|
-
* M105:
|
|
305
|
+
* M105 P1: getDashboardSnapshot, streamEvents (read-only)
|
|
306
|
+
* M105 P2: startAgents, stopAgents (write — wraps tap up/down)
|
|
304
307
|
*/
|
|
305
308
|
|
|
306
309
|
interface StateApiOptions {
|
|
@@ -327,6 +330,31 @@ interface EventStreamOptions extends StateApiOptions {
|
|
|
327
330
|
* Stops when the AbortSignal fires or the consumer breaks out.
|
|
328
331
|
*/
|
|
329
332
|
declare function streamEvents(options?: EventStreamOptions): AsyncGenerator<DashboardSnapshot>;
|
|
333
|
+
interface AgentControlOptions {
|
|
334
|
+
/** Extra CLI args forwarded to `tap up` (e.g. `["--no-auth"]`) */
|
|
335
|
+
args?: string[];
|
|
336
|
+
}
|
|
337
|
+
interface AgentControlResult {
|
|
338
|
+
ok: boolean;
|
|
339
|
+
message: string;
|
|
340
|
+
snapshot: DashboardSnapshot;
|
|
341
|
+
commandResult: CommandResult;
|
|
342
|
+
}
|
|
343
|
+
/**
|
|
344
|
+
* Start all registered bridge daemons.
|
|
345
|
+
* Equivalent to `tap up [...args]`.
|
|
346
|
+
*
|
|
347
|
+
* Always operates on the cwd-based repo (same as CLI commands).
|
|
348
|
+
* Use read-only APIs (getDashboardSnapshot) for cross-repo queries.
|
|
349
|
+
*/
|
|
350
|
+
declare function startAgents(options?: AgentControlOptions): Promise<AgentControlResult>;
|
|
351
|
+
/**
|
|
352
|
+
* Stop all running bridge daemons.
|
|
353
|
+
* Equivalent to `tap down`.
|
|
354
|
+
*
|
|
355
|
+
* Always operates on the cwd-based repo (same as CLI commands).
|
|
356
|
+
*/
|
|
357
|
+
declare function stopAgents(): Promise<AgentControlResult>;
|
|
330
358
|
/**
|
|
331
359
|
* Resolve tap configuration for API consumers.
|
|
332
360
|
* Returns paths and settings without requiring CLI args.
|
|
@@ -403,4 +431,4 @@ declare function resolveNodeRuntime(configCommand: string, repoRoot: string): Re
|
|
|
403
431
|
*/
|
|
404
432
|
declare function buildRuntimeEnv(repoRoot: string, baseEnv?: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
|
|
405
433
|
|
|
406
|
-
export { type AdapterContext, type AgentInfo, type AppServerAuthState, type AppServerState, type ApplyResult, type ArtifactKind, type BridgeInfo, type BridgeMode, type BridgeState, type CommandCode, type CommandName, type CommandResult, type ConfigOverrides, type ConfigResolution, type ConfigSource, type DashboardSnapshot, type DashboardWarning, type EventStreamOptions, type HttpServerOptions, type InstanceId, type InstanceState, LOCAL_CONFIG_FILE, type OwnedArtifact, type PRInfo, type PatchOp, type PatchOpType, type PatchPlan, type Platform, type ProbeResult, type ResolvedRuntime, type RuntimeAdapter, type RuntimeName, type RuntimeSource, type RuntimeState, SHARED_CONFIG_FILE, type StateApiOptions, type TapLocalConfig, type TapResolvedConfig, type TapSharedConfig, type TapState, type TapStateV1, type VerifyCheck, type VerifyResult, buildRuntimeEnv, collectDashboardSnapshot, createInitialState, getConfig, getDashboardSnapshot, getFnmBinDir, getHeartbeatAge, loadLocalConfig, loadSharedConfig, loadState, probeFnmNode, readNodeVersion, resolveConfig, resolveNodeRuntime, rotateLog, saveLocalConfig, saveSharedConfig, saveState, startHttpServer, stateExists, streamEvents, updateBridgeHeartbeat, version };
|
|
434
|
+
export { type AdapterContext, type AgentControlOptions, type AgentControlResult, type AgentInfo, type AppServerAuthState, type AppServerState, type ApplyResult, type ArtifactKind, type BridgeInfo, type BridgeMode, type BridgeState, type CommandCode, type CommandName, type CommandResult, type ConfigOverrides, type ConfigResolution, type ConfigSource, type DashboardSnapshot, type DashboardWarning, type EventStreamOptions, type HttpServerOptions, type InstanceId, type InstanceState, LOCAL_CONFIG_FILE, type OwnedArtifact, type PRInfo, type PatchOp, type PatchOpType, type PatchPlan, type Platform, type ProbeResult, type ResolvedRuntime, type RuntimeAdapter, type RuntimeName, type RuntimeSource, type RuntimeState, SHARED_CONFIG_FILE, type StateApiOptions, type TapLocalConfig, type TapResolvedConfig, type TapSharedConfig, type TapState, type TapStateV1, type VerifyCheck, type VerifyResult, buildRuntimeEnv, collectDashboardSnapshot, createInitialState, getConfig, getDashboardSnapshot, getFnmBinDir, getHeartbeatAge, loadLocalConfig, loadSharedConfig, loadState, probeFnmNode, readNodeVersion, resolveConfig, resolveNodeRuntime, rotateLog, saveLocalConfig, saveSharedConfig, saveState, startAgents, startHttpServer, stateExists, stopAgents, streamEvents, updateBridgeHeartbeat, version };
|