[{"data":1,"prerenderedAt":692},["ShallowReactive",2],{"navigation_docs":3,"-guides-schedule-and-webhook-work":270,"-guides-schedule-and-webhook-work-surround":687},[4,28,51,110,243],{"title":5,"path":6,"stem":7,"children":8},"Get started","\u002Fget-started","1.get-started",[9,12,16,20,24],{"title":10,"path":6,"stem":11},"Overview","1.get-started\u002Findex",{"title":13,"path":14,"stem":15},"Why Kraft","\u002Fget-started\u002Fwhy-kraft","1.get-started\u002F0.why-kraft",{"title":17,"path":18,"stem":19},"Install","\u002Fget-started\u002Finstall","1.get-started\u002F1.install",{"title":21,"path":22,"stem":23},"Your first work item","\u002Fget-started\u002Ffirst-work-item","1.get-started\u002F2.first-work-item",{"title":25,"path":26,"stem":27},"Troubleshooting and FAQ","\u002Fget-started\u002Ftroubleshooting","1.get-started\u002F3.troubleshooting",{"title":29,"path":30,"stem":31,"children":32},"Concepts","\u002Fconcepts","2.concepts",[33,35,39,43,47],{"title":10,"path":30,"stem":34},"2.concepts\u002Findex",{"title":36,"path":37,"stem":38},"Vocabulary","\u002Fconcepts\u002Fvocabulary","2.concepts\u002F1.vocabulary",{"title":40,"path":41,"stem":42},"How a work item runs","\u002Fconcepts\u002Fhow-a-work-item-runs","2.concepts\u002F2.how-a-work-item-runs",{"title":44,"path":45,"stem":46},"Caps and budgets","\u002Fconcepts\u002Fcaps-and-budgets","2.concepts\u002F3.caps-and-budgets",{"title":48,"path":49,"stem":50},"Why a permission gate","\u002Fconcepts\u002Fpermission-gate","2.concepts\u002F4.permission-gate",{"title":52,"path":53,"stem":54,"children":55},"Guides","\u002Fguides","3.guides",[56,58,62,66,70,74,78,82,86,90,94,98,102,106],{"title":10,"path":53,"stem":57},"3.guides\u002Findex",{"title":59,"path":60,"stem":61},"Use Kraft from your agent","\u002Fguides\u002Fagent-integration","3.guides\u002F01.agent-integration",{"title":63,"path":64,"stem":65},"Kraft Lite","\u002Fguides\u002Fkraft-lite","3.guides\u002F02.kraft-lite",{"title":67,"path":68,"stem":69},"Remote access","\u002Fguides\u002Fremote-access","3.guides\u002F03.remote-access",{"title":71,"path":72,"stem":73},"Add or override a harness","\u002Fguides\u002Fadding-a-harness","3.guides\u002F04.adding-a-harness",{"title":75,"path":76,"stem":77},"Schedule or webhook work","\u002Fguides\u002Fschedule-and-webhook-work","3.guides\u002F05.schedule-and-webhook-work",{"title":79,"path":80,"stem":81},"Add a security review or a gate reviewer","\u002Fguides\u002Fadd-review-agents","3.guides\u002F06.add-review-agents",{"title":83,"path":84,"stem":85},"Kraft for VS Code","\u002Fguides\u002Fvscode","3.guides\u002F07.vscode",{"title":87,"path":88,"stem":89},"Reviewing a change","\u002Fguides\u002Freview-a-change","3.guides\u002F08.review-a-change",{"title":91,"path":92,"stem":93},"Write your own chain","\u002Fguides\u002Fwrite-your-own-chain","3.guides\u002F09.write-your-own-chain",{"title":95,"path":96,"stem":97},"Switch a harness","\u002Fguides\u002Fswitch-harness","3.guides\u002F10.switch-harness",{"title":99,"path":100,"stem":101},"Upgrade your templates","\u002Fguides\u002Fupgrading-templates","3.guides\u002F11.upgrading-templates",{"title":103,"path":104,"stem":105},"Operations","\u002Fguides\u002Foperations","3.guides\u002F12.operations",{"title":107,"path":108,"stem":109},"Worker Kit","\u002Fguides\u002Fworker-kit","3.guides\u002F13.worker-kit",{"title":111,"path":112,"stem":113,"children":114},"Reference","\u002Freference","4.reference",[115,117,139,183,201,205,227,231,235,239],{"title":10,"path":112,"stem":116},"4.reference\u002Findex",{"title":118,"path":119,"stem":120,"children":121},"CLI","\u002Freference\u002Fcli","4.reference\u002F1.cli\u002Findex",[122,123,127,131,135],{"title":10,"path":119,"stem":120},{"title":124,"path":125,"stem":126},"Item verbs","\u002Freference\u002Fcli\u002Fitem","4.reference\u002F1.cli\u002F2.item",{"title":128,"path":129,"stem":130},"View verbs","\u002Freference\u002Fcli\u002Fview","4.reference\u002F1.cli\u002F3.view",{"title":132,"path":133,"stem":134},"Repo verbs","\u002Freference\u002Fcli\u002Frepo","4.reference\u002F1.cli\u002F4.repo",{"title":136,"path":137,"stem":138},"Admin verbs","\u002Freference\u002Fcli\u002Fadmin","4.reference\u002F1.cli\u002F5.admin",{"title":140,"path":141,"stem":142,"children":143},"Configuration","\u002Freference\u002Fconfiguration","4.reference\u002F2.configuration\u002Findex",[144,145,155,159,163,167,171,175,179],{"title":10,"path":141,"stem":142},{"title":146,"path":147,"stem":148,"children":149},"Repos","\u002Freference\u002Fconfiguration\u002Frepos","4.reference\u002F2.configuration\u002F2.repos\u002Findex",[150,151],{"title":10,"path":147,"stem":148},{"title":152,"path":153,"stem":154},"Workspaces","\u002Freference\u002Fconfiguration\u002Frepos\u002Fworkspaces","4.reference\u002F2.configuration\u002F2.repos\u002F3.workspaces",{"title":156,"path":157,"stem":158},"Policy","\u002Freference\u002Fconfiguration\u002Fpolicy","4.reference\u002F2.configuration\u002F3.policy",{"title":160,"path":161,"stem":162},"Library and chains","\u002Freference\u002Fconfiguration\u002Flibrary-and-chains","4.reference\u002F2.configuration\u002F4.library-and-chains",{"title":164,"path":165,"stem":166},"Harnesses file","\u002Freference\u002Fconfiguration\u002Fharnesses-file","4.reference\u002F2.configuration\u002F5.harnesses-file",{"title":168,"path":169,"stem":170},"Access","\u002Freference\u002Fconfiguration\u002Faccess","4.reference\u002F2.configuration\u002F6.access",{"title":172,"path":173,"stem":174},"Intake","\u002Freference\u002Fconfiguration\u002Fintake","4.reference\u002F2.configuration\u002F7.intake",{"title":176,"path":177,"stem":178},"Sandbox host","\u002Freference\u002Fconfiguration\u002Fsandbox","4.reference\u002F2.configuration\u002F8.sandbox",{"title":180,"path":181,"stem":182},"Environment variables","\u002Freference\u002Fconfiguration\u002Fenvironment-variables","4.reference\u002F2.configuration\u002F9.environment-variables",{"title":184,"path":185,"stem":186,"children":187},"Chain nodes","\u002Freference\u002Fchain-nodes","4.reference\u002F3.chain-nodes\u002Findex",[188,189,193,197],{"title":10,"path":185,"stem":186},{"title":190,"path":191,"stem":192},"Subprocess tasks","\u002Freference\u002Fchain-nodes\u002Fsubprocess-tasks","4.reference\u002F3.chain-nodes\u002F2.subprocess-tasks",{"title":194,"path":195,"stem":196},"Fix loop and judge","\u002Freference\u002Fchain-nodes\u002Ffix-loop","4.reference\u002F3.chain-nodes\u002F3.fix-loop",{"title":198,"path":199,"stem":200},"Result file","\u002Freference\u002Fchain-nodes\u002Fresult-file","4.reference\u002F3.chain-nodes\u002F4.result-file",{"title":202,"path":203,"stem":204},"Permission gate","\u002Freference\u002Fpermissions","4.reference\u002F4.permissions",{"title":206,"path":207,"stem":208,"children":209},"Agent harnesses","\u002Freference\u002Fharnesses","4.reference\u002F5.harnesses\u002Findex",[210,211,215,219,223],{"title":10,"path":207,"stem":208},{"title":212,"path":213,"stem":214},"Unattended runs","\u002Freference\u002Fharnesses\u002Funattended-runs","4.reference\u002F5.harnesses\u002F2.unattended-runs",{"title":216,"path":217,"stem":218},"Agent profiles","\u002Freference\u002Fharnesses\u002Fagent-profiles","4.reference\u002F5.harnesses\u002F3.agent-profiles",{"title":220,"path":221,"stem":222},"Harness files","\u002Freference\u002Fharnesses\u002Fharness-files","4.reference\u002F5.harnesses\u002F4.harness-files",{"title":224,"path":225,"stem":226},"Fallback and escalation","\u002Freference\u002Fharnesses\u002Ffallback-and-escalation","4.reference\u002F5.harnesses\u002F5.fallback-and-escalation",{"title":228,"path":229,"stem":230},"Inbound triggers","\u002Freference\u002Ftriggers","4.reference\u002F6.triggers",{"title":232,"path":233,"stem":234},"HTTP API","\u002Freference\u002Fhttp-api","4.reference\u002F7.http-api",{"title":236,"path":237,"stem":238},"MCP tools","\u002Freference\u002Fmcp-tools","4.reference\u002F8.mcp-tools",{"title":240,"path":241,"stem":242},"Events","\u002Freference\u002Fevents","4.reference\u002F9.events",{"title":244,"path":245,"stem":246,"children":247},"Project","\u002Fproject","5.project",[248,250,254,258,262,266],{"title":10,"path":245,"stem":249},"5.project\u002Findex",{"title":251,"path":252,"stem":253},"Architecture","\u002Fproject\u002Farchitecture","5.project\u002F1.architecture",{"title":255,"path":256,"stem":257},"Contributing","\u002Fproject\u002Fcontributing","5.project\u002F2.contributing",{"title":259,"path":260,"stem":261},"Security","\u002Fproject\u002Fsecurity","5.project\u002F3.security",{"title":263,"path":264,"stem":265},"Data and privacy","\u002Fproject\u002Fdata-and-privacy","5.project\u002F4.data-and-privacy",{"title":267,"path":268,"stem":269},"Status and support","\u002Fproject\u002Fstatus-and-support","5.project\u002F5.status-and-support",{"id":271,"title":75,"body":272,"description":680,"extension":681,"links":682,"meta":683,"navigation":684,"path":76,"seo":685,"stem":77,"__hash__":686},"docs\u002F3.guides\u002F05.schedule-and-webhook-work.md",{"type":273,"value":274,"toc":674},"minimark",[275,288,293,430,433,437,444,451,506,519,599,609,625,629,632,650,653,657,670],[276,277,278,279,283,284,287],"p",{},"This guide sets up a trigger that files a paused work item for you, then\nverifies it. You need a connected repo (",[280,281,282],"code",{},"kraft repo connect",") and a running\nKraft server. The fields and the HTTP contract are in\n",[285,286,228],"a",{"href":229},".",[289,290,292],"h2",{"id":291},"schedule-a-work-item","Schedule a work item",[294,295,296,408],"ol",{},[297,298,299,300,303,304,307,308],"li",{},"Add a ",[280,301,302],{},"triggers:"," entry to ",[280,305,306],{},"$KRAFT_HOME\u002Ftemplates\u002Fpolicy.yaml",":",[309,310,315],"pre",{"className":311,"code":312,"language":313,"meta":314,"style":314},"language-yaml shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","triggers:\n  - cron: \"0 9 * * 1,2,3,4,5\"  # 9:00 UTC on weekdays\n    repo: \u002Fpath\u002Fto\u002Frepo\n    chain: default\n    title: \"Weekday dependency check\"\n    description: \"Filed by the 9am weekday trigger\"\n","yaml","",[280,316,317,330,355,366,377,393],{"__ignoreMap":314},[318,319,322,326],"span",{"class":320,"line":321},"line",1,[318,323,325],{"class":324},"swJcz","triggers",[318,327,329],{"class":328},"sMK4o",":\n",[318,331,333,336,339,341,344,348,351],{"class":320,"line":332},2,[318,334,335],{"class":328},"  -",[318,337,338],{"class":324}," cron",[318,340,307],{"class":328},[318,342,343],{"class":328}," \"",[318,345,347],{"class":346},"sfazB","0 9 * * 1,2,3,4,5",[318,349,350],{"class":328},"\"",[318,352,354],{"class":353},"sHwdD","  # 9:00 UTC on weekdays\n",[318,356,358,361,363],{"class":320,"line":357},3,[318,359,360],{"class":324},"    repo",[318,362,307],{"class":328},[318,364,365],{"class":346}," \u002Fpath\u002Fto\u002Frepo\n",[318,367,369,372,374],{"class":320,"line":368},4,[318,370,371],{"class":324},"    chain",[318,373,307],{"class":328},[318,375,376],{"class":346}," default\n",[318,378,380,383,385,387,390],{"class":320,"line":379},5,[318,381,382],{"class":324},"    title",[318,384,307],{"class":328},[318,386,343],{"class":328},[318,388,389],{"class":346},"Weekday dependency check",[318,391,392],{"class":328},"\"\n",[318,394,396,399,401,403,406],{"class":320,"line":395},6,[318,397,398],{"class":324},"    description",[318,400,307],{"class":328},[318,402,343],{"class":328},[318,404,405],{"class":346},"Filed by the 9am weekday trigger",[318,407,392],{"class":328},[297,409,410,411],{},"Reload the policy, or add the entry through Settings instead:",[309,412,416],{"className":413,"code":414,"language":415,"meta":314,"style":314},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","kraft admin reload\n","bash",[280,417,418],{"__ignoreMap":314},[318,419,420,424,427],{"class":320,"line":321},[318,421,423],{"class":422},"sBMFI","kraft",[318,425,426],{"class":346}," admin",[318,428,429],{"class":346}," reload\n",[276,431,432],{},"Kraft evaluates the schedule in UTC. The next matching minute files the item.",[289,434,436],{"id":435},"file-a-work-item-from-a-webhook","File a work item from a webhook",[276,438,439,440,443],{},"Post to ",[280,441,442],{},"\u002Fapi\u002Ftriggers"," from anything that can fire a webhook, such as CI or\na script.",[276,445,446,447,450],{},"While Kraft is bound to ",[280,448,449],{},"127.0.0.1"," (the default), a call from the same machine\nneeds no login:",[309,452,454],{"className":413,"code":453,"language":415,"meta":314,"style":314},"curl -s -X POST http:\u002F\u002F127.0.0.1:8765\u002Fapi\u002Ftriggers \\\n  -H 'Content-Type: application\u002Fjson' \\\n  -d '{\"title\": \"Dependency check\", \"repo\": \"\u002Fpath\u002Fto\u002Frepo\", \"chain_template\": \"default\"}'\n",[280,455,456,477,493],{"__ignoreMap":314},[318,457,458,461,464,467,470,473],{"class":320,"line":321},[318,459,460],{"class":422},"curl",[318,462,463],{"class":346}," -s",[318,465,466],{"class":346}," -X",[318,468,469],{"class":346}," POST",[318,471,472],{"class":346}," http:\u002F\u002F127.0.0.1:8765\u002Fapi\u002Ftriggers",[318,474,476],{"class":475},"sTEyZ"," \\\n",[318,478,479,482,485,488,491],{"class":320,"line":332},[318,480,481],{"class":346},"  -H",[318,483,484],{"class":328}," '",[318,486,487],{"class":346},"Content-Type: application\u002Fjson",[318,489,490],{"class":328},"'",[318,492,476],{"class":475},[318,494,495,498,500,503],{"class":320,"line":357},[318,496,497],{"class":346},"  -d",[318,499,484],{"class":328},[318,501,502],{"class":346},"{\"title\": \"Dependency check\", \"repo\": \"\u002Fpath\u002Fto\u002Frepo\", \"chain_template\": \"default\"}",[318,504,505],{"class":328},"'\n",[276,507,508,509,512,513,516,517,287],{},"After a non-loopback bind, every call needs the trigger token from\n",[280,510,511],{},"$KRAFT_HOME\u002Frun\u002Ftrigger-token",", including one from the same machine, which\notherwise gets ",[280,514,515],{},"401",". From another machine, also use the address you reach\nKraft at. See ",[285,518,67],{"href":68},[309,520,522],{"className":413,"code":521,"language":415,"meta":314,"style":314},"curl -s -X POST https:\u002F\u002F\u003Cyour-tunnel-hostname>\u002Fapi\u002Ftriggers \\\n  -H \"Authorization: Bearer $(cat ~\u002F.kraft\u002Frun\u002Ftrigger-token)\" \\\n  -H 'Content-Type: application\u002Fjson' \\\n  -d '{\"title\": \"Dependency check\", \"repo\": \"\u002Fpath\u002Fto\u002Frepo\"}'\n",[280,523,524,553,576,588],{"__ignoreMap":314},[318,525,526,528,530,532,534,537,540,543,546,549,551],{"class":320,"line":321},[318,527,460],{"class":422},[318,529,463],{"class":346},[318,531,466],{"class":346},[318,533,469],{"class":346},[318,535,536],{"class":346}," https:\u002F\u002F",[318,538,539],{"class":328},"\u003C",[318,541,542],{"class":346},"your-tunnel-hostnam",[318,544,545],{"class":475},"e",[318,547,548],{"class":328},">",[318,550,442],{"class":346},[318,552,476],{"class":475},[318,554,555,557,559,562,565,568,571,574],{"class":320,"line":332},[318,556,481],{"class":346},[318,558,343],{"class":328},[318,560,561],{"class":346},"Authorization: Bearer ",[318,563,564],{"class":328},"$(",[318,566,567],{"class":422},"cat",[318,569,570],{"class":346}," ~\u002F.kraft\u002Frun\u002Ftrigger-token",[318,572,573],{"class":328},")\"",[318,575,476],{"class":475},[318,577,578,580,582,584,586],{"class":320,"line":357},[318,579,481],{"class":346},[318,581,484],{"class":328},[318,583,487],{"class":346},[318,585,490],{"class":328},[318,587,476],{"class":475},[318,589,590,592,594,597],{"class":320,"line":368},[318,591,497],{"class":346},[318,593,484],{"class":328},[318,595,596],{"class":346},"{\"title\": \"Dependency check\", \"repo\": \"\u002Fpath\u002Fto\u002Frepo\"}",[318,598,505],{"class":328},[276,600,601,602,605,606,287],{},"Kraft answers ",[280,603,604],{},"201"," with the new work item, filed ",[280,607,608],{},"paused",[276,610,611,612,615,616,619,620,624],{},"The trigger token is good for ",[280,613,614],{},"POST \u002Fapi\u002Ftriggers"," only, so it is the one to\nstore as a CI secret or give a webhook sender. Do not use ",[280,617,618],{},"run\u002Fmcp-token","\nthere: it is a full-admin credential. See\n",[285,621,623],{"href":622},"\u002Fproject\u002Fsecurity#the-bearer-token","The bearer token"," for how to rotate\neither.",[289,626,628],{"id":627},"verify","Verify",[276,630,631],{},"List the paused items and look for the new one:",[309,633,635],{"className":413,"code":634,"language":415,"meta":314,"style":314},"kraft view list --status=paused\n",[280,636,637],{"__ignoreMap":314},[318,638,639,641,644,647],{"class":320,"line":321},[318,640,423],{"class":422},[318,642,643],{"class":346}," view",[318,645,646],{"class":346}," list",[318,648,649],{"class":346}," --status=paused\n",[276,651,652],{},"The item shows as Not started. Start it from the board when you are ready.\nFor a cron trigger, wait for the next matching UTC minute first. If nothing\nappears, check the server log for a skipped-trigger warning, which names the\nunconnected repo or unknown chain.",[289,654,656],{"id":655},"related","Related",[658,659,660,665],"ul",{},[297,661,662,664],{},[285,663,228],{"href":229},": the fields and status codes.",[297,666,667,669],{},[285,668,67],{"href":68},": reach the server from another machine.",[671,672,673],"style",{},"html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}",{"title":314,"searchDepth":332,"depth":332,"links":675},[676,677,678,679],{"id":291,"depth":332,"text":292},{"id":435,"depth":332,"text":436},{"id":627,"depth":332,"text":628},{"id":655,"depth":332,"text":656},"File a paused work item on a cron schedule or from a webhook, then check that it arrived.","md",null,{},true,{"title":75,"description":680},"zAxLVrP5gG7gURTuVp5ZXJIKX-4XS4sUixN3-958Bs8",[688,690],{"title":71,"path":72,"stem":73,"description":689,"children":-1},"Add an agent CLI to Kraft with a YAML file, override a shipped harness, and set up Amp, Cursor or Antigravity credentials.",{"title":79,"path":80,"stem":81,"description":691,"children":-1},"Add the shipped security-review and gate-review skills to a chain of your own, since no shipped chain uses them.",1790824506943]