@everfur/cli 0.2.1 → 0.5.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.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- export { COMMANDS, buildSandboxDocument, buildVerificationDocument, failureOutcome, formatOutcome, matchCommand, nextActionsFor, parseCapabilities, parseIdentityMode, parseSessionMintLanguage, parseSuppliedFacts, projectSandboxCreate, renderDiagnosis, renderPlan, renderSandboxCreate, renderVerification, runCli } from './chunk-4UB26D67.js';
3
- export { ADMIN_TOKEN, API_PREFIX, BASE_URL_ENV_VAR, CLI_VERSION, CREDENTIAL_SPECS, DEFAULT_TIMEOUT_MS, EMPTY_REGISTRY, ERRORS_DOCUMENT_KEY, ExitCode, IDEMPOTENT_METHODS, MISSING_FACT_NAMES, PARTNER_KEY, PARTNER_SECRET_KEY, PLAN_DOCUMENT_KIND, PLAN_SCHEMA_VERSION, REASON_CODES, REDACTED, SCHEMAS, SESSION_TOKEN, THEME_TOKEN_ORDER, TransportError, apiUrl, buildDecisionSpace, buildDiagnosisDocument, buildExplanationDocument, clampTimeout, createApiClient, createMemoryFileSystem, createRecordingClock, describeFailure, detectProject, detectTheme, detectThemeFromText, digestOfProjection, digestsEqual, editDistance, entryFromRow, ephemeralCredential, errorCodeOf, failureDetails, fetchTransport, isCorrelatableRequestId, isIdempotent, isKnownReasonCode, loadDecisionSpace, loadErrorRegistry, missingFactsFor, nextActionFor2 as nextActionForErrorCode, nextActionFor as nextActionForReason, nodeFileSystem, parseDiagnostics, planIntegration, renderExplanation, resolveContractPath, resolveCredential, resolveEndpoint, runVerification, suggestCodes, systemClock, validateContractFile, validateContractPublicEnvelope, validateDiagnosisDocument, validateErrorExplanationDocument, validatePlanDocument, validateSandboxCreateDocument, validateVerificationDocument, verifyDigest, walkSingle, walkTree, withPrefix } from './chunk-KQICUK54.js';
2
+ export { COMMANDS, buildSandboxDocument, buildVerificationDocument, failureOutcome, formatOutcome, matchCommand, nextActionsFor, parseCapabilities, parseIdentityMode, parseSessionMintLanguage, parseSuppliedFacts, projectSandboxCreate, renderDiagnosis, renderPlan, renderSandboxCreate, renderVerification, runCli } from './chunk-NLB5XDNO.js';
3
+ export { ADMIN_TOKEN, API_PREFIX, BASE_URL_ENV_VAR, CLI_VERSION, CREDENTIAL_SPECS, DEFAULT_TIMEOUT_MS, EMPTY_REGISTRY, ERRORS_DOCUMENT_KEY, ExitCode, IDEMPOTENT_METHODS, MISSING_FACT_NAMES, PARTNER_KEY, PARTNER_SECRET_KEY, PLAN_DOCUMENT_KIND, PLAN_SCHEMA_VERSION, REASON_CODES, REDACTED, SCHEMAS, SESSION_TOKEN, THEME_TOKEN_ORDER, TransportError, apiUrl, buildDecisionSpace, buildDiagnosisDocument, buildExplanationDocument, clampTimeout, createApiClient, createMemoryFileSystem, createRecordingClock, describeFailure, detectProject, detectTheme, detectThemeFromText, digestOfProjection, digestsEqual, editDistance, entryFromRow, ephemeralCredential, errorCodeOf, failureDetails, fetchTransport, isCorrelatableRequestId, isIdempotent, isKnownReasonCode, loadDecisionSpace, loadErrorRegistry, missingFactsFor, nextActionFor2 as nextActionForErrorCode, nextActionFor as nextActionForReason, nodeFileSystem, parseDiagnostics, planIntegration, renderExplanation, resolveContractPath, resolveCredential, resolveEndpoint, runVerification, suggestCodes, systemClock, validateContractFile, validateContractPublicEnvelope, validateDiagnosisDocument, validateErrorExplanationDocument, validatePlanDocument, validateSandboxCreateDocument, validateVerificationDocument, verifyDigest, walkSingle, walkTree, withPrefix } from './chunk-CGWSEOW2.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everfur/cli",
3
- "version": "0.2.1",
3
+ "version": "0.5.0",
4
4
  "description": "Everfur CLI: plan, verify, and diagnose an Everfur pet-health integration from the terminal.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -14,6 +14,7 @@
