@@ -56,13 +56,15 @@ public class ResumeSessionConfig {
5656 private Boolean includeSubAgentStreamingEvents ;
5757 private Map <String , McpServerConfig > mcpServers ;
5858 private List <CustomAgentConfig > customAgents ;
59+ private DefaultAgentConfig defaultAgent ;
5960 private String agent ;
6061 private List <String > skillDirectories ;
6162 private List <String > disabledSkills ;
6263 private InfiniteSessionConfig infiniteSessions ;
6364 private Consumer <SessionEvent > onEvent ;
6465 private List <CommandDefinition > commands ;
6566 private ElicitationHandler onElicitationRequest ;
67+ private String gitHubToken ;
6668
6769 /**
6870 * Gets the AI model to use.
@@ -520,6 +522,31 @@ public ResumeSessionConfig setCustomAgents(List<CustomAgentConfig> customAgents)
520522 return this ;
521523 }
522524
525+ /**
526+ * Gets the default agent configuration.
527+ *
528+ * @return the default agent configuration, or {@code null} if not set
529+ */
530+ public DefaultAgentConfig getDefaultAgent () {
531+ return defaultAgent ;
532+ }
533+
534+ /**
535+ * Sets the default agent configuration.
536+ * <p>
537+ * Use {@link DefaultAgentConfig#setExcludedTools(List)} to hide specific tools
538+ * from the default agent while keeping them available to custom sub-agents.
539+ *
540+ * @param defaultAgent
541+ * the default agent configuration
542+ * @return this config for method chaining
543+ * @see DefaultAgentConfig
544+ */
545+ public ResumeSessionConfig setDefaultAgent (DefaultAgentConfig defaultAgent ) {
546+ this .defaultAgent = defaultAgent ;
547+ return this ;
548+ }
549+
523550 /**
524551 * Gets the name of the custom agent to activate at session start.
525552 *
@@ -684,6 +711,33 @@ public ResumeSessionConfig setOnElicitationRequest(ElicitationHandler onElicitat
684711 return this ;
685712 }
686713
714+ /**
715+ * Gets the GitHub token for per-session authentication.
716+ *
717+ * @return the GitHub token, or {@code null} if not set
718+ * @since 1.3.0
719+ */
720+ public String getGitHubToken () {
721+ return gitHubToken ;
722+ }
723+
724+ /**
725+ * Sets the GitHub token for per-session authentication.
726+ * <p>
727+ * When provided, the runtime resolves this token into a full GitHub identity
728+ * and stores it on the session for content exclusion, model routing, and quota
729+ * checks.
730+ *
731+ * @param gitHubToken
732+ * the GitHub token for per-session authentication
733+ * @return this config for method chaining
734+ * @since 1.3.0
735+ */
736+ public ResumeSessionConfig setGitHubToken (String gitHubToken ) {
737+ this .gitHubToken = gitHubToken ;
738+ return this ;
739+ }
740+
687741 /**
688742 * Creates a shallow clone of this {@code ResumeSessionConfig} instance.
689743 * <p>
@@ -718,13 +772,15 @@ public ResumeSessionConfig clone() {
718772 copy .includeSubAgentStreamingEvents = this .includeSubAgentStreamingEvents ;
719773 copy .mcpServers = this .mcpServers != null ? new java .util .HashMap <>(this .mcpServers ) : null ;
720774 copy .customAgents = this .customAgents != null ? new ArrayList <>(this .customAgents ) : null ;
775+ copy .defaultAgent = this .defaultAgent ;
721776 copy .agent = this .agent ;
722777 copy .skillDirectories = this .skillDirectories != null ? new ArrayList <>(this .skillDirectories ) : null ;
723778 copy .disabledSkills = this .disabledSkills != null ? new ArrayList <>(this .disabledSkills ) : null ;
724779 copy .infiniteSessions = this .infiniteSessions ;
725780 copy .onEvent = this .onEvent ;
726781 copy .commands = this .commands != null ? new ArrayList <>(this .commands ) : null ;
727782 copy .onElicitationRequest = this .onElicitationRequest ;
783+ copy .gitHubToken = this .gitHubToken ;
728784 return copy ;
729785 }
730786}
0 commit comments