@maycombhq/sdk 2.0.0-beta.1 → 2.0.0-beta.3

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.
Files changed (87) hide show
  1. package/{dist → npm}/cache.d.ts +1 -1
  2. package/npm/core/api.d.ts +6098 -0
  3. package/npm/core/assistant-actor.d.ts +15 -0
  4. package/npm/core/branches.d.ts +21 -0
  5. package/npm/core/cancel.d.ts +9 -0
  6. package/npm/core/catalog.d.ts +4733 -0
  7. package/npm/core/change-types-migrate.d.ts +10 -0
  8. package/npm/core/cite.d.ts +54 -0
  9. package/npm/core/curated.d.ts +37 -0
  10. package/npm/core/facts-callers.d.ts +150 -0
  11. package/npm/core/facts-carry.d.ts +36 -0
  12. package/npm/core/facts-join-prototype.d.ts +177 -0
  13. package/npm/core/facts-join-vendor.d.ts +92 -0
  14. package/npm/core/facts-join.d.ts +256 -0
  15. package/npm/core/facts.d.ts +94 -0
  16. package/npm/core/fs.d.ts +47 -0
  17. package/npm/core/gates-migrate.d.ts +10 -0
  18. package/npm/core/host-questions.d.ts +24 -0
  19. package/npm/core/identity.d.ts +17 -0
  20. package/npm/core/index.d.ts +62 -0
  21. package/npm/core/json-schema.d.ts +20 -0
  22. package/npm/core/judgments.d.ts +63 -0
  23. package/npm/core/light.d.ts +8 -0
  24. package/npm/core/log.d.ts +49 -0
  25. package/npm/core/manifest-edit.d.ts +48 -0
  26. package/npm/core/merge.d.ts +78 -0
  27. package/npm/core/metarepo.d.ts +83 -0
  28. package/npm/core/migrate.d.ts +31 -0
  29. package/npm/core/migration-files.d.ts +13 -0
  30. package/npm/core/orgpack-defaults.d.ts +194 -0
  31. package/npm/core/orgpack-load.d.ts +86 -0
  32. package/npm/core/questions.d.ts +267 -0
  33. package/npm/core/record-cache.d.ts +52 -0
  34. package/npm/core/refs.d.ts +9 -0
  35. package/npm/core/repo-description.d.ts +44 -0
  36. package/npm/core/runtime-migrate.d.ts +11 -0
  37. package/npm/core/schema/ai.d.ts +397 -0
  38. package/npm/core/schema/change.d.ts +244 -0
  39. package/npm/core/schema/common.d.ts +135 -0
  40. package/npm/core/schema/dialect.d.ts +801 -0
  41. package/npm/core/schema/executors.d.ts +396 -0
  42. package/npm/core/schema/fact-corrections.d.ts +55 -0
  43. package/npm/core/schema/facts.d.ts +1476 -0
  44. package/npm/core/schema/frameworks.d.ts +371 -0
  45. package/npm/core/schema/judgment.d.ts +77 -0
  46. package/npm/core/schema/kinds.d.ts +5166 -0
  47. package/npm/core/schema/layout.d.ts +25 -0
  48. package/npm/core/schema/orgpack.d.ts +1167 -0
  49. package/npm/core/schema/plugin.d.ts +73 -0
  50. package/npm/core/schema/question.d.ts +152 -0
  51. package/npm/core/schema/repo-type.d.ts +109 -0
  52. package/npm/core/schema/review.d.ts +558 -0
  53. package/npm/core/schema/scan-settings.d.ts +34 -0
  54. package/npm/core/schema/scan-verify.d.ts +535 -0
  55. package/npm/core/schema/spec.d.ts +269 -0
  56. package/npm/core/schema/version.d.ts +9 -0
  57. package/npm/core/schema/workspace.d.ts +312 -0
  58. package/npm/core/serialize.d.ts +17 -0
  59. package/npm/core/sources-migrate.d.ts +15 -0
  60. package/npm/core/specs.d.ts +66 -0
  61. package/npm/core/tar-read.d.ts +13 -0
  62. package/npm/core/template.d.ts +101 -0
  63. package/npm/core/words.d.ts +13 -0
  64. package/npm/core/zip-read.d.ts +37 -0
  65. package/npm/core/zip.d.ts +13 -0
  66. package/npm/index.js +8892 -0
  67. package/{dist → npm}/plugin.d.ts +1 -1
  68. package/{dist → npm}/runner.d.ts +1 -1
  69. package/package.json +10 -11
  70. package/dist/cache.js +0 -115
  71. package/dist/cache.js.map +0 -1
  72. package/dist/fs-repo.js +0 -120
  73. package/dist/fs-repo.js.map +0 -1
  74. package/dist/index.js +0 -7
  75. package/dist/index.js.map +0 -1
  76. package/dist/parse-cache.js +0 -275
  77. package/dist/parse-cache.js.map +0 -1
  78. package/dist/plugin.js +0 -85
  79. package/dist/plugin.js.map +0 -1
  80. package/dist/runner.js +0 -209
  81. package/dist/runner.js.map +0 -1
  82. package/dist/sandbox.js +0 -443
  83. package/dist/sandbox.js.map +0 -1
  84. /package/{dist → npm}/fs-repo.d.ts +0 -0
  85. /package/{dist → npm}/index.d.ts +0 -0
  86. /package/{dist → npm}/parse-cache.d.ts +0 -0
  87. /package/{dist → npm}/sandbox.d.ts +0 -0
