comisai 1.0.31 → 1.0.33

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.
@@ -0,0 +1,66 @@
1
+
2
+ /**
3
+ * Module dependencies.
4
+ */
5
+
6
+ var sep = require('path').sep || '/';
7
+
8
+ /**
9
+ * Module exports.
10
+ */
11
+
12
+ module.exports = fileUriToPath;
13
+
14
+ /**
15
+ * File URI to Path function.
16
+ *
17
+ * @param {String} uri
18
+ * @return {String} path
19
+ * @api public
20
+ */
21
+
22
+ function fileUriToPath (uri) {
23
+ if ('string' != typeof uri ||
24
+ uri.length <= 7 ||
25
+ 'file://' != uri.substring(0, 7)) {
26
+ throw new TypeError('must pass in a file:// URI to convert to a file path');
27
+ }
28
+
29
+ var rest = decodeURI(uri.substring(7));
30
+ var firstSlash = rest.indexOf('/');
31
+ var host = rest.substring(0, firstSlash);
32
+ var path = rest.substring(firstSlash + 1);
33
+
34
+ // 2. Scheme Definition
35
+ // As a special case, <host> can be the string "localhost" or the empty
36
+ // string; this is interpreted as "the machine from which the URL is
37
+ // being interpreted".
38
+ if ('localhost' == host) host = '';
39
+
40
+ if (host) {
41
+ host = sep + sep + host;
42
+ }
43
+
44
+ // 3.2 Drives, drive letters, mount points, file system root
45
+ // Drive letters are mapped into the top of a file URI in various ways,
46
+ // depending on the implementation; some applications substitute
47
+ // vertical bar ("|") for the colon after the drive letter, yielding
48
+ // "file:///c|/tmp/test.txt". In some cases, the colon is left
49
+ // unchanged, as in "file:///c:/tmp/test.txt". In other cases, the
50
+ // colon is simply omitted, as in "file:///c/tmp/test.txt".
51
+ path = path.replace(/^(.+)\|/, '$1:');
52
+
53
+ // for Windows, we need to invert the path separators from what a URI uses
54
+ if (sep == '\\') {
55
+ path = path.replace(/\//g, '\\');
56
+ }
57
+
58
+ if (/^.+\:/.test(path)) {
59
+ // has Windows drive at beginning of path
60
+ } else {
61
+ // unix path…
62
+ path = sep + path;
63
+ }
64
+
65
+ return host + path;
66
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "file-uri-to-path",
3
+ "version": "1.0.0",
4
+ "description": "Convert a file: URI to a file path",
5
+ "main": "index.js",
6
+ "types": "index.d.ts",
7
+ "directories": {
8
+ "test": "test"
9
+ },
10
+ "scripts": {
11
+ "test": "mocha --reporter spec"
12
+ },
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "git://github.com/TooTallNate/file-uri-to-path.git"
16
+ },
17
+ "keywords": [
18
+ "file",
19
+ "uri",
20
+ "convert",
21
+ "path"
22
+ ],
23
+ "author": "Nathan Rajlich <nathan@tootallnate.net> (http://n8.io/)",
24
+ "license": "MIT",
25
+ "bugs": {
26
+ "url": "https://github.com/TooTallNate/file-uri-to-path/issues"
27
+ },
28
+ "homepage": "https://github.com/TooTallNate/file-uri-to-path",
29
+ "devDependencies": {
30
+ "mocha": "3"
31
+ }
32
+ }
@@ -0,0 +1,24 @@
1
+
2
+ var sep = require('path').sep || '/';
3
+ var assert = require('assert');
4
+ var uri2path = require('../');
5
+ var tests = require('./tests.json');
6
+
7
+ describe('file-uri-to-path', function () {
8
+
9
+ Object.keys(tests).forEach(function (uri) {
10
+
11
+ // the test cases were generated from Windows' PathCreateFromUrlA() function.
12
+ // On Unix, we have to replace the path separator with the Unix one instead of
13
+ // the Windows one.
14
+ var expected = tests[uri].replace(/\\/g, sep);
15
+
16
+ it('should convert ' + JSON.stringify(uri) + ' to ' + JSON.stringify(expected),
17
+ function () {
18
+ var actual = uri2path(uri);
19
+ assert.equal(actual, expected);
20
+ });
21
+
22
+ });
23
+
24
+ });
@@ -0,0 +1,13 @@
1
+ {
2
+ "file://host/path": "\\\\host\\path",
3
+ "file://localhost/etc/fstab": "\\etc\\fstab",
4
+ "file:///etc/fstab": "\\etc\\fstab",
5
+ "file:///c:/WINDOWS/clock.avi": "c:\\WINDOWS\\clock.avi",
6
+ "file://localhost/c|/WINDOWS/clock.avi": "c:\\WINDOWS\\clock.avi",
7
+ "file:///c|/WINDOWS/clock.avi": "c:\\WINDOWS\\clock.avi",
8
+ "file://localhost/c:/WINDOWS/clock.avi": "c:\\WINDOWS\\clock.avi",
9
+ "file://hostname/path/to/the%20file.txt": "\\\\hostname\\path\\to\\the file.txt",
10
+ "file:///c:/path/to/the%20file.txt": "c:\\path\\to\\the file.txt",
11
+ "file:///C:/Documents%20and%20Settings/davris/FileSchemeURIs.doc": "C:\\Documents and Settings\\davris\\FileSchemeURIs.doc",
12
+ "file:///C:/caf%C3%A9/%C3%A5r/d%C3%BCnn/%E7%89%9B%E9%93%83/Ph%E1%BB%9F/%F0%9F%98%B5.exe": "C:\\café\\år\\dünn\\牛铃\\Phở\\😵.exe"
13
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "comisai",
3
- "version": "1.0.31",
3
+ "version": "1.0.33",
4
4
  "author": "Moshe Anconina",
5
5
  "license": "Apache-2.0",
6
6
  "description": "Security-first AI agent platform — connects AI agents to Discord, Telegram, Slack, WhatsApp, and more",
@@ -29,7 +29,9 @@
29
29
  },
