mossbear 0.1.0-alpha.114 → 0.1.0-alpha.116
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 +1 -1
- package/dist/agent-comment-client.d.ts +1 -37
- package/dist/agent-comment-client.d.ts.map +1 -1
- package/dist/agent-comment-client.js +0 -50
- package/dist/agent-comment-client.js.map +1 -1
- package/dist/artifacts/artifact-comments-client.d.ts +3 -77
- package/dist/artifacts/artifact-comments-client.d.ts.map +1 -1
- package/dist/artifacts/artifact-comments-client.js +3 -103
- package/dist/artifacts/artifact-comments-client.js.map +1 -1
- package/dist/artifacts/classify.d.ts +2 -29
- package/dist/artifacts/classify.d.ts.map +1 -1
- package/dist/artifacts/classify.js +2 -27
- package/dist/artifacts/classify.js.map +1 -1
- package/dist/artifacts/claude-md-import.d.ts +0 -39
- package/dist/artifacts/claude-md-import.d.ts.map +1 -1
- package/dist/artifacts/claude-md-import.js +0 -40
- package/dist/artifacts/claude-md-import.js.map +1 -1
- package/dist/artifacts/committed.d.ts +4 -41
- package/dist/artifacts/committed.d.ts.map +1 -1
- package/dist/artifacts/committed.js +4 -41
- package/dist/artifacts/committed.js.map +1 -1
- package/dist/artifacts/delivered-skill-twins.d.ts +2 -39
- package/dist/artifacts/delivered-skill-twins.d.ts.map +1 -1
- package/dist/artifacts/delivered-skill-twins.js +33 -90
- package/dist/artifacts/delivered-skill-twins.js.map +1 -1
- package/dist/artifacts/promote-plan.d.ts.map +1 -1
- package/dist/artifacts/promote-plan.js +2 -24
- package/dist/artifacts/promote-plan.js.map +1 -1
- package/dist/artifacts/relink-mapping.d.ts +1 -4
- package/dist/artifacts/relink-mapping.d.ts.map +1 -1
- package/dist/artifacts/relink-mapping.js +3 -10
- package/dist/artifacts/relink-mapping.js.map +1 -1
- package/dist/artifacts/repo-config.d.ts +0 -13
- package/dist/artifacts/repo-config.d.ts.map +1 -1
- package/dist/artifacts/repo-config.js +0 -43
- package/dist/artifacts/repo-config.js.map +1 -1
- package/dist/artifacts/sidecar.d.ts +8 -21
- package/dist/artifacts/sidecar.d.ts.map +1 -1
- package/dist/artifacts/sidecar.js +35 -24
- package/dist/artifacts/sidecar.js.map +1 -1
- package/dist/artifacts/sync-acquisition.d.ts +51 -0
- package/dist/artifacts/sync-acquisition.d.ts.map +1 -0
- package/dist/artifacts/sync-acquisition.js +86 -0
- package/dist/artifacts/sync-acquisition.js.map +1 -0
- package/dist/artifacts/sync-artifacts.d.ts +11 -243
- package/dist/artifacts/sync-artifacts.d.ts.map +1 -1
- package/dist/artifacts/sync-artifacts.js +26 -1009
- package/dist/artifacts/sync-artifacts.js.map +1 -1
- package/dist/artifacts/sync-execution.d.ts +1 -21
- package/dist/artifacts/sync-execution.d.ts.map +1 -1
- package/dist/artifacts/sync-execution.js +10 -130
- package/dist/artifacts/sync-execution.js.map +1 -1
- package/dist/artifacts/sync-plan.d.ts +6 -184
- package/dist/artifacts/sync-plan.d.ts.map +1 -1
- package/dist/artifacts/sync-plan.js +17 -351
- package/dist/artifacts/sync-plan.js.map +1 -1
- package/dist/artifacts/sync-preparation.d.ts +29 -0
- package/dist/artifacts/sync-preparation.d.ts.map +1 -0
- package/dist/artifacts/sync-preparation.js +166 -0
- package/dist/artifacts/sync-preparation.js.map +1 -0
- package/dist/artifacts/sync-report.d.ts +92 -6
- package/dist/artifacts/sync-report.d.ts.map +1 -1
- package/dist/artifacts/sync-report.js +531 -5
- package/dist/artifacts/sync-report.js.map +1 -1
- package/dist/artifacts/twin-writer.d.ts +14 -0
- package/dist/artifacts/twin-writer.d.ts.map +1 -0
- package/dist/artifacts/twin-writer.js +31 -0
- package/dist/artifacts/twin-writer.js.map +1 -0
- package/dist/artifacts/working-skill-twins.d.ts +7 -0
- package/dist/artifacts/working-skill-twins.d.ts.map +1 -0
- package/dist/artifacts/working-skill-twins.js +217 -0
- package/dist/artifacts/working-skill-twins.js.map +1 -0
- package/dist/commands/comment.d.ts +1 -1
- package/dist/commands/comment.d.ts.map +1 -1
- package/dist/commands/comment.js +7 -10
- package/dist/commands/comment.js.map +1 -1
- package/dist/commands/comments.d.ts.map +1 -1
- package/dist/commands/comments.js +1 -4
- package/dist/commands/comments.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +1 -11
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/lifecycle.d.ts +2 -20
- package/dist/commands/lifecycle.d.ts.map +1 -1
- package/dist/commands/lifecycle.js +10 -52
- package/dist/commands/lifecycle.js.map +1 -1
- package/dist/commands/link.d.ts +1 -5
- package/dist/commands/link.d.ts.map +1 -1
- package/dist/commands/link.js +74 -58
- package/dist/commands/link.js.map +1 -1
- package/dist/commands/mcp.d.ts.map +1 -1
- package/dist/commands/mcp.js +2 -4
- package/dist/commands/mcp.js.map +1 -1
- package/dist/commands/promote.d.ts.map +1 -1
- package/dist/commands/promote.js +55 -1
- package/dist/commands/promote.js.map +1 -1
- package/dist/commands/pull.d.ts.map +1 -1
- package/dist/commands/pull.js +0 -1
- package/dist/commands/pull.js.map +1 -1
- package/dist/commands/recommend-dismissal.d.ts.map +1 -1
- package/dist/commands/recommend-dismissal.js +3 -2
- package/dist/commands/recommend-dismissal.js.map +1 -1
- package/dist/commands/search.d.ts +1 -1
- package/dist/commands/search.d.ts.map +1 -1
- package/dist/commands/search.js +3 -5
- package/dist/commands/search.js.map +1 -1
- package/dist/commands/unlink.d.ts.map +1 -1
- package/dist/commands/unlink.js +2 -14
- package/dist/commands/unlink.js.map +1 -1
- package/dist/context/materialize.d.ts +2 -0
- package/dist/context/materialize.d.ts.map +1 -1
- package/dist/context/materialize.js +4 -2
- package/dist/context/materialize.js.map +1 -1
- package/dist/guides/adoption-nudge.d.ts.map +1 -1
- package/dist/guides/adoption-nudge.js +0 -10
- package/dist/guides/adoption-nudge.js.map +1 -1
- package/dist/guides/delivered-status.d.ts +1 -3
- package/dist/guides/delivered-status.d.ts.map +1 -1
- package/dist/guides/delivered-status.js +1 -3
- package/dist/guides/delivered-status.js.map +1 -1
- package/dist/guides/import-client.d.ts +1 -1
- package/dist/http-retry.d.ts.map +1 -1
- package/dist/http-retry.js +30 -1
- package/dist/http-retry.js.map +1 -1
- package/dist/lifecycle/operations.d.ts +1 -18
- package/dist/lifecycle/operations.d.ts.map +1 -1
- package/dist/lifecycle/operations.js +9 -125
- package/dist/lifecycle/operations.js.map +1 -1
- package/dist/mcp/client.d.ts +115 -1
- package/dist/mcp/client.d.ts.map +1 -1
- package/dist/mcp/client.js +222 -1
- package/dist/mcp/client.js.map +1 -1
- package/dist/mcp/operations.d.ts +2 -25
- package/dist/mcp/operations.d.ts.map +1 -1
- package/dist/mcp/operations.js +24 -62
- package/dist/mcp/operations.js.map +1 -1
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +12 -11
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/write-items.d.ts +1 -0
- package/dist/mcp/write-items.d.ts.map +1 -1
- package/dist/mcp/write-items.js.map +1 -1
- package/dist/skill-twin-hook.d.ts +4 -21
- package/dist/skill-twin-hook.d.ts.map +1 -1
- package/dist/skill-twin-hook.js +10 -24
- package/dist/skill-twin-hook.js.map +1 -1
- package/dist/usage/snapshot-state.d.ts +2 -2
- package/package.json +4 -4
- package/dist/artifacts/alias-history.d.ts +0 -68
- package/dist/artifacts/alias-history.d.ts.map +0 -1
- package/dist/artifacts/alias-history.js +0 -125
- package/dist/artifacts/alias-history.js.map +0 -1
- package/dist/artifacts/alias-mirror.d.ts +0 -69
- package/dist/artifacts/alias-mirror.d.ts.map +0 -1
- package/dist/artifacts/alias-mirror.js +0 -261
- package/dist/artifacts/alias-mirror.js.map +0 -1
- package/dist/artifacts/skill-twin-edit.d.ts +0 -109
- package/dist/artifacts/skill-twin-edit.d.ts.map +0 -1
- package/dist/artifacts/skill-twin-edit.js +0 -331
- package/dist/artifacts/skill-twin-edit.js.map +0 -1
- package/dist/artifacts/skill-twins.d.ts +0 -130
- package/dist/artifacts/skill-twins.d.ts.map +0 -1
- package/dist/artifacts/skill-twins.js +0 -381
- package/dist/artifacts/skill-twins.js.map +0 -1
- package/dist/finding-dismissals-client.d.ts +0 -28
- package/dist/finding-dismissals-client.d.ts.map +0 -1
- package/dist/finding-dismissals-client.js +0 -25
- package/dist/finding-dismissals-client.js.map +0 -1
- package/dist/lifecycle/live-sessions.d.ts +0 -90
- package/dist/lifecycle/live-sessions.d.ts.map +0 -1
- package/dist/lifecycle/live-sessions.js +0 -170
- package/dist/lifecycle/live-sessions.js.map +0 -1
- package/dist/search-client.d.ts +0 -59
- package/dist/search-client.d.ts.map +0 -1
- package/dist/search-client.js +0 -130
- package/dist/search-client.js.map +0 -1
- package/dist/session-digest-client.d.ts +0 -36
- package/dist/session-digest-client.d.ts.map +0 -1
- package/dist/session-digest-client.js +0 -60
- package/dist/session-digest-client.js.map +0 -1
package/README.md
CHANGED
|
@@ -118,7 +118,7 @@ The CLI runs no LLM calls and holds no provider credentials, and produces no ver
|
|
|
118
118
|
1. **Action metadata** — tool-call types, one-line summaries, and file *paths*. Shell command text is secret-redacted and length-capped before upload; the local run log keeps the command as typed.
|
|
119
119
|
2. **Guide-file manifests** — the paths, formats and SHA-256 hashes of the instruction files that were in your agent's context, so a verdict can name which version of a guide it graded against.
|
|
120
120
|
3. **Token usage**, read out of the transcript locally.
|
|
121
|
-
4. **Selected content**: guidance you link, including skill member files, and context you capture or publish through the MCP server.
|
|
121
|
+
4. **Selected content**: guidance you link, including skill member files, and context you capture or publish through the MCP server. Local edits of delivered copies stay on disk and are reported, never uploaded. A repo whose `.mossbear/config.json` declares paths in a `published` block publishes those paths automatically, with no per-publish confirmation, from its published branch (`published.branch`, default `main`): the remote-tracking copy of that branch, or the local branch in a repo with no remote. A lifecycle command publishes when that branch has moved since the checkout last published, sending the branch's committed contents, never the working copy or the checkout's own branch, and using the `published` block on that branch. It never fetches: it reads only what the clone already has, so it publishes after a `git pull`, a `git push` from this clone, or in a fresh clone. The declaration does not show that a person reviewed or agreed to it. Other sync uploads are unaffected. Only declared paths are sent, and a path the branch no longer holds is removed from the bundle. These content uploads do not use the transcript excerpt filters.
|
|
122
122
|
5. **Narration**: a short account of what you and the agent said, which the dashboard shows as evidence beside a verdict. It is extracted from the transcript **on your machine**, has code blocks stripped structurally and secrets redacted before upload, and is length-capped on the wire. Recognized fenced and indented code blocks are removed, and tool-result bodies are excluded. Code or diffs copied into ordinary message text can remain in excerpts. Secret redaction uses patterns and is not a guarantee.
|
|
123
123
|
|
|
124
124
|
Narration is a per-repository setting. Turn it off to stop preparing new excerpts, user turns and closing summaries there. Pending user turns from that repository are discarded. Older queued turns without repository identity are also discarded before delivery. Turning narration back on does not restore discarded queue entries. An upload already started cannot be recalled. Update the CLI before relying on queued-turn deletion. Action metadata and selected content uploads are unaffected:
|
|
@@ -1,40 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* The CLI's write of an agent comment: `POST /api/v1/context/comments`.
|
|
3
|
-
*
|
|
4
|
-
* **One client, two callers** — the MCP `comment` tool and the
|
|
5
|
-
* `mossbear comment` verb — for the reason `search-client.ts` gives: two fetch
|
|
6
|
-
* calls are two places for the headers, the status handling and the response
|
|
7
|
-
* schema to drift. The response goes through the protocol's own parser, so a
|
|
8
|
-
* drifting server contract fails here rather than being reported to an agent as
|
|
9
|
-
* a comment that was left.
|
|
10
|
-
*
|
|
11
|
-
* Who the agent is is the caller's to say (`agent`), and the callers read it
|
|
12
|
-
* from the harness (`resolveAgentSession`); this module neither reads an
|
|
13
|
-
* environment nor makes an id up.
|
|
14
|
-
*/
|
|
15
|
-
import type { AgentCommentRequest, AgentCommentResponse } from '@mossbear/protocol';
|
|
16
|
-
export type CreateAgentCommentOptions = {
|
|
17
|
-
dashboardUrl: string;
|
|
18
|
-
token: string;
|
|
19
|
-
target: AgentCommentRequest['target'];
|
|
20
|
-
body: string;
|
|
21
|
-
/** The exact text of whole lines of the artifact this comment is about. */
|
|
22
|
-
passage?: string | undefined;
|
|
23
|
-
agent: {
|
|
24
|
-
sessionId: string;
|
|
25
|
-
harness: AgentCommentRequest['agent']['harness'];
|
|
26
|
-
model?: string | undefined;
|
|
27
|
-
};
|
|
28
|
-
/** This repo's committed `project.id`, so a reply by id prefix finds its repo's findings. */
|
|
29
|
-
projectId?: string | null;
|
|
30
|
-
/** The bundles this repo's comment read is scoped to, so a reply's id prefix is matched among them. */
|
|
31
|
-
bundleIds?: readonly string[] | undefined;
|
|
32
|
-
/** Defaults to the running CLI's own version. */
|
|
33
|
-
cliVersion?: string;
|
|
34
|
-
/** Override fetch for tests. Defaults to globalThis.fetch. */
|
|
35
|
-
fetchImpl?: typeof fetch;
|
|
36
|
-
};
|
|
37
|
-
export declare function createAgentComment(options: CreateAgentCommentOptions): Promise<AgentCommentResponse>;
|
|
1
|
+
import type { AgentCommentResponse } from '@mossbear/protocol';
|
|
38
2
|
/**
|
|
39
3
|
* What to tell the caller a create did, in one sentence. The two outcomes read
|
|
40
4
|
* differently on purpose: an agent that was handed back its earlier comment must
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-comment-client.d.ts","sourceRoot":"","sources":["../src/agent-comment-client.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"agent-comment-client.d.ts","sourceRoot":"","sources":["../src/agent-comment-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AAE9D;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,oBAAoB,GAAG,MAAM,CAIzE"}
|
|
@@ -1,53 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The CLI's write of an agent comment: `POST /api/v1/context/comments`.
|
|
3
|
-
*
|
|
4
|
-
* **One client, two callers** — the MCP `comment` tool and the
|
|
5
|
-
* `mossbear comment` verb — for the reason `search-client.ts` gives: two fetch
|
|
6
|
-
* calls are two places for the headers, the status handling and the response
|
|
7
|
-
* schema to drift. The response goes through the protocol's own parser, so a
|
|
8
|
-
* drifting server contract fails here rather than being reported to an agent as
|
|
9
|
-
* a comment that was left.
|
|
10
|
-
*
|
|
11
|
-
* Who the agent is is the caller's to say (`agent`), and the callers read it
|
|
12
|
-
* from the harness (`resolveAgentSession`); this module neither reads an
|
|
13
|
-
* environment nor makes an id up.
|
|
14
|
-
*/
|
|
15
|
-
import { parseAgentCommentResponse } from '@mossbear/protocol';
|
|
16
|
-
import { dashboardHttpError } from './dashboard-error.js';
|
|
17
|
-
import { trimTrailingSlashes } from './url.js';
|
|
18
|
-
import { CLI_VERSION } from './version.js';
|
|
19
|
-
export async function createAgentComment(options) {
|
|
20
|
-
const request = {
|
|
21
|
-
target: options.target,
|
|
22
|
-
body: options.body,
|
|
23
|
-
...(options.passage !== undefined ? { passage: options.passage } : {}),
|
|
24
|
-
agent: {
|
|
25
|
-
sessionId: options.agent.sessionId,
|
|
26
|
-
harness: options.agent.harness,
|
|
27
|
-
...(options.agent.model ? { model: options.agent.model } : {}),
|
|
28
|
-
cliVersion: options.cliVersion ?? CLI_VERSION,
|
|
29
|
-
},
|
|
30
|
-
...(options.projectId ? { projectId: options.projectId } : {}),
|
|
31
|
-
...(options.bundleIds && options.bundleIds.length > 0
|
|
32
|
-
? { bundleIds: [...options.bundleIds] }
|
|
33
|
-
: {}),
|
|
34
|
-
};
|
|
35
|
-
const response = await (options.fetchImpl ?? fetch)(`${trimTrailingSlashes(options.dashboardUrl)}/api/v1/context/comments`, {
|
|
36
|
-
method: 'POST',
|
|
37
|
-
headers: {
|
|
38
|
-
Authorization: `Bearer ${options.token}`,
|
|
39
|
-
'Content-Type': 'application/json',
|
|
40
|
-
},
|
|
41
|
-
body: JSON.stringify(request),
|
|
42
|
-
});
|
|
43
|
-
if (!response.ok) {
|
|
44
|
-
const text = await response.text().catch(() => '');
|
|
45
|
-
// The server's own sentence when it sent one ("This agent session has left
|
|
46
|
-
// 50 comments here"), the status form when a gateway answered instead.
|
|
47
|
-
throw dashboardHttpError('Comment', response.status, text);
|
|
48
|
-
}
|
|
49
|
-
return parseAgentCommentResponse(await response.json());
|
|
50
|
-
}
|
|
51
1
|
/**
|
|
52
2
|
* What to tell the caller a create did, in one sentence. The two outcomes read
|
|
53
3
|
* differently on purpose: an agent that was handed back its earlier comment must
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-comment-client.js","sourceRoot":"","sources":["../src/agent-comment-client.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"agent-comment-client.js","sourceRoot":"","sources":["../src/agent-comment-client.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAAC,MAA4B;IAC/D,OAAO,MAAM,CAAC,OAAO;QACnB,CAAC,CAAC,sBAAsB,MAAM,CAAC,OAAO,CAAC,EAAE,IAAI;QAC7C,CAAC,CAAC,sCAAsC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,KAAK,MAAM,CAAC,OAAO,CAAC,EAAE,qDAAqD,CAAA;AACzL,CAAC"}
|
|
@@ -1,26 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
|
|
3
|
-
* `POST /api/v1/context/comments/announcements`.
|
|
4
|
-
*
|
|
5
|
-
* **One client, three callers.** The `comments` verb, the MCP `pull` tool's comment read and
|
|
6
|
-
* the session-start hook are three ways into the same two requests, and the
|
|
7
|
-
* headers, the status handling and the response validation would otherwise be
|
|
8
|
-
* three places to drift. The same reasoning as the guide-history client beside
|
|
9
|
-
* it, and it takes its credentials directly for the same reason: this is a
|
|
10
|
-
* read of what a person left, not a context-layer mutation, so it is not a
|
|
11
|
-
* method on the context client.
|
|
12
|
-
*
|
|
13
|
-
* **Two requests because they are two acts.** Fetching bodies is a delivery
|
|
14
|
-
* and the server counts it as one. Announcing prints a number and no bodies,
|
|
15
|
-
* so it delivers nothing and is capped instead — per reader, per repo, on the
|
|
16
|
-
* server, because a count kept in the checkout resets with the clone and a
|
|
17
|
-
* count kept on the comment is shared by every reader.
|
|
18
|
-
*
|
|
19
|
-
* Responses go through the protocol's own parsers, so a drifting server
|
|
20
|
-
* contract fails here rather than putting an unvalidated payload in front of
|
|
21
|
-
* an agent.
|
|
22
|
-
*/
|
|
23
|
-
import { type AnnounceItemCommentsResponse, type CommentEvidenceResponse, type HarnessId, type ItemCommentsResponse, type ResolveItemCommentResponse } from '@mossbear/protocol';
|
|
1
|
+
/** Counted announcements; comment bodies, evidence and other writes live on ContextClient. */
|
|
2
|
+
import { type AnnounceItemCommentsResponse } from '@mossbear/protocol';
|
|
24
3
|
export type ArtifactCommentsRequestOptions = {
|
|
25
4
|
dashboardUrl: string;
|
|
26
5
|
token: string;
|
|
@@ -55,59 +34,6 @@ export type AnnounceArtifactCommentsOptions = ArtifactCommentsRequestOptions & {
|
|
|
55
34
|
*/
|
|
56
35
|
projectId: string;
|
|
57
36
|
};
|
|
58
|
-
/**
|
|
59
|
-
* Every open comment waiting for this reader in this repo.
|
|
60
|
-
*
|
|
61
|
-
* A deliberate read, so nothing about it is capped — and the server counts it
|
|
62
|
-
* as a delivery, which is what lets a comment's author tell an ignored request
|
|
63
|
-
* from an undelivered one.
|
|
64
|
-
*/
|
|
65
|
-
export declare function fetchArtifactComments(options: ArtifactCommentsRequestOptions): Promise<ItemCommentsResponse>;
|
|
66
|
-
/**
|
|
67
|
-
* The evidence behind one Mossbear comment this reader was handed: its claim,
|
|
68
|
-
* prediction and cited sessions.
|
|
69
|
-
*
|
|
70
|
-
* Takes the same bundles the comment read does, because the server finds the
|
|
71
|
-
* comment through that read: evidence exists here only for a comment
|
|
72
|
-
* `fetchArtifactComments` would return. A read, and not a delivery.
|
|
73
|
-
*/
|
|
74
|
-
export declare function fetchCommentEvidence(options: Pick<ArtifactCommentsRequestOptions, 'dashboardUrl' | 'token' | 'fetchImpl'> & {
|
|
75
|
-
id: string;
|
|
76
|
-
bundleIds: readonly string[];
|
|
77
|
-
/**
|
|
78
|
-
* This repo's committed `project.id`, when it has one. An edit drafted
|
|
79
|
-
* from one repo's sessions is withheld from a read that declares no repo,
|
|
80
|
-
* so without it that edit's evidence could never be read.
|
|
81
|
-
*/
|
|
82
|
-
projectId?: string | null;
|
|
83
|
-
/** Defaults to the running CLI's own version. */
|
|
84
|
-
cliVersion?: string;
|
|
85
|
-
}): Promise<CommentEvidenceResponse>;
|
|
86
|
-
/** Resolve one listed comment and leave the agent's account of its change. */
|
|
87
|
-
export declare function resolveArtifactComment(options: Pick<ArtifactCommentsRequestOptions, 'dashboardUrl' | 'token' | 'fetchImpl'> & {
|
|
88
|
-
id: string;
|
|
89
|
-
note: string;
|
|
90
|
-
bundleIds: readonly string[];
|
|
91
|
-
/**
|
|
92
|
-
* The artifact the comment is on. With it, the comment is found among that
|
|
93
|
-
* artifact's open comments, as its comments read listed them, and
|
|
94
|
-
* `bundleIds` is not consulted.
|
|
95
|
-
*/
|
|
96
|
-
artifactId?: string;
|
|
97
|
-
/** This repo's committed `project.id`, so its own repo-scoped comments resolve. */
|
|
98
|
-
projectId?: string | null;
|
|
99
|
-
/** Defaults to the running CLI's own version, so a listed draft resolves. */
|
|
100
|
-
cliVersion?: string;
|
|
101
|
-
/**
|
|
102
|
-
* The agent session resolving it, so its note is named after that session.
|
|
103
|
-
* Left out when the harness did not say which session this is.
|
|
104
|
-
*/
|
|
105
|
-
agent?: {
|
|
106
|
-
sessionId: string;
|
|
107
|
-
harness: HarnessId;
|
|
108
|
-
model?: string;
|
|
109
|
-
};
|
|
110
|
-
}): Promise<ResolveItemCommentResponse>;
|
|
111
37
|
/**
|
|
112
38
|
* Ask how many comments are waiting, and be counted as having said so.
|
|
113
39
|
*
|
|
@@ -115,7 +41,7 @@ export declare function resolveArtifactComment(options: Pick<ArtifactCommentsReq
|
|
|
115
41
|
* is how many were still under the per-repo cap, and it is what decides
|
|
116
42
|
* whether to say anything at all. Zero means this reader has already been told
|
|
117
43
|
* about every one of them as often as the cap allows — the comments are still
|
|
118
|
-
* there, and `fetchArtifactComments` is where they still are.
|
|
44
|
+
* there, and `ContextClient.fetchArtifactComments` is where they still are.
|
|
119
45
|
*/
|
|
120
46
|
export declare function announceArtifactComments(options: AnnounceArtifactCommentsOptions): Promise<AnnounceItemCommentsResponse>;
|
|
121
47
|
//# sourceMappingURL=artifact-comments-client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"artifact-comments-client.d.ts","sourceRoot":"","sources":["../../src/artifacts/artifact-comments-client.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"artifact-comments-client.d.ts","sourceRoot":"","sources":["../../src/artifacts/artifact-comments-client.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAE9F,OAAO,EAEL,KAAK,4BAA4B,EAClC,MAAM,oBAAoB,CAAA;AAO3B,MAAM,MAAM,8BAA8B,GAAG;IAC3C,YAAY,EAAE,MAAM,CAAA;IACpB,KAAK,EAAE,MAAM,CAAA;IACb;;;;;;;OAOG;IACH,SAAS,EAAE,SAAS,MAAM,EAAE,CAAA;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,iDAAiD;IACjD,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,8DAA8D;IAC9D,SAAS,CAAC,EAAE,OAAO,KAAK,CAAA;CACzB,CAAA;AAED,MAAM,MAAM,+BAA+B,GAAG,8BAA8B,GAAG;IAC7E;;;;;;OAMG;IACH,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED;;;;;;;;GAQG;AACH,wBAAsB,wBAAwB,CAC5C,OAAO,EAAE,+BAA+B,GACvC,OAAO,CAAC,4BAA4B,CAAC,CA2BvC"}
|
|
@@ -1,109 +1,9 @@
|
|
|
1
|
-
/**
|
|
2
|
-
|
|
3
|
-
* `POST /api/v1/context/comments/announcements`.
|
|
4
|
-
*
|
|
5
|
-
* **One client, three callers.** The `comments` verb, the MCP `pull` tool's comment read and
|
|
6
|
-
* the session-start hook are three ways into the same two requests, and the
|
|
7
|
-
* headers, the status handling and the response validation would otherwise be
|
|
8
|
-
* three places to drift. The same reasoning as the guide-history client beside
|
|
9
|
-
* it, and it takes its credentials directly for the same reason: this is a
|
|
10
|
-
* read of what a person left, not a context-layer mutation, so it is not a
|
|
11
|
-
* method on the context client.
|
|
12
|
-
*
|
|
13
|
-
* **Two requests because they are two acts.** Fetching bodies is a delivery
|
|
14
|
-
* and the server counts it as one. Announcing prints a number and no bodies,
|
|
15
|
-
* so it delivers nothing and is capped instead — per reader, per repo, on the
|
|
16
|
-
* server, because a count kept in the checkout resets with the clone and a
|
|
17
|
-
* count kept on the comment is shared by every reader.
|
|
18
|
-
*
|
|
19
|
-
* Responses go through the protocol's own parsers, so a drifting server
|
|
20
|
-
* contract fails here rather than putting an unvalidated payload in front of
|
|
21
|
-
* an agent.
|
|
22
|
-
*/
|
|
23
|
-
import { parseAnnounceItemCommentsResponse, parseCommentEvidenceResponse, parseItemCommentsResponse, parseResolveItemCommentResponse, } from '@mossbear/protocol';
|
|
1
|
+
/** Counted announcements; comment bodies, evidence and other writes live on ContextClient. */
|
|
2
|
+
import { parseAnnounceItemCommentsResponse, } from '@mossbear/protocol';
|
|
24
3
|
import { dashboardHttpError } from '../dashboard-error.js';
|
|
25
4
|
import { fetchWithRetry } from '../http-retry.js';
|
|
26
5
|
import { trimTrailingSlashes } from '../url.js';
|
|
27
6
|
import { CLI_VERSION } from '../version.js';
|
|
28
|
-
/**
|
|
29
|
-
* Every open comment waiting for this reader in this repo.
|
|
30
|
-
*
|
|
31
|
-
* A deliberate read, so nothing about it is capped — and the server counts it
|
|
32
|
-
* as a delivery, which is what lets a comment's author tell an ignored request
|
|
33
|
-
* from an undelivered one.
|
|
34
|
-
*/
|
|
35
|
-
export async function fetchArtifactComments(options) {
|
|
36
|
-
// Answered without a round trip rather than as an empty request: a repo that
|
|
37
|
-
// subscribes to nothing has no comments about its context, and that is a state
|
|
38
|
-
// rather than something the server has to be asked about.
|
|
39
|
-
if (options.bundleIds.length === 0)
|
|
40
|
-
return { comments: [] };
|
|
41
|
-
const params = new URLSearchParams({ bundles: options.bundleIds.join(',') });
|
|
42
|
-
if (options.since)
|
|
43
|
-
params.set('since', options.since);
|
|
44
|
-
if (options.projectId)
|
|
45
|
-
params.set('project', options.projectId);
|
|
46
|
-
// The server lists Mossbear's findings only to a release that can tell one
|
|
47
|
-
// from a person's request, so it must know which release is asking.
|
|
48
|
-
params.set('cli', options.cliVersion ?? CLI_VERSION);
|
|
49
|
-
const url = `${commentsBase(options.dashboardUrl)}?${params.toString()}`;
|
|
50
|
-
const fetchImpl = options.fetchImpl ?? fetch;
|
|
51
|
-
const response = await fetchImpl(url, {
|
|
52
|
-
headers: { Authorization: `Bearer ${options.token}` },
|
|
53
|
-
});
|
|
54
|
-
if (!response.ok)
|
|
55
|
-
throw await refusal(response);
|
|
56
|
-
return parseItemCommentsResponse(await response.json());
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* The evidence behind one Mossbear comment this reader was handed: its claim,
|
|
60
|
-
* prediction and cited sessions.
|
|
61
|
-
*
|
|
62
|
-
* Takes the same bundles the comment read does, because the server finds the
|
|
63
|
-
* comment through that read: evidence exists here only for a comment
|
|
64
|
-
* `fetchArtifactComments` would return. A read, and not a delivery.
|
|
65
|
-
*/
|
|
66
|
-
export async function fetchCommentEvidence(options) {
|
|
67
|
-
const params = new URLSearchParams({
|
|
68
|
-
id: options.id,
|
|
69
|
-
bundles: options.bundleIds.join(','),
|
|
70
|
-
});
|
|
71
|
-
if (options.projectId)
|
|
72
|
-
params.set('project', options.projectId);
|
|
73
|
-
// The server withholds a citation kind a CLI too old to parse it would reject
|
|
74
|
-
// the whole response for, so it must know which release is asking.
|
|
75
|
-
params.set('cli', options.cliVersion ?? CLI_VERSION);
|
|
76
|
-
const fetchImpl = options.fetchImpl ?? fetch;
|
|
77
|
-
const response = await fetchImpl(`${commentsBase(options.dashboardUrl)}/evidence?${params.toString()}`, { headers: { Authorization: `Bearer ${options.token}` } });
|
|
78
|
-
if (!response.ok)
|
|
79
|
-
throw await refusal(response);
|
|
80
|
-
return parseCommentEvidenceResponse(await response.json());
|
|
81
|
-
}
|
|
82
|
-
/** Resolve one listed comment and leave the agent's account of its change. */
|
|
83
|
-
export async function resolveArtifactComment(options) {
|
|
84
|
-
const fetchImpl = options.fetchImpl ?? fetch;
|
|
85
|
-
const response = await fetchImpl(`${commentsBase(options.dashboardUrl)}/resolve`, {
|
|
86
|
-
method: 'POST',
|
|
87
|
-
headers: {
|
|
88
|
-
Authorization: `Bearer ${options.token}`,
|
|
89
|
-
'Content-Type': 'application/json',
|
|
90
|
-
},
|
|
91
|
-
body: JSON.stringify({
|
|
92
|
-
id: options.id,
|
|
93
|
-
note: options.note,
|
|
94
|
-
bundleIds: [...options.bundleIds],
|
|
95
|
-
...(options.artifactId ? { artifactId: options.artifactId } : {}),
|
|
96
|
-
...(options.projectId ? { projectId: options.projectId } : {}),
|
|
97
|
-
cliVersion: options.cliVersion ?? CLI_VERSION,
|
|
98
|
-
...(options.agent
|
|
99
|
-
? { agent: { ...options.agent, cliVersion: options.cliVersion ?? CLI_VERSION } }
|
|
100
|
-
: {}),
|
|
101
|
-
}),
|
|
102
|
-
});
|
|
103
|
-
if (!response.ok)
|
|
104
|
-
throw await refusal(response);
|
|
105
|
-
return parseResolveItemCommentResponse(await response.json());
|
|
106
|
-
}
|
|
107
7
|
/**
|
|
108
8
|
* Ask how many comments are waiting, and be counted as having said so.
|
|
109
9
|
*
|
|
@@ -111,7 +11,7 @@ export async function resolveArtifactComment(options) {
|
|
|
111
11
|
* is how many were still under the per-repo cap, and it is what decides
|
|
112
12
|
* whether to say anything at all. Zero means this reader has already been told
|
|
113
13
|
* about every one of them as often as the cap allows — the comments are still
|
|
114
|
-
* there, and `fetchArtifactComments` is where they still are.
|
|
14
|
+
* there, and `ContextClient.fetchArtifactComments` is where they still are.
|
|
115
15
|
*/
|
|
116
16
|
export async function announceArtifactComments(options) {
|
|
117
17
|
if (options.bundleIds.length === 0)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"artifact-comments-client.js","sourceRoot":"","sources":["../../src/artifacts/artifact-comments-client.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"artifact-comments-client.js","sourceRoot":"","sources":["../../src/artifacts/artifact-comments-client.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAE9F,OAAO,EACL,iCAAiC,GAElC,MAAM,oBAAoB,CAAA;AAE3B,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAA;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAsC3C;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAC5C,OAAwC;IAExC,IAAI,OAAO,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAA;IAEpE,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,IAAI,KAAK,CAAA;IAC5C,2EAA2E;IAC3E,0EAA0E;IAC1E,MAAM,QAAQ,GAAG,MAAM,cAAc,CACnC,SAAS,EACT,GAAG,YAAY,CAAC,OAAO,CAAC,YAAY,CAAC,gBAAgB,EACrD;QACE,MAAM,EAAE,MAAM;QACd,OAAO,EAAE;YACP,aAAa,EAAE,UAAU,OAAO,CAAC,KAAK,EAAE;YACxC,cAAc,EAAE,kBAAkB;SACnC;QACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;YACnB,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,SAAS,EAAE,CAAC,GAAG,OAAO,CAAC,SAAS,CAAC;YACjC,oEAAoE;YACpE,wBAAwB;YACxB,UAAU,EAAE,OAAO,CAAC,UAAU,IAAI,WAAW;SAC9C,CAAC;KACH,EACD,EAAE,WAAW,EAAE,CAAC,EAAE,CACnB,CAAA;IACD,IAAI,CAAC,QAAQ,CAAC,EAAE;QAAE,MAAM,MAAM,OAAO,CAAC,QAAQ,CAAC,CAAA;IAC/C,OAAO,iCAAiC,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAA;AACjE,CAAC;AAED,SAAS,YAAY,CAAC,YAAoB;IACxC,OAAO,GAAG,mBAAmB,CAAC,YAAY,CAAC,0BAA0B,CAAA;AACvE,CAAC;AAED;;;;;;;GAOG;AACH,KAAK,UAAU,OAAO,CAAC,QAAkB;IACvC,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,CAAA;IAClD,OAAO,kBAAkB,CAAC,UAAU,EAAE,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;AAC9D,CAAC"}
|
|
@@ -30,13 +30,8 @@
|
|
|
30
30
|
* matches nothing in the history → `edited` — the user's work, never touch
|
|
31
31
|
* could not be established → `unknown` — assume the user's work
|
|
32
32
|
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
* *push*: `unreadable` carries no evidence at all, while `lookback-exhausted`
|
|
36
|
-
* carries evidence pointing the wrong way — the file matched none of the
|
|
37
|
-
* versions we managed to check, yet older ones went unchecked, so it may be one
|
|
38
|
-
* of our own ancient copies. Pushing that republishes stale content as canonical
|
|
39
|
-
* for every subscriber. See `blocksPush`.
|
|
33
|
+
* Unknown bytes are preserved: a failed or bounded history read never licenses
|
|
34
|
+
* overwriting a file.
|
|
40
35
|
*
|
|
41
36
|
* Kept free of citty/console so it unit-tests against a mocked client.
|
|
42
37
|
*/
|
|
@@ -107,26 +102,4 @@ export declare function matchesStoredHash(localBytes: string, contentHash: strin
|
|
|
107
102
|
export declare function classifyLocalFile(client: ContextClient, bundleId: string, item: ContextItem, localBytes: string): Promise<LocalClassification>;
|
|
108
103
|
/** True when a classification means "the user's work — do not overwrite". */
|
|
109
104
|
export declare function isUserOwned(classification: LocalClassification): boolean;
|
|
110
|
-
/**
|
|
111
|
-
* True when these bytes must not be sent back to the server.
|
|
112
|
-
*
|
|
113
|
-
* Only `lookback-exhausted` blocks. It is the one classification carrying
|
|
114
|
-
* evidence that points the wrong way: the file matched none of the versions we
|
|
115
|
-
* looked at, but older ones went unchecked, so it may well be one of our own
|
|
116
|
-
* ancient copies. Pushing it would republish stale content as the newest
|
|
117
|
-
* version — for every repo subscribed to that bundle, from an unattended Stop
|
|
118
|
-
* hook, with no one watching.
|
|
119
|
-
*
|
|
120
|
-
* The asymmetry with `isUserOwned` is deliberate. Refusing to *overwrite* on any
|
|
121
|
-
* uncertainty protects the user's file; refusing to *push* protects everyone
|
|
122
|
-
* else's. Without this the same user action — reverting a doc to an earlier
|
|
123
|
-
* version — resolved opposite ways depending only on how long that doc's history
|
|
124
|
-
* happened to be: inside the lookback it was recognized and pulled, past it, it
|
|
125
|
-
* was pushed over the canonical copy.
|
|
126
|
-
*/
|
|
127
|
-
export declare function blocksPush(classification: LocalClassification): classification is {
|
|
128
|
-
state: 'unknown';
|
|
129
|
-
cause: 'lookback-exhausted';
|
|
130
|
-
reason: string;
|
|
131
|
-
};
|
|
132
105
|
//# sourceMappingURL=classify.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"classify.d.ts","sourceRoot":"","sources":["../../src/artifacts/classify.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"classify.d.ts","sourceRoot":"","sources":["../../src/artifacts/classify.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAKH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAErD;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,MAAM,CAAA;AAKvC,MAAM,MAAM,mBAAmB,GAC3B;IAAE,KAAK,EAAE,SAAS,CAAA;CAAE,GACpB;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GACnC;IAAE,KAAK,EAAE,QAAQ,CAAA;CAAE;AACrB;;;;;;;;;;GAUG;GACD;IAAE,KAAK,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,YAAY,GAAG,oBAAoB,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAA;AAEpF;;;;;;;;;;;GAWG;AACH,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,CAEpE;AAED,mFAAmF;AACnF,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAIlF;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,aAAa,EACrB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,WAAW,EACjB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,mBAAmB,CAAC,CAmD9B;AAED,6EAA6E;AAC7E,wBAAgB,WAAW,CAAC,cAAc,EAAE,mBAAmB,GAAG,OAAO,CAExE"}
|
|
@@ -30,13 +30,8 @@
|
|
|
30
30
|
* matches nothing in the history → `edited` — the user's work, never touch
|
|
31
31
|
* could not be established → `unknown` — assume the user's work
|
|
32
32
|
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
* *push*: `unreadable` carries no evidence at all, while `lookback-exhausted`
|
|
36
|
-
* carries evidence pointing the wrong way — the file matched none of the
|
|
37
|
-
* versions we managed to check, yet older ones went unchecked, so it may be one
|
|
38
|
-
* of our own ancient copies. Pushing that republishes stale content as canonical
|
|
39
|
-
* for every subscriber. See `blocksPush`.
|
|
33
|
+
* Unknown bytes are preserved: a failed or bounded history read never licenses
|
|
34
|
+
* overwriting a file.
|
|
40
35
|
*
|
|
41
36
|
* Kept free of citty/console so it unit-tests against a mocked client.
|
|
42
37
|
*/
|
|
@@ -142,24 +137,4 @@ export async function classifyLocalFile(client, bundleId, item, localBytes) {
|
|
|
142
137
|
export function isUserOwned(classification) {
|
|
143
138
|
return classification.state === 'edited' || classification.state === 'unknown';
|
|
144
139
|
}
|
|
145
|
-
/**
|
|
146
|
-
* True when these bytes must not be sent back to the server.
|
|
147
|
-
*
|
|
148
|
-
* Only `lookback-exhausted` blocks. It is the one classification carrying
|
|
149
|
-
* evidence that points the wrong way: the file matched none of the versions we
|
|
150
|
-
* looked at, but older ones went unchecked, so it may well be one of our own
|
|
151
|
-
* ancient copies. Pushing it would republish stale content as the newest
|
|
152
|
-
* version — for every repo subscribed to that bundle, from an unattended Stop
|
|
153
|
-
* hook, with no one watching.
|
|
154
|
-
*
|
|
155
|
-
* The asymmetry with `isUserOwned` is deliberate. Refusing to *overwrite* on any
|
|
156
|
-
* uncertainty protects the user's file; refusing to *push* protects everyone
|
|
157
|
-
* else's. Without this the same user action — reverting a doc to an earlier
|
|
158
|
-
* version — resolved opposite ways depending only on how long that doc's history
|
|
159
|
-
* happened to be: inside the lookback it was recognized and pulled, past it, it
|
|
160
|
-
* was pushed over the canonical copy.
|
|
161
|
-
*/
|
|
162
|
-
export function blocksPush(classification) {
|
|
163
|
-
return (classification.state === 'unknown' && classification.cause === 'lookback-exhausted');
|
|
164
|
-
}
|
|
165
140
|
//# sourceMappingURL=classify.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"classify.js","sourceRoot":"","sources":["../../src/artifacts/classify.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"classify.js","sourceRoot":"","sources":["../../src/artifacts/classify.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoC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AAK,SAAS,CAAA;AAChF,CAAC"}
|
|
@@ -18,8 +18,6 @@
|
|
|
18
18
|
* Pure functions over strings, plus one write helper with the same gate the
|
|
19
19
|
* mirror used — so every rule here is testable without a checkout.
|
|
20
20
|
*/
|
|
21
|
-
import type { CommittedProbe } from './committed.js';
|
|
22
|
-
import type { ConflictResolution } from './sync-plan.js';
|
|
23
21
|
/** The repo-root file Mossbear delivers into and owns. */
|
|
24
22
|
export declare const AGENTS_MD = "AGENTS.md";
|
|
25
23
|
/** The repo-root file Claude Code reads, which belongs to the person who keeps it. */
|
|
@@ -82,43 +80,6 @@ export declare function inspectClaudeMd(root: string, deps?: ClaudeMdDeps): Prom
|
|
|
82
80
|
agents: string | undefined;
|
|
83
81
|
claude: string | undefined;
|
|
84
82
|
}>;
|
|
85
|
-
export type ClaudeMdSwapOutcome =
|
|
86
|
-
/** Replaced with the one-line import. */
|
|
87
|
-
'swapped'
|
|
88
|
-
/** Held: `CLAUDE.md` carries uncommitted changes, or git has no answer for it. */
|
|
89
|
-
| 'held-uncommitted'
|
|
90
|
-
/** The write failed. */
|
|
91
|
-
| 'failed';
|
|
92
|
-
export type ClaudeMdSwapResult = {
|
|
93
|
-
outcome: ClaudeMdSwapOutcome;
|
|
94
|
-
error?: string;
|
|
95
|
-
};
|
|
96
|
-
/**
|
|
97
|
-
* The rollout: swap a `CLAUDE.md` still byte-identical to `AGENTS.md` for the
|
|
98
|
-
* one-line import. Returns `null` when there is nothing to swap.
|
|
99
|
-
*
|
|
100
|
-
* **Why this has to happen, and cannot wait for `doctor`.** In a repo that held
|
|
101
|
-
* both files, the mirror was what kept `CLAUDE.md` in step with `AGENTS.md`.
|
|
102
|
-
* Without it the next edit to `AGENTS.md` never reaches `CLAUDE.md` — and
|
|
103
|
-
* Claude reads that stale `CLAUDE.md` *instead of* `AGENTS.md`, with nothing
|
|
104
|
-
* reporting it. An identical file is one nobody put anything of their own into,
|
|
105
|
-
* so the swap loses nothing; a divergent one is left for `doctor` to report.
|
|
106
|
-
*
|
|
107
|
-
* **Only where `AGENTS.md` is delivered here**, which the caller decides: a repo
|
|
108
|
-
* whose `AGENTS.md` is not Mossbear's never had the mirror, and a copy the
|
|
109
|
-
* person made by hand is theirs to replace (`init` offers to).
|
|
110
|
-
*
|
|
111
|
-
* **The same gate the mirror used**: written only where git holds exactly the
|
|
112
|
-
* bytes on disk, so the swap is a clean diff `git checkout` gives back.
|
|
113
|
-
* Modified, untracked and no-answer are held. `conflict: 'remote'` is the
|
|
114
|
-
* person saying "overwrite my copy", and it cannot arrive from a hook.
|
|
115
|
-
*/
|
|
116
|
-
export declare function swapIdenticalClaudeMd(input: {
|
|
117
|
-
root: string;
|
|
118
|
-
committed: CommittedProbe;
|
|
119
|
-
conflict: ConflictResolution;
|
|
120
|
-
deps?: ClaudeMdDeps;
|
|
121
|
-
}): Promise<ClaudeMdSwapResult | null>;
|
|
122
83
|
/**
|
|
123
84
|
* True when a placement mapping at the root `CLAUDE.md` should be released
|
|
124
85
|
* because the server now holds the guide at a different root file.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude-md-import.d.ts","sourceRoot":"","sources":["../../src/artifacts/claude-md-import.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAOH,
|
|
1
|
+
{"version":3,"file":"claude-md-import.d.ts","sourceRoot":"","sources":["../../src/artifacts/claude-md-import.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAOH,0DAA0D;AAC1D,eAAO,MAAM,SAAS,cAAc,CAAA;AAEpC,sFAAsF;AACtF,eAAO,MAAM,SAAS,cAAc,CAAA;AAEpC,oDAAoD;AACpD,eAAO,MAAM,kBAAkB,eAAe,CAAA;AAE9C,8EAA8E;AAC9E,eAAO,MAAM,kBAAkB,iBAA4B,CAAA;AAE3D;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEpD;AAED,kFAAkF;A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IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;CAAE,GAC3E,OAAO,CAQT;AAED,yCAAyC;AACzC,MAAM,MAAM,mBAAmB;AAC7B,+FAA+F;AAC7F,MAAM;AACR,4BAA4B;GAC1B,UAAU;AACZ,yDAAyD;GACvD,SAAS;AACX,oEAAoE;GAClE,UAAU;AACZ,qEAAqE;GACnE,WAAW,CAAA;AAEf;;;;;;;;;GASG;AACH,wBAAsB,mBAAmB,CAAC,KAAK,EAAE;IAC/C,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,OAAO,CAAA;IACpB,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;IAC7C,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IAC3B,IAAI,CAAC,EAAE,YAAY,CAAA;CACpB,GAAG,OAAO,CAAC;IAAE,OAAO,EAAE,mBAAmB,CAAC;IAAC,KAAK,EAAE,aAAa,CAAA;CAAE,CAAC,CAGlE;AA+DD;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,GAAG,IAAI,CAM1E"}
|
|
@@ -122,46 +122,6 @@ export async function inspectClaudeMd(root, deps = {}) {
|
|
|
122
122
|
const claude = await readIfPresent(resolve(root, CLAUDE_MD), readFileFn);
|
|
123
123
|
return { state: classifyClaudeMd({ agents, claude }), agents, claude };
|
|
124
124
|
}
|
|
125
|
-
/**
|
|
126
|
-
* The rollout: swap a `CLAUDE.md` still byte-identical to `AGENTS.md` for the
|
|
127
|
-
* one-line import. Returns `null` when there is nothing to swap.
|
|
128
|
-
*
|
|
129
|
-
* **Why this has to happen, and cannot wait for `doctor`.** In a repo that held
|
|
130
|
-
* both files, the mirror was what kept `CLAUDE.md` in step with `AGENTS.md`.
|
|
131
|
-
* Without it the next edit to `AGENTS.md` never reaches `CLAUDE.md` — and
|
|
132
|
-
* Claude reads that stale `CLAUDE.md` *instead of* `AGENTS.md`, with nothing
|
|
133
|
-
* reporting it. An identical file is one nobody put anything of their own into,
|
|
134
|
-
* so the swap loses nothing; a divergent one is left for `doctor` to report.
|
|
135
|
-
*
|
|
136
|
-
* **Only where `AGENTS.md` is delivered here**, which the caller decides: a repo
|
|
137
|
-
* whose `AGENTS.md` is not Mossbear's never had the mirror, and a copy the
|
|
138
|
-
* person made by hand is theirs to replace (`init` offers to).
|
|
139
|
-
*
|
|
140
|
-
* **The same gate the mirror used**: written only where git holds exactly the
|
|
141
|
-
* bytes on disk, so the swap is a clean diff `git checkout` gives back.
|
|
142
|
-
* Modified, untracked and no-answer are held. `conflict: 'remote'` is the
|
|
143
|
-
* person saying "overwrite my copy", and it cannot arrive from a hook.
|
|
144
|
-
*/
|
|
145
|
-
export async function swapIdenticalClaudeMd(input) {
|
|
146
|
-
const { root, committed, conflict, deps = {} } = input;
|
|
147
|
-
const writeFileFn = deps.writeFileFn ?? ((path, data) => writeProjectFile(root, path, data));
|
|
148
|
-
const { state, claude } = await inspectClaudeMd(root, deps);
|
|
149
|
-
if (state !== 'identical' || claude === undefined)
|
|
150
|
-
return null;
|
|
151
|
-
if (conflict !== 'remote' && committed.state(CLAUDE_MD, claude)?.kind !== 'committed') {
|
|
152
|
-
return { outcome: 'held-uncommitted' };
|
|
153
|
-
}
|
|
154
|
-
try {
|
|
155
|
-
await writeFileFn(resolve(root, CLAUDE_MD), AGENTS_IMPORT_FILE);
|
|
156
|
-
return { outcome: 'swapped' };
|
|
157
|
-
}
|
|
158
|
-
catch (err) {
|
|
159
|
-
return {
|
|
160
|
-
outcome: 'failed',
|
|
161
|
-
error: err instanceof Error ? err.message : String(err),
|
|
162
|
-
};
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
125
|
/**
|
|
166
126
|
* True when a placement mapping at the root `CLAUDE.md` should be released
|
|
167
127
|
* because the server now holds the guide at a different root file.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude-md-import.js","sourceRoot":"","sources":["../../src/artifacts/claude-md-import.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAEnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"claude-md-import.js","sourceRoot":"","sources":["../../src/artifacts/claude-md-import.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAEnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAEtD,0DAA0D;AAC1D,MAAM,CAAC,MAAM,SAAS,GAAG,WAAW,CAAA;AAEpC,sFAAsF;AACtF,MAAM,CAAC,MAAM,SAAS,GAAG,WAAW,CAAA;AAEpC,oDAAoD;AACpD,MAAM,CAAC,MAAM,kBAAkB,GAAG,YAAY,CAAA;AAE9C,8EAA8E;AAC9E,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,kBAAkB,IAAI,CAAA;AAE3D;;;;;;;GAOG;AACH,MAAM,UAAU,cAAc,CAAC,IAAY;IACzC,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,WAAW,EAAE,KAAK,WAAW,CAAA;AACtF,CAAC;AAED,kFAAkF;AAClF,MAAM,UAAU,cAAc,CAAC,IAAY;IACzC,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,WAAW,EAAE,KAAK,WAAW,CAAA;AACtF,CAAC;AAED;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