[{"data":1,"prerenderedAt":880},["ShallowReactive",2],{"navigation_docs":3,"-reference-triggers":270,"-reference-triggers-surround":875},[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":228,"body":272,"description":868,"extension":869,"links":870,"meta":871,"navigation":872,"path":229,"seo":873,"stem":230,"__hash__":874},"docs\u002F4.reference\u002F6.triggers.md",{"type":273,"value":274,"toc":863},"minimark",[275,304,309,319,425,434,437,458,464,467,533,545,589,750,756,848,859],[276,277,278,279,283,284,287,288,291,292,297,298,300,301,303],"p",{},"A trigger files a work item from an event instead of ",[280,281,282],"code",{},"kraft item create",".\nThere are two kinds, a cron entry in ",[280,285,286],{},"policy.yaml"," and an HTTP call. Both\nalways file the item ",[280,289,290],{},"paused",", exactly like manual\n",[293,294,296],"a",{"href":295},"\u002Fconcepts\u002Fvocabulary#intake","intake",": an agent can't start work from a trigger\nany more than from your own ",[280,299,282],{},". To set one up, see\n",[293,302,75],{"href":76},".",[305,306,308],"h2",{"id":307},"cron-entries","Cron entries",[276,310,311,312,315,316,318],{},"Each entry in the ",[280,313,314],{},"triggers:"," list of ",[280,317,286],{}," has these fields:",[320,321,322,338],"table",{},[323,324,325],"thead",{},[326,327,328,332,335],"tr",{},[329,330,331],"th",{},"Field",[329,333,334],{},"Required",[329,336,337],{},"Meaning",[339,340,341,367,382,397,409],"tbody",{},[326,342,343,349,352],{},[344,345,346],"td",{},[280,347,348],{},"cron",[344,350,351],{},"yes",[344,353,354,355,358,359,362,363,366],{},"Five fields: minute, hour, day of month, month, day of week (0 is Sunday). Each field is ",[280,356,357],{},"*"," or a comma-separated list of integers. Ranges (",[280,360,361],{},"1-5",") and steps (",[280,364,365],{},"*\u002F15",") aren't supported.",[326,368,369,374,376],{},[344,370,371],{},[280,372,373],{},"repo",[344,375,351],{},[344,377,378,379,303],{},"Path of a repo you connected with ",[280,380,381],{},"kraft repo connect",[326,383,384,389,391],{},[344,385,386],{},[280,387,388],{},"chain",[344,390,351],{},[344,392,393,394,303],{},"A chain template id from ",[280,395,396],{},"templates\u002Fchains\u002F",[326,398,399,404,406],{},[344,400,401],{},[280,402,403],{},"title",[344,405,351],{},[344,407,408],{},"The work item's title.",[326,410,411,416,419],{},[344,412,413],{},[280,414,415],{},"description",[344,417,418],{},"no",[344,420,421,422,303],{},"The work item's description. Defaults to ",[280,423,424],{},"\"\"",[276,426,427,428,431,432,303],{},"Kraft evaluates the schedule in UTC, not in the server's local time zone. It\nchecks once a minute, and a minute missed while the server is down isn't\nbackfilled. The poller runs for the life of the server, so a trigger you add\nlater fires without a restart. ",[280,429,430],{},"kraft admin reload"," rereads ",[280,433,286],{},[276,435,436],{},"Kraft skips an entry, logs a warning naming the reason, and still fires the\nother entries due in the same tick, when:",[438,439,440,450,455],"ul",{},[441,442,443,444,446,447,449],"li",{},"the ",[280,445,373],{}," is not connected (the warning names ",[280,448,381],{},");",[441,451,443,452,454],{},[280,453,388],{}," id is unknown;",[441,456,457],{},"the template library is invalid.",[305,459,461],{"id":460},"post-apitriggers",[280,462,463],{},"POST \u002Fapi\u002Ftriggers",[276,465,466],{},"The HTTP twin of a cron entry, for anything that can fire a webhook and can't\nwait for the next minute tick. The request body is JSON:",[320,468,469,479],{},[323,470,471],{},[326,472,473,475,477],{},[329,474,331],{},[329,476,334],{},[329,478,337],{},[339,480,481,491,502,521],{},[326,482,483,487,489],{},[344,484,485],{},[280,486,403],{},[344,488,351],{},[344,490,408],{},[326,492,493,497,499],{},[344,494,495],{},[280,496,373],{},[344,498,351],{},[344,500,501],{},"Path of a connected repo.",[326,503,504,509,511],{},[344,505,506],{},[280,507,508],{},"chain_template",[344,510,418],{},[344,512,513,514,517,518,303],{},"A chain template id. Defaults to the repo's ",[280,515,516],{},"default_chain_template",", else ",[280,519,520],{},"default",[326,522,523,527,529],{},[344,524,525],{},[280,526,415],{},[344,528,418],{},[344,530,421,531,303],{},[280,532,424],{},[276,534,535,536,538,539,541,542,544],{},"The chain field is ",[280,537,388],{}," in ",[280,540,286],{}," and ",[280,543,508],{}," in the HTTP\nbody.",[320,546,547,557],{},[323,548,549],{},[326,550,551,554],{},[329,552,553],{},"Caller",[329,555,556],{},"Authentication",[339,558,559,567],{},[326,560,561,564],{},[344,562,563],{},"The machine running Kraft, while it is bound to loopback",[344,565,566],{},"None.",[326,568,569,572],{},[344,570,571],{},"Any caller after a non-loopback bind, the same machine included",[344,573,574,575,578,579,582,583,586,587,303],{},"The trigger token in ",[280,576,577],{},"$KRAFT_HOME\u002Frun\u002Ftrigger-token",", sent as ",[280,580,581],{},"Authorization: Bearer \u003Ctoken>",". The MCP bearer token in ",[280,584,585],{},"$KRAFT_HOME\u002Frun\u002Fmcp-token"," or a browser session cookie also works. See ",[293,588,67],{"href":68},[320,590,591,600],{},[323,592,593],{},[326,594,595,598],{},[329,596,597],{},"Status",[329,599,337],{},[339,601,602,622,632,646,662,676,687,698,709,721,734],{},[326,603,604,609],{},[344,605,606],{},[280,607,608],{},"201",[344,610,611,612,615,616,619,620,303],{},"The item was filed. The body is the work item as JSON: ",[280,613,614],{},"id"," is the new item's id and ",[280,617,618],{},"status"," is ",[280,621,290],{},[326,623,624,629],{},[344,625,626],{},[280,627,628],{},"401",[344,630,631],{},"Kraft is bound off loopback, and the request has no valid bearer token or session.",[326,633,634,639],{},[344,635,636],{},[280,637,638],{},"403",[344,640,641,642,645],{},"A remote caller while no password is set, or a browser request from a disallowed ",[280,643,644],{},"Host"," or another site.",[326,647,648,653],{},[344,649,650],{},[280,651,652],{},"422",[344,654,655,656,658,659,661],{},"The body is not valid: ",[280,657,373],{}," or ",[280,660,403],{}," is missing, or a field has the wrong type.",[326,663,664,668],{},[344,665,666],{},[280,667,652],{},[344,669,670,671,673,674,303],{},"The ",[280,672,373],{}," is not connected. The message names ",[280,675,381],{},[326,677,678,682],{},[344,679,680],{},[280,681,652],{},[344,683,670,684,686],{},[280,685,373],{}," path no longer exists.",[326,688,689,693],{},[344,690,691],{},[280,692,652],{},[344,694,695,697],{},[280,696,508],{}," names no chain, or that chain does not resolve.",[326,699,700,704],{},[344,701,702],{},[280,703,652],{},[344,705,670,706,708],{},[280,707,403],{}," is longer than 500 characters.",[326,710,711,715],{},[344,712,713],{},[280,714,652],{},[344,716,717,720],{},[280,718,719],{},"repos.yaml"," cannot be read, or the repo's policy or steering is invalid. The message names the problem.",[326,722,723,728],{},[344,724,725],{},[280,726,727],{},"502",[344,729,730,731,303],{},"Filing failed after the checks passed. The message starts ",[280,732,733],{},"intake failed:",[326,735,736,741],{},[344,737,738],{},[280,739,740],{},"503",[344,742,743,745,746,749],{},[280,744,286],{}," or the template library is invalid, so Kraft refuses all new work. ",[280,747,748],{},"kraft admin doctor"," names the file.",[276,751,752,753,755],{},"See ",[293,754,232],{"href":233}," for the rest of the API.",[757,758,763],"pre",{"className":759,"code":760,"language":761,"meta":762,"style":762},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\"id\": \"\u003Cwork-item-id>\", \"title\": \"Nightly dependency check\", \"status\": \"paused\", \"...\": \"...\"}\n","json","",[280,764,765],{"__ignoreMap":762},[766,767,770,774,777,780,782,785,788,792,794,797,799,801,803,805,807,810,812,814,816,818,820,822,824,826,828,830,832,835,837,839,841,843,845],"span",{"class":768,"line":769},"line",1,[766,771,773],{"class":772},"sMK4o","{",[766,775,776],{"class":772},"\"",[766,778,614],{"class":779},"spNyl",[766,781,776],{"class":772},[766,783,784],{"class":772},":",[766,786,787],{"class":772}," \"",[766,789,791],{"class":790},"sfazB","\u003Cwork-item-id>",[766,793,776],{"class":772},[766,795,796],{"class":772},",",[766,798,787],{"class":772},[766,800,403],{"class":779},[766,802,776],{"class":772},[766,804,784],{"class":772},[766,806,787],{"class":772},[766,808,809],{"class":790},"Nightly dependency check",[766,811,776],{"class":772},[766,813,796],{"class":772},[766,815,787],{"class":772},[766,817,618],{"class":779},[766,819,776],{"class":772},[766,821,784],{"class":772},[766,823,787],{"class":772},[766,825,290],{"class":790},[766,827,776],{"class":772},[766,829,796],{"class":772},[766,831,787],{"class":772},[766,833,834],{"class":779},"...",[766,836,776],{"class":772},[766,838,784],{"class":772},[766,840,787],{"class":772},[766,842,834],{"class":790},[766,844,776],{"class":772},[766,846,847],{"class":772},"}\n",[849,850,851,852,854,855,303],"note",{},"Give CI and webhook senders the trigger token. It passes the login check on\n",[280,853,463],{}," only, so its holder can file paused work and nothing else.\nThe MCP bearer token passes it on every route, so whoever holds that one can\nalso start, approve and cancel work and change settings. To rotate either, see\n",[293,856,858],{"href":857},"\u002Fproject\u002Fsecurity#the-bearer-token","The bearer token",[860,861,862],"style",{},"html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}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);}",{"title":762,"searchDepth":864,"depth":864,"links":865},2,[866,867],{"id":307,"depth":864,"text":308},{"id":460,"depth":864,"text":463},"The trigger fields in policy.yaml and the POST \u002Fapi\u002Ftriggers contract for starting a chain from a schedule or a webhook.","md",null,{},true,{"title":228,"description":868},"aRg25-GYacj-c5iAPhsKdWOnHYfzfbNaLPd8z6LgYhA",[876,878],{"title":224,"path":225,"stem":226,"description":877,"children":-1},"Where a launch goes next when a harness is limited or unavailable, and which harness runs an escalation turn.",{"title":232,"path":233,"stem":234,"description":879,"children":-1},"Which of Kraft's HTTP routes are stable, where the full schema is, and who may call them.",1790824506177]