14
14
  "files": [
15
15
  "dist",
16
16
  "!dist/**/*.map",
17
+ "!dist/everfur-mcp-container.*",
17
18
  "schema"
18
19
  ],
19
20
  "publishConfig": {
@@ -70,9 +71,9 @@
70
71
  "type": "git",
71
72
  "url": "git+https://github.com/Everfur-Health/everfur-cli.git"
72
73
  },
73
- "homepage": "https://github.com/Everfur-Health/everfur-cli#readme",
74
+ "homepage": "https://everfur.com/partners",
74
75
  "bugs": {
75
- "url": "https://github.com/Everfur-Health/everfur-cli/issues"
76
+ "email": "support@everfur.com"
76
77
  },
77
78
  "keywords": [
78
79
  "everfur",
@@ -46,12 +46,34 @@
46
46
  }
47
47
  },
48
48
  "envelope": { "type": "string", "minLength": 1 },
49
- "httpStatus": { "type": "integer", "minimum": 0 },
49
+ "httpStatus": {
50
+ "description": "The HTTP status the code arrives on. null for a code with no HTTP status of its own: an SDK member, an MCP tool code, a CLI error code, a diagnostics reason code or an SDK sub-enum member.",
51
+ "type": ["integer", "null"],
52
+ "minimum": 0
53
+ },
50
54
  "namingFamily": { "type": "string", "minLength": 1 },
51
- "retryable": { "type": "boolean" },
55
+ "retryable": {
56
+ "description": "Whether the same request can succeed if repeated. null when the source that answered does not say.",
57
+ "type": ["boolean", "null"]
58
+ },
52
59
  "confirmedOnWire": {
53
- "description": "False means the code exists in source but no live route was traced emitting it. Documentation, not a contract to branch on.",
54
- "type": "boolean"
60
+ "description": "False means the code exists in source but no live route was traced emitting it, or that it is never a wire code. Documentation, not a contract to branch on. null when the source that answered does not record it (the SDK's contract table).",
61
+ "type": ["boolean", "null"]
62
+ },
63
+ "alsoIn": {
64
+ "description": "Additive to v1: the same spelling in another vocabulary (an SDK sub-enum, a diagnostics reason code, a CLI error code), each with its own meaning, so a reader holding the other one is not handed these facts silently.",
65
+ "type": "array",
66
+ "items": {
67
+ "type": "object",
68
+ "required": ["namingFamily", "declaredIn", "cause", "retryable", "nextAction"],
69
+ "properties": {
70
+ "namingFamily": { "type": "string", "minLength": 1 },
71
+ "declaredIn": { "type": "string", "minLength": 1 },
72
+ "cause": { "type": "string", "minLength": 1 },
73
+ "retryable": { "type": ["boolean", "null"] },
74
+ "nextAction": { "type": "string", "minLength": 1 }
75
+ }
76
+ }
55
77
  },
56
78
  "surfaces": { "type": "array", "items": { "type": "string" } },
57
79
  "cause": { "type": "string" },
@@ -77,6 +77,11 @@
77
77
  "type": "array",
78
78
  "items": { "$ref": "#/$defs/PlanPrinciple" }
79
79
  },
80
+ "checklist": {
81
+ "description": "The definition of done of a ready plan: every item must hold, each proved by its verify, before the integration is reported finished. Derived from the steps, so the same plan always carries the same list. Absent on a refusal and on documents written before the field existed.",
82
+ "type": "array",
83
+ "items": { "$ref": "#/$defs/PlanChecklistItem" }
84
+ },
80
85
  "warnings": {
81
86
  "type": "array",
82
87
  "items": { "$ref": "#/$defs/PlanWarning" }
@@ -177,26 +182,41 @@
177
182
  }
