@askexenow/exe-os 0.9.66 → 0.9.67
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/deploy/stack-manifests/v0.9.json +54 -5
- package/dist/bin/age-ontology-load.js +61 -0
- package/dist/bin/agentic-ontology-backfill.js +4708 -0
- package/dist/bin/agentic-reflection-backfill.js +4144 -0
- package/dist/bin/{exe-link.js → agentic-semantic-label.js} +1523 -2275
- package/dist/bin/backfill-conversations.js +506 -20
- package/dist/bin/backfill-responses.js +506 -20
- package/dist/bin/backfill-vectors.js +233 -20
- package/dist/bin/bulk-sync-postgres.js +4876 -0
- package/dist/bin/cleanup-stale-review-tasks.js +507 -21
- package/dist/bin/cli.js +2450 -1530
- package/dist/bin/exe-assign.js +506 -20
- package/dist/bin/exe-boot.js +410 -60
- package/dist/bin/exe-cloud.js +795 -105
- package/dist/bin/exe-dispatch.js +516 -22
- package/dist/bin/exe-doctor.js +587 -30
- package/dist/bin/exe-export-behaviors.js +518 -24
- package/dist/bin/exe-forget.js +507 -21
- package/dist/bin/exe-gateway.js +571 -25
- package/dist/bin/exe-heartbeat.js +518 -24
- package/dist/bin/exe-kill.js +507 -21
- package/dist/bin/exe-launch-agent.js +2312 -1069
- package/dist/bin/exe-new-employee.js +197 -165
- package/dist/bin/exe-pending-messages.js +507 -21
- package/dist/bin/exe-pending-notifications.js +507 -21
- package/dist/bin/exe-pending-reviews.js +507 -21
- package/dist/bin/exe-rename.js +507 -21
- package/dist/bin/exe-review.js +507 -21
- package/dist/bin/exe-search.js +518 -24
- package/dist/bin/exe-session-cleanup.js +516 -22
- package/dist/bin/exe-settings.js +4 -0
- package/dist/bin/exe-start-codex.js +682 -143
- package/dist/bin/exe-start-opencode.js +627 -79
- package/dist/bin/exe-status.js +507 -21
- package/dist/bin/exe-team.js +507 -21
- package/dist/bin/git-sweep.js +516 -22
- package/dist/bin/graph-backfill.js +558 -21
- package/dist/bin/graph-export.js +507 -21
- package/dist/bin/graph-layer-benchmark.js +109 -0
- package/dist/bin/install.js +305 -288
- package/dist/bin/intercom-check.js +516 -22
- package/dist/bin/postgres-agentic-reflection-backfill.js +187 -0
- package/dist/bin/postgres-agentic-semantic-backfill.js +237 -0
- package/dist/bin/scan-tasks.js +516 -22
- package/dist/bin/setup.js +412 -62
- package/dist/bin/shard-migrate.js +506 -20
- package/dist/gateway/index.js +569 -23
- package/dist/hooks/bug-report-worker.js +519 -25
- package/dist/hooks/codex-stop-task-finalizer.js +516 -22
- package/dist/hooks/commit-complete.js +516 -22
- package/dist/hooks/error-recall.js +518 -24
- package/dist/hooks/ingest.js +516 -22
- package/dist/hooks/instructions-loaded.js +507 -21
- package/dist/hooks/notification.js +507 -21
- package/dist/hooks/post-compact.js +507 -21
- package/dist/hooks/post-tool-combined.js +519 -25
- package/dist/hooks/pre-compact.js +516 -22
- package/dist/hooks/pre-tool-use.js +507 -21
- package/dist/hooks/prompt-submit.js +519 -25
- package/dist/hooks/session-end.js +516 -22
- package/dist/hooks/session-start.js +520 -26
- package/dist/hooks/stop.js +517 -23
- package/dist/hooks/subagent-stop.js +507 -21
- package/dist/hooks/summary-worker.js +411 -61
- package/dist/index.js +569 -23
- package/dist/lib/cloud-sync.js +391 -53
- package/dist/lib/config.js +13 -1
- package/dist/lib/consolidation.js +1 -1
- package/dist/lib/database.js +124 -0
- package/dist/lib/db.js +124 -0
- package/dist/lib/device-registry.js +124 -0
- package/dist/lib/embedder.js +13 -1
- package/dist/lib/exe-daemon.js +2184 -561
- package/dist/lib/hybrid-search.js +518 -24
- package/dist/lib/identity.js +3 -0
- package/dist/lib/keychain.js +178 -22
- package/dist/lib/messaging.js +3 -0
- package/dist/lib/reminders.js +3 -0
- package/dist/lib/schedules.js +233 -20
- package/dist/lib/skill-learning.js +16 -1
- package/dist/lib/store.js +506 -20
- package/dist/lib/tasks.js +16 -1
- package/dist/lib/tmux-routing.js +16 -1
- package/dist/lib/token-spend.js +3 -0
- package/dist/mcp/server.js +1757 -428
- package/dist/mcp/tools/complete-reminder.js +3 -0
- package/dist/mcp/tools/create-reminder.js +3 -0
- package/dist/mcp/tools/create-task.js +16 -1
- package/dist/mcp/tools/deactivate-behavior.js +3 -0
- package/dist/mcp/tools/list-reminders.js +3 -0
- package/dist/mcp/tools/list-tasks.js +3 -0
- package/dist/mcp/tools/send-message.js +3 -0
- package/dist/mcp/tools/update-task.js +16 -1
- package/dist/runtime/index.js +516 -22
- package/dist/tui/App.js +594 -29
- package/package.json +8 -5
- package/src/commands/exe/cloud.md +6 -10
- package/stack.release.json +3 -3
- package/src/commands/exe/link.md +0 -18
package/dist/bin/exe-assign.js
CHANGED
|
@@ -158,6 +158,10 @@ async function loadConfig() {
|
|
|
158
158
|
if (config.dbPath.startsWith("~")) {
|
|
159
159
|
config.dbPath = config.dbPath.replace(/^~/, os.homedir());
|
|
160
160
|
}
|
|
161
|
+
const envDbPath = path.join(dir, "memories.db");
|
|
162
|
+
if (process.env.EXE_OS_DIR && config.dbPath !== envDbPath && !existsSync2(config.dbPath) && existsSync2(envDbPath)) {
|
|
163
|
+
config.dbPath = envDbPath;
|
|
164
|
+
}
|
|
161
165
|
return config;
|
|
162
166
|
} catch {
|
|
163
167
|
return { ...DEFAULT_CONFIG, dbPath: path.join(dir, "memories.db") };
|
|
@@ -1679,6 +1683,9 @@ function getClient() {
|
|
|
1679
1683
|
if (_daemonClient && _daemonClient._isDaemonActive()) {
|
|
1680
1684
|
return _daemonClient;
|
|
1681
1685
|
}
|
|
1686
|
+
if (!_resilientClient) {
|
|
1687
|
+
return _adapterClient;
|
|
1688
|
+
}
|
|
1682
1689
|
return _resilientClient;
|
|
1683
1690
|
}
|
|
1684
1691
|
async function initDaemonClient() {
|
|
@@ -2711,6 +2718,127 @@ async function ensureSchema() {
|
|
|
2711
2718
|
VALUES (new.rowid, new.content, new.subject, new.predicate, new.object);
|
|
2712
2719
|
END;
|
|
2713
2720
|
`);
|
|
2721
|
+
await client.executeMultiple(`
|
|
2722
|
+
CREATE TABLE IF NOT EXISTS agent_sessions (
|
|
2723
|
+
id TEXT PRIMARY KEY,
|
|
2724
|
+
agent_id TEXT NOT NULL,
|
|
2725
|
+
project_name TEXT,
|
|
2726
|
+
started_at TEXT NOT NULL,
|
|
2727
|
+
last_event_at TEXT NOT NULL,
|
|
2728
|
+
event_count INTEGER NOT NULL DEFAULT 0,
|
|
2729
|
+
properties TEXT DEFAULT '{}'
|
|
2730
|
+
);
|
|
2731
|
+
|
|
2732
|
+
CREATE INDEX IF NOT EXISTS idx_agent_sessions_agent_time
|
|
2733
|
+
ON agent_sessions(agent_id, started_at);
|
|
2734
|
+
|
|
2735
|
+
CREATE TABLE IF NOT EXISTS agent_goals (
|
|
2736
|
+
id TEXT PRIMARY KEY,
|
|
2737
|
+
statement TEXT NOT NULL,
|
|
2738
|
+
owner_agent_id TEXT,
|
|
2739
|
+
project_name TEXT,
|
|
2740
|
+
status TEXT NOT NULL DEFAULT 'open',
|
|
2741
|
+
priority INTEGER NOT NULL DEFAULT 5,
|
|
2742
|
+
success_criteria TEXT,
|
|
2743
|
+
parent_goal_id TEXT,
|
|
2744
|
+
due_at TEXT,
|
|
2745
|
+
achieved_at TEXT,
|
|
2746
|
+
supersedes_id TEXT,
|
|
2747
|
+
created_at TEXT NOT NULL,
|
|
2748
|
+
updated_at TEXT NOT NULL,
|
|
2749
|
+
source_memory_id TEXT
|
|
2750
|
+
);
|
|
2751
|
+
|
|
2752
|
+
CREATE INDEX IF NOT EXISTS idx_agent_goals_project_status
|
|
2753
|
+
ON agent_goals(project_name, status, priority);
|
|
2754
|
+
|
|
2755
|
+
CREATE TABLE IF NOT EXISTS agent_events (
|
|
2756
|
+
id TEXT PRIMARY KEY,
|
|
2757
|
+
event_type TEXT NOT NULL,
|
|
2758
|
+
occurred_at TEXT NOT NULL,
|
|
2759
|
+
sequence_index INTEGER NOT NULL,
|
|
2760
|
+
actor_agent_id TEXT,
|
|
2761
|
+
agent_role TEXT,
|
|
2762
|
+
project_name TEXT,
|
|
2763
|
+
session_id TEXT,
|
|
2764
|
+
task_id TEXT,
|
|
2765
|
+
goal_id TEXT,
|
|
2766
|
+
parent_event_id TEXT,
|
|
2767
|
+
intention TEXT,
|
|
2768
|
+
outcome TEXT,
|
|
2769
|
+
evidence_memory_id TEXT,
|
|
2770
|
+
impact TEXT,
|
|
2771
|
+
payload TEXT DEFAULT '{}',
|
|
2772
|
+
created_at TEXT NOT NULL
|
|
2773
|
+
);
|
|
2774
|
+
|
|
2775
|
+
CREATE INDEX IF NOT EXISTS idx_agent_events_time
|
|
2776
|
+
ON agent_events(occurred_at, sequence_index);
|
|
2777
|
+
|
|
2778
|
+
CREATE INDEX IF NOT EXISTS idx_agent_events_session_seq
|
|
2779
|
+
ON agent_events(session_id, sequence_index);
|
|
2780
|
+
|
|
2781
|
+
CREATE INDEX IF NOT EXISTS idx_agent_events_goal_time
|
|
2782
|
+
ON agent_events(goal_id, occurred_at);
|
|
2783
|
+
|
|
2784
|
+
CREATE INDEX IF NOT EXISTS idx_agent_events_memory
|
|
2785
|
+
ON agent_events(evidence_memory_id);
|
|
2786
|
+
|
|
2787
|
+
CREATE TABLE IF NOT EXISTS agent_goal_links (
|
|
2788
|
+
id TEXT PRIMARY KEY,
|
|
2789
|
+
goal_id TEXT NOT NULL,
|
|
2790
|
+
link_type TEXT NOT NULL,
|
|
2791
|
+
target_id TEXT NOT NULL,
|
|
2792
|
+
target_type TEXT NOT NULL,
|
|
2793
|
+
created_at TEXT NOT NULL
|
|
2794
|
+
);
|
|
2795
|
+
|
|
2796
|
+
CREATE INDEX IF NOT EXISTS idx_agent_goal_links_goal
|
|
2797
|
+
ON agent_goal_links(goal_id, target_type);
|
|
2798
|
+
|
|
2799
|
+
CREATE TABLE IF NOT EXISTS agent_semantic_labels (
|
|
2800
|
+
id TEXT PRIMARY KEY,
|
|
2801
|
+
source_memory_id TEXT NOT NULL,
|
|
2802
|
+
event_id TEXT,
|
|
2803
|
+
labeler TEXT NOT NULL,
|
|
2804
|
+
schema_version INTEGER NOT NULL DEFAULT 1,
|
|
2805
|
+
confidence REAL NOT NULL DEFAULT 0,
|
|
2806
|
+
labels TEXT NOT NULL,
|
|
2807
|
+
created_at TEXT NOT NULL,
|
|
2808
|
+
updated_at TEXT NOT NULL
|
|
2809
|
+
);
|
|
2810
|
+
|
|
2811
|
+
CREATE INDEX IF NOT EXISTS idx_agent_semantic_labels_memory
|
|
2812
|
+
ON agent_semantic_labels(source_memory_id, labeler);
|
|
2813
|
+
|
|
2814
|
+
CREATE INDEX IF NOT EXISTS idx_agent_semantic_labels_event
|
|
2815
|
+
ON agent_semantic_labels(event_id);
|
|
2816
|
+
|
|
2817
|
+
CREATE TABLE IF NOT EXISTS agent_reflection_checkpoints (
|
|
2818
|
+
id TEXT PRIMARY KEY,
|
|
2819
|
+
project_name TEXT,
|
|
2820
|
+
session_id TEXT,
|
|
2821
|
+
window_start_at TEXT NOT NULL,
|
|
2822
|
+
window_end_at TEXT NOT NULL,
|
|
2823
|
+
event_count INTEGER NOT NULL DEFAULT 0,
|
|
2824
|
+
goal_count INTEGER NOT NULL DEFAULT 0,
|
|
2825
|
+
success_count INTEGER NOT NULL DEFAULT 0,
|
|
2826
|
+
failure_count INTEGER NOT NULL DEFAULT 0,
|
|
2827
|
+
risk_count INTEGER NOT NULL DEFAULT 0,
|
|
2828
|
+
summary TEXT NOT NULL,
|
|
2829
|
+
learnings TEXT NOT NULL DEFAULT '[]',
|
|
2830
|
+
next_actions TEXT NOT NULL DEFAULT '[]',
|
|
2831
|
+
evidence_event_ids TEXT NOT NULL DEFAULT '[]',
|
|
2832
|
+
confidence REAL NOT NULL DEFAULT 0,
|
|
2833
|
+
created_at TEXT NOT NULL
|
|
2834
|
+
);
|
|
2835
|
+
|
|
2836
|
+
CREATE INDEX IF NOT EXISTS idx_agent_reflection_project_time
|
|
2837
|
+
ON agent_reflection_checkpoints(project_name, window_end_at);
|
|
2838
|
+
|
|
2839
|
+
CREATE INDEX IF NOT EXISTS idx_agent_reflection_session_time
|
|
2840
|
+
ON agent_reflection_checkpoints(session_id, window_end_at);
|
|
2841
|
+
`);
|
|
2714
2842
|
try {
|
|
2715
2843
|
await client.execute({
|
|
2716
2844
|
sql: `ALTER TABLE memories ADD COLUMN tier INTEGER DEFAULT 3`,
|
|
@@ -2874,7 +3002,7 @@ __export(shard_manager_exports, {
|
|
|
2874
3002
|
shardExists: () => shardExists
|
|
2875
3003
|
});
|
|
2876
3004
|
import path7 from "path";
|
|
2877
|
-
import { existsSync as existsSync7, mkdirSync as mkdirSync2, readdirSync, renameSync as renameSync3, statSync as
|
|
3005
|
+
import { existsSync as existsSync7, mkdirSync as mkdirSync2, readdirSync, renameSync as renameSync3, statSync as statSync3 } from "fs";
|
|
2878
3006
|
import { createClient as createClient2 } from "@libsql/client";
|
|
2879
3007
|
function initShardManager(encryptionKey) {
|
|
2880
3008
|
_encryptionKey = encryptionKey;
|
|
@@ -2938,7 +3066,7 @@ async function auditShardHealth(options = {}) {
|
|
|
2938
3066
|
const shards = [];
|
|
2939
3067
|
for (const name of names) {
|
|
2940
3068
|
const dbPath = path7.join(SHARDS_DIR, `${name}.db`);
|
|
2941
|
-
const stat =
|
|
3069
|
+
const stat = statSync3(dbPath);
|
|
2942
3070
|
const item = {
|
|
2943
3071
|
name,
|
|
2944
3072
|
path: dbPath,
|
|
@@ -3191,7 +3319,7 @@ async function getReadyShardClient(projectName) {
|
|
|
3191
3319
|
_shardLastAccess.delete(safeName);
|
|
3192
3320
|
const dbPath = path7.join(SHARDS_DIR, `${safeName}.db`);
|
|
3193
3321
|
if (existsSync7(dbPath)) {
|
|
3194
|
-
const stat =
|
|
3322
|
+
const stat = statSync3(dbPath);
|
|
3195
3323
|
const stamp = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
|
|
3196
3324
|
const archivedPath = path7.join(SHARDS_DIR, `${safeName}.db.broken-${stamp}`);
|
|
3197
3325
|
renameSync3(dbPath, archivedPath);
|
|
@@ -3698,6 +3826,274 @@ var init_memory_cards = __esm({
|
|
|
3698
3826
|
}
|
|
3699
3827
|
});
|
|
3700
3828
|
|
|
3829
|
+
// src/lib/agentic-ontology.ts
|
|
3830
|
+
var agentic_ontology_exports = {};
|
|
3831
|
+
__export(agentic_ontology_exports, {
|
|
3832
|
+
clean: () => clean,
|
|
3833
|
+
extractGoalCandidates: () => extractGoalCandidates,
|
|
3834
|
+
inferIntention: () => inferIntention,
|
|
3835
|
+
inferOntologyEventType: () => inferOntologyEventType,
|
|
3836
|
+
inferOutcome: () => inferOutcome,
|
|
3837
|
+
inferSemanticLabel: () => inferSemanticLabel,
|
|
3838
|
+
insertOntologyForBatch: () => insertOntologyForBatch,
|
|
3839
|
+
insertOntologyForMemory: () => insertOntologyForMemory,
|
|
3840
|
+
ontologyPayload: () => ontologyPayload,
|
|
3841
|
+
stableId: () => stableId2
|
|
3842
|
+
});
|
|
3843
|
+
import { createHash as createHash3 } from "crypto";
|
|
3844
|
+
function stableId2(...parts) {
|
|
3845
|
+
return createHash3("sha256").update(parts.map((p) => String(p ?? "")).join("::")).digest("hex").slice(0, 32);
|
|
3846
|
+
}
|
|
3847
|
+
function clean(text, max = 240) {
|
|
3848
|
+
return text.replace(/\u0000/g, "").replace(/```[\s\S]*?```/g, " ").replace(/\s+/g, " ").trim().slice(0, max);
|
|
3849
|
+
}
|
|
3850
|
+
function inferOntologyEventType(row) {
|
|
3851
|
+
const lower = row.raw_text.toLowerCase();
|
|
3852
|
+
if (row.has_error) return "error";
|
|
3853
|
+
if (/\b(done|complete|completed|fixed|resolved|shipped|deployed|pushed|published)\b/.test(lower)) return "milestone";
|
|
3854
|
+
if (/\b(blocked|failed|error|bug|regression|broken)\b/.test(lower)) return "problem";
|
|
3855
|
+
if (/\b(decided|decision|adr|we chose|approved|rejected)\b/.test(lower)) return "decision";
|
|
3856
|
+
if (/\b(goal|need to|we need|want to|trying to|objective)\b/.test(lower)) return "goal_signal";
|
|
3857
|
+
if (["Bash", "Read", "Edit", "Write", "Grep", "Glob"].includes(row.tool_name)) return "tool_action";
|
|
3858
|
+
if (row.tool_name.startsWith("memory_card")) return "memory_card";
|
|
3859
|
+
return "memory_observation";
|
|
3860
|
+
}
|
|
3861
|
+
function inferIntention(row) {
|
|
3862
|
+
if (row.intent) return clean(row.intent, 220);
|
|
3863
|
+
const text = clean(row.raw_text, 1e3);
|
|
3864
|
+
const patterns = [
|
|
3865
|
+
/(?:we need to|need to|let'?s|i want to|we should|goal is to|objective is to|trying to)\s+([^.!?\n]{8,220})/i,
|
|
3866
|
+
/(?:so that|in order to)\s+([^.!?\n]{8,220})/i,
|
|
3867
|
+
/(?:task|plan):\s*([^.!?\n]{8,220})/i
|
|
3868
|
+
];
|
|
3869
|
+
for (const p of patterns) {
|
|
3870
|
+
const m = text.match(p);
|
|
3871
|
+
if (m?.[1]) return clean(m[1], 220);
|
|
3872
|
+
}
|
|
3873
|
+
if (["Bash", "Read", "Edit", "Write", "Grep", "Glob"].includes(row.tool_name)) {
|
|
3874
|
+
return `${row.tool_name} during ${row.project_name}`;
|
|
3875
|
+
}
|
|
3876
|
+
return null;
|
|
3877
|
+
}
|
|
3878
|
+
function inferOutcome(row) {
|
|
3879
|
+
if (row.outcome) return clean(row.outcome, 220);
|
|
3880
|
+
if (row.has_error) return "error";
|
|
3881
|
+
const lower = row.raw_text.toLowerCase();
|
|
3882
|
+
if (/\b(done|complete|completed|fixed|resolved|shipped|deployed|pushed|published|passed)\b/.test(lower)) return "success_signal";
|
|
3883
|
+
if (/\b(blocked|failed|error|regression|broken|not working|could not)\b/.test(lower)) return "failure_signal";
|
|
3884
|
+
if (/\b(warning|risk|concern|caveat)\b/.test(lower)) return "risk_signal";
|
|
3885
|
+
return null;
|
|
3886
|
+
}
|
|
3887
|
+
function extractGoalCandidates(row) {
|
|
3888
|
+
const text = clean(row.raw_text, 1600);
|
|
3889
|
+
const patterns = [
|
|
3890
|
+
/(?:we need to|need to|i want to|we should|goal is to|objective is to|trying to|let'?s)\s+([^.!?\n]{12,220})/gi,
|
|
3891
|
+
/(?:success means|success criteria|so that)\s+([^.!?\n]{12,220})/gi
|
|
3892
|
+
];
|
|
3893
|
+
const out = [];
|
|
3894
|
+
for (const pattern of patterns) {
|
|
3895
|
+
for (const m of text.matchAll(pattern)) {
|
|
3896
|
+
const candidate = clean(m[1] ?? "", 220);
|
|
3897
|
+
if (candidate.length >= 12 && !out.some((x) => x.toLowerCase() === candidate.toLowerCase())) out.push(candidate);
|
|
3898
|
+
if (out.length >= 3) return out;
|
|
3899
|
+
}
|
|
3900
|
+
}
|
|
3901
|
+
return out;
|
|
3902
|
+
}
|
|
3903
|
+
function uniq(values, max = 6) {
|
|
3904
|
+
const out = [];
|
|
3905
|
+
for (const value of values.map((v) => clean(v, 220)).filter(Boolean)) {
|
|
3906
|
+
if (!out.some((x) => x.toLowerCase() === value.toLowerCase())) out.push(value);
|
|
3907
|
+
if (out.length >= max) break;
|
|
3908
|
+
}
|
|
3909
|
+
return out;
|
|
3910
|
+
}
|
|
3911
|
+
function extractMatches(text, patterns, max = 5) {
|
|
3912
|
+
const out = [];
|
|
3913
|
+
for (const pattern of patterns) {
|
|
3914
|
+
for (const match of text.matchAll(pattern)) {
|
|
3915
|
+
const value = match[1] ?? match[0];
|
|
3916
|
+
if (value) out.push(value);
|
|
3917
|
+
if (out.length >= max) return uniq(out, max);
|
|
3918
|
+
}
|
|
3919
|
+
}
|
|
3920
|
+
return uniq(out, max);
|
|
3921
|
+
}
|
|
3922
|
+
function inferSemanticLabel(row) {
|
|
3923
|
+
const text = clean(row.raw_text, 2400);
|
|
3924
|
+
const eventType = inferOntologyEventType(row);
|
|
3925
|
+
const intention = inferIntention(row);
|
|
3926
|
+
const outcome = inferOutcome(row);
|
|
3927
|
+
const goals = extractGoalCandidates(row);
|
|
3928
|
+
const milestones = extractMatches(text, [
|
|
3929
|
+
/\b(?:completed|finished|fixed|resolved|shipped|deployed|published|pushed|passed)\b([^.!?\n]{0,180})/gi,
|
|
3930
|
+
/(?:milestone|done):\s*([^.!?\n]{8,220})/gi
|
|
3931
|
+
]);
|
|
3932
|
+
const problems = extractMatches(text, [
|
|
3933
|
+
/\b(?:blocked by|failed because|bug|regression|broken|not working|error)\b([^.!?\n]{0,180})/gi,
|
|
3934
|
+
/(?:problem|issue|risk):\s*([^.!?\n]{8,220})/gi
|
|
3935
|
+
]);
|
|
3936
|
+
const decisions = extractMatches(text, [
|
|
3937
|
+
/(?:decided|decision|adr|we chose|approved|rejected)\s+([^.!?\n]{8,220})/gi
|
|
3938
|
+
]);
|
|
3939
|
+
const temporalAnchors = extractMatches(text, [
|
|
3940
|
+
/\b(\d{4}-\d{2}-\d{2}(?:[T ][0-9:.+-Z]+)?)\b/g,
|
|
3941
|
+
/\b(today|yesterday|tomorrow|this week|next week|last week|morning|afternoon|tonight)\b/gi
|
|
3942
|
+
], 8);
|
|
3943
|
+
const nextActions = extractMatches(text, [
|
|
3944
|
+
/(?:next|todo|follow[- ]?up|remaining|need to)\s*:?\s*([^.!?\n]{8,220})/gi
|
|
3945
|
+
]);
|
|
3946
|
+
const actors = uniq([
|
|
3947
|
+
row.agent_id,
|
|
3948
|
+
...extractMatches(text, [/\b(?:agent|employee|owner|assignee)[:= ]+([a-zA-Z][a-zA-Z0-9_-]{1,40})/gi], 5)
|
|
3949
|
+
], 6);
|
|
3950
|
+
const successSignals = milestones.length ? milestones : outcome === "success_signal" ? [clean(text, 180)] : [];
|
|
3951
|
+
const failureSignals = problems.length ? problems : outcome === "failure_signal" || row.has_error ? [clean(text, 180)] : [];
|
|
3952
|
+
const impact = successSignals.length && failureSignals.length ? "mixed" : failureSignals.length ? "negative" : successSignals.length ? "positive" : "neutral";
|
|
3953
|
+
const signalCount = goals.length + milestones.length + problems.length + decisions.length + nextActions.length;
|
|
3954
|
+
return {
|
|
3955
|
+
labeler: "deterministic",
|
|
3956
|
+
schemaVersion: 1,
|
|
3957
|
+
eventType,
|
|
3958
|
+
intention,
|
|
3959
|
+
outcome,
|
|
3960
|
+
impact,
|
|
3961
|
+
confidence: Math.min(0.95, 0.45 + signalCount * 0.08 + (intention ? 0.1 : 0) + (outcome ? 0.1 : 0)),
|
|
3962
|
+
goals,
|
|
3963
|
+
milestones,
|
|
3964
|
+
problems,
|
|
3965
|
+
decisions,
|
|
3966
|
+
actors,
|
|
3967
|
+
temporalAnchors,
|
|
3968
|
+
successSignals,
|
|
3969
|
+
failureSignals,
|
|
3970
|
+
nextActions,
|
|
3971
|
+
summary: clean(text, 280)
|
|
3972
|
+
};
|
|
3973
|
+
}
|
|
3974
|
+
function ontologyPayload(row) {
|
|
3975
|
+
const semantic = inferSemanticLabel(row);
|
|
3976
|
+
return {
|
|
3977
|
+
tool_name: row.tool_name,
|
|
3978
|
+
memory_version: row.version ?? null,
|
|
3979
|
+
domain: row.domain ?? null,
|
|
3980
|
+
trajectory: row.trajectory ? safeJson(row.trajectory) : null,
|
|
3981
|
+
semantic
|
|
3982
|
+
};
|
|
3983
|
+
}
|
|
3984
|
+
function safeJson(value) {
|
|
3985
|
+
try {
|
|
3986
|
+
return JSON.parse(value);
|
|
3987
|
+
} catch {
|
|
3988
|
+
return value.slice(0, 1e3);
|
|
3989
|
+
}
|
|
3990
|
+
}
|
|
3991
|
+
async function resolveClient(client) {
|
|
3992
|
+
if (client) return client;
|
|
3993
|
+
const { getClient: getClient2 } = await Promise.resolve().then(() => (init_database(), database_exports));
|
|
3994
|
+
return getClient2();
|
|
3995
|
+
}
|
|
3996
|
+
async function insertOntologyForMemory(row, client) {
|
|
3997
|
+
const db = await resolveClient(client);
|
|
3998
|
+
const occurredAt = row.timestamp;
|
|
3999
|
+
const sequence = Number(row.version ?? 0) || Math.floor(new Date(occurredAt).getTime() / 1e3);
|
|
4000
|
+
const eventType = inferOntologyEventType(row);
|
|
4001
|
+
const intention = inferIntention(row);
|
|
4002
|
+
const outcome = inferOutcome(row);
|
|
4003
|
+
const eventId = stableId2("event", row.id);
|
|
4004
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
4005
|
+
await db.execute({
|
|
4006
|
+
sql: `INSERT INTO agent_sessions (id, agent_id, project_name, started_at, last_event_at, event_count, properties)
|
|
4007
|
+
VALUES (?, ?, ?, ?, ?, 1, ?)
|
|
4008
|
+
ON CONFLICT(id) DO UPDATE SET last_event_at = MAX(last_event_at, excluded.last_event_at),
|
|
4009
|
+
event_count = event_count + 1`,
|
|
4010
|
+
args: [row.session_id, row.agent_id, row.project_name, occurredAt, occurredAt, JSON.stringify({ agent_role: row.agent_role })]
|
|
4011
|
+
});
|
|
4012
|
+
await db.execute({
|
|
4013
|
+
sql: `INSERT OR IGNORE INTO agent_events
|
|
4014
|
+
(id, event_type, occurred_at, sequence_index, actor_agent_id, agent_role, project_name,
|
|
4015
|
+
session_id, task_id, goal_id, parent_event_id, intention, outcome, evidence_memory_id,
|
|
4016
|
+
impact, payload, created_at)
|
|
4017
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, NULL, NULL, ?, ?, ?, ?, ?, ?)`,
|
|
4018
|
+
args: [
|
|
4019
|
+
eventId,
|
|
4020
|
+
eventType,
|
|
4021
|
+
occurredAt,
|
|
4022
|
+
sequence,
|
|
4023
|
+
row.agent_id,
|
|
4024
|
+
row.agent_role,
|
|
4025
|
+
row.project_name,
|
|
4026
|
+
row.session_id,
|
|
4027
|
+
row.task_id ?? null,
|
|
4028
|
+
intention,
|
|
4029
|
+
outcome,
|
|
4030
|
+
row.id,
|
|
4031
|
+
row.has_error ? "negative" : outcome === "success_signal" ? "positive" : "neutral",
|
|
4032
|
+
JSON.stringify(ontologyPayload(row)),
|
|
4033
|
+
now
|
|
4034
|
+
]
|
|
4035
|
+
});
|
|
4036
|
+
const semantic = inferSemanticLabel(row);
|
|
4037
|
+
await db.execute({
|
|
4038
|
+
sql: `INSERT INTO agent_semantic_labels
|
|
4039
|
+
(id, source_memory_id, event_id, labeler, schema_version, confidence, labels, created_at, updated_at)
|
|
4040
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
4041
|
+
ON CONFLICT(id) DO UPDATE SET confidence = excluded.confidence,
|
|
4042
|
+
labels = excluded.labels, updated_at = excluded.updated_at`,
|
|
4043
|
+
args: [
|
|
4044
|
+
stableId2("semantic", row.id, semantic.labeler, semantic.schemaVersion),
|
|
4045
|
+
row.id,
|
|
4046
|
+
eventId,
|
|
4047
|
+
semantic.labeler,
|
|
4048
|
+
semantic.schemaVersion,
|
|
4049
|
+
semantic.confidence,
|
|
4050
|
+
JSON.stringify(semantic),
|
|
4051
|
+
now,
|
|
4052
|
+
now
|
|
4053
|
+
]
|
|
4054
|
+
});
|
|
4055
|
+
for (const statement of extractGoalCandidates(row)) {
|
|
4056
|
+
const goalId = stableId2("goal", row.project_name, statement.toLowerCase());
|
|
4057
|
+
await db.execute({
|
|
4058
|
+
sql: `INSERT INTO agent_goals
|
|
4059
|
+
(id, statement, owner_agent_id, project_name, status, priority, success_criteria,
|
|
4060
|
+
parent_goal_id, due_at, achieved_at, supersedes_id, created_at, updated_at, source_memory_id)
|
|
4061
|
+
VALUES (?, ?, ?, ?, 'open', 5, NULL, NULL, NULL, NULL, NULL, ?, ?, ?)
|
|
4062
|
+
ON CONFLICT(id) DO UPDATE SET updated_at = excluded.updated_at`,
|
|
4063
|
+
args: [goalId, statement, row.agent_id, row.project_name, now, now, row.id]
|
|
4064
|
+
});
|
|
4065
|
+
await db.execute({
|
|
4066
|
+
sql: `INSERT OR IGNORE INTO agent_goal_links
|
|
4067
|
+
(id, goal_id, link_type, target_id, target_type, created_at)
|
|
4068
|
+
VALUES (?, ?, 'evidence', ?, 'memory', ?)`,
|
|
4069
|
+
args: [stableId2("goal_link", goalId, row.id, "memory"), goalId, row.id, now]
|
|
4070
|
+
});
|
|
4071
|
+
await db.execute({
|
|
4072
|
+
sql: `INSERT OR IGNORE INTO agent_goal_links
|
|
4073
|
+
(id, goal_id, link_type, target_id, target_type, created_at)
|
|
4074
|
+
VALUES (?, ?, 'event', ?, 'event', ?)`,
|
|
4075
|
+
args: [stableId2("goal_link", goalId, eventId, "event"), goalId, eventId, now]
|
|
4076
|
+
});
|
|
4077
|
+
}
|
|
4078
|
+
}
|
|
4079
|
+
async function insertOntologyForBatch(rows, client) {
|
|
4080
|
+
const db = await resolveClient(client);
|
|
4081
|
+
let count = 0;
|
|
4082
|
+
for (const row of rows) {
|
|
4083
|
+
try {
|
|
4084
|
+
await insertOntologyForMemory(row, db);
|
|
4085
|
+
count++;
|
|
4086
|
+
} catch {
|
|
4087
|
+
}
|
|
4088
|
+
}
|
|
4089
|
+
return count;
|
|
4090
|
+
}
|
|
4091
|
+
var init_agentic_ontology = __esm({
|
|
4092
|
+
"src/lib/agentic-ontology.ts"() {
|
|
4093
|
+
"use strict";
|
|
4094
|
+
}
|
|
4095
|
+
});
|
|
4096
|
+
|
|
3701
4097
|
// src/bin/exe-assign.ts
|
|
3702
4098
|
init_employees();
|
|
3703
4099
|
|
|
@@ -3850,11 +4246,12 @@ init_database();
|
|
|
3850
4246
|
|
|
3851
4247
|
// src/lib/keychain.ts
|
|
3852
4248
|
import { readFile as readFile3, writeFile as writeFile3, unlink, mkdir as mkdir3, chmod as chmod2 } from "fs/promises";
|
|
3853
|
-
import { existsSync as existsSync6 } from "fs";
|
|
4249
|
+
import { existsSync as existsSync6, statSync as statSync2 } from "fs";
|
|
3854
4250
|
import { execSync as execSync2 } from "child_process";
|
|
3855
4251
|
import path6 from "path";
|
|
3856
4252
|
import os5 from "os";
|
|
3857
|
-
var SERVICE = "exe-
|
|
4253
|
+
var SERVICE = "exe-os";
|
|
4254
|
+
var LEGACY_SERVICE = "exe-mem";
|
|
3858
4255
|
var ACCOUNT = "master-key";
|
|
3859
4256
|
function getKeyDir() {
|
|
3860
4257
|
return process.env.EXE_OS_DIR ?? process.env.EXE_MEM_DIR ?? path6.join(os5.homedir(), ".exe-os");
|
|
@@ -3862,29 +4259,79 @@ function getKeyDir() {
|
|
|
3862
4259
|
function getKeyPath() {
|
|
3863
4260
|
return path6.join(getKeyDir(), "master.key");
|
|
3864
4261
|
}
|
|
3865
|
-
function
|
|
4262
|
+
function nativeKeychainAllowed() {
|
|
4263
|
+
return process.env.EXE_OS_DISABLE_NATIVE_KEYCHAIN !== "1";
|
|
4264
|
+
}
|
|
4265
|
+
var linuxSecretAvailability = null;
|
|
4266
|
+
function linuxSecretAvailable() {
|
|
4267
|
+
if (!nativeKeychainAllowed()) return false;
|
|
4268
|
+
if (process.platform !== "linux") return false;
|
|
4269
|
+
if (linuxSecretAvailability !== null) return linuxSecretAvailability;
|
|
4270
|
+
try {
|
|
4271
|
+
execSync2("command -v secret-tool >/dev/null 2>&1", { timeout: 1e3 });
|
|
4272
|
+
} catch {
|
|
4273
|
+
linuxSecretAvailability = false;
|
|
4274
|
+
return false;
|
|
4275
|
+
}
|
|
4276
|
+
try {
|
|
4277
|
+
execSync2("secret-tool search --all exe-os probe >/dev/null 2>&1", { timeout: 1e3 });
|
|
4278
|
+
linuxSecretAvailability = true;
|
|
4279
|
+
} catch {
|
|
4280
|
+
linuxSecretAvailability = false;
|
|
4281
|
+
}
|
|
4282
|
+
return linuxSecretAvailability;
|
|
4283
|
+
}
|
|
4284
|
+
function isRootOnlyTrustedServerKeyFile(keyPath) {
|
|
4285
|
+
if (process.platform !== "linux") return false;
|
|
4286
|
+
try {
|
|
4287
|
+
const uid = typeof os5.userInfo().uid === "number" ? os5.userInfo().uid : -1;
|
|
4288
|
+
const st = statSync2(keyPath);
|
|
4289
|
+
if (!st.isFile() || (st.mode & 63) !== 0) return false;
|
|
4290
|
+
if (uid === 0) return true;
|
|
4291
|
+
const exeOsDir = process.env.EXE_OS_DIR;
|
|
4292
|
+
return Boolean(exeOsDir && path6.resolve(keyPath).startsWith(path6.resolve(exeOsDir) + path6.sep));
|
|
4293
|
+
} catch {
|
|
4294
|
+
return false;
|
|
4295
|
+
}
|
|
4296
|
+
}
|
|
4297
|
+
function macKeychainGet(service = SERVICE) {
|
|
4298
|
+
if (!nativeKeychainAllowed()) return null;
|
|
3866
4299
|
if (process.platform !== "darwin") return null;
|
|
3867
4300
|
try {
|
|
3868
4301
|
return execSync2(
|
|
3869
|
-
`security find-generic-password -s "${
|
|
4302
|
+
`security find-generic-password -s "${service}" -a "${ACCOUNT}" -w 2>/dev/null`,
|
|
3870
4303
|
{ encoding: "utf-8", timeout: 5e3 }
|
|
3871
4304
|
).trim();
|
|
3872
4305
|
} catch {
|
|
3873
4306
|
return null;
|
|
3874
4307
|
}
|
|
3875
4308
|
}
|
|
3876
|
-
function macKeychainSet(value) {
|
|
4309
|
+
function macKeychainSet(value, service = SERVICE) {
|
|
4310
|
+
if (!nativeKeychainAllowed()) return false;
|
|
3877
4311
|
if (process.platform !== "darwin") return false;
|
|
3878
4312
|
try {
|
|
3879
4313
|
try {
|
|
3880
4314
|
execSync2(
|
|
3881
|
-
`security delete-generic-password -s "${
|
|
4315
|
+
`security delete-generic-password -s "${service}" -a "${ACCOUNT}" 2>/dev/null`,
|
|
3882
4316
|
{ timeout: 5e3 }
|
|
3883
4317
|
);
|
|
3884
4318
|
} catch {
|
|
3885
4319
|
}
|
|
3886
4320
|
execSync2(
|
|
3887
|
-
`security add-generic-password -s "${
|
|
4321
|
+
`security add-generic-password -s "${service}" -a "${ACCOUNT}" -w "${value}"`,
|
|
4322
|
+
{ timeout: 5e3 }
|
|
4323
|
+
);
|
|
4324
|
+
return true;
|
|
4325
|
+
} catch {
|
|
4326
|
+
return false;
|
|
4327
|
+
}
|
|
4328
|
+
}
|
|
4329
|
+
function macKeychainDelete(service = SERVICE) {
|
|
4330
|
+
if (!nativeKeychainAllowed()) return false;
|
|
4331
|
+
if (process.platform !== "darwin") return false;
|
|
4332
|
+
try {
|
|
4333
|
+
execSync2(
|
|
4334
|
+
`security delete-generic-password -s "${service}" -a "${ACCOUNT}" 2>/dev/null`,
|
|
3888
4335
|
{ timeout: 5e3 }
|
|
3889
4336
|
);
|
|
3890
4337
|
return true;
|
|
@@ -3892,22 +4339,35 @@ function macKeychainSet(value) {
|
|
|
3892
4339
|
return false;
|
|
3893
4340
|
}
|
|
3894
4341
|
}
|
|
3895
|
-
function linuxSecretGet() {
|
|
3896
|
-
if (
|
|
4342
|
+
function linuxSecretGet(service = SERVICE) {
|
|
4343
|
+
if (!linuxSecretAvailable()) return null;
|
|
3897
4344
|
try {
|
|
3898
4345
|
return execSync2(
|
|
3899
|
-
`secret-tool lookup service "${
|
|
4346
|
+
`secret-tool lookup service "${service}" account "${ACCOUNT}" 2>/dev/null`,
|
|
3900
4347
|
{ encoding: "utf-8", timeout: 5e3 }
|
|
3901
4348
|
).trim();
|
|
3902
4349
|
} catch {
|
|
3903
4350
|
return null;
|
|
3904
4351
|
}
|
|
3905
4352
|
}
|
|
3906
|
-
function linuxSecretSet(value) {
|
|
4353
|
+
function linuxSecretSet(value, service = SERVICE) {
|
|
4354
|
+
if (!linuxSecretAvailable()) return false;
|
|
4355
|
+
try {
|
|
4356
|
+
execSync2(
|
|
4357
|
+
`echo -n "${value}" | secret-tool store --label="exe-os master key" service "${service}" account "${ACCOUNT}" 2>/dev/null`,
|
|
4358
|
+
{ timeout: 5e3 }
|
|
4359
|
+
);
|
|
4360
|
+
return true;
|
|
4361
|
+
} catch {
|
|
4362
|
+
return false;
|
|
4363
|
+
}
|
|
4364
|
+
}
|
|
4365
|
+
function linuxSecretDelete(service = SERVICE) {
|
|
4366
|
+
if (!nativeKeychainAllowed()) return false;
|
|
3907
4367
|
if (process.platform !== "linux") return false;
|
|
3908
4368
|
try {
|
|
3909
4369
|
execSync2(
|
|
3910
|
-
`
|
|
4370
|
+
`secret-tool clear service "${service}" account "${ACCOUNT}" 2>/dev/null`,
|
|
3911
4371
|
{ timeout: 5e3 }
|
|
3912
4372
|
);
|
|
3913
4373
|
return true;
|
|
@@ -3916,6 +4376,7 @@ function linuxSecretSet(value) {
|
|
|
3916
4376
|
}
|
|
3917
4377
|
}
|
|
3918
4378
|
async function tryKeytar() {
|
|
4379
|
+
if (!nativeKeychainAllowed()) return null;
|
|
3919
4380
|
try {
|
|
3920
4381
|
return await import("keytar");
|
|
3921
4382
|
} catch {
|
|
@@ -3990,7 +4451,19 @@ async function writeMachineBoundFileFallback(b64) {
|
|
|
3990
4451
|
return "plaintext";
|
|
3991
4452
|
}
|
|
3992
4453
|
async function getMasterKey() {
|
|
3993
|
-
|
|
4454
|
+
let nativeValue = macKeychainGet() ?? linuxSecretGet();
|
|
4455
|
+
if (!nativeValue) {
|
|
4456
|
+
const legacyValue = macKeychainGet(LEGACY_SERVICE) ?? linuxSecretGet(LEGACY_SERVICE);
|
|
4457
|
+
if (legacyValue) {
|
|
4458
|
+
const migrated = macKeychainSet(legacyValue) || linuxSecretSet(legacyValue);
|
|
4459
|
+
if (migrated) {
|
|
4460
|
+
macKeychainDelete(LEGACY_SERVICE);
|
|
4461
|
+
linuxSecretDelete(LEGACY_SERVICE);
|
|
4462
|
+
process.stderr.write("[keychain] Migrated keychain service from exe-mem to exe-os.\n");
|
|
4463
|
+
}
|
|
4464
|
+
nativeValue = legacyValue;
|
|
4465
|
+
}
|
|
4466
|
+
}
|
|
3994
4467
|
if (nativeValue) {
|
|
3995
4468
|
return Buffer.from(nativeValue, "base64");
|
|
3996
4469
|
}
|
|
@@ -3998,12 +4471,17 @@ async function getMasterKey() {
|
|
|
3998
4471
|
if (keytar) {
|
|
3999
4472
|
try {
|
|
4000
4473
|
const keytarValue = await keytar.getPassword(SERVICE, ACCOUNT);
|
|
4001
|
-
|
|
4002
|
-
|
|
4474
|
+
const legacyKeytarValue = keytarValue ?? await keytar.getPassword(LEGACY_SERVICE, ACCOUNT);
|
|
4475
|
+
if (legacyKeytarValue) {
|
|
4476
|
+
const migrated = macKeychainSet(legacyKeytarValue) || linuxSecretSet(legacyKeytarValue);
|
|
4003
4477
|
if (migrated) {
|
|
4004
4478
|
process.stderr.write("[keychain] Migrated key from keytar to native keychain.\n");
|
|
4479
|
+
try {
|
|
4480
|
+
await keytar.deletePassword(LEGACY_SERVICE, ACCOUNT);
|
|
4481
|
+
} catch {
|
|
4482
|
+
}
|
|
4005
4483
|
}
|
|
4006
|
-
return Buffer.from(
|
|
4484
|
+
return Buffer.from(legacyKeytarValue, "base64");
|
|
4007
4485
|
}
|
|
4008
4486
|
} catch {
|
|
4009
4487
|
}
|
|
@@ -4028,7 +4506,7 @@ async function getMasterKey() {
|
|
|
4028
4506
|
const decrypted = decryptWithMachineKey(content, machineKey);
|
|
4029
4507
|
if (!decrypted) {
|
|
4030
4508
|
process.stderr.write(
|
|
4031
|
-
"[keychain] Key decryption failed \u2014 machine may have changed.\n Use your 24-word recovery phrase: exe-os
|
|
4509
|
+
"[keychain] Key decryption failed \u2014 machine may have changed.\n Use your 24-word recovery phrase during setup: exe-os setup\n"
|
|
4032
4510
|
);
|
|
4033
4511
|
return null;
|
|
4034
4512
|
}
|
|
@@ -4037,6 +4515,9 @@ async function getMasterKey() {
|
|
|
4037
4515
|
b64Value = content;
|
|
4038
4516
|
}
|
|
4039
4517
|
const key = Buffer.from(b64Value, "base64");
|
|
4518
|
+
if (!content.startsWith(ENCRYPTED_PREFIX) && isRootOnlyTrustedServerKeyFile(keyPath)) {
|
|
4519
|
+
return key;
|
|
4520
|
+
}
|
|
4040
4521
|
const migrated = macKeychainSet(b64Value) || linuxSecretSet(b64Value);
|
|
4041
4522
|
if (migrated) {
|
|
4042
4523
|
process.stderr.write("[keychain] Migrated key from file to native keychain.\n");
|
|
@@ -4639,6 +5120,11 @@ async function flushBatch() {
|
|
|
4639
5120
|
await insertMemoryCardsForBatch2(batch);
|
|
4640
5121
|
} catch {
|
|
4641
5122
|
}
|
|
5123
|
+
try {
|
|
5124
|
+
const { insertOntologyForBatch: insertOntologyForBatch2 } = await Promise.resolve().then(() => (init_agentic_ontology(), agentic_ontology_exports));
|
|
5125
|
+
await insertOntologyForBatch2(batch);
|
|
5126
|
+
} catch {
|
|
5127
|
+
}
|
|
4642
5128
|
schedulePostWriteMemoryHygiene(batch.map((row) => row.id));
|
|
4643
5129
|
_pendingRecords.splice(0, batch.length);
|
|
4644
5130
|
try {
|