@multiagency/sdk 0.3.1 → 0.4.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.
@@ -2696,6 +2696,7 @@ export declare const externalPlanOutput: z.ZodObject<{
2696
2696
  id: z.ZodString;
2697
2697
  source: z.ZodEnum<{
2698
2698
  external: "external";
2699
+ proposal: "proposal";
2699
2700
  rebalance: "rebalance";
2700
2701
  steward: "steward";
2701
2702
  }>;
@@ -2723,6 +2724,7 @@ export declare const externalPlanOutput: z.ZodObject<{
2723
2724
  public: z.ZodString;
2724
2725
  confidential: z.ZodString;
2725
2726
  }, z.core.$loose>>;
2727
+ proposalId: z.ZodOptional<z.ZodString>;
2726
2728
  }, z.core.$loose>;
2727
2729
  /** treasury.ts rebalance RebalanceEvent. serializer: holdings and leg amounts are bigint; `steps` may hold undefined. */
2728
2730
  export declare const rebalanceEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -2783,6 +2785,7 @@ export declare const rebalanceEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
2783
2785
  id: z.ZodString;
2784
2786
  source: z.ZodEnum<{
2785
2787
  external: "external";
2788
+ proposal: "proposal";
2786
2789
  rebalance: "rebalance";
2787
2790
  steward: "steward";
2788
2791
  }>;
@@ -2810,6 +2813,7 @@ export declare const rebalanceEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
2810
2813
  public: z.ZodString;
2811
2814
  confidential: z.ZodString;
2812
2815
  }, z.core.$loose>>;
2816
+ proposalId: z.ZodOptional<z.ZodString>;
2813
2817
  }, z.core.$loose>;
2814
2818
  steps: z.ZodArray<z.ZodOptional<z.ZodNumber>>;
2815
2819
  }, z.core.$loose>], "type">;
@@ -2882,6 +2886,7 @@ export declare const stewardProposeEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
2882
2886
  id: z.ZodString;
2883
2887
  source: z.ZodEnum<{
2884
2888
  external: "external";
2889
+ proposal: "proposal";
2885
2890
  rebalance: "rebalance";
2886
2891
  steward: "steward";
2887
2892
  }>;
@@ -2909,6 +2914,7 @@ export declare const stewardProposeEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
2909
2914
  public: z.ZodString;
2910
2915
  confidential: z.ZodString;
2911
2916
  }, z.core.$loose>>;
2917
+ proposalId: z.ZodOptional<z.ZodString>;
2912
2918
  }, z.core.$loose>;
2913
2919
  }, z.core.$loose>], "type">;
2914
2920
  export declare const ownerOutputs: {
@@ -5533,6 +5539,7 @@ export declare const ownerOutputs: {
5533
5539
  id: z.ZodString;
5534
5540
  source: z.ZodEnum<{
5535
5541
  external: "external";
5542
+ proposal: "proposal";
5536
5543
  rebalance: "rebalance";
5537
5544
  steward: "steward";
5538
5545
  }>;
@@ -5560,6 +5567,7 @@ export declare const ownerOutputs: {
5560
5567
  public: z.ZodString;
5561
5568
  confidential: z.ZodString;
5562
5569
  }, z.core.$loose>>;
5570
+ proposalId: z.ZodOptional<z.ZodString>;
5563
5571
  }, z.core.$loose>;
5564
5572
  readonly rebalance: z.ZodDiscriminatedUnion<[z.ZodObject<{
5565
5573
  type: z.ZodLiteral<"plan">;
@@ -5619,6 +5627,7 @@ export declare const ownerOutputs: {
5619
5627
  id: z.ZodString;
5620
5628
  source: z.ZodEnum<{
5621
5629
  external: "external";
5630
+ proposal: "proposal";
5622
5631
  rebalance: "rebalance";
5623
5632
  steward: "steward";
5624
5633
  }>;
@@ -5646,6 +5655,7 @@ export declare const ownerOutputs: {
5646
5655
  public: z.ZodString;
5647
5656
  confidential: z.ZodString;
5648
5657
  }, z.core.$loose>>;
5658
+ proposalId: z.ZodOptional<z.ZodString>;
5649
5659
  }, z.core.$loose>;
5650
5660
  steps: z.ZodArray<z.ZodOptional<z.ZodNumber>>;
5651
5661
  }, z.core.$loose>], "type">;
@@ -5715,6 +5725,7 @@ export declare const ownerOutputs: {
5715
5725
  id: z.ZodString;
5716
5726
  source: z.ZodEnum<{
5717
5727
  external: "external";
5728
+ proposal: "proposal";
5718
5729
  rebalance: "rebalance";
5719
5730
  steward: "steward";
5720
5731
  }>;
@@ -5742,8 +5753,361 @@ export declare const ownerOutputs: {
5742
5753
  public: z.ZodString;
5743
5754
  confidential: z.ZodString;
5744
5755
  }, z.core.$loose>>;
5756
+ proposalId: z.ZodOptional<z.ZodString>;
5745
5757
  }, z.core.$loose>;
5746
5758
  }, z.core.$loose>], "type">;
