@signetai/connector-base 0.224.0 → 0.225.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.
- package/dist/index.d.ts +36 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +33 -0
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -43,6 +43,16 @@ export interface UninstallResult {
|
|
|
43
43
|
filesRemoved: string[];
|
|
44
44
|
configsPatched?: string[];
|
|
45
45
|
}
|
|
46
|
+
export type ConnectorHealthStatus = "healthy" | "degraded" | "unhealthy" | "needs-auth";
|
|
47
|
+
export interface ConnectorHealth {
|
|
48
|
+
status: ConnectorHealthStatus;
|
|
49
|
+
message: string;
|
|
50
|
+
}
|
|
51
|
+
export interface ConnectorRecoveryCapabilities {
|
|
52
|
+
repair: boolean;
|
|
53
|
+
reinitialize: boolean;
|
|
54
|
+
reinitializeRequiresConfirmation: boolean;
|
|
55
|
+
}
|
|
46
56
|
/**
|
|
47
57
|
* Abstract base class for Signet harness connectors.
|
|
48
58
|
*
|
|
@@ -68,6 +78,12 @@ export declare abstract class BaseConnector {
|
|
|
68
78
|
* Machine identifier (e.g., "claude-code")
|
|
69
79
|
*/
|
|
70
80
|
abstract readonly harnessId: string;
|
|
81
|
+
/**
|
|
82
|
+
* Optional bundled brand asset filename for clients that present the
|
|
83
|
+
* connector. The dashboard resolves this against its local `/logos/`
|
|
84
|
+
* assets; connectors without a mark use a generic icon.
|
|
85
|
+
*/
|
|
86
|
+
getIconAsset(): string | null;
|
|
71
87
|
/**
|
|
72
88
|
* Strip existing Signet blocks from content.
|
|
73
89
|
*
|
|
@@ -126,6 +142,26 @@ export declare abstract class BaseConnector {
|
|
|
126
142
|
* Check if the connector is already installed.
|
|
127
143
|
*/
|
|
128
144
|
abstract isInstalled(): boolean;
|
|
145
|
+
/**
|
|
146
|
+
* Check whether the harness has a discoverable configuration, even when
|
|
147
|
+
* Signet's integration is not installed yet.
|
|
148
|
+
*/
|
|
149
|
+
isDetected(): boolean;
|
|
150
|
+
/**
|
|
151
|
+
* Inspect the connector's runtime health. Connectors with richer signals
|
|
152
|
+
* may override this; the shared default only detects installation markers. It cannot verify
|
|
153
|
+
* enabled configuration, runtime artifacts, or connectivity.
|
|
154
|
+
*/
|
|
155
|
+
inspectHealth(): Promise<ConnectorHealth>;
|
|
156
|
+
/**
|
|
157
|
+
* Return actions that are safe for this connector to expose in clients.
|
|
158
|
+
* The default actions reuse the connector's idempotent install path.
|
|
159
|
+
*/
|
|
160
|
+
getRecoveryCapabilities(): ConnectorRecoveryCapabilities;
|
|
161
|
+
/** Reconcile an existing integration through the connector's install path. */
|
|
162
|
+
repair(basePath: string): Promise<InstallResult>;
|
|
163
|
+
/** Re-run connector initialization through the connector's install path. */
|
|
164
|
+
reinitialize(basePath: string): Promise<InstallResult>;
|
|
129
165
|
/**
|
|
130
166
|
* Get the path to the harness's main config file.
|
|
131
167
|
*/
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAMH,OAAO,EACN,KAAK,cAAc,EACnB,KAAK,aAAa,EAKlB,MAAM,cAAc,CAAC;AAMtB,MAAM,WAAW,aAAa;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,eAAe;IAC/B,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B;AAMD;;;;;;;;;;;;;;;GAeG;AACH,8BAAsB,aAAa;IAClC;;OAEG;IACH,QAAQ,CAA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,GAAG,UAAU,aAAa,CAAC;AAmFpD,wBAAgB,qBAAqB,CACpC,OAAO,EAAE,MAAM,EACf,cAAc,EAAE,oBAAoB,EACpC,OAAO,GAAE,yBAA8B,GACrC,IAAI,CAsCN;AAMD,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -18361,6 +18361,9 @@ function escapeRegex(str) {
|
|
|
18361
18361
|
|
|
18362
18362
|
// src/index.ts
|
|
18363
18363
|
class BaseConnector {
|
|
18364
|
+
getIconAsset() {
|
|
18365
|
+
return null;
|
|
18366
|
+
}
|
|
18364
18367
|
stripSignetBlock(content) {
|
|
18365
18368
|
return stripSignetBlock(content);
|
|
18366
18369
|
}
|
|
@@ -18426,6 +18429,36 @@ ${content}`);
|
|
|
18426
18429
|
return parts.join(`
|
|
18427
18430
|
`);
|
|
18428
18431
|
}
|
|
18432
|
+
isDetected() {
|
|
18433
|
+
return existsSync(this.getConfigPath());
|
|
18434
|
+
}
|
|
18435
|
+
async inspectHealth() {
|
|
18436
|
+
try {
|
|
18437
|
+
if (this.isInstalled()) {
|
|
18438
|
+
return { status: "degraded", message: "Integration detected; runtime health has not been verified." };
|
|
18439
|
+
}
|
|
18440
|
+
if (this.isDetected()) {
|
|
18441
|
+
return { status: "degraded", message: "Harness detected; Signet integration is not configured." };
|
|
18442
|
+
}
|
|
18443
|
+
return { status: "unhealthy", message: "Signet integration is not installed." };
|
|
18444
|
+
} catch (error) {
|
|
18445
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
18446
|
+
return { status: "unhealthy", message: `Health inspection failed: ${message}` };
|
|
18447
|
+
}
|
|
18448
|
+
}
|
|
18449
|
+
getRecoveryCapabilities() {
|
|
18450
|
+
return {
|
|
18451
|
+
repair: true,
|
|
18452
|
+
reinitialize: true,
|
|
18453
|
+
reinitializeRequiresConfirmation: true
|
|
18454
|
+
};
|
|
18455
|
+
}
|
|
18456
|
+
async repair(basePath) {
|
|
18457
|
+
return this.install(basePath);
|
|
18458
|
+
}
|
|
18459
|
+
async reinitialize(basePath) {
|
|
18460
|
+
return this.install(basePath);
|
|
18461
|
+
}
|
|
18429
18462
|
}
|
|
18430
18463
|
function isSignetGeneratedFile(raw) {
|
|
18431
18464
|
const lines = raw.split(`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@signetai/connector-base",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.225.0",
|
|
4
4
|
"description": "Base class for Signet harness connectors",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"typecheck": "tsc --noEmit"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@signetai/core": "0.
|
|
33
|
+
"@signetai/core": "0.225.0",
|
|
34
34
|
"json5": "^2.2.3",
|
|
35
35
|
"jsonc-parser": "3.3.1"
|
|
36
36
|
},
|