@lace-cloud/canvas 0.35.0 → 0.36.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.
@@ -1,5 +1,5 @@
1
- import { A as ActionContribution, J as JsonOf, S as SourcePort } from '../registry-ynSG1hCz.mjs';
2
- export { a as Action, b as ActionRunner, c as ActionRunnerOptions, d as ActionTarget, e as ApplyResult, f as ApplyUnobservedError, g as ArgsOf, B as BindingRuntime, h as BoundPath, i as BridgeEngineCaller, j as Busy, C as COMMANDS, k as CanvasPorts, l as CanvasSource, m as CommandBinding, n as CommandDetachedError, o as CommandExitError, p as CommandFailure, q as CommandPath, r as CommandResult, s as CommandRun, t as CommandUnobservedError, u as CommandsPort, v as ConfirmSpec, w as ConnectCallerOptions, x as ConnectError, y as ContextPort, z as CreatedRef, D as DirectEngineCaller, E as EMPTY_REPORT_FOLD, F as EditorPort, G as EngineCaller, H as EngineMethodResponse, I as EngineSession, K as EngineSessionOptions, L as EngineTarget, M as ErasedCommand, N as FollowSlot, O as GENERATE_STAGES, P as GateChangeRequest, Q as GenerateEvent, R as GenerateStage, T as GeneratedTree, U as GraphError, V as HostBinding, W as InputMode, X as Invocation, Y as LaceReason, Z as LiveSlots, _ as OnScreen, $ as PendingForm, a0 as PortName, a1 as PresenterPort, a2 as PreviewOutcome, a3 as PreviewSlot, a4 as Reason, a5 as ReportEntry, a6 as ReportFold, a7 as ReportPath, a8 as ReportSlot, a9 as ResultKind, aa as ResultSlots, ab as ResultStore, ac as RunCtx, ad as RunOutcome, ae as RunSlot, af as RunStage, ag as RunStageStatus, ah as RunnerPorts, ai as RunningMark, aj as SCHEMAS, ak as Sink, al as SinkInput, am as SlotContext, an as SlotKind, ao as SourceConflict, ap as SourceEnd, aq as StackRef, ar as Started, as as ViewStatePort, at as WiringCandidate, au as WiringQuery, av as answering, aw as bridgeCaller, ax as carriesFailure, ay as commandPathOf, az as commandUnderWay, aA as connectCaller, aB as createActionRunner, aC as createResultStore, aD as currentReport, aE as defineCommand, aF as diagnosticsOf, aG as diagnosticsOfDocument, aH as failureSays, aI as foldReport, aJ as generatedTree, aK as isBoundPath, aL as liveSlots, aM as openEngineCommands, aN as openEngineSession, aO as parseBound, aP as parseCommandFailure, aQ as reasonWire, aR as reduceFollow, aS as reducePreview, aT as reduceReport, aU as reduceRun, aV as reportDiagnostics, aW as settleRun, aX as toArgv, aY as uniqueDiagnostics } from '../registry-ynSG1hCz.mjs';
1
+ import { A as ActionContribution, J as JsonOf, S as SourcePort } from '../registry-Bflzqecd.mjs';
2
+ export { a as Action, b as ActionRunner, c as ActionRunnerOptions, d as ActionTarget, e as ApplyResult, f as ApplyUnobservedError, g as ArgsOf, B as BindingRuntime, h as BoundPath, i as BridgeEngineCaller, j as Busy, C as COMMANDS, k as CanvasPorts, l as CanvasSource, m as CommandBinding, n as CommandDetachedError, o as CommandExitError, p as CommandFailure, q as CommandPath, r as CommandResult, s as CommandRun, t as CommandUnobservedError, u as CommandsPort, v as ConfirmSpec, w as ConnectCallerOptions, x as ConnectError, y as ContextPort, z as CreatedRef, D as DirectEngineCaller, E as EMPTY_REPORT_FOLD, F as EditorPort, G as EngineCaller, H as EngineMethodResponse, I as EngineSession, K as EngineSessionOptions, L as EngineTarget, M as ErasedCommand, N as FollowSlot, O as GENERATE_STAGES, P as GateChangeRequest, Q as GenerateEvent, R as GenerateStage, T as GeneratedTree, U as GraphError, V as HostBinding, W as InputMode, X as Invocation, Y as LaceReason, Z as LiveSlots, _ as OnScreen, $ as PendingForm, a0 as PortName, a1 as PresenterPort, a2 as PreviewOutcome, a3 as PreviewSlot, a4 as Reason, a5 as ReportEntry, a6 as ReportFold, a7 as ReportPath, a8 as ReportSlot, a9 as ResultKind, aa as ResultSlots, ab as ResultStore, ac as RunCtx, ad as RunOutcome, ae as RunSlot, af as RunStage, ag as RunStageStatus, ah as RunnerPorts, ai as RunningMark, aj as SCHEMAS, ak as Sink, al as SinkInput, am as SlotContext, an as SlotKind, ao as SourceConflict, ap as SourceEnd, aq as StackRef, ar as Started, as as ViewStatePort, at as WiringCandidate, au as WiringQuery, av as answering, aw as bridgeCaller, ax as carriesFailure, ay as commandPathOf, az as commandUnderWay, aA as connectCaller, aB as createActionRunner, aC as createResultStore, aD as currentReport, aE as defineCommand, aF as diagnosticsOf, aG as diagnosticsOfDocument, aH as failureSays, aI as foldReport, aJ as generatedTree, aK as isBoundPath, aL as liveSlots, aM as openEngineCommands, aN as openEngineSession, aO as parseBound, aP as parseCommandFailure, aQ as reasonWire, aR as reduceFollow, aS as reducePreview, aT as reduceReport, aU as reduceRun, aV as reportDiagnostics, aW as settleRun, aX as toArgv, aY as uniqueDiagnostics } from '../registry-Bflzqecd.mjs';
3
3
  import '@lace-cloud/proto';
4
4
  import 'zod';
5
5
  import '@bufbuild/protobuf/wire';
@@ -1,5 +1,5 @@
1
- import { A as ActionContribution, J as JsonOf, S as SourcePort } from '../registry-ynSG1hCz.js';
2
- export { a as Action, b as ActionRunner, c as ActionRunnerOptions, d as ActionTarget, e as ApplyResult, f as ApplyUnobservedError, g as ArgsOf, B as BindingRuntime, h as BoundPath, i as BridgeEngineCaller, j as Busy, C as COMMANDS, k as CanvasPorts, l as CanvasSource, m as CommandBinding, n as CommandDetachedError, o as CommandExitError, p as CommandFailure, q as CommandPath, r as CommandResult, s as CommandRun, t as CommandUnobservedError, u as CommandsPort, v as ConfirmSpec, w as ConnectCallerOptions, x as ConnectError, y as ContextPort, z as CreatedRef, D as DirectEngineCaller, E as EMPTY_REPORT_FOLD, F as EditorPort, G as EngineCaller, H as EngineMethodResponse, I as EngineSession, K as EngineSessionOptions, L as EngineTarget, M as ErasedCommand, N as FollowSlot, O as GENERATE_STAGES, P as GateChangeRequest, Q as GenerateEvent, R as GenerateStage, T as GeneratedTree, U as GraphError, V as HostBinding, W as InputMode, X as Invocation, Y as LaceReason, Z as LiveSlots, _ as OnScreen, $ as PendingForm, a0 as PortName, a1 as PresenterPort, a2 as PreviewOutcome, a3 as PreviewSlot, a4 as Reason, a5 as ReportEntry, a6 as ReportFold, a7 as ReportPath, a8 as ReportSlot, a9 as ResultKind, aa as ResultSlots, ab as ResultStore, ac as RunCtx, ad as RunOutcome, ae as RunSlot, af as RunStage, ag as RunStageStatus, ah as RunnerPorts, ai as RunningMark, aj as SCHEMAS, ak as Sink, al as SinkInput, am as SlotContext, an as SlotKind, ao as SourceConflict, ap as SourceEnd, aq as StackRef, ar as Started, as as ViewStatePort, at as WiringCandidate, au as WiringQuery, av as answering, aw as bridgeCaller, ax as carriesFailure, ay as commandPathOf, az as commandUnderWay, aA as connectCaller, aB as createActionRunner, aC as createResultStore, aD as currentReport, aE as defineCommand, aF as diagnosticsOf, aG as diagnosticsOfDocument, aH as failureSays, aI as foldReport, aJ as generatedTree, aK as isBoundPath, aL as liveSlots, aM as openEngineCommands, aN as openEngineSession, aO as parseBound, aP as parseCommandFailure, aQ as reasonWire, aR as reduceFollow, aS as reducePreview, aT as reduceReport, aU as reduceRun, aV as reportDiagnostics, aW as settleRun, aX as toArgv, aY as uniqueDiagnostics } from '../registry-ynSG1hCz.js';
1
+ import { A as ActionContribution, J as JsonOf, S as SourcePort } from '../registry-Bflzqecd.js';
2
+ export { a as Action, b as ActionRunner, c as ActionRunnerOptions, d as ActionTarget, e as ApplyResult, f as ApplyUnobservedError, g as ArgsOf, B as BindingRuntime, h as BoundPath, i as BridgeEngineCaller, j as Busy, C as COMMANDS, k as CanvasPorts, l as CanvasSource, m as CommandBinding, n as CommandDetachedError, o as CommandExitError, p as CommandFailure, q as CommandPath, r as CommandResult, s as CommandRun, t as CommandUnobservedError, u as CommandsPort, v as ConfirmSpec, w as ConnectCallerOptions, x as ConnectError, y as ContextPort, z as CreatedRef, D as DirectEngineCaller, E as EMPTY_REPORT_FOLD, F as EditorPort, G as EngineCaller, H as EngineMethodResponse, I as EngineSession, K as EngineSessionOptions, L as EngineTarget, M as ErasedCommand, N as FollowSlot, O as GENERATE_STAGES, P as GateChangeRequest, Q as GenerateEvent, R as GenerateStage, T as GeneratedTree, U as GraphError, V as HostBinding, W as InputMode, X as Invocation, Y as LaceReason, Z as LiveSlots, _ as OnScreen, $ as PendingForm, a0 as PortName, a1 as PresenterPort, a2 as PreviewOutcome, a3 as PreviewSlot, a4 as Reason, a5 as ReportEntry, a6 as ReportFold, a7 as ReportPath, a8 as ReportSlot, a9 as ResultKind, aa as ResultSlots, ab as ResultStore, ac as RunCtx, ad as RunOutcome, ae as RunSlot, af as RunStage, ag as RunStageStatus, ah as RunnerPorts, ai as RunningMark, aj as SCHEMAS, ak as Sink, al as SinkInput, am as SlotContext, an as SlotKind, ao as SourceConflict, ap as SourceEnd, aq as StackRef, ar as Started, as as ViewStatePort, at as WiringCandidate, au as WiringQuery, av as answering, aw as bridgeCaller, ax as carriesFailure, ay as commandPathOf, az as commandUnderWay, aA as connectCaller, aB as createActionRunner, aC as createResultStore, aD as currentReport, aE as defineCommand, aF as diagnosticsOf, aG as diagnosticsOfDocument, aH as failureSays, aI as foldReport, aJ as generatedTree, aK as isBoundPath, aL as liveSlots, aM as openEngineCommands, aN as openEngineSession, aO as parseBound, aP as parseCommandFailure, aQ as reasonWire, aR as reduceFollow, aS as reducePreview, aT as reduceReport, aU as reduceRun, aV as reportDiagnostics, aW as settleRun, aX as toArgv, aY as uniqueDiagnostics } from '../registry-Bflzqecd.js';
3
3
  import '@lace-cloud/proto';
4
4
  import 'zod';
5
5
  import '@bufbuild/protobuf/wire';
@@ -51,7 +51,7 @@ import {
51
51
  stackSlugRule,
52
52
  toArgv,
53
53
  uniqueDiagnostics
54
- } from "../chunk-O3I4KLND.mjs";
54
+ } from "../chunk-XPHDFIKV.mjs";
55
55
  export {
56
56
  ApplyUnobservedError,
57
57
  AutosaveEndedError,
package/dist/index.cjs CHANGED
@@ -5807,7 +5807,7 @@ var InitializeRequest = {
5807
5807
  }
5808
5808
  };
5809
5809
  function createBaseInitializeResponse() {
5810
- return { server_version: "", protocol_version: "", supported_protocols: [], command_paths: [] };
5810
+ return { server_version: "", protocol_version: "", supported_protocols: [], command_paths: [], contract: "" };
5811
5811
  }
5812
5812
  var InitializeResponse = {
5813
5813
  encode(message, writer = new import_wire4.BinaryWriter()) {
@@ -5823,6 +5823,9 @@ var InitializeResponse = {
5823
5823
  for (const v of message.command_paths) {
5824
5824
  writer.uint32(42).string(v);
5825
5825
  }
5826
+ if (message.contract !== "") {
5827
+ writer.uint32(50).string(message.contract);
5828
+ }
5826
5829
  return writer;
5827
5830
  },
5828
5831
  decode(input, length) {
@@ -5860,6 +5863,13 @@ var InitializeResponse = {
5860
5863
  message.command_paths.push(reader.string());
5861
5864
  continue;
5862
5865
  }
5866
+ case 6: {
5867
+ if (tag !== 50) {
5868
+ break;
5869
+ }
5870
+ message.contract = reader.string();
5871
+ continue;
5872
+ }
5863
5873
  }
5864
5874
  if ((tag & 7) === 4 || tag === 0) {
5865
5875
  break;
@@ -5873,7 +5883,8 @@ var InitializeResponse = {
5873
5883
  server_version: isSet3(object.serverVersion) ? globalThis.String(object.serverVersion) : isSet3(object.server_version) ? globalThis.String(object.server_version) : "",
5874
5884
  protocol_version: isSet3(object.protocolVersion) ? globalThis.String(object.protocolVersion) : isSet3(object.protocol_version) ? globalThis.String(object.protocol_version) : "",
5875
5885
  supported_protocols: globalThis.Array.isArray(object?.supportedProtocols) ? object.supportedProtocols.map((e) => globalThis.String(e)) : globalThis.Array.isArray(object?.supported_protocols) ? object.supported_protocols.map((e) => globalThis.String(e)) : [],
5876
- command_paths: globalThis.Array.isArray(object?.commandPaths) ? object.commandPaths.map((e) => globalThis.String(e)) : globalThis.Array.isArray(object?.command_paths) ? object.command_paths.map((e) => globalThis.String(e)) : []
5886
+ command_paths: globalThis.Array.isArray(object?.commandPaths) ? object.commandPaths.map((e) => globalThis.String(e)) : globalThis.Array.isArray(object?.command_paths) ? object.command_paths.map((e) => globalThis.String(e)) : [],
5887
+ contract: isSet3(object.contract) ? globalThis.String(object.contract) : ""
5877
5888
  };
5878
5889
  },
5879
5890
  toJSON(message) {
@@ -5890,6 +5901,9 @@ var InitializeResponse = {
5890
5901
  if (message.command_paths?.length) {
5891
5902
  obj.commandPaths = message.command_paths;
5892
5903
  }
5904
+ if (message.contract !== "") {
5905
+ obj.contract = message.contract;
5906
+ }
5893
5907
  return obj;
5894
5908
  },
5895
5909
  create(base) {
@@ -5901,6 +5915,7 @@ var InitializeResponse = {
5901
5915
  message.protocol_version = object.protocol_version ?? "";
5902
5916
  message.supported_protocols = object.supported_protocols?.map((e) => e) || [];
5903
5917
  message.command_paths = object.command_paths?.map((e) => e) || [];
5918
+ message.contract = object.contract ?? "";
5904
5919
  return message;
5905
5920
  }
5906
5921
  };
@@ -14866,6 +14881,13 @@ var COMMANDS = {
14866
14881
  },
14867
14882
  "readme": {
14868
14883
  "type": "string"
14884
+ },
14885
+ "visibility": {
14886
+ "type": "string",
14887
+ "values": [
14888
+ "public",
14889
+ "org_private"
14890
+ ]
14869
14891
  }
14870
14892
  },
14871
14893
  "effect": "read",
@@ -15639,7 +15661,6 @@ var commandFailureSchema = import_zod.z.strictObject({
15639
15661
  var moduleValidateDeviationSchema = import_zod.z.object({
15640
15662
  notCompositional: import_zod.z.boolean(),
15641
15663
  clusters: import_zod.z.array(import_zod.z.unknown()),
15642
- residuals: import_zod.z.array(import_zod.z.unknown()),
15643
15664
  hasManagedBackend: import_zod.z.boolean(),
15644
15665
  backendFindings: import_zod.z.array(import_zod.z.object({ file: import_zod.z.string(), line: import_zod.z.number(), kind: import_zod.z.string() })),
15645
15666
  sharedLocalSource: import_zod.z.boolean(),
@@ -15735,7 +15756,8 @@ var registryListSchema = import_zod.z.object({
15735
15756
  })
15736
15757
  ),
15737
15758
  truncated: import_zod.z.boolean(),
15738
- publishingGuideUrl: import_zod.z.string()
15759
+ publishingGuideUrl: import_zod.z.string(),
15760
+ scopeNotice: import_zod.z.string().optional()
15739
15761
  });
15740
15762
  var registryManifestSchema = import_zod.z.object({
15741
15763
  id: import_zod.z.string(),
@@ -16383,7 +16405,11 @@ function diagnosticsOfDocument(document2) {
16383
16405
  }));
16384
16406
  }
16385
16407
  function diagnosticsOfEntry(entry) {
16386
- return entry.kind === "failure" ? [{ severity: "error", message: entry.failure.message }] : diagnosticsOfDocument(entry.document);
16408
+ if (entry.kind === "failure") return [{ severity: "error", message: entry.failure.message }];
16409
+ const found = diagnosticsOfDocument(entry.document);
16410
+ if (entry.path !== "module validate") return found;
16411
+ const { failure } = entry.document;
16412
+ return failure && !found.some((d) => d.severity === "error") ? [...found, { severity: "error", message: failure.message }] : found;
16387
16413
  }
16388
16414
  function reportDiagnostics(fold) {
16389
16415
  return uniqueDiagnostics(
@@ -16867,6 +16893,13 @@ function validateNotice(v) {
16867
16893
  const why = whyNotValid(v);
16868
16894
  return ["warn", why === void 0 ? "Not valid for Lace" : `Not valid: ${why}`];
16869
16895
  }
16896
+ function generateNotice(e) {
16897
+ if (e.validate.exitClass === "ok") return void 0;
16898
+ const tree = generatedTree(e);
16899
+ const count = tree.changed.length + tree.unchanged;
16900
+ const generated2 = count === 0 ? "Generated \u2014 nothing to write" : `Generated \u2014 ${counted(count, "file")} written`;
16901
+ return ["warn", `${generated2}. ${didNotValidate(e.validate)}`, ...beside(e.validate)];
16902
+ }
16870
16903
  function convertNotice(e) {
16871
16904
  const locked = e.lock === null ? "" : `, locking ${lockedIn(e.lock)}`;
16872
16905
  const converted = e.changed ? `Converted \u2014 ${e.written.length} file(s) written${locked}` : "Already lace-style \u2014 nothing to write";
@@ -19941,6 +19974,10 @@ function createActionRunner(ports, store, options = {}) {
19941
19974
  if (binding.result === "generate") {
19942
19975
  for await (const event of binding.run(env)) {
19943
19976
  if (event.type === "error") ports.presenter.notify("error", event.message);
19977
+ if (event.type === "success") {
19978
+ const notice = generateNotice(event);
19979
+ if (notice) ports.presenter.notify(...notice);
19980
+ }
19944
19981
  }
19945
19982
  return;
19946
19983
  }
@@ -20793,7 +20830,11 @@ async function initialize(caller) {
20793
20830
  client_version: "@lace-cloud/canvas",
20794
20831
  protocol_version: import_proto16.ENGINE_PROTOCOL_VERSION
20795
20832
  });
20796
- (0, import_proto16.checkEngineProtocol)(initialize2.server_version, initialize2.protocol_version);
20833
+ (0, import_proto16.checkEngineIdentity)({
20834
+ version: initialize2.server_version,
20835
+ protocol: initialize2.protocol_version,
20836
+ contract: initialize2.contract
20837
+ });
20797
20838
  return new Set(initialize2.command_paths);
20798
20839
  }
20799
20840
  async function openEngineCommands(caller, { cwd }) {