@getfamiliar/shared 0.1.15 → 0.1.16
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/build/ChatInput.d.ts +42 -0
- package/build/ChatInput.js +45 -0
- package/build/ChatMessage.d.ts +11 -0
- package/build/ChatMessage.js +2 -1
- package/build/ChatMessageBus.d.ts +11 -1
- package/build/ChatMessageBus.js +26 -0
- package/build/Plugin.d.ts +103 -1
- package/build/PromptTemplate.d.ts +105 -0
- package/build/PromptTemplate.js +194 -0
- package/build/Schema.d.ts +1 -1
- package/build/Schema.js +23 -0
- package/build/Scratch.d.ts +36 -0
- package/build/Scratch.js +29 -0
- package/build/WebAuth.d.ts +166 -0
- package/build/WebAuth.js +18 -0
- package/build/WebMenu.d.ts +54 -0
- package/build/WebMenu.js +23 -0
- package/build/WebPlugin.d.ts +137 -0
- package/build/WebPlugin.js +13 -0
- package/build/WebStaticAssets.d.ts +72 -0
- package/build/WebStaticAssets.js +204 -0
- package/build/index.d.ts +9 -2
- package/build/index.js +8 -0
- package/package.json +2 -1
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { Context } from "hono";
|
|
2
|
+
/**
|
|
3
|
+
* Content type for a file name, by extension.
|
|
4
|
+
*
|
|
5
|
+
* @param fileName File name or path.
|
|
6
|
+
* @returns The media type, `application/octet-stream` when unknown.
|
|
7
|
+
*/
|
|
8
|
+
export declare function contentTypeForFile(fileName: string): string;
|
|
9
|
+
/** Options of {@link WebStaticAssets}. */
|
|
10
|
+
export interface WebStaticAssetsOptions {
|
|
11
|
+
/**
|
|
12
|
+
* URL prefix the directory is served under (e.g. `/plugins/web-chat/page`);
|
|
13
|
+
* stripped from the request path before mapping it onto a file.
|
|
14
|
+
* Default: the site root.
|
|
15
|
+
*/
|
|
16
|
+
readonly urlPrefix?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Answer unknown GET paths without a file extension with `index.html`,
|
|
19
|
+
* so client-side routes of a single-page app survive a reload.
|
|
20
|
+
*/
|
|
21
|
+
readonly spaFallback: boolean;
|
|
22
|
+
/** Hint added to the 500 answer when the directory was never built (e.g. "run `npm run build` in plugins/web-chat"). */
|
|
23
|
+
readonly missingBuildHint?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Serve a directory of built web assets (a Vite build output) from a
|
|
27
|
+
* Hono route, for web UI plugins and plugin pages.
|
|
28
|
+
*
|
|
29
|
+
* A request path maps onto a file below the directory; paths escaping it
|
|
30
|
+
* are refused. Files under `assets/` (content-hashed) are cached forever,
|
|
31
|
+
* everything else is revalidated (`no-cache`).
|
|
32
|
+
*/
|
|
33
|
+
export declare class WebStaticAssets {
|
|
34
|
+
private readonly rootDir;
|
|
35
|
+
private readonly options;
|
|
36
|
+
/**
|
|
37
|
+
* @param rootDir Absolute path of the build output.
|
|
38
|
+
* @param options URL prefix, SPA fallback, build hint.
|
|
39
|
+
*/
|
|
40
|
+
constructor(rootDir: string, options: WebStaticAssetsOptions);
|
|
41
|
+
/**
|
|
42
|
+
* Answer one request.
|
|
43
|
+
*
|
|
44
|
+
* @param c Request context.
|
|
45
|
+
* @returns The file, the SPA fallback, 404, or a 500 page when the
|
|
46
|
+
* directory was never built.
|
|
47
|
+
*/
|
|
48
|
+
handle(c: Context): Promise<Response>;
|
|
49
|
+
/**
|
|
50
|
+
* The 500 answer for a directory that was never built.
|
|
51
|
+
*
|
|
52
|
+
* @param c Request context.
|
|
53
|
+
* @returns The response.
|
|
54
|
+
*/
|
|
55
|
+
private missingBuild;
|
|
56
|
+
/**
|
|
57
|
+
* Map a URL path onto a file path below {@link rootDir}.
|
|
58
|
+
*
|
|
59
|
+
* @param urlPath Request path.
|
|
60
|
+
* @returns The absolute file path, or null when it lies outside the
|
|
61
|
+
* prefix, escapes the directory or is not decodable.
|
|
62
|
+
*/
|
|
63
|
+
private resolveRequestPath;
|
|
64
|
+
/**
|
|
65
|
+
* Send one file with content type and cache headers.
|
|
66
|
+
*
|
|
67
|
+
* @param c Request context.
|
|
68
|
+
* @param file Absolute file path below the root.
|
|
69
|
+
* @returns The response.
|
|
70
|
+
*/
|
|
71
|
+
private sendFile;
|
|
72
|
+
}
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import { readFile, stat } from "node:fs/promises";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
/** Content types of the files a Vite build emits. */
|
|
4
|
+
const CONTENT_TYPES = {
|
|
5
|
+
".html": "text/html; charset=utf-8",
|
|
6
|
+
".js": "text/javascript; charset=utf-8",
|
|
7
|
+
".mjs": "text/javascript; charset=utf-8",
|
|
8
|
+
".css": "text/css; charset=utf-8",
|
|
9
|
+
".json": "application/json; charset=utf-8",
|
|
10
|
+
".map": "application/json; charset=utf-8",
|
|
11
|
+
".svg": "image/svg+xml",
|
|
12
|
+
".png": "image/png",
|
|
13
|
+
".jpg": "image/jpeg",
|
|
14
|
+
".jpeg": "image/jpeg",
|
|
15
|
+
".gif": "image/gif",
|
|
16
|
+
".webp": "image/webp",
|
|
17
|
+
".ico": "image/x-icon",
|
|
18
|
+
".woff": "font/woff",
|
|
19
|
+
".woff2": "font/woff2",
|
|
20
|
+
".ttf": "font/ttf",
|
|
21
|
+
".txt": "text/plain; charset=utf-8",
|
|
22
|
+
".wasm": "application/wasm",
|
|
23
|
+
".webmanifest": "application/manifest+json",
|
|
24
|
+
".avif": "image/avif",
|
|
25
|
+
".pdf": "application/pdf",
|
|
26
|
+
".csv": "text/csv; charset=utf-8",
|
|
27
|
+
".md": "text/markdown; charset=utf-8",
|
|
28
|
+
".xml": "application/xml",
|
|
29
|
+
".zip": "application/zip",
|
|
30
|
+
".mp3": "audio/mpeg",
|
|
31
|
+
".ogg": "audio/ogg",
|
|
32
|
+
".wav": "audio/wav",
|
|
33
|
+
".mp4": "video/mp4",
|
|
34
|
+
".webm": "video/webm",
|
|
35
|
+
".ics": "text/calendar; charset=utf-8",
|
|
36
|
+
".docx": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
37
|
+
".xlsx": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
38
|
+
".pptx": "application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Content type for a file name, by extension.
|
|
42
|
+
*
|
|
43
|
+
* @param fileName File name or path.
|
|
44
|
+
* @returns The media type, `application/octet-stream` when unknown.
|
|
45
|
+
*/
|
|
46
|
+
export function contentTypeForFile(fileName) {
|
|
47
|
+
return CONTENT_TYPES[path.extname(fileName).toLowerCase()] ?? "application/octet-stream";
|
|
48
|
+
}
|
|
49
|
+
/** Vite puts content-hashed bundles here; they never change under the same name. */
|
|
50
|
+
const HASHED_ASSETS_DIR = "assets/";
|
|
51
|
+
/**
|
|
52
|
+
* Serve a directory of built web assets (a Vite build output) from a
|
|
53
|
+
* Hono route, for web UI plugins and plugin pages.
|
|
54
|
+
*
|
|
55
|
+
* A request path maps onto a file below the directory; paths escaping it
|
|
56
|
+
* are refused. Files under `assets/` (content-hashed) are cached forever,
|
|
57
|
+
* everything else is revalidated (`no-cache`).
|
|
58
|
+
*/
|
|
59
|
+
export class WebStaticAssets {
|
|
60
|
+
rootDir;
|
|
61
|
+
options;
|
|
62
|
+
/**
|
|
63
|
+
* @param rootDir Absolute path of the build output.
|
|
64
|
+
* @param options URL prefix, SPA fallback, build hint.
|
|
65
|
+
*/
|
|
66
|
+
constructor(rootDir, options) {
|
|
67
|
+
this.rootDir = path.resolve(rootDir);
|
|
68
|
+
this.options = options;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Answer one request.
|
|
72
|
+
*
|
|
73
|
+
* @param c Request context.
|
|
74
|
+
* @returns The file, the SPA fallback, 404, or a 500 page when the
|
|
75
|
+
* directory was never built.
|
|
76
|
+
*/
|
|
77
|
+
async handle(c) {
|
|
78
|
+
if (c.req.method !== "GET" && c.req.method !== "HEAD") {
|
|
79
|
+
return c.notFound();
|
|
80
|
+
}
|
|
81
|
+
const requested = this.resolveRequestPath(c.req.path);
|
|
82
|
+
if (requested === null) {
|
|
83
|
+
return c.notFound();
|
|
84
|
+
}
|
|
85
|
+
if (await isFile(requested)) {
|
|
86
|
+
return this.sendFile(c, requested);
|
|
87
|
+
}
|
|
88
|
+
if (!this.options.spaFallback || path.extname(requested) !== "") {
|
|
89
|
+
return (await isDirectory(this.rootDir)) ? c.notFound() : this.missingBuild(c);
|
|
90
|
+
}
|
|
91
|
+
const indexFile = path.join(this.rootDir, "index.html");
|
|
92
|
+
if (!(await isFile(indexFile))) {
|
|
93
|
+
return this.missingBuild(c);
|
|
94
|
+
}
|
|
95
|
+
return this.sendFile(c, indexFile);
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* The 500 answer for a directory that was never built.
|
|
99
|
+
*
|
|
100
|
+
* @param c Request context.
|
|
101
|
+
* @returns The response.
|
|
102
|
+
*/
|
|
103
|
+
missingBuild(c) {
|
|
104
|
+
const hint = this.options.missingBuildHint ?? "build the package";
|
|
105
|
+
return c.text(`the web assets in ${this.rootDir} are missing — ${hint}`, 500);
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Map a URL path onto a file path below {@link rootDir}.
|
|
109
|
+
*
|
|
110
|
+
* @param urlPath Request path.
|
|
111
|
+
* @returns The absolute file path, or null when it lies outside the
|
|
112
|
+
* prefix, escapes the directory or is not decodable.
|
|
113
|
+
*/
|
|
114
|
+
resolveRequestPath(urlPath) {
|
|
115
|
+
const prefix = (this.options.urlPrefix ?? "").replace(/\/+$/, "");
|
|
116
|
+
if (prefix !== "" && urlPath !== prefix && !urlPath.startsWith(`${prefix}/`)) {
|
|
117
|
+
return null;
|
|
118
|
+
}
|
|
119
|
+
let decoded;
|
|
120
|
+
try {
|
|
121
|
+
decoded = decodeURIComponent(urlPath.slice(prefix.length));
|
|
122
|
+
}
|
|
123
|
+
catch {
|
|
124
|
+
return null;
|
|
125
|
+
}
|
|
126
|
+
if (decoded.includes("\0")) {
|
|
127
|
+
return null;
|
|
128
|
+
}
|
|
129
|
+
// The root resolves to the directory itself, which takes the SPA fallback.
|
|
130
|
+
const relative = decoded.replace(/^\/+/, "");
|
|
131
|
+
const resolved = path.resolve(this.rootDir, relative);
|
|
132
|
+
if (resolved !== this.rootDir && !resolved.startsWith(this.rootDir + path.sep)) {
|
|
133
|
+
return null;
|
|
134
|
+
}
|
|
135
|
+
return resolved;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Send one file with content type and cache headers.
|
|
139
|
+
*
|
|
140
|
+
* @param c Request context.
|
|
141
|
+
* @param file Absolute file path below the root.
|
|
142
|
+
* @returns The response.
|
|
143
|
+
*/
|
|
144
|
+
async sendFile(c, file) {
|
|
145
|
+
const body = await readFile(file);
|
|
146
|
+
const relative = path.relative(this.rootDir, file).split(path.sep).join("/");
|
|
147
|
+
const cacheControl = relative.startsWith(HASHED_ASSETS_DIR)
|
|
148
|
+
? "public, max-age=31536000, immutable"
|
|
149
|
+
: "no-cache";
|
|
150
|
+
return new Response(c.req.method === "HEAD" ? null : new Uint8Array(body), {
|
|
151
|
+
status: 200,
|
|
152
|
+
headers: {
|
|
153
|
+
"content-type": contentTypeForFile(file),
|
|
154
|
+
"cache-control": cacheControl,
|
|
155
|
+
},
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Whether `file` exists and is a regular file.
|
|
161
|
+
*
|
|
162
|
+
* @param file Absolute path.
|
|
163
|
+
* @returns True for a regular file.
|
|
164
|
+
* @throws {Error} For errors other than "does not exist".
|
|
165
|
+
*/
|
|
166
|
+
async function isFile(file) {
|
|
167
|
+
try {
|
|
168
|
+
return (await stat(file)).isFile();
|
|
169
|
+
}
|
|
170
|
+
catch (err) {
|
|
171
|
+
if (isMissing(err)) {
|
|
172
|
+
return false;
|
|
173
|
+
}
|
|
174
|
+
throw err;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Whether `dir` exists and is a directory.
|
|
179
|
+
*
|
|
180
|
+
* @param dir Absolute path.
|
|
181
|
+
* @returns True for a directory.
|
|
182
|
+
* @throws {Error} For errors other than "does not exist".
|
|
183
|
+
*/
|
|
184
|
+
async function isDirectory(dir) {
|
|
185
|
+
try {
|
|
186
|
+
return (await stat(dir)).isDirectory();
|
|
187
|
+
}
|
|
188
|
+
catch (err) {
|
|
189
|
+
if (isMissing(err)) {
|
|
190
|
+
return false;
|
|
191
|
+
}
|
|
192
|
+
throw err;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Whether a fs error means "path does not exist".
|
|
197
|
+
*
|
|
198
|
+
* @param err The error.
|
|
199
|
+
* @returns True for ENOENT / ENOTDIR.
|
|
200
|
+
*/
|
|
201
|
+
function isMissing(err) {
|
|
202
|
+
const code = err.code;
|
|
203
|
+
return code === "ENOENT" || code === "ENOTDIR";
|
|
204
|
+
}
|
package/build/index.d.ts
CHANGED
|
@@ -2,7 +2,8 @@ export type { AgentRunCallType, AgentRunPatch, AgentRunRow, AgentRunState, NewAg
|
|
|
2
2
|
export { AgentRunBus, type AgentRunUnsubscribe } from "./AgentRunBus.js";
|
|
3
3
|
export { BASTION_TOKEN_HEADER } from "./BastionAuth.js";
|
|
4
4
|
export { buildCalendarEventId, type CalendarApi, type CalendarAttachmentMeta, type CalendarAttendee, type CalendarChangePayload, type CalendarEventRow, type CalendarEventType, type CalendarImportance, type CalendarProvider, type CalendarResponseStatus, type CalendarRow, type CalendarSensitivity, type CalendarShowAs, type CalendarType, type CreateEventInput, type FindEventsQuery, type NewCalendarEvent, parseCalendarEventId, type UpdateEventInput, type UpsertCalendarInput, } from "./Calendar.js";
|
|
5
|
-
export
|
|
5
|
+
export { type ParsedChatInput, parseChatInput } from "./ChatInput.js";
|
|
6
|
+
export { type ChatFilter, type ChatHistoryQuery, type ChatMessage, type ChatRole, MAX_CHAT_HISTORY_PAGE, type NewChatMessage, } from "./ChatMessage.js";
|
|
6
7
|
export { type ChatHandler, ChatMessageBus, type ChatUnsubscribe } from "./ChatMessageBus.js";
|
|
7
8
|
export { type ConfigService, DEFAULT_WRITABLE_PATHS } from "./Config.js";
|
|
8
9
|
export type { ContainerToolInfo } from "./ContainerTool.js";
|
|
@@ -28,9 +29,11 @@ export type { AnyCommandDef, EmitHandle, EmitOptions, EmittedEventDescriptor, Ho
|
|
|
28
29
|
export { DaemonStoppedError, definePlugin } from "./Plugin.js";
|
|
29
30
|
export { type NotificationHandler, POSTGRES_DB, POSTGRES_HOST, POSTGRES_PORT, POSTGRES_USER, PostgresConnection, type PostgresConnectionConfig, } from "./PostgresConnection.js";
|
|
30
31
|
export { CACHE_MARKER_PLACEHOLDER, CORE_PROMPT_PLACEHOLDERS, isCorePromptPlaceholder, PROMPT_PLACEHOLDER_NAME_PATTERN, PROMPT_TEMPLATE_FILE, PromptPlaceholderConflictError, type PromptPlaceholderDefinition, type PromptPlaceholderKind, } from "./PromptPlaceholders.js";
|
|
32
|
+
export { isSafeIncludePath, MAX_TEMPLATE_DEPTH, type ParsedTemplate, type ParseTemplateOptions, type PlaceholderUse, parseTemplate, type RenderedTemplate, renderTemplate, type TemplateNode, } from "./PromptTemplate.js";
|
|
31
33
|
export type { NewScheduledSubagent, ScheduledSubagentRow } from "./ScheduledSubagent.js";
|
|
32
34
|
export { ScheduledSubagentBus, type ScheduledSubagentNotification, type ScheduledSubagentOp, type ScheduledSubagentUnsubscribe, } from "./ScheduledSubagentBus.js";
|
|
33
35
|
export { AGENTRUNS_CHANNEL, CHATMESSAGES_NEW_CHANNEL, EVENT_TERMINAL_UPDATE_SQL, EVENTS_NEW_CHANNEL, EVENTS_STATE_CHANNEL, SCHEDULED_SUBAGENTS_CHANNEL, SCHEMA_SQL, STEPRESULTS_NEW_CHANNEL, TOPIC_PATTERN, } from "./Schema.js";
|
|
36
|
+
export { isHiddenScratchFile, type ScratchFile, scratchSpillFileName } from "./Scratch.js";
|
|
34
37
|
export type { NewStepResult, StepResultRow } from "./StepResult.js";
|
|
35
38
|
export { StepResultBus, type StepResultUnsubscribe } from "./StepResultBus.js";
|
|
36
39
|
export { type StorageApi, type StorageCapabilities, type StorageConflict, type StorageContentHash, type StorageDownloadResult, type StorageDrive, type StorageDriveKind, StorageError, type StorageErrorCode, type StorageHashAlgo, type StorageItem, type StorageItemKind, type StorageListOrder, type StorageMatchedIn, type StoragePage, type StoragePageOptions, type StorageProvider, type StorageSearchHit, type StorageSearchQuery, type StorageUploadSource, } from "./Storage.js";
|
|
@@ -40,5 +43,9 @@ export { ToolCallBus } from "./ToolCallBus.js";
|
|
|
40
43
|
export { DEFAULT_TOOL_LEVEL, type ToolLevel } from "./ToolLevel.js";
|
|
41
44
|
export { DEFAULT_TOOL_CALL_OFFLOADING_LIMIT, type OffloadedJson, runJsonLinesTool, runJsonTool, runTextTool, ToolError, type ToolRunContext, type ToolRunOptions, truncateUtf8, } from "./ToolRunner.js";
|
|
42
45
|
export { ALL_GROUP_NAME, CORE_PLUGIN_ID, IDENT_PATTERN, MCP_GROUP_NAME, matchesAnyToolPattern, NONE_GROUP_NAME, RESERVED_GROUP_NAMES, toolPatternMatches, validateGroupName, } from "./ToolsExpressionUtils.js";
|
|
43
|
-
export type
|
|
46
|
+
export { MIN_PROXY_SECRET_LENGTH, PROXY_SECRET_HEADER, type TrustedProxyRegistration, type WebApi, type WebAuthPageView, type WebPrincipal, type WebUi, type WebUiBindings, type WebUiEnv, } from "./WebAuth.js";
|
|
47
|
+
export { firstMenuRoute, WEB_MENU_ICON_PATTERN, type WebMenuContribution, type WebMenuEntry, type WebMenuItem, type WebMenuSubItem, } from "./WebMenu.js";
|
|
48
|
+
export { type MountWebPage, type WebPageContext, type WebPageEntry, type WebPageModule, type WebPluginSocket, type WebPluginUi, type WebSocketConnectionInfo, type WebSocketPeer, webPluginBasePath, } from "./WebPlugin.js";
|
|
44
49
|
export { DEFAULT_WEBSERVER_HOST, DEFAULT_WEBSERVER_PORT } from "./WebServerDefaults.js";
|
|
50
|
+
export { contentTypeForFile, WebStaticAssets, type WebStaticAssetsOptions, } from "./WebStaticAssets.js";
|
|
51
|
+
export type { WorkspaceFile, WorkspaceFileFilter, WorkspaceWatcherApi, } from "./WorkspaceFile.js";
|
package/build/index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export { AgentRunBus } from "./AgentRunBus.js";
|
|
2
2
|
export { BASTION_TOKEN_HEADER } from "./BastionAuth.js";
|
|
3
3
|
export { buildCalendarEventId, parseCalendarEventId, } from "./Calendar.js";
|
|
4
|
+
export { parseChatInput } from "./ChatInput.js";
|
|
5
|
+
export { MAX_CHAT_HISTORY_PAGE, } from "./ChatMessage.js";
|
|
4
6
|
export { ChatMessageBus } from "./ChatMessageBus.js";
|
|
5
7
|
export { DEFAULT_WRITABLE_PATHS } from "./Config.js";
|
|
6
8
|
export { parseCron } from "./CronExpression.js";
|
|
@@ -22,8 +24,10 @@ export { matchesAnyGlob, matchesGlob } from "./PathGlob.js";
|
|
|
22
24
|
export { DaemonStoppedError, definePlugin } from "./Plugin.js";
|
|
23
25
|
export { POSTGRES_DB, POSTGRES_HOST, POSTGRES_PORT, POSTGRES_USER, PostgresConnection, } from "./PostgresConnection.js";
|
|
24
26
|
export { CACHE_MARKER_PLACEHOLDER, CORE_PROMPT_PLACEHOLDERS, isCorePromptPlaceholder, PROMPT_PLACEHOLDER_NAME_PATTERN, PROMPT_TEMPLATE_FILE, PromptPlaceholderConflictError, } from "./PromptPlaceholders.js";
|
|
27
|
+
export { isSafeIncludePath, MAX_TEMPLATE_DEPTH, parseTemplate, renderTemplate, } from "./PromptTemplate.js";
|
|
25
28
|
export { ScheduledSubagentBus, } from "./ScheduledSubagentBus.js";
|
|
26
29
|
export { AGENTRUNS_CHANNEL, CHATMESSAGES_NEW_CHANNEL, EVENT_TERMINAL_UPDATE_SQL, EVENTS_NEW_CHANNEL, EVENTS_STATE_CHANNEL, SCHEDULED_SUBAGENTS_CHANNEL, SCHEMA_SQL, STEPRESULTS_NEW_CHANNEL, TOPIC_PATTERN, } from "./Schema.js";
|
|
30
|
+
export { isHiddenScratchFile, scratchSpillFileName } from "./Scratch.js";
|
|
27
31
|
export { StepResultBus } from "./StepResultBus.js";
|
|
28
32
|
export { StorageError, } from "./Storage.js";
|
|
29
33
|
export { dayBoundsInZone, parseInZone, renderInZone, } from "./Timezone.js";
|
|
@@ -31,4 +35,8 @@ export { ToolCallBus } from "./ToolCallBus.js";
|
|
|
31
35
|
export { DEFAULT_TOOL_LEVEL } from "./ToolLevel.js";
|
|
32
36
|
export { DEFAULT_TOOL_CALL_OFFLOADING_LIMIT, runJsonLinesTool, runJsonTool, runTextTool, ToolError, truncateUtf8, } from "./ToolRunner.js";
|
|
33
37
|
export { ALL_GROUP_NAME, CORE_PLUGIN_ID, IDENT_PATTERN, MCP_GROUP_NAME, matchesAnyToolPattern, NONE_GROUP_NAME, RESERVED_GROUP_NAMES, toolPatternMatches, validateGroupName, } from "./ToolsExpressionUtils.js";
|
|
38
|
+
export { MIN_PROXY_SECRET_LENGTH, PROXY_SECRET_HEADER, } from "./WebAuth.js";
|
|
39
|
+
export { firstMenuRoute, WEB_MENU_ICON_PATTERN, } from "./WebMenu.js";
|
|
40
|
+
export { webPluginBasePath, } from "./WebPlugin.js";
|
|
34
41
|
export { DEFAULT_WEBSERVER_HOST, DEFAULT_WEBSERVER_PORT } from "./WebServerDefaults.js";
|
|
42
|
+
export { contentTypeForFile, WebStaticAssets, } from "./WebStaticAssets.js";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getfamiliar/shared",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.16",
|
|
5
5
|
"description": "Familiar — shared types and bus-state client between host and container.",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
"cli-table3": "^0.6.5",
|
|
42
42
|
"croner": "^10.0.1",
|
|
43
43
|
"friendly-node-cron": "^1.5.0",
|
|
44
|
+
"hono": "^4.13.16",
|
|
44
45
|
"luxon": "^3.7.2",
|
|
45
46
|
"marked": "^15.0.12",
|
|
46
47
|
"pg": "^8.13.1",
|