5759
+ readonly "proposals/create": z.ZodObject<{
5760
+ id: z.ZodString;
5761
+ requestId: z.ZodString;
5762
+ agentId: z.ZodString;
5763
+ deployment: z.ZodString;
5764
+ organization: z.ZodString;
5765
+ source: z.ZodEnum<{
5766
+ external: "external";
5767
+ rebalance: "rebalance";
5768
+ }>;
5769
+ legs: z.ZodArray<z.ZodObject<{
5770
+ from: z.ZodString;
5771
+ to: z.ZodString;
5772
+ amount: z.ZodString;
5773
+ minAmountOut: z.ZodString;
5774
+ }, z.core.$loose>>;
5775
+ quoted: z.ZodArray<z.ZodObject<{
5776
+ amountOut: z.ZodString;
5777
+ costBps: z.ZodNumber;
5778
+ usdIn: z.ZodNumber;
5779
+ }, z.core.$loose>>;
5780
+ policyRevision: z.ZodNullable<z.ZodNumber>;
5781
+ policyDigest: z.ZodNullable<z.ZodString>;
5782
+ strategyDigest: z.ZodString;
5783
+ createdAt: z.ZodString;
5784
+ expiresAt: z.ZodString;
5785
+ note: z.ZodNullable<z.ZodString>;
5786
+ sha256: z.ZodString;
5787
+ state: z.ZodEnum<{
5788
+ approved: "approved";
5789
+ executed: "executed";
5790
+ executing: "executing";
5791
+ expired: "expired";
5792
+ invalidated: "invalidated";
5793
+ proposed: "proposed";
5794
+ rejected: "rejected";
5795
+ stopped: "stopped";
5796
+ unknown: "unknown";
5797
+ withdrawn: "withdrawn";
5798
+ }>;
5799
+ reason: z.ZodNullable<z.ZodString>;
5800
+ approvedAt: z.ZodNullable<z.ZodString>;
5801
+ planId: z.ZodNullable<z.ZodString>;
5802
+ operations: z.ZodArray<z.ZodObject<{
5803
+ method: z.ZodOptional<z.ZodString>;
5804
+ status: z.ZodNullable<z.ZodString>;
5805
+ correlationId: z.ZodNullable<z.ZodString>;
5806
+ refused: z.ZodNullable<z.ZodString>;
5807
+ }, z.core.$loose>>;
5808
+ }, z.core.$loose>;
5809
+ readonly "proposals/get": z.ZodObject<{
5810
+ id: z.ZodString;
5811
+ requestId: z.ZodString;
5812
+ agentId: z.ZodString;
5813
+ deployment: z.ZodString;
5814
+ organization: z.ZodString;
5815
+ source: z.ZodEnum<{
5816
+ external: "external";
5817
+ rebalance: "rebalance";
5818
+ }>;
5819
+ legs: z.ZodArray<z.ZodObject<{
5820
+ from: z.ZodString;
5821
+ to: z.ZodString;
5822
+ amount: z.ZodString;
5823
+ minAmountOut: z.ZodString;
5824
+ }, z.core.$loose>>;
5825
+ quoted: z.ZodArray<z.ZodObject<{
5826
+ amountOut: z.ZodString;
5827
+ costBps: z.ZodNumber;
5828
+ usdIn: z.ZodNumber;
5829
+ }, z.core.$loose>>;
5830
+ policyRevision: z.ZodNullable<z.ZodNumber>;
5831
+ policyDigest: z.ZodNullable<z.ZodString>;
5832
+ strategyDigest: z.ZodString;
5833
+ createdAt: z.ZodString;
5834
+ expiresAt: z.ZodString;
5835
+ note: z.ZodNullable<z.ZodString>;
5836
+ sha256: z.ZodString;
5837
+ state: z.ZodEnum<{
5838
+ approved: "approved";
5839
+ executed: "executed";
5840
+ executing: "executing";
5841
+ expired: "expired";
5842
+ invalidated: "invalidated";
5843
+ proposed: "proposed";
5844
+ rejected: "rejected";
5845
+ stopped: "stopped";
5846
+ unknown: "unknown";
5847
+ withdrawn: "withdrawn";
5848
+ }>;
5849
+ reason: z.ZodNullable<z.ZodString>;
5850
+ approvedAt: z.ZodNullable<z.ZodString>;
5851
+ planId: z.ZodNullable<z.ZodString>;
5852
+ operations: z.ZodArray<z.ZodObject<{
5853
+ method: z.ZodOptional<z.ZodString>;
5854
+ status: z.ZodNullable<z.ZodString>;
5855
+ correlationId: z.ZodNullable<z.ZodString>;
5856
+ refused: z.ZodNullable<z.ZodString>;
5857
+ }, z.core.$loose>>;
5858
+ }, z.core.$loose>;
5859
+ readonly "proposals/list": z.ZodObject<{
5860
+ proposals: z.ZodArray<z.ZodObject<{
5861
+ id: z.ZodString;
5862
+ requestId: z.ZodString;
5863
+ agentId: z.ZodString;
5864
+ deployment: z.ZodString;
5865
+ organization: z.ZodString;
5866
+ source: z.ZodEnum<{
5867
+ external: "external";
5868
+ rebalance: "rebalance";
5869
+ }>;
5870
+ legs: z.ZodArray<z.ZodObject<{
5871
+ from: z.ZodString;
5872
+ to: z.ZodString;
5873
+ amount: z.ZodString;
5874
+ minAmountOut: z.ZodString;
5875
+ }, z.core.$loose>>;
5876
+ quoted: z.ZodArray<z.ZodObject<{
5877
+ amountOut: z.ZodString;
5878
+ costBps: z.ZodNumber;
5879
+ usdIn: z.ZodNumber;
5880
+ }, z.core.$loose>>;
5881
+ policyRevision: z.ZodNullable<z.ZodNumber>;
5882
+ policyDigest: z.ZodNullable<z.ZodString>;
5883
+ strategyDigest: z.ZodString;
5884
+ createdAt: z.ZodString;
5885
+ expiresAt: z.ZodString;
5886
+ note: z.ZodNullable<z.ZodString>;
5887
+ sha256: z.ZodString;
5888
+ state: z.ZodEnum<{
5889
+ approved: "approved";
5890
+ executed: "executed";
5891
+ executing: "executing";
5892
+ expired: "expired";
5893
+ invalidated: "invalidated";
5894
+ proposed: "proposed";
5895
+ rejected: "rejected";
5896
+ stopped: "stopped";
5897
+ unknown: "unknown";
5898
+ withdrawn: "withdrawn";
5899
+ }>;
5900
+ reason: z.ZodNullable<z.ZodString>;
5901
+ approvedAt: z.ZodNullable<z.ZodString>;
5902
+ planId: z.ZodNullable<z.ZodString>;
5903
+ operations: z.ZodArray<z.ZodObject<{
5904
+ method: z.ZodOptional<z.ZodString>;
5905
+ status: z.ZodNullable<z.ZodString>;
5906
+ correlationId: z.ZodNullable<z.ZodString>;
5907
+ refused: z.ZodNullable<z.ZodString>;
5908
+ }, z.core.$loose>>;
5909
+ }, z.core.$loose>>;
5910
+ }, z.core.$loose>;
5911
+ readonly "proposals/approve": z.ZodObject<{
5912
+ id: z.ZodString;
5913
+ requestId: z.ZodString;
5914
+ agentId: z.ZodString;
5915
+ deployment: z.ZodString;
5916
+ organization: z.ZodString;
5917
+ source: z.ZodEnum<{
5918
+ external: "external";
5919
+ rebalance: "rebalance";
5920
+ }>;
5921
+ legs: z.ZodArray<z.ZodObject<{
5922
+ from: z.ZodString;
5923
+ to: z.ZodString;
5924
+ amount: z.ZodString;
5925
+ minAmountOut: z.ZodString;
5926
+ }, z.core.$loose>>;
5927
+ quoted: z.ZodArray<z.ZodObject<{
5928
+ amountOut: z.ZodString;
5929
+ costBps: z.ZodNumber;
5930
+ usdIn: z.ZodNumber;
5931
+ }, z.core.$loose>>;
5932
+ policyRevision: z.ZodNullable<z.ZodNumber>;
5933
+ policyDigest: z.ZodNullable<z.ZodString>;
5934
+ strategyDigest: z.ZodString;
5935
+ createdAt: z.ZodString;
5936
+ expiresAt: z.ZodString;
5937
+ note: z.ZodNullable<z.ZodString>;
5938
+ sha256: z.ZodString;
5939
+ state: z.ZodEnum<{
5940
+ approved: "approved";
5941
+ executed: "executed";
5942
+ executing: "executing";
5943
+ expired: "expired";
5944
+ invalidated: "invalidated";
5945
+ proposed: "proposed";
5946
+ rejected: "rejected";
5947
+ stopped: "stopped";
5948
+ unknown: "unknown";
5949
+ withdrawn: "withdrawn";
5950
+ }>;
5951
+ reason: z.ZodNullable<z.ZodString>;
5952
+ approvedAt: z.ZodNullable<z.ZodString>;
5953
+ planId: z.ZodNullable<z.ZodString>;
5954
+ operations: z.ZodArray<z.ZodObject<{
5955
+ method: z.ZodOptional<z.ZodString>;
5956
+ status: z.ZodNullable<z.ZodString>;
5957
+ correlationId: z.ZodNullable<z.ZodString>;
5958
+ refused: z.ZodNullable<z.ZodString>;
5959
+ }, z.core.$loose>>;
5960
+ }, z.core.$loose>;
5961
+ readonly "proposals/reject": z.ZodObject<{
5962
+ id: z.ZodString;
5963
+ requestId: z.ZodString;
5964
+ agentId: z.ZodString;
5965
+ deployment: z.ZodString;
5966
+ organization: z.ZodString;
5967
+ source: z.ZodEnum<{
5968
+ external: "external";
5969
+ rebalance: "rebalance";
5970
+ }>;
5971
+ legs: z.ZodArray<z.ZodObject<{
5972
+ from: z.ZodString;
5973
+ to: z.ZodString;
5974
+ amount: z.ZodString;
5975
+ minAmountOut: z.ZodString;
5976
+ }, z.core.$loose>>;
5977
+ quoted: z.ZodArray<z.ZodObject<{
5978
+ amountOut: z.ZodString;
5979
+ costBps: z.ZodNumber;
5980
+ usdIn: z.ZodNumber;
5981
+ }, z.core.$loose>>;
5982
+ policyRevision: z.ZodNullable<z.ZodNumber>;
5983
+ policyDigest: z.ZodNullable<z.ZodString>;
5984
+ strategyDigest: z.ZodString;
5985
+ createdAt: z.ZodString;
5986
+ expiresAt: z.ZodString;
5987
+ note: z.ZodNullable<z.ZodString>;
5988
+ sha256: z.ZodString;
5989
+ state: z.ZodEnum<{
5990
+ approved: "approved";
5991
+ executed: "executed";
5992
+ executing: "executing";
5993
+ expired: "expired";
5994
+ invalidated: "invalidated";
5995
+ proposed: "proposed";
5996
+ rejected: "rejected";
5997
+ stopped: "stopped";
5998
+ unknown: "unknown";
5999
+ withdrawn: "withdrawn";
6000
+ }>;
6001
+ reason: z.ZodNullable<z.ZodString>;
6002
+ approvedAt: z.ZodNullable<z.ZodString>;
6003
+ planId: z.ZodNullable<z.ZodString>;
6004
+ operations: z.ZodArray<z.ZodObject<{
6005
+ method: z.ZodOptional<z.ZodString>;
6006
+ status: z.ZodNullable<z.ZodString>;
6007
+ correlationId: z.ZodNullable<z.ZodString>;
6008
+ refused: z.ZodNullable<z.ZodString>;
6009
+ }, z.core.$loose>>;
6010
+ }, z.core.$loose>;
6011
+ readonly "proposals/withdraw": z.ZodObject<{
6012
+ id: z.ZodString;
6013
+ requestId: z.ZodString;
6014
+ agentId: z.ZodString;
6015
+ deployment: z.ZodString;
6016
+ organization: z.ZodString;
6017
+ source: z.ZodEnum<{
6018
+ external: "external";
6019
+ rebalance: "rebalance";
6020
+ }>;
6021
+ legs: z.ZodArray<z.ZodObject<{
6022
+ from: z.ZodString;
6023
+ to: z.ZodString;
6024
+ amount: z.ZodString;
6025
+ minAmountOut: z.ZodString;
6026
+ }, z.core.$loose>>;
6027
+ quoted: z.ZodArray<z.ZodObject<{
6028
+ amountOut: z.ZodString;
6029
+ costBps: z.ZodNumber;
6030
+ usdIn: z.ZodNumber;
6031
+ }, z.core.$loose>>;
6032
+ policyRevision: z.ZodNullable<z.ZodNumber>;
6033
+ policyDigest: z.ZodNullable<z.ZodString>;
6034
+ strategyDigest: z.ZodString;
6035
+ createdAt: z.ZodString;
6036
+ expiresAt: z.ZodString;
6037
+ note: z.ZodNullable<z.ZodString>;
6038
+ sha256: z.ZodString;
6039
+ state: z.ZodEnum<{
6040
+ approved: "approved";
6041
+ executed: "executed";
6042
+ executing: "executing";
6043
+ expired: "expired";
6044
+ invalidated: "invalidated";
6045
+ proposed: "proposed";
6046
+ rejected: "rejected";
6047
+ stopped: "stopped";
6048
+ unknown: "unknown";
6049
+ withdrawn: "withdrawn";
6050
+ }>;
6051
+ reason: z.ZodNullable<z.ZodString>;
6052
+ approvedAt: z.ZodNullable<z.ZodString>;
6053
+ planId: z.ZodNullable<z.ZodString>;
6054
+ operations: z.ZodArray<z.ZodObject<{
6055
+ method: z.ZodOptional<z.ZodString>;
6056
+ status: z.ZodNullable<z.ZodString>;
6057
+ correlationId: z.ZodNullable<z.ZodString>;
6058
+ refused: z.ZodNullable<z.ZodString>;
6059
+ }, z.core.$loose>>;
6060
+ }, z.core.$loose>;
6061
+ readonly "proposals/execute": z.ZodObject<{
6062
+ id: z.ZodString;
6063
+ requestId: z.ZodString;
6064
+ agentId: z.ZodString;
6065
+ deployment: z.ZodString;
6066
+ organization: z.ZodString;
6067
+ source: z.ZodEnum<{
6068
+ external: "external";
6069
+ rebalance: "rebalance";
6070
+ }>;
6071
+ legs: z.ZodArray<z.ZodObject<{
6072
+ from: z.ZodString;
6073
+ to: z.ZodString;
6074
+ amount: z.ZodString;
6075
+ minAmountOut: z.ZodString;
6076
+ }, z.core.$loose>>;
6077
+ quoted: z.ZodArray<z.ZodObject<{
6078
+ amountOut: z.ZodString;
6079
+ costBps: z.ZodNumber;
6080
+ usdIn: z.ZodNumber;
6081
+ }, z.core.$loose>>;
6082
+ policyRevision: z.ZodNullable<z.ZodNumber>;
6083
+ policyDigest: z.ZodNullable<z.ZodString>;
6084
+ strategyDigest: z.ZodString;
6085
+ createdAt: z.ZodString;
6086
+ expiresAt: z.ZodString;
6087
+ note: z.ZodNullable<z.ZodString>;
6088
+ sha256: z.ZodString;
6089
+ state: z.ZodEnum<{
6090
+ approved: "approved";
6091
+ executed: "executed";
6092
+ executing: "executing";
6093
+ expired: "expired";
6094
+ invalidated: "invalidated";
6095
+ proposed: "proposed";
6096
+ rejected: "rejected";
6097
+ stopped: "stopped";
6098
+ unknown: "unknown";
6099
+ withdrawn: "withdrawn";
6100
+ }>;
6101
+ reason: z.ZodNullable<z.ZodString>;
6102
+ approvedAt: z.ZodNullable<z.ZodString>;
6103
+ planId: z.ZodNullable<z.ZodString>;
6104
+ operations: z.ZodArray<z.ZodObject<{
6105
+ method: z.ZodOptional<z.ZodString>;
6106
+ status: z.ZodNullable<z.ZodString>;
6107
+ correlationId: z.ZodNullable<z.ZodString>;
6108
+ refused: z.ZodNullable<z.ZodString>;
6109
+ }, z.core.$loose>>;
6110
+ }, z.core.$loose>;
5747
6111
  };
