Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
c2b4b91
Document public agent setup and add Cosift usage skill
teovl Sep 17, 2026
0a6f799
Require authenticated contributions and expose monthly credit activity
teovl Sep 17, 2026
7a54416
Bind contribution delivery to freshly moderated page content
teovl Sep 17, 2026
e969b6a
Add monthly credit display, agent setup navigation and page analytics
teovl Sep 17, 2026
a4d6322
Bind contribution indexing and receipts to approved content
teovl Sep 17, 2026
382dd08
Simplify the community interface and agent setup layout
teovl Sep 17, 2026
9284352
Add startup loading state and monthly free allowance
teovl Sep 17, 2026
b82d725
Grant authenticated accounts 1000 credits once per UTC month
teovl Sep 17, 2026
80f83be
Allow 1000 daily contributions with atomic batch quota and retry guid…
teovl Sep 17, 2026
6eca965
Add billing page and improve topic controls
teovl Sep 17, 2026
b5bd93d
Recover from session and request failures and wire credit billing view
teovl Sep 17, 2026
f0fb949
Charge one two or three credits by retrieval mode
teovl Sep 17, 2026
b0f37eb
Block test Stripe credit minting by default and disclose mode pricing
teovl Sep 17, 2026
444a78a
Show weighted request credit prices consistently
teovl Sep 17, 2026
42a4222
Reject contribution receipts when stored content differs from approval
teovl Sep 17, 2026
36f96fb
Connect subscription, top-up and billing portal controls
teovl Sep 17, 2026
051e93d
Show free and paid plans with subscriber credit top-ups
teovl Sep 17, 2026
5ae1edf
Document shared accounts, credit allowances and subscription billing
teovl Sep 17, 2026
dae9bf2
Direct agent authentication through the web connection guide
teovl Sep 17, 2026
c72ec6d
test: verify subscription invoice and refund reconciliation
teovl Sep 17, 2026
a3034a3
Add monthly credit subscriptions and subscriber-only top-ups
teovl Sep 17, 2026
c2b63ac
Merge remote-tracking branch 'origin/main' into release/community-sub…
teovl Sep 17, 2026
88c25f0
Keep navigation compact and move credit activity to Billing
teovl Sep 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/cosift/community.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func runCommunity(ctx context.Context, args []string) error {
defer client.Close()
provider = client
}
s, err := community.Open(community.Config{GAMeasurementID: os.Getenv("COSIFT_GA_MEASUREMENT_ID"), Shared: provider, DataDir: *dir, Backend: *backend, PublicURL: *publicURL, AdminToken: os.Getenv("COSIFT_COMMUNITY_ADMIN_TOKEN"), TrustedProxies: trusted, GuestInterval: *guestInterval, MemberFreeRPM: *freeRPM, SearchRPM: *searchRPM, AnswerRPM: *answerRPM, ResearchPer10Min: *researchLimit, StripeSecretKey: os.Getenv("STRIPE_SECRET_KEY"), StripeWebhookSecret: os.Getenv("STRIPE_WEBHOOK_SECRET"), AllowTestPayments: os.Getenv("COSIFT_ALLOW_TEST_PAYMENTS") == "1"})
s, err := community.Open(community.Config{GAMeasurementID: os.Getenv("COSIFT_GA_MEASUREMENT_ID"), Shared: provider, DataDir: *dir, Backend: *backend, PublicURL: *publicURL, AdminToken: os.Getenv("COSIFT_COMMUNITY_ADMIN_TOKEN"), TrustedProxies: trusted, GuestInterval: *guestInterval, MemberFreeRPM: *freeRPM, SearchRPM: *searchRPM, AnswerRPM: *answerRPM, ResearchPer10Min: *researchLimit, StripeSecretKey: os.Getenv("STRIPE_SECRET_KEY"), StripeWebhookSecret: os.Getenv("STRIPE_WEBHOOK_SECRET"), AllowTestPayments: os.Getenv("COSIFT_ALLOW_TEST_PAYMENTS") == "1", StripePortalConfigurationID: os.Getenv("COSIFT_STRIPE_PORTAL_CONFIGURATION_ID")})
if err != nil {
return err
}
Expand Down
5 changes: 5 additions & 0 deletions deploy/community.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
COSIFT_COMMUNITY_ADMIN_TOKEN=
STRIPE_SECRET_KEY=
STRIPE_WEBHOOK_SECRET=
# Dedicated Cosift Billing Portal: cancel at period end, payment methods and
# invoice history only. Do not reuse another product's default configuration.
COSIFT_STRIPE_PORTAL_CONFIGURATION_ID=
# Test keys cannot mint credits by default. Set to 1 only with an isolated QA DB.
COSIFT_ALLOW_TEST_PAYMENTS=0

# Default: standalone email/password accounts. See docs/SHARED-ACCOUNTS.md.
COSIFT_AUTH_MODE=local
Expand Down
60 changes: 46 additions & 14 deletions docs/AGENT-SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ feedback, and good public sources from any field are welcome.

## Install and connect

