workspai 0.65.0 → 0.66.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -1
- package/contracts/agent-customization-pack.v1.json +4 -2
- package/contracts/analyze-last-run.v1.json +9 -1
- package/contracts/cli-runtime-command-inventory.v1.snapshot.json +113 -0
- package/contracts/extension-cli-compatibility.v1.json +2 -0
- package/contracts/published-contract-catalog.v1.json +10 -0
- package/contracts/runtime-command-surface.v1.json +47 -2
- package/contracts/workspace-activity-event.v1.json +132 -0
- package/contracts/workspace-intelligence/agent-bootstrap-receipt.v1.json +17 -0
- package/contracts/workspace-intelligence/mcp-design.v1.json +49 -2
- package/contracts/workspace-intelligence/project-agent-entry.v1.json +3 -0
- package/contracts/workspace-intelligence/project-context-agent.v1.json +49 -7
- package/contracts/workspace-intelligence/project-knowledge-graph-reference.v1.json +51 -0
- package/contracts/workspace-intelligence/workspace-knowledge-graph.v1.json +97 -2
- package/contracts/workspace-intelligence/workspace-skills-index.v1.json +34 -0
- package/dist/analyze-UJQWGNM2.js +1 -0
- package/dist/{artifact-remediation-plan-XIQNI35L.js → artifact-remediation-plan-M2XBS2IU.js} +1 -1
- package/dist/autopilot-release-U6F4M2BQ.js +1 -0
- package/dist/capabilities-command-XUKPO25Z.js +1 -0
- package/dist/chunk-2LIVMG5C.js +2 -0
- package/dist/{chunk-XGE2FDI4.js → chunk-2PACEMNE.js} +1 -1
- package/dist/chunk-334J2KIP.js +7 -0
- package/dist/{chunk-6TBTMWNA.js → chunk-3H5ACWWZ.js} +1 -1
- package/dist/{chunk-HCFWT42C.js → chunk-3NM3JAZW.js} +1 -1
- package/dist/chunk-4XEH3WNV.js +13 -0
- package/dist/chunk-5OA33JH2.js +2 -0
- package/dist/chunk-5TY74LLW.js +2 -0
- package/dist/{chunk-QCKWQFCD.js → chunk-5U4L6VF2.js} +1 -1
- package/dist/{chunk-W6FHVXNL.js → chunk-5XGR3LRI.js} +1 -1
- package/dist/{chunk-KTN2ARZJ.js → chunk-6JX56VAL.js} +3 -3
- package/dist/chunk-6UNATTB7.js +1 -0
- package/dist/{chunk-J3X56S7L.js → chunk-727IQFGN.js} +1 -1
- package/dist/chunk-7FF5EOIO.js +2 -0
- package/dist/{chunk-D5YJOQYK.js → chunk-AP4PV6WJ.js} +1 -1
- package/dist/chunk-AXUA7PFV.js +2 -0
- package/dist/chunk-B4IVVTMQ.js +2 -0
- package/dist/{chunk-LNXIMF3O.js → chunk-C4S22E6S.js} +1 -1
- package/dist/{chunk-PXWKMPPI.js → chunk-D4UHRJAP.js} +1 -1
- package/dist/chunk-DUBOKZMA.js +49 -0
- package/dist/{chunk-VYDURWN7.js → chunk-ECLMYTWT.js} +1 -1
- package/dist/{chunk-2RL6RRT2.js → chunk-EHH4SKVH.js} +50 -50
- package/dist/chunk-EP4CUWOO.js +9 -0
- package/dist/chunk-FY4X2VOE.js +39 -0
- package/dist/chunk-GAYK3WGV.js +2 -0
- package/dist/{chunk-YUGKQ44M.js → chunk-H5RJCS5E.js} +1 -1
- package/dist/{chunk-YN5X2FTP.js → chunk-H7MRINGP.js} +1 -1
- package/dist/chunk-HJLGXFMK.js +1 -0
- package/dist/{chunk-VRGEPPUB.js → chunk-HLWDIIWL.js} +1 -1
- package/dist/{chunk-HDNATYW7.js → chunk-IIFFEEMX.js} +1 -1
- package/dist/chunk-IVF6NEHS.js +1 -0
- package/dist/chunk-JC4XSU7G.js +1 -0
- package/dist/chunk-JRP6WP5C.js +681 -0
- package/dist/chunk-JZJBA2V2.js +1 -0
- package/dist/{chunk-N4QQADXX.js → chunk-L5CCIIF2.js} +1 -1
- package/dist/chunk-L5Q2S5GY.js +3 -0
- package/dist/chunk-LPCZHKD5.js +1 -0
- package/dist/chunk-MZ7U4BIQ.js +157 -0
- package/dist/chunk-NMXGSVMD.js +1 -0
- package/dist/{chunk-GQSRNUCU.js → chunk-NVND4727.js} +3 -3
- package/dist/chunk-O37UBRMX.js +4 -0
- package/dist/chunk-OI2VOU6S.js +1 -0
- package/dist/chunk-PD7Y6HIM.js +2 -0
- package/dist/chunk-PJPS7CNH.js +1 -0
- package/dist/chunk-QGAPGZPL.js +97 -0
- package/dist/chunk-R2M5OJOK.js +5 -0
- package/dist/chunk-SX6A656X.js +1 -0
- package/dist/{chunk-X6TNBARH.js → chunk-TABXSDTR.js} +2 -2
- package/dist/chunk-TTHO4MFC.js +2 -0
- package/dist/chunk-U5ENEDJA.js +7 -0
- package/dist/chunk-UOCERSAN.js +1 -0
- package/dist/chunk-UPIPSSXY.js +1 -0
- package/dist/chunk-UTV4DTNM.js +1 -0
- package/dist/chunk-VA5VSOBL.js +2 -0
- package/dist/chunk-VQOWB26M.js +12 -0
- package/dist/chunk-VQZ5PI5J.js +1 -0
- package/dist/chunk-WTWRSEOW.js +1 -0
- package/dist/{chunk-D65FCQIO.js → chunk-XESFJN52.js} +1 -1
- package/dist/{chunk-YYQEWAES.js → chunk-XQFWUM2P.js} +1 -1
- package/dist/chunk-XWKGZRHN.js +1 -0
- package/dist/{chunk-WRQWVSBJ.js → chunk-YX5VWPR5.js} +1 -1
- package/dist/chunk-ZQH2I5RQ.js +1 -0
- package/dist/{create-ALT2ME6H.js → create-SOLLXXAB.js} +1 -1
- package/dist/{demo-kit-QHIDCSBI.js → demo-kit-5UQH2OXC.js} +1 -1
- package/dist/{doctor-RW4R3O5C.js → doctor-NQ5PUCUP.js} +1 -1
- package/dist/{dotnet-webapi-clean-AVHPJG7Y.js → dotnet-webapi-clean-YEHYIGOT.js} +1 -1
- package/dist/{goal-lifecycle-VYOKS6E6.js → goal-lifecycle-IPNY7KNR.js} +1 -1
- package/dist/goal-pack-2WV3EA4Y.js +1 -0
- package/dist/{gofiber-standard-47S2GYAO.js → gofiber-standard-C44IIQYH.js} +1 -1
- package/dist/{gogin-standard-EWB4XNOI.js → gogin-standard-X7VKACVR.js} +1 -1
- package/dist/index.d.ts +8 -2
- package/dist/index.js +170 -170
- package/dist/live-command-Q6E45N7S.js +18 -0
- package/dist/{pipeline-U4N2DVD7.js → pipeline-MIMENSI7.js} +1 -1
- package/dist/{project-agent-entry-YAQCHIMP.js → project-agent-entry-OWLJ3IHQ.js} +1 -1
- package/dist/project-intelligence-lens-I67EO6AE.js +1 -0
- package/dist/{project-test-coverage-4S7MEQ6T.js → project-test-coverage-OPDVSFPH.js} +1 -1
- package/dist/{pythonRapidkitExec-VAW5XE4Z.js → pythonRapidkitExec-44ORGQ4R.js} +1 -1
- package/dist/{rust-axum-M5X4ZC4Z.js → rust-axum-JKZTZDRZ.js} +1 -1
- package/dist/{springboot-standard-Y5ADLZMQ.js → springboot-standard-PI4FLTAN.js} +1 -1
- package/dist/verified-goal-46JWNCDY.js +1 -0
- package/dist/{workspace-HGUZWNAB.js → workspace-KO37XHF6.js} +1 -1
- package/dist/{workspace-agent-sync-GEN3KBAX.js → workspace-agent-sync-32FIJQBH.js} +1 -1
- package/dist/{workspace-archive-ZBCKJHXS.js → workspace-archive-6R5DRNZW.js} +1 -1
- package/dist/{workspace-context-4WIWFW26.js → workspace-context-JKRPX775.js} +1 -1
- package/dist/{workspace-contract-7DXK4GF5.js → workspace-contract-4T3NYNK5.js} +1 -1
- package/dist/workspace-explain-MOGL4GEA.js +1 -0
- package/dist/workspace-explain-contract-W2E6LF4Q.js +1 -0
- package/dist/{workspace-feedback-RQ4TGJW6.js → workspace-feedback-6VQ7T4CR.js} +1 -1
- package/dist/{workspace-foundation-J3NNRMI3.js → workspace-foundation-GHWO3BZU.js} +1 -1
- package/dist/{workspace-graph-stream-PQI7OGCE.js → workspace-graph-stream-PTVS47NJ.js} +1 -1
- package/dist/workspace-graph-token-efficiency-Z5JD5NHI.js +1 -0
- package/dist/{workspace-history-SYCDK7FO.js → workspace-history-M2K4M2JY.js} +1 -1
- package/dist/{workspace-intelligence-6FS26JOQ.js → workspace-intelligence-PJIPTXL3.js} +1 -1
- package/dist/{workspace-intelligence-evaluation-CQDKOYZZ.js → workspace-intelligence-evaluation-GONCRE6O.js} +1 -1
- package/dist/{workspace-intelligence-runner-XYUPCSLN.js → workspace-intelligence-runner-M47QR3JM.js} +1 -1
- package/dist/{workspace-intelligence-runtime-registry-IW6J53LO.js → workspace-intelligence-runtime-registry-FFGQF4A7.js} +1 -1
- package/dist/workspace-knowledge-graph-V2EAYDCL.js +1 -0
- package/dist/{workspace-knowledge-graph-contract-L3CLAM2M.js → workspace-knowledge-graph-contract-VANN7RCA.js} +1 -1
- package/dist/{workspace-knowledge-graph-query-FZXSPWGK.js → workspace-knowledge-graph-query-RASPF7FS.js} +1 -1
- package/dist/workspace-knowledge-graph-snapshot-5YIG6EMG.js +1 -0
- package/dist/{workspace-marker-7NHMDIRL.js → workspace-marker-XGAWZZDX.js} +1 -1
- package/dist/workspace-mcp-serve-YRORNE4P.js +3 -0
- package/dist/workspace-model-VSVKLX7M.js +1 -0
- package/dist/{workspace-onboarding-X3PWRIIS.js → workspace-onboarding-2VMJZVLZ.js} +1 -1
- package/dist/{workspace-python-engine-state-J4QKW55K.js → workspace-python-engine-state-BE4A3BL5.js} +1 -1
- package/dist/{workspace-readme-G7TZ3V5T.js → workspace-readme-6X3GLTBM.js} +2 -2
- package/dist/{workspace-registry-summary-LJN4WHIZ.js → workspace-registry-summary-QVSJKKTX.js} +1 -1
- package/dist/workspace-repair-engine-WSKV3Q4V.js +3 -0
- package/dist/workspace-run-3BXKTLVL.js +1 -0
- package/dist/{workspace-verify-USRRIM2F.js → workspace-verify-EJCSOBIK.js} +1 -1
- package/dist/{workspace-watch-43YZPLF7.js → workspace-watch-JTIFBF4Z.js} +1 -1
- package/docs/SETUP.md +10 -0
- package/docs/agent-entry.md +22 -7
- package/docs/ci-workflows.md +1 -1
- package/docs/commands-reference.md +41 -7
- package/docs/contracts/ARTIFACT_CATALOG.md +63 -44
- package/docs/contracts/COMMAND_OWNERSHIP_MATRIX.md +1 -0
- package/docs/contracts/NAMING_AND_COEXISTENCE.md +20 -18
- package/docs/contracts/README.md +4 -3
- package/docs/real-world-qualification.md +19 -3
- package/docs/workspace-knowledge-graph.md +95 -27
- package/docs/workspace-live-activity.md +199 -0
- package/docs/workspace-operations.md +32 -9
- package/package.json +1 -1
- package/dist/analyze-5PDVWECJ.js +0 -1
- package/dist/autopilot-release-JVIJCTKX.js +0 -1
- package/dist/capabilities-command-LHM3XIS6.js +0 -1
- package/dist/chunk-2647BYBC.js +0 -1
- package/dist/chunk-27UR373Z.js +0 -1
- package/dist/chunk-2C5ZBVBI.js +0 -2
- package/dist/chunk-6JWNDWOA.js +0 -1
- package/dist/chunk-CCDGHPEJ.js +0 -2
- package/dist/chunk-DFG33SBR.js +0 -2
- package/dist/chunk-FY4IIAIF.js +0 -1
- package/dist/chunk-HEZZ72V4.js +0 -94
- package/dist/chunk-HN7P4T3B.js +0 -681
- package/dist/chunk-ILIBOMYL.js +0 -1
- package/dist/chunk-J7QYANXK.js +0 -8
- package/dist/chunk-JD3A5QM6.js +0 -2
- package/dist/chunk-JQLJBK5N.js +0 -1
- package/dist/chunk-KLSSPJTV.js +0 -1
- package/dist/chunk-L22EABIC.js +0 -7
- package/dist/chunk-MDTI3UEB.js +0 -1
- package/dist/chunk-MOSXTVPU.js +0 -1
- package/dist/chunk-MYJQGGIU.js +0 -5
- package/dist/chunk-NOV6723U.js +0 -1
- package/dist/chunk-NYEAMMUL.js +0 -1
- package/dist/chunk-NZ3WZYD5.js +0 -1
- package/dist/chunk-O5B2L3R2.js +0 -1
- package/dist/chunk-OWB5KWSS.js +0 -13
- package/dist/chunk-P5PSZQPB.js +0 -2
- package/dist/chunk-QI3HG6IG.js +0 -144
- package/dist/chunk-SWGSFLTC.js +0 -1
- package/dist/chunk-THIOE2PB.js +0 -2
- package/dist/chunk-U5FCQTVL.js +0 -4
- package/dist/chunk-UXEO5QCF.js +0 -33
- package/dist/chunk-VR6XMUF3.js +0 -2
- package/dist/chunk-VVJK5NFY.js +0 -2
- package/dist/chunk-VXKWWX7S.js +0 -8
- package/dist/chunk-W322YDHS.js +0 -49
- package/dist/chunk-WPRLXKWC.js +0 -8
- package/dist/chunk-Y5YAP4F3.js +0 -2
- package/dist/chunk-YOCN7GF4.js +0 -1
- package/dist/goal-pack-YWPI43QL.js +0 -1
- package/dist/project-intelligence-lens-MRQR2LQW.js +0 -1
- package/dist/verified-goal-WM34TTGE.js +0 -1
- package/dist/workspace-explain-TE2LGOAV.js +0 -1
- package/dist/workspace-explain-contract-V2IVSROX.js +0 -1
- package/dist/workspace-graph-token-efficiency-2I4X374C.js +0 -1
- package/dist/workspace-knowledge-graph-SWCKDTPF.js +0 -1
- package/dist/workspace-knowledge-graph-snapshot-M572JRB4.js +0 -1
- package/dist/workspace-mcp-serve-IBMTFQDY.js +0 -3
- package/dist/workspace-model-ZL6WCICX.js +0 -1
- package/dist/workspace-repair-engine-NX7I632M.js +0 -3
- package/dist/workspace-run-6GT5OBQ5.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
export{b as buildWorkspaceManifest,f as createProject,a as initializeStandaloneGitRepository,g as registerWorkspaceAtPath,d as resolvePythonFreeFallbackProfile,c as syncWorkspaceFoundationFiles,e as writeWorkspaceLauncher}from'./chunk-
|
|
1
|
+
export{b as buildWorkspaceManifest,f as createProject,a as initializeStandaloneGitRepository,g as registerWorkspaceAtPath,d as resolvePythonFreeFallbackProfile,c as syncWorkspaceFoundationFiles,e as writeWorkspaceLauncher}from'./chunk-JRP6WP5C.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {h as h$1}from'./chunk-
|
|
1
|
+
import {h as h$1}from'./chunk-TABXSDTR.js';import {b,a as a$1}from'./chunk-TQEMLBAG.js';import {promises}from'fs';import a from'path';import T from'nunjucks';import e from'chalk';import h from'ora';import {fileURLToPath}from'url';import {execa}from'execa';import G from'crypto';var J=fileURLToPath(import.meta.url),M=a.dirname(J);function O(t=32){let i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",x=G.randomBytes(t),o="";for(let p=0;p<t;p++)o+=i[x[p]%i.length];return o}async function te(t,i){let o=(i.template||"fastapi")==="fastapi",p=o?"FastAPI":"NestJS",d=i.kit_name||(o?"fastapi.standard":"nestjs.standard"),D=d.replace(".","/"),$=h(`Generating ${p} project...`).start();try{let w=a.resolve(M,".."),m;d==="fastapi.ddd"?m="fastapi-ddd":d.startsWith("fastapi")?m="fastapi-standard":m="nestjs-standard";let f=a.join(w,"templates","kits",m),S=T.configure(f,{autoescape:false,trimBlocks:true,lstripBlocks:true});S.addFilter("generate_secret",function(n,r=32){return O(r)});let F={project_name:i.project_name,author:i.author||"Workspai User",description:i.description||(o?"FastAPI service generated with Workspai":"NestJS application generated with Workspai"),app_version:i.app_version||"0.1.0",license:i.license||"MIT",package_manager:i.package_manager||"npm",node_version:i.node_version||"20.0.0",database_type:i.database_type||"postgresql",include_caching:i.include_caching||false,created_at:new Date().toISOString(),workspai_version:h$1(),rapidkit_version:h$1()},y;o?y=["src/main.py.j2","src/__init__.py.j2","src/cli.py.j2","src/routing/__init__.py.j2","src/routing/health.py.j2","src/routing/examples.py.j2","src/modules/__init__.py.j2","tests/__init__.py.j2","tests/test_health.py.j2","tests/test_examples.py.j2","README.md.j2","pyproject.toml.j2","Makefile.j2","env.example.j2","rapidkit.j2","rapidkit.cmd.j2"]:y=["src/main.ts.j2","src/app.module.ts.j2","src/app.controller.ts.j2","src/app.service.ts.j2","src/config/configuration.ts.j2","src/config/validation.ts.j2","src/config/index.ts.j2","src/modules/index.ts.j2","src/examples/examples.module.ts.j2","src/examples/examples.controller.ts.j2","src/examples/examples.service.ts.j2","src/examples/dto/create-note.dto.ts.j2","test/app.controller.spec.ts.j2","test/examples.controller.spec.ts.j2","test/app.e2e-spec.ts.j2","test/jest-e2e.json.j2","package.json.j2","tsconfig.json.j2","tsconfig.build.json.j2","nest-cli.json.j2","jest.config.ts.j2","eslint.config.cjs.j2","env.example.j2","docker-compose.yml.j2","Dockerfile.j2","README.md.j2","rapidkit.j2","rapidkit.cmd.j2"];for(let n of y){let r=a.join(f,n);try{await promises.access(r);}catch{continue}let _=await promises.readFile(r,"utf-8"),g;try{g=S.renderString(_,F);}catch(W){throw console.error(`Failed to render template: ${n}`),W}let c=n==="env.example.j2"?".env.example":n.replace(/\.j2$/,""),v=a.join(t,c);await promises.mkdir(a.dirname(v),{recursive:true}),await promises.writeFile(v,g),(c.endsWith(".workspai/rapidkit")||c.endsWith(".workspai/cli.py")||c.endsWith(".workspai/activate")||c.endsWith(".rapidkit/rapidkit")||c.endsWith(".rapidkit/cli.py")||c.endsWith(".rapidkit/activate")||c==="rapidkit")&&await promises.chmod(v,493);}if(o){let n=a.join(f,".rapidkit","context.json"),r=a.join(t,".workspai","context.json");try{await promises.mkdir(a.join(t,".workspai"),{recursive:true}),await promises.copyFile(n,r);}catch{await promises.mkdir(a.join(t,".workspai"),{recursive:true});let g=i.engine||"pip";await promises.writeFile(r,JSON.stringify({engine:g,created_by:"workspai-cli-fallback",legacyCreatedBy:"rapidkit-npm-fallback"},null,2));}}let I=a.join(t,".workspai");await promises.mkdir(I,{recursive:true});let R=a.join(I,"project.json"),C={kit_name:d,profile:D,created_at:new Date().toISOString(),created_by:"workspai-cli-fallback",workspai_version:h$1(),rapidkit_version:h$1(),runtime:o?"python":"node"},P=JSON.stringify(C,null,2);await promises.writeFile(R,P,"utf-8");let j=a.join(t,"rapidkit");await promises.access(j).then(()=>true).catch(()=>false)||(await promises.writeFile(j,`#!/usr/bin/env bash
|
|
2
2
|
set -euo pipefail
|
|
3
3
|
SCRIPT_DIR="$(cd "$(dirname "\${BASH_SOURCE[0]}")" && pwd)"
|
|
4
4
|
cd "$SCRIPT_DIR"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as DOCTOR_WORKSPACE_REPORT_PATH,n as applyEnvKeyAddFix,j as applyFileAppendFix,k as applyFileCopyFix,i as applyFileCreateFix,m as applyJsonEditFix,o as applyMakefileTargetFix,h as applyPackageScriptFix,f as assertOperationPathInsideProject,g as assertOperationPathInsideProjectResolved,e as buildRepairOperationIdentity,q as computeDoctorFixAwareExitCode,p as computeDoctorGateExitCode,l as decodeJsonPointerSegment,d as parseInternalRepairCommand,c as parsePackageScriptFix,b as resolveDoctorPolicyProfile,r as runDoctor}from'./chunk-
|
|
1
|
+
export{a as DOCTOR_WORKSPACE_REPORT_PATH,n as applyEnvKeyAddFix,j as applyFileAppendFix,k as applyFileCopyFix,i as applyFileCreateFix,m as applyJsonEditFix,o as applyMakefileTargetFix,h as applyPackageScriptFix,f as assertOperationPathInsideProject,g as assertOperationPathInsideProjectResolved,e as buildRepairOperationIdentity,q as computeDoctorFixAwareExitCode,p as computeDoctorGateExitCode,l as decodeJsonPointerSegment,d as parseInternalRepairCommand,c as parsePackageScriptFix,b as resolveDoctorPolicyProfile,r as runDoctor}from'./chunk-QGAPGZPL.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {b as b$1,c}from'./chunk-IBJEQHJR.js';import {h as h$1}from'./chunk-
|
|
1
|
+
import {b as b$1,c}from'./chunk-IBJEQHJR.js';import {h as h$1}from'./chunk-TABXSDTR.js';import {b as b$2,a}from'./chunk-TQEMLBAG.js';import {promises}from'fs';import o from'path';import i from'chalk';import S from'ora';import {execa}from'execa';var b="net8.0",j="8080";function y(e){return e.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").replace(/-{2,}/g,"-")}function E(e,r){return e.trim().replace(/[^A-Za-z0-9_.]+/g,".").replace(/^\.+|\.+$/g,"").replace(/\.{2,}/g,".").split(".").map(a=>a.replace(/^[^A-Za-z_]+/,"").replace(/[^A-Za-z0-9_]/g,"")).filter(Boolean).join(".")||r}function _(e,r){return e.replace(/[\r\n\t]+/g," ").trim()||r}function D(e){return e.trim()===b}function $(){return JSON.stringify({engine:"npm",runtime:"dotnet"},null,2)}function I(e,r){return JSON.stringify({kit_name:"dotnet.webapi.clean",runtime:"dotnet",framework:"dotnet",module_support:false,project_name:e.project_name,root_namespace:e.root_namespace,target_framework:e.target_framework,app_version:e.app_version,created_by:"workspai",workspai_version:r,rapidkit_version:r,created_at:new Date().toISOString()},null,2)}function P(e){return `<Project Sdk="Microsoft.NET.Sdk.Web">
|
|
2
2
|
<PropertyGroup>
|
|
3
3
|
<TargetFramework>${e.target_framework}</TargetFramework>
|
|
4
4
|
<Nullable>enable</Nullable>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{f as GOAL_INDEX_PATH,e as GOAL_INDEX_SCHEMA_VERSION,k as buildGoalLifecycleResult,l as inspectGoalLifecycle,p as linkGoalRepairTransaction,n as prepareGoalVerification,m as transitionGoalLifecycle,o as verifyGoalLifecycle}from'./chunk-
|
|
1
|
+
export{f as GOAL_INDEX_PATH,e as GOAL_INDEX_SCHEMA_VERSION,k as buildGoalLifecycleResult,l as inspectGoalLifecycle,p as linkGoalRepairTransaction,n as prepareGoalVerification,m as transitionGoalLifecycle,o as verifyGoalLifecycle}from'./chunk-HJLGXFMK.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {c}from'./chunk-OI2VOU6S.js';import {c as c$4}from'./chunk-WTWRSEOW.js';import {j,i,d as d$1,f as f$2,c as c$3,e as e$1,h}from'./chunk-HJLGXFMK.js';export{b as GOAL_AGENT_HANDOFF_SCHEMA_VERSION,f as GOAL_INDEX_PATH,e as GOAL_INDEX_SCHEMA_VERSION,g as GOAL_LIFECYCLE_RESULT_SCHEMA_VERSION,d as GOAL_PACK_LAST_RUN_PATH,a as GOAL_PACK_SCHEMA_VERSION,c as GOAL_PLAN_RESULT_SCHEMA_VERSION}from'./chunk-HJLGXFMK.js';import {f as f$3}from'./chunk-JC4XSU7G.js';import {b}from'./chunk-334J2KIP.js';import {a as a$1}from'./chunk-UPIPSSXY.js';import {b as b$1}from'./chunk-VQOWB26M.js';import {c as c$2,f as f$1}from'./chunk-GAYK3WGV.js';import {a}from'./chunk-AFIFZTOY.js';import {d,c as c$1}from'./chunk-EWZZUQBR.js';import {f,e}from'./chunk-6UNATTB7.js';import C from'path';import _ from'fs-extra';var ve=/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]/,ye=/(?:^|\s)(?:\/(?:home|Users|private|var|tmp|mnt|opt|srv|root|workspace|workspaces|data|Volumes|etc|usr|run|dev|proc|sys)\/[^\s]+|[A-Za-z]:[\\/][^\s]+|\\\\[^\\\s]+\\[^\s]+)/,Pe=/(?:-----BEGIN (?:RSA |EC |OPENSSH )?PRIVATE KEY-----|\b(?:github_pat_|gh[pousr]_|glpat-|npm_|xox[baprs]-|sk-(?:proj-)?)[A-Za-z0-9_-]{12,}|\b(?:AKIA|ASIA)[A-Z0-9]{16}\b|\bAIza[A-Za-z0-9_-]{20,}|\bBearer\s+[A-Za-z0-9._~+/-]{16,}|[a-z][a-z0-9+.-]*:\/\/[^\s:/]+:[^\s@/]+@|\b(?:password|passwd|secret|token|api[_-]?key)\s*[:=]\s*[^\s]{6,})/i,je=[{category:"test-coverage",patterns:[/\b(?:test\s+)?coverage\b/i,/\bcoverage\s+(?:to|above|at least)\b/i]},{category:"dependency-security",patterns:[/\b(?:dependency|dependencies|package|packages)\b.*\b(?:security|vulnerab|audit)\b/i,/\b(?:security|vulnerab|audit)\b.*\b(?:dependency|dependencies|package|packages)\b/i]},{category:"release-readiness",patterns:[/\brelease[ -]readiness\b/i,/\bready (?:this |the )?(?:workspace|project) for release\b/i,/\bprepare (?:this |the )?(?:workspace|project) for release\b/i,/\bprepare\b[^\n]{0,80}\bfor release\b/i]},{category:"defect-repair",patterns:[/\b(?:fix|repair|resolve|debug)\b.*\b(?:bug|error|failure|issue|regression)\b/i]},{category:"performance",patterns:[/\b(?:performance|latency|throughput|cpu|optimi[sz]e|faster|slower)\b/i,/\b(?:memory\s+(?:allocation|consumption|footprint|leak|pressure|usage)|out[ -]of[ -]memory|heap|ram)\b/i]},{category:"refactor",patterns:[/\b(?:refactor|restructure|decouple|extract|simplify|cleanup|clean up)\b/i]},{category:"documentation",patterns:[/\b(?:document|documentation|readme|guide|tutorial|docs)\b/i]},{category:"feature-change",patterns:[/\b(?:add|build|create|enforce|enhance|harden|implement|improve|introduce|support)\b/i]},{category:"system-understanding",patterns:[/\b(?:understand|explain|map|find|where|how|architecture|analy[sz]e|search)\b/i]}];function Ge(e){if(typeof e!="string")throw new Error("Goal intent must be text.");let t=e.trim().replace(/\s+/g," ");if(!t)throw new Error("Goal intent cannot be empty.");if(t.length>2e3)throw new Error("Goal intent exceeds the 2000 character safety limit.");if(ve.test(t))throw new Error("Goal intent contains unsupported control characters.");if(ye.test(t))throw new Error("Goal intent contains a machine-local absolute path. Use a workspace-relative path or project scope.");if(Pe.test(t))throw new Error("Goal intent appears to contain secret material and was not persisted.");return t}function Ce(e){let t=e.match(/\b(?:coverage\D{0,24})?((?:100(?:\.0+)?|\d{1,2}(?:\.\d+)?))\s*(?:%|percent(?:age)?(?:\s+points?)?)/i);if(!t||!/coverage/i.test(e))return null;let n=Number(t[1]);return Number.isFinite(n)&&n>=0&&n<=100?n:null}var ne=[{runtime:"cpp",patterns:[/\bc\+\+/i,/\bcpp\b/i]},{runtime:"dotnet",patterns:[/\.net\b/i,/\bdotnet\b/i,/\bc#/i,/\bcsharp\b/i]},{runtime:"node",patterns:[/\bnode(?:\.js)?\b/i,/\btypescript\b/i,/\bjavascript\b/i,/\b(?:js|ts)\b/i]},{runtime:"python",patterns:[/\bpython\b/i,/\bpytest\b/i]},{runtime:"go",patterns:[/\bgolang\b/i,/\bgo(?:\s+(?:test|coverage|tests))\b/i]},{runtime:"java",patterns:[/\bjava\b/i,/\bjunit\b/i,/\bjacoco\b/i]},{runtime:"rust",patterns:[/\brust\b/i,/\bcargo\b/i]},{runtime:"php",patterns:[/\bphp\b/i,/\bphpunit\b/i]},{runtime:"ruby",patterns:[/\bruby\b/i,/\brspec\b/i]},{runtime:"kotlin",patterns:[/\bkotlin\b/i]},{runtime:"scala",patterns:[/\bscala\b/i]},{runtime:"clojure",patterns:[/\bclojure\b/i]},{runtime:"elixir",patterns:[/\belixir\b/i]},{runtime:"deno",patterns:[/\bdeno\b/i]},{runtime:"bun",patterns:[/\bbun\b/i]},{runtime:"c",patterns:[/\bc(?:\s+(?:test|coverage|tests|code))\b/i]}];function Ae(e){return ne.filter(t=>t.patterns.some(n=>n.test(e))).map(t=>t.runtime)}function K(e,t={}){let n=Ge(e),r=je.filter(u=>u.patterns.some(j=>j.test(n))).map(u=>u.category),a=r.some(u=>u!=="feature-change")?r.filter(u=>u!=="feature-change"):r,s=a[0]??"feature-change",l=Ce(n),d=Ae(n),p=d.length===0&&t.selectedCoverageRuntime?[t.selectedCoverageRuntime]:d,m=[...new Set((t.availableCoverageRuntimes??[]).filter(u=>ne.some(j=>j.runtime===u)))].sort(),b=[];return a.length>1&&a[0]!=="test-coverage"&&b.push(`The intent also contains signals for: ${a.slice(1).join(", ")}.`),s==="test-coverage"&&l===null&&b.push("A numeric test coverage target is required for machine verification."),s==="test-coverage"&&p.length>1&&b.push(`The Goal names multiple coverage runtimes: ${p.join(", ")}. Select one runtime per Goal.`),s==="test-coverage"&&p.length===0&&m.length>1&&b.push(`Coverage scope is ambiguous across detected runtimes: ${m.join(", ")}. Name one runtime or language in the Goal.`),s==="test-coverage"&&p.length===1&&m.length>0&&!m.includes(p[0])&&b.push(`The requested ${p[0]} coverage runtime is not present in the selected scope. Detected runtimes: ${m.join(", ")}.`),{original:n,normalized:n.toLocaleLowerCase("en-US"),statement:n.replace(/[.!?]+$/,""),category:s,confidence:a.length===1?"high":a.length>1?"medium":"low",ambiguities:b,...l===null?{}:{requestedTarget:{metric:"test-coverage-percent",operator:"at-least",value:l,...p.length===1?{runtime:p[0]}:{}}}}}function oe(e){let t={"test-coverage":["test suite coverage configuration instrumentation","CI tests LCOV Cobertura JaCoCo LLVM coverage"],"dependency-security":["dependency manifest lockfile security audit vulnerability"],"release-readiness":["release pipeline readiness gates build test deploy"],"defect-repair":["failure error test implementation call path"],"feature-change":["API implementation module dependency tests"],refactor:["module dependency ownership implementation tests"],performance:["performance benchmark latency throughput runtime"],documentation:["documentation README guide architecture decision"],"system-understanding":["architecture service API dependency ownership"]};return [...new Set([e.statement,...t[e.category]])].slice(0,3)}var ae="contracts/workspace-intelligence/goal-pack.v1.json",se="contracts/workspace-intelligence/goal-agent-handoff.v1.json",Re="contracts/workspace-intelligence/goal-plan-result.v1.json",pe="contracts/workspace-intelligence/goal-index.v1.json",ue=new Set(["node","bun","deno","python","go","java","dotnet","rust","php","ruby","elixir","clojure","scala","kotlin","c","cpp"]);function Se(e,t){let n=e.match(/[A-Za-z0-9][A-Za-z0-9+#.%_-]*/g)??[],r=new Set(t.map(m=>m.toLocaleLowerCase("en-US").replace(/[^a-z0-9]/g,"")).filter(Boolean)),a=[];for(let m=0;m<n.length;){let b=0;for(let u=Math.min(4,n.length-m);u>=1;u-=1){let j=n.slice(m,m+u).join("").toLocaleLowerCase("en-US").replace(/[^a-z0-9]/g,"");if(r.has(j)){b=u;break}}if(b>0){m+=b;continue}a.push(n[m]),m+=1;}let s=a.findIndex((m,b)=>{let u=m.toLocaleLowerCase("en-US"),j=a[b+1]?.toLocaleLowerCase("en-US");return u==="without"&&["breaking","changing","modifying","removing"].includes(j??"")||u==="while"&&["keeping","maintaining","preserving"].includes(j??"")}),l=s>=2?a.slice(0,s):a,d=l.length>=2?l.join(" "):e;if(s<2)return [d];let p=a.slice(s).filter(m=>!["without","while","breaking","changing","modifying","removing","keeping","maintaining","preserving"].includes(m.toLocaleLowerCase("en-US")));return p.length>0?[d,p.join(" ")]:[d]}function ie(e){return e.split(C.sep).join("/")}function V(e,t){return C.resolve(t.absolutePath??C.join(e,t.path))}function ce(e){let t=e.requested.trim().replace(/^project:/,"");if(!t)throw new Error("Project goal scope must name a project.");let n=C.isAbsolute(t)?C.resolve(t):null,r=e.model.projects.filter(a=>a.name===t||ie(a.path)===ie(t)||n!==null&&V(e.workspacePath,a)===n);if(r.length!==1)throw new Error(r.length===0?`Project goal scope was not found in the canonical model: ${t}`:`Project goal scope is ambiguous in the canonical model: ${t}`);return r[0]}async function Ee(e){let t=await a$1(e);if(t.status==="miss")throw new Error(`Canonical model and live graph evidence are required (${t.reason}). Run \`workspai workspace intelligence run --for-agent generic --strict --json\` or retry with --refresh.`);let{model:n,graph:r}=t;return a(n,"contracts/workspace-intelligence/workspace-model.v1.json","Goal source model"),a(r,"contracts/workspace-intelligence/workspace-knowledge-graph.v1.json","Goal source graph"),b$1(r,n),{model:n,graph:r}}function le(e){let t=e.scope.trim();if(t==="workspace")return {kind:"workspace",projects:e.model.projects.map(r=>r.name).sort(),selectionSource:e.selectionSource,resolution:"selected"};let n=t.startsWith("projects:")?"projects:":t.startsWith("project:")&&t.slice(8).includes(",")?"project:":null;if(n){let r=t.slice(n.length).split(",").map(l=>l.trim()).filter(Boolean);if(r.length<2)throw new Error("A project-set Goal scope must name at least two projects.");let a=r.map(l=>ce({workspacePath:e.workspacePath,model:e.model,requested:l})),s=[...new Set(a.map(l=>l.name))].sort();if(s.length!==r.length)throw new Error("A project-set Goal scope must not contain duplicate projects.");return {kind:"project-set",projects:s,selectionSource:e.selectionSource,resolution:"selected"}}if(t)return {kind:"project",projects:[ce({workspacePath:e.workspacePath,model:e.model,requested:t}).name],selectionSource:e.selectionSource,resolution:"selected"};throw new Error("Goal scope cannot be empty.")}async function Ie(e){if(e.explicitScope?.trim())return {scope:le({workspacePath:e.workspacePath,model:e.model,scope:e.explicitScope,selectionSource:"explicit"}),selectionRequired:false};if(e.invocationProjectPath){let t=C.resolve(e.invocationProjectPath),n=e.model.projects.filter(r=>V(e.workspacePath,r)===t);if(n.length!==1)throw new Error("The invocation project is not represented uniquely in the canonical workspace model. Refresh intelligence or pass --scope explicitly.");return {scope:{kind:"project",projects:[n[0].name],selectionSource:"invocation-project",resolution:"selected"},selectionRequired:false}}if(e.model.projects.length===1)return {scope:{kind:"project",projects:[e.model.projects[0].name],selectionSource:"single-project-workspace",resolution:"selected"},selectionRequired:false};if(e.selectScope){let t=await e.selectScope({workspaceName:e.model.workspace.name,projects:e.model.projects.map(r=>({name:r.name,runtime:r.runtime,runtimeCandidates:[...r.runtimeCandidates].sort(),framework:r.framework})).sort((r,a)=>r.name.localeCompare(a.name))}),n=t.kind==="workspace"?"workspace":t.projects.length===1?`project:${t.projects[0]}`:`projects:${t.projects.join(",")}`;return {scope:le({workspacePath:e.workspacePath,model:e.model,scope:n,selectionSource:"interactive"}),selectionRequired:false}}return {scope:{kind:"workspace",projects:e.model.projects.map(t=>t.name).sort(),selectionSource:"workspace",resolution:"selection-required"},selectionRequired:true}}function xe(e,t){if(t.kind==="workspace")return {entities:e.quality.entityCount,relationships:e.quality.relationCount,proofs:e.quality.proofCount,unresolved:e.quality.unknownCount,proofCoveragePercent:Number((e.quality.relationProofCoverageRatio*100).toFixed(2))};let n=new Set(t.projects),r=e.entities.filter(p=>p.projectId!==void 0&&n.has(p.projectId)),a=new Set(r.map(p=>p.id)),s=e.relations.filter(p=>a.has(p.from)||a.has(p.to)),l=new Set([...r.flatMap(p=>p.proofIds),...s.flatMap(p=>p.proofIds)]),d=s.filter(p=>p.proofIds.length>0).length;return {entities:r.length,relationships:s.length,proofs:l.size,unresolved:s.length-d,proofCoveragePercent:s.length===0?100:Number((d/s.length*100).toFixed(2))}}function Te(e){let t=new Map;for(let r of e){let a=t.get(r.kind)??[];a.push(r),t.set(r.kind,a);}let n=[];for(let r=0;[...t.values()].some(a=>r<a.length);r+=1)for(let a of t.values()){let s=a[r];s&&n.push(s);}return n}async function _e(e$1){let t=C.join(e$1.workspacePath,e.intelligenceRun),n=await _.readJson(t).catch(()=>null),a=(Array.isArray(n?.stages)?n.stages:[]).filter(o=>o.status==="blocked"||o.status==="failed").map(o=>String(o.id??"unknown")).sort(),s=n?.status,l={status:s==="passed"?"passed":s==="blocked"||s==="failed"?"blocked":"unknown",artifact:e.intelligenceRun,blockedStages:a},d={status:"not-applicable",runtime:null,runtimeChoices:[],runner:null,existingEvidence:[],prerequisites:[]};if(e$1.intent.category==="test-coverage"){let o=e$1.intent.requestedTarget?.runtime;if(e$1.intent.ambiguities.some(P=>P.startsWith("Coverage scope is ambiguous")||P.startsWith("The Goal names multiple coverage runtimes")||P.startsWith("The selected projects do not share a common canonical coverage runtime")||P.startsWith("The requested ")))d={status:"requires-setup",runtime:o??null,runtimeChoices:e$1.coverageRuntimeChoices,runner:null,existingEvidence:[],prerequisites:["Select exactly one detected runtime or language for this coverage Goal."]};else {let P=o?e$1.projects.filter(c=>c.runtimeCandidates.includes(o)):e$1.projects,i=await Promise.all(P.map(async c=>({project:c,capability:await c$4(V(e$1.workspacePath,c),o??(ue.has(c.runtime)?c.runtime:"unknown"))}))),h=i.map(c=>c.capability.status);d={status:h.includes("unsupported")?"unsupported":h.includes("requires-setup")?"requires-setup":"available",runtime:i.length===1?i[0].capability.runtime:[...new Set(i.map(c=>c.capability.runtime))].join(","),runtimeChoices:e$1.coverageRuntimeChoices,runner:i.length===1?i[0].capability.runner:[...new Set(i.flatMap(c=>c.capability.runner?[c.capability.runner]:[]))].join(",")||null,existingEvidence:i.flatMap(c=>c.capability.existingEvidence.map(A=>({project:c.project.name,...A}))).filter((c,A,w)=>w.findIndex(k=>k.project===c.project&&k.path===c.path&&k.sha256===c.sha256)===A).sort((c,A)=>c.project.localeCompare(A.project)||c.path.localeCompare(A.path)),prerequisites:[...new Set(i.flatMap(c=>c.capability.prerequisites))].sort()};}}let p=oe(e$1.intent),m=[...Se(p[0],e$1.projects.map(o=>o.name)),...p.slice(1)].filter((o,y,P)=>P.indexOf(o)===y).slice(0,3),b=m.map((o,y)=>{let P=o.match(/[A-Za-z0-9][A-Za-z0-9+#.%_-]*/g)?.length??0,i=y===0&&P>=4?2:1,h=e$1.projects.map(w=>{let k=G=>f$3(e$1.graph,{query:o,projectId:w.name,...G?{kind:G}:{},limit:60,relationsPerEntity:0,minimumTermMatches:i}).entities,S=k(),de=[...new Set(e$1.graph.entities.filter(G=>G.projectId===w.name||G.projectId===void 0&&G.identity.scope==="workspace").map(G=>G.kind))].flatMap(G=>k(G).slice(0,8)),U=[...S,...de];return U.filter((G,me)=>U.findIndex(ge=>ge.id===G.id)===me)}),c=[],A=new Set;for(let w=0;h.some(k=>w<k.length);w+=1)for(let k of h){let S=k[w];!S||A.has(S.id)||(A.add(S.id),c.push(S));}return Te(c)}),u={"test-coverage":["test-suite"],"dependency-security":["package","module"],"release-readiness":["pipeline","deployment","lifecycle-stage"],"defect-repair":["test-suite","lifecycle-stage"],"feature-change":["project","runtime-unit","api","package","module","test-suite"],refactor:["package","module","api","test-suite"],performance:["lifecycle-stage","test-suite","pipeline"],documentation:["document","decision"],"system-understanding":["project","service","api","package","protocol"]},j=new Set(e$1.projects.map(o=>o.name)),v=e$1.graph.entities.filter(o=>o.proofIds.length>0&&(!o.projectId||j.has(o.projectId))&&u[e$1.intent.category].includes(o.kind)).sort((o,y)=>u[e$1.intent.category].indexOf(o.kind)-u[e$1.intent.category].indexOf(y.kind)||o.label.localeCompare(y.label)),f=[],M=new Set,E=o=>{!o||f.length>=20||M.has(o.id)||(M.add(o.id),f.push(o));},I=(e$1.intent.statement.match(/[A-Za-z][A-Za-z0-9+#.-]{1,}/g)??[]).length>=2,g=I?b[0]??[]:[];for(let o of g.slice(0,12))E(o);if(!I)for(let o of v)E(o);for(let o=0;f.length<20&&b.slice(1).some(y=>o<y.length);o+=1)for(let y of b.slice(1))E(y[o]);if(I)for(let o of v)E(o);for(let o of g.slice(12))E(o);let x=f.map(o=>({entityId:o.id,kind:o.kind,label:o.label,proofIds:o.proofIds.slice(0,12)})),L=b[0]?.length??0;return {workspaceIntelligence:l,measurement:d,retrieval:{status:I&&L>=3?"grounded":x.length>0?"partial":"empty",strategy:"deterministic-category-v1",queries:m,anchors:x}}}async function Le(e){let t=C.join(e,f$2);if(!await _.pathExists(t))return {schemaVersion:e$1,generatedAt:new Date(0).toISOString(),activeGoalId:null,goals:[]};let n=await _.readJson(t);a(n,pe,"Goal index");try{i(n);}catch(r){let a=h(n);if(!(a!==null&&r instanceof Error&&r.message==="Goal index is inconsistent: activeGoalId must identify the only selected actionable lifecycle entry.")||!a)throw r;return a}return n}function Ne(e,t,n){let r=e.goals.find(l=>l.id===t.id),a=t.state==="ready-to-plan",s={id:t.id,fingerprint:t.fingerprint,objective:t.intent.statement,category:t.intent.category,state:t.state,lifecycle:r?.lifecycle==="cancelled"?"cancelled":a?"active":"planned",scope:t.scope,createdAt:r?.createdAt??t.generatedAt,updatedAt:n,goalPack:t.artifacts.goalPack,agentHandoff:t.artifacts.agentHandoff,...r?.verifiedGoalId?{verifiedGoalId:r.verifiedGoalId}:{},...r?.repairTransactionId?{repairTransactionId:r.repairTransactionId}:{},...r?.repairTransactionIds?{repairTransactionIds:r.repairTransactionIds}:{},...r?.verificationReceipt?{verificationReceipt:r.verificationReceipt}:{}};return {schemaVersion:e$1,generatedAt:n,activeGoalId:s.lifecycle==="active"?t.id:e.activeGoalId===t.id?null:e.activeGoalId,goals:[...e.goals.filter(l=>l.id!==t.id).map(l=>s.lifecycle==="active"&&l.lifecycle==="active"?{...l,lifecycle:"planned",updatedAt:n}:l),s].sort((l,d)=>l.id.localeCompare(d.id))}}async function et(e$1){let t=b({startPath:C.resolve(e$1.startPath),explicitWorkspacePath:e$1.workspacePath,strict:true,requireProjectMembership:true});if(!t)throw new Error("No canonical Workspai workspace could be resolved.");let n=C.resolve(t.workspacePath);e$1.refresh&&await c({workspacePath:n,strict:false,agent:"generic"});let{model:r,graph:a$1}=await Ee(n),s=await Ie({workspacePath:n,invocationProjectPath:t.projectPath,model:r,explicitScope:e$1.scope,selectScope:e$1.selectScope}),l=s.scope,d$2=r.projects.filter(i=>l.projects.includes(i.name));if(d$2.length===0)throw new Error("A Goal Pack requires at least one registered project in its selected scope.");let p=e$1.maxAttempts??5;if(!Number.isInteger(p)||p<1||p>25)throw new Error("--max-attempts must be an integer from 1 to 25.");let m=new Date().toISOString(),b$1=d(r),u=d$2.map(i=>({name:i.name,runtimes:[...new Set(i.runtimeCandidates.filter(h=>ue.has(h)))].sort()})),j$1=[...new Set(u.flatMap(i=>i.runtimes))].sort(),v=u.length<=1?j$1:u[0].runtimes.filter(i=>u.every(h=>h.runtimes.includes(i))),f$3=K(e$1.intent,{availableCoverageRuntimes:v,...e$1.runtime?{selectedCoverageRuntime:e$1.runtime}:v.length===1?{selectedCoverageRuntime:v[0]}:{}});if(e$1.runtime&&!v.includes(e$1.runtime)){let i=e$1.runtime,h=u.filter(c=>!c.runtimes.includes(i)).map(c=>c.name);throw new Error(d$2.length>1&&h.length>0?`--runtime ${e$1.runtime} is not canonical for every project in the selected Goal scope. Missing from: ${h.join(", ")}. Split the projects into runtime-compatible Goal scopes.`:`--runtime ${e$1.runtime} is not present in the canonical Workspace Model for the selected Goal scope. Available runtimes: ${v.join(", ")||"none"}.`)}if(e$1.runtime&&f$3.category!=="test-coverage")throw new Error("--runtime is valid only for a test-coverage Goal.");if(e$1.runtime&&f$3.requestedTarget?.runtime&&f$3.requestedTarget.runtime!==e$1.runtime)throw new Error(`--runtime ${e$1.runtime} conflicts with the ${f$3.requestedTarget.runtime} runtime named in the Goal intent.`);if(!s.selectionRequired&&f$3.category==="test-coverage"&&f$3.requestedTarget&&!f$3.requestedTarget.runtime&&v.length>1&&!e$1.runtime&&e$1.selectCoverageRuntime){let i=await e$1.selectCoverageRuntime({workspaceName:r.workspace.name,scope:l,projects:d$2.map(h=>({name:h.name,runtime:h.runtime,runtimeCandidates:[...h.runtimeCandidates].sort()})),runtimes:v});if(!v.includes(i))throw new Error("The selected coverage runtime is outside the canonical Goal scope.");f$3=K(e$1.intent,{availableCoverageRuntimes:v,selectedCoverageRuntime:i});}!s.selectionRequired&&f$3.category==="test-coverage"&&d$2.length>1&&v.length===0&&(f$3={...f$3,ambiguities:[`The selected projects do not share a common canonical coverage runtime: ${u.map(i=>`${i.name} (${i.runtimes.join(", ")||"none"})`).join("; ")}. Split them into runtime-compatible Goal scopes so every selected project is verified.`,...f$3.ambiguities]}),s.selectionRequired&&(f$3={...f$3,ambiguities:[`Goal scope is unresolved across ${l.projects.length} registered projects: ${l.projects.join(", ")}. Select one project, multiple projects, or the entire workspace.`,...f$3.ambiguities]});let M=await _e({workspacePath:n,projects:d$2,graph:a$1,intent:f$3,coverageRuntimeChoices:v}),E={generatedAt:m,intent:f$3,workspaceName:r.workspace.name,scope:l,sourceBinding:{model:{artifact:e.model,schemaVersion:f.model,hashAlgorithm:"sha256",hashSemantics:"workspace-model-structural-v1",hash:b$1,generatedAt:r.generatedAt},graph:{artifact:e.knowledgeGraph,schemaVersion:f.knowledgeGraph,hashAlgorithm:"sha256",hashSemantics:"canonical-json-v1",hash:c$1(a$1),generatedAt:a$1.generatedAt,modelHash:a$1.source.hash,...a$1.source.inputs?.hash?{inputHash:a$1.source.inputs.hash}:{}}},preflight:M,baseline:{projectCount:d$2.length,runtimes:[...new Set(d$2.flatMap(i=>i.runtimeCandidates))].sort(),frameworks:[...new Set(d$2.map(i=>i.framework))].sort(),graph:xe(a$1,l)},maxAttempts:p,consumer:e$1.consumer??"generic"},I={digestCanonical:c$1},{goalPack:g,handoff:x}=j(E,I);a(g,ae,"Goal Pack"),a(x,se,"Goal agent handoff");let L=false,o=async()=>{let i=C.join(n,g.artifacts.goalPack),h=C.join(n,g.artifacts.agentHandoff),[c,A]=await Promise.all([_.pathExists(i),_.pathExists(h)]);if(c!==A)throw new Error(`Goal Pack instance is incomplete and cannot be resumed: ${g.id}`);if(!c)return;let[w,k]=await Promise.all([_.readJson(i),_.readJson(h)]);a(w,ae,"Persisted Goal Pack"),a(k,se,"Persisted goal agent handoff");let S=j({...E,generatedAt:w.generatedAt,sourceBinding:w.sourceBinding},I);if(w.id!==g.id||k.goalId!==g.id||c$1(w)!==c$1(S.goalPack)||c$1(k)!==c$1(S.handoff))throw new Error(`Goal Pack instance failed immutable integrity validation: ${g.id}`);g=w,x=k,L=true;};if(e$1.dryRun)await o();else {let i$1=`.workspai/goals/${g.id}/publication`;await c$2(n,i$1,async()=>{await o();let h=Ne(await Le(n),g,new Date().toISOString());a(h,pe,"Goal index"),i(h),await f$1(n,d$1,L?[{relativePath:d$1,payload:g},{relativePath:f$2,payload:h}]:[{relativePath:g.artifacts.goalPack,payload:g},{relativePath:g.artifacts.agentHandoff,payload:x},{relativePath:d$1,payload:g},{relativePath:f$2,payload:h}]);});}let y=[g.artifacts.goalPack,g.artifacts.agentHandoff,d$1,f$2],P={schemaVersion:c$3,result:g.state==="needs-confirmation"?"needs-confirmation":g.state==="blocked"?"blocked":g.state==="needs-evidence"?"needs-evidence":"planned",resolution:{source:t.source,invocationScope:t.projectPath?"project":"workspace"},goalPack:g,agentHandoff:x,writtenArtifacts:e$1.dryRun?[]:L?[d$1,f$2]:y,dryRun:e$1.dryRun===true,resumed:L};return a(P,Re,"Goal plan result"),P}export{et as planGoalPack};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {c,b as b$1,d,e,f,a as a$1}from'./chunk-IBJEQHJR.js';import {h}from'./chunk-
|
|
1
|
+
import {c,b as b$1,d,e,f,a as a$1}from'./chunk-IBJEQHJR.js';import {h}from'./chunk-TABXSDTR.js';import {b,a}from'./chunk-TQEMLBAG.js';import {promises}from'fs';import p from'path';import o from'chalk';import T from'ora';import {execa}from'execa';function q(e){return `package main
|
|
2
2
|
|
|
3
3
|
import (
|
|
4
4
|
"fmt"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {c as c$1,b as b$2,d,e,f,a as a$1}from'./chunk-IBJEQHJR.js';import {h}from'./chunk-
|
|
1
|
+
import {c as c$1,b as b$2,d,e,f,a as a$1}from'./chunk-IBJEQHJR.js';import {h}from'./chunk-TABXSDTR.js';import {b as b$1,a}from'./chunk-TQEMLBAG.js';import {promises}from'fs';import c from'path';import o from'chalk';import O from'ora';import {execa}from'execa';function N(e){return `package main
|
|
2
2
|
|
|
3
3
|
import (
|
|
4
4
|
"context"
|
package/dist/index.d.ts
CHANGED
|
@@ -55,6 +55,7 @@ declare function getPublishedContractVersions(): {
|
|
|
55
55
|
projectWorkspaceLink: "project-workspace-link.v1";
|
|
56
56
|
projectWorkspaceResolution: "project-workspace-resolution.v1";
|
|
57
57
|
projectContextAgent: "project-context-agent.v1";
|
|
58
|
+
projectKnowledgeGraphReference: "project-knowledge-graph-reference.v1";
|
|
58
59
|
projectAgentEntry: "workspai.agent-entry.v1";
|
|
59
60
|
agentBootstrapReceipt: "workspai.agent-bootstrap-receipt.v1";
|
|
60
61
|
doctorProjectEvidence: "doctor-project-evidence-v1";
|
|
@@ -100,6 +101,7 @@ declare function getPublishedContractVersions(): {
|
|
|
100
101
|
readonly repairTransaction: "workspai.workspace-repair-transaction.v1";
|
|
101
102
|
};
|
|
102
103
|
cliLogEvent: "cli-log-event-v1";
|
|
104
|
+
workspaceActivityEvent: "workspace-activity-event.v1";
|
|
103
105
|
freshnessMetadata: "rapidkit-freshness-metadata-v1";
|
|
104
106
|
factFreshness: "rapidkit-fact-freshness-v1";
|
|
105
107
|
blockerResolution: "rapidkit-blocker-resolution-v1";
|
|
@@ -262,6 +264,7 @@ declare function getVersionContract(): {
|
|
|
262
264
|
projectWorkspaceLink: "project-workspace-link.v1";
|
|
263
265
|
projectWorkspaceResolution: "project-workspace-resolution.v1";
|
|
264
266
|
projectContextAgent: "project-context-agent.v1";
|
|
267
|
+
projectKnowledgeGraphReference: "project-knowledge-graph-reference.v1";
|
|
265
268
|
projectAgentEntry: "workspai.agent-entry.v1";
|
|
266
269
|
agentBootstrapReceipt: "workspai.agent-bootstrap-receipt.v1";
|
|
267
270
|
doctorProjectEvidence: "doctor-project-evidence-v1";
|
|
@@ -307,6 +310,7 @@ declare function getVersionContract(): {
|
|
|
307
310
|
readonly repairTransaction: "workspai.workspace-repair-transaction.v1";
|
|
308
311
|
};
|
|
309
312
|
cliLogEvent: "cli-log-event-v1";
|
|
313
|
+
workspaceActivityEvent: "workspace-activity-event.v1";
|
|
310
314
|
freshnessMetadata: "rapidkit-freshness-metadata-v1";
|
|
311
315
|
factFreshness: "rapidkit-fact-freshness-v1";
|
|
312
316
|
blockerResolution: "rapidkit-blocker-resolution-v1";
|
|
@@ -462,6 +466,7 @@ declare function getGlobalCommandCapabilities(): {
|
|
|
462
466
|
projectWorkspaceLink: "project-workspace-link.v1";
|
|
463
467
|
projectWorkspaceResolution: "project-workspace-resolution.v1";
|
|
464
468
|
projectContextAgent: "project-context-agent.v1";
|
|
469
|
+
projectKnowledgeGraphReference: "project-knowledge-graph-reference.v1";
|
|
465
470
|
projectAgentEntry: "workspai.agent-entry.v1";
|
|
466
471
|
agentBootstrapReceipt: "workspai.agent-bootstrap-receipt.v1";
|
|
467
472
|
doctorProjectEvidence: "doctor-project-evidence-v1";
|
|
@@ -507,6 +512,7 @@ declare function getGlobalCommandCapabilities(): {
|
|
|
507
512
|
readonly repairTransaction: "workspai.workspace-repair-transaction.v1";
|
|
508
513
|
};
|
|
509
514
|
cliLogEvent: "cli-log-event-v1";
|
|
515
|
+
workspaceActivityEvent: "workspace-activity-event.v1";
|
|
510
516
|
freshnessMetadata: "rapidkit-freshness-metadata-v1";
|
|
511
517
|
factFreshness: "rapidkit-fact-freshness-v1";
|
|
512
518
|
blockerResolution: "rapidkit-blocker-resolution-v1";
|
|
@@ -601,8 +607,8 @@ declare function getGlobalCommandCapabilities(): {
|
|
|
601
607
|
};
|
|
602
608
|
workspace: {
|
|
603
609
|
command: string;
|
|
604
|
-
subcommands: ("archive" | "snapshot" | "list" | "import" | "goal" | "init" | "sync" | "agent-sync" | "
|
|
605
|
-
intelligenceSubcommands: ("snapshot" | "goal" | "agent-sync" | "
|
|
610
|
+
subcommands: ("archive" | "snapshot" | "list" | "import" | "goal" | "init" | "sync" | "agent-sync" | "model" | "intelligence" | "run" | "contract" | "share" | "remediation-plan" | "diff" | "impact" | "verify" | "explain" | "why" | "trace" | "registry" | "foundation" | "graph" | "watch" | "context" | "repair" | "feedback" | "eval" | "mcp" | "policy" | "export" | "hydrate" | "connect")[];
|
|
611
|
+
intelligenceSubcommands: ("snapshot" | "goal" | "agent-sync" | "model" | "intelligence" | "contract" | "remediation-plan" | "diff" | "impact" | "verify" | "explain" | "why" | "trace" | "graph" | "watch" | "context" | "repair" | "feedback" | "eval" | "mcp")[];
|
|
606
612
|
};
|
|
607
613
|
commandMap: any;
|
|
608
614
|
runtimeInventory: RuntimeCommandInventoryPayload;
|