statelyai 0.12.8 → 0.13.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/dist/index.d.mts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { Command } from "@oclif/core";
2
+ import { XGraph } from "@statelyai/mcp/loop";
2
3
  import { z } from "zod";
3
4
  import { StatelyGraph } from "@statelyai/sdk/graph";
4
5
  import { ConnectedRepo, CreateProjectInput, OAuthAuthorizationServerMetadata, OAuthProtectedResourceMetadata, ProjectData, ProjectMachineSummary, StudioClient } from "@statelyai/sdk";
@@ -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,67 @@ declare class VerifyCommand extends Command {
22
27
  run(): Promise<void>;
23
28
  }
24
29
  //#endregion
30
+ //#region src/loopCommands.d.ts
31
+ /**
32
+ * Offline loop commands over XGraph JSON files and the repository's
33
+ * `.statelyai/` store. No authentication or network access.
34
+ */
35
+ type Report = {
36
+ text: string;
37
+ exitCode: number;
38
+ };
39
+ /** An XGraph file, or a `.statelyai` head or version file (its `graph`). */
40
+ declare function readGraphFile(file: string): Promise<XGraph>;
41
+ /** `statelyai changes`: change lines and the proposed flow outline, base -> proposed. */
42
+ declare function changesReport(baseFile: string, proposedFile: string, json?: boolean): Promise<Report>;
43
+ /** `statelyai verify <proposal> <regenerated>`: behavior verdict; 1 on drift, 2 when unavailable. */
44
+ declare function verifyReport(proposalFile: string, regeneratedFile: string, json?: boolean): Promise<Report>;
45
+ /** `statelyai brief`: the Apply brief for a pending proposal in `.statelyai/`. */
46
+ declare function briefReport(root: string, machineId: string, versionId: string, json?: boolean): Promise<Report>;
47
+ /** `statelyai pending`: proposals in `.statelyai/` whose baseline is still the head. */
48
+ declare function pendingReport(root: string, json?: boolean): Promise<Report>;
49
+ declare abstract class ReportCommand extends Command {
50
+ static enableJsonFlag: boolean;
51
+ protected print(report: Promise<Report>): Promise<void>;
52
+ }
53
+ declare class ChangesCommand extends ReportCommand {
54
+ static summary: string;
55
+ static description: string;
56
+ static args: {
57
+ base: _oclif_core_interfaces0.Arg<string, Record<string, unknown>>;
58
+ proposed: _oclif_core_interfaces0.Arg<string, Record<string, unknown>>;
59
+ };
60
+ static flags: {
61
+ help: _oclif_core_interfaces0.BooleanFlag<void>;
62
+ json: _oclif_core_interfaces0.BooleanFlag<boolean>;
63
+ };
64
+ run(): Promise<void>;
65
+ }
66
+ declare class BriefCommand extends ReportCommand {
67
+ static summary: string;
68
+ static description: string;
69
+ static args: {
70
+ machine: _oclif_core_interfaces0.Arg<string, Record<string, unknown>>;
71
+ };
72
+ static flags: {
73
+ help: _oclif_core_interfaces0.BooleanFlag<void>;
74
+ proposal: _oclif_core_interfaces0.OptionFlag<string, _oclif_core_interfaces0.CustomOptions>;
75
+ root: _oclif_core_interfaces0.OptionFlag<string | undefined, _oclif_core_interfaces0.CustomOptions>;
76
+ json: _oclif_core_interfaces0.BooleanFlag<boolean>;
77
+ };
78
+ run(): Promise<void>;
79
+ }
80
+ declare class PendingCommand extends ReportCommand {
81
+ static summary: string;
82
+ static description: string;
83
+ static flags: {
84
+ help: _oclif_core_interfaces0.BooleanFlag<void>;
85
+ root: _oclif_core_interfaces0.OptionFlag<string | undefined, _oclif_core_interfaces0.CustomOptions>;
86
+ json: _oclif_core_interfaces0.BooleanFlag<boolean>;
87
+ };
88
+ run(): Promise<void>;
89
+ }
90
+ //#endregion
25
91
  //#region src/credentials.d.ts
