Convert gitgram/ and aitimemachine/ from embedded git repos (which showed as opaque submodule gitlinks on GitHub) into fully-tracked first-party content. AITM now merges its 7 vendored repos as first-party engines: - memory: beads (Go task DAG) + context7 (docs SDK), unified into saved_contexts - git: vendored C git (bundled binary) + gitnexus (in-process code intelligence) - agentic: a2a (@a2a-js/sdk) + pal (AITM-managed Python subprocess) Includes the full session's product build: Gitgram web/mobile/backend features, AITM website/CLI/MCP, the unified memory layer, engine build tooling (scripts/build-engines.sh, Dockerfile, CI), docs (README, ENGINES.md, ARCHITECTURE.md), and extensive test suites. Build artifacts, node_modules, external/, and gemini-cli are gitignored. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
57 lines
1.3 KiB
Go
57 lines
1.3 KiB
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"time"
|
|
|
|
"github.com/spf13/cobra"
|
|
"github.com/steveyegge/beads/internal/utils"
|
|
)
|
|
|
|
var molLastActivityCmd = &cobra.Command{
|
|
Use: "last-activity <molecule-id>",
|
|
Short: "Show last activity timestamp for a molecule",
|
|
Long: `Show the most recent activity timestamp for a molecule.
|
|
|
|
Returns the timestamp of the most recent change to any step in the molecule,
|
|
making it easy to detect stale or stuck molecules.
|
|
|
|
Activity sources:
|
|
step_closed - A step was closed
|
|
step_updated - A step was updated (claimed, edited, etc.)
|
|
molecule_updated - The molecule root itself was updated
|
|
|
|
Examples:
|
|
bd mol last-activity hq-wisp-0laki
|
|
bd mol last-activity hq-wisp-0laki --json`,
|
|
Args: cobra.ExactArgs(1),
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
ctx := rootCtx
|
|
|
|
if store == nil {
|
|
FatalError("no database connection")
|
|
}
|
|
|
|
moleculeID, err := utils.ResolvePartialID(ctx, store, args[0])
|
|
if err != nil {
|
|
FatalError("molecule '%s' not found", args[0])
|
|
}
|
|
|
|
activity, err := store.GetMoleculeLastActivity(ctx, moleculeID)
|
|
if err != nil {
|
|
FatalError("%v", err)
|
|
}
|
|
|
|
if jsonOutput {
|
|
outputJSON(activity)
|
|
return
|
|
}
|
|
|
|
fmt.Println(activity.LastActivity.UTC().Format(time.RFC3339))
|
|
},
|
|
}
|
|
|
|
func init() {
|
|
molCmd.AddCommand(molLastActivityCmd)
|
|
}
|