178
183
  },
179
184
  "ThemeToken": {
180
- "enum": ["primaryColor", "accentColor", "primaryColorDark", "accentColorDark", "brightness", "surfaceStyle", "radiusScale", "fontFamily", "fontRegular", "fontMedium", "fontBold"]
185
+ "enum": ["primaryColor", "accentColor", "primaryColorDark", "accentColorDark", "successColor", "warningColor", "infoColor", "successColorDark", "warningColorDark", "infoColorDark", "dangerColor", "dangerColorDark", "brightness", "backgroundColor", "backgroundColorDark", "textColor", "textColorDark", "surfaceStyle", "radiusScale", "borderRadius", "fontSizeBase", "fontFamily", "headingFontFamily", "fontRegular", "fontMedium", "fontBold"]
181
186
  },
182
187
  "ThemeDetection": {
183
188
  "type": "object",
184
189
  "required": ["source", "confidence", "theme", "evidence", "scanned", "missing", "inferred"],
185
190
  "properties": {
186
- "source": { "enum": ["tailwind-v4", "tailwind-v3", "css-variables", "react-navigation", "rn-colors", "none"] },
191
+ "source": { "enum": ["tailwind-v4", "tailwind-v3", "css-variables", "tailwind-classes", "react-navigation", "rn-colors", "none"] },
187
192
  "confidence": { "enum": ["high", "medium", "low"] },
188
193
  "theme": {
189
- "description": "The EverfurThemeInput fields the detector mapped, every value a string. Empty at low confidence.",
194
+ "description": "The EverfurThemeInput fields the detector mapped, every value a string but the two px numbers. Empty at low confidence.",
190
195
  "type": "object",
191
196
  "properties": {
192
197
  "primaryColor": { "type": "string", "pattern": "^#[0-9A-F]{6}$" },
193
198
  "accentColor": { "type": "string", "pattern": "^#[0-9A-F]{6}$" },
194
199
  "primaryColorDark": { "type": "string", "pattern": "^#[0-9A-F]{6}$" },
195
200
  "accentColorDark": { "type": "string", "pattern": "^#[0-9A-F]{6}$" },
201
+ "successColor": { "type": "string", "pattern": "^#[0-9A-F]{6}$" },
202
+ "warningColor": { "type": "string", "pattern": "^#[0-9A-F]{6}$" },
203
+ "infoColor": { "type": "string", "pattern": "^#[0-9A-F]{6}$" },
204
+ "successColorDark": { "type": "string", "pattern": "^#[0-9A-F]{6}$" },
205
+ "warningColorDark": { "type": "string", "pattern": "^#[0-9A-F]{6}$" },
206
+ "infoColorDark": { "type": "string", "pattern": "^#[0-9A-F]{6}$" },
207
+ "dangerColor": { "type": "string", "pattern": "^#[0-9A-F]{6}$" },
208
+ "dangerColorDark": { "type": "string", "pattern": "^#[0-9A-F]{6}$" },
196
209
  "brightness": { "enum": ["light", "dark"] },
210
+ "backgroundColor": { "type": "string", "pattern": "^#[0-9A-F]{6}$", "description": "The light palette's ground as the project declares it (SDK 0.9.0 background_color). Additive to v1." },
211
+ "backgroundColorDark": { "type": "string", "pattern": "^#[0-9A-F]{6}$", "description": "The dark palette's ground. Additive to v1." },
212
+ "textColor": { "type": "string", "pattern": "^#[0-9A-F]{6}$", "description": "The light palette's body text (SDK 0.9.0 text_color). Additive to v1." },
213
+ "textColorDark": { "type": "string", "pattern": "^#[0-9A-F]{6}$", "description": "The dark palette's body text. Additive to v1." },
197
214
  "surfaceStyle": { "enum": ["white", "cream", "subtle"] },
198
215
  "radiusScale": { "enum": ["sharp", "default", "round"] },
216
+ "borderRadius": { "type": "number", "minimum": 0, "description": "The medium corner radius in px (SDK 0.9.0 border_radius). Additive to v1." },
217
+ "fontSizeBase": { "type": "number", "exclusiveMinimum": 0, "description": "The body text size in px (SDK 0.9.0 font_size_base). Additive to v1." },
199
218
  "fontFamily": { "type": "string", "minLength": 1 },
219
+ "headingFontFamily": { "type": "string", "minLength": 1, "description": "The headings' family (SDK 0.9.0). Additive to v1." },
200
220
  "fontRegular": { "type": "string", "minLength": 1, "description": "The registered regular face a React Native theme file names (the SDK's fonts.regular). Additive to v1." },
201
221
  "fontMedium": { "type": "string", "minLength": 1, "description": "The registered medium face (fonts.medium). Additive to v1." },
202
222
  "fontBold": { "type": "string", "minLength": 1, "description": "The registered bold face (fonts.bold). Additive to v1." }
@@ -277,6 +297,16 @@
277
297
  "docPath": { "oneOf": [{ "type": "null" }, { "type": "string", "pattern": "^/" }] }
278
298
  }
279
299
  },
300
+ "PlanChecklistItem": {
301
+ "type": "object",
302
+ "required": ["id", "requirement", "verify", "steps"],
303
+ "properties": {
304
+ "id": { "type": "string", "minLength": 1 },
305
+ "requirement": { "type": "string", "minLength": 1 },
306
+ "verify": { "type": "string", "minLength": 1 },
307
+ "steps": { "type": "array", "items": { "type": "string", "minLength": 1 } }
308
+ }
309
+ },
280
310
  "DecisionSpaceProvenance": {
281
311
  "type": "object",
282
312
  "required": ["source", "digest", "trees"],
@@ -303,7 +333,22 @@
303
333
  ]
304
334
  },
305
335
  "reason": { "type": "string", "minLength": 1 },
306
- "supplyWith": { "type": "string", "minLength": 1 }
336
+ "supplyWith": { "type": "string", "minLength": 1 },
337
+ "requiredWhen": {
338
+ "description": "Additive to v1: the fact is needed only when another fact missing from the same refusal takes one of these answers. It is asked in the same round so every answer is collected at once; given with any other answer, it is unused.",
339
+ "type": "object",
340
+ "required": ["fact", "oneOf"],
341
+ "properties": {
342
+ "fact": { "type": "string", "minLength": 1 },
343
+ "oneOf": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } }
344
+ }
345
+ },
346
+ "options": {
347
+ "description": "Additive to v1: present when only some of the fact's answers resolve this refusal, such as the identity modes a capability or the project shape admits. A caller offers these and no others; the answer the refusal rejected is never among them.",
348
+ "type": "array",
349
+ "minItems": 1,
350
+ "items": { "type": "string", "minLength": 1 }
351
+ }
307
352
  }
