opencode-supertask 0.1.41 → 0.2.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 +77 -0
- package/README.md +66 -39
- package/README.zh-CN.md +66 -39
- package/dist/cli/chunk-3PIYMBV3.js +45 -0
- package/dist/cli/chunk-3PIYMBV3.js.map +1 -0
- package/dist/cli/chunk-4FK5KE6G.js +111 -0
- package/dist/cli/chunk-4FK5KE6G.js.map +1 -0
- package/dist/cli/chunk-5VKFECHP.js +412 -0
- package/dist/cli/chunk-5VKFECHP.js.map +1 -0
- package/dist/cli/chunk-AZM76ISG.js +143 -0
- package/dist/cli/chunk-AZM76ISG.js.map +1 -0
- package/dist/cli/chunk-CMEP6IB4.js +9379 -0
- package/dist/cli/chunk-CMEP6IB4.js.map +1 -0
- package/dist/cli/chunk-DF56RPNL.js +65 -0
- package/dist/cli/chunk-DF56RPNL.js.map +1 -0
- package/dist/cli/chunk-DIJEKFBV.js +486 -0
- package/dist/cli/chunk-DIJEKFBV.js.map +1 -0
- package/dist/cli/chunk-DYXFSX5J.js +28 -0
- package/dist/cli/chunk-DYXFSX5J.js.map +1 -0
- package/dist/cli/chunk-EQWICVCJ.js +1701 -0
- package/dist/cli/chunk-EQWICVCJ.js.map +1 -0
- package/dist/cli/chunk-GHXFMJTS.js +42 -0
- package/dist/cli/chunk-GHXFMJTS.js.map +1 -0
- package/dist/cli/chunk-IYYBJHZF.js +28 -0
- package/dist/cli/chunk-IYYBJHZF.js.map +1 -0
- package/dist/cli/chunk-J34FWHQU.js +376 -0
- package/dist/cli/chunk-J34FWHQU.js.map +1 -0
- package/dist/cli/chunk-LX5CBJLP.js +121 -0
- package/dist/cli/chunk-LX5CBJLP.js.map +1 -0
- package/dist/cli/chunk-MVQ2XONT.js +139 -0
- package/dist/cli/chunk-MVQ2XONT.js.map +1 -0
- package/dist/cli/chunk-NCT3ETTK.js +1332 -0
- package/dist/cli/chunk-NCT3ETTK.js.map +1 -0
- package/dist/cli/chunk-YB7MYTE5.js +34 -0
- package/dist/cli/chunk-YB7MYTE5.js.map +1 -0
- package/dist/cli/chunk-YGELD2E5.js +5464 -0
- package/dist/cli/chunk-YGELD2E5.js.map +1 -0
- package/dist/cli/chunk-ZBH7YWXF.js +314 -0
- package/dist/cli/chunk-ZBH7YWXF.js.map +1 -0
- package/dist/cli/config-ED56ZLHY.js +20 -0
- package/dist/cli/config-ED56ZLHY.js.map +1 -0
- package/dist/cli/database-maintenance.service-F3IZU52F.js +16 -0
- package/dist/cli/database-maintenance.service-F3IZU52F.js.map +1 -0
- package/dist/cli/database-output-GH7F6X6D.js +165 -0
- package/dist/cli/database-output-GH7F6X6D.js.map +1 -0
- package/dist/cli/db-H7GIFWS2.js +26 -0
- package/dist/cli/db-H7GIFWS2.js.map +1 -0
- package/dist/cli/doctor-smoke-QXHF7UNN.js +150 -0
- package/dist/cli/doctor-smoke-QXHF7UNN.js.map +1 -0
- package/dist/cli/duration-Q3UMLO6F.js +10 -0
- package/dist/cli/duration-Q3UMLO6F.js.map +1 -0
- package/dist/cli/gateway-HNMX5ZTO.js +1738 -0
- package/dist/cli/gateway-HNMX5ZTO.js.map +1 -0
- package/dist/cli/gateway-wake-U4HTV56Q.js +14 -0
- package/dist/cli/gateway-wake-U4HTV56Q.js.map +1 -0
- package/dist/cli/index.js +626 -26583
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/job-templates-RPQJ4XXW.js +21 -0
- package/dist/cli/job-templates-RPQJ4XXW.js.map +1 -0
- package/dist/cli/logs-QD2N62KK.js +316 -0
- package/dist/cli/logs-QD2N62KK.js.map +1 -0
- package/dist/cli/output-2INTEUFQ.js +19 -0
- package/dist/cli/output-2INTEUFQ.js.map +1 -0
- package/dist/cli/pm2-WY644BUO.js +49 -0
- package/dist/cli/pm2-WY644BUO.js.map +1 -0
- package/dist/cli/task-run.service-QMDINJKG.js +15 -0
- package/dist/cli/task-run.service-QMDINJKG.js.map +1 -0
- package/dist/cli/task-template.service-SZBKGLCB.js +12 -0
- package/dist/cli/task-template.service-SZBKGLCB.js.map +1 -0
- package/dist/cli/task.service-ZVDJ6VSQ.js +19 -0
- package/dist/cli/task.service-ZVDJ6VSQ.js.map +1 -0
- package/dist/cli/update-FYD546I2.js +2058 -0
- package/dist/cli/update-FYD546I2.js.map +1 -0
- package/dist/cli/web-2S7DW7XA.js +9403 -0
- package/dist/cli/web-2S7DW7XA.js.map +1 -0
- package/dist/daemon/gateway-diagnostic-runner.js +280 -238
- package/dist/daemon/gateway-diagnostic-runner.js.map +1 -1
- package/dist/gateway/index.d.ts +82 -1
- package/dist/gateway/index.js +9154 -2577
- package/dist/gateway/index.js.map +1 -1
- package/dist/plugin/supertask.d.ts +157 -1
- package/dist/plugin/supertask.js +5056 -1550
- package/dist/plugin/supertask.js.map +1 -1
- package/dist/pm2-cli-CEDhULjk.d.ts +40 -0
- package/dist/web/index.d.ts +36 -34
- package/dist/web/index.js +9951 -4006
- package/dist/web/index.js.map +1 -1
- package/dist/worker/index.d.ts +5 -0
- package/dist/worker/index.js +1989 -331
- package/dist/worker/index.js.map +1 -1
- package/dist/worker/launcher.d.ts +46 -1
- package/dist/worker/launcher.js +218 -68
- package/dist/worker/launcher.js.map +1 -1
- package/drizzle/0009_little_weapon_omega.sql +7 -0
- package/drizzle/meta/0009_snapshot.json +681 -0
- package/drizzle/meta/_journal.json +7 -0
- package/package.json +4 -4
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
interface RuntimeScope {
|
|
2
|
+
cwd: string;
|
|
3
|
+
databasePath: string;
|
|
4
|
+
configPath: string;
|
|
5
|
+
opencodePath: string;
|
|
6
|
+
home: string;
|
|
7
|
+
pm2Home: string;
|
|
8
|
+
managementLockPath: string;
|
|
9
|
+
}
|
|
10
|
+
interface OpenCodeRuntimeDiagnostic {
|
|
11
|
+
ok: boolean;
|
|
12
|
+
executable: string;
|
|
13
|
+
version: string | null;
|
|
14
|
+
error: string | null;
|
|
15
|
+
}
|
|
16
|
+
interface GatewayDiagnostic {
|
|
17
|
+
pm2Installed: boolean;
|
|
18
|
+
processFound: boolean;
|
|
19
|
+
status: string | null;
|
|
20
|
+
pid: number | null;
|
|
21
|
+
ready: boolean;
|
|
22
|
+
runningVersion: string | null;
|
|
23
|
+
gatewayEntry: string | null;
|
|
24
|
+
gatewayPackageVersion: string | null;
|
|
25
|
+
logRotationInstalled: boolean;
|
|
26
|
+
startupConfigured: boolean | null;
|
|
27
|
+
currentScope: RuntimeScope;
|
|
28
|
+
gatewayScope: RuntimeScope | null;
|
|
29
|
+
scopeMatches: boolean;
|
|
30
|
+
gatewayOpenCode: OpenCodeRuntimeDiagnostic | null;
|
|
31
|
+
}
|
|
32
|
+
type EnsureGatewayResult = {
|
|
33
|
+
ok: true;
|
|
34
|
+
action: "already-running" | "started" | "restarted";
|
|
35
|
+
} | {
|
|
36
|
+
ok: false;
|
|
37
|
+
reason: "pm2-not-installed";
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export type { EnsureGatewayResult as E, GatewayDiagnostic as G };
|
package/dist/web/index.d.ts
CHANGED
|
@@ -2,58 +2,60 @@ import * as hono from 'hono';
|
|
|
2
2
|
import { Hono } from 'hono';
|
|
3
3
|
import * as hono_types from 'hono/types';
|
|
4
4
|
import { G as GatewayConfig } from '../config-CCUuD6Az.js';
|
|
5
|
+
import { G as GatewayDiagnostic } from '../pm2-cli-CEDhULjk.js';
|
|
5
6
|
|
|
6
|
-
interface
|
|
7
|
-
cwd: string;
|
|
8
|
-
databasePath: string;
|
|
9
|
-
configPath: string;
|
|
10
|
-
opencodePath: string;
|
|
11
|
-
home: string;
|
|
12
|
-
pm2Home: string;
|
|
13
|
-
managementLockPath: string;
|
|
14
|
-
}
|
|
15
|
-
interface GatewayDiagnostic {
|
|
16
|
-
pm2Installed: boolean;
|
|
17
|
-
processFound: boolean;
|
|
18
|
-
status: string | null;
|
|
19
|
-
pid: number | null;
|
|
20
|
-
ready: boolean;
|
|
21
|
-
runningVersion: string | null;
|
|
22
|
-
gatewayEntry: string | null;
|
|
23
|
-
gatewayPackageVersion: string | null;
|
|
24
|
-
logRotationInstalled: boolean;
|
|
25
|
-
startupConfigured: boolean | null;
|
|
26
|
-
currentScope: RuntimeScope;
|
|
27
|
-
gatewayScope: RuntimeScope | null;
|
|
28
|
-
scopeMatches: boolean;
|
|
29
|
-
gatewayOpenCode: OpenCodeRuntimeDiagnostic | null;
|
|
30
|
-
}
|
|
31
|
-
interface OpenCodeRuntimeDiagnostic {
|
|
32
|
-
ok: boolean;
|
|
7
|
+
interface RunCommandMetadata {
|
|
33
8
|
executable: string;
|
|
34
|
-
|
|
35
|
-
|
|
9
|
+
args: string[];
|
|
10
|
+
cwd: string;
|
|
36
11
|
}
|
|
37
|
-
|
|
38
|
-
declare function setDashboardRuntimeConfig(config: GatewayConfig | null): void;
|
|
39
|
-
declare function resolveDashboardConfigState(runtimeAvailable: boolean, restartRequired: boolean, managedRestart: boolean): 'foreground' | 'applied' | 'pending' | 'manual';
|
|
40
|
-
declare function isSafeDashboardRestartTarget(diagnostic: GatewayDiagnostic, currentPid: number): boolean;
|
|
41
12
|
interface RunCommandPresentation {
|
|
42
13
|
cwd: string;
|
|
43
14
|
command: string;
|
|
44
15
|
}
|
|
16
|
+
interface RunToolCall {
|
|
17
|
+
id: string | null;
|
|
18
|
+
tool: string;
|
|
19
|
+
status: string;
|
|
20
|
+
inputSummary: string | null;
|
|
21
|
+
error: string | null;
|
|
22
|
+
durationMs: number | null;
|
|
23
|
+
}
|
|
24
|
+
interface RunTokenUsage {
|
|
25
|
+
input: number;
|
|
26
|
+
output: number;
|
|
27
|
+
reasoning: number;
|
|
28
|
+
cacheRead: number;
|
|
29
|
+
cacheWrite: number;
|
|
30
|
+
total: number;
|
|
31
|
+
}
|
|
45
32
|
interface RunLogPresentation {
|
|
46
33
|
command: RunCommandPresentation | null;
|
|
47
34
|
text: string;
|
|
48
35
|
errors: string[];
|
|
49
36
|
tools: string[];
|
|
37
|
+
toolCalls: RunToolCall[];
|
|
38
|
+
steps: number;
|
|
39
|
+
tokens: RunTokenUsage | null;
|
|
40
|
+
cost: number | null;
|
|
41
|
+
finishReason: string | null;
|
|
50
42
|
}
|
|
43
|
+
declare function sessionCommand(value: string, context: {
|
|
44
|
+
executable: string;
|
|
45
|
+
cwd: string | null;
|
|
46
|
+
}): string;
|
|
47
|
+
declare function findRunCommandMetadata(log: string | null): RunCommandMetadata | null;
|
|
51
48
|
declare function presentRunLog(log: string, includeErrors?: boolean): RunLogPresentation;
|
|
49
|
+
|
|
50
|
+
declare function setDashboardRuntimeConfig(config: GatewayConfig | null): void;
|
|
51
|
+
declare function resolveDashboardConfigState(runtimeAvailable: boolean, restartRequired: boolean, managedRestart: boolean): 'foreground' | 'applied' | 'pending' | 'manual';
|
|
52
|
+
declare function isSafeDashboardRestartTarget(diagnostic: GatewayDiagnostic, currentPid: number): boolean;
|
|
52
53
|
declare const dashboardApp: Hono<hono_types.BlankEnv, hono_types.BlankSchema, "/">;
|
|
53
54
|
declare const _default: {
|
|
54
55
|
hostname: string;
|
|
55
56
|
port: number;
|
|
57
|
+
idleTimeout: number;
|
|
56
58
|
fetch: (request: Request, Env?: unknown, executionCtx?: hono.ExecutionContext) => Response | Promise<Response>;
|
|
57
59
|
};
|
|
58
60
|
|
|
59
|
-
export { dashboardApp, _default as default, isSafeDashboardRestartTarget, presentRunLog, resolveDashboardConfigState, setDashboardRuntimeConfig };
|
|
61
|
+
export { dashboardApp, _default as default, findRunCommandMetadata, isSafeDashboardRestartTarget, presentRunLog, resolveDashboardConfigState, sessionCommand, setDashboardRuntimeConfig };
|