26
92
  type StatelyCredential = {
27
93
  type: 'api_key';
@@ -59,6 +125,8 @@ interface StatelyProjectConfig {
59
125
  include: string[];
60
126
  exclude?: string[];
61
127
  newMachinesDir?: string;
128
+ /** `local` keeps MCP loop models and proposals in `.statelyai/` (read by `stately-mcp`). */
129
+ storage?: 'local' | 'hosted';
62
130
  }
63
131
  interface DiscoveredSourceFile {
64
132
  filePath: string;
@@ -71,7 +139,7 @@ declare function createStatelyProjectConfig(options: {
71
139
  defaultXStateVersion?: number;
72
140
  }): StatelyProjectConfig;
73
141
  //#endregion
74
- //#region ../../node_modules/.pnpm/@statelyai+graph@2.1.0_@statelyai+layout@0.4.2_cytoscape@3.34.0_d3-force@3.0.0_d3-hiera_48d6687797f6ba8a844c48e50eec3ae1/node_modules/@statelyai/graph/dist/types-BAEQTwK_.d.mts
142
+ //#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
143
  //#region src/types.d.ts
76
144
  /**
77
145
  * Directedness of a graph or an individual edge.
@@ -624,6 +692,9 @@ declare const COMMANDS: {
624
692
  login: typeof LoginCommand;
625
693
  logout: typeof LogoutCommand;
626
694
  whoami: typeof WhoamiCommand;
695
+ changes: typeof ChangesCommand;
696
+ brief: typeof BriefCommand;
697
+ pending: typeof PendingCommand;
627
698
  };
628
699
  declare function run(argv?: string[], entryUrl?: string): Promise<void>;
629
700
  //#endregion
@@ -1545,4 +1616,4 @@ declare function verifyProject(options?: VerifyProjectOptions): Promise<{
1545
1616
  /** One case per recorded path/probe. Unattributed divergences remain separate cases. */
1546
1617
  declare function formatVerificationJUnit(report: VerificationRunReport): string;
1547
1618
  //#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 };
1619
+ 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, briefReport, buildOAuthLoginStart, changesReport, classifyPushCandidates, createStatelyProjectConfig, discoverLinkedPullTargets, discoverMachinesInSource, discoverOAuthLogin, discoverRemoteProjectMachineTargets, formatDiscoveredMachines, formatMissingNewMachineDirMessage, formatPlanSummary, formatProjectStatus, formatStoredCredentialSource, formatVerificationJUnit, getEnvApiKey, getEnvCredential, inferInitProjectName, initProject, isFileGitDirty, pendingReport, readGraphFile, resolveApiKey, resolveConfiguredPullTargets, resolveCredentialStatus, resolveOpenRootDir, resolveProjectStatus, resolveVerificationRequest, run, scanProjectMachines, scanProjectSources, verifyProject, verifyReport };
package/dist/index.mjs CHANGED
@@ -1,3 +1,3 @@
1
- import { C as run, D as verifyProject, E as resolveVerificationRequest, O as formatVerificationJUnit, 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, k as createStatelyProjectConfig, 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-B2Dd5vY-.mjs";
1
+ import { A as briefReport, C as run, D as verifyProject, E as resolveVerificationRequest, M as pendingReport, N as readGraphFile, O as formatVerificationJUnit, P as verifyReport, 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 changesReport, k as createStatelyProjectConfig, 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-b1m4txJ7.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, pendingReport, readGraphFile, resolveApiKey, resolveConfiguredPullTargets, resolveCredentialStatus, resolveOpenRootDir, resolveProjectStatus, resolveVerificationRequest, run, scanProjectMachines, scanProjectSources, verifyProject, verifyReport };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "statelyai",
3
- "version": "0.12.8",
3
+ "version": "0.13.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/sdk": "0.38.2"
27
+ "@statelyai/mcp": "0.17.0",
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.6.3",
34
- "@statelyai/editor-sync": "0.1.51"
34
+ "@statelyai/api-contract": "0.6.5",
35
+ "@statelyai/editor-sync": "0.2.0"
35
36
  },
36
37
  "oclif": {
37
38
  "bin": "statelyai",