sqlew 2.0.0 → 2.1.0
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/CHANGELOG.md +186 -0
- package/README.md +320 -16
- package/assets/schema.sql +122 -36
- package/dist/cli.d.ts +7 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +312 -0
- package/dist/cli.js.map +1 -0
- package/dist/database.d.ts.map +1 -1
- package/dist/database.js +18 -0
- package/dist/database.js.map +1 -1
- package/dist/index.js +135 -41
- package/dist/index.js.map +1 -1
- package/dist/migrations/add-v2.1.0-features.d.ts +29 -0
- package/dist/migrations/add-v2.1.0-features.d.ts.map +1 -0
- package/dist/migrations/add-v2.1.0-features.js +198 -0
- package/dist/migrations/add-v2.1.0-features.js.map +1 -0
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +5 -0
- package/dist/schema.js.map +1 -1
- package/dist/tools/context.d.ts +91 -1
- package/dist/tools/context.d.ts.map +1 -1
- package/dist/tools/context.js +614 -0
- package/dist/tools/context.js.map +1 -1
- package/dist/tools/files.d.ts +10 -1
- package/dist/tools/files.d.ts.map +1 -1
- package/dist/tools/files.js +98 -1
- package/dist/tools/files.js.map +1 -1
- package/dist/tools/messaging.d.ts +10 -1
- package/dist/tools/messaging.d.ts.map +1 -1
- package/dist/tools/messaging.js +107 -1
- package/dist/tools/messaging.js.map +1 -1
- package/dist/tools/utils.d.ts +9 -1
- package/dist/tools/utils.d.ts.map +1 -1
- package/dist/tools/utils.js +115 -0
- package/dist/tools/utils.js.map +1 -1
- package/dist/types.d.ts +196 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/cleanup.d.ts +12 -1
- package/dist/utils/cleanup.d.ts.map +1 -1
- package/dist/utils/cleanup.js +20 -3
- package/dist/utils/cleanup.js.map +1 -1
- package/package.json +4 -2
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Migration: Add v2.1.0 features (v2.0.0 -> v2.1.0)
|
|
3
|
+
*
|
|
4
|
+
* Migrates database from v2.0.0 to v2.1.0:
|
|
5
|
+
* - Adds t_activity_log table (FR-001)
|
|
6
|
+
* - Adds t_decision_templates table (FR-006)
|
|
7
|
+
* - Adds 4 activity logging triggers
|
|
8
|
+
* - Adds 5 built-in decision templates
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Check if migration is needed
|
|
12
|
+
*/
|
|
13
|
+
export function needsMigration(db) {
|
|
14
|
+
// Check if new tables don't exist yet
|
|
15
|
+
const activityLogExists = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='t_activity_log'").get();
|
|
16
|
+
const templatesExists = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='t_decision_templates'").get();
|
|
17
|
+
return activityLogExists === undefined || templatesExists === undefined;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Run the migration
|
|
21
|
+
*/
|
|
22
|
+
export function runMigration(db) {
|
|
23
|
+
const details = [];
|
|
24
|
+
try {
|
|
25
|
+
// Start transaction
|
|
26
|
+
db.exec('BEGIN TRANSACTION');
|
|
27
|
+
// 1. Add t_activity_log table (FR-001)
|
|
28
|
+
const activityLogExists = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='t_activity_log'").get();
|
|
29
|
+
if (!activityLogExists) {
|
|
30
|
+
db.exec(`
|
|
31
|
+
CREATE TABLE t_activity_log (
|
|
32
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
33
|
+
ts INTEGER DEFAULT (unixepoch()),
|
|
34
|
+
agent_id INTEGER NOT NULL REFERENCES m_agents(id),
|
|
35
|
+
action_type TEXT NOT NULL,
|
|
36
|
+
target TEXT NOT NULL,
|
|
37
|
+
layer_id INTEGER REFERENCES m_layers(id),
|
|
38
|
+
details TEXT
|
|
39
|
+
);
|
|
40
|
+
`);
|
|
41
|
+
details.push('Created table: t_activity_log (FR-001)');
|
|
42
|
+
// Add indexes
|
|
43
|
+
db.exec(`
|
|
44
|
+
CREATE INDEX IF NOT EXISTS idx_activity_log_ts ON t_activity_log(ts DESC);
|
|
45
|
+
CREATE INDEX IF NOT EXISTS idx_activity_log_agent ON t_activity_log(agent_id);
|
|
46
|
+
CREATE INDEX IF NOT EXISTS idx_activity_log_action ON t_activity_log(action_type);
|
|
47
|
+
`);
|
|
48
|
+
details.push('Created indexes for t_activity_log');
|
|
49
|
+
}
|
|
50
|
+
// 2. Add t_decision_templates table (FR-006)
|
|
51
|
+
const templatesExists = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='t_decision_templates'").get();
|
|
52
|
+
if (!templatesExists) {
|
|
53
|
+
db.exec(`
|
|
54
|
+
CREATE TABLE t_decision_templates (
|
|
55
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
56
|
+
name TEXT UNIQUE NOT NULL,
|
|
57
|
+
defaults TEXT NOT NULL,
|
|
58
|
+
required_fields TEXT,
|
|
59
|
+
created_by INTEGER REFERENCES m_agents(id),
|
|
60
|
+
ts INTEGER DEFAULT (unixepoch())
|
|
61
|
+
);
|
|
62
|
+
`);
|
|
63
|
+
details.push('Created table: t_decision_templates (FR-006)');
|
|
64
|
+
// Insert built-in templates
|
|
65
|
+
const insertTemplate = db.prepare(`
|
|
66
|
+
INSERT OR IGNORE INTO t_decision_templates (name, defaults, required_fields, created_by, ts)
|
|
67
|
+
VALUES (?, ?, ?, NULL, unixepoch())
|
|
68
|
+
`);
|
|
69
|
+
insertTemplate.run('breaking_change', '{"layer":"business","status":"active","tags":["breaking"]}', null);
|
|
70
|
+
insertTemplate.run('security_vulnerability', '{"layer":"infrastructure","status":"active","tags":["security","vulnerability"]}', '["cve_id","severity"]');
|
|
71
|
+
insertTemplate.run('performance_optimization', '{"layer":"business","status":"active","tags":["performance","optimization"]}', null);
|
|
72
|
+
insertTemplate.run('deprecation', '{"layer":"business","status":"active","tags":["deprecation"]}', null);
|
|
73
|
+
insertTemplate.run('architecture_decision', '{"layer":"infrastructure","status":"active","tags":["architecture","adr"]}', null);
|
|
74
|
+
details.push('Inserted 5 built-in decision templates');
|
|
75
|
+
}
|
|
76
|
+
// 3. Add activity logging triggers (FR-001)
|
|
77
|
+
const triggerNames = [
|
|
78
|
+
'trg_log_decision_set',
|
|
79
|
+
'trg_log_decision_update',
|
|
80
|
+
'trg_log_message_send',
|
|
81
|
+
'trg_log_file_record'
|
|
82
|
+
];
|
|
83
|
+
let triggersCreated = 0;
|
|
84
|
+
// Check if triggers exist
|
|
85
|
+
for (const triggerName of triggerNames) {
|
|
86
|
+
const exists = db.prepare("SELECT name FROM sqlite_master WHERE type='trigger' AND name=?").get(triggerName);
|
|
87
|
+
if (!exists) {
|
|
88
|
+
triggersCreated++;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
if (triggersCreated > 0) {
|
|
92
|
+
// Create triggers
|
|
93
|
+
db.exec(`
|
|
94
|
+
-- Decision Addition Log
|
|
95
|
+
CREATE TRIGGER IF NOT EXISTS trg_log_decision_set
|
|
96
|
+
AFTER INSERT ON t_decisions
|
|
97
|
+
BEGIN
|
|
98
|
+
INSERT INTO t_activity_log (agent_id, action_type, target, layer_id, details)
|
|
99
|
+
SELECT
|
|
100
|
+
COALESCE(NEW.agent_id, (SELECT id FROM m_agents WHERE name = 'system' LIMIT 1)),
|
|
101
|
+
'decision_set',
|
|
102
|
+
(SELECT key FROM m_context_keys WHERE id = NEW.key_id),
|
|
103
|
+
NEW.layer_id,
|
|
104
|
+
json_object('value', NEW.value, 'version', NEW.version, 'status', NEW.status);
|
|
105
|
+
END;
|
|
106
|
+
|
|
107
|
+
-- Decision Update Log
|
|
108
|
+
CREATE TRIGGER IF NOT EXISTS trg_log_decision_update
|
|
109
|
+
AFTER UPDATE ON t_decisions
|
|
110
|
+
WHEN OLD.value != NEW.value OR OLD.version != NEW.version OR OLD.status != NEW.status
|
|
111
|
+
BEGIN
|
|
112
|
+
INSERT INTO t_activity_log (agent_id, action_type, target, layer_id, details)
|
|
113
|
+
SELECT
|
|
114
|
+
COALESCE(NEW.agent_id, (SELECT id FROM m_agents WHERE name = 'system' LIMIT 1)),
|
|
115
|
+
'decision_update',
|
|
116
|
+
(SELECT key FROM m_context_keys WHERE id = NEW.key_id),
|
|
117
|
+
NEW.layer_id,
|
|
118
|
+
json_object('old_value', OLD.value, 'new_value', NEW.value, 'old_version', OLD.version, 'new_version', NEW.version, 'old_status', OLD.status, 'new_status', NEW.status);
|
|
119
|
+
END;
|
|
120
|
+
|
|
121
|
+
-- Message Send Log
|
|
122
|
+
CREATE TRIGGER IF NOT EXISTS trg_log_message_send
|
|
123
|
+
AFTER INSERT ON t_agent_messages
|
|
124
|
+
BEGIN
|
|
125
|
+
INSERT INTO t_activity_log (agent_id, action_type, target, layer_id, details)
|
|
126
|
+
SELECT
|
|
127
|
+
NEW.from_agent_id,
|
|
128
|
+
'message_send',
|
|
129
|
+
'msg_id:' || NEW.id,
|
|
130
|
+
NULL,
|
|
131
|
+
json_object('to_agent_id', NEW.to_agent_id, 'msg_type', NEW.msg_type, 'priority', NEW.priority);
|
|
132
|
+
END;
|
|
133
|
+
|
|
134
|
+
-- File Change Log
|
|
135
|
+
CREATE TRIGGER IF NOT EXISTS trg_log_file_record
|
|
136
|
+
AFTER INSERT ON t_file_changes
|
|
137
|
+
BEGIN
|
|
138
|
+
INSERT INTO t_activity_log (agent_id, action_type, target, layer_id, details)
|
|
139
|
+
SELECT
|
|
140
|
+
NEW.agent_id,
|
|
141
|
+
'file_record',
|
|
142
|
+
(SELECT path FROM m_files WHERE id = NEW.file_id),
|
|
143
|
+
NEW.layer_id,
|
|
144
|
+
json_object('change_type', NEW.change_type, 'description', NEW.description);
|
|
145
|
+
END;
|
|
146
|
+
`);
|
|
147
|
+
details.push(`Created ${triggersCreated} activity logging triggers`);
|
|
148
|
+
}
|
|
149
|
+
// Commit transaction
|
|
150
|
+
db.exec('COMMIT');
|
|
151
|
+
return {
|
|
152
|
+
success: true,
|
|
153
|
+
message: 'Migration to v2.1.0 completed successfully.',
|
|
154
|
+
details
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
catch (error) {
|
|
158
|
+
// Rollback on error
|
|
159
|
+
db.exec('ROLLBACK');
|
|
160
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
161
|
+
return {
|
|
162
|
+
success: false,
|
|
163
|
+
message: `Migration failed: ${message}`,
|
|
164
|
+
details
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Get migration info
|
|
170
|
+
*/
|
|
171
|
+
export function getMigrationInfo() {
|
|
172
|
+
return `
|
|
173
|
+
Migration: Add v2.1.0 Features (v2.0.0 -> v2.1.0)
|
|
174
|
+
|
|
175
|
+
This migration adds new features from the v2.1.0 release:
|
|
176
|
+
|
|
177
|
+
**FR-001: Activity Log**
|
|
178
|
+
- New table: t_activity_log
|
|
179
|
+
- 3 new indexes for performance
|
|
180
|
+
- 4 new triggers for automatic logging
|
|
181
|
+
|
|
182
|
+
**FR-006: Decision Templates**
|
|
183
|
+
- New table: t_decision_templates
|
|
184
|
+
- 5 built-in templates (breaking_change, security_vulnerability, performance_optimization, deprecation, architecture_decision)
|
|
185
|
+
|
|
186
|
+
**New Features:**
|
|
187
|
+
- Activity logging for all major operations
|
|
188
|
+
- Template-based decision creation
|
|
189
|
+
- Advanced query capabilities (FR-004)
|
|
190
|
+
- Batch operations (FR-005)
|
|
191
|
+
- Smart defaults with inference (FR-002)
|
|
192
|
+
- Lightweight update polling (FR-003)
|
|
193
|
+
- Standalone CLI query tool (FR-007)
|
|
194
|
+
|
|
195
|
+
This migration is safe and reversible via backup restoration.
|
|
196
|
+
`.trim();
|
|
197
|
+
}
|
|
198
|
+
//# sourceMappingURL=add-v2.1.0-features.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-v2.1.0-features.js","sourceRoot":"","sources":["../../src/migrations/add-v2.1.0-features.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQ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AAC;CAClB,
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAQ1C;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,QAAQ,GAAG,IAAI,CAyBnD;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,QAAQ,GAAG,OAAO,CAUzD;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,EAAE,EAAE,QAAQ,GAAG;IAC3C,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,qBAAqB,EAAE,MAAM,CAAC;CAC/B,CAwBA;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,QAAQ,GAAG;IACnD,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAiGA"}
|
package/dist/schema.js
CHANGED
|
@@ -104,6 +104,7 @@ export function verifySchemaIntegrity(db) {
|
|
|
104
104
|
't_decisions', 't_decisions_numeric', 't_decision_history',
|
|
105
105
|
't_decision_tags', 't_decision_scopes',
|
|
106
106
|
't_agent_messages', 't_file_changes', 't_constraints', 't_constraint_tags',
|
|
107
|
+
't_activity_log', 't_decision_templates',
|
|
107
108
|
];
|
|
108
109
|
const requiredViews = [
|
|
109
110
|
'v_tagged_decisions', 'v_active_context', 'v_layer_summary',
|
|
@@ -111,6 +112,10 @@ export function verifySchemaIntegrity(db) {
|
|
|
111
112
|
];
|
|
112
113
|
const requiredTriggers = [
|
|
113
114
|
'trg_record_decision_history',
|
|
115
|
+
'trg_log_decision_set',
|
|
116
|
+
'trg_log_decision_update',
|
|
117
|
+
'trg_log_message_send',
|
|
118
|
+
'trg_log_file_record',
|
|
114
119
|
];
|
|
115
120
|
try {
|
|
116
121
|
// Check tables
|
package/dist/schema.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AAEpC,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAEtC;;;;;;GAMG;AACH,MAAM,UAAU,gBAAgB,CAAC,EAAY;IAC3C,IAAI,CAAC;QACH,mBAAmB;QACnB,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAC;QACjE,MAAM,SAAS,GAAG,YAAY,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QAEpD,gDAAgD;QAChD,EAAE,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;QAE7B,IAAI,CAAC;YACH,4BAA4B;YAC5B,yEAAyE;YACzE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YAEnB,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YAElB,OAAO,CAAC,GAAG,CAAC,4CAA4C,CAAC,CAAC;QAC5D,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YACpB,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;IAAC,OAAO,KAA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YACpB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,sCAAsC,WAAW,EAAE,CAAC,CAAC;YACxE,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC;QACvB,CAAC;IAEH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC;QACrB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IAC7E,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/dist/tools/context.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Context management tools for MCP Shared Context Server
|
|
3
3
|
* Implements set_decision, get_context, and get_decision tools
|
|
4
4
|
*/
|
|
5
|
-
import type { SetDecisionParams, GetContextParams, GetDecisionParams, SetDecisionResponse, GetContextResponse, GetDecisionResponse, SearchByTagsParams, SearchByTagsResponse, GetVersionsParams, GetVersionsResponse, SearchByLayerParams, SearchByLayerResponse } from '../types.js';
|
|
5
|
+
import type { SetDecisionParams, GetContextParams, GetDecisionParams, SetDecisionResponse, GetContextResponse, GetDecisionResponse, SearchByTagsParams, SearchByTagsResponse, GetVersionsParams, GetVersionsResponse, SearchByLayerParams, SearchByLayerResponse, QuickSetDecisionParams, QuickSetDecisionResponse, SearchAdvancedParams, SearchAdvancedResponse, SetDecisionBatchParams, SetDecisionBatchResponse, SetFromTemplateParams, SetFromTemplateResponse, CreateTemplateParams, CreateTemplateResponse, ListTemplatesParams, ListTemplatesResponse, HasUpdatesParams, HasUpdatesResponse } from '../types.js';
|
|
6
6
|
/**
|
|
7
7
|
* Set or update a decision in the context
|
|
8
8
|
* Auto-detects numeric vs string values and routes to appropriate table
|
|
@@ -53,4 +53,94 @@ export declare function getVersions(params: GetVersionsParams): GetVersionsRespo
|
|
|
53
53
|
* @returns Array of t_decisions in the specified layer
|
|
54
54
|
*/
|
|
55
55
|
export declare function searchByLayer(params: SearchByLayerParams): SearchByLayerResponse;
|
|
56
|
+
/**
|
|
57
|
+
* Quick set decision with smart defaults and inference
|
|
58
|
+
* Reduces required parameters from 7 to 2 (key + value only)
|
|
59
|
+
*
|
|
60
|
+
* Inference Rules:
|
|
61
|
+
* - Layer: Inferred from key prefix
|
|
62
|
+
* - api/*, endpoint/*, ui/* → "presentation"
|
|
63
|
+
* - service/*, logic/*, workflow/* → "business"
|
|
64
|
+
* - db/*, model/*, schema/* → "data"
|
|
65
|
+
* - config/*, deploy/* → "infrastructure"
|
|
66
|
+
* - Default → "business"
|
|
67
|
+
*
|
|
68
|
+
* - Tags: Extracted from key hierarchy
|
|
69
|
+
* - Key "api/instruments/synthesis" → tags: ["api", "instruments", "synthesis"]
|
|
70
|
+
*
|
|
71
|
+
* - Scope: Inferred from key hierarchy
|
|
72
|
+
* - Key "api/instruments/synthesis" → scope: "api/instruments"
|
|
73
|
+
*
|
|
74
|
+
* - Auto-defaults:
|
|
75
|
+
* - status: "active"
|
|
76
|
+
* - version: "1.0.0"
|
|
77
|
+
*
|
|
78
|
+
* All inferred fields can be overridden via optional parameters.
|
|
79
|
+
*
|
|
80
|
+
* @param params - Quick set parameters (key and value required)
|
|
81
|
+
* @returns Response with success status and inferred metadata
|
|
82
|
+
*/
|
|
83
|
+
export declare function quickSetDecision(params: QuickSetDecisionParams): QuickSetDecisionResponse;
|
|
84
|
+
/**
|
|
85
|
+
* Advanced query composition with complex filtering capabilities
|
|
86
|
+
* Supports multiple filter types, sorting, and pagination
|
|
87
|
+
*
|
|
88
|
+
* Filter Logic:
|
|
89
|
+
* - layers: OR relationship - match any layer in the array
|
|
90
|
+
* - tags_all: AND relationship - must have ALL tags
|
|
91
|
+
* - tags_any: OR relationship - must have ANY tag
|
|
92
|
+
* - exclude_tags: Exclude decisions with these tags
|
|
93
|
+
* - scopes: Wildcard support (e.g., "api/instruments/*")
|
|
94
|
+
* - updated_after/before: Temporal filtering (ISO timestamp or relative like "7d")
|
|
95
|
+
* - decided_by: Filter by agent names (OR relationship)
|
|
96
|
+
* - statuses: Multiple statuses (OR relationship)
|
|
97
|
+
* - search_text: Full-text search in value field
|
|
98
|
+
*
|
|
99
|
+
* @param params - Advanced search parameters with filtering, sorting, pagination
|
|
100
|
+
* @returns Filtered decisions with total count for pagination
|
|
101
|
+
*/
|
|
102
|
+
export declare function searchAdvanced(params?: SearchAdvancedParams): SearchAdvancedResponse;
|
|
103
|
+
/**
|
|
104
|
+
* Set multiple decisions in a single batch operation (FR-005)
|
|
105
|
+
* Supports atomic (all succeed or all fail) and non-atomic modes
|
|
106
|
+
* Limit: 50 items per batch (constraint #3)
|
|
107
|
+
*
|
|
108
|
+
* @param params - Batch parameters with array of decisions and atomic flag
|
|
109
|
+
* @returns Response with success status and detailed results for each item
|
|
110
|
+
*/
|
|
111
|
+
export declare function setDecisionBatch(params: SetDecisionBatchParams): SetDecisionBatchResponse;
|
|
112
|
+
/**
|
|
113
|
+
* Check for updates since a given timestamp (FR-003 Phase A)
|
|
114
|
+
* Lightweight polling mechanism using COUNT queries
|
|
115
|
+
* Token cost: ~5-10 tokens per check
|
|
116
|
+
*
|
|
117
|
+
* @param params - Agent name and since_timestamp (ISO 8601)
|
|
118
|
+
* @returns Boolean flag and counts for decisions, messages, files
|
|
119
|
+
*/
|
|
120
|
+
export declare function hasUpdates(params: HasUpdatesParams): HasUpdatesResponse;
|
|
121
|
+
/**
|
|
122
|
+
* Set decision from template with defaults and required field validation (FR-006)
|
|
123
|
+
* Applies template defaults while allowing overrides
|
|
124
|
+
* Validates required fields if template specifies any
|
|
125
|
+
*
|
|
126
|
+
* @param params - Template name, key, value, and optional overrides
|
|
127
|
+
* @returns Response with success status and applied defaults metadata
|
|
128
|
+
*/
|
|
129
|
+
export declare function setFromTemplate(params: SetFromTemplateParams): SetFromTemplateResponse;
|
|
130
|
+
/**
|
|
131
|
+
* Create a new decision template (FR-006)
|
|
132
|
+
* Defines reusable defaults and required fields for decisions
|
|
133
|
+
*
|
|
134
|
+
* @param params - Template name, defaults, required fields, and creator
|
|
135
|
+
* @returns Response with success status and template ID
|
|
136
|
+
*/
|
|
137
|
+
export declare function createTemplate(params: CreateTemplateParams): CreateTemplateResponse;
|
|
138
|
+
/**
|
|
139
|
+
* List all available decision templates (FR-006)
|
|
140
|
+
* Returns all templates with their defaults and metadata
|
|
141
|
+
*
|
|
142
|
+
* @param params - No parameters required
|
|
143
|
+
* @returns Array of all templates with parsed JSON fields
|
|
144
|
+
*/
|
|
145
|
+
export declare function listTemplates(params?: ListTemplatesParams): ListTemplatesResponse;
|
|
56
146
|
//# sourceMappingURL=context.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/tools/context.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EACV,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EAInB,kBAAkB,EAClB,oBAAoB,EACpB,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,aAAa,CAAC;AAErB;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,iBAAiB,GAAG,mBAAmB,CAkH1E;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,MAAM,GAAE,gBAAqB,GAAG,kBAAkB,CAiE5E;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,iBAAiB,GAAG,mBAAmB,CA2B1E;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,kBAAkB,GAAG,oBAAoB,CAkE7E;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,iBAAiB,GAAG,mBAAmB,CA4D1E;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,mBAAmB,GAAG,qBAAqB,CAkGhF"}
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/tools/context.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EACV,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EAInB,kBAAkB,EAClB,oBAAoB,EACpB,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,sBAAsB,EACtB,wBAAwB,EACxB,oBAAoB,EACpB,sBAAsB,EACtB,sBAAsB,EACtB,wBAAwB,EACxB,qBAAqB,EACrB,uBAAuB,EACvB,oBAAoB,EACpB,sBAAsB,EACtB,mBAAmB,EACnB,qBAAqB,EACrB,gBAAgB,EAChB,kBAAkB,EACnB,MAAM,aAAa,CAAC;AAErB;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,iBAAiB,GAAG,mBAAmB,CAkH1E;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,MAAM,GAAE,gBAAqB,GAAG,kBAAkB,CAiE5E;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,iBAAiB,GAAG,mBAAmB,CA2B1E;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,kBAAkB,GAAG,oBAAoB,CAkE7E;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,iBAAiB,GAAG,mBAAmB,CA4D1E;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,mBAAmB,GAAG,qBAAqB,CAkGhF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,sBAAsB,GAAG,wBAAwB,CAoFzF;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,w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