@pellux/goodvibes-sdk 0.34.1 → 0.34.2
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/contracts/artifacts/operator-contract.json +1 -1
- package/dist/platform/core/compaction-sections.d.ts +0 -2
- package/dist/platform/core/compaction-sections.d.ts.map +1 -1
- package/dist/platform/core/compaction-sections.js +1 -4
- package/dist/platform/core/context-compaction.js +2 -1
- package/dist/platform/core/orchestrator-context-runtime.js +1 -1
- package/dist/platform/core/orchestrator-tool-runtime.js +1 -1
- package/dist/platform/tools/agent/index.d.ts +1 -0
- package/dist/platform/tools/agent/index.d.ts.map +1 -1
- package/dist/platform/tools/agent/index.js +1 -0
- package/dist/platform/tools/agent/predicates.d.ts +15 -0
- package/dist/platform/tools/agent/predicates.d.ts.map +1 -0
- package/dist/platform/tools/agent/predicates.js +15 -0
- package/dist/platform/version.js +1 -1
- package/package.json +9 -9
|
@@ -16,8 +16,6 @@ import type { ExecutionPlan } from './execution-plan.js';
|
|
|
16
16
|
import type { CompactionSection, SessionMemory } from './compaction-types.js';
|
|
17
17
|
/** Extract plain text from a ProviderMessage content field. */
|
|
18
18
|
export declare function extractText(content: string | ContentPart[]): string;
|
|
19
|
-
/** Returns true when an agent should be considered active (running or pending). */
|
|
20
|
-
export declare function isActiveAgent(a: AgentRecord): boolean;
|
|
21
19
|
/**
|
|
22
20
|
* buildHandoffHeader — always returns the mandatory handoff header.
|
|
23
21
|
* This is the first line of every compacted output.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compaction-sections.d.ts","sourceRoot":"","sources":["../../../src/platform/core/compaction-sections.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAC9E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"compaction-sections.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MD;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,SAAS,EAAE,EACnB,WAAW,EAAE,MAAM,GAClB;IAAE,OAAO,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAAC,eAAe,EAAE,SAAS,EAAE,CAAA;CAAE,CA8CrE;AAsBD;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAAC,WAAW,EAAE,SAAS,EAAE,GAAG,MAAM,CA2B7E;AAMD;;;;;GAKG;AACH,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,eAAe,EAAE,GAC1B,MAAM,CAgBR;AAMD;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,aAAa,GAAG,IAAI,GACzB,iBAAiB,GAAG,IAAI,CAuC1B;AAMD;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,YAAY,EAAE,MAAM,GAAG,SAAS,EAChC,cAAc,EAAE,MAAM,EAAE,EACxB,eAAe,EAAE,MAAM,GACtB,iBAAiB,GAAG,IAAI,CAa1B"}
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
*
|
|
10
10
|
* Empty sections return null — the orchestrator omits them entirely (no header).
|
|
11
11
|
*/
|
|
12
|
+
import { isActiveAgent } from '../tools/agent/predicates.js';
|
|
12
13
|
import { estimateTokens } from './compaction-types.js';
|
|
13
14
|
/** Extract plain text from a ProviderMessage content field. */
|
|
14
15
|
export function extractText(content) {
|
|
@@ -19,10 +20,6 @@ export function extractText(content) {
|
|
|
19
20
|
.map((p) => p.text)
|
|
20
21
|
.join('');
|
|
21
22
|
}
|
|
22
|
-
/** Returns true when an agent should be considered active (running or pending). */
|
|
23
|
-
export function isActiveAgent(a) {
|
|
24
|
-
return a.status === 'running' || a.status === 'pending';
|
|
25
|
-
}
|
|
26
23
|
/** Build a CompactionSection. Returns null if content is empty. */
|
|
27
24
|
function makeSection(id, header, content) {
|
|
28
25
|
const trimmed = content.trim();
|
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
import { logger } from '../utils/logger.js';
|
|
26
26
|
import { DEFAULT_COMPACTION_CONFIG, estimateTokens } from './compaction-types.js';
|
|
27
27
|
import { summarizeError } from '../utils/error-display.js';
|
|
28
|
-
import { buildHandoffHeader, buildSessionMemories, buildCurrentTask, buildRunningAgents, gatherRecentConversation, buildConversationFilterPrompt, buildToolResultsPrompt, buildAgentActivityTable, buildOlderAgentSummaryPrompt, buildResolvedProblemsPrompt, buildPlanProgress, buildSessionLineage, extractText,
|
|
28
|
+
import { buildHandoffHeader, buildSessionMemories, buildCurrentTask, buildRunningAgents, gatherRecentConversation, buildConversationFilterPrompt, buildToolResultsPrompt, buildAgentActivityTable, buildOlderAgentSummaryPrompt, buildResolvedProblemsPrompt, buildPlanProgress, buildSessionLineage, extractText, } from './compaction-sections.js';
|
|
29
|
+
import { isActiveAgent } from '../tools/agent/predicates.js';
|
|
29
30
|
// ---------------------------------------------------------------------------
|
|
30
31
|
// Compaction trigger constants
|
|
31
32
|
// ---------------------------------------------------------------------------
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { logger } from '../utils/logger.js';
|
|
2
2
|
import { estimateConversationTokens, COMPACTION_BUFFER_TOKENS, SMALL_WINDOW_THRESHOLD, compactSmallWindow, getAutoCompactDecision } from './context-compaction.js';
|
|
3
|
-
import { isActiveAgent } from '
|
|
3
|
+
import { isActiveAgent } from '../tools/agent/predicates.js';
|
|
4
4
|
import { emitOpsContextWarning } from '../runtime/emitters/index.js';
|
|
5
5
|
import { summarizeError } from '../utils/error-display.js';
|
|
6
6
|
function normalizeCatalogTier(tier) {
|
|
@@ -4,7 +4,7 @@ import { buildSyntheticResult, detectUnresolvedToolCalls } from './tool-reconcil
|
|
|
4
4
|
import { logger } from '../utils/logger.js';
|
|
5
5
|
import { evaluateOrchestrationSpawn } from '../runtime/orchestration/spawn-policy.js';
|
|
6
6
|
import { summarizeError } from '../utils/error-display.js';
|
|
7
|
-
import { isActiveAgent } from '
|
|
7
|
+
import { isActiveAgent } from '../tools/agent/predicates.js';
|
|
8
8
|
export async function executeToolCalls(deps, turnId, calls) {
|
|
9
9
|
const results = [];
|
|
10
10
|
for (const call of calls) {
|
|
@@ -6,6 +6,7 @@ import type { WrfcController } from '../../agents/wrfc-controller.js';
|
|
|
6
6
|
import { AgentManager } from './manager.js';
|
|
7
7
|
export type { AgentExecutor, AgentRecord } from './manager.js';
|
|
8
8
|
export { AGENT_TEMPLATES, AgentManager } from './manager.js';
|
|
9
|
+
export { isActiveAgent } from './predicates.js';
|
|
9
10
|
export declare function createAgentTool(config: {
|
|
10
11
|
manager: AgentManager;
|
|
11
12
|
messageBus: Pick<AgentMessageBus, 'getMessages' | 'send'>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/platform/tools/agent/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAG7D,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAmB,YAAY,EAAoB,MAAM,cAAc,CAAC;AAK/E,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/platform/tools/agent/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAG7D,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAmB,YAAY,EAAoB,MAAM,cAAc,CAAC;AAK/E,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAiHhD,wBAAgB,eAAe,CAAC,MAAM,EAAE;IACtC,OAAO,EAAE,YAAY,CAAC;IACtB,UAAU,EAAE,IAAI,CAAC,eAAe,EAAE,aAAa,GAAG,MAAM,CAAC,CAAC;IAC1D,cAAc,CAAC,EAAE,IAAI,CAAC,cAAc,EAAE,YAAY,CAAC,GAAG,SAAS,CAAC;IAChE,eAAe,CAAC,EAAE,IAAI,CAAC,eAAe,EAAE,eAAe,CAAC,GAAG,SAAS,CAAC;IACrE,aAAa,EAAE,IAAI,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;CAC3C,GAAG,IAAI,CAwlBP"}
|
|
@@ -7,6 +7,7 @@ import { summarizeError } from '../../utils/error-display.js';
|
|
|
7
7
|
import { toRecord } from '../../utils/record-coerce.js';
|
|
8
8
|
import { evaluateWrfcBatchPolicy } from './wrfc-batch-policy.js';
|
|
9
9
|
export { AGENT_TEMPLATES, AgentManager } from './manager.js';
|
|
10
|
+
export { isActiveAgent } from './predicates.js';
|
|
10
11
|
// ---------------------------------------------------------------------------
|
|
11
12
|
// Tool implementation
|
|
12
13
|
// ---------------------------------------------------------------------------
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** SDK-owned platform module. This implementation is maintained in goodvibes-sdk. */
|
|
2
|
+
import type { AgentRecord } from './manager.js';
|
|
3
|
+
/**
|
|
4
|
+
* Returns true when an agent is active (running or pending).
|
|
5
|
+
*
|
|
6
|
+
* Pure predicate with no runtime dependencies — intentionally a leaf module so
|
|
7
|
+
* core/orchestrator code can share it without importing the heavier
|
|
8
|
+
* `compaction-sections` module. Importing the predicate from `compaction-sections`
|
|
9
|
+
* previously pulled that module into the orchestrator turn-loop graph, creating a
|
|
10
|
+
* circular import that left the tool-loop circuit-breaker threshold constant in
|
|
11
|
+
* its temporal dead zone (undefined) at runtime, so the breaker never tripped and
|
|
12
|
+
* all-failed tool turns looped forever.
|
|
13
|
+
*/
|
|
14
|
+
export declare function isActiveAgent(a: Pick<AgentRecord, 'status'>): boolean;
|
|
15
|
+
//# sourceMappingURL=predicates.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"predicates.d.ts","sourceRoot":"","sources":["../../../../src/platform/tools/agent/predicates.ts"],"names":[],"mappings":"AAAA,qFAAqF;AAErF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,GAAG,OAAO,CAErE"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** SDK-owned platform module. This implementation is maintained in goodvibes-sdk. */
|
|
2
|
+
/**
|
|
3
|
+
* Returns true when an agent is active (running or pending).
|
|
4
|
+
*
|
|
5
|
+
* Pure predicate with no runtime dependencies — intentionally a leaf module so
|
|
6
|
+
* core/orchestrator code can share it without importing the heavier
|
|
7
|
+
* `compaction-sections` module. Importing the predicate from `compaction-sections`
|
|
8
|
+
* previously pulled that module into the orchestrator turn-loop graph, creating a
|
|
9
|
+
* circular import that left the tool-loop circuit-breaker threshold constant in
|
|
10
|
+
* its temporal dead zone (undefined) at runtime, so the breaker never tripped and
|
|
11
|
+
* all-failed tool turns looped forever.
|
|
12
|
+
*/
|
|
13
|
+
export function isActiveAgent(a) {
|
|
14
|
+
return a.status === 'running' || a.status === 'pending';
|
|
15
|
+
}
|
package/dist/platform/version.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { readFileSync } from 'node:fs';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
|
-
let version = '0.34.
|
|
3
|
+
let version = '0.34.2';
|
|
4
4
|
try {
|
|
5
5
|
const pkg = JSON.parse(readFileSync(join(import.meta.dir, '..', '..', 'package.json'), 'utf-8'));
|
|
6
6
|
version = pkg.version ?? version;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pellux/goodvibes-sdk",
|
|
3
|
-
"version": "0.34.
|
|
3
|
+
"version": "0.34.2",
|
|
4
4
|
"description": "TypeScript SDK for building GoodVibes operator, peer, web, mobile, and daemon-connected apps with typed contracts, auth, realtime events, and transport layers.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"goodvibes",
|
|
@@ -453,14 +453,14 @@
|
|
|
453
453
|
"sideEffects": false,
|
|
454
454
|
"type": "module",
|
|
455
455
|
"dependencies": {
|
|
456
|
-
"@pellux/goodvibes-contracts": "0.34.
|
|
457
|
-
"@pellux/goodvibes-daemon-sdk": "0.34.
|
|
458
|
-
"@pellux/goodvibes-errors": "0.34.
|
|
459
|
-
"@pellux/goodvibes-operator-sdk": "0.34.
|
|
460
|
-
"@pellux/goodvibes-peer-sdk": "0.34.
|
|
461
|
-
"@pellux/goodvibes-transport-core": "0.34.
|
|
462
|
-
"@pellux/goodvibes-transport-http": "0.34.
|
|
463
|
-
"@pellux/goodvibes-transport-realtime": "0.34.
|
|
456
|
+
"@pellux/goodvibes-contracts": "0.34.2",
|
|
457
|
+
"@pellux/goodvibes-daemon-sdk": "0.34.2",
|
|
458
|
+
"@pellux/goodvibes-errors": "0.34.2",
|
|
459
|
+
"@pellux/goodvibes-operator-sdk": "0.34.2",
|
|
460
|
+
"@pellux/goodvibes-peer-sdk": "0.34.2",
|
|
461
|
+
"@pellux/goodvibes-transport-core": "0.34.2",
|
|
462
|
+
"@pellux/goodvibes-transport-http": "0.34.2",
|
|
463
|
+
"@pellux/goodvibes-transport-realtime": "0.34.2"
|
|
464
464
|
},
|
|
465
465
|
"optionalDependencies": {
|
|
466
466
|
"@agentclientprotocol/sdk": "^0.21.0",
|