@@ -104,7 +104,7 @@ export interface Agent {
104
104
id : string ;
105
105
name : string ;
106
106
env : { [ key : string ] : string } ;
107
- startupScript : string ;
107
+ /** Field 4 was startup_script, now removed. */
108
108
operatingSystem : string ;
109
109
architecture : string ;
110
110
directory : string ;
@@ -114,13 +114,14 @@ export interface Agent {
114
114
connectionTimeoutSeconds : number ;
115
115
troubleshootingUrl : string ;
116
116
motdFile : string ;
117
- /** Field 14 was bool login_before_ready = 14, now removed. */
118
- startupScriptTimeoutSeconds : number ;
119
- shutdownScript : string ;
120
- shutdownScriptTimeoutSeconds : number ;
117
+ /**
118
+ * Field 14 was bool login_before_ready = 14, now removed.
119
+ * Field 15, 16, 17 were related to scripts, which are now removed.
120
+ */
121
121
metadata : Agent_Metadata [ ] ;
122
- startupScriptBehavior : string ;
122
+ /** Field 19 was startup_script_behavior, now removed. */
123
123
displayApps : DisplayApps | undefined ;
124
+ scripts : Script [ ] ;
124
125
}
125
126
126
127
export interface Agent_Metadata {
@@ -144,6 +145,19 @@ export interface DisplayApps {
144
145
portForwardingHelper : boolean ;
145
146
}
146
147
148
+ /** Script represents a script to be run on the workspace. */
149
+ export interface Script {
150
+ displayName : string ;
151
+ icon : string ;
152
+ script : string ;
153
+ cron : string ;
154
+ startBlocksLogin : boolean ;
155
+ runOnStart : boolean ;
156
+ runOnStop : boolean ;
157
+ timeoutSeconds : number ;
158
+ logPath : string ;
159
+ }
160
+
147
161
/** App represents a dev-accessible application on the workspace. */
148
162
export interface App {
149
163
/**
@@ -470,9 +484,6 @@ export const Agent = {
470
484
writer . uint32 ( 26 ) . fork ( ) ,
471
485
) . ldelim ( ) ;
472
486
} ) ;
473
- if ( message . startupScript !== "" ) {
474
- writer . uint32 ( 34 ) . string ( message . startupScript ) ;
475
- }
476
487
if ( message . operatingSystem !== "" ) {
477
488
writer . uint32 ( 42 ) . string ( message . operatingSystem ) ;
478
489
}
@@ -500,27 +511,18 @@ export const Agent = {
500
511
if ( message . motdFile !== "" ) {
501
512
writer . uint32 ( 106 ) . string ( message . motdFile ) ;
502
513
}
503
- if ( message . startupScriptTimeoutSeconds !== 0 ) {
504
- writer . uint32 ( 120 ) . int32 ( message . startupScriptTimeoutSeconds ) ;
505
- }
506
- if ( message . shutdownScript !== "" ) {
507
- writer . uint32 ( 130 ) . string ( message . shutdownScript ) ;
508
- }
509
- if ( message . shutdownScriptTimeoutSeconds !== 0 ) {
510
- writer . uint32 ( 136 ) . int32 ( message . shutdownScriptTimeoutSeconds ) ;
511
- }
512
514
for ( const v of message . metadata ) {
513
515
Agent_Metadata . encode ( v ! , writer . uint32 ( 146 ) . fork ( ) ) . ldelim ( ) ;
514
516
}
515
- if ( message . startupScriptBehavior !== "" ) {
516
- writer . uint32 ( 154 ) . string ( message . startupScriptBehavior ) ;
517
- }
518
517
if ( message . displayApps !== undefined ) {
519
518
DisplayApps . encode (
520
519
message . displayApps ,
521
520
writer . uint32 ( 162 ) . fork ( ) ,
522
521
) . ldelim ( ) ;
523
522
}
523
+ for ( const v of message . scripts ) {
524
+ Script . encode ( v ! , writer . uint32 ( 170 ) . fork ( ) ) . ldelim ( ) ;
525
+ }
524
526
return writer ;
525
527
} ,
526
528
} ;
@@ -588,6 +590,42 @@ export const DisplayApps = {
588
590
} ,
589
591
} ;
590
592
593
+ export const Script = {
594
+ encode (
595
+ message : Script ,
596
+ writer : _m0 . Writer = _m0 . Writer . create ( ) ,
597
+ ) : _m0 . Writer {
598
+ if ( message . displayName !== "" ) {
599
+ writer . uint32 ( 10 ) . string ( message . displayName ) ;
600
+ }
601
+ if ( message . icon !== "" ) {
602
+ writer . uint32 ( 18 ) . string ( message . icon ) ;
603
+ }
604
+ if ( message . script !== "" ) {
605
+ writer . uint32 ( 26 ) . string ( message . script ) ;
606
+ }
607
+ if ( message . cron !== "" ) {
608
+ writer . uint32 ( 34 ) . string ( message . cron ) ;
609
+ }
610
+ if ( message . startBlocksLogin === true ) {
611
+ writer . uint32 ( 40 ) . bool ( message . startBlocksLogin ) ;
612
+ }
613
+ if ( message . runOnStart === true ) {
614
+ writer . uint32 ( 48 ) . bool ( message . runOnStart ) ;
615
+ }
616
+ if ( message . runOnStop === true ) {
617
+ writer . uint32 ( 56 ) . bool ( message . runOnStop ) ;
618
+ }
619
+ if ( message . timeoutSeconds !== 0 ) {
620
+ writer . uint32 ( 64 ) . int32 ( message . timeoutSeconds ) ;
621
+ }
622
+ if ( message . logPath !== "" ) {
623
+ writer . uint32 ( 74 ) . string ( message . logPath ) ;
624
+ }
625
+ return writer ;
626
+ } ,
627
+ } ;
628
+
591
629
export const App = {
592
630
encode ( message : App , writer : _m0 . Writer = _m0 . Writer . create ( ) ) : _m0 . Writer {
593
631
if ( message . slug !== "" ) {
0 commit comments