Commit 2ed51e7
committed
Serialize account and organization truth into the copilot VFS
Workspace standing, membership, billing, org role, access-control
restrictions, published-block provenance, and fork topology were reachable
only through three parameterless tools (or not at all). They are ambient
read-only facts, so they belong in the VFS where they are greppable, cost no
tool round-trip, and every agent that can read gets them — the same move that
retired get_blocks_and_tools and list_user_workflows.
Adds account/{workspace,workspaces,members,billing}.json (always mounted) and
organization/{organization,access-control,custom-blocks,forks}.json (only when
the workspace is org-hosted). Every file projects an existing use case or util
after getOrMaterializeVFS's access assert — no new queries, no new
authorization. One relation per file, cross-referenced by id-and-name stub, so
overlapping facts cannot disagree. Volatile content (billing, access control,
forks) is lazy, so numbers are read-time fresh and unasked-for reads cost
nothing.
Projection follows the viewer: member emails are admin-only, fork detail
requires workspace admin on a forking-enabled org, and the whole organization/
namespace is absent for a personal workspace — which is itself the answer.
Retires get_account_billing, get_enterprise_context, and list_user_workspaces
along with their handlers; display titles stay for transcript replay.1 parent 3959fe9 commit 2ed51e7
14 files changed
Lines changed: 778 additions & 671 deletions
File tree
- apps/sim/lib/copilot
- generated
- tool-executor
- tools
- handlers
- workflow
- vfs
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| 16 | + | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
| |||
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
39 | 53 | | |
40 | 54 | | |
41 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
59 | 58 | | |
60 | 59 | | |
61 | 60 | | |
62 | 61 | | |
63 | | - | |
64 | 62 | | |
65 | 63 | | |
66 | 64 | | |
| |||
69 | 67 | | |
70 | 68 | | |
71 | 69 | | |
72 | | - | |
73 | 70 | | |
74 | 71 | | |
75 | 72 | | |
| |||
186 | 183 | | |
187 | 184 | | |
188 | 185 | | |
189 | | - | |
190 | 186 | | |
191 | 187 | | |
192 | 188 | | |
193 | 189 | | |
194 | | - | |
195 | 190 | | |
196 | 191 | | |
197 | 192 | | |
| |||
200 | 195 | | |
201 | 196 | | |
202 | 197 | | |
203 | | - | |
204 | 198 | | |
205 | 199 | | |
206 | 200 | | |
| |||
3004 | 2998 | | |
3005 | 2999 | | |
3006 | 3000 | | |
3007 | | - | |
3008 | | - | |
3009 | | - | |
3010 | | - | |
3011 | | - | |
3012 | | - | |
3013 | | - | |
3014 | | - | |
3015 | 3001 | | |
3016 | 3002 | | |
3017 | 3003 | | |
| |||
3089 | 3075 | | |
3090 | 3076 | | |
3091 | 3077 | | |
3092 | | - | |
3093 | | - | |
3094 | | - | |
3095 | | - | |
3096 | | - | |
3097 | | - | |
3098 | | - | |
3099 | | - | |
3100 | 3078 | | |
3101 | 3079 | | |
3102 | 3080 | | |
| |||
3287 | 3265 | | |
3288 | 3266 | | |
3289 | 3267 | | |
3290 | | - | |
3291 | | - | |
3292 | | - | |
3293 | | - | |
3294 | | - | |
3295 | | - | |
3296 | | - | |
3297 | | - | |
3298 | 3268 | | |
3299 | 3269 | | |
3300 | 3270 | | |
| |||
7245 | 7215 | | |
7246 | 7216 | | |
7247 | 7217 | | |
7248 | | - | |
7249 | 7218 | | |
7250 | 7219 | | |
7251 | 7220 | | |
7252 | 7221 | | |
7253 | | - | |
7254 | 7222 | | |
7255 | 7223 | | |
7256 | 7224 | | |
| |||
7259 | 7227 | | |
7260 | 7228 | | |
7261 | 7229 | | |
7262 | | - | |
7263 | 7230 | | |
7264 | 7231 | | |
7265 | 7232 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2959 | 2959 | | |
2960 | 2960 | | |
2961 | 2961 | | |
2962 | | - | |
2963 | | - | |
2964 | | - | |
2965 | | - | |
2966 | | - | |
2967 | | - | |
2968 | | - | |
2969 | 2962 | | |
2970 | 2963 | | |
2971 | 2964 | | |
| |||
3034 | 3027 | | |
3035 | 3028 | | |
3036 | 3029 | | |
3037 | | - | |
3038 | | - | |
3039 | | - | |
3040 | | - | |
3041 | | - | |
3042 | | - | |
3043 | | - | |
3044 | 3030 | | |
3045 | 3031 | | |
3046 | 3032 | | |
| |||
3209 | 3195 | | |
3210 | 3196 | | |
3211 | 3197 | | |
3212 | | - | |
3213 | | - | |
3214 | | - | |
3215 | | - | |
3216 | | - | |
3217 | | - | |
3218 | | - | |
3219 | 3198 | | |
3220 | 3199 | | |
3221 | 3200 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
18 | | - | |
19 | 17 | | |
20 | 18 | | |
21 | 19 | | |
22 | 20 | | |
23 | 21 | | |
24 | 22 | | |
25 | | - | |
26 | 23 | | |
27 | 24 | | |
28 | 25 | | |
| |||
53 | 50 | | |
54 | 51 | | |
55 | 52 | | |
56 | | - | |
57 | | - | |
58 | 53 | | |
59 | 54 | | |
60 | 55 | | |
| |||
114 | 109 | | |
115 | 110 | | |
116 | 111 | | |
117 | | - | |
118 | 112 | | |
119 | 113 | | |
120 | 114 | | |
| |||
139 | 133 | | |
140 | 134 | | |
141 | 135 | | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | 136 | | |
146 | 137 | | |
147 | 138 | | |
| |||
This file was deleted.
This file was deleted.
0 commit comments