@rallycry/conveyor-agent 7.0.6 → 7.0.7
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/{chunk-3H2FXJFD.js → chunk-7RSDCWEI.js} +22 -4
- package/dist/chunk-7RSDCWEI.js.map +1 -0
- package/dist/cli.js +37 -19
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +12 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-3H2FXJFD.js.map +0 -1
|
@@ -267,7 +267,7 @@ var AgentConnection = class _AgentConnection {
|
|
|
267
267
|
(m) => now - m.timestamp < _AgentConnection.DEDUP_WINDOW_MS
|
|
268
268
|
);
|
|
269
269
|
const words = new Set(
|
|
270
|
-
content.toLowerCase().split(/\s+/).filter((w) => w.length >= 3)
|
|
270
|
+
content.toLowerCase().replace(/[^\w\s]/g, "").split(/\s+/).filter((w) => w.length >= 3)
|
|
271
271
|
);
|
|
272
272
|
if (words.size === 0) return false;
|
|
273
273
|
for (const recent of this.recentMessages) {
|
|
@@ -5643,8 +5643,12 @@ var SessionRunner = class _SessionRunner {
|
|
|
5643
5643
|
return this.stopped;
|
|
5644
5644
|
}
|
|
5645
5645
|
// ── Main lifecycle ─────────────────────────────────────────────────
|
|
5646
|
-
|
|
5647
|
-
|
|
5646
|
+
/**
|
|
5647
|
+
* Establish the API connection, wire callbacks, and join the session room.
|
|
5648
|
+
* Call this before run() when you need to send events (e.g. setup/start
|
|
5649
|
+
* command output) before the main agent lifecycle begins.
|
|
5650
|
+
*/
|
|
5651
|
+
async connect() {
|
|
5648
5652
|
await this.setState("connecting");
|
|
5649
5653
|
await this.connection.connect();
|
|
5650
5654
|
await this.setState("connected");
|
|
@@ -5659,6 +5663,13 @@ var SessionRunner = class _SessionRunner {
|
|
|
5659
5663
|
this.pendingMessages.push({ content: msg.content, userId: msg.userId });
|
|
5660
5664
|
}
|
|
5661
5665
|
}
|
|
5666
|
+
}
|
|
5667
|
+
/**
|
|
5668
|
+
* Run the main agent lifecycle: fetch context, resolve mode, execute, loop.
|
|
5669
|
+
* Requires connect() to have been called first.
|
|
5670
|
+
*/
|
|
5671
|
+
// oxlint-disable-next-line max-lines-per-function, complexity -- lifecycle orchestration is inherently sequential
|
|
5672
|
+
async run() {
|
|
5662
5673
|
await this.setState("fetching_context");
|
|
5663
5674
|
try {
|
|
5664
5675
|
const ctx = await this.connection.call("getTaskContext", {
|
|
@@ -5706,6 +5717,11 @@ var SessionRunner = class _SessionRunner {
|
|
|
5706
5717
|
}
|
|
5707
5718
|
await this.shutdown("finished");
|
|
5708
5719
|
}
|
|
5720
|
+
/** Convenience wrapper: connect() then run(). */
|
|
5721
|
+
async start() {
|
|
5722
|
+
await this.connect();
|
|
5723
|
+
await this.run();
|
|
5724
|
+
}
|
|
5709
5725
|
// ── Core loop ──────────────────────────────────────────────────────
|
|
5710
5726
|
async coreLoop() {
|
|
5711
5727
|
while (!this.stopped) {
|
|
@@ -6814,6 +6830,8 @@ function spawnChildAgent(assignment, workDir) {
|
|
|
6814
6830
|
const childEnv = { ...process.env };
|
|
6815
6831
|
delete childEnv.CONVEYOR_PROJECT_TOKEN;
|
|
6816
6832
|
delete childEnv.CONVEYOR_PROJECT_ID;
|
|
6833
|
+
delete childEnv.CONVEYOR_SETUP_COMMAND;
|
|
6834
|
+
delete childEnv.CONVEYOR_START_COMMAND;
|
|
6817
6835
|
const effectiveAgentMode = agentMode ?? (isAuto ? "auto" : "");
|
|
6818
6836
|
const effectiveApiUrl = apiUrl || process.env.CONVEYOR_API_URL || "";
|
|
6819
6837
|
if (!effectiveApiUrl) {
|
|
@@ -7427,4 +7445,4 @@ export {
|
|
|
7427
7445
|
loadForwardPorts,
|
|
7428
7446
|
loadConveyorConfig
|
|
7429
7447
|
};
|
|
7430
|
-
//# sourceMappingURL=chunk-
|
|
7448
|
+
//# sourceMappingURL=chunk-7RSDCWEI.js.map
|