@aiassesstech/jessie 0.5.1 → 0.6.1

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.
Files changed (78) hide show
  1. package/agent/AGENTS.md +14 -1
  2. package/agent/SOUL.md +16 -0
  3. package/dist/command/decision-store.d.ts +4 -1
  4. package/dist/command/decision-store.d.ts.map +1 -1
  5. package/dist/command/decision-store.js +28 -0
  6. package/dist/command/decision-store.js.map +1 -1
  7. package/dist/command/types.d.ts +14 -1
  8. package/dist/command/types.d.ts.map +1 -1
  9. package/dist/command/types.js +4 -6
  10. package/dist/command/types.js.map +1 -1
  11. package/dist/ea/calendar-conflicts.d.ts +30 -0
  12. package/dist/ea/calendar-conflicts.d.ts.map +1 -0
  13. package/dist/ea/calendar-conflicts.js +70 -0
  14. package/dist/ea/calendar-conflicts.js.map +1 -0
  15. package/dist/ea/correspondence-client.d.ts +54 -0
  16. package/dist/ea/correspondence-client.d.ts.map +1 -0
  17. package/dist/ea/correspondence-client.js +88 -0
  18. package/dist/ea/correspondence-client.js.map +1 -0
  19. package/dist/ea/daily-notes.d.ts +38 -0
  20. package/dist/ea/daily-notes.d.ts.map +1 -0
  21. package/dist/ea/daily-notes.js +93 -0
  22. package/dist/ea/daily-notes.js.map +1 -0
  23. package/dist/ea/ea-sweep.d.ts +49 -0
  24. package/dist/ea/ea-sweep.d.ts.map +1 -0
  25. package/dist/ea/ea-sweep.js +93 -0
  26. package/dist/ea/ea-sweep.js.map +1 -0
  27. package/dist/ea/fleet-attention-gate.d.ts +33 -0
  28. package/dist/ea/fleet-attention-gate.d.ts.map +1 -0
  29. package/dist/ea/fleet-attention-gate.js +46 -0
  30. package/dist/ea/fleet-attention-gate.js.map +1 -0
  31. package/dist/ea/gog-health.d.ts +34 -0
  32. package/dist/ea/gog-health.d.ts.map +1 -0
  33. package/dist/ea/gog-health.js +68 -0
  34. package/dist/ea/gog-health.js.map +1 -0
  35. package/dist/ea/index.d.ts +19 -0
  36. package/dist/ea/index.d.ts.map +1 -0
  37. package/dist/ea/index.js +13 -0
  38. package/dist/ea/index.js.map +1 -0
  39. package/dist/ea/sweep-state.d.ts +53 -0
  40. package/dist/ea/sweep-state.d.ts.map +1 -0
  41. package/dist/ea/sweep-state.js +145 -0
  42. package/dist/ea/sweep-state.js.map +1 -0
  43. package/dist/knowledge/knowledge-store.d.ts +62 -0
  44. package/dist/knowledge/knowledge-store.d.ts.map +1 -0
  45. package/dist/knowledge/knowledge-store.js +248 -0
  46. package/dist/knowledge/knowledge-store.js.map +1 -0
  47. package/dist/knowledge/provenance.d.ts +16 -0
  48. package/dist/knowledge/provenance.d.ts.map +1 -0
  49. package/dist/knowledge/provenance.js +23 -0
  50. package/dist/knowledge/provenance.js.map +1 -0
  51. package/dist/knowledge/verify-provenance.d.ts +17 -0
  52. package/dist/knowledge/verify-provenance.d.ts.map +1 -0
  53. package/dist/knowledge/verify-provenance.js +38 -0
  54. package/dist/knowledge/verify-provenance.js.map +1 -0
  55. package/dist/plugin.d.ts.map +1 -1
  56. package/dist/plugin.js +203 -2
  57. package/dist/plugin.js.map +1 -1
  58. package/dist/tools/fleet-memory-search.d.ts +87 -0
  59. package/dist/tools/fleet-memory-search.d.ts.map +1 -0
  60. package/dist/tools/fleet-memory-search.js +73 -0
  61. package/dist/tools/fleet-memory-search.js.map +1 -0
  62. package/dist/tools/fleet-snapshot.d.ts +63 -0
  63. package/dist/tools/fleet-snapshot.d.ts.map +1 -0
  64. package/dist/tools/fleet-snapshot.js +137 -0
  65. package/dist/tools/fleet-snapshot.js.map +1 -0
  66. package/dist/tools/jessie-briefing.d.ts.map +1 -1
  67. package/dist/tools/jessie-briefing.js +1 -0
  68. package/dist/tools/jessie-briefing.js.map +1 -1
  69. package/dist/tools/jessie-decide.js +2 -2
  70. package/dist/tools/jessie-decide.js.map +1 -1
  71. package/dist/tools/jessie-delegate.js +1 -1
  72. package/dist/tools/jessie-delegate.js.map +1 -1
  73. package/dist/tools/jessie-wiki.d.ts +76 -0
  74. package/dist/tools/jessie-wiki.d.ts.map +1 -0
  75. package/dist/tools/jessie-wiki.js +197 -0
  76. package/dist/tools/jessie-wiki.js.map +1 -0
  77. package/openclaw.plugin.json +40 -9
  78. package/package.json +2 -2
