@usenaive-sdk/cli 0.12.5 โ 0.13.1
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 +69 -6
- package/dist/client.d.ts +48 -0
- package/dist/client.js +199 -27
- package/dist/client.js.map +1 -1
- package/dist/commands/aeo.js +58 -23
- package/dist/commands/aeo.js.map +1 -1
- package/dist/commands/app-data.js +29 -11
- package/dist/commands/app-data.js.map +1 -1
- package/dist/commands/approvals.js +142 -9
- package/dist/commands/approvals.js.map +1 -1
- package/dist/commands/apps.d.ts +7 -0
- package/dist/commands/apps.js +255 -18
- package/dist/commands/apps.js.map +1 -1
- package/dist/commands/audio.d.ts +9 -0
- package/dist/commands/audio.js +391 -0
- package/dist/commands/audio.js.map +1 -0
- package/dist/commands/auth.d.ts +1 -0
- package/dist/commands/auth.js +47 -19
- package/dist/commands/auth.js.map +1 -1
- package/dist/commands/billing.js +9 -9
- package/dist/commands/billing.js.map +1 -1
- package/dist/commands/brain.js +813 -54
- package/dist/commands/brain.js.map +1 -1
- package/dist/commands/browser.js +8 -8
- package/dist/commands/browser.js.map +1 -1
- package/dist/commands/business.js +117 -16
- package/dist/commands/business.js.map +1 -1
- package/dist/commands/clone.js +8 -4
- package/dist/commands/clone.js.map +1 -1
- package/dist/commands/companies.d.ts +8 -0
- package/dist/commands/companies.js +137 -47
- package/dist/commands/companies.js.map +1 -1
- package/dist/commands/company-data.d.ts +2 -0
- package/dist/commands/company-data.js +168 -0
- package/dist/commands/company-data.js.map +1 -0
- package/dist/commands/compute.js +295 -18
- package/dist/commands/compute.js.map +1 -1
- package/dist/commands/connections.d.ts +6 -0
- package/dist/commands/connections.js +42 -2
- package/dist/commands/connections.js.map +1 -1
- package/dist/commands/domains.js +63 -19
- package/dist/commands/domains.js.map +1 -1
- package/dist/commands/ecommerce.js +19 -9
- package/dist/commands/ecommerce.js.map +1 -1
- package/dist/commands/email.js +56 -9
- package/dist/commands/email.js.map +1 -1
- package/dist/commands/formation.js +5 -5
- package/dist/commands/formation.js.map +1 -1
- package/dist/commands/identity.js +4 -3
- package/dist/commands/identity.js.map +1 -1
- package/dist/commands/images.js +86 -12
- package/dist/commands/images.js.map +1 -1
- package/dist/commands/init.d.ts +3 -0
- package/dist/commands/init.js +44 -36
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/jobs.js +1 -0
- package/dist/commands/jobs.js.map +1 -1
- package/dist/commands/legacy-auth.d.ts +27 -0
- package/dist/commands/legacy-auth.js +64 -0
- package/dist/commands/legacy-auth.js.map +1 -0
- package/dist/commands/llm.js +14 -1
- package/dist/commands/llm.js.map +1 -1
- package/dist/commands/login.js +2 -0
- package/dist/commands/login.js.map +1 -1
- package/dist/commands/logout.d.ts +7 -0
- package/dist/commands/logout.js +55 -0
- package/dist/commands/logout.js.map +1 -0
- package/dist/commands/media.js +3 -3
- package/dist/commands/media.js.map +1 -1
- package/dist/commands/mobile.d.ts +2 -0
- package/dist/commands/mobile.js +42 -1
- package/dist/commands/mobile.js.map +1 -1
- package/dist/commands/payments.js +1 -1
- package/dist/commands/people.d.ts +2 -0
- package/dist/commands/people.js +197 -0
- package/dist/commands/people.js.map +1 -0
- package/dist/commands/phone.js +40 -83
- package/dist/commands/phone.js.map +1 -1
- package/dist/commands/projects.d.ts +13 -0
- package/dist/commands/projects.js +220 -0
- package/dist/commands/projects.js.map +1 -0
- package/dist/commands/register.js +13 -5
- package/dist/commands/register.js.map +1 -1
- package/dist/commands/sandbox.d.ts +2 -0
- package/dist/commands/sandbox.js +558 -0
- package/dist/commands/sandbox.js.map +1 -0
- package/dist/commands/search.js +27 -13
- package/dist/commands/search.js.map +1 -1
- package/dist/commands/seo.js +16 -8
- package/dist/commands/seo.js.map +1 -1
- package/dist/commands/sessions.d.ts +6 -0
- package/dist/commands/sessions.js +109 -0
- package/dist/commands/sessions.js.map +1 -0
- package/dist/commands/social-data.d.ts +2 -0
- package/dist/commands/social-data.js +245 -0
- package/dist/commands/social-data.js.map +1 -0
- package/dist/commands/social.js +9 -7
- package/dist/commands/social.js.map +1 -1
- package/dist/commands/tasks.js +9 -0
- package/dist/commands/tasks.js.map +1 -1
- package/dist/commands/teams.d.ts +69 -0
- package/dist/commands/teams.js +503 -0
- package/dist/commands/teams.js.map +1 -0
- package/dist/commands/up.d.ts +150 -0
- package/dist/commands/up.js +465 -15
- package/dist/commands/up.js.map +1 -1
- package/dist/commands/usage.js +15 -4
- package/dist/commands/usage.js.map +1 -1
- package/dist/commands/use.d.ts +9 -0
- package/dist/commands/use.js +76 -11
- package/dist/commands/use.js.map +1 -1
- package/dist/commands/users.d.ts +8 -0
- package/dist/commands/users.js +28 -9
- package/dist/commands/users.js.map +1 -1
- package/dist/commands/vault.js +31 -1
- package/dist/commands/vault.js.map +1 -1
- package/dist/commands/verification.js +1 -1
- package/dist/commands/verification.js.map +1 -1
- package/dist/commands/video.js +118 -19
- package/dist/commands/video.js.map +1 -1
- package/dist/commands/wallet.js +3 -3
- package/dist/commands/wallet.js.map +1 -1
- package/dist/commands/whoami.js +17 -1
- package/dist/commands/whoami.js.map +1 -1
- package/dist/config.d.ts +16 -1
- package/dist/config.js +15 -1
- package/dist/config.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +250 -24
- package/dist/index.js.map +1 -1
- package/dist/lib/brain-select.d.ts +193 -0
- package/dist/lib/brain-select.js +403 -0
- package/dist/lib/brain-select.js.map +1 -0
- package/dist/lib/cli-validation.d.ts +12 -0
- package/dist/lib/cli-validation.js +46 -0
- package/dist/lib/cli-validation.js.map +1 -0
- package/dist/lib/deprecation.d.ts +158 -0
- package/dist/lib/deprecation.js +140 -0
- package/dist/lib/deprecation.js.map +1 -0
- package/dist/lib/duration.d.ts +8 -0
- package/dist/lib/duration.js +11 -0
- package/dist/lib/duration.js.map +1 -0
- package/dist/lib/http-response.d.ts +11 -0
- package/dist/lib/http-response.js +96 -0
- package/dist/lib/http-response.js.map +1 -0
- package/dist/lib/pricing.d.ts +132 -0
- package/dist/lib/pricing.js +148 -0
- package/dist/lib/pricing.js.map +1 -0
- package/dist/lib/stream-frames.d.ts +114 -0
- package/dist/lib/stream-frames.js +169 -0
- package/dist/lib/stream-frames.js.map +1 -0
- package/dist/lib/teams-catalog.d.ts +141 -0
- package/dist/lib/teams-catalog.js +765 -0
- package/dist/lib/teams-catalog.js.map +1 -0
- package/dist/lib/unknown-command.d.ts +55 -1
- package/dist/lib/unknown-command.js +113 -0
- package/dist/lib/unknown-command.js.map +1 -1
- package/dist/output.d.ts +127 -5
- package/dist/output.js +189 -12
- package/dist/output.js.map +1 -1
- package/package.json +3 -3
- package/dist/commands/link.d.ts +0 -3
- package/dist/commands/link.js +0 -91
- package/dist/commands/link.js.map +0 -1
package/dist/commands/up.d.ts
CHANGED
|
@@ -1,3 +1,153 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
|
+
import { type NextStep } from "../output.js";
|
|
3
|
+
/** What the API reports about the brains `company.brains` declared. */
|
|
4
|
+
interface BrainsResult {
|
|
5
|
+
declared_in?: string | null;
|
|
6
|
+
created?: Array<{
|
|
7
|
+
name: string;
|
|
8
|
+
}>;
|
|
9
|
+
converged?: Array<{
|
|
10
|
+
name: string;
|
|
11
|
+
}>;
|
|
12
|
+
default?: {
|
|
13
|
+
name?: string | null;
|
|
14
|
+
changed?: boolean;
|
|
15
|
+
};
|
|
16
|
+
retained_undeclared?: string[];
|
|
17
|
+
/**
|
|
18
|
+
* Declared brain policy with no column to land in, per brain.
|
|
19
|
+
* `brain_knowledge_bases` has columns for name, is_default, scope, status and
|
|
20
|
+
* provider ids and nothing else, so `retention`, `partitions`, `writes`,
|
|
21
|
+
* `recall`, `lanes`, `visibility` and `bounds` are accepted and not stored.
|
|
22
|
+
*/
|
|
23
|
+
unpersisted?: Record<string, string[]>;
|
|
24
|
+
/** The server's own prose for the same, plus the retained-undeclared note. */
|
|
25
|
+
notes?: string[];
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* The brain half of the report, or undefined when the config declared none.
|
|
29
|
+
*
|
|
30
|
+
* Exported for the same reason it exists: `naive up` printed `applied: true` and
|
|
31
|
+
* said NOTHING about brains, so a config that declared two of them looked
|
|
32
|
+
* identical to a config that declared none. `--plan` showed them (it prints the
|
|
33
|
+
* whole plan); apply did not. A provisioned thing that is not reported is the
|
|
34
|
+
* same silence as an unprovisioned one, one level up.
|
|
35
|
+
*
|
|
36
|
+
* ๐ด AND `unpersisted` IS PART OF THE REPORT, NOT AN EXTRA. The apply path
|
|
37
|
+
* computed the accept-and-drop list and this projection threw it away, so
|
|
38
|
+
* `naive up --plan` told the user which declared brain keys have no column and
|
|
39
|
+
* plain `naive up` โ the command people actually run โ did not. That is the same
|
|
40
|
+
* defect one level down: `packages/api/src/services/deployment-brains.ts`'s own
|
|
41
|
+
* header calls accept-and-drop "the exact defect this file exists to remove", and
|
|
42
|
+
* a report only the dry run prints is a report most operators never see.
|
|
43
|
+
*/
|
|
44
|
+
export declare function brainReport(brains: BrainsResult | undefined): {
|
|
45
|
+
declared_in: string | null;
|
|
46
|
+
created: string[];
|
|
47
|
+
converged: string[];
|
|
48
|
+
default: string | null;
|
|
49
|
+
retained: string[];
|
|
50
|
+
unpersisted?: Record<string, string[]>;
|
|
51
|
+
notes?: string[];
|
|
52
|
+
} | undefined;
|
|
53
|
+
/** What the plan reports per declared team, whichever runtime it asked for. */
|
|
54
|
+
interface TeamPlanEntry {
|
|
55
|
+
name: string;
|
|
56
|
+
runtime: string;
|
|
57
|
+
roles?: string[];
|
|
58
|
+
lead_role?: string;
|
|
59
|
+
/** Role โ runtime, present only for a MIXED team. See `role_runtimes` on the API. */
|
|
60
|
+
role_runtimes?: Record<string, string>;
|
|
61
|
+
placement?: {
|
|
62
|
+
status: string;
|
|
63
|
+
code?: string;
|
|
64
|
+
message?: string;
|
|
65
|
+
};
|
|
66
|
+
/** Keys this team declared that NOTHING on the control plane reads. */
|
|
67
|
+
unconsumed?: string[];
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* The per-team accept-and-drop warning, one line per team that declared any.
|
|
71
|
+
*
|
|
72
|
+
* The data has been on the wire the whole time (`plan.teams[].unconsumed`,
|
|
73
|
+
* computed by `unconsumedTeamKeys` in packages/api) and `naive up` printed none
|
|
74
|
+
* of it โ `team({ governance: {โฆ} })` applied green and enforced nothing, with
|
|
75
|
+
* nothing anywhere for the author to notice. Printed on the PLAN and on the
|
|
76
|
+
* APPLY, because a report only the dry run shows is a report most operators
|
|
77
|
+
* never see.
|
|
78
|
+
*/
|
|
79
|
+
export declare function unconsumedWarnings(teams: readonly TeamPlanEntry[]): string[];
|
|
80
|
+
/**
|
|
81
|
+
* ONE deprecation line when the config still uses the legacy ECS surface โ
|
|
82
|
+
* `runtime.pool()` declarations, an agent-level `runtime: "<pool>"` string, or
|
|
83
|
+
* `systems:`. All three keep working indefinitely; the line names what was
|
|
84
|
+
* found and where new configs should author instead.
|
|
85
|
+
*/
|
|
86
|
+
export declare function legacyDeprecationNotice(config: Record<string, unknown>): string | null;
|
|
87
|
+
/**
|
|
88
|
+
* ONE rename line when the config declares `agents:`. Separate from the legacy
|
|
89
|
+
* line above on purpose: `runtime.pool()` / `systems:` are a deprecated
|
|
90
|
+
* SURFACE, while `agents:` is a deprecated SPELLING โ the block compiles to
|
|
91
|
+
* byte-for-byte what `kits:` compiles to, so the honest notice is "rename",
|
|
92
|
+
* not "migrate". A notice, never a refusal, on both entrypoints.
|
|
93
|
+
*/
|
|
94
|
+
export declare function agentsRenameNotice(config: Record<string, unknown>): string | null;
|
|
95
|
+
/**
|
|
96
|
+
* The operator credential the DURABLE RUNTIME issued, read from the ENVIRONMENT.
|
|
97
|
+
*
|
|
98
|
+
* Never from `naive.config.ts`, and that is the whole point rather than a style
|
|
99
|
+
* choice. The config is committed, so a credential in it is a credential in git โ
|
|
100
|
+
* and, more importantly, the config is the one thing that must not by itself be
|
|
101
|
+
* able to change where a tenant runs. Pointing a tenant at the durable runtime
|
|
102
|
+
* overwrites its `sidecar_url` and `container_auth_token` and nulls its
|
|
103
|
+
* `instance_id`, none of which is stashed anywhere. Requiring a second, separate
|
|
104
|
+
* act means an edit alone can never do it.
|
|
105
|
+
*
|
|
106
|
+
* `NAIVE_DURABLE_CREDENTIAL_<TEAM>` names one team; `NAIVE_DURABLE_CREDENTIAL`
|
|
107
|
+
* covers them all. Neither is ever printed, and the API never echoes it back.
|
|
108
|
+
*/
|
|
109
|
+
export declare function durableCredentialEnvVar(team: string): string;
|
|
110
|
+
/**
|
|
111
|
+
* The recovery for ONE refused team โ a command that EXISTS, or none.
|
|
112
|
+
*
|
|
113
|
+
* ๐ด `naive runtime migrate` IS NOT A COMMAND, AND THIS USED TO PRINT IT.
|
|
114
|
+
* Every refusal here used to emit
|
|
115
|
+
* `naive runtime migrate --tenant โฆ --to durable --credential-from <file>`.
|
|
116
|
+
* Measured on the built CLI: `naive runtime migrate --tenant <id> --to hermes`
|
|
117
|
+
* answers
|
|
118
|
+
* `{"code":"cli_outdated","message":"Unknown command 'runtime'. Your naive CLI
|
|
119
|
+
* is v0.12.4; this command may exist in a newer version."}` โ and it exists in
|
|
120
|
+
* NO version: `packages/cli/src/index.ts` registers no `runtime` group at all.
|
|
121
|
+
* So an operator whose apply was refused was handed a command that tells them to
|
|
122
|
+
* upgrade, forever. A next_step that cannot be run is worse than none, because it
|
|
123
|
+
* ends the search.
|
|
124
|
+
*
|
|
125
|
+
* The two cases are genuinely different and are answered differently:
|
|
126
|
+
*
|
|
127
|
+
* ยท `runtime_credential_required` โ there IS a procedure, it works today, and
|
|
128
|
+
* it is the one this command already implements: put the operator credential
|
|
129
|
+
* the durable runtime issued in the environment and re-run. Never in
|
|
130
|
+
* `naive.config.ts`, which is committed.
|
|
131
|
+
* ยท everything else (`runtime_migration_requires_explicit_opt_in`,
|
|
132
|
+
* `runtime_claim_in_flight`, `runtime_placement_lost_race`,
|
|
133
|
+
* `runtime_not_configured`, `runtime_state_unknown`) โ there is NO self-serve
|
|
134
|
+
* command on this build. Moving an existing tenant between runtimes
|
|
135
|
+
* overwrites `sidecar_url` and `container_auth_token` and nulls `instance_id`
|
|
136
|
+
* with nothing stashed, so the control plane refuses it and no client can do
|
|
137
|
+
* it either. Say that, and print the server's own message, rather than
|
|
138
|
+
* inventing a command to carry the blame.
|
|
139
|
+
*
|
|
140
|
+
* The API writes the same vapour into `details.migrate_command`
|
|
141
|
+
* (packages/api/src/services/placement.ts MIGRATE_COMMAND). That string is not
|
|
142
|
+
* this package's to change and is reported as a follow-up; this function is why
|
|
143
|
+
* `naive up` no longer repeats it.
|
|
144
|
+
*/
|
|
145
|
+
export declare function refusalNextStep(t: {
|
|
146
|
+
name: string;
|
|
147
|
+
placement?: {
|
|
148
|
+
code?: string;
|
|
149
|
+
};
|
|
150
|
+
}): NextStep | null;
|
|
2
151
|
export declare const upCmd: Command;
|
|
3
152
|
export declare const downCmd: Command;
|
|
153
|
+
export {};
|