@superblocksteam/vite-plugin-file-sync 2.0.43-next.12 → 2.0.43-next.14
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/ai-service/agent/subagents/apis/generate-api-source.d.ts.map +1 -1
- package/dist/ai-service/agent/subagents/apis/generate-api-source.js +269 -249
- package/dist/ai-service/agent/subagents/apis/generate-api-source.js.map +1 -1
- package/dist/ai-service/agent/tools/build-finalize.d.ts +1 -22
- package/dist/ai-service/agent/tools/build-finalize.d.ts.map +1 -1
- package/dist/ai-service/agent/tools/build-finalize.js +27 -18
- package/dist/ai-service/agent/tools/build-finalize.js.map +1 -1
- package/dist/ai-service/agent/tools2/types.d.ts +12 -0
- package/dist/ai-service/agent/tools2/types.d.ts.map +1 -1
- package/dist/ai-service/agent/tools2/types.js +20 -0
- package/dist/ai-service/agent/tools2/types.js.map +1 -1
- package/dist/ai-service/llm/context/constants.d.ts +7 -6
- package/dist/ai-service/llm/context/constants.d.ts.map +1 -1
- package/dist/ai-service/llm/context/constants.js +7 -6
- package/dist/ai-service/llm/context/constants.js.map +1 -1
- package/dist/ai-service/llm/context/context-handle.d.ts +106 -0
- package/dist/ai-service/llm/context/context-handle.d.ts.map +1 -0
- package/dist/ai-service/llm/context/context-handle.js +134 -0
- package/dist/ai-service/llm/context/context-handle.js.map +1 -0
- package/dist/ai-service/llm/context/context-lock.d.ts +144 -0
- package/dist/ai-service/llm/context/context-lock.d.ts.map +1 -0
- package/dist/ai-service/llm/context/context-lock.js +221 -0
- package/dist/ai-service/llm/context/context-lock.js.map +1 -0
- package/dist/ai-service/llm/context/context.d.ts +18 -19
- package/dist/ai-service/llm/context/context.d.ts.map +1 -1
- package/dist/ai-service/llm/context/context.js +76 -127
- package/dist/ai-service/llm/context/context.js.map +1 -1
- package/dist/ai-service/llm/context/index.d.ts +4 -0
- package/dist/ai-service/llm/context/index.d.ts.map +1 -1
- package/dist/ai-service/llm/context/index.js +5 -0
- package/dist/ai-service/llm/context/index.js.map +1 -1
- package/dist/ai-service/llm/context/internal-types.d.ts +0 -2
- package/dist/ai-service/llm/context/internal-types.d.ts.map +1 -1
- package/dist/ai-service/llm/context/internal-types.js.map +1 -1
- package/dist/ai-service/llm/context/levels/l1.d.ts.map +1 -1
- package/dist/ai-service/llm/context/levels/l1.js +3 -5
- package/dist/ai-service/llm/context/levels/l1.js.map +1 -1
- package/dist/ai-service/llm/context/manager.d.ts +60 -11
- package/dist/ai-service/llm/context/manager.d.ts.map +1 -1
- package/dist/ai-service/llm/context/manager.js +111 -35
- package/dist/ai-service/llm/context/manager.js.map +1 -1
- package/dist/ai-service/llm/context/utils/content-compaction.d.ts +2 -2
- package/dist/ai-service/llm/context/utils/content-compaction.d.ts.map +1 -1
- package/dist/ai-service/llm/context/utils/content-compaction.js +6 -3
- package/dist/ai-service/llm/context/utils/content-compaction.js.map +1 -1
- package/dist/ai-service/llm/context/utils/index.d.ts +1 -1
- package/dist/ai-service/llm/context/utils/index.d.ts.map +1 -1
- package/dist/ai-service/llm/context/utils/index.js +1 -1
- package/dist/ai-service/llm/context/utils/index.js.map +1 -1
- package/dist/ai-service/llm/context/utils/message-utils.d.ts +17 -7
- package/dist/ai-service/llm/context/utils/message-utils.d.ts.map +1 -1
- package/dist/ai-service/llm/context/utils/message-utils.js +31 -18
- package/dist/ai-service/llm/context/utils/message-utils.js.map +1 -1
- package/dist/ai-service/llmobs/middleware/stream-text.d.ts.map +1 -1
- package/dist/ai-service/llmobs/middleware/stream-text.js +1 -0
- package/dist/ai-service/llmobs/middleware/stream-text.js.map +1 -1
- package/dist/ai-service/llmobs/tracer.d.ts +4 -0
- package/dist/ai-service/llmobs/tracer.d.ts.map +1 -1
- package/dist/ai-service/llmobs/tracer.js +11 -0
- package/dist/ai-service/llmobs/tracer.js.map +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-components/ButtonPropsDocs.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-components/CheckboxPropsDocs.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-components/ColumnPropsDocs.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-components/ContainerPropsDocs.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-components/DatePickerPropsDocs.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-components/DropdownPropsDocs.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-components/IconPropsDocs.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-components/ImagePropsDocs.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-components/InputPropsDocs.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-components/ModalPropsDocs.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-components/PagePropsDocs.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-components/SectionPropsDocs.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-components/SlideoutPropsDocs.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-components/SwitchPropsDocs.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-components/TablePropsDocs.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-components/TextPropsDocs.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-typedefs/Dim.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-typedefs/EventFlow.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/library-typedefs/TextStyleWithVariant.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/full-examples.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-api.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-components-rules.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-custom-components.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-data-filtering.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-event-flow.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-forms.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-layouts.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-page.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-rbac.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-routes.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-state.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/superblocks-theming-chakra-new.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/system-base.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/system-incremental.js +1 -1
- package/dist/ai-service/prompt-builder-service/static-fragments/platform-parts/system-specific-edit.js +1 -1
- package/dist/ai-service/state-machine/handlers/llm-generating.d.ts.map +1 -1
- package/dist/ai-service/state-machine/handlers/llm-generating.js +351 -334
- package/dist/ai-service/state-machine/handlers/llm-generating.js.map +1 -1
- package/dist/ai-service/util/stop-condition.d.ts +4 -1
- package/dist/ai-service/util/stop-condition.d.ts.map +1 -1
- package/dist/ai-service/util/stop-condition.js +14 -2
- package/dist/ai-service/util/stop-condition.js.map +1 -1
- package/dist/sync-service/download.d.ts.map +1 -1
- package/dist/sync-service/download.js +28 -7
- package/dist/sync-service/download.js.map +1 -1
- package/package.json +9 -8
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Thread-safe context ownership management.
|
|
3
|
+
*
|
|
4
|
+
* This module provides exclusive ownership semantics for contexts,
|
|
5
|
+
* ensuring that only one agent can own and modify a context at a time.
|
|
6
|
+
*
|
|
7
|
+
* Key features:
|
|
8
|
+
* - Exclusive ownership with owner ID tracking
|
|
9
|
+
* - Timeout mechanism to prevent stale locks
|
|
10
|
+
* - Try-acquire pattern for non-blocking acquisition
|
|
11
|
+
* - Automatic cleanup of expired locks
|
|
12
|
+
*/
|
|
13
|
+
import type { ContextId } from "./types.js";
|
|
14
|
+
/**
|
|
15
|
+
* Represents a lock on a context.
|
|
16
|
+
*/
|
|
17
|
+
export interface ContextLock {
|
|
18
|
+
/** The ID of the context being locked */
|
|
19
|
+
contextId: ContextId;
|
|
20
|
+
/** Unique identifier of the lock owner */
|
|
21
|
+
ownerId: string;
|
|
22
|
+
/** Timestamp when the lock was acquired */
|
|
23
|
+
acquiredAt: number;
|
|
24
|
+
/** Optional timeout in milliseconds after which the lock expires */
|
|
25
|
+
timeoutMs?: number;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Error thrown when attempting to acquire a locked context.
|
|
29
|
+
*/
|
|
30
|
+
export declare class ContextLockError extends Error {
|
|
31
|
+
readonly contextId: ContextId;
|
|
32
|
+
readonly currentOwner: string;
|
|
33
|
+
readonly requestedOwner: string;
|
|
34
|
+
constructor(contextId: ContextId, currentOwner: string, requestedOwner: string);
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Error thrown when attempting to release a context not owned by the requester.
|
|
38
|
+
*/
|
|
39
|
+
export declare class ContextNotOwnedError extends Error {
|
|
40
|
+
readonly contextId: ContextId;
|
|
41
|
+
readonly currentOwner: string | undefined;
|
|
42
|
+
readonly requestedOwner: string;
|
|
43
|
+
constructor(contextId: ContextId, currentOwner: string | undefined, requestedOwner: string);
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Manages exclusive ownership of contexts.
|
|
47
|
+
*
|
|
48
|
+
* This class provides thread-safe context locking with support for:
|
|
49
|
+
* - Exclusive ownership semantics
|
|
50
|
+
* - Lock timeouts to prevent deadlocks
|
|
51
|
+
* - Owner ID tracking for debugging
|
|
52
|
+
* - Try-acquire pattern for non-blocking operations
|
|
53
|
+
*/
|
|
54
|
+
export declare class ContextLockManager {
|
|
55
|
+
private locks;
|
|
56
|
+
/** Default timeout for locks in milliseconds (5 minutes) */
|
|
57
|
+
private readonly defaultTimeoutMs;
|
|
58
|
+
/**
|
|
59
|
+
* Creates a unique key for a context ID.
|
|
60
|
+
*/
|
|
61
|
+
private getContextKey;
|
|
62
|
+
/**
|
|
63
|
+
* Checks if a lock has expired.
|
|
64
|
+
*/
|
|
65
|
+
private isLockExpired;
|
|
66
|
+
/**
|
|
67
|
+
* Cleans up expired locks.
|
|
68
|
+
*/
|
|
69
|
+
private cleanupExpiredLocks;
|
|
70
|
+
/**
|
|
71
|
+
* Attempts to acquire exclusive ownership of a context.
|
|
72
|
+
*
|
|
73
|
+
* @param contextId - The context to acquire
|
|
74
|
+
* @param ownerId - Unique identifier of the entity acquiring the context
|
|
75
|
+
* @param options - Lock options
|
|
76
|
+
* @returns true if the lock was acquired, false if already locked
|
|
77
|
+
* @throws {ContextLockError} if force is false and context is already locked
|
|
78
|
+
*/
|
|
79
|
+
acquire(contextId: ContextId, ownerId: string, options?: {
|
|
80
|
+
/** Force acquisition even if locked by another owner */
|
|
81
|
+
force?: boolean;
|
|
82
|
+
/** Custom timeout in milliseconds */
|
|
83
|
+
timeoutMs?: number;
|
|
84
|
+
}): boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Tries to acquire a lock without throwing an error.
|
|
87
|
+
*
|
|
88
|
+
* @param contextId - The context to acquire
|
|
89
|
+
* @param ownerId - Unique identifier of the entity acquiring the context
|
|
90
|
+
* @param options - Lock options
|
|
91
|
+
* @returns true if the lock was acquired, false otherwise
|
|
92
|
+
*/
|
|
93
|
+
tryAcquire(contextId: ContextId, ownerId: string, options?: {
|
|
94
|
+
timeoutMs?: number;
|
|
95
|
+
}): boolean;
|
|
96
|
+
/**
|
|
97
|
+
* Releases ownership of a context.
|
|
98
|
+
*
|
|
99
|
+
* @param contextId - The context to release
|
|
100
|
+
* @param ownerId - The owner releasing the context
|
|
101
|
+
* @throws {ContextNotOwnedError} if the context is not owned by the requester
|
|
102
|
+
*/
|
|
103
|
+
release(contextId: ContextId, ownerId: string): void;
|
|
104
|
+
/**
|
|
105
|
+
* Checks if a context is currently locked.
|
|
106
|
+
*
|
|
107
|
+
* @param contextId - The context to check
|
|
108
|
+
* @returns true if the context is locked and not expired
|
|
109
|
+
*/
|
|
110
|
+
isLocked(contextId: ContextId): boolean;
|
|
111
|
+
/**
|
|
112
|
+
* Gets the current owner of a context.
|
|
113
|
+
*
|
|
114
|
+
* @param contextId - The context to check
|
|
115
|
+
* @returns The owner ID if locked, undefined otherwise
|
|
116
|
+
*/
|
|
117
|
+
getOwner(contextId: ContextId): string | undefined;
|
|
118
|
+
/**
|
|
119
|
+
* Checks if a specific owner owns a context.
|
|
120
|
+
*
|
|
121
|
+
* @param contextId - The context to check
|
|
122
|
+
* @param ownerId - The owner to check
|
|
123
|
+
* @returns true if the owner owns the context
|
|
124
|
+
*/
|
|
125
|
+
isOwnedBy(contextId: ContextId, ownerId: string): boolean;
|
|
126
|
+
/**
|
|
127
|
+
* Gets information about all active locks.
|
|
128
|
+
* Useful for debugging and monitoring.
|
|
129
|
+
*
|
|
130
|
+
* @returns Array of active lock information
|
|
131
|
+
*/
|
|
132
|
+
getActiveLocks(): ReadonlyArray<{
|
|
133
|
+
contextId: ContextId;
|
|
134
|
+
ownerId: string;
|
|
135
|
+
ageMs: number;
|
|
136
|
+
expiresInMs?: number;
|
|
137
|
+
}>;
|
|
138
|
+
/**
|
|
139
|
+
* Clears all locks. Use with caution!
|
|
140
|
+
* Primarily intended for testing and emergency recovery.
|
|
141
|
+
*/
|
|
142
|
+
clearAllLocks(): void;
|
|
143
|
+
}
|
|
144
|
+
//# sourceMappingURL=context-lock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-lock.d.ts","sourceRoot":"","sources":["../../../../src/ai-service/llm/context/context-lock.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GA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ACpB,OAAO,EAAE,MAAM,EACf,OAAO,GAAE;QACP,SAAS,CAAC,EAAE,MAAM,CAAC;KACf,GACL,OAAO;IAWV;;;;;;OAMG;IACI,OAAO,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;IAgB3D;;;;;OAKG;IACI,QAAQ,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO;IAO9C;;;;;OAKG;IACI,QAAQ,CAAC,SAAS,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS;IAOzD;;;;;;OAMG;IACI,SAAS,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO;IAIhE;;;;;OAKG;IACI,cAAc,IAAI,aAAa,CAAC;QACrC,SAAS,EAAE,SAAS,CAAC;QACrB,OAAO,EAAE,MAAM,CAAC;QAChB,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;IAgBF;;;OAGG;IACI,aAAa,IAAI,IAAI;CAO7B"}
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Thread-safe context ownership management.
|
|
3
|
+
*
|
|
4
|
+
* This module provides exclusive ownership semantics for contexts,
|
|
5
|
+
* ensuring that only one agent can own and modify a context at a time.
|
|
6
|
+
*
|
|
7
|
+
* Key features:
|
|
8
|
+
* - Exclusive ownership with owner ID tracking
|
|
9
|
+
* - Timeout mechanism to prevent stale locks
|
|
10
|
+
* - Try-acquire pattern for non-blocking acquisition
|
|
11
|
+
* - Automatic cleanup of expired locks
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* Error thrown when attempting to acquire a locked context.
|
|
15
|
+
*/
|
|
16
|
+
export class ContextLockError extends Error {
|
|
17
|
+
contextId;
|
|
18
|
+
currentOwner;
|
|
19
|
+
requestedOwner;
|
|
20
|
+
constructor(contextId, currentOwner, requestedOwner) {
|
|
21
|
+
super(`Context '${contextId.name}' is already locked by '${currentOwner}', cannot be acquired by '${requestedOwner}'`);
|
|
22
|
+
this.contextId = contextId;
|
|
23
|
+
this.currentOwner = currentOwner;
|
|
24
|
+
this.requestedOwner = requestedOwner;
|
|
25
|
+
this.name = "ContextLockError";
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Error thrown when attempting to release a context not owned by the requester.
|
|
30
|
+
*/
|
|
31
|
+
export class ContextNotOwnedError extends Error {
|
|
32
|
+
contextId;
|
|
33
|
+
currentOwner;
|
|
34
|
+
requestedOwner;
|
|
35
|
+
constructor(contextId, currentOwner, requestedOwner) {
|
|
36
|
+
super(`Context '${contextId.name}' is not owned by '${requestedOwner}' (current owner: ${currentOwner ?? "none"})`);
|
|
37
|
+
this.contextId = contextId;
|
|
38
|
+
this.currentOwner = currentOwner;
|
|
39
|
+
this.requestedOwner = requestedOwner;
|
|
40
|
+
this.name = "ContextNotOwnedError";
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Manages exclusive ownership of contexts.
|
|
45
|
+
*
|
|
46
|
+
* This class provides thread-safe context locking with support for:
|
|
47
|
+
* - Exclusive ownership semantics
|
|
48
|
+
* - Lock timeouts to prevent deadlocks
|
|
49
|
+
* - Owner ID tracking for debugging
|
|
50
|
+
* - Try-acquire pattern for non-blocking operations
|
|
51
|
+
*/
|
|
52
|
+
export class ContextLockManager {
|
|
53
|
+
locks = new Map();
|
|
54
|
+
/** Default timeout for locks in milliseconds (5 minutes) */
|
|
55
|
+
defaultTimeoutMs = 5 * 60 * 1000;
|
|
56
|
+
/**
|
|
57
|
+
* Creates a unique key for a context ID.
|
|
58
|
+
*/
|
|
59
|
+
getContextKey(contextId) {
|
|
60
|
+
return `${contextId.userId}::${contextId.name}`;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Checks if a lock has expired.
|
|
64
|
+
*/
|
|
65
|
+
isLockExpired(lock) {
|
|
66
|
+
if (!lock.timeoutMs)
|
|
67
|
+
return false;
|
|
68
|
+
return Date.now() - lock.acquiredAt > lock.timeoutMs;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Cleans up expired locks.
|
|
72
|
+
*/
|
|
73
|
+
cleanupExpiredLocks() {
|
|
74
|
+
const now = Date.now();
|
|
75
|
+
for (const [key, lock] of this.locks.entries()) {
|
|
76
|
+
if (this.isLockExpired(lock)) {
|
|
77
|
+
console.warn(`Cleaning up expired lock for context '${lock.contextId.name}' (owner: ${lock.ownerId}, age: ${now - lock.acquiredAt}ms)`);
|
|
78
|
+
this.locks.delete(key);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Attempts to acquire exclusive ownership of a context.
|
|
84
|
+
*
|
|
85
|
+
* @param contextId - The context to acquire
|
|
86
|
+
* @param ownerId - Unique identifier of the entity acquiring the context
|
|
87
|
+
* @param options - Lock options
|
|
88
|
+
* @returns true if the lock was acquired, false if already locked
|
|
89
|
+
* @throws {ContextLockError} if force is false and context is already locked
|
|
90
|
+
*/
|
|
91
|
+
acquire(contextId, ownerId, options = {}) {
|
|
92
|
+
this.cleanupExpiredLocks();
|
|
93
|
+
const key = this.getContextKey(contextId);
|
|
94
|
+
const existingLock = this.locks.get(key);
|
|
95
|
+
// Check if already locked by someone else
|
|
96
|
+
if (existingLock && !this.isLockExpired(existingLock)) {
|
|
97
|
+
if (existingLock.ownerId === ownerId) {
|
|
98
|
+
// Already owned by this owner, refresh the lock
|
|
99
|
+
existingLock.acquiredAt = Date.now();
|
|
100
|
+
return true;
|
|
101
|
+
}
|
|
102
|
+
if (!options.force) {
|
|
103
|
+
throw new ContextLockError(contextId, existingLock.ownerId, ownerId);
|
|
104
|
+
}
|
|
105
|
+
console.warn(`Force-acquiring context '${contextId.name}' from '${existingLock.ownerId}' to '${ownerId}'`);
|
|
106
|
+
}
|
|
107
|
+
// Acquire the lock
|
|
108
|
+
const lock = {
|
|
109
|
+
contextId,
|
|
110
|
+
ownerId,
|
|
111
|
+
acquiredAt: Date.now(),
|
|
112
|
+
timeoutMs: options.timeoutMs ?? this.defaultTimeoutMs,
|
|
113
|
+
};
|
|
114
|
+
this.locks.set(key, lock);
|
|
115
|
+
return true;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Tries to acquire a lock without throwing an error.
|
|
119
|
+
*
|
|
120
|
+
* @param contextId - The context to acquire
|
|
121
|
+
* @param ownerId - Unique identifier of the entity acquiring the context
|
|
122
|
+
* @param options - Lock options
|
|
123
|
+
* @returns true if the lock was acquired, false otherwise
|
|
124
|
+
*/
|
|
125
|
+
tryAcquire(contextId, ownerId, options = {}) {
|
|
126
|
+
try {
|
|
127
|
+
return this.acquire(contextId, ownerId, { ...options, force: false });
|
|
128
|
+
}
|
|
129
|
+
catch (error) {
|
|
130
|
+
if (error instanceof ContextLockError) {
|
|
131
|
+
return false;
|
|
132
|
+
}
|
|
133
|
+
throw error;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Releases ownership of a context.
|
|
138
|
+
*
|
|
139
|
+
* @param contextId - The context to release
|
|
140
|
+
* @param ownerId - The owner releasing the context
|
|
141
|
+
* @throws {ContextNotOwnedError} if the context is not owned by the requester
|
|
142
|
+
*/
|
|
143
|
+
release(contextId, ownerId) {
|
|
144
|
+
const key = this.getContextKey(contextId);
|
|
145
|
+
const lock = this.locks.get(key);
|
|
146
|
+
if (!lock) {
|
|
147
|
+
// No lock exists, nothing to release
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
if (lock.ownerId !== ownerId) {
|
|
151
|
+
throw new ContextNotOwnedError(contextId, lock.ownerId, ownerId);
|
|
152
|
+
}
|
|
153
|
+
this.locks.delete(key);
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Checks if a context is currently locked.
|
|
157
|
+
*
|
|
158
|
+
* @param contextId - The context to check
|
|
159
|
+
* @returns true if the context is locked and not expired
|
|
160
|
+
*/
|
|
161
|
+
isLocked(contextId) {
|
|
162
|
+
this.cleanupExpiredLocks();
|
|
163
|
+
const key = this.getContextKey(contextId);
|
|
164
|
+
const lock = this.locks.get(key);
|
|
165
|
+
return lock !== undefined && !this.isLockExpired(lock);
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Gets the current owner of a context.
|
|
169
|
+
*
|
|
170
|
+
* @param contextId - The context to check
|
|
171
|
+
* @returns The owner ID if locked, undefined otherwise
|
|
172
|
+
*/
|
|
173
|
+
getOwner(contextId) {
|
|
174
|
+
this.cleanupExpiredLocks();
|
|
175
|
+
const key = this.getContextKey(contextId);
|
|
176
|
+
const lock = this.locks.get(key);
|
|
177
|
+
return lock && !this.isLockExpired(lock) ? lock.ownerId : undefined;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Checks if a specific owner owns a context.
|
|
181
|
+
*
|
|
182
|
+
* @param contextId - The context to check
|
|
183
|
+
* @param ownerId - The owner to check
|
|
184
|
+
* @returns true if the owner owns the context
|
|
185
|
+
*/
|
|
186
|
+
isOwnedBy(contextId, ownerId) {
|
|
187
|
+
return this.getOwner(contextId) === ownerId;
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Gets information about all active locks.
|
|
191
|
+
* Useful for debugging and monitoring.
|
|
192
|
+
*
|
|
193
|
+
* @returns Array of active lock information
|
|
194
|
+
*/
|
|
195
|
+
getActiveLocks() {
|
|
196
|
+
this.cleanupExpiredLocks();
|
|
197
|
+
const now = Date.now();
|
|
198
|
+
return Array.from(this.locks.values())
|
|
199
|
+
.filter((lock) => !this.isLockExpired(lock))
|
|
200
|
+
.map((lock) => ({
|
|
201
|
+
contextId: lock.contextId,
|
|
202
|
+
ownerId: lock.ownerId,
|
|
203
|
+
ageMs: now - lock.acquiredAt,
|
|
204
|
+
expiresInMs: lock.timeoutMs
|
|
205
|
+
? lock.timeoutMs - (now - lock.acquiredAt)
|
|
206
|
+
: undefined,
|
|
207
|
+
}));
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Clears all locks. Use with caution!
|
|
211
|
+
* Primarily intended for testing and emergency recovery.
|
|
212
|
+
*/
|
|
213
|
+
clearAllLocks() {
|
|
214
|
+
const count = this.locks.size;
|
|
215
|
+
if (count > 0) {
|
|
216
|
+
console.warn(`Clearing ${count} active context locks`);
|
|
217
|
+
this.locks.clear();
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
//# sourceMappingURL=context-lock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-lock.js","sourceRoot":"","sources":["../../../../src/ai-service/llm/context/context-lock.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAkBH;;GAEG;AACH,MAAM,OAAO,gBAAiB,SAAQ,KAAK;IAEvB;IACA;IACA;IAHlB,YACkB,SAAoB,EACpB,YAAoB,EACpB,cAAsB;QAEtC,KAAK,CACH,YAAY,SAAS,CAAC,IAAI,2BAA2B,YAAY,6BAA6B,cAAc,GAAG,CAChH,CAAC;QANc,cAAS,GAAT,SAAS,CAAW;QACpB,iBAAY,GAAZ,YAAY,CAAQ;QACpB,mBAAc,GAAd,cAAc,CAAQ;QAKtC,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;IACjC,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,oBAAqB,SAAQ,KAAK;IAE3B;IACA;IACA;IAHlB,YACkB,SAAoB,EACpB,YAAgC,EAChC,cAAsB;QAEtC,KAAK,CACH,YAAY,SAAS,CAAC,IAAI,sBAAsB,cAAc,qBAAqB,YAAY,IAAI,MAAM,GAAG,CAC7G,CAAC;QANc,cAAS,GAAT,SAAS,CAAW;QACpB,iBAAY,GAAZ,YAAY,CAAoB;QAChC,mBAAc,GAAd,cAAc,CAAQ;QAKtC,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;IACrC,CAAC;CACF;AAED;;;;;;;;GAQG;AACH,MAAM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C9C,CAAC;IAED;;;;;OAKG;IACI,cAAc;QAMnB,IAAI,CAAC,mBAAmB,EAAE,CAAC;QAC3B,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QAEvB,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;aACnC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;aAC3C,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YACd,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,KAAK,EAAE,GAAG,GAAG,IAAI,CAAC,UAAU;YAC5B,WAAW,EAAE,IAAI,CAAC,SAAS;gBACzB,CAAC,CAAC,IAAI,CAAC,SAAS,GAAG,CAAC,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC;gBAC1C,CAAC,CAAC,SAAS;SACd,CAAC,CAAC,CAAC;IACR,CAAC;IAED;;;OAGG;IACI,aAAa;QAClB,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;QAC9B,IAAI,KAAK,GAAG,CAAC,EAAE,CAAC;YACd,OAAO,CAAC,IAAI,CAAC,YAAY,KAAK,uBAAuB,CAAC,CAAC;YACvD,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;QACrB,CAAC;IACH,CAAC;CACF"}
|
|
@@ -34,7 +34,6 @@ export declare class Context {
|
|
|
34
34
|
l1Turns: L1Turn[];
|
|
35
35
|
private onPersist?;
|
|
36
36
|
private activeTurnNumResponses;
|
|
37
|
-
private continuations;
|
|
38
37
|
private turnStartMs;
|
|
39
38
|
private _logger;
|
|
40
39
|
private cacheStrategy;
|
|
@@ -76,7 +75,7 @@ export declare class Context {
|
|
|
76
75
|
*/
|
|
77
76
|
get activeStep(): Step | undefined;
|
|
78
77
|
/**
|
|
79
|
-
* All turn messages (L3 + L2 + L1)
|
|
78
|
+
* All turn messages (L3 + L2 + L1).
|
|
80
79
|
*/
|
|
81
80
|
get turnMessages(): TokenizedMessage[];
|
|
82
81
|
/**
|
|
@@ -125,14 +124,17 @@ export declare class Context {
|
|
|
125
124
|
* Recalculates all token counts with current estimate.
|
|
126
125
|
*/
|
|
127
126
|
private recalculateTokenCounts;
|
|
127
|
+
/**
|
|
128
|
+
* Execute compaction if needed based on trigger threshold.
|
|
129
|
+
*/
|
|
130
|
+
private compactIfNeeded;
|
|
128
131
|
/**
|
|
129
132
|
* Main compaction algorithm.
|
|
130
133
|
*
|
|
131
134
|
* Triggers when context exceeds compactionTrigger threshold.
|
|
132
|
-
* Demotes/drops turns to reach compactionTarget.
|
|
135
|
+
* Demotes/drops/trims turns to reach compactionTarget.
|
|
133
136
|
* TODO(matt): add final AI summary level
|
|
134
137
|
*
|
|
135
|
-
* @param maxTokens - Hard token limit
|
|
136
138
|
* @param lastTurnIsActive - Whether last L1 turn is active (protected from demotion)
|
|
137
139
|
*/
|
|
138
140
|
private compact;
|
|
@@ -153,32 +155,29 @@ export declare class Context {
|
|
|
153
155
|
* Compacts L3 turns to fit within target budget by dropping oldest.
|
|
154
156
|
*/
|
|
155
157
|
private compactL3ToTarget;
|
|
156
|
-
private patchContinuationBeforeDrop;
|
|
157
158
|
/**
|
|
158
159
|
* Performs aggressive compaction when still over target after level-based compaction.
|
|
159
160
|
*/
|
|
160
161
|
private performAggressiveCompaction;
|
|
161
162
|
/**
|
|
162
|
-
*
|
|
163
|
+
* Trims content from older steps in the active turn to reduce token usage.
|
|
163
164
|
*
|
|
164
165
|
* Strategy:
|
|
165
|
-
* -
|
|
166
|
-
* -
|
|
166
|
+
* - Preserve the most recent `stepsToPreserve` steps at full fidelity
|
|
167
|
+
* - Compact content in older steps using compactContent()
|
|
168
|
+
* - Continue until token count is under target or all trimmable steps are processed
|
|
167
169
|
*
|
|
168
|
-
* This keeps recent
|
|
169
|
-
*
|
|
170
|
+
* This keeps recent interactions detailed while reducing token usage from
|
|
171
|
+
* earlier steps in long-running turns.
|
|
170
172
|
*/
|
|
171
|
-
private
|
|
172
|
-
/**
|
|
173
|
-
* Performs the actual split operation.
|
|
174
|
-
*
|
|
175
|
-
* If a previous split turn exists (linked via continuations), merges steps into it.
|
|
176
|
-
* Otherwise creates a new completed turn.
|
|
177
|
-
*/
|
|
178
|
-
private performSplit;
|
|
173
|
+
private trimActiveTurn;
|
|
179
174
|
private withTokenCount;
|
|
180
175
|
private estimateTokenCount;
|
|
181
|
-
|
|
176
|
+
/**
|
|
177
|
+
* Sanitizes outgoing messages into clean ModelMessages for LLM input.
|
|
178
|
+
* Performs any necessary repairs (e.g. removing orphaned tool calls).
|
|
179
|
+
*/
|
|
180
|
+
private sanitize;
|
|
182
181
|
/**
|
|
183
182
|
* Removes tool-call parts from assistant messages if their results aren't present later in the context.
|
|
184
183
|
* This can happen if a tool call was made but the tool result message was never added (e.g. due to an error).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../src/ai-service/llm/context/context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH,OAAO,EACL,KAAK,aAAa,EAEnB,MAAM,oBAAoB,CAAC;AAK5B,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3D,OAAO,EAGL,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC5B,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../src/ai-service/llm/context/context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH,OAAO,EACL,KAAK,aAAa,EAEnB,MAAM,oBAAoB,CAAC;AAK5B,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3D,OAAO,EAGL,KAAK,s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