30
30
  "files": [
31
31
  "dist",
32
- "node_modules/@comis"
32
+ "node_modules/@comis",
33
+ "node_modules/bindings",
34
+ "node_modules/file-uri-to-path"
33
35
  ],
34
36
  "bin": {
35
37
  "comis": "./dist/cli-entry.js"
@@ -108,21 +110,23 @@
108
110
  "@comis/channels",
109
111
  "@comis/cli",
110
112
  "@comis/daemon",
111
- "@comis/web"
113
+ "@comis/web",
114
+ "bindings",
115
+ "file-uri-to-path"
112
116
  ],
113
117
  "dependencies": {
114
- "@comis/shared": "1.0.31",
115
- "@comis/core": "1.0.31",
116
- "@comis/infra": "1.0.31",
117
- "@comis/memory": "1.0.31",
118
- "@comis/gateway": "1.0.31",
119
- "@comis/skills": "1.0.31",
120
- "@comis/scheduler": "1.0.31",
121
- "@comis/agent": "1.0.31",
122
- "@comis/channels": "1.0.31",
123
- "@comis/cli": "1.0.31",
124
- "@comis/daemon": "1.0.31",
125
- "@comis/web": "1.0.31",
118
+ "@comis/shared": "1.0.33",
119
+ "@comis/core": "1.0.33",
120
+ "@comis/infra": "1.0.33",
121
+ "@comis/memory": "1.0.33",
122
+ "@comis/gateway": "1.0.33",
123
+ "@comis/skills": "1.0.33",
124
+ "@comis/scheduler": "1.0.33",
125
+ "@comis/agent": "1.0.33",
126
+ "@comis/channels": "1.0.33",
127
+ "@comis/cli": "1.0.33",
128
+ "@comis/daemon": "1.0.33",
129
+ "@comis/web": "1.0.33",
126
130
  "@agentclientprotocol/sdk": "0.19.2",
127
131
  "@clack/core": "1.2.0",
128
132
  "@clack/prompts": "1.2.0",
@@ -135,7 +139,7 @@
135
139
  "@hapi/boom": "10.0.1",
136
140
  "@homebridge/ciao": "1.3.7",
137
141
  "@hono/node-server": "1.19.14",
138
- "@hono/node-ws": "1.3.0",
142
+ "@hono/node-ws": "1.3.1",
139
143
  "@line/bot-sdk": "10.8.0",
140
144
  "@mariozechner/pi-agent-core": "0.70.6",
141
145
  "@mariozechner/pi-ai": "0.71.0",
@@ -148,6 +152,7 @@
148
152
  "@slack/web-api": "7.15.1",
149
153
  "@whiskeysockets/baileys": "7.0.0-rc.9",
150
154
  "better-sqlite3": "12.9.0",
155
+ "bindings": "1.5.0",
151
156
  "chalk": "5.6.2",
152
157
  "chardet": "2.1.1",
153
158
  "chokidar": "5.0.0",
@@ -158,6 +163,7 @@
158
163
  "discord.js": "14.26.3",
159
164
  "edge-tts-universal": "1.4.0",
160
165
  "file-type": "21.3.4",
166
+ "file-uri-to-path": "1.0.0",
161
167
  "grammy": "1.42.0",
162
168
  "hono": "4.12.15",
163
169
  "hono-rate-limiter": "0.5.3",