@camstack/core 0.1.0 → 0.1.2

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.
Files changed (68) hide show
  1. package/dist/builtins/local-backup/index.d.mts +42 -0
  2. package/dist/builtins/local-backup/index.d.ts +42 -0
  3. package/dist/builtins/local-backup/index.js +188 -0
  4. package/dist/builtins/local-backup/index.js.map +1 -0
  5. package/dist/builtins/local-backup/index.mjs +11 -0
  6. package/dist/builtins/local-backup/index.mjs.map +1 -0
  7. package/dist/builtins/sqlite-storage/filesystem-storage.addon.d.mts +2 -0
  8. package/dist/builtins/sqlite-storage/filesystem-storage.addon.d.ts +2 -0
  9. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +210 -0
  10. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js.map +1 -0
  11. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +10 -0
  12. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs.map +1 -0
  13. package/dist/builtins/sqlite-storage/index.d.mts +4 -0
  14. package/dist/builtins/sqlite-storage/index.d.ts +4 -0
  15. package/dist/builtins/sqlite-storage/index.js +1025 -0
  16. package/dist/builtins/sqlite-storage/index.js.map +1 -0
  17. package/dist/builtins/sqlite-storage/index.mjs +31 -0
  18. package/dist/builtins/sqlite-storage/index.mjs.map +1 -0
  19. package/dist/builtins/sqlite-storage/sqlite-settings.addon.d.mts +2 -0
  20. package/dist/builtins/sqlite-storage/sqlite-settings.addon.d.ts +2 -0
  21. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +317 -0
  22. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js.map +1 -0
  23. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +10 -0
  24. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs.map +1 -0
  25. package/dist/builtins/winston-logging/index.d.mts +30 -0
  26. package/dist/builtins/winston-logging/index.d.ts +30 -0
  27. package/dist/builtins/winston-logging/index.js +185 -0
  28. package/dist/builtins/winston-logging/index.js.map +1 -0
  29. package/dist/builtins/winston-logging/index.mjs +11 -0
  30. package/dist/builtins/winston-logging/index.mjs.map +1 -0
  31. package/dist/chunk-2F3XZYRW.mjs +89 -0
  32. package/dist/chunk-2F3XZYRW.mjs.map +1 -0
  33. package/dist/chunk-LQFPAEQF.mjs +147 -0
  34. package/dist/chunk-LQFPAEQF.mjs.map +1 -0
  35. package/dist/chunk-QEMJH3KY.mjs +48 -0
  36. package/dist/chunk-QEMJH3KY.mjs.map +1 -0
  37. package/dist/chunk-R3DIIBBX.mjs +532 -0
  38. package/dist/chunk-R3DIIBBX.mjs.map +1 -0
  39. package/dist/chunk-SO4LROOT.mjs +150 -0
  40. package/dist/chunk-SO4LROOT.mjs.map +1 -0
  41. package/dist/chunk-SPA4JBKN.mjs +175 -0
  42. package/dist/chunk-SPA4JBKN.mjs.map +1 -0
  43. package/dist/chunk-YXNXYYHL.mjs +282 -0
  44. package/dist/chunk-YXNXYYHL.mjs.map +1 -0
  45. package/dist/dist-N7SR63RN.mjs +3515 -0
  46. package/dist/dist-N7SR63RN.mjs.map +1 -0
  47. package/dist/filesystem-storage.addon-C42r589X.d.mts +57 -0
  48. package/dist/filesystem-storage.addon-C42r589X.d.ts +57 -0
  49. package/dist/index.d.mts +1064 -101
  50. package/dist/index.d.ts +1064 -101
  51. package/dist/index.js +14673 -560
  52. package/dist/index.js.map +1 -1
  53. package/dist/index.mjs +6360 -534
  54. package/dist/index.mjs.map +1 -1
  55. package/dist/onnxruntime_binding-6Q6HXASN.node +0 -0
  56. package/dist/onnxruntime_binding-EKZT2NRK.node +0 -0
  57. package/dist/onnxruntime_binding-P6S7V3CI.node +0 -0
  58. package/dist/onnxruntime_binding-PJNNIIUO.node +0 -0
  59. package/dist/onnxruntime_binding-UN6SPTQK.node +0 -0
  60. package/dist/sql-schema-CKz78rId.d.mts +97 -0
  61. package/dist/sql-schema-CKz78rId.d.ts +97 -0
  62. package/dist/sqlite-settings.addon-DigoKwpZ.d.mts +70 -0
  63. package/dist/sqlite-settings.addon-DigoKwpZ.d.ts +70 -0
  64. package/dist/storage-location-manager-UQRGHTCA.mjs +8 -0
  65. package/dist/storage-location-manager-UQRGHTCA.mjs.map +1 -0
  66. package/dist/wrapper-Y55ADNM5.mjs +3652 -0
  67. package/dist/wrapper-Y55ADNM5.mjs.map +1 -0
  68. package/package.json +77 -6
