@asc-agent/runtime 0.4.0 → 0.5.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.
- package/README.md +1 -1
- package/dist/adapters/claude-code/guard.js +26 -1
- package/dist/adapters/claude-code/install.d.ts +27 -0
- package/dist/adapters/claude-code/install.js +3 -1
- package/dist/adapters/fixture-surface/index.d.ts +33 -0
- package/dist/adapters/fixture-surface/index.js +97 -0
- package/dist/adapters/gitlab/adapter.js +1 -0
- package/dist/adapters/gitlab/client.d.ts +16 -2
- package/dist/adapters/gitlab/client.js +27 -0
- package/dist/adapters/gitlab/coordination.d.ts +19 -0
- package/dist/adapters/gitlab/coordination.js +111 -0
- package/dist/adapters/gitlab/ports.d.ts +6 -0
- package/dist/adapters/gitlab/ports.js +29 -2
- package/dist/adapters/local/canonical.d.ts +20 -0
- package/dist/adapters/local/canonical.js +58 -0
- package/dist/adapters/markdown/state-store.js +2 -1
- package/dist/adapters/service/launchd.js +18 -1
- package/dist/adapters/service/systemd-user.js +4 -1
- package/dist/adapters/webhook/ingress.d.ts +2 -2
- package/dist/cli/asc.js +569 -17
- package/dist/composition/runtime.d.ts +20 -0
- package/dist/composition/runtime.js +32 -1
- package/dist/core/attach/setup-plan.d.ts +107 -6
- package/dist/core/attach/setup-plan.js +104 -6
- package/dist/core/attach/setup.d.ts +3 -1
- package/dist/core/attach/setup.js +25 -1
- package/dist/core/binding/types.d.ts +1 -1
- package/dist/core/binding/types.js +1 -0
- package/dist/core/distribution/external-command.d.ts +26 -0
- package/dist/core/distribution/external-command.js +58 -1
- package/dist/core/distribution/persistent-runtime.d.ts +9 -0
- package/dist/core/distribution/release.d.ts +3 -3
- package/dist/core/distribution/release.js +1 -1
- package/dist/core/distribution/service-runtime.d.ts +40 -0
- package/dist/core/distribution/service-runtime.js +76 -0
- package/dist/core/runtime/coordination.d.ts +312 -0
- package/dist/core/runtime/coordination.js +247 -0
- package/dist/core/runtime/front.d.ts +10 -0
- package/dist/core/runtime/front.js +16 -1
- package/dist/core/runtime/publish.d.ts +107 -0
- package/dist/core/runtime/publish.js +153 -0
- package/dist/core/runtime/workspaces.d.ts +22 -0
- package/dist/core/runtime/workspaces.js +18 -0
- package/dist/ports/coordination-surface.d.ts +59 -0
- package/dist/ports/coordination-surface.js +16 -0
- package/dist/ports/resource-context.d.ts +5 -0
- package/dist/schemas/profile.d.ts +2 -2
- package/package.json +1 -1
|
@@ -22,6 +22,23 @@ const xml = (value) => value.replace(/&/g, '&').replace(/</g, '<').replac
|
|
|
22
22
|
*/
|
|
23
23
|
export function launchAgentPlist(command) {
|
|
24
24
|
const args = [command.program, ...command.args].map((arg) => ` <string>${xml(arg)}</string>`).join('\n');
|
|
25
|
+
// 키를 정렬해 적는다 — 같은 환경이면 같은 문서여야 CURRENT 판정이 선다.
|
|
26
|
+
const env = Object.entries(command.environment ?? {}).sort(([a], [b]) => a.localeCompare(b));
|
|
27
|
+
const environment = env.length === 0
|
|
28
|
+
? ''
|
|
29
|
+
: ` <key>EnvironmentVariables</key>
|
|
30
|
+
<dict>
|
|
31
|
+
${env.map(([key, value]) => ` <key>${xml(key)}</key>\n <string>${xml(value)}</string>`).join('\n')}
|
|
32
|
+
</dict>
|
|
33
|
+
`;
|
|
34
|
+
// 회차가 무엇을 했는지 볼 자리. 없으면 launchd 는 출력을 버리고, 실패는 종료 코드 하나로만 남는다.
|
|
35
|
+
const logs = command.logPath
|
|
36
|
+
? ` <key>StandardOutPath</key>
|
|
37
|
+
<string>${xml(command.logPath)}</string>
|
|
38
|
+
<key>StandardErrorPath</key>
|
|
39
|
+
<string>${xml(command.logPath)}</string>
|
|
40
|
+
`
|
|
41
|
+
: '';
|
|
25
42
|
return `<?xml version="1.0" encoding="UTF-8"?>
|
|
26
43
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
27
44
|
<plist version="1.0">
|
|
@@ -32,7 +49,7 @@ export function launchAgentPlist(command) {
|
|
|
32
49
|
<array>
|
|
33
50
|
${args}
|
|
34
51
|
</array>
|
|
35
|
-
<key>StartInterval</key>
|
|
52
|
+
${environment}${logs} <key>StartInterval</key>
|
|
36
53
|
<integer>${command.intervalSeconds}</integer>
|
|
37
54
|
<key>RunAtLoad</key>
|
|
38
55
|
<true/>
|
|
@@ -24,7 +24,10 @@ Description=ASC persistent runtime
|
|
|
24
24
|
[Service]
|
|
25
25
|
Type=oneshot
|
|
26
26
|
ExecStart=${[command.program, ...command.args].map(quote).join(' ')}
|
|
27
|
-
|
|
27
|
+
${Object.entries(command.environment ?? {})
|
|
28
|
+
.sort(([a], [b]) => a.localeCompare(b))
|
|
29
|
+
.map(([key, value]) => `Environment=${quote(`${key}=${value}`)}\n`)
|
|
30
|
+
.join('')}`;
|
|
28
31
|
}
|
|
29
32
|
export function timerUnit(command) {
|
|
30
33
|
return `[Unit]
|
|
@@ -32,8 +32,8 @@ export declare const IngressRecord: z.ZodObject<{
|
|
|
32
32
|
raw?: unknown;
|
|
33
33
|
hints?: Record<string, unknown> | undefined;
|
|
34
34
|
};
|
|
35
|
-
seq: number;
|
|
36
35
|
receivedAt: string;
|
|
36
|
+
seq: number;
|
|
37
37
|
}, {
|
|
38
38
|
event: {
|
|
39
39
|
detectedAt: string;
|
|
@@ -42,8 +42,8 @@ export declare const IngressRecord: z.ZodObject<{
|
|
|
42
42
|
raw?: unknown;
|
|
43
43
|
hints?: Record<string, unknown> | undefined;
|
|
44
44
|
};
|
|
45
|
-
seq: number;
|
|
46
45
|
receivedAt: string;
|
|
46
|
+
seq: number;
|
|
47
47
|
}>;
|
|
48
48
|
export type IngressRecord = z.infer<typeof IngressRecord>;
|
|
49
49
|
export type VerifyOutcome = {
|