@shardworks/guild-starter-kit 0.1.20 → 0.1.22
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/migrations/004-sessions.sql +36 -0
- package/nexus-bundle.json +4 -6
- package/package.json +1 -1
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
-- Session tracking — records every session launched through the funnel.
|
|
2
|
+
|
|
3
|
+
CREATE TABLE sessions (
|
|
4
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
5
|
+
anima_id INTEGER NOT NULL REFERENCES animas(id),
|
|
6
|
+
provider TEXT NOT NULL, -- 'claude-code', 'claude-api', 'bedrock'
|
|
7
|
+
model TEXT, -- 'claude-sonnet-4-6', 'claude-opus-4-6', etc.
|
|
8
|
+
trigger TEXT NOT NULL, -- 'consult', 'summon', 'brief'
|
|
9
|
+
workshop TEXT, -- workshop name, null for guildhall sessions
|
|
10
|
+
workspace_kind TEXT NOT NULL, -- 'guildhall', 'workshop-temp', 'workshop-managed'
|
|
11
|
+
curriculum_name TEXT, -- curriculum used (null if none)
|
|
12
|
+
curriculum_version TEXT, -- curriculum version at session time
|
|
13
|
+
temperament_name TEXT, -- temperament used (null if none)
|
|
14
|
+
temperament_version TEXT, -- temperament version at session time
|
|
15
|
+
roles TEXT, -- JSON array of role names
|
|
16
|
+
started_at TEXT NOT NULL,
|
|
17
|
+
ended_at TEXT,
|
|
18
|
+
exit_code INTEGER,
|
|
19
|
+
input_tokens INTEGER,
|
|
20
|
+
output_tokens INTEGER,
|
|
21
|
+
cache_read_tokens INTEGER,
|
|
22
|
+
cache_write_tokens INTEGER,
|
|
23
|
+
cost_usd REAL,
|
|
24
|
+
duration_ms INTEGER,
|
|
25
|
+
provider_session_id TEXT, -- claude session ID, API request ID, etc.
|
|
26
|
+
record_path TEXT -- path to session record JSON, relative to guild root
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
-- Links commissions to the sessions used to complete them.
|
|
30
|
+
-- Separate table because: not all sessions are commissions,
|
|
31
|
+
-- and a commission may involve multiple sessions (retries, sub-tasks).
|
|
32
|
+
CREATE TABLE commission_sessions (
|
|
33
|
+
commission_id INTEGER NOT NULL REFERENCES commissions(id),
|
|
34
|
+
session_id INTEGER NOT NULL REFERENCES sessions(id),
|
|
35
|
+
PRIMARY KEY (commission_id, session_id)
|
|
36
|
+
);
|
package/nexus-bundle.json
CHANGED
|
@@ -8,12 +8,9 @@
|
|
|
8
8
|
{ "package": "@shardworks/nexus-stdlib@0.x", "name": "nexus-version" }
|
|
9
9
|
],
|
|
10
10
|
"engines": [
|
|
11
|
-
{ "package": "@shardworks/engine-
|
|
12
|
-
{ "package": "@shardworks/engine-mcp-server@0.x", "name": "mcp-server" },
|
|
13
|
-
{ "package": "@shardworks/engine-worktree-setup@0.x", "name": "worktree-setup" },
|
|
11
|
+
{ "package": "@shardworks/engine-session-claude-code@0.x", "name": "session-claude-code" },
|
|
14
12
|
{ "package": "@shardworks/nexus-stdlib@0.x", "name": "workshop-prepare" },
|
|
15
|
-
{ "package": "@shardworks/nexus-stdlib@0.x", "name": "workshop-merge" }
|
|
16
|
-
{ "package": "@shardworks/engine-ledger-migrate@0.x", "name": "ledger-migrate" }
|
|
13
|
+
{ "package": "@shardworks/nexus-stdlib@0.x", "name": "workshop-merge" }
|
|
17
14
|
],
|
|
18
15
|
"temperaments": [
|
|
19
16
|
{ "path": "temperaments/guide" },
|
|
@@ -25,6 +22,7 @@
|
|
|
25
22
|
"migrations": [
|
|
26
23
|
{ "path": "migrations/001-initial-schema.sql" },
|
|
27
24
|
{ "path": "migrations/002-clockworks.sql" },
|
|
28
|
-
{ "path": "migrations/003-commission-status-reason.sql" }
|
|
25
|
+
{ "path": "migrations/003-commission-status-reason.sql" },
|
|
26
|
+
{ "path": "migrations/004-sessions.sql" }
|
|
29
27
|
]
|
|
30
28
|
}
|