statelyai 0.12.8 → 0.14.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/README.md +93 -5
- package/dist/bin.mjs +1 -1
- package/dist/{cli-B2Dd5vY-.mjs → cli-BtgsQvTR.mjs} +1288 -629
- package/dist/index.d.mts +131 -3
- package/dist/index.mjs +2 -2
- package/package.json +5 -4
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Command } from "@oclif/core";
|
|
2
|
+
import { XGraph } from "@statelyai/mcp/loop";
|
|
2
3
|
import { z } from "zod";
|
|
4
|
+
import { ConnectedRepo, CreateProjectInput, LegacyProjectVisibility, OAuthAuthorizationServerMetadata, OAuthProtectedResourceMetadata, ProjectData, ProjectMachineSummary, ProjectVisibility, StudioClient } from "@statelyai/sdk";
|
|
3
5
|
import { StatelyGraph } from "@statelyai/sdk/graph";
|
|
4
|
-
import { ConnectedRepo, CreateProjectInput, OAuthAuthorizationServerMetadata, OAuthProtectedResourceMetadata, ProjectData, ProjectMachineSummary, StudioClient } from "@statelyai/sdk";
|
|
5
6
|
import * as _oclif_core_interfaces0 from "@oclif/core/interfaces";
|
|
6
7
|
|
|
7
8
|
//#region src/verifyCommand.d.ts
|
|
@@ -9,6 +10,10 @@ declare class VerifyCommand extends Command {
|
|
|
9
10
|
static enableJsonFlag: boolean;
|
|
10
11
|
static summary: string;
|
|
11
12
|
static description: string;
|
|
13
|
+
static args: {
|
|
14
|
+
proposal: _oclif_core_interfaces0.Arg<string | undefined, Record<string, unknown>>;
|
|
15
|
+
regenerated: _oclif_core_interfaces0.Arg<string | undefined, Record<string, unknown>>;
|
|
16
|
+
};
|
|
12
17
|
static flags: {
|
|
13
18
|
model: _oclif_core_interfaces0.OptionFlag<string | undefined, _oclif_core_interfaces0.CustomOptions>;
|
|
14
19
|
bindings: _oclif_core_interfaces0.OptionFlag<string | undefined, _oclif_core_interfaces0.CustomOptions>;
|
|
@@ -22,6 +27,104 @@ declare class VerifyCommand extends Command {
|
|
|
22
27
|
run(): Promise<void>;
|
|
23
28
|
}
|
|
24
29
|
//#endregion
|
|
30
|
+
//#region src/link.d.ts
|
|
31
|
+
interface LinkProjectOptions {
|
|
32
|
+
cwd?: string;
|
|
33
|
+
configPath?: string;
|
|
34
|
+
apiKey?: string;
|
|
35
|
+
baseUrl?: string;
|
|
36
|
+
client?: StudioClient;
|
|
37
|
+
projectId?: string;
|
|
38
|
+
create?: boolean;
|
|
39
|
+
name?: string;
|
|
40
|
+
visibility?: ProjectVisibility | LegacyProjectVisibility;
|
|
41
|
+
force?: boolean;
|
|
42
|
+
file?: string;
|
|
43
|
+
machineId?: string;
|
|
44
|
+
machineIndex?: number;
|
|
45
|
+
}
|
|
46
|
+
declare function resourceId(locator: string, kind: 'project' | 'machine'): string;
|
|
47
|
+
/** Association only: no definitions are uploaded, downloaded, or executed. */
|
|
48
|
+
declare function linkProject(options: LinkProjectOptions): Promise<{
|
|
49
|
+
project: ProjectData;
|
|
50
|
+
config: {
|
|
51
|
+
projectId: string;
|
|
52
|
+
studioUrl: string;
|
|
53
|
+
$schema: string;
|
|
54
|
+
version: string;
|
|
55
|
+
defaultXStateVersion: number;
|
|
56
|
+
sourceUpdateStrategy?: "preserve" | "rewrite";
|
|
57
|
+
include: string[];
|
|
58
|
+
exclude?: string[];
|
|
59
|
+
newMachinesDir?: string;
|
|
60
|
+
storage?: "local" | "hosted";
|
|
61
|
+
};
|
|
62
|
+
configPath: string;
|
|
63
|
+
machineId: string | undefined;
|
|
64
|
+
filePath: string | undefined;
|
|
65
|
+
}>;
|
|
66
|
+
//#endregion
|
|
67
|
+
//#region src/loopCommands.d.ts
|
|
68
|
+
/**
|
|
69
|
+
* Offline loop commands over XGraph JSON files and the repository's
|
|
70
|
+
* `.statelyai/` store. No authentication or network access.
|
|
71
|
+
*/
|
|
72
|
+
type Report = {
|
|
73
|
+
text: string;
|
|
74
|
+
exitCode: number;
|
|
75
|
+
};
|
|
76
|
+
/** An XGraph file, or a `.statelyai` head or version file (its `graph`). */
|
|
77
|
+
declare function readGraphFile(file: string): Promise<XGraph>;
|
|
78
|
+
/** `statelyai changes`: change lines and the proposed flow outline, base -> proposed. */
|
|
79
|
+
declare function changesReport(baseFile: string, proposedFile: string, json?: boolean): Promise<Report>;
|
|
80
|
+
/** `statelyai verify <proposal> <regenerated>`: behavior verdict; 1 on drift, 2 when unavailable. */
|
|
81
|
+
declare function verifyReport(proposalFile: string, regeneratedFile: string, json?: boolean): Promise<Report>;
|
|
82
|
+
/** `statelyai brief`: the Apply brief for a pending proposal in `.statelyai/`. */
|
|
83
|
+
declare function briefReport(root: string, machineId: string, versionId: string, json?: boolean): Promise<Report>;
|
|
84
|
+
/** `statelyai pending`: proposals in `.statelyai/` whose baseline is still the head. */
|
|
85
|
+
declare function pendingReport(root: string, json?: boolean): Promise<Report>;
|
|
86
|
+
declare abstract class ReportCommand extends Command {
|
|
87
|
+
static enableJsonFlag: boolean;
|
|
88
|
+
protected print(report: Promise<Report>): Promise<void>;
|
|
89
|
+
}
|
|
90
|
+
declare class ChangesCommand extends ReportCommand {
|
|
91
|
+
static summary: string;
|
|
92
|
+
static description: string;
|
|
93
|
+
static args: {
|
|
94
|
+
base: _oclif_core_interfaces0.Arg<string, Record<string, unknown>>;
|
|
95
|
+
proposed: _oclif_core_interfaces0.Arg<string, Record<string, unknown>>;
|
|
96
|
+
};
|
|
97
|
+
static flags: {
|
|
98
|
+
help: _oclif_core_interfaces0.BooleanFlag<void>;
|
|
99
|
+
json: _oclif_core_interfaces0.BooleanFlag<boolean>;
|
|
100
|
+
};
|
|
101
|
+
run(): Promise<void>;
|
|
102
|
+
}
|
|
103
|
+
declare class BriefCommand extends ReportCommand {
|
|
104
|
+
static summary: string;
|
|
105
|
+
static description: string;
|
|
106
|
+
static args: {
|
|
107
|
+
machine: _oclif_core_interfaces0.Arg<string, Record<string, unknown>>;
|
|
108
|
+
};
|
|
109
|
+
static flags: {
|
|
110
|
+
help: _oclif_core_interfaces0.BooleanFlag<void>;
|
|
111
|
+
proposal: _oclif_core_interfaces0.OptionFlag<string, _oclif_core_interfaces0.CustomOptions>;
|
|
112
|
+
root: _oclif_core_interfaces0.OptionFlag<string | undefined, _oclif_core_interfaces0.CustomOptions>;
|
|
113
|
+
json: _oclif_core_interfaces0.BooleanFlag<boolean>;
|
|
114
|
+
};
|
|
115
|
+
run(): Promise<void>;
|
|
116
|
+
}
|
|
117
|
+
declare class PendingCommand extends ReportCommand {
|
|
118
|
+
static summary: string;
|
|
119
|
+
static description: string;
|
|
120
|
+
static flags: {
|
|
121
|
+
help: _oclif_core_interfaces0.BooleanFlag<void>;
|
|
122
|
+
root: _oclif_core_interfaces0.OptionFlag<string | undefined, _oclif_core_interfaces0.CustomOptions>;
|
|
123
|
+
json: _oclif_core_interfaces0.BooleanFlag<boolean>;
|
|
124
|
+
};
|
|
125
|
+
run(): Promise<void>;
|
|
126
|
+
}
|
|
127
|
+
//#endregion
|
|
25
128
|
//#region src/credentials.d.ts
|
|
26
129
|
type StatelyCredential = {
|
|
27
130
|
type: 'api_key';
|
|
@@ -59,6 +162,8 @@ interface StatelyProjectConfig {
|
|
|
59
162
|
include: string[];
|
|
60
163
|
exclude?: string[];
|
|
61
164
|
newMachinesDir?: string;
|
|
165
|
+
/** `local` keeps MCP loop models and proposals in `.statelyai/` (read by `stately-mcp`). */
|
|
166
|
+
storage?: 'local' | 'hosted';
|
|
62
167
|
}
|
|
63
168
|
interface DiscoveredSourceFile {
|
|
64
169
|
filePath: string;
|
|
@@ -71,7 +176,7 @@ declare function createStatelyProjectConfig(options: {
|
|
|
71
176
|
defaultXStateVersion?: number;
|
|
72
177
|
}): StatelyProjectConfig;
|
|
73
178
|
//#endregion
|
|
74
|
-
//#region ../../node_modules/.pnpm/@statelyai+graph@2.1.0_@statelyai+layout@0.4.
|
|
179
|
+
//#region ../../node_modules/.pnpm/@statelyai+graph@2.1.0_@statelyai+layout@0.4.3_cytoscape@3.34.0_d3-force@3.0.0_d3-hiera_2afdfa88fae2fa10712f99651d0f58d6/node_modules/@statelyai/graph/dist/types-BAEQTwK_.d.mts
|
|
75
180
|
//#region src/types.d.ts
|
|
76
181
|
/**
|
|
77
182
|
* Directedness of a graph or an individual edge.
|
|
@@ -541,6 +646,25 @@ declare class OpenCommand extends Command {
|
|
|
541
646
|
run(): Promise<void>;
|
|
542
647
|
}
|
|
543
648
|
declare function resolveOpenRootDir(cwd: string, fileArg?: string): string;
|
|
649
|
+
declare class LinkCommand extends Command {
|
|
650
|
+
static summary: string;
|
|
651
|
+
static args: {
|
|
652
|
+
file: _oclif_core_interfaces0.Arg<string | undefined, Record<string, unknown>>;
|
|
653
|
+
};
|
|
654
|
+
static flags: {
|
|
655
|
+
help: _oclif_core_interfaces0.BooleanFlag<void>;
|
|
656
|
+
project: _oclif_core_interfaces0.OptionFlag<string | undefined, _oclif_core_interfaces0.CustomOptions>;
|
|
657
|
+
create: _oclif_core_interfaces0.BooleanFlag<boolean>;
|
|
658
|
+
name: _oclif_core_interfaces0.OptionFlag<string | undefined, _oclif_core_interfaces0.CustomOptions>;
|
|
659
|
+
visibility: _oclif_core_interfaces0.OptionFlag<string | undefined, _oclif_core_interfaces0.CustomOptions>;
|
|
660
|
+
machine: _oclif_core_interfaces0.OptionFlag<string | undefined, _oclif_core_interfaces0.CustomOptions>;
|
|
661
|
+
'machine-index': _oclif_core_interfaces0.OptionFlag<number | undefined, _oclif_core_interfaces0.CustomOptions>;
|
|
662
|
+
'base-url': _oclif_core_interfaces0.OptionFlag<string | undefined, _oclif_core_interfaces0.CustomOptions>;
|
|
663
|
+
config: _oclif_core_interfaces0.OptionFlag<string | undefined, _oclif_core_interfaces0.CustomOptions>;
|
|
664
|
+
force: _oclif_core_interfaces0.BooleanFlag<boolean>;
|
|
665
|
+
};
|
|
666
|
+
run(): Promise<void>;
|
|
667
|
+
}
|
|
544
668
|
declare class InitCommand extends Command {
|
|
545
669
|
static enableJsonFlag: boolean;
|
|
546
670
|
static summary: string;
|
|
@@ -621,9 +745,13 @@ declare const COMMANDS: {
|
|
|
621
745
|
scan: typeof ScanCommand;
|
|
622
746
|
status: typeof StatusCommand;
|
|
623
747
|
init: typeof InitCommand;
|
|
748
|
+
link: typeof LinkCommand;
|
|
624
749
|
login: typeof LoginCommand;
|
|
625
750
|
logout: typeof LogoutCommand;
|
|
626
751
|
whoami: typeof WhoamiCommand;
|
|
752
|
+
changes: typeof ChangesCommand;
|
|
753
|
+
brief: typeof BriefCommand;
|
|
754
|
+
pending: typeof PendingCommand;
|
|
627
755
|
};
|
|
628
756
|
declare function run(argv?: string[], entryUrl?: string): Promise<void>;
|
|
629
757
|
//#endregion
|
|
@@ -1545,4 +1673,4 @@ declare function verifyProject(options?: VerifyProjectOptions): Promise<{
|
|
|
1545
1673
|
/** One case per recorded path/probe. Unattributed divergences remain separate cases. */
|
|
1546
1674
|
declare function formatVerificationJUnit(report: VerificationRunReport): string;
|
|
1547
1675
|
//#endregion
|
|
1548
|
-
export { ApiKeyResolution, COMMANDS, CredentialStatus, DiscoveredMachine, InitProjectOptions, InitProjectResult, LinkedPullTarget, OAuthLoginDiscovery, ProjectMachineStatus, ProjectStatusMachine, ProjectStatusResult, PushCandidateClassification, RemoteProjectMachineTarget, ResolveApiKeyOptions, ResolvedConfiguredPullTargets, ScanProjectSourcesOptions, type VerificationExecutor, type VerificationRequest, type VerificationRunReport, type VerifyProjectOptions, buildOAuthLoginStart, classifyPushCandidates, createStatelyProjectConfig, discoverLinkedPullTargets, discoverMachinesInSource, discoverOAuthLogin, discoverRemoteProjectMachineTargets, formatDiscoveredMachines, formatMissingNewMachineDirMessage, formatPlanSummary, formatProjectStatus, formatStoredCredentialSource, formatVerificationJUnit, getEnvApiKey, getEnvCredential, inferInitProjectName, initProject, isFileGitDirty, resolveApiKey, resolveConfiguredPullTargets, resolveCredentialStatus, resolveOpenRootDir, resolveProjectStatus, resolveVerificationRequest, run, scanProjectMachines, scanProjectSources, verifyProject };
|
|
1676
|
+
export { ApiKeyResolution, COMMANDS, CredentialStatus, DiscoveredMachine, InitProjectOptions, InitProjectResult, type LinkProjectOptions, LinkedPullTarget, OAuthLoginDiscovery, ProjectMachineStatus, ProjectStatusMachine, ProjectStatusResult, PushCandidateClassification, RemoteProjectMachineTarget, ResolveApiKeyOptions, ResolvedConfiguredPullTargets, ScanProjectSourcesOptions, type VerificationExecutor, type VerificationRequest, type VerificationRunReport, type VerifyProjectOptions, briefReport, buildOAuthLoginStart, changesReport, classifyPushCandidates, createStatelyProjectConfig, discoverLinkedPullTargets, discoverMachinesInSource, discoverOAuthLogin, discoverRemoteProjectMachineTargets, formatDiscoveredMachines, formatMissingNewMachineDirMessage, formatPlanSummary, formatProjectStatus, formatStoredCredentialSource, formatVerificationJUnit, getEnvApiKey, getEnvCredential, inferInitProjectName, initProject, isFileGitDirty, linkProject, pendingReport, readGraphFile, resolveApiKey, resolveConfiguredPullTargets, resolveCredentialStatus, resolveOpenRootDir, resolveProjectStatus, resolveVerificationRequest, resourceId, run, scanProjectMachines, scanProjectSources, verifyProject, verifyReport };
|
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { C as run, D as
|
|
1
|
+
import { A as formatVerificationJUnit, C as run, D as resourceId, E as linkProject, F as readGraphFile, I as verifyReport, M as briefReport, N as changesReport, O as resolveVerificationRequest, P as pendingReport, S as resolveProjectStatus, T as scanProjectSources, _ as isFileGitDirty, a as discoverMachinesInSource, b as resolveCredentialStatus, c as formatDiscoveredMachines, d as formatProjectStatus, f as formatStoredCredentialSource, g as initProject, h as inferInitProjectName, i as discoverLinkedPullTargets, j as createStatelyProjectConfig, k as verifyProject, l as formatMissingNewMachineDirMessage, m as getEnvCredential, n as buildOAuthLoginStart, o as discoverOAuthLogin, p as getEnvApiKey, r as classifyPushCandidates, s as discoverRemoteProjectMachineTargets, t as COMMANDS, u as formatPlanSummary, v as resolveApiKey, w as scanProjectMachines, x as resolveOpenRootDir, y as resolveConfiguredPullTargets } from "./cli-BtgsQvTR.mjs";
|
|
2
2
|
|
|
3
|
-
export { COMMANDS, buildOAuthLoginStart, classifyPushCandidates, createStatelyProjectConfig, discoverLinkedPullTargets, discoverMachinesInSource, discoverOAuthLogin, discoverRemoteProjectMachineTargets, formatDiscoveredMachines, formatMissingNewMachineDirMessage, formatPlanSummary, formatProjectStatus, formatStoredCredentialSource, formatVerificationJUnit, getEnvApiKey, getEnvCredential, inferInitProjectName, initProject, isFileGitDirty, resolveApiKey, resolveConfiguredPullTargets, resolveCredentialStatus, resolveOpenRootDir, resolveProjectStatus, resolveVerificationRequest, run, scanProjectMachines, scanProjectSources, verifyProject };
|
|
3
|
+
export { COMMANDS, briefReport, buildOAuthLoginStart, changesReport, classifyPushCandidates, createStatelyProjectConfig, discoverLinkedPullTargets, discoverMachinesInSource, discoverOAuthLogin, discoverRemoteProjectMachineTargets, formatDiscoveredMachines, formatMissingNewMachineDirMessage, formatPlanSummary, formatProjectStatus, formatStoredCredentialSource, formatVerificationJUnit, getEnvApiKey, getEnvCredential, inferInitProjectName, initProject, isFileGitDirty, linkProject, pendingReport, readGraphFile, resolveApiKey, resolveConfiguredPullTargets, resolveCredentialStatus, resolveOpenRootDir, resolveProjectStatus, resolveVerificationRequest, resourceId, run, scanProjectMachines, scanProjectSources, verifyProject, verifyReport };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "statelyai",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "Command-line tools for Stately",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|
|
@@ -24,14 +24,15 @@
|
|
|
24
24
|
"typescript": "^5.9.3",
|
|
25
25
|
"ws": "^8.21.0",
|
|
26
26
|
"zod": "^4.4.1",
|
|
27
|
-
"@statelyai/
|
|
27
|
+
"@statelyai/mcp": "0.17.1",
|
|
28
|
+
"@statelyai/sdk": "0.39.0"
|
|
28
29
|
},
|
|
29
30
|
"devDependencies": {
|
|
30
31
|
"@types/ws": "^8.18.1",
|
|
31
32
|
"tsdown": "0.21.0-beta.2",
|
|
32
33
|
"vitest": "^3.2.4",
|
|
33
|
-
"@statelyai/api-contract": "0.
|
|
34
|
-
"@statelyai/editor-sync": "0.1
|
|
34
|
+
"@statelyai/api-contract": "0.7.0",
|
|
35
|
+
"@statelyai/editor-sync": "0.2.1"
|
|
35
36
|
},
|
|
36
37
|
"oclif": {
|
|
37
38
|
"bin": "statelyai",
|