@@ -0,0 +1,93 @@
1
+ /**
2
+ * Daily Notes Layer — EA Incremental Logging
3
+ *
4
+ * SPEC: SPEC-jessie-executive-assistant-activation-v1.0 §6.1 (Amendment 5)
5
+ *
6
+ * One file per day, written incrementally by EA sweeps, meeting
7
+ * ingestion, corrections, and fleet events. Foundation for evening
8
+ * sweep, kaizen, and morning briefing Step 10.
9
+ */
10
+ import * as fs from 'node:fs';
11
+ import * as path from 'node:path';
12
+ function todayString(tz = 'America/Chicago') {
13
+ return new Date().toLocaleDateString('en-CA', { timeZone: tz });
14
+ }
15
+ function timeString(tz = 'America/Chicago') {
16
+ return new Date().toLocaleTimeString('en-US', {
17
+ timeZone: tz,
18
+ hour: '2-digit',
19
+ minute: '2-digit',
20
+ hour12: false,
21
+ });
22
+ }
23
+ export class DailyNotes {
24
+ baseDir;
25
+ timezone;
26
+ constructor(workspaceDir, timezone = 'America/Chicago') {
27
+ this.baseDir = path.join(workspaceDir, 'agent', 'daily-notes');
28
+ this.timezone = timezone;
29
+ }
30
+ filePath(date) {
31
+ const d = date ?? todayString(this.timezone);
32
+ return path.join(this.baseDir, `${d}.md`);
33
+ }
34
+ ensureDir() {
35
+ if (!fs.existsSync(this.baseDir)) {
36
+ fs.mkdirSync(this.baseDir, { recursive: true });
37
+ }
38
+ }
39
+ ensureFile(date) {
40
+ this.ensureDir();
41
+ const fp = this.filePath(date);
42
+ if (!fs.existsSync(fp)) {
43
+ const d = date ?? todayString(this.timezone);
44
+ const skeleton = `# Daily Notes — ${d}\n\n`;
45
+ fs.writeFileSync(fp, skeleton, 'utf-8');
46
+ }
47
+ return fp;
48
+ }
49
+ /**
50
+ * Append an entry to today's daily notes file.
51
+ */
52
+ append(section, content, date) {
53
+ const fp = this.ensureFile(date);
54
+ const time = timeString(this.timezone);
55
+ const entry = `\n## ${section} (${time})\n\n${content}\n`;
56
+ fs.appendFileSync(fp, entry, 'utf-8');
57
+ }
58
+ /**
59
+ * Read today's daily notes.
60
+ */
61
+ readToday() {
62
+ const fp = this.filePath();
63
+ if (!fs.existsSync(fp))
64
+ return null;
65
+ return fs.readFileSync(fp, 'utf-8');
66
+ }
67
+ /**
68
+ * Check if today's notes file exists and has been modified today.
69
+ */
70
+ todayExists() {
71
+ const fp = this.filePath();
72
+ return fs.existsSync(fp);
73
+ }
74
+ /**
75
+ * Roll over: close today's file and create tomorrow's skeleton.
76
+ * Called by jessie-daily-notes-rollover cron at 23:59 CT.
77
+ */
78
+ rollover() {
79
+ const today = todayString(this.timezone);
80
+ this.ensureFile(today);
81
+ const todayFp = this.filePath(today);
82
+ const existing = fs.readFileSync(todayFp, 'utf-8');
83
+ if (!existing.includes('--- End of Day ---')) {
84
+ fs.appendFileSync(todayFp, '\n---\n\n*--- End of Day ---*\n', 'utf-8');
85
+ }
86
+ const tomorrow = new Date();
87
+ tomorrow.setDate(tomorrow.getDate() + 1);
88
+ const tomorrowStr = tomorrow.toLocaleDateString('en-CA', { timeZone: this.timezone });
89
+ this.ensureFile(tomorrowStr);
90
+ return { closedDate: today, openedDate: tomorrowStr };
91
+ }
92
+ }
93
+ //# sourceMappingURL=daily-notes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"daily-notes.js","sourceRoot":"","sources":["../../src/ea/daily-notes.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,SAAS,WAAW,CAAC,KAAa,iBAAiB;IACjD,OAAO,IAAI,IAAI,EAAE,CAAC,kBAAkB,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAAC;AAClE,CAAC;AAED,SAAS,UAAU,CAAC,KAAa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C,EAAE,OAAO,CAAC,CAAC;QACzE,CAAC;QAED,MAAM,QAAQ,GAAG,IAAI,IAAI,EAAE,CAAC;QAC5B,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC;QACzC,MAAM,WAAW,GAAG,QAAQ,CAAC,kBAAkB,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;QACtF,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QAE7B,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,CAAC;IACxD,CAAC;CACF"}
@@ -0,0 +1,49 @@
1
+ /**
2
+ * EA Sweep Orchestrator — Core Workflow
3
+ *
4
+ * SPEC: SPEC-jessie-executive-assistant-activation-v1.0 §3.1
5
+ *
6
+ * Top-level sweep function invoked by cron. Coordinates:
7
+ * 1. Fleet Attention Gate
8
+ * 2. GOG Health Gate
9
+ * 3. Inbox/calendar triage
10
+ * 4. Calendar conflict detection
11
+ * 5. Grillo draft assessment
12
+ * 6. Sweep state persistence
13
+ * 7. Daily notes logging
14
+ */
15
+ import type { DecisionStore } from '../command/decision-store.js';
16
+ import type { EaSweepState } from './sweep-state.js';
17
+ import type { DailyNotes } from './daily-notes.js';
18
+ import type { CalendarEvent } from './calendar-conflicts.js';
19
+ export interface EaSweepDeps {
20
+ decisionStore: DecisionStore;
21
+ sweepState: EaSweepState;
22
+ dailyNotes: DailyNotes;
23
+ getFleetBusStatus: () => string;
24
+ getRecentFleetAlerts?: () => Array<{
25
+ method: string;
26
+ severity?: string;
27
+ timestamp: string;
28
+ }>;
29
+ gogBinaryPath?: string;
30
+ fetchCalendarEvents?: () => Promise<CalendarEvent[]>;
31
+ notifyGreg: (message: string, label: string) => Promise<void>;
32
+ }
33
+ export interface EaSweepResult {
34
+ deferred: boolean;
35
+ deferralReason?: string;
36
+ gogHealthy: boolean;
37
+ gogTransition?: 'first_failure' | 'recovered';
38
+ conflictsDetected: number;
39
+ messagesProcessed: number;
40
+ skippedReason?: string;
41
+ }
42
+ /**
43
+ * Execute one EA sweep cycle.
44
+ *
45
+ * Returns structured result for cron handler to decide
46
+ * whether to send cron/completed or cron/failed.
47
+ */
48
+ export declare function runEaSweep(deps: EaSweepDeps): Promise<EaSweepResult>;
49
+ //# sourceMappingURL=ea-sweep.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ea-sweep.d.ts","sourceRoot":"","sources":["../../src/ea/ea-sweep.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAGlE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE7D,MAAM,WAAW,WAAW;IAC1B,aAAa,EAAE,aAAa,CAAC;IAC7B,UAAU,EAAE,YAAY,CAAC;IACzB,UAAU,EAAE,UAAU,CAAC;IACvB,iBAAiB,EAAE,MAAM,MAAM,CAAC;IAChC,oBAAoB,CAAC,EAAE,MAAM,KAAK,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC7F,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mBAAmB,CAAC,EAAE,MAAM,OAAO,CAAC,aAAa,EAAE,CAAC,CAAC;IACrD,UAAU,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC/D;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,OAAO,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,eAAe,GAAG,WAAW,CAAC;IAC9C,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;GAKG;AACH,wBAAsB,UAAU,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC,CAoG1E"}
@@ -0,0 +1,93 @@
1
+ /**
2
+ * EA Sweep Orchestrator — Core Workflow
3
+ *
4
+ * SPEC: SPEC-jessie-executive-assistant-activation-v1.0 §3.1
5
+ *
6
+ * Top-level sweep function invoked by cron. Coordinates:
7
+ * 1. Fleet Attention Gate
8
+ * 2. GOG Health Gate
9
+ * 3. Inbox/calendar triage
10
+ * 4. Calendar conflict detection
11
+ * 5. Grillo draft assessment
12
+ * 6. Sweep state persistence
13
+ * 7. Daily notes logging
14
+ */
15
+ import { checkFleetAttention } from './fleet-attention-gate.js';
16
+ import { checkGogHealth, markGogNotified } from './gog-health.js';
17
+ import { detectConflicts, formatConflictAlert } from './calendar-conflicts.js';
18
+ /**
19
+ * Execute one EA sweep cycle.
20
+ *
21
+ * Returns structured result for cron handler to decide
22
+ * whether to send cron/completed or cron/failed.
23
+ */
24
+ export async function runEaSweep(deps) {
25
+ const { decisionStore, sweepState, dailyNotes, getFleetBusStatus, getRecentFleetAlerts, gogBinaryPath, fetchCalendarEvents, notifyGreg, } = deps;
26
+ const fleetCheck = checkFleetAttention({
27
+ decisionStore,
28
+ getFleetBusStatus,
29
+ getRecentFleetAlerts,
30
+ });
31
+ if (fleetCheck.deferred) {
32
+ sweepState.setFleetDeferred(true, fleetCheck.reason);
33
+ sweepState.save();
34
+ console.log(`[jessie] EA deferred: fleet attention required — ${fleetCheck.reason}`);
35
+ dailyNotes.append('EA Sweep — Deferred', `Fleet Attention Gate triggered: ${fleetCheck.reason}`);
36
+ return {
37
+ deferred: true,
38
+ deferralReason: fleetCheck.reason,
39
+ gogHealthy: sweepState.state.gogHealthy,
40
+ conflictsDetected: 0,
41
+ messagesProcessed: 0,
42
+ };
43
+ }
44
+ sweepState.setFleetDeferred(false);
45
+ const gogResult = checkGogHealth(gogBinaryPath);
46
+ sweepState.setGogHealthy(gogResult.healthy);
47
+ let gogTransition;
48
+ if (gogResult.firstFailure) {
49
+ gogTransition = 'first_failure';
50
+ await notifyGreg('[jessie] GOG unavailable — EA layer degraded. Re-auth with: gog auth login', 'ea:gog-failure');
51
+ markGogNotified();
52
+ console.log('[jessie] EA sweep: GOG unavailable, skipping inbox/calendar');
53
+ dailyNotes.append('EA Sweep — GOG Down', 'GOG auth unavailable. Skipping inbox/calendar.');
54
+ }
55
+ if (gogResult.recovered) {
56
+ gogTransition = 'recovered';
57
+ await notifyGreg('[jessie] GOG restored — EA layer operational.', 'ea:gog-recovered');
58
+ markGogNotified();
59
+ dailyNotes.append('EA Sweep — GOG Restored', 'GOG auth restored. Resuming full operations.');
60
+ }
61
+ let conflictsDetected = 0;
62
+ if (gogResult.healthy && fetchCalendarEvents) {
63
+ try {
64
+ const events = await fetchCalendarEvents();
65
+ const conflicts = detectConflicts(events);
66
+ conflictsDetected = conflicts.length;
67
+ if (conflicts.length > 0) {
68
+ const alert = formatConflictAlert(conflicts);
69
+ await notifyGreg(alert, 'ea:calendar-conflicts');
70
+ dailyNotes.append('Calendar Conflicts', `Detected ${conflicts.length} conflict(s):\n${alert}`);
71
+ }
72
+ }
73
+ catch (err) {
74
+ console.warn('[jessie] EA sweep: calendar check failed:', err);
75
+ }
76
+ }
77
+ sweepState.recordSweep({});
78
+ sweepState.pruneOldMessages();
79
+ sweepState.save();
80
+ dailyNotes.append('EA Sweep — Complete', [
81
+ `GOG healthy: ${gogResult.healthy}`,
82
+ `Conflicts: ${conflictsDetected}`,
83
+ `Fleet deferred: false`,
84
+ ].join(' | '));
85
+ return {
86
+ deferred: false,
87
+ gogHealthy: gogResult.healthy,
88
+ gogTransition,
89
+ conflictsDetected,
90
+ messagesProcessed: 0,
91
+ };
92
+ }
93
+ //# sourceMappingURL=ea-sweep.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ea-sweep.js","sourceRoot":"","sources":["../../src/ea/ea-sweep.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAGlE,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAwB/E;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,IAAiB;IAChD,MAAM,EACJ,aAAa,EACb,UAAU,EACV,UAAU,EACV,iBAAiB,EACjB,oBAAoB,EACpB,aAAa,EACb,mBAAmB,EACnB,UAAU,GACX,GAAG,IAAI,CAAC;IAET,MAAM,UAAU,GAAG,mBAAmB,CAAC;QACrC,aAAa;QACb,iBAAiB;QACjB,oBAAoB;KACrB,CAAC,CAAC;IAEH,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,UAAU,CAAC,gBAAgB,CAAC,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;QACrD,UAAU,CAAC,IAAI,EAAE,CAAC;QAClB,OAAO,CAAC,GAAG,CAAC,oDAAoD,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC;QACrF,UAAU,CAAC,MAAM,CACf,qBAAqB,EACrB,mCAAmC,UAAU,CAAC,MAAM,EAAE,CACvD,CAAC;QACF,OAAO;YACL,QAAQ,EAAE,IAAI;YACd,cAAc,EAAE,UAAU,CAAC,MAAM;YACjC,UAAU,EAAE,UAAU,CAAC,KAAK,CAAC,UAAU;YACvC,iBAAiB,EAAE,CAAC;YACpB,iBAAiB,EAAE,CAAC;SACrB,CAAC;IACJ,CAAC;IAED,UAAU,CAAC,gBAAgB,CAAC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,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO,CAAC,IAAI,CAAC,2CAA2C,EAAE,GAAG,CAAC,CAAC;QACjE,CAAC;IACH,CAAC;IAED,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;IAC3B,UAAU,CAAC,gBAAgB,EAAE,CAAC;IAC9B,UAAU,CAAC,IAAI,EAAE,CAAC;IAElB,UAAU,CAAC,MAAM,CAAC,qBAAqB,EAAE;QACvC,gBAAgB,SAAS,CAAC,OAAO,EAAE;QACnC,cAAc,iBAAiB,EAAE;QACjC,uBAAuB;KACxB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAEf,OAAO;QACL,QAAQ,EAAE,KAAK;QACf,UAAU,EAAE,SAAS,CAAC,OAAO;QAC7B,aAAa;QACb,iBAAiB;QACjB,iBAAiB,EAAE,CAAC;KACrB,CAAC;AACJ,CAAC"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Fleet Attention Gate — Constitutional EA Foundation
3
+ *
4
+ * SPEC: SPEC-jessie-executive-assistant-activation-v1.0 §3.0 (Amendment 1 — CRITICAL)
5
+ * Patent: Patent 8 (Self-Governing Ecosystem)
6
+ *
7
+ * Before every EA sweep, Jessie MUST check fleet state. Commander
8
+ * duties are constitutional obligations that cannot be preempted
9
+ * or starved by EA cron jobs. If any fleet-critical event requires
10
+ * Commander attention, the EA sweep defers entirely.
11
+ */
12
+ import type { DecisionStore } from '../command/decision-store.js';
13
+ export interface FleetAttentionResult {
14
+ deferred: boolean;
15
+ reason?: string;
16
+ }
17
+ export interface FleetAttentionDeps {
18
+ decisionStore: DecisionStore;
19
+ getFleetBusStatus: () => string;
20
+ getRecentFleetAlerts?: () => Array<{
21
+ method: string;
22
+ severity?: string;
23
+ timestamp: string;
24
+ }>;
25
+ }
26
+ /**
27
+ * Check whether fleet-critical events require Commander attention.
28
+ *
29
+ * Returns { deferred: true, reason } if EA should defer,
30
+ * or { deferred: false } if EA can proceed.
31
+ */
32
+ export declare function checkFleetAttention(deps: FleetAttentionDeps): FleetAttentionResult;
33
+ //# sourceMappingURL=fleet-attention-gate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fleet-attention-gate.d.ts","sourceRoot":"","sources":["../../src/ea/fleet-attention-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAElE,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,kBAAkB;IACjC,aAAa,EAAE,aAAa,CAAC;IAC7B,iBAAiB,EAAE,MAAM,MAAM,CAAC;IAChC,oBAAoB,CAAC,EAAE,MAAM,KAAK,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC9F;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,kBAAkB,GAAG,oBAAoB,CAoClF"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Fleet Attention Gate — Constitutional EA Foundation
3
+ *
4
+ * SPEC: SPEC-jessie-executive-assistant-activation-v1.0 §3.0 (Amendment 1 — CRITICAL)
5
+ * Patent: Patent 8 (Self-Governing Ecosystem)
6
+ *
7
+ * Before every EA sweep, Jessie MUST check fleet state. Commander
8
+ * duties are constitutional obligations that cannot be preempted
9
+ * or starved by EA cron jobs. If any fleet-critical event requires
10
+ * Commander attention, the EA sweep defers entirely.
11
+ */
12
+ /**
13
+ * Check whether fleet-critical events require Commander attention.
14
+ *
15
+ * Returns { deferred: true, reason } if EA should defer,
16
+ * or { deferred: false } if EA can proceed.
17
+ */
18
+ export function checkFleetAttention(deps) {
19
+ const { decisionStore, getFleetBusStatus, getRecentFleetAlerts } = deps;
20
+ if (getFleetBusStatus() === 'standalone') {
21
+ return { deferred: false };
22
+ }
23
+ const pending = decisionStore.getPendingProposals();
24
+ const urgentProposals = pending.filter((p) => p.riskLevel === 'high' || p.riskLevel === 'critical');
25
+ if (urgentProposals.length > 0) {
26
+ return {
27
+ deferred: true,
28
+ reason: `${urgentProposals.length} pending high/critical proposal(s) require Commander review`,
29
+ };
30
+ }
31
+ if (getRecentFleetAlerts) {
32
+ const alerts = getRecentFleetAlerts();
33
+ const critical = alerts.filter((a) => a.method === 'assessment/failed' ||
34
+ a.method === 'health/incident' ||
35
+ a.method === 'drift/alert' ||
36
+ (a.method === 'health/alert' && a.severity === 'FAIL'));
37
+ if (critical.length > 0) {
38
+ return {
39
+ deferred: true,
40
+ reason: `Fleet-critical event: ${critical[0].method} — Commander attention required`,
41
+ };
42
+ }
43
+ }
44
+ return { deferred: false };
45
+ }
46
+ //# sourceMappingURL=fleet-attention-gate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fleet-attention-gate.js","sourceRoot":"","sources":["../../src/ea/fleet-attention-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAeH;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CAAC,IAAwB;IAC1D,MAAM,EAAE,aAAa,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,GAAG,IAAI,CAAC;IAExE,IAAI,iBAAiB,EAAE,KAAK,YAAY,EAAE,CAAC;QACzC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IAC7B,CAAC;IAED,MAAM,OAAO,GAAG,aAAa,CAAC,mBAAmB,EAAE,CAAC;IACpD,MAAM,eAAe,GAAG,OAAO,CAAC,MAAM,CACpC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,KAAK,MAAM,IAAI,CAAC,CAAC,SAAS,KAAK,UAAU,CAC5D,CAAC;IACF,IAAI,eAAe,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC/B,OAAO;YACL,QAAQ,EAAE,IAAI;YACd,MAAM,EAAE,GAAG,eAAe,CAAC,MAAM,6DAA6D;SAC/F,CAAC;IACJ,CAAC;IAED,IAAI,oBAAoB,EAAE,CAAC;QACzB,MAAM,MAAM,GAAG,oBAAoB,EAAE,CAAC;QACtC,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAC5B,CAAC,CAAC,EAAE,EAAE,CACJ,CAAC,CAAC,MAAM,KAAK,mBAAmB;YAChC,CAAC,CAAC,MAAM,KAAK,iBAAiB;YAC9B,CAAC,CAAC,MAAM,KAAK,aAAa;YAC1B,CAAC,CAAC,CAAC,MAAM,KAAK,cAAc,IAAI,CAAC,CAAC,QAAQ,KAAK,MAAM,CAAC,CACzD,CAAC;QACF,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACxB,OAAO;gBACL,QAAQ,EAAE,IAAI;gBACd,MAAM,EAAE,yBAAyB,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,iCAAiC;aACrF,CAAC;QACJ,CAAC;IACH,CAAC;IAED,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;AAC7B,CAAC"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * GOG Health Gate — EA Infrastructure
3
+ *
4
+ * SPEC: SPEC-jessie-executive-assistant-activation-v1.0 §3.3, IH1
5
+ *
6
+ * Checks GOG (Google OAuth Gateway) availability before email/calendar
7
+ * operations. Handles first-failure and recovery notifications.
8
+ */
9
+ export interface GogHealthState {
10
+ healthy: boolean;
11
+ lastCheckedAt: string;
12
+ failedSince?: string;
13
+ notifiedGreg: boolean;
14
+ }
15
+ export interface GogHealthResult {
16
+ healthy: boolean;
17
+ firstFailure: boolean;
18
+ recovered: boolean;
19
+ }
20
+ export declare function resetGogHealthState(): void;
21
+ export declare function getGogHealthState(): GogHealthState;
22
+ /**
23
+ * Check GOG availability via `gog auth status`.
24
+ *
25
+ * Returns health status with transition flags:
26
+ * - firstFailure: GOG just went down (notify Greg once)
27
+ * - recovered: GOG just came back (notify Greg once)
28
+ */
29
+ export declare function checkGogHealth(gogBinaryPath?: string): GogHealthResult;
30
+ /**
31
+ * Mark that Greg has been notified about the current GOG state.
32
+ */
33
+ export declare function markGogNotified(): void;
34
+ //# sourceMappingURL=gog-health.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gog-health.d.ts","sourceRoot":"","sources":["../../src/ea/gog-health.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,OAAO,CAAC;IACtB,SAAS,EAAE,OAAO,CAAC;CACpB;AAQD,wBAAgB,mBAAmB,IAAI,IAAI,CAM1C;AAED,wBAAgB,iBAAiB,IAAI,cAAc,CAElD;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,aAAa,GAAE,MAAc,GAAG,eAAe,CAkC7E;AAED;;GAEG;AACH,wBAAgB,eAAe,IAAI,IAAI,CAEtC"}
@@ -0,0 +1,68 @@
1
+ /**
2
+ * GOG Health Gate — EA Infrastructure
3
+ *
4
+ * SPEC: SPEC-jessie-executive-assistant-activation-v1.0 §3.3, IH1
5
+ *
6
+ * Checks GOG (Google OAuth Gateway) availability before email/calendar
7
+ * operations. Handles first-failure and recovery notifications.
8
+ */
9
+ import { execSync } from 'node:child_process';
10
+ let _state = {
11
+ healthy: true,
12
+ lastCheckedAt: new Date().toISOString(),
13
+ notifiedGreg: false,
14
+ };
15
+ export function resetGogHealthState() {
16
+ _state = {
17
+ healthy: true,
18
+ lastCheckedAt: new Date().toISOString(),
19
+ notifiedGreg: false,
20
+ };
21
+ }
22
+ export function getGogHealthState() {
23
+ return { ..._state };
24
+ }
25
+ /**
26
+ * Check GOG availability via `gog auth status`.
27
+ *
28
+ * Returns health status with transition flags:
29
+ * - firstFailure: GOG just went down (notify Greg once)
30
+ * - recovered: GOG just came back (notify Greg once)
31
+ */
32
+ export function checkGogHealth(gogBinaryPath = 'gog') {
33
+ const wasHealthy = _state.healthy;
34
+ let isHealthy = false;
35
+ try {
36
+ const output = execSync(`${gogBinaryPath} auth status`, {
37
+ timeout: 5000,
38
+ encoding: 'utf-8',
39
+ stdio: ['pipe', 'pipe', 'pipe'],
40
+ });
41
+ isHealthy = !output.toLowerCase().includes('expired') &&
42
+ !output.toLowerCase().includes('error') &&
43
+ !output.toLowerCase().includes('not authenticated');
44
+ }
45
+ catch {
46
+ isHealthy = false;
47
+ }
48
+ _state.lastCheckedAt = new Date().toISOString();
49
+ _state.healthy = isHealthy;
50
+ const firstFailure = wasHealthy && !isHealthy;
51
+ const recovered = !wasHealthy && isHealthy;
52
+ if (firstFailure) {
53
+ _state.failedSince = _state.lastCheckedAt;
54
+ _state.notifiedGreg = false;
55
+ }
56
+ if (recovered) {
57
+ _state.failedSince = undefined;
58
+ _state.notifiedGreg = false;
59
+ }
60
+ return { healthy: isHealthy, firstFailure, recovered };
61
+ }
62
+ /**
63
+ * Mark that Greg has been notified about the current GOG state.
64
+ */
65
+ export function markGogNotified() {
66
+ _state.notifiedGreg = true;
67
+ }
68
+ //# sourceMappingURL=gog-health.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gog-health.js","sourceRoot":"","sources":["../../src/ea/gog-health.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAe9C,IAAI,MAAM,GAAmB;IAC3B,OAAO,EAAE,IAAI;IACb,aAAa,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;IACvC,YAAY,EAAE,KAAK;CACpB,CAAC;AAEF,MAAM,UAAU,mBAAmB;IACjC,MAAM,GAAG;QACP,O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AAC;QACd,MAAM,CAAC,WAAW,GAAG,SAAS,CAAC;QAC/B,MAAM,CAAC,YAAY,GAAG,KAAK,CAAC;IAC9B,CAAC;IAED,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE,CAAC;AACzD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe;IAC7B,MAAM,CAAC,YAAY,GAAG,IAAI,CAAC;AAC7B,CAAC"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Jessie EA (Executive Assistant) Module — Barrel Export
3
+ *
4
+ * SPEC: SPEC-jessie-executive-assistant-activation-v1.0
5
+ */
6
+ export { checkFleetAttention, } from './fleet-attention-gate.js';
7
+ export type { FleetAttentionResult, FleetAttentionDeps } from './fleet-attention-gate.js';
8
+ export { checkGogHealth, markGogNotified, getGogHealthState, resetGogHealthState, } from './gog-health.js';
9
+ export type { GogHealthState, GogHealthResult } from './gog-health.js';
10
+ export { EaSweepState } from './sweep-state.js';
11
+ export type { SweepStateData, TriageStats, GrilloAssessmentStats, } from './sweep-state.js';
12
+ export { DailyNotes } from './daily-notes.js';
13
+ export { assessDraft, probeGrilloRecovery, } from './correspondence-client.js';
14
+ export type { CorrespondenceAssessmentResult, CorrespondenceClientDeps, } from './correspondence-client.js';
15
+ export { detectConflicts, formatConflictAlert, } from './calendar-conflicts.js';
16
+ export type { CalendarEvent, CalendarConflict } from './calendar-conflicts.js';
17
+ export { runEaSweep } from './ea-sweep.js';
18
+ export type { EaSweepDeps, EaSweepResult } from './ea-sweep.js';
19
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ea/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,mBAAmB,GACpB,MAAM,2BAA2B,CAAC;AACnC,YAAY,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE1F,OAAO,EACL,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEvE,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,YAAY,EACV,cAAc,EACd,WAAW,EACX,qBAAqB,GACtB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EACL,WAAW,EACX,mBAAmB,GACpB,MAAM,4BAA4B,CAAC;AACpC,YAAY,EACV,8BAA8B,EAC9B,wBAAwB,GACzB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EACL,eAAe,EACf,mBAAmB,GACpB,MAAM,yBAAyB,CAAC;AACjC,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE/E,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Jessie EA (Executive Assistant) Module — Barrel Export
3
+ *
4
+ * SPEC: SPEC-jessie-executive-assistant-activation-v1.0
5
+ */
6
+ export { checkFleetAttention, } from './fleet-attention-gate.js';
7
+ export { checkGogHealth, markGogNotified, getGogHealthState, resetGogHealthState, } from './gog-health.js';
8
+ export { EaSweepState } from './sweep-state.js';
9
+ export { DailyNotes } from './daily-notes.js';
10
+ export { assessDraft, probeGrilloRecovery, } from './correspondence-client.js';
11
+ export { detectConflicts, formatConflictAlert, } from './calendar-conflicts.js';
12
+ export { runEaSweep } from './ea-sweep.js';
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ea/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,mBAAmB,GACpB,MAAM,2BAA2B,CAAC;AAGnC,OAAO,EACL,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAOhD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EACL,WAAW,EACX,mBAAmB,GACpB,MAAM,4BAA4B,CAAC;AAMpC,OAAO,EACL,eAAe,EACf,mBAAmB,GACpB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,53 @@
1
+ /**
2
+ * EA Sweep State — Persistence & Deduplication
3
+ *
4
+ * SPEC: SPEC-jessie-executive-assistant-activation-v1.0 §3.1, IH2
5
+ *
6
+ * Tracks processed message IDs to prevent re-processing, triage
7
+ * statistics, Grillo assessment counts, and sweep metadata.
8
+ * Persists to .jessie-data/ea-sweep-state.json.
9
+ */
10
+ export interface GrilloAssessmentStats {
11
+ green: number;
12
+ yellow: number;
13
+ red: number;
14
+ recuse: number;
15
+ unavailable: number;
16
+ degraded: boolean;
17
+ consecutiveTimeouts: number;
18
+ lastAssessmentHash: string;
19
+ lastRubricVersion: string;
20
+ }
21
+ export interface TriageStats {
22
+ autoResolved: number;
23
+ escalated: number;
24
+ archived: number;
25
+ tasksCreated: number;
26
+ grilloAssessments: GrilloAssessmentStats;
27
+ }
28
+ export interface SweepStateData {
29
+ lastSweepAt: string | null;
30
+ processedMessageIds: string[];
31
+ triageStats: TriageStats;
32
+ gogHealthy: boolean;
33
+ fleetAttentionDeferred: boolean;
34
+ lastDeferralReason?: string;
35
+ }
36
+ export declare class EaSweepState {
37
+ private data;
38
+ private readonly filePath;
39
+ constructor(dataDir: string);
40
+ get state(): Readonly<SweepStateData>;
41
+ isProcessed(messageId: string): boolean;
42
+ markProcessed(messageId: string): void;
43
+ recordSweep(stats: Partial<TriageStats>): void;
44
+ recordGrilloAssessment(verdict: 'green' | 'yellow' | 'red' | 'recuse' | 'unavailable', assessmentHash?: string, rubricVersion?: string): void;
45
+ setGogHealthy(healthy: boolean): void;
46
+ setFleetDeferred(deferred: boolean, reason?: string): void;
47
+ isGrilloDegraded(): boolean;
48
+ clearGrilloDegraded(): void;
49
+ pruneOldMessages(): void;
50
+ save(): void;
51
+ private load;
52
+ }
53
+ //# sourceMappingURL=sweep-state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sweep-state.d.ts","sourceRoot":"","sources":["../../src/ea/sweep-state.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;IAClB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,WAAW;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAE,qBAAqB,CAAC;CAC1C;AAED,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,mBAAmB,EAAE,MAAM,EAAE,CAAC;IAC9B,WAAW,EAAE,WAAW,CAAC;IACzB,UAAU,EAAE,OAAO,CAAC;IACpB,sBAAsB,EAAE,OAAO,CAAC;IAChC,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAsBD,qBAAa,YAAY;IACvB,OAAO,CAAC,IAAI,CAAiB;IAC7B,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;gBAEt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