@stigmer/cli 3.23.1-dev.20260923075205 → 3.25.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/commands/bootstrap.d.ts.map +1 -1
- package/commands/bootstrap.js +16 -57
- package/commands/bootstrap.js.map +1 -1
- package/commands/config/context.d.ts.map +1 -1
- package/commands/config/context.js +41 -5
- package/commands/config/context.js.map +1 -1
- package/commands/up.js +1 -1
- package/commands/up.js.map +1 -1
- package/config/index.d.ts +1 -1
- package/config/index.d.ts.map +1 -1
- package/config/index.js +1 -1
- package/config/index.js.map +1 -1
- package/config/resolve.d.ts +8 -0
- package/config/resolve.d.ts.map +1 -1
- package/config/resolve.js +8 -8
- package/config/resolve.js.map +1 -1
- package/local/bootstrap.d.ts +9 -29
- package/local/bootstrap.d.ts.map +1 -1
- package/local/bootstrap.js +61 -69
- package/local/bootstrap.js.map +1 -1
- package/local/daemon/launch.d.ts +2 -2
- package/local/daemon/launch.d.ts.map +1 -1
- package/marketplace/official.d.ts.map +1 -1
- package/marketplace/official.js +6 -5
- package/marketplace/official.js.map +1 -1
- package/marketplace/render.d.ts.map +1 -1
- package/marketplace/render.js +0 -3
- package/marketplace/render.js.map +1 -1
- package/package.json +7 -7
- package/src/client/client.test.ts +8 -8
- package/src/commands/bootstrap.test.ts +19 -75
- package/src/commands/bootstrap.ts +19 -68
- package/src/commands/config/context.test.ts +171 -0
- package/src/commands/config/context.ts +50 -5
- package/src/commands/marketplace.test.ts +2 -2
- package/src/commands/up.ts +1 -1
- package/src/config/index.ts +1 -0
- package/src/config/resolve.test.ts +2 -2
- package/src/config/resolve.ts +8 -8
- package/src/local/bootstrap.test.ts +132 -65
- package/src/local/bootstrap.ts +64 -139
- package/src/local/daemon/launch.ts +2 -2
- package/src/marketplace/official.ts +6 -5
- package/src/marketplace/read.test.ts +2 -3
- package/src/marketplace/render.ts +0 -3
- package/local/plugins/defaults.d.ts +0 -55
- package/local/plugins/defaults.d.ts.map +0 -1
- package/local/plugins/defaults.js +0 -111
- package/local/plugins/defaults.js.map +0 -1
- package/local/system-org.d.ts +0 -15
- package/local/system-org.d.ts.map +0 -1
- package/local/system-org.js +0 -57
- package/local/system-org.js.map +0 -1
- package/src/local/plugins/defaults.test.ts +0 -271
- package/src/local/plugins/defaults.ts +0 -179
- package/src/local/system-org.test.ts +0 -124
- package/src/local/system-org.ts +0 -63
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootstrap.d.ts","sourceRoot":"","sources":["../../src/commands/bootstrap.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bootstrap.d.ts","sourceRoot":"","sources":["../../src/commands/bootstrap.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKzC,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAQxD"}
|
package/commands/bootstrap.js
CHANGED
|
@@ -1,75 +1,34 @@
|
|
|
1
|
-
// `stigmer bootstrap` — make the configured backend
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
//
|
|
1
|
+
// `stigmer bootstrap` — make the configured backend ready for the CLI: the
|
|
2
|
+
// organization it falls back to when none is named (`stigmer`) exists.
|
|
3
|
+
// `stigmer up` does this for the local stack on its own; this verb is for a
|
|
4
|
+
// raw self-hosted server behind docker-compose or Helm, and runs the very
|
|
5
|
+
// same act (local/bootstrap.ts), so "ready" has one meaning everywhere. A
|
|
6
|
+
// team that created its organization in the console points the CLI at that
|
|
7
|
+
// one instead (`stigmer config context set --org`) and needs no bootstrap.
|
|
8
8
|
//
|
|
9
|
-
// Flagless on purpose
|
|
10
|
-
//
|
|
11
|
-
//
|
|
12
|
-
|
|
13
|
-
// without that power.
|
|
14
|
-
//
|
|
15
|
-
// Exit is non-zero when any default failed to land, after the outcomes are
|
|
16
|
-
// rendered, so a lane's run is red for the right reason and a human reads
|
|
17
|
-
// what did and did not install. Heavy modules load lazily inside the action
|
|
18
|
-
// so `--help` stays fast.
|
|
19
|
-
import { ensureAuthenticated } from "../config/index.js";
|
|
20
|
-
import { CliExitError } from "../errors/cli-exit-error.js";
|
|
21
|
-
import { ExitCode } from "../errors/exit-codes.js";
|
|
9
|
+
// Flagless on purpose: the act is idempotent, so there is nothing to force;
|
|
10
|
+
// a second run changes nothing and says so. It never deletes anything.
|
|
11
|
+
// Heavy modules load lazily inside the action so `--help` stays fast.
|
|
12
|
+
import { DEFAULT_LOCAL_ORG, ensureAuthenticated } from "../config/index.js";
|
|
22
13
|
import { CommandResult, renderResult } from "../output/index.js";
|
|
23
14
|
import { addResultFlags, resultFormat } from "./shared.js";
|
|
24
15
|
export function registerBootstrap(program) {
|
|
25
16
|
const bootstrap = program
|
|
26
17
|
.command("bootstrap")
|
|
27
|
-
.description("make the configured backend ready: ensure the
|
|
18
|
+
.description("make the configured backend ready: ensure the organization the CLI uses when none is named")
|
|
28
19
|
.action((options) => runBootstrapCommand(options));
|
|
29
20
|
addResultFlags(bootstrap);
|
|
30
21
|
}
|
|
31
22
|
async function runBootstrapCommand(flags) {
|
|
32
|
-
const [{ connectBackend }, { bootstrapBackend }
|
|
23
|
+
const [{ connectBackend }, { bootstrapBackend }] = await Promise.all([
|
|
33
24
|
import("../backend.js"),
|
|
34
25
|
import("../local/bootstrap.js"),
|
|
35
|
-
import("../local/system-org.js"),
|
|
36
26
|
]);
|
|
37
27
|
const client = connectBackend();
|
|
38
28
|
ensureAuthenticated(client.config);
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
const result = await bootstrapBackend(client.stigmer, say);
|
|
43
|
-
const failed = result.plugins.failed;
|
|
44
|
-
const out = failed.length === 0
|
|
45
|
-
? CommandResult.success("Backend is ready")
|
|
46
|
-
: CommandResult.warning(`Backend bootstrapped with ${failed.length} default plugin${failed.length === 1 ? "" : "s"} not installed`);
|
|
47
|
-
out
|
|
48
|
-
.addSection("System organization")
|
|
49
|
-
.field("Slug", SYSTEM_ORG)
|
|
50
|
-
.field("State", result.org);
|
|
51
|
-
const plugins = out.addSection("Default plugins");
|
|
52
|
-
for (const outcome of result.plugins.outcomes) {
|
|
53
|
-
switch (outcome.action) {
|
|
54
|
-
case "installed":
|
|
55
|
-
case "up-to-date":
|
|
56
|
-
plugins.field(outcome.name, outcome.action);
|
|
57
|
-
break;
|
|
58
|
-
case "failed":
|
|
59
|
-
plugins.field(outcome.name, `failed: ${outcome.error}`);
|
|
60
|
-
break;
|
|
61
|
-
default: {
|
|
62
|
-
const exhaustive = outcome;
|
|
63
|
-
throw new Error(`unhandled outcome ${String(exhaustive)}`);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
if (failed.length > 0) {
|
|
68
|
-
out.hint("Fix the cause named above and run 'stigmer bootstrap' again.");
|
|
69
|
-
}
|
|
29
|
+
const state = await bootstrapBackend(client.stigmer);
|
|
30
|
+
const out = CommandResult.success("Backend is ready");
|
|
31
|
+
out.addSection("Organization").field("Slug", DEFAULT_LOCAL_ORG).field("State", state);
|
|
70
32
|
renderResult(out, resultFormat(flags));
|
|
71
|
-
if (failed.length > 0) {
|
|
72
|
-
throw new CliExitError(`default plugin${failed.length === 1 ? "" : "s"} not installed: ${failed.join(", ")}`, ExitCode.General);
|
|
73
|
-
}
|
|
74
33
|
}
|
|
75
34
|
//# sourceMappingURL=bootstrap.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../../src/commands/bootstrap.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../../src/commands/bootstrap.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,uEAAuE;AACvE,4EAA4E;AAC5E,0EAA0E;AAC1E,0EAA0E;AAC1E,2EAA2E;AAC3E,2EAA2E;AAC3E,EAAE;AACF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","sourceRoot":"","sources":["../../../src/commands/config/context.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/commands/config/context.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMzC,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAezD"}
|
|
@@ -1,8 +1,16 @@
|
|
|
1
|
-
// `stigmer config context show` —
|
|
1
|
+
// `stigmer config context show|set` — the active CLI context: the
|
|
2
|
+
// organization every command targets when neither `--org` nor
|
|
3
|
+
// STIGMER_ORG_ID names one.
|
|
2
4
|
//
|
|
3
|
-
// `
|
|
4
|
-
//
|
|
5
|
-
|
|
5
|
+
// `set --org <slug>` checks the slug against the active backend before it
|
|
6
|
+
// persists: the organization must be one the caller belongs to there
|
|
7
|
+
// (findMyOrganizations), so a typo or a stranger's slug is refused at the
|
|
8
|
+
// moment it is typed, not on the next command. An empty slug clears the
|
|
9
|
+
// context without asking the backend, and the resolver falls back to its
|
|
10
|
+
// default again. The raw `config set context.organization` stays the
|
|
11
|
+
// unchecked escape hatch.
|
|
12
|
+
import { activeBackendName, ensureAuthenticated, load, resolveContextOrganization, save } from "../../config/index.js";
|
|
13
|
+
import { CliExitError, ExitCode, UsageError } from "../../errors/index.js";
|
|
6
14
|
import { CommandResult, renderResult } from "../../output/index.js";
|
|
7
15
|
import { addResultFlags, resultFormat } from "../shared.js";
|
|
8
16
|
export function addContextCommands(context) {
|
|
@@ -13,11 +21,39 @@ export function addContextCommands(context) {
|
|
|
13
21
|
renderResult(buildShow(load()), resultFormat(options));
|
|
14
22
|
});
|
|
15
23
|
addResultFlags(show);
|
|
24
|
+
const set = context
|
|
25
|
+
.command("set")
|
|
26
|
+
.description("set the active context's organization, checked against the backend")
|
|
27
|
+
.option("--org <slug>", "an organization you belong to on the active backend (empty clears it)")
|
|
28
|
+
.action((options) => runSet(options));
|
|
29
|
+
addResultFlags(set);
|
|
16
30
|
}
|
|
17
31
|
function buildShow(config) {
|
|
18
32
|
const organization = resolveContextOrganization(config) || "(not set)";
|
|
19
33
|
const result = CommandResult.success("CLI context");
|
|
20
|
-
result.addSection("").field("Organization", organization).field("Backend", config
|
|
34
|
+
result.addSection("").field("Organization", organization).field("Backend", activeBackendName(config));
|
|
21
35
|
return result;
|
|
22
36
|
}
|
|
37
|
+
async function runSet(flags) {
|
|
38
|
+
const org = flags.org;
|
|
39
|
+
if (org === undefined) {
|
|
40
|
+
throw new UsageError("--org is required\n\nSet it with:\n stigmer config context set --org <org>\nClear it with:\n stigmer config context set --org \"\"");
|
|
41
|
+
}
|
|
42
|
+
const config = load();
|
|
43
|
+
if (org !== "")
|
|
44
|
+
await assertMembership(config, org);
|
|
45
|
+
(config.context ??= {}).organization = org;
|
|
46
|
+
save(config);
|
|
47
|
+
const message = org === "" ? "Context organization cleared" : `Context organization set to '${org}'`;
|
|
48
|
+
renderResult(CommandResult.success(message), resultFormat(flags));
|
|
49
|
+
}
|
|
50
|
+
async function assertMembership(config, org) {
|
|
51
|
+
const { connectBackend } = await import("../../backend.js");
|
|
52
|
+
const client = connectBackend(config);
|
|
53
|
+
ensureAuthenticated(client.config);
|
|
54
|
+
const mine = await client.stigmer.organization.findMyOrganizations();
|
|
55
|
+
if (mine.entries.some((entry) => entry.metadata?.slug === org))
|
|
56
|
+
return;
|
|
57
|
+
throw new CliExitError(`organization '${org}' is not one you belong to on the '${activeBackendName(config)}' backend`, ExitCode.NotFound, ["See the organizations you belong to with: stigmer list organizations"]);
|
|
58
|
+
}
|
|
23
59
|
//# sourceMappingURL=context.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../src/commands/config/context.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,EAAE;AACF,
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../src/commands/config/context.ts"],"names":[],"mappings":"AAA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AAK,CAAC,QAAQ,EAAE,IAAI,KAAK,GAAG,CAAC;QAAE,OAAO;IACvE,MAAM,IAAI,YAAY,CACpB,iBAAiB,GAAG,sCAAsC,iBAAiB,CAAC,MAAM,CAAC,WAAW,EAC9F,QAAQ,CAAC,QAAQ,EACjB,CAAC,sEAAsE,CAAC,CACzE,CAAC;AACJ,CAAC"}
|
package/commands/up.js
CHANGED
|
@@ -46,7 +46,7 @@ async function runUp(run, flags) {
|
|
|
46
46
|
await renderUpCard(run, flags);
|
|
47
47
|
return;
|
|
48
48
|
}
|
|
49
|
-
// The card renders when the stack is serving and
|
|
49
|
+
// The card renders when the stack is serving and bootstrapped — the moment the
|
|
50
50
|
// detached shape would have returned — and the process then stays up,
|
|
51
51
|
// mirroring the server's and runner's output, until a shutdown signal.
|
|
52
52
|
const code = await launch.upForeground(run, homedir(), {
|
package/commands/up.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"up.js","sourceRoot":"","sources":["../../src/commands/up.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,2EAA2E;AAC3E,6EAA6E;AAC7E,0BAA0B;AAC1B,EAAE;AACF,+EAA+E;AAC/E,6EAA6E;AAC7E,gCAAgC;AAEhC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAoB,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACnF,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAc3D,wEAAwE;AACxE,oEAAoE;AACpE,oEAAoE;AACpE,MAAM,WAAW,GAAG,kCAAkC,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AM,CAAC,gCAAgC,CAAC,CAAC;IAC3E,MAAM,MAAM,GAAG,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,EAAE,iBAAiB,CAAC,CAAC,CAAC;IAC5E,OAAO,MAAM,EAAE,UAAU,CAAC,aAAa,CAAC,EAAE,KAAK,KAAK,SAAS,CAAC;AAChE,CAAC"}
|
package/config/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { type BackendConfig, type BackendType, type CloudBackendConfig, type Config, type ContextConfig, type MarketplaceEntryConfig, type NamedBackendConfig, type NamedBackendType, CLOUD_BACKEND_NAME, LOCAL_BACKEND_NAME, activeBackend, activeBackendName, getDefault, isCloudMode, load, save, } from "./config.js";
|
|
2
|
-
export { DEFAULT_CLOUD_CONSOLE_URL, ensureAuthenticated, resolveConsoleURL, resolveContextOrganization, resolveEndpoint, resolveOrganization, resolveToken, } from "./resolve.js";
|
|
2
|
+
export { DEFAULT_CLOUD_CONSOLE_URL, DEFAULT_LOCAL_ORG, ensureAuthenticated, resolveConsoleURL, resolveContextOrganization, resolveEndpoint, resolveOrganization, resolveToken, } from "./resolve.js";
|
|
3
3
|
export { configDir, configPath, dataDir } from "./paths.js";
|
|
4
4
|
export { configKeyNames, getConfigValue, setConfigValue } from "./keys.js";
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
package/config/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACvB,KAAK,MAAM,EACX,KAAK,aAAa,EAClB,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,kBAAkB,EAClB,kBAAkB,EAClB,aAAa,EACb,iBAAiB,EACjB,UAAU,EACV,WAAW,EACX,IAAI,EACJ,IAAI,GACL,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,yBAAyB,EACzB,mBAAmB,EACnB,iBAAiB,EACjB,0BAA0B,EAC1B,eAAe,EACf,mBAAmB,EACnB,YAAY,GACb,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACvB,KAAK,MAAM,EACX,KAAK,aAAa,EAClB,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,kBAAkB,EAClB,kBAAkB,EAClB,aAAa,EACb,iBAAiB,EACjB,UAAU,EACV,WAAW,EACX,IAAI,EACJ,IAAI,GACL,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,yBAAyB,EACzB,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EACjB,0BAA0B,EAC1B,eAAe,EACf,mBAAmB,EACnB,YAAY,GACb,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC"}
|
package/config/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Public surface of the CLI config module.
|
|
2
2
|
export { CLOUD_BACKEND_NAME, LOCAL_BACKEND_NAME, activeBackend, activeBackendName, getDefault, isCloudMode, load, save, } from "./config.js";
|
|
3
|
-
export { DEFAULT_CLOUD_CONSOLE_URL, ensureAuthenticated, resolveConsoleURL, resolveContextOrganization, resolveEndpoint, resolveOrganization, resolveToken, } from "./resolve.js";
|
|
3
|
+
export { DEFAULT_CLOUD_CONSOLE_URL, DEFAULT_LOCAL_ORG, ensureAuthenticated, resolveConsoleURL, resolveContextOrganization, resolveEndpoint, resolveOrganization, resolveToken, } from "./resolve.js";
|
|
4
4
|
export { configDir, configPath, dataDir } from "./paths.js";
|
|
5
5
|
export { configKeyNames, getConfigValue, setConfigValue } from "./keys.js";
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
package/config/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAE3C,OAAO,EASL,kBAAkB,EAClB,kBAAkB,EAClB,aAAa,EACb,iBAAiB,EACjB,UAAU,EACV,WAAW,EACX,IAAI,EACJ,IAAI,GACL,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,yBAAyB,EACzB,mBAAmB,EACnB,iBAAiB,EACjB,0BAA0B,EAC1B,eAAe,EACf,mBAAmB,EACnB,YAAY,GACb,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAE3C,OAAO,EASL,kBAAkB,EAClB,kBAAkB,EAClB,aAAa,EACb,iBAAiB,EACjB,UAAU,EACV,WAAW,EACX,IAAI,EACJ,IAAI,GACL,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,yBAAyB,EACzB,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EACjB,0BAA0B,EAC1B,eAAe,EACf,mBAAmB,EACnB,YAAY,GACb,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC"}
|
package/config/resolve.d.ts
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import { type Config } from "./config.js";
|
|
2
2
|
/** Well-known URL for the Stigmer Cloud web console. */
|
|
3
3
|
export declare const DEFAULT_CLOUD_CONSOLE_URL = "https://app.stigmer.ai";
|
|
4
|
+
/**
|
|
5
|
+
* The organization a local or selfhost backend falls back to when nothing
|
|
6
|
+
* names one, so bare-slug `get`/`run`/`apply` resolve without ceremony.
|
|
7
|
+
* `stigmer up` creates it on the local stack and `stigmer bootstrap` on a raw
|
|
8
|
+
* self-hosted server (local/bootstrap.ts). Cloud mode has no implicit org —
|
|
9
|
+
* the caller must select one (flag/env/context/login).
|
|
10
|
+
*/
|
|
11
|
+
export declare const DEFAULT_LOCAL_ORG = "stigmer";
|
|
4
12
|
/**
|
|
5
13
|
* Resolve the server endpoint.
|
|
6
14
|
* STIGMER_SERVER_ADDRESS (explicit override, any backend)
|
package/config/resolve.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../src/config/resolve.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../src/config/resolve.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,MAAM,EAA8B,MAAM,aAAa,CAAC;AAKtE,wDAAwD;AACxD,eAAO,MAAM,yBAAyB,2BAA2B,CAAC;AAElE;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,YAAY,CAAC;AAE3C;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAuBtD;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAUnD;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAiB5E;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,MAAM,EACd,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,MAAM,CAWR;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAQjE;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CASxD"}
|
package/config/resolve.js
CHANGED
|
@@ -7,19 +7,19 @@
|
|
|
7
7
|
// the OAuth token set, selfhost entries carry an endpoint + api_key.
|
|
8
8
|
import { CliExitError, ExitCode } from "../errors/index.js";
|
|
9
9
|
import { SERVER_PORT } from "../local/constants.js";
|
|
10
|
-
import { SYSTEM_ORG } from "../local/system-org.js";
|
|
11
10
|
import { activeBackend, isCloudMode } from "./config.js";
|
|
12
11
|
const DEFAULT_CLOUD_ENDPOINT = "api.stigmer.ai:443";
|
|
13
12
|
const DEFAULT_LOCAL_ENDPOINT = "localhost:7234";
|
|
14
13
|
/** Well-known URL for the Stigmer Cloud web console. */
|
|
15
14
|
export const DEFAULT_CLOUD_CONSOLE_URL = "https://app.stigmer.ai";
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
/**
|
|
16
|
+
* The organization a local or selfhost backend falls back to when nothing
|
|
17
|
+
* names one, so bare-slug `get`/`run`/`apply` resolve without ceremony.
|
|
18
|
+
* `stigmer up` creates it on the local stack and `stigmer bootstrap` on a raw
|
|
19
|
+
* self-hosted server (local/bootstrap.ts). Cloud mode has no implicit org —
|
|
20
|
+
* the caller must select one (flag/env/context/login).
|
|
21
|
+
*/
|
|
22
|
+
export const DEFAULT_LOCAL_ORG = "stigmer";
|
|
23
23
|
/**
|
|
24
24
|
* Resolve the server endpoint.
|
|
25
25
|
* STIGMER_SERVER_ADDRESS (explicit override, any backend)
|
package/config/resolve.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve.js","sourceRoot":"","sources":["../../src/config/resolve.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,6EAA6E;AAC7E,+EAA+E;AAC/E,EAAE;AACF,wEAAwE;AACxE,4EAA4E;AAC5E,qEAAqE;AAErE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,
|
|
1
|
+
{"version":3,"file":"resolve.js","sourceRoot":"","sources":["../../src/config/resolve.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,6EAA6E;AAC7E,+EAA+E;AAC/E,EAAE;AACF,wEAAwE;AACxE,4EAA4E;AAC5E,qEAAqE;AAErE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAe,aAAa,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEtE,MAAM,sBAAsB,GAAG,oBAAoB,CAAC;AACpD,MAAM,sBAAsB,GAAG,gBAAgB,CAAC;AAEhD,wDAAwD;AACxD,MAAM,CAAC,MAAM,yBAAyB,GAAG,wBAAwB,CAAC;AAElE;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,SAAS,CAAC;AAE3C;;;;;;;;;GASG;AACH,MAAM,UAAU,eAAe,CAAC,MAAc;IAC5C,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC;IACpD,IAAI,QAAQ,KAAK,SAAS,IAAI,QAAQ,KAAK,EAAE,EAAE,CAAC;QAC9C,OAAO,QAAQ,CAA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AAU,0BAA0B,CAAC,MAAc;IACvD,IACE,MAAM,CAAC,OAAO,EAAE,YAAY,KAAK,SAAS;QAC1C,MAAM,CAAC,OAAO,CAAC,YAAY,KAAK,EAAE,EAClC,CAAC;QACD,OAAO,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC;IACrC,CAAC;IACD,OAAO,aAAa,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,MAAM,IAAI,EAAE,CAAC;AACnD,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,mBAAmB,CAAC,MAAc;IAChD,MAAM,EAAE,KAAK,EAAE,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;IACxC,IAAI,KAAK,EAAE,IAAI,KAAK,OAAO;QAAE,OAAO;IACpC,IAAI,OAAO,CAAC,GAAG,CAAC,eAAe;QAAE,OAAO;IACxC,IAAI,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,aAAa;QAAE,OAAO;IAC/C,MAAM,IAAI,YAAY,CAAC,mBAAmB,EAAE,QAAQ,CAAC,IAAI,EAAE;QACzD,iBAAiB;QACjB,sBAAsB;KACvB,CAAC,CAAC;AACL,CAAC"}
|
package/local/bootstrap.d.ts
CHANGED
|
@@ -1,39 +1,19 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Stigmer } from "@stigmer/sdk";
|
|
2
2
|
import type { BackendClient } from "../client/index.js";
|
|
3
|
-
import type { ResolveOfficialOptions } from "../marketplace/official.js";
|
|
4
|
-
import type { DefaultPluginsResult, InstallingVerb, PreparedDefault } from "./plugins/defaults.js";
|
|
5
|
-
import { type EnsureSystemOrgOutcome } from "./system-org.js";
|
|
6
3
|
export type Say = (line: string) => void;
|
|
7
|
-
|
|
8
|
-
export interface PreparedBootstrap {
|
|
9
|
-
readonly defaults: readonly PreparedDefault[];
|
|
10
|
-
}
|
|
11
|
-
export interface BootstrapResult {
|
|
12
|
-
readonly org: EnsureSystemOrgOutcome;
|
|
13
|
-
readonly plugins: DefaultPluginsResult;
|
|
14
|
-
}
|
|
15
|
-
export interface PrepareBootstrapOptions {
|
|
16
|
-
/** How the official tree is found (injectable for tests). */
|
|
17
|
-
readonly official?: ResolveOfficialOptions;
|
|
18
|
-
}
|
|
19
|
-
/** Phase 1. Throws when the catalogue cannot be resolved or a default cannot be prepared. */
|
|
20
|
-
export declare function prepareBootstrap(options?: PrepareBootstrapOptions): Promise<PreparedBootstrap>;
|
|
4
|
+
export type BootstrapOutcome = "present" | "created";
|
|
21
5
|
/**
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* installed plugin's version message.
|
|
6
|
+
* Make sure the organization the CLI falls back to exists on the backend
|
|
7
|
+
* `stigmer` is bound to: what `stigmer bootstrap` runs. Idempotent; a lost
|
|
8
|
+
* create race counts as `present`.
|
|
26
9
|
*/
|
|
27
|
-
export declare function
|
|
28
|
-
/**
|
|
29
|
-
export declare function bootstrapBackend(stigmer: Stigmer, say: Say, options?: PrepareBootstrapOptions): Promise<BootstrapResult>;
|
|
30
|
-
/** Seams of the local bootstrap, injectable for tests; the defaults are the real phases over the real local client. */
|
|
10
|
+
export declare function bootstrapBackend(stigmer: Stigmer): Promise<BootstrapOutcome>;
|
|
11
|
+
/** Seams of the local bootstrap, injectable for tests; the defaults are the real act over the real local client. */
|
|
31
12
|
export interface BootstrapDeps {
|
|
32
13
|
readonly client?: BackendClient;
|
|
33
14
|
readonly say?: Say;
|
|
34
|
-
readonly
|
|
35
|
-
readonly run?: (stigmer: Stigmer, prepared: PreparedBootstrap, say: Say) => Promise<BootstrapResult>;
|
|
15
|
+
readonly bootstrap?: (stigmer: Stigmer) => Promise<BootstrapOutcome>;
|
|
36
16
|
}
|
|
37
|
-
/** What `stigmer up` does once the local server answers. Never throws past its own
|
|
17
|
+
/** What `stigmer up` does once the local server answers. Never throws past its own warning. */
|
|
38
18
|
export declare function bootstrapLocalBackend(deps?: BootstrapDeps): Promise<void>;
|
|
39
19
|
//# sourceMappingURL=bootstrap.d.ts.map
|
package/local/bootstrap.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootstrap.d.ts","sourceRoot":"","sources":["../../src/local/bootstrap.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bootstrap.d.ts","sourceRoot":"","sources":["../../src/local/bootstrap.ts"],"names":[],"mappings":"AA+BA,OAAO,EAAE,KAAK,OAAO,EAAgB,MAAM,cAAc,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAIxD,MAAM,MAAM,GAAG,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;AAEzC,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,SAAS,CAAC;AAErD;;;;GAIG;AACH,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAsBlF;AAED,oHAAoH;AACpH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,MAAM,CAAC,EAAE,aAAa,CAAC;IAChC,QAAQ,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC;IACnB,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,gBAAgB,CAAC,CAAC;CACtE;AAMD,+FAA+F;AAC/F,wBAAsB,qBAAqB,CAAC,IAAI,GAAE,aAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAcnF"}
|
package/local/bootstrap.js
CHANGED
|
@@ -1,92 +1,84 @@
|
|
|
1
|
-
// What makes a backend
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
// cannot drift in
|
|
1
|
+
// What makes a backend ready for the CLI: the organization it falls back to
|
|
2
|
+
// on a local or selfhost backend (DEFAULT_LOCAL_ORG, `stigmer`) exists.
|
|
3
|
+
// Nothing is installed into it: a session with no agent runs the built-in
|
|
4
|
+
// assistant, so a fresh install needs no default content. `stigmer up` runs
|
|
5
|
+
// this against the local server it just started; `stigmer bootstrap` runs it
|
|
6
|
+
// against whatever backend the CLI is pointed at, a raw self-hosted server.
|
|
7
|
+
// One definition, so a laptop, a container and a raw server cannot drift in
|
|
8
|
+
// what "ready" means.
|
|
8
9
|
//
|
|
9
|
-
//
|
|
10
|
+
// "Ensure" is find-then-create with the race closed by the server: two
|
|
11
|
+
// launchers racing the same check see one `already-exists`, and that IS the
|
|
12
|
+
// desired end state, so it is reported as `present`, never rethrown. Any
|
|
13
|
+
// other refusal propagates with the server's sentence; the caller decides
|
|
14
|
+
// how loud to be.
|
|
10
15
|
//
|
|
11
|
-
//
|
|
12
|
-
//
|
|
13
|
-
//
|
|
14
|
-
//
|
|
15
|
-
//
|
|
16
|
-
// push adopts a system-content row it replaces in place (a default
|
|
17
|
-
// agent an earlier release seeded keeps its id, its instances and every
|
|
18
|
-
// conversation bound to them), so nothing here ever deletes a row.
|
|
16
|
+
// The create carries no label. Writing a label in the reserved `stigmer.ai/`
|
|
17
|
+
// namespace needs a platform permission that a self-hosted server with
|
|
18
|
+
// authentication on grants to nobody, and nothing reads one on an
|
|
19
|
+
// organization (stigmer/stigmer#1192). Organizations created by older CLIs
|
|
20
|
+
// keep the `stigmer.ai/system` label they were given; it is inert.
|
|
19
21
|
//
|
|
20
|
-
// Inside `up`
|
|
21
|
-
// retry, because the stack is already serving
|
|
22
|
-
//
|
|
23
|
-
//
|
|
24
|
-
//
|
|
25
|
-
//
|
|
26
|
-
//
|
|
27
|
-
//
|
|
22
|
+
// Inside `up` the bootstrap is best-effort with one warning naming the
|
|
23
|
+
// retry, because the stack is already serving and a failure here must never
|
|
24
|
+
// tear it down. Both `up` shapes (detached and foreground) call the same
|
|
25
|
+
// function, and both target the local server `up` just started, never the
|
|
26
|
+
// active backend context: a CLI pointed at a remote backend still gets its
|
|
27
|
+
// local stack bootstrapped and never creates an organization elsewhere. The
|
|
28
|
+
// client is pinned to a fresh local config (localhost:SERVER_PORT) with no
|
|
29
|
+
// auth, the trusted-local identity.
|
|
30
|
+
import { ManagementMode } from "@stigmer/protos/ai/stigmer/tenancy/organization/v1/enum_pb";
|
|
31
|
+
import { StigmerError } from "@stigmer/sdk";
|
|
32
|
+
import { DEFAULT_LOCAL_ORG } from "../config/resolve.js";
|
|
28
33
|
import { log } from "../logger.js";
|
|
29
|
-
import { SYSTEM_ORG } from "./system-org.js";
|
|
30
|
-
/** Phase 1. Throws when the catalogue cannot be resolved or a default cannot be prepared. */
|
|
31
|
-
export async function prepareBootstrap(options = {}) {
|
|
32
|
-
const { prepareDefaultPlugins } = await import("./plugins/defaults.js");
|
|
33
|
-
return { defaults: await prepareDefaultPlugins(options.official) };
|
|
34
|
-
}
|
|
35
34
|
/**
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
* installed plugin's version message.
|
|
35
|
+
* Make sure the organization the CLI falls back to exists on the backend
|
|
36
|
+
* `stigmer` is bound to: what `stigmer bootstrap` runs. Idempotent; a lost
|
|
37
|
+
* create race counts as `present`.
|
|
40
38
|
*/
|
|
41
|
-
export async function
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
39
|
+
export async function bootstrapBackend(stigmer) {
|
|
40
|
+
const mine = await stigmer.organization.findMyOrganizations();
|
|
41
|
+
if (mine.entries.some((org) => org.metadata?.slug === DEFAULT_LOCAL_ORG)) {
|
|
42
|
+
return "present";
|
|
43
|
+
}
|
|
44
|
+
try {
|
|
45
|
+
// Organizations are self-owning: the org field is the slug itself, the
|
|
46
|
+
// shape the console's create form and the e2e harness both use.
|
|
47
|
+
await stigmer.organization.create({
|
|
48
|
+
name: "Stigmer",
|
|
49
|
+
slug: DEFAULT_LOCAL_ORG,
|
|
50
|
+
org: DEFAULT_LOCAL_ORG,
|
|
51
|
+
description: "The organization the Stigmer CLI uses when none is named",
|
|
52
|
+
managementMode: ManagementMode.self_managed,
|
|
53
|
+
});
|
|
54
|
+
return "created";
|
|
55
|
+
}
|
|
56
|
+
catch (error) {
|
|
57
|
+
if (error instanceof StigmerError && error.code === "already-exists") {
|
|
58
|
+
return "present";
|
|
59
|
+
}
|
|
60
|
+
throw error;
|
|
61
|
+
}
|
|
52
62
|
}
|
|
53
63
|
const sayToStderr = (line) => {
|
|
54
64
|
process.stderr.write(`${line}\n`);
|
|
55
65
|
};
|
|
56
|
-
/** What `stigmer up` does once the local server answers. Never throws past its own
|
|
66
|
+
/** What `stigmer up` does once the local server answers. Never throws past its own warning. */
|
|
57
67
|
export async function bootstrapLocalBackend(deps = {}) {
|
|
58
68
|
const client = deps.client ?? (await freshLocalClient());
|
|
59
69
|
const say = deps.say ?? sayToStderr;
|
|
60
|
-
let
|
|
61
|
-
try {
|
|
62
|
-
prepared = await (deps.prepare ?? prepareBootstrap)();
|
|
63
|
-
}
|
|
64
|
-
catch (err) {
|
|
65
|
-
log.warn("bootstrap preparation failed", { error: String(err) });
|
|
66
|
-
say("Warning: could not prepare the default plugins, so the local backend was not bootstrapped. Run 'stigmer up' again to retry.");
|
|
67
|
-
return;
|
|
68
|
-
}
|
|
69
|
-
let result;
|
|
70
|
+
let outcome;
|
|
70
71
|
try {
|
|
71
|
-
|
|
72
|
+
outcome = await (deps.bootstrap ?? bootstrapBackend)(client.stigmer);
|
|
72
73
|
}
|
|
73
74
|
catch (err) {
|
|
74
75
|
log.warn("bootstrap failed", { error: String(err) });
|
|
75
76
|
say("Warning: failed to bootstrap the local backend. Run 'stigmer up' again to retry.");
|
|
76
77
|
return;
|
|
77
78
|
}
|
|
78
|
-
log.debug("bootstrap complete", {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
});
|
|
82
|
-
for (const name of result.plugins.failed) {
|
|
83
|
-
say(`Warning: failed to install default plugin '${name}'. Run 'stigmer bootstrap' to retry.`);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
// Phase 2 in the seam's shape, naming the verb: everything this file's
|
|
87
|
-
// local bootstrap installs was installed by `stigmer up`.
|
|
88
|
-
function runLocalBootstrap(stigmer, prepared, say) {
|
|
89
|
-
return runBootstrap(stigmer, prepared, say, "stigmer up");
|
|
79
|
+
log.debug("bootstrap complete", { org: outcome });
|
|
80
|
+
if (outcome === "created")
|
|
81
|
+
say(`Created the '${DEFAULT_LOCAL_ORG}' organization`);
|
|
90
82
|
}
|
|
91
83
|
async function freshLocalClient() {
|
|
92
84
|
const [{ createBackendClient }, { getDefault }] = await Promise.all([
|
package/local/bootstrap.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../../src/local/bootstrap.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../../src/local/bootstrap.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,wEAAwE;AACxE,0EAA0E;AAC1E,4EAA4E;AAC5E,6EAA6E;AAC7E,4EAA4E;AAC5E,4EAA4E;AAC5E,sBAAsB;AACtB,EAAE;AACF,uEAAuE;AACvE,4EAA4E;AAC5E,yEAAyE;AACzE,0EAA0E;AAC1E,kBAAkB;AAClB,EAAE;AACF,6EAA6E;AAC7E,uEAAuE;AACvE,kEAAkE;AAClE,2EAA2E;AAC3E,mEAAmE;AACnE,EAAE;AACF,uEAAuE;AACvE,4EAA4E;AAC5E,yEAAyE;AACzE,0EAA0E;AAC1E,2EAA2E;AAC3E,4EAA4E;AAC5E,2EAA2E;AAC3E,oCAAoC;AAEpC,OAAO,EAAE,cAAc,EAAE,MAAM,4DAA4D,CAAC;AAC5F,OAAO,EAAgB,YAAY,EAAE,MAAM,cAAc,CAAC;AAE1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAMnC;;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,SAAS,IAAI,gBAAgB,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IACvE,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,GAAG,CAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACrD,GAAG,CAAC,kFAAkF,CAAC,CAAC;QACxF,OAAO;IACT,CAAC;IACD,GAAG,CAAC,KAAK,CAAC,oBAAoB,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC;IAClD,IAAI,OAAO,KAAK,SAAS;QAAE,GAAG,CAAC,gBAAgB,iBAAiB,gBAAgB,CAAC,CAAC;AACpF,CAAC;AAED,KAAK,UAAU,gBAAgB;IAC7B,MAAM,CAAC,EAAE,mBAAmB,EAAE,EAAE,EAAE,UAAU,EAAE,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QAClE,MAAM,CAAC,oBAAoB,CAAC;QAC5B,MAAM,CAAC,qBAAqB,CAAC;KAC9B,CAAC,CAAC;IACH,OAAO,mBAAmB,CAAC;QACzB,MAAM,EAAE,UAAU,EAAE;QACpB,cAAc,EAAE,GAAG,EAAE,CAAC,IAAI;KAC3B,CAAC,CAAC;AACL,CAAC"}
|
package/local/daemon/launch.d.ts
CHANGED
|
@@ -12,11 +12,11 @@ export interface UpForegroundDeps {
|
|
|
12
12
|
runDaemon?: (deps: InternalDaemonDeps) => Promise<number>;
|
|
13
13
|
/** Resolves when the stack should shut down (default: the first SIGTERM/SIGINT). */
|
|
14
14
|
waitForShutdown?: () => Promise<void>;
|
|
15
|
-
/** Post-readiness bootstrap (default: `bootstrapLocalBackend
|
|
15
|
+
/** Post-readiness bootstrap (default: `bootstrapLocalBackend`, which ensures the `stigmer` org). */
|
|
16
16
|
bootstrap?: () => Promise<void>;
|
|
17
17
|
/** Receives each line the server and runner write (default: a `[component]`-prefixed stdout mirror). */
|
|
18
18
|
mirror?: OutputMirror;
|
|
19
|
-
/** Invoked once the stack is serving and
|
|
19
|
+
/** Invoked once the stack is serving and bootstrapped — the moment a detached `up` would have returned. */
|
|
20
20
|
onReady?: () => void | Promise<void>;
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"launch.d.ts","sourceRoot":"","sources":["../../../src/local/daemon/launch.ts"],"names":[],"mappings":"AAkCA,OAAO,EAAmB,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;AAC/D,OAAO,EAAE,KAAK,kBAAkB,EAA4C,MAAM,cAAc,CAAC;AAUjG,MAAM,WAAW,SAAS;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAUD,8EAA8E;AAC9E,wBAAsB,EAAE,CAAC,OAAO,GAAE,SAAc,EAAE,IAAI,GAAE,MAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAkBzF;AAED,8DAA8D;AAC9D,MAAM,WAAW,gBAAgB;IAC/B,+CAA+C;IAC/C,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,kBAAkB,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAC1D,oFAAoF;IACpF,eAAe,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACtC,
|
|
1
|
+
{"version":3,"file":"launch.d.ts","sourceRoot":"","sources":["../../../src/local/daemon/launch.ts"],"names":[],"mappings":"AAkCA,OAAO,EAAmB,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;AAC/D,OAAO,EAAE,KAAK,kBAAkB,EAA4C,MAAM,cAAc,CAAC;AAUjG,MAAM,WAAW,SAAS;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAUD,8EAA8E;AAC9E,wBAAsB,EAAE,CAAC,OAAO,GAAE,SAAc,EAAE,IAAI,GAAE,MAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAkBzF;AAED,8DAA8D;AAC9D,MAAM,WAAW,gBAAgB;IAC/B,+CAA+C;IAC/C,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,kBAAkB,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAC1D,oFAAoF;IACpF,eAAe,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACtC,oGAAoG;IACpG,SAAS,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAChC,wGAAwG;IACxG,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,2GAA2G;IAC3G,OAAO,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACtC;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,YAAY,CAChC,OAAO,GAAE,SAAc,EACvB,IAAI,GAAE,MAAkB,EACxB,IAAI,GAAE,gBAAqB,GAC1B,OAAO,CAAC,MAAM,CAAC,CAgBjB;AAyDD,kEAAkE;AAClE,wBAAsB,IAAI,CAAC,IAAI,GAAE,MAAkB,GAAG,OAAO,CAAC,OAAO,CAAC,CAiCrE;AAED,qFAAqF;AACrF,wBAAsB,SAAS,CAAC,IAAI,GAAE,MAAkB,GAAG,OAAO,CAAC,OAAO,CAAC,CAQ1E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"official.d.ts","sourceRoot":"","sources":["../../src/marketplace/official.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"official.d.ts","sourceRoot":"","sources":["../../src/marketplace/official.ts"],"names":[],"mappings":"AA8BA,OAAO,EAIL,KAAK,UAAU,EAChB,MAAM,sCAAsC,CAAC;AAQ9C,MAAM,WAAW,sBAAsB;IACrC,iEAAiE;IACjE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,iDAAiD;IACjD,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;CACrC;AAED,MAAM,WAAW,sBAAsB;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,sFAAsF;IACtF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,yDAAyD;IACzD,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB,yFAAyF;IACzF,OAAO,CAAC,EAAE,MAAM,MAAM,GAAG,IAAI,CAAC;CAC/B;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CACxC,IAAI,GAAE,sBAA2B,GAChC,sBAAsB,CAIxB;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CACxC,IAAI,GAAE,sBAA2B,GAChC,MAAM,CAiCR"}
|