@cat-factory/kernel 0.37.0 → 0.38.1
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.
|
@@ -1,53 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
/** Sanitized basename the file is materialised under in the checkout (`.cat-context/<path>`). */
|
|
4
|
-
path: string;
|
|
5
|
-
title: string;
|
|
6
|
-
url: string;
|
|
7
|
-
/** The full file body as written into the container. */
|
|
8
|
-
content: string;
|
|
9
|
-
}
|
|
10
|
-
/** One best-practice fragment folded into the agent's system prompt. */
|
|
11
|
-
export interface AgentContextFragment {
|
|
12
|
-
id: string;
|
|
13
|
-
/** The fragment body that was appended to the system prompt. */
|
|
14
|
-
body: string;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* The complete, redacted context provided to one container-agent dispatch. A
|
|
18
|
-
* deliberate allow-list projection of the dispatched job body + run context — it
|
|
19
|
-
* NEVER carries credentials (the GitHub token, the proxy session token, a leased
|
|
20
|
-
* subscription token, or the clone URL that embeds them).
|
|
21
|
-
*/
|
|
22
|
-
export interface AgentContextSnapshot {
|
|
23
|
-
id: string;
|
|
24
|
-
workspaceId: string;
|
|
25
|
-
/** The run this dispatch belongs to. */
|
|
26
|
-
executionId: string;
|
|
27
|
-
agentKind: string;
|
|
28
|
-
/** The step's index within the run's pipeline (keys the snapshot to a step). */
|
|
29
|
-
stepIndex: number;
|
|
30
|
-
/** When the dispatch was captured (epoch ms). */
|
|
31
|
-
createdAt: number;
|
|
32
|
-
/** The resolved model id the step ran on (`provider:model`), or null. */
|
|
33
|
-
model: string | null;
|
|
34
|
-
/** The harness the job ran under (`pi` | `claude-code` | `codex`), or null. */
|
|
35
|
-
harness: string | null;
|
|
36
|
-
/** The fully fragment-composed system prompt sent to the harness. */
|
|
37
|
-
systemPrompt: string;
|
|
38
|
-
/** The assembled user prompt sent to the harness (with materialised context refs). */
|
|
39
|
-
userPrompt: string;
|
|
40
|
-
/** The best-practice fragments folded into the system prompt (id + body). */
|
|
41
|
-
fragments: AgentContextFragment[];
|
|
42
|
-
/** The files injected into the container as context, with full content. */
|
|
43
|
-
contextFiles: AgentContextFile[];
|
|
44
|
-
/**
|
|
45
|
-
* Redacted structural bits useful for debugging — repo owner/name/branches, the
|
|
46
|
-
* web-search flag, the infra spec, the run's decisions and revision feedback.
|
|
47
|
-
* Never any token, secret, or credential-bearing URL.
|
|
48
|
-
*/
|
|
49
|
-
extras: Record<string, unknown>;
|
|
50
|
-
}
|
|
1
|
+
import type { AgentContextFile, AgentContextFragment, AgentContextSnapshot } from '@cat-factory/contracts';
|
|
2
|
+
export type { AgentContextFile, AgentContextFragment, AgentContextSnapshot };
|
|
51
3
|
/**
|
|
52
4
|
* The fields the dispatch site hands to the recorder. The service assigns the `id`
|
|
53
5
|
* and `createdAt`, so they are omitted here. `stepIndex` keys the snapshot to a step.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-context.d.ts","sourceRoot":"","sources":["../../src/ports/agent-context.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"agent-context.d.ts","sourceRoot":"","sources":["../../src/ports/agent-context.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EACV,gBAAgB,EAChB,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,wBAAwB,CAAA;AAC/B,YAAY,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,CAAA;AAE5E;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAAG,IAAI,CAAC,oBAAoB,EAAE,IAAI,GAAG,WAAW,CAAC,CAAA;AAEpF;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB;IACnC,MAAM,CAAC,KAAK,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CACtD;AAED,MAAM,WAAW,8BAA8B;IAC7C,4CAA4C;IAC5C,MAAM,CAAC,QAAQ,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACrD,kDAAkD;IAClD,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,EAAE,CAAC,CAAA;IAC1F;;;;OAIG;IACH,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;CAClD"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { ProvisionedRepo } from '@cat-factory/contracts';
|
|
2
|
+
export type { ProvisionedRepo };
|
|
1
3
|
/**
|
|
2
4
|
* The permissions an installation token was actually granted, as reported by
|
|
3
5
|
* `POST /app/installations/{id}/access_tokens`. This is the intersection of the
|
|
@@ -23,14 +25,6 @@ export interface CreateRepoInput {
|
|
|
23
25
|
/** Seed the repo with an initial commit (so it has a default branch). */
|
|
24
26
|
autoInit?: boolean;
|
|
25
27
|
}
|
|
26
|
-
/** Identifying details of a freshly-created repository. */
|
|
27
|
-
export interface ProvisionedRepo {
|
|
28
|
-
githubId: number;
|
|
29
|
-
owner: string;
|
|
30
|
-
name: string;
|
|
31
|
-
defaultBranch: string | null;
|
|
32
|
-
private: boolean;
|
|
33
|
-
}
|
|
34
28
|
export interface GitHubProvisioningClient {
|
|
35
29
|
/**
|
|
36
30
|
* The permissions the installation token actually carries. Read this before a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github-provisioning.d.ts","sourceRoot":"","sources":["../../src/ports/github-provisioning.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"github-provisioning.d.ts","sourceRoot":"","sources":["../../src/ports/github-provisioning.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAC7D,YAAY,EAAE,eAAe,EAAE,CAAA;AAE/B;;;;;;;GAOG;AACH,MAAM,WAAW,uBAAuB;IACtC,mEAAmE;IACnE,cAAc,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IACjC,uEAAuE;IACvE,2BAA2B,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IAC9C,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IAC3B,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,CAAA;CAC7D;AAED,MAAM,WAAW,eAAe;IAC9B,6DAA6D;IAC7D,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,yEAAyE;IACzE,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,MAAM,WAAW,wBAAwB;IACvC;;;;OAIG;IACH,qBAAqB,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAA;IAC/E;;;OAGG;IACH,eAAe,CAAC,cAAc,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC,CAAA;CAC1F"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cat-factory/kernel",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.38.1",
|
|
4
4
|
"description": "Shared vocabulary, pure logic, and port interfaces for the Agent Architecture Board.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"ai": "^6.0.209",
|
|
28
|
-
"@cat-factory/contracts": "0.
|
|
28
|
+
"@cat-factory/contracts": "0.36.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"typescript": "7.0.1-rc"
|