@multiplayer-app/sandbox 0.0.19 → 0.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/dist/agents/html-generator.agent.d.ts +3 -1
- package/dist/agents/html-generator.agent.d.ts.map +1 -1
- package/dist/agents/html-generator.agent.js +90 -4
- package/dist/agents/html-generator.agent.js.map +1 -1
- package/dist/agents/markdown-generator.agent.d.ts.map +1 -1
- package/dist/agents/markdown-generator.agent.js +5 -10
- package/dist/agents/markdown-generator.agent.js.map +1 -1
- package/dist/realtime/init-realtime.d.ts.map +1 -1
- package/dist/realtime/init-realtime.js +18 -2
- package/dist/realtime/init-realtime.js.map +1 -1
- package/dist/realtime/session-artifact-y-socket-io.d.ts +4 -3
- package/dist/realtime/session-artifact-y-socket-io.d.ts.map +1 -1
- package/dist/realtime/session-artifact-y-socket-io.js +17 -7
- package/dist/realtime/session-artifact-y-socket-io.js.map +1 -1
- package/dist/realtime/session-artifact-yjs-store.d.ts +10 -0
- package/dist/realtime/session-artifact-yjs-store.d.ts.map +1 -1
- package/dist/realtime/session-artifact-yjs-store.js +50 -12
- package/dist/realtime/session-artifact-yjs-store.js.map +1 -1
- package/package.json +8 -8
- package/dist/agents/blocknote.agent.d.ts +0 -6
- package/dist/agents/blocknote.agent.d.ts.map +0 -1
- package/dist/agents/blocknote.agent.js +0 -18
- package/dist/agents/blocknote.agent.js.map +0 -1
- package/dist/agents/filingramp-fetch.agent.d.ts +0 -4
- package/dist/agents/filingramp-fetch.agent.d.ts.map +0 -1
- package/dist/agents/filingramp-fetch.agent.js +0 -195
- package/dist/agents/filingramp-fetch.agent.js.map +0 -1
- package/dist/agents/knowledge/filingramp-endpoints.d.ts +0 -23
- package/dist/agents/knowledge/filingramp-endpoints.d.ts.map +0 -1
- package/dist/agents/knowledge/filingramp-endpoints.js +0 -116
- package/dist/agents/knowledge/filingramp-endpoints.js.map +0 -1
- package/dist/agents/shared/blocknote-system-prompt.d.ts +0 -2
- package/dist/agents/shared/blocknote-system-prompt.d.ts.map +0 -1
- package/dist/agents/shared/blocknote-system-prompt.js +0 -40
- package/dist/agents/shared/blocknote-system-prompt.js.map +0 -1
- package/dist/agents/shared/get-latest-session-artifact.tool.d.ts +0 -7
- package/dist/agents/shared/get-latest-session-artifact.tool.d.ts.map +0 -1
- package/dist/agents/shared/get-latest-session-artifact.tool.js +0 -43
- package/dist/agents/shared/get-latest-session-artifact.tool.js.map +0 -1
- package/dist/agents/shared/get-session-artifact-content.tool.d.ts +0 -7
- package/dist/agents/shared/get-session-artifact-content.tool.d.ts.map +0 -1
- package/dist/agents/shared/get-session-artifact-content.tool.js +0 -44
- package/dist/agents/shared/get-session-artifact-content.tool.js.map +0 -1
- package/dist/agents/shared/list-session-artifact-paths.tool.d.ts +0 -5
- package/dist/agents/shared/list-session-artifact-paths.tool.d.ts.map +0 -1
- package/dist/agents/shared/list-session-artifact-paths.tool.js +0 -37
- package/dist/agents/shared/list-session-artifact-paths.tool.js.map +0 -1
- package/dist/lib/ai/agent-ai-service.d.ts +0 -3
- package/dist/lib/ai/agent-ai-service.d.ts.map +0 -1
- package/dist/lib/ai/agent-ai-service.js +0 -15
- package/dist/lib/ai/agent-ai-service.js.map +0 -1
- package/dist/lib/ai/ai-error-details.d.ts +0 -13
- package/dist/lib/ai/ai-error-details.d.ts.map +0 -1
- package/dist/lib/ai/ai-error-details.js +0 -84
- package/dist/lib/ai/ai-error-details.js.map +0 -1
- package/dist/lib/ai/generate-ai-text.d.ts +0 -12
- package/dist/lib/ai/generate-ai-text.d.ts.map +0 -1
- package/dist/lib/ai/generate-ai-text.js +0 -105
- package/dist/lib/ai/generate-ai-text.js.map +0 -1
- package/dist/lib/ai/run-explicit-agent.d.ts +0 -15
- package/dist/lib/ai/run-explicit-agent.d.ts.map +0 -1
- package/dist/lib/ai/run-explicit-agent.js +0 -30
- package/dist/lib/ai/run-explicit-agent.js.map +0 -1
- package/dist/lib/notebooks/notebook-sql-client.d.ts +0 -5
- package/dist/lib/notebooks/notebook-sql-client.d.ts.map +0 -1
- package/dist/lib/notebooks/notebook-sql-client.js +0 -37
- package/dist/lib/notebooks/notebook-sql-client.js.map +0 -1
- package/dist/lib/notebooks/notebook-sql-schema.d.ts +0 -16
- package/dist/lib/notebooks/notebook-sql-schema.d.ts.map +0 -1
- package/dist/lib/notebooks/notebook-sql-schema.js +0 -117
- package/dist/lib/notebooks/notebook-sql-schema.js.map +0 -1
- package/dist/lib/notebooks/notebook-sql.d.ts +0 -9
- package/dist/lib/notebooks/notebook-sql.d.ts.map +0 -1
- package/dist/lib/notebooks/notebook-sql.js +0 -36
- package/dist/lib/notebooks/notebook-sql.js.map +0 -1
- package/dist/lib/session-artifacts/apply-hashline-edits.d.ts +0 -3
- package/dist/lib/session-artifacts/apply-hashline-edits.d.ts.map +0 -1
- package/dist/lib/session-artifacts/apply-hashline-edits.js +0 -25
- package/dist/lib/session-artifacts/apply-hashline-edits.js.map +0 -1
- package/dist/lib/session-artifacts/artifact-text-edit.d.ts +0 -8
- package/dist/lib/session-artifacts/artifact-text-edit.d.ts.map +0 -1
- package/dist/lib/session-artifacts/artifact-text-edit.js +0 -23
- package/dist/lib/session-artifacts/artifact-text-edit.js.map +0 -1
- package/dist/lib/session-artifacts/hashline-tag.d.ts +0 -33
- package/dist/lib/session-artifacts/hashline-tag.d.ts.map +0 -1
- package/dist/lib/session-artifacts/hashline-tag.js +0 -80
- package/dist/lib/session-artifacts/hashline-tag.js.map +0 -1
- package/dist/lib/session-pages/inject-preview-error-reporter.d.ts +0 -3
- package/dist/lib/session-pages/inject-preview-error-reporter.d.ts.map +0 -1
- package/dist/lib/session-pages/inject-preview-error-reporter.js +0 -30
- package/dist/lib/session-pages/inject-preview-error-reporter.js.map +0 -1
- package/dist/lib/session-pages/read-session-artifact.d.ts +0 -7
- package/dist/lib/session-pages/read-session-artifact.d.ts.map +0 -1
- package/dist/lib/session-pages/read-session-artifact.js +0 -60
- package/dist/lib/session-pages/read-session-artifact.js.map +0 -1
- package/dist/lib/session-pages/session-pico-css.d.ts +0 -5
- package/dist/lib/session-pages/session-pico-css.d.ts.map +0 -1
- package/dist/lib/session-pages/session-pico-css.js +0 -11
- package/dist/lib/session-pages/session-pico-css.js.map +0 -1
- package/dist/realtime/realtime-auth.d.ts +0 -12
- package/dist/realtime/realtime-auth.d.ts.map +0 -1
- package/dist/realtime/realtime-auth.js +0 -25
- package/dist/realtime/realtime-auth.js.map +0 -1
- package/dist/realtime/yjs-account-namespace.d.ts +0 -5
- package/dist/realtime/yjs-account-namespace.d.ts.map +0 -1
- package/dist/realtime/yjs-account-namespace.js +0 -21
- package/dist/realtime/yjs-account-namespace.js.map +0 -1
- package/dist/routes/notebooks/sql-execute.d.ts +0 -3
- package/dist/routes/notebooks/sql-execute.d.ts.map +0 -1
- package/dist/routes/notebooks/sql-execute.js +0 -45
- package/dist/routes/notebooks/sql-execute.js.map +0 -1
- package/dist/routes/sql.d.ts +0 -2
- package/dist/routes/sql.d.ts.map +0 -1
- package/dist/routes/sql.js +0 -50
- package/dist/routes/sql.js.map +0 -1
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createFilingRampFetchAgent = createFilingRampFetchAgent;
|
|
4
|
-
const ai_agent_types_1 = require("@multiplayer-app/ai-agent-types");
|
|
5
|
-
const zod_1 = require("zod");
|
|
6
|
-
const filingramp_endpoints_1 = require("./knowledge/filingramp-endpoints");
|
|
7
|
-
const publish_session_artifacts_tool_1 = require("./shared/publish-session-artifacts.tool");
|
|
8
|
-
const searchEndpointsInputSchema = zod_1.z.object({
|
|
9
|
-
query: zod_1.z
|
|
10
|
-
.string()
|
|
11
|
-
.optional()
|
|
12
|
-
.describe('Search path, summary, tags, or parameter names (e.g. filings, dashboard, productId)'),
|
|
13
|
-
service: zod_1.z
|
|
14
|
-
.string()
|
|
15
|
-
.optional()
|
|
16
|
-
.describe('Filter by service section (e.g. ramp-web-api, ramp-library-service)'),
|
|
17
|
-
tag: zod_1.z.string().optional().describe('Filter by OpenAPI tag (e.g. filings, products)'),
|
|
18
|
-
limit: zod_1.z.number().int().min(1).max(50).optional().describe('Max endpoints to return (default 25)'),
|
|
19
|
-
});
|
|
20
|
-
function buildFetchScaffold(baseUrl) {
|
|
21
|
-
return `/**
|
|
22
|
-
* FilingRamp read-only fetch helpers (GET catalog only).
|
|
23
|
-
* Set before running: window.__FILINGRAMP_API_KEY__ = '<api-key>';
|
|
24
|
-
*/
|
|
25
|
-
const FILINGRAMP_BASE_URL = ${JSON.stringify(baseUrl.replace(/\/$/, ''))};
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* @param {string} path - Absolute path from catalog, e.g. "/v1/products"
|
|
29
|
-
* @param {Record<string, string | number | boolean | undefined>} [query]
|
|
30
|
-
*/
|
|
31
|
-
async function filingRampGet(path, query = {}) {
|
|
32
|
-
const url = new URL(path.startsWith('/') ? path : \`/\${path}\`, FILINGRAMP_BASE_URL);
|
|
33
|
-
for (const [key, value] of Object.entries(query)) {
|
|
34
|
-
if (value === undefined || value === null) continue;
|
|
35
|
-
if (Array.isArray(value)) {
|
|
36
|
-
for (const item of value) url.searchParams.append(key, String(item));
|
|
37
|
-
} else {
|
|
38
|
-
url.searchParams.set(key, String(value));
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
const token = globalThis.__FILINGRAMP_API_KEY__ ?? '';
|
|
43
|
-
const headers = { Accept: 'application/json' };
|
|
44
|
-
if (token) headers.Authorization = \`Bearer \${token}\`;
|
|
45
|
-
|
|
46
|
-
const response = await fetch(url.toString(), { headers, method: 'GET' });
|
|
47
|
-
if (!response.ok) {
|
|
48
|
-
const detail = await response.text().catch(() => '');
|
|
49
|
-
throw new Error(\`FilingRamp \${response.status} \${response.statusText}: \${detail}\`.trim());
|
|
50
|
-
}
|
|
51
|
-
const contentType = response.headers.get('content-type') ?? '';
|
|
52
|
-
if (contentType.includes('application/json')) return response.json();
|
|
53
|
-
return response.text();
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/** Paginate list endpoints that support limit/offset. */
|
|
57
|
-
async function filingRampList(path, query = {}, { pageSize = 50, maxPages = 20 } = {}) {
|
|
58
|
-
const items = [];
|
|
59
|
-
let offset = Number(query.offset ?? 0);
|
|
60
|
-
for (let page = 0; page < maxPages; page += 1) {
|
|
61
|
-
const batch = await filingRampGet(path, { ...query, limit: pageSize, offset });
|
|
62
|
-
const rows = Array.isArray(batch) ? batch : batch?.data ?? batch?.items ?? [];
|
|
63
|
-
if (!Array.isArray(rows) || rows.length === 0) break;
|
|
64
|
-
items.push(...rows);
|
|
65
|
-
if (rows.length < pageSize) break;
|
|
66
|
-
offset += rows.length;
|
|
67
|
-
}
|
|
68
|
-
return items;
|
|
69
|
-
}
|
|
70
|
-
`;
|
|
71
|
-
}
|
|
72
|
-
function createFilingRampFetchAgent(deps) {
|
|
73
|
-
const { baseUrl, apiKey } = deps.filingramp;
|
|
74
|
-
return {
|
|
75
|
-
name: 'filingramp-fetch',
|
|
76
|
-
description: 'Generates JavaScript to fetch read-only data from the FilingRamp API',
|
|
77
|
-
defaultModel: deps.defaultModel,
|
|
78
|
-
systemPrompt: `You write browser-ready JavaScript that loads data from the FilingRamp platform using GET endpoints only.
|
|
79
|
-
|
|
80
|
-
Workflow:
|
|
81
|
-
1. Call getFilingRampConfig for base URL and auth notes.
|
|
82
|
-
2. Call getFilingRampEndpoints to find real paths, required query params, and tags — never invent URLs.
|
|
83
|
-
3. Call getFilingRampFetchScaffold for the standard fetch helper, then extend it with domain functions (e.g. loadProducts, loadFiling).
|
|
84
|
-
4. Publish script.js (and optional lib/filingramp-client.js, data/*.json) via publishSessionArtifacts.
|
|
85
|
-
5. Dashboard HTML may be published separately or by the html-generator agent; focus on correct API access here.
|
|
86
|
-
|
|
87
|
-
Rules:
|
|
88
|
-
- Only use endpoints from the catalog (GET / list). No POST, PUT, PATCH, or DELETE.
|
|
89
|
-
- Path params use {id} notation in the catalog — substitute real ids at runtime.
|
|
90
|
-
- Array query params (fields[], productIds[]) must be appended repeatedly in URLSearchParams.
|
|
91
|
-
- Use filingRampGet for single resources and filingRampList when paginating list endpoints.
|
|
92
|
-
- Handle errors with clear messages; do not swallow HTTP failures.
|
|
93
|
-
- Prefer small, composable functions that return JSON ready for charts/tables.`,
|
|
94
|
-
stopWhen: () => false,
|
|
95
|
-
tools: [
|
|
96
|
-
{
|
|
97
|
-
type: ai_agent_types_1.AgentToolType.LOCAL_FUNCTION,
|
|
98
|
-
userConfigurable: true,
|
|
99
|
-
data: {
|
|
100
|
-
title: 'getFilingRampConfig',
|
|
101
|
-
needsApproval: false,
|
|
102
|
-
description: 'Runtime FilingRamp API base URL and auth setup for generated scripts',
|
|
103
|
-
inputSchema: zod_1.z.object({}),
|
|
104
|
-
outputSchema: zod_1.z.object({
|
|
105
|
-
baseUrl: zod_1.z.string(),
|
|
106
|
-
apiKeyConfigured: zod_1.z.boolean(),
|
|
107
|
-
authNotes: zod_1.z.string(),
|
|
108
|
-
}),
|
|
109
|
-
execute: () => ({
|
|
110
|
-
baseUrl,
|
|
111
|
-
apiKeyConfigured: Boolean(apiKey),
|
|
112
|
-
authNotes: 'Browser scripts read window.__FILINGRAMP_API_KEY__. The API server may use FILINGRAMP_API_KEY from env when proxying; set the token in the preview host or inject before running script.js.',
|
|
113
|
-
}),
|
|
114
|
-
},
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
type: ai_agent_types_1.AgentToolType.LOCAL_FUNCTION,
|
|
118
|
-
userConfigurable: true,
|
|
119
|
-
data: {
|
|
120
|
-
title: 'getFilingRampEndpoints',
|
|
121
|
-
needsApproval: false,
|
|
122
|
-
description: 'Search the FilingRamp GET endpoint catalog (from knowledge/filingramp-endpoints.md)',
|
|
123
|
-
inputSchema: searchEndpointsInputSchema,
|
|
124
|
-
outputSchema: zod_1.z.object({
|
|
125
|
-
total: zod_1.z.number(),
|
|
126
|
-
endpoints: zod_1.z.array(zod_1.z.object({
|
|
127
|
-
service: zod_1.z.string(),
|
|
128
|
-
method: zod_1.z.literal('GET'),
|
|
129
|
-
path: zod_1.z.string(),
|
|
130
|
-
type: zod_1.z.string(),
|
|
131
|
-
summary: zod_1.z.string().optional(),
|
|
132
|
-
tags: zod_1.z.array(zod_1.z.string()),
|
|
133
|
-
parameters: zod_1.z.array(zod_1.z.string()),
|
|
134
|
-
})),
|
|
135
|
-
catalogSize: zod_1.z.number(),
|
|
136
|
-
}),
|
|
137
|
-
execute: (input) => {
|
|
138
|
-
const result = (0, filingramp_endpoints_1.searchFilingRampEndpoints)(input);
|
|
139
|
-
return {
|
|
140
|
-
...result,
|
|
141
|
-
catalogSize: (0, filingramp_endpoints_1.getFilingRampEndpointCatalog)().length,
|
|
142
|
-
};
|
|
143
|
-
},
|
|
144
|
-
},
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
type: ai_agent_types_1.AgentToolType.LOCAL_FUNCTION,
|
|
148
|
-
userConfigurable: true,
|
|
149
|
-
data: {
|
|
150
|
-
title: 'getFilingRampEndpointsReference',
|
|
151
|
-
needsApproval: false,
|
|
152
|
-
description: 'Return the full markdown endpoint catalog (large; use search tool first)',
|
|
153
|
-
inputSchema: zod_1.z.object({
|
|
154
|
-
confirm: zod_1.z
|
|
155
|
-
.boolean()
|
|
156
|
-
.describe('Must be true — catalog is large (~90 endpoints)'),
|
|
157
|
-
}),
|
|
158
|
-
outputSchema: zod_1.z.object({
|
|
159
|
-
markdown: zod_1.z.string(),
|
|
160
|
-
catalogSize: zod_1.z.number(),
|
|
161
|
-
}),
|
|
162
|
-
execute: (input) => {
|
|
163
|
-
if (!input.confirm) {
|
|
164
|
-
throw new Error('Set confirm: true to load the full catalog');
|
|
165
|
-
}
|
|
166
|
-
return {
|
|
167
|
-
markdown: (0, filingramp_endpoints_1.loadFilingRampEndpointsMarkdown)(),
|
|
168
|
-
catalogSize: (0, filingramp_endpoints_1.getFilingRampEndpointCatalog)().length,
|
|
169
|
-
};
|
|
170
|
-
},
|
|
171
|
-
},
|
|
172
|
-
},
|
|
173
|
-
{
|
|
174
|
-
type: ai_agent_types_1.AgentToolType.LOCAL_FUNCTION,
|
|
175
|
-
userConfigurable: true,
|
|
176
|
-
data: {
|
|
177
|
-
title: 'getFilingRampFetchScaffold',
|
|
178
|
-
needsApproval: false,
|
|
179
|
-
description: 'Starter script.js with filingRampGet and filingRampList helpers',
|
|
180
|
-
inputSchema: zod_1.z.object({}),
|
|
181
|
-
outputSchema: zod_1.z.object({
|
|
182
|
-
baseUrl: zod_1.z.string(),
|
|
183
|
-
script: zod_1.z.string(),
|
|
184
|
-
}),
|
|
185
|
-
execute: () => ({
|
|
186
|
-
baseUrl,
|
|
187
|
-
script: buildFetchScaffold(baseUrl),
|
|
188
|
-
}),
|
|
189
|
-
},
|
|
190
|
-
},
|
|
191
|
-
(0, publish_session_artifacts_tool_1.createPublishSessionArtifactsTool)({ needsApproval: true, validateIndexHtml: false }),
|
|
192
|
-
],
|
|
193
|
-
};
|
|
194
|
-
}
|
|
195
|
-
//# sourceMappingURL=filingramp-fetch.agent.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"filingramp-fetch.agent.js","sourceRoot":"","sources":["../../src/agents/filingramp-fetch.agent.ts"],"names":[],"mappings":";;AA6EA,gEA+HC;AA3MD,oEAA+D;AAC/D,6BAAuB;AAEvB,2EAIyC;AACzC,4FAA2F;AAE3F,MAAM,0BAA0B,GAAG,OAAC,CAAC,MAAM,CAAC;IAC1C,KAAK,EAAE,OAAC;SACL,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,qFAAqF,CAAC;IAClG,OAAO,EAAE,OAAC;SACP,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,qEAAqE,CAAC;IAClF,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,gDA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}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export interface FilingRampEndpoint {
|
|
2
|
-
service: string;
|
|
3
|
-
method: 'GET';
|
|
4
|
-
path: string;
|
|
5
|
-
type: 'list' | 'get' | string;
|
|
6
|
-
summary?: string;
|
|
7
|
-
tags: string[];
|
|
8
|
-
parameters: string[];
|
|
9
|
-
}
|
|
10
|
-
export declare function loadFilingRampEndpointsMarkdown(): string;
|
|
11
|
-
export declare function parseFilingRampEndpoints(markdown: string): FilingRampEndpoint[];
|
|
12
|
-
export declare function getFilingRampEndpointCatalog(): FilingRampEndpoint[];
|
|
13
|
-
export interface SearchFilingRampEndpointsInput {
|
|
14
|
-
query?: string;
|
|
15
|
-
service?: string;
|
|
16
|
-
tag?: string;
|
|
17
|
-
limit?: number;
|
|
18
|
-
}
|
|
19
|
-
export declare function searchFilingRampEndpoints(input?: SearchFilingRampEndpointsInput): {
|
|
20
|
-
total: number;
|
|
21
|
-
endpoints: FilingRampEndpoint[];
|
|
22
|
-
};
|
|
23
|
-
//# sourceMappingURL=filingramp-endpoints.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"filingramp-endpoints.d.ts","sourceRoot":"","sources":["../../../src/agents/knowledge/filingramp-endpoints.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,KAAK,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,GAAG,KAAK,GAAG,MAAM,CAAA;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,UAAU,EAAE,MAAM,EAAE,CAAA;CACrB;AAqBD,wBAAgB,+BAA+B,IAAI,MAAM,CAIxD;AAED,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,GAAG,kBAAkB,EAAE,CA2D/E;AAED,wBAAgB,4BAA4B,IAAI,kBAAkB,EAAE,CAKnE;AAED,MAAM,WAAW,8BAA8B;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,wBAAgB,yBAAyB,CAAC,KAAK,GAAE,8BAAmC,GAAG;IACrF,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,kBAAkB,EAAE,CAAA;CAChC,CA6BA"}
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.loadFilingRampEndpointsMarkdown = loadFilingRampEndpointsMarkdown;
|
|
7
|
-
exports.parseFilingRampEndpoints = parseFilingRampEndpoints;
|
|
8
|
-
exports.getFilingRampEndpointCatalog = getFilingRampEndpointCatalog;
|
|
9
|
-
exports.searchFilingRampEndpoints = searchFilingRampEndpoints;
|
|
10
|
-
const node_fs_1 = __importDefault(require("node:fs"));
|
|
11
|
-
const node_path_1 = __importDefault(require("node:path"));
|
|
12
|
-
let cachedCatalog = null;
|
|
13
|
-
let cachedRawMarkdown = null;
|
|
14
|
-
function resolveEndpointsFilePath() {
|
|
15
|
-
const candidates = [
|
|
16
|
-
node_path_1.default.join(process.cwd(), 'knowledge', 'filingramp-endpoints.md'),
|
|
17
|
-
node_path_1.default.join(__dirname, '../../../knowledge/filingramp-endpoints.md'),
|
|
18
|
-
node_path_1.default.join(__dirname, '../../../../knowledge/filingramp-endpoints.md'),
|
|
19
|
-
];
|
|
20
|
-
for (const candidate of candidates) {
|
|
21
|
-
if (node_fs_1.default.existsSync(candidate))
|
|
22
|
-
return candidate;
|
|
23
|
-
}
|
|
24
|
-
throw new Error('FilingRamp endpoints catalog not found. Expected knowledge/filingramp-endpoints.md next to the app or @multiplayer-builder/builder-api package.');
|
|
25
|
-
}
|
|
26
|
-
function loadFilingRampEndpointsMarkdown() {
|
|
27
|
-
if (cachedRawMarkdown)
|
|
28
|
-
return cachedRawMarkdown;
|
|
29
|
-
cachedRawMarkdown = node_fs_1.default.readFileSync(resolveEndpointsFilePath(), 'utf8');
|
|
30
|
-
return cachedRawMarkdown;
|
|
31
|
-
}
|
|
32
|
-
function parseFilingRampEndpoints(markdown) {
|
|
33
|
-
const endpoints = [];
|
|
34
|
-
let currentService = 'unknown';
|
|
35
|
-
const lines = markdown.split('\n');
|
|
36
|
-
for (let i = 0; i < lines.length; i++) {
|
|
37
|
-
const line = lines[i];
|
|
38
|
-
const serviceHeading = line.match(/^## (.+)$/);
|
|
39
|
-
if (serviceHeading) {
|
|
40
|
-
currentService = serviceHeading[1].trim();
|
|
41
|
-
continue;
|
|
42
|
-
}
|
|
43
|
-
const endpointHeading = line.match(/^### `GET (.+)`$/);
|
|
44
|
-
if (!endpointHeading)
|
|
45
|
-
continue;
|
|
46
|
-
const endpointPath = endpointHeading[1].trim();
|
|
47
|
-
let type = 'list';
|
|
48
|
-
let summary;
|
|
49
|
-
const tags = [];
|
|
50
|
-
const parameters = [];
|
|
51
|
-
for (let j = i + 1; j < lines.length && !lines[j].startsWith('###'); j++) {
|
|
52
|
-
const detail = lines[j].trim();
|
|
53
|
-
const typeMatch = detail.match(/^- \*\*Type:\*\* (.+)$/);
|
|
54
|
-
if (typeMatch)
|
|
55
|
-
type = typeMatch[1].trim();
|
|
56
|
-
const summaryMatch = detail.match(/^- \*\*Summary:\*\* (.+)$/);
|
|
57
|
-
if (summaryMatch)
|
|
58
|
-
summary = summaryMatch[1].trim();
|
|
59
|
-
const tagsMatch = detail.match(/^- \*\*Tags:\*\* (.+)$/);
|
|
60
|
-
if (tagsMatch) {
|
|
61
|
-
tags.push(...tagsMatch[1].split(',').map((t) => t.trim()).filter(Boolean));
|
|
62
|
-
}
|
|
63
|
-
const paramsMatch = detail.match(/^- \*\*Parameters:\*\* (.+)$/);
|
|
64
|
-
if (paramsMatch) {
|
|
65
|
-
parameters.push(...paramsMatch[1]
|
|
66
|
-
.split(',')
|
|
67
|
-
.map((p) => p.trim())
|
|
68
|
-
.filter(Boolean));
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
endpoints.push({
|
|
72
|
-
service: currentService,
|
|
73
|
-
method: 'GET',
|
|
74
|
-
path: endpointPath,
|
|
75
|
-
type,
|
|
76
|
-
summary,
|
|
77
|
-
tags,
|
|
78
|
-
parameters,
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
return endpoints;
|
|
82
|
-
}
|
|
83
|
-
function getFilingRampEndpointCatalog() {
|
|
84
|
-
if (!cachedCatalog) {
|
|
85
|
-
cachedCatalog = parseFilingRampEndpoints(loadFilingRampEndpointsMarkdown());
|
|
86
|
-
}
|
|
87
|
-
return cachedCatalog;
|
|
88
|
-
}
|
|
89
|
-
function searchFilingRampEndpoints(input = {}) {
|
|
90
|
-
var _a, _b, _c, _d;
|
|
91
|
-
const limit = (_a = input.limit) !== null && _a !== void 0 ? _a : 25;
|
|
92
|
-
const q = (_b = input.query) === null || _b === void 0 ? void 0 : _b.toLowerCase().trim();
|
|
93
|
-
const service = (_c = input.service) === null || _c === void 0 ? void 0 : _c.toLowerCase().trim();
|
|
94
|
-
const tag = (_d = input.tag) === null || _d === void 0 ? void 0 : _d.toLowerCase().trim();
|
|
95
|
-
let results = getFilingRampEndpointCatalog();
|
|
96
|
-
if (service) {
|
|
97
|
-
results = results.filter((e) => e.service.toLowerCase().includes(service));
|
|
98
|
-
}
|
|
99
|
-
if (tag) {
|
|
100
|
-
results = results.filter((e) => e.tags.some((t) => t.toLowerCase().includes(tag)));
|
|
101
|
-
}
|
|
102
|
-
if (q) {
|
|
103
|
-
results = results.filter((e) => {
|
|
104
|
-
var _a;
|
|
105
|
-
const haystack = [e.path, (_a = e.summary) !== null && _a !== void 0 ? _a : '', e.service, ...e.tags, ...e.parameters]
|
|
106
|
-
.join(' ')
|
|
107
|
-
.toLowerCase();
|
|
108
|
-
return haystack.includes(q);
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
return {
|
|
112
|
-
total: results.length,
|
|
113
|
-
endpoints: results.slice(0, limit),
|
|
114
|
-
};
|
|
115
|
-
}
|
|
116
|
-
//# sourceMappingURL=filingramp-endpoints.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"filingramp-endpoints.js","sourceRoot":"","sources":["../../../src/agents/knowledge/filingramp-endpoints.ts"],"names":[],"mappings":";;;;;AAgCA,0EAIC;AAED,4DA2DC;AAED,oEAKC;AASD,8DAgCC;AAjJD,sDAAwB;AACxB,0DAA4B;AAY5B,IAAI,aAAa,GAAgC,IAAI,CAAA;AACrD,IAAI,iBAAiB,GAAkB,IAAI,CAAA;AAE3C,SAAS,wBAAwB;IAC/B,MAAM,UAAU,GAAG;QACjB,mBAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,WAAW,EAAE,yBAAyB,CAAC;QAChE,mBAAI,CAAC,IAAI,CAAC,SAAS,EAAE,4CAA4C,CAAC;QAClE,mBAAI,CAAC,IAAI,CAAC,SAAS,EAAE,+CAA+C,CAAC;KACtE,CAAA;IAED,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACnC,IAAI,iBAAE,CAAC,UAAU,CAAC,SAAS,CAAC;YAAE,OAAO,SAAS,CAAA;IAChD,CAAC;IAED,MAAM,IAAI,KAAK,CACb,iJAAiJ,CAClJ,CAAA;AACH,CAAC;AAED,SAAgB,+BAA+B;IAC7C,IAAI,iBAAiB;QAAE,OAAO,iBAAiB,CAAA;IAC/C,iBAAiB,GAAG,iBAAE,CAAC,YAAY,CAAC,wBAAwB,EAAE,EAAE,MAAM,CAAC,CAAA;IACvE,OAAO,iBAAiB,CAAA;AAC1B,CAAC;AAED,SAAgB,wB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,CAAC;IAED,OAAO;QACL,KAAK,EAAE,OAAO,CAAC,MAAM;QACrB,SAAS,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC;KACnC,CAAA;AACH,CAAC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export declare const BLOCKNOTE_SYSTEM_PROMPT = "You generate and adjust BlockNote/TipTap blocks for collaborative notebooks.\n\nYou must return valid JSON only\u2014no markdown fences, commentary, or extra text unless a task explicitly asks for plain text.\n\nSupported block categories:\n- Generic TipTap blocks: paragraph, heading, bulletList, orderedList, listItem, blockquote, codeBlock, table, taskList, taskItem, horizontalRule, and related inline formatting inside content nodes.\n- runnableCodeBlock: executable code blocks with attrs { _globalName, content, language }.\n- chartBlock: sandboxed UI blocks with attrs { _globalName, html, javascript, css }.\n- sqlBlock: PostgreSQL query blocks with attrs { _globalName, query }.\n\nWhen generating runnableCodeBlock attrs, return:\n{\n \"_globalName\": \"<short identifier>\",\n \"content\": \"<complete executable code>\",\n \"language\": \"javascript\"\n}\n\nWhen generating chartBlock attrs, return:\n{\n \"_globalName\": \"<short identifier>\",\n \"html\": \"<self-contained HTML, include CDN script tags for libraries>\",\n \"javascript\": \"<script logic>\",\n \"css\": \"<styles>\"\n}\n\nWhen generating sqlBlock attrs, return:\n{\n \"_globalName\": \"<short identifier>\",\n \"query\": \"<valid PostgreSQL SELECT statement>\"\n}\n\nsqlBlock queries must be read-only SELECT statements. Do not generate INSERT, UPDATE, DELETE, DDL, or multiple statements.\n\nWhen generating generic TipTap blocks, return a single node object with type, attrs when needed, and nested content arrays that follow TipTap JSON structure.\n\nWhen adjusting an existing block, preserve unrelated attrs and update only what the adjustment requires.";
|
|
2
|
-
//# sourceMappingURL=blocknote-system-prompt.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"blocknote-system-prompt.d.ts","sourceRoot":"","sources":["../../../src/agents/shared/blocknote-system-prompt.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,unDAmCqE,CAAA"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BLOCKNOTE_SYSTEM_PROMPT = void 0;
|
|
4
|
-
exports.BLOCKNOTE_SYSTEM_PROMPT = `You generate and adjust BlockNote/TipTap blocks for collaborative notebooks.
|
|
5
|
-
|
|
6
|
-
You must return valid JSON only—no markdown fences, commentary, or extra text unless a task explicitly asks for plain text.
|
|
7
|
-
|
|
8
|
-
Supported block categories:
|
|
9
|
-
- Generic TipTap blocks: paragraph, heading, bulletList, orderedList, listItem, blockquote, codeBlock, table, taskList, taskItem, horizontalRule, and related inline formatting inside content nodes.
|
|
10
|
-
- runnableCodeBlock: executable code blocks with attrs { _globalName, content, language }.
|
|
11
|
-
- chartBlock: sandboxed UI blocks with attrs { _globalName, html, javascript, css }.
|
|
12
|
-
- sqlBlock: PostgreSQL query blocks with attrs { _globalName, query }.
|
|
13
|
-
|
|
14
|
-
When generating runnableCodeBlock attrs, return:
|
|
15
|
-
{
|
|
16
|
-
"_globalName": "<short identifier>",
|
|
17
|
-
"content": "<complete executable code>",
|
|
18
|
-
"language": "javascript"
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
When generating chartBlock attrs, return:
|
|
22
|
-
{
|
|
23
|
-
"_globalName": "<short identifier>",
|
|
24
|
-
"html": "<self-contained HTML, include CDN script tags for libraries>",
|
|
25
|
-
"javascript": "<script logic>",
|
|
26
|
-
"css": "<styles>"
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
When generating sqlBlock attrs, return:
|
|
30
|
-
{
|
|
31
|
-
"_globalName": "<short identifier>",
|
|
32
|
-
"query": "<valid PostgreSQL SELECT statement>"
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
sqlBlock queries must be read-only SELECT statements. Do not generate INSERT, UPDATE, DELETE, DDL, or multiple statements.
|
|
36
|
-
|
|
37
|
-
When generating generic TipTap blocks, return a single node object with type, attrs when needed, and nested content arrays that follow TipTap JSON structure.
|
|
38
|
-
|
|
39
|
-
When adjusting an existing block, preserve unrelated attrs and update only what the adjustment requires.`;
|
|
40
|
-
//# sourceMappingURL=blocknote-system-prompt.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"blocknote-system-prompt.js","sourceRoot":"","sources":["../../../src/agents/shared/blocknote-system-prompt.ts"],"names":[],"mappings":";;;AAAa,QAAA,uBAAuB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yGAmCkE,CAAA"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { AgentTool } from '@multiplayer-app/ai-agent-types';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
export declare const getLatestSessionArtifactInputSchema: z.ZodObject<{
|
|
4
|
-
path: z.ZodString;
|
|
5
|
-
}, z.core.$strip>;
|
|
6
|
-
export declare function createGetLatestSessionArtifactTool(): AgentTool;
|
|
7
|
-
//# sourceMappingURL=get-latest-session-artifact.tool.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-latest-session-artifact.tool.d.ts","sourceRoot":"","sources":["../../../src/agents/shared/get-latest-session-artifact.tool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAqB,SAAS,EAAE,MAAM,iCAAiC,CAAA;AAGnF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,eAAO,MAAM,mCAAmC;;iBAO9C,CAAA;AAEF,wBAAgB,kCAAkC,IAAI,SAAS,CAgC9D"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getLatestSessionArtifactInputSchema = void 0;
|
|
4
|
-
exports.createGetLatestSessionArtifactTool = createGetLatestSessionArtifactTool;
|
|
5
|
-
const ai_agent_types_1 = require("@multiplayer-app/ai-agent-types");
|
|
6
|
-
const zod_1 = require("zod");
|
|
7
|
-
const read_session_artifact_1 = require("../../lib/session-pages/read-session-artifact");
|
|
8
|
-
const resolve_chat_id_1 = require("../../lib/session-pages/resolve-chat-id");
|
|
9
|
-
exports.getLatestSessionArtifactInputSchema = zod_1.z.object({
|
|
10
|
-
path: zod_1.z
|
|
11
|
-
.string()
|
|
12
|
-
.min(1)
|
|
13
|
-
.describe('Session-relative artifact path (attachment), e.g. index.html, README.md, styles.css, docs/architecture.md'),
|
|
14
|
-
});
|
|
15
|
-
function createGetLatestSessionArtifactTool() {
|
|
16
|
-
return {
|
|
17
|
-
type: ai_agent_types_1.AgentToolType.LOCAL_FUNCTION,
|
|
18
|
-
userConfigurable: true,
|
|
19
|
-
data: {
|
|
20
|
-
title: 'getLatestSessionArtifact',
|
|
21
|
-
needsApproval: false,
|
|
22
|
-
description: 'Load the current on-disk or live-collaboration contents of a session artifact by path. Use before editing existing files — never rely on stale content from earlier messages or tool results.',
|
|
23
|
-
inputSchema: exports.getLatestSessionArtifactInputSchema,
|
|
24
|
-
outputSchema: zod_1.z.object({
|
|
25
|
-
sessionId: zod_1.z.string(),
|
|
26
|
-
path: zod_1.z.string(),
|
|
27
|
-
content: zod_1.z.string(),
|
|
28
|
-
bytes: zod_1.z.number(),
|
|
29
|
-
}),
|
|
30
|
-
execute: async (input, context, secondArg) => {
|
|
31
|
-
const sessionId = await (0, resolve_chat_id_1.resolveChatId)(context, secondArg);
|
|
32
|
-
const result = await (0, read_session_artifact_1.readLatestSessionArtifactText)(sessionId, input.path);
|
|
33
|
-
return {
|
|
34
|
-
sessionId,
|
|
35
|
-
path: result.path,
|
|
36
|
-
content: result.content,
|
|
37
|
-
bytes: result.bytes,
|
|
38
|
-
};
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
//# sourceMappingURL=get-latest-session-artifact.tool.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-latest-session-artifact.tool.js","sourceRoot":"","sources":["../../../src/agents/shared/get-latest-session-artifact.tool.ts"],"names":[],"mappings":";;;AAgBA,gFAgCC;AA/CD,oEAA+D;AAE/D,6BAAuB;AACvB,yFAA6F;AAC7F,6EAAuE;AAE1D,QAAA,mCAAmC,GAAG,OAAC,CAAC,MAAM,CAAC;IAC1D,IAAI,EAAE,OAAC;SACJ,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CACP,2GAA2G,CAC5G;CACJ,CAAC,CAAA;AAEF,SAAgB,kCAAkC;IAChD,OAAO;QACL,IAAI,EAAE,8BAAa,CAAC,cAAc;QAClC,gBAAgB,EAAE,IAAI;QACtB,IAAI,EAAE;YACJ,KAAK,EAAE,0BAA0B;YACjC,aAAa,EAAE,KAAK;YACpB,WAAW,EACT,+LAA+L;YACjM,WAAW,EAAE,2CAAmC;YAChD,YAAY,EAAE,OAAC,CAAC,MAAM,CAAC;gBACrB,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;gBACrB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;gBAChB,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;gBACnB,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;aAClB,CAAC;YACF,OAAO,EAAE,KAAK,EACZ,KAA0D,EAC1D,OAA2B,EAC3B,SAAgC,EAChC,EAAE;gBACF,MAAM,SAAS,GAAG,MAAM,IAAA,+BAAa,EAAC,OAAO,EAAE,SAAS,CAAC,CAAA;gBACzD,MAAM,MAAM,GAAG,MAAM,IAAA,qDAA6B,EAAC,SAAS,EAAE,KAAK,CAAC,IAAI,CAAC,CAAA;gBACzE,OAAO;oBACL,SAAS;oBACT,IAAI,EAAE,MAAM,CAAC,IAAI;oBACjB,OAAO,EAAE,MAAM,CAAC,OAAO;oBACvB,KAAK,EAAE,MAAM,CAAC,KAAK;iBACpB,CAAA;YACH,CAAC;SACF;KACF,CAAA;AACH,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { AgentTool } from '@multiplayer-app/ai-agent-types';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
export declare const getSessionArtifactContentInputSchema: z.ZodObject<{
|
|
4
|
-
paths: z.ZodArray<z.ZodString>;
|
|
5
|
-
}, z.core.$strip>;
|
|
6
|
-
export declare function createGetSessionArtifactContentTool(): AgentTool;
|
|
7
|
-
//# sourceMappingURL=get-session-artifact-content.tool.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-session-artifact-content.tool.d.ts","sourceRoot":"","sources":["../../../src/agents/shared/get-session-artifact-content.tool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAqB,SAAS,EAAE,MAAM,iCAAiC,CAAA;AAGnF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,eAAO,MAAM,oCAAoC;;iBAY/C,CAAA;AAEF,wBAAgB,mCAAmC,IAAI,SAAS,CAkC/D"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getSessionArtifactContentInputSchema = void 0;
|
|
4
|
-
exports.createGetSessionArtifactContentTool = createGetSessionArtifactContentTool;
|
|
5
|
-
const ai_agent_types_1 = require("@multiplayer-app/ai-agent-types");
|
|
6
|
-
const zod_1 = require("zod");
|
|
7
|
-
const session_pages_1 = require("../../lib/session-pages");
|
|
8
|
-
exports.getSessionArtifactContentInputSchema = zod_1.z.object({
|
|
9
|
-
paths: zod_1.z
|
|
10
|
-
.array(zod_1.z
|
|
11
|
-
.string()
|
|
12
|
-
.min(1)
|
|
13
|
-
.describe('Relative path under the session folder, e.g. index.html, styles.css, README.md'))
|
|
14
|
-
.min(1)
|
|
15
|
-
.max(16),
|
|
16
|
-
});
|
|
17
|
-
function createGetSessionArtifactContentTool() {
|
|
18
|
-
return {
|
|
19
|
-
type: ai_agent_types_1.AgentToolType.LOCAL_FUNCTION,
|
|
20
|
-
userConfigurable: true,
|
|
21
|
-
data: {
|
|
22
|
-
needsApproval: false,
|
|
23
|
-
title: 'getSessionArtifactContent',
|
|
24
|
-
description: 'Read text contents of one or more files under sessions/{chatId}/. Missing paths return found: false. Large files are truncated to 256KB per path.',
|
|
25
|
-
inputSchema: exports.getSessionArtifactContentInputSchema,
|
|
26
|
-
outputSchema: zod_1.z.object({
|
|
27
|
-
sessionId: zod_1.z.string(),
|
|
28
|
-
artifacts: zod_1.z.array(zod_1.z.object({
|
|
29
|
-
path: zod_1.z.string(),
|
|
30
|
-
found: zod_1.z.boolean(),
|
|
31
|
-
bytes: zod_1.z.number(),
|
|
32
|
-
content: zod_1.z.string(),
|
|
33
|
-
truncated: zod_1.z.boolean(),
|
|
34
|
-
})),
|
|
35
|
-
}),
|
|
36
|
-
execute: async (input, context, secondArg) => {
|
|
37
|
-
const sessionId = await (0, session_pages_1.resolveChatId)(context, secondArg);
|
|
38
|
-
const artifacts = await (0, session_pages_1.readSessionArtifacts)(sessionId, input.paths);
|
|
39
|
-
return { sessionId, artifacts };
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
//# sourceMappingURL=get-session-artifact-content.tool.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-session-artifact-content.tool.js","sourceRoot":"","sources":["../../../src/agents/shared/get-session-artifact-content.tool.ts"],"names":[],"mappings":";;;AAoBA,kFAkCC;AArDD,oEAA+D;AAE/D,6BAAuB;AACvB,2DAA6E;AAEhE,QAAA,oCAAoC,GAAG,OAAC,CAAC,MAAM,CAAC;IAC3D,KAAK,EAAE,OAAC;SACL,KAAK,CACJ,OAAC;SACE,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CACP,gFAAgF,CACjF,CACJ;SACA,GAAG,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,EAAE,CAAC;CACX,CAAC,CAAA;AAEF,SAAgB,mCAAmC;IACjD,OAAO;QACL,IAAI,EAAE,8BAAa,CAAC,cAAc;QAClC,gBAAgB,EAAE,IAAI;QACtB,IAAI,EAAE;YACJ,aAAa,EAAE,KAAK;YACpB,KAAK,EAAE,2BAA2B;YAClC,WAAW,EACT,mJAAmJ;YACrJ,WAAW,EAAE,4CAAoC;YACjD,YAAY,EAAE,OAAC,CAAC,MAAM,CAAC;gBACrB,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;gBACrB,SAAS,EAAE,OAAC,CAAC,KAAK,CAChB,OAAC,CAAC,MAAM,CAAC;oBACP,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;oBAChB,KAAK,EAAE,OAAC,CAAC,OAAO,EAAE;oBAClB,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;oBACjB,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;oBACnB,SAAS,EAAE,OAAC,CAAC,OAAO,EAAE;iBACvB,CAAC,CACH;aACF,CAAC;YACF,OAAO,EAAE,KAAK,EACZ,KAA2D,EAC3D,OAA2B,EAC3B,SAAgC,EAChC,EAAE;gBACF,MAAM,SAAS,GAAG,MAAM,IAAA,6BAAa,EAAC,OAAO,EAAE,SAAS,CAAC,CAAA;gBACzD,MAAM,SAAS,GAAG,MAAM,IAAA,oCAAoB,EAAC,SAAS,EAAE,KAAK,CAAC,KAAK,CAAC,CAAA;gBAEpE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,CAAA;YACjC,CAAC;SACF;KACF,CAAA;AACH,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { AgentTool } from '@multiplayer-app/ai-agent-types';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
export declare const listSessionArtifactPathsInputSchema: z.ZodObject<{}, z.core.$strip>;
|
|
4
|
-
export declare const listSessionArtifactPathsTool: AgentTool;
|
|
5
|
-
//# sourceMappingURL=list-session-artifact-paths.tool.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"list-session-artifact-paths.tool.d.ts","sourceRoot":"","sources":["../../../src/agents/shared/list-session-artifact-paths.tool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAA;AAEhE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAMvB,eAAO,MAAM,mCAAmC,gCAAe,CAAA;AAE/D,eAAO,MAAM,4BAA4B,EAAE,SA+B1C,CAAA"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.listSessionArtifactPathsTool = exports.listSessionArtifactPathsInputSchema = void 0;
|
|
4
|
-
const ai_agent_types_1 = require("@multiplayer-app/ai-agent-types");
|
|
5
|
-
const zod_1 = require("zod");
|
|
6
|
-
const session_pages_1 = require("../../lib/session-pages");
|
|
7
|
-
exports.listSessionArtifactPathsInputSchema = zod_1.z.object({});
|
|
8
|
-
exports.listSessionArtifactPathsTool = {
|
|
9
|
-
type: ai_agent_types_1.AgentToolType.LOCAL_FUNCTION,
|
|
10
|
-
userConfigurable: true,
|
|
11
|
-
data: {
|
|
12
|
-
needsApproval: false,
|
|
13
|
-
title: 'listSessionArtifactPaths',
|
|
14
|
-
description: 'List all available artifact files under the active session from context (chatId) as relative paths.',
|
|
15
|
-
inputSchema: exports.listSessionArtifactPathsInputSchema,
|
|
16
|
-
outputSchema: zod_1.z.object({
|
|
17
|
-
sessionId: zod_1.z.string(),
|
|
18
|
-
paths: zod_1.z.array(zod_1.z.string()),
|
|
19
|
-
}),
|
|
20
|
-
execute: async (_input, context) => {
|
|
21
|
-
var _a;
|
|
22
|
-
const sessionId = (_a = context === null || context === void 0 ? void 0 : context.data) === null || _a === void 0 ? void 0 : _a.chatId;
|
|
23
|
-
if (!sessionId) {
|
|
24
|
-
throw new Error('Session ID is required');
|
|
25
|
-
}
|
|
26
|
-
if (!(0, session_pages_1.isValidSessionId)(sessionId)) {
|
|
27
|
-
throw new Error('Invalid session id');
|
|
28
|
-
}
|
|
29
|
-
const artifacts = await (0, session_pages_1.listSessionArtifacts)(sessionId);
|
|
30
|
-
return {
|
|
31
|
-
sessionId,
|
|
32
|
-
paths: artifacts.map((artifact) => artifact.path),
|
|
33
|
-
};
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
};
|
|
37
|
-
//# sourceMappingURL=list-session-artifact-paths.tool.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"list-session-artifact-paths.tool.js","sourceRoot":"","sources":["../../../src/agents/shared/list-session-artifact-paths.tool.ts"],"names":[],"mappings":";;;AACA,oEAA+D;AAC/D,6BAAuB;AACvB,2DAGgC;AAEnB,QAAA,mCAAmC,GAAG,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAA;AAElD,QAAA,4BAA4B,GAAc;IACrD,IAAI,EAAE,8BAAa,CAAC,cAAc;IAClC,gBAAgB,EAAE,IAAI;IACtB,IAAI,EAAE;QACJ,aAAa,EAAE,KAAK;QACpB,KAAK,EAAE,0BAA0B;QACjC,WAAW,EACT,qGAAqG;QACvG,WAAW,EAAE,2CAAmC;QAChD,YAAY,EAAE,OAAC,CAAC,MAAM,CAAC;YACrB,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;YACrB,KAAK,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC;SAC3B,CAAC;QACF,OAAO,EAAE,KAAK,EACZ,MAA2D,EAC3D,OAA4C,EAC5C,EAAE;;YACF,MAAM,SAAS,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,0CAAE,MAAgB,CAAA;YACjD,IAAI,CAAC,SAAS,EAAE,CAAC;gBACf,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAA;YAC3C,CAAC;YACD,IAAI,CAAC,IAAA,gCAAgB,EAAC,SAAS,CAAC,EAAE,CAAC;gBACjC,MAAM,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAA;YACvC,CAAC;YACD,MAAM,SAAS,GAAG,MAAM,IAAA,oCAAoB,EAAC,SAAS,CAAC,CAAA;YACvD,OAAO;gBACL,SAAS;gBACT,KAAK,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC;aAClD,CAAA;QACH,CAAC;KACF;CACF,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agent-ai-service.d.ts","sourceRoot":"","sources":["../../../src/lib/ai/agent-ai-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,+DAA+D,CAAA;AAOzF,wBAAgB,iBAAiB,IAAI,SAAS,CAS7C"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getAgentAiService = getAgentAiService;
|
|
4
|
-
const AIService_js_1 = require("@multiplayer-app/ai-agent-node/dist/esm/services/AIService.js");
|
|
5
|
-
const config_js_1 = require("@multiplayer-app/ai-agent-node/dist/esm/config.js");
|
|
6
|
-
const ModelStore_js_1 = require("@multiplayer-app/ai-agent-node/dist/esm/store/ModelStore.js");
|
|
7
|
-
const context_1 = require("../../context");
|
|
8
|
-
let cachedAiService = null;
|
|
9
|
-
function getAgentAiService() {
|
|
10
|
-
if (!cachedAiService) {
|
|
11
|
-
cachedAiService = new AIService_js_1.AIService(ModelStore_js_1.ModelStore.getInstance(), config_js_1.ConfigProvider.getInstance().getConfig().ai, (0, context_1.getAgentService)().getTenantCredentialResolver());
|
|
12
|
-
}
|
|
13
|
-
return cachedAiService;
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=agent-ai-service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agent-ai-service.js","sourceRoot":"","sources":["../../../src/lib/ai/agent-ai-service.ts"],"names":[],"mappings":";;AAOA,8CASC;AAhBD,gGAAyF;AACzF,iFAAkF;AAClF,+FAAwF;AACxF,2CAA+C;AAE/C,IAAI,eAAe,GAAqB,IAAI,CAAA;AAE5C,SAAgB,iBAAiB;IAC/B,IAAI,CAAC,eAAe,EAAE,CAAC;QACrB,eAAe,GAAG,IAAI,wBAAS,CAC7B,0BAAU,CAAC,WAAW,EAAE,EACxB,0BAAc,CAAC,WAAW,EAAE,CAAC,SAAS,EAAE,CAAC,EAAE,EAC3C,IAAA,yBAAe,GAAE,CAAC,2BAA2B,EAAE,CAChD,CAAA;IACH,CAAC;IACD,OAAO,eAAe,CAAA;AACxB,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
declare function truncateForLog(value: string, maxLength?: number): string;
|
|
2
|
-
declare function previewForLog(value: string | undefined, maxLength?: number): string | undefined;
|
|
3
|
-
export declare function serializeAiError(error: unknown, depth?: number): Record<string, unknown>;
|
|
4
|
-
export declare function summarizeMessagesForLog(messages: Array<{
|
|
5
|
-
role: string;
|
|
6
|
-
content: unknown;
|
|
7
|
-
}>): Array<{
|
|
8
|
-
role: string;
|
|
9
|
-
contentPreview: string;
|
|
10
|
-
contentLength: number;
|
|
11
|
-
}>;
|
|
12
|
-
export { previewForLog, truncateForLog };
|
|
13
|
-
//# sourceMappingURL=ai-error-details.d.ts.map
|