openxiangda-devkit-core 2.0.0-alpha.98 → 2.0.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.
Files changed (123) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +3 -9
  3. package/dist/app-spec.d.ts +30 -12
  4. package/dist/app-spec.d.ts.map +1 -1
  5. package/dist/app-spec.js +238 -57
  6. package/dist/app-spec.js.map +1 -1
  7. package/dist/application-services.d.ts +625 -42
  8. package/dist/application-services.d.ts.map +1 -1
  9. package/dist/application-services.js +321 -85
  10. package/dist/application-services.js.map +1 -1
  11. package/dist/application-ui-contract.d.ts +5 -0
  12. package/dist/application-ui-contract.d.ts.map +1 -0
  13. package/dist/application-ui-contract.js +149 -0
  14. package/dist/application-ui-contract.js.map +1 -0
  15. package/dist/backend-image-build.js +6 -11
  16. package/dist/backend-image-build.js.map +1 -1
  17. package/dist/command-process.d.ts +14 -0
  18. package/dist/command-process.d.ts.map +1 -0
  19. package/dist/command-process.js +51 -0
  20. package/dist/command-process.js.map +1 -0
  21. package/dist/command-registry.d.ts +44 -4
  22. package/dist/command-registry.d.ts.map +1 -1
  23. package/dist/command-registry.js +10 -6
  24. package/dist/command-registry.js.map +1 -1
  25. package/dist/compiler/ai-catalog.d.ts.map +1 -1
  26. package/dist/compiler/ai-catalog.js +2 -1
  27. package/dist/compiler/ai-catalog.js.map +1 -1
  28. package/dist/compiler/application-model.d.ts +60 -0
  29. package/dist/compiler/application-model.d.ts.map +1 -0
  30. package/dist/compiler/application-model.js +141 -0
  31. package/dist/compiler/application-model.js.map +1 -0
  32. package/dist/compiler/bundle.d.ts.map +1 -1
  33. package/dist/compiler/bundle.js +196 -98
  34. package/dist/compiler/bundle.js.map +1 -1
  35. package/dist/compiler/config.d.ts +36 -10
  36. package/dist/compiler/config.d.ts.map +1 -1
  37. package/dist/compiler/config.js +536 -171
  38. package/dist/compiler/config.js.map +1 -1
  39. package/dist/compiler/field-surface.js +1 -1
  40. package/dist/compiler/field-surface.js.map +1 -1
  41. package/dist/compiler/package-compiler.d.ts.map +1 -1
  42. package/dist/compiler/package-compiler.js +12 -0
  43. package/dist/compiler/package-compiler.js.map +1 -1
  44. package/dist/compiler/permission-review.d.ts +139 -0
  45. package/dist/compiler/permission-review.d.ts.map +1 -0
  46. package/dist/compiler/permission-review.js +131 -0
  47. package/dist/compiler/permission-review.js.map +1 -0
  48. package/dist/configuration-preflight.d.ts +7 -0
  49. package/dist/configuration-preflight.d.ts.map +1 -0
  50. package/dist/configuration-preflight.js +13 -0
  51. package/dist/configuration-preflight.js.map +1 -0
  52. package/dist/control-plane-client.d.ts +56 -61
  53. package/dist/control-plane-client.d.ts.map +1 -1
  54. package/dist/control-plane-client.js +89 -8
  55. package/dist/control-plane-client.js.map +1 -1
  56. package/dist/delivery-cache.d.ts +34 -0
  57. package/dist/delivery-cache.d.ts.map +1 -0
  58. package/dist/delivery-cache.js +186 -0
  59. package/dist/delivery-cache.js.map +1 -0
  60. package/dist/delivery-source.d.ts +17 -0
  61. package/dist/delivery-source.d.ts.map +1 -0
  62. package/dist/delivery-source.js +85 -0
  63. package/dist/delivery-source.js.map +1 -0
  64. package/dist/deployment-observer.d.ts +14 -0
  65. package/dist/deployment-observer.d.ts.map +1 -0
  66. package/dist/deployment-observer.js +68 -0
  67. package/dist/deployment-observer.js.map +1 -0
  68. package/dist/deployment.d.ts +17 -1
  69. package/dist/deployment.d.ts.map +1 -1
  70. package/dist/deployment.js +55 -15
  71. package/dist/deployment.js.map +1 -1
  72. package/dist/design-readiness.d.ts +24 -0
  73. package/dist/design-readiness.d.ts.map +1 -0
  74. package/dist/design-readiness.js +102 -0
  75. package/dist/design-readiness.js.map +1 -0
  76. package/dist/developer-errors.d.ts +11 -0
  77. package/dist/developer-errors.d.ts.map +1 -0
  78. package/dist/developer-errors.js +16 -0
  79. package/dist/developer-errors.js.map +1 -0
  80. package/dist/developer-operations.d.ts +190 -0
  81. package/dist/developer-operations.d.ts.map +1 -0
  82. package/dist/developer-operations.js +65 -0
  83. package/dist/developer-operations.js.map +1 -0
  84. package/dist/development-lifecycle.d.ts +75 -0
  85. package/dist/development-lifecycle.d.ts.map +1 -0
  86. package/dist/development-lifecycle.js +189 -0
  87. package/dist/development-lifecycle.js.map +1 -0
  88. package/dist/documentation.d.ts +111 -0
  89. package/dist/documentation.d.ts.map +1 -0
  90. package/dist/documentation.js +112 -0
  91. package/dist/documentation.js.map +1 -0
  92. package/dist/index.d.ts +10 -0
  93. package/dist/index.d.ts.map +1 -1
  94. package/dist/index.js +10 -0
  95. package/dist/index.js.map +1 -1
  96. package/dist/operation-progress.d.ts +26 -0
  97. package/dist/operation-progress.d.ts.map +1 -0
  98. package/dist/operation-progress.js +92 -0
  99. package/dist/operation-progress.js.map +1 -0
  100. package/dist/optional-backend.d.ts +14 -0
  101. package/dist/optional-backend.d.ts.map +1 -0
  102. package/dist/optional-backend.js +145 -0
  103. package/dist/optional-backend.js.map +1 -0
  104. package/dist/session.d.ts +22 -0
  105. package/dist/session.d.ts.map +1 -1
  106. package/dist/session.js +36 -0
  107. package/dist/session.js.map +1 -1
  108. package/dist/workspace-loader.d.ts.map +1 -1
  109. package/dist/workspace-loader.js +17 -2
  110. package/dist/workspace-loader.js.map +1 -1
  111. package/dist/workspace-operation.d.ts +3 -0
  112. package/dist/workspace-operation.d.ts.map +1 -0
  113. package/dist/workspace-operation.js +45 -0
  114. package/dist/workspace-operation.js.map +1 -0
  115. package/dist/workspace.d.ts.map +1 -1
  116. package/dist/workspace.js +1 -0
  117. package/dist/workspace.js.map +1 -1
  118. package/package.json +18 -4
  119. package/templates/backend/Dockerfile +20 -0
  120. package/templates/backend/package.json +27 -0
  121. package/templates/backend/src/app.module.ts +23 -0
  122. package/templates/backend/src/main.ts +5 -0
  123. package/templates/backend/tsconfig.json +9 -0
