{"id":21519126,"url":"https://github.com/dcspark/shinkai-prompt-test","last_synced_at":"2025-03-17T16:46:08.986Z","repository":{"id":262725467,"uuid":"888154634","full_name":"dcSpark/shinkai-prompt-test","owner":"dcSpark","description":"Tests for Shinkai Tool Prompts","archived":false,"fork":false,"pushed_at":"2025-03-13T20:28:09.000Z","size":5478,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-13T20:34:08.976Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dcSpark.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-13T22:56:56.000Z","updated_at":"2025-03-13T20:28:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"1549e7a6-d855-4bcc-b272-ef0bcebfa9e3","html_url":"https://github.com/dcSpark/shinkai-prompt-test","commit_stats":null,"previous_names":["dcspark/shinkai-prompt-test"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcSpark%2Fshinkai-prompt-test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcSpark%2Fshinkai-prompt-test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcSpark%2Fshinkai-prompt-test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcSpark%2Fshinkai-prompt-test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dcSpark","download_url":"https://codeload.github.com/dcSpark/shinkai-prompt-test/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244073695,"owners_count":20393877,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-24T00:55:56.510Z","updated_at":"2025-03-17T16:46:08.974Z","avatar_url":"https://github.com/dcSpark.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Shinkai Prompt Testing\n\n\n## Install\n```\ngit clone git@github.com:dcSpark/shinkai-prompt-test.git \ncd shinkai-prompt-test\ncp .env.example .env\n```\n\u003e setup BRAVE_API_KEY and other keys in .env\n\n## Launch service\n```\ndeno --watch -A src/service.ts\n```\n\n\u003e TEST curl localhost:8080/generate\\?language=typescript\\\u0026prompt=hello_world                                                              \n\n\u003e Open test.html to use the frontend\n\n## Pipeline Flow Diagram\n\n```mermaid\ngraph TD\n    Start[Start] --\u003e Init[Initialize]\n    Init --\u003e ProcReq[Process Requirements \u0026 Feedback]\n    ProcReq --\u003e ProcUser[Process User Feedback]\n    ProcUser --\u003e ProcLib[Process Library Search]\n    ProcLib --\u003e ProcInt[Process Internal Tools]\n    ProcInt --\u003e GenCode[Generate Code]\n    GenCode --\u003e CheckCode[Check Generated Code]\n    CheckCode --\u003e|No Warnings| GenMeta[Generate Metadata]\n    CheckCode --\u003e|Has Warnings \u0026 Retries \u003e 0| FixCode[Fix Code]\n    FixCode --\u003e CheckCode\n    GenMeta --\u003e LogComp[Log Completion]\n    LogComp --\u003e End[End]\n\n    subgraph RetryUntilSuccess\n        RetryStart[Start Retry] --\u003e RunFn[Run Function]\n        RunFn --\u003e Extract[Extract Result]\n        Extract --\u003e|Success| RetryEnd[Return Result]\n        Extract --\u003e|Failure \u0026 Retries \u003e 0| RunFn\n        Extract --\u003e|Failure \u0026 No Retries| ThrowErr[Throw Error]\n    end\n\n    %% Connect main flow with RetryUntilSuccess\n    ProcReq -.-\u003e|Uses| RetryStart\n    ProcUser -.-\u003e|Uses| RetryStart\n    ProcLib -.-\u003e|Uses| RetryStart\n    ProcInt -.-\u003e|Uses| RetryStart\n    GenCode -.-\u003e|Uses| RetryStart\n    CheckCode -.-\u003e|Uses| RetryStart\n    GenMeta -.-\u003e|Uses| RetryStart\n\n    %% Styling\n    classDef process fill:#f9f,stroke:#333,stroke-width:2px;\n    classDef retry fill:#bbf,stroke:#333,stroke-width:2px;\n    class RetryStart,RunFn,Extract,RetryEnd,ThrowErr retry;\n    class Init,ProcReq,ProcUser,ProcLib,ProcInt,GenCode,CheckCode,FixCode,GenMeta,LogComp process;\n```\n\nThe diagram above shows the main pipeline flow of the Shinkai prompt testing system. Each major step in the pipeline utilizes the `retryUntilSuccess` mechanism (shown in the subgraph) to ensure robust execution. The retry mechanism will attempt the operation up to 3 times before failing.\n\nKey components:\n- Main Pipeline Flow: Shows the sequential processing steps from initialization to completion\n- RetryUntilSuccess: Demonstrates the self-looping retry mechanism used by most pipeline steps\n- Warning Handling: Illustrates the code fix loop that occurs when warnings are detected\n- Integration Points: Dotted lines show where the retry mechanism is utilized in the main flow","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcspark%2Fshinkai-prompt-test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdcspark%2Fshinkai-prompt-test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcspark%2Fshinkai-prompt-test/lists"}