Commit Graph
54 Commits
Author SHA1 Message Date
-Puter fd207eb067 feat(web): real linked Signal projection from signalIssueAttachments
Replace the deliberate signalCount of 0 with authenticated linked-Signal
data from the Lane A signalIssueAttachments relation.

- Add listLinkedSignalsForProject query (user-authenticated via
  requireProjectMember) returning issue-grouped LinkedSignalView data
  using the existing by_issue index. One query serves both card counts
  and expanded detail.
- Update work-unit-projection builders to accept linkedSignals param;
  LinkedSignal type with signalId, title, summary, sourceCount, createdAt.
- Feed real attachment data into collapsed card signalCount and expanded
  detail linked-signal list with provenance (source count, relative time).
- Add signal.attached event handler to activity timeline projection.
- 32 tests including 4 linked-signal projection tests, 1 signal.attached
  activity mapping test, and cross-issue signal isolation test proving
  issue A cannot inherit issue B's linked signals.
2026-07-24 21:21:31 +05:30
-Puter 5df8633eae feat(web): Work OS surface with Work Units, Signals, dual-mode composer
Lane C implementation of the Zopu Web Work OS for dogfooding:

- Work Unit card/detail projections built from per-issue events only
  (artifact counts from distinct artifact.updated paths, PR from
  gitea events, activity timeline, agent summaries). Signal linkage
  is explicitly 0/unavailable until Lane A relations are integrated.
- Persistent composer with Project and Work Unit mode switching.
  Project mode sends to the global Zopu agent; Work Unit mode sends
  to the issue-scoped project-manager agent identity.
- Collapsed Work Unit cards show title, summary, signal/step/artifact
  counts, current activity, PR indicator, needs-input indicator.
- Expanded Work Unit detail shows objective, timeline, artifacts,
  PR with directly usable link, needs-input alert, start action.
- Project-level Signals panel in the sidebar (not attributed to any
  issue until a signal-to-issue relation exists).
- Dark theme with calm, Apple-like visual direction.
- 21 projection tests including 5 cross-issue isolation tests and
  2 signal isolation tests proving one issue cannot inherit
  another issue's artifacts, PR, summary, or project signals.
- Mobile-responsive: detail overlay on mobile, sidebar on desktop.

No backend or schema changes. Uses existing Convex contracts and
Flue agent transport throughout.
2026-07-24 21:10:47 +05:30
-Puter 2ce96b0bab Merge dogfood/zopu-orchestrator into dogfood/v0 2026-07-24 20:50:08 +05:30
-Puter 03fc32bd6d feat(signals): project-scoped Zopu routing loop with secure tools
Add the complete project-scoped Zopu chat, Signal extraction, and
work-routing loop:

Backend (signalRouting.ts):
- Agent-token-gated functions for the full routing cycle: list evidence,
  create signal, list signals, list active issues, attach signal to
  issue, create issue from signal, begin issue, get project context,
  list projects
- attachSignalToIssue requires signal.projectId to exist and equal
  issue.projectId (org equality alone is insufficient)
- createIssueFromSignal is idempotent: queries existing attachments
  before creating, returns created/reused flag
- Duplicate attach retries return existing relation without emitting a
  duplicate event
- All functions deny-by-default with agent token validation

Schema:
- Add signalIssueAttachments table with indexes by signal, issue, and
  the composite (signalId, issueId) for idempotent lookups

Agent tools (tools/signals.ts):
- Nine Flue tool definitions bound to the organization-scoped agent
  instance ID, calling the agent-gated Convex functions
- Organization ID never accepted as free input; always from the bound
  instance

Zopu agent (zopu.ts):
- Comprehensive routing-loop instructions: assess actionability, identify
  project, create signal only when actionable, route via attach or create,
  explain outcome, optionally begin
- Wiring of routing tools into the agent definition

Tests (signalRouting.test.ts):
- Authentication: invalid token rejected on every function
- Project scoping: evidence, signals, issues scoped correctly
- Idempotency: duplicate attach, duplicate create-from-signal, duplicate
  signal creation
