<commit_before># Planning in the Shell

By default plans are produced and consumed locally in the browser.
When using [arcs-live](https://polymerlabs.github.io/arcs-live/shells/web-shell) by default both arcs and suggestions are serialized to Firebase.

## URL params
Suggestions storage can be controlled by **plannerStorage** url param. 

* Navigate to the Arcs page and use **volatile** storage for suggestion:  
https://polymerlabs.github.io/arcs-live/shells/web-shell?plannerStorage=volatile

* Navigate to the Arcs page and use **PouchDb** storage for suggestion:  
https://polymerlabs.github.io/arcs-live/shells/web-shell?plannerStorage=pouchdb://local/random-db-name  
The suggestion values will be found in Chrome's inspector, under Application > Storage > Local Storage.

Arcs storage can be controlled by **storage** url param. 
* Navigate to the Arcs page and use **PouchDb** storage for both - arcs and suggestions:  
https://localhost:8080/shells/web-shell?storage=pouchdb://localhost:8080/user/&plannerStorage=pouchdb://localhost:8080/user/


To populate Arcs Extension strategy explorer, add the **plannerDebug** url param:  
https://polymerlabs.github.io/arcs-live/shells/web-shell?plannerDebug

# Remote Planning 
To consume plans produced on the server, disable shell planning with an **plannerOnlyConsumer** url param, ie:  
https://polymerlabs.github.io/arcs-live/shells/web-shell?plannerOnlyConsumer=true

## Firebase
To run planning on the server use the following command:

```
/shells/planner-shell $ serve.sh
```
or debug with:
```
/shells/planner-shell $ debug.sh
```

The remote planning is performed per user for all their arcs.  
The default user is **planner** (currently to override, set environment variable or update code [link](https://github.com/PolymerLabs/arcs/blob/master/shells/planner-shell/index.js#L23)).

## PouchDB
To test remote planning with Pouch you will need to run a Pouch Server instance by following these steps:

1. Build the server by executing:
```
/server $ npm run server
```
2. Start the server on port 8080 by running 
```
/server $ env {args} npm run server:start
```
Optionally prefix your command with the following optional environment arguments:
```
DEBUG=true
ARCS_USER_ID=xxxxx
STORAGE_KEY_BASE  (default is pouchdb://localhost:8080/user/)
```

More information on how to bring up a Pouch server on a Personal Cloud Server: [server/REAMDE.md](../../../server/README.md)<commit_msg>add devtools command flag to planner readme (#2510)<commit_after># Planning in the Shell

By default plans are produced and consumed locally in the browser.
When using [arcs-live](https://polymerlabs.github.io/arcs-live/shells/web-shell) by default both arcs and suggestions are serialized to Firebase.

## URL params
Suggestions storage can be controlled by **plannerStorage** url param. 

* Navigate to the Arcs page and use **volatile** storage for suggestion:  
https://polymerlabs.github.io/arcs-live/shells/web-shell?plannerStorage=volatile

* Navigate to the Arcs page and use **PouchDb** storage for suggestion:  
https://polymerlabs.github.io/arcs-live/shells/web-shell?plannerStorage=pouchdb://local/random-db-name  
The suggestion values will be found in Chrome's inspector, under Application > Storage > Local Storage.

Arcs storage can be controlled by **storage** url param. 
* Navigate to the Arcs page and use **PouchDb** storage for both - arcs and suggestions:  
https://localhost:8080/shells/web-shell?storage=pouchdb://localhost:8080/user/&plannerStorage=pouchdb://localhost:8080/user/


To populate Arcs Extension strategy explorer, add the **plannerDebug** url param:  
https://polymerlabs.github.io/arcs-live/shells/web-shell?plannerDebug

# Remote Planning 
To consume plans produced on the server, disable shell planning with an **plannerOnlyConsumer** url param, ie:  
https://polymerlabs.github.io/arcs-live/shells/web-shell?plannerOnlyConsumer=true

## Firebase
To run planning on the server use the following command:
```
/shells/planner-shell $ serve.sh
```

Or with DevTools:
```
/shells/planner-shell $ serve.sh --explore
```
Access DevTools for remote planner at: http://localhost:8080/devools/.


or debug with:
```
/shells/planner-shell $ debug.sh
```

The remote planning is performed per user for all their arcs.  
The default user is **planner** (currently to override, set environment variable or update code [link](https://github.com/PolymerLabs/arcs/blob/master/shells/planner-shell/index.js#L23)).

## PouchDB
To test remote planning with Pouch you will need to run a Pouch Server instance by following these steps:

1. Build the server by executing:
```
/server $ npm run server
```
2. Start the server on port 8080 by running 
```
/server $ env {args} npm run server:start
```
Optionally prefix your command with the following optional environment arguments:
```
DEBUG=true
ARCS_USER_ID=xxxxx
STORAGE_KEY_BASE  (default is pouchdb://localhost:8080/user/)
```

More information on how to bring up a Pouch server on a Personal Cloud Server: [server/REAMDE.md](../../../server/README.md)
{'fraction_non_alphanumeric': 0.10736800630417652, 'fraction_numerical': 0.01103230890464933, 'mean_word_length': 4.749716874292186, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 14, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2854398', 'n_tokens_mistral': 1577, 'n_tokens_neox': 1469, 'n_words': 527}