@@ -0,0 +1,73 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * A scanner plugin (ADR 0080, C6): org-pack/plugins/<id>/plugin.yaml. When a rule file can't
4
+ * say how to read an organisation's code, the AI writes a plugin in plain JavaScript, as a
5
+ * reviewed change with golden tests (plugins/<id>/test/<case>/repo/ and expected.yaml). The
6
+ * scanner loads it only when the entry file's sha256 matches the pin and its tests pass, and
7
+ * runs it sandboxed: files only through the repo handle, no network, no processes, limits.
8
+ */
9
+ export declare const SCANNER_PLUGIN_SCHEMA_VERSION: 1;
10
+ export declare const ScannerPlugin: z.ZodObject<{
11
+ schemaVersion: z.ZodLiteral<1>;
12
+ id: z.ZodString;
13
+ version: z.ZodString;
14
+ description: z.ZodString;
15
+ emits: z.ZodArray<z.ZodString>;
16
+ appliesTo: z.ZodObject<{
17
+ repoTypes: z.ZodDefault<z.ZodArray<z.ZodString>>;
18
+ dialects: z.ZodDefault<z.ZodArray<z.ZodString>>;
19
+ }, z.core.$strict>;
20
+ entry: z.ZodString;
21
+ sha256: z.ZodOptional<z.ZodString>;
22
+ limits: z.ZodDefault<z.ZodObject<{
23
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
24
+ memoryMb: z.ZodDefault<z.ZodNumber>;
25
+ }, z.core.$strict>>;
26
+ enabled: z.ZodDefault<z.ZodBoolean>;
27
+ }, z.core.$strict>;
28
+ export type ScannerPlugin = z.infer<typeof ScannerPlugin>;
29
+ export declare const MODEL_PROVIDER_PLUGIN_SCHEMA_VERSION: 1;
30
+ /**
31
+ * A model-provider plugin (ADR 0121 item 4, C6): org-pack/plugins/model-providers/<id>/plugin.yaml,
32
+ * for a model provider Atticus has no built-in for (Vertex, a bank's own gateway). Its code is a
33
+ * translator, run in the plugin sandbox: `request` turns a prompt into a URL, headers and body,
34
+ * and `response` turns the answer into text. Atticus makes the call, over HTTPS to the hosts
35
+ * named here only, through the proxy and CA it uses for every provider, and adds the key from
36
+ * keyEnv itself: the plugin never sees it. runtime.yaml names it as adapters.model.type.
37
+ */
38
+ export declare const ModelProviderPlugin: z.ZodObject<{
39
+ schemaVersion: z.ZodLiteral<1>;
40
+ id: z.ZodString;
41
+ version: z.ZodString;
42
+ description: z.ZodString;
43
+ entry: z.ZodString;
44
+ settings: z.ZodDefault<z.ZodArray<z.ZodString>>;
45
+ hosts: z.ZodArray<z.ZodString>;
46
+ auth: z.ZodDefault<z.ZodUnion<readonly [z.ZodEnum<{
47
+ none: "none";
48
+ bearer: "bearer";
49
+ "x-api-key": "x-api-key";
50
+ }>, z.ZodString]>>;
51
+ sha256: z.ZodOptional<z.ZodString>;
52
+ limits: z.ZodDefault<z.ZodObject<{
53
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
54
+ memoryMb: z.ZodDefault<z.ZodNumber>;
55
+ }, z.core.$strict>>;
56
+ }, z.core.$strict>;
57
+ export type ModelProviderPlugin = z.infer<typeof ModelProviderPlugin>;
58
+ /** A plugin's golden test: plugins/<id>/test/<case>/expected.yaml (records matched by id). */
59
+ export declare const PluginExpected: z.ZodObject<{
60
+ context: z.ZodOptional<z.ZodObject<{
61
+ component: z.ZodOptional<z.ZodString>;
62
+ system: z.ZodOptional<z.ZodString>;
63
+ repoType: z.ZodOptional<z.ZodString>;
64
+ dialects: z.ZodDefault<z.ZodArray<z.ZodString>>;
65
+ }, z.core.$strict>>;
66
+ expect: z.ZodDefault<z.ZodArray<z.ZodObject<{
67
+ kind: z.ZodString;
68
+ id: z.ZodString;
69
+ }, z.core.$loose>>>;
70
+ absent: z.ZodDefault<z.ZodArray<z.ZodString>>;
71
+ exact: z.ZodDefault<z.ZodBoolean>;
72
+ }, z.core.$strict>;
73
+ export type PluginExpected = z.infer<typeof PluginExpected>;
@@ -0,0 +1,152 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * A question to a person (ADR 0078, C6): questions/<id>.yaml in the metarepo. People's and the
4
+ * AI's words, not generated catalog. A step (atticus scan survey, first) raises one when the
5
+ * code is ambiguous, with options and the file and line it read; a person answers it, the
6
+ * answer is written to the same file, and the step's rerun reads it. An answered question is
7
+ * not asked again.
8
+ */
9
+ /**
10
+ * Version 2 (ADR 0117) adds `related` (an earlier question this one may be the same as, or is
11
+ * narrower than) and a draft's `sameAs`. Both are optional, so version-1 files are read as they
12
+ * are and come back as version 2 in memory; writers write version 2.
13
+ */
14
+ export declare const QUESTION_SCHEMA_VERSION: 2;
15
+ /** A question's id: q- and 12 hex characters of the fingerprint of what it asks about. */
16
+ export declare const QuestionId: z.ZodString;
17
+ /** Where the question comes from in the repo: path:line. */
18
+ export declare const QuestionEvidence: z.ZodString;
19
+ export declare const QuestionState: z.ZodEnum<{
20
+ retired: "retired";
21
+ open: "open";
22
+ answered: "answered";
23
+ }>;
24
+ export type QuestionState = z.infer<typeof QuestionState>;
25
+ /** Who an answer is for: this repo only, or every repo of a type. */
26
+ export declare const QuestionScopeLevel: z.ZodEnum<{
27
+ repo: "repo";
28
+ "repo-type": "repo-type";
29
+ }>;
30
+ export type QuestionScopeLevel = z.infer<typeof QuestionScopeLevel>;
31
+ export declare const QuestionScope: z.ZodObject<{
32
+ level: z.ZodEnum<{
33
+ repo: "repo";
34
+ "repo-type": "repo-type";
35
+ }>;
36
+ id: z.ZodString;
37
+ }, z.core.$strict>;
38
+ export declare const QuestionOption: z.ZodObject<{
39
+ label: z.ZodString;
40
+ means: z.ZodString;
41
+ changes: z.ZodString;
42
+ }, z.core.$strict>;
43
+ export type QuestionOption = z.infer<typeof QuestionOption>;
44
+ export declare const QuestionAnswer: z.ZodObject<{
45
+ option: z.ZodOptional<z.ZodNumber>;
46
+ text: z.ZodOptional<z.ZodString>;
47
+ by: z.ZodString;
48
+ at: z.ZodISODateTime;
49
+ scope: z.ZodObject<{
50
+ level: z.ZodEnum<{
51
+ repo: "repo";
52
+ "repo-type": "repo-type";
53
+ }>;
54
+ id: z.ZodString;
55
+ }, z.core.$strict>;
56
+ skill: z.ZodOptional<z.ZodString>;
57
+ }, z.core.$strict>;
58
+ export type QuestionAnswer = z.infer<typeof QuestionAnswer>;
59
+ export declare const Question: z.ZodObject<{
60
+ schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
61
+ id: z.ZodString;
62
+ askedBy: z.ZodObject<{
63
+ step: z.ZodString;
64
+ command: z.ZodString;
65
+ run: z.ZodOptional<z.ZodString>;
66
+ at: z.ZodISODateTime;
67
+ }, z.core.$strict>;
68
+ alsoAskedBy: z.ZodOptional<z.ZodArray<z.ZodObject<{
69
+ step: z.ZodString;
70
+ command: z.ZodString;
71
+ run: z.ZodOptional<z.ZodString>;
72
+ at: z.ZodISODateTime;
73
+ rerun: z.ZodString;
74
+ }, z.core.$strict>>>;
75
+ repo: z.ZodString;
76
+ question: z.ZodString;
77
+ options: z.ZodDefault<z.ZodArray<z.ZodObject<{
78
+ label: z.ZodString;
79
+ means: z.ZodString;
80
+ changes: z.ZodString;
81
+ }, z.core.$strict>>>;
82
+ evidence: z.ZodArray<z.ZodString>;
83
+ scope: z.ZodObject<{
84
+ level: z.ZodEnum<{
85
+ repo: "repo";
86
+ "repo-type": "repo-type";
87
+ }>;
88
+ id: z.ZodString;
89
+ }, z.core.$strict>;
90
+ state: z.ZodEnum<{
91
+ retired: "retired";
92
+ open: "open";
93
+ answered: "answered";
94
+ }>;
95
+ rerun: z.ZodString;
96
+ answer: z.ZodOptional<z.ZodObject<{
97
+ option: z.ZodOptional<z.ZodNumber>;
98
+ text: z.ZodOptional<z.ZodString>;
99
+ by: z.ZodString;
100
+ at: z.ZodISODateTime;
101
+ scope: z.ZodObject<{
102
+ level: z.ZodEnum<{
103
+ repo: "repo";
104
+ "repo-type": "repo-type";
105
+ }>;
106
+ id: z.ZodString;
107
+ }, z.core.$strict>;
108
+ skill: z.ZodOptional<z.ZodString>;
109
+ }, z.core.$strict>>;
110
+ retired: z.ZodOptional<z.ZodObject<{
111
+ at: z.ZodISODateTime;
112
+ why: z.ZodString;
113
+ replacedBy: z.ZodOptional<z.ZodArray<z.ZodString>>;
114
+ }, z.core.$strict>>;
115
+ related: z.ZodOptional<z.ZodArray<z.ZodObject<{
116
+ id: z.ZodString;
117
+ verdict: z.ZodEnum<{
118
+ narrower: "narrower";
119
+ unsure: "unsure";
120
+ }>;
121
+ judgment: z.ZodOptional<z.ZodString>;
122
+ }, z.core.$strict>>>;
123
+ }, z.core.$strict>;
124
+ export type Question = z.infer<typeof Question>;
125
+ /**
126
+ * A question as an AI step raises it, inside its own YAML answer: Atticus adds the id, who
127
+ * asked and the rerun command, and checks every evidence line exists before writing it.
128
+ */
129
+ export declare const QuestionDraft: z.ZodObject<{
130
+ question: z.ZodString;
131
+ options: z.ZodDefault<z.ZodArray<z.ZodObject<{
132
+ label: z.ZodString;
133
+ means: z.ZodString;
134
+ changes: z.ZodString;
135
+ }, z.core.$strict>>>;
136
+ evidence: z.ZodArray<z.ZodString>;
137
+ scope: z.ZodDefault<z.ZodEnum<{
138
+ repo: "repo";
139
+ "repo-type": "repo-type";
140
+ }>>;
141
+ repoType: z.ZodOptional<z.ZodString>;
142
+ sameAs: z.ZodOptional<z.ZodObject<{
143
+ id: z.ZodString;
144
+ verdict: z.ZodEnum<{
145
+ answered: "answered";
146
+ narrower: "narrower";
147
+ same: "same";
148
+ }>;
149
+ quote: z.ZodString;
150
+ }, z.core.$strict>>;
151
+ }, z.core.$strict>;
152
+ export type QuestionDraft = z.infer<typeof QuestionDraft>;
@@ -0,0 +1,109 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * A repo type (ADR 0077, C6): org-pack/repo-types/<id>/type.yaml. What a kind of repo in the
4
+ * organisation looks like (its fingerprint), the scan settings every repo of the kind needs
5
+ * (as patterns, resolved against each repo), and the skills the survey hands the assistant.
6
+ * A new repo is matched against the known types deterministically (atticus repo-type detect),
7
+ * so what was learned on one repo of a type is reused on the next. Distinct from the platform
8
+ * profiles in profiles/<platform>/.
9
+ */
10
+ export declare const REPO_TYPE_SCHEMA_VERSION: 1;
11
+ /** The build files a dependency is looked for in when a signal doesn't say. */
12
+ export declare const DEFAULT_BUILD_FILES: string[];
13
+ export declare const FingerprintSignal: z.ZodDiscriminatedUnion<[z.ZodObject<{
14
+ weight: z.ZodNumber;
15
+ required: z.ZodDefault<z.ZodBoolean>;
16
+ kind: z.ZodLiteral<"build-file">;
17
+ globs: z.ZodArray<z.ZodString>;
18
+ }, z.core.$strict>, z.ZodObject<{
19
+ weight: z.ZodNumber;
20
+ required: z.ZodDefault<z.ZodBoolean>;
21
+ kind: z.ZodLiteral<"dependency">;
22
+ names: z.ZodArray<z.ZodString>;
23
+ in: z.ZodDefault<z.ZodArray<z.ZodString>>;
24
+ }, z.core.$strict>, z.ZodObject<{
25
+ weight: z.ZodNumber;
26
+ required: z.ZodDefault<z.ZodBoolean>;
27
+ kind: z.ZodLiteral<"marker">;
28
+ pattern: z.ZodString;
29
+ in: z.ZodArray<z.ZodString>;
30
+ }, z.core.$strict>, z.ZodObject<{
31
+ weight: z.ZodNumber;
32
+ required: z.ZodDefault<z.ZodBoolean>;
33
+ kind: z.ZodLiteral<"layout">;
34
+ globs: z.ZodArray<z.ZodString>;
35
+ }, z.core.$strict>], "kind">;
36
+ export type FingerprintSignal = z.infer<typeof FingerprintSignal>;
37
+ /**
38
+ * A path prefix every repo of the type sets the same way, as a pattern: read the value from a
39
+ * config key (`key`, in .properties or YAML files) or from the first group of a regular
40
+ * expression (`pattern`), in the first file matching `files`. Resolved against each repo into
41
+ * a cited scan-settings entry (ADR 0075), which the citation check then confirms.
42
+ */
43
+ export declare const PrefixRule: z.ZodObject<{
44
+ files: z.ZodArray<z.ZodString>;
45
+ key: z.ZodOptional<z.ZodString>;
46
+ pattern: z.ZodOptional<z.ZodString>;
47
+ paths: z.ZodArray<z.ZodString>;
48
+ why: z.ZodString;
49
+ }, z.core.$strict>;
50
+ export type PrefixRule = z.infer<typeof PrefixRule>;
51
+ export declare const SettingsTemplate: z.ZodObject<{
52
+ exclude: z.ZodDefault<z.ZodArray<z.ZodObject<{
53
+ path: z.ZodString;
54
+ why: z.ZodString;
55
+ }, z.core.$strict>>>;
56
+ prefixes: z.ZodDefault<z.ZodArray<z.ZodObject<{
57
+ files: z.ZodArray<z.ZodString>;
58
+ key: z.ZodOptional<z.ZodString>;
59
+ pattern: z.ZodOptional<z.ZodString>;
60
+ paths: z.ZodArray<z.ZodString>;
61
+ why: z.ZodString;
62
+ }, z.core.$strict>>>;
63
+ }, z.core.$strict>;
64
+ export type SettingsTemplate = z.infer<typeof SettingsTemplate>;
65
+ export declare const RepoType: z.ZodObject<{
66
+ schemaVersion: z.ZodLiteral<1>;
67
+ id: z.ZodString;
68
+ name: z.ZodString;
69
+ description: z.ZodString;
70
+ owner: z.ZodOptional<z.ZodString>;
71
+ fingerprint: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
72
+ weight: z.ZodNumber;
73
+ required: z.ZodDefault<z.ZodBoolean>;
74
+ kind: z.ZodLiteral<"build-file">;
75
+ globs: z.ZodArray<z.ZodString>;
76
+ }, z.core.$strict>, z.ZodObject<{
77
+ weight: z.ZodNumber;
78
+ required: z.ZodDefault<z.ZodBoolean>;
79
+ kind: z.ZodLiteral<"dependency">;
80
+ names: z.ZodArray<z.ZodString>;
81
+ in: z.ZodDefault<z.ZodArray<z.ZodString>>;
82
+ }, z.core.$strict>, z.ZodObject<{
83
+ weight: z.ZodNumber;
84
+ required: z.ZodDefault<z.ZodBoolean>;
85
+ kind: z.ZodLiteral<"marker">;
86
+ pattern: z.ZodString;
87
+ in: z.ZodArray<z.ZodString>;
88
+ }, z.core.$strict>, z.ZodObject<{
89
+ weight: z.ZodNumber;
90
+ required: z.ZodDefault<z.ZodBoolean>;
91
+ kind: z.ZodLiteral<"layout">;
92
+ globs: z.ZodArray<z.ZodString>;
93
+ }, z.core.$strict>], "kind">>;
94
+ settings: z.ZodDefault<z.ZodObject<{
95
+ exclude: z.ZodDefault<z.ZodArray<z.ZodObject<{
96
+ path: z.ZodString;
97
+ why: z.ZodString;
98
+ }, z.core.$strict>>>;
99
+ prefixes: z.ZodDefault<z.ZodArray<z.ZodObject<{
100
+ files: z.ZodArray<z.ZodString>;
101
+ key: z.ZodOptional<z.ZodString>;
102
+ pattern: z.ZodOptional<z.ZodString>;
103
+ paths: z.ZodArray<z.ZodString>;
104
+ why: z.ZodString;
105
+ }, z.core.$strict>>>;
106
+ }, z.core.$strict>>;
107
+ skills: z.ZodDefault<z.ZodArray<z.ZodString>>;
108
+ }, z.core.$strict>;
109
+ export type RepoType = z.infer<typeof RepoType>;