@hasna/conversations 0.2.46 → 0.2.48
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/LICENSE +5 -15
- package/README.md +14 -1
- package/bin/hook.js +94 -0
- package/bin/index.js +1860 -50
- package/bin/mcp.js +1810 -38
- package/dashboard/dist/assets/index-DhHQq3wL.css +1 -0
- package/dashboard/dist/index.html +2 -2
- package/dist/cli/brains.test.d.ts +1 -0
- package/dist/cli/commands/analytics.test.d.ts +1 -0
- package/dist/cli/commands/messaging.test.d.ts +1 -0
- package/dist/cli/commands/spaces.test.d.ts +1 -0
- package/dist/cli/commands/tmux.test.d.ts +1 -0
- package/dist/hooks/blocker-hook.test.d.ts +1 -0
- package/dist/index.d.ts +6 -2
- package/dist/index.js +916 -15
- package/dist/index.test.d.ts +1 -0
- package/dist/lib/gatherer.test.d.ts +1 -0
- package/dist/lib/model-config.test.d.ts +1 -0
- package/dist/lib/names.test.d.ts +1 -0
- package/dist/lib/pg-migrations.test.d.ts +1 -0
- package/dist/lib/tasks.d.ts +78 -0
- package/dist/lib/tasks.test.d.ts +1 -0
- package/dist/lib/terminal-markdown.test.d.ts +1 -0
- package/dist/lib/webhooks-management.test.d.ts +1 -0
- package/dist/lib/webhooks.d.ts +46 -1
- package/dist/mcp/http.d.ts +16 -0
- package/dist/mcp/http.test.d.ts +1 -0
- package/dist/mcp/index.d.ts +3 -1
- package/dist/mcp/telegram-channel.test.d.ts +1 -0
- package/dist/mcp/tools/advanced.test.d.ts +1 -0
- package/dist/mcp/tools/agents.test.d.ts +1 -0
- package/dist/mcp/tools/messaging.test.d.ts +1 -0
- package/dist/mcp/tools/projects.test.d.ts +1 -0
- package/dist/mcp/tools/spaces.test.d.ts +1 -0
- package/dist/mcp/tools/tasks.d.ts +6 -0
- package/dist/mcp/tools/tasks.test.d.ts +1 -0
- package/dist/mcp/tools/webhooks.d.ts +6 -0
- package/dist/mcp/tools/webhooks.test.d.ts +1 -0
- package/dist/types.d.ts +120 -0
- package/package.json +3 -2
- package/dashboard/dist/assets/index-CF_GDtNp.css +0 -1
- /package/dashboard/dist/assets/{index-Bw0wMcXE.js → index-UKgLYJ49.js} +0 -0
package/LICENSE
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
|
|
1
2
|
Apache License
|
|
2
3
|
Version 2.0, January 2004
|
|
3
4
|
http://www.apache.org/licenses/
|
|
@@ -48,7 +49,7 @@
|
|
|
48
49
|
"Contribution" shall mean any work of authorship, including
|
|
49
50
|
the original version of the Work and any modifications or additions
|
|
50
51
|
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
-
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
submitted to the Licensor for inclusion in the Work by the copyright owner
|
|
52
53
|
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
54
|
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
55
|
means any form of electronic, verbal, or written communication sent
|
|
@@ -60,7 +61,7 @@
|
|
|
60
61
|
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
62
|
|
|
62
63
|
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
-
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
on behalf of whom a Contribution has been received by the Licensor and
|
|
64
65
|
subsequently incorporated within the Work.
|
|
65
66
|
|
|
66
67
|
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
@@ -106,7 +107,7 @@
|
|
|
106
107
|
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
108
|
distribution, then any Derivative Works that You distribute must
|
|
108
109
|
include a readable copy of the attribution notices contained
|
|
109
|
-
within such NOTICE file, excluding
|
|
110
|
+
within such NOTICE file, excluding any notices that do not
|
|
110
111
|
pertain to any part of the Derivative Works, in at least one
|
|
111
112
|
of the following places: within a NOTICE text file distributed
|
|
112
113
|
as part of the Derivative Works; within the Source form or
|
|
@@ -175,18 +176,7 @@
|
|
|
175
176
|
|
|
176
177
|
END OF TERMS AND CONDITIONS
|
|
177
178
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
To apply the Apache License to your work, attach the following
|
|
181
|
-
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
-
replaced with your own identifying information. (Don't include
|
|
183
|
-
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
-
comment syntax for the file format. We also recommend that a
|
|
185
|
-
file or class name and description of purpose be included on the
|
|
186
|
-
same "printed page" as the copyright notice for easier
|
|
187
|
-
identification within third-party archives.
|
|
188
|
-
|
|
189
|
-
Copyright [yyyy] [name of copyright owner]
|
|
179
|
+
Copyright 2026 Hasna, Inc.
|
|
190
180
|
|
|
191
181
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
182
|
you may not use this file except in compliance with the License.
|
package/README.md
CHANGED
|
@@ -30,7 +30,20 @@ conversations-hook --help
|
|
|
30
30
|
conversations-mcp
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
## HTTP mode
|
|
34
|
+
|
|
35
|
+
Long-lived Streamable HTTP transport (stateless, bind `127.0.0.1` only):
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
conversations-mcp --http # default port 8811
|
|
39
|
+
conversations-mcp --http --port 8811
|
|
40
|
+
MCP_HTTP=1 conversations-mcp
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
- Health: `GET http://127.0.0.1:8811/health`
|
|
44
|
+
- MCP: `http://127.0.0.1:8811/mcp`
|
|
45
|
+
|
|
46
|
+
The dashboard server also exposes `/health` and `/mcp` when running.
|
|
34
47
|
|
|
35
48
|
## Cloud Sync
|
|
36
49
|
|
package/bin/hook.js
CHANGED
|
@@ -9905,6 +9905,100 @@ function getDb() {
|
|
|
9905
9905
|
created_at TEXT NOT NULL DEFAULT (datetime('now'))
|
|
9906
9906
|
)
|
|
9907
9907
|
`);
|
|
9908
|
+
db.exec(`
|
|
9909
|
+
CREATE TABLE IF NOT EXISTS tasks (
|
|
9910
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
9911
|
+
uuid TEXT NOT NULL DEFAULT (lower(hex(randomblob(16)))),
|
|
9912
|
+
subject TEXT NOT NULL,
|
|
9913
|
+
description TEXT,
|
|
9914
|
+
status TEXT NOT NULL DEFAULT 'pending',
|
|
9915
|
+
priority TEXT NOT NULL DEFAULT 'medium',
|
|
9916
|
+
assignee TEXT,
|
|
9917
|
+
reporter TEXT NOT NULL,
|
|
9918
|
+
project_id TEXT,
|
|
9919
|
+
space TEXT,
|
|
9920
|
+
parent_id INTEGER REFERENCES tasks(id),
|
|
9921
|
+
depends_on TEXT,
|
|
9922
|
+
tags TEXT,
|
|
9923
|
+
metadata TEXT,
|
|
9924
|
+
created_at TEXT NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%f', 'now')),
|
|
9925
|
+
started_at TEXT,
|
|
9926
|
+
completed_at TEXT,
|
|
9927
|
+
cancelled_at TEXT,
|
|
9928
|
+
due_at TEXT
|
|
9929
|
+
)
|
|
9930
|
+
`);
|
|
9931
|
+
db.exec("CREATE INDEX IF NOT EXISTS idx_tasks_uuid ON tasks(uuid)");
|
|
9932
|
+
db.exec("CREATE INDEX IF NOT EXISTS idx_tasks_status ON tasks(status)");
|
|
9933
|
+
db.exec("CREATE INDEX IF NOT EXISTS idx_tasks_assignee ON tasks(assignee)");
|
|
9934
|
+
db.exec("CREATE INDEX IF NOT EXISTS idx_tasks_reporter ON tasks(reporter)");
|
|
9935
|
+
db.exec("CREATE INDEX IF NOT EXISTS idx_tasks_project ON tasks(project_id)");
|
|
9936
|
+
db.exec("CREATE INDEX IF NOT EXISTS idx_tasks_space ON tasks(space)");
|
|
9937
|
+
db.exec("CREATE INDEX IF NOT EXISTS idx_tasks_parent ON tasks(parent_id)");
|
|
9938
|
+
db.exec("CREATE INDEX IF NOT EXISTS idx_tasks_priority ON tasks(priority)");
|
|
9939
|
+
db.exec(`
|
|
9940
|
+
CREATE TABLE IF NOT EXISTS task_comments (
|
|
9941
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
9942
|
+
task_id INTEGER NOT NULL REFERENCES tasks(id) ON DELETE CASCADE,
|
|
9943
|
+
agent TEXT NOT NULL,
|
|
9944
|
+
content TEXT NOT NULL,
|
|
9945
|
+
created_at TEXT NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%f', 'now'))
|
|
9946
|
+
)
|
|
9947
|
+
`);
|
|
9948
|
+
db.exec("CREATE INDEX IF NOT EXISTS idx_task_comments_task ON task_comments(task_id)");
|
|
9949
|
+
db.exec(`
|
|
9950
|
+
CREATE TABLE IF NOT EXISTS task_activity (
|
|
9951
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
9952
|
+
task_id INTEGER NOT NULL REFERENCES tasks(id) ON DELETE CASCADE,
|
|
9953
|
+
agent TEXT NOT NULL,
|
|
9954
|
+
action TEXT NOT NULL,
|
|
9955
|
+
detail TEXT,
|
|
9956
|
+
created_at TEXT NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%f', 'now'))
|
|
9957
|
+
)
|
|
9958
|
+
`);
|
|
9959
|
+
db.exec("CREATE INDEX IF NOT EXISTS idx_task_activity_task ON task_activity(task_id)");
|
|
9960
|
+
db.exec("CREATE INDEX IF NOT EXISTS idx_task_activity_agent ON task_activity(agent)");
|
|
9961
|
+
db.exec(`
|
|
9962
|
+
CREATE TABLE IF NOT EXISTS task_dependencies (
|
|
9963
|
+
task_id INTEGER NOT NULL REFERENCES tasks(id) ON DELETE CASCADE,
|
|
9964
|
+
depends_on_id INTEGER NOT NULL REFERENCES tasks(id) ON DELETE CASCADE,
|
|
9965
|
+
PRIMARY KEY (task_id, depends_on_id)
|
|
9966
|
+
)
|
|
9967
|
+
`);
|
|
9968
|
+
db.exec("CREATE INDEX IF NOT EXISTS idx_task_deps_depends ON task_dependencies(depends_on_id)");
|
|
9969
|
+
const hasTasksFts = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='tasks_fts'").get();
|
|
9970
|
+
if (!hasTasksFts) {
|
|
9971
|
+
db.exec(`
|
|
9972
|
+
CREATE VIRTUAL TABLE tasks_fts USING fts5(
|
|
9973
|
+
subject, description, tags
|
|
9974
|
+
)
|
|
9975
|
+
`);
|
|
9976
|
+
db.exec(`
|
|
9977
|
+
INSERT INTO tasks_fts(rowid, subject, description, tags)
|
|
9978
|
+
SELECT id, COALESCE(subject, ''), COALESCE(description, ''),
|
|
9979
|
+
COALESCE(REPLACE(REPLACE(REPLACE(tags, '[', ''), ']', ''), '"', ''), '')
|
|
9980
|
+
FROM tasks
|
|
9981
|
+
`);
|
|
9982
|
+
db.exec(`
|
|
9983
|
+
CREATE TRIGGER IF NOT EXISTS tasks_fts_insert AFTER INSERT ON tasks BEGIN
|
|
9984
|
+
INSERT INTO tasks_fts(rowid, subject, description, tags)
|
|
9985
|
+
VALUES (new.id, COALESCE(new.subject, ''), COALESCE(new.description, ''),
|
|
9986
|
+
COALESCE(REPLACE(REPLACE(REPLACE(new.tags, '[', ''), ']', ''), '"', ''), ''));
|
|
9987
|
+
END
|
|
9988
|
+
`);
|
|
9989
|
+
db.exec(`
|
|
9990
|
+
CREATE TRIGGER IF NOT EXISTS tasks_fts_delete AFTER DELETE ON tasks BEGIN
|
|
9991
|
+
DELETE FROM tasks_fts WHERE rowid = old.id;
|
|
9992
|
+
END
|
|
9993
|
+
`);
|
|
9994
|
+
db.exec(`
|
|
9995
|
+
CREATE TRIGGER IF NOT EXISTS tasks_fts_update AFTER UPDATE ON tasks BEGIN
|
|
9996
|
+
INSERT OR REPLACE INTO tasks_fts(rowid, subject, description, tags)
|
|
9997
|
+
VALUES (new.id, COALESCE(new.subject, ''), COALESCE(new.description, ''),
|
|
9998
|
+
COALESCE(REPLACE(REPLACE(REPLACE(new.tags, '[', ''), ']', ''), '"', ''), ''));
|
|
9999
|
+
END
|
|
10000
|
+
`);
|
|
10001
|
+
}
|
|
9908
10002
|
return db;
|
|
9909
10003
|
}
|
|
9910
10004
|
function closeDb() {
|