@huaqiu/hardware-artifacts 0.7.17 → 0.7.19

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/lib/index.d.mts CHANGED
@@ -1,7 +1,24 @@
1
- import { A as PositionRow, B as smtOrderUrl, D as DEFAULT_ORDER_PAGE_BASE, E as DEFAULT_ORDER_BASE_URL, F as pcbOrderForm, H as snapHoleTier, I as pcbOrderUrl, L as positionsCsv, M as orderBomRows, N as orderIdsFromUrl, O as ORDER_PATHS, P as parsePositions, R as readBoardFacts, T as BoardFacts, U as snapThickness, V as smtOrderUrlFromBackend, W as snapTraceTier, _ as OrderConfigInfo, a as FabricationResult, b as PlaceOrderResult, c as HardwareArtifact, d as HardwareProject, f as InstallationInfo, g as OpenArtifactResult, h as OpenArtifactRequest, i as DiscoveryResult, j as orderBomCsv, k as ORDER_SOURCE_TID, l as HardwareArtifactService, m as NativeApplication, p as Installations, t as ArtifactKind, u as HardwareArtifactsOptions, y as PlaceOrderRequest, z as smtOrderForm } from "./service-CtVn7z8b.mjs";
2
- import { HARDWARE_ROUTE_PREFIX, HardwareHandlerOptions, WorkspaceResolver, createHardwareHandler } from "./routes.mjs";
1
+ import { A as validationSummary, B as parsePositions, D as PackageValidation, E as PackageIssueCode, F as ORDER_SOURCE_TID, G as smtOrderForm, H as pcbOrderUrl, I as PositionRow, J as snapHoleTier, K as smtOrderUrl, L as orderBomCsv, M as DEFAULT_ORDER_BASE_URL, N as DEFAULT_ORDER_PAGE_BASE, O as expectedCopperLayers, P as ORDER_PATHS, R as orderBomRows, T as PackageIssue, U as positionsCsv, V as pcbOrderForm, W as readBoardFacts, X as snapTraceTier, Y as snapThickness, _ as OrderConfigInfo, a as FabricationResult, b as PlaceOrderResult, c as HardwareArtifact, d as HardwareProject, f as InstallationInfo, g as OpenArtifactResult, h as OpenArtifactRequest, i as DiscoveryResult, j as BoardFacts, k as validateFabricationPackage, l as HardwareArtifactService, m as NativeApplication, p as Installations, q as smtOrderUrlFromBackend, t as ArtifactKind, u as HardwareArtifactsOptions, y as PlaceOrderRequest, z as orderIdsFromUrl } from "./service-BGecln85.mjs";
2
+ import { _ as ManifestFailure, a as createHardwareHandler, b as ToolchainSource, c as ToolchainManager, d as ToolchainStatus, f as ValidationOutcome, g as ManifestEntry, h as InstallPhase, i as WorkspaceResolver, l as ToolchainManagerOptions, m as InstallJobSnapshot, n as HardwareHandlerOptions, o as ToolStatus, p as InstallErrorCode, r as TOOLCHAIN_ROUTE_PREFIX, s as ToolchainConfigPatch, t as HARDWARE_ROUTE_PREFIX, u as ToolchainSettings, v as ToolDiscovery, y as ToolchainId } from "./routes-D78ML_ef.mjs";
3
3
  import Schema from "@deepseek-ai/schemastery";
4
4
  import { Context } from "@deepseek-ai/cordis";
5
+ //#region src/tools.d.ts
6
+ interface HardwareToolEnv {
7
+ readonly service: HardwareArtifactService;
8
+ /**
9
+ * Base directory for a relative path: the DSH session's workspace.
10
+ *
11
+ * Only a base, never a limit. An absolute path is used exactly as given; this
12
+ * resolves the convenient relative form the panel and the model both use.
13
+ */
14
+ readonly workspaceOf: (sessionId?: string) => Promise<string | undefined> | string | undefined;
15
+ /** Used when the execution names no session (tests, a bare host). */
16
+ readonly defaultCwd?: () => string;
17
+ }
18
+ declare function createHardwareTools(env: HardwareToolEnv): import("@deepseek-ai/dsh-tools").ToolDefinition[];
19
+ /** The tool names this package registers; the bundle test asserts them. */
20
+ declare function hardwareToolNames(): string[];
21
+ //#endregion
5
22
  //#region src/index.d.ts
6
23
  declare const name = "@huaqiu/hardware-artifacts";
7
24
  declare const inject: readonly ["webServer", "systemPrompt"];
@@ -16,8 +33,22 @@ declare const inject: readonly ["webServer", "systemPrompt"];
16
33
  declare const Config: Schema<Schemastery.ObjectS<NoInfer<{
17
34
  kicadRoot: Schema<string, string, "volatile-defined">;
18
35
  solidcraftRoot: Schema<string, string, "volatile-defined">;
19
- /** Set by the first-run wizard once setup was completed or skipped. */
20
- onboardingComplete: Schema<boolean, boolean, "volatile-defined">;
36
+ /** Last validated KiCad version; display metadata, never the source of truth. */
37
+ kicadVersion: Schema<string, string, "volatile-defined">;
38
+ /** How the KiCad path was obtained (`manual` | `browse` | `download` | `detected`). */
39
+ kicadSource: Schema<string, string, "volatile-defined">;
40
+ /** Epoch milliseconds of the last successful KiCad validation. */
41
+ kicadValidatedAt: Schema<number, number, "volatile-defined">;
42
+ solidcraftVersion: Schema<string, string, "volatile-defined">;
43
+ solidcraftSource: Schema<string, string, "volatile-defined">;
44
+ solidcraftValidatedAt: Schema<number, number, "volatile-defined">;
45
+ /**
46
+ * First-run setup progress: empty until the operator answers, then `deferred`
47
+ * (skipped: never re-prompt, keep the reminder) or `complete`. This is the only
48
+ * flag the client reads; the old `onboardingComplete` boolean was dropped with
49
+ * its compatibility rule (internal-test build).
50
+ */
51
+ toolchainSetup: Schema<string, string, "volatile-defined">;
21
52
  /**
22
53
  * Place-order origin. Empty uses `HUAQIU_ORDER_BASE_URL`, then the Huaqiu
23
54
  * host. It is only the transport target; it does not imply the endpoint
@@ -32,8 +63,22 @@ declare const Config: Schema<Schemastery.ObjectS<NoInfer<{
32
63
  }>>, Schemastery.ObjectT<NoInfer<{
33
64
  kicadRoot: Schema<string, string, "volatile-defined">;
34
65
  solidcraftRoot: Schema<string, string, "volatile-defined">;
35
- /** Set by the first-run wizard once setup was completed or skipped. */
36
- onboardingComplete: Schema<boolean, boolean, "volatile-defined">;
66
+ /** Last validated KiCad version; display metadata, never the source of truth. */
67
+ kicadVersion: Schema<string, string, "volatile-defined">;
68
+ /** How the KiCad path was obtained (`manual` | `browse` | `download` | `detected`). */
69
+ kicadSource: Schema<string, string, "volatile-defined">;
70
+ /** Epoch milliseconds of the last successful KiCad validation. */
71
+ kicadValidatedAt: Schema<number, number, "volatile-defined">;
72
+ solidcraftVersion: Schema<string, string, "volatile-defined">;
73
+ solidcraftSource: Schema<string, string, "volatile-defined">;
74
+ solidcraftValidatedAt: Schema<number, number, "volatile-defined">;
75
+ /**
76
+ * First-run setup progress: empty until the operator answers, then `deferred`
77
+ * (skipped: never re-prompt, keep the reminder) or `complete`. This is the only
78
+ * flag the client reads; the old `onboardingComplete` boolean was dropped with
79
+ * its compatibility rule (internal-test build).
80
+ */
81
+ toolchainSetup: Schema<string, string, "volatile-defined">;
37
82
  /**
38
83
  * Place-order origin. Empty uses `HUAQIU_ORDER_BASE_URL`, then the Huaqiu
39
84
  * host. It is only the transport target; it does not imply the endpoint
@@ -56,15 +101,23 @@ type ConfigValue<T> = T | {
56
101
  interface HardwareArtifactsPluginConfig {
57
102
  readonly kicadRoot?: ConfigValue<string>;
58
103
  readonly solidcraftRoot?: ConfigValue<string>;
59
- readonly onboardingComplete?: ConfigValue<boolean>;
104
+ readonly kicadVersion?: ConfigValue<string>;
105
+ readonly kicadSource?: ConfigValue<string>;
106
+ readonly kicadValidatedAt?: ConfigValue<number>;
107
+ readonly solidcraftVersion?: ConfigValue<string>;
108
+ readonly solidcraftSource?: ConfigValue<string>;
109
+ readonly solidcraftValidatedAt?: ConfigValue<number>;
110
+ readonly toolchainSetup?: ConfigValue<string>;
60
111
  readonly orderBaseUrl?: ConfigValue<string>;
61
112
  readonly accessToken?: ConfigValue<string>;
62
113
  }
63
114
  declare module '@deepseek-ai/cordis' {
64
115
  interface Context {
65
116
  hardwareArtifacts: HardwareArtifactService;
117
+ /** Toolchain configuration, discovery and installation capability. */
118
+ hardwareToolchains: ToolchainManager;
66
119
  }
67
120
  }
68
121
  declare function apply(ctx: Context, config?: HardwareArtifactsPluginConfig): void;
69
122
  //#endregion
70
- export { type ArtifactKind, type BoardFacts, Config, ConfigValue, DEFAULT_ORDER_BASE_URL, DEFAULT_ORDER_PAGE_BASE, type DiscoveryResult, type FabricationResult, HARDWARE_ROUTE_PREFIX, type HardwareArtifact, HardwareArtifactService, type HardwareArtifactsOptions, HardwareArtifactsPluginConfig, type HardwareHandlerOptions, type HardwareProject, type InstallationInfo, type Installations, type NativeApplication, ORDER_PATHS, ORDER_SOURCE_TID, type OpenArtifactRequest, type OpenArtifactResult, type OrderConfigInfo, type PlaceOrderRequest, type PlaceOrderResult, type PositionRow, type WorkspaceResolver, apply, createHardwareHandler, inject, name, orderBomCsv, orderBomRows, orderIdsFromUrl, parsePositions, pcbOrderForm, pcbOrderUrl, positionsCsv, readBoardFacts, smtOrderForm, smtOrderUrl, smtOrderUrlFromBackend, snapHoleTier, snapThickness, snapTraceTier };
123
+ export { type ArtifactKind, type BoardFacts, Config, ConfigValue, DEFAULT_ORDER_BASE_URL, DEFAULT_ORDER_PAGE_BASE, type DiscoveryResult, type FabricationResult, HARDWARE_ROUTE_PREFIX, type HardwareArtifact, HardwareArtifactService, type HardwareArtifactsOptions, HardwareArtifactsPluginConfig, type HardwareHandlerOptions, type HardwareProject, type HardwareToolEnv, type InstallErrorCode, type InstallJobSnapshot, type InstallPhase, type InstallationInfo, type Installations, type ManifestEntry, type ManifestFailure, type NativeApplication, ORDER_PATHS, ORDER_SOURCE_TID, type OpenArtifactRequest, type OpenArtifactResult, type OrderConfigInfo, type PackageIssue, type PackageIssueCode, type PackageValidation, type PlaceOrderRequest, type PlaceOrderResult, type PositionRow, TOOLCHAIN_ROUTE_PREFIX, type ToolDiscovery, type ToolStatus, type ToolchainConfigPatch, type ToolchainId, ToolchainManager, type ToolchainManagerOptions, type ToolchainSettings, type ToolchainSource, type ToolchainStatus, type ValidationOutcome, type WorkspaceResolver, apply, createHardwareHandler, createHardwareTools, expectedCopperLayers, hardwareToolNames, inject, name, orderBomCsv, orderBomRows, orderIdsFromUrl, parsePositions, pcbOrderForm, pcbOrderUrl, positionsCsv, readBoardFacts, smtOrderForm, smtOrderUrl, smtOrderUrlFromBackend, snapHoleTier, snapThickness, snapTraceTier, validateFabricationPackage, validationSummary };