@axiom-lattice/local-stores 1.0.19 → 1.0.21
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/.turbo/turbo-build.log +10 -10
- package/CHANGELOG.md +16 -0
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +31 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +31 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/stores/LocalWorkflowTrackingStore.ts +31 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @axiom-lattice/local-stores@1.0.
|
|
2
|
+
> @axiom-lattice/local-stores@1.0.21 build /home/runner/work/agentic/agentic/packages/local-stores
|
|
3
3
|
> tsup src/index.ts --format cjs,esm --dts --sourcemap
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
[34mCLI[39m Target: es2020
|
|
9
9
|
[34mCJS[39m Build start
|
|
10
10
|
[34mESM[39m Build start
|
|
11
|
-
[32mESM[39m [1mdist/index.mjs [22m[
|
|
12
|
-
[32mESM[39m [1mdist/index.mjs.map [22m[
|
|
13
|
-
[32mESM[39m ⚡️ Build success in
|
|
14
|
-
[32mCJS[39m [1mdist/index.js [22m[
|
|
15
|
-
[32mCJS[39m [1mdist/index.js.map [22m[
|
|
16
|
-
[32mCJS[39m ⚡️ Build success in
|
|
11
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m120.87 KB[39m
|
|
12
|
+
[32mESM[39m [1mdist/index.mjs.map [22m[32m229.59 KB[39m
|
|
13
|
+
[32mESM[39m ⚡️ Build success in 323ms
|
|
14
|
+
[32mCJS[39m [1mdist/index.js [22m[32m124.21 KB[39m
|
|
15
|
+
[32mCJS[39m [1mdist/index.js.map [22m[32m232.26 KB[39m
|
|
16
|
+
[32mCJS[39m ⚡️ Build success in 350ms
|
|
17
17
|
[34mDTS[39m Build start
|
|
18
|
-
[32mDTS[39m ⚡️ Build success in
|
|
19
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[32m27.
|
|
20
|
-
[32mDTS[39m [1mdist/index.d.mts [22m[32m27.
|
|
18
|
+
[32mDTS[39m ⚡️ Build success in 13776ms
|
|
19
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m27.83 KB[39m
|
|
20
|
+
[32mDTS[39m [1mdist/index.d.mts [22m[32m27.83 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @axiom-lattice/local-stores
|
|
2
2
|
|
|
3
|
+
## 1.0.21
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 2d1c9f4: enhance core
|
|
8
|
+
- Updated dependencies [2d1c9f4]
|
|
9
|
+
- @axiom-lattice/core@2.1.99
|
|
10
|
+
- @axiom-lattice/protocols@2.1.51
|
|
11
|
+
|
|
12
|
+
## 1.0.20
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies [4e028de]
|
|
17
|
+
- @axiom-lattice/core@2.1.98
|
|
18
|
+
|
|
3
19
|
## 1.0.19
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SqlJsStatic, Database } from 'sql.js';
|
|
2
2
|
import { SqliteSaver } from '@langchain/langgraph-checkpoint-sqlite';
|
|
3
|
-
import { ThreadStore, Thread, CreateThreadRequest, AssistantStore, Assistant, CreateAssistantRequest, WorkspaceStore, Workspace, CreateWorkspaceRequest, UpdateWorkspaceRequest, ProjectStore, Project, CreateProjectRequest, UpdateProjectRequest, UserStore, User, CreateUserRequest, UpdateUserRequest, TenantStore, Tenant, CreateTenantRequest, UpdateTenantRequest, UserTenantLinkStore, UserTenantLink, CreateUserTenantLinkRequest, UpdateUserTenantLinkRequest, DatabaseConfigStore, DatabaseConfigEntry, CreateDatabaseConfigRequest, UpdateDatabaseConfigRequest, ConnectionStore, ConnectionEntry, MetricsServerConfigStore, MetricsServerConfigEntry, CreateMetricsServerConfigRequest, UpdateMetricsServerConfigRequest, McpServerConfigStore, McpServerConfigEntry, CreateMcpServerConfigRequest, UpdateMcpServerConfigRequest, WorkflowTrackingStore, CreateWorkflowRunRequest, WorkflowRun, UpdateWorkflowRunRequest, CreateRunStepRequest, RunStep, UpdateRunStepRequest, StepType, EvalStore, EvalProject, CreateEvalProjectRequest, EvalSuite, CreateEvalSuiteRequest, EvalCase, CreateEvalCaseRequest, EvalRun, CreateEvalRunRequest, EvalRunResult, EvalProjectReport, BindingRegistry, Binding, CreateBindingInput, ChannelInstallationStore, ChannelInstallation, ChannelInstallationType, CreateChannelInstallationRequest, UpdateChannelInstallationRequest, A2AApiKeyStore, A2AApiKeyRecord, CreateA2AApiKeyInput, A2AApiKeyEntry, SkillStore, SkillStoreContext, Skill, CreateSkillRequest, ScheduleStorage, ScheduledTaskDefinition, ScheduledTaskStatus, ScheduleExecutionType, TaskStore, CreateTaskRequest, TaskItem, TaskListFilter, UpdateTaskRequest } from '@axiom-lattice/protocols';
|
|
3
|
+
import { ThreadStore, Thread, CreateThreadRequest, AssistantStore, Assistant, CreateAssistantRequest, WorkspaceStore, Workspace, CreateWorkspaceRequest, UpdateWorkspaceRequest, ProjectStore, Project, CreateProjectRequest, UpdateProjectRequest, UserStore, User, CreateUserRequest, UpdateUserRequest, TenantStore, Tenant, CreateTenantRequest, UpdateTenantRequest, UserTenantLinkStore, UserTenantLink, CreateUserTenantLinkRequest, UpdateUserTenantLinkRequest, DatabaseConfigStore, DatabaseConfigEntry, CreateDatabaseConfigRequest, UpdateDatabaseConfigRequest, ConnectionStore, ConnectionEntry, MetricsServerConfigStore, MetricsServerConfigEntry, CreateMetricsServerConfigRequest, UpdateMetricsServerConfigRequest, McpServerConfigStore, McpServerConfigEntry, CreateMcpServerConfigRequest, UpdateMcpServerConfigRequest, WorkflowTrackingStore, CreateWorkflowRunRequest, WorkflowRun, UpdateWorkflowRunRequest, QueryWorkflowRunsOptions, QueryWorkflowRunsResult, CreateRunStepRequest, RunStep, UpdateRunStepRequest, StepType, EvalStore, EvalProject, CreateEvalProjectRequest, EvalSuite, CreateEvalSuiteRequest, EvalCase, CreateEvalCaseRequest, EvalRun, CreateEvalRunRequest, EvalRunResult, EvalProjectReport, BindingRegistry, Binding, CreateBindingInput, ChannelInstallationStore, ChannelInstallation, ChannelInstallationType, CreateChannelInstallationRequest, UpdateChannelInstallationRequest, A2AApiKeyStore, A2AApiKeyRecord, CreateA2AApiKeyInput, A2AApiKeyEntry, SkillStore, SkillStoreContext, Skill, CreateSkillRequest, ScheduleStorage, ScheduledTaskDefinition, ScheduledTaskStatus, ScheduleExecutionType, TaskStore, CreateTaskRequest, TaskItem, TaskListFilter, UpdateTaskRequest } from '@axiom-lattice/protocols';
|
|
4
4
|
import { IMessageQueueStore, AddMessageParams, PendingMessage, ThreadInfo } from '@axiom-lattice/core';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -371,6 +371,7 @@ declare class LocalWorkflowTrackingStore implements WorkflowTrackingStore {
|
|
|
371
371
|
getWorkflowRunsByThreadId(tenantId: string, threadId: string): Promise<WorkflowRun[]>;
|
|
372
372
|
getWorkflowRunsByAssistantId(tenantId: string, assistantId: string): Promise<WorkflowRun[]>;
|
|
373
373
|
getWorkflowRunsByTenantId(tenantId: string): Promise<WorkflowRun[]>;
|
|
374
|
+
queryWorkflowRuns(tenantId: string, options?: QueryWorkflowRunsOptions): Promise<QueryWorkflowRunsResult>;
|
|
374
375
|
createRunStep(request: CreateRunStepRequest): Promise<RunStep>;
|
|
375
376
|
upsertRunStep(request: CreateRunStepRequest): Promise<RunStep>;
|
|
376
377
|
updateRunStep(runId: string, stepId: string, updates: UpdateRunStepRequest): Promise<RunStep | null>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SqlJsStatic, Database } from 'sql.js';
|
|
2
2
|
import { SqliteSaver } from '@langchain/langgraph-checkpoint-sqlite';
|
|
3
|
-
import { ThreadStore, Thread, CreateThreadRequest, AssistantStore, Assistant, CreateAssistantRequest, WorkspaceStore, Workspace, CreateWorkspaceRequest, UpdateWorkspaceRequest, ProjectStore, Project, CreateProjectRequest, UpdateProjectRequest, UserStore, User, CreateUserRequest, UpdateUserRequest, TenantStore, Tenant, CreateTenantRequest, UpdateTenantRequest, UserTenantLinkStore, UserTenantLink, CreateUserTenantLinkRequest, UpdateUserTenantLinkRequest, DatabaseConfigStore, DatabaseConfigEntry, CreateDatabaseConfigRequest, UpdateDatabaseConfigRequest, ConnectionStore, ConnectionEntry, MetricsServerConfigStore, MetricsServerConfigEntry, CreateMetricsServerConfigRequest, UpdateMetricsServerConfigRequest, McpServerConfigStore, McpServerConfigEntry, CreateMcpServerConfigRequest, UpdateMcpServerConfigRequest, WorkflowTrackingStore, CreateWorkflowRunRequest, WorkflowRun, UpdateWorkflowRunRequest, CreateRunStepRequest, RunStep, UpdateRunStepRequest, StepType, EvalStore, EvalProject, CreateEvalProjectRequest, EvalSuite, CreateEvalSuiteRequest, EvalCase, CreateEvalCaseRequest, EvalRun, CreateEvalRunRequest, EvalRunResult, EvalProjectReport, BindingRegistry, Binding, CreateBindingInput, ChannelInstallationStore, ChannelInstallation, ChannelInstallationType, CreateChannelInstallationRequest, UpdateChannelInstallationRequest, A2AApiKeyStore, A2AApiKeyRecord, CreateA2AApiKeyInput, A2AApiKeyEntry, SkillStore, SkillStoreContext, Skill, CreateSkillRequest, ScheduleStorage, ScheduledTaskDefinition, ScheduledTaskStatus, ScheduleExecutionType, TaskStore, CreateTaskRequest, TaskItem, TaskListFilter, UpdateTaskRequest } from '@axiom-lattice/protocols';
|
|
3
|
+
import { ThreadStore, Thread, CreateThreadRequest, AssistantStore, Assistant, CreateAssistantRequest, WorkspaceStore, Workspace, CreateWorkspaceRequest, UpdateWorkspaceRequest, ProjectStore, Project, CreateProjectRequest, UpdateProjectRequest, UserStore, User, CreateUserRequest, UpdateUserRequest, TenantStore, Tenant, CreateTenantRequest, UpdateTenantRequest, UserTenantLinkStore, UserTenantLink, CreateUserTenantLinkRequest, UpdateUserTenantLinkRequest, DatabaseConfigStore, DatabaseConfigEntry, CreateDatabaseConfigRequest, UpdateDatabaseConfigRequest, ConnectionStore, ConnectionEntry, MetricsServerConfigStore, MetricsServerConfigEntry, CreateMetricsServerConfigRequest, UpdateMetricsServerConfigRequest, McpServerConfigStore, McpServerConfigEntry, CreateMcpServerConfigRequest, UpdateMcpServerConfigRequest, WorkflowTrackingStore, CreateWorkflowRunRequest, WorkflowRun, UpdateWorkflowRunRequest, QueryWorkflowRunsOptions, QueryWorkflowRunsResult, CreateRunStepRequest, RunStep, UpdateRunStepRequest, StepType, EvalStore, EvalProject, CreateEvalProjectRequest, EvalSuite, CreateEvalSuiteRequest, EvalCase, CreateEvalCaseRequest, EvalRun, CreateEvalRunRequest, EvalRunResult, EvalProjectReport, BindingRegistry, Binding, CreateBindingInput, ChannelInstallationStore, ChannelInstallation, ChannelInstallationType, CreateChannelInstallationRequest, UpdateChannelInstallationRequest, A2AApiKeyStore, A2AApiKeyRecord, CreateA2AApiKeyInput, A2AApiKeyEntry, SkillStore, SkillStoreContext, Skill, CreateSkillRequest, ScheduleStorage, ScheduledTaskDefinition, ScheduledTaskStatus, ScheduleExecutionType, TaskStore, CreateTaskRequest, TaskItem, TaskListFilter, UpdateTaskRequest } from '@axiom-lattice/protocols';
|
|
4
4
|
import { IMessageQueueStore, AddMessageParams, PendingMessage, ThreadInfo } from '@axiom-lattice/core';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -371,6 +371,7 @@ declare class LocalWorkflowTrackingStore implements WorkflowTrackingStore {
|
|
|
371
371
|
getWorkflowRunsByThreadId(tenantId: string, threadId: string): Promise<WorkflowRun[]>;
|
|
372
372
|
getWorkflowRunsByAssistantId(tenantId: string, assistantId: string): Promise<WorkflowRun[]>;
|
|
373
373
|
getWorkflowRunsByTenantId(tenantId: string): Promise<WorkflowRun[]>;
|
|
374
|
+
queryWorkflowRuns(tenantId: string, options?: QueryWorkflowRunsOptions): Promise<QueryWorkflowRunsResult>;
|
|
374
375
|
createRunStep(request: CreateRunStepRequest): Promise<RunStep>;
|
|
375
376
|
upsertRunStep(request: CreateRunStepRequest): Promise<RunStep>;
|
|
376
377
|
updateRunStep(runId: string, stepId: string, updates: UpdateRunStepRequest): Promise<RunStep | null>;
|
package/dist/index.js
CHANGED
|
@@ -1622,6 +1622,7 @@ CREATE TABLE IF NOT EXISTS lt_workflow_runs (
|
|
|
1622
1622
|
);
|
|
1623
1623
|
CREATE INDEX IF NOT EXISTS idx_lt_wr_thread ON lt_workflow_runs(tenant_id, thread_id);
|
|
1624
1624
|
CREATE INDEX IF NOT EXISTS idx_lt_wr_assistant ON lt_workflow_runs(tenant_id, assistant_id);
|
|
1625
|
+
CREATE INDEX IF NOT EXISTS idx_lt_wr_tenant_status ON lt_workflow_runs(tenant_id, status, updated_at DESC);
|
|
1625
1626
|
|
|
1626
1627
|
CREATE TABLE IF NOT EXISTS lt_workflow_steps (
|
|
1627
1628
|
id TEXT NOT NULL,
|
|
@@ -1747,6 +1748,36 @@ var LocalWorkflowTrackingStore = class {
|
|
|
1747
1748
|
).all(tenantId);
|
|
1748
1749
|
return rows.map(mapRowToRun);
|
|
1749
1750
|
}
|
|
1751
|
+
async queryWorkflowRuns(tenantId, options = {}) {
|
|
1752
|
+
const conditions = ["tenant_id = ?"];
|
|
1753
|
+
const whereParams = [tenantId];
|
|
1754
|
+
if (options.status) {
|
|
1755
|
+
conditions.push("status = ?");
|
|
1756
|
+
whereParams.push(options.status);
|
|
1757
|
+
}
|
|
1758
|
+
if (options.assistantId) {
|
|
1759
|
+
conditions.push("assistant_id = ?");
|
|
1760
|
+
whereParams.push(options.assistantId);
|
|
1761
|
+
}
|
|
1762
|
+
const where = conditions.join(" AND ");
|
|
1763
|
+
const countRow = this.db.prepare(
|
|
1764
|
+
`SELECT COUNT(*) AS count FROM lt_workflow_runs WHERE ${where}`
|
|
1765
|
+
).get(...whereParams);
|
|
1766
|
+
const selectParams = [...whereParams];
|
|
1767
|
+
let sql = `SELECT * FROM lt_workflow_runs WHERE ${where} ORDER BY updated_at DESC, id DESC`;
|
|
1768
|
+
if (options.limit !== void 0) {
|
|
1769
|
+
sql += " LIMIT ?";
|
|
1770
|
+
selectParams.push(options.limit);
|
|
1771
|
+
} else if (options.offset !== void 0) {
|
|
1772
|
+
sql += " LIMIT -1";
|
|
1773
|
+
}
|
|
1774
|
+
if (options.offset !== void 0) {
|
|
1775
|
+
sql += " OFFSET ?";
|
|
1776
|
+
selectParams.push(options.offset);
|
|
1777
|
+
}
|
|
1778
|
+
const rows = this.db.prepare(sql).all(...selectParams);
|
|
1779
|
+
return { records: rows.map(mapRowToRun), total: countRow.count };
|
|
1780
|
+
}
|
|
1750
1781
|
async createRunStep(request) {
|
|
1751
1782
|
const now = nowISO();
|
|
1752
1783
|
const id = `step_${Date.now()}_${Math.random().toString(36).slice(2, 8)}`;
|