stop-wasting-tokens 2.0.0 → 2.0.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/cli.mjs +1 -1
- package/dist/dashboard-server.mjs +23 -6
- package/dist/dashboard-server.mjs.map +1 -1
- package/package.json +3 -3
- package/packages/dashboard/dist/client/assets/index-DAL4Jc7i.js +4 -0
- package/packages/dashboard/dist/client/assets/index-DAL4Jc7i.js.map +1 -0
- package/packages/dashboard/dist/client/assets/index-lQwAwyAT.css +1 -0
- package/packages/dashboard/dist/client/index.html +2 -2
- package/packages/dashboard/dist/client/assets/index-BHSZo5BV.js +0 -4
- package/packages/dashboard/dist/client/assets/index-BHSZo5BV.js.map +0 -1
- package/packages/dashboard/dist/client/assets/index-DDkqUGHY.css +0 -1
package/dist/cli.mjs
CHANGED
|
@@ -35868,7 +35868,7 @@ async function pickPort(opts) {
|
|
|
35868
35868
|
|
|
35869
35869
|
// packages/cli/src/commands/version.ts
|
|
35870
35870
|
init_esm_shims();
|
|
35871
|
-
var CURRENT_VERSION = "2.0.
|
|
35871
|
+
var CURRENT_VERSION = "2.0.1" ;
|
|
35872
35872
|
function versionHandler(version = CURRENT_VERSION) {
|
|
35873
35873
|
return (_parsed, io) => {
|
|
35874
35874
|
io.stdout.write(`swt ${version}
|
|
@@ -40700,7 +40700,16 @@ var VibeStartBodySchema = external_exports.object({
|
|
|
40700
40700
|
});
|
|
40701
40701
|
external_exports.object({
|
|
40702
40702
|
session_id: external_exports.string().min(1),
|
|
40703
|
-
state: external_exports.enum(["idle", "running", "awaiting-reply", "completed", "failed", "expired"])
|
|
40703
|
+
state: external_exports.enum(["idle", "running", "awaiting-reply", "completed", "failed", "expired"]),
|
|
40704
|
+
/**
|
|
40705
|
+
* Whether the daemon has an agent backend configured. When `'none'`, the
|
|
40706
|
+
* session was created but no agent will run — the caller saw idle-state
|
|
40707
|
+
* and should surface a setup hint to the user. v2.0 ships with codex
|
|
40708
|
+
* agents gated behind `SWT_VIBE_AGENT=codex` opt-in, so the default
|
|
40709
|
+
* behavior of `swt dashboard` returns `'none'` until the env var is set.
|
|
40710
|
+
* Optional for back-compat with v2.0.0 daemons that don't emit it.
|
|
40711
|
+
*/
|
|
40712
|
+
agent_backend: external_exports.enum(["none", "codex", "scripted"]).optional()
|
|
40704
40713
|
});
|
|
40705
40714
|
var VibeReplyBodySchema = external_exports.object({
|
|
40706
40715
|
prompt_id: external_exports.string().min(1),
|
|
@@ -41756,7 +41765,8 @@ async function runMethodologyLoop(opts) {
|
|
|
41756
41765
|
|
|
41757
41766
|
// packages/dashboard/src/server/routes/vibe.ts
|
|
41758
41767
|
function registerVibeRoutes(app, opts) {
|
|
41759
|
-
const { registry, project_root, agentFactory, bus } = opts;
|
|
41768
|
+
const { registry, project_root, agentFactory, bus, agentBackendTag } = opts;
|
|
41769
|
+
const resolvedBackendTag = agentBackendTag ?? (agentFactory !== void 0 ? "scripted" : "none");
|
|
41760
41770
|
app.post("/api/vibe", async (c) => {
|
|
41761
41771
|
const raw3 = await c.req.json().catch(() => null);
|
|
41762
41772
|
const parsed = VibeStartBodySchema.safeParse(raw3);
|
|
@@ -41781,7 +41791,8 @@ function registerVibeRoutes(app, opts) {
|
|
|
41781
41791
|
}
|
|
41782
41792
|
const response = {
|
|
41783
41793
|
session_id: session.id,
|
|
41784
|
-
state: session.state
|
|
41794
|
+
state: session.state,
|
|
41795
|
+
agent_backend: resolvedBackendTag
|
|
41785
41796
|
};
|
|
41786
41797
|
return c.json(response);
|
|
41787
41798
|
});
|
|
@@ -42794,7 +42805,8 @@ function createApp(opts = {}) {
|
|
|
42794
42805
|
registerVibeRoutes(app, {
|
|
42795
42806
|
registry: vibeRegistry,
|
|
42796
42807
|
project_root: projectRoot ?? cwd,
|
|
42797
|
-
...opts.agentFactory !== void 0 ? { agentFactory: opts.agentFactory, bus } : {}
|
|
42808
|
+
...opts.agentFactory !== void 0 ? { agentFactory: opts.agentFactory, bus } : {},
|
|
42809
|
+
...opts.agentBackendTag !== void 0 ? { agentBackendTag: opts.agentBackendTag } : {}
|
|
42798
42810
|
});
|
|
42799
42811
|
registerSpaRoutes(app);
|
|
42800
42812
|
return { app, bus, snapshotter, projectRoot, vibeRegistry };
|
|
@@ -42851,15 +42863,20 @@ async function createServer(options2 = {}) {
|
|
|
42851
42863
|
}
|
|
42852
42864
|
}
|
|
42853
42865
|
let resolvedAgentFactory = options2.agentFactory;
|
|
42854
|
-
|
|
42866
|
+
let resolvedBackendTag = "none";
|
|
42867
|
+
if (resolvedAgentFactory !== void 0) {
|
|
42868
|
+
resolvedBackendTag = "scripted";
|
|
42869
|
+
} else if (process.env["SWT_VIBE_AGENT"] === "codex") {
|
|
42855
42870
|
resolvedAgentFactory = ({ project_root }) => new CodexMethodologyAgent({
|
|
42856
42871
|
cwd: project_root
|
|
42857
42872
|
});
|
|
42873
|
+
resolvedBackendTag = "codex";
|
|
42858
42874
|
}
|
|
42859
42875
|
const { app, bus, snapshotter, vibeRegistry } = createApp({
|
|
42860
42876
|
startedAt,
|
|
42861
42877
|
...projectRoot && !options2.skipSnapshotter ? { projectRoot } : {},
|
|
42862
|
-
...resolvedAgentFactory !== void 0 ? { agentFactory: resolvedAgentFactory } : {}
|
|
42878
|
+
...resolvedAgentFactory !== void 0 ? { agentFactory: resolvedAgentFactory } : {},
|
|
42879
|
+
agentBackendTag: resolvedBackendTag
|
|
42863
42880
|
});
|
|
42864
42881
|
const server = await new Promise((resolve4) => {
|
|
42865
42882
|
const s = serve({ fetch: app.fetch, hostname, port }, () => resolve4(s));
|