308
353
  },
309
354
  "PlanStep": {
@@ -17,7 +17,7 @@
17
17
  }
18
18
  },
19
19
  "status": {
20
- "description": "passed = every step PASSed or was GATED. failed = at least one FAILed (exit 7). incomplete = nothing failed but a step was skipped (exit 3).",
20
+ "description": "passed = every step PASSed, was GATED or was N/A. failed = at least one FAILed (exit 7). incomplete = nothing failed but a step was skipped (exit 3).",
21
21
  "enum": ["passed", "failed", "incomplete"]
22
22
  },
23
23
  "baseUrl": { "type": "string", "minLength": 1 },
@@ -28,7 +28,8 @@
28
28
  "passed": { "type": "integer", "minimum": 0 },
29
29
  "failed": { "type": "integer", "minimum": 0 },
30
30
  "skipped": { "type": "integer", "minimum": 0 },
31
- "gated": { "description": "Additive to v1: steps that found a surface switched off by Everfur.", "type": "integer", "minimum": 0 }
31
+ "gated": { "description": "Additive to v1: steps that found a surface switched off by Everfur.", "type": "integer", "minimum": 0 },
32
+ "notApplicable": { "description": "Additive to v1: checks that do not apply to this integration, such as the frame's embed fence for an in-page page. Present only when one was N/A.", "type": "integer", "minimum": 0 }
32
33
  }
33
34
  },
