@ariaflowagents/cf-agent 0.7.0 → 0.9.0
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/README.md +436 -135
- package/dist/AriaFlowAgent.d.ts +109 -0
- package/dist/AriaFlowAgent.d.ts.map +1 -0
- package/dist/AriaFlowAgent.js +170 -0
- package/dist/AriaFlowAgent.js.map +1 -0
- package/dist/BridgeSessionStore.d.ts +37 -0
- package/dist/BridgeSessionStore.d.ts.map +1 -0
- package/dist/BridgeSessionStore.js +120 -0
- package/dist/BridgeSessionStore.js.map +1 -0
- package/dist/OrchestrationStore.d.ts +25 -0
- package/dist/OrchestrationStore.d.ts.map +1 -0
- package/dist/OrchestrationStore.js +63 -0
- package/dist/OrchestrationStore.js.map +1 -0
- package/dist/StreamAdapter.d.ts +19 -0
- package/dist/StreamAdapter.d.ts.map +1 -0
- package/dist/StreamAdapter.js +205 -0
- package/dist/StreamAdapter.js.map +1 -0
- package/dist/index.d.ts +33 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +31 -3
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +37 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +6 -0
- package/dist/types.js.map +1 -0
- package/package.json +37 -27
- package/dist/AriaFlowChatAgent.d.ts +0 -24
- package/dist/AriaFlowChatAgent.d.ts.map +0 -1
- package/dist/AriaFlowChatAgent.js +0 -153
- package/dist/AriaFlowChatAgent.js.map +0 -1
- package/dist/AriaFlowFlowAgent.d.ts +0 -88
- package/dist/AriaFlowFlowAgent.d.ts.map +0 -1
- package/dist/AriaFlowFlowAgent.js +0 -185
- package/dist/AriaFlowFlowAgent.js.map +0 -1
- package/dist/stores/CloudflareSQLiteStore.d.ts +0 -12
- package/dist/stores/CloudflareSQLiteStore.d.ts.map +0 -1
- package/dist/stores/CloudflareSQLiteStore.js +0 -99
- package/dist/stores/CloudflareSQLiteStore.js.map +0 -1
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import { Agent, type Connection, type WSMessage } from 'agents';
|
|
2
|
-
import { AgentFlowManager, type FlowContext, type FlowStreamPart, type FlowHooks, type ToolSet } from '@ariaflowagents/core';
|
|
3
|
-
import type { LanguageModel } from 'ai';
|
|
4
|
-
export interface AriaFlowFlowConfig {
|
|
5
|
-
initialNode: string;
|
|
6
|
-
model: LanguageModel;
|
|
7
|
-
defaultRolePrompt?: string;
|
|
8
|
-
nodes: readonly FlowNodeConfig[];
|
|
9
|
-
hooks?: FlowHooks;
|
|
10
|
-
globalTools?: ToolSet;
|
|
11
|
-
defaultContextStrategy?: ContextStrategyConfig;
|
|
12
|
-
}
|
|
13
|
-
export interface FlowNodeConfig {
|
|
14
|
-
name: string;
|
|
15
|
-
description?: string;
|
|
16
|
-
rolePrompt?: string;
|
|
17
|
-
taskPrompt: string;
|
|
18
|
-
tools?: ToolSet;
|
|
19
|
-
preActions?: FlowAction[];
|
|
20
|
-
postActions?: FlowAction[];
|
|
21
|
-
contextStrategy?: ContextStrategyConfig;
|
|
22
|
-
autoRespond?: boolean;
|
|
23
|
-
maxTurns?: number;
|
|
24
|
-
}
|
|
25
|
-
export type FlowAction = {
|
|
26
|
-
type: 'say';
|
|
27
|
-
text: string;
|
|
28
|
-
} | {
|
|
29
|
-
type: 'end';
|
|
30
|
-
message?: string;
|
|
31
|
-
} | {
|
|
32
|
-
type: 'function';
|
|
33
|
-
handler: FlowActionHandler;
|
|
34
|
-
} | {
|
|
35
|
-
type: 'delay';
|
|
36
|
-
ms: number;
|
|
37
|
-
} | {
|
|
38
|
-
type: 'emit';
|
|
39
|
-
event: string;
|
|
40
|
-
data?: unknown;
|
|
41
|
-
};
|
|
42
|
-
export type FlowActionHandler = (context: FlowContext) => Promise<void>;
|
|
43
|
-
export interface ContextStrategyConfig {
|
|
44
|
-
strategy: 'append' | 'reset' | 'reset_with_summary';
|
|
45
|
-
summaryPrompt?: string;
|
|
46
|
-
summaryMaxTokens?: number;
|
|
47
|
-
}
|
|
48
|
-
export type AriaFlowFlowFactory = AgentFlowManager | AriaFlowFlowConfig;
|
|
49
|
-
export type AriaFlowFlowPayload = {
|
|
50
|
-
type?: string;
|
|
51
|
-
text?: string;
|
|
52
|
-
message?: string;
|
|
53
|
-
content?: string;
|
|
54
|
-
sessionId?: string;
|
|
55
|
-
userId?: string;
|
|
56
|
-
};
|
|
57
|
-
/**
|
|
58
|
-
* AriaFlowFlowAgent - Cloudflare Durable Object for AgentFlowManager
|
|
59
|
-
*
|
|
60
|
-
* Use this when you need a structured, multi-step conversation flow.
|
|
61
|
-
*
|
|
62
|
-
* Features:
|
|
63
|
-
* - Node-based conversation flow
|
|
64
|
-
* - Tools that drive transitions via createFlowTransition()
|
|
65
|
-
* - Flow hooks for observability
|
|
66
|
-
* - Context strategies (append, reset, reset_with_summary)
|
|
67
|
-
* - State persistence
|
|
68
|
-
*/
|
|
69
|
-
export declare abstract class AriaFlowFlowAgent<Env = unknown, State = unknown> extends Agent<Env, State> {
|
|
70
|
-
protected flowManager: AgentFlowManager;
|
|
71
|
-
/**
|
|
72
|
-
* Create the flow configuration.
|
|
73
|
-
*
|
|
74
|
-
* Returns:
|
|
75
|
-
* - AgentFlowManager - Direct instance (for custom initialization)
|
|
76
|
-
* - AriaFlowFlowConfig - Config to build AgentFlowManager (recommended)
|
|
77
|
-
*/
|
|
78
|
-
abstract createFlowConfig(): Promise<AriaFlowFlowFactory> | AriaFlowFlowFactory;
|
|
79
|
-
protected getContextId(): string | null;
|
|
80
|
-
protected getFlowHooks(): FlowHooks;
|
|
81
|
-
protected shouldBroadcast(): boolean;
|
|
82
|
-
protected sendPart(connection: Connection, part: FlowStreamPart): void;
|
|
83
|
-
onStart(): Promise<void>;
|
|
84
|
-
protected ensureInitialized(): Promise<void>;
|
|
85
|
-
onMessage(connection: Connection, message: WSMessage): Promise<void>;
|
|
86
|
-
onRequest(request: Request): Promise<Response>;
|
|
87
|
-
}
|
|
88
|
-
//# sourceMappingURL=AriaFlowFlowAg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A2BnC,SAAS,CAAC,eAAe,IAAI,OAAO;IAIpC,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,cAAc,GAAG,IAAI;IAYhE,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;cAKd,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC;IAiC5C,SAAS,CAAC,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;IA+BpE,SAAS,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC;CA2BrD"}
|
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
import { Agent } from 'agents';
|
|
2
|
-
import { AgentFlowManager, } from '@ariaflowagents/core';
|
|
3
|
-
import { CloudflareSQLiteStore } from './stores/CloudflareSQLiteStore.js';
|
|
4
|
-
const mergeFlowHooks = (base, extra) => {
|
|
5
|
-
if (!base)
|
|
6
|
-
return extra ?? {};
|
|
7
|
-
if (!extra)
|
|
8
|
-
return base;
|
|
9
|
-
const merged = { ...base };
|
|
10
|
-
for (const [key, hook] of Object.entries(extra)) {
|
|
11
|
-
const hookKey = key;
|
|
12
|
-
const existing = merged[hookKey];
|
|
13
|
-
if (!hook)
|
|
14
|
-
continue;
|
|
15
|
-
if (existing) {
|
|
16
|
-
merged[hookKey] = (async (...args) => {
|
|
17
|
-
await existing(...args);
|
|
18
|
-
await hook(...args);
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
else {
|
|
22
|
-
merged[hookKey] = hook;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
return merged;
|
|
26
|
-
};
|
|
27
|
-
const coerceToString = (message) => {
|
|
28
|
-
if (typeof message === 'string') {
|
|
29
|
-
return message;
|
|
30
|
-
}
|
|
31
|
-
if (message instanceof ArrayBuffer) {
|
|
32
|
-
return new TextDecoder().decode(message);
|
|
33
|
-
}
|
|
34
|
-
if (ArrayBuffer.isView(message)) {
|
|
35
|
-
return new TextDecoder().decode(message.buffer);
|
|
36
|
-
}
|
|
37
|
-
return null;
|
|
38
|
-
};
|
|
39
|
-
const parsePayload = (raw) => {
|
|
40
|
-
const asString = coerceToString(raw);
|
|
41
|
-
if (!asString)
|
|
42
|
-
return null;
|
|
43
|
-
try {
|
|
44
|
-
return JSON.parse(asString);
|
|
45
|
-
}
|
|
46
|
-
catch {
|
|
47
|
-
return { text: asString };
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
// ═══════════════════════════════════════════════════════════════
|
|
51
|
-
// AriaFlowFlowAgent - For Structured Flows
|
|
52
|
-
// ═══════════════════════════════════════════════════════════════
|
|
53
|
-
/**
|
|
54
|
-
* AriaFlowFlowAgent - Cloudflare Durable Object for AgentFlowManager
|
|
55
|
-
*
|
|
56
|
-
* Use this when you need a structured, multi-step conversation flow.
|
|
57
|
-
*
|
|
58
|
-
* Features:
|
|
59
|
-
* - Node-based conversation flow
|
|
60
|
-
* - Tools that drive transitions via createFlowTransition()
|
|
61
|
-
* - Flow hooks for observability
|
|
62
|
-
* - Context strategies (append, reset, reset_with_summary)
|
|
63
|
-
* - State persistence
|
|
64
|
-
*/
|
|
65
|
-
export class AriaFlowFlowAgent extends Agent {
|
|
66
|
-
flowManager;
|
|
67
|
-
getContextId() {
|
|
68
|
-
const ctx = this.ctx;
|
|
69
|
-
return ctx?.id?.toString?.() ?? null;
|
|
70
|
-
}
|
|
71
|
-
getFlowHooks() {
|
|
72
|
-
return {
|
|
73
|
-
onNodeEnter: async (_context, node) => {
|
|
74
|
-
if (this.setState) {
|
|
75
|
-
const state = this.state;
|
|
76
|
-
this.setState({
|
|
77
|
-
...state,
|
|
78
|
-
currentNode: node.name ?? 'unknown',
|
|
79
|
-
updatedAt: Date.now(),
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
onTransition: async (_context, _from, to, _data) => {
|
|
84
|
-
if (this.setState) {
|
|
85
|
-
const state = this.state;
|
|
86
|
-
const nodeHistory = state.nodeHistory ?? [];
|
|
87
|
-
this.setState({
|
|
88
|
-
...state,
|
|
89
|
-
currentNode: to,
|
|
90
|
-
nodeHistory: [...nodeHistory, to],
|
|
91
|
-
updatedAt: Date.now(),
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
},
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
shouldBroadcast() {
|
|
98
|
-
return true;
|
|
99
|
-
}
|
|
100
|
-
sendPart(connection, part) {
|
|
101
|
-
const payload = JSON.stringify(part);
|
|
102
|
-
const broadcaster = this;
|
|
103
|
-
if (this.shouldBroadcast() && typeof broadcaster.broadcast === 'function') {
|
|
104
|
-
broadcaster.broadcast(payload);
|
|
105
|
-
return;
|
|
106
|
-
}
|
|
107
|
-
connection.send(payload);
|
|
108
|
-
}
|
|
109
|
-
async onStart() {
|
|
110
|
-
await super.onStart();
|
|
111
|
-
await this.ensureInitialized();
|
|
112
|
-
}
|
|
113
|
-
async ensureInitialized() {
|
|
114
|
-
if (this.flowManager)
|
|
115
|
-
return;
|
|
116
|
-
const config = await this.createFlowConfig();
|
|
117
|
-
// Direct AgentFlowManager instance
|
|
118
|
-
if (config instanceof AgentFlowManager) {
|
|
119
|
-
this.flowManager = config;
|
|
120
|
-
return;
|
|
121
|
-
}
|
|
122
|
-
// Config object - build AgentFlowManager with session store
|
|
123
|
-
if ('nodes' in config && 'initialNode' in config) {
|
|
124
|
-
const hooks = mergeFlowHooks(config.hooks, this.getFlowHooks());
|
|
125
|
-
const sessionStore = new CloudflareSQLiteStore(this.sql.bind(this));
|
|
126
|
-
this.flowManager = new AgentFlowManager({
|
|
127
|
-
...config,
|
|
128
|
-
hooks,
|
|
129
|
-
}, this.getContextId() ?? 'flow-agent', undefined, sessionStore, this.name);
|
|
130
|
-
await this.flowManager.initialize();
|
|
131
|
-
return;
|
|
132
|
-
}
|
|
133
|
-
throw new Error('Invalid flow configuration. Must be AgentFlowManager or AriaFlowFlowConfig');
|
|
134
|
-
}
|
|
135
|
-
async onMessage(connection, message) {
|
|
136
|
-
await this.ensureInitialized();
|
|
137
|
-
const payload = parsePayload(message);
|
|
138
|
-
if (!payload)
|
|
139
|
-
return;
|
|
140
|
-
if (payload.type === 'ping') {
|
|
141
|
-
connection.send(JSON.stringify({ type: 'pong' }));
|
|
142
|
-
return;
|
|
143
|
-
}
|
|
144
|
-
const input = payload.text ?? payload.message ?? payload.content;
|
|
145
|
-
if (typeof input !== 'string' || !input.trim()) {
|
|
146
|
-
connection.send(JSON.stringify({ type: 'error', error: 'Message content required' }));
|
|
147
|
-
return;
|
|
148
|
-
}
|
|
149
|
-
try {
|
|
150
|
-
for await (const part of this.flowManager.process(input)) {
|
|
151
|
-
this.sendPart(connection, part);
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
catch (error) {
|
|
155
|
-
connection.send(JSON.stringify({
|
|
156
|
-
type: 'error',
|
|
157
|
-
error: error.message,
|
|
158
|
-
}));
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
async onRequest(request) {
|
|
162
|
-
await this.ensureInitialized();
|
|
163
|
-
const url = new URL(request.url);
|
|
164
|
-
if (url.pathname.endsWith('/info')) {
|
|
165
|
-
return Response.json({
|
|
166
|
-
agentId: this.getContextId(),
|
|
167
|
-
flowManagerReady: true,
|
|
168
|
-
currentNode: this.flowManager?.currentNodeName ?? 'unknown',
|
|
169
|
-
nodeHistory: this.flowManager?.nodeHistory ?? [],
|
|
170
|
-
hasEnded: this.flowManager?.hasEnded ?? false,
|
|
171
|
-
timestamp: Date.now(),
|
|
172
|
-
});
|
|
173
|
-
}
|
|
174
|
-
if (url.pathname.endsWith('/flow-state')) {
|
|
175
|
-
return Response.json({
|
|
176
|
-
currentNode: this.flowManager?.currentNodeName ?? 'unknown',
|
|
177
|
-
nodeHistory: this.flowManager?.nodeHistory ?? [],
|
|
178
|
-
collectedData: this.flowManager?.collectedData ?? {},
|
|
179
|
-
hasEnded: this.flowManager?.hasEnded ?? false,
|
|
180
|
-
});
|
|
181
|
-
}
|
|
182
|
-
return new Response("Not implemented", { status: 501 });
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
//# sourceMappingURL=AriaFlowFlowAgent.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AriaFlowFlowAgent.js","sourceRoot":"","sources":["../src/AriaFlowFlowAgent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAmC,MAAM,QAAQ,CAAC;AAChE,OAAO,EACL,gBAAgB,GAMjB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AA8D1E,MAAM,cAAc,GAAG,CAAC,IAAgB,EAAE,KAAiB,EAAa,EAAE;IACxE,IAAI,CAAC,IAAI;QAAE,OAAO,KAAK,IAAI,EAAE,CAAC;IAC9B,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IAExB,MAAM,MAAM,GAAG,EAAE,GAAG,IAAI,EAA4C,CAAC;IAErE,KAAK,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QAChD,MAAM,OAAO,GAAG,GAAkB,CAAC;QACnC,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,CAA2B,CAAC;QAC3D,IAAI,CAAC,IAAI;YAAE,SAAS;QAEpB,IAAI,QAAQ,EAAE,CAAC;YACb,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,IAAW,EAAE,EAAE;gBAC1C,MAAM,QAAQ,CAAC,GAAG,IAAI,CAAC,CAAC;gBACxB,MAAO,IAAmB,CAAC,GAAG,IAAI,CAAC,CAAC;YACtC,CAAC,CAA2B,CAAC;QAC/B,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,OAAO,CAAC,GAAG,IAA8B,CAAC;QACnD,CAAC;IACH,CAAC;IAED,OAAO,MAAmB,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AAQ,IAAI,KAAK;gBAC7C,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;aACtB,CAAC,CAAC;QACL,CAAC;QAED,IAAI,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC;YACzC,OAAO,QAAQ,CAAC,IAAI,CAAC;gBACnB,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,eAAe,IAAI,SAAS;gBAC3D,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,WAAW,IAAI,EAAE;gBAChD,aAAa,EAAE,IAAI,CAAC,WAAW,EAAE,aAAa,IAAI,EAAE;gBACpD,QAAQ,EAAE,IAAI,CAAC,WAAW,EAAE,QAAQ,IAAI,KAAK;aAC9C,CAAC,CAAC;QACL,CAAC;QAED,OAAO,IAAI,QAAQ,CAAC,iBAAiB,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;IAC1D,CAAC;CACF"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { Session, SessionStore } from '@ariaflowagents/core';
|
|
2
|
-
export declare class CloudflareSQLiteStore implements SessionStore {
|
|
3
|
-
private sql;
|
|
4
|
-
constructor(sql: any);
|
|
5
|
-
private init;
|
|
6
|
-
get(id: string): Promise<Session | null>;
|
|
7
|
-
save(session: Session): Promise<void>;
|
|
8
|
-
delete(id: string): Promise<void>;
|
|
9
|
-
list(userId?: string): Promise<Session[]>;
|
|
10
|
-
cleanup(maxAgeMs: number): Promise<number>;
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=CloudflareSQLiteStore.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CloudflareSQLiteStore.d.ts","sourceRoot":"","sources":["../../src/stores/CloudflareSQLiteStore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAiClE,qBAAa,qBAAsB,YAAW,YAAY;IAC5C,OAAO,CAAC,GAAG;gBAAH,GAAG,EAAE,GAAG;IAI5B,OAAO,CAAC,IAAI;IAUN,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;IAaxC,IAAI,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAWrC,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIjC,IAAI,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IAmBzC,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAajD"}
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
function reviveSession(raw) {
|
|
2
|
-
const session = { ...raw };
|
|
3
|
-
session.createdAt = new Date(session.createdAt);
|
|
4
|
-
session.updatedAt = new Date(session.updatedAt);
|
|
5
|
-
session.handoffHistory = (session.handoffHistory ?? []).map(record => ({
|
|
6
|
-
...record,
|
|
7
|
-
timestamp: new Date(record.timestamp),
|
|
8
|
-
}));
|
|
9
|
-
if (session.metadata) {
|
|
10
|
-
session.metadata = {
|
|
11
|
-
...session.metadata,
|
|
12
|
-
createdAt: new Date(session.metadata.createdAt),
|
|
13
|
-
lastActiveAt: new Date(session.metadata.lastActiveAt),
|
|
14
|
-
handoffHistory: (session.metadata.handoffHistory ?? []).map(record => ({
|
|
15
|
-
...record,
|
|
16
|
-
timestamp: new Date(record.timestamp),
|
|
17
|
-
})),
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
session.agentStates = Object.fromEntries(Object.entries(session.agentStates ?? {}).map(([agentId, state]) => [
|
|
21
|
-
agentId,
|
|
22
|
-
{
|
|
23
|
-
...state,
|
|
24
|
-
lastActive: new Date(state.lastActive),
|
|
25
|
-
},
|
|
26
|
-
]));
|
|
27
|
-
return session;
|
|
28
|
-
}
|
|
29
|
-
export class CloudflareSQLiteStore {
|
|
30
|
-
sql;
|
|
31
|
-
constructor(sql) {
|
|
32
|
-
this.sql = sql;
|
|
33
|
-
this.init();
|
|
34
|
-
}
|
|
35
|
-
init() {
|
|
36
|
-
this.sql `
|
|
37
|
-
CREATE TABLE IF NOT EXISTS ariaflow_sessions (
|
|
38
|
-
id TEXT PRIMARY KEY,
|
|
39
|
-
data TEXT NOT NULL,
|
|
40
|
-
updated_at DATETIME DEFAULT CURRENT_TIMESTAMP
|
|
41
|
-
)
|
|
42
|
-
`;
|
|
43
|
-
}
|
|
44
|
-
async get(id) {
|
|
45
|
-
const rows = this.sql `SELECT data FROM ariaflow_sessions WHERE id = ${id}`;
|
|
46
|
-
if (rows && rows.length > 0) {
|
|
47
|
-
try {
|
|
48
|
-
return reviveSession(JSON.parse(rows[0].data));
|
|
49
|
-
}
|
|
50
|
-
catch (error) {
|
|
51
|
-
console.error('Failed to parse session data from SQLite', error);
|
|
52
|
-
return null;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
return null;
|
|
56
|
-
}
|
|
57
|
-
async save(session) {
|
|
58
|
-
const data = JSON.stringify(session);
|
|
59
|
-
this.sql `
|
|
60
|
-
INSERT INTO ariaflow_sessions (id, data, updated_at)
|
|
61
|
-
VALUES (${session.id}, ${data}, CURRENT_TIMESTAMP)
|
|
62
|
-
ON CONFLICT(id) DO UPDATE SET
|
|
63
|
-
data = excluded.data,
|
|
64
|
-
updated_at = excluded.updated_at
|
|
65
|
-
`;
|
|
66
|
-
}
|
|
67
|
-
async delete(id) {
|
|
68
|
-
this.sql `DELETE FROM ariaflow_sessions WHERE id = ${id}`;
|
|
69
|
-
}
|
|
70
|
-
async list(userId) {
|
|
71
|
-
const rows = (this.sql `SELECT data FROM ariaflow_sessions` ?? []);
|
|
72
|
-
const sessions = rows
|
|
73
|
-
.map(row => {
|
|
74
|
-
try {
|
|
75
|
-
return reviveSession(JSON.parse(row.data));
|
|
76
|
-
}
|
|
77
|
-
catch {
|
|
78
|
-
return null;
|
|
79
|
-
}
|
|
80
|
-
})
|
|
81
|
-
.filter((session) => session !== null);
|
|
82
|
-
if (!userId) {
|
|
83
|
-
return sessions;
|
|
84
|
-
}
|
|
85
|
-
return sessions.filter((session) => session.userId === userId);
|
|
86
|
-
}
|
|
87
|
-
async cleanup(maxAgeMs) {
|
|
88
|
-
const cutoff = new Date(Date.now() - maxAgeMs).toISOString();
|
|
89
|
-
const result = this.sql `
|
|
90
|
-
DELETE FROM ariaflow_sessions
|
|
91
|
-
WHERE updated_at < ${cutoff}
|
|
92
|
-
`;
|
|
93
|
-
if (typeof result?.changes === 'number') {
|
|
94
|
-
return result.changes;
|
|
95
|
-
}
|
|
96
|
-
return 0;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
//# sourceMappingURL=CloudflareSQLiteStore.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CloudflareSQLiteStore.js","sourceRoot":"","sources":["../../src/stores/CloudflareSQLiteStore.ts"],"names":[],"mappings":"AAEA,SAAS,aAAa,CAAC,GAAY;IACjC,MAAM,OAAO,GAAG,EAAE,GAAG,GAAG,EAAa,CAAC;IACtC,OAAO,CAAC,SAAS,GAAG,IAAI,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChD,OAAO,CAAC,SAAS,GAAG,IAAI,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChD,OAAO,CAAC,cAAc,GAAG,CAAC,OAAO,CAAC,cAAc,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QACrE,GAAG,MAAM;QACT,SAAS,EAAE,IAAI,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC;KACtC,CAAC,CAAC,CAAC;IACJ,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;QACrB,OAAO,CAAC,QAAQ,GAAG;YACjB,GAAG,OAAO,CAAC,QAAQ;YACnB,SAAS,EAAE,IAAI,IAAI,CAAC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