@mycadet/cli 0.12.7-dev.202610102207.24bf931 → 0.12.7-dev.202610111049.d2b52a8
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/README.md +2 -2
- package/knip.json +1 -1
- package/node_modules/@mycadet/assistant-api/events/{platform-disconnected.ts → cloud-disconnected.ts} +5 -5
- package/node_modules/@mycadet/assistant-api/events/host-bash.ts +1 -1
- package/node_modules/@mycadet/assistant-api/events/host-cu.ts +1 -1
- package/node_modules/@mycadet/assistant-api/events/host-file.ts +1 -1
- package/node_modules/@mycadet/assistant-api/events/notification-intent.ts +1 -1
- package/node_modules/@mycadet/assistant-api/events/{show-platform-login.ts → show-cloud-login.ts} +3 -5
- package/node_modules/@mycadet/assistant-api/index.ts +11 -11
- package/node_modules/@mycadet/assistant-api/node_modules/@mycadet/service-contracts/package.json +1 -1
- package/node_modules/@mycadet/{service-contracts/src/platform-credential.ts → assistant-api/node_modules/@mycadet/service-contracts/src/cloud-credential.ts} +9 -9
- package/node_modules/@mycadet/assistant-api/node_modules/@mycadet/service-contracts/src/handles.ts +3 -3
- package/node_modules/@mycadet/assistant-api/node_modules/@mycadet/service-contracts/src/index.ts +1 -1
- package/node_modules/@mycadet/assistant-api/node_modules/@mycadet/service-contracts/src/ingress.ts +1 -1
- package/node_modules/@mycadet/assistant-api/node_modules/@mycadet/service-contracts/src/remote-web-pairing.ts +1 -1
- package/node_modules/@mycadet/assistant-api/node_modules/@mycadet/service-contracts/src/rpc.ts +14 -14
- package/node_modules/@mycadet/assistant-api/node_modules/@mycadet/service-contracts/src/trust-rules.ts +5 -5
- package/node_modules/@mycadet/assistant-api/responses/home.ts +1 -1
- package/node_modules/@mycadet/assistant-api/surfaces.ts +4 -4
- package/node_modules/@mycadet/avatar-manifest/src/__tests__/notification-avatar.test.ts +1 -1
- package/node_modules/@mycadet/avatar-manifest/src/notification-avatar.ts +2 -2
- package/node_modules/@mycadet/environments/src/seeds.ts +6 -6
- package/node_modules/@mycadet/environments/src/shell.test.ts +1 -1
- package/node_modules/@mycadet/environments/src/types.ts +6 -6
- package/node_modules/@mycadet/local-mode/node_modules/@mycadet/avatar-manifest/src/__tests__/notification-avatar.test.ts +1 -1
- package/node_modules/@mycadet/local-mode/node_modules/@mycadet/avatar-manifest/src/notification-avatar.ts +2 -2
- package/node_modules/@mycadet/local-mode/node_modules/@mycadet/environments/src/seeds.ts +6 -6
- package/node_modules/@mycadet/local-mode/node_modules/@mycadet/environments/src/shell.test.ts +1 -1
- package/node_modules/@mycadet/local-mode/node_modules/@mycadet/environments/src/types.ts +6 -6
- package/node_modules/@mycadet/local-mode/node_modules/@mycadet/service-contracts/package.json +1 -1
- package/node_modules/@mycadet/{assistant-api/node_modules/@mycadet/service-contracts/src/platform-credential.ts → local-mode/node_modules/@mycadet/service-contracts/src/cloud-credential.ts} +9 -9
- package/node_modules/@mycadet/local-mode/node_modules/@mycadet/service-contracts/src/handles.ts +3 -3
- package/node_modules/@mycadet/local-mode/node_modules/@mycadet/service-contracts/src/index.ts +1 -1
- package/node_modules/@mycadet/local-mode/node_modules/@mycadet/service-contracts/src/ingress.ts +1 -1
- package/node_modules/@mycadet/local-mode/node_modules/@mycadet/service-contracts/src/remote-web-pairing.ts +1 -1
- package/node_modules/@mycadet/local-mode/node_modules/@mycadet/service-contracts/src/rpc.ts +14 -14
- package/node_modules/@mycadet/local-mode/node_modules/@mycadet/service-contracts/src/trust-rules.ts +5 -5
- package/node_modules/@mycadet/local-mode/src/__tests__/pair.test.ts +5 -5
- package/node_modules/@mycadet/local-mode/src/__tests__/retire.test.ts +1 -1
- package/node_modules/@mycadet/local-mode/src/config.ts +2 -2
- package/node_modules/@mycadet/local-mode/src/index.ts +1 -1
- package/node_modules/@mycadet/local-mode/src/lockfile-contract.test.ts +3 -3
- package/node_modules/@mycadet/local-mode/src/lockfile-contract.ts +10 -5
- package/node_modules/@mycadet/local-mode/src/lockfile.test.ts +15 -15
- package/node_modules/@mycadet/local-mode/src/lockfile.ts +9 -9
- package/node_modules/@mycadet/local-mode/src/pair.ts +2 -2
- package/node_modules/@mycadet/local-mode/src/retire.ts +3 -3
- package/node_modules/@mycadet/local-mode/src/teleport-backup-policy.ts +2 -2
- package/node_modules/@mycadet/local-mode/src/unpair.ts +2 -2
- package/node_modules/@mycadet/service-contracts/package.json +1 -1
- package/node_modules/@mycadet/{local-mode/node_modules/@mycadet/service-contracts/src/platform-credential.ts → service-contracts/src/cloud-credential.ts} +9 -9
- package/node_modules/@mycadet/service-contracts/src/handles.ts +3 -3
- package/node_modules/@mycadet/service-contracts/src/index.ts +1 -1
- package/node_modules/@mycadet/service-contracts/src/ingress.ts +1 -1
- package/node_modules/@mycadet/service-contracts/src/remote-web-pairing.ts +1 -1
- package/node_modules/@mycadet/service-contracts/src/rpc.ts +14 -14
- package/node_modules/@mycadet/service-contracts/src/trust-rules.ts +5 -5
- package/package.json +1 -1
- package/src/__tests__/assistant-api-key-resolution.test.ts +6 -6
- package/src/__tests__/{assistant-client-platform-auth.test.ts → assistant-client-cloud-auth.test.ts} +10 -10
- package/src/__tests__/assistant-client-refresh.test.ts +2 -2
- package/src/__tests__/backup.test.ts +46 -46
- package/src/__tests__/client-token.test.ts +1 -1
- package/src/__tests__/client-tui-refresh.test.ts +1 -1
- package/src/__tests__/client-web-config.test.ts +2 -2
- package/src/__tests__/{platform-client.test.ts → cloud-client.test.ts} +59 -59
- package/src/__tests__/{platform-releases.test.ts → cloud-releases.test.ts} +5 -5
- package/src/__tests__/debug.test.ts +14 -14
- package/src/__tests__/hatch-provider-secrets.test.ts +2 -2
- package/src/__tests__/nginx-ingress.test.ts +9 -9
- package/src/__tests__/orphan-detection.test.ts +1 -1
- package/src/__tests__/{ps-platform-status.test.ts → ps-cloud-status.test.ts} +26 -26
- package/src/__tests__/retire.test.ts +32 -32
- package/src/__tests__/statefulset.test.ts +8 -8
- package/src/__tests__/teleport-backup.test.ts +3 -3
- package/src/__tests__/teleport.test.ts +125 -125
- package/src/__tests__/upgrade-replay-env.test.ts +12 -12
- package/src/__tests__/workos-pkce.test.ts +2 -2
- package/src/commands/backup.ts +22 -22
- package/src/commands/client.ts +75 -75
- package/src/commands/debug.ts +20 -20
- package/src/commands/exec.ts +5 -5
- package/src/commands/hatch.ts +22 -22
- package/src/commands/login.ts +22 -22
- package/src/commands/logs.ts +1 -1
- package/src/commands/ps.ts +7 -7
- package/src/commands/restore.ts +13 -13
- package/src/commands/retire.ts +54 -47
- package/src/commands/rollback.ts +9 -9
- package/src/commands/setup.ts +2 -2
- package/src/commands/teleport.ts +93 -93
- package/src/commands/terminal.ts +12 -12
- package/src/commands/tunnel.ts +5 -5
- package/src/commands/unpair.ts +3 -3
- package/src/commands/upgrade.ts +18 -18
- package/src/lib/__tests__/{platform-client-signed-url.test.ts → cloud-client-signed-url.test.ts} +16 -16
- package/src/lib/__tests__/job-polling.test.ts +1 -1
- package/src/lib/__tests__/local-runtime-client.test.ts +4 -4
- package/src/lib/__tests__/runtime-url.test.ts +1 -1
- package/src/lib/assistant-api-key-resolution.ts +5 -5
- package/src/lib/assistant-client.ts +8 -8
- package/src/lib/assistant-config.ts +4 -3
- package/src/lib/{platform-client.ts → cloud-client.ts} +107 -98
- package/src/lib/cloud-login.ts +24 -24
- package/src/lib/{platform-releases.ts → cloud-releases.ts} +5 -5
- package/src/lib/cloud-values.ts +3 -0
- package/src/lib/config-utils.ts +1 -1
- package/src/lib/docker.ts +4 -4
- package/src/lib/environments/__tests__/paths.test.ts +2 -2
- package/src/lib/environments/__tests__/resolve.test.ts +26 -26
- package/src/lib/environments/resolve.ts +8 -8
- package/src/lib/hatch-local.ts +6 -6
- package/src/lib/health-check.ts +6 -6
- package/src/lib/ingress-config.ts +1 -1
- package/src/lib/job-polling.ts +1 -1
- package/src/lib/live-voice/connection.ts +12 -12
- package/src/lib/live-voice/tunnel.test.ts +11 -11
- package/src/lib/live-voice/tunnel.ts +15 -15
- package/src/lib/local-runtime-client.ts +20 -20
- package/src/lib/local.ts +3 -3
- package/src/lib/nginx-ingress.ts +4 -4
- package/src/lib/ngrok.ts +1 -1
- package/src/lib/process.ts +1 -1
- package/src/lib/provider-secrets.ts +3 -3
- package/src/lib/retire-apple-container.ts +1 -1
- package/src/lib/runtime-url.ts +8 -8
- package/src/lib/statefulset.ts +2 -2
- package/src/lib/sync-cloud-assistants.ts +18 -18
- package/src/lib/teleport-backup.ts +4 -4
- package/src/lib/terminal-client.ts +17 -17
- package/src/lib/terminal-session.ts +20 -20
- package/src/lib/upgrade-lifecycle.ts +3 -3
- package/src/lib/upgrade-preflight.ts +2 -2
- package/src/lib/workos-pkce.ts +5 -5
- package/src/lib/managed-cloud.ts +0 -3
package/README.md
CHANGED
|
@@ -83,7 +83,7 @@ To self-host on a cloud VM (AWS, GCP, or any other provider), SSH into the machi
|
|
|
83
83
|
|
|
84
84
|
### `terminal`
|
|
85
85
|
|
|
86
|
-
Open an interactive shell into a
|
|
86
|
+
Open an interactive shell into a cloud assistant container. Useful for debugging, inspecting state, or working alongside the assistant in a shared `tmux` session.
|
|
87
87
|
|
|
88
88
|
```bash
|
|
89
89
|
cadet terminal [name] [options]
|
|
@@ -91,7 +91,7 @@ cadet terminal attach <session> [name] [options]
|
|
|
91
91
|
cadet terminal list [name] [options]
|
|
92
92
|
```
|
|
93
93
|
|
|
94
|
-
Only available for
|
|
94
|
+
Only available for cloud assistants (those running in a Cadet Cloud container). Local assistants don't have a container to terminal into.
|
|
95
95
|
|
|
96
96
|
#### Subcommands
|
|
97
97
|
|
package/knip.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `platform_disconnected` SSE event.
|
|
3
3
|
*
|
|
4
|
-
* Emitted by the
|
|
5
|
-
* credentials are deleted, notifying connected clients that the
|
|
4
|
+
* Emitted by the cloud-disconnect route after stored platform
|
|
5
|
+
* credentials are deleted, notifying connected clients that the cloud
|
|
6
6
|
* connection is gone.
|
|
7
7
|
*
|
|
8
8
|
* Canonical wire-contract source. Daemon code imports the type
|
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
|
|
13
13
|
import { z } from "zod";
|
|
14
14
|
|
|
15
|
-
export const
|
|
15
|
+
export const CloudDisconnectedEventSchema = z.object({
|
|
16
16
|
type: z.literal("platform_disconnected"),
|
|
17
17
|
});
|
|
18
18
|
|
|
19
|
-
export type
|
|
20
|
-
typeof
|
|
19
|
+
export type CloudDisconnectedEvent = z.infer<
|
|
20
|
+
typeof CloudDisconnectedEventSchema
|
|
21
21
|
>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Host-bash proxy SSE events (`host_bash_request` / `host_bash_cancel`).
|
|
3
3
|
*
|
|
4
4
|
* Server → client instructions that proxy shell commands to the desktop
|
|
5
|
-
* client (host machine) when running as a
|
|
5
|
+
* client (host machine) when running as a cloud assistant. The client
|
|
6
6
|
* executes and POSTs the result back to `/v1/host-bash-result`;
|
|
7
7
|
* `host_bash_cancel` withdraws an in-flight request. `targetClientId`
|
|
8
8
|
* pins delivery to a single connected client.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Host computer-use proxy SSE events (`host_cu_request` / `host_cu_cancel`).
|
|
3
3
|
*
|
|
4
4
|
* Server → client instructions that proxy computer-use actions (click,
|
|
5
|
-
* type, screenshot, …) to the desktop client when running as a
|
|
5
|
+
* type, screenshot, …) to the desktop client when running as a cloud
|
|
6
6
|
* assistant. The client executes and POSTs the result back to
|
|
7
7
|
* `/v1/host-cu-result`; `host_cu_cancel` withdraws an in-flight request.
|
|
8
8
|
*
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Host-file proxy SSE events (`host_file_request` / `host_file_cancel`).
|
|
3
3
|
*
|
|
4
4
|
* Server → client instructions that proxy file operations (read / write /
|
|
5
|
-
* edit) to the desktop client when running as a
|
|
5
|
+
* edit) to the desktop client when running as a cloud assistant. The
|
|
6
6
|
* request is a discriminated union on `operation`; the client executes it
|
|
7
7
|
* and POSTs the result back to `/v1/host-file-result`. `host_file_cancel`
|
|
8
8
|
* withdraws an in-flight request.
|
|
@@ -32,7 +32,7 @@ export const NotificationIntentEventSchema = z.object({
|
|
|
32
32
|
targetGuardianPrincipalId: z.string().optional(),
|
|
33
33
|
silent: z.boolean().optional(),
|
|
34
34
|
/**
|
|
35
|
-
* True when the
|
|
35
|
+
* True when the cloud (APNs) channel accepted a remote push for
|
|
36
36
|
* this delivery, so native clients can avoid double-bannering.
|
|
37
37
|
*/
|
|
38
38
|
remotePushDispatched: z.boolean().optional(),
|
package/node_modules/@mycadet/assistant-api/events/{show-platform-login.ts → show-cloud-login.ts}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `show_platform_login` SSE event.
|
|
3
3
|
*
|
|
4
|
-
* Emitted by the
|
|
4
|
+
* Emitted by the cloud-connect route when no cloud credentials are
|
|
5
5
|
* stored yet, signalling connected clients to surface the cloud login UI.
|
|
6
6
|
*
|
|
7
7
|
* Canonical wire-contract source. Daemon code imports the type
|
|
@@ -11,10 +11,8 @@
|
|
|
11
11
|
|
|
12
12
|
import { z } from "zod";
|
|
13
13
|
|
|
14
|
-
export const
|
|
14
|
+
export const ShowCloudLoginEventSchema = z.object({
|
|
15
15
|
type: z.literal("show_platform_login"),
|
|
16
16
|
});
|
|
17
17
|
|
|
18
|
-
export type
|
|
19
|
-
typeof ShowPlatformLoginEventSchema
|
|
20
|
-
>;
|
|
18
|
+
export type ShowCloudLoginEvent = z.infer<typeof ShowCloudLoginEventSchema>;
|
|
@@ -30,6 +30,7 @@ import { BackgroundToolStartedEventSchema } from "./events/background-tool-start
|
|
|
30
30
|
import { BookmarkCreatedEventSchema } from "./events/bookmark-created.js";
|
|
31
31
|
import { BookmarkDeletedEventSchema } from "./events/bookmark-deleted.js";
|
|
32
32
|
import { ClientSettingsUpdateEventSchema } from "./events/client-settings-update.js";
|
|
33
|
+
import { CloudDisconnectedEventSchema } from "./events/cloud-disconnected.js";
|
|
33
34
|
import { CompactionCircuitClosedEventSchema } from "./events/compaction-circuit-closed.js";
|
|
34
35
|
import { CompactionCircuitOpenEventSchema } from "./events/compaction-circuit-open.js";
|
|
35
36
|
import { ConfigChangedEventSchema } from "./events/config-changed.js";
|
|
@@ -106,7 +107,6 @@ import { OAuthConnectResultEventSchema } from "./events/oauth-connect-result.js"
|
|
|
106
107
|
import { OpenConversationEventSchema } from "./events/open-conversation.js";
|
|
107
108
|
import { OpenPanelEventSchema } from "./events/open-panel.js";
|
|
108
109
|
import { OpenUrlEventSchema } from "./events/open-url.js";
|
|
109
|
-
import { PlatformDisconnectedEventSchema } from "./events/platform-disconnected.js";
|
|
110
110
|
import { QuestionRequestEventSchema } from "./events/question-request.js";
|
|
111
111
|
import {
|
|
112
112
|
RecordingPauseEventSchema,
|
|
@@ -121,7 +121,7 @@ import { SecretRequestEventSchema } from "./events/secret-request.js";
|
|
|
121
121
|
import { ServiceGroupUpdateCompleteEventSchema } from "./events/service-group-update-complete.js";
|
|
122
122
|
import { ServiceGroupUpdateProgressEventSchema } from "./events/service-group-update-progress.js";
|
|
123
123
|
import { ServiceGroupUpdateStartingEventSchema } from "./events/service-group-update-starting.js";
|
|
124
|
-
import {
|
|
124
|
+
import { ShowCloudLoginEventSchema } from "./events/show-cloud-login.js";
|
|
125
125
|
import { SkillStateChangedEventSchema } from "./events/skill-state-changed.js";
|
|
126
126
|
import { SoundsConfigUpdatedEventSchema } from "./events/sounds-config-updated.js";
|
|
127
127
|
import { SubagentEventEventSchema } from "./events/subagent-event.js";
|
|
@@ -276,6 +276,10 @@ export {
|
|
|
276
276
|
type ClientSettingsUpdateEvent,
|
|
277
277
|
ClientSettingsUpdateEventSchema,
|
|
278
278
|
} from "./events/client-settings-update.js";
|
|
279
|
+
export {
|
|
280
|
+
type CloudDisconnectedEvent,
|
|
281
|
+
CloudDisconnectedEventSchema,
|
|
282
|
+
} from "./events/cloud-disconnected.js";
|
|
279
283
|
export {
|
|
280
284
|
type CompactionCircuitClosedEvent,
|
|
281
285
|
CompactionCircuitClosedEventSchema,
|
|
@@ -541,10 +545,6 @@ export {
|
|
|
541
545
|
OpenPanelEventSchema,
|
|
542
546
|
} from "./events/open-panel.js";
|
|
543
547
|
export { type OpenUrlEvent, OpenUrlEventSchema } from "./events/open-url.js";
|
|
544
|
-
export {
|
|
545
|
-
type PlatformDisconnectedEvent,
|
|
546
|
-
PlatformDisconnectedEventSchema,
|
|
547
|
-
} from "./events/platform-disconnected.js";
|
|
548
548
|
export {
|
|
549
549
|
type AnsweredQuestion,
|
|
550
550
|
type AnsweredQuestionResponse,
|
|
@@ -604,9 +604,9 @@ export {
|
|
|
604
604
|
ServiceGroupUpdateStartingEventSchema,
|
|
605
605
|
} from "./events/service-group-update-starting.js";
|
|
606
606
|
export {
|
|
607
|
-
type
|
|
608
|
-
|
|
609
|
-
} from "./events/show-
|
|
607
|
+
type ShowCloudLoginEvent,
|
|
608
|
+
ShowCloudLoginEventSchema,
|
|
609
|
+
} from "./events/show-cloud-login.js";
|
|
610
610
|
export {
|
|
611
611
|
type SkillStateChangedEvent,
|
|
612
612
|
SkillStateChangedEventSchema,
|
|
@@ -1094,7 +1094,7 @@ export const AssistantEventSchema = z.discriminatedUnion("type", [
|
|
|
1094
1094
|
OpenConversationEventSchema,
|
|
1095
1095
|
OpenPanelEventSchema,
|
|
1096
1096
|
OpenUrlEventSchema,
|
|
1097
|
-
|
|
1097
|
+
CloudDisconnectedEventSchema,
|
|
1098
1098
|
QuestionRequestEventSchema,
|
|
1099
1099
|
RecordingPauseEventSchema,
|
|
1100
1100
|
RecordingResumeEventSchema,
|
|
@@ -1107,7 +1107,7 @@ export const AssistantEventSchema = z.discriminatedUnion("type", [
|
|
|
1107
1107
|
ServiceGroupUpdateCompleteEventSchema,
|
|
1108
1108
|
ServiceGroupUpdateProgressEventSchema,
|
|
1109
1109
|
ServiceGroupUpdateStartingEventSchema,
|
|
1110
|
-
|
|
1110
|
+
ShowCloudLoginEventSchema,
|
|
1111
1111
|
SkillStateChangedEventSchema,
|
|
1112
1112
|
SoundsConfigUpdatedEventSchema,
|
|
1113
1113
|
SubagentEventEventSchema,
|
package/node_modules/@mycadet/assistant-api/node_modules/@mycadet/service-contracts/package.json
CHANGED
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"./error": "./src/error.ts",
|
|
27
27
|
"./reactions": "./src/reactions.ts",
|
|
28
28
|
"./guardian-requests": "./src/guardian-requests.ts",
|
|
29
|
-
"./
|
|
29
|
+
"./cloud-credential": "./src/cloud-credential.ts",
|
|
30
30
|
"./plan-credit": "./src/plan-credit.ts",
|
|
31
31
|
"./integration-categories": "./src/integration-categories.ts",
|
|
32
32
|
"./mcp-oauth": "./src/mcp-oauth.ts"
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Wire contract for asking an assistant whether its stored
|
|
2
|
+
* Wire contract for asking an assistant whether its stored cloud-managed
|
|
3
3
|
* credential still authenticates.
|
|
4
4
|
*
|
|
5
5
|
* The daemon route is the authoritative serving side:
|
|
6
6
|
* - `POST /v1/platform/verify-credential`
|
|
7
|
-
* (`assistant/src/runtime/routes/
|
|
7
|
+
* (`assistant/src/runtime/routes/cloud-routes.ts`)
|
|
8
8
|
*
|
|
9
9
|
* The daemon's platform client produces the verdict, the route reports it,
|
|
10
10
|
* and the `cadet` CLI reads it before deciding whether a stored key can be
|
|
@@ -15,26 +15,26 @@
|
|
|
15
15
|
import { z } from "zod";
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* What the
|
|
18
|
+
* What the cloud said about the stored credential, right now.
|
|
19
19
|
*
|
|
20
|
-
* - `valid`: the
|
|
21
|
-
* - `rejected`: the
|
|
20
|
+
* - `valid`: the cloud accepted it.
|
|
21
|
+
* - `rejected`: the cloud refused it (unauthorized or forbidden); the
|
|
22
22
|
* credential needs replacing.
|
|
23
23
|
* - `unknown`: the check itself could not run (no credential stored, the
|
|
24
24
|
* platform unreachable, a server error). Not evidence either way.
|
|
25
25
|
*/
|
|
26
|
-
export const
|
|
26
|
+
export const CloudCredentialVerificationStatusSchema = z.enum([
|
|
27
27
|
"valid",
|
|
28
28
|
"rejected",
|
|
29
29
|
"unknown",
|
|
30
30
|
]);
|
|
31
|
-
export type
|
|
32
|
-
typeof
|
|
31
|
+
export type CloudCredentialVerificationStatus = z.infer<
|
|
32
|
+
typeof CloudCredentialVerificationStatusSchema
|
|
33
33
|
>;
|
|
34
34
|
|
|
35
35
|
/** `POST /v1/platform/verify-credential` response body. */
|
|
36
36
|
export const PlatformVerifyCredentialResponseSchema = z.object({
|
|
37
|
-
status:
|
|
37
|
+
status: CloudCredentialVerificationStatusSchema,
|
|
38
38
|
});
|
|
39
39
|
export type PlatformVerifyCredentialResponse = z.infer<
|
|
40
40
|
typeof PlatformVerifyCredentialResponseSchema
|
package/node_modules/@mycadet/assistant-api/node_modules/@mycadet/service-contracts/src/handles.ts
CHANGED
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
* Format: `local_oauth:<providerKey>/<connectionId>` where providerKey
|
|
16
16
|
* is the bare provider name (e.g. `google`).
|
|
17
17
|
*
|
|
18
|
-
* 3. **
|
|
18
|
+
* 3. **Cloud OAuth** — references an OAuth connection managed by the
|
|
19
19
|
* platform. Format: `platform_oauth:<connectionId>` where connectionId
|
|
20
|
-
* is the
|
|
20
|
+
* is the cloud-assigned connection identifier.
|
|
21
21
|
*/
|
|
22
22
|
|
|
23
23
|
import { z } from "zod";
|
|
@@ -96,7 +96,7 @@ export function localOAuthHandle(
|
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
/**
|
|
99
|
-
* Build a
|
|
99
|
+
* Build a cloud (platform) OAuth credential handle from a connection ID.
|
|
100
100
|
*/
|
|
101
101
|
export function platformOAuthHandle(connectionId: string): string {
|
|
102
102
|
return `${HandleType.PlatformOAuth}:${connectionId}`;
|
package/node_modules/@mycadet/assistant-api/node_modules/@mycadet/service-contracts/src/index.ts
CHANGED
|
@@ -31,7 +31,7 @@ export * from "./no-response.js";
|
|
|
31
31
|
export * from "./plan-credit.js";
|
|
32
32
|
export * from "./integration-categories.js";
|
|
33
33
|
export * from "./mcp-oauth.js";
|
|
34
|
-
export * from "./
|
|
34
|
+
export * from "./cloud-credential.js";
|
|
35
35
|
export * from "./remote-web-pairing.js";
|
|
36
36
|
export * from "./twilio-ingress.js";
|
|
37
37
|
export * from "./url-normalization.js";
|
package/node_modules/@mycadet/assistant-api/node_modules/@mycadet/service-contracts/src/ingress.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* `{env}-cloud.mycadet.ai` → `tunnel-{env}.mycadet.ai`). Returns null for
|
|
5
5
|
* hosts outside that convention (localhost, custom domains). Shared by the
|
|
6
6
|
* gateway speech relay and the web live-voice client so the two ends of the
|
|
7
|
-
*
|
|
7
|
+
* cloud-speech transport can't drift.
|
|
8
8
|
*/
|
|
9
9
|
export function tunnelHostForPlatformHost(host: string): string | null {
|
|
10
10
|
if (host === "cloud.mycadet.ai") {
|
|
@@ -152,7 +152,7 @@ export const DEFAULT_REMOTE_WEB_PAIRING_PLATFORM: RemoteWebPairingPlatform =
|
|
|
152
152
|
|
|
153
153
|
/**
|
|
154
154
|
* A requested platform coerced to a known value. The pairing-token route is
|
|
155
|
-
* publicly reachable and the
|
|
155
|
+
* publicly reachable and the cloud renders verbatim in the host's
|
|
156
156
|
* paired-devices list, so an unrecognized value never reaches the DB.
|
|
157
157
|
*/
|
|
158
158
|
export function resolveRemoteWebPairingPlatform(
|
package/node_modules/@mycadet/assistant-api/node_modules/@mycadet/service-contracts/src/rpc.ts
CHANGED
|
@@ -34,7 +34,7 @@ import { RpcErrorSchema } from "./error.js";
|
|
|
34
34
|
|
|
35
35
|
export const CesRpcMethod = {
|
|
36
36
|
/** Push an updated assistant credential to CES after post-hatch provisioning. */
|
|
37
|
-
|
|
37
|
+
UpdateCloudCredential: "update_managed_credential",
|
|
38
38
|
/** Retrieve a single credential by account name. */
|
|
39
39
|
GetCredential: "get_credential",
|
|
40
40
|
/** Store or update a credential by account name. */
|
|
@@ -63,7 +63,7 @@ export type CesRpcMethod = (typeof CesRpcMethod)[keyof typeof CesRpcMethod];
|
|
|
63
63
|
// update_managed_credential
|
|
64
64
|
// ---------------------------------------------------------------------------
|
|
65
65
|
|
|
66
|
-
export const
|
|
66
|
+
export const UpdateCloudCredentialSchema = z.object({
|
|
67
67
|
/** The assistant API key to push to CES for platform credential materialization. */
|
|
68
68
|
assistantApiKey: z.string(), // nosemgrep: not-a-secret
|
|
69
69
|
/**
|
|
@@ -72,16 +72,16 @@ export const UpdateManagedCredentialSchema = z.object({
|
|
|
72
72
|
*/
|
|
73
73
|
assistantId: z.string().optional(),
|
|
74
74
|
});
|
|
75
|
-
export type
|
|
76
|
-
typeof
|
|
75
|
+
export type UpdateCloudCredential = z.infer<
|
|
76
|
+
typeof UpdateCloudCredentialSchema
|
|
77
77
|
>;
|
|
78
78
|
|
|
79
|
-
export const
|
|
80
|
-
/** Whether the
|
|
79
|
+
export const UpdateCloudCredentialResponseSchema = z.object({
|
|
80
|
+
/** Whether the cloud credential was successfully updated. */
|
|
81
81
|
updated: z.boolean(),
|
|
82
82
|
});
|
|
83
|
-
export type
|
|
84
|
-
typeof
|
|
83
|
+
export type UpdateCloudCredentialResponse = z.infer<
|
|
84
|
+
typeof UpdateCloudCredentialResponseSchema
|
|
85
85
|
>;
|
|
86
86
|
|
|
87
87
|
// ---------------------------------------------------------------------------
|
|
@@ -311,9 +311,9 @@ export type BulkSetCredentialRecordsResponse = z.infer<
|
|
|
311
311
|
* schemas. Useful for building type-safe RPC dispatch layers.
|
|
312
312
|
*/
|
|
313
313
|
export interface CesRpcContract {
|
|
314
|
-
[CesRpcMethod.
|
|
315
|
-
request:
|
|
316
|
-
response:
|
|
314
|
+
[CesRpcMethod.UpdateCloudCredential]: {
|
|
315
|
+
request: UpdateCloudCredential;
|
|
316
|
+
response: UpdateCloudCredentialResponse;
|
|
317
317
|
};
|
|
318
318
|
[CesRpcMethod.GetCredential]: {
|
|
319
319
|
request: GetCredential;
|
|
@@ -361,9 +361,9 @@ export interface CesRpcContract {
|
|
|
361
361
|
* Schema lookup map for runtime validation of RPC payloads.
|
|
362
362
|
*/
|
|
363
363
|
export const CesRpcSchemas = {
|
|
364
|
-
[CesRpcMethod.
|
|
365
|
-
request:
|
|
366
|
-
response:
|
|
364
|
+
[CesRpcMethod.UpdateCloudCredential]: {
|
|
365
|
+
request: UpdateCloudCredentialSchema,
|
|
366
|
+
response: UpdateCloudCredentialResponseSchema,
|
|
367
367
|
},
|
|
368
368
|
[CesRpcMethod.GetCredential]: {
|
|
369
369
|
request: GetCredentialSchema,
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* - **URL**: tools whose candidates include a URL (`web_fetch`,
|
|
16
16
|
* `network_request`).
|
|
17
17
|
* - **Managed skill**: tools that manage first-party skill packages
|
|
18
|
-
* (`
|
|
18
|
+
* (`scaffold_cloud_skill`, `delete_cloud_skill`).
|
|
19
19
|
* - **Skill load**: the `skill_load` tool, which uses a distinct candidate
|
|
20
20
|
* namespace (`skill_load:selector` or `skill_load_dynamic:selector`).
|
|
21
21
|
* - **Generic**: everything else (computer-use tools, UI surface tools,
|
|
@@ -58,8 +58,8 @@ export const URL_TOOLS = ["web_fetch", "network_request"] as const;
|
|
|
58
58
|
* Tools that manage first-party skill packages (scaffold/delete).
|
|
59
59
|
*/
|
|
60
60
|
export const MANAGED_SKILL_TOOLS = [
|
|
61
|
-
"
|
|
62
|
-
"
|
|
61
|
+
"scaffold_cloud_skill",
|
|
62
|
+
"delete_cloud_skill",
|
|
63
63
|
] as const;
|
|
64
64
|
|
|
65
65
|
/**
|
|
@@ -89,8 +89,8 @@ export function isUrlRule(rule: { tool: string }): boolean {
|
|
|
89
89
|
return URL_TOOLS_SET.has(rule.tool);
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
/** Returns true when the rule's tool belongs to the
|
|
93
|
-
export function
|
|
92
|
+
/** Returns true when the rule's tool belongs to the cloud-skill-tool family. */
|
|
93
|
+
export function isCloudSkillRule(rule: { tool: string }): boolean {
|
|
94
94
|
return MANAGED_SKILL_TOOLS_SET.has(rule.tool);
|
|
95
95
|
}
|
|
96
96
|
|
|
@@ -168,7 +168,7 @@ export type FeedItemGuardianRequest = z.infer<
|
|
|
168
168
|
>;
|
|
169
169
|
|
|
170
170
|
/**
|
|
171
|
-
* One background rewrite of a
|
|
171
|
+
* One background rewrite of a cloud skill, as a receipt item lists it.
|
|
172
172
|
*
|
|
173
173
|
* A receipt (`detailPanel.kind === "updatesList"`) collapses every skill
|
|
174
174
|
* update a background pass made within one burst into a single feed item, and
|
|
@@ -277,7 +277,7 @@ const RequestedScopesSchema = z.preprocess(
|
|
|
277
277
|
);
|
|
278
278
|
|
|
279
279
|
export const OAuthConnectSurfaceDataSchema = z.object({
|
|
280
|
-
/** OAuth provider key from the
|
|
280
|
+
/** OAuth provider key from the cloud provider catalog, e.g. "google". */
|
|
281
281
|
providerKey: z
|
|
282
282
|
.preprocess(
|
|
283
283
|
(value) => (typeof value === "string" ? value.trim() : value),
|
|
@@ -285,9 +285,9 @@ export const OAuthConnectSurfaceDataSchema = z.object({
|
|
|
285
285
|
)
|
|
286
286
|
.catch(""),
|
|
287
287
|
/**
|
|
288
|
-
* Optional OAuth scopes to request for the
|
|
289
|
-
* replacement set: when present, the
|
|
290
|
-
* instead of its defaults (it does not merge). Omit to use the
|
|
288
|
+
* Optional OAuth scopes to request for the cloud connection. A full
|
|
289
|
+
* replacement set: when present, the cloud uses exactly these scopes
|
|
290
|
+
* instead of its defaults (it does not merge). Omit to use the cloud's
|
|
291
291
|
* default scopes for the provider.
|
|
292
292
|
*/
|
|
293
293
|
requestedScopes: RequestedScopesSchema,
|
|
@@ -246,7 +246,7 @@ describe("notificationAvatarGeometry", () => {
|
|
|
246
246
|
});
|
|
247
247
|
|
|
248
248
|
describe("the transport contract", () => {
|
|
249
|
-
test("caps a notification PNG at 128 KB for the
|
|
249
|
+
test("caps a notification PNG at 128 KB for the cloud sync", () => {
|
|
250
250
|
expect(NOTIFICATION_AVATAR_MAX_BYTES).toBe(128 * 1024);
|
|
251
251
|
});
|
|
252
252
|
|
|
@@ -30,7 +30,7 @@ export const NOTIFICATION_AVATAR_FALLBACK_DISC_HEX = "#ECEFEA";
|
|
|
30
30
|
const ACCENT_MIX = 0.14;
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
|
-
* Largest notification PNG the
|
|
33
|
+
* Largest notification PNG the cloud sync ships, in bytes. It bounds the
|
|
34
34
|
* `notification_avatar_base64` field of the PATCH that uploads the disc, which
|
|
35
35
|
* is what APNs and FCM later hand their clients a URL and a hash for. A
|
|
36
36
|
* photographic avatar is quantised (or dropped) to fit.
|
|
@@ -118,7 +118,7 @@ function px(value: number): string {
|
|
|
118
118
|
* edge is the hard boundary no matter how far a cover-crop overflows.
|
|
119
119
|
*
|
|
120
120
|
* The `<image href="data:...">` shape is the one `downscaleRaster()` in
|
|
121
|
-
* `assistant/src/
|
|
121
|
+
* `assistant/src/cloud/sync-avatar.ts` already feeds resvg, so the daemon's
|
|
122
122
|
* rasterizer is known to render it.
|
|
123
123
|
*/
|
|
124
124
|
export function notificationAvatarSvg({
|
|
@@ -64,12 +64,12 @@ export function cloudAssistantHubUrl(envName: string | undefined): string {
|
|
|
64
64
|
export const SEEDS: Record<string, EnvironmentDefinition> = {
|
|
65
65
|
production: {
|
|
66
66
|
name: "production",
|
|
67
|
-
|
|
67
|
+
cloudUrl: "https://cloud.mycadet.ai",
|
|
68
68
|
webUrl: "https://mycadet.ai",
|
|
69
69
|
},
|
|
70
70
|
staging: {
|
|
71
71
|
name: "staging",
|
|
72
|
-
|
|
72
|
+
cloudUrl: "https://staging-cloud.mycadet.ai",
|
|
73
73
|
webUrl: "https://staging.mycadet.ai",
|
|
74
74
|
portsOverride: portBlock(17000),
|
|
75
75
|
},
|
|
@@ -77,21 +77,21 @@ export const SEEDS: Record<string, EnvironmentDefinition> = {
|
|
|
77
77
|
name: "test",
|
|
78
78
|
// Non-functional URL — used only by unit tests for URL resolution, never
|
|
79
79
|
// hit in production.
|
|
80
|
-
|
|
80
|
+
cloudUrl: "https://test-cloud.mycadet.ai",
|
|
81
81
|
webUrl: "https://dev.mycadet.ai",
|
|
82
82
|
portsOverride: portBlock(19000),
|
|
83
83
|
},
|
|
84
84
|
dev: {
|
|
85
85
|
name: "dev",
|
|
86
|
-
|
|
86
|
+
cloudUrl: "https://dev-cloud.mycadet.ai",
|
|
87
87
|
webUrl: "https://dev.mycadet.ai",
|
|
88
88
|
portsOverride: portBlock(18000),
|
|
89
89
|
},
|
|
90
90
|
local: {
|
|
91
91
|
name: "local",
|
|
92
|
-
|
|
92
|
+
cloudUrl: "http://localhost:8000",
|
|
93
93
|
webUrl: "http://localhost:3000",
|
|
94
|
-
//
|
|
94
|
+
// assistantCloudUrl: "http://host.docker.internal:8000",
|
|
95
95
|
// ^ uncomment this once dockerized hatch path is live.
|
|
96
96
|
// The assistant runs in a different network namespace than the host.
|
|
97
97
|
portsOverride: portBlock(20000),
|
|
@@ -72,7 +72,7 @@ describe("buildShellSpawnFlags", () => {
|
|
|
72
72
|
});
|
|
73
73
|
|
|
74
74
|
describe("path list handling", () => {
|
|
75
|
-
test("uses the
|
|
75
|
+
test("uses the cloud delimiter", () => {
|
|
76
76
|
expect(pathListDelimiter("win32")).toBe(";");
|
|
77
77
|
expect(pathListDelimiter("linux")).toBe(":");
|
|
78
78
|
});
|
|
@@ -21,14 +21,14 @@ export interface PortMap {
|
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* A resolved environment definition. Required fields are `name` and
|
|
24
|
-
* `
|
|
24
|
+
* `cloudUrl`. All other fields are optional and declared upfront — new
|
|
25
25
|
* fields are additive, never breaking. `name` is intentionally typed as
|
|
26
26
|
* `string` (not `keyof SEEDS`) so custom environments can be represented by
|
|
27
27
|
* future layers (user config file, ad-hoc env vars, etc.).
|
|
28
28
|
*/
|
|
29
29
|
export interface EnvironmentDefinition {
|
|
30
30
|
name: string;
|
|
31
|
-
|
|
31
|
+
cloudUrl: string;
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* The web app (Next.js) base URL for browser-facing pages like
|
|
@@ -41,13 +41,13 @@ export interface EnvironmentDefinition {
|
|
|
41
41
|
webUrl: string;
|
|
42
42
|
|
|
43
43
|
/**
|
|
44
|
-
* Override for the
|
|
45
|
-
* differs from `
|
|
44
|
+
* Override for the cloud URL the assistant process itself uses. Only
|
|
45
|
+
* differs from `cloudUrl` when the assistant runs in a different network
|
|
46
46
|
* namespace than the host (e.g. Docker on macOS, where the host's localhost
|
|
47
|
-
* is reached via `host.docker.internal`). Falls back to `
|
|
47
|
+
* is reached via `host.docker.internal`). Falls back to `cloudUrl` when
|
|
48
48
|
* unset.
|
|
49
49
|
*/
|
|
50
|
-
|
|
50
|
+
assistantCloudUrl?: string;
|
|
51
51
|
|
|
52
52
|
/** Human-readable label for UI surfaces. */
|
|
53
53
|
displayName?: string;
|
|
@@ -246,7 +246,7 @@ describe("notificationAvatarGeometry", () => {
|
|
|
246
246
|
});
|
|
247
247
|
|
|
248
248
|
describe("the transport contract", () => {
|
|
249
|
-
test("caps a notification PNG at 128 KB for the
|
|
249
|
+
test("caps a notification PNG at 128 KB for the cloud sync", () => {
|
|
250
250
|
expect(NOTIFICATION_AVATAR_MAX_BYTES).toBe(128 * 1024);
|
|
251
251
|
});
|
|
252
252
|
|
|
@@ -30,7 +30,7 @@ export const NOTIFICATION_AVATAR_FALLBACK_DISC_HEX = "#ECEFEA";
|
|
|
30
30
|
const ACCENT_MIX = 0.14;
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
|
-
* Largest notification PNG the
|
|
33
|
+
* Largest notification PNG the cloud sync ships, in bytes. It bounds the
|
|
34
34
|
* `notification_avatar_base64` field of the PATCH that uploads the disc, which
|
|
35
35
|
* is what APNs and FCM later hand their clients a URL and a hash for. A
|
|
36
36
|
* photographic avatar is quantised (or dropped) to fit.
|
|
@@ -118,7 +118,7 @@ function px(value: number): string {
|
|
|
118
118
|
* edge is the hard boundary no matter how far a cover-crop overflows.
|
|
119
119
|
*
|
|
120
120
|
* The `<image href="data:...">` shape is the one `downscaleRaster()` in
|
|
121
|
-
* `assistant/src/
|
|
121
|
+
* `assistant/src/cloud/sync-avatar.ts` already feeds resvg, so the daemon's
|
|
122
122
|
* rasterizer is known to render it.
|
|
123
123
|
*/
|
|
124
124
|
export function notificationAvatarSvg({
|
|
@@ -64,12 +64,12 @@ export function cloudAssistantHubUrl(envName: string | undefined): string {
|
|
|
64
64
|
export const SEEDS: Record<string, EnvironmentDefinition> = {
|
|
65
65
|
production: {
|
|
66
66
|
name: "production",
|
|
67
|
-
|
|
67
|
+
cloudUrl: "https://cloud.mycadet.ai",
|
|
68
68
|
webUrl: "https://mycadet.ai",
|
|
69
69
|
},
|
|
70
70
|
staging: {
|
|
71
71
|
name: "staging",
|
|
72
|
-
|
|
72
|
+
cloudUrl: "https://staging-cloud.mycadet.ai",
|
|
73
73
|
webUrl: "https://staging.mycadet.ai",
|
|
74
74
|
portsOverride: portBlock(17000),
|
|
75
75
|
},
|
|
@@ -77,21 +77,21 @@ export const SEEDS: Record<string, EnvironmentDefinition> = {
|
|
|
77
77
|
name: "test",
|
|
78
78
|
// Non-functional URL — used only by unit tests for URL resolution, never
|
|
79
79
|
// hit in production.
|
|
80
|
-
|
|
80
|
+
cloudUrl: "https://test-cloud.mycadet.ai",
|
|
81
81
|
webUrl: "https://dev.mycadet.ai",
|
|
82
82
|
portsOverride: portBlock(19000),
|
|
83
83
|
},
|
|
84
84
|
dev: {
|
|
85
85
|
name: "dev",
|
|
86
|
-
|
|
86
|
+
cloudUrl: "https://dev-cloud.mycadet.ai",
|
|
87
87
|
webUrl: "https://dev.mycadet.ai",
|
|
88
88
|
portsOverride: portBlock(18000),
|
|
89
89
|
},
|
|
90
90
|
local: {
|
|
91
91
|
name: "local",
|
|
92
|
-
|
|
92
|
+
cloudUrl: "http://localhost:8000",
|
|
93
93
|
webUrl: "http://localhost:3000",
|
|
94
|
-
//
|
|
94
|
+
// assistantCloudUrl: "http://host.docker.internal:8000",
|
|
95
95
|
// ^ uncomment this once dockerized hatch path is live.
|
|
96
96
|
// The assistant runs in a different network namespace than the host.
|
|
97
97
|
portsOverride: portBlock(20000),
|
package/node_modules/@mycadet/local-mode/node_modules/@mycadet/environments/src/shell.test.ts
CHANGED
|
@@ -72,7 +72,7 @@ describe("buildShellSpawnFlags", () => {
|
|
|
72
72
|
});
|
|
73
73
|
|
|
74
74
|
describe("path list handling", () => {
|
|
75
|
-
test("uses the
|
|
75
|
+
test("uses the cloud delimiter", () => {
|
|
76
76
|
expect(pathListDelimiter("win32")).toBe(";");
|
|
77
77
|
expect(pathListDelimiter("linux")).toBe(":");
|
|
78
78
|
});
|