codiedev 0.9.80 → 0.9.82
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/dist/cli.js +52 -33
- package/dist/commands/agentTemplates.generated.d.ts +11 -0
- package/dist/commands/agentTemplates.generated.js +139 -0
- package/dist/commands/agents.d.ts +7 -0
- package/dist/commands/agents.js +1130 -0
- package/dist/commands/agentsSdk.generated.d.ts +4 -0
- package/dist/commands/agentsSdk.generated.js +10 -0
- package/dist/commands/scrub.d.ts +11 -0
- package/dist/commands/scrub.js +102 -0
- package/dist/hook.js +18 -0
- package/dist/knownSecrets.d.ts +43 -0
- package/dist/knownSecrets.js +241 -0
- package/dist/localScrub.d.ts +172 -0
- package/dist/localScrub.js +828 -0
- package/dist/localScrubReport.d.ts +83 -0
- package/dist/localScrubReport.js +271 -0
- package/dist/scrub/extraRules.d.ts +4 -0
- package/dist/scrub/extraRules.js +17 -0
- package/dist/scrub/rules.d.ts +86 -0
- package/dist/scrub/rules.js +645 -0
- package/dist/scrub/scrubProviderRules.d.ts +14 -0
- package/dist/scrub/scrubProviderRules.js +149 -0
- package/dist/utils.js +0 -6
- package/package.json +5 -4
- package/dist/commands/createTicket.d.ts +0 -27
- package/dist/commands/createTicket.js +0 -192
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// GENERATED by scripts/security/gen-scrub-provider-rules.py; do not edit by hand.
|
|
3
|
+
// Provider-prefix secret formats from Gitleaks (https://github.com/gitleaks/gitleaks, commit 5f6ec56cfa6f),
|
|
4
|
+
// converted from Go RE2 to JavaScript. Gitleaks: MIT License, Copyright (c) 2019 Zachary Rice.
|
|
5
|
+
// Mirrored byte-for-byte to packages/codiedev-cli/src/scrub/scrubProviderRules.ts.
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.PROVIDER_RULE_LABELS = exports.PROVIDER_RULES = void 0;
|
|
8
|
+
exports.PROVIDER_RULES = [
|
|
9
|
+
{ name: "1password-secret-key", re: new RegExp("\\bA3-[A-Z0-9]{6}-(?:(?:[A-Z0-9]{11})|(?:[A-Z0-9]{6}-[A-Z0-9]{5}))-[A-Z0-9]{5}-[A-Z0-9]{5}-[A-Z0-9]{5}\\b", "g"), entropy: 3.8, keywords: ["a3-"] },
|
|
10
|
+
{ name: "1password-service-account-token", re: new RegExp("ops_eyJ[a-zA-Z0-9+/]{250,}={0,3}", "g"), entropy: 4, keywords: ["ops_"] },
|
|
11
|
+
{ name: "adobe-client-secret", re: new RegExp("\\b(p8e-[a-z0-9]{32})(?:[\\x60'\"\\s;]|\\\\|$)", "gi"), firstGroup: true, entropy: 2, keywords: ["p8e-"] },
|
|
12
|
+
{ name: "age-secret-key", re: new RegExp("AGE-SECRET-KEY-1[QPZRY9X8GF2TVDW0S3JN54KHCE6MUA7L]{58}", "g"), keywords: ["age-secret-key-1"] },
|
|
13
|
+
{ name: "airtable-personnal-access-token", re: new RegExp("\\b(pat[A-Za-z0-9]{14}\\.[a-f0-9]{64})\\b", "g"), firstGroup: true, keywords: ["airtable"] },
|
|
14
|
+
{ name: "alibaba-access-key-id", re: new RegExp("\\b(LTAI[a-z0-9]{20})(?:[\\x60'\"\\s;]|\\\\|$)", "gi"), firstGroup: true, entropy: 2, keywords: ["ltai"] },
|
|
15
|
+
{ name: "artifactory-api-key", re: new RegExp("\\bAKCp[A-Za-z0-9]{69}\\b", "g"), entropy: 4.5, keywords: ["akcp"] },
|
|
16
|
+
{ name: "artifactory-reference-token", re: new RegExp("\\bcmVmd[A-Za-z0-9]{59}\\b", "g"), entropy: 4.5, keywords: ["cmvmd"] },
|
|
17
|
+
{ name: "clickhouse-cloud-api-secret-key", re: new RegExp("\\b(4b1d[A-Za-z0-9]{38})\\b", "g"), firstGroup: true, entropy: 3, keywords: ["4b1d"] },
|
|
18
|
+
{ name: "clojars-api-token", re: new RegExp("CLOJARS_[a-z0-9]{60}", "gi"), entropy: 2, keywords: ["clojars_"] },
|
|
19
|
+
{ name: "cloudflare-origin-ca-key", re: new RegExp("\\b(v1\\.0-[a-f0-9]{24}-[a-f0-9]{146})(?:[\\x60'\"\\s;]|\\\\|$)", "g"), firstGroup: true, entropy: 2, keywords: ["cloudflare", "v1.0-"] },
|
|
20
|
+
{ name: "curl-auth-header", re: new RegExp("\\bcurl\\b(?:.*?|.*?(?:[\\r\\n]{1,2}.*?){1,5})[ \\t\\n\\r](?:-H|--header)(?:=|[ \\t]{0,5})(?:\"(?:Authorization:[ \\t]{0,5}(?:Basic[ \\t]([a-z0-9+/]{8,}={0,3})|(?:Bearer|(?:Api-)?Token)[ \\t]([\\w=~@.+/-]{8,})|([\\w=~@.+/-]{8,}))|(?:(?:X-(?:[a-z]+-)?)?(?:Api-?)?(?:Key|Token)):[ \\t]{0,5}([\\w=~@.+/-]{8,}))\"|'(?:Authorization:[ \\t]{0,5}(?:Basic[ \\t]([a-z0-9+/]{8,}={0,3})|(?:Bearer|(?:Api-)?Token)[ \\t]([\\w=~@.+/-]{8,})|([\\w=~@.+/-]{8,}))|(?:(?:X-(?:[a-z]+-)?)?(?:Api-?)?(?:Key|Token)):[ \\t]{0,5}([\\w=~@.+/-]{8,}))')(?:\\B|\\s|$)", "gi"), firstGroup: true, entropy: 2.75, keywords: ["curl"] },
|
|
21
|
+
{ name: "curl-auth-user", re: new RegExp("\\bcurl\\b(?:.*|.*(?:[\\r\\n]{1,2}.*){1,5})[ \\t\\n\\r](?:-u|--user)(?:=|[ \\t]{0,5})(\"(:[^\"]{3,}|[^:\"]{3,}:|[^:\"]{3,}:[^\"]{3,})\"|'([^:']{3,}:[^']{3,})'|((?:\"[^\"]{3,}\"|'[^']{3,}'|[\\w$@.-]+):(?:\"[^\"]{3,}\"|'[^']{3,}'|[\\w${}@.-]+)))(?:\\s|$)", "g"), firstGroup: true, entropy: 2, keywords: ["curl"] },
|
|
22
|
+
{ name: "databricks-api-token", re: new RegExp("\\b(dapi[a-f0-9]{32}(?:-\\d)?)(?:[\\x60'\"\\s;]|\\\\|$)", "g"), firstGroup: true, entropy: 3, keywords: ["dapi"] },
|
|
23
|
+
{ name: "digitalocean-access-token", re: new RegExp("\\b(doo_v1_[a-f0-9]{64})(?:[\\x60'\"\\s;]|\\\\|$)", "g"), firstGroup: true, entropy: 3, keywords: ["doo_v1_"] },
|
|
24
|
+
{ name: "digitalocean-pat", re: new RegExp("\\b(dop_v1_[a-f0-9]{64})(?:[\\x60'\"\\s;]|\\\\|$)", "g"), firstGroup: true, entropy: 3, keywords: ["dop_v1_"] },
|
|
25
|
+
{ name: "digitalocean-refresh-token", re: new RegExp("\\b(dor_v1_[a-f0-9]{64})(?:[\\x60'\"\\s;]|\\\\|$)", "gi"), firstGroup: true, keywords: ["dor_v1_"] },
|
|
26
|
+
{ name: "doppler-api-token", re: new RegExp("dp\\.pt\\.[a-z0-9]{43}", "gi"), entropy: 2, keywords: ["dp.pt."] },
|
|
27
|
+
{ name: "duffel-api-token", re: new RegExp("duffel_(?:test|live)_[a-z0-9_\\-=]{43}", "gi"), entropy: 2, keywords: ["duffel_"] },
|
|
28
|
+
{ name: "dynatrace-api-token", re: new RegExp("dt0c01\\.[a-z0-9]{24}\\.[a-z0-9]{64}", "gi"), entropy: 4, keywords: ["dt0c01."] },
|
|
29
|
+
{ name: "easypost-api-token", re: new RegExp("\\bEZAK[a-z0-9]{54}\\b", "gi"), entropy: 2, keywords: ["ezak"] },
|
|
30
|
+
{ name: "easypost-test-api-token", re: new RegExp("\\bEZTK[a-z0-9]{54}\\b", "gi"), entropy: 2, keywords: ["eztk"] },
|
|
31
|
+
{ name: "facebook-access-token", re: new RegExp("\\b(\\d{15,16}(\\||%)[0-9a-z\\-_]{27,40})(?:[\\x60'\"\\s;]|\\\\|$)", "gi"), firstGroup: true, entropy: 3, keywords: ["facebook"] },
|
|
32
|
+
{ name: "facebook-page-access-token", re: new RegExp("\\b(EAA[MC][a-z0-9]{100,})(?:[\\x60'\"\\s;]|\\\\|$)", "gi"), firstGroup: true, entropy: 4, keywords: ["eaam", "eaac"] },
|
|
33
|
+
{ name: "flutterwave-encryption-key", re: new RegExp("FLWSECK_TEST-[a-h0-9]{12}", "gi"), entropy: 2, keywords: ["flwseck_test"] },
|
|
34
|
+
{ name: "flutterwave-secret-key", re: new RegExp("FLWSECK_TEST-[a-h0-9]{32}-X", "gi"), entropy: 2, keywords: ["flwseck_test"] },
|
|
35
|
+
{ name: "flyio-access-token", re: new RegExp("\\b((?:fo1_[\\w-]{43}|fm1[ar]_[a-zA-Z0-9+\\/]{100,}={0,3}|fm2_[a-zA-Z0-9+\\/]{100,}={0,3}))(?:[\\x60'\"\\s;]|\\\\|$)", "g"), firstGroup: true, entropy: 4, keywords: ["fo1_", "fm1", "fm2_"] },
|
|
36
|
+
{ name: "frameio-api-token", re: new RegExp("fio-u-[a-z0-9\\-_=]{64}", "gi"), keywords: ["fio-u-"] },
|
|
37
|
+
{ name: "grafana-api-key", re: new RegExp("\\b(eyJrIjoi[A-Za-z0-9]{70,400}={0,3})(?:[\\x60'\"\\s;]|\\\\|$)", "gi"), firstGroup: true, entropy: 3, keywords: ["eyjrijoi"] },
|
|
38
|
+
{ name: "grafana-cloud-api-token", re: new RegExp("\\b(glc_[A-Za-z0-9+/]{32,400}={0,3})(?:[\\x60'\"\\s;]|\\\\|$)", "gi"), firstGroup: true, entropy: 3, keywords: ["glc_"] },
|
|
39
|
+
{ name: "grafana-service-account-token", re: new RegExp("\\b(glsa_[A-Za-z0-9]{32}_[A-Fa-f0-9]{8})(?:[\\x60'\"\\s;]|\\\\|$)", "gi"), firstGroup: true, entropy: 3, keywords: ["glsa_"] },
|
|
40
|
+
{ name: "harness-api-key", re: new RegExp("(?:pat|sat)\\.[a-zA-Z0-9_-]{22}\\.[a-zA-Z0-9]{24}\\.[a-zA-Z0-9]{20}", "g"), keywords: ["pat.", "sat."] },
|
|
41
|
+
{ name: "heroku-api-key-v2", re: new RegExp("\\b((HRKU-AA[0-9a-zA-Z_-]{58}))(?:[\\x60'\"\\s;]|\\\\|$)", "g"), firstGroup: true, entropy: 4, keywords: ["hrku-aa"] },
|
|
42
|
+
{ name: "huggingface-access-token", re: new RegExp("\\b(hf_(?:[a-z]{34}))(?:[\\x60'\"\\s;]|\\\\|$)", "gi"), firstGroup: true, entropy: 2, keywords: ["hf_"] },
|
|
43
|
+
{ name: "huggingface-organization-api-token", re: new RegExp("\\b(api_org_(?:[a-z]{34}))(?:[\\x60'\"\\s;]|\\\\|$)", "gi"), firstGroup: true, entropy: 2, keywords: ["api_org_"] },
|
|
44
|
+
{ name: "infracost-api-token", re: new RegExp("\\b(ico-[a-zA-Z0-9]{32})(?:[\\x60'\"\\s;]|\\\\|$)", "g"), firstGroup: true, entropy: 3, keywords: ["ico-"] },
|
|
45
|
+
{ name: "intra42-client-secret", re: new RegExp("\\b(s-s4t2(?:ud|af)-[abcdef0123456789]{64})(?:[\\x60'\"\\s;]|\\\\|$)", "gi"), firstGroup: true, entropy: 3, keywords: ["intra", "s-s4t2ud-", "s-s4t2af-"] },
|
|
46
|
+
{ name: "maxmind-license-key", re: new RegExp("\\b([A-Za-z0-9]{6}_[A-Za-z0-9]{29}_mmk)(?:[\\x60'\"\\s;]|\\\\|$)", "g"), firstGroup: true, entropy: 4, keywords: ["_mmk"] },
|
|
47
|
+
{ name: "microsoft-teams-webhook", re: new RegExp("https://[a-z0-9]+\\.webhook\\.office\\.com/webhookb2/[a-z0-9]{8}-([a-z0-9]{4}-){3}[a-z0-9]{12}@[a-z0-9]{8}-([a-z0-9]{4}-){3}[a-z0-9]{12}/IncomingWebhook/[a-z0-9]{32}/[a-z0-9]{8}-([a-z0-9]{4}-){3}[a-z0-9]{12}", "g"), firstGroup: true, keywords: ["webhook.office.com", "webhookb2", "incomingwebhook"] },
|
|
48
|
+
{ name: "notion-api-token", re: new RegExp("\\b(ntn_[0-9]{11}[A-Za-z0-9]{32}[A-Za-z0-9]{3})(?:[\\x60'\"\\s;]|\\\\|$)", "g"), firstGroup: true, entropy: 4, keywords: ["ntn_"] },
|
|
49
|
+
{ name: "octopus-deploy-api-key", re: new RegExp("\\b(API-[A-Z0-9]{26})(?:[\\x60'\"\\s;]|\\\\|$)", "g"), firstGroup: true, entropy: 3, keywords: ["api-"] },
|
|
50
|
+
{ name: "openshift-user-token", re: new RegExp("\\b(sha256~[\\w-]{43})(?:[^\\w-]|$)", "g"), firstGroup: true, entropy: 3.5, keywords: ["sha256~"] },
|
|
51
|
+
{ name: "perplexity-api-key", re: new RegExp("\\b(pplx-[a-zA-Z0-9]{48})(?:[\\x60'\"\\s;]|\\\\|$|\\b)", "g"), firstGroup: true, entropy: 4, keywords: ["pplx-"] },
|
|
52
|
+
{ name: "planetscale-api-token", re: new RegExp("\\b(pscale_tkn_[\\w=\\.-]{32,64})(?:[\\x60'\"\\s;]|\\\\|$)", "gi"), firstGroup: true, entropy: 3, keywords: ["pscale_tkn_"] },
|
|
53
|
+
{ name: "planetscale-oauth-token", re: new RegExp("\\b(pscale_oauth_[\\w=\\.-]{32,64})(?:[\\x60'\"\\s;]|\\\\|$)", "g"), firstGroup: true, entropy: 3, keywords: ["pscale_oauth_"] },
|
|
54
|
+
{ name: "planetscale-password", re: new RegExp("\\b(pscale_pw_[\\w=\\.-]{32,64})(?:[\\x60'\"\\s;]|\\\\|$)", "gi"), firstGroup: true, entropy: 3, keywords: ["pscale_pw_"] },
|
|
55
|
+
{ name: "postman-api-token", re: new RegExp("\\b(PMAK-[a-f0-9]{24}\\-[a-f0-9]{34})(?:[\\x60'\"\\s;]|\\\\|$)", "gi"), firstGroup: true, entropy: 3, keywords: ["pmak-"] },
|
|
56
|
+
{ name: "prefect-api-token", re: new RegExp("\\b(pnu_[a-zA-Z0-9]{36})(?:[\\x60'\"\\s;]|\\\\|$)", "g"), firstGroup: true, entropy: 2, keywords: ["pnu_"] },
|
|
57
|
+
{ name: "pulumi-api-token", re: new RegExp("\\b(pul-[a-f0-9]{40})(?:[\\x60'\"\\s;]|\\\\|$)", "g"), firstGroup: true, entropy: 2, keywords: ["pul-"] },
|
|
58
|
+
{ name: "pypi-upload-token", re: new RegExp("pypi-AgEIcHlwaS5vcmc[\\w-]{50,1000}", "g"), entropy: 3, keywords: ["pypi-ageichlwas5vcmc"] },
|
|
59
|
+
{ name: "readme-api-token", re: new RegExp("\\b(rdme_[a-z0-9]{70})(?:[\\x60'\"\\s;]|\\\\|$)", "g"), firstGroup: true, entropy: 2, keywords: ["rdme_"] },
|
|
60
|
+
{ name: "rubygems-api-token", re: new RegExp("\\b(rubygems_[a-f0-9]{48})(?:[\\x60'\"\\s;]|\\\\|$)", "g"), firstGroup: true, entropy: 2, keywords: ["rubygems_"] },
|
|
61
|
+
{ name: "scalingo-api-token", re: new RegExp("\\b(tk-us-[\\w-]{48})(?:[\\x60'\"\\s;]|\\\\|$)", "g"), firstGroup: true, entropy: 2, keywords: ["tk-us-"] },
|
|
62
|
+
{ name: "sendinblue-api-token", re: new RegExp("\\b(xkeysib-[a-f0-9]{64}\\-[a-z0-9]{16})(?:[\\x60'\"\\s;]|\\\\|$)", "gi"), firstGroup: true, entropy: 2, keywords: ["xkeysib-"] },
|
|
63
|
+
{ name: "sentry-org-token", re: new RegExp("\\bsntrys_eyJpYXQiO[a-zA-Z0-9+/]{10,200}(?:LCJyZWdpb25fdXJs|InJlZ2lvbl91cmwi|cmVnaW9uX3VybCI6)[a-zA-Z0-9+/]{10,200}={0,2}_[a-zA-Z0-9+/]{43}(?:[^a-zA-Z0-9+/]|$)", "g"), entropy: 4.5, keywords: ["sntrys_eyjpyxqio"] },
|
|
64
|
+
{ name: "sentry-user-token", re: new RegExp("\\b(sntryu_[a-f0-9]{64})(?:[\\x60'\"\\s;]|\\\\|$)", "g"), firstGroup: true, entropy: 3.5, keywords: ["sntryu_"] },
|
|
65
|
+
{ name: "settlemint-application-access-token", re: new RegExp("\\b(sm_aat_[a-zA-Z0-9]{16})(?:[\\x60'\"\\s;]|\\\\|$)", "g"), firstGroup: true, entropy: 3, keywords: ["sm_aat"] },
|
|
66
|
+
{ name: "settlemint-personal-access-token", re: new RegExp("\\b(sm_pat_[a-zA-Z0-9]{16})(?:[\\x60'\"\\s;]|\\\\|$)", "g"), firstGroup: true, entropy: 3, keywords: ["sm_pat"] },
|
|
67
|
+
{ name: "settlemint-service-access-token", re: new RegExp("\\b(sm_sat_[a-zA-Z0-9]{16})(?:[\\x60'\"\\s;]|\\\\|$)", "g"), firstGroup: true, entropy: 3, keywords: ["sm_sat"] },
|
|
68
|
+
{ name: "shippo-api-token", re: new RegExp("\\b(shippo_(?:live|test)_[a-fA-F0-9]{40})(?:[\\x60'\"\\s;]|\\\\|$)", "g"), firstGroup: true, entropy: 2, keywords: ["shippo_"] },
|
|
69
|
+
{ name: "shopify-access-token", re: new RegExp("shpat_[a-fA-F0-9]{32}", "g"), entropy: 2, keywords: ["shpat_"] },
|
|
70
|
+
{ name: "shopify-custom-access-token", re: new RegExp("shpca_[a-fA-F0-9]{32}", "g"), entropy: 2, keywords: ["shpca_"] },
|
|
71
|
+
{ name: "shopify-private-app-access-token", re: new RegExp("shppa_[a-fA-F0-9]{32}", "g"), entropy: 2, keywords: ["shppa_"] },
|
|
72
|
+
{ name: "shopify-shared-secret", re: new RegExp("shpss_[a-fA-F0-9]{32}", "g"), entropy: 2, keywords: ["shpss_"] },
|
|
73
|
+
{ name: "sidekiq-sensitive-url", re: new RegExp("\\bhttps?://([a-f0-9]{8}:[a-f0-9]{8})@(?:gems.contribsys.com|enterprise.contribsys.com)(?:[\\/|\\#|\\?|:]|$)", "gi"), firstGroup: true, keywords: ["gems.contribsys.com", "enterprise.contribsys.com"] },
|
|
74
|
+
{ name: "sourcegraph-access-token", re: new RegExp("\\b(sgp_(?:[a-fA-F0-9]{16}|local)_[a-fA-F0-9]{40}|sgp_[a-fA-F0-9]{40})\\b", "g"), firstGroup: true, entropy: 3, keywords: ["sgp_", "sourcegraph"] },
|
|
75
|
+
{ name: "square-access-token", re: new RegExp("\\b((?:EAAA|sq0atp-)[\\w-]{22,60})(?:[\\x60'\"\\s;]|\\\\|$)", "g"), firstGroup: true, entropy: 2, keywords: ["sq0atp-", "eaaa"] },
|
|
76
|
+
{ name: "vault-batch-token", re: new RegExp("\\b(hvb\\.[\\w-]{138,300})(?:[\\x60'\"\\s;]|\\\\|$)", "g"), firstGroup: true, entropy: 4, keywords: ["hvb."] },
|
|
77
|
+
{ name: "vault-service-token", re: new RegExp("\\b(hvs\\.[\\w-]{90,120})", "g"), firstGroup: true, entropy: 3.5, keywords: ["hvs."] },
|
|
78
|
+
];
|
|
79
|
+
exports.PROVIDER_RULE_LABELS = {
|
|
80
|
+
"1password-secret-key": "1password secret key",
|
|
81
|
+
"1password-service-account-token": "1password service account token",
|
|
82
|
+
"adobe-client-secret": "Adobe client secret",
|
|
83
|
+
"age-secret-key": "Age secret key",
|
|
84
|
+
"airtable-personnal-access-token": "Airtable personnal access token",
|
|
85
|
+
"alibaba-access-key-id": "Alibaba access key id",
|
|
86
|
+
"artifactory-api-key": "Artifactory api key",
|
|
87
|
+
"artifactory-reference-token": "Artifactory reference token",
|
|
88
|
+
"clickhouse-cloud-api-secret-key": "Clickhouse cloud api secret key",
|
|
89
|
+
"clojars-api-token": "Clojars api token",
|
|
90
|
+
"cloudflare-origin-ca-key": "Cloudflare origin ca key",
|
|
91
|
+
"curl-auth-header": "Curl auth header",
|
|
92
|
+
"curl-auth-user": "Curl auth user",
|
|
93
|
+
"databricks-api-token": "Databricks api token",
|
|
94
|
+
"digitalocean-access-token": "Digitalocean access token",
|
|
95
|
+
"digitalocean-pat": "Digitalocean pat",
|
|
96
|
+
"digitalocean-refresh-token": "Digitalocean refresh token",
|
|
97
|
+
"doppler-api-token": "Doppler api token",
|
|
98
|
+
"duffel-api-token": "Duffel api token",
|
|
99
|
+
"dynatrace-api-token": "Dynatrace api token",
|
|
100
|
+
"easypost-api-token": "Easypost api token",
|
|
101
|
+
"easypost-test-api-token": "Easypost test api token",
|
|
102
|
+
"facebook-access-token": "Facebook access token",
|
|
103
|
+
"facebook-page-access-token": "Facebook page access token",
|
|
104
|
+
"flutterwave-encryption-key": "Flutterwave encryption key",
|
|
105
|
+
"flutterwave-secret-key": "Flutterwave secret key",
|
|
106
|
+
"flyio-access-token": "Flyio access token",
|
|
107
|
+
"frameio-api-token": "Frameio api token",
|
|
108
|
+
"grafana-api-key": "Grafana api key",
|
|
109
|
+
"grafana-cloud-api-token": "Grafana cloud api token",
|
|
110
|
+
"grafana-service-account-token": "Grafana service account token",
|
|
111
|
+
"harness-api-key": "Harness api key",
|
|
112
|
+
"heroku-api-key-v2": "Heroku api key v2",
|
|
113
|
+
"huggingface-access-token": "Huggingface access token",
|
|
114
|
+
"huggingface-organization-api-token": "Huggingface organization api token",
|
|
115
|
+
"infracost-api-token": "Infracost api token",
|
|
116
|
+
"intra42-client-secret": "Intra42 client secret",
|
|
117
|
+
"maxmind-license-key": "Maxmind license key",
|
|
118
|
+
"microsoft-teams-webhook": "Microsoft teams webhook",
|
|
119
|
+
"notion-api-token": "Notion api token",
|
|
120
|
+
"octopus-deploy-api-key": "Octopus deploy api key",
|
|
121
|
+
"openshift-user-token": "Openshift user token",
|
|
122
|
+
"perplexity-api-key": "Perplexity api key",
|
|
123
|
+
"planetscale-api-token": "Planetscale api token",
|
|
124
|
+
"planetscale-oauth-token": "Planetscale oauth token",
|
|
125
|
+
"planetscale-password": "Planetscale password",
|
|
126
|
+
"postman-api-token": "Postman api token",
|
|
127
|
+
"prefect-api-token": "Prefect api token",
|
|
128
|
+
"pulumi-api-token": "Pulumi api token",
|
|
129
|
+
"pypi-upload-token": "Pypi upload token",
|
|
130
|
+
"readme-api-token": "Readme api token",
|
|
131
|
+
"rubygems-api-token": "Rubygems api token",
|
|
132
|
+
"scalingo-api-token": "Scalingo api token",
|
|
133
|
+
"sendinblue-api-token": "Sendinblue api token",
|
|
134
|
+
"sentry-org-token": "Sentry org token",
|
|
135
|
+
"sentry-user-token": "Sentry user token",
|
|
136
|
+
"settlemint-application-access-token": "Settlemint application access token",
|
|
137
|
+
"settlemint-personal-access-token": "Settlemint personal access token",
|
|
138
|
+
"settlemint-service-access-token": "Settlemint service access token",
|
|
139
|
+
"shippo-api-token": "Shippo api token",
|
|
140
|
+
"shopify-access-token": "Shopify access token",
|
|
141
|
+
"shopify-custom-access-token": "Shopify custom access token",
|
|
142
|
+
"shopify-private-app-access-token": "Shopify private app access token",
|
|
143
|
+
"shopify-shared-secret": "Shopify shared secret",
|
|
144
|
+
"sidekiq-sensitive-url": "Sidekiq sensitive url",
|
|
145
|
+
"sourcegraph-access-token": "Sourcegraph access token",
|
|
146
|
+
"square-access-token": "Square access token",
|
|
147
|
+
"vault-batch-token": "Vault batch token",
|
|
148
|
+
"vault-service-token": "Vault service token",
|
|
149
|
+
};
|
package/dist/utils.js
CHANGED
|
@@ -1677,7 +1677,6 @@ thought, use the \`codiedev\` CLI via Bash:**
|
|
|
1677
1677
|
| "any messages?" / "check my inbox" / "what did a teammate say?" | \`codiedev inbox\` |
|
|
1678
1678
|
| "read that reply" / "mark that ping read" | \`codiedev read <ping-id>\` |
|
|
1679
1679
|
| "note that X is a follow-up" / "remember X" | \`codiedev note "<text>"\` |
|
|
1680
|
-
| "create a ticket" / "scope this into tickets" / "ticket this for me" | \`codiedev create-ticket [optional-inline-prompt]\` |
|
|
1681
1680
|
| "share with a teammate" / "give someone access" (no notification) | \`codiedev share <key> <name> [--role read\\|edit]\` |
|
|
1682
1681
|
| "send this to a teammate" / "ask someone to look at this" | \`codiedev send <key> <name> ["<msg>"]\` |
|
|
1683
1682
|
| "find something about X" / "has anyone solved Y?" | \`codiedev search "<query>" [--limit N]\` |
|
|
@@ -1726,11 +1725,6 @@ iterate rather than duplicating.
|
|
|
1726
1725
|
notification). \`codiedev send\` both grants access AND pings the
|
|
1727
1726
|
recipient. Use send when the user is actively looping someone in.
|
|
1728
1727
|
|
|
1729
|
-
**\`create-ticket\` flow:** when invoked without \`--submit\`, the CLI prints
|
|
1730
|
-
skill instructions you should follow. Step 1 is asking the user about repos.
|
|
1731
|
-
Step 4 calls \`codiedev create-ticket --submit <path>\` with the plan JSON.
|
|
1732
|
-
Tell the user the portal URL when the submit returns.
|
|
1733
|
-
|
|
1734
1728
|
**Errors:**
|
|
1735
1729
|
- "not connected" → user needs to run \`npx codiedev connect\` with their
|
|
1736
1730
|
API token from https://codiedev.com/portal/integrations/claude-code
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codiedev",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.82",
|
|
4
4
|
"description": "Connect Claude Code, Codex, Cursor, OpenCode, or VS Code Copilot to Codiedev for team session capture and artifact collaboration — and run the governed Codie harness",
|
|
5
5
|
"bin": {
|
|
6
6
|
"codiedev": "dist/cli.js",
|
|
@@ -12,13 +12,14 @@
|
|
|
12
12
|
"dev": "tsc --watch",
|
|
13
13
|
"prepublishOnly": "tsc",
|
|
14
14
|
"test": "vitest run",
|
|
15
|
-
"test:functional": "vitest run src/__tests__/limitEvent.functional.test.ts src/__tests__/harnessParity.functional.test.ts src/__tests__/cursorParity.functional.test.ts src/__tests__/copilotCapture.functional.test.ts src/__tests__/piCapture.functional.test.ts",
|
|
16
|
-
"test:harness-parity": "vitest run src/__tests__/harnessParity.functional.test.ts src/__tests__/cursorParity.functional.test.ts src/__tests__/copilotCapture.functional.test.ts src/__tests__/piCapture.functional.test.ts",
|
|
15
|
+
"test:functional": "vitest run src/__tests__/localScrub.functional.test.ts src/__tests__/limitEvent.functional.test.ts src/__tests__/harnessParity.functional.test.ts src/__tests__/cursorParity.functional.test.ts src/__tests__/copilotCapture.functional.test.ts src/__tests__/piCapture.functional.test.ts",
|
|
16
|
+
"test:harness-parity": "vitest run src/__tests__/localScrub.functional.test.ts src/__tests__/harnessParity.functional.test.ts src/__tests__/cursorParity.functional.test.ts src/__tests__/copilotCapture.functional.test.ts src/__tests__/piCapture.functional.test.ts",
|
|
17
17
|
"test:harness-binaries": "node scripts/checkHarnessBinaries.mjs",
|
|
18
18
|
"test:watch": "vitest",
|
|
19
19
|
"test:live-sources": "npm run build && node scripts/liveSourceParity.mjs",
|
|
20
20
|
"test:ide-sources": "npm run build && node scripts/liveSourceParity.mjs --ide",
|
|
21
|
-
"test:metadata-parity": "vitest run src/__tests__/sourceMetadataMatrix.test.ts src/__tests__/copilotCapture.functional.test.ts src/__tests__/copilotCapture.test.ts src/__tests__/piCapture.functional.test.ts src/__tests__/piHooks.test.ts src/__tests__/cursorParity.functional.test.ts src/__tests__/nativeSourceParity.test.ts src/__tests__/harnessParity.functional.test.ts src/__tests__/subagents.test.ts src/__tests__/transcriptModels.test.ts src/__tests__/captureRetry.test.ts src/__tests__/limitEvent.functional.test.ts src/__tests__/captureExclusions.test.ts"
|
|
21
|
+
"test:metadata-parity": "vitest run src/__tests__/localScrub.functional.test.ts src/__tests__/sourceMetadataMatrix.test.ts src/__tests__/copilotCapture.functional.test.ts src/__tests__/copilotCapture.test.ts src/__tests__/piCapture.functional.test.ts src/__tests__/piHooks.test.ts src/__tests__/cursorParity.functional.test.ts src/__tests__/nativeSourceParity.test.ts src/__tests__/harnessParity.functional.test.ts src/__tests__/subagents.test.ts src/__tests__/transcriptModels.test.ts src/__tests__/captureRetry.test.ts src/__tests__/limitEvent.functional.test.ts src/__tests__/captureExclusions.test.ts",
|
|
22
|
+
"test:local-scrub-live": "npm run build && node scripts/localScrubLive.mjs"
|
|
22
23
|
},
|
|
23
24
|
"files": [
|
|
24
25
|
"dist",
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { CodiedevConfig } from "../utils";
|
|
2
|
-
export declare function substitutePrompt(protocol: string, prompt: string | undefined): string;
|
|
3
|
-
interface ConnectedRepo {
|
|
4
|
-
repoId: string;
|
|
5
|
-
fullName: string;
|
|
6
|
-
}
|
|
7
|
-
export declare function validatePlanHasRepo(parsedPlan: any): string | null;
|
|
8
|
-
export declare function resolveRepoIds(fullNames: string[], repos: ConnectedRepo[]): string[];
|
|
9
|
-
export interface CreateTicketArgs {
|
|
10
|
-
mode: "bare" | "submit";
|
|
11
|
-
prompt?: string;
|
|
12
|
-
submitSource?: "stdin" | string;
|
|
13
|
-
}
|
|
14
|
-
export declare function parseCreateTicketArgs(args: string[]): CreateTicketArgs;
|
|
15
|
-
export declare function runCreateTicket(args: string[]): Promise<void>;
|
|
16
|
-
/**
|
|
17
|
-
* Bare-mode entrypoint. Fetches the protocol body from the backend so we can
|
|
18
|
-
* iterate on it without shipping a new CLI, substitutes the user's prompt,
|
|
19
|
-
* and writes the result to stdout for the agent to follow. Hard-errors on
|
|
20
|
-
* fetch failure rather than falling back to a stale local copy — the whole
|
|
21
|
-
* point of moving the protocol server-side is that the freshest version is
|
|
22
|
-
* the only version.
|
|
23
|
-
*/
|
|
24
|
-
export declare function runBare(config: CodiedevConfig, prompt: string | undefined): Promise<void>;
|
|
25
|
-
export declare function runSubmit(config: CodiedevConfig, rawJson: string): Promise<void>;
|
|
26
|
-
export declare function readSubmitInput(source: "stdin" | string): string;
|
|
27
|
-
export {};
|
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.substitutePrompt = substitutePrompt;
|
|
37
|
-
exports.validatePlanHasRepo = validatePlanHasRepo;
|
|
38
|
-
exports.resolveRepoIds = resolveRepoIds;
|
|
39
|
-
exports.parseCreateTicketArgs = parseCreateTicketArgs;
|
|
40
|
-
exports.runCreateTicket = runCreateTicket;
|
|
41
|
-
exports.runBare = runBare;
|
|
42
|
-
exports.runSubmit = runSubmit;
|
|
43
|
-
exports.readSubmitInput = readSubmitInput;
|
|
44
|
-
const fs = __importStar(require("node:fs"));
|
|
45
|
-
const shared_1 = require("./shared");
|
|
46
|
-
const PROMPT_PLACEHOLDER = "{{USER_PROMPT}}";
|
|
47
|
-
const MISSING_PROMPT_FALLBACK = "(not yet provided — ask the user a single combined question that covers both the intent AND repo locations: \"What are you working on, and is this in a single repo or multiple? If multiple, give me the paths.\" Skip Step 1 since you've folded it into this question. Then proceed to Step 2.)";
|
|
48
|
-
function substitutePrompt(protocol, prompt) {
|
|
49
|
-
return protocol.replace(PROMPT_PLACEHOLDER, prompt && prompt.length > 0 ? prompt : MISSING_PROMPT_FALLBACK);
|
|
50
|
-
}
|
|
51
|
-
function validatePlanHasRepo(parsedPlan) {
|
|
52
|
-
const fullNames = Array.isArray(parsedPlan?.repoFullNames) ? parsedPlan.repoFullNames : [];
|
|
53
|
-
const explicitIds = Array.isArray(parsedPlan?.repoIds) ? parsedPlan.repoIds : [];
|
|
54
|
-
if (fullNames.length === 0 && explicitIds.length === 0) {
|
|
55
|
-
return "Plan must include at least one repo (repoFullNames: ['owner/name'] or repoIds: [...])";
|
|
56
|
-
}
|
|
57
|
-
return null;
|
|
58
|
-
}
|
|
59
|
-
function resolveRepoIds(fullNames, repos) {
|
|
60
|
-
const lookup = new Map();
|
|
61
|
-
for (const r of repos) {
|
|
62
|
-
lookup.set(r.fullName.toLowerCase(), r.repoId);
|
|
63
|
-
}
|
|
64
|
-
const ids = [];
|
|
65
|
-
for (const fn of fullNames) {
|
|
66
|
-
const id = lookup.get(fn.toLowerCase());
|
|
67
|
-
if (!id) {
|
|
68
|
-
throw new Error(`Repo "${fn}" is not connected to your Codiedev account. Run \`codiedev connect\` to refresh, or push the missing repo through Settings.`);
|
|
69
|
-
}
|
|
70
|
-
ids.push(id);
|
|
71
|
-
}
|
|
72
|
-
return ids;
|
|
73
|
-
}
|
|
74
|
-
function parseCreateTicketArgs(args) {
|
|
75
|
-
let mode = "bare";
|
|
76
|
-
let prompt;
|
|
77
|
-
let submitSource;
|
|
78
|
-
for (let i = 0; i < args.length; i++) {
|
|
79
|
-
const a = args[i];
|
|
80
|
-
if (a === "--submit" && i + 1 < args.length) {
|
|
81
|
-
mode = "submit";
|
|
82
|
-
const next = args[++i];
|
|
83
|
-
submitSource = next === "-" ? "stdin" : next;
|
|
84
|
-
}
|
|
85
|
-
else if (a.startsWith("--submit=")) {
|
|
86
|
-
mode = "submit";
|
|
87
|
-
const v = a.slice("--submit=".length);
|
|
88
|
-
submitSource = v === "-" ? "stdin" : v;
|
|
89
|
-
}
|
|
90
|
-
else if (!a.startsWith("--") && !prompt && mode === "bare") {
|
|
91
|
-
prompt = a;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
return { mode, prompt, submitSource };
|
|
95
|
-
}
|
|
96
|
-
async function runCreateTicket(args) {
|
|
97
|
-
const parsed = parseCreateTicketArgs(args);
|
|
98
|
-
if (parsed.mode === "bare") {
|
|
99
|
-
const config = (0, shared_1.requireConfig)();
|
|
100
|
-
await runBare(config, parsed.prompt);
|
|
101
|
-
return;
|
|
102
|
-
}
|
|
103
|
-
// submit mode
|
|
104
|
-
if (!parsed.submitSource) {
|
|
105
|
-
console.error("--submit requires a path or '-' for stdin");
|
|
106
|
-
process.exit(1);
|
|
107
|
-
}
|
|
108
|
-
const config = (0, shared_1.requireConfig)();
|
|
109
|
-
let raw;
|
|
110
|
-
try {
|
|
111
|
-
raw = readSubmitInput(parsed.submitSource);
|
|
112
|
-
}
|
|
113
|
-
catch (err) {
|
|
114
|
-
console.error(`Failed to read plan: ${err.message}`);
|
|
115
|
-
process.exit(1);
|
|
116
|
-
}
|
|
117
|
-
// Translate fullNames → IDs before submitting
|
|
118
|
-
let parsedPlan;
|
|
119
|
-
try {
|
|
120
|
-
parsedPlan = JSON.parse(raw);
|
|
121
|
-
}
|
|
122
|
-
catch (err) {
|
|
123
|
-
console.error(`Plan JSON did not parse: ${err.message}`);
|
|
124
|
-
process.exit(1);
|
|
125
|
-
}
|
|
126
|
-
const validationError = validatePlanHasRepo(parsedPlan);
|
|
127
|
-
if (validationError) {
|
|
128
|
-
console.error(validationError);
|
|
129
|
-
process.exit(1);
|
|
130
|
-
}
|
|
131
|
-
const fullNames = Array.isArray(parsedPlan.repoFullNames) ? parsedPlan.repoFullNames : [];
|
|
132
|
-
const explicitIds = Array.isArray(parsedPlan.repoIds) ? parsedPlan.repoIds : [];
|
|
133
|
-
if (fullNames.length > 0 && explicitIds.length === 0) {
|
|
134
|
-
parsedPlan.repoIds = resolveRepoIds(fullNames, config.repos);
|
|
135
|
-
}
|
|
136
|
-
for (const t of parsedPlan.plan?.tickets ?? []) {
|
|
137
|
-
if (t.targetRepoFullName && !t.targetRepoId) {
|
|
138
|
-
const ids = resolveRepoIds([t.targetRepoFullName], config.repos);
|
|
139
|
-
t.targetRepoId = ids[0];
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
await runSubmit(config, JSON.stringify(parsedPlan));
|
|
143
|
-
}
|
|
144
|
-
/**
|
|
145
|
-
* Bare-mode entrypoint. Fetches the protocol body from the backend so we can
|
|
146
|
-
* iterate on it without shipping a new CLI, substitutes the user's prompt,
|
|
147
|
-
* and writes the result to stdout for the agent to follow. Hard-errors on
|
|
148
|
-
* fetch failure rather than falling back to a stale local copy — the whole
|
|
149
|
-
* point of moving the protocol server-side is that the freshest version is
|
|
150
|
-
* the only version.
|
|
151
|
-
*/
|
|
152
|
-
async function runBare(config, prompt) {
|
|
153
|
-
let res;
|
|
154
|
-
try {
|
|
155
|
-
res = await (0, shared_1.apiRequest)("GET", "/api/cli/createTicketProtocol", { config });
|
|
156
|
-
}
|
|
157
|
-
catch (err) {
|
|
158
|
-
console.error(`Failed to fetch create-ticket protocol: ${err.message}. Check your network connection and re-run.`);
|
|
159
|
-
process.exit(1);
|
|
160
|
-
}
|
|
161
|
-
process.stdout.write(substitutePrompt(res.protocol, prompt));
|
|
162
|
-
}
|
|
163
|
-
async function runSubmit(config, rawJson) {
|
|
164
|
-
let payload;
|
|
165
|
-
try {
|
|
166
|
-
payload = JSON.parse(rawJson);
|
|
167
|
-
}
|
|
168
|
-
catch (err) {
|
|
169
|
-
throw new Error(`Plan JSON did not parse — emit valid JSON matching the schema printed by \`codiedev create-ticket\`. Original error: ${err.message}`);
|
|
170
|
-
}
|
|
171
|
-
if (!payload.plan || !payload.prompt || !payload.repoIds) {
|
|
172
|
-
throw new Error("Plan JSON missing one of: plan, prompt, repoIds");
|
|
173
|
-
}
|
|
174
|
-
const res = await (0, shared_1.withTelemetry)(config, "codiedev_create_ticket", () => (0, shared_1.apiRequest)("POST", "/api/cli/createPlan", {
|
|
175
|
-
config,
|
|
176
|
-
body: payload,
|
|
177
|
-
}));
|
|
178
|
-
const portalHost = (process.env.CODIEDEV_PORTAL_URL || "https://codiedev.com").replace(/\/$/, "");
|
|
179
|
-
const portalLink = res.portalUrl.startsWith("http")
|
|
180
|
-
? res.portalUrl
|
|
181
|
-
: `${portalHost}${res.portalUrl}`;
|
|
182
|
-
console.log(`✓ Created ${res.ticketCount} ticket(s).`);
|
|
183
|
-
console.log(` portal: ${portalLink}`);
|
|
184
|
-
console.log("");
|
|
185
|
-
console.log("Open in your portal to review and push to Jira.");
|
|
186
|
-
}
|
|
187
|
-
function readSubmitInput(source) {
|
|
188
|
-
if (source === "stdin") {
|
|
189
|
-
return fs.readFileSync(0, "utf8");
|
|
190
|
-
}
|
|
191
|
-
return fs.readFileSync(source, "utf8");
|
|
192
|
-
}
|