@@ -1,8 +1,9 @@
1
- import { type DeploymentEnvironment, type DeploymentRun, type DevkitResult, type Diagnostic, type ConfigurationValidationResult, type WorkspaceIdentity } from "openxiangda-contracts";
1
+ import type { DeploymentStrategy } from 'openxiangda-contracts';
2
+ import { OPENXIANGDA_CONTRACT_VERSION, SCHEMA_VERSIONS, type DeploymentEnvironment, type DeploymentRun, type DevkitResult, type Diagnostic, type ConfigurationValidationResult, type WorkspaceIdentity } from "openxiangda-contracts";
2
3
  import { type CompiledAppPackage } from "./compiler/index.js";
3
4
  import { OpenXiangdaControlPlaneClient, type CreateApplicationSecretInput, type CreateNativeRoleMembershipInput, type CreateOAuthClientInput, type ControlPlaneClientOptions, type NativeRelationshipGrantFilter, type RotateApplicationSecretInput, type UpdateApplicationSecretInput, type UpdateNativeRoleMembershipInput, type UpdateOAuthClientInput } from "./control-plane-client.js";
4
5
  import { type ToolchainCapsule } from "./toolchain-capsule.js";
5
- import { type AppSpecRisk } from "./app-spec.js";
6
+ import { type AppSpecContractIndex, type AppSpecRisk } from "./app-spec.js";
6
7
  export interface GenerateOptions {
7
8
  root?: string;
8
9
  check?: boolean;
@@ -39,10 +40,8 @@ export interface SealedArtifactStatus {
39
40
  reasonCode?: "OPENXIANGDA_CHECK_DOES_NOT_SEAL";
40
41
  nextCommand: "openxiangda check" | "openxiangda deploy";
41
42
  }
42
- interface SealedApplication extends BuiltApplication {
43
- artifactContent: Record<string, string>;
44
- }
45
43
  export interface DeployOptions extends BuildOptions {
44
+ deploymentStrategy?: DeploymentStrategy;
46
45
  environment: "preproduction";
47
46
  environmentId?: string;
48
47
  idempotencyKey?: string;
@@ -56,9 +55,61 @@ export declare class OpenXiangdaApplicationServices {
56
55
  client?: OpenXiangdaControlPlaneClient;
57
56
  clientOptions?: ControlPlaneClientOptions;
58
57
  });
59
- workspaceContext(root?: string): Promise<DevkitResult<import("openxiangda-contracts").WorkspaceContext>>;
58
+ workspaceContext(root?: string): Promise<DevkitResult<{
59
+ development: {
60
+ application: {
61
+ path: string;
62
+ content: string;
63
+ } | null;
64
+ records: {
65
+ id: string;
66
+ title: string;
67
+ status: string;
68
+ path: string;
69
+ kind: import("./app-spec.js").AppSpecDocumentKind;
70
+ }[];
71
+ schemaVersion: "openxiangda.development-lifecycle/v2";
72
+ stage: "design-incomplete" | "ready-for-implementation" | "ready-for-test";
73
+ readyForImplementation: boolean;
74
+ design: {
75
+ readyForImplementation: boolean;
76
+ reviewId: string | null;
77
+ scope: "change" | "initial" | null;
78
+ baselineDigest: string | null;
79
+ documentIds: string[];
80
+ diagnostics: Diagnostic[];
81
+ };
82
+ readyForTest: boolean;
83
+ changeId: string | null;
84
+ acceptanceIds: string[];
85
+ currentSpecDigest: string | null;
86
+ diagnostics: Diagnostic[];
87
+ nextCommand: string;
88
+ };
89
+ schemaVersion: typeof SCHEMA_VERSIONS.workspaceContext;
90
+ workspace: WorkspaceIdentity;
91
+ roots: {
92
+ frontend: string;
93
+ backend: string;
94
+ platform: string;
95
+ };
96
+ toolchain: {
97
+ packageName?: "openxiangda-devkit-core";
98
+ version: string;
99
+ contractVersion: typeof OPENXIANGDA_CONTRACT_VERSION;
100
+ nodeVersion: string;
101
+ packageManager: string;
102
+ studio?: import("openxiangda-contracts").StudioWorkspaceProtocolCapabilities;
103
+ };
104
+ environments: Array<{
105
+ id?: string;
106
+ name: string;
107
+ kind: DeploymentEnvironment;
108
+ }>;
109
+ changedDomains: Array<"frontend" | "backend" | "data" | "authz" | "events" | "workflow" | "config">;
110
+ }>>;
60
111
  appSpecInit(root?: string): Promise<DevkitResult<{
61
- schemaVersion: "openxiangda.appspec/context/v2";
112
+ schemaVersion: "openxiangda.appspec/context/v4";
62
113
  enabled: boolean;
63
114
  advisory: boolean;
64
115
  releaseGate: boolean;
@@ -72,7 +123,7 @@ export declare class OpenXiangdaApplicationServices {
72
123
  resources?: string[];
73
124
  actions?: string[];
74
125
  }): Promise<DevkitResult<{
75
- schemaVersion: "openxiangda.appspec/context/v2";
126
+ schemaVersion: "openxiangda.appspec/context/v4";
76
127
  enabled: boolean;
77
128
  advisory: boolean;
78
129
  releaseGate: boolean;
@@ -89,7 +140,7 @@ export declare class OpenXiangdaApplicationServices {
89
140
  resources?: string[];
90
141
  actions?: string[];
91
142
  }): Promise<DevkitResult<{
92
- schemaVersion: "openxiangda.appspec/context/v2";
143
+ schemaVersion: "openxiangda.appspec/context/v4";
93
144
  enabled: boolean;
94
145
  advisory: boolean;
95
146
  releaseGate: boolean;
@@ -97,15 +148,157 @@ export declare class OpenXiangdaApplicationServices {
97
148
  risk: AppSpecRisk;
98
149
  status: string;
99
150
  }>>;
100
- appSpecContext(root?: string, selector?: string): Promise<DevkitResult<import("./app-spec.js").AppSpecContext>>;
101
- appSpecCheck(root?: string): Promise<DevkitResult<import("./app-spec.js").AppSpecContext>>;
151
+ appSpecContext(root?: string, selector?: string, historyOffset?: number): Promise<DevkitResult<{
152
+ lifecycle: {
153
+ schemaVersion: "openxiangda.development-lifecycle/v2";
154
+ stage: "design-incomplete" | "ready-for-implementation" | "ready-for-test";
155
+ readyForImplementation: boolean;
156
+ design: {
157
+ readyForImplementation: boolean;
158
+ reviewId: string | null;
159
+ scope: "change" | "initial" | null;
160
+ baselineDigest: string | null;
161
+ documentIds: string[];
162
+ diagnostics: Diagnostic[];
163
+ };
164
+ readyForTest: boolean;
165
+ changeId: string | null;
166
+ acceptanceIds: string[];
167
+ currentSpecDigest: string | null;
168
+ diagnostics: Diagnostic[];
169
+ nextCommand: string;
170
+ };
171
+ schemaVersion: "openxiangda.appspec/context/v4";
172
+ enabled: boolean;
173
+ mode: "guided";
174
+ releaseGate: true;
175
+ root: "appspec";
176
+ selector: string | null;
177
+ contract: AppSpecContractIndex;
178
+ index: {
179
+ application: import("./app-spec.js").AppSpecDocumentSummary | null;
180
+ capabilities: import("./app-spec.js").AppSpecDocumentSummary[];
181
+ activeChanges: import("./app-spec.js").AppSpecDocumentSummary[];
182
+ decisions: import("./app-spec.js").AppSpecDocumentSummary[];
183
+ designs: import("./app-spec.js").AppSpecDocumentSummary[];
184
+ history: import("./app-spec.js").AppSpecDocumentSummary[];
185
+ };
186
+ application: import("./app-spec.js").AppSpecDocument | null;
187
+ capabilities: import("./app-spec.js").AppSpecDocument[];
188
+ activeChanges: import("./app-spec.js").AppSpecDocument[];
189
+ archivedChanges: import("./app-spec.js").AppSpecDocument[];
190
+ decisions: import("./app-spec.js").AppSpecDocument[];
191
+ designs: import("./app-spec.js").AppSpecDocument[];
192
+ historyPage: {
193
+ offset: number;
194
+ limit: number;
195
+ total: number;
196
+ nextOffset: number | null;
197
+ };
198
+ contextBudget: {
199
+ maximumBytes: number;
200
+ contentBytes: number;
201
+ truncated: boolean;
202
+ omitted: import("./app-spec.js").AppSpecDocumentSummary[];
203
+ };
204
+ stats: {
205
+ files: number;
206
+ bytes: number;
207
+ capabilities: number;
208
+ activeChanges: number;
209
+ historyChanges: number;
210
+ decisions: number;
211
+ designs: number;
212
+ requirements: number;
213
+ acceptanceScenarios: number;
214
+ };
215
+ workspaceDigest: string | null;
216
+ selectionDigest: string | null;
217
+ diagnostics: Diagnostic[];
218
+ }>>;
219
+ appSpecCheck(root?: string): Promise<DevkitResult<{
220
+ lifecycle: {
221
+ schemaVersion: "openxiangda.development-lifecycle/v2";
222
+ stage: "design-incomplete" | "ready-for-implementation" | "ready-for-test";
223
+ readyForImplementation: boolean;
224
+ design: {
225
+ readyForImplementation: boolean;
226
+ reviewId: string | null;
227
+ scope: "change" | "initial" | null;
228
+ baselineDigest: string | null;
229
+ documentIds: string[];
230
+ diagnostics: Diagnostic[];
231
+ };
232
+ readyForTest: boolean;
233
+ changeId: string | null;
234
+ acceptanceIds: string[];
235
+ currentSpecDigest: string | null;
236
+ diagnostics: Diagnostic[];
237
+ nextCommand: string;
238
+ };
239
+ schemaVersion: "openxiangda.appspec/context/v4";
240
+ enabled: boolean;
241
+ mode: "guided";
242
+ releaseGate: true;
243
+ root: "appspec";
244
+ selector: string | null;
245
+ contract: AppSpecContractIndex;
246
+ index: {
247
+ application: import("./app-spec.js").AppSpecDocumentSummary | null;
248
+ capabilities: import("./app-spec.js").AppSpecDocumentSummary[];
249
+ activeChanges: import("./app-spec.js").AppSpecDocumentSummary[];
250
+ decisions: import("./app-spec.js").AppSpecDocumentSummary[];
251
+ designs: import("./app-spec.js").AppSpecDocumentSummary[];
252
+ history: import("./app-spec.js").AppSpecDocumentSummary[];
253
+ };
254
+ application: import("./app-spec.js").AppSpecDocument | null;
255
+ capabilities: import("./app-spec.js").AppSpecDocument[];
256
+ activeChanges: import("./app-spec.js").AppSpecDocument[];
257
+ archivedChanges: import("./app-spec.js").AppSpecDocument[];
258
+ decisions: import("./app-spec.js").AppSpecDocument[];
259
+ designs: import("./app-spec.js").AppSpecDocument[];
260
+ historyPage: {
261
+ offset: number;
262
+ limit: number;
263
+ total: number;
264
+ nextOffset: number | null;
265
+ };
266
+ contextBudget: {
267
+ maximumBytes: number;
268
+ contentBytes: number;
269
+ truncated: boolean;
270
+ omitted: import("./app-spec.js").AppSpecDocumentSummary[];
271
+ };
272
+ stats: {
273
+ files: number;
274
+ bytes: number;
275
+ capabilities: number;
276
+ activeChanges: number;
277
+ historyChanges: number;
278
+ decisions: number;
279
+ designs: number;
280
+ requirements: number;
281
+ acceptanceScenarios: number;
282
+ };
283
+ workspaceDigest: string | null;
284
+ selectionDigest: string | null;
285
+ diagnostics: Diagnostic[];
286
+ }>>;
287
+ appSpecVerify(root: string | undefined, deploymentId: string, evidencePath?: string): Promise<DevkitResult<{
288
+ ok: boolean;
289
+ path: string;
290
+ sourceDeploymentId: string;
291
+ packageDigest: string;
292
+ scenarios: any;
293
+ diagnostics: Diagnostic[];
294
+ }>>;
102
295
  appSpecClose(input: {
103
296
  root?: string;
104
297
  id: string;
105
298
  summary?: string;
106
299
  currentSpec?: "merged" | "not-applicable";
107
300
  }): Promise<DevkitResult<{
108
- schemaVersion: "openxiangda.appspec/context/v2";
301
+ schemaVersion: "openxiangda.appspec/context/v4";
109
302
  enabled: boolean;
110
303
  advisory: boolean;
111
304
  releaseGate: boolean;
@@ -113,7 +306,7 @@ export declare class OpenXiangdaApplicationServices {
113
306
  status: string;
114
307
  converged: boolean;
115
308
  } | {
116
- schemaVersion: "openxiangda.appspec/context/v2";
309
+ schemaVersion: "openxiangda.appspec/context/v4";
117
310
  enabled: boolean;
118
311
  advisory: boolean;
119
312
  releaseGate: boolean;
@@ -147,6 +340,129 @@ export declare class OpenXiangdaApplicationServices {
147
340
  aiCatalogDigest: string;
148
341
  contract: import("openxiangda-contracts").ContractBundleV3;
149
342
  aiCatalog: import("openxiangda-contracts").AiCapabilityCatalog;
343
+ permissionReview: {
344
+ digest: string;
345
+ schemaVersion: "openxiangda.permission-review/v2";
346
+ appCode: string;
347
+ configDigest: string;
348
+ contractDigest: string;
349
+ authority: "declaration-projection";
350
+ runtimeAuthorizationRequired: true;
351
+ semantics: {
352
+ roleCapabilities: "sealed-declared-grants; current-user application roles are unioned";
353
+ roleDeniedCapabilities: "removed from that role during compilation; not a global deny across roles";
354
+ capabilityMatch: "static prerequisite only; never runtime allow";
355
+ fieldPolicies: "resource operation is required; field rules can only narrow it; empty is deny";
356
+ hiddenFields: "presentation only; not an authorization rule";
357
+ rowPolicies: "raw declarations; evaluated by the platform with current identity, grants and record facts";
358
+ workflowTasks: "platform Task Surface and fresh command token decide current participant, state, field and operation access";
359
+ navigation: "page selection and visibility do not grant resource or operation access";
360
+ perspectives: "read projections only; never replace the actor or mutation/workflow authorization";
361
+ };
362
+ roles: {
363
+ capabilityCodes: string[];
364
+ description?: string;
365
+ code: string;
366
+ name: string;
367
+ }[];
368
+ capabilities: import("openxiangda-contracts").AppCapabilityContract[];
369
+ perspectives: import("openxiangda-contracts").AppPerspectiveContract[];
370
+ pages: {
371
+ adminAccess: import("openxiangda-contracts").AppFrontendRouteAccess | null;
372
+ admin: import("openxiangda-contracts").AppAdminPageContract[];
373
+ custom: import("openxiangda-contracts").AppFrontendRouteContract[];
374
+ standard: import("openxiangda-contracts").AppRouteManifestEntryV3[];
375
+ };
376
+ resources: {
377
+ code: string;
378
+ name: string;
379
+ operationCapabilities: {
380
+ read: string;
381
+ create: string;
382
+ update: string;
383
+ delete: string;
384
+ };
385
+ dataPolicyCode: string | null;
386
+ mutationOwner: "native" | "action" | "readonly" | "workflow" | null;
387
+ generated: {
388
+ list?: boolean;
389
+ detail?: boolean;
390
+ create?: boolean;
391
+ update?: boolean;
392
+ delete?: boolean;
393
+ } | null;
394
+ views: {
395
+ code: string;
396
+ name: string;
397
+ generated: Required<{
398
+ list?: boolean;
399
+ detail?: boolean;
400
+ create?: boolean;
401
+ update?: boolean;
402
+ delete?: boolean;
403
+ }>;
404
+ fieldOrder: {
405
+ list: string[];
406
+ form: string[];
407
+ detail: string[];
408
+ };
409
+ mobile: {
410
+ enabled: boolean;
411
+ };
412
+ }[];
413
+ defaultFieldOrder: {
414
+ list: string[] | null;
415
+ form: string[] | null;
416
+ detail: string[] | null;
417
+ } | null;
418
+ fields: {
419
+ code: string;
420
+ type: "boolean" | "date" | "file" | "subtable" | "text.short" | "text.long" | "text.rich" | "number.integer" | "number.decimal" | "time" | "datetime" | "date-range" | "datetime-range" | "option.single" | "option.multiple" | "cascade.single" | "cascade.multiple" | "user.single" | "user.multiple" | "department.single" | "department.multiple" | "resource-ref.single" | "resource-ref.multiple" | "image" | "signature" | "address" | "location" | "uuid" | "json" | "serial-number";
421
+ label: string;
422
+ hidden: boolean;
423
+ system: boolean;
424
+ read: import("./compiler/permission-review.js").PermissionReviewFieldRequirement;
425
+ create: import("./compiler/permission-review.js").PermissionReviewFieldRequirement;
426
+ update: import("./compiler/permission-review.js").PermissionReviewFieldRequirement;
427
+ mask: "null" | "omit" | null;
428
+ }[];
429
+ }[];
430
+ authorization: {
431
+ authenticatedUserRoleCode: string | null;
432
+ dataPolicies: import("openxiangda-contracts").AppDataPolicyDeclaration[];
433
+ scopeDimensions: import("openxiangda-contracts").AppScopeDimensionDeclaration[];
434
+ scopeSources: import("openxiangda-contracts").AppScopeSourceDeclaration[];
435
+ roleMembershipSources: import("openxiangda-contracts").AppRoleMembershipSourceDeclaration[];
436
+ relationshipGrantSources: import("openxiangda-contracts").AppRelationshipGrantSourceDeclaration[];
437
+ authorizationTransitions: import("openxiangda-contracts").AppAuthorizationTransitionDeclaration[];
438
+ publicAccess: import("openxiangda-contracts").AnonymousPublicAccessContractV2 | null;
439
+ };
440
+ operations: import("openxiangda-contracts").AppApiOperationContract[];
441
+ workflows: {
442
+ runtimeAuthorizationRequired: true;
443
+ contracts: import("openxiangda-contracts").AppWorkflowContract[];
444
+ definitions: {
445
+ workflowCode: string;
446
+ version: number;
447
+ subject: import("openxiangda-contracts").WorkflowSubjectDefinition;
448
+ organizationContext: {
449
+ department?: {
450
+ source: "none" | "user_primary_department" | "choose_if_multiple" | "always_choose" | "fixed" | "from_input" | "from_role_scope";
451
+ required?: boolean;
452
+ value?: string;
453
+ path?: string;
454
+ dimension?: string;
455
+ };
456
+ } | null;
457
+ startAt: string;
458
+ nodes: Record<string, import("openxiangda-contracts").WorkflowNode>;
459
+ }[];
460
+ bindings: import("openxiangda-contracts").NativeWorkflowBindingDeclaration[];
461
+ activations: import("openxiangda-contracts").NativeWorkflowActivationDeclaration[];
462
+ providers: import("openxiangda-contracts").NativeWorkflowProviderDeclaration[];
463
+ editableParameters: import("openxiangda-contracts").NativeWorkflowEditableParameterDeclaration[];
464
+ };
465
+ };
150
466
  adminNavigationAuthoring: {
151
467
  schemaVersion: string;
152
468
  owner: string;
@@ -170,7 +486,41 @@ export declare class OpenXiangdaApplicationServices {
170
486
  workflowProviders: number;
171
487
  };
172
488
  }>>;
489
+ contractContext(root?: string, input?: {
490
+ selector?: string;
491
+ offset?: number;
492
+ limit?: number;
493
+ }): Promise<{
494
+ data: {
495
+ configDigest: string;
496
+ contractDigest: string;
497
+ aiCatalogDigest: string;
498
+ counts: {
499
+ backendSecrets: number;
500
+ backendOperations: number;
501
+ frontendRoutes: number;
502
+ anonymousPublicPolicies: number;
503
+ dataResources: number;
504
+ aiCapabilities: number;
505
+ eventSubscriptions: number;
506
+ timerSubscriptions: number;
507
+ workflowDefinitions: number;
508
+ workflowBindings: number;
509
+ workflowProviders: number;
510
+ };
511
+ selector: string;
512
+ selection: unknown;
513
+ };
514
+ ok: boolean;
515
+ operation: string;
516
+ workspace: WorkspaceIdentity;
517
+ diagnostics: Diagnostic[];
518
+ nextActions: import("openxiangda-contracts").NextAction[];
519
+ traceId?: string;
520
+ }>;
173
521
  platformCapabilities(root?: string): Promise<DevkitResult<import("openxiangda-contracts").PlatformCapabilities>>;
522
+ administrationContext(root: string | undefined, environmentKey?: string): Promise<DevkitResult<import("openxiangda-contracts").ApplicationAdministrationContext>>;
523
+ workflowNodeConfigurations(root: string | undefined, workflowCode: string, environmentKey?: string): Promise<DevkitResult<import("openxiangda-contracts").WorkflowNodeConfigurations>>;
174
524
  provisionApplication(root?: string): Promise<DevkitResult<undefined> | DevkitResult<import("openxiangda-contracts").ProvisionedApplication>>;
175
525
  oauthClients(root?: string): Promise<DevkitResult<{
176
526
  items: import("openxiangda-contracts").OAuthClient[];
@@ -225,25 +575,14 @@ export declare class OpenXiangdaApplicationServices {
225
575
  limit?: number;
226
576
  offset?: number;
227
577
  }): Promise<DevkitResult<import("openxiangda-contracts").NativeRoleMembershipPage>>;
228
- createNativeRoleMembership(root: string | undefined, input: CreateNativeRoleMembershipInput): Promise<DevkitResult<{
229
- membership: import("openxiangda-contracts").NativeRoleMembership;
230
- roleSubjectSetVersion: string;
231
- }>>;
232
- updateNativeRoleMembership(root: string | undefined, membershipId: string, input: UpdateNativeRoleMembershipInput): Promise<DevkitResult<{
233
- membership: import("openxiangda-contracts").NativeRoleMembership;
234
- roleSubjectSetVersion: string;
235
- revokedSessionCount: number;
236
- }>>;
578
+ createNativeRoleMembership(root: string | undefined, input: CreateNativeRoleMembershipInput): Promise<DevkitResult<import("openxiangda-contracts").NativeRoleMembershipMutationResult>>;
579
+ updateNativeRoleMembership(root: string | undefined, membershipId: string, input: UpdateNativeRoleMembershipInput): Promise<DevkitResult<import("openxiangda-contracts").NativeRoleMembershipMutationResult>>;
237
580
  revokeNativeRoleMembership(root: string | undefined, membershipId: string, input: {
238
581
  environmentKey: DeploymentEnvironment;
239
582
  operationId: string;
240
583
  expectedRevision: number;
241
- }): Promise<DevkitResult<{
242
- membership: import("openxiangda-contracts").NativeRoleMembership;
243
- roleSubjectSetVersion: string;
244
- revokedRelationshipCount: number;
245
- revokedSessionCount: number;
246
- }>>;
584
+ reason: string;
585
+ }): Promise<DevkitResult<import("openxiangda-contracts").NativeRoleMembershipMutationResult>>;
247
586
  nativeSuperAdmins(root: string | undefined, environmentKey: string, input?: {
248
587
  status?: "active" | "revoked";
249
588
  userId?: string;
@@ -336,7 +675,7 @@ export declare class OpenXiangdaApplicationServices {
336
675
  contractDigest: string;
337
676
  aiCatalogDigest: string;
338
677
  }>>;
339
- check(root?: string, environmentKey?: DeploymentEnvironment): Promise<DevkitResult<{
678
+ check(root?: string, environmentKey?: DeploymentEnvironment): Promise<DevkitResult<undefined> | DevkitResult<{
340
679
  generated: {
341
680
  output: string;
342
681
  changed: boolean;
@@ -345,18 +684,45 @@ export declare class OpenXiangdaApplicationServices {
345
684
  } | undefined;
346
685
  compatibility: ConfigurationValidationResult | null;
347
686
  stages: {
687
+ name: string;
688
+ state: "passed" | "failed" | "skipped";
348
689
  ok: boolean;
349
- exitCode: number;
690
+ exitCode: number | null;
350
691
  output: string;
351
- name: string;
692
+ reused?: boolean;
352
693
  }[];
353
694
  sealedArtifact: SealedArtifactStatus;
354
695
  appSpec: {
696
+ lifecycle: {
697
+ schemaVersion: "openxiangda.development-lifecycle/v2";
698
+ stage: "design-incomplete" | "ready-for-implementation" | "ready-for-test";
699
+ readyForImplementation: boolean;
700
+ design: {
701
+ readyForImplementation: boolean;
702
+ reviewId: string | null;
703
+ scope: "change" | "initial" | null;
704
+ baselineDigest: string | null;
705
+ documentIds: string[];
706
+ diagnostics: Diagnostic[];
707
+ };
708
+ readyForTest: boolean;
709
+ changeId: string | null;
710
+ acceptanceIds: string[];
711
+ currentSpecDigest: string | null;
712
+ diagnostics: Diagnostic[];
713
+ nextCommand: string;
714
+ };
355
715
  enabled: boolean;
356
- mode: "advisory";
357
- releaseGate: false;
716
+ mode: "guided";
717
+ releaseGate: true;
358
718
  workspaceDigest: string | null;
359
719
  selectionDigest: string | null;
720
+ historyPage: {
721
+ offset: number;
722
+ limit: number;
723
+ total: number;
724
+ nextOffset: number | null;
725
+ };
360
726
  contextBudget: {
361
727
  maximumBytes: number;
362
728
  contentBytes: number;
@@ -370,6 +736,7 @@ export declare class OpenXiangdaApplicationServices {
370
736
  activeChanges: number;
371
737
  historyChanges: number;
372
738
  decisions: number;
739
+ designs: number;
373
740
  requirements: number;
374
741
  acceptanceScenarios: number;
375
742
  };
@@ -385,6 +752,7 @@ export declare class OpenXiangdaApplicationServices {
385
752
  ok: boolean;
386
753
  exitCode: number;
387
754
  output: string;
755
+ outputTruncated: boolean;
388
756
  }>>;
389
757
  build(input?: BuildOptions): Promise<DevkitResult<BuiltApplication>>;
390
758
  buildPreview(root?: string): Promise<{
@@ -401,18 +769,129 @@ export declare class OpenXiangdaApplicationServices {
401
769
  } | undefined;
402
770
  compatibility: ConfigurationValidationResult | null;
403
771
  stages: {
772
+ name: string;
773
+ state: "passed" | "failed" | "skipped";
404
774
  ok: boolean;
405
- exitCode: number;
775
+ exitCode: number | null;
406
776
  output: string;
777
+ reused?: boolean;
778
+ }[];
779
+ sealedArtifact: SealedArtifactStatus;
780
+ appSpec: {
781
+ lifecycle: {
782
+ schemaVersion: "openxiangda.development-lifecycle/v2";
783
+ stage: "design-incomplete" | "ready-for-implementation" | "ready-for-test";
784
+ readyForImplementation: boolean;
785
+ design: {
786
+ readyForImplementation: boolean;
787
+ reviewId: string | null;
788
+ scope: "change" | "initial" | null;
789
+ baselineDigest: string | null;
790
+ documentIds: string[];
791
+ diagnostics: Diagnostic[];
792
+ };
793
+ readyForTest: boolean;
794
+ changeId: string | null;
795
+ acceptanceIds: string[];
796
+ currentSpecDigest: string | null;
797
+ diagnostics: Diagnostic[];
798
+ nextCommand: string;
799
+ };
800
+ enabled: boolean;
801
+ mode: "guided";
802
+ releaseGate: true;
803
+ workspaceDigest: string | null;
804
+ selectionDigest: string | null;
805
+ historyPage: {
806
+ offset: number;
807
+ limit: number;
808
+ total: number;
809
+ nextOffset: number | null;
810
+ };
811
+ contextBudget: {
812
+ maximumBytes: number;
813
+ contentBytes: number;
814
+ truncated: boolean;
815
+ omitted: import("./app-spec.js").AppSpecDocumentSummary[];
816
+ };
817
+ stats: {
818
+ files: number;
819
+ bytes: number;
820
+ capabilities: number;
821
+ activeChanges: number;
822
+ historyChanges: number;
823
+ decisions: number;
824
+ designs: number;
825
+ requirements: number;
826
+ acceptanceScenarios: number;
827
+ };
828
+ diagnostics: {
829
+ errors: number;
830
+ warnings: number;
831
+ info: number;
832
+ };
833
+ nextCommand: string;
834
+ };
835
+ } | undefined;
836
+ };
837
+ ok: boolean;
838
+ workspace: WorkspaceIdentity;
839
+ diagnostics: Diagnostic[];
840
+ nextActions: import("openxiangda-contracts").NextAction[];
841
+ traceId?: string;
842
+ } | {
843
+ operation: string;
844
+ data: {
845
+ sealed: boolean;
846
+ packageDigest: null;
847
+ check: {
848
+ generated: {
849
+ output: string;
850
+ changed: boolean;
851
+ contractDigest: string;
852
+ aiCatalogDigest: string;
853
+ } | undefined;
854
+ compatibility: ConfigurationValidationResult | null;
855
+ stages: {
407
856
  name: string;
857
+ state: "passed" | "failed" | "skipped";
858
+ ok: boolean;
859
+ exitCode: number | null;
860
+ output: string;
861
+ reused?: boolean;
408
862
  }[];
409
863
  sealedArtifact: SealedArtifactStatus;
410
864
  appSpec: {
865
+ lifecycle: {
866
+ schemaVersion: "openxiangda.development-lifecycle/v2";
867
+ stage: "design-incomplete" | "ready-for-implementation" | "ready-for-test";
868
+ readyForImplementation: boolean;
869
+ design: {
870
+ readyForImplementation: boolean;
871
+ reviewId: string | null;
872
+ scope: "change" | "initial" | null;
873
+ baselineDigest: string | null;
874
+ documentIds: string[];
875
+ diagnostics: Diagnostic[];
876
+ };
877
+ readyForTest: boolean;
878
+ changeId: string | null;
879
+ acceptanceIds: string[];
880
+ currentSpecDigest: string | null;
881
+ diagnostics: Diagnostic[];
882
+ nextCommand: string;
883
+ };
411
884
  enabled: boolean;
412
- mode: "advisory";
413
- releaseGate: false;
885
+ mode: "guided";
886
+ releaseGate: true;
414
887
  workspaceDigest: string | null;
415
888
  selectionDigest: string | null;
889
+ historyPage: {
890
+ offset: number;
891
+ limit: number;
892
+ total: number;
893
+ nextOffset: number | null;
894
+ };
416
895
  contextBudget: {
417
896
  maximumBytes: number;
418
897
  contentBytes: number;
@@ -426,6 +905,7 @@ export declare class OpenXiangdaApplicationServices {
426
905
  activeChanges: number;
427
906
  historyChanges: number;
428
907
  decisions: number;
908
+ designs: number;
429
909
  requirements: number;
430
910
  acceptanceScenarios: number;
431
911
  };
@@ -446,20 +926,82 @@ export declare class OpenXiangdaApplicationServices {
446
926
  }>;
447
927
  private buildSealed;
448
928
  deploymentPlan(input: {
929
+ deploymentStrategy?: DeploymentStrategy;
449
930
  root?: string;
450
931
  environment: "preproduction";
932
+ environmentId?: string;
933
+ idempotencyKey?: string;
451
934
  }): Promise<DevkitResult<undefined> | DevkitResult<{
935
+ lifecycle: {
936
+ schemaVersion: "openxiangda.development-lifecycle/v2";
937
+ stage: "design-incomplete" | "ready-for-implementation" | "ready-for-test";
938
+ readyForImplementation: boolean;
939
+ design: {
940
+ readyForImplementation: boolean;
941
+ reviewId: string | null;
942
+ scope: "change" | "initial" | null;
943
+ baselineDigest: string | null;
944
+ documentIds: string[];
945
+ diagnostics: Diagnostic[];
946
+ };
947
+ readyForTest: boolean;
948
+ changeId: string | null;
949
+ acceptanceIds: string[];
950
+ currentSpecDigest: string | null;
951
+ diagnostics: Diagnostic[];
952
+ nextCommand: string;
953
+ };
954
+ }> | DevkitResult<{
955
+ runtimeCapacity: import("openxiangda-contracts").RuntimeCapacityPreflight;
452
956
  environment: "preproduction";
453
957
  appCode: string;
454
958
  sealed: boolean;
455
959
  packageDigest: null;
456
960
  buildOwner: string;
961
+ source: import("./delivery-source.js").PublishedDeliverySource;
457
962
  frontendRoot: string;
458
963
  backendRoot: string;
459
964
  configDigest: string;
460
965
  contractDigest: string;
461
966
  }>>;
462
- deploy(input: DeployOptions): Promise<DevkitResult<undefined> | DevkitResult<SealedApplication> | DevkitResult<DeploymentRun> | {
967
+ deploy(input: DeployOptions): Promise<DevkitResult<undefined> | DevkitResult<{
968
+ lifecycle: {
969
+ schemaVersion: "openxiangda.development-lifecycle/v2";
970
+ stage: "design-incomplete" | "ready-for-implementation" | "ready-for-test";
971
+ readyForImplementation: boolean;
972
+ design: {
973
+ readyForImplementation: boolean;
974
+ reviewId: string | null;
975
+ scope: "change" | "initial" | null;
976
+ baselineDigest: string | null;
977
+ documentIds: string[];
978
+ diagnostics: Diagnostic[];
979
+ };
980
+ readyForTest: boolean;
981
+ changeId: string | null;
982
+ acceptanceIds: string[];
983
+ currentSpecDigest: string | null;
984
+ diagnostics: Diagnostic[];
985
+ nextCommand: string;
986
+ };
987
+ }> | DevkitResult<{
988
+ sealedArtifact: SealedArtifactStatus;
989
+ package: CompiledAppPackage;
990
+ artifactContent: Record<string, string>;
991
+ }> | DevkitResult<DeploymentRun> | {
992
+ operation: string;
993
+ ok: boolean;
994
+ workspace: WorkspaceIdentity;
995
+ data?: {
996
+ output: string;
997
+ changed: boolean;
998
+ contractDigest: string;
999
+ aiCatalogDigest: string;
1000
+ };
1001
+ diagnostics: Diagnostic[];
1002
+ nextActions: import("openxiangda-contracts").NextAction[];
1003
+ traceId?: string;
1004
+ } | {
463
1005
  operation: string;
464
1006
  ok: boolean;
465
1007
  workspace: WorkspaceIdentity;
@@ -472,18 +1014,45 @@ export declare class OpenXiangdaApplicationServices {
472
1014
  } | undefined;
473
1015
  compatibility: ConfigurationValidationResult | null;
474
1016
  stages: {
1017
+ name: string;
1018
+ state: "passed" | "failed" | "skipped";
475
1019
  ok: boolean;
476
- exitCode: number;
1020
+ exitCode: number | null;
477
1021
  output: string;
478
- name: string;
1022
+ reused?: boolean;
479
1023
  }[];
480
1024
  sealedArtifact: SealedArtifactStatus;
481
1025
  appSpec: {
1026
+ lifecycle: {
1027
+ schemaVersion: "openxiangda.development-lifecycle/v2";
1028
+ stage: "design-incomplete" | "ready-for-implementation" | "ready-for-test";
1029
+ readyForImplementation: boolean;
1030
+ design: {
1031
+ readyForImplementation: boolean;
1032
+ reviewId: string | null;
1033
+ scope: "change" | "initial" | null;
1034
+ baselineDigest: string | null;
1035
+ documentIds: string[];
1036
+ diagnostics: Diagnostic[];
1037
+ };
1038
+ readyForTest: boolean;
1039
+ changeId: string | null;
1040
+ acceptanceIds: string[];
1041
+ currentSpecDigest: string | null;
1042
+ diagnostics: Diagnostic[];
1043
+ nextCommand: string;
1044
+ };
482
1045
  enabled: boolean;
483
- mode: "advisory";
484
- releaseGate: false;
1046
+ mode: "guided";
1047
+ releaseGate: true;
485
1048
  workspaceDigest: string | null;
486
1049
  selectionDigest: string | null;
1050
+ historyPage: {
1051
+ offset: number;
1052
+ limit: number;
1053
+ total: number;
1054
+ nextOffset: number | null;
1055
+ };
487
1056
  contextBudget: {
488
1057
  maximumBytes: number;
489
1058
  contentBytes: number;
@@ -497,6 +1066,7 @@ export declare class OpenXiangdaApplicationServices {
497
1066
  activeChanges: number;
498
1067
  historyChanges: number;
499
1068
  decisions: number;
1069
+ designs: number;
500
1070
  requirements: number;
501
1071
  acceptanceScenarios: number;
502
1072
  };
@@ -512,6 +1082,7 @@ export declare class OpenXiangdaApplicationServices {
512
1082
  nextActions: import("openxiangda-contracts").NextAction[];
513
1083
  traceId?: string;
514
1084
  }>;
1085
+ private runtimeCapacityPlan;
515
1086
  deploymentStatus(root: string | undefined, deploymentId?: string): Promise<DevkitResult<undefined> | DevkitResult<DeploymentRun>>;
516
1087
  environmentStatus(root?: string): Promise<DevkitResult<import("openxiangda-contracts").ApplicationEnvironmentList>>;
517
1088
  startEnvironment(root: string | undefined, environment: DeploymentEnvironment, options?: {
@@ -562,6 +1133,16 @@ export declare class OpenXiangdaApplicationServices {
562
1133
  retry(root: string | undefined, deploymentId: string): Promise<DevkitResult<DeploymentRun>>;
563
1134
  cancel(root: string | undefined, deploymentId: string): Promise<DevkitResult<DeploymentRun>>;
564
1135
  private deploymentRecoveryActions;
1136
+ productionDeploymentPlan(root: string | undefined, deploymentId: string): Promise<DevkitResult<{
1137
+ environment: string;
1138
+ sourceDeploymentId: string;
1139
+ appVersionId: string;
1140
+ packageDigest: string;
1141
+ sealed: boolean;
1142
+ submitted: boolean;
1143
+ rebuild: boolean;
1144
+ businessAcceptance: string;
1145
+ }>>;
565
1146
  deployProduction(root: string | undefined, deploymentId: string): Promise<DevkitResult<undefined> | DevkitResult<DeploymentRun>>;
566
1147
  private productionPromotionDiagnostics;
567
1148
  rollback(root: string | undefined, environment: DeploymentEnvironment, appVersionId: string, options?: {
@@ -581,7 +1162,10 @@ export declare class OpenXiangdaApplicationServices {
581
1162
  private configurationCompatibilityDiagnostic;
582
1163
  private client;
583
1164
  private get toolchainVersion();
1165
+ private deliveryCacheContext;
584
1166
  private get toolchainCapsule();
1167
+ private initializeBackend;
1168
+ private packageScriptLabel;
585
1169
  private runPackageScript;
586
1170
  private repositoryIdentity;
587
1171
  private directoryBundle;
@@ -596,5 +1180,4 @@ export declare class OpenXiangdaApplicationServices {
596
1180
  private ok;
597
1181
  private result;
598
1182
  }
599
- export {};
600
1183
  //# sourceMappingURL=application-services.d.ts.map