- Attach vs create: both paths verified
- Cross-project rejection: signal and issue must be in same project
- Org-scoped signal attach rejected (no projectId)
- Provenance: exact raw text preserved through routing loop
- Begin issue: transition and auth verification
2026-07-24 20:48:18 +05:30
-Puter 1324316fee fix(signals): source order follows agent selection, not chronological timestamps
Remove the OutOfOrderSource constraint from composeSignal. The agent's
selection order is authoritative for source ordinals; timestamps remain
as per-source provenance metadata. This resolves the contract conflict
where reversed message selections (valid agent compositions) were
rejected by the primitive.

Each source still retains its original createdAt, so chronological
provenance is preserved exactly. The sourceKey includes ordered message
IDs, so different orderings produce distinct signals with deterministic
idempotency.

Coverage added:
- Primitive: non-chronological order accepted, timestamps preserved
- Backend: reversed selection preserves ordinals and exact raw text
2026-07-24 20:32:48 +05:30
-Puter fb438ba9a7 feat: wire mobile workspace into project loop 2026-07-24 03:17:59 +05:30
-Puter 9d54470774 merge mobile workspace UI into integration 2026-07-24 03:00:08 +05:30
-Puter 78c5a39999 Merge branch 'puter/issue-9-gitea-smoke' into puter/issue-14-integration
# Conflicts:
#	packages/primitives/package.json
2026-07-24 02:37:09 +05:30
-Puter 7f3cc840bf Merge branch 'puter/issue-8-project-loop' into puter/issue-14-integration
# Conflicts:
#	apps/web/src/components/projects/project-workspace-page.tsx
#	packages/primitives/package.json
#	packages/primitives/src/index.ts
2026-07-24 02:34:01 +05:30
-Puter 43e7c9050a Merge branch 'puter/issue-5-gitea-lifecycle' into puter/issue-14-integration
# Conflicts:
#	bun.lock
#	packages/agents/package.json
#	packages/agents/src/agents/project-manager.ts
#	packages/backend/convex/agentWorkspace.ts
2026-07-24 02:31:21 +05:30
-Puter 6be2b3a67c Merge branch 'puter/issue-7-gitea-checkout' into puter/issue-14-integration
# Conflicts:
#	bun.lock
#	packages/agents/package.json
#	packages/primitives/package.json
#	packages/primitives/src/index.ts
2026-07-24 02:27:13 +05:30
-Puter a9a52e1078 Merge branch 'puter/issue-6-project-flow' into puter/issue-14-integration 2026-07-24 02:25:38 +05:30
-Puter 7caad057db feat: prepare issue workspaces from connected repositories 2026-07-24 02:19:35 +05:30
-Puter d343587c2b test: add Zopu integration smoke harness 2026-07-24 02:08:15 +05:30
-Puter a17d53cb41 feat: add post-run Gitea lifecycle (#5) 2026-07-24 02:05:30 +05:30
-Puter 5d6ba558ab feat(web): build project loop workspace 2026-07-24 02:03:54 +05:30
-Puter 38c73847e0 feat: dispatch authenticated project issue requests 2026-07-24 02:00:02 +05:30
-Puter 7974bd5f3e fix: resolve stash conflict markers in AGENTS.md, zopu.ts, package.json, bun.lock
All four files had unresolved git stash-pop conflict markers baked in.
- AGENTS.md: keep ours (docs/ canonical reference)
- zopu.ts: keep ours (authenticatedAgentRoute)
- package.json: keep ours (catalog: convention)
- bun.lock: restore clean version from pre-damage commit
2026-07-23 19:16:00 +05:30
-Puter ae8f24a8cb fix: remove stale root-level DESIGN/PRODUCT/TECH.md duplicates
These were accidentally committed by git add -A picking up stash-pop
leftovers. docs/ is the canonical location; the root copies were stale
pre-rebrand duplicates.
2026-07-23 19:11:56 +05:30
-Puter f3d44ebcfa fix: prefer-at disable for backend compat, final lint pass 2026-07-23 18:51:49 +05:30
-Puter 7365322197 fix: lint cleanup, remove tests for later rewrite, ES compat
- Fix all Ultracite lint errors on changed source files (0 remaining)
- Remove project.test.ts and use-personal-organization.test.ts (to be
  rewritten when implementation stabilizes)
- Replace .at(-1) with index access for backend tsconfig ES target compat
- Rename generator functions to avoid no-shadow conflicts
- Refactor nested ternaries into helper functions
- Fix unused imports
2026-07-23 18:48:26 +05:30
-Puter e44759d7fe feat: generic project UI, branding fix, context/artifact separation
Web:
- Replace GitHub-specific import with generic public Git URL import
- Update project workspace page to use ProjectView shape (name, sources)
- Migrate use-project-workspace hook to importPublicGit action
- Fix status key needsInput → needs-input

Branding:
- Correct Zopo/zopo → Zopu/zopu in docs/PRODUCT.md, docs/DESIGN.md, docs/TECH.md

Artifacts:
- Cut to 8 operational artifacts (removed project/business/design.md)
- Update artifact seeds with generic context scaffolding
2026-07-23 18:31:48 +05:30
-Puter 224e98d0bc feat: add Convex project backend with generic storage and org-scoped authz
Schema:
- Cut projects table to {organizationId, name, description, createdAt, updatedAt}
- Add projectSources table with git source metadata and normalized URL index
- Add projectContextDocuments table with six canonical kinds, origin, revision
- Add by_organizationId index for project enumeration
- Remove all GitHub-specific fields (ownerId, provider, repoOwner, etc.)

Backend:
- Add requireCurrentOrganization and requireProjectMember authz helpers
- Migrate signals.ts authorizeProject to organizationId invariant check
- Update artifactModel: 8 operational artifacts (removed project/business/design.md)
- Add projectStore.ts with query/mutation/action store adapters
- Rewrite projects.ts to thin generic application calls
- Update projectIssues/projectArtifacts to use requireProjectMember
- Update projectEvents.test.ts and signals.test.ts for new project creation

All 33 backend tests pass.
2026-07-23 18:16:41 +05:30
-Puter 477e54240d feat: consolidate web auth and add Effect v4 Project primitives
Auth:
- Add useWebAuth hook as the single web-facing auth interface with four
  states (loading/unauthenticated/authenticated/inconsistent)
- Normalize getCurrentUser to return {id: tokenIdentifier, name, email}
- Rename requireOwnerId to requireAuthUserId across all backend callers
- Set expectAuth:true on ConvexReactClient singleton
- Migrate _app, _auth, user-menu, use-personal-organization to useWebAuth
- Remove unused @code/auth/server export (zero callers confirmed)

Primitives:
- Add packages/primitives/src/project.ts with Effect v4 Project domain:
  URL normalization, six canonical context kinds, strict remote decoding,
  context write decisioning with revision tracking, and no-op detection
- Define PublicGit and ProjectStore replaceable ports
- Define ProjectApplication service orchestrating domain+ports with
  deterministic error mapping
- Add comprehensive test suite (28 tests) with in-memory store and fake
  PublicGit covering normalization, seeds, idempotency, tenant isolation,
  last-write-wins, and typed error mapping
2026-07-23 18:04:02 +05:30
-Puter f35b381477 style(backend): format signal persistence 2026-07-23 17:19:38 +05:30
-Puter 4002a12d69 fix(agents): avoid advertising unavailable signal tools 2026-07-23 17:19:01 +05:30
-Puter d3381f978f feat(agents): add signal tools to zopu agent 2026-07-23 17:17:19 +05:30
-Puter 6d86c8e538 feat(schema): add signals and signal sources tables 2026-07-23 17:09:01 +05:30
-Puter 5b0bf35175 feat(chat): add connecting status during organization bootstrap 2026-07-23 16:54:36 +05:30
-Puter 5d5139dc95 feat(chat): scope agent to current organization 2026-07-23 16:31:52 +05:30
-Puter 535e9dde62 refactor(backend): rename projectSignals to projectEvents 2026-07-23 16:04:00 +05:30
-Puter c6f3cd330a feat(authz): add organization member authorization check 2026-07-23 15:42:51 +05:30
-Puter ca967fcc1c feat(primitives): add signal module 2026-07-23 15:15:00 +05:30
-Puter e9260cbd17 refactor(deps): migrate dependencies to catalog protocol 2026-07-23 15:03:44 +05:30
-Puter 5d1598a807 docs 2026-07-23 14:45:19 +05:30
-Puter 52510d1107 chore: establish signals feature baseline 2026-07-23 14:29:57 +05:30
-Puter aa1c89a310 Align agents Hono runtime version 2026-07-23 01:30:11 +05:30
-Puter f73e4407c0 Restore local agent work after sai merge 2026-07-23 01:27:59 +05:30
-Puter 608f468219 Merge sai changes with integration fixes 2026-07-23 01:27:20 +05:30
-Puter a405fcf785 Fix sai changes integration blockers 2026-07-23 01:27:03 +05:30
-Puter 6494a61ed8 remoge claude ew 2026-07-23 00:19:53 +05:30
-Puter 070c6c0a91 skills and photots 2026-07-22 00:21:04 +05:30
-Puter 5347db578d Polish chat UI and wire flue agent env
- Add chat components (header, composer, conversation, message, thinking response, identity)
- Add chat hooks (use-chat-agent, use-chat-composer)
- Add chat lib (constants, transforms, types)
- Wire agent model config through env (provider, name, api, base url, key, context window, max tokens)
- Refresh web styling and routes
2026-07-19 19:33:41 +05:30
-Puter 8cd479f20c Track Flue skill and refresh top-level docs
- Commit the vendored Flue SKILL.md under .agents/skills/flue and the
  .claude/skills/flue symlink plus skills-lock.json entry.
- Rewrite AGENTS.md down to the repo's actual conventions and expand
  README.md with daemon/TUI/dev script notes.
2026-07-19 17:29:42 +05:30
-Puter a9a8354346 Wire Flue agents to Convex persistence and agent env
- Add db.ts: a typed ConvexHttpClient-backed PersistenceAdapter implementing
  the full Flue store surface (submissions, streams, runs, attachments).
- Add app.ts: Hono server mounting Flue routing and registering the model
  provider from @code/env/agent.
- Update zopu agent to read provider config via env() and switch
  dev/build scripts to load ../../.env.
2026-07-19 17:29:37 +05:30
-Puter 12537e1576 Add Flue persistence backend on Convex
- Define the schema v4 Flue tables (submissions, attempt markers,
  conversation streams/batches, event streams/entries, runs, attachments,
  meta) in schema.ts with the indexes the adapter relies on.
- Implement fluePersistence.ts: token-gated queries/mutations covering
  submission lifecycle, leasing, settlement, conversation/event streams,
  runs, and attachments.
2026-07-19 17:29:30 +05:30
-Puter e91ca4e6f0 Declare typed Convex env and route auth through @code/env/convex
- Register SITE_URL, NATIVE_APP_URL, CONVEX_SITE_URL, FLUE_DB_TOKEN in
  convex.config.ts so the generated server.js exposes a typed env object.
- Rewrite auth.ts to consume @code/env/convex and tighten the
  getCurrentUser handler.
- Refresh the backend README to describe the control-plane role and
  generated-file policy.
2026-07-19 17:29:21 +05:30
-Puter 6de7c3065e Consolidate env at repo root
- Move all application env vars to repository-root .env (with .env.example
  as the committed template) and drop the per-app .env.example files.
- Add @code/env subpaths (agent, convex) and consume validated exports
  everywhere instead of reading process.env directly.
- Wire every dev/build/start script to load ../../.env via bun --env-file
  and point vite.config.ts envDir at the repo root.
2026-07-19 17:29:11 +05:30
-Puter 87ddc2b73a Limit documentation update prompts 2026-07-19 06:30:32 +05:30
-Puter ec84c52155 Add AgentOS daemon control plane and maintenance tooling 2026-07-19 06:29:51 +05:30
-Puter a37e0cc3c9 Merge commit '3c60637c1a27da8ba66888de518d58d5707801f2' as 'repos/effect-smol' 2026-07-19 03:28:59 +05:30
-Puter 2daf979036 Merge commit '36c66dd290d3ce6eb1ccd310d0c658d4a32bb8eb' as 'repos/effect' 2026-07-19 03:25:18 +05:30
-Puter dd1071cc10 Add agents package with Flue 2026-07-19 03:24:40 +05:30
-Puter 8033a8edb0 initial commit 2026-07-19 02:46:47 +05:30