@lace-cloud/host 0.32.0 → 0.33.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.cjs +132 -130
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +129 -122
- package/dist/index.d.ts +129 -122
- package/dist/index.mjs +132 -130
- package/dist/index.mjs.map +1 -1
- package/package.json +16 -7
package/dist/index.d.mts
CHANGED
|
@@ -317,6 +317,133 @@ interface MessageFns$2<T> {
|
|
|
317
317
|
fromPartial<I extends Exact$2<DeepPartial$2<T>, I>>(object: I): T;
|
|
318
318
|
}
|
|
319
319
|
|
|
320
|
+
/**
|
|
321
|
+
* Reason is the one vocabulary of what a failure asks of the developer.
|
|
322
|
+
* The engine attaches it to a refused RPC as a `ReasonDetail` in the
|
|
323
|
+
* status' error details, and a command's failure document names it; a
|
|
324
|
+
* client branches on it, never on the message's text. A failure the API
|
|
325
|
+
* decided carries the API's own code (`ReasonDetail.api_code`), and a
|
|
326
|
+
* reason only where that code has one: every code that asks the developer
|
|
327
|
+
* to sign in again is `REASON_UNAUTHENTICATED`.
|
|
328
|
+
*
|
|
329
|
+
* The vocabulary is a file of its own, in the engine's package, generated
|
|
330
|
+
* into a Go package of its own (internal/kernel/reason/pb): every CLI package
|
|
331
|
+
* that refuses with a reason names it from there, the execution side's
|
|
332
|
+
* included, without linking the engine's wire. service.proto imports it.
|
|
333
|
+
*/
|
|
334
|
+
declare enum Reason {
|
|
335
|
+
REASON_UNSPECIFIED = 0,
|
|
336
|
+
/**
|
|
337
|
+
* REASON_NOT_LACE_FORM - Placement: the resolved tree's own certification verdict is not Lace-form.
|
|
338
|
+
* module convert and module import: lacification cannot take the tree to
|
|
339
|
+
* lace shape; the report names each managed resource and the IR gap holding it.
|
|
340
|
+
*/
|
|
341
|
+
REASON_NOT_LACE_FORM = 1,
|
|
342
|
+
/** REASON_HASH_MISMATCH - Placement: the downloaded tree does not hash to what the registry vouched for. */
|
|
343
|
+
REASON_HASH_MISMATCH = 2,
|
|
344
|
+
/** REASON_REGISTRY_UNAVAILABLE - Placement: the registry could not be reached or answered with no verdict. */
|
|
345
|
+
REASON_REGISTRY_UNAVAILABLE = 3,
|
|
346
|
+
/** REASON_ROOT_LOCKED - SessionOpen: the root's canvas is open in another window. */
|
|
347
|
+
REASON_ROOT_LOCKED = 4,
|
|
348
|
+
/** REASON_UNSAVED - Generate: the session has unsaved edits; save first. */
|
|
349
|
+
REASON_UNSAVED = 5,
|
|
350
|
+
/** REASON_CONFLICT - Generate: the tree moved under the session's base; Keep or Reload first. */
|
|
351
|
+
REASON_CONFLICT = 6,
|
|
352
|
+
/**
|
|
353
|
+
* REASON_SOURCE_REFUSED - Every mutation, save and generate: the session's source tf is refused
|
|
354
|
+
* (`BundleState.source_refused`).
|
|
355
|
+
* module convert and module import: the tree's tf does not parse, has a
|
|
356
|
+
* non-empty residual report, or its Bundle fails its own validation.
|
|
357
|
+
* module validate, stack apply / stack destroy / registry register: a
|
|
358
|
+
* source the command reads does not parse; apply, destroy and register
|
|
359
|
+
* check it before the certification.
|
|
360
|
+
*/
|
|
361
|
+
REASON_SOURCE_REFUSED = 7,
|
|
362
|
+
/**
|
|
363
|
+
* REASON_NOT_GIT_REPOSITORY - Generate, module convert, module import and module fmt: the authoring
|
|
364
|
+
* root is not inside a git working tree.
|
|
365
|
+
* stack create --source: the directory is not inside a git working tree,
|
|
366
|
+
* so it has no place in a repository to bind the stack to.
|
|
367
|
+
*/
|
|
368
|
+
REASON_NOT_GIT_REPOSITORY = 8,
|
|
369
|
+
/** REASON_GENERATE_IN_PROGRESS - Generate: a Generate is already running on the session. */
|
|
370
|
+
REASON_GENERATE_IN_PROGRESS = 9,
|
|
371
|
+
/** REASON_NO_ORGANIZATION - A scoped command: no organization is selected. */
|
|
372
|
+
REASON_NO_ORGANIZATION = 10,
|
|
373
|
+
/** REASON_NO_TEAM - A team-scoped command: no team is selected in the organization. */
|
|
374
|
+
REASON_NO_TEAM = 11,
|
|
375
|
+
/**
|
|
376
|
+
* REASON_NO_CERTIFICATION - stack apply / stack destroy / registry register: the root has no
|
|
377
|
+
* certification.
|
|
378
|
+
*/
|
|
379
|
+
REASON_NO_CERTIFICATION = 12,
|
|
380
|
+
/**
|
|
381
|
+
* REASON_STALE_CERTIFICATION - stack apply / stack destroy / registry register: the certification
|
|
382
|
+
* does not certify the tree on disk — the tree changed since validate,
|
|
383
|
+
* another lace version wrote it, or its files are torn or mixed from two
|
|
384
|
+
* validates. Running validate again replaces it.
|
|
385
|
+
*/
|
|
386
|
+
REASON_STALE_CERTIFICATION = 13,
|
|
387
|
+
/**
|
|
388
|
+
* REASON_TOOL_MISSING - module scan / module docs / module fmt / module validate / module
|
|
389
|
+
* convert / module import / stack preview / stack apply / stack destroy:
|
|
390
|
+
* the tool the command runs (tfsec, terraform-docs, the pinned terraform)
|
|
391
|
+
* is not available. convert and module import run the pinned terraform
|
|
392
|
+
* through the validate each closes on, apply and destroy through their
|
|
393
|
+
* local plan.
|
|
394
|
+
*/
|
|
395
|
+
REASON_TOOL_MISSING = 14,
|
|
396
|
+
/**
|
|
397
|
+
* REASON_CROSS_SCOPE - ApplyAction: a wire whose source and target are owned by different
|
|
398
|
+
* modules crosses a group's boundary, which no single-scope edit makes.
|
|
399
|
+
* It is a refusal of the batch's content, carried on its GraphError.
|
|
400
|
+
* ReadWiringCandidates: a read whose two scopes differ, refused
|
|
401
|
+
* (FailedPrecondition) as such a wire is.
|
|
402
|
+
*/
|
|
403
|
+
REASON_CROSS_SCOPE = 15,
|
|
404
|
+
/**
|
|
405
|
+
* REASON_UNAUTHENTICATED - The developer must sign in: a command or a placement that needs
|
|
406
|
+
* credentials finds none (no `lace login`, no LACE_TOKEN), decided
|
|
407
|
+
* before any request; or the API refuses the ones sent with its code
|
|
408
|
+
* `unauthenticated`, which `ReasonDetail.api_code` then names.
|
|
409
|
+
*/
|
|
410
|
+
REASON_UNAUTHENTICATED = 16,
|
|
411
|
+
/**
|
|
412
|
+
* REASON_IMPORT_RESIDUAL - module import: a resource in the statefile has no import id the CLI
|
|
413
|
+
* derives. The failure names each in `importResiduals`; --allow-partial
|
|
414
|
+
* writes the import without them. Nothing was written.
|
|
415
|
+
*/
|
|
416
|
+
REASON_IMPORT_RESIDUAL = 17,
|
|
417
|
+
/**
|
|
418
|
+
* REASON_STACK_HAS_STATE - module import: the stack's state already holds resources, and import
|
|
419
|
+
* adopts into an empty stack. Nothing was read or written.
|
|
420
|
+
*/
|
|
421
|
+
REASON_STACK_HAS_STATE = 18,
|
|
422
|
+
/**
|
|
423
|
+
* REASON_NO_ORIGIN_REMOTE - stack create --source: the directory's repository has no `origin`
|
|
424
|
+
* remote, whose URL is the repository a stack's source binding names.
|
|
425
|
+
*/
|
|
426
|
+
REASON_NO_ORIGIN_REMOTE = 19,
|
|
427
|
+
/**
|
|
428
|
+
* REASON_IMPORT_UNDECLARED - module import: the statefile holds resources the converted tree does not
|
|
429
|
+
* declare, named in the failure's `addresses`; an import block adopts
|
|
430
|
+
* only a resource the tree declares. Nothing was written.
|
|
431
|
+
*/
|
|
432
|
+
REASON_IMPORT_UNDECLARED = 20,
|
|
433
|
+
/**
|
|
434
|
+
* REASON_ALREADY_IMPORTED - module import: the tree already imports resources the statefile holds,
|
|
435
|
+
* named in the failure's `addresses`; terraform refuses two imports of
|
|
436
|
+
* one address. Nothing was written.
|
|
437
|
+
*/
|
|
438
|
+
REASON_ALREADY_IMPORTED = 21,
|
|
439
|
+
/**
|
|
440
|
+
* REASON_NO_LOCKFILE - stack apply / stack destroy / stack preview: the root keeps no
|
|
441
|
+
* `.terraform.lock.hcl`; `lace module lock` writes it.
|
|
442
|
+
*/
|
|
443
|
+
REASON_NO_LOCKFILE = 22,
|
|
444
|
+
UNRECOGNIZED = -1
|
|
445
|
+
}
|
|
446
|
+
|
|
320
447
|
interface Bundle {
|
|
321
448
|
/**
|
|
322
449
|
* The format of this encoding: "2.0", at which every Expression carries
|
|
@@ -572,127 +699,6 @@ declare enum DiagnosticSeverity {
|
|
|
572
699
|
DIAGNOSTIC_SEVERITY_INFO = 3,
|
|
573
700
|
UNRECOGNIZED = -1
|
|
574
701
|
}
|
|
575
|
-
/**
|
|
576
|
-
* Reason is the one vocabulary of what a failure asks of the developer.
|
|
577
|
-
* The engine attaches it to a refused RPC as a `ReasonDetail` in the
|
|
578
|
-
* status' error details, and a command's failure document names it; a
|
|
579
|
-
* client branches on it, never on the message's text. A failure the API
|
|
580
|
-
* decided carries the API's own code (`ReasonDetail.api_code`), and a
|
|
581
|
-
* reason only where that code has one: every code that asks the developer
|
|
582
|
-
* to sign in again is `REASON_UNAUTHENTICATED`.
|
|
583
|
-
*/
|
|
584
|
-
declare enum Reason {
|
|
585
|
-
REASON_UNSPECIFIED = 0,
|
|
586
|
-
/**
|
|
587
|
-
* REASON_NOT_LACE_FORM - Placement: the resolved tree's own certification verdict is not Lace-form.
|
|
588
|
-
* module convert and stack import: lacification cannot take the tree to
|
|
589
|
-
* lace shape; the report names each managed resource and the IR gap holding it.
|
|
590
|
-
*/
|
|
591
|
-
REASON_NOT_LACE_FORM = 1,
|
|
592
|
-
/** REASON_HASH_MISMATCH - Placement: the downloaded tree does not hash to what the registry vouched for. */
|
|
593
|
-
REASON_HASH_MISMATCH = 2,
|
|
594
|
-
/** REASON_REGISTRY_UNAVAILABLE - Placement: the registry could not be reached or answered with no verdict. */
|
|
595
|
-
REASON_REGISTRY_UNAVAILABLE = 3,
|
|
596
|
-
/** REASON_ROOT_LOCKED - SessionOpen: the root's canvas is open in another window. */
|
|
597
|
-
REASON_ROOT_LOCKED = 4,
|
|
598
|
-
/** REASON_UNSAVED - Generate: the session has unsaved edits; save first. */
|
|
599
|
-
REASON_UNSAVED = 5,
|
|
600
|
-
/** REASON_CONFLICT - Generate: the tree moved under the session's base; Keep or Reload first. */
|
|
601
|
-
REASON_CONFLICT = 6,
|
|
602
|
-
/**
|
|
603
|
-
* REASON_SOURCE_REFUSED - Every mutation, save and generate: the session's source tf is refused
|
|
604
|
-
* (`BundleState.source_refused`).
|
|
605
|
-
* module convert and stack import: the tree's tf does not parse, has a
|
|
606
|
-
* non-empty residual report, or its Bundle fails its own validation.
|
|
607
|
-
* module validate, stack apply / stack destroy / registry register: a
|
|
608
|
-
* source the command reads does not parse; apply, destroy and register
|
|
609
|
-
* check it before the certification.
|
|
610
|
-
*/
|
|
611
|
-
REASON_SOURCE_REFUSED = 7,
|
|
612
|
-
/**
|
|
613
|
-
* REASON_NOT_GIT_REPOSITORY - Generate, module convert, stack import and module fmt: the authoring
|
|
614
|
-
* root is not inside a git working tree.
|
|
615
|
-
* stack create --source: the directory is not inside a git working tree,
|
|
616
|
-
* so it has no place in a repository to bind the stack to.
|
|
617
|
-
*/
|
|
618
|
-
REASON_NOT_GIT_REPOSITORY = 8,
|
|
619
|
-
/** REASON_GENERATE_IN_PROGRESS - Generate: a Generate is already running on the session. */
|
|
620
|
-
REASON_GENERATE_IN_PROGRESS = 9,
|
|
621
|
-
/** REASON_NO_ORGANIZATION - A scoped command: no organization is selected. */
|
|
622
|
-
REASON_NO_ORGANIZATION = 10,
|
|
623
|
-
/** REASON_NO_TEAM - A team-scoped command: no team is selected in the organization. */
|
|
624
|
-
REASON_NO_TEAM = 11,
|
|
625
|
-
/**
|
|
626
|
-
* REASON_NO_CERTIFICATION - stack apply / stack destroy / registry register: the root has no
|
|
627
|
-
* certification.
|
|
628
|
-
*/
|
|
629
|
-
REASON_NO_CERTIFICATION = 12,
|
|
630
|
-
/**
|
|
631
|
-
* REASON_STALE_CERTIFICATION - stack apply / stack destroy / registry register: the certification
|
|
632
|
-
* does not certify the tree on disk — the tree changed since validate,
|
|
633
|
-
* another lace version wrote it, or its files are torn or mixed from two
|
|
634
|
-
* validates. Running validate again replaces it.
|
|
635
|
-
*/
|
|
636
|
-
REASON_STALE_CERTIFICATION = 13,
|
|
637
|
-
/**
|
|
638
|
-
* REASON_TOOL_MISSING - module scan / module docs / module fmt / module validate / module
|
|
639
|
-
* convert / stack import / stack preview / stack apply / stack destroy:
|
|
640
|
-
* the tool the command runs (tfsec, terraform-docs, the pinned terraform)
|
|
641
|
-
* is not available. convert and stack import run the pinned terraform
|
|
642
|
-
* through the validate each closes on, apply and destroy through their
|
|
643
|
-
* local plan.
|
|
644
|
-
*/
|
|
645
|
-
REASON_TOOL_MISSING = 14,
|
|
646
|
-
/**
|
|
647
|
-
* REASON_CROSS_SCOPE - ApplyAction: a wire whose source and target are owned by different
|
|
648
|
-
* modules crosses a group's boundary, which no single-scope edit makes.
|
|
649
|
-
* It is a refusal of the batch's content, carried on its GraphError.
|
|
650
|
-
* ReadWiringCandidates: a read whose two scopes differ, refused
|
|
651
|
-
* (FailedPrecondition) as such a wire is.
|
|
652
|
-
*/
|
|
653
|
-
REASON_CROSS_SCOPE = 15,
|
|
654
|
-
/**
|
|
655
|
-
* REASON_UNAUTHENTICATED - The developer must sign in: a command or a placement that needs
|
|
656
|
-
* credentials finds none (no `lace login`, no LACE_TOKEN), decided
|
|
657
|
-
* before any request; or the API refuses the ones sent with its code
|
|
658
|
-
* `unauthenticated`, which `ReasonDetail.api_code` then names.
|
|
659
|
-
*/
|
|
660
|
-
REASON_UNAUTHENTICATED = 16,
|
|
661
|
-
/**
|
|
662
|
-
* REASON_IMPORT_RESIDUAL - stack import: a resource in the statefile has no import id the CLI
|
|
663
|
-
* derives. The failure names each in `importResiduals`; --allow-partial
|
|
664
|
-
* writes the import without them. Nothing was written.
|
|
665
|
-
*/
|
|
666
|
-
REASON_IMPORT_RESIDUAL = 17,
|
|
667
|
-
/**
|
|
668
|
-
* REASON_STACK_HAS_STATE - stack import: the stack's state already holds resources, and import
|
|
669
|
-
* adopts into an empty stack. Nothing was read or written.
|
|
670
|
-
*/
|
|
671
|
-
REASON_STACK_HAS_STATE = 18,
|
|
672
|
-
/**
|
|
673
|
-
* REASON_NO_ORIGIN_REMOTE - stack create --source: the directory's repository has no `origin`
|
|
674
|
-
* remote, whose URL is the repository a stack's source binding names.
|
|
675
|
-
*/
|
|
676
|
-
REASON_NO_ORIGIN_REMOTE = 19,
|
|
677
|
-
/**
|
|
678
|
-
* REASON_IMPORT_UNDECLARED - stack import: the statefile holds resources the converted tree does not
|
|
679
|
-
* declare, named in the failure's `addresses`; an import block adopts
|
|
680
|
-
* only a resource the tree declares. Nothing was written.
|
|
681
|
-
*/
|
|
682
|
-
REASON_IMPORT_UNDECLARED = 20,
|
|
683
|
-
/**
|
|
684
|
-
* REASON_ALREADY_IMPORTED - stack import: the tree already imports resources the statefile holds,
|
|
685
|
-
* named in the failure's `addresses`; terraform refuses two imports of
|
|
686
|
-
* one address. Nothing was written.
|
|
687
|
-
*/
|
|
688
|
-
REASON_ALREADY_IMPORTED = 21,
|
|
689
|
-
/**
|
|
690
|
-
* REASON_NO_LOCKFILE - stack apply / stack destroy / stack preview: the root keeps no
|
|
691
|
-
* `.terraform.lock.hcl`; `lace module lock` writes it.
|
|
692
|
-
*/
|
|
693
|
-
REASON_NO_LOCKFILE = 22,
|
|
694
|
-
UNRECOGNIZED = -1
|
|
695
|
-
}
|
|
696
702
|
declare enum ConflictChoice {
|
|
697
703
|
CONFLICT_CHOICE_UNSPECIFIED = 0,
|
|
698
704
|
CONFLICT_CHOICE_KEEP = 1,
|
|
@@ -1967,4 +1973,5 @@ declare class ServerManager extends EventEmitter {
|
|
|
1967
1973
|
private maybeRestart;
|
|
1968
1974
|
}
|
|
1969
1975
|
|
|
1970
|
-
export { Action, ApplyActionRequest, BundleApplyResult, BundleState, BundleStateEvent,
|
|
1976
|
+
export { Action, ApplyActionRequest, BundleApplyResult, BundleState, BundleStateEvent, EngineSpawnError, InitializeResponse, InvokeEvent, InvokeRequest, LaceTransport, ReadWiringCandidatesRequest, ReadWiringCandidatesResponse, ReasonDetail, RpcError, ServerManager, SessionCloseResponse, SessionOpenResponse, Status, classifyRpcError, endEngine, requireClient, serveEngineBridge, spawnEngine };
|
|
1977
|
+
export type { EngineHandshake, EngineInitialize, EngineTransport, RpcErrorCategory, ServerState };
|
package/dist/index.d.ts
CHANGED
|
@@ -317,6 +317,133 @@ interface MessageFns$2<T> {
|
|
|
317
317
|
fromPartial<I extends Exact$2<DeepPartial$2<T>, I>>(object: I): T;
|
|
318
318
|
}
|
|
319
319
|
|
|
320
|
+
/**
|
|
321
|
+
* Reason is the one vocabulary of what a failure asks of the developer.
|
|
322
|
+
* The engine attaches it to a refused RPC as a `ReasonDetail` in the
|
|
323
|
+
* status' error details, and a command's failure document names it; a
|
|
324
|
+
* client branches on it, never on the message's text. A failure the API
|
|
325
|
+
* decided carries the API's own code (`ReasonDetail.api_code`), and a
|
|
326
|
+
* reason only where that code has one: every code that asks the developer
|
|
327
|
+
* to sign in again is `REASON_UNAUTHENTICATED`.
|
|
328
|
+
*
|
|
329
|
+
* The vocabulary is a file of its own, in the engine's package, generated
|
|
330
|
+
* into a Go package of its own (internal/kernel/reason/pb): every CLI package
|
|
331
|
+
* that refuses with a reason names it from there, the execution side's
|
|
332
|
+
* included, without linking the engine's wire. service.proto imports it.
|
|
333
|
+
*/
|
|
334
|
+
declare enum Reason {
|
|
335
|
+
REASON_UNSPECIFIED = 0,
|
|
336
|
+
/**
|
|
337
|
+
* REASON_NOT_LACE_FORM - Placement: the resolved tree's own certification verdict is not Lace-form.
|
|
338
|
+
* module convert and module import: lacification cannot take the tree to
|
|
339
|
+
* lace shape; the report names each managed resource and the IR gap holding it.
|
|
340
|
+
*/
|
|
341
|
+
REASON_NOT_LACE_FORM = 1,
|
|
342
|
+
/** REASON_HASH_MISMATCH - Placement: the downloaded tree does not hash to what the registry vouched for. */
|
|
343
|
+
REASON_HASH_MISMATCH = 2,
|
|
344
|
+
/** REASON_REGISTRY_UNAVAILABLE - Placement: the registry could not be reached or answered with no verdict. */
|
|
345
|
+
REASON_REGISTRY_UNAVAILABLE = 3,
|
|
346
|
+
/** REASON_ROOT_LOCKED - SessionOpen: the root's canvas is open in another window. */
|
|
347
|
+
REASON_ROOT_LOCKED = 4,
|
|
348
|
+
/** REASON_UNSAVED - Generate: the session has unsaved edits; save first. */
|
|
349
|
+
REASON_UNSAVED = 5,
|
|
350
|
+
/** REASON_CONFLICT - Generate: the tree moved under the session's base; Keep or Reload first. */
|
|
351
|
+
REASON_CONFLICT = 6,
|
|
352
|
+
/**
|
|
353
|
+
* REASON_SOURCE_REFUSED - Every mutation, save and generate: the session's source tf is refused
|
|
354
|
+
* (`BundleState.source_refused`).
|
|
355
|
+
* module convert and module import: the tree's tf does not parse, has a
|
|
356
|
+
* non-empty residual report, or its Bundle fails its own validation.
|
|
357
|
+
* module validate, stack apply / stack destroy / registry register: a
|
|
358
|
+
* source the command reads does not parse; apply, destroy and register
|
|
359
|
+
* check it before the certification.
|
|
360
|
+
*/
|
|
361
|
+
REASON_SOURCE_REFUSED = 7,
|
|
362
|
+
/**
|
|
363
|
+
* REASON_NOT_GIT_REPOSITORY - Generate, module convert, module import and module fmt: the authoring
|
|
364
|
+
* root is not inside a git working tree.
|
|
365
|
+
* stack create --source: the directory is not inside a git working tree,
|
|
366
|
+
* so it has no place in a repository to bind the stack to.
|
|
367
|
+
*/
|
|
368
|
+
REASON_NOT_GIT_REPOSITORY = 8,
|
|
369
|
+
/** REASON_GENERATE_IN_PROGRESS - Generate: a Generate is already running on the session. */
|
|
370
|
+
REASON_GENERATE_IN_PROGRESS = 9,
|
|
371
|
+
/** REASON_NO_ORGANIZATION - A scoped command: no organization is selected. */
|
|
372
|
+
REASON_NO_ORGANIZATION = 10,
|
|
373
|
+
/** REASON_NO_TEAM - A team-scoped command: no team is selected in the organization. */
|
|
374
|
+
REASON_NO_TEAM = 11,
|
|
375
|
+
/**
|
|
376
|
+
* REASON_NO_CERTIFICATION - stack apply / stack destroy / registry register: the root has no
|
|
377
|
+
* certification.
|
|
378
|
+
*/
|
|
379
|
+
REASON_NO_CERTIFICATION = 12,
|
|
380
|
+
/**
|
|
381
|
+
* REASON_STALE_CERTIFICATION - stack apply / stack destroy / registry register: the certification
|
|
382
|
+
* does not certify the tree on disk — the tree changed since validate,
|
|
383
|
+
* another lace version wrote it, or its files are torn or mixed from two
|
|
384
|
+
* validates. Running validate again replaces it.
|
|
385
|
+
*/
|
|
386
|
+
REASON_STALE_CERTIFICATION = 13,
|
|
387
|
+
/**
|
|
388
|
+
* REASON_TOOL_MISSING - module scan / module docs / module fmt / module validate / module
|
|
389
|
+
* convert / module import / stack preview / stack apply / stack destroy:
|
|
390
|
+
* the tool the command runs (tfsec, terraform-docs, the pinned terraform)
|
|
391
|
+
* is not available. convert and module import run the pinned terraform
|
|
392
|
+
* through the validate each closes on, apply and destroy through their
|
|
393
|
+
* local plan.
|
|
394
|
+
*/
|
|
395
|
+
REASON_TOOL_MISSING = 14,
|
|
396
|
+
/**
|
|
397
|
+
* REASON_CROSS_SCOPE - ApplyAction: a wire whose source and target are owned by different
|
|
398
|
+
* modules crosses a group's boundary, which no single-scope edit makes.
|
|
399
|
+
* It is a refusal of the batch's content, carried on its GraphError.
|
|
400
|
+
* ReadWiringCandidates: a read whose two scopes differ, refused
|
|
401
|
+
* (FailedPrecondition) as such a wire is.
|
|
402
|
+
*/
|
|
403
|
+
REASON_CROSS_SCOPE = 15,
|
|
404
|
+
/**
|
|
405
|
+
* REASON_UNAUTHENTICATED - The developer must sign in: a command or a placement that needs
|
|
406
|
+
* credentials finds none (no `lace login`, no LACE_TOKEN), decided
|
|
407
|
+
* before any request; or the API refuses the ones sent with its code
|
|
408
|
+
* `unauthenticated`, which `ReasonDetail.api_code` then names.
|
|
409
|
+
*/
|
|
410
|
+
REASON_UNAUTHENTICATED = 16,
|
|
411
|
+
/**
|
|
412
|
+
* REASON_IMPORT_RESIDUAL - module import: a resource in the statefile has no import id the CLI
|
|
413
|
+
* derives. The failure names each in `importResiduals`; --allow-partial
|
|
414
|
+
* writes the import without them. Nothing was written.
|
|
415
|
+
*/
|
|
416
|
+
REASON_IMPORT_RESIDUAL = 17,
|
|
417
|
+
/**
|
|
418
|
+
* REASON_STACK_HAS_STATE - module import: the stack's state already holds resources, and import
|
|
419
|
+
* adopts into an empty stack. Nothing was read or written.
|
|
420
|
+
*/
|
|
421
|
+
REASON_STACK_HAS_STATE = 18,
|
|
422
|
+
/**
|
|
423
|
+
* REASON_NO_ORIGIN_REMOTE - stack create --source: the directory's repository has no `origin`
|
|
424
|
+
* remote, whose URL is the repository a stack's source binding names.
|
|
425
|
+
*/
|
|
426
|
+
REASON_NO_ORIGIN_REMOTE = 19,
|
|
427
|
+
/**
|
|
428
|
+
* REASON_IMPORT_UNDECLARED - module import: the statefile holds resources the converted tree does not
|
|
429
|
+
* declare, named in the failure's `addresses`; an import block adopts
|
|
430
|
+
* only a resource the tree declares. Nothing was written.
|
|
431
|
+
*/
|
|
432
|
+
REASON_IMPORT_UNDECLARED = 20,
|
|
433
|
+
/**
|
|
434
|
+
* REASON_ALREADY_IMPORTED - module import: the tree already imports resources the statefile holds,
|
|
435
|
+
* named in the failure's `addresses`; terraform refuses two imports of
|
|
436
|
+
* one address. Nothing was written.
|
|
437
|
+
*/
|
|
438
|
+
REASON_ALREADY_IMPORTED = 21,
|
|
439
|
+
/**
|
|
440
|
+
* REASON_NO_LOCKFILE - stack apply / stack destroy / stack preview: the root keeps no
|
|
441
|
+
* `.terraform.lock.hcl`; `lace module lock` writes it.
|
|
442
|
+
*/
|
|
443
|
+
REASON_NO_LOCKFILE = 22,
|
|
444
|
+
UNRECOGNIZED = -1
|
|
445
|
+
}
|
|
446
|
+
|
|
320
447
|
interface Bundle {
|
|
321
448
|
/**
|
|
322
449
|
* The format of this encoding: "2.0", at which every Expression carries
|
|
@@ -572,127 +699,6 @@ declare enum DiagnosticSeverity {
|
|
|
572
699
|
DIAGNOSTIC_SEVERITY_INFO = 3,
|
|
573
700
|
UNRECOGNIZED = -1
|
|
574
701
|
}
|
|
575
|
-
/**
|
|
576
|
-
* Reason is the one vocabulary of what a failure asks of the developer.
|
|
577
|
-
* The engine attaches it to a refused RPC as a `ReasonDetail` in the
|
|
578
|
-
* status' error details, and a command's failure document names it; a
|
|
579
|
-
* client branches on it, never on the message's text. A failure the API
|
|
580
|
-
* decided carries the API's own code (`ReasonDetail.api_code`), and a
|
|
581
|
-
* reason only where that code has one: every code that asks the developer
|
|
582
|
-
* to sign in again is `REASON_UNAUTHENTICATED`.
|
|
583
|
-
*/
|
|
584
|
-
declare enum Reason {
|
|
585
|
-
REASON_UNSPECIFIED = 0,
|
|
586
|
-
/**
|
|
587
|
-
* REASON_NOT_LACE_FORM - Placement: the resolved tree's own certification verdict is not Lace-form.
|
|
588
|
-
* module convert and stack import: lacification cannot take the tree to
|
|
589
|
-
* lace shape; the report names each managed resource and the IR gap holding it.
|
|
590
|
-
*/
|
|
591
|
-
REASON_NOT_LACE_FORM = 1,
|
|
592
|
-
/** REASON_HASH_MISMATCH - Placement: the downloaded tree does not hash to what the registry vouched for. */
|
|
593
|
-
REASON_HASH_MISMATCH = 2,
|
|
594
|
-
/** REASON_REGISTRY_UNAVAILABLE - Placement: the registry could not be reached or answered with no verdict. */
|
|
595
|
-
REASON_REGISTRY_UNAVAILABLE = 3,
|
|
596
|
-
/** REASON_ROOT_LOCKED - SessionOpen: the root's canvas is open in another window. */
|
|
597
|
-
REASON_ROOT_LOCKED = 4,
|
|
598
|
-
/** REASON_UNSAVED - Generate: the session has unsaved edits; save first. */
|
|
599
|
-
REASON_UNSAVED = 5,
|
|
600
|
-
/** REASON_CONFLICT - Generate: the tree moved under the session's base; Keep or Reload first. */
|
|
601
|
-
REASON_CONFLICT = 6,
|
|
602
|
-
/**
|
|
603
|
-
* REASON_SOURCE_REFUSED - Every mutation, save and generate: the session's source tf is refused
|
|
604
|
-
* (`BundleState.source_refused`).
|
|
605
|
-
* module convert and stack import: the tree's tf does not parse, has a
|
|
606
|
-
* non-empty residual report, or its Bundle fails its own validation.
|
|
607
|
-
* module validate, stack apply / stack destroy / registry register: a
|
|
608
|
-
* source the command reads does not parse; apply, destroy and register
|
|
609
|
-
* check it before the certification.
|
|
610
|
-
*/
|
|
611
|
-
REASON_SOURCE_REFUSED = 7,
|
|
612
|
-
/**
|
|
613
|
-
* REASON_NOT_GIT_REPOSITORY - Generate, module convert, stack import and module fmt: the authoring
|
|
614
|
-
* root is not inside a git working tree.
|
|
615
|
-
* stack create --source: the directory is not inside a git working tree,
|
|
616
|
-
* so it has no place in a repository to bind the stack to.
|
|
617
|
-
*/
|
|
618
|
-
REASON_NOT_GIT_REPOSITORY = 8,
|
|
619
|
-
/** REASON_GENERATE_IN_PROGRESS - Generate: a Generate is already running on the session. */
|
|
620
|
-
REASON_GENERATE_IN_PROGRESS = 9,
|
|
621
|
-
/** REASON_NO_ORGANIZATION - A scoped command: no organization is selected. */
|
|
622
|
-
REASON_NO_ORGANIZATION = 10,
|
|
623
|
-
/** REASON_NO_TEAM - A team-scoped command: no team is selected in the organization. */
|
|
624
|
-
REASON_NO_TEAM = 11,
|
|
625
|
-
/**
|
|
626
|
-
* REASON_NO_CERTIFICATION - stack apply / stack destroy / registry register: the root has no
|
|
627
|
-
* certification.
|
|
628
|
-
*/
|
|
629
|
-
REASON_NO_CERTIFICATION = 12,
|
|
630
|
-
/**
|
|
631
|
-
* REASON_STALE_CERTIFICATION - stack apply / stack destroy / registry register: the certification
|
|
632
|
-
* does not certify the tree on disk — the tree changed since validate,
|
|
633
|
-
* another lace version wrote it, or its files are torn or mixed from two
|
|
634
|
-
* validates. Running validate again replaces it.
|
|
635
|
-
*/
|
|
636
|
-
REASON_STALE_CERTIFICATION = 13,
|
|
637
|
-
/**
|
|
638
|
-
* REASON_TOOL_MISSING - module scan / module docs / module fmt / module validate / module
|
|
639
|
-
* convert / stack import / stack preview / stack apply / stack destroy:
|
|
640
|
-
* the tool the command runs (tfsec, terraform-docs, the pinned terraform)
|
|
641
|
-
* is not available. convert and stack import run the pinned terraform
|
|
642
|
-
* through the validate each closes on, apply and destroy through their
|
|
643
|
-
* local plan.
|
|
644
|
-
*/
|
|
645
|
-
REASON_TOOL_MISSING = 14,
|
|
646
|
-
/**
|
|
647
|
-
* REASON_CROSS_SCOPE - ApplyAction: a wire whose source and target are owned by different
|
|
648
|
-
* modules crosses a group's boundary, which no single-scope edit makes.
|
|
649
|
-
* It is a refusal of the batch's content, carried on its GraphError.
|
|
650
|
-
* ReadWiringCandidates: a read whose two scopes differ, refused
|
|
651
|
-
* (FailedPrecondition) as such a wire is.
|
|
652
|
-
*/
|
|
653
|
-
REASON_CROSS_SCOPE = 15,
|
|
654
|
-
/**
|
|
655
|
-
* REASON_UNAUTHENTICATED - The developer must sign in: a command or a placement that needs
|
|
656
|
-
* credentials finds none (no `lace login`, no LACE_TOKEN), decided
|
|
657
|
-
* before any request; or the API refuses the ones sent with its code
|
|
658
|
-
* `unauthenticated`, which `ReasonDetail.api_code` then names.
|
|
659
|
-
*/
|
|
660
|
-
REASON_UNAUTHENTICATED = 16,
|
|
661
|
-
/**
|
|
662
|
-
* REASON_IMPORT_RESIDUAL - stack import: a resource in the statefile has no import id the CLI
|
|
663
|
-
* derives. The failure names each in `importResiduals`; --allow-partial
|
|
664
|
-
* writes the import without them. Nothing was written.
|
|
665
|
-
*/
|
|
666
|
-
REASON_IMPORT_RESIDUAL = 17,
|
|
667
|
-
/**
|
|
668
|
-
* REASON_STACK_HAS_STATE - stack import: the stack's state already holds resources, and import
|
|
669
|
-
* adopts into an empty stack. Nothing was read or written.
|
|
670
|
-
*/
|
|
671
|
-
REASON_STACK_HAS_STATE = 18,
|
|
672
|
-
/**
|
|
673
|
-
* REASON_NO_ORIGIN_REMOTE - stack create --source: the directory's repository has no `origin`
|
|
674
|
-
* remote, whose URL is the repository a stack's source binding names.
|
|
675
|
-
*/
|
|
676
|
-
REASON_NO_ORIGIN_REMOTE = 19,
|
|
677
|
-
/**
|
|
678
|
-
* REASON_IMPORT_UNDECLARED - stack import: the statefile holds resources the converted tree does not
|
|
679
|
-
* declare, named in the failure's `addresses`; an import block adopts
|
|
680
|
-
* only a resource the tree declares. Nothing was written.
|
|
681
|
-
*/
|
|
682
|
-
REASON_IMPORT_UNDECLARED = 20,
|
|
683
|
-
/**
|
|
684
|
-
* REASON_ALREADY_IMPORTED - stack import: the tree already imports resources the statefile holds,
|
|
685
|
-
* named in the failure's `addresses`; terraform refuses two imports of
|
|
686
|
-
* one address. Nothing was written.
|
|
687
|
-
*/
|
|
688
|
-
REASON_ALREADY_IMPORTED = 21,
|
|
689
|
-
/**
|
|
690
|
-
* REASON_NO_LOCKFILE - stack apply / stack destroy / stack preview: the root keeps no
|
|
691
|
-
* `.terraform.lock.hcl`; `lace module lock` writes it.
|
|
692
|
-
*/
|
|
693
|
-
REASON_NO_LOCKFILE = 22,
|
|
694
|
-
UNRECOGNIZED = -1
|
|
695
|
-
}
|
|
696
702
|
declare enum ConflictChoice {
|
|
697
703
|
CONFLICT_CHOICE_UNSPECIFIED = 0,
|
|
698
704
|
CONFLICT_CHOICE_KEEP = 1,
|
|
@@ -1967,4 +1973,5 @@ declare class ServerManager extends EventEmitter {
|
|
|
1967
1973
|
private maybeRestart;
|
|
1968
1974
|
}
|
|
1969
1975
|
|
|
1970
|
-
export { Action, ApplyActionRequest, BundleApplyResult, BundleState, BundleStateEvent,
|
|
1976
|
+
export { Action, ApplyActionRequest, BundleApplyResult, BundleState, BundleStateEvent, EngineSpawnError, InitializeResponse, InvokeEvent, InvokeRequest, LaceTransport, ReadWiringCandidatesRequest, ReadWiringCandidatesResponse, ReasonDetail, RpcError, ServerManager, SessionCloseResponse, SessionOpenResponse, Status, classifyRpcError, endEngine, requireClient, serveEngineBridge, spawnEngine };
|
|
1977
|
+
export type { EngineHandshake, EngineInitialize, EngineTransport, RpcErrorCategory, ServerState };
|