@opencoreai/opencore 0.2.2 → 0.4.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.
@@ -66,6 +66,8 @@
66
66
  - Verify write destination before saving.
67
67
  - Avoid data loss conditions.
68
68
  - Prefer append or snapshot strategies when appropriate.
69
+ - Keep `~/.opencore` files and directories private to the local user where possible.
70
+ - Treat `computer-profile.md` as durable machine-state inventory, not a secret dump.
69
71
 
70
72
  ## Privacy Rules
71
73
  - Keep user data local unless user requests otherwise.
@@ -74,6 +76,7 @@
74
76
  - Do not include secrets in chat responses.
75
77
  - Do not include secrets in dashboard broadcasts.
76
78
  - Minimize retention of sensitive material.
79
+ - Do not store raw tokens, passwords, or secrets in `computer-profile.md`.
77
80
 
78
81
  ## Platform Rules
79
82
  - Assume macOS conventions only.
@@ -91,6 +94,7 @@
91
94
  - Validate outcomes where possible.
92
95
  - Prefer cron-backed scheduling for future-time or recurring tasks when a cron expression can represent the request.
93
96
  - For long-running tasks, keep only one active heartbeat step at a time and preserve durable progress in memory.md.
97
+ - For local shell work, reject dangerous commands instead of trying to execute around them.
94
98
 
95
99
  ## Chat and Control Plane Rules
96
100
  - Terminal and dashboard are equivalent user channels.
@@ -13,6 +13,7 @@
13
13
  08.1 For future-time or recurring requests, Manager should prefer cron-backed scheduling when possible.
14
14
  09. Manager should keep responses concise and operational.
15
15
  10. Manager should follow soul.md, guidelines.md, instructions.md, memory.md, and config context.
16
+ 10.05 Manager should also use computer-profile.md for durable machine facts such as installed apps, default browser, workspace, hardware profile, and permission-related environment facts.
16
17
  10.1 Manager should inspect and follow installed OpenCore skills in ~/.opencore/skills when relevant.
17
18
  10.2 Built-in skills for skill creation, continuous operations, and internal tool building should be treated as always available if installed.
18
19
  10.3 The credential-operator skill should be treated as a built-in subsystem for login, sign-up, password reuse, verification handling, and saving credentials locally.
@@ -44,6 +45,7 @@
44
45
  33. Keep chat history synchronized across channels.
45
46
  34. Keep screenshots local and referenceable.
46
47
  35. Link screenshot paths to memory when useful.
48
+ 35.05 Keep computer-profile.md updated with durable machine facts learned during tasks, but never store raw secrets there.
47
49
  35.1 Manager may create, inspect, and remove cron-backed scheduled tasks.
48
50
  35.2 For multi-day or multi-week work, Manager should break the task into one active heartbeat step plus ordered upcoming steps.
49
51
  35.3 After a long-running step completes, Manager should refresh heartbeat.md so the next incomplete step becomes active instead of restarting the whole task.
