@karmaniverous/jeeves-meta 0.15.0 → 0.15.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/jeeves-meta/index.js +5 -6
- package/dist/index.js +5 -6
- package/package.json +1 -1
|
@@ -9291,12 +9291,12 @@ class GatewayExecutor {
|
|
|
9291
9291
|
return data;
|
|
9292
9292
|
}
|
|
9293
9293
|
/** Look up totalTokens for a session via sessions_list. */
|
|
9294
|
-
async getSessionTokens(sessionKey
|
|
9294
|
+
async getSessionTokens(sessionKey) {
|
|
9295
9295
|
try {
|
|
9296
9296
|
const result = await this.invoke('sessions_list', {
|
|
9297
9297
|
limit: 20,
|
|
9298
9298
|
messageLimit: 0,
|
|
9299
|
-
}
|
|
9299
|
+
});
|
|
9300
9300
|
const sessions = (result.result?.details?.sessions ??
|
|
9301
9301
|
result.result?.sessions ??
|
|
9302
9302
|
[]);
|
|
@@ -9328,7 +9328,6 @@ class GatewayExecutor {
|
|
|
9328
9328
|
// Generate unique output path for file-based output
|
|
9329
9329
|
const outputId = randomUUID();
|
|
9330
9330
|
const outputPath = this.workspaceDir + '/output-' + outputId + '.json';
|
|
9331
|
-
const invokeSessionKey = 'agent:main:meta-invoke:' + outputId;
|
|
9332
9331
|
// Append file output instruction to the task
|
|
9333
9332
|
const taskWithOutput = task +
|
|
9334
9333
|
'\n\n## OUTPUT DELIVERY\n\n' +
|
|
@@ -9346,7 +9345,7 @@ class GatewayExecutor {
|
|
|
9346
9345
|
runTimeoutSeconds: timeoutSeconds,
|
|
9347
9346
|
...(options?.thinking ? { thinking: options.thinking } : {}),
|
|
9348
9347
|
...(options?.model ? { model: options.model } : {}),
|
|
9349
|
-
}
|
|
9348
|
+
});
|
|
9350
9349
|
const details = (spawnResult.result?.details ?? spawnResult.result);
|
|
9351
9350
|
const sessionKey = details?.childSessionKey ?? details?.sessionKey;
|
|
9352
9351
|
if (typeof sessionKey !== 'string' || !sessionKey) {
|
|
@@ -9366,7 +9365,7 @@ class GatewayExecutor {
|
|
|
9366
9365
|
sessionKey,
|
|
9367
9366
|
limit: 5,
|
|
9368
9367
|
includeTools: false,
|
|
9369
|
-
}
|
|
9368
|
+
});
|
|
9370
9369
|
const messages = historyResult.result?.details?.messages ??
|
|
9371
9370
|
historyResult.result?.messages ??
|
|
9372
9371
|
[];
|
|
@@ -9379,7 +9378,7 @@ class GatewayExecutor {
|
|
|
9379
9378
|
lastMsg.stopReason !== 'toolUse' &&
|
|
9380
9379
|
lastMsg.stopReason !== 'error') {
|
|
9381
9380
|
// Fetch token usage from session metadata
|
|
9382
|
-
const tokens = await this.getSessionTokens(sessionKey
|
|
9381
|
+
const tokens = await this.getSessionTokens(sessionKey);
|
|
9383
9382
|
// Read output from file (sub-agent wrote it via Write tool)
|
|
9384
9383
|
if (existsSync(outputPath)) {
|
|
9385
9384
|
try {
|
package/dist/index.js
CHANGED
|
@@ -9026,12 +9026,12 @@ class GatewayExecutor {
|
|
|
9026
9026
|
return data;
|
|
9027
9027
|
}
|
|
9028
9028
|
/** Look up totalTokens for a session via sessions_list. */
|
|
9029
|
-
async getSessionTokens(sessionKey
|
|
9029
|
+
async getSessionTokens(sessionKey) {
|
|
9030
9030
|
try {
|
|
9031
9031
|
const result = await this.invoke('sessions_list', {
|
|
9032
9032
|
limit: 20,
|
|
9033
9033
|
messageLimit: 0,
|
|
9034
|
-
}
|
|
9034
|
+
});
|
|
9035
9035
|
const sessions = (result.result?.details?.sessions ??
|
|
9036
9036
|
result.result?.sessions ??
|
|
9037
9037
|
[]);
|
|
@@ -9063,7 +9063,6 @@ class GatewayExecutor {
|
|
|
9063
9063
|
// Generate unique output path for file-based output
|
|
9064
9064
|
const outputId = randomUUID();
|
|
9065
9065
|
const outputPath = this.workspaceDir + '/output-' + outputId + '.json';
|
|
9066
|
-
const invokeSessionKey = 'agent:main:meta-invoke:' + outputId;
|
|
9067
9066
|
// Append file output instruction to the task
|
|
9068
9067
|
const taskWithOutput = task +
|
|
9069
9068
|
'\n\n## OUTPUT DELIVERY\n\n' +
|
|
@@ -9081,7 +9080,7 @@ class GatewayExecutor {
|
|
|
9081
9080
|
runTimeoutSeconds: timeoutSeconds,
|
|
9082
9081
|
...(options?.thinking ? { thinking: options.thinking } : {}),
|
|
9083
9082
|
...(options?.model ? { model: options.model } : {}),
|
|
9084
|
-
}
|
|
9083
|
+
});
|
|
9085
9084
|
const details = (spawnResult.result?.details ?? spawnResult.result);
|
|
9086
9085
|
const sessionKey = details?.childSessionKey ?? details?.sessionKey;
|
|
9087
9086
|
if (typeof sessionKey !== 'string' || !sessionKey) {
|
|
@@ -9101,7 +9100,7 @@ class GatewayExecutor {
|
|
|
9101
9100
|
sessionKey,
|
|
9102
9101
|
limit: 5,
|
|
9103
9102
|
includeTools: false,
|
|
9104
|
-
}
|
|
9103
|
+
});
|
|
9105
9104
|
const messages = historyResult.result?.details?.messages ??
|
|
9106
9105
|
historyResult.result?.messages ??
|
|
9107
9106
|
[];
|
|
@@ -9114,7 +9113,7 @@ class GatewayExecutor {
|
|
|
9114
9113
|
lastMsg.stopReason !== 'toolUse' &&
|
|
9115
9114
|
lastMsg.stopReason !== 'error') {
|
|
9116
9115
|
// Fetch token usage from session metadata
|
|
9117
|
-
const tokens = await this.getSessionTokens(sessionKey
|
|
9116
|
+
const tokens = await this.getSessionTokens(sessionKey);
|
|
9118
9117
|
// Read output from file (sub-agent wrote it via Write tool)
|
|
9119
9118
|
if (existsSync(outputPath)) {
|
|
9120
9119
|
try {
|