@playcraft/cli 0.1.80 → 0.1.81
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/apk-replication/client.js +285 -0
- package/dist/apk-replication/messages.js +75 -0
- package/dist/apk-replication/summary.js +122 -0
- package/dist/cli-root-help.js +1 -0
- package/dist/commands/apk.js +66 -0
- package/dist/index.js +7 -3
- package/dist/recording/project-digest.js +1 -1
- package/dist/utils/agent-api-client.js +15 -0
- package/dist/utils/video-evidence-git.js +12 -7
- package/dist/workspace-runtime/batch/deliver.js +110 -38
- package/dist/workspace-runtime/batch/generate.js +42 -10
- package/dist/workspace-runtime/batch/policy.js +4 -2
- package/dist/workspace-runtime/batch/processes.js +1 -1
- package/dist/workspace-runtime/batch/records.js +4 -1
- package/dist/workspace-runtime/batch/source-capture.js +104 -4
- package/dist/workspace-runtime/codex/app-server.js +4 -2
- package/dist/workspace-runtime/codex/permissions.js +8 -1
- package/dist/workspace-runtime/workspaces/archive.js +1 -1
- package/dist/workspace-runtime/workspaces/cli-context.js +1 -0
- package/dist/workspace-runtime/workspaces/transfer.js +1 -1
- package/dist/workspace-runtime/workspaces/workspace-shares.js +1 -0
- package/package.json +3 -3
- package/project-template-v2/.playcraft/skills.lock.json +7 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { join } from 'node:path';
|
|
1
2
|
export const NATIVE_APPROVALS_REVIEWER = 'user';
|
|
2
3
|
/** Trusted batch policy wins over the adapter-wide fixed policy. A browser mode may only narrow it. */
|
|
3
4
|
export function resolveSessionExecution(cwd, mode, trusted, fixed) {
|
|
@@ -22,16 +23,22 @@ export function executionPolicy(cwd, mode, fixed) {
|
|
|
22
23
|
networkAccess: false, excludeTmpdirEnvVar: true, excludeSlashTmp: true,
|
|
23
24
|
} };
|
|
24
25
|
}
|
|
25
|
-
export function threadExecutionParams(execution) {
|
|
26
|
+
export function threadExecutionParams(execution, shellEnvironment = {}) {
|
|
26
27
|
const sandbox = execution.sandboxPolicy.type === 'readOnly' ? 'read-only'
|
|
27
28
|
: execution.sandboxPolicy.type === 'workspaceWrite' ? 'workspace-write' : 'danger-full-access';
|
|
28
29
|
const policy = execution.sandboxPolicy;
|
|
30
|
+
const scratch = execution.scratchDir;
|
|
29
31
|
return { cwd: execution.cwd, approvalPolicy: execution.approvalPolicy, approvalsReviewer: NATIVE_APPROVALS_REVIEWER, sandbox,
|
|
30
32
|
config: policy.type === 'workspaceWrite' ? {
|
|
31
33
|
'sandbox_workspace_write.writable_roots': policy.writableRoots,
|
|
32
34
|
'sandbox_workspace_write.network_access': policy.networkAccess,
|
|
33
35
|
'sandbox_workspace_write.exclude_tmpdir_env_var': policy.excludeTmpdirEnvVar,
|
|
34
36
|
'sandbox_workspace_write.exclude_slash_tmp': policy.excludeSlashTmp,
|
|
37
|
+
...(scratch ? { 'shell_environment_policy.set': {
|
|
38
|
+
...shellEnvironment, TMPDIR: scratch, TMP: scratch, TEMP: scratch,
|
|
39
|
+
XDG_CONFIG_HOME: join(scratch, 'config'), XDG_CACHE_HOME: join(scratch, 'cache'),
|
|
40
|
+
...(execution.chromiumPath ? { PLAYCRAFT_CHROMIUM_PATH: execution.chromiumPath } : {}),
|
|
41
|
+
} } : {}),
|
|
35
42
|
} : {} };
|
|
36
43
|
}
|
|
37
44
|
export const APPROVAL_METHODS = new Set([
|
|
@@ -47,7 +47,7 @@ export async function createWorkspaceArchive(root, options = {}) {
|
|
|
47
47
|
continue;
|
|
48
48
|
const target = join(directory, entry.name);
|
|
49
49
|
const path = relative(rootReal, target).split(sep).join('/');
|
|
50
|
-
if (isCredentialFile(path) || /(?:^|\/)\.playcraft\/(?:workspace-context(?:\.[^/]*)?|video-replication)(?:\/|$)/.test(path))
|
|
50
|
+
if (isCredentialFile(path) || /(?:^|\/)\.playcraft\/(?:workspace-context(?:\.[^/]*)?|video-replication|apk-replication)(?:\/|$)/.test(path))
|
|
51
51
|
continue;
|
|
52
52
|
if (excludedRoots.some(excluded => inside(excluded, target)))
|
|
53
53
|
continue;
|
|
@@ -18,6 +18,7 @@ export async function writeWorkspaceCliContext(root, workspaceId) {
|
|
|
18
18
|
await rename(temporary, join(management, 'workspace-context.json'));
|
|
19
19
|
await excludeFromGit(root, '/.playcraft/workspace-context.json');
|
|
20
20
|
await excludeFromGit(root, '/.playcraft/video-replication/');
|
|
21
|
+
await excludeFromGit(root, '/.playcraft/apk-replication/');
|
|
21
22
|
}
|
|
22
23
|
finally {
|
|
23
24
|
await rm(temporary, { force: true });
|
|
@@ -33,7 +33,7 @@ function gitEnvironment() {
|
|
|
33
33
|
function excluded(path) {
|
|
34
34
|
const parts = path.split('/');
|
|
35
35
|
return parts.some(part => EXCLUDED.has(part.toLowerCase()) || /^\.playcraft-(?:credential|transfer)-.*\.tmp$/i.test(part)) ||
|
|
36
|
-
parts.some((part, index) => part === '.playcraft' && /^(?:workspace-context(?:\..*)?|video-replication)$/.test(parts[index + 1] ?? '')) ||
|
|
36
|
+
parts.some((part, index) => part === '.playcraft' && /^(?:workspace-context(?:\..*)?|video-replication|apk-replication)$/.test(parts[index + 1] ?? '')) ||
|
|
37
37
|
isCredentialFile(path);
|
|
38
38
|
}
|
|
39
39
|
export function transferGit(root, args) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@playcraft/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.81",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -57,8 +57,8 @@
|
|
|
57
57
|
"@gltf-transform/core": "^4.3.0",
|
|
58
58
|
"@gltf-transform/extensions": "^4.3.0",
|
|
59
59
|
"@gltf-transform/functions": "^4.3.0",
|
|
60
|
-
"@playcraft/build": "0.1.
|
|
61
|
-
"@playcraft/common": "0.1.
|
|
60
|
+
"@playcraft/build": "0.1.81",
|
|
61
|
+
"@playcraft/common": "0.1.81",
|
|
62
62
|
"better-sqlite3-pinned": "npm:better-sqlite3@13.0.3",
|
|
63
63
|
"chokidar": "^4.0.3",
|
|
64
64
|
"commander": "^13.1.0",
|
|
@@ -106,6 +106,13 @@
|
|
|
106
106
|
"surface": "sandbox-agent",
|
|
107
107
|
"mountPath": ".playcraft/skills/remix__playcraft-adsdk"
|
|
108
108
|
},
|
|
109
|
+
{
|
|
110
|
+
"skillRef": "remix/playcraft-apk-replication",
|
|
111
|
+
"version": "1.1.0",
|
|
112
|
+
"artifactHash": "a7c16b036e4cbce07c5c03d1b4e98a4d42312e997a1ea0ad3ceb2d1e85ecebb9",
|
|
113
|
+
"surface": "sandbox-agent",
|
|
114
|
+
"mountPath": ".playcraft/skills/remix__playcraft-apk-replication"
|
|
115
|
+
},
|
|
109
116
|
{
|
|
110
117
|
"skillRef": "remix/playcraft-audio-generation",
|
|
111
118
|
"version": "1.4.0",
|