34
35
  "steps": {
@@ -41,8 +42,8 @@
41
42
  "id": { "type": "string", "minLength": 1 },
42
43
  "title": { "type": "string", "minLength": 1 },
43
44
  "result": {
44
- "description": "GATED (additive to v1): the step ran and found a surface Everfur has switched off for the tenant. It is not a failure and not a skip, so it changes the status in neither direction.",
45
- "enum": ["PASS", "FAIL", "SKIP", "GATED"]
45
+ "description": "GATED (additive to v1): the step ran and found a surface Everfur has switched off for the tenant. N/A (additive to v1): the check does not apply to this integration (the frame's embed fence and loader for an in-page page) and was not run. Neither is a failure or a skip, so each changes the status in neither direction.",
46
+ "enum": ["PASS", "FAIL", "SKIP", "GATED", "N/A"]
46
47
  },
47
48
  "reason": {
48
49
  "description": "Always populated, for every result. A bare PASS is not a report.",
@@ -1,2 +0,0 @@
1
-
2
- export { }
@@ -1,60 +0,0 @@
1
- #!/usr/bin/env node
2
- import { loadHostedMcpConfig, startHostedMcpServer } from './chunk-SJUEHHU6.js';
3
- import { startRemoteMcpServer, loadRemoteMcpConfig } from './chunk-FC23PLWG.js';
4
- import './chunk-XMIERMOW.js';
5
- import { CLI_VERSION } from './chunk-KQICUK54.js';
6
-
7
- // src/mcp/container-entry.ts
8
- var HOSTED_MARKER = "MCP_PUBLIC_URL";
9
- var SELF_HOSTED_MARKER = "EVERFUR_MCP_HTTP_ACCESS_TOKEN";
10
- function isSet(env, name) {
11
- return (env[name] ?? "").trim().length > 0;
12
- }
13
- function selectContainerEntry(env) {
14
- const hosted = isSet(env, HOSTED_MARKER);
15
- const selfHosted = isSet(env, SELF_HOSTED_MARKER);
16
- if (hosted && !selfHosted) return { kind: "hosted" };
17
- if (selfHosted && !hosted) return { kind: "self-hosted" };
18
- if (hosted && selfHosted) {
19
- return {
20
- kind: "refused",
21
- message: `both ${HOSTED_MARKER} and ${SELF_HOSTED_MARKER} are set. The image runs one entry: the Everfur-hosted server (${HOSTED_MARKER}) or the partner self-hosted server (${SELF_HOSTED_MARKER}), never both.`
22
- };
23
- }
24
- return {
25
- kind: "refused",
26
- message: `neither ${HOSTED_MARKER} nor ${SELF_HOSTED_MARKER} is set. Set ${HOSTED_MARKER} (with EVERFUR_API_BASE_URL and EVERFUR_MCP_HTTP_PORT) for the Everfur-hosted server, or ${SELF_HOSTED_MARKER} (with that deployment's Everfur credentials) for the partner self-hosted server.`
27
- };
28
- }
29
-
30
- // src/bin/everfur-mcp-container.ts
31
- async function main() {
32
- const choice = selectContainerEntry(process.env);
33
- if (choice.kind === "refused") throw new Error(choice.message);
34
- let running;
35
- if (choice.kind === "hosted") {
36
- const config = loadHostedMcpConfig(process.env);
37
- running = await startHostedMcpServer({ config });
38
- process.stderr.write(`everfur-mcp-hosted listening at ${running.url.toString()} as ${config.publicUrl}
39
- `);
40
- } else {
41
- running = await startRemoteMcpServer(loadRemoteMcpConfig(process.env));
42
- process.stderr.write(`everfur-mcp-http listening at ${running.url.toString()}
43
- `);
44
- }
45
- const stop = () => {
46
- running.close().then(() => process.exit(0), () => process.exit(1));
47
- };
48
- process.once("SIGTERM", stop);
49
- process.once("SIGINT", stop);
50
- }
51
- if (process.argv.slice(2).includes("--version")) {
52
- process.stdout.write(`${CLI_VERSION}
53
- `);
54
- } else {
55
- main().catch((error) => {
56
- process.stderr.write(`everfur-mcp-container: ${error instanceof Error ? error.message : String(error)}
57
- `);
58
- process.exit(1);
59
- });
60
- }