@codeagentswarm/cas-cloud 0.0.15 → 0.0.16
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/antigravity-mcp-launcher.js +59 -25
- package/dist/cas-preview.js +5 -3
- package/dist/cas.js +690 -415
- package/dist/mcp-stdio-server.js +56 -23
- package/dist/templates/antigravity-md-titles-section.md +3 -3
- package/dist/templates/codex-md-titles-section.md +3 -3
- package/dist/templates/grok-md-titles-section.md +16 -19
- package/dist/templates/kimi-md-titles-section.md +11 -12
- package/dist/templates/opencode-md-titles-section.md +3 -3
- package/package.json +1 -1
- package/scripts/cas-cli-smoke.sh +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
2
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
3
4
|
var __commonJS = (cb, mod) => function __require() {
|
|
4
5
|
try {
|
|
@@ -8,9 +9,9 @@ var __commonJS = (cb, mod) => function __require() {
|
|
|
8
9
|
}
|
|
9
10
|
};
|
|
10
11
|
|
|
11
|
-
// src/infrastructure/terminal/sandbox-project-request-store.js
|
|
12
|
+
// ../../src/infrastructure/terminal/sandbox-project-request-store.js
|
|
12
13
|
var require_sandbox_project_request_store = __commonJS({
|
|
13
|
-
"src/infrastructure/terminal/sandbox-project-request-store.js"(exports2, module2) {
|
|
14
|
+
"../../src/infrastructure/terminal/sandbox-project-request-store.js"(exports2, module2) {
|
|
14
15
|
"use strict";
|
|
15
16
|
var crypto2 = require("crypto");
|
|
16
17
|
var fs2 = require("fs");
|
|
@@ -83,9 +84,10 @@ var require_sandbox_project_request_store = __commonJS({
|
|
|
83
84
|
}
|
|
84
85
|
});
|
|
85
86
|
|
|
86
|
-
// src/infrastructure/platform/platform-config.js
|
|
87
|
+
// ../../src/infrastructure/platform/platform-config.js
|
|
87
88
|
var require_platform_config = __commonJS({
|
|
88
|
-
"src/infrastructure/platform/platform-config.js"(exports2, module2) {
|
|
89
|
+
"../../src/infrastructure/platform/platform-config.js"(exports2, module2) {
|
|
90
|
+
"use strict";
|
|
89
91
|
var os2 = require("os");
|
|
90
92
|
var path2 = require("path");
|
|
91
93
|
var fs2 = require("fs");
|
|
@@ -395,9 +397,10 @@ var require_platform_config = __commonJS({
|
|
|
395
397
|
}
|
|
396
398
|
});
|
|
397
399
|
|
|
398
|
-
// src/shared/logger/child-process-logger.js
|
|
400
|
+
// ../../src/shared/logger/child-process-logger.js
|
|
399
401
|
var require_child_process_logger = __commonJS({
|
|
400
|
-
"src/shared/logger/child-process-logger.js"(exports2, module2) {
|
|
402
|
+
"../../src/shared/logger/child-process-logger.js"(exports2, module2) {
|
|
403
|
+
"use strict";
|
|
401
404
|
var EventEmitter = require("events");
|
|
402
405
|
var ChildProcessLogger = class extends EventEmitter {
|
|
403
406
|
constructor(sourceName) {
|
|
@@ -484,9 +487,10 @@ var require_child_process_logger = __commonJS({
|
|
|
484
487
|
}
|
|
485
488
|
});
|
|
486
489
|
|
|
487
|
-
// src/infrastructure/platform/platform-utils.js
|
|
490
|
+
// ../../src/infrastructure/platform/platform-utils.js
|
|
488
491
|
var require_platform_utils = __commonJS({
|
|
489
|
-
"src/infrastructure/platform/platform-utils.js"(exports2, module2) {
|
|
492
|
+
"../../src/infrastructure/platform/platform-utils.js"(exports2, module2) {
|
|
493
|
+
"use strict";
|
|
490
494
|
var { execSync } = require("child_process");
|
|
491
495
|
var os2 = require("os");
|
|
492
496
|
var crypto2 = require("crypto");
|
|
@@ -810,9 +814,10 @@ var require_platform_utils = __commonJS({
|
|
|
810
814
|
}
|
|
811
815
|
});
|
|
812
816
|
|
|
813
|
-
// src/infrastructure/database/improved-similarity-algorithm.js
|
|
817
|
+
// ../../src/infrastructure/database/improved-similarity-algorithm.js
|
|
814
818
|
var require_improved_similarity_algorithm = __commonJS({
|
|
815
|
-
"src/infrastructure/database/improved-similarity-algorithm.js"(exports2, module2) {
|
|
819
|
+
"../../src/infrastructure/database/improved-similarity-algorithm.js"(exports2, module2) {
|
|
820
|
+
"use strict";
|
|
816
821
|
var ImprovedSimilarityCalculator = class {
|
|
817
822
|
constructor() {
|
|
818
823
|
this.synonymGroups = [
|
|
@@ -1054,9 +1059,10 @@ var require_improved_similarity_algorithm = __commonJS({
|
|
|
1054
1059
|
}
|
|
1055
1060
|
});
|
|
1056
1061
|
|
|
1057
|
-
// src/infrastructure/database/database-mcp-standalone.js
|
|
1062
|
+
// ../../src/infrastructure/database/database-mcp-standalone.js
|
|
1058
1063
|
var require_database_mcp_standalone = __commonJS({
|
|
1059
|
-
"src/infrastructure/database/database-mcp-standalone.js"(exports2, module2) {
|
|
1064
|
+
"../../src/infrastructure/database/database-mcp-standalone.js"(exports2, module2) {
|
|
1065
|
+
"use strict";
|
|
1060
1066
|
var path2 = require("path");
|
|
1061
1067
|
var fs2 = require("fs");
|
|
1062
1068
|
var os2 = require("os");
|
|
@@ -2911,9 +2917,9 @@ ${sql}`);
|
|
|
2911
2917
|
}
|
|
2912
2918
|
});
|
|
2913
2919
|
|
|
2914
|
-
// src/shared/utils/worktree-project-resolver.js
|
|
2920
|
+
// ../../src/shared/utils/worktree-project-resolver.js
|
|
2915
2921
|
var require_worktree_project_resolver = __commonJS({
|
|
2916
|
-
"src/shared/utils/worktree-project-resolver.js"(exports2, module2) {
|
|
2922
|
+
"../../src/shared/utils/worktree-project-resolver.js"(exports2, module2) {
|
|
2917
2923
|
"use strict";
|
|
2918
2924
|
function resolveProjectDir(directory, worktreeRows) {
|
|
2919
2925
|
if (!directory) return directory;
|
|
@@ -2952,9 +2958,10 @@ var require_worktree_project_resolver = __commonJS({
|
|
|
2952
2958
|
}
|
|
2953
2959
|
});
|
|
2954
2960
|
|
|
2955
|
-
// src/infrastructure/mcp/mcp-stdio-server.js
|
|
2961
|
+
// ../../src/infrastructure/mcp/mcp-stdio-server.js
|
|
2956
2962
|
var require_mcp_stdio_server = __commonJS({
|
|
2957
|
-
"src/infrastructure/mcp/mcp-stdio-server.js"(exports2, module2) {
|
|
2963
|
+
"../../src/infrastructure/mcp/mcp-stdio-server.js"(exports2, module2) {
|
|
2964
|
+
"use strict";
|
|
2958
2965
|
var { inspect } = require("util");
|
|
2959
2966
|
var writeProtocol = process.stdout.write.bind(process.stdout);
|
|
2960
2967
|
var _toStderr = (...args) => process.stderr.write(args.map((a) => typeof a === "string" ? a : inspect(a)).join(" ") + "\n");
|
|
@@ -3802,6 +3809,18 @@ var require_mcp_stdio_server = __commonJS({
|
|
|
3802
3809
|
} catch (e) {
|
|
3803
3810
|
}
|
|
3804
3811
|
}
|
|
3812
|
+
_hasNudgeMarker(kind) {
|
|
3813
|
+
try {
|
|
3814
|
+
const os3 = require("os");
|
|
3815
|
+
const fs3 = require("fs");
|
|
3816
|
+
const stateDir = path2.join(os3.homedir(), ".codeagentswarm", "terminal-nudge-state");
|
|
3817
|
+
const rawKey = process.env.CODEAGENTSWARM_TERMINAL_ID || process.env.CODEAGENTSWARM_CURRENT_QUADRANT;
|
|
3818
|
+
const key = String(rawKey || "").replace(/[^A-Za-z0-9_-]/g, "_");
|
|
3819
|
+
return !!key && fs3.existsSync(path2.join(stateDir, `${key}.${kind}`));
|
|
3820
|
+
} catch (e) {
|
|
3821
|
+
return false;
|
|
3822
|
+
}
|
|
3823
|
+
}
|
|
3805
3824
|
// Resolve the current terminal id (1-based) from the environment.
|
|
3806
3825
|
_getCurrentTerminalId() {
|
|
3807
3826
|
const terminalId = process.env.CODEAGENTSWARM_CURRENT_QUADRANT;
|
|
@@ -3820,20 +3839,30 @@ var require_mcp_stdio_server = __commonJS({
|
|
|
3820
3839
|
}
|
|
3821
3840
|
// Set the GENERAL terminal title: the sticky tab label that represents the
|
|
3822
3841
|
// product-level goal of what this terminal is working on. Set it ONCE at the
|
|
3823
|
-
// start of
|
|
3824
|
-
//
|
|
3825
|
-
//
|
|
3826
|
-
// for that.
|
|
3842
|
+
// start of the conversation. Later calls preserve it unless the caller explicitly
|
|
3843
|
+
// declares a radical topic change. It does NOT represent the current step — use
|
|
3844
|
+
// update_terminal_activity for that.
|
|
3827
3845
|
async setTerminalTitle(params) {
|
|
3828
|
-
const { title, long_title } = params;
|
|
3846
|
+
const { title, long_title, replace_existing } = params;
|
|
3829
3847
|
if (!title) {
|
|
3830
3848
|
throw new Error("title is required");
|
|
3831
3849
|
}
|
|
3832
3850
|
if (isPlaceholderTitle(title)) {
|
|
3833
3851
|
throw new Error(`"${title}" looks like example text copied from the tool documentation, not a real title. Call the tool again with a title that describes the ACTUAL feature or goal you are working on in this agent (max 6 words).`);
|
|
3834
3852
|
}
|
|
3835
|
-
|
|
3853
|
+
if (replace_existing !== void 0 && typeof replace_existing !== "boolean") {
|
|
3854
|
+
throw new Error("replace_existing must be a boolean");
|
|
3855
|
+
}
|
|
3836
3856
|
const terminalId = this._getCurrentTerminalId();
|
|
3857
|
+
if (replace_existing !== true && this._hasNudgeMarker("title")) {
|
|
3858
|
+
return {
|
|
3859
|
+
terminal_id: terminalId,
|
|
3860
|
+
updated: false,
|
|
3861
|
+
preserved: true,
|
|
3862
|
+
message: "The existing conversation title was preserved. Use update_terminal_activity for follow-up work; set replace_existing=true only after the user pivots to a completely different functionality."
|
|
3863
|
+
};
|
|
3864
|
+
}
|
|
3865
|
+
const shortTitle = this.generateShortTitle(title);
|
|
3837
3866
|
const currentTask = this._getCurrentTask(terminalId);
|
|
3838
3867
|
const taskId = currentTask ? currentTask.id : null;
|
|
3839
3868
|
let longTitle = long_title;
|
|
@@ -4731,7 +4760,7 @@ Use 'clear' to remove the status.`;
|
|
|
4731
4760
|
},
|
|
4732
4761
|
{
|
|
4733
4762
|
name: "set_terminal_title",
|
|
4734
|
-
description:
|
|
4763
|
+
description: "Set the GENERAL agent title AND the agent GOAL from the first user request that established this conversation's topic. Pass BOTH text arguments because the user sees them together. This is once per conversation, NOT once per user message, turn, task, review, validation, or resumed session. Follow-up work belongs in update_terminal_activity and repeated calls preserve the original title. Only a user pivot to a completely different functionality may replace it, by passing replace_existing=true. LANGUAGE: write both text fields in the SAME language the user is speaking.",
|
|
4735
4764
|
inputSchema: {
|
|
4736
4765
|
type: "object",
|
|
4737
4766
|
properties: {
|
|
@@ -4742,6 +4771,10 @@ Use 'clear' to remove the status.`;
|
|
|
4742
4771
|
long_title: {
|
|
4743
4772
|
type: "string",
|
|
4744
4773
|
description: `The agent GOAL: one sentence saying what this agent is FOR \u2014 the outcome the work is aiming at, not the current step. ALWAYS provide it: the user reads it in the Agent hover, labelled GOAL, under the short title. Write the real goal in the user's language. Do NOT restate the title or prefix it with "Working on:".`
|
|
4774
|
+
},
|
|
4775
|
+
replace_existing: {
|
|
4776
|
+
type: "boolean",
|
|
4777
|
+
description: "Leave false or omit for normal follow-up work. Set true ONLY when the user explicitly pivots this existing conversation to a completely different functionality; reviews, tests, fixes, implementation phases, and refinements of the original request are activities and must not replace the title."
|
|
4745
4778
|
}
|
|
4746
4779
|
},
|
|
4747
4780
|
// long_title is NOT in `required` on purpose: some agent clients
|
|
@@ -5195,7 +5228,8 @@ Use 'clear' to remove the status.`;
|
|
|
5195
5228
|
case "set_terminal_title":
|
|
5196
5229
|
result = await this.setTerminalTitle({
|
|
5197
5230
|
title: args.title,
|
|
5198
|
-
long_title: args.long_title
|
|
5231
|
+
long_title: args.long_title,
|
|
5232
|
+
replace_existing: args.replace_existing
|
|
5199
5233
|
});
|
|
5200
5234
|
break;
|
|
5201
5235
|
case "update_terminal_activity":
|
|
@@ -5557,7 +5591,7 @@ Please show me what I should work on next.`
|
|
|
5557
5591
|
}
|
|
5558
5592
|
});
|
|
5559
5593
|
|
|
5560
|
-
// src/infrastructure/mcp/antigravity-mcp-launcher.js
|
|
5594
|
+
// ../../src/infrastructure/mcp/antigravity-mcp-launcher.js
|
|
5561
5595
|
var fs = require("fs");
|
|
5562
5596
|
var os = require("os");
|
|
5563
5597
|
var path = require("path");
|
package/dist/cas-preview.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
2
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
3
4
|
var __commonJS = (cb, mod) => function __require() {
|
|
4
5
|
try {
|
|
@@ -8,9 +9,10 @@ var __commonJS = (cb, mod) => function __require() {
|
|
|
8
9
|
}
|
|
9
10
|
};
|
|
10
11
|
|
|
11
|
-
// src/infrastructure/headless/ephemeral-preview-service.js
|
|
12
|
+
// ../../src/infrastructure/headless/ephemeral-preview-service.js
|
|
12
13
|
var require_ephemeral_preview_service = __commonJS({
|
|
13
|
-
"src/infrastructure/headless/ephemeral-preview-service.js"(exports2, module2) {
|
|
14
|
+
"../../src/infrastructure/headless/ephemeral-preview-service.js"(exports2, module2) {
|
|
15
|
+
"use strict";
|
|
14
16
|
var crypto = require("crypto");
|
|
15
17
|
var fs = require("fs");
|
|
16
18
|
var http2 = require("http");
|
|
@@ -592,7 +594,7 @@ Connection: close\r
|
|
|
592
594
|
}
|
|
593
595
|
});
|
|
594
596
|
|
|
595
|
-
// src/cli/cas-preview.js
|
|
597
|
+
// ../../src/cli/cas-preview.js
|
|
596
598
|
var http = require("http");
|
|
597
599
|
var os = require("os");
|
|
598
600
|
var path = require("path");
|