5748
6112
  /** Procedures whose output is an event stream: `ownerOutputs` holds the schema of one yielded event. */
5749
6113
  export declare const ownerStreams: readonly ["rebalance", "executePlan", "sweep", "steward/propose"];
@@ -12,6 +12,7 @@ import { z } from "zod";
12
12
  import { appConfirm } from "./app-access.js";
13
13
  import { ownerCompensationView } from "../compensation-contract.js";
14
14
  import { RecordingSchema } from "./run-log-schema.js";
15
+ import { proposalList, proposalView } from "./treasury-proposals.js";
15
16
  // Server modules with filesystem, crypto or AG-UI dependencies stay out of this browser-safe package: their shapes are
16
17
  // restated here, and test/contract-owner.test.ts proves every handler output is accepted by these schemas.
17
18
  // ---------------------------------------------------------------------------------------------
@@ -155,7 +156,7 @@ const plannedAction = z.discriminatedUnion("type", [
155
156
  /** planning/model.ts Plan. */
156
157
  const plan = z.looseObject({
157
158
  id: z.string(),
158
- source: z.enum(["steward", "rebalance", "external"]),
159
+ source: z.enum(["steward", "rebalance", "external", "proposal"]),
159
160
  createdAt: z.string(),
160
161
  expiresAt: z.string(),
161
162
  instruction: z.string(),
@@ -165,6 +166,7 @@ const plan = z.looseObject({
165
166
  policyDigest: z.string().nullable(),
166
167
  strategyDigest: z.string(),
167
168
  balances: z.record(z.string(), z.looseObject({ public: z.string(), confidential: z.string() })),
169
+ proposalId: z.string().optional(),
168
170
  });
169
171
  /** holdings.ts Holding. serializer: `public` and `confidential` are bigint. */
170
172
  const holding = z.looseObject({
@@ -746,6 +748,13 @@ export const ownerOutputs = {
746
748
  "executePlan": executePlanEvent,
747
749
  "sweep": sweepEvent,
748
750
  "steward/propose": stewardProposeEvent,
751
+ "proposals/create": proposalView,
752
+ "proposals/get": proposalView,
753
+ "proposals/list": proposalList,
754
+ "proposals/approve": proposalView,
755
+ "proposals/reject": proposalView,
756
+ "proposals/withdraw": proposalView,
757
+ "proposals/execute": proposalView,
749
758
  };
750
759
  /** Procedures whose output is an event stream: `ownerOutputs` holds the schema of one yielded event. */
751
760
  export const ownerStreams = ["rebalance", "executePlan", "sweep", "steward/propose"];
@@ -1,5 +1,5 @@
1
1
  /** The package name and version, independent of the wire manifest version (`payeeContract.version`). */
2
2
  export declare const contractPackage: {
3
3
  readonly name: "@multiagency/sdk";
4
- readonly version: "0.3.1";
4
+ readonly version: "0.4.0";
5
5
  };
@@ -1,2 +1,2 @@
1
1
  /** The package name and version, independent of the wire manifest version (`payeeContract.version`). */
2
- export const contractPackage = { name: "@multiagency/sdk", version: "0.3.1" };
2
+ export const contractPackage = { name: "@multiagency/sdk", version: "0.4.0" };
@@ -32,6 +32,8 @@ export const READS = new Set([
32
32
  "workOrders/get",
33
33
  "workOrders/status",
34
34
  "demoGuide/compose",
35
+ "proposals/get",
36
+ "proposals/list",
35
37
  ]);
36
38
  export const OWNER_PROPOSALS = new Set([
37
39
  "owner/prepare",
@@ -40,8 +42,8 @@ export const OWNER_PROPOSALS = new Set([
40
42
  "workOrders/create",
41
43
  "workOrders/prepare",
42
44
  ]);
43
- const PREPARE = new Set([...OWNER_PROPOSALS, "rebalance", "externalPlan", "steward/propose", "deposit", "treasury/fund", "workOrders/deposit"]);
44
- const EXECUTE = new Set(["workOrders/file", "compensation/prepare", "compensation/send", "compensation/review", "pay", "payouts/request", "sweep", "executePlan", "autopilot/tick", "autopilot/enable"]);
45
+ const PREPARE = new Set([...OWNER_PROPOSALS, "rebalance", "externalPlan", "steward/propose", "deposit", "treasury/fund", "workOrders/deposit", "proposals/create", "proposals/withdraw"]);
46
+ const EXECUTE = new Set(["proposals/execute", "workOrders/file", "compensation/prepare", "compensation/send", "compensation/review", "pay", "payouts/request", "sweep", "executePlan", "autopilot/tick", "autopilot/enable"]);
45
47
  const MANAGE = new Set(["compensation/agreement", "strategy/save", "treasury/link", "treasury/unlink", "treasury/setConfidential", "agreements/decline"]);
46
48
  const MAINTAIN = new Set(["autopilot/stop", "recover", "inbox/dismiss", "cancelPreparedInvoice"]);
47
49
  /** Whether this admitted account may call `path` (`owner/prepare`, without the `/rpc/` prefix). */
@@ -50,7 +52,8 @@ export function mayCall(access, path) {
50
52
  return true;
51
53
  if (PREPARE.has(path))
52
54
  return access.canSign || access.canPropose;
53
- if (path === "owner/submit" || path === "workOrders/submit")
55
+ // The owner's signature over a proposal's text is what the agent checks; relaying it is a signer's call.
56
+ if (path === "owner/submit" || path === "workOrders/submit" || path === "proposals/approve" || path === "proposals/reject")
54
57
  return access.canSign;
55
58
  if (EXECUTE.has(path))
56
59
  return access.canExecute;