そろそろ粗削りな部分を直して1.0までに安定させる段階に入るかも
AmaseCocoa
@cocoa@hackers.pub · 17 following · 19 followers
I maybe use Engrish in this account
Pythonista/Author of apkit. An Modularized ActivityPub Toolkit.
main (Iceshrimp)
- @AmaseCocoa@i.amase.cc
YarukiNotFound
- amase.cc
Zenn
- @amasecocoa
apmodelの改善中
Undefinedが多すぎて型チェッカー周りが死ぬほど面倒になったので
これ、GraalPyのパッチを適用しないでそのままコンパイルしようとするせいでuvが使えないかもしれない
フロントエンドとバックエンドはまだまともに動かない (フロントエンドに至ってはサーバーアドレスがハードコードされてる)
aioauth使ったOAuthの実装で詰まってるから変えるかもしれない
taskiq-psqlpyはブローカーのサポートがないから候補にならないんだよなぁ (PRはあるけどそれのコードのもとになってるtaskiq-pgにも少し不安なバグがある)
PleromaみたいにキューにもRDBを使うようにして簡略化したいんだけど需要に合致する使えるライブラリがない🫠
I want this!
Thinking about building “#Fedify Studio” (tentative name)—a web-based #ActivityPub debugging & development toolkit, like a supercharged version of ActivityPub.Academy and fedify inbox command. Imagine having a proper UI for testing activities, inspecting actors, debugging federation issues… Would this be useful for other ActivityPub developers out there?
方針を変えた
Connectorサーバーを別途で用意してプラグインはそこに対して収束するようにする
そうすればクライアントライブラリさえどうにかなれば言語関係なく実装できるようになる
うーん
コピーレフト回避するにはソケットとかが一番いい?
その場合はIPCで想定してたAPIが実装できるかテストする必要があるかも
I thinking, why often activitypub implementions uses a AGPL-3.0? 🤔
This English maybe includes syntax error 🫠
I thinking, why often activitypub implementions uses a AGPL-3.0? 🤔
問題としてソフトウェアがAGPLだと感染する (個人的にはプラグインが拡張するソフトウェアのコードを含まない限りコピーレフトの制約に縛られることを望んでいない)のでどうしようってなる
この場合はプラグインAPIの概念をコアに分離してKagura (Mastodon API, Admin UI等)自体をそれのプラグインとして実装するのが妥当なんだろうけど悩む
ただその場合はコアにapkit.serverを実装しないと結局ライセンスに縛られかねない (Mastodon APIの実装側をAGPLにする方針の場合)
そういうソフトウェアを想定したライセンスとしてMPLを基にとりあえずある程度書いてみたもの (勿論専門家にレビューされてないしそもそも実際に使われるのを意図してるわけではないから使うべきではない)
AGPLのネットワーク経由での利用でもソースコードの公開っていう条項を組み込んでる時点でうーんってなってここでやめた
https://github.com/AmaseCocoa/ples-license
問題としてソフトウェアがAGPLだと感染する (個人的にはプラグインが拡張するソフトウェアのコードを含まない限りコピーレフトの制約に縛られることを望んでいない)のでどうしようってなる
この場合はプラグインAPIの概念をコアに分離してKagura (Mastodon API, Admin UI等)自体をそれのプラグインとして実装するのが妥当なんだろうけど悩む
ただその場合はコアにapkit.serverを実装しないと結局ライセンスに縛られかねない (Mastodon APIの実装側をAGPLにする方針の場合)
うーん調べてみたけどそれは無理そうだから難しい
問題としてソフトウェアがAGPLだと感染する (個人的にはプラグインが拡張するソフトウェアのコードを含まない限りコピーレフトの制約に縛られることを望んでいない)のでどうしようってなる
この場合はプラグインAPIの概念をコアに分離してKagura (Mastodon API, Admin UI等)自体をそれのプラグインとして実装するのが妥当なんだろうけど悩む
ただその場合はコアにapkit.serverを実装しないと結局ライセンスに縛られかねない (Mastodon APIの実装側をAGPLにする方針の場合)
拡張可能にしようにもプラグインの概念は悪意ある拡張から保護できるような安全性がないからうーんってなってる
まぁフォークせずにサーバーのコアを変更、拡張できるっていうのを念頭に置いてるので例えばWordPressのプラグインとかとは別物って考えてもいいかも
拡張可能にしようにもプラグインの概念は悪意ある拡張から保護できるような安全性がないからうーんってなってる
実装コストもあるのでひとまずv1で使われてるAPIを優先的に実装する
/api/v1/streaming実装してるんだけどなんか動かない🤔
多分FastAPI側がWebSocket用のルートを認識していない🤔
認識してくれたんだけどElkがトークンをそもそも渡してこないからそこから進めない...🤦♂️
/api/v1/streaming実装してるんだけどなんか動かない🤔
多分FastAPI側がWebSocket用のルートを認識していない🤔
バイナリには敵わないけど簡単にセットアップできるのを目標としている (サーバーを動かす敷居を下げたい)
First-version of My ActivityPub Implemention
ちなみにDBがJSONの簡易的なものなのでまだ世に出せるレベルまではバックエンドが実装できてない
APIが無の状態でActivityPub実装すると面倒になるので先に実装してからかな
First-version of My ActivityPub Implemention
見ての通りtootする程度のAPIは実装できた
First-version of My ActivityPub Implemention
Deploy AnywhereなActivityPubサーバー書いてる
それはそうとActivityPubのフォローがAcceptしてもIceshrimpだと処理中のままになるんだよな何故か
manuallyApprovesFollowersが原因?
それはそうとActivityPubのフォローがAcceptしてもIceshrimpだと処理中のままになるんだよな何故か
あとは全然まだ未完成だけどapkitのドキュメントみたいなものもできた
fedi-libs.github.io/apkit/
AmaseCocoa replied to the below article:
How to Build a Simple ActivityPub Reminder Bot in Python
AmaseCocoa @cocoa@hackers.pub
This post guides you through building a simple ActivityPub bot in Python using the `apkit` library. The bot listens for mentions and schedules reminders for users. It covers setting up the project, generating cryptographic keys for secure communication, defining the bot's identity as an ActivityPub Actor, and initializing the `apkit` server. The tutorial walks through the core logic for parsing reminder commands, sending notifications, and defining necessary web endpoints like `/actor` and `/inbox`. It also details how to handle incoming activities, such as `Follow` and `Create` events, and how to run the application using `uvicorn`. While the example uses in-memory storage for simplicity, the post suggests improvements like persistent storage and robust task queuing for production environments. This tutorial provides a solid foundation for building more complex ActivityPub applications.
Read more →Sorry, I forgot to enclose the mention in ` and ended up tagging someone unrelated...
How to Build a Simple ActivityPub Reminder Bot in Python
AmaseCocoa @cocoa@hackers.pub
This post guides you through building a simple ActivityPub bot in Python using the `apkit` library. The bot listens for mentions and schedules reminders for users. It covers setting up the project, generating cryptographic keys for secure communication, defining the bot's identity as an ActivityPub Actor, and initializing the `apkit` server. The tutorial walks through the core logic for parsing reminder commands, sending notifications, and defining necessary web endpoints like `/actor` and `/inbox`. It also details how to handle incoming activities, such as `Follow` and `Create` events, and how to run the application using `uvicorn`. While the example uses in-memory storage for simplicity, the post suggests improvements like persistent storage and robust task queuing for production environments. This tutorial provides a solid foundation for building more complex ActivityPub applications.
Read more →apkitで簡単なBotを作る記事みたいなのを書くかも
Windowsに(開発)環境破壊された...
開発ツール周りのPATHが一夜にして消失した
Windowsに(開発)環境破壊された...
Force pushが原因?
ちょっと気になるのが1/2くらいの確率でinboxの検証が進まなくなるんだよね
あれ、draft-cavage-http-signatures-12って何のDigest計算するんだっけ...?
うん、こういうときは文書読もうね
apkit間でしか使えない謎の署名実装が誕生して困る
draft-cavage-http-signatures-12に似て非なるdraftと名乗る謎の実装🤔
apkit間でしか使えない謎の署名実装が誕生して困る
あれ、draft-cavage-http-signatures-12って何のDigest計算するんだっけ...?
はぐれコミットがある...
Geminiがイライラしてる...
apkitのテスト用のコードで詰まってる箇所をだいたい特定するために大量のprintを追加した
apkitのActivityPubServerに関しては同期対応しないで非同期だけにしてる (分岐させてもいいけどわざわざこれでするであろう操作を同期でするとは考えてないから)
必要なら同期対応できるけどね


