@flowdesk/opencode-plugin 0.1.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/dist/bootstrap-cli.d.ts +16 -0
- package/dist/bootstrap-cli.d.ts.map +1 -0
- package/dist/bootstrap-cli.js +171 -0
- package/dist/bootstrap-cli.js.map +1 -0
- package/dist/bootstrap-installer.d.ts +51 -0
- package/dist/bootstrap-installer.d.ts.map +1 -0
- package/dist/bootstrap-installer.js +458 -0
- package/dist/bootstrap-installer.js.map +1 -0
- package/dist/command-handlers.d.ts +36 -0
- package/dist/command-handlers.d.ts.map +1 -0
- package/dist/command-handlers.js +296 -0
- package/dist/command-handlers.js.map +1 -0
- package/dist/commands.d.ts +74 -0
- package/dist/commands.d.ts.map +1 -0
- package/dist/commands.js +302 -0
- package/dist/commands.js.map +1 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +25 -0
- package/dist/index.js.map +1 -0
- package/dist/local-adapter.d.ts +65 -0
- package/dist/local-adapter.d.ts.map +1 -0
- package/dist/local-adapter.js +611 -0
- package/dist/local-adapter.js.map +1 -0
- package/dist/managed-dispatch-adapter.d.ts +145 -0
- package/dist/managed-dispatch-adapter.d.ts.map +1 -0
- package/dist/managed-dispatch-adapter.js +220 -0
- package/dist/managed-dispatch-adapter.js.map +1 -0
- package/dist/server.d.ts +28 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +465 -0
- package/dist/server.js.map +1 -0
- package/dist/tool-stubs.d.ts +107 -0
- package/dist/tool-stubs.d.ts.map +1 -0
- package/dist/tool-stubs.js +329 -0
- package/dist/tool-stubs.js.map +1 -0
- package/package.json +54 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
export interface FlowDeskRelease1BootstrapCliStreams {
|
|
3
|
+
stdout: (message: string) => void;
|
|
4
|
+
stderr: (message: string) => void;
|
|
5
|
+
}
|
|
6
|
+
export interface FlowDeskRelease1BootstrapCliOptions {
|
|
7
|
+
argv: readonly string[];
|
|
8
|
+
env?: Readonly<Record<string, string | undefined>>;
|
|
9
|
+
now?: Date;
|
|
10
|
+
streams?: FlowDeskRelease1BootstrapCliStreams;
|
|
11
|
+
}
|
|
12
|
+
export interface FlowDeskRelease1BootstrapCliResult {
|
|
13
|
+
exitCode: 0 | 1 | 2;
|
|
14
|
+
}
|
|
15
|
+
export declare function runFlowDeskRelease1BootstrapCli(options: FlowDeskRelease1BootstrapCliOptions): FlowDeskRelease1BootstrapCliResult;
|
|
16
|
+
//# sourceMappingURL=bootstrap-cli.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bootstrap-cli.d.ts","sourceRoot":"","sources":["../src/bootstrap-cli.ts"],"names":[],"mappings":";AAUA,MAAM,WAAW,mCAAmC;IAClD,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED,MAAM,WAAW,mCAAmC;IAClD,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACxB,GAAG,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC;IACnD,GAAG,CAAC,EAAE,IAAI,CAAC;IACX,OAAO,CAAC,EAAE,mCAAmC,CAAC;CAC/C;AAED,MAAM,WAAW,kCAAkC;IACjD,QAAQ,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;CACrB;AAuGD,wBAAgB,+BAA+B,CAAC,OAAO,EAAE,mCAAmC,GAAG,kCAAkC,CAgFhI"}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { resolve } from "node:path";
|
|
3
|
+
import { pathToFileURL } from "node:url";
|
|
4
|
+
import { expectedFlowDeskRelease1BootstrapApprovalPhrase, flowDeskBootstrapProfileRootRef, installFlowDeskRelease1Bootstrap, prepareFlowDeskRelease1BootstrapTypedConfirmation } from "./bootstrap-installer.js";
|
|
5
|
+
const defaultStreams = {
|
|
6
|
+
stdout: (message) => process.stdout.write(message),
|
|
7
|
+
stderr: (message) => process.stderr.write(message)
|
|
8
|
+
};
|
|
9
|
+
function usage() {
|
|
10
|
+
return [
|
|
11
|
+
"Usage: flowdesk-install-release1 --profile-root <dir> --durable-root <dir> --target-profile <ref> --confirmation <ref> --expires-at <iso> --approve <exact phrase>",
|
|
12
|
+
"",
|
|
13
|
+
"Release 1 installs portable /flowdesk-* command files and redacted bootstrap artifacts only.",
|
|
14
|
+
"It does not launch lanes, call providers, enable dispatch, or grant fallback/hard-chat authority.",
|
|
15
|
+
"",
|
|
16
|
+
"To preview the required approval phrase, omit --approve. No files are written until --approve exactly matches the displayed phrase."
|
|
17
|
+
].join("\n");
|
|
18
|
+
}
|
|
19
|
+
function parseArgs(argv) {
|
|
20
|
+
const parsed = { help: false };
|
|
21
|
+
const errors = [];
|
|
22
|
+
for (let index = 0; index < argv.length; index += 1) {
|
|
23
|
+
const arg = argv[index];
|
|
24
|
+
if (arg === "--help" || arg === "-h") {
|
|
25
|
+
parsed.help = true;
|
|
26
|
+
continue;
|
|
27
|
+
}
|
|
28
|
+
const next = argv[index + 1];
|
|
29
|
+
const requireValue = (name) => {
|
|
30
|
+
if (next === undefined || next.startsWith("--")) {
|
|
31
|
+
errors.push(`${name} requires a value`);
|
|
32
|
+
return undefined;
|
|
33
|
+
}
|
|
34
|
+
index += 1;
|
|
35
|
+
return next;
|
|
36
|
+
};
|
|
37
|
+
switch (arg) {
|
|
38
|
+
case "--profile-root":
|
|
39
|
+
case "--profile-root-dir":
|
|
40
|
+
parsed.profileRootDir = requireValue(arg);
|
|
41
|
+
break;
|
|
42
|
+
case "--durable-root":
|
|
43
|
+
case "--durable-state-root":
|
|
44
|
+
case "--durable-state-root-dir":
|
|
45
|
+
parsed.durableStateRootDir = requireValue(arg);
|
|
46
|
+
break;
|
|
47
|
+
case "--target-profile":
|
|
48
|
+
case "--target-profile-ref":
|
|
49
|
+
parsed.targetProfileRef = requireValue(arg);
|
|
50
|
+
break;
|
|
51
|
+
case "--confirmation":
|
|
52
|
+
case "--confirmation-ref":
|
|
53
|
+
parsed.confirmationRef = requireValue(arg);
|
|
54
|
+
break;
|
|
55
|
+
case "--expires-at":
|
|
56
|
+
parsed.expiresAt = requireValue(arg);
|
|
57
|
+
break;
|
|
58
|
+
case "--approve":
|
|
59
|
+
parsed.approve = requireValue(arg);
|
|
60
|
+
break;
|
|
61
|
+
default:
|
|
62
|
+
errors.push(`unknown argument: ${arg}`);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return { parsed, errors };
|
|
66
|
+
}
|
|
67
|
+
function envDefault(env, names) {
|
|
68
|
+
for (const name of names) {
|
|
69
|
+
const value = env[name];
|
|
70
|
+
if (typeof value === "string" && value.trim().length > 0)
|
|
71
|
+
return value;
|
|
72
|
+
}
|
|
73
|
+
return undefined;
|
|
74
|
+
}
|
|
75
|
+
function defaultExpiresAt(now) {
|
|
76
|
+
return new Date(now.getTime() + 10 * 60 * 1000).toISOString();
|
|
77
|
+
}
|
|
78
|
+
function completeArgs(parsed, env, now) {
|
|
79
|
+
const profileRootDir = parsed.profileRootDir ?? envDefault(env, ["FLOWDESK_PROFILE_ROOT", "OPENCODE_CONFIG_DIR", "XDG_CONFIG_HOME"]);
|
|
80
|
+
const durableStateRootDir = parsed.durableStateRootDir ?? envDefault(env, ["FLOWDESK_DURABLE_STATE_ROOT", "FLOWDESK_PROFILE_ROOT", "OPENCODE_CONFIG_DIR", "XDG_CONFIG_HOME"]);
|
|
81
|
+
return {
|
|
82
|
+
help: false,
|
|
83
|
+
profileRootDir: profileRootDir ?? "",
|
|
84
|
+
durableStateRootDir: durableStateRootDir ?? "",
|
|
85
|
+
targetProfileRef: parsed.targetProfileRef ?? "profile-release1",
|
|
86
|
+
confirmationRef: parsed.confirmationRef ?? `confirmation-release1-${now.getTime().toString(36)}`,
|
|
87
|
+
expiresAt: parsed.expiresAt ?? defaultExpiresAt(now),
|
|
88
|
+
approve: parsed.approve ?? ""
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
export function runFlowDeskRelease1BootstrapCli(options) {
|
|
92
|
+
const streams = options.streams ?? defaultStreams;
|
|
93
|
+
const env = options.env ?? process.env;
|
|
94
|
+
const now = options.now ?? new Date();
|
|
95
|
+
const { parsed, errors } = parseArgs(options.argv);
|
|
96
|
+
if (parsed?.help) {
|
|
97
|
+
streams.stdout(`${usage()}\n`);
|
|
98
|
+
return { exitCode: 0 };
|
|
99
|
+
}
|
|
100
|
+
if (errors.length > 0 || parsed === undefined) {
|
|
101
|
+
streams.stderr(`${errors.join("\n")}\n\n${usage()}\n`);
|
|
102
|
+
return { exitCode: 2 };
|
|
103
|
+
}
|
|
104
|
+
const args = completeArgs(parsed, env, now);
|
|
105
|
+
const missing = [
|
|
106
|
+
["profile root", args.profileRootDir],
|
|
107
|
+
["durable state root", args.durableStateRootDir],
|
|
108
|
+
["target profile ref", args.targetProfileRef],
|
|
109
|
+
["confirmation ref", args.confirmationRef],
|
|
110
|
+
["expiry timestamp", args.expiresAt]
|
|
111
|
+
].flatMap(([label, value]) => value.length === 0 ? [label] : []);
|
|
112
|
+
if (missing.length > 0) {
|
|
113
|
+
streams.stderr(`missing required values: ${missing.join(", ")}\n\n${usage()}\n`);
|
|
114
|
+
return { exitCode: 2 };
|
|
115
|
+
}
|
|
116
|
+
const profileRootDir = resolve(args.profileRootDir);
|
|
117
|
+
const durableStateRootDir = resolve(args.durableStateRootDir);
|
|
118
|
+
const requiredPhrase = expectedFlowDeskRelease1BootstrapApprovalPhrase(profileRootDir, args.targetProfileRef, args.confirmationRef);
|
|
119
|
+
if (args.approve !== requiredPhrase) {
|
|
120
|
+
streams.stdout(`${[
|
|
121
|
+
"FlowDesk Release 1 bootstrap installer is ready.",
|
|
122
|
+
`Profile root: ${profileRootDir}`,
|
|
123
|
+
`Durable state root: ${durableStateRootDir}`,
|
|
124
|
+
`Target profile: ${args.targetProfileRef}`,
|
|
125
|
+
`Profile root ref: ${flowDeskBootstrapProfileRootRef(profileRootDir)}`,
|
|
126
|
+
`Confirmation ref: ${args.confirmationRef}`,
|
|
127
|
+
`Expires at: ${args.expiresAt}`,
|
|
128
|
+
"",
|
|
129
|
+
"No files were written.",
|
|
130
|
+
"Re-run with this exact approval phrase:",
|
|
131
|
+
requiredPhrase,
|
|
132
|
+
"",
|
|
133
|
+
"Release 1 bootstrap remains portable-command-only: non-dispatch registration metadata does not grant provider calls or runtime dispatch."
|
|
134
|
+
].join("\n")}\n`);
|
|
135
|
+
return { exitCode: 2 };
|
|
136
|
+
}
|
|
137
|
+
const result = installFlowDeskRelease1Bootstrap({
|
|
138
|
+
profileRootDir,
|
|
139
|
+
durableStateRootDir,
|
|
140
|
+
targetProfileRef: args.targetProfileRef,
|
|
141
|
+
typedConfirmation: prepareFlowDeskRelease1BootstrapTypedConfirmation({
|
|
142
|
+
profileRootDir,
|
|
143
|
+
targetProfileRef: args.targetProfileRef,
|
|
144
|
+
confirmationRef: args.confirmationRef,
|
|
145
|
+
expiresAt: args.expiresAt,
|
|
146
|
+
typedPhrase: args.approve
|
|
147
|
+
}),
|
|
148
|
+
now
|
|
149
|
+
});
|
|
150
|
+
if (!result.ok) {
|
|
151
|
+
streams.stderr(`FlowDesk Release 1 bootstrap install failed:\n${result.errors.join("\n")}\n`);
|
|
152
|
+
return { exitCode: 1 };
|
|
153
|
+
}
|
|
154
|
+
streams.stdout(`${[
|
|
155
|
+
"FlowDesk Release 1 bootstrap install complete.",
|
|
156
|
+
`Profile root: ${result.profileRootDir ?? profileRootDir}`,
|
|
157
|
+
`Durable state root: ${result.durableStateRootDir ?? durableStateRootDir}`,
|
|
158
|
+
`Command files written: ${result.commandFilesWritten}`,
|
|
159
|
+
`Bootstrap artifacts written: ${result.bootstrapArtifactsWritten}`,
|
|
160
|
+
`Doctor handoff ref: ${result.doctorHandoffRef ?? "unknown"}`,
|
|
161
|
+
"Safe next actions: /flowdesk-doctor, /flowdesk-status",
|
|
162
|
+
"Production registration: release1 non-dispatch command-backed only",
|
|
163
|
+
"Provider/runtime dispatch: disabled"
|
|
164
|
+
].join("\n")}\n`);
|
|
165
|
+
return { exitCode: 0 };
|
|
166
|
+
}
|
|
167
|
+
if (process.argv[1] !== undefined && import.meta.url === pathToFileURL(process.argv[1]).href) {
|
|
168
|
+
const result = runFlowDeskRelease1BootstrapCli({ argv: process.argv.slice(2) });
|
|
169
|
+
process.exitCode = result.exitCode;
|
|
170
|
+
}
|
|
171
|
+
//# sourceMappingURL=bootstrap-cli.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bootstrap-cli.js","sourceRoot":"","sources":["../src/bootstrap-cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EACL,+CAA+C,EAC/C,+BAA+B,EAC/B,gCAAgC,EAChC,iDAAiD,EAClD,MAAM,0BAA0B,CAAC;AA4BlC,MAAM,cAAc,GAAwC;IAC1D,MAAM,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC;IAClD,MAAM,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC;CACnD,CAAC;AAEF,SAAS,KAAK;IACZ,OAAO;QACL,oKAAoK;QACpK,EAAE;QACF,8FAA8F;QAC9F,mGAAmG;QACnG,EAAE;QACF,qIAAqI;KACtI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC;AAED,SAAS,SAAS,CAAC,IAAuB;IACxC,MAAM,MAAM,GAAsB,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC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AC,KAAK,SAAS,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,KAAK,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC7F,MAAM,MAAM,GAAG,+BAA+B,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAChF,OAAO,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AACrC,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { type ValidationResult } from "@flowdesk/core";
|
|
2
|
+
import { type FlowDeskPortableCommandMaterializationResultV1 } from "./commands.js";
|
|
3
|
+
export interface FlowDeskRelease1BootstrapTypedConfirmationV1 {
|
|
4
|
+
confirmationRef: string;
|
|
5
|
+
targetProfileRef: string;
|
|
6
|
+
profileRootRef: string;
|
|
7
|
+
installPlanRef: string;
|
|
8
|
+
rollbackPlanRef: string;
|
|
9
|
+
expiresAt: string;
|
|
10
|
+
actorClass: "user";
|
|
11
|
+
typedPhrase: string;
|
|
12
|
+
}
|
|
13
|
+
export interface FlowDeskRelease1BootstrapInstallRequestV1 {
|
|
14
|
+
profileRootDir: string;
|
|
15
|
+
durableStateRootDir: string;
|
|
16
|
+
targetProfileRef: string;
|
|
17
|
+
typedConfirmation: FlowDeskRelease1BootstrapTypedConfirmationV1;
|
|
18
|
+
now?: Date;
|
|
19
|
+
}
|
|
20
|
+
export interface FlowDeskRelease1BootstrapInstallResultV1 extends ValidationResult {
|
|
21
|
+
profileRootDir?: string;
|
|
22
|
+
durableStateRootDir?: string;
|
|
23
|
+
commandMaterialization?: FlowDeskPortableCommandMaterializationResultV1;
|
|
24
|
+
bootstrapArtifactRefs?: string[];
|
|
25
|
+
bootstrapArtifactsWritten: number;
|
|
26
|
+
commandFilesWritten: number;
|
|
27
|
+
aliasFilesWritten: 0;
|
|
28
|
+
doctorHandoffRef?: string;
|
|
29
|
+
productionRegistrationEligible: false;
|
|
30
|
+
commandAliasEligible: false;
|
|
31
|
+
dispatchApprovalEligible: false;
|
|
32
|
+
realOpenCodeDispatch: false;
|
|
33
|
+
actualLaneLaunch: false;
|
|
34
|
+
providerCall: false;
|
|
35
|
+
runtimeExecution: false;
|
|
36
|
+
fallbackAuthority: false;
|
|
37
|
+
hardCancelOrNoReplyAuthority: false;
|
|
38
|
+
rollbackCommandRefs?: string[];
|
|
39
|
+
}
|
|
40
|
+
export interface FlowDeskRelease1BootstrapTypedConfirmationInputV1 {
|
|
41
|
+
profileRootDir: string;
|
|
42
|
+
targetProfileRef: string;
|
|
43
|
+
confirmationRef: string;
|
|
44
|
+
expiresAt: string;
|
|
45
|
+
typedPhrase: string;
|
|
46
|
+
}
|
|
47
|
+
export declare function expectedFlowDeskRelease1BootstrapApprovalPhrase(profileRootDir: string, targetProfileRef: string, confirmationRef: string): string;
|
|
48
|
+
export declare function prepareFlowDeskRelease1BootstrapTypedConfirmation(input: FlowDeskRelease1BootstrapTypedConfirmationInputV1): FlowDeskRelease1BootstrapTypedConfirmationV1;
|
|
49
|
+
export declare function flowDeskBootstrapProfileRootRef(profileRootDir: string): string;
|
|
50
|
+
export declare function installFlowDeskRelease1Bootstrap(request: FlowDeskRelease1BootstrapInstallRequestV1): FlowDeskRelease1BootstrapInstallResultV1;
|
|
51
|
+
//# sourceMappingURL=bootstrap-installer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bootstrap-installer.d.ts","sourceRoot":"","sources":["../src/bootstrap-installer.ts"],"names":[],"mappings":"AAGA,OAAO,EAQL,KAAK,gBAAgB,EAGtB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,KAAK,8CAA8C,EAA2C,MAAM,eAAe,CAAC;AAE7H,MAAM,WAAW,4CAA4C;IAC3D,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,MAAM,CA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