@@ -0,0 +1,30 @@
1
+ import { ILogDestination, LogEntry, LogFilter, ICamstackAddon, IConfigurable, AddonManifest, AddonContext, CapabilityProviderMap, ConfigUISchema } from '@camstack/types';
2
+
3
+ interface WinstonConfig {
4
+ readonly level: string;
5
+ readonly retentionDays: number;
6
+ /** Resolved absolute path to the logs directory (replaces the old dataPath field). */
7
+ readonly logsDir: string;
8
+ }
9
+ declare class WinstonDestination implements ILogDestination {
10
+ private logger;
11
+ initialize(config?: WinstonConfig): Promise<void>;
12
+ write(entry: LogEntry): void;
13
+ query(_filter: LogFilter): Promise<readonly LogEntry[]>;
14
+ shutdown(): Promise<void>;
15
+ }
16
+
17
+ declare class WinstonLoggingAddon implements ICamstackAddon, IConfigurable {
18
+ readonly manifest: AddonManifest;
19
+ private destination;
20
+ private currentConfig;
21
+ initialize(context: AddonContext): Promise<void>;
22
+ shutdown(): Promise<void>;
23
+ getDestination(): WinstonDestination;
24
+ getCapabilityProvider<K extends keyof CapabilityProviderMap>(name: K): CapabilityProviderMap[K] | null;
25
+ getConfigSchema(): ConfigUISchema;
26
+ getConfig(): Record<string, unknown>;
27
+ onConfigChange(config: Record<string, unknown>): Promise<void>;
28
+ }
29
+
30
+ export { WinstonDestination, WinstonLoggingAddon, WinstonLoggingAddon as default };
@@ -0,0 +1,185 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/builtins/winston-logging/index.ts
31
+ var winston_logging_exports = {};
32
+ __export(winston_logging_exports, {
33
+ WinstonDestination: () => WinstonDestination,
34
+ WinstonLoggingAddon: () => WinstonLoggingAddon,
35
+ default: () => WinstonLoggingAddon
36
+ });
37
+ module.exports = __toCommonJS(winston_logging_exports);
38
+
39
+ // src/builtins/winston-logging/winston-destination.ts
40
+ var winston = __toESM(require("winston"));
41
+ var import_winston_daily_rotate_file = __toESM(require("winston-daily-rotate-file"));
42
+ var path = __toESM(require("path"));
43
+ function formatScope(scope) {
44
+ if (scope.length === 0) return "";
45
+ const [first, ...rest] = scope;
46
+ const restFormatted = rest.map((s) => `[${s}]`).join("");
47
+ return `(${first})${restFormatted}`;
48
+ }
49
+ var WinstonDestination = class {
50
+ logger = null;
51
+ async initialize(config) {
52
+ const {
53
+ level = "info",
54
+ retentionDays = 30,
55
+ logsDir = path.join("camstack-data", "logs")
56
+ } = config ?? {};
57
+ const consoleFormat = winston.format.combine(
58
+ winston.format.timestamp({ format: "YYYY-MM-DD HH:mm:ss" }),
59
+ winston.format.colorize(),
60
+ winston.format.printf(({ timestamp, level: lvl, message, scope }) => {
61
+ const scopeStr = scope ? ` ${scope}` : "";
62
+ return `${timestamp} [${lvl}]${scopeStr} - ${message}`;
63
+ })
64
+ );
65
+ const fileFormat = winston.format.combine(
66
+ winston.format.timestamp(),
67
+ winston.format.json()
68
+ );
69
+ this.logger = winston.createLogger({
70
+ level,
71
+ transports: [
72
+ new winston.transports.Console({
73
+ format: consoleFormat
74
+ }),
75
+ new import_winston_daily_rotate_file.default({
76
+ dirname: logsDir,
77
+ filename: "camstack-%DATE%.log",
78
+ datePattern: "YYYY-MM-DD",
79
+ maxFiles: `${retentionDays}d`,
80
+ format: fileFormat
81
+ })
82
+ ]
83
+ });
84
+ }
85
+ write(entry) {
86
+ if (!this.logger) return;
87
+ const scope = formatScope(entry.scope);
88
+ const meta = entry.meta ?? {};
89
+ this.logger.log({
90
+ level: entry.level,
91
+ message: entry.message,
92
+ scope,
93
+ timestamp: entry.timestamp.toISOString(),
94
+ ...meta
95
+ });
96
+ }
97
+ async query(_filter) {
98
+ return [];
99
+ }
100
+ async shutdown() {
101
+ if (!this.logger) return;
102
+ await new Promise((resolve) => {
103
+ this.logger.on("finish", resolve);
104
+ this.logger.end();
105
+ });
106
+ this.logger = null;
107
+ }
108
+ };
109
+
110
+ // src/builtins/winston-logging/winston-logging.addon.ts
111
+ var WinstonLoggingAddon = class {
112
+ manifest = {
113
+ id: "winston-logging",
114
+ name: "Winston Logging",
115
+ version: "1.0.0",
116
+ capabilities: ["log-destination"]
117
+ };
118
+ destination = null;
119
+ currentConfig = {
120
+ level: "info",
121
+ retentionDays: 30
122
+ };
123
+ async initialize(context) {
124
+ this.currentConfig = {
125
+ level: context.addonConfig.level ?? this.currentConfig.level,
126
+ retentionDays: context.addonConfig.retentionDays ?? this.currentConfig.retentionDays
127
+ };
128
+ const logsDir = context.locationPaths.logs;
129
+ this.destination = new WinstonDestination();
130
+ await this.destination.initialize({ ...this.currentConfig, logsDir });
131
+ context.logger.info("Winston logging initialized");
132
+ }
133
+ async shutdown() {
134
+ await this.destination?.shutdown();
135
+ }
136
+ getDestination() {
137
+ if (!this.destination) throw new Error("Winston not initialized");
138
+ return this.destination;
139
+ }
140
+ getCapabilityProvider(name) {
141
+ if (name === "log-destination" && this.destination) {
142
+ return this.destination;
143
+ }
144
+ return null;
145
+ }
146
+ getConfigSchema() {
147
+ return {
148
+ sections: [
149
+ {
150
+ id: "winston-retention",
151
+ title: "Log Retention",
152
+ description: "How long Winston keeps rotated log files on disk.",
153
+ columns: 1,
154
+ fields: [
155
+ {
156
+ type: "number",
157
+ key: "retentionDays",
158
+ label: "Retention (days)",
159
+ description: "Number of days to keep rotated log files before deletion",
160
+ min: 1,
161
+ max: 365,
162
+ step: 1,
163
+ unit: "days"
164
+ }
165
+ ]
166
+ }
167
+ ]
168
+ };
169
+ }
170
+ getConfig() {
171
+ return { ...this.currentConfig };
172
+ }
173
+ async onConfigChange(config) {
174
+ this.currentConfig = {
175
+ level: config.level ?? this.currentConfig.level,
176
+ retentionDays: config.retentionDays ?? this.currentConfig.retentionDays
177
+ };
178
+ }
179
+ };
180
+ // Annotate the CommonJS export names for ESM import in node:
181
+ 0 && (module.exports = {
182
+ WinstonDestination,
183
+ WinstonLoggingAddon
184
+ });
185
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/builtins/winston-logging/index.ts","../../../src/builtins/winston-logging/winston-destination.ts","../../../src/builtins/winston-logging/winston-logging.addon.ts"],"sourcesContent":["export { WinstonLoggingAddon } from './winston-logging.addon'\nexport { WinstonDestination } from './winston-destination'\nexport { WinstonLoggingAddon as default } from './winston-logging.addon'\n","import * as winston from 'winston'\nimport DailyRotateFile from 'winston-daily-rotate-file'\nimport * as path from 'node:path'\nimport type { ILogDestination, LogEntry, LogFilter } from '@camstack/types'\n\ninterface WinstonConfig {\n readonly level: string\n readonly retentionDays: number\n /** Resolved absolute path to the logs directory (replaces the old dataPath field). */\n readonly logsDir: string\n}\n\nfunction formatScope(scope: readonly string[]): string {\n if (scope.length === 0) return ''\n const [first, ...rest] = scope\n const restFormatted = rest.map((s) => `[${s}]`).join('')\n return `(${first})${restFormatted}`\n}\n\nexport class WinstonDestination implements ILogDestination {\n private logger: winston.Logger | null = null\n\n async initialize(config?: WinstonConfig): Promise<void> {\n const {\n level = 'info',\n retentionDays = 30,\n logsDir = path.join('camstack-data', 'logs'),\n } = config ?? {}\n\n const consoleFormat = winston.format.combine(\n winston.format.timestamp({ format: 'YYYY-MM-DD HH:mm:ss' }),\n winston.format.colorize(),\n winston.format.printf(({ timestamp, level: lvl, message, scope }) => {\n const scopeStr = scope ? ` ${scope}` : ''\n return `${timestamp} [${lvl}]${scopeStr} - ${message}`\n }),\n )\n\n const fileFormat = winston.format.combine(\n winston.format.timestamp(),\n winston.format.json(),\n )\n\n this.logger = winston.createLogger({\n level,\n transports: [\n new winston.transports.Console({\n format: consoleFormat,\n }),\n new DailyRotateFile({\n dirname: logsDir,\n filename: 'camstack-%DATE%.log',\n datePattern: 'YYYY-MM-DD',\n maxFiles: `${retentionDays}d`,\n format: fileFormat,\n }),\n ],\n })\n }\n\n write(entry: LogEntry): void {\n if (!this.logger) return\n\n const scope = formatScope(entry.scope)\n const meta = entry.meta ?? {}\n\n this.logger.log({\n level: entry.level,\n message: entry.message,\n scope,\n timestamp: entry.timestamp.toISOString(),\n ...meta,\n })\n }\n\n async query(_filter: LogFilter): Promise<readonly LogEntry[]> {\n // File-based log querying is not implemented; use structured storage for log queries\n return []\n }\n\n async shutdown(): Promise<void> {\n if (!this.logger) return\n\n await new Promise<void>((resolve) => {\n this.logger!.on('finish', resolve)\n this.logger!.end()\n })\n this.logger = null\n }\n}\n","import type {\n ICamstackAddon,\n AddonManifest,\n AddonContext,\n IConfigurable,\n ConfigUISchema,\n CapabilityProviderMap,\n} from '@camstack/types'\nimport { WinstonDestination } from './winston-destination'\n\nexport class WinstonLoggingAddon implements ICamstackAddon, IConfigurable {\n readonly manifest: AddonManifest = {\n id: 'winston-logging',\n name: 'Winston Logging',\n version: '1.0.0',\n capabilities: ['log-destination'],\n }\n\n private destination: WinstonDestination | null = null\n private currentConfig = {\n level: 'info',\n retentionDays: 30,\n }\n\n async initialize(context: AddonContext): Promise<void> {\n this.currentConfig = {\n level: (context.addonConfig.level as string) ?? this.currentConfig.level,\n retentionDays: (context.addonConfig.retentionDays as number) ?? this.currentConfig.retentionDays,\n }\n const logsDir = context.locationPaths.logs\n this.destination = new WinstonDestination()\n await this.destination.initialize({ ...this.currentConfig, logsDir })\n context.logger.info('Winston logging initialized')\n }\n\n async shutdown(): Promise<void> {\n await this.destination?.shutdown()\n }\n\n getDestination(): WinstonDestination {\n if (!this.destination) throw new Error('Winston not initialized')\n return this.destination\n }\n\n getCapabilityProvider<K extends keyof CapabilityProviderMap>(\n name: K,\n ): CapabilityProviderMap[K] | null {\n if (name === 'log-destination' && this.destination) {\n return this.destination as unknown as CapabilityProviderMap[K]\n }\n return null\n }\n\n getConfigSchema(): ConfigUISchema {\n return {\n sections: [\n {\n id: 'winston-retention',\n title: 'Log Retention',\n description: 'How long Winston keeps rotated log files on disk.',\n columns: 1,\n fields: [\n {\n type: 'number',\n key: 'retentionDays',\n label: 'Retention (days)',\n description: 'Number of days to keep rotated log files before deletion',\n min: 1,\n max: 365,\n step: 1,\n unit: 'days',\n },\n ],\n },\n ],\n }\n }\n\n getConfig(): Record<string, unknown> {\n return { ...this.currentConfig }\n }\n\n async onConfigChange(config: Record<string, unknown>): Promise<void> {\n this.currentConfig = {\n level: (config.level as string) ?? this.currentConfig.level,\n retentionDays: (config.retentionDays as number) ?? this.currentConfig.retentionDays,\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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yB;AAChE,WAAO,KAAK;AAAA,EACd;AAAA,EAEA,sBACE,MACiC;AACjC,QAAI,SAAS,qBAAqB,KAAK,aAAa;AAClD,aAAO,KAAK;AAAA,IACd;AACA,WAAO;AAAA,EACT;AAAA,EAEA,kBAAkC;AAChC,WAAO;AAAA,MACL,UAAU;AAAA,QACR;AAAA,UACE,IAAI;AAAA,UACJ,OAAO;AAAA,UACP,aAAa;AAAA,UACb,SAAS;AAAA,UACT,QAAQ;AAAA,YACN;AAAA,cACE,MAAM;AAAA,cACN,KAAK;AAAA,cACL,OAAO;AAAA,cACP,aAAa;AAAA,cACb,KAAK;AAAA,cACL,KAAK;AAAA,cACL,MAAM;AAAA,cACN,MAAM;AAAA,YACR;AAAA,UACF;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA,EAEA,YAAqC;AACnC,WAAO,EAAE,GAAG,KAAK,cAAc;AAAA,EACjC;AAAA,EAEA,MAAM,eAAe,QAAgD;AACnE,SAAK,gBAAgB;AAAA,MACnB,OAAQ,OAAO,SAAoB,KAAK,cAAc;AAAA,MACtD,eAAgB,OAAO,iBAA4B,KAAK,cAAc;AAAA,IACxE;AAAA,EACF;AACF;","names":["DailyRotateFile"]}
@@ -0,0 +1,11 @@
1
+ import {
2
+ WinstonDestination,
3
+ WinstonLoggingAddon
4
+ } from "../../chunk-LQFPAEQF.mjs";
5
+ import "../../chunk-QEMJH3KY.mjs";
6
+ export {
7
+ WinstonDestination,
8
+ WinstonLoggingAddon,
9
+ WinstonLoggingAddon as default
10
+ };
11
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,89 @@
1
+ // src/storage/storage-location-manager.ts
2
+ import { join as join2, isAbsolute as isAbsolute2 } from "path";
3
+
4
+ // src/storage/fs-storage-backend.ts
5
+ import { existsSync, mkdirSync, accessSync, constants } from "fs";
6
+ import { join, resolve, isAbsolute } from "path";
7
+ var FsStorageBackend = class {
8
+ type = "local";
9
+ basePath;
10
+ constructor(basePath) {
11
+ this.basePath = resolve(basePath);
12
+ }
13
+ resolve(subpath) {
14
+ if (isAbsolute(subpath)) return subpath;
15
+ return join(this.basePath, subpath);
16
+ }
17
+ isAvailable() {
18
+ try {
19
+ if (!existsSync(this.basePath)) return false;
20
+ accessSync(this.basePath, constants.W_OK);
21
+ return true;
22
+ } catch {
23
+ return false;
24
+ }
25
+ }
26
+ async initialize() {
27
+ mkdirSync(this.basePath, { recursive: true });
28
+ }
29
+ };
30
+
31
+ // src/storage/storage-location-manager.ts
32
+ var StorageLocationManager = class {
33
+ backends = /* @__PURE__ */ new Map();
34
+ dataPath;
35
+ constructor(dataPath) {
36
+ this.dataPath = dataPath;
37
+ }
38
+ /** Initialize all locations with default paths */
39
+ async initializeDefaults() {
40
+ const defaults = {
41
+ data: join2(this.dataPath, "db"),
42
+ media: join2(this.dataPath, "media"),
43
+ recordings: join2(this.dataPath, "recordings"),
44
+ models: join2(this.dataPath, "models"),
45
+ cache: "/tmp/camstack-cache",
46
+ logs: join2(this.dataPath, "logs")
47
+ };
48
+ for (const [name, path] of Object.entries(defaults)) {
49
+ const backend = new FsStorageBackend(path);
50
+ await backend.initialize();
51
+ this.backends.set(name, backend);
52
+ }
53
+ }
54
+ /** Override a specific location's backend path */
55
+ async setLocationPath(name, basePath) {
56
+ const resolved = isAbsolute2(basePath) ? basePath : join2(this.dataPath, basePath);
57
+ const backend = new FsStorageBackend(resolved);
58
+ await backend.initialize();
59
+ this.backends.set(name, backend);
60
+ }
61
+ /** Get the backend for a location */
62
+ getBackend(name) {
63
+ const backend = this.backends.get(name);
64
+ if (!backend) throw new Error(`Storage location "${name}" not initialized`);
65
+ return backend;
66
+ }
67
+ /** Resolve a path within a location */
68
+ resolve(location, subpath) {
69
+ return this.getBackend(location).resolve(subpath);
70
+ }
71
+ /** Check if all locations are available */
72
+ getStatus() {
73
+ return Array.from(this.backends.entries()).map(([name, backend]) => ({
74
+ name,
75
+ available: backend.isAvailable(),
76
+ path: backend.basePath
77
+ }));
78
+ }
79
+ /** All location names */
80
+ getLocationNames() {
81
+ return Array.from(this.backends.keys());
82
+ }
83
+ };
84
+
85
+ export {
86
+ FsStorageBackend,
87
+ StorageLocationManager
88
+ };
89
+ //# sourceMappingURL=chunk-2F3XZYRW.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/storage/storage-location-manager.ts","../src/storage/fs-storage-backend.ts"],"sourcesContent":["import { join, isAbsolute } from 'node:path'\nimport { FsStorageBackend, type IStorageBackend } from './fs-storage-backend.js'\n\nexport type StorageLocationName = 'data' | 'media' | 'recordings' | 'models' | 'cache' | 'logs'\n\nexport class StorageLocationManager {\n private readonly backends: Map<StorageLocationName, IStorageBackend> = new Map()\n private readonly dataPath: string\n\n constructor(dataPath: string) {\n this.dataPath = dataPath\n }\n\n /** Initialize all locations with default paths */\n async initializeDefaults(): Promise<void> {\n const defaults: Record<StorageLocationName, string> = {\n data: join(this.dataPath, 'db'),\n media: join(this.dataPath, 'media'),\n recordings: join(this.dataPath, 'recordings'),\n models: join(this.dataPath, 'models'),\n cache: '/tmp/camstack-cache',\n logs: join(this.dataPath, 'logs'),\n }\n\n for (const [name, path] of Object.entries(defaults)) {\n const backend = new FsStorageBackend(path)\n await backend.initialize()\n this.backends.set(name as StorageLocationName, backend)\n }\n }\n\n /** Override a specific location's backend path */\n async setLocationPath(name: StorageLocationName, basePath: string): Promise<void> {\n const resolved = isAbsolute(basePath) ? basePath : join(this.dataPath, basePath)\n const backend = new FsStorageBackend(resolved)\n await backend.initialize()\n this.backends.set(name, backend)\n }\n\n /** Get the backend for a location */\n getBackend(name: StorageLocationName): IStorageBackend {\n const backend = this.backends.get(name)\n if (!backend) throw new Error(`Storage location \"${name}\" not initialized`)\n return backend\n }\n\n /** Resolve a path within a location */\n resolve(location: StorageLocationName, subpath: string): string {\n return this.getBackend(location).resolve(subpath)\n }\n\n /** Check if all locations are available */\n getStatus(): Array<{ name: StorageLocationName; available: boolean; path: string }> {\n return Array.from(this.backends.entries()).map(([name, backend]) => ({\n name,\n available: backend.isAvailable(),\n path: backend.basePath,\n }))\n }\n\n /** All location names */\n getLocationNames(): StorageLocationName[] {\n return Array.from(this.backends.keys())\n }\n}\n","import { existsSync, mkdirSync, accessSync, constants } from 'node:fs'\nimport { join, resolve, isAbsolute } from 'node:path'\n\nexport interface IStorageBackend {\n /** Backend type identifier */\n readonly type: string\n /** Base path of this backend */\n readonly basePath: string\n /** Resolve a subpath to an absolute path */\n resolve(subpath: string): string\n /** Check if the backend path exists and is writable */\n isAvailable(): boolean\n /** Ensure base directory exists (mkdir -p equivalent) */\n initialize(): Promise<void>\n}\n\nexport class FsStorageBackend implements IStorageBackend {\n readonly type = 'local'\n readonly basePath: string\n\n constructor(basePath: string) {\n this.basePath = resolve(basePath)\n }\n\n resolve(subpath: string): string {\n if (isAbsolute(subpath)) return subpath\n return join(this.basePath, subpath)\n }\n\n isAvailable(): boolean {\n try {\n if (!existsSync(this.basePath)) return false\n accessSync(this.basePath, constants.W_OK)\n return true\n } catch {\n return false\n }\n }\n\n async initialize(): Promise<void> {\n mkdirSync(this.basePath, { recursive: true })\n }\n}\n"],"mappings":";AAAA,SAAS,QAAAA,OAAM,cAAAC,mBAAkB;;;ACAjC,SAAS,YAAY,WAAW,YAAY,iBAAiB;AAC7D,SAAS,MAAM,SAAS,kBAAkB;AAenC,IAAM,mBAAN,MAAkD;AAAA,EAC9C,OAAO;AAAA,EACP;AAAA,EAET,YAAY,UAAkB;AAC5B,SAAK,WAAW,QAAQ,QAAQ;AAAA,EAClC;AAAA,EAEA,QAAQ,SAAyB;AAC/B,QAAI,WAAW,OAAO,EAAG,QAAO;AAChC,WAAO,KAAK,KAAK,UAAU,OAAO;AAAA,EACpC;AAAA,EAEA,cAAuB;AACrB,QAAI;AACF,UAAI,CAAC,WAAW,KAAK,QAAQ,EAAG,QAAO;AACvC,iBAAW,KAAK,UAAU,UAAU,IA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,WAAW,QAAQ,EAAE,QAAQ,OAAO;AAAA,EAClD;AAAA;AAAA,EAGA,YAAoF;AAClF,WAAO,MAAM,KAAK,KAAK,SAAS,QAAQ,CAAC,EAAE,IAAI,CAAC,CAAC,MAAM,OAAO,OAAO;AAAA,MACnE;AAAA,MACA,WAAW,QAAQ,YAAY;AAAA,MAC/B,MAAM,QAAQ;AAAA,IAChB,EAAE;AAAA,EACJ;AAAA;AAAA,EAGA,mBAA0C;AACxC,WAAO,MAAM,KAAK,KAAK,SAAS,KAAK,CAAC;AAAA,EACxC;AACF;","names":["join","isAbsolute","join","isAbsolute"]}
@@ -0,0 +1,147 @@
1
+ // src/builtins/winston-logging/winston-destination.ts
2
+ import * as winston from "winston";
3
+ import DailyRotateFile from "winston-daily-rotate-file";
4
+ import * as path from "path";
5
+ function formatScope(scope) {
6
+ if (scope.length === 0) return "";
7
+ const [first, ...rest] = scope;
8
+ const restFormatted = rest.map((s) => `[${s}]`).join("");
9
+ return `(${first})${restFormatted}`;
10
+ }
11
+ var WinstonDestination = class {
12
+ logger = null;
13
+ async initialize(config) {
14
+ const {
15
+ level = "info",
16
+ retentionDays = 30,
17
+ logsDir = path.join("camstack-data", "logs")
18
+ } = config ?? {};
19
+ const consoleFormat = winston.format.combine(
20
+ winston.format.timestamp({ format: "YYYY-MM-DD HH:mm:ss" }),
21
+ winston.format.colorize(),
22
+ winston.format.printf(({ timestamp, level: lvl, message, scope }) => {
23
+ const scopeStr = scope ? ` ${scope}` : "";
24
+ return `${timestamp} [${lvl}]${scopeStr} - ${message}`;
25
+ })
26
+ );
27
+ const fileFormat = winston.format.combine(
28
+ winston.format.timestamp(),
29
+ winston.format.json()
30
+ );
31
+ this.logger = winston.createLogger({
32
+ level,
33
+ transports: [
34
+ new winston.transports.Console({
35
+ format: consoleFormat
36
+ }),
37
+ new DailyRotateFile({
38
+ dirname: logsDir,
39
+ filename: "camstack-%DATE%.log",
40
+ datePattern: "YYYY-MM-DD",
41
+ maxFiles: `${retentionDays}d`,
42
+ format: fileFormat
43
+ })
44
+ ]
45
+ });
46
+ }
47
+ write(entry) {
48
+ if (!this.logger) return;
49
+ const scope = formatScope(entry.scope);
50
+ const meta = entry.meta ?? {};
51
+ this.logger.log({
52
+ level: entry.level,
53
+ message: entry.message,
54
+ scope,
55
+ timestamp: entry.timestamp.toISOString(),
56
+ ...meta
57
+ });
58
+ }
59
+ async query(_filter) {
60
+ return [];
61
+ }
62
+ async shutdown() {
63
+ if (!this.logger) return;
64
+ await new Promise((resolve) => {
65
+ this.logger.on("finish", resolve);
66
+ this.logger.end();
67
+ });
68
+ this.logger = null;
69
+ }
70
+ };
71
+
72
+ // src/builtins/winston-logging/winston-logging.addon.ts
73
+ var WinstonLoggingAddon = class {
74
+ manifest = {
75
+ id: "winston-logging",
76
+ name: "Winston Logging",
77
+ version: "1.0.0",
78
+ capabilities: ["log-destination"]
79
+ };
80
+ destination = null;
81
+ currentConfig = {
82
+ level: "info",
83
+ retentionDays: 30
84
+ };
85
+ async initialize(context) {
86
+ this.currentConfig = {
87
+ level: context.addonConfig.level ?? this.currentConfig.level,
88
+ retentionDays: context.addonConfig.retentionDays ?? this.currentConfig.retentionDays
89
+ };
90
+ const logsDir = context.locationPaths.logs;
91
+ this.destination = new WinstonDestination();
92
+ await this.destination.initialize({ ...this.currentConfig, logsDir });
93
+ context.logger.info("Winston logging initialized");
94
+ }
95
+ async shutdown() {
96
+ await this.destination?.shutdown();
97
+ }
98
+ getDestination() {
99
+ if (!this.destination) throw new Error("Winston not initialized");
100
+ return this.destination;
101
+ }
102
+ getCapabilityProvider(name) {
103
+ if (name === "log-destination" && this.destination) {
104
+ return this.destination;
105
+ }
106
+ return null;
107
+ }
108
+ getConfigSchema() {
109
+ return {
110
+ sections: [
111
+ {
112
+ id: "winston-retention",
113
+ title: "Log Retention",
114
+ description: "How long Winston keeps rotated log files on disk.",
115
+ columns: 1,
116
+ fields: [
117
+ {
118
+ type: "number",
119
+ key: "retentionDays",
120
+ label: "Retention (days)",
121
+ description: "Number of days to keep rotated log files before deletion",
122
+ min: 1,
123
+ max: 365,
124
+ step: 1,
125
+ unit: "days"
126
+ }
127
+ ]
128
+ }
129
+ ]
130
+ };
131
+ }
132
+ getConfig() {
133
+ return { ...this.currentConfig };
134
+ }
135
+ async onConfigChange(config) {
136
+ this.currentConfig = {
137
+ level: config.level ?? this.currentConfig.level,
138
+ retentionDays: config.retentionDays ?? this.currentConfig.retentionDays
139
+ };
140
+ }
141
+ };
142
+
143
+ export {
144
+ WinstonDestination,
145
+ WinstonLoggingAddon
146
+ };
147
+ //# sourceMappingURL=chunk-LQFPAEQF.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/builtins/winston-logging/winston-destination.ts","../src/builtins/winston-logging/winston-logging.addon.ts"],"sourcesContent":["import * as winston from 'winston'\nimport DailyRotateFile from 'winston-daily-rotate-file'\nimport * as path from 'node:path'\nimport type { ILogDestination, LogEntry, LogFilter } from '@camstack/types'\n\ninterface WinstonConfig {\n readonly level: string\n readonly retentionDays: number\n /** Resolved absolute path to the logs directory (replaces the old dataPath field). */\n readonly logsDir: string\n}\n\nfunction formatScope(scope: readonly string[]): string {\n if (scope.length === 0) return ''\n const [first, ...rest] = scope\n const restFormatted = rest.map((s) => `[${s}]`).join('')\n return `(${first})${restFormatted}`\n}\n\nexport class WinstonDestination implements ILogDestination {\n private logger: winston.Logger | null = null\n\n async initialize(config?: WinstonConfig): Promise<void> {\n const {\n level = 'info',\n retentionDays = 30,\n logsDir = path.join('camstack-data', 'logs'),\n } = config ?? {}\n\n const consoleFormat = winston.format.combine(\n winston.format.timestamp({ format: 'YYYY-MM-DD HH:mm:ss' }),\n winston.format.colorize(),\n winston.format.printf(({ timestamp, level: lvl, message, scope }) => {\n const scopeStr = scope ? ` ${scope}` : ''\n return `${timestamp} [${lvl}]${scopeStr} - ${message}`\n }),\n )\n\n const fileFormat = winston.format.combine(\n winston.format.timestamp(),\n winston.format.json(),\n )\n\n this.logger = winston.createLogger({\n level,\n transports: [\n new winston.transports.Console({\n format: consoleFormat,\n }),\n new DailyRotateFile({\n dirname: logsDir,\n filename: 'camstack-%DATE%.log',\n datePattern: 'YYYY-MM-DD',\n maxFiles: `${retentionDays}d`,\n format: fileFormat,\n }),\n ],\n })\n }\n\n write(entry: LogEntry): void {\n if (!this.logger) return\n\n const scope = formatScope(entry.scope)\n const meta = entry.meta ?? {}\n\n this.logger.log({\n level: entry.level,\n message: entry.message,\n scope,\n timestamp: entry.timestamp.toISOString(),\n ...meta,\n })\n }\n\n async query(_filter: LogFilter): Promise<readonly LogEntry[]> {\n // File-based log querying is not implemented; use structured storage for log queries\n return []\n }\n\n async shutdown(): Promise<void> {\n if (!this.logger) return\n\n await new Promise<void>((resolve) => {\n this.logger!.on('finish', resolve)\n this.logger!.end()\n })\n this.logger = null\n }\n}\n","import type {\n ICamstackAddon,\n AddonManifest,\n AddonContext,\n IConfigurable,\n ConfigUISchema,\n CapabilityProviderMap,\n} from '@camstack/types'\nimport { WinstonDestination } from './winston-destination'\n\nexport class WinstonLoggingAddon implements ICamstackAddon, IConfigurable {\n readonly manifest: AddonManifest = {\n id: 'winston-logging',\n name: 'Winston Logging',\n version: '1.0.0',\n capabilities: ['log-destination'],\n }\n\n private destination: WinstonDestination | null = null\n private currentConfig = {\n level: 'info',\n retentionDays: 30,\n }\n\n async initialize(context: AddonContext): Promise<void> {\n this.currentConfig = {\n level: (context.addonConfig.level as string) ?? this.currentConfig.level,\n retentionDays: (context.addonConfig.retentionDays as number) ?? this.currentConfig.retentionDays,\n }\n const logsDir = context.locationPaths.logs\n this.destination = new WinstonDestination()\n await this.destination.initialize({ ...this.currentConfig, logsDir })\n context.logger.info('Winston logging initialized')\n }\n\n async shutdown(): Promise<void> {\n await this.destination?.shutdown()\n }\n\n getDestination(): WinstonDestination {\n if (!this.destination) throw new Error('Winston not initialized')\n return this.destination\n }\n\n getCapabilityProvider<K extends keyof CapabilityProviderMap>(\n name: K,\n ): CapabilityProviderMap[K] | null {\n if (name === 'log-destination' && this.destination) {\n return this.destination as unknown as CapabilityProviderMap[K]\n }\n return null\n }\n\n getConfigSchema(): ConfigUISchema {\n return {\n sections: [\n {\n id: 'winston-retention',\n title: 'Log Retention',\n description: 'How long Winston keeps rotated log files on disk.',\n columns: 1,\n fields: [\n {\n type: 'number',\n key: 'retentionDays',\n label: 'Retention (days)',\n description: 'Number of days to keep rotated log files before deletion',\n min: 1,\n max: 365,\n step: 1,\n unit: 'days',\n },\n ],\n },\n ],\n }\n }\n\n getConfig(): Record<string, unknown> {\n return { ...this.currentConfig }\n }\n\n async onConfigChange(config: Record<string, unknown>): Promise<void> {\n this.currentConfig = {\n level: (config.level as string) ?? this.currentConfig.level,\n retentionDays: (config.retentionDays as number) ?? this.currentConfig.retentionDays,\n }\n }\n}\n"],"mappings":";AAAA,YAAY,aAAa;AACzB,OAAO,qBAAqB;AAC5B,YAAY,UAAU;AAUtB,SAAS,YAAY,OAAkC;AACrD,MAAI,MAAM,WAAW,EAAG,QAAO;AAC/B,QAAM,CAAC,OAAO,GAAG,IAAI,IAAI;AACzB,QAAM,gBAAgB,KAAK,IAAI,CAAC,MAAM,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE;AACvD,SAAO,IAAI,KAAK,IAAI,aAAa;AACnC;AAEO,IAAM,qBAAN,MAAoD;AAAA,EACjD,SAAgC;AAAA,EAExC,MAAM,WAAW,QAAuC;AACtD,UAAM;AAAA,MACJ,QAAQ;AAAA,MACR,gBAAgB;AAAA,MAChB,UAAe,UAAK,iBAAiB,MAAM;AAAA,IAC7C,IAAI,UAAU,CAAC;AAEf,UAAM,gBAAwB,eAAO;AAAA,MAC3B,eAAO,UAAU,EAAE,QAAQ,sBAAsB,CAAC;AAAA,MAClD,eAAO,SAAS;AAAA,MAChB,eAAO,OAAO,CAAC,EAAE,WAAW,OAAO,KAAK,SAAS,MAAM,MAAM;AACnE,cAAM,WAAW,QAAQ,IAAI,KAAK,KAAK;AACvC,eAAO,GAAG,SAAS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ACxE;AAAA,EACF;AACF;","names":[]}
@@ -0,0 +1,48 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
8
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
9
+ }) : x)(function(x) {
10
+ if (typeof require !== "undefined") return require.apply(this, arguments);
11
+ throw Error('Dynamic require of "' + x + '" is not supported');
12
+ });
13
+ var __glob = (map) => (path) => {
14
+ var fn = map[path];
15
+ if (fn) return fn();
16
+ throw new Error("Module not found in bundle: " + path);
17
+ };
18
+ var __esm = (fn, res) => function __init() {
19
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
20
+ };
21
+ var __commonJS = (cb, mod) => function __require2() {
22
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
23
+ };
24
+ var __copyProps = (to, from, except, desc) => {
25
+ if (from && typeof from === "object" || typeof from === "function") {
26
+ for (let key of __getOwnPropNames(from))
27
+ if (!__hasOwnProp.call(to, key) && key !== except)
28
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
29
+ }
30
+ return to;
31
+ };
32
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
33
+ // If the importer is in node compatibility mode or this is not an ESM
34
+ // file that has been converted to a CommonJS file using a Babel-
35
+ // compatible transform (i.e. "__esModule" has not been set), then set
36
+ // "default" to the CommonJS "module.exports" for node compatibility.
37
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
38
+ mod
39
+ ));
40
+
41
+ export {
42
+ __require,
43
+ __glob,
44
+ __esm,
45
+ __commonJS,
46
+ __toESM
47
+ };
48
+ //# sourceMappingURL=chunk-QEMJH3KY.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}