shiftacle-desktop-agent 0.1.0 → 0.1.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shiftacle-desktop-agent",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "type": "module",
5
5
  "description": "Desktop agent that auto-fills your EMR with clinical notes from Shiftacle",
6
6
  "bin": {
package/src/auth.mjs CHANGED
@@ -104,7 +104,10 @@ export async function authenticate(config, forceLogin = false) {
104
104
 
105
105
  const res = await fetch(`${config.apiBase}/auth/login`, {
106
106
  method: 'POST',
107
- headers: { 'Content-Type': 'application/json' },
107
+ headers: {
108
+ 'Content-Type': 'application/json',
109
+ 'X-Agent-Key': config.agentKey,
110
+ },
108
111
  body: JSON.stringify({ email, password }),
109
112
  });
110
113
 
package/src/config.mjs CHANGED
@@ -10,6 +10,7 @@ export const DEFAULTS = {
10
10
  configDir: join(homedir(), '.shiftacle'),
11
11
  port: 3847,
12
12
  emr: 'hellonote',
13
+ agentKey: '0f24e99a5f293fb411afc8e04cbeef2268a5b0f7e7581d2aa6ea16235f196d2d',
13
14
  pollIntervalMs: 5000,
14
15
  emrUrls: {
15
16
  hellonote: 'https://app.hellonote.com',
@@ -28,6 +29,7 @@ export function getConfig(cliFlags = {}) {
28
29
  headless: cliFlags.headless || false,
29
30
  sessionDir: DEFAULTS.sessionDir,
30
31
  configDir: DEFAULTS.configDir,
32
+ agentKey: process.env.SHIFTACLE_AGENT_KEY || DEFAULTS.agentKey,
31
33
  pollIntervalMs: parseInt(process.env.POLL_INTERVAL || DEFAULTS.pollIntervalMs, 10),
32
34
  emrUrls: DEFAULTS.emrUrls,
33
35
  };