forkit-connect 0.1.1 → 0.1.4
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/dist/cli.js +83 -36
- package/dist/launcher.js +1451 -15
- package/dist/v1/credential-store.js +3 -0
- package/dist/v1/service.d.ts +2 -0
- package/dist/v1/service.js +32 -15
- package/package.json +8 -8
|
@@ -87,11 +87,13 @@ function isWindowsCredentialNotFound(stderr, status) {
|
|
|
87
87
|
const WINDOWS_DPAPI_SCRIPTS = {
|
|
88
88
|
status: [
|
|
89
89
|
"$ErrorActionPreference = 'Stop'",
|
|
90
|
+
'Add-Type -AssemblyName System.Security',
|
|
90
91
|
'[void][System.Security.Cryptography.DataProtectionScope]::CurrentUser',
|
|
91
92
|
"[Console]::Out.Write('windows-dpapi-ready')",
|
|
92
93
|
].join('; '),
|
|
93
94
|
read: [
|
|
94
95
|
"$ErrorActionPreference = 'Stop'",
|
|
96
|
+
'Add-Type -AssemblyName System.Security',
|
|
95
97
|
'$path = $env:FORKIT_CONNECT_WINDOWS_CREDENTIAL_PATH',
|
|
96
98
|
'if (-not (Test-Path -LiteralPath $path)) { exit 44 }',
|
|
97
99
|
'$raw = [System.IO.File]::ReadAllText($path, [System.Text.Encoding]::UTF8)',
|
|
@@ -104,6 +106,7 @@ const WINDOWS_DPAPI_SCRIPTS = {
|
|
|
104
106
|
].join('; '),
|
|
105
107
|
write: [
|
|
106
108
|
"$ErrorActionPreference = 'Stop'",
|
|
109
|
+
'Add-Type -AssemblyName System.Security',
|
|
107
110
|
'$path = $env:FORKIT_CONNECT_WINDOWS_CREDENTIAL_PATH',
|
|
108
111
|
'$directory = Split-Path -Parent $path',
|
|
109
112
|
'if ($directory) { [System.IO.Directory]::CreateDirectory($directory) | Out-Null }',
|
package/dist/v1/service.d.ts
CHANGED
|
@@ -721,9 +721,11 @@ export declare class ConnectV1Service {
|
|
|
721
721
|
queueConfiguredHeartbeatRuntimeSignal(gaid: string | null): string | null;
|
|
722
722
|
runDoctorChecks(): Promise<DoctorCheck[]>;
|
|
723
723
|
markModelIgnored(modelName: string, digest: string): boolean;
|
|
724
|
+
ignoreDetectedModel(selector: string): boolean;
|
|
724
725
|
deferDetectedModel(selector: string, deferHours?: number): boolean;
|
|
725
726
|
markRuntimeIgnored(selector: string): boolean;
|
|
726
727
|
deferRuntimeSuggestion(selector: string, deferHours?: number): boolean;
|
|
728
|
+
ignoreRuntimeSuggestion(selector: string): boolean;
|
|
727
729
|
notImplemented(feature: string): never;
|
|
728
730
|
ensureNoProductionPolicyBypass(): void;
|
|
729
731
|
createEvidenceId(): string;
|
package/dist/v1/service.js
CHANGED
|
@@ -114,37 +114,44 @@ function notificationTargetUrl(candidate) {
|
|
|
114
114
|
|| 'http://127.0.0.1:4317/').trim();
|
|
115
115
|
const base = configuredBase.replace(/\/+$/, '');
|
|
116
116
|
const params = new URLSearchParams();
|
|
117
|
+
const routeToCommandReview = () => {
|
|
118
|
+
params.set('screen', 'command');
|
|
119
|
+
params.set('focus', 'review');
|
|
120
|
+
if (!candidate)
|
|
121
|
+
return;
|
|
122
|
+
const grouped = normalizeDisplayText(candidate.metadata.notification_group);
|
|
123
|
+
if (!grouped) {
|
|
124
|
+
params.set('item', candidate.id);
|
|
125
|
+
}
|
|
126
|
+
};
|
|
117
127
|
if (!candidate) {
|
|
118
|
-
|
|
119
|
-
params.set('focus', 'reviews');
|
|
128
|
+
routeToCommandReview();
|
|
120
129
|
return `${base}/?${params.toString()}`;
|
|
121
130
|
}
|
|
122
131
|
if (candidate.suggested_action === 'sync_c2' || candidate.type === 'c2_sync_pending') {
|
|
123
132
|
params.set('screen', 'runtime');
|
|
124
133
|
params.set('focus', 'c2');
|
|
125
134
|
}
|
|
126
|
-
else if (candidate.suggested_action === '
|
|
135
|
+
else if (candidate.suggested_action === 'open_inbox'
|
|
136
|
+
|| candidate.type === 'runtime_unavailable'
|
|
137
|
+
|| candidate.suggested_action === 'connect_model'
|
|
127
138
|
|| candidate.suggested_action === 'review_model'
|
|
128
139
|
|| candidate.type === 'model_detected'
|
|
129
140
|
|| candidate.type === 'agent_detected'
|
|
130
141
|
|| candidate.suggested_action === 'review_agent'
|
|
131
142
|
|| candidate.suggested_action === 'link_agent_model') {
|
|
132
|
-
|
|
133
|
-
params.set('focus', 'item');
|
|
143
|
+
routeToCommandReview();
|
|
134
144
|
}
|
|
135
|
-
else if (candidate.suggested_action === 'view_pulse_history'
|
|
136
|
-
|
|
137
|
-
params.set('focus', 'item');
|
|
145
|
+
else if (candidate.suggested_action === 'view_pulse_history') {
|
|
146
|
+
routeToCommandReview();
|
|
138
147
|
}
|
|
139
148
|
else if (candidate.type === 'passport_draft_created') {
|
|
140
149
|
params.set('screen', 'passports');
|
|
141
150
|
params.set('focus', 'history');
|
|
142
151
|
}
|
|
143
152
|
else {
|
|
144
|
-
|
|
145
|
-
params.set('focus', 'reviews');
|
|
153
|
+
routeToCommandReview();
|
|
146
154
|
}
|
|
147
|
-
params.set('item', candidate.id);
|
|
148
155
|
return `${base}/?${params.toString()}`;
|
|
149
156
|
}
|
|
150
157
|
function hasLinuxGuiSession() {
|
|
@@ -5250,10 +5257,11 @@ class ConnectV1Service {
|
|
|
5250
5257
|
return {
|
|
5251
5258
|
id: 'connect-inbox-review',
|
|
5252
5259
|
type: modelCount > 0 ? 'model_detected' : agentCount > 0 ? 'agent_detected' : 'shadow_candidate',
|
|
5253
|
-
title: '
|
|
5260
|
+
title: 'Review required in Forkit Connect',
|
|
5254
5261
|
message: joinNotificationSentences([
|
|
5255
5262
|
reviewSentence,
|
|
5256
5263
|
'Nothing has been registered automatically',
|
|
5264
|
+
'Open Connect to approve, defer, or ignore',
|
|
5257
5265
|
]),
|
|
5258
5266
|
suggested_action: 'open_inbox',
|
|
5259
5267
|
severity: redCount > 0 ? 'red' : 'amber',
|
|
@@ -5289,10 +5297,11 @@ class ConnectV1Service {
|
|
|
5289
5297
|
return {
|
|
5290
5298
|
id: 'runtime-attention',
|
|
5291
5299
|
type: 'runtime_unavailable',
|
|
5292
|
-
title: '
|
|
5300
|
+
title: 'Runtime attention required',
|
|
5293
5301
|
message: joinNotificationSentences([
|
|
5294
5302
|
`${this.pluralizeNotificationNoun(runtimeCandidates.length, 'runtime')} reported an unavailable state`,
|
|
5295
5303
|
modelCount > 0 ? `${this.pluralizeNotificationNoun(modelCount, 'model')} may be affected` : null,
|
|
5304
|
+
'Open Connect to inspect runtime state',
|
|
5296
5305
|
]),
|
|
5297
5306
|
suggested_action: 'view_pulse_history',
|
|
5298
5307
|
severity: 'red',
|
|
@@ -5317,7 +5326,7 @@ class ConnectV1Service {
|
|
|
5317
5326
|
return {
|
|
5318
5327
|
id: 'governance-control',
|
|
5319
5328
|
type: revokedCount > 0 ? 'session_revoked' : 'session_paused',
|
|
5320
|
-
title: revokedCount > 0 ? '
|
|
5329
|
+
title: revokedCount > 0 ? 'Governed access was revoked' : 'Governed communication was paused',
|
|
5321
5330
|
message: joinNotificationSentences([
|
|
5322
5331
|
revokedCount > 0 ? `${this.pluralizeNotificationNoun(revokedCount, 'session')} revoked` : null,
|
|
5323
5332
|
pausedCount > 0 ? `${this.pluralizeNotificationNoun(pausedCount, 'session')} paused` : null,
|
|
@@ -5345,7 +5354,7 @@ class ConnectV1Service {
|
|
|
5345
5354
|
return {
|
|
5346
5355
|
...syncCandidate,
|
|
5347
5356
|
id: 'c2-sync-attention',
|
|
5348
|
-
title: '
|
|
5357
|
+
title: 'Sync attention required',
|
|
5349
5358
|
message: joinNotificationSentences([
|
|
5350
5359
|
pendingEvents > 0
|
|
5351
5360
|
? `${this.pluralizeNotificationNoun(pendingEvents, 'metadata update')} could not sync cleanly`
|
|
@@ -8784,6 +8793,11 @@ class ConnectV1Service {
|
|
|
8784
8793
|
});
|
|
8785
8794
|
return true;
|
|
8786
8795
|
}
|
|
8796
|
+
ignoreDetectedModel(selector) {
|
|
8797
|
+
const state = this.stateStore.readState();
|
|
8798
|
+
const model = this.resolveModelSelection(selector, state);
|
|
8799
|
+
return this.markModelIgnored(model.model, model.digest);
|
|
8800
|
+
}
|
|
8787
8801
|
deferDetectedModel(selector, deferHours = 24) {
|
|
8788
8802
|
const state = this.stateStore.readState();
|
|
8789
8803
|
const model = this.resolveModelSelection(selector, state);
|
|
@@ -8825,6 +8839,9 @@ class ConnectV1Service {
|
|
|
8825
8839
|
this.stateStore.replaceRuntimePassports(nextRuntimePassports);
|
|
8826
8840
|
return true;
|
|
8827
8841
|
}
|
|
8842
|
+
ignoreRuntimeSuggestion(selector) {
|
|
8843
|
+
return this.markRuntimeIgnored(selector);
|
|
8844
|
+
}
|
|
8828
8845
|
notImplemented(feature) {
|
|
8829
8846
|
throw new Error(`NOT_IMPLEMENTED: ${feature}`);
|
|
8830
8847
|
}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "forkit-connect",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Forkit Connect Local Engine - The Global AI Governance Fabric",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
8
|
"engines": {
|
|
9
|
-
"node": "
|
|
9
|
+
"node": "20.x || 22.x || 24.x"
|
|
10
10
|
},
|
|
11
11
|
"files": [
|
|
12
12
|
"dist",
|
|
@@ -14,12 +14,13 @@
|
|
|
14
14
|
"QUICKSTART.md"
|
|
15
15
|
],
|
|
16
16
|
"scripts": {
|
|
17
|
-
"build": "
|
|
17
|
+
"build": "npm run clean && tsc -p tsconfig.build.json && node -e \"const fs = require('node:fs'); if (process.platform !== 'win32') fs.chmodSync('dist/cli.js', 0o755);\"",
|
|
18
18
|
"dev": "tsc -w -p tsconfig.build.json",
|
|
19
|
-
"clean": "
|
|
20
|
-
"prepack": "
|
|
19
|
+
"clean": "node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true });\"",
|
|
20
|
+
"prepack": "npm run build && node ./scripts/prune-package-dist.js",
|
|
21
21
|
"install:ubuntu": "bash ./scripts/install-ubuntu-local.sh",
|
|
22
|
-
"smoke:package": "
|
|
22
|
+
"smoke:package": "node ./scripts/smoke-package.mjs",
|
|
23
|
+
"smoke:registry": "node ./scripts/smoke-registry.mjs",
|
|
23
24
|
"desktop:dev": "pnpm run build && node dist/launcher.js",
|
|
24
25
|
"desktop:build": "pnpm run build && node dist/launcher.js --build-shell",
|
|
25
26
|
"deploy:local": "bash scripts/deploy-local.sh"
|
|
@@ -29,10 +30,9 @@
|
|
|
29
30
|
},
|
|
30
31
|
"dependencies": {
|
|
31
32
|
"@modelcontextprotocol/sdk": "^1.0.1",
|
|
32
|
-
"better-sqlite3": "^
|
|
33
|
+
"better-sqlite3": "^12.10.0",
|
|
33
34
|
"cors": "^2.8.6",
|
|
34
35
|
"express": "^4.19.2",
|
|
35
|
-
"keytar": "^7.9.0",
|
|
36
36
|
"ps-list": "^8.1.1",
|
|
37
37
|
"uuid": "^10.0.0",
|
|
38
38
|
"ws": "^8.16.0",
|