Run the public installer in your own terminal:
Start on the [Cosift website](https://cosift.pilotprotocol.network/): sign in and
open **Agents** for connection instructions. Then run the public installer in your
own terminal, using the same email:

```sh
curl -fsSL https://raw.githubusercontent.com/pilot-protocol/cosift-install/v1/install.sh | sh
Expand All @@ -28,7 +30,10 @@ For a manual connection, use streamable HTTP:

Use the token obtained by the installer in your agent's private configuration.
Do not paste it into chats, commit it, or send it to another origin. Public
transport still requires a Cosift account token for every MCP tool.
transport still requires a Cosift account token for every MCP tool. Website
login establishes a browser session; it does not automatically configure an MCP
client or expose a copy-token button. The installer verifies your email and
saves the agent token in private client configuration.

## Tools your agent can use

Expand Down Expand Up @@ -60,8 +65,7 @@ then reload the agent. This does not require uploading a token to the skill file
## Authenticated CLI

Use [Cosift v0.2.7 or a newer stable release](https://github.com/pilot-protocol/cosift/releases/latest)
for your OS and architecture. Put the binary on your PATH. After installer login,
the CLI discovers the private `cosift/community-session.json` under
for your OS and architecture; verify its signature using the [signed CLI guide](https://github.com/pilot-protocol/cosift-install/blob/main/docs/CLI-INSTALL.md). Put the binary on your PATH before running the installer so it can connect the CLI. If you installed the binary later, rerun the installer with `--cli` to save the shared session. After that handoff, the CLI discovers the private `cosift/community-session.json` under
`$XDG_CONFIG_HOME`, or `~/.config` when unset. An explicit `-session-file` can select
another saved session. Keep session files private (mode `0600`).

Expand All @@ -75,7 +79,8 @@ cosift contribute -server https://cosift.pilotprotocol.network -credits
```

Contributions require login. A CSV can contain one URL per row or a `url`, `urls`,
`webpage`, or `website` column. A request accepts at most 100 URLs and 1 MB.
`webpage`, or `website` column. A request accepts at most 100 URLs and 1 MB;
an account may submit 1,000 new URLs per rolling 24 hours.
Put flags before positional URLs. For example:

```csv
Expand All @@ -90,6 +95,9 @@ filler; useful educational, medical and defensive-security material is allowed.
Accepted submissions enter validation; acceptance alone does not mean indexing
or a credit award. Check contribution status in the web app. Checks are automated
and do not guarantee that every unsafe or poor-quality page is detected.
Production combines URL/network/content checks with semantic review using
`qwen3.5:9b-fp8`. Uncertain or unsupported material stays unverified. Text and
metadata review does not guarantee moderation of images or video.

## Index and embed locally

Expand All @@ -115,15 +123,39 @@ uses server compute; local embeddings do not bypass validation.

## Allowance and credits

Web, CLI and MCP searches share the account's gateway allowance and credit ledger.
A verified new contribution earns 10 credits once per unique content; rejected,
unverified, duplicate or already-indexed pages earn none. After the free allowance,
an extra successful Search, Answer or Research request spends one credit. Credits
do not bypass mode limits or MCP's separate daily call cap. Check
Web, CLI, and MCP searches share the account's gateway allowance and credit ledger.
Every account gets **60 shared free requests per minute plus 1,000 free credits
per UTC calendar month**, with no subscription required. The monthly grant is
applied once on authenticated use in the current month; inactive past months are
not backfilled. Unused credits carry over.

A verified new contribution earns **10 credits** once per unique content.
Rejected, unverified, duplicate, or already-indexed pages earn none. After the
shared free requests, an extra successful request spends:

| Mode | Credits | Hard cap per account |
| --- | --- | --- |
| Search | 1 | 120/minute |
| Answer | 2 | 20/minute |
| Research | 3 | 3/10 minutes |

Failed backend requests release reservations and refund credits. Credits do not
bypass mode limits or MCP's separate daily call cap. Check
[`/api/limits`](https://cosift.pilotprotocol.network/api/limits) and the authenticated
credits view for current policy. Respect retry guidance after a rate limit.

Credit purchasing is available only when payments are enabled in the app.
There are no automatic charges or subscriptions. The integration supports a
one-time $5 purchase of 50,000 credits; payment availability is not implied by
having a balance.
## Optional paid plan

The Billing page offers a **$5/month subscription for 50,000 additional credits
per paid month**. Subscribers keep their 1,000 free monthly credits and can also
buy **$5/50,000-credit one-time top-ups**. Top-ups require a paid current
subscription period. At this price, 1,000 credit-funded requests cost $0.10 for
Search, $0.20 for Answer, or $0.30 for Research.

Unused credits carry over. Cancel through the billing portal; cancellation does
not remove your remaining earned or purchased balance. Refunds revoke the
corresponding purchased credits. Live purchases stay unavailable until the
operator configures live Stripe billing. An existing credit balance does not
mean payment is enabled. The app displays the payment mode, and test payments
belong only on an isolated test ledger. See [Stripe configuration](STRIPE.md) for
webhook events, portal restrictions, and activation checks.
Loading
Loading