Skip to content

Instantly share code, notes, and snippets.

View fpaparoni's full-sized avatar

Federico Paparoni fpaparoni

View GitHub Profile
@fpaparoni
fpaparoni / PodAgent.java
Created December 9, 2025 21:34
Pod Agent
@ApplicationScoped
public class PodAgent {
@Inject
KubernetesClient client;
@Tool(name="getPodLogs",description = "Retrieve the logs of a pod in the specified namespace")
@RunOnVirtualThread
public String getPodLogs(
@ToolArg(description="Namespace") String namespace,
@fpaparoni
fpaparoni / json-rpc-example-response.json
Created December 9, 2025 21:32
json-rpc-example-response
{
"jsonrpc": "2.0",
"id": "1",
"result": {
"output": "Serendipity: the occurrence of events by chance in a happy or beneficial way."
}
}
{
"jsonrpc": "2.0",
"id": "1",
"method": "tool.invoke",
"params": {
"tool_name": "dictionary_tool",
"inputs": {
"word": "serendipity"
},
"context": {
@fpaparoni
fpaparoni / schema.graphql
Created February 3, 2023 10:58
GraphQL - union and interface
interface Book {
isbn: String!
title: String
price: Float
}
type PaperBook {
paperType: PaperBookKind
}
type EBook {
format: EBookFormat
package com.javastaff.test.e2e.playwright;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import com.microsoft.playwright.Browser;
import com.microsoft.playwright.BrowserContext;
import com.microsoft.playwright.Page;
package com.javastaff.test.e2e.playwright;
import com.microsoft.playwright.Page;
import com.microsoft.playwright.options.AriaRole;
import io.cucumber.java.After;
import io.cucumber.java.en.Given;
import io.cucumber.java.en.Then;
import io.cucumber.java.en.When;
package com.javastaff.test.e2e.playwright;
import java.nio.file.Paths;
import java.util.Optional;
import com.microsoft.playwright.Browser;
import com.microsoft.playwright.BrowserContext;
import com.microsoft.playwright.BrowserType;
import com.microsoft.playwright.Page;
import com.microsoft.playwright.Playwright;
package com.javastaff.test.e2e;
import io.cucumber.junit.CucumberOptions;
import io.cucumber.junit.Cucumber;
import org.junit.runner.RunWith;
@RunWith(Cucumber.class)
@CucumberOptions(features = {"src/test/resources/bdd/register.feature"},
plugin = {"pretty",
"json:target/cucumber_reports/register_playwright.json",
<dependency>
<groupId>com.microsoft.playwright</groupId>
<artifactId>playwright</artifactId>
<version>1.28.1</version>
</dependency>
package com.javastaff.test.e2e.selenium;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
import java.time.Duration;
import java.util.List;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;