Skip to content

Commit 4a7ec7f

Browse files
Deploy documentation: snapshot
1 parent 0c6303d commit 4a7ec7f

358 files changed

Lines changed: 1336 additions & 359 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

snapshot/advanced.html

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
<li><a href="getting-started.html">Getting Started</a></li>
3838
<li><a href="documentation.html">Documentation</a></li>
3939
<li><a href="mcp.html">MCP Servers</a></li>
40+
<li><a href="hooks.html">Session Hooks</a></li>
4041
<li><a>Advanced Usage</a></li>
4142
<li><a href="apidocs/index.html">API Javadoc</a></li>
4243
</ul>
@@ -60,6 +61,7 @@
6061
<li><a href="advanced.html#Bring_Your_Own_Key_.28BYOK.29">BYOK</a></li>
6162
<li><a href="advanced.html#Infinite_Sessions">Infinite Sessions</a></li>
6263
<li><a href="advanced.html#MCP_Servers">MCP Servers</a></li>
64+
<li><a href="hooks.html">Session Hooks</a></li>
6365
</ul>
6466
</li>
6567
<li class="dropdown">
@@ -118,6 +120,7 @@
118120
<li><a href="getting-started.html">Getting Started</a></li>
119121
<li><a href="documentation.html">Documentation</a></li>
120122
<li><a href="mcp.html">MCP Servers</a></li>
123+
<li><a href="hooks.html">Session Hooks</a></li>
121124
<li class="active"><a>Advanced Usage</a></li>
122125
<li><a href="apidocs/index.html">API Javadoc</a></li>
123126
<li class="nav-header">Guides</li>
@@ -133,6 +136,7 @@
133136
<li><a href="advanced.html#Bring_Your_Own_Key_.28BYOK.29">BYOK</a></li>
134137
<li><a href="advanced.html#Infinite_Sessions">Infinite Sessions</a></li>
135138
<li><a href="advanced.html#MCP_Servers">MCP Servers</a></li>
139+
<li><a href="hooks.html">Session Hooks</a></li>
136140
<li class="nav-header">Project Documentation</li>
137141
<li><a href="project-info.html"><span class="icon-chevron-right"></span>Project Information</a></li>
138142
<li><a href="project-reports.html"><span class="icon-chevron-right"></span>Project Reports</a></li>
@@ -375,7 +379,27 @@ <h2>Permission Handling</h2>
375379
return CompletableFuture.completedFuture(result);
376380
})
377381
).get();
378-
</code></pre><hr /></section><section><a id="Manual_Server_Control"></a>
382+
</code></pre><hr /></section><section><a id="Session_Hooks"></a>
383+
<h2>Session Hooks</h2>
384+
<p>Intercept tool execution and session lifecycle events using hooks.</p>
385+
386+
<pre class="prettyprint"><code class="language-java">var hooks = new SessionHooks()
387+
.setOnPreToolUse((input, invocation) -&gt; {
388+
System.out.println(&quot;Tool: &quot; + input.getToolName());
389+
return CompletableFuture.completedFuture(
390+
new PreToolUseHookOutput().setPermissionDecision(&quot;allow&quot;)
391+
);
392+
})
393+
.setOnPostToolUse((input, invocation) -&gt; {
394+
System.out.println(&quot;Result: &quot; + input.getToolResult());
395+
return CompletableFuture.completedFuture(null);
396+
});
397+
398+
var session = client.createSession(
399+
new SessionConfig().setHooks(hooks)
400+
).get();
401+
</code></pre>
402+
<p>&#x1f4d6; <strong><a href="hooks.html">Full Session Hooks documentation &#x2192;</a></strong> for all 5 hook types, inputs/outputs, and examples.</p><hr /></section><section><a id="Manual_Server_Control"></a>
379403
<h2>Manual Server Control</h2>
380404
<p>Control the CLI lifecycle yourself instead of auto-start.</p>
381405

snapshot/apidocs/allclasses-index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE HTML>
22
<html lang>
33
<head>
4-
<!-- Generated by javadoc (17) on Thu Feb 05 21:56:57 UTC 2026 -->
4+
<!-- Generated by javadoc (17) on Thu Feb 05 22:13:40 UTC 2026 -->
55
<title>All Classes and Interfaces (GitHub Copilot Community SDK :: Java 1.0.7-SNAPSHOT API)</title>
66
<meta name="viewport" content="width=device-width, initial-scale=1">
77
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

snapshot/apidocs/allpackages-index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE HTML>
22
<html lang>
33
<head>
4-
<!-- Generated by javadoc (17) on Thu Feb 05 21:56:57 UTC 2026 -->
4+
<!-- Generated by javadoc (17) on Thu Feb 05 22:13:40 UTC 2026 -->
55
<title>All Packages (GitHub Copilot Community SDK :: Java 1.0.7-SNAPSHOT API)</title>
66
<meta name="viewport" content="width=device-width, initial-scale=1">
77
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

snapshot/apidocs/com/github/copilot/sdk/ConnectionState.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE HTML>
22
<html lang>
33
<head>
4-
<!-- Generated by javadoc (17) on Thu Feb 05 21:56:57 UTC 2026 -->
4+
<!-- Generated by javadoc (17) on Thu Feb 05 22:13:40 UTC 2026 -->
55
<title>ConnectionState (GitHub Copilot Community SDK :: Java 1.0.7-SNAPSHOT API)</title>
66
<meta name="viewport" content="width=device-width, initial-scale=1">
77
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

snapshot/apidocs/com/github/copilot/sdk/CopilotClient.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE HTML>
22
<html lang>
33
<head>
4-
<!-- Generated by javadoc (17) on Thu Feb 05 21:56:57 UTC 2026 -->
4+
<!-- Generated by javadoc (17) on Thu Feb 05 22:13:40 UTC 2026 -->
55
<title>CopilotClient (GitHub Copilot Community SDK :: Java 1.0.7-SNAPSHOT API)</title>
66
<meta name="viewport" content="width=device-width, initial-scale=1">
77
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

snapshot/apidocs/com/github/copilot/sdk/CopilotSession.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE HTML>
22
<html lang>
33
<head>
4-
<!-- Generated by javadoc (17) on Thu Feb 05 21:56:57 UTC 2026 -->
4+
<!-- Generated by javadoc (17) on Thu Feb 05 22:13:40 UTC 2026 -->
55
<title>CopilotSession (GitHub Copilot Community SDK :: Java 1.0.7-SNAPSHOT API)</title>
66
<meta name="viewport" content="width=device-width, initial-scale=1">
77
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

snapshot/apidocs/com/github/copilot/sdk/SdkProtocolVersion.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE HTML>
22
<html lang>
33
<head>
4-
<!-- Generated by javadoc (17) on Thu Feb 05 21:56:57 UTC 2026 -->
4+
<!-- Generated by javadoc (17) on Thu Feb 05 22:13:40 UTC 2026 -->
55
<title>SdkProtocolVersion (GitHub Copilot Community SDK :: Java 1.0.7-SNAPSHOT API)</title>
66
<meta name="viewport" content="width=device-width, initial-scale=1">
77
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

snapshot/apidocs/com/github/copilot/sdk/SystemMessageMode.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE HTML>
22
<html lang>
33
<head>
4-
<!-- Generated by javadoc (17) on Thu Feb 05 21:56:57 UTC 2026 -->
4+
<!-- Generated by javadoc (17) on Thu Feb 05 22:13:40 UTC 2026 -->
55
<title>SystemMessageMode (GitHub Copilot Community SDK :: Java 1.0.7-SNAPSHOT API)</title>
66
<meta name="viewport" content="width=device-width, initial-scale=1">
77
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

snapshot/apidocs/com/github/copilot/sdk/class-use/ConnectionState.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE HTML>
22
<html lang>
33
<head>
4-
<!-- Generated by javadoc (17) on Thu Feb 05 21:56:57 UTC 2026 -->
4+
<!-- Generated by javadoc (17) on Thu Feb 05 22:13:40 UTC 2026 -->
55
<title>Uses of Enum Class com.github.copilot.sdk.ConnectionState (GitHub Copilot Community SDK :: Java 1.0.7-SNAPSHOT API)</title>
66
<meta name="viewport" content="width=device-width, initial-scale=1">
77
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

snapshot/apidocs/com/github/copilot/sdk/class-use/CopilotClient.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE HTML>
22
<html lang>
33
<head>
4-
<!-- Generated by javadoc (17) on Thu Feb 05 21:56:57 UTC 2026 -->
4+
<!-- Generated by javadoc (17) on Thu Feb 05 22:13:40 UTC 2026 -->
55
<title>Uses of Class com.github.copilot.sdk.CopilotClient (GitHub Copilot Community SDK :: Java 1.0.7-SNAPSHOT API)</title>
66
<meta name="viewport" content="width=device-width, initial-scale=1">
77
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

0 commit comments

Comments
 (0)