@vectle/cli 1.0.0 → 1.1.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/CHANGELOG.md +15 -0
- package/README.md +15 -8
- package/dist/activity.d.ts +10 -0
- package/dist/activity.js +10 -0
- package/dist/activity.js.map +1 -0
- package/dist/adapters/claude.d.ts +4 -0
- package/dist/adapters/claude.js +279 -0
- package/dist/adapters/claude.js.map +1 -0
- package/dist/adapters/codex.d.ts +16 -0
- package/dist/adapters/codex.js +410 -0
- package/dist/adapters/codex.js.map +1 -0
- package/dist/adapters/common.d.ts +80 -0
- package/dist/adapters/common.js +249 -0
- package/dist/adapters/common.js.map +1 -0
- package/dist/adapters/cursor.d.ts +4 -0
- package/dist/adapters/cursor.js +240 -0
- package/dist/adapters/cursor.js.map +1 -0
- package/dist/adapters/vscode.d.ts +4 -0
- package/dist/adapters/vscode.js +240 -0
- package/dist/adapters/vscode.js.map +1 -0
- package/dist/agent-policy.d.ts +50 -0
- package/dist/agent-policy.js +83 -0
- package/dist/agent-policy.js.map +1 -0
- package/dist/client.d.ts +69 -10
- package/dist/client.js +247 -24
- package/dist/client.js.map +1 -1
- package/dist/constants.d.ts +12 -2
- package/dist/constants.js +7 -1
- package/dist/constants.js.map +1 -1
- package/dist/contracts.d.ts +53 -0
- package/dist/contracts.js +68 -0
- package/dist/contracts.js.map +1 -0
- package/dist/delivery.d.ts +80 -0
- package/dist/delivery.js +304 -0
- package/dist/delivery.js.map +1 -0
- package/dist/findings.d.ts +12 -0
- package/dist/findings.js +41 -0
- package/dist/findings.js.map +1 -0
- package/dist/help.d.ts +1 -0
- package/dist/help.js +53 -0
- package/dist/help.js.map +1 -0
- package/dist/index.js +370 -72
- package/dist/index.js.map +1 -1
- package/dist/integrations.d.ts +126 -0
- package/dist/integrations.js +173 -0
- package/dist/integrations.js.map +1 -0
- package/dist/legacy-compat.d.ts +45 -0
- package/dist/legacy-compat.js +149 -0
- package/dist/legacy-compat.js.map +1 -0
- package/dist/lifecycle.d.ts +50 -0
- package/dist/lifecycle.js +146 -0
- package/dist/lifecycle.js.map +1 -0
- package/dist/locator.d.ts +58 -0
- package/dist/locator.js +233 -0
- package/dist/locator.js.map +1 -0
- package/dist/mcp.d.ts +12 -2
- package/dist/mcp.js +194 -48
- package/dist/mcp.js.map +1 -1
- package/dist/modes.d.ts +37 -0
- package/dist/modes.js +32 -0
- package/dist/modes.js.map +1 -0
- package/dist/outbox.d.ts +9 -0
- package/dist/outbox.js +188 -0
- package/dist/outbox.js.map +1 -0
- package/dist/parser.d.ts +10 -0
- package/dist/parser.js +99 -0
- package/dist/parser.js.map +1 -0
- package/dist/pulse.d.ts +122 -0
- package/dist/pulse.js +412 -0
- package/dist/pulse.js.map +1 -0
- package/dist/release-manifest.d.ts +123 -0
- package/dist/release-manifest.js +226 -0
- package/dist/release-manifest.js.map +1 -0
- package/dist/release.d.ts +1 -1
- package/dist/response.d.ts +17 -0
- package/dist/response.js +15 -0
- package/dist/response.js.map +1 -1
- package/dist/rollout.d.ts +8 -0
- package/dist/rollout.js +27 -0
- package/dist/rollout.js.map +1 -0
- package/dist/runtime.d.ts +60 -0
- package/dist/runtime.js +276 -0
- package/dist/runtime.js.map +1 -0
- package/dist/secure-store.d.ts +36 -0
- package/dist/secure-store.js +282 -0
- package/dist/secure-store.js.map +1 -0
- package/dist/setup.d.ts +159 -0
- package/dist/setup.js +629 -0
- package/dist/setup.js.map +1 -0
- package/dist/state.d.ts +98 -0
- package/dist/state.js +226 -0
- package/dist/state.js.map +1 -0
- package/dist/status.d.ts +282 -0
- package/dist/status.js +213 -0
- package/dist/status.js.map +1 -0
- package/dist/store.d.ts +44 -2
- package/dist/store.js +222 -44
- package/dist/store.js.map +1 -1
- package/dist/update.d.ts +33 -1
- package/dist/update.js +88 -16
- package/dist/update.js.map +1 -1
- package/dist/write-journal.d.ts +71 -0
- package/dist/write-journal.js +175 -0
- package/dist/write-journal.js.map +1 -0
- package/package.json +7 -2
package/dist/setup.d.ts
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { VectleClient } from './client.js';
|
|
2
|
+
import { chooseClient, type IntegrationManifestEntry, type SupportedClientFamily } from './integrations.js';
|
|
3
|
+
import { type ClientFamily, type VectleConfig } from './store.js';
|
|
4
|
+
import { type ReleaseManifest } from './release-manifest.js';
|
|
5
|
+
export type SetupCheck = {
|
|
6
|
+
code: 'runtime_durable' | 'credential_stored' | 'mcp_configured' | 'policy_installed' | 'approval_persistence' | 'lifecycle_hook_configured' | 'lifecycle_marker' | 'server_smoke' | 'client_smoke';
|
|
7
|
+
status: 'passed' | 'pending' | 'failed' | 'unsupported';
|
|
8
|
+
};
|
|
9
|
+
export type SetupPhase = 'inspect' | 'acquire_lock' | 'install_or_upgrade' | 'challenge' | 'wait_for_approval' | 'store_credential' | 'apply_client_config' | 'apply_agent_policy' | 'client_smoke_test' | 'server_smoke_test' | 'report_ready' | 'done' | 'rollback';
|
|
10
|
+
export type SetupTerminalStatus = 'ready' | 'ready_after_restart' | 'host_trust_required' | 'host_approval_may_repeat' | 'partial' | 'failed';
|
|
11
|
+
type SetupState = {
|
|
12
|
+
schema_version: 'setup-state-v1';
|
|
13
|
+
setup_commit_id: string;
|
|
14
|
+
generation: number;
|
|
15
|
+
state_root: string;
|
|
16
|
+
phase: SetupPhase;
|
|
17
|
+
status: SetupTerminalStatus | 'in_progress';
|
|
18
|
+
client_family: ClientFamily;
|
|
19
|
+
profile_label: string;
|
|
20
|
+
challenge_id: string | null;
|
|
21
|
+
device_code_ref: string | null;
|
|
22
|
+
refresh_candidate_ref: string | null;
|
|
23
|
+
setup_attempt_id: string | null;
|
|
24
|
+
setup_report_ref: string | null;
|
|
25
|
+
completed_steps: string[];
|
|
26
|
+
error_code: string | null;
|
|
27
|
+
started_at: string;
|
|
28
|
+
updated_at: string;
|
|
29
|
+
};
|
|
30
|
+
export type SetupClientProjection = {
|
|
31
|
+
client_family: ClientFamily;
|
|
32
|
+
integration_capability: 'full_lifecycle' | 'policy_and_mcp' | 'mcp_only' | 'authorized_only' | 'disconnected' | 'conflict';
|
|
33
|
+
startup_invocation_policy: 'automatic_guard' | 'on_demand' | 'off';
|
|
34
|
+
sharing_invocation_policy: 'automatic_guard' | 'explicit_only' | 'off';
|
|
35
|
+
lookup_capability: 'automatic' | 'on_demand' | 'unavailable';
|
|
36
|
+
updates_capability: 'automatic' | 'on_demand' | 'unavailable';
|
|
37
|
+
submission_capability: 'automatic' | 'explicit_only' | 'unavailable';
|
|
38
|
+
correction_capability: 'automatic' | 'explicit_only' | 'unavailable';
|
|
39
|
+
approval_read: 'promptless' | 'may_prompt' | 'unavailable';
|
|
40
|
+
approval_write: 'promptless' | 'may_prompt' | 'unavailable';
|
|
41
|
+
runtime_health: 'healthy' | 'lookup_degraded' | 'updates_degraded' | 'auth_degraded' | 'server_unavailable' | 'unchecked';
|
|
42
|
+
actions_required: Array<'mcp_server_trust' | 'lifecycle_hook_trust' | 'client_restart' | 'repair'>;
|
|
43
|
+
limitations: Array<'host_approval_may_repeat' | 'lifecycle_unsupported' | 'cloud_not_covered' | 'client_version_unverified' | 'runtime_not_durable' | 'managed_policy_block'>;
|
|
44
|
+
checks: SetupCheck[];
|
|
45
|
+
};
|
|
46
|
+
export type SetupResult = {
|
|
47
|
+
schema_version: 'setup-result-v1';
|
|
48
|
+
status: SetupTerminalStatus | 'client_choice_required' | 'in_progress';
|
|
49
|
+
reason_code: string | null;
|
|
50
|
+
state_root: string;
|
|
51
|
+
client_family: ClientFamily | null;
|
|
52
|
+
selection: ReturnType<typeof chooseClient>['selection'];
|
|
53
|
+
projection: Omit<SetupClientProjection, 'checks'> | null;
|
|
54
|
+
verification_uri_complete: string | null;
|
|
55
|
+
user_code: string | null;
|
|
56
|
+
challenge_expires_at: string | null;
|
|
57
|
+
next_action: string | null;
|
|
58
|
+
};
|
|
59
|
+
export type SetupAdapter = {
|
|
60
|
+
client: SupportedClientFamily;
|
|
61
|
+
profileLabel?: string;
|
|
62
|
+
apply: (input: {
|
|
63
|
+
config: VectleConfig;
|
|
64
|
+
stateRoot: string;
|
|
65
|
+
adapterEntryId: string;
|
|
66
|
+
integrationBindingDigest: `sha256:${string}`;
|
|
67
|
+
policyChecksum: `sha256:${string}`;
|
|
68
|
+
targetCapability: 'mcp_only' | 'policy_and_mcp' | 'full_lifecycle';
|
|
69
|
+
}) => Promise<{
|
|
70
|
+
entry: IntegrationManifestEntry;
|
|
71
|
+
checks: SetupCheck[];
|
|
72
|
+
actions?: SetupClientProjection['actions_required'];
|
|
73
|
+
limitations?: SetupClientProjection['limitations'];
|
|
74
|
+
capability?: SetupClientProjection['integration_capability'];
|
|
75
|
+
}>;
|
|
76
|
+
verify: (input: {
|
|
77
|
+
config: VectleConfig;
|
|
78
|
+
entry: IntegrationManifestEntry;
|
|
79
|
+
}) => Promise<{
|
|
80
|
+
clientSmoke: 'passed' | 'failed';
|
|
81
|
+
marker: 'passed' | 'pending' | 'unsupported';
|
|
82
|
+
lifecycle: 'full_lifecycle' | 'policy_and_mcp' | 'mcp_only' | 'authorized_only';
|
|
83
|
+
actions?: SetupClientProjection['actions_required'];
|
|
84
|
+
limitations?: SetupClientProjection['limitations'];
|
|
85
|
+
}>;
|
|
86
|
+
rollback?: (input: {
|
|
87
|
+
config: VectleConfig;
|
|
88
|
+
stateRoot: string;
|
|
89
|
+
entry: IntegrationManifestEntry;
|
|
90
|
+
}) => Promise<void>;
|
|
91
|
+
};
|
|
92
|
+
export type SetupOptions = {
|
|
93
|
+
client?: ClientFamily | 'auto' | 'all';
|
|
94
|
+
endpoint?: string;
|
|
95
|
+
requestedRoot?: string;
|
|
96
|
+
allowCustomStateRoot?: boolean;
|
|
97
|
+
allowFileCredential?: boolean;
|
|
98
|
+
repair?: boolean;
|
|
99
|
+
noOpen?: boolean;
|
|
100
|
+
json?: boolean;
|
|
101
|
+
trustedInvocation?: SupportedClientFamily;
|
|
102
|
+
home?: string;
|
|
103
|
+
config?: VectleConfig;
|
|
104
|
+
clientApi?: VectleClient;
|
|
105
|
+
adapter?: SetupAdapter;
|
|
106
|
+
sleep?: (milliseconds: number) => Promise<void>;
|
|
107
|
+
now?: () => number;
|
|
108
|
+
openBrowser?: (url: string) => void;
|
|
109
|
+
clientVersion?: string | null;
|
|
110
|
+
};
|
|
111
|
+
export declare function setupCommandRequest(command: 'setup' | 'init' | 'connect', args: string[]): {
|
|
112
|
+
client: ClientFamily | "auto" | "all" | undefined;
|
|
113
|
+
endpoint: string | undefined;
|
|
114
|
+
requestedRoot: string | undefined;
|
|
115
|
+
allowCustomStateRoot: boolean;
|
|
116
|
+
allowFileCredential: boolean;
|
|
117
|
+
repair: boolean;
|
|
118
|
+
noOpen: boolean;
|
|
119
|
+
deprecatedAlias: boolean;
|
|
120
|
+
legacyGlobal: boolean;
|
|
121
|
+
};
|
|
122
|
+
export declare function canReplaceExpiredChallenge(input: {
|
|
123
|
+
serverStatus: 'expired' | 'pending' | 'approved' | 'denied' | 'consumed';
|
|
124
|
+
browserPreviewed: boolean;
|
|
125
|
+
}): boolean;
|
|
126
|
+
declare const CAPABILITY_RANK: {
|
|
127
|
+
readonly authorized_only: 0;
|
|
128
|
+
readonly mcp_only: 1;
|
|
129
|
+
readonly policy_and_mcp: 2;
|
|
130
|
+
readonly full_lifecycle: 3;
|
|
131
|
+
};
|
|
132
|
+
type ProvisionableCapability = keyof typeof CAPABILITY_RANK;
|
|
133
|
+
type AdapterProvisioningDecision = {
|
|
134
|
+
capability: ProvisionableCapability;
|
|
135
|
+
lifecycleEligible: boolean;
|
|
136
|
+
reason: 'platform_unsupported' | 'adapter_record_missing' | 'adapter_record_ambiguous' | 'client_version_unsupported' | 'client_version_unverified' | 'manifest_capability' | 'lifecycle_rollout_ineligible' | 'legacy_cli';
|
|
137
|
+
};
|
|
138
|
+
export declare function shouldPreserveInstalledCapability(existing: IntegrationManifestEntry | null, decision: AdapterProvisioningDecision): boolean;
|
|
139
|
+
export declare function detectClientVersion(client: SupportedClientFamily): string | null;
|
|
140
|
+
export declare function parseClientVersion(output: string): string | null;
|
|
141
|
+
export declare function adapterProvisioningDecision(input: {
|
|
142
|
+
manifest: ReleaseManifest;
|
|
143
|
+
config: Pick<VectleConfig, 'rollout_seed'>;
|
|
144
|
+
client: SupportedClientFamily;
|
|
145
|
+
platform?: NodeJS.Platform;
|
|
146
|
+
clientVersion?: string | null;
|
|
147
|
+
}): AdapterProvisioningDecision;
|
|
148
|
+
export declare function runSetup(options?: SetupOptions): Promise<SetupResult>;
|
|
149
|
+
export declare function recoverSetup(root: string): {
|
|
150
|
+
status: "none";
|
|
151
|
+
recovered: boolean;
|
|
152
|
+
error_code?: undefined;
|
|
153
|
+
} | {
|
|
154
|
+
status: SetupTerminalStatus | "in_progress";
|
|
155
|
+
recovered: boolean;
|
|
156
|
+
error_code: string | null;
|
|
157
|
+
};
|
|
158
|
+
export declare function setupStateForTests(root: string): SetupState | null;
|
|
159
|
+
export {};
|