@@ -1,140 +0,0 @@
1
- ObjC.import("AppKit");
2
- ObjC.import("Foundation");
3
-
4
- var env = $.NSProcessInfo.processInfo.environment;
5
- var statePathValue = env.objectForKey("OPENCORE_INDICATOR_STATE_PATH");
6
- if (!statePathValue) {
7
- throw new Error("Missing OPENCORE_INDICATOR_STATE_PATH");
8
- }
9
- var statePath = ObjC.unwrap(statePathValue);
10
-
11
- var width = 204;
12
- var height = 38;
13
- var app = $.NSApplication.sharedApplication;
14
- app.setActivationPolicy($.NSApplicationActivationPolicyAccessory);
15
-
16
- var statusItem = $.NSStatusBar.systemStatusBar.statusItemWithLength($.NSVariableStatusItemLength);
17
- statusItem.button.title = "OpenCore Idle";
18
-
19
- var styleMask = $.NSWindowStyleMaskBorderless | $.NSWindowStyleMaskNonactivatingPanel;
20
- var panel = $.NSPanel.alloc.initWithContentRectStyleMaskBackingDefer(
21
- $.NSMakeRect(0, 0, width, height),
22
- styleMask,
23
- $.NSBackingStoreBuffered,
24
- false
25
- );
26
- panel.floatingPanel = true;
27
- panel.level = $.NSStatusWindowLevel;
28
- panel.hidesOnDeactivate = false;
29
- panel.becomesKeyOnlyIfNeeded = true;
30
- panel.ignoresMouseEvents = true;
31
- panel.opaque = false;
32
- panel.backgroundColor = $.NSColor.clearColor;
33
- panel.hasShadow = false;
34
- panel.collectionBehavior =
35
- $.NSWindowCollectionBehaviorCanJoinAllSpaces |
36
- $.NSWindowCollectionBehaviorFullScreenAuxiliary |
37
- $.NSWindowCollectionBehaviorStationary;
38
-
39
- var content = $.NSView.alloc.initWithFrame($.NSMakeRect(0, 0, width, height));
40
- content.wantsLayer = true;
41
- content.layer.backgroundColor = $.NSColor.clearColor;
42
-
43
- var glow = $.NSView.alloc.initWithFrame($.NSMakeRect(10, 5, width - 20, height - 10));
44
- glow.wantsLayer = true;
45
- glow.layer.cornerRadius = (height - 10) / 2;
46
- glow.layer.backgroundColor = $.NSColor.colorWithCalibratedRedGreenBlueAlpha(1.0, 0.62, 0.18, 0.16).CGColor;
47
- glow.layer.shadowColor = $.NSColor.colorWithCalibratedRedGreenBlueAlpha(1.0, 0.55, 0.14, 0.98).CGColor;
48
- glow.layer.shadowRadius = 16;
49
- glow.layer.shadowOpacity = 0.95;
50
- glow.layer.shadowOffset = $.CGSizeMake(0, 0);
51
- content.addSubview(glow);
52
-
53
- var capsule = $.NSView.alloc.initWithFrame($.NSMakeRect(8, 4, width - 16, height - 8));
54
- capsule.wantsLayer = true;
55
- capsule.layer.cornerRadius = (height - 8) / 2;
56
- capsule.layer.borderWidth = 1.4;
57
- capsule.layer.borderColor = $.NSColor.colorWithCalibratedRedGreenBlueAlpha(0.96, 0.58, 0.22, 0.95).CGColor;
58
- capsule.layer.backgroundColor = $.NSColor.colorWithCalibratedRedGreenBlueAlpha(1.0, 0.80, 0.60, 0.52).CGColor;
59
- content.addSubview(capsule);
60
-
61
- function makeLabel(text, x, y, w, h, fontSize, color) {
62
- var label = $.NSTextField.alloc.initWithFrame($.NSMakeRect(x, y, w, h));
63
- var cell = $.NSTextFieldCell.alloc.initTextCell(text);
64
- label.stringValue = text;
65
- label.editable = false;
66
- label.bordered = false;
67
- label.drawsBackground = false;
68
- label.selectable = false;
69
- label.bezeled = false;
70
- label.font = $.NSFont.boldSystemFontOfSize(fontSize);
71
- label.textColor = color;
72
- label.alignment = $.NSTextAlignmentCenter;
73
- cell.wraps = false;
74
- cell.scrollable = false;
75
- cell.usesSingleLineMode = true;
76
- cell.lineBreakMode = $.NSLineBreakByClipping;
77
- cell.alignment = $.NSTextAlignmentCenter;
78
- label.cell = cell;
79
- return label;
80
- }
81
-
82
- var title = makeLabel(
83
- "OpenCore Active",
84
- 14,
85
- 7,
86
- width - 28,
87
- 24,
88
- 13,
89
- $.NSColor.colorWithCalibratedRedGreenBlueAlpha(0.42, 0.20, 0.02, 0.98)
90
- );
91
- content.addSubview(title);
92
-
93
- panel.contentView = content;
94
-
95
- function positionPanel() {
96
- var screen = $.NSScreen.mainScreen;
97
- if (!screen) return;
98
- var visible = screen.visibleFrame;
99
- var x = visible.origin.x + ((visible.size.width - width) / 2);
100
- var y = visible.origin.y + visible.size.height - height - 10;
101
- panel.setFrameOrigin($.NSMakePoint(x, y));
102
- }
103
-
104
- function readState() {
105
- try {
106
- var fileManager = $.NSFileManager.defaultManager;
107
- if (!fileManager.fileExistsAtPath($(statePath))) {
108
- return { running: false, active: false, message: "OpenCore has stopped" };
109
- }
110
- var data = $.NSData.dataWithContentsOfFile($(statePath));
111
- if (!data) {
112
- return { running: true, active: false, message: "OpenCore is idle" };
113
- }
114
- var text = ObjC.unwrap($.NSString.alloc.initWithDataEncoding(data, $.NSUTF8StringEncoding));
115
- return JSON.parse(text);
116
- } catch (_error) {
117
- return { running: true, active: false, message: "OpenCore is idle" };
118
- }
119
- }
120
-
121
- function applyState(state) {
122
- var active = !!state.active;
123
- statusItem.button.title = active ? "OpenCore Active" : "OpenCore Idle";
124
- title.stringValue = active ? "OpenCore Active" : "OpenCore Idle";
125
- if (active) {
126
- positionPanel();
127
- panel.makeKeyAndOrderFront(null);
128
- } else {
129
- panel.orderOut(null);
130
- }
131
- }
132
-
133
- while (true) {
134
- var state = readState();
135
- if (!state.running) break;
136
- applyState(state);
137
- $.NSRunLoop.currentRunLoop.runUntilDate($.NSDate.dateWithTimeIntervalSinceNow(0.35));
138
- }
139
-
140
- panel.orderOut(null);