@camstack/types 0.1.32 → 0.1.33
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/capabilities/mesh-network.cap.d.ts +54 -2
- package/dist/capabilities/mesh-network.cap.d.ts.map +1 -1
- package/dist/capabilities/mesh-orchestrator.cap.d.ts +67 -0
- package/dist/capabilities/mesh-orchestrator.cap.d.ts.map +1 -1
- package/dist/capabilities/nodes.cap.d.ts +23 -1
- package/dist/capabilities/nodes.cap.d.ts.map +1 -1
- package/dist/capabilities/user-management.cap.d.ts +4 -0
- package/dist/capabilities/user-management.cap.d.ts.map +1 -1
- package/dist/generated/addon-api.d.ts +266 -0
- package/dist/generated/addon-api.d.ts.map +1 -1
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/method-access-map.d.ts.map +1 -1
- package/dist/generated/system-proxy.d.ts +3 -3
- package/dist/generated/system-proxy.d.ts.map +1 -1
- package/dist/{index-BUBhoPUu.js → index-DRWlYskM.js} +161 -6
- package/dist/{index-BUBhoPUu.js.map → index-DRWlYskM.js.map} +1 -1
- package/dist/{index-BBVUwOlZ.mjs → index-YnRVILXN.mjs} +161 -6
- package/dist/{index-BBVUwOlZ.mjs.map → index-YnRVILXN.mjs.map} +1 -1
- package/dist/index.js +12 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -3
- package/dist/index.mjs.map +1 -1
- package/dist/interfaces/api-responses.d.ts +6 -0
- package/dist/interfaces/api-responses.d.ts.map +1 -1
- package/dist/interfaces/storage.d.ts +1 -1
- package/dist/interfaces/storage.d.ts.map +1 -1
- package/dist/node.js +6 -6
- package/dist/node.js.map +1 -1
- package/dist/node.mjs +6 -6
- package/dist/node.mjs.map +1 -1
- package/dist/storage/filesystem-storage-provider.d.ts +1 -1
- package/dist/storage/filesystem-storage-provider.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -7469,7 +7469,9 @@ const MeshPeerSchema = z.object({
|
|
|
7469
7469
|
id: z.string(),
|
|
7470
7470
|
/** Hostname / device name as shown in the mesh dashboard. */
|
|
7471
7471
|
hostname: z.string(),
|
|
7472
|
-
/**
|
|
7472
|
+
/** MagicDNS / mesh DNS name (e.g. `peer-foo.tail-abc.ts.net`). Empty when the provider doesn't support DNS or peer-side resolution is disabled. */
|
|
7473
|
+
magicDns: z.string(),
|
|
7474
|
+
/** Mesh IPv4 / IPv6 addresses combined. Multiple when dual-stacked. */
|
|
7473
7475
|
addresses: z.array(z.string()).readonly(),
|
|
7474
7476
|
/** Operating system reported by the peer (informational). */
|
|
7475
7477
|
os: z.string().optional(),
|
|
@@ -7478,7 +7480,32 @@ const MeshPeerSchema = z.object({
|
|
|
7478
7480
|
/** Last-seen timestamp (epoch ms). 0 when never seen. */
|
|
7479
7481
|
lastSeenMs: z.number(),
|
|
7480
7482
|
/** True for the row representing the current host. */
|
|
7481
|
-
isSelf: z.boolean()
|
|
7483
|
+
isSelf: z.boolean(),
|
|
7484
|
+
/**
|
|
7485
|
+
* Connection mode to this peer:
|
|
7486
|
+
* - `direct`: NAT-traversed P2P (UDP punched)
|
|
7487
|
+
* - `relay`: traffic relayed through provider edge (Tailscale DERP)
|
|
7488
|
+
* - `idle`: peer reachable but no recent traffic / handshake
|
|
7489
|
+
*/
|
|
7490
|
+
connection: z.enum(["direct", "relay", "idle"]),
|
|
7491
|
+
/** DERP region / relay node identifier when `connection: relay`. Null otherwise. */
|
|
7492
|
+
relay: z.string().nullable(),
|
|
7493
|
+
/** Last successful handshake timestamp (epoch ms). 0 when never. */
|
|
7494
|
+
lastHandshakeMs: z.number(),
|
|
7495
|
+
/** Bytes received from this peer since the daemon started. */
|
|
7496
|
+
rxBytes: z.number(),
|
|
7497
|
+
/** Bytes transmitted to this peer since the daemon started. */
|
|
7498
|
+
txBytes: z.number(),
|
|
7499
|
+
/** ACL tags this peer carries (e.g. `["tag:server"]`). Empty when human-owned. */
|
|
7500
|
+
tags: z.array(z.string()).readonly(),
|
|
7501
|
+
/** True when the peer advertises itself as an exit-node candidate. */
|
|
7502
|
+
exitNodeOption: z.boolean(),
|
|
7503
|
+
/** Subnet routes the peer advertises (e.g. `["192.168.1.0/24"]`). */
|
|
7504
|
+
advertisedRoutes: z.array(z.string()).readonly(),
|
|
7505
|
+
/** Owner account login (e.g. `foo@example.com`). Null for tagged peers. */
|
|
7506
|
+
userLogin: z.string().nullable(),
|
|
7507
|
+
/** Pre-auth key / machine-key expiry (epoch ms). Null when keys don't expire. */
|
|
7508
|
+
keyExpiry: z.number().nullable()
|
|
7482
7509
|
});
|
|
7483
7510
|
const MeshStatusSchema = z.object({
|
|
7484
7511
|
/** True when the host is joined and the daemon reports healthy. */
|
|
@@ -7492,7 +7519,38 @@ const MeshStatusSchema = z.object({
|
|
|
7492
7519
|
/** Every endpoint this provider exposes for the current host. */
|
|
7493
7520
|
endpoints: z.array(MeshEndpointSchema$1).readonly(),
|
|
7494
7521
|
/** Last error from the daemon, when not joined. */
|
|
7495
|
-
error: z.string().optional()
|
|
7522
|
+
error: z.string().optional(),
|
|
7523
|
+
// ── Account / tenant identity (generic across providers) ────────
|
|
7524
|
+
/**
|
|
7525
|
+
* Tenant / tailnet / network display name (Tailscale = tailnet
|
|
7526
|
+
* domain, Headscale = namespace, ZeroTier = network name). Empty
|
|
7527
|
+
* pre-join. Per-provider semantics, common slot.
|
|
7528
|
+
*/
|
|
7529
|
+
tenantName: z.string(),
|
|
7530
|
+
/**
|
|
7531
|
+
* Mesh DNS suffix when the provider exposes peer-resolvable DNS
|
|
7532
|
+
* (Tailscale MagicDNS, Headscale MagicDNS, …). Empty when the
|
|
7533
|
+
* provider doesn't ship DNS (e.g. ZeroTier).
|
|
7534
|
+
*/
|
|
7535
|
+
magicDnsSuffix: z.string(),
|
|
7536
|
+
/**
|
|
7537
|
+
* Authenticated user / account login bound to this host. Null when
|
|
7538
|
+
* the provider authenticates with a long-lived network token rather
|
|
7539
|
+
* than a user account (e.g. ZeroTier API token).
|
|
7540
|
+
*/
|
|
7541
|
+
userLogin: z.string().nullable(),
|
|
7542
|
+
/**
|
|
7543
|
+
* Provider control-plane URL (Tailscale SaaS `https://login.tailscale.com`,
|
|
7544
|
+
* self-hosted Headscale, ZeroTier Central, …). Empty when not
|
|
7545
|
+
* applicable (rare).
|
|
7546
|
+
*/
|
|
7547
|
+
controlPlaneUrl: z.string(),
|
|
7548
|
+
/**
|
|
7549
|
+
* Machine-key / node-key expiry (epoch ms). Null when the provider
|
|
7550
|
+
* doesn't rotate keys for the bound host. Operator-facing surface
|
|
7551
|
+
* for "your access expires on …" banners.
|
|
7552
|
+
*/
|
|
7553
|
+
keyExpiry: z.number().nullable()
|
|
7496
7554
|
});
|
|
7497
7555
|
const meshNetworkCapability = {
|
|
7498
7556
|
name: "mesh-network",
|
|
@@ -7544,12 +7602,26 @@ const meshNetworkCapability = {
|
|
|
7544
7602
|
{ kind: "mutation" }
|
|
7545
7603
|
),
|
|
7546
7604
|
/** Leave the mesh. After this the meshIp/magicDnsHostname/etc.
|
|
7547
|
-
* vanish until the next `join`.
|
|
7605
|
+
* vanish until the next `join`. The bound account stays — a
|
|
7606
|
+
* subsequent `join` reuses it without prompting for a new login. */
|
|
7548
7607
|
leave: method(
|
|
7549
7608
|
z.void(),
|
|
7550
7609
|
z.object({ left: z.literal(true) }),
|
|
7551
7610
|
{ kind: "mutation" }
|
|
7552
7611
|
),
|
|
7612
|
+
/**
|
|
7613
|
+
* Sign out of the mesh account entirely. Distinct from `leave`:
|
|
7614
|
+
* `leave` only takes the host off-mesh (`tailscale down`) while the
|
|
7615
|
+
* account binding survives, so the next `join` reconnects silently.
|
|
7616
|
+
* `logout` (`tailscale logout`) wipes the daemon's stored
|
|
7617
|
+
* credentials — the next `startLogin` MUST go through a fresh
|
|
7618
|
+
* browser-redirect flow to bind a new account.
|
|
7619
|
+
*/
|
|
7620
|
+
logout: method(
|
|
7621
|
+
z.void(),
|
|
7622
|
+
z.object({ loggedOut: z.literal(true) }),
|
|
7623
|
+
{ kind: "mutation" }
|
|
7624
|
+
),
|
|
7553
7625
|
/** Enumerate every peer the daemon currently knows about. */
|
|
7554
7626
|
listPeers: method(z.void(), z.object({
|
|
7555
7627
|
peers: z.array(MeshPeerSchema).readonly()
|
|
@@ -7583,6 +7655,15 @@ const meshNetworkCapability = {
|
|
|
7583
7655
|
}),
|
|
7584
7656
|
{ kind: "mutation" }
|
|
7585
7657
|
)
|
|
7658
|
+
// Provider-specific runtime knobs (accept-routes / advertise-routes /
|
|
7659
|
+
// shields-up / ssh / exit-node, …) live on the addon's own
|
|
7660
|
+
// `getSettingsUISchema` (form-builder), NOT here. Different mesh
|
|
7661
|
+
// providers (Tailscale, Headscale, ZeroTier, Nebula) have very
|
|
7662
|
+
// different config surfaces — picking one shape and forcing all
|
|
7663
|
+
// implementations to honour it would either lose options or
|
|
7664
|
+
// misrepresent them. The Mesh page renders the addon's settings
|
|
7665
|
+
// schema as a "Settings" tab next to the generic Status / Peers
|
|
7666
|
+
// tabs driven by this cap.
|
|
7586
7667
|
}
|
|
7587
7668
|
};
|
|
7588
7669
|
const MeshEndpointSchema = z.object({
|
|
@@ -7610,7 +7691,18 @@ const MeshProviderInfoSchema = z.object({
|
|
|
7610
7691
|
/** Active endpoints (mesh IP + MagicDNS + optional public Funnel). */
|
|
7611
7692
|
endpoints: z.array(MeshEndpointSchema).readonly(),
|
|
7612
7693
|
/** Last error reported by the provider. */
|
|
7613
|
-
error: z.string().optional()
|
|
7694
|
+
error: z.string().optional(),
|
|
7695
|
+
// ── Generic identity fields mirrored from MeshStatus ─────────────
|
|
7696
|
+
/** Tenant / tailnet / network display name. Empty pre-join. */
|
|
7697
|
+
tenantName: z.string(),
|
|
7698
|
+
/** Mesh DNS suffix (e.g. tailXXXX.ts.net). Empty when not configured. */
|
|
7699
|
+
magicDnsSuffix: z.string(),
|
|
7700
|
+
/** Authenticated user / account login. Null for token-only providers. */
|
|
7701
|
+
userLogin: z.string().nullable(),
|
|
7702
|
+
/** Provider control-plane URL. */
|
|
7703
|
+
controlPlaneUrl: z.string(),
|
|
7704
|
+
/** Machine-key expiry (epoch ms). Null when keys don't rotate. */
|
|
7705
|
+
keyExpiry: z.number().nullable()
|
|
7614
7706
|
});
|
|
7615
7707
|
const meshOrchestratorCapability = {
|
|
7616
7708
|
name: "mesh-orchestrator",
|
|
@@ -7636,6 +7728,43 @@ const meshOrchestratorCapability = {
|
|
|
7636
7728
|
z.object({ addonId: z.string() }),
|
|
7637
7729
|
z.object({ success: z.literal(true) }),
|
|
7638
7730
|
{ kind: "mutation" }
|
|
7731
|
+
),
|
|
7732
|
+
/**
|
|
7733
|
+
* Browser-redirect login flow. Forwards to the named provider's
|
|
7734
|
+
* `mesh-network.startLogin` and returns the URL the daemon
|
|
7735
|
+
* prints. UI opens it in a new tab, then polls `listProviders`
|
|
7736
|
+
* for `joined: true`.
|
|
7737
|
+
*/
|
|
7738
|
+
startLoginProvider: method(
|
|
7739
|
+
z.object({
|
|
7740
|
+
addonId: z.string(),
|
|
7741
|
+
hostname: z.string().optional()
|
|
7742
|
+
}),
|
|
7743
|
+
z.object({ loginUrl: z.string() }),
|
|
7744
|
+
{ kind: "mutation" }
|
|
7745
|
+
),
|
|
7746
|
+
/**
|
|
7747
|
+
* Sign out of the provider's account entirely (`mesh-network.logout`).
|
|
7748
|
+
* Distinct from `leaveProvider` which only takes the host off-mesh;
|
|
7749
|
+
* `logoutProvider` wipes credentials so the next start requires a
|
|
7750
|
+
* fresh login.
|
|
7751
|
+
*/
|
|
7752
|
+
logoutProvider: method(
|
|
7753
|
+
z.object({ addonId: z.string() }),
|
|
7754
|
+
z.object({ loggedOut: z.literal(true) }),
|
|
7755
|
+
{ kind: "mutation" }
|
|
7756
|
+
),
|
|
7757
|
+
/**
|
|
7758
|
+
* Per-provider peer list. Forwards to `mesh-network.listPeers` on
|
|
7759
|
+
* the addressed provider. Separate from `listProviders` because
|
|
7760
|
+
* peer payloads can be large on a heavily-populated tailnet —
|
|
7761
|
+
* fetch only when the operator opens the Peers tab.
|
|
7762
|
+
*/
|
|
7763
|
+
listProviderPeers: method(
|
|
7764
|
+
z.object({ addonId: z.string() }),
|
|
7765
|
+
z.object({
|
|
7766
|
+
peers: z.array(MeshPeerSchema).readonly()
|
|
7767
|
+
})
|
|
7639
7768
|
)
|
|
7640
7769
|
}
|
|
7641
7770
|
};
|
|
@@ -7723,6 +7852,13 @@ const UserSummarySchema = z.object({
|
|
|
7723
7852
|
allowedProviders: z.union([z.array(z.string()), z.literal("*")]),
|
|
7724
7853
|
allowedDevices: z.record(z.string(), z.union([z.array(z.string()), z.literal("*")])),
|
|
7725
7854
|
scopes: z.array(TokenScopeSchema).default([]),
|
|
7855
|
+
/**
|
|
7856
|
+
* True iff this user has a CONFIRMED TOTP enrollment. Surfaced on
|
|
7857
|
+
* `listUsers` so the admin Users page can render the "Remove 2FA"
|
|
7858
|
+
* action conditionally without firing one `getTotpStatus` query per
|
|
7859
|
+
* row. Self-service enrollment lives on the user's profile page.
|
|
7860
|
+
*/
|
|
7861
|
+
totpEnabled: z.boolean().default(false),
|
|
7726
7862
|
createdAt: z.number(),
|
|
7727
7863
|
updatedAt: z.number()
|
|
7728
7864
|
});
|
|
@@ -8021,6 +8157,12 @@ const NodeAddonInputSchema = z.object({
|
|
|
8021
8157
|
nodeId: z.string(),
|
|
8022
8158
|
addonId: z.string()
|
|
8023
8159
|
});
|
|
8160
|
+
const NodeAddonEntrySchema = z.object({
|
|
8161
|
+
id: z.string(),
|
|
8162
|
+
status: z.string(),
|
|
8163
|
+
version: z.string().optional(),
|
|
8164
|
+
packageName: z.string().optional()
|
|
8165
|
+
});
|
|
8024
8166
|
const SuccessSchema = z.object({ success: z.boolean() });
|
|
8025
8167
|
const RestartProcessResultSchema = z.object({
|
|
8026
8168
|
success: z.boolean(),
|
|
@@ -8081,6 +8223,19 @@ const nodesCapability = {
|
|
|
8081
8223
|
z.record(z.string(), ClusterAddonStatusEntrySchema),
|
|
8082
8224
|
{ auth: "admin" }
|
|
8083
8225
|
),
|
|
8226
|
+
/**
|
|
8227
|
+
* Direct per-node addon listing — calls `$agent.status` on the target
|
|
8228
|
+
* node (or returns the hub registry for `nodeId === 'hub'`) and surfaces
|
|
8229
|
+
* the full addon roster including `version` + `packageName`. The
|
|
8230
|
+
* `topology` cap also includes addons but strips them down to
|
|
8231
|
+
* `{id, capabilities, status}` for the cluster diagram; this method
|
|
8232
|
+
* is the one the per-node "Addons" tab should call.
|
|
8233
|
+
*/
|
|
8234
|
+
getNodeAddons: method(
|
|
8235
|
+
z.object({ nodeId: z.string() }),
|
|
8236
|
+
z.array(NodeAddonEntrySchema).readonly(),
|
|
8237
|
+
{ auth: "admin" }
|
|
8238
|
+
),
|
|
8084
8239
|
setProcessLogLevel: method(
|
|
8085
8240
|
z.object({ nodeId: z.string(), level: z.string() }),
|
|
8086
8241
|
SuccessSchema,
|
|
@@ -8842,4 +8997,4 @@ export {
|
|
|
8842
8997
|
addonsCapability as y,
|
|
8843
8998
|
zonesCapability as z
|
|
8844
8999
|
};
|
|
8845
|
-
//# sourceMappingURL=index-
|
|
9000
|
+
//# sourceMappingURL=index-YnRVILXN.mjs.map
|