Skip to content

Instantly share code, notes, and snippets.

View r0x0d's full-sized avatar
:shipit:
Working from home

Rodolfo Olivieri r0x0d

:shipit:
Working from home
View GitHub Profile
This file has been truncated, but you can view the full file.
Warning: Permanently added '163.109.86.59' (ED25519) to the list of known hosts.
You can reproduce this build on your computer by running:
sudo dnf install copr-rpmbuild
/usr/bin/copr-rpmbuild --verbose --drop-resultdir --task-url https://copr.fedorainfracloud.org/backend/get-build-task/10187154-fedora-43-s390x --chroot fedora-43-s390x
Version: 1.6
PID: 2954
r0x0d@toolbx ~/Workspace/fedora/goose/goose-1.23.2 (main)> cargo tree -i ring
ring v0.17.9
├── jsonwebtoken v9.3.1
│ └── goose v1.23.2 (/var/home/r0x0d/Workspace/fedora/goose/goose-1.23.2/crates/goose)
│ ├── goose-acp v1.23.2 (/var/home/r0x0d/Workspace/fedora/goose/goose-1.23.2/crates/goose-acp)
│ │ └── goose-cli v1.23.2 (/var/home/r0x0d/Workspace/fedora/goose/goose-1.23.2/crates/goose-cli)
│ ├── goose-bench v1.23.2 (/var/home/r0x0d/Workspace/fedora/goose/goose-1.23.2/crates/goose-bench)
│ │ └── goose-cli v1.23.2 (/var/home/r0x0d/Workspace/fedora/goose/goose-1.23.2/crates/goose-cli)
│ ├── goose-cli v1.23.2 (/var/home/r0x0d/Workspace/fedora/goose/goose-1.23.2/crates/goose-cli)
│ └── goose-server v1.23.2 (/var/home/r0x0d/Workspace/fedora/goose/goose-1.23.2/crates/goose-server)
use serde::{Deserialize, Serialize};
use serde_json::Value;
/// OpenAI chat completion request structure
/// This matches what Goose will send
#[derive(Debug, Serialize, Deserialize, Clone)]
pub struct ChatCompletionRequest {
/// Model ID
pub model: String,
/// List of messages

Optional Dependencies Analysis

Summary

After analyzing the codebase, I've identified 7 major feature groups in the goose crate and 3 feature groups in goose-mcp that could be made optional. This would significantly reduce compile times and binary size for users who don't need all providers or features.


High-Impact Candidates

Dependency Report: fastmcp

Generated: 2025-12-04 09:39:04 Language: Python Registry: PyPI

Summary

Metric Value
@r0x0d
r0x0d / example.py
Created November 4, 2025 13:46
example.py
ChatCompletionRequest(
messages=[
ChatMessage(
role="system",
content="You are a general-purpose AI agent called goose, created by Block, the parent company of Square, CashApp, and Tidal.\ngoose is being developed as an open-source software project.\n\nThe current date is 2025-11-04 12:00.\n\ngoose uses LLM providers with tool calling capability. You can be used with different language models (gpt-4o,\nclaude-sonnet-4, o1, llama-3.2, deepseek-r1, etc).\nThese models have varying knowledge cut-off dates depending on when they were trained, but typically it's between 5-10\nmonths prior to the current date.\n\n# Extensions\n\nExtensions allow other applications to provide context to goose. Extensions connect goose to different data sources and\ntools.\nYou are capable of dynamically plugging into new extensions and learning how to use them. You solve higher level\nproblems using the tools in these extensions, and can interact with multiple at once.\n\nIf the Extension Manager
FROM registry.access.redhat.com/ubi10/ubi:latest AS base
ENV DNF_DEFAULT_OPTS -y --nodocs --setopt=keepcache=0 --setopt=tsflags=nodocs
RUN dnf install ${DNF_DEFAULT_OPTS} \
python3.12 \
python3.12-pip
FROM base as build
@r0x0d
r0x0d / new-argparse.diff
Last active June 5, 2025 17:15
claude 4 re-thought how our commands module should look like
diff --git a/command_line_assistant/commands/README.md b/command_line_assistant/commands/README.md
new file mode 100644
index 0000000..240428f
--- /dev/null
+++ b/command_line_assistant/commands/README.md
@@ -0,0 +1,345 @@
+# Simplified Command Structure
+
+This directory contains a simplified, elegant command structure inspired by typer/click but using argparse. The new structure eliminates complex class hierarchies, factories, and operations in favor of a clean decorator-based approach with two powerful patterns: **action handlers** and **subcommands**.
+
@r0x0d
r0x0d / client.py
Created June 2, 2025 19:22
Server and client example from dasbus lib
#
# Reply to a message in the chat room.
# Start the server, start the listener and run the client.
#
import threading
from dasbus.loop import EventLoop
from common import CHAT
event_stop = threading.Event()
@r0x0d
r0x0d / threaded-query-submission.diff
Last active June 3, 2025 11:18
Turn our query submission to work with threads and signaling
diff --git a/command_line_assistant/commands/chat.py b/command_line_assistant/commands/chat.py
index f50a7c0..d54c618 100644
--- a/command_line_assistant/commands/chat.py
+++ b/command_line_assistant/commands/chat.py
@@ -6,6 +6,7 @@ import platform
from argparse import Namespace
from enum import auto
from io import TextIOWrapper
+import threading
from typing import ClassVar, Optional