@alva-ai/toolkit 0.35.0 → 0.36.0-beta.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.
@@ -2743,14 +2743,87 @@ interface RelatedThesesPage {
2743
2743
  }[];
2744
2744
  nextCursor: string | null;
2745
2745
  }
2746
+ interface ThesisReturnParams {
2747
+ /** Revalue at the latest prices and include each Update's positions. */
2748
+ detail?: boolean;
2749
+ }
2750
+ /** A position of one Update, as ThesisPositionReturn in GraphQL. */
2751
+ interface ThesisPositionReturn {
2752
+ entityId: string;
2753
+ symbol: string;
2754
+ direction: 'BULLISH' | 'BEARISH';
2755
+ startPrice: number | null;
2756
+ startAtMs: number | null;
2757
+ endPrice: number | null;
2758
+ endAtMs: number | null;
2759
+ end: 'PENDING' | 'NEXT_UPDATE' | 'LATEST';
2760
+ positionReturn: number;
2761
+ currency: string;
2762
+ }
2763
+ /** One Update on the return chart. */
2764
+ interface ThesisUpdateReturn {
2765
+ authorVersionId: string;
2766
+ publishedAtMs: number;
2767
+ startValue: number;
2768
+ updateReturn: number | null;
2769
+ positions: ThesisPositionReturn[];
2770
+ }
2771
+ /** The Thesis return; values are fractions (0.05 is +5%). */
2772
+ interface ThesisReturnValue {
2773
+ live: boolean;
2774
+ value: number;
2775
+ firstFillAtMs: number | null;
2776
+ pricedAtMs: number | null;
2777
+ stale: boolean;
2778
+ computedAtMs: number;
2779
+ updates: ThesisUpdateReturn[];
2780
+ }
2781
+ interface ThesisReturnResult {
2782
+ playbookId: string;
2783
+ /** UNSET, ON or OFF; null when the current publication is not readable. */
2784
+ returnTracking: 'UNSET' | 'ON' | 'OFF' | null;
2785
+ /** Null when the Thesis is not tracked. */
2786
+ thesisReturn: ThesisReturnValue | null;
2787
+ }
2746
2788
 
2747
2789
  /** Thesis IDs are signed int64 values represented losslessly as decimal strings. */
2748
2790
  type ThesisID = string;
2749
2791
  type ThesisVisibility = 'public' | 'private' | 'paid';
2750
- type ThesisAssetStance = 'unknown' | 'bullish' | 'bearish';
2792
+ /** unknown: not judged; none: judged without a current long or short. */
2793
+ type ThesisAssetStance = 'unknown' | 'bullish' | 'bearish' | 'none';
2751
2794
  interface ThesisEntityStance {
2752
2795
  entity_id: ThesisID;
2753
2796
  stance: ThesisAssetStance;
2797
+ /** Full direction in responses; stance reports none as unknown there. */
2798
+ direction?: ThesisAssetStance;
2799
+ }
2800
+ /** GraphQL direction, including NONE. */
2801
+ type ThesisDirection = 'UNKNOWN' | 'BULLISH' | 'BEARISH' | 'NONE';
2802
+ interface ThesisSelectedDirection {
2803
+ entityId: ThesisID;
2804
+ direction: ThesisDirection;
2805
+ }
2806
+ type ThesisReturnTracking = 'UNSET' | 'ON' | 'OFF';
2807
+ /** What publishing the selected entities with their directions would store. */
2808
+ interface ThesisReturnPreview {
2809
+ /** The Thesis's return switch now; UNSET for a new Thesis. */
2810
+ tracking: ThesisReturnTracking;
2811
+ /** Ask the author whether to keep the return on. */
2812
+ askSwitch: boolean;
2813
+ /** Directions publishing would store; UNKNOWN could not be judged. */
2814
+ directions: ThesisSelectedDirection[];
2815
+ /** Exits that keep the previous direction (last-leg rule). */
2816
+ keptEntityIds: ThesisID[];
2817
+ /** Publishing this draft fails with THESIS_RETURN_LAST_LEG. */
2818
+ lastLegRemoved: boolean;
2819
+ }
2820
+ interface ThesisAssetCandidatesParams {
2821
+ /** Known catalog IDs to classify; with discover false, only these. */
2822
+ entityIds?: ThesisID[];
2823
+ /** The Thesis being updated: its current directions seed carried tickers. */
2824
+ thesisId?: ThesisID;
2825
+ /** False skips ticker discovery. Defaults to true. */
2826
+ discover?: boolean;
2754
2827
  }
2755
2828
  interface ThesisAssetCandidate {
2756
2829
  entityId: ThesisID;
@@ -2767,6 +2840,8 @@ interface ThesisAssetMention {
2767
2840
  }
2768
2841
  interface ThesisAssetCandidatesResponse {
2769
2842
  mentions: ThesisAssetMention[];
2843
+ /** Null only from a server without the preview. */
2844
+ returnPreview: ThesisReturnPreview | null;
2770
2845
  }
2771
2846
  /** Canonical server-supported candidate rewrite operation. */
2772
2847
  type ThesisRewriteMode = 'reformat' | 'shorten' | 'enrich';
@@ -2870,6 +2945,8 @@ interface CreateThesisParams {
2870
2945
  tickers?: string[];
2871
2946
  /** Omitted means public, as defined by the REST contract. */
2872
2947
  visibility?: 'public' | 'private';
2948
+ /** Thesis return switch; omitted keeps the default (on). */
2949
+ track_return?: boolean;
2873
2950
  }
2874
2951
  interface UpdateThesisParams {
2875
2952
  /** Full media replacement; pass current medias for a text-only update. */
@@ -2884,9 +2961,10 @@ interface UpdateThesisParams {
2884
2961
  entity_stances?: ThesisEntityStance[];
2885
2962
  /** Required so an update cannot inadvertently publish a private thesis. */
2886
2963
  visibility: ThesisVisibility;
2887
- editorial?: boolean;
2888
2964
  archived?: boolean;
2889
2965
  note?: string;
2966
+ /** Thesis return switch; omitted keeps the current decision or default. */
2967
+ track_return?: boolean;
2890
2968
  }
2891
2969
  interface SetThesisArchivedParams {
2892
2970
  /** Caller-supplied, stable non-zero UUID for this archive transition. */
@@ -2909,10 +2987,6 @@ interface ThesisSignalEnabledResponse {
2909
2987
  interface SetThesisVisibilityParams {
2910
2988
  visibility: 'public' | 'private';
2911
2989
  }
2912
- interface CloseThesisParams {
2913
- expected_author_version_id: ThesisID;
2914
- note?: string;
2915
- }
2916
2990
  interface RewriteThesisParams {
2917
2991
  body: string;
2918
2992
  /** Omitted selects the canonical `reformat` mode. */
@@ -2932,7 +3006,9 @@ declare class ThesesResource {
2932
3006
  list(params: ListThesesParams): Promise<ThesisListPage>;
2933
3007
  /** Related publications always use the current source version. */
2934
3008
  related(id: ThesisID, params?: ThesisPageParams): Promise<RelatedThesesPage>;
2935
- assetCandidates(text: string): Promise<ThesisAssetCandidatesResponse>;
3009
+ assetCandidates(text: string, params?: ThesisAssetCandidatesParams): Promise<ThesisAssetCandidatesResponse>;
3010
+ /** The Thesis return of a Playbook's current publication; detail revalues it. */
3011
+ thesisReturn(id: ThesisID, params?: ThesisReturnParams): Promise<ThesisReturnResult>;
2936
3012
  create(params: CreateThesisParams): Promise<ThesisResponse>;
2937
3013
  get(id: ThesisID): Promise<ThesisGetResponse>;
2938
3014
  getVersion(id: ThesisID, authorVersionID: ThesisID): Promise<ThesisResponse>;
@@ -2944,8 +3020,6 @@ declare class ThesesResource {
2944
3020
  versions: Thesis[];
2945
3021
  next_cursor: string;
2946
3022
  }>;
2947
- /** Deletes only the selected Update; never falls back to whole-Thesis deletion. */
2948
- deleteUpdate(id: ThesisID, authorVersionID: ThesisID, expectedAuthorVersionID: ThesisID): Promise<ThesisResponse>;
2949
3023
  signals(id: ThesisID, params?: ListThesisSignalsParams): Promise<ThesisSignalsResponse>;
2950
3024
  update(id: ThesisID, params: UpdateThesisParams): Promise<ThesisResponse>;
2951
3025
  /** Archive or restore the current version without asking callers to resend its body. */
@@ -2953,8 +3027,6 @@ declare class ThesesResource {
2953
3027
  setStarred(id: ThesisID, isStarred: boolean): Promise<ThesisStarredResponse>;
2954
3028
  setSignalEnabled(id: ThesisID, enabled: boolean): Promise<ThesisSignalEnabledResponse>;
2955
3029
  setVisibility(id: ThesisID, params: SetThesisVisibilityParams): Promise<ThesisResponse>;
2956
- close(id: ThesisID, params: CloseThesisParams): Promise<ThesisResponse>;
2957
- delete(id: ThesisID): Promise<Record<string, never>>;
2958
3030
  rewrite(params: RewriteThesisParams): Promise<RewriteThesisResponse>;
2959
3031
  }
2960
3032
 
package/dist/dispatch.js CHANGED
@@ -6064,11 +6064,17 @@ var EMBEDDED_COMMAND_DEFINITIONS = [
6064
6064
  "entity-ids",
6065
6065
  "entity-stances",
6066
6066
  "tickers",
6067
- "visibility"
6067
+ "visibility",
6068
+ "track-return"
6068
6069
  ]
6069
6070
  }),
6070
6071
  route("thesis asset-candidates", "thesis asset-candidates", {
6071
- values: ["text"]
6072
+ values: ["text", "entity-ids", "thesis-id"],
6073
+ booleans: ["no-discovery"]
6074
+ }),
6075
+ route("thesis return", "thesis return", {
6076
+ values: ["id"],
6077
+ booleans: ["detail"]
6072
6078
  }),
6073
6079
  route("thesis list", "thesis list", {
6074
6080
  values: [
@@ -6089,9 +6095,6 @@ var EMBEDDED_COMMAND_DEFINITIONS = [
6089
6095
  route("thesis version list", "thesis version list", {
6090
6096
  values: ["id", "first", "cursor"]
6091
6097
  }),
6092
- route("thesis version delete", "thesis version delete", {
6093
- values: ["id", "author-version-id", "expected-author-version-id"]
6094
- }),
6095
6098
  route("thesis version get", "thesis version get", {
6096
6099
  values: ["id", "author-version-id"]
6097
6100
  }),
@@ -6122,14 +6125,10 @@ var EMBEDDED_COMMAND_DEFINITIONS = [
6122
6125
  "entity-ids",
6123
6126
  "entity-stances",
6124
6127
  "medias",
6125
- "visibility"
6126
- ],
6127
- booleans: ["editorial"]
6128
- }),
6129
- route("thesis close", "thesis close", {
6130
- values: ["id", "expected-author-version-id", "note"]
6128
+ "visibility",
6129
+ "track-return"
6130
+ ]
6131
6131
  }),
6132
- route("thesis delete", "thesis delete", { values: ["id"] }),
6133
6132
  route("thesis rewrite", "thesis rewrite", { values: ["body", "mode"] }),
6134
6133
  route("account whoami", "whoami"),
6135
6134
  route("account credits wallet", "credits wallet"),
@@ -6672,7 +6671,7 @@ Examples:
6672
6671
  alva for-you theses --cursor '<nextCursor>'`,
6673
6672
  thesis: `Usage: alva thesis <subcommand> [options]
6674
6673
 
6675
- Subcommands: list, related, asset-candidates, create, get, version get, signals, set-visibility, archive, restore, star, unstar, set-signal-enabled, update, close, delete, rewrite.
6674
+ Subcommands: list, related, asset-candidates, create, get, version get, signals, set-visibility, archive, restore, star, unstar, set-signal-enabled, update, rewrite.
6676
6675
 
6677
6676
  list --person <slug> | --person-name <name> | --user <username>
6678
6677
  | --ticker <ticker> | --entity-id <id>
@@ -6689,11 +6688,17 @@ signed-in owner's private Theses. Related uses the source's current version
6689
6688
  (GENERATING, READY or FAILED), never a quoted historical version.
6690
6689
 
6691
6690
  asset-candidates --text <unsaved thesis text> reads catalog IDs and suggested
6692
- directions without publishing. Use resolved entity IDs with create/update --entity-ids
6693
- <id,id> and --entity-stances <json> to preserve the author's direction.
6694
- Map each candidate.entityId to JSON entity_id and lowercase its stance:
6691
+ directions without publishing. For known tickers, add --entity-ids <id,id>
6692
+ --no-discovery (and --thesis-id <id> for an Update): it skips ticker discovery
6693
+ and returns returnPreview, the directions publishing would store, whether to ask
6694
+ the Thesis return switch (askSwitch) and whether the draft would be rejected
6695
+ (lastLegRemoved). Publish with create/update --entity-ids <id,id> and
6696
+ --entity-stances <json> equal to returnPreview.directions, lowercased:
6695
6697
  --entity-stances '[{"entity_id":"745337","stance":"bearish"}]'. Valid stances:
6696
- unknown, bullish, bearish. Ask the author if a suggested direction is ambiguous.
6698
+ unknown, bullish, bearish, none. --track-return false turns the Thesis return
6699
+ off for good; it is accepted only while the switch is UNSET.
6700
+ return --id <id> [--detail] reads the Thesis return (fractions; --detail adds
6701
+ each Update's positions).
6697
6702
 
6698
6703
  Embedded thesis commands accept literal --body text only; file and stdin body
6699
6704
  transports are intentionally unavailable because this runtime has no verified
@@ -6714,16 +6719,18 @@ IDs, and noncanonical GraphQL errors fail closed. The returned state is the
6714
6719
  authority for archive, bookmark, and research results.
6715
6720
  Update requires both --expected-author-version-id and --visibility, preventing
6716
6721
  inadvertent publication, and replaces the document's body, title, and entity
6717
- IDs and directions as a full author-version update. Update accepts --entity-stances <json>.
6722
+ IDs and directions as a full author-version update. Each update publishes a new
6723
+ Update; a published Update cannot be edited in place. Update accepts --entity-stances <json>.
6718
6724
  Only editing the body? Resubmit the existing entity IDs, directions, and medias.
6719
6725
  Pass current medias unchanged with --medias; omission clears attachments.
6720
- Omitted directions become unknown; explicit unknown clears a direction.
6726
+ On an Update, an omitted or unknown direction of a carried ticker keeps its
6727
+ previous direction; none is an exit.
6721
6728
  Create and update require a caller-supplied non-zero
6722
6729
  UUID in --request-id; the dispatcher never creates request IDs or retries.
6723
6730
 
6724
6731
  If a write response is ambiguous, retain and reuse the same request ID only
6725
6732
  when resolving that ambiguity with the backend. Rewrite is explicit-only: no
6726
- create, update, close, or delete command invokes it. Backend owns Signal/Alert
6733
+ create or update command invokes it. Backend owns Signal/Alert
6727
6734
  setup; the CLI never starts them separately. IDs remain decimal strings, never
6728
6735
  numbers. Rewrite returns a candidate only; it does not create or update a Thesis,
6729
6736
  select a mode from body length/errors, or invent supporting evidence.`,
@@ -7823,11 +7830,16 @@ var COMMAND_DEFINITIONS = [
7823
7830
  "entity-ids",
7824
7831
  "entity-stances",
7825
7832
  "tickers",
7826
- "visibility"
7833
+ "visibility",
7834
+ "track-return"
7827
7835
  ],
7828
7836
  booleans: ["body-stdin"]
7829
7837
  }),
7830
- command("thesis asset-candidates", { values: ["text"] }),
7838
+ command("thesis asset-candidates", {
7839
+ values: ["text", "entity-ids", "thesis-id"],
7840
+ booleans: ["no-discovery"]
7841
+ }),
7842
+ command("thesis return", { values: ["id"], booleans: ["detail"] }),
7831
7843
  command("thesis list", {
7832
7844
  values: [
7833
7845
  "person",
@@ -7843,9 +7855,6 @@ var COMMAND_DEFINITIONS = [
7843
7855
  command("thesis related", { values: ["id", "first", "cursor"] }),
7844
7856
  command("thesis get", { values: ["id"] }),
7845
7857
  command("thesis version list", { values: ["id", "first", "cursor"] }),
7846
- command("thesis version delete", {
7847
- values: ["id", "author-version-id", "expected-author-version-id"]
7848
- }),
7849
7858
  command("thesis version get", {
7850
7859
  values: ["id", "author-version-id"]
7851
7860
  }),
@@ -7867,14 +7876,11 @@ var COMMAND_DEFINITIONS = [
7867
7876
  "entity-ids",
7868
7877
  "entity-stances",
7869
7878
  "medias",
7870
- "visibility"
7879
+ "visibility",
7880
+ "track-return"
7871
7881
  ],
7872
- booleans: ["body-stdin", "editorial"]
7873
- }),
7874
- command("thesis close", {
7875
- values: ["id", "expected-author-version-id", "note"]
7882
+ booleans: ["body-stdin"]
7876
7883
  }),
7877
- command("thesis delete", { values: ["id"] }),
7878
7884
  command("thesis rewrite", {
7879
7885
  values: ["body", "body-file", "mode"],
7880
7886
  booleans: ["body-stdin"]
@@ -12016,7 +12022,7 @@ function formatTradingPairResolved(result) {
12016
12022
  }
12017
12023
 
12018
12024
  // src/cli/dispatch.ts
12019
- var CLI_VERSION = true ? "0.35.0" : "dev";
12025
+ var CLI_VERSION = true ? "0.36.0-beta.0" : "dev";
12020
12026
  var DEFAULT_RUN_TIMEOUT_MS = 6e5;
12021
12027
  var RUN_TIMEOUT_ENV = "ALVA_RUN_TIMEOUT_MS";
12022
12028
  var GLOBAL_VALUE_FLAGS = Object.entries(GLOBAL_FLAG_DEFINITIONS).filter(([, kind]) => kind === "value").map(([name]) => `--${name}`);
@@ -13431,7 +13437,7 @@ Examples:
13431
13437
  alva arrays token status`,
13432
13438
  thesis: `Usage: alva thesis <subcommand> [options]
13433
13439
 
13434
- Create, read, inspect Signals and exact author versions, update, close, delete, or explicitly rewrite an authored thesis.
13440
+ Create, read, inspect Signals and exact author versions, publish Updates to, or explicitly rewrite an authored thesis.
13435
13441
  Backend owns Signal/Alert setup; the CLI never starts them separately.
13436
13442
  Create and update never rewrite text automatically.
13437
13443
 
@@ -13442,7 +13448,6 @@ Subcommands:
13442
13448
  get Get one thesis
13443
13449
  version get Get one exact author version
13444
13450
  version list List visible Updates with editorial revisions folded together
13445
- version delete Delete one Update; restore prior content if it is current
13446
13451
  signals Read published Signal history
13447
13452
  set-visibility Change current access without publishing a version
13448
13453
  archive Archive the current author version
@@ -13450,9 +13455,7 @@ Subcommands:
13450
13455
  star Add the Thesis to your bookmarks
13451
13456
  unstar Remove the Thesis from your bookmarks
13452
13457
  set-signal-enabled Enable or disable managed Signal research
13453
- update Replaces document fields: body, title, entities, visibility (all sent in full)
13454
- close Close the current author version with an optional note
13455
- delete Delete a thesis
13458
+ update Publish a new Update replacing body, title, entities, visibility (all sent in full)
13456
13459
  rewrite Explicitly request a candidate body rewrite; never called by another command
13457
13460
 
13458
13461
  Body input (create, update, rewrite): choose exactly one:
@@ -13467,7 +13470,7 @@ the backend; do not send a fresh ID. Create defaults --visibility to public.
13467
13470
  Update requires --visibility explicitly so it cannot inadvertently publish.
13468
13471
 
13469
13472
  Other flags:
13470
- create --request-id <uuid> --body ... [--images <json-array-of-https-urls>] [--title <text>] [--tickers <ticker,ticker>] [--entity-ids <id,id>] [--entity-stances <json>] [--visibility <value>]
13473
+ create --request-id <uuid> --body ... [--images <json-array-of-https-urls>] [--title <text>] [--tickers <ticker,ticker>] [--entity-ids <id,id>] [--entity-stances <json>] [--visibility <value>] [--track-return true|false]
13471
13474
  Images: public creation only, at most 20 in display order. Upload selected files
13472
13475
  with the existing host upload tool after publication confirmation. Private
13473
13476
  images and local/ALFS paths are not supported; this flag does not upload.
@@ -13485,12 +13488,14 @@ Other flags:
13485
13488
  publication.playbookId is the ID for get/version/signals/related;
13486
13489
  publication=null means no readable snapshot. Author lists include the
13487
13490
  signed-in owner's private Theses (visibility private).
13488
- asset-candidates --text <unsaved thesis text>
13491
+ asset-candidates --text <unsaved thesis text> [--entity-ids <id,id>] [--thesis-id <id>] [--no-discovery]
13492
+ --no-discovery only classifies --entity-ids (no ticker discovery) and
13493
+ returns returnPreview: the directions publishing would store, the return
13494
+ switch (askSwitch) and lastLegRemoved. --thesis-id seeds an Update.
13495
+ return --id <id> [--detail] the Thesis return; --detail adds each Update's positions
13489
13496
  get --id <signed-int64-decimal>
13490
13497
  version get --id <signed-int64-decimal> --author-version-id <signed-int64-decimal>
13491
13498
  version list --id <id> [--first <1-100>] [--cursor <next_cursor>]
13492
- version delete --id <id> --author-version-id <selected> --expected-author-version-id <current>
13493
- Cannot remove the last Update. Never falls back to whole-Thesis deletion.
13494
13499
  signals --id <id> [--first <1-50>] [--cursor <opaque-cursor>]
13495
13500
  set-visibility --id <id> --visibility public|private
13496
13501
  archive --id <id> --request-id <uuid> [--note <text>]
@@ -13511,13 +13516,12 @@ Maintenance behavior:
13511
13516
  set-signal-enabled changes managed Signal research without deleting history.
13512
13517
  The command returns enabled, research_paused, archived, and author version
13513
13518
  state; GraphQL errors and noncanonical error codes fail closed.
13514
- update --id <id> --request-id <uuid> --expected-author-version-id <id> --body ... --visibility <value> [--title <text>] [--entity-ids <id,id>] [--entity-stances <json>] [--medias <json-array>] [--editorial]
13519
+ update --id <id> --request-id <uuid> --expected-author-version-id <id> --body ... --visibility <value> [--title <text>] [--entity-ids <id,id>] [--entity-stances <json>] [--medias <json-array>] [--track-return true|false]
13515
13520
  For text edits, pass current medias unchanged; omission clears media.
13516
13521
 
13517
13522
  Only editing the body? Resubmit the existing entity IDs and directions.
13518
- Omitted directions become unknown; explicit unknown clears a direction.
13519
- close --id <id> --expected-author-version-id <id> [--note <text>]
13520
- delete --id <id>
13523
+ On an Update, an omitted or unknown direction of a carried ticker keeps its
13524
+ previous direction; none is an exit.
13521
13525
  rewrite --body ... [--mode reformat|shorten|enrich]
13522
13526
 
13523
13527
  Rewrite mode defaults only when omitted, and the toolkit always sends the
@@ -14381,6 +14385,17 @@ function thesisImages(flags) {
14381
14385
  "thesis"
14382
14386
  );
14383
14387
  }
14388
+ function thesisTrackReturn(flags, command2) {
14389
+ const raw = flags["track-return"];
14390
+ if (raw === void 0) return void 0;
14391
+ const parsed = boolFlag(raw);
14392
+ if (parsed === void 0)
14393
+ throw new CliUsageError(
14394
+ `--track-return must be true or false for ${command2}`,
14395
+ "thesis"
14396
+ );
14397
+ return parsed;
14398
+ }
14384
14399
  function thesisEntityStances(flags) {
14385
14400
  const raw = flags["entity-stances"];
14386
14401
  if (raw === void 0) return void 0;
@@ -15034,11 +15049,22 @@ async function executeParsedCommand(client, parsedCommand, meta, deps) {
15034
15049
  entity_ids: thesisEntityIDs(flags),
15035
15050
  entity_stances: thesisEntityStances(flags),
15036
15051
  tickers: thesisTickers(flags),
15037
- visibility: flags.visibility === void 0 ? "public" : thesisCreateVisibility(flags.visibility)
15052
+ visibility: flags.visibility === void 0 ? "public" : thesisCreateVisibility(flags.visibility),
15053
+ track_return: thesisTrackReturn(flags, "thesis create")
15038
15054
  });
15039
15055
  case "asset-candidates":
15040
15056
  return client.theses.assetCandidates(
15041
- requireFlag(flags, "text", "thesis asset-candidates")
15057
+ requireFlag(flags, "text", "thesis asset-candidates"),
15058
+ {
15059
+ entityIds: thesisEntityIDs(flags),
15060
+ thesisId: flags["thesis-id"],
15061
+ discover: boolFlag(flags["no-discovery"]) !== true
15062
+ }
15063
+ );
15064
+ case "return":
15065
+ return client.theses.thesisReturn(
15066
+ requireFlag(flags, "id", "thesis return"),
15067
+ { detail: boolFlag(flags.detail) === true }
15042
15068
  );
15043
15069
  case "list": {
15044
15070
  const params = {
@@ -15085,17 +15111,6 @@ async function executeParsedCommand(client, parsedCommand, meta, deps) {
15085
15111
  }
15086
15112
  );
15087
15113
  }
15088
- if (parsedCommand.path[2] === "delete") {
15089
- return client.theses.deleteUpdate(
15090
- requireFlag(flags, "id", "thesis version delete"),
15091
- requireFlag(flags, "author-version-id", "thesis version delete"),
15092
- requireFlag(
15093
- flags,
15094
- "expected-author-version-id",
15095
- "thesis version delete"
15096
- )
15097
- );
15098
- }
15099
15114
  return client.theses.getVersion(
15100
15115
  requireFlag(flags, "id", "thesis version get"),
15101
15116
  requireFlag(flags, "author-version-id", "thesis version get")
@@ -15168,22 +15183,9 @@ async function executeParsedCommand(client, parsedCommand, meta, deps) {
15168
15183
  visibility: thesisVisibility(
15169
15184
  requireFlag(flags, "visibility", "thesis update")
15170
15185
  ),
15171
- editorial: boolFlag(flags.editorial) ?? false
15186
+ track_return: thesisTrackReturn(flags, "thesis update")
15172
15187
  }
15173
15188
  );
15174
- case "close":
15175
- return client.theses.close(requireFlag(flags, "id", "thesis close"), {
15176
- expected_author_version_id: requireFlag(
15177
- flags,
15178
- "expected-author-version-id",
15179
- "thesis close"
15180
- ),
15181
- note: flags.note
15182
- });
15183
- case "delete":
15184
- return client.theses.delete(
15185
- requireFlag(flags, "id", "thesis delete")
15186
- );
15187
15189
  case "rewrite":
15188
15190
  return client.theses.rewrite({
15189
15191
  body: await thesisBodyFromFlags(